From J.Verhoef at donders.ru.nl Wed Jan 2 08:37:16 2019 From: J.Verhoef at donders.ru.nl (Verhoef, J.P. (Julia)) Date: Wed, 2 Jan 2019 07:37:16 +0000 Subject: [FieldTrip] Postdoctoral Position for Dutch Research Consortium 'Language in Interaction' In-Reply-To: <92b5c7b6b5594ed8a658687d1da8a272@EXPRD05.hosting.ru.nl> References: <5d1e863b01d7453e8f53ca640ca2b9f9@Umcexchp06.umcn.nl>, <92b5c7b6b5594ed8a658687d1da8a272@EXPRD05.hosting.ru.nl> Message-ID: <1546414651619.43955@donders.ru.nl> A new Postdoctoral Position is available within the Language in Interaction consortium! The Language in Interaction research consortium invites applications for a postdoctoral position. This position provides the opportunity for conducting world-class research as a member of an interdisciplinary team. The institute involved is an equal opportunity employer, committed to building a culturally diverse intellectual community. For more information and how to apply, please visit: https://www.radboudumc.nl/en/vacancies/63921-postdoctoral-position-for-dutch-research-consortium-language-in-interaction Kind regards, Julia Verhoef Secretary Language in Interaction consortium From elene.beitia at alumni.mondragon.edu Thu Jan 3 09:06:30 2019 From: elene.beitia at alumni.mondragon.edu (Elene Beitia Loinaz) Date: Thu, 3 Jan 2019 09:06:30 +0100 Subject: [FieldTrip] =?utf-8?q?=28no_subject=29?= Message-ID: Hello, My name is Elene Beitia and I am a student in Mondragon Unibertsitatea. We are working in the reconstruction of EEG in resting state with previous pre-process data. That data was pre-process using eeglab and we need to convert it to fieltrip. We know about eeglab2fieltrip function, but we are having problems using it. Can someone share information about how to use it? Thank you in advanced, Elene. -------------- next part -------------- An HTML attachment was scrubbed... URL: From julian.keil at gmail.com Thu Jan 3 09:34:14 2019 From: julian.keil at gmail.com (Julian Keil) Date: Thu, 3 Jan 2019 09:34:14 +0100 Subject: [FieldTrip] (no subject) In-Reply-To: References: Message-ID: <9079FE5E-0DD4-4957-89C5-C4659625D5EF@gmail.com> Dear Elene, could you explain what problems you are having? eeglab2fieldtrip creates the basic structure used in FT, but depending on what you want to do, you need to add some additional info to the created FT structure. Best, Julian ________________ Prof. Dr. Julian Keil Biological Psychology Olshausenstrasse 62 - R. 306 24118 Kiel, Germany +49 - 0431 - 880 - 4872 http://www.biopsych.uni-kiel.de/en > Am 03.01.2019 um 09:06 schrieb Elene Beitia Loinaz : > > Hello, > My name is Elene Beitia and I am a student in Mondragon Unibertsitatea. > We are working in the reconstruction of EEG in resting state with previous pre-process data. That data was pre-process using eeglab and we need to convert it to fieltrip. We know about eeglab2fieltrip function, but we are having problems using it. Can someone share information about how to use it? > Thank you in advanced, > Elene. > _______________________________________________ > 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 jiaxiangzhang at gmail.com Fri Jan 4 00:13:50 2019 From: jiaxiangzhang at gmail.com (Jiaxiang ZHANG) Date: Thu, 3 Jan 2019 23:13:50 +0000 Subject: [FieldTrip] Research associate and PhD studentship opportunities at Cardiff, UK Message-ID: [Apologize for cross-posting] Dear all, We are seeking applicants for one research associate position and one PhD studentships at Cardiff University Brain Research Imaging Centre (CUBRIC). These posts link to a project funded by the European Research Council (ERC). The successful candidates will work with Dr Jiaxiang Zhang and collaborators to understand the neural mechanisms of intentional decision, using multimodal brain imaging and computational modelling. We encourage applicants from different disciplines, including cognitive neuroscience, imaging neuroscience, psychology, computer science, mathematics or physics. Job specs and application details are available online (see links below). For informal enquiries about the project, please contact Dr Jiaxiang Zhang ( zhangj73 at cardiff.ac.uk) with your CV. A. 3-year postdoc position (Deadline: Jan 11, 2019) https://krb-sjobs.brassring.com/TGnewUI/Search/Home/HomeWithPreLoad?partnerid=30011&siteid=5460&PageType=searchResults&SearchType=linkquery&LinkID=6#jobDetails=1421535_5460 B. PhD studentship (Deadline: Feb 1, 2019) https://www.findaphd.com/phds/project/multimodal-understanding-of-intentional-decision-in-the-human-brain/?p105180 The successful candidates will be based at CUBRIC. CUBRIC houses a unique combination of state-of-the-art facilities and world-leading expertise, with 4 human MRI systems (2 x Siemens Prisma, 1 x Siemens Connectom, 1 x Siemens 7T), MEG, EEG, TMS, tDCS, clinical research units and testing labs. Further details of CUBRIC can be found online ( http://sites.cardiff.ac.uk/cubric). Kind regards, Jiaxiang Zhang Cardiff University Brain Research Imaging Centre (CUBRIC) School of Psychology Cardiff University Maindy Road, Cardiff, CF24 4HQ Lab: http://ccbrain.org Faculty: http://psych.cf.ac.uk/zhang Email: zhangj73 at cardiff.ac.uk Tel: +44 (0)29 2087 0471 -------------- next part -------------- An HTML attachment was scrubbed... URL: From martin.rosenfelder at uni-ulm.de Fri Jan 4 10:01:40 2019 From: martin.rosenfelder at uni-ulm.de (Martin Rosenfelder) Date: Fri, 04 Jan 2019 10:01:40 +0100 Subject: [FieldTrip] EEG data preprocessing Message-ID: <59be-5c2f2100-b-26948b40@80576441> Dear Fieldtrip community, I am analyzing time-frequency EEG data with respect to power spectra differences between an experimental and a resting condition. I am reading in the data from EGI raw files, which is then filtered and cut into trials (60 trials for each of the two conditions). The two conditions are then concatenated to one file using ft_appenddata. The output of the preprocessing is then passed to visual artifact rejection, an ICA and another visual artifact rejection. When trying to split the dataset into two conditions for multivariate analyses purposes, Fieldtrip throws an error saying that there are no event values in the data set any more. Splitting the data set into the two conditions does not seem to be possible any more. Is there a way to keep the event values during the artifact rejection so that the data set can be splitted into the conditions afterwards? Thank you very much in advance for your time and effort! I appreciate any hint regarding the issue described above. Best, Martin -- M.Sc.-Psych. Martin Rosenfelder Wissenschaftlicher Mitarbeiter Klinische und Biologische Psychologie Universität Ulm Raum 47.2.259 +49 731-50 26592 martin.rosenfelder at uni-ulm.de From julian.keil at gmail.com Fri Jan 4 10:27:42 2019 From: julian.keil at gmail.com (Julian Keil) Date: Fri, 4 Jan 2019 10:27:42 +0100 Subject: [FieldTrip] EEG data preprocessing In-Reply-To: <59be-5c2f2100-b-26948b40@80576441> References: <59be-5c2f2100-b-26948b40@80576441> Message-ID: <8013F35F-319A-4EB0-A78B-DCE144E6978F@gmail.com> Dear Martin, see here: http://www.fieldtriptoolbox.org/faq/is_it_possible_to_keep_track_of_trial-specific_information_in_my_fieldtrip_analysis_pipeline/ Best, Julian ________________ Prof. Dr. Julian Keil Biological Psychology Olshausenstrasse 62 - R. 306 24118 Kiel, Germany +49 - 0431 - 880 - 4872 http://www.biopsych.uni-kiel.de/en > Am 04.01.2019 um 10:01 schrieb Martin Rosenfelder : > > Dear Fieldtrip community, > > I am analyzing time-frequency EEG data with respect to power spectra differences between an experimental and a resting condition. > I am reading in the data from EGI raw files, which is then filtered and cut into trials (60 trials for each of the two conditions). The two conditions are then concatenated to one file using ft_appenddata. The output of the preprocessing is then passed to visual artifact rejection, an ICA and another visual artifact rejection. > When trying to split the dataset into two conditions for multivariate analyses purposes, Fieldtrip throws an error saying that there are no event values in the data set any more. Splitting the data set into the two conditions does not seem to be possible any more. > > Is there a way to keep the event values during the artifact rejection so that the data set can be splitted into the conditions afterwards? > > Thank you very much in advance for your time and effort! I appreciate any hint regarding the issue described above. > > Best, > Martin > > -- > M.Sc.-Psych. Martin Rosenfelder > Wissenschaftlicher Mitarbeiter > Klinische und Biologische Psychologie > Universität Ulm > Raum 47.2.259 > +49 731-50 26592 > martin.rosenfelder at uni-ulm.de > > > _______________________________________________ > 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 irene.varela at alumni.mondragon.edu Fri Jan 4 12:47:06 2019 From: irene.varela at alumni.mondragon.edu (Irene Varela Leniz) Date: Fri, 4 Jan 2019 12:47:06 +0100 Subject: [FieldTrip] problems using fieldtrip for source reconstruction EEG Message-ID: Hi, I am a researcher in Mondragon University working on source reconstruction of EEG data. I am new at fieldtrip and I feel a little bit lost about this software. I have some errors in a code I have developed but I do not manage to solve them. Could you please help me? I want to plot EEG data of a channel called 'A1' which is the first row in a 2D matrix variable called data, which is inside EEG structure. The code I have developed is below and I get the following error: *Error using ft_checkdata (line 525)* *This function requires 'timelock' or 'freq' data as input, see ft_datatype_timelock or ft_datatype_freq.* The code is the following: *clc; clear all; close all;* *clear variables* *restoredefaultpath; % set a clean path* *main='E:\';* *cd='E:\fieldtrip-20181217'; % change this* *addpath(cd);* *ft_defaults;* *filename = "E:\PBLdata\O200_RS1_final.set"; %cambiar aqui y poner vuestro directorio* *load(filename, '-mat'); %Create EEG struct* *location = EEG.chanlocs;* *data = EEG.data; * *cfg = [];* *cfg.xlim = [-0.2 1.0];* *cfg.ylim = [-1e-13 3e-13];* *cfg.channel = 'A1';* *datos = data(1,:);* *Ndata = numel(datos);* *for i=1:Ndata* * % check if the input data is valid for this function* * datos(i) = ft_checkdata(datos(i), 'datatype', {'timelock', 'freq'});* *end* *figure; ft_singleplotER(cfg,datos);* Thank you in advance, Irene -------------- next part -------------- An HTML attachment was scrubbed... URL: From julian.keil at gmail.com Fri Jan 4 14:08:35 2019 From: julian.keil at gmail.com (Julian Keil) Date: Fri, 4 Jan 2019 14:08:35 +0100 Subject: [FieldTrip] problems using fieldtrip for source reconstruction EEG In-Reply-To: References: Message-ID: <2F70506F-5E8C-4A34-8A4F-030FF9B78A80@gmail.com> Hi Irene, what is the reason to use the extra checkdata step? The function checks if the input data has the correct „datatype“ field. Since you probably don’t have that field, the function will throw an error. Also, I’d recommend using the eeglab2fieldtrip-function to get from EEGlab .set to a fieldtrip-like structure. Best, Julian > Am 04.01.2019 um 12:47 schrieb Irene Varela Leniz : > > Hi, > > I am a researcher in Mondragon University working on source reconstruction of EEG data. I am new at fieldtrip and I feel a little bit lost about this software. I have some errors in a code I have developed but I do not manage to solve them. Could you please help me? > > I want to plot EEG data of a channel called 'A1' which is the first row in a 2D matrix variable called data, which is inside EEG structure. The code I have developed is below and I get the following error: > > Error using ft_checkdata (line 525) > This function requires 'timelock' or 'freq' data as input, see ft_datatype_timelock or ft_datatype_freq. > > The code is the following: > clc; clear all; close all; > clear variables > restoredefaultpath; % set a clean path > main='E:\'; > cd='E:\fieldtrip-20181217'; % change this > addpath(cd); > > ft_defaults; > filename = "E:\PBLdata\O200_RS1_final.set"; %cambiar aqui y poner vuestro directorio > load(filename, '-mat'); %Create EEG struct > location = EEG.chanlocs; > data = EEG.data; > > cfg = []; > cfg.xlim = [-0.2 1.0]; > cfg.ylim = [-1e-13 3e-13]; > cfg.channel = 'A1'; > datos = data(1,:); > Ndata = numel(datos); > for i=1:Ndata > % check if the input data is valid for this function > datos(i) = ft_checkdata(datos(i), 'datatype', {'timelock', 'freq'}); > end > > figure; ft_singleplotER(cfg,datos); > > Thank you in advance, > > Irene > > _______________________________________________ > 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 nicole.landi at yale.edu Sat Jan 5 17:36:39 2019 From: nicole.landi at yale.edu (Landi, Nicole) Date: Sat, 5 Jan 2019 16:36:39 +0000 Subject: [FieldTrip] =?utf-8?q?=28no_subject=29?= Message-ID: POSTDOCTORAL FELLOWSHIP IN ELECTROPHYSIOLOGY (EEG AND ERP) The GENESIS (Genetic and Neurobehavioral Systems: Interdisciplinary Studies) lab (PI: Elena Grigorenko) at the University of Houston and Baylor College of Medicine has an opening for a postdoctoral research fellow to join ongoing projects investigating the neural basis of cognitive and linguistic development in laboratory and field settings. The successful applicant will contribute to two funded projects that utilize electrophysiological techniques (EEG, ERP) to characterize children who are at elevated genetic or environmental (e.g., early neglect and abuse) risk for developmental language/reading disorder. Applicants must have a background in research using EEG or ERP methods, including experimental design and data collection, analysis, and interpretation. Required qualifications: • PhD or equivalent in Psychology, Cognitive Science, Communication Disorders, Neuroscience, or related field • Experience with the analysis of EEG data and one or more of the following analysis packages: EEGlab/ERPlab, Brain Vision Analyzer, NetStation, or an equivalent EEG software analysis package • Experience designing and conducting EEG/ERP studies • Programming skills, including knowledge of at least one programming language and basic Unix commands • Demonstrable interest in the cognitive neuroscience of language and cognition and/or reading development • Proficiency with writing academic manuscripts, particularly those related to EEG/ERP Preferred qualifications: • Experience with advanced electrophysiology analysis techniques; e.g., independent components analysis, connectivity, source localization • Advanced knowledge and expertise in statistics, e.g. multivariate statistics, or Bayesian methods • Experience working with developmental populations (e.g., school-age children and adolescents) • Leadership, communication, and organizational skills This position is based at the University of Houston in Houston, TX, but will coordinate with research partners at multiple offsite locations, including Dr. Nicole Landi (University of Connecticut, Haskins Laboratories, Yale Child Study Center https://landi.lab.uconn.edu/), and Natalia Rakhlin (Wayne State University). Offsite coordination will involve training of research associates, designing and implementing experiments, and supervision of data collection and sharing. Interested candidates should send: 1) a CV; 2) the names of three references; and 3) a cover letter to Drs. Grigorenko (elena.grigorenko at times.uh.edu), Landi (nicole.landi at uconn.edu), or Rakhlin (natalia.rakhlin at wayne.edu). This position will remain open until filled; desired start date is on or before June 2019. Salary will be commensurate with NIH postdoctoral funding levels. -------------- next part -------------- An HTML attachment was scrubbed... URL: From nemethd at gmail.com Sat Jan 5 19:52:29 2019 From: nemethd at gmail.com (Dezso Nemeth) Date: Sat, 5 Jan 2019 19:52:29 +0100 Subject: [FieldTrip] Postdoc position in Lyon (Cognitive Neuroscience) Message-ID: Hi all, there is a very cool postdoc position in Lyon. Feel free to pass this on. https://neurojobs.sfn.org/jobs/11838210/postdoc-position-in-lyon-cognitive-or-computational-neuroscience Best, Dezso -------------------------------------- NEMETH, Dezso (PhD, DSc) Lyon Neuroscience Research Center (CRNL) Université de Lyon Brain, Memory and Language Lab: http://www.memory-and-language.com -------------- next part -------------- An HTML attachment was scrubbed... URL: From irene.varela at alumni.mondragon.edu Mon Jan 7 09:57:10 2019 From: irene.varela at alumni.mondragon.edu (Irene Varela Leniz) Date: Mon, 7 Jan 2019 09:57:10 +0100 Subject: [FieldTrip] problems using fieldtrip for source reconstruction EEG In-Reply-To: <2F70506F-5E8C-4A34-8A4F-030FF9B78A80@gmail.com> References: <2F70506F-5E8C-4A34-8A4F-030FF9B78A80@gmail.com> Message-ID: Good morning Julian, Can you help me with plotting some resting state EEG signals? I am new in Fieldtrip and I dont find clear information about this topic and I dont really know how to do plottings in Fieldtrip. I feel like the fieldtrip documentation is a little bit weak.... Thank you in advance, Best regards, Irene Varela El vie., 4 ene. 2019 a las 14:08, Julian Keil () escribió: > Hi Irene, > > what is the reason to use the extra checkdata step? > The function checks if the input data has the correct „datatype“ field. > Since you probably don’t have that field, the function will throw an error. > > Also, I’d recommend using the eeglab2fieldtrip-function to get from EEGlab > .set to a fieldtrip-like structure. > > Best, > > Julian > > > Am 04.01.2019 um 12:47 schrieb Irene Varela Leniz < > irene.varela at alumni.mondragon.edu>: > > Hi, > > I am a researcher in Mondragon University working on source reconstruction > of EEG data. I am new at fieldtrip and I feel a little bit lost about this > software. I have some errors in a code I have developed but I do not manage > to solve them. Could you please help me? > > I want to plot EEG data of a channel called 'A1' which is the first row in > a 2D matrix variable called data, which is inside EEG structure. The code I > have developed is below and I get the following error: > > *Error using ft_checkdata (line 525)* > *This function requires 'timelock' or 'freq' data as input, see > ft_datatype_timelock or ft_datatype_freq.* > > The code is the following: > *clc; clear all; close all;* > *clear variables* > *restoredefaultpath; % set a clean path* > *main='E:\';* > *cd='E:\fieldtrip-20181217'; % change this* > *addpath(cd);* > > *ft_defaults;* > *filename = "E:\PBLdata\O200_RS1_final.set"; %cambiar aqui y poner vuestro > directorio* > *load(filename, '-mat'); %Create EEG struct* > *location = EEG.chanlocs;* > *data = EEG.data; * > > *cfg = [];* > *cfg.xlim = [-0.2 1.0];* > *cfg.ylim = [-1e-13 3e-13];* > *cfg.channel = 'A1';* > *datos = data(1,:);* > *Ndata = numel(datos);* > *for i=1:Ndata* > * % check if the input data is valid for this function* > * datos(i) = ft_checkdata(datos(i), 'datatype', {'timelock', 'freq'});* > *end* > > *figure; ft_singleplotER(cfg,datos);* > > Thank you in advance, > > Irene > > _______________________________________________ > 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 julian.keil at gmail.com Mon Jan 7 10:27:48 2019 From: julian.keil at gmail.com (Julian Keil) Date: Mon, 7 Jan 2019 10:27:48 +0100 Subject: [FieldTrip] problems using fieldtrip for source reconstruction EEG In-Reply-To: References: <2F70506F-5E8C-4A34-8A4F-030FF9B78A80@gmail.com> Message-ID: Hi Irene, it helps if you describe exactly what you want to do (I don’t mean to be rude or patronizing, but check here for suggestions: https://journals.plos.org/ploscompbiol/article?id=10.1371/journal.pcbi.1002202 ). There are many ways to visualize resting state EEG signals, and you don’t need fieldtrip for all of them. E.g., if you just want to plot the timecourse of the data, you can use the matlab built-in „plot“ function (e.g. use something like "plot(data.time{1},data.trial{1})“ to plot one trial). If you want to explore your data, ft_databrowser is your friend http://www.fieldtriptoolbox.org/faq/how_can_i_use_the_databrowser/ Best, Julian ________________ Prof. Dr. Julian Keil Biological Psychology Olshausenstrasse 62 - R. 306 24118 Kiel, Germany +49 - 0431 - 880 - 4872 http://www.biopsych.uni-kiel.de/en > Am 07.01.2019 um 09:57 schrieb Irene Varela Leniz : > > Good morning Julian, > > Can you help me with plotting some resting state EEG signals? I am new in Fieldtrip and I dont find clear information about this topic and I dont really know how to do plottings in Fieldtrip. I feel like the fieldtrip documentation is a little bit weak.... > > Thank you in advance, > Best regards, > > Irene Varela > > El vie., 4 ene. 2019 a las 14:08, Julian Keil (>) escribió: > Hi Irene, > > what is the reason to use the extra checkdata step? > The function checks if the input data has the correct „datatype“ field. > Since you probably don’t have that field, the function will throw an error. > > Also, I’d recommend using the eeglab2fieldtrip-function to get from EEGlab .set to a fieldtrip-like structure. > > Best, > > Julian > > >> Am 04.01.2019 um 12:47 schrieb Irene Varela Leniz >: >> >> Hi, >> >> I am a researcher in Mondragon University working on source reconstruction of EEG data. I am new at fieldtrip and I feel a little bit lost about this software. I have some errors in a code I have developed but I do not manage to solve them. Could you please help me? >> >> I want to plot EEG data of a channel called 'A1' which is the first row in a 2D matrix variable called data, which is inside EEG structure. The code I have developed is below and I get the following error: >> >> Error using ft_checkdata (line 525) >> This function requires 'timelock' or 'freq' data as input, see ft_datatype_timelock or ft_datatype_freq. >> >> The code is the following: >> clc; clear all; close all; >> clear variables >> restoredefaultpath; % set a clean path >> main='E:\'; >> cd='E:\fieldtrip-20181217'; % change this >> addpath(cd); >> >> ft_defaults; >> filename = "E:\PBLdata\O200_RS1_final.set"; %cambiar aqui y poner vuestro directorio >> load(filename, '-mat'); %Create EEG struct >> location = EEG.chanlocs; >> data = EEG.data; >> >> cfg = []; >> cfg.xlim = [-0.2 1.0]; >> cfg.ylim = [-1e-13 3e-13]; >> cfg.channel = 'A1'; >> datos = data(1,:); >> Ndata = numel(datos); >> for i=1:Ndata >> % check if the input data is valid for this function >> datos(i) = ft_checkdata(datos(i), 'datatype', {'timelock', 'freq'}); >> end >> >> figure; ft_singleplotER(cfg,datos); >> >> Thank you in advance, >> >> Irene >> >> _______________________________________________ >> 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 dlozanosoldevilla at gmail.com Mon Jan 7 10:30:16 2019 From: dlozanosoldevilla at gmail.com (Diego Lozano-Soldevilla) Date: Mon, 7 Jan 2019 10:30:16 +0100 Subject: [FieldTrip] problems using fieldtrip for source reconstruction EEG In-Reply-To: References: <2F70506F-5E8C-4A34-8A4F-030FF9B78A80@gmail.com> Message-ID: Dear Irene, Here a link about plotting in general: http://www.fieldtriptoolbox.org/tutorial/#visualizingthe-results-of-an-analysis Here a tutorial about basic power analysis using resting state data and connectivity analysis in source space http://www.fieldtriptoolbox.org/tutorial/networkanalysis/ And here how you can help us to improve the documentation http://www.fieldtriptoolbox.org/contribute/ I hope that helps, Diego On Mon, 7 Jan 2019 at 10:18, Irene Varela Leniz < irene.varela at alumni.mondragon.edu> wrote: > Good morning Julian, > > Can you help me with plotting some resting state EEG signals? I am new in > Fieldtrip and I dont find clear information about this topic and I dont > really know how to do plottings in Fieldtrip. I feel like the fieldtrip > documentation is a little bit weak.... > > Thank you in advance, > Best regards, > > Irene Varela > > El vie., 4 ene. 2019 a las 14:08, Julian Keil () > escribió: > >> Hi Irene, >> >> what is the reason to use the extra checkdata step? >> The function checks if the input data has the correct „datatype“ field. >> Since you probably don’t have that field, the function will throw an >> error. >> >> Also, I’d recommend using the eeglab2fieldtrip-function to get from >> EEGlab .set to a fieldtrip-like structure. >> >> Best, >> >> Julian >> >> >> Am 04.01.2019 um 12:47 schrieb Irene Varela Leniz < >> irene.varela at alumni.mondragon.edu>: >> >> Hi, >> >> I am a researcher in Mondragon University working on source >> reconstruction of EEG data. I am new at fieldtrip and I feel a little bit >> lost about this software. I have some errors in a code I have developed but >> I do not manage to solve them. Could you please help me? >> >> I want to plot EEG data of a channel called 'A1' which is the first row >> in a 2D matrix variable called data, which is inside EEG structure. The >> code I have developed is below and I get the following error: >> >> *Error using ft_checkdata (line 525)* >> *This function requires 'timelock' or 'freq' data as input, see >> ft_datatype_timelock or ft_datatype_freq.* >> >> The code is the following: >> *clc; clear all; close all;* >> *clear variables* >> *restoredefaultpath; % set a clean path* >> *main='E:\';* >> *cd='E:\fieldtrip-20181217'; % change this* >> *addpath(cd);* >> >> *ft_defaults;* >> *filename = "E:\PBLdata\O200_RS1_final.set"; %cambiar aqui y poner >> vuestro directorio* >> *load(filename, '-mat'); %Create EEG struct* >> *location = EEG.chanlocs;* >> *data = EEG.data; * >> >> *cfg = [];* >> *cfg.xlim = [-0.2 1.0];* >> *cfg.ylim = [-1e-13 3e-13];* >> *cfg.channel = 'A1';* >> *datos = data(1,:);* >> *Ndata = numel(datos);* >> *for i=1:Ndata* >> * % check if the input data is valid for this function* >> * datos(i) = ft_checkdata(datos(i), 'datatype', {'timelock', 'freq'});* >> *end* >> >> *figure; ft_singleplotER(cfg,datos);* >> >> Thank you in advance, >> >> Irene >> >> _______________________________________________ >> 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 irene.varela at alumni.mondragon.edu Mon Jan 7 10:34:58 2019 From: irene.varela at alumni.mondragon.edu (Irene Varela Leniz) Date: Mon, 7 Jan 2019 10:34:58 +0100 Subject: [FieldTrip] problems using fieldtrip for source reconstruction EEG In-Reply-To: References: <2F70506F-5E8C-4A34-8A4F-030FF9B78A80@gmail.com> Message-ID: Hi Julian, I have read about them in Fieldtrip documentation but I still dont manage to do nothing. I am looking for a topographic visualization of data and I am interesed in using Fieldtrip. Moreover, whenever I try different command I get the following error: Error using ft_checkdata (line 525) This function requires 'timelock' or 'freq' data as input, see ft_datatype_timelock or ft_datatype_freq. Error in ft_singleplotER (line 133) varargin{i} = ft_checkdata(varargin{i}, 'datatype', {'timelock', 'freq'}); The data comes from eeglab using eeglab2fieldtrip function, so that we have the data stored in a struct. Thank you in advance, Irene El lun., 7 ene. 2019 a las 10:27, Julian Keil () escribió: > Hi Irene, > > it helps if you describe exactly what you want to do (I don’t mean to be > rude or patronizing, but check here for suggestions: > https://journals.plos.org/ploscompbiol/article?id=10.1371/journal.pcbi.1002202 > ). > > There are many ways to visualize resting state EEG signals, and you don’t > need fieldtrip for all of them. > E.g., if you just want to plot the timecourse of the data, you can use the > matlab built-in „plot“ function (e.g. use something like > "plot(data.time{1},data.trial{1})“ to plot one trial). If you want to > explore your data, ft_databrowser is your friend > http://www.fieldtriptoolbox.org/faq/how_can_i_use_the_databrowser/ > > Best, > > Julian > > ________________ > Prof. Dr. Julian Keil > > Biological Psychology > Olshausenstrasse 62 - R. 306 > 24118 Kiel, Germany > > +49 - 0431 - 880 - 4872 > http://www.biopsych.uni-kiel.de/en > > > Am 07.01.2019 um 09:57 schrieb Irene Varela Leniz < > irene.varela at alumni.mondragon.edu>: > > Good morning Julian, > > Can you help me with plotting some resting state EEG signals? I am new in > Fieldtrip and I dont find clear information about this topic and I dont > really know how to do plottings in Fieldtrip. I feel like the fieldtrip > documentation is a little bit weak.... > > Thank you in advance, > Best regards, > > Irene Varela > > El vie., 4 ene. 2019 a las 14:08, Julian Keil () > escribió: > >> Hi Irene, >> >> what is the reason to use the extra checkdata step? >> The function checks if the input data has the correct „datatype“ field. >> Since you probably don’t have that field, the function will throw an >> error. >> >> Also, I’d recommend using the eeglab2fieldtrip-function to get from >> EEGlab .set to a fieldtrip-like structure. >> >> Best, >> >> Julian >> >> >> Am 04.01.2019 um 12:47 schrieb Irene Varela Leniz < >> irene.varela at alumni.mondragon.edu>: >> >> Hi, >> >> I am a researcher in Mondragon University working on source >> reconstruction of EEG data. I am new at fieldtrip and I feel a little bit >> lost about this software. I have some errors in a code I have developed but >> I do not manage to solve them. Could you please help me? >> >> I want to plot EEG data of a channel called 'A1' which is the first row >> in a 2D matrix variable called data, which is inside EEG structure. The >> code I have developed is below and I get the following error: >> >> *Error using ft_checkdata (line 525)* >> *This function requires 'timelock' or 'freq' data as input, see >> ft_datatype_timelock or ft_datatype_freq.* >> >> The code is the following: >> *clc; clear all; close all;* >> *clear variables* >> *restoredefaultpath; % set a clean path* >> *main='E:\';* >> *cd='E:\fieldtrip-20181217'; % change this* >> *addpath(cd);* >> >> *ft_defaults;* >> *filename = "E:\PBLdata\O200_RS1_final.set"; %cambiar aqui y poner >> vuestro directorio* >> *load(filename, '-mat'); %Create EEG struct* >> *location = EEG.chanlocs;* >> *data = EEG.data; * >> >> *cfg = [];* >> *cfg.xlim = [-0.2 1.0];* >> *cfg.ylim = [-1e-13 3e-13];* >> *cfg.channel = 'A1';* >> *datos = data(1,:);* >> *Ndata = numel(datos);* >> *for i=1:Ndata* >> * % check if the input data is valid for this function* >> * datos(i) = ft_checkdata(datos(i), 'datatype', {'timelock', 'freq'});* >> *end* >> >> *figure; ft_singleplotER(cfg,datos);* >> >> Thank you in advance, >> >> Irene >> >> _______________________________________________ >> 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 > > > _______________________________________________ > 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 julian.keil at gmail.com Mon Jan 7 11:15:02 2019 From: julian.keil at gmail.com (Julian Keil) Date: Mon, 7 Jan 2019 11:15:02 +0100 Subject: [FieldTrip] problems using fieldtrip for source reconstruction EEG In-Reply-To: References: <2F70506F-5E8C-4A34-8A4F-030FF9B78A80@gmail.com> Message-ID: <0C15616B-7C07-44BB-9AAD-1A86EEA454AE@gmail.com> Hi Irene, ft_topoplotER requires indeed timelock data, i.e. data in which you have computed the average over trials. Given that you wrote before that you are using resting-state data, I’m not sure this is the right function you need. Can you post the content of the struct you want to plot? In any way, if you are hitting a wall in using fieldtrip, I suggest starting with one of the many tutorials to get a sense of how things work. Just diving in with your own data without knowing exactly what each function does will be rather frustrating. Best, Julian ________________ Prof. Dr. Julian Keil Biological Psychology Olshausenstrasse 62 - R. 306 24118 Kiel, Germany +49 - 0431 - 880 - 4872 http://www.biopsych.uni-kiel.de/en > Am 07.01.2019 um 10:34 schrieb Irene Varela Leniz : > > Hi Julian, > > I have read about them in Fieldtrip documentation but I still dont manage to do nothing. I am looking for a topographic visualization of data and I am interesed in using Fieldtrip. Moreover, whenever I try different command I get the following error: > > Error using ft_checkdata (line 525) > This function requires 'timelock' or 'freq' data as input, see ft_datatype_timelock or ft_datatype_freq. > Error in ft_singleplotER (line 133) > varargin{i} = ft_checkdata(varargin{i}, 'datatype', {'timelock', 'freq'}); > > The data comes from eeglab using eeglab2fieldtrip function, so that we have the data stored in a struct. > > Thank you in advance, > Irene > > El lun., 7 ene. 2019 a las 10:27, Julian Keil (>) escribió: > Hi Irene, > > it helps if you describe exactly what you want to do (I don’t mean to be rude or patronizing, but check here for suggestions: https://journals.plos.org/ploscompbiol/article?id=10.1371/journal.pcbi.1002202 ). > > There are many ways to visualize resting state EEG signals, and you don’t need fieldtrip for all of them. > E.g., if you just want to plot the timecourse of the data, you can use the matlab built-in „plot“ function (e.g. use something like "plot(data.time{1},data.trial{1})“ to plot one trial). If you want to explore your data, ft_databrowser is your friend http://www.fieldtriptoolbox.org/faq/how_can_i_use_the_databrowser/ > > Best, > > Julian > > ________________ > Prof. Dr. Julian Keil > > Biological Psychology > Olshausenstrasse 62 - R. 306 > 24118 Kiel, Germany > > +49 - 0431 - 880 - 4872 > http://www.biopsych.uni-kiel.de/en > > >> Am 07.01.2019 um 09:57 schrieb Irene Varela Leniz >: >> >> Good morning Julian, >> >> Can you help me with plotting some resting state EEG signals? I am new in Fieldtrip and I dont find clear information about this topic and I dont really know how to do plottings in Fieldtrip. I feel like the fieldtrip documentation is a little bit weak.... >> >> Thank you in advance, >> Best regards, >> >> Irene Varela >> >> El vie., 4 ene. 2019 a las 14:08, Julian Keil (>) escribió: >> Hi Irene, >> >> what is the reason to use the extra checkdata step? >> The function checks if the input data has the correct „datatype“ field. >> Since you probably don’t have that field, the function will throw an error. >> >> Also, I’d recommend using the eeglab2fieldtrip-function to get from EEGlab .set to a fieldtrip-like structure. >> >> Best, >> >> Julian >> >> >>> Am 04.01.2019 um 12:47 schrieb Irene Varela Leniz >: >>> >>> Hi, >>> >>> I am a researcher in Mondragon University working on source reconstruction of EEG data. I am new at fieldtrip and I feel a little bit lost about this software. I have some errors in a code I have developed but I do not manage to solve them. Could you please help me? >>> >>> I want to plot EEG data of a channel called 'A1' which is the first row in a 2D matrix variable called data, which is inside EEG structure. The code I have developed is below and I get the following error: >>> >>> Error using ft_checkdata (line 525) >>> This function requires 'timelock' or 'freq' data as input, see ft_datatype_timelock or ft_datatype_freq. >>> >>> The code is the following: >>> clc; clear all; close all; >>> clear variables >>> restoredefaultpath; % set a clean path >>> main='E:\'; >>> cd='E:\fieldtrip-20181217'; % change this >>> addpath(cd); >>> >>> ft_defaults; >>> filename = "E:\PBLdata\O200_RS1_final.set"; %cambiar aqui y poner vuestro directorio >>> load(filename, '-mat'); %Create EEG struct >>> location = EEG.chanlocs; >>> data = EEG.data; >>> >>> cfg = []; >>> cfg.xlim = [-0.2 1.0]; >>> cfg.ylim = [-1e-13 3e-13]; >>> cfg.channel = 'A1'; >>> datos = data(1,:); >>> Ndata = numel(datos); >>> for i=1:Ndata >>> % check if the input data is valid for this function >>> datos(i) = ft_checkdata(datos(i), 'datatype', {'timelock', 'freq'}); >>> end >>> >>> figure; ft_singleplotER(cfg,datos); >>> >>> Thank you in advance, >>> >>> Irene >>> >>> _______________________________________________ >>> 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 > > _______________________________________________ > 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 alexisperezbellido at gmail.com Mon Jan 7 11:19:50 2019 From: alexisperezbellido at gmail.com (=?UTF-8?Q?Alexis_P=C3=A9rez?=) Date: Mon, 7 Jan 2019 11:19:50 +0100 Subject: [FieldTrip] problems using fieldtrip for source reconstruction EEG In-Reply-To: References: <2F70506F-5E8C-4A34-8A4F-030FF9B78A80@gmail.com> Message-ID: Hi Irene, here you have different examples on how you can plot data in fieldtrip. http://www.fieldtriptoolbox.org/tutorial/plotting/ I recommend you to follow the tutorial by running the little snippets of code and trying to understand: 1 what are the fields that your data structure should contain in order to be plotted (e.g. if you want to plot timefrequency amplitide representations you must have a power representation). 2 how each of the cfg. arguments modify your plot (you can also use the matlab help command in each plotting function to see a description of the different plot features that you can modify). 3 what different types of data you can find and what are the different ways to plot them. Once you have understood how yo plot the data in the fieldtrip examples, then you can start to generalize and customize those functions to your own needs. In your particular example, if you want to plot the topology then you must use ft_topoplotER (and not ft_singleplotER). Remember to indicate what is your helmet sensor/electrodes layout otherwise you will get errors or incorrect representation of your data. Good luck and patience. alex On Mon, Jan 7, 2019 at 10:36 AM Irene Varela Leniz < irene.varela at alumni.mondragon.edu> wrote: > Hi Julian, > > I have read about them in Fieldtrip documentation but I still dont manage > to do nothing. I am looking for a topographic visualization of data and I > am interesed in using Fieldtrip. Moreover, whenever I try different command > I get the following error: > > Error using ft_checkdata (line 525) > This function requires 'timelock' or 'freq' data as input, see > ft_datatype_timelock or ft_datatype_freq. > Error in ft_singleplotER (line 133) > varargin{i} = ft_checkdata(varargin{i}, 'datatype', {'timelock', > 'freq'}); > > The data comes from eeglab using eeglab2fieldtrip function, so that we > have the data stored in a struct. > > Thank you in advance, > Irene > > El lun., 7 ene. 2019 a las 10:27, Julian Keil () > escribió: > >> Hi Irene, >> >> it helps if you describe exactly what you want to do (I don’t mean to be >> rude or patronizing, but check here for suggestions: >> https://journals.plos.org/ploscompbiol/article?id=10.1371/journal.pcbi.1002202 >> ). >> >> There are many ways to visualize resting state EEG signals, and you don’t >> need fieldtrip for all of them. >> E.g., if you just want to plot the timecourse of the data, you can use >> the matlab built-in „plot“ function (e.g. use something like >> "plot(data.time{1},data.trial{1})“ to plot one trial). If you want to >> explore your data, ft_databrowser is your friend >> http://www.fieldtriptoolbox.org/faq/how_can_i_use_the_databrowser/ >> >> Best, >> >> Julian >> >> ________________ >> Prof. Dr. Julian Keil >> >> Biological Psychology >> Olshausenstrasse 62 - R. 306 >> 24118 Kiel, Germany >> >> +49 - 0431 - 880 - 4872 >> http://www.biopsych.uni-kiel.de/en >> >> >> Am 07.01.2019 um 09:57 schrieb Irene Varela Leniz < >> irene.varela at alumni.mondragon.edu>: >> >> Good morning Julian, >> >> Can you help me with plotting some resting state EEG signals? I am new in >> Fieldtrip and I dont find clear information about this topic and I dont >> really know how to do plottings in Fieldtrip. I feel like the fieldtrip >> documentation is a little bit weak.... >> >> Thank you in advance, >> Best regards, >> >> Irene Varela >> >> El vie., 4 ene. 2019 a las 14:08, Julian Keil () >> escribió: >> >>> Hi Irene, >>> >>> what is the reason to use the extra checkdata step? >>> The function checks if the input data has the correct „datatype“ field. >>> Since you probably don’t have that field, the function will throw an >>> error. >>> >>> Also, I’d recommend using the eeglab2fieldtrip-function to get from >>> EEGlab .set to a fieldtrip-like structure. >>> >>> Best, >>> >>> Julian >>> >>> >>> Am 04.01.2019 um 12:47 schrieb Irene Varela Leniz < >>> irene.varela at alumni.mondragon.edu>: >>> >>> Hi, >>> >>> I am a researcher in Mondragon University working on source >>> reconstruction of EEG data. I am new at fieldtrip and I feel a little bit >>> lost about this software. I have some errors in a code I have developed but >>> I do not manage to solve them. Could you please help me? >>> >>> I want to plot EEG data of a channel called 'A1' which is the first row >>> in a 2D matrix variable called data, which is inside EEG structure. The >>> code I have developed is below and I get the following error: >>> >>> *Error using ft_checkdata (line 525)* >>> *This function requires 'timelock' or 'freq' data as input, see >>> ft_datatype_timelock or ft_datatype_freq.* >>> >>> The code is the following: >>> *clc; clear all; close all;* >>> *clear variables* >>> *restoredefaultpath; % set a clean path* >>> *main='E:\';* >>> *cd='E:\fieldtrip-20181217'; % change this* >>> *addpath(cd);* >>> >>> *ft_defaults;* >>> *filename = "E:\PBLdata\O200_RS1_final.set"; %cambiar aqui y poner >>> vuestro directorio* >>> *load(filename, '-mat'); %Create EEG struct* >>> *location = EEG.chanlocs;* >>> *data = EEG.data; * >>> >>> *cfg = [];* >>> *cfg.xlim = [-0.2 1.0];* >>> *cfg.ylim = [-1e-13 3e-13];* >>> *cfg.channel = 'A1';* >>> *datos = data(1,:);* >>> *Ndata = numel(datos);* >>> *for i=1:Ndata* >>> * % check if the input data is valid for this function* >>> * datos(i) = ft_checkdata(datos(i), 'datatype', {'timelock', 'freq'});* >>> *end* >>> >>> *figure; ft_singleplotER(cfg,datos);* >>> >>> Thank you in advance, >>> >>> Irene >>> >>> _______________________________________________ >>> 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 >> >> >> _______________________________________________ >> 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 > -- Alexis Pérez-Bellido, PhD Donders Institute for Brain, Cognition and Behavior, Nijmegen, Netherlands Prediction & Attention group web: https://www.predictivebrainlab.com/ gmail: alexisperezbellido at gmail.com skype: alexisperezbellido -------------- next part -------------- An HTML attachment was scrubbed... URL: From irene.varela at alumni.mondragon.edu Mon Jan 7 11:25:06 2019 From: irene.varela at alumni.mondragon.edu (Irene Varela Leniz) Date: Mon, 7 Jan 2019 11:25:06 +0100 Subject: [FieldTrip] problems using fieldtrip for source reconstruction EEG In-Reply-To: <0C15616B-7C07-44BB-9AAD-1A86EEA454AE@gmail.com> References: <2F70506F-5E8C-4A34-8A4F-030FF9B78A80@gmail.com> <0C15616B-7C07-44BB-9AAD-1A86EEA454AE@gmail.com> Message-ID: Hi Julian, So I think there is a missunderstanding. We have a EEG structure, which has been imported from EEGLAB using eeglab2fieldtrip, and that structures contains all the data about trials, elecs... But what we want is to plot data without calculating any average, but a topographic map per channel... Thats why we do not manage to do it with the information we have... Thank you in advance, Irene El lun., 7 ene. 2019 a las 11:15, Julian Keil () escribió: > Hi Irene, > > ft_topoplotER requires indeed timelock data, i.e. data in which you have > computed the average over trials. Given that you wrote before that you are > using resting-state data, I’m not sure this is the right function you need. > > Can you post the content of the struct you want to plot? > > In any way, if you are hitting a wall in using fieldtrip, I suggest > starting with one of the many tutorials to get a sense of how things work. > Just diving in with your own data without knowing exactly what each > function does will be rather frustrating. > > Best, > > Julian > > ________________ > Prof. Dr. Julian Keil > > Biological Psychology > Olshausenstrasse 62 - R. 306 > 24118 Kiel, Germany > > +49 - 0431 - 880 - 4872 > http://www.biopsych.uni-kiel.de/en > > > Am 07.01.2019 um 10:34 schrieb Irene Varela Leniz < > irene.varela at alumni.mondragon.edu>: > > Hi Julian, > > I have read about them in Fieldtrip documentation but I still dont manage > to do nothing. I am looking for a topographic visualization of data and I > am interesed in using Fieldtrip. Moreover, whenever I try different command > I get the following error: > > Error using ft_checkdata (line 525) > This function requires 'timelock' or 'freq' data as input, see > ft_datatype_timelock or ft_datatype_freq. > Error in ft_singleplotER (line 133) > varargin{i} = ft_checkdata(varargin{i}, 'datatype', {'timelock', > 'freq'}); > > The data comes from eeglab using eeglab2fieldtrip function, so that we > have the data stored in a struct. > > Thank you in advance, > Irene > > El lun., 7 ene. 2019 a las 10:27, Julian Keil () > escribió: > >> Hi Irene, >> >> it helps if you describe exactly what you want to do (I don’t mean to be >> rude or patronizing, but check here for suggestions: >> https://journals.plos.org/ploscompbiol/article?id=10.1371/journal.pcbi.1002202 >> ). >> >> There are many ways to visualize resting state EEG signals, and you don’t >> need fieldtrip for all of them. >> E.g., if you just want to plot the timecourse of the data, you can use >> the matlab built-in „plot“ function (e.g. use something like >> "plot(data.time{1},data.trial{1})“ to plot one trial). If you want to >> explore your data, ft_databrowser is your friend >> http://www.fieldtriptoolbox.org/faq/how_can_i_use_the_databrowser/ >> >> Best, >> >> Julian >> >> ________________ >> Prof. Dr. Julian Keil >> >> Biological Psychology >> Olshausenstrasse 62 - R. 306 >> 24118 Kiel, Germany >> >> +49 - 0431 - 880 - 4872 >> http://www.biopsych.uni-kiel.de/en >> >> >> Am 07.01.2019 um 09:57 schrieb Irene Varela Leniz < >> irene.varela at alumni.mondragon.edu>: >> >> Good morning Julian, >> >> Can you help me with plotting some resting state EEG signals? I am new in >> Fieldtrip and I dont find clear information about this topic and I dont >> really know how to do plottings in Fieldtrip. I feel like the fieldtrip >> documentation is a little bit weak.... >> >> Thank you in advance, >> Best regards, >> >> Irene Varela >> >> El vie., 4 ene. 2019 a las 14:08, Julian Keil () >> escribió: >> >>> Hi Irene, >>> >>> what is the reason to use the extra checkdata step? >>> The function checks if the input data has the correct „datatype“ field. >>> Since you probably don’t have that field, the function will throw an >>> error. >>> >>> Also, I’d recommend using the eeglab2fieldtrip-function to get from >>> EEGlab .set to a fieldtrip-like structure. >>> >>> Best, >>> >>> Julian >>> >>> >>> Am 04.01.2019 um 12:47 schrieb Irene Varela Leniz < >>> irene.varela at alumni.mondragon.edu>: >>> >>> Hi, >>> >>> I am a researcher in Mondragon University working on source >>> reconstruction of EEG data. I am new at fieldtrip and I feel a little bit >>> lost about this software. I have some errors in a code I have developed but >>> I do not manage to solve them. Could you please help me? >>> >>> I want to plot EEG data of a channel called 'A1' which is the first row >>> in a 2D matrix variable called data, which is inside EEG structure. The >>> code I have developed is below and I get the following error: >>> >>> *Error using ft_checkdata (line 525)* >>> *This function requires 'timelock' or 'freq' data as input, see >>> ft_datatype_timelock or ft_datatype_freq.* >>> >>> The code is the following: >>> *clc; clear all; close all;* >>> *clear variables* >>> *restoredefaultpath; % set a clean path* >>> *main='E:\';* >>> *cd='E:\fieldtrip-20181217'; % change this* >>> *addpath(cd);* >>> >>> *ft_defaults;* >>> *filename = "E:\PBLdata\O200_RS1_final.set"; %cambiar aqui y poner >>> vuestro directorio* >>> *load(filename, '-mat'); %Create EEG struct* >>> *location = EEG.chanlocs;* >>> *data = EEG.data; * >>> >>> *cfg = [];* >>> *cfg.xlim = [-0.2 1.0];* >>> *cfg.ylim = [-1e-13 3e-13];* >>> *cfg.channel = 'A1';* >>> *datos = data(1,:);* >>> *Ndata = numel(datos);* >>> *for i=1:Ndata* >>> * % check if the input data is valid for this function* >>> * datos(i) = ft_checkdata(datos(i), 'datatype', {'timelock', 'freq'});* >>> *end* >>> >>> *figure; ft_singleplotER(cfg,datos);* >>> >>> Thank you in advance, >>> >>> Irene >>> >>> _______________________________________________ >>> 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 >> >> >> _______________________________________________ >> 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 irene.varela at alumni.mondragon.edu Mon Jan 7 11:30:16 2019 From: irene.varela at alumni.mondragon.edu (Irene Varela Leniz) Date: Mon, 7 Jan 2019 11:30:16 +0100 Subject: [FieldTrip] problems using fieldtrip for source reconstruction EEG In-Reply-To: References: <2F70506F-5E8C-4A34-8A4F-030FF9B78A80@gmail.com> Message-ID: Hello Alex, I have tried the tutorial you mention, but as I stated above, I get error related with the definition of the structure (This function requires 'timelock' or 'freq' data as input, see ft_datatype_timelock or ft_datatype_freq.). We dont really know how to obtain this from data. Do we have to add something more to obtain timelock and freq? Example: EEG=load(filename); data=EEG.data; cfg = []; cfg.xlim = [-0.2 1.0]; cfg.ylim = [-1e-13 3e-13]; cfg.channel = 'A1'; figure; ft_singleplotER(cfg,data); Thank you in advance, Irene El lun., 7 ene. 2019 a las 11:20, Alexis Pérez (< alexisperezbellido at gmail.com>) escribió: > Hi Irene, > > here you have different examples on how you can plot data in fieldtrip. > http://www.fieldtriptoolbox.org/tutorial/plotting/ > > I recommend you to follow the tutorial by running the little snippets of > code and trying to understand: > 1 what are the fields that your data structure should contain in order to > be plotted (e.g. if you want to plot timefrequency amplitide > representations you must have a power representation). > 2 how each of the cfg. arguments modify your plot (you can also use the > matlab help command in each plotting function to see a description of the > different plot features that you can modify). > 3 what different types of data you can find and what are the different > ways to plot them. > > Once you have understood how yo plot the data in the fieldtrip examples, > then you can start to generalize and customize those functions to your own > needs. > > In your particular example, if you want to plot the topology then you must > use ft_topoplotER (and not ft_singleplotER). Remember to indicate what is > your helmet sensor/electrodes layout otherwise you will get errors or > incorrect representation of your data. > > Good luck and patience. > > alex > > On Mon, Jan 7, 2019 at 10:36 AM Irene Varela Leniz < > irene.varela at alumni.mondragon.edu> wrote: > >> Hi Julian, >> >> I have read about them in Fieldtrip documentation but I still dont manage >> to do nothing. I am looking for a topographic visualization of data and I >> am interesed in using Fieldtrip. Moreover, whenever I try different command >> I get the following error: >> >> Error using ft_checkdata (line 525) >> This function requires 'timelock' or 'freq' data as input, see >> ft_datatype_timelock or ft_datatype_freq. >> Error in ft_singleplotER (line 133) >> varargin{i} = ft_checkdata(varargin{i}, 'datatype', {'timelock', >> 'freq'}); >> >> The data comes from eeglab using eeglab2fieldtrip function, so that we >> have the data stored in a struct. >> >> Thank you in advance, >> Irene >> >> El lun., 7 ene. 2019 a las 10:27, Julian Keil () >> escribió: >> >>> Hi Irene, >>> >>> it helps if you describe exactly what you want to do (I don’t mean to be >>> rude or patronizing, but check here for suggestions: >>> https://journals.plos.org/ploscompbiol/article?id=10.1371/journal.pcbi.1002202 >>> ). >>> >>> There are many ways to visualize resting state EEG signals, and you >>> don’t need fieldtrip for all of them. >>> E.g., if you just want to plot the timecourse of the data, you can use >>> the matlab built-in „plot“ function (e.g. use something like >>> "plot(data.time{1},data.trial{1})“ to plot one trial). If you want to >>> explore your data, ft_databrowser is your friend >>> http://www.fieldtriptoolbox.org/faq/how_can_i_use_the_databrowser/ >>> >>> Best, >>> >>> Julian >>> >>> ________________ >>> Prof. Dr. Julian Keil >>> >>> Biological Psychology >>> Olshausenstrasse 62 - R. 306 >>> 24118 Kiel, Germany >>> >>> +49 - 0431 - 880 - 4872 >>> http://www.biopsych.uni-kiel.de/en >>> >>> >>> Am 07.01.2019 um 09:57 schrieb Irene Varela Leniz < >>> irene.varela at alumni.mondragon.edu>: >>> >>> Good morning Julian, >>> >>> Can you help me with plotting some resting state EEG signals? I am new >>> in Fieldtrip and I dont find clear information about this topic and I dont >>> really know how to do plottings in Fieldtrip. I feel like the fieldtrip >>> documentation is a little bit weak.... >>> >>> Thank you in advance, >>> Best regards, >>> >>> Irene Varela >>> >>> El vie., 4 ene. 2019 a las 14:08, Julian Keil () >>> escribió: >>> >>>> Hi Irene, >>>> >>>> what is the reason to use the extra checkdata step? >>>> The function checks if the input data has the correct „datatype“ field. >>>> Since you probably don’t have that field, the function will throw an >>>> error. >>>> >>>> Also, I’d recommend using the eeglab2fieldtrip-function to get from >>>> EEGlab .set to a fieldtrip-like structure. >>>> >>>> Best, >>>> >>>> Julian >>>> >>>> >>>> Am 04.01.2019 um 12:47 schrieb Irene Varela Leniz < >>>> irene.varela at alumni.mondragon.edu>: >>>> >>>> Hi, >>>> >>>> I am a researcher in Mondragon University working on source >>>> reconstruction of EEG data. I am new at fieldtrip and I feel a little bit >>>> lost about this software. I have some errors in a code I have developed but >>>> I do not manage to solve them. Could you please help me? >>>> >>>> I want to plot EEG data of a channel called 'A1' which is the first row >>>> in a 2D matrix variable called data, which is inside EEG structure. The >>>> code I have developed is below and I get the following error: >>>> >>>> *Error using ft_checkdata (line 525)* >>>> *This function requires 'timelock' or 'freq' data as input, see >>>> ft_datatype_timelock or ft_datatype_freq.* >>>> >>>> The code is the following: >>>> *clc; clear all; close all;* >>>> *clear variables* >>>> *restoredefaultpath; % set a clean path* >>>> *main='E:\';* >>>> *cd='E:\fieldtrip-20181217'; % change this* >>>> *addpath(cd);* >>>> >>>> *ft_defaults;* >>>> *filename = "E:\PBLdata\O200_RS1_final.set"; %cambiar aqui y poner >>>> vuestro directorio* >>>> *load(filename, '-mat'); %Create EEG struct* >>>> *location = EEG.chanlocs;* >>>> *data = EEG.data; * >>>> >>>> *cfg = [];* >>>> *cfg.xlim = [-0.2 1.0];* >>>> *cfg.ylim = [-1e-13 3e-13];* >>>> *cfg.channel = 'A1';* >>>> *datos = data(1,:);* >>>> *Ndata = numel(datos);* >>>> *for i=1:Ndata* >>>> * % check if the input data is valid for this function* >>>> * datos(i) = ft_checkdata(datos(i), 'datatype', {'timelock', 'freq'});* >>>> *end* >>>> >>>> *figure; ft_singleplotER(cfg,datos);* >>>> >>>> Thank you in advance, >>>> >>>> Irene >>>> >>>> _______________________________________________ >>>> 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 >>> >>> >>> _______________________________________________ >>> 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 >> > > > -- > Alexis Pérez-Bellido, PhD > Donders Institute for Brain, Cognition and Behavior, Nijmegen, Netherlands > Prediction & Attention group > web: https://www.predictivebrainlab.com/ > gmail: alexisperezbellido at gmail.com > skype: alexisperezbellido > > > _______________________________________________ > 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 alexisperezbellido at gmail.com Mon Jan 7 12:01:32 2019 From: alexisperezbellido at gmail.com (=?UTF-8?Q?Alexis_P=C3=A9rez?=) Date: Mon, 7 Jan 2019 12:01:32 +0100 Subject: [FieldTrip] problems using fieldtrip for source reconstruction EEG In-Reply-To: References: <2F70506F-5E8C-4A34-8A4F-030FF9B78A80@gmail.com> Message-ID: Hi, On Mon, Jan 7, 2019 at 11:30 AM Irene Varela Leniz < irene.varela at alumni.mondragon.edu> wrote: > Hello Alex, > > I have tried the tutorial you mention, but as I stated above, I get error > related with the definition of the structure (This function requires > 'timelock' or 'freq' data as input, see ft_datatype_timelock or > ft_datatype_freq.). We dont really know how to obtain this from data. Do > we have to add something more to obtain timelock and freq? > What I was suggesting is, first as a learning practice, you can run the different fieldtrip examples (on fieldtrip example data) just to understand how the plotting functions work. Because these examples must work, you can play around with the different parameters in order to understand how the data should be organized and what manipulations you can apply to your plots. Second, once that you feel confident in plotting the fieldtrip example data (for instance, make sure that you understand what each of the fields in your data structure variable contain), you can try to find out what is the problem when you try to plot your own dataset. Example: > > EEG=load(filename); > data=EEG.data; > cfg = []; > cfg.xlim = [-0.2 1.0]; > cfg.ylim = [-1e-13 3e-13]; > cfg.channel = 'A1'; > figure; ft_singleplotER(cfg,data); > > > Thank you in advance, > Irene > > Probably you can share with us what is the content of your data struct variable. Otherwise it is difficult to tell where the problem might be. > > > > El lun., 7 ene. 2019 a las 11:20, Alexis Pérez (< > alexisperezbellido at gmail.com>) escribió: > >> Hi Irene, >> >> here you have different examples on how you can plot data in fieldtrip. >> http://www.fieldtriptoolbox.org/tutorial/plotting/ >> >> I recommend you to follow the tutorial by running the little snippets of >> code and trying to understand: >> 1 what are the fields that your data structure should contain in order to >> be plotted (e.g. if you want to plot timefrequency amplitide >> representations you must have a power representation). >> 2 how each of the cfg. arguments modify your plot (you can also use the >> matlab help command in each plotting function to see a description of the >> different plot features that you can modify). >> 3 what different types of data you can find and what are the different >> ways to plot them. >> >> Once you have understood how yo plot the data in the fieldtrip examples, >> then you can start to generalize and customize those functions to your own >> needs. >> >> In your particular example, if you want to plot the topology then you >> must use ft_topoplotER (and not ft_singleplotER). Remember to indicate >> what is your helmet sensor/electrodes layout otherwise you will get errors >> or incorrect representation of your data. >> >> Good luck and patience. >> >> alex >> >> On Mon, Jan 7, 2019 at 10:36 AM Irene Varela Leniz < >> irene.varela at alumni.mondragon.edu> wrote: >> >>> Hi Julian, >>> >>> I have read about them in Fieldtrip documentation but I still dont >>> manage to do nothing. I am looking for a topographic visualization of data >>> and I am interesed in using Fieldtrip. Moreover, whenever I try different >>> command I get the following error: >>> >>> Error using ft_checkdata (line 525) >>> This function requires 'timelock' or 'freq' data as input, see >>> ft_datatype_timelock or ft_datatype_freq. >>> Error in ft_singleplotER (line 133) >>> varargin{i} = ft_checkdata(varargin{i}, 'datatype', {'timelock', >>> 'freq'}); >>> >>> The data comes from eeglab using eeglab2fieldtrip function, so that we >>> have the data stored in a struct. >>> >>> Thank you in advance, >>> Irene >>> >>> El lun., 7 ene. 2019 a las 10:27, Julian Keil () >>> escribió: >>> >>>> Hi Irene, >>>> >>>> it helps if you describe exactly what you want to do (I don’t mean to >>>> be rude or patronizing, but check here for suggestions: >>>> https://journals.plos.org/ploscompbiol/article?id=10.1371/journal.pcbi.1002202 >>>> ). >>>> >>>> There are many ways to visualize resting state EEG signals, and you >>>> don’t need fieldtrip for all of them. >>>> E.g., if you just want to plot the timecourse of the data, you can use >>>> the matlab built-in „plot“ function (e.g. use something like >>>> "plot(data.time{1},data.trial{1})“ to plot one trial). If you want to >>>> explore your data, ft_databrowser is your friend >>>> http://www.fieldtriptoolbox.org/faq/how_can_i_use_the_databrowser/ >>>> >>>> Best, >>>> >>>> Julian >>>> >>>> ________________ >>>> Prof. Dr. Julian Keil >>>> >>>> Biological Psychology >>>> Olshausenstrasse 62 - R. 306 >>>> 24118 Kiel, Germany >>>> >>>> +49 - 0431 - 880 - 4872 >>>> http://www.biopsych.uni-kiel.de/en >>>> >>>> >>>> Am 07.01.2019 um 09:57 schrieb Irene Varela Leniz < >>>> irene.varela at alumni.mondragon.edu>: >>>> >>>> Good morning Julian, >>>> >>>> Can you help me with plotting some resting state EEG signals? I am new >>>> in Fieldtrip and I dont find clear information about this topic and I dont >>>> really know how to do plottings in Fieldtrip. I feel like the fieldtrip >>>> documentation is a little bit weak.... >>>> >>>> Thank you in advance, >>>> Best regards, >>>> >>>> Irene Varela >>>> >>>> El vie., 4 ene. 2019 a las 14:08, Julian Keil () >>>> escribió: >>>> >>>>> Hi Irene, >>>>> >>>>> what is the reason to use the extra checkdata step? >>>>> The function checks if the input data has the correct „datatype“ field. >>>>> Since you probably don’t have that field, the function will throw an >>>>> error. >>>>> >>>>> Also, I’d recommend using the eeglab2fieldtrip-function to get from >>>>> EEGlab .set to a fieldtrip-like structure. >>>>> >>>>> Best, >>>>> >>>>> Julian >>>>> >>>>> >>>>> Am 04.01.2019 um 12:47 schrieb Irene Varela Leniz < >>>>> irene.varela at alumni.mondragon.edu>: >>>>> >>>>> Hi, >>>>> >>>>> I am a researcher in Mondragon University working on source >>>>> reconstruction of EEG data. I am new at fieldtrip and I feel a little bit >>>>> lost about this software. I have some errors in a code I have developed but >>>>> I do not manage to solve them. Could you please help me? >>>>> >>>>> I want to plot EEG data of a channel called 'A1' which is the first >>>>> row in a 2D matrix variable called data, which is inside EEG structure. The >>>>> code I have developed is below and I get the following error: >>>>> >>>>> *Error using ft_checkdata (line 525)* >>>>> *This function requires 'timelock' or 'freq' data as input, see >>>>> ft_datatype_timelock or ft_datatype_freq.* >>>>> >>>>> The code is the following: >>>>> *clc; clear all; close all;* >>>>> *clear variables* >>>>> *restoredefaultpath; % set a clean path* >>>>> *main='E:\';* >>>>> *cd='E:\fieldtrip-20181217'; % change this* >>>>> *addpath(cd);* >>>>> >>>>> *ft_defaults;* >>>>> *filename = "E:\PBLdata\O200_RS1_final.set"; %cambiar aqui y poner >>>>> vuestro directorio* >>>>> *load(filename, '-mat'); %Create EEG struct* >>>>> *location = EEG.chanlocs;* >>>>> *data = EEG.data; * >>>>> >>>>> *cfg = [];* >>>>> *cfg.xlim = [-0.2 1.0];* >>>>> *cfg.ylim = [-1e-13 3e-13];* >>>>> *cfg.channel = 'A1';* >>>>> *datos = data(1,:);* >>>>> *Ndata = numel(datos);* >>>>> *for i=1:Ndata* >>>>> * % check if the input data is valid for this function* >>>>> * datos(i) = ft_checkdata(datos(i), 'datatype', {'timelock', >>>>> 'freq'});* >>>>> *end* >>>>> >>>>> *figure; ft_singleplotER(cfg,datos);* >>>>> >>>>> Thank you in advance, >>>>> >>>>> Irene >>>>> >>>>> _______________________________________________ >>>>> 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 >>>> >>>> >>>> _______________________________________________ >>>> 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 >>> >> >> >> -- >> Alexis Pérez-Bellido, PhD >> Donders Institute for Brain, Cognition and Behavior, Nijmegen, Netherlands >> Prediction & Attention group >> web: https://www.predictivebrainlab.com/ >> gmail: alexisperezbellido at gmail.com >> skype: alexisperezbellido >> >> >> _______________________________________________ >> 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 > -- Alexis Pérez-Bellido, PhD Donders Institute for Brain, Cognition and Behavior, Nijmegen, Netherlands Prediction & Attention group web: https://www.predictivebrainlab.com/ gmail: alexisperezbellido at gmail.com skype: alexisperezbellido -------------- next part -------------- An HTML attachment was scrubbed... URL: From elene.beitia at alumni.mondragon.edu Mon Jan 7 12:09:14 2019 From: elene.beitia at alumni.mondragon.edu (Elene Beitia Loinaz) Date: Mon, 7 Jan 2019 12:09:14 +0100 Subject: [FieldTrip] (no subject) In-Reply-To: <9079FE5E-0DD4-4957-89C5-C4659625D5EF@gmail.com> References: <9079FE5E-0DD4-4957-89C5-C4659625D5EF@gmail.com> Message-ID: Thank you Julian, We already solve the problem. Best, Elene. Hau idatzi du Julian Keil (julian.keil at gmail.com) erabiltzaileak (2019 urt. 3, og. (09:34)): > Dear Elene, > > could you explain what problems you are having? > eeglab2fieldtrip creates the basic structure used in FT, but depending on > what you want to do, you need to add some additional info to the created FT > structure. > > Best, > > Julian > ________________ > Prof. Dr. Julian Keil > > Biological Psychology > Olshausenstrasse 62 - R. 306 > 24118 Kiel, Germany > > +49 - 0431 - 880 - 4872 > http://www.biopsych.uni-kiel.de/en > > > Am 03.01.2019 um 09:06 schrieb Elene Beitia Loinaz < > elene.beitia at alumni.mondragon.edu>: > > Hello, > > My name is Elene Beitia and I am a student in Mondragon Unibertsitatea. > > We are working in the reconstruction of EEG in resting state with previous pre-process data. That data was pre-process using eeglab and we need to convert it to fieltrip. We know about eeglab2fieltrip function, but we are having problems using it. Can someone share information about how to use it? > > Thank you in advanced, > > Elene. > > _______________________________________________ > 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 jan.schoffelen at donders.ru.nl Mon Jan 7 12:49:43 2019 From: jan.schoffelen at donders.ru.nl (Schoffelen, J.M. (Jan Mathijs)) Date: Mon, 7 Jan 2019 11:49:43 +0000 Subject: [FieldTrip] ft_artifact_zvalue In-Reply-To: References: Message-ID: <799914D1-7D63-4E7F-BA6D-35022C6BA07C@donders.ru.nl> Dear Vahab, Indeed, ft_artifact_zvalue looks for positive values for artifacts. What is the comment you are looking for? Best wishes, Jan-Mathijs > On 12 Dec 2018, at 21:34, Vahab Yousofzadeh wrote: > > Dear FT experts, > > Seems that the ft_artifact_zvalue only takes positive z-values to look > for artifacts: > https://www.dropbox.com/s/zbhslrn12j6ug7o/EOG_Artifacts.tif?dl=0 > > different than a sample figure in, > http://www.fieldtriptoolbox.org/tutorial/automatic_artifact_rejection/ > > Here are my settings: > cfg = []; > cfg.continuous = 'yes'; > cfg.artfctdef.zvalue.channel = refchan; > cfg.artfctdef.zvalue.cutoff = z_ther; > cfg.artfctdef.zvalue.trlpadding = 0; > cfg.artfctdef.zvalue.artpadding = 0.1; > cfg.artfctdef.zvalue.fltpadding = 0; > cfg.artfctdef.zvalue.bpfilter = 'yes'; > cfg.artfctdef.zvalue.bpfilttype = 'but'; > cfg.artfctdef.zvalue.bpfreq = [1 15]; > cfg.artfctdef.zvalue.bpfiltord = 4; > cfg.artfctdef.zvalue.hilbert = 'yes'; > cfg.artfctdef.zvalue.interactive = interactive; > [~, artifact_EOG] = ft_artifact_zvalue(cfg, data); > > Any comments are welcomed, > - Vahab > _______________________________________________ > fieldtrip mailing list > https://mailman.science.ru.nl/mailman/listinfo/fieldtrip > https://doi.org/10.1371/journal.pcbi.1002202 From bahman at neuromotor.org Mon Jan 7 13:10:31 2019 From: bahman at neuromotor.org (Bahman Nasseroleslami) Date: Mon, 7 Jan 2019 12:10:31 +0000 Subject: [FieldTrip] Research Assistant Position (Neurology/Neurophysiology) - Trinity College Dublin, the University of Dublin, Dublin, Ireland Message-ID: Dear all, There is a research assistant position available in Academic Unit of Neurology, Trinity College Dublin, the University of Dublin, Dublin, Ireland. ------------------------------------------------------- Post Specification (033543) Post Title: Research Assistant (Neurology/Neurophysiology) Post Status: 12 month Fixed-term Contract, Full-time Research Group / Department / School: Academic Unit of Neurology, School of Medicine, Trinity College Dublin, the University of Dublin Location: Trinity Biomedical Sciences Institute, Trinity College Dublin, the University of Dublin College Green, Dublin D02 R590, Ireland Reports to: Professor Orla Hardiman/Dr Bahman Nasseroleslami Salary: Appointment will be made on the Research Assistant (Level 1) Salary Scale at a point in line with Government Pay Policy, €22,109 to €28,904 per annum (commensurate with qualifications and experience). Appointment will be made no higher than point 10. Hours of Work: 32-40 hours per week (0.8-1.0 Full Time Equivalent) Closing Date: 12 Noon (Irish Standard Time), 15 January 2019 Please note that Garda vetting will be sought in respect of individuals who come under consideration for a post. Post Summary: Applications are invited for a motivated and self-driven individual for the position of research assistant with the Irish ALS Research Group, hosted in the Trinity Biomedical Sciences Institute (TBSI)'s Academic Unit of Neurology. The ideal candidate will have an undergraduate or master's degree in STEM (Science, Technology, Engineering, Mathematics) e.g. Neuroscience, Physiology, Biology, Biomedical Engineering, Mathematics, or a cognate area. Familiarity with and/or the ability to quickly acquire skills in electrophysiological recordings (e.g. EEG/EMG) and Clinical Neurophysiology techniques (e.g. TMS), would be highly desirable. The post is available for 1 year, initially, with the possibility of extension to 3 years given the availability of funding and performance. ------------------------------------------------------- The detailed job description file (PDF) and the application instructions can be found online at http://jobs.tcd.ie. or directly from https://drive.google.com/file/d/1mYcN5qHU717OyzWucSNpHVxNz4c1djaI/view?usp=sharing Informal enquiries can be sent to Bahman Nasseroleslami at nasserob at tcd.ie To apply, please follow the instructions in "Application Procedure" (i.e. submit the application by email to Mr Mark Heverin). It would be really appreciated if you could share this with those that may be interested. Sincerely Bahman –––––––––––– Bahman Nasseroleslami, PhD Senior Research Fellow Academic Unit of Neurology, School of Medicine Trinity College Dublin, the University of Dublin Dublin, Ireland. Room 5.43, Trinity Biomedical Sciences Institute 152-160 Pearse Street, Dublin D02 R590, Ireland. nasserob at tcd.ie www.tcd.ie/medicine/staff/nasserob/ –––––––––––– -------------- next part -------------- An HTML attachment was scrubbed... URL: From martabortoletto at yahoo.it Mon Jan 7 16:21:46 2019 From: martabortoletto at yahoo.it (Marta Bortoletto) Date: Mon, 7 Jan 2019 15:21:46 +0000 (UTC) Subject: [FieldTrip] Post-doc position available References: <1473313532.15676384.1546874506091.ref@mail.yahoo.com> Message-ID: <1473313532.15676384.1546874506091@mail.yahoo.com> Dears, We are a looking for a Post-doc candidateinterested in exploring the brain mechanisms underlying motor planning and jointactions in a project with TMS and TMS-EEG coregistration. The position is openat the IRCCS Centro San Giovanni di Dio Fatebenefratelli (Brescia, Italy), in theCognitive Neuroscience Unit led by Prof. Carlo Miniussi. The project is fundedby BIAL foundation and led by Marta Bortoletto in close collaboration with prof.Corrado Sinigaglia of the University of Study of Milan. The position will remain open until March2019 or until the appropriate candidates are identified, and is funded for 18months.   Applicants should have:  ·     A background and a PhD degree ina neuroscience-related field ·     Substantial experience in TMS-EEGor EEG research ·     Skills with analysis softwaresconcerning evoked potentials and EEG signals (e.g. EEGlab, Fieldtrip) ·     Ability to code in Matlab, Pythonor R ·     Good command of the Englishlanguage (written and oral) ·     Skills for teamwork in amultidisciplinary research group   Experience with advanced EEG signalprocessing, EEG source localization, connectivity analyses and a strongpublication record are an advantage.     Whatwe offer   ·     Gross salary: 23.000-27.000euro per annum ·     Excellent working environment ·     Opportunity to work in amotivated, skilled, inspired and supportive group ·     A chance to work in Italy – oneof the most beautiful countries in the world     Forfurther information please contact   Marta Bortoletto IRCCS Centro San Giovannidi Dio Fatebenefratelli marta.bortoletto at cognitiveneuroscience.it     Toapply, please send the following items, as ONE PDF FILE and via email to Dr. MartaBortoletto (marta.bortoletto at cognitiveneuroscience.it).   ·     A letter of intent including abrief description of your past and current research interests ·     Curriculum vitae including the listof your publication and degrees ·     Names and contact informationof 2 referees.       Aboutthe employer   The IRCCS San Giovanni di DioFatebenefratelli is operating since 120 years and has been appointed and fundedas national centre of excellence in research and care by the Italian Ministryof Health since 1996. More than 4500 patients with Alzheimer’s Dementia orassociated disorders and about 1700 patients with psychiatric diseases aretreated each year. The research division, besides the Cognitive NeuroscienceSection, includes the laboratories of Genetics, Neuropsychopharmacology,Neurobiology, Proteomic, Neuroimaging, Ethic and Epidemiology and employs aboutfifty professional researchers. The Cognitive Neuroscience Unit is providedwith several state-of-the-art devices necessary for the application of brainstimulation techniques (transcranial magnetic stimulation: TMS, rTMS, andtranscranial electrical stimulation: tDCS, tACS and tRNS) and for the recordingand the analysis of electrophysiological signals (EEG, EMG) as well asneuropsychological testing. The simultaneous co-registration ofelectroencephalography and TMS application is also available, field where wehave been pioneers in the national research. Marta Bortoletto, PhD Cognitive Neuroscience Section, IRCCS Centro San Giovanni di Dio Fatebenefratelli Via Pilastroni 4, 25125 Brescia, Italy Phone number: (+39) 0303501594 E-mail: marta.bortoletto at cognitiveneuroscience.it web: http://www.cognitiveneuroscience.it/ -------------- next part -------------- An HTML attachment was scrubbed... URL: From agnese.zazio at hotmail.it Mon Jan 7 16:41:12 2019 From: agnese.zazio at hotmail.it (Agnese Zazio) Date: Mon, 7 Jan 2019 15:41:12 +0000 Subject: [FieldTrip] Source analysis for grand averaged-TMS-evoked potentials Message-ID: Dear Fieldtrip Community, my name is Agnese Zazio and I would be grateful if you could help me with source analysis of TMS-EEG data. Specifically, I am interested in source reconstruction of TMS-evoked potentials. To this am, I used the minimum-norm estimation following the Fieldtrip tutorial for source reconstruction of MEG event-related fields (http://www.fieldtriptoolbox.org/tutorial/minimumnormestimate/). I don't have individual MRIs, thus I am using templates for the headmodel and the sourcemodel. Importantly, I am working on the the grand average at the group level. Here's the code I used. --- % create a preprocessed structure cfg =[]; cfg.channel = {'EEG'}; cfg.demean = 'yes'; cfg.baselinewindow = [-0.01 0]; data_prepr = ft_preprocessing(cfg, data); cfg =[]; cfg.covariance = 'yes'; cfg.channel ={'EEG'}; cfg.covariancewindow = [0 0.4]; data_tlck = ft_timelockanalysis (cfg, data_prepr); % forward solution [prepare leadfield] cfg = []; cfg.elec = elec; cfg.channel = {'EEG'}; cfg.headmodel = vol; % volume conduction model cfg.grid = ft_read_headshape('cortex_5124.surf.gii'); cfg.grid.pos = sourcespace.pos; cfg.grid.inside = 1:size(sourcespace.pos,1); % all source points are inside of the brain leadfield = ft_prepare_leadfield(cfg); % inverse solution (method: mne) cfg = []; cfg.method = 'mne'; %'lcmv'; cfg.elec = elec; cfg.channel = {'EEG'}; cfg.grid = leadfield; cfg.headmodel = vol; cfg.mne.prewhiten = 'yes'; cfg.mne.lambda = 3; cfg.mne.scalesourcecov = 'yes'; source_bial_mne = ft_sourceanalysis(cfg, data_tlck); %%plot bnd.pos = sourcespace.pos; bnd.tri = sourcespace.tri; m=source_bial_mne.avg.pow(:,124); % point in time I want to plot figure; ft_plot_mesh(bnd, 'vertexcolor', m); --- I have two main questions: First, is this approach correct to get sources for TMS-evoked potentials starting from the grandaverage? Second, is it possible to use the same code but applying the beamformer method (lcmv) in "ft_sourceanalysis"? I have simply replaced the cfg.method field, but the output I get does not contain information about time. Thanks in advance for your help. Best, Agnese Agnese Zazio, PhD Student Cognitive Neuroscience Section, IRCCS Saint John of God Clinical Research Centre Via Pilastroni 4, 25125 Brescia, Italy Site: http://www.cognitiveneuroscience.it -------------- next part -------------- An HTML attachment was scrubbed... URL: From elene.beitia at alumni.mondragon.edu Mon Jan 7 18:21:22 2019 From: elene.beitia at alumni.mondragon.edu (Elene Beitia Loinaz) Date: Mon, 7 Jan 2019 18:21:22 +0100 Subject: [FieldTrip] EEG RESTING STATE SOURCE RECONSTRUCTION Message-ID: Dear Fieldtrip Community, My name is Elene Beitia, I am a student from the Basque Country. I am trying to use the fieltrip toolbox to do a source reconstruction of EEG`s in Resting State. I am having troubles in doing the fourier transform. The input data that I am using is in 'ms' and the error that I get is the next one: Error using ft_checkdata (line 525) This function requires 'raw', 'raw+comp' or 'mvar' data as input, see ft_datatype_raw or ft_datatype_mvar. Error in ft_freqanalysis (line 212) data = ft_checkdata(data, 'datatype', {'raw', 'raw+comp', 'mvar'}, 'feedback', cfg.feedback, 'hassampleinfo', 'yes'); I have change the parameters to see if the problem was there but I still get the same. I add the code in this message: %%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %% FOURIER TRANSFORMS cfg = []; cfg.dataset = filename; cfg.datatype ='mvar'; cfg.continuous ='yes'; cfg.output = 'fourier'; cfg.channelcmb = 'all'; cfg.channel = 'all'; cfg.trials = 'all'; cfg.keeptrials = 'yes'; cfg.keeptapers = 'yes'; cfg.method = 'mtmfft'; cfg.taper = 'hanning'; cfg.toi = [-1 : 0.10 : 1.5]; cfg.foi = 1:40; cfg.t_ftimwin = ones(size(cfg.foi)) * 0.5; cfg.pad ='nextpow2'; cfg.feedback = 'no'; %cfg.hassampleinfo= 'yes'; data_Fourier = ft_freqanalysis(cfg); %%%%%%%%%%%%%%%%%%%%%%%%%%%%%% Hope you can give me some information in order to solve the problem, Thank you in advanced, Elene. -------------- next part -------------- An HTML attachment was scrubbed... URL: From jan.schoffelen at donders.ru.nl Tue Jan 8 09:00:48 2019 From: jan.schoffelen at donders.ru.nl (Schoffelen, J.M. (Jan Mathijs)) Date: Tue, 8 Jan 2019 08:00:48 +0000 Subject: [FieldTrip] EEG RESTING STATE SOURCE RECONSTRUCTION In-Reply-To: References: Message-ID: Hi Elena, Just like almost all high level fieldtrip functions, ft_freqanalysis requires both a ‘cfg’ variable, and a ‘data’ variable in its input. In your code you only use cfg. Best wishes, Jan-Mathijs J.M.Schoffelen, MD PhD Senior Researcher, VIDI-fellow - PI, language in interaction Telephone: +31-24-3614793 Physical location: room 00.028 Donders Centre for Cognitive Neuroimaging, Nijmegen, The Netherlands On 7 Jan 2019, at 18:21, Elene Beitia Loinaz > wrote: Dear Fieldtrip Community, My name is Elene Beitia, I am a student from the Basque Country. I am trying to use the fieltrip toolbox to do a source reconstruction of EEG`s in Resting State. I am having troubles in doing the fourier transform. The input data that I am using is in 'ms' and the error that I get is the next one: Error using ft_checkdata (line 525) This function requires 'raw', 'raw+comp' or 'mvar' data as input, see ft_datatype_raw or ft_datatype_mvar. Error in ft_freqanalysis (line 212) data = ft_checkdata(data, 'datatype', {'raw', 'raw+comp', 'mvar'}, 'feedback', cfg.feedback, 'hassampleinfo', 'yes'); I have change the parameters to see if the problem was there but I still get the same. I add the code in this message: %%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %% FOURIER TRANSFORMS cfg = []; cfg.dataset = filename; cfg.datatype ='mvar'; cfg.continuous ='yes'; cfg.output = 'fourier'; cfg.channelcmb = 'all'; cfg.channel = 'all'; cfg.trials = 'all'; cfg.keeptrials = 'yes'; cfg.keeptapers = 'yes'; cfg.method = 'mtmfft'; cfg.taper = 'hanning'; cfg.toi = [-1 : 0.10 : 1.5]; cfg.foi = 1:40; cfg.t_ftimwin = ones(size(cfg.foi)) * 0.5; cfg.pad ='nextpow2'; cfg.feedback = 'no'; %cfg.hassampleinfo= 'yes'; data_Fourier = ft_freqanalysis(cfg); %%%%%%%%%%%%%%%%%%%%%%%%%%%%%% Hope you can give me some information in order to solve the problem, Thank you in advanced, Elene. _______________________________________________ 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 elene.beitia at alumni.mondragon.edu Tue Jan 8 09:12:57 2019 From: elene.beitia at alumni.mondragon.edu (Elene Beitia Loinaz) Date: Tue, 8 Jan 2019 09:12:57 +0100 Subject: [FieldTrip] EEG RESTING STATE SOURCE RECONSTRUCTION In-Reply-To: References: Message-ID: Hi Jan, Thank you for your answer. It has been really helpful. Elene. Hau idatzi du Schoffelen, J.M. (Jan Mathijs) (jan.schoffelen at donders.ru.nl) erabiltzaileak (2019 urt. 8, ar. (09:00)): > Hi Elena, > > Just like almost all high level fieldtrip functions, ft_freqanalysis > requires both a ‘cfg’ variable, and a ‘data’ variable in its input. In your > code you only use cfg. > > Best wishes, > Jan-Mathijs > > > J.M.Schoffelen, MD PhD > Senior Researcher, VIDI-fellow - PI, language in interaction > Telephone: +31-24-3614793 > Physical location: room 00.028 > Donders Centre for Cognitive Neuroimaging, Nijmegen, The Netherlands > > > > On 7 Jan 2019, at 18:21, Elene Beitia Loinaz < > elene.beitia at alumni.mondragon.edu> wrote: > > Dear Fieldtrip Community, > > My name is Elene Beitia, I am a student from the Basque Country. I am > trying to use the fieltrip toolbox to do a source reconstruction of EEG`s > in Resting State. > > I am having troubles in doing the fourier transform. The input data that > I am using is in 'ms' and the error that I get is the next one: > > Error using ft_checkdata (line 525) > This function requires 'raw', 'raw+comp' or 'mvar' data as input, see > ft_datatype_raw or ft_datatype_mvar. > > Error in ft_freqanalysis (line 212) > data = ft_checkdata(data, 'datatype', {'raw', 'raw+comp', 'mvar'}, > 'feedback', cfg.feedback, 'hassampleinfo', 'yes'); > > I have change the parameters to see if the problem was there but I still > get the same. > > I add the code in this message: > > %%%%%%%%%%%%%%%%%%%%%%%%%%%%%% > > %% FOURIER TRANSFORMS > > cfg = []; > cfg.dataset = filename; > cfg.datatype ='mvar'; > cfg.continuous ='yes'; > cfg.output = 'fourier'; > cfg.channelcmb = 'all'; > cfg.channel = 'all'; > cfg.trials = 'all'; > cfg.keeptrials = 'yes'; > cfg.keeptapers = 'yes'; > cfg.method = 'mtmfft'; > cfg.taper = 'hanning'; > cfg.toi = [-1 : 0.10 : 1.5]; > cfg.foi = 1:40; > cfg.t_ftimwin = ones(size(cfg.foi)) * 0.5; > cfg.pad ='nextpow2'; > cfg.feedback = 'no'; > %cfg.hassampleinfo= 'yes'; > > data_Fourier = ft_freqanalysis(cfg); > > %%%%%%%%%%%%%%%%%%%%%%%%%%%%%% > > Hope you can give me some information in order to solve the problem, > > Thank you in advanced, > > Elene. > > > > > > > > > _______________________________________________ > 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 joerg.hipp at googlemail.com Tue Jan 8 10:13:48 2019 From: joerg.hipp at googlemail.com (Joerg Hipp) Date: Tue, 8 Jan 2019 10:13:48 +0100 Subject: [FieldTrip] Biomarker and Experimental Medicine Leader in Neuroscience at Roche in Basel, Switzerland Message-ID: Dear all, We are offering a position as a Biomarker and Experimental Medicine Leader in Neuroscience at Roche in Basel, Switzerland. The position is based in the Biomarker and Translational Technology (BTT) group of the Neuroscience, Ophthalmology, and Rare Diseases (NORD) department in Roche Pharma Research and Early Development (pRED) in Basel, Switzerland. The BTT group utilizes the most advanced methods (including digital biomarkers, imaging (MRI and PET), EEG, fluid biomarkers, genetics and cognitive testing) and analytical approaches to support scientific decision-making in drug development. Roche has one of the largest and most exciting neuroscience portfolios ranging from programs in neurodevelopmental (e.g. ASD) and neuropsychiatric (e.g. Schizophrenia) to neurodegenerative disorders (e.g. AD, PD, MS) and including rare genetic disorders (e.g. Angelman Syndrome, Huntington's disease, SMA). We are looking for a highly motivated, creative, collaborative and innovative standout colleague with very strong quantitative and methodological skills, and a deep understanding of neuroscience, preferable with experience working in neuropsychiatric or neurological disorders. Details on the position can be found here: https://roche.wd3.myworkdayjobs.com/roche-ext/job/Basel-Headquarter/Biomarker-and-Experimental-Medicine-Leader-in-Neuroscience--Temporary-for-2-years-_201811-128841-1 Best wishes, Joerg -- Joerg Hipp, PhD Biomarker and Experimental Medicine Leader Group Leader: Electrophysiology and Analytics Biomarker and Translational Technology Group Pharma Research and Early Development (pRED) F. Hoffmann-La Roche Ltd. Grenzacherstrasse 124 4070 Basel, Switzerland Email: joerg.hipp at roche.com https://scholar.google.ch/citations?user=oxsJ6q4AAAAJ&hl=en -------------- next part -------------- An HTML attachment was scrubbed... URL: From r.oostenveld at donders.ru.nl Tue Jan 8 11:06:38 2019 From: r.oostenveld at donders.ru.nl (Robert Oostenveld) Date: Tue, 8 Jan 2019 11:06:38 +0100 Subject: [FieldTrip] questions In-Reply-To: References: <26BC20C23720E94A9FF826794B6D0CCE0100422E5E@PVTH-EXMBX11.cnmc.org> <252EB8AF-77EE-4336-8345-E463D50E9A42@childrensnational.org> Message-ID: <9A29530A-2183-4D24-B5CD-13BBAACE434E@donders.ru.nl> Hi Rathinaswamy > I have MRIs in DICOM format. I followed the instructions in the tutorial > which are as follows: > > f1=’/Volumes/FDATA_1/HACO_Project/CT_MRI T1 SPGR/ARS_MRI_T1 SPGR/1.2.840.113619.2.353.4120.14262029.13982.1485259768.788.dcm’; > > > mri = ft_read_mri(f1); > > > This threw the following error message. > ERROR: /Volumes/FDATA_1/HACO_Project/CT_MRI T1 SPGR/ARS_MRI_T1 > SPGR/1.2.840.113619.2.353.4120.14262029.13982.1485259768.788.dcm does not have a series number > Output argument "vol" (and maybe others) not assigned during call > to "load_dicom_series." > > Error in ft_read_mri (line 300) > [img,transform,hdr,mr_params] = > load_dicom_series(dcmdir,dcmdir,filename); This error happens in fieldtrip/external/freesurfer/load_dicom_series.m. The series number is used to determine from the (usually long list of) dicom files which ones belong together. You could try mri = ft_read_mri(filename, ‘dataformat’, ‘dicom_old’) which uses another low-level reading function. Please look at the code in ft_read_mri, around line 302. Alternatively, you may be able to use an external tool such as dcm2niix to convert the dicom to nifti. best regards, Robert From sherrykhan78 at gmail.com Tue Jan 8 14:04:55 2019 From: sherrykhan78 at gmail.com (Sheraz Khan) Date: Tue, 8 Jan 2019 08:04:55 -0500 Subject: [FieldTrip] MNE Postdoc opportunities @ Harvard Medical School & Massachusetts General Hospital Message-ID: On behalf of Dr. Matti Hämäläinen (msh at nmr.mgh.harvard.edu) [Apologies for cross posting] ---------------------------------------------------------------------------------------------- The academic MEG/EEG software packages are becoming more and more important to the field as new new sensor technologies are being applied and new commercial MEG systems are becoming available. We welcome new young scientists to become part of this endeavor! With best regards, Matti ---------------------------------------------------------------------------------------------- There are two postdoctoral positions available in the MNE projects at: Athinoula A. Martinos Center for Biomedical Massachusetts General Hospital and Harvard Medical School *Position 1: Postdoctoral Research Fellow (MNE-Python)* *Overview:* Applications are invited for a Postdoctoral Research Fellow available at the Massachusetts General Hospital Athinoula A. Martinos Center for Biomedical Imaging (www.nmr.mgh.harvard.edu). The postdoctoral fellow will also be affiliated with Harvard Medical School. We are using electrophysiological recordings in combination with anatomical and functional MRI to understand the functions of the healthy brain and how they are altered in neurological and psychiatric diseases. We capitalize on the insights from our basic and clinical research to develop new methods and tools to be applied in clinical practice. *Responsibilities:* The postdoc will work in an NIH-funded project whose overall aim is to provide well-documented and tested novel analysis software to promote both basic neuroscience and clinical research applications using MEG and EEG. In particular, during the past eight years we have developed, with NIH support, the MNE-Python software http://www.- martinos.org/mne/, which covers multiple methods of data preprocessing, source localization, statistical analysis, and estimation of functional connectivity between distributed brain regions. In this new project we will extend our software to meet the needs of a growing user base and reflect recent developments in the MEG/EEG field. Requirements: Candidates should have a Doctoral degree in biomedical engineering, computer science or related fields. Strong Python programming skills are required and background and experience in acquiring and analyzing MEG/EEG data are highly desirable. Candidates need to be able to work in a modern software development environment and be familiar with controlled software development processes. A successful candidate is able to work in a dynamic, international, and collaborative work environment. He/She will gain experience in recording and analyzing electrophysiological data, working with state-of-the-art brain mapping technologies as well as engaging in top-level research. Familiarity with MEG/EEG and MRI analysis software packages, in particular MNE-Python and FreeSurfer is highly beneficial. ---------------------------------------------------------------------------------------------- *Position 2: Postdoctoral Research Fellow (MNE-Scan)* *Overview:* Applications are invited for a postdoctoral position available at the Massachusetts General Hospital Athinoula A. Martinos Center for Biomedical Imaging (http://www.nmr.mgh.harvard.edu). The postdoctoral fellow will also be affiliated with Harvard Medical School. Our MEG/EEG laboratory is using electrophysiological recordings in combination with anatomical and functional MRI to understand the functions of the healthy brain and how they are altered in neurological and psychiatric diseases. Our ultimate goal is to capitalize on the insights from our basic and clinical research to develop new methods and tools to be applied in clinical practice. *Responsibilities:* The Postdoctoral fellow will work in an NIH-funded project which aim is to develop a device-independent and real-time capable software (MNE Scan). MNE Scan is based on the MNE-CPP framework ( www.mne-cpp.org) and will significantly increase the ease and efficiency of acquiring, monitoring, analyzing, and integrating electroencephalography (EEG), magnetoencephalography (MEG), electrocorticography (ECoG), and stereotactic EEG (SEEG) data. The MNE Scan software will format incoming electrographic data from any recording device for EEG, ECoG, SEEG, and MEG, store the data, carry out preprocessing for noise reduction and signal conditioning, display the incoming data in real time, and carry out the data analysis at the level of active tissues instead of the sensor level. Its realtime capability will provide immediate feedback to clinicians, enabling them to use this information for improving diagnosis and surgical management of epilepsy. Furthermore, MNE Scan will be used during neurofeedback experiments, including brain state dependent stimulation. The Postdoctoral fellow will work with other members of the investigative team to identify and develop new scientific use cases and research questions for the MNE Scan software described above. He will also work together with other investigators in the team to enhance source estimation and connectivity estimation methods to work efficiently in the real-time environment. *Requirements:* The successful candidate must hold a Ph.D. degree in biomedical engineering, computer science, or related fields. A successful candidate will benefit from working in a dynamic, international, and collaborative supportive work environment. He/She will gain experience in recording and analyzing electrophysiological data, working with state-of-the-art brain mapping technologies as well as engaging in top-level research. Previous experience in acquiring and analyzing MEG/EEG data is a strength. Strong C++ programming skills and experience in the Qt toolkit are highly desirable. It is preferred that the candidate has familiarity with MEG/EEG and MRI analysis software packages, in particular MNE and FreeSurfer. ---------------------------------------------------------------------------------------------- Welcome to the MNE Family! Massachusetts General Hospital is an equal opportunity employer. Full-time employees receive full benefits, competitive salaries, and excellent resources for career development. ********************************************************** *Contact: Matti Hämäläinen * *msh at nmr.mgh.harvard.edu * *Athinoula A. Martinos Center for Biomedical* *Massachusetts General Hospital and Harvard Medical School* *Boston, MA, USA* ********************************************************** -------------- next part -------------- An HTML attachment was scrubbed... URL: From sherrykhan78 at gmail.com Tue Jan 8 14:05:05 2019 From: sherrykhan78 at gmail.com (Sheraz Khan) Date: Tue, 8 Jan 2019 08:05:05 -0500 Subject: [FieldTrip] MNE Postdoc opportunities @ Harvard Medical School & Massachusetts General Hospital Message-ID: On behalf of Dr. Matti Hämäläinen (msh at nmr.mgh.harvard.edu) [Apologies for cross posting] ---------------------------------------------------------------------------------------------- The academic MEG/EEG software packages are becoming more and more important to the field as new new sensor technologies are being applied and new commercial MEG systems are becoming available. We welcome new young scientists to become part of this endeavor! With best regards, Matti ---------------------------------------------------------------------------------------------- There are two postdoctoral positions available in the MNE projects at: Athinoula A. Martinos Center for Biomedical Massachusetts General Hospital and Harvard Medical School *Position 1: Postdoctoral Research Fellow (MNE-Python)* *Overview:* Applications are invited for a Postdoctoral Research Fellow available at the Massachusetts General Hospital Athinoula A. Martinos Center for Biomedical Imaging (www.nmr.mgh.harvard.edu). The postdoctoral fellow will also be affiliated with Harvard Medical School. We are using electrophysiological recordings in combination with anatomical and functional MRI to understand the functions of the healthy brain and how they are altered in neurological and psychiatric diseases. We capitalize on the insights from our basic and clinical research to develop new methods and tools to be applied in clinical practice. *Responsibilities:* The postdoc will work in an NIH-funded project whose overall aim is to provide well-documented and tested novel analysis software to promote both basic neuroscience and clinical research applications using MEG and EEG. In particular, during the past eight years we have developed, with NIH support, the MNE-Python software http://www.- martinos.org/mne/, which covers multiple methods of data preprocessing, source localization, statistical analysis, and estimation of functional connectivity between distributed brain regions. In this new project we will extend our software to meet the needs of a growing user base and reflect recent developments in the MEG/EEG field. Requirements: Candidates should have a Doctoral degree in biomedical engineering, computer science or related fields. Strong Python programming skills are required and background and experience in acquiring and analyzing MEG/EEG data are highly desirable. Candidates need to be able to work in a modern software development environment and be familiar with controlled software development processes. A successful candidate is able to work in a dynamic, international, and collaborative work environment. He/She will gain experience in recording and analyzing electrophysiological data, working with state-of-the-art brain mapping technologies as well as engaging in top-level research. Familiarity with MEG/EEG and MRI analysis software packages, in particular MNE-Python and FreeSurfer is highly beneficial. ---------------------------------------------------------------------------------------------- *Position 2: Postdoctoral Research Fellow (MNE-Scan)* *Overview:* Applications are invited for a postdoctoral position available at the Massachusetts General Hospital Athinoula A. Martinos Center for Biomedical Imaging (http://www.nmr.mgh.harvard.edu). The postdoctoral fellow will also be affiliated with Harvard Medical School. Our MEG/EEG laboratory is using electrophysiological recordings in combination with anatomical and functional MRI to understand the functions of the healthy brain and how they are altered in neurological and psychiatric diseases. Our ultimate goal is to capitalize on the insights from our basic and clinical research to develop new methods and tools to be applied in clinical practice. *Responsibilities:* The Postdoctoral fellow will work in an NIH-funded project which aim is to develop a device-independent and real-time capable software (MNE Scan). MNE Scan is based on the MNE-CPP framework ( www.mne-cpp.org) and will significantly increase the ease and efficiency of acquiring, monitoring, analyzing, and integrating electroencephalography (EEG), magnetoencephalography (MEG), electrocorticography (ECoG), and stereotactic EEG (SEEG) data. The MNE Scan software will format incoming electrographic data from any recording device for EEG, ECoG, SEEG, and MEG, store the data, carry out preprocessing for noise reduction and signal conditioning, display the incoming data in real time, and carry out the data analysis at the level of active tissues instead of the sensor level. Its realtime capability will provide immediate feedback to clinicians, enabling them to use this information for improving diagnosis and surgical management of epilepsy. Furthermore, MNE Scan will be used during neurofeedback experiments, including brain state dependent stimulation. The Postdoctoral fellow will work with other members of the investigative team to identify and develop new scientific use cases and research questions for the MNE Scan software described above. He will also work together with other investigators in the team to enhance source estimation and connectivity estimation methods to work efficiently in the real-time environment. *Requirements:* The successful candidate must hold a Ph.D. degree in biomedical engineering, computer science, or related fields. A successful candidate will benefit from working in a dynamic, international, and collaborative supportive work environment. He/She will gain experience in recording and analyzing electrophysiological data, working with state-of-the-art brain mapping technologies as well as engaging in top-level research. Previous experience in acquiring and analyzing MEG/EEG data is a strength. Strong C++ programming skills and experience in the Qt toolkit are highly desirable. It is preferred that the candidate has familiarity with MEG/EEG and MRI analysis software packages, in particular MNE and FreeSurfer. ---------------------------------------------------------------------------------------------- Welcome to the MNE Family! Massachusetts General Hospital is an equal opportunity employer. Full-time employees receive full benefits, competitive salaries, and excellent resources for career development. ********************************************************** *Contact: Matti Hämäläinen * *msh at nmr.mgh.harvard.edu * *Athinoula A. Martinos Center for Biomedical* *Massachusetts General Hospital and Harvard Medical School* *Boston, MA, USA* ********************************************************** -------------- next part -------------- An HTML attachment was scrubbed... URL: From elene.beitia at alumni.mondragon.edu Tue Jan 8 17:58:44 2019 From: elene.beitia at alumni.mondragon.edu (Elene Beitia Loinaz) Date: Tue, 8 Jan 2019 17:58:44 +0100 Subject: [FieldTrip] =?utf-8?q?=28no_subject=29?= Message-ID: Dear all, I am trying to create a .lay to perform a ft_multiplotTFR. The information that we have is in .locs, we achieve to convert the data to struct but the ft_multiplotTFR function needs a .mat or .lay. (we have try to achieve this using struct2cell and cell2mat) Does someone know how to convert a .locs to .mat or .lay? And do you know if it is posible to use ft_multiplotTFR for EEG`s?, because in the examples that we have found it is only used with MEG. If it is not posible, do you know if there is another function to obtain the same result? Thank you in advanced, Elene. -------------- next part -------------- An HTML attachment was scrubbed... URL: From stephen.whitmarsh at gmail.com Tue Jan 8 18:45:15 2019 From: stephen.whitmarsh at gmail.com (Stephen Whitmarsh) Date: Tue, 8 Jan 2019 18:45:15 +0100 Subject: [FieldTrip] (no subject) In-Reply-To: References: Message-ID: Dear Elene, Have you looked at this: http://www.fieldtriptoolbox.org/tutorial/layout/ ? And to you second question, absolutely. It's just a matter of convenience that the examples are for MEG mainly. But see e.g.: http://www.fieldtriptoolbox.org/workshop/natmeg/ Cheers, Stephen On Tue, 8 Jan 2019 at 18:32, Elene Beitia Loinaz < elene.beitia at alumni.mondragon.edu> wrote: > Dear all, > > I am trying to create a .lay to perform a ft_multiplotTFR. > > The information that we have is in .locs, we achieve to convert the data > to struct but the ft_multiplotTFR function needs a .mat or .lay. (we have > try to achieve this using struct2cell and cell2mat) > > Does someone know how to convert a .locs to .mat or .lay? > > And do you know if it is posible to use ft_multiplotTFR for EEG`s?, > because in the examples that we have found it is only used with MEG. If it > is not posible, do you know if there is another function to obtain the same > result? > > Thank you in advanced, > > Elene. > _______________________________________________ > 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 RICHARDS at mailbox.sc.edu Tue Jan 8 20:23:47 2019 From: RICHARDS at mailbox.sc.edu (RICHARDS, JOHN) Date: Tue, 8 Jan 2019 19:23:47 +0000 Subject: [FieldTrip] Postdoc position In-Reply-To: References: Message-ID: John Richards in the Department of Psychology at the University of South Carolina is seeking a qualified PhD for a postdoctoral position. The position involves research on the development of infant attention. The laboratory uses psychophysiological methods (heart rate, EEG, ERP) and MRI (structural) to examine the brain bases of the development of infant attention and recognition memory (http://jerlab.sc.edu). The position would be to further develop the “Neurodevelopmental MRI Database”, work on analysis writeup of existing projects examining tools for cortical source analysis in infants, and analysis of current datasets on infant attention and brain development. The ideal candidate would have background neuroimaging such as EEG/ERP, structural MRI or fMRI, programming experience (MATLAB, FSL, EEGLab/ERPLab) and interests/background in infant cognition, perception, or attention. We also do some work on multimodal neuroimaging in adults (sMRI, dMRI, fMRI, EEG/ERP) and the candidate could either have relevant experience, or participate in these studies. Writing experience and a publication record is required; and extensive writing and publication will be expected. At the candidate’s interest, teaching experiences are available. The position is initially funded for one year, and subsequent years will be available depending on funding. The position is available now and candidates could start immediately. The salary is set at NIH standards accounting for years of postdoctoral experience. The position could be extended to a “Research Assistant Professor” for a qualified candidate with a supplement source of support. Review of applications will begin immediately and continue until the position is filled. Please send a letter of application, curriculum vitae, 1-2 writing samples, and the names and contact information of three references to richards-john at sc.edu, John E. Richards, Department of Psychology, University of South Carolina, Columbia SC 29208. *********************************************** John E. Richards Carolina Distinguished Professor Department of Psychology University of South Carolina Columbia, SC 29208 Dept Phone: 803 777 2079 Fax: 803 777 9558 Email: richards-john at sc.edu https://jerlab.sc.edu ************************************************* -------------- next part -------------- An HTML attachment was scrubbed... URL: From xusihua80 at 163.com Wed Jan 9 12:18:14 2019 From: xusihua80 at 163.com (xusihua) Date: Wed, 9 Jan 2019 19:18:14 +0800 (CST) Subject: [FieldTrip] Fw:Is there someone that has ANT neuro eego 32 channels fieldtrip layout file? Message-ID: <3eae9a3a.de0a.16832558eb5.Coremail.xusihua80@163.com> Hi everyone Is there someone that has ANT neuro eego 32 channels fieldtrip layout file or can someone help me to find out how to create a layout file? Best wishes! -- Sihua Xu, PhD Postdoc Center for Functional Neuroimaging (cfn.upenn.edu) Perelman School of Medicine University of Pennsylvania Philadelphia, PA, 19104, USA -------------- next part -------------- An HTML attachment was scrubbed... URL: From xusihua80 at 163.com Thu Jan 10 01:30:48 2019 From: xusihua80 at 163.com (xusihua) Date: Thu, 10 Jan 2019 08:30:48 +0800 (CST) Subject: [FieldTrip] Fw:Is there someone that has ANT neuro eego 32 channels fieldtrip layout file? Message-ID: <63861b2.1fd3.168352b2cad.Coremail.xusihua80@163.com> Hi everyone Is there someone that has ANT neuro eego 32 channels fieldtrip layout file or can someone help me to find out how to create a layout file? Best wishes! -- Sihua Xu, PhD Postdoc Center for Functional Neuroimaging (cfn.upenn.edu) Perelman School of Medicine University of Pennsylvania Philadelphia, PA, 19104, USA -------------- next part -------------- An HTML attachment was scrubbed... URL: From popwatson at hotmail.com Thu Jan 10 05:57:24 2019 From: popwatson at hotmail.com (Poppy Watson) Date: Thu, 10 Jan 2019 04:57:24 +0000 Subject: [FieldTrip] time frequency data looks blocky and stripy rather than smooth and swirly Message-ID: Dear fieldtrippers, I'm replicating a study that used fieldtrip for TF analysis (and has some lovely single electrode TF plots for each experimental condition). I've been running ft_freqanalysis using the following settings. cfg = []; cfg.trials = trialsToUse; % this is a vector of trial numbers cfg.method = 'mtmconvol'; cfg.output = 'pow'; cfg.channel = 'eeg'; cfg.taper = 'hanning'; cfg.foi = 2:2:30; %cfg.t_ftimwin = 4 ./ cfg.foi; cfg.t_ftimwin = ones(length(cfg.foi),1).*0.5; cfg.toi = -1.25:0.10:0.25; % 100 ms sliding time window The output and stats etc seem to all make sense but my concern is that when I plot the data e.g. from one electrode (collapsed across the whole pp group)- I don't get beautiful fuzzy TF graphs - instead I get very blocky/stripy figures like the attached where there doesn't seem to be any smoothing/bleeding across different frequencies. I've tried playing around with the cfg.foi as well as the length of the time window and sliding window (cfg.t_ftimwin and cfg.toi) but the results always look very blocky rather than all warm and fuzzy (i.e. as seen in raw-TFdata-of-single-electrode images in various publications). Am I missing some smoothing parameters?? This is my singleplot_TFR code: cfg = [ ] ; cfg.channel = 'FCz'; cfg.xlim = [-1 0]; %before stimulus appears cfg.ylim = [2 20]; % [8 12] only alpha cfg.zlim = [0 15]; cfg.maskstyle = 'saturation'; cfg.masknans = 'yes'; ft_singleplotTFR(cfg, allPPdata_suc_collapsed_high); Many Thanks P. Watson -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: example.png Type: image/png Size: 11648 bytes Desc: example.png URL: From stephen.whitmarsh at gmail.com Thu Jan 10 07:35:30 2019 From: stephen.whitmarsh at gmail.com (Stephen Whitmarsh) Date: Thu, 10 Jan 2019 07:35:30 +0100 Subject: [FieldTrip] time frequency data looks blocky and stripy rather than smooth and swirly In-Reply-To: References: Message-ID: Dear P., I suspect this is because: 1) you are using half a second for your sliding time-window, which is reasonable, but only have 1.5 seconds of data, of which you plot only one. This doesn't give much room for 'fuzzyness' in the sense of changes over time. 2) because you are not baseline correcting the results, you will mosly see 1/f power, i.e. more power in the lower frequency bands, which will be relatively stronger than any changes over time. To solve this: 1) calculate the TFR over a longer time-window, both before and after stimulation onset. 2) use a relative baseline correction That should hopefully give you the fuzzyness you want. Cheers, Stephen On Thu, 10 Jan 2019 at 06:14, Poppy Watson wrote: > Dear fieldtrippers, > > > > I’m replicating a study that used fieldtrip for TF analysis (and has some > lovely single electrode TF plots for each experimental condition). I’ve > been running ft_freqanalysis using the following settings. > > > > cfg = []; > > cfg.trials = trialsToUse; % this is a vector of trial numbers > > cfg.method = 'mtmconvol'; > > cfg.output = 'pow'; > > cfg.channel = 'eeg'; > > cfg.taper = 'hanning'; > > cfg.foi = 2:2:30; > > %cfg.t_ftimwin = 4 ./ cfg.foi; > > cfg.t_ftimwin = ones(length(cfg.foi),1).*0.5; > > cfg.toi = -1.25:0.10:0.25; % 100 ms sliding time window > > > > The output and stats etc seem to all make sense but my concern is that > when I plot the data e.g. from one electrode (collapsed across the whole pp > group)– I don’t get beautiful fuzzy TF graphs – instead I get very > blocky/stripy figures like the attached where there doesn’t seem to be any > smoothing/bleeding across different frequencies. I’ve tried playing around > with the cfg.foi as well as the length of the time window and sliding > window (cfg.t_ftimwin and cfg.toi) but the results always look very blocky > rather than all warm and fuzzy (i.e. as seen in > raw-TFdata-of-single-electrode images in various publications). Am I > missing some smoothing parameters?? > > > > This is my singleplot_TFR code: > > > > cfg = [ ] ; > > cfg.channel = 'FCz'; > > cfg.xlim = [-1 0]; %before stimulus appears > > cfg.ylim = [2 20]; % [8 12] only alpha > > cfg.zlim = [0 15]; > > cfg.maskstyle = 'saturation'; > > cfg.masknans = 'yes'; > > ft_singleplotTFR(cfg, allPPdata_suc_collapsed_high); > > > > Many Thanks > > P. Watson > > > _______________________________________________ > 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 stephen.whitmarsh at gmail.com Thu Jan 10 07:38:21 2019 From: stephen.whitmarsh at gmail.com (Stephen Whitmarsh) Date: Thu, 10 Jan 2019 07:38:21 +0100 Subject: [FieldTrip] Fw:Is there someone that has ANT neuro eego 32 channels fieldtrip layout file? In-Reply-To: <63861b2.1fd3.168352b2cad.Coremail.xusihua80@163.com> References: <63861b2.1fd3.168352b2cad.Coremail.xusihua80@163.com> Message-ID: Dear Sihua, Please see: http://www.fieldtriptoolbox.org/tutorial/layout/ maybe taking an existing one to start with: http://www.fieldtriptoolbox.org/template/layout/ Cheers, Stephen On Thu, 10 Jan 2019 at 01:59, xusihua wrote: > > Hi everyone > Is there someone that has ANT neuro eego 32 channels fieldtrip layout > file or can someone help me to find out how to create a layout file? Best > wishes! > > > > -- > Sihua Xu, PhD > > Postdoc > Center for Functional Neuroimaging (cfn.upenn.edu) > > Perelman School of Medicine > University of Pennsylvania > Philadelphia, PA, 19104, USA > > > > > > > > > > > _______________________________________________ > 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 julian.keil at gmail.com Thu Jan 10 07:39:45 2019 From: julian.keil at gmail.com (Julian Keil) Date: Thu, 10 Jan 2019 07:39:45 +0100 Subject: [FieldTrip] time frequency data looks blocky and stripy rather than smooth and swirly In-Reply-To: References: Message-ID: Dear Poppy, did you do some sort of baseline correction or condition contrast? Otherwise, what you see is simply the 1/f distribution in the power spectrum. Best, Julian ________________ Prof. Dr. Julian Keil Biological Psychology Olshausenstrasse 62 - R. 306 24118 Kiel, Germany +49 - 0431 - 880 - 4872 http://www.biopsych.uni-kiel.de/en > Am 10.01.2019 um 05:57 schrieb Poppy Watson : > > Dear fieldtrippers, > > I’m replicating a study that used fieldtrip for TF analysis (and has some lovely single electrode TF plots for each experimental condition). I’ve been running ft_freqanalysis using the following settings. > > cfg = []; > cfg.trials = trialsToUse; % this is a vector of trial numbers > cfg.method = 'mtmconvol'; > cfg.output = 'pow'; > cfg.channel = 'eeg'; > cfg.taper = 'hanning'; > cfg.foi = 2:2:30; > %cfg.t_ftimwin = 4 ./ cfg.foi; > cfg.t_ftimwin = ones(length(cfg.foi),1).*0.5; > cfg.toi = -1.25:0.10:0.25; % 100 ms sliding time window > > The output and stats etc seem to all make sense but my concern is that when I plot the data e.g. from one electrode (collapsed across the whole pp group)– I don’t get beautiful fuzzy TF graphs – instead I get very blocky/stripy figures like the attached where there doesn’t seem to be any smoothing/bleeding across different frequencies. I’ve tried playing around with the cfg.foi as well as the length of the time window and sliding window (cfg.t_ftimwin and cfg.toi) but the results always look very blocky rather than all warm and fuzzy (i.e. as seen in raw-TFdata-of-single-electrode images in various publications). Am I missing some smoothing parameters?? > > This is my singleplot_TFR code: > > cfg = [ ] ; > cfg.channel = 'FCz'; > cfg.xlim = [-1 0]; %before stimulus appears > cfg.ylim = [2 20]; % [8 12] only alpha > cfg.zlim = [0 15]; > cfg.maskstyle = 'saturation'; > cfg.masknans = 'yes'; > ft_singleplotTFR(cfg, allPPdata_suc_collapsed_high); > > Many Thanks > P. Watson > > _______________________________________________ > 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 popwatson at hotmail.com Thu Jan 10 09:10:57 2019 From: popwatson at hotmail.com (Poppy Watson) Date: Thu, 10 Jan 2019 08:10:57 +0000 Subject: [FieldTrip] time frequency data looks blocky and stripy rather than smooth and swirly In-Reply-To: References: , Message-ID: Thanks Stephen (and Julian who replied at the same time). I suspected it was something along these lines as indeed when I subtract one condition from the other, the figures look much more like traditional swirly depictions. The paper I am replicating does not mention anything re. baseline correction of results but I guess that's what they must have done. Just glad to know that all makes sense! Many thanks ________________________________ From: fieldtrip on behalf of Stephen Whitmarsh Sent: 10 January 2019 5:35 PM To: FieldTrip discussion list Subject: Re: [FieldTrip] time frequency data looks blocky and stripy rather than smooth and swirly Dear P., I suspect this is because: 1) you are using half a second for your sliding time-window, which is reasonable, but only have 1.5 seconds of data, of which you plot only one. This doesn't give much room for 'fuzzyness' in the sense of changes over time. 2) because you are not baseline correcting the results, you will mosly see 1/f power, i.e. more power in the lower frequency bands, which will be relatively stronger than any changes over time. To solve this: 1) calculate the TFR over a longer time-window, both before and after stimulation onset. 2) use a relative baseline correction That should hopefully give you the fuzzyness you want. Cheers, Stephen On Thu, 10 Jan 2019 at 06:14, Poppy Watson > wrote: Dear fieldtrippers, I’m replicating a study that used fieldtrip for TF analysis (and has some lovely single electrode TF plots for each experimental condition). I’ve been running ft_freqanalysis using the following settings. cfg = []; cfg.trials = trialsToUse; % this is a vector of trial numbers cfg.method = 'mtmconvol'; cfg.output = 'pow'; cfg.channel = 'eeg'; cfg.taper = 'hanning'; cfg.foi = 2:2:30; %cfg.t_ftimwin = 4 ./ cfg.foi; cfg.t_ftimwin = ones(length(cfg.foi),1).*0.5; cfg.toi = -1.25:0.10:0.25; % 100 ms sliding time window The output and stats etc seem to all make sense but my concern is that when I plot the data e.g. from one electrode (collapsed across the whole pp group)– I don’t get beautiful fuzzy TF graphs – instead I get very blocky/stripy figures like the attached where there doesn’t seem to be any smoothing/bleeding across different frequencies. I’ve tried playing around with the cfg.foi as well as the length of the time window and sliding window (cfg.t_ftimwin and cfg.toi) but the results always look very blocky rather than all warm and fuzzy (i.e. as seen in raw-TFdata-of-single-electrode images in various publications). Am I missing some smoothing parameters?? This is my singleplot_TFR code: cfg = [ ] ; cfg.channel = 'FCz'; cfg.xlim = [-1 0]; %before stimulus appears cfg.ylim = [2 20]; % [8 12] only alpha cfg.zlim = [0 15]; cfg.maskstyle = 'saturation'; cfg.masknans = 'yes'; ft_singleplotTFR(cfg, allPPdata_suc_collapsed_high); Many Thanks P. Watson _______________________________________________ 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 Silvia.Formica at UGent.be Thu Jan 10 10:31:10 2019 From: Silvia.Formica at UGent.be (Silvia Formica) Date: Thu, 10 Jan 2019 09:31:10 +0000 Subject: [FieldTrip] EEG source reconstruction with template - elec file Message-ID: <1547112671759.73597@UGent.be> Dear all, I have a EEG dataset, collected with a Biosemi system with 64 channels. I don't have the individual anatomical data for each participant, but I want to perform source reconstruction to have at least a rough localization of the activation I find. Therefore, I intend to use the templates provided by fieldtrip. If I understand correctly, independently of the source modelling technique that I will choose to use, I need the following information: 1) the head model : this would be the template 'standard_bem' 2) the source model : the template 'cortex_5124.surf.gii' 3) the elec information :? this file should describe the spatial configuration of the electrodes, but I can't retrieve it. I don't think any of the templates available fits my data (they all have more than 64 channels and different configurations). I tried to use the function ft_read_sens on my data but I get the following error elec = ft_read_sens([data_filt5.mat'],'senstype','eeg'); Undefined function or variable 'lab'. Error in channelposition (line 316) n = size(lab,2); Error in ft_datatype_sens (line 349) [chanpos, chanori, lab] = channelposition(sens); Error in ft_datatype_sens (line 158) sens = ft_datatype_sens(sens, 'version', '2011v2'); Error in ft_read_sens (line 380) sens = ft_datatype_sens(sens); I found the cartesian coordinates of the electrodes on the Biosemi website, with the x y z coordinates for each electrodes (as the little example I'm giving below, but that's not enough. Channel x y z Fp1 -27.0333934563814 83.2002299946862 -3.05493522574547 AF7 -51.4205700085246 70.7743429000555 -3.05493522574547 AF3 -35.5608995849164 76.2605952593987 24.1279774030766 F1 -25.1195714566887 62.1731210759014 56.2665567427342 F5 -47.7073482911603 58.9136687505812 43.7676114900325 ... ? ... ... ... Do you have any suggestions on how to create a correct elec file fitting my data? Any help would be highly appreciated! Silvia -------------- next part -------------- An HTML attachment was scrubbed... URL: From julian.keil at gmail.com Thu Jan 10 11:58:18 2019 From: julian.keil at gmail.com (Julian Keil) Date: Thu, 10 Jan 2019 11:58:18 +0100 Subject: [FieldTrip] EEG source reconstruction with template - elec file In-Reply-To: <1547112671759.73597@UGent.be> References: <1547112671759.73597@UGent.be> Message-ID: Dear Silvia, how is the electrode location information from the BioSemi website not enough? Basically, you can create your own electrode definition by giving the labels and locations to a structure, e.g. elec.label{1} = 'Fp1'; elec.chanpos(1,:) = [-27.0333934563814, 83.2002299946862, -3.05493522574547]; or for all your electrodes in one go: elec.label = {'Fp1','AF7','AF3','F1','F5'}; elec.chanpos = [-27.0333934563814, 83.2002299946862, -3.05493522574547;... -51.4205700085246, 70.7743429000555, -3.05493522574547;... -35.5608995849164, 76.2605952593987, 24.1279774030766;... -25.1195714566887, 62.1731210759014, 56.2665567427342;... -47.7073482911603, 58.9136687505812, 43.7676114900325]; plot3(elec.chanpos(:,1),elec.chanpos(:,2),elec.chanpos(:,3),'*') or of course read them more elegantly from a text file ;-) It might be a good idea to double check the alignment with the template headmodel afterwards using ft_electroderealign You can then use this elec structure in all subsequent analyses. I hope that helps, Julian On Thu, Jan 10, 2019 at 10:59 AM Silvia Formica wrote: > Dear all, > > > I have a EEG dataset, collected with a Biosemi system with 64 channels. I > don't have the individual anatomical data for each participant, but I want > to perform source reconstruction to have at least a rough localization of > the activation I find. > > > Therefore, I intend to use the templates provided by fieldtrip. If I > understand correctly, independently of the source modelling technique that > I will choose to use, I need the following information: > > > 1) the *head model* : this would be the template '*standard_bem'* > > > 2) the *source model* : the template '*cortex_5124.surf.gii*' > > > 3) the *elec information* :​ this file should describe the spatial > configuration of the electrodes, but I can't retrieve it. I don't think any > of the templates available fits my data (they all have more than 64 > channels and different configurations). > > > I tried to use the function ft_read_sens on my data but I get the > following error > > > elec = ft_read_sens([data_filt5.mat'],'senstype','eeg'); > > > Undefined function or variable 'lab'. > > > Error in channelposition (line 316) > > n = size(lab,2); > > > Error in ft_datatype_sens (line 349) > > [chanpos, chanori, lab] = channelposition(sens); > > > Error in ft_datatype_sens (line 158) > > sens = ft_datatype_sens(sens, 'version', '2011v2'); > > > Error in ft_read_sens (line 380) > > sens = ft_datatype_sens(sens); > > > > I found the cartesian coordinates of the electrodes on the Biosemi > website, with the x y z coordinates for each electrodes (as the little > example I'm giving below, but that's not enough. > > > Channel x y > z > Fp1 -27.0333934563814 83.2002299946862 -3.05493522574547 > AF7 -51.4205700085246 70.7743429000555 -3.05493522574547 > AF3 -35.5608995849164 76.2605952593987 24.1279774030766 > F1 -25.1195714566887 62.1731210759014 56.2665567427342 > F5 -47.7073482911603 58.9136687505812 43.7676114900325 > > ... > ​ ... ... ... > > > > *Do you have any suggestions on how to create a correct elec file fitting > my data?* > > Any help would be highly appreciated! > > > Silvia > > > > > _______________________________________________ > 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 Silvia.Formica at UGent.be Thu Jan 10 16:05:09 2019 From: Silvia.Formica at UGent.be (Silvia Formica) Date: Thu, 10 Jan 2019 15:05:09 +0000 Subject: [FieldTrip] EEG source reconstruction with template - elec file In-Reply-To: References: <1547112671759.73597@UGent.be>, Message-ID: <1547132711097.19484@UGent.be> Dear Julian, thanks for your quick response! You are absolutely right, my problem was that I was not creating the elec file correctly as a struct with the fields chanpos, elecpos and label. I'm now facing another problem, though. I'm trying to use ft_electroderealign, but I can't seem to achieve a satisfying result. Here is what I am doing: cfg = []; cfg.method = 'headshape'; % cfg.warp = cfg.elec = elec; cfg.headshape = vol.bnd(1); elec_new = ft_electroderealign(cfg); I then try to plot overlaid the skin surface as loaded from 'standard_skin_14038.vol' and the new electrode location but I get inconsistent results, the electrodes are always inside the head. I tried different warping methods without success. This is the closest I managed to get: [cid:809f04f6-d9d9-4e7d-b722-79f7a535c0fd] Do you have any recommendation on how to better align the electrodes to the template? Thanks! Silvia ________________________________ From: fieldtrip on behalf of Julian Keil Sent: 10 January 2019 11:58 To: FieldTrip discussion list Subject: Re: [FieldTrip] EEG source reconstruction with template - elec file Dear Silvia, how is the electrode location information from the BioSemi website not enough? Basically, you can create your own electrode definition by giving the labels and locations to a structure, e.g. elec.label{1} = 'Fp1'; elec.chanpos(1,:) = [-27.0333934563814, 83.2002299946862, -3.05493522574547]; or for all your electrodes in one go: elec.label = {'Fp1','AF7','AF3','F1','F5'}; elec.chanpos = [-27.0333934563814, 83.2002299946862, -3.05493522574547;... -51.4205700085246, 70.7743429000555, -3.05493522574547;... -35.5608995849164, 76.2605952593987, 24.1279774030766;... -25.1195714566887, 62.1731210759014, 56.2665567427342;... -47.7073482911603, 58.9136687505812, 43.7676114900325]; plot3(elec.chanpos(:,1),elec.chanpos(:,2),elec.chanpos(:,3),'*') or of course read them more elegantly from a text file ;-) It might be a good idea to double check the alignment with the template headmodel afterwards using ft_electroderealign You can then use this elec structure in all subsequent analyses. I hope that helps, Julian On Thu, Jan 10, 2019 at 10:59 AM Silvia Formica > wrote: Dear all, I have a EEG dataset, collected with a Biosemi system with 64 channels. I don't have the individual anatomical data for each participant, but I want to perform source reconstruction to have at least a rough localization of the activation I find. Therefore, I intend to use the templates provided by fieldtrip. If I understand correctly, independently of the source modelling technique that I will choose to use, I need the following information: 1) the head model : this would be the template 'standard_bem' 2) the source model : the template 'cortex_5124.surf.gii' 3) the elec information :​ this file should describe the spatial configuration of the electrodes, but I can't retrieve it. I don't think any of the templates available fits my data (they all have more than 64 channels and different configurations). I tried to use the function ft_read_sens on my data but I get the following error elec = ft_read_sens([data_filt5.mat'],'senstype','eeg'); Undefined function or variable 'lab'. Error in channelposition (line 316) n = size(lab,2); Error in ft_datatype_sens (line 349) [chanpos, chanori, lab] = channelposition(sens); Error in ft_datatype_sens (line 158) sens = ft_datatype_sens(sens, 'version', '2011v2'); Error in ft_read_sens (line 380) sens = ft_datatype_sens(sens); I found the cartesian coordinates of the electrodes on the Biosemi website, with the x y z coordinates for each electrodes (as the little example I'm giving below, but that's not enough. Channel x y z Fp1 -27.0333934563814 83.2002299946862 -3.05493522574547 AF7 -51.4205700085246 70.7743429000555 -3.05493522574547 AF3 -35.5608995849164 76.2605952593987 24.1279774030766 F1 -25.1195714566887 62.1731210759014 56.2665567427342 F5 -47.7073482911603 58.9136687505812 43.7676114900325 ... ​ ... ... ... Do you have any suggestions on how to create a correct elec file fitting my data? Any help would be highly appreciated! Silvia _______________________________________________ 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: pastedImage.png Type: image/png Size: 82198 bytes Desc: pastedImage.png URL: From mcarlapiastra at gmail.com Thu Jan 10 16:21:07 2019 From: mcarlapiastra at gmail.com (Maria Carla Piastra) Date: Thu, 10 Jan 2019 16:21:07 +0100 Subject: [FieldTrip] ChildBrain conference in Leuven!! Message-ID: <52f33f09-2013-bdf1-5c43-f681040624be@gmail.com> Dear all, please see and share the invitation to our ChildBrain conference in Leuven (Belgium). The deadline is close! (Apologies for multiple posting.) Best regards, Maria Carla Piastra ​ * * * * * * ***The Childbrain Conference* *Leuven, Belgium 5 - 7 Febuary, 2019* We are pleased to invite you to the "ChildBrain Conference" organized by ChildBrain Marie Skłodowska-Curie Action (MSCA) Innovative Training Network (ITN), that will be held from 5 until 7 February 2019, at KU Leuven, in Leuven, Belgium. This conference is about research on children’s brain in typical development and brain disorders, specifically on results based on recent neuroimaging methods combining modalities as electroencephalography (EEG), magnetoencephalography (MEG) and magnetic resonance imaging (MRI). At the conference, invited speakers and researchers from ChildBrain will give presentations in four main sessions: atypical neurodevelopment, typical neurodevelopment, methodological advances for pediatric neuroimaging and future perspectives. There is also the possibility to attend a pre-conference session in which a methodological demonstration is given on the acquisition and application of head models in children brain data We aim at calling together researchers and students from various domains such as language and audition, as well as mathematics, physics and engineering to build bridges between applications and methodology and share this common and exciting interest on child brain development. For participants to the conference, there is the opportunity to share your work in a poster session and/or as a selected speaker. If you wish to present at the Childbrain Conference, you are invited to send an abstract. *You can submit your abstract and register **here **. The abstract submission deadline is on 14 January 2019 at 23:59 CET. You can view our detailed **schedule ** for further information.* -------------- next part -------------- An HTML attachment was scrubbed... URL: From julian.keil at gmail.com Thu Jan 10 16:40:35 2019 From: julian.keil at gmail.com (Julian Keil) Date: Thu, 10 Jan 2019 16:40:35 +0100 Subject: [FieldTrip] EEG source reconstruction with template - elec file In-Reply-To: <1547132711097.19484@UGent.be> References: <1547112671759.73597@UGent.be> <1547132711097.19484@UGent.be> Message-ID: Hi Silvia, have you tried the "interactive" method? It lets you play around with the alignment. Best, Julian On Thu, Jan 10, 2019 at 4:35 PM Silvia Formica wrote: > Dear Julian, > > > thanks for your quick response! > > You are absolutely right, my problem was that I was not creating the elec > file correctly as a struct with the fields chanpos, elecpos and label. > > > I'm now facing another problem, though. I'm trying to use > ft_electroderealign, but I can't seem to achieve a satisfying result. Here > is what I am doing: > > > cfg = []; > cfg.method = 'headshape'; > % cfg.warp = > cfg.elec = elec; > cfg.headshape = vol.bnd(1); > elec_new = ft_electroderealign(cfg); > > > I then try to plot overlaid the skin surface as loaded > from 'standard_skin_14038.vol' and the new electrode location but I get > inconsistent results, the electrodes are always inside the head. I tried > different warping methods without success. This is the closest I managed to > get: > > > > > Do you have any recommendation on how to better align the electrodes to > the template? > > > Thanks! > > Silvia > ------------------------------ > *From:* fieldtrip on behalf of Julian > Keil > *Sent:* 10 January 2019 11:58 > *To:* FieldTrip discussion list > *Subject:* Re: [FieldTrip] EEG source reconstruction with template - elec > file > > Dear Silvia, > > how is the electrode location information from the BioSemi website not > enough? > Basically, you can create your own electrode definition by giving the > labels and locations to a structure, e.g. > elec.label{1} = 'Fp1'; > elec.chanpos(1,:) = [-27.0333934563814, 83.2002299946862, > -3.05493522574547]; > > or for all your electrodes in one go: > elec.label = {'Fp1','AF7','AF3','F1','F5'}; > elec.chanpos = [-27.0333934563814, 83.2002299946862, -3.05493522574547;... > -51.4205700085246, 70.7743429000555, -3.05493522574547;... > -35.5608995849164, 76.2605952593987, 24.1279774030766;... > -25.1195714566887, 62.1731210759014, 56.2665567427342;... > -47.7073482911603, 58.9136687505812, 43.7676114900325]; > > plot3(elec.chanpos(:,1),elec.chanpos(:,2),elec.chanpos(:,3),'*') > > or of course read them more elegantly from a text file ;-) > > It might be a good idea to double check the alignment with the template > headmodel afterwards using ft_electroderealign > You can then use this elec structure in all subsequent analyses. > > I hope that helps, > > Julian > > On Thu, Jan 10, 2019 at 10:59 AM Silvia Formica > wrote: > >> Dear all, >> >> >> I have a EEG dataset, collected with a Biosemi system with 64 channels. I >> don't have the individual anatomical data for each participant, but I want >> to perform source reconstruction to have at least a rough localization of >> the activation I find. >> >> >> Therefore, I intend to use the templates provided by fieldtrip. If I >> understand correctly, independently of the source modelling technique that >> I will choose to use, I need the following information: >> >> >> 1) the *head model* : this would be the template '*standard_bem'* >> >> >> 2) the *source model* : the template '*cortex_5124.surf.gii*' >> >> >> 3) the *elec information* :​ this file should describe the spatial >> configuration of the electrodes, but I can't retrieve it. I don't think any >> of the templates available fits my data (they all have more than 64 >> channels and different configurations). >> >> >> I tried to use the function ft_read_sens on my data but I get the >> following error >> >> >> elec = ft_read_sens([data_filt5.mat'],'senstype','eeg'); >> >> >> Undefined function or variable 'lab'. >> >> >> Error in channelposition (line 316) >> >> n = size(lab,2); >> >> >> Error in ft_datatype_sens (line 349) >> >> [chanpos, chanori, lab] = channelposition(sens); >> >> >> Error in ft_datatype_sens (line 158) >> >> sens = ft_datatype_sens(sens, 'version', '2011v2'); >> >> >> Error in ft_read_sens (line 380) >> >> sens = ft_datatype_sens(sens); >> >> >> >> I found the cartesian coordinates of the electrodes on the Biosemi >> website, with the x y z coordinates for each electrodes (as the little >> example I'm giving below, but that's not enough. >> >> >> Channel x y >> z >> Fp1 -27.0333934563814 83.2002299946862 -3.05493522574547 >> AF7 -51.4205700085246 70.7743429000555 -3.05493522574547 >> AF3 -35.5608995849164 76.2605952593987 24.1279774030766 >> F1 -25.1195714566887 62.1731210759014 >> 56.2665567427342 >> F5 -47.7073482911603 58.9136687505812 >> 43.7676114900325 >> >> ... >> ​ ... ... ... >> >> >> >> *Do you have any suggestions on how to create a correct elec file fitting >> my data?* >> >> Any help would be highly appreciated! >> >> >> Silvia >> >> >> >> >> _______________________________________________ >> 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: pastedImage.png Type: image/png Size: 82198 bytes Desc: not available URL: From S.Homolle at donders.ru.nl Thu Jan 10 17:12:07 2019 From: S.Homolle at donders.ru.nl (=?utf-8?B?SG9tw7ZsbGUsIFMuIChTaW1vbik=?=) Date: Thu, 10 Jan 2019 16:12:07 +0000 Subject: [FieldTrip] EEG source reconstruction with template - elec file In-Reply-To: <1547132711097.19484@UGent.be> References: <1547112671759.73597@UGent.be>, , <1547132711097.19484@UGent.be> Message-ID: <1547136727937.84008@donders.ru.nl> Dear Silvia, I also can suggest you look at some of the tutorials here and here​. Especially the latter part of both tutorials deal with your current problem! Cheers, Simon Homölle PhD Candidate Donders Institute for Brain, Cognition and Behaviour Centre for Cognitive Neuroimaging Radboud University Nijmegen Phone: +31-(0)24-36-65059 ________________________________ From: fieldtrip on behalf of Silvia Formica Sent: Thursday, January 10, 2019 4:05 PM To: FieldTrip discussion list Subject: Re: [FieldTrip] EEG source reconstruction with template - elec file Dear Julian, thanks for your quick response! You are absolutely right, my problem was that I was not creating the elec file correctly as a struct with the fields chanpos, elecpos and label. I'm now facing another problem, though. I'm trying to use ft_electroderealign, but I can't seem to achieve a satisfying result. Here is what I am doing: cfg = []; cfg.method = 'headshape'; % cfg.warp = cfg.elec = elec; cfg.headshape = vol.bnd(1); elec_new = ft_electroderealign(cfg); I then try to plot overlaid the skin surface as loaded from 'standard_skin_14038.vol' and the new electrode location but I get inconsistent results, the electrodes are always inside the head. I tried different warping methods without success. This is the closest I managed to get: [cid:809f04f6-d9d9-4e7d-b722-79f7a535c0fd] Do you have any recommendation on how to better align the electrodes to the template? Thanks! Silvia ________________________________ From: fieldtrip on behalf of Julian Keil Sent: 10 January 2019 11:58 To: FieldTrip discussion list Subject: Re: [FieldTrip] EEG source reconstruction with template - elec file Dear Silvia, how is the electrode location information from the BioSemi website not enough? Basically, you can create your own electrode definition by giving the labels and locations to a structure, e.g. elec.label{1} = 'Fp1'; elec.chanpos(1,:) = [-27.0333934563814, 83.2002299946862, -3.05493522574547]; or for all your electrodes in one go: elec.label = {'Fp1','AF7','AF3','F1','F5'}; elec.chanpos = [-27.0333934563814, 83.2002299946862, -3.05493522574547;... -51.4205700085246, 70.7743429000555, -3.05493522574547;... -35.5608995849164, 76.2605952593987, 24.1279774030766;... -25.1195714566887, 62.1731210759014, 56.2665567427342;... -47.7073482911603, 58.9136687505812, 43.7676114900325]; plot3(elec.chanpos(:,1),elec.chanpos(:,2),elec.chanpos(:,3),'*') or of course read them more elegantly from a text file ;-) It might be a good idea to double check the alignment with the template headmodel afterwards using ft_electroderealign You can then use this elec structure in all subsequent analyses. I hope that helps, Julian On Thu, Jan 10, 2019 at 10:59 AM Silvia Formica > wrote: Dear all, I have a EEG dataset, collected with a Biosemi system with 64 channels. I don't have the individual anatomical data for each participant, but I want to perform source reconstruction to have at least a rough localization of the activation I find. Therefore, I intend to use the templates provided by fieldtrip. If I understand correctly, independently of the source modelling technique that I will choose to use, I need the following information: 1) the head model : this would be the template 'standard_bem' 2) the source model : the template 'cortex_5124.surf.gii' 3) the elec information :​ this file should describe the spatial configuration of the electrodes, but I can't retrieve it. I don't think any of the templates available fits my data (they all have more than 64 channels and different configurations). I tried to use the function ft_read_sens on my data but I get the following error elec = ft_read_sens([data_filt5.mat'],'senstype','eeg'); Undefined function or variable 'lab'. Error in channelposition (line 316) n = size(lab,2); Error in ft_datatype_sens (line 349) [chanpos, chanori, lab] = channelposition(sens); Error in ft_datatype_sens (line 158) sens = ft_datatype_sens(sens, 'version', '2011v2'); Error in ft_read_sens (line 380) sens = ft_datatype_sens(sens); I found the cartesian coordinates of the electrodes on the Biosemi website, with the x y z coordinates for each electrodes (as the little example I'm giving below, but that's not enough. Channel x y z Fp1 -27.0333934563814 83.2002299946862 -3.05493522574547 AF7 -51.4205700085246 70.7743429000555 -3.05493522574547 AF3 -35.5608995849164 76.2605952593987 24.1279774030766 F1 -25.1195714566887 62.1731210759014 56.2665567427342 F5 -47.7073482911603 58.9136687505812 43.7676114900325 ... ​ ... ... ... Do you have any suggestions on how to create a correct elec file fitting my data? Any help would be highly appreciated! Silvia _______________________________________________ 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: pastedImage.png Type: image/png Size: 82198 bytes Desc: pastedImage.png URL: From michel at cbs.mpg.de Thu Jan 10 17:47:29 2019 From: michel at cbs.mpg.de (Christine Michel) Date: Thu, 10 Jan 2019 17:47:29 +0100 Subject: [FieldTrip] change the color of artifacts - databrowser Message-ID: Dear fieldtrip experts, My colleagues and I are using the fieldtrip data browser to show artifacts marked via a threshold criterion or via visual inspection. It all works very well. However, we find the colors marking the artifacts (the light red and the light lila) very light. It is therefore hard for us to spot and to detect marked artifacts, especially when the marked segments are short. Is there any way I can change the color or the brightness of the color marking the artifacts either in the browser itself or via a config variable? Or could you add such a config variable? This would help us lots!! Thank you Christine Michel From carsten.wolters at uni-muenster.de Thu Jan 10 15:52:14 2019 From: carsten.wolters at uni-muenster.de (Carsten Wolters) Date: Thu, 10 Jan 2019 15:52:14 +0100 Subject: [FieldTrip] ChildBrain conference in Leuven/Belgium, February 5-7, 2019 Message-ID: Dear colleagues, please see the announcement for the upcoming ChildBrain conference below. Please also forward it to those that might be interested to participate. I apologize for multiple postings. BR Carsten Wolters ****************************** *The Childbrain Conference* *Leuven, Belgium 5 - 7 Febuary, 2019* We are pleased to invite you to the "ChildBrain Conference" organized by ChildBrain Marie Skłodowska-Curie Action (MSCA) Innovative Training Network (ITN), that will be held from 5 until 7 February 2019, at KU Leuven, in Leuven, Belgium. This conference is about research on children’s brain in typical development and brain disorders, specifically on results based on recent neuroimaging methods combining modalities as electroencephalography (EEG), magnetoencephalography (MEG) and magnetic resonance imaging (MRI). At the conference, invited speakers and researchers from ChildBrain will give presentations in four main sessions: atypical neurodevelopment, typical neurodevelopment, methodological advances for pediatric neuroimaging and future perspectives. There is also the possibility to attend a pre-conference session in which a methodological demonstration is given on the acquisition and application of head models in children brain data We aim at calling together researchers and students from various domains such as language and audition, as well as mathematics, physics and engineering to build bridges between applications and methodology and share this common and exciting interest on child brain development. For participants to the conference, there is the opportunity to share your work in a poster session and/or as a selected speaker. If you wish to present at the Childbrain Conference, you are invited to send an abstract. *You can submit your abstract and register **here **. The abstract submission deadline is on 14 January 2019 at 23:59 CET. You can view our detailed **schedule ** for further information.* -- Prof. Dr.rer.nat. Carsten H. Wolters University of Münster Institute for Biomagnetism and Biosignalanalysis Malmedyweg 15 48149 Münster, Germany Phone: +49 (0)251 83 56904 +49 (0)251 83 56865 (secr.) Fax: +49 (0)251 83 56874 Email: carsten.wolters at uni-muenster.de Web: https://campus.uni-muenster.de/biomag/das-institut/mitarbeiter/carsten-wolters/ -------------- next part -------------- An HTML attachment was scrubbed... URL: From brookshire at uchicago.edu Thu Jan 10 18:13:06 2019 From: brookshire at uchicago.edu (Geoff Brookshire) Date: Thu, 10 Jan 2019 17:13:06 +0000 Subject: [FieldTrip] change the color of artifacts - databrowser In-Reply-To: <8ed5cbadf23c4e809ea3acf1577c05f8@BN6PR11MB1394.namprd11.prod.outlook.com> References: <8ed5cbadf23c4e809ea3acf1577c05f8@BN6PR11MB1394.namprd11.prod.outlook.com> Message-ID: Hi Christine, You can make the tagged artifacts darker by adding this line before you call ft_databrowser: cfg.artifactalpha = 0.5; cheers, geoff On Thu, Jan 10, 2019 at 4:50 PM Christine Michel wrote: > Dear fieldtrip experts, > > My colleagues and I are using the fieldtrip data browser to show > artifacts marked via a threshold criterion or via visual inspection. It > all works very well. However, we find the colors marking the artifacts > (the light red and the light lila) very light. It is therefore hard for > us to spot and to detect marked artifacts, especially when the marked > segments are short. > > Is there any way I can change the color or the brightness of the color > marking the artifacts either in the browser itself or via a config > variable? Or could you add such a config variable? This would help us > lots!! > > Thank you > > Christine Michel > > > _______________________________________________ > 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 stephen.whitmarsh at gmail.com Thu Jan 10 18:28:39 2019 From: stephen.whitmarsh at gmail.com (Stephen Whitmarsh) Date: Thu, 10 Jan 2019 18:28:39 +0100 Subject: [FieldTrip] change the color of artifacts - databrowser In-Reply-To: References: Message-ID: Dear Christine, Take a look at line 631 (opt.artifactcolors) of ft_databrowser. Edit it to you hearts content! Cheers, Stephen On Thu, 10 Jan 2019 at 18:13, Christine Michel wrote: > Dear fieldtrip experts, > > My colleagues and I are using the fieldtrip data browser to show > artifacts marked via a threshold criterion or via visual inspection. It > all works very well. However, we find the colors marking the artifacts > (the light red and the light lila) very light. It is therefore hard for > us to spot and to detect marked artifacts, especially when the marked > segments are short. > > Is there any way I can change the color or the brightness of the color > marking the artifacts either in the browser itself or via a config > variable? Or could you add such a config variable? This would help us > lots!! > > Thank you > > Christine Michel > > > _______________________________________________ > 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 stephen.whitmarsh at gmail.com Thu Jan 10 18:33:54 2019 From: stephen.whitmarsh at gmail.com (Stephen Whitmarsh) Date: Thu, 10 Jan 2019 18:33:54 +0100 Subject: [FieldTrip] change the color of artifacts - databrowser In-Reply-To: References: <8ed5cbadf23c4e809ea3acf1577c05f8@BN6PR11MB1394.namprd11.prod.outlook.com> Message-ID: <0c2e01d4a90a$a8a9bb90$f9fd32b0$@gmail.com> Ah, my mistake. Thanks Geoff, Stephen From: fieldtrip On Behalf Of Geoff Brookshire Sent: Thursday, January 10, 2019 6:13 PM To: FieldTrip discussion list Subject: Re: [FieldTrip] change the color of artifacts - databrowser Hi Christine, You can make the tagged artifacts darker by adding this line before you call ft_databrowser: cfg.artifactalpha = 0.5; cheers, geoff On Thu, Jan 10, 2019 at 4:50 PM Christine Michel > wrote: Dear fieldtrip experts, My colleagues and I are using the fieldtrip data browser to show artifacts marked via a threshold criterion or via visual inspection. It all works very well. However, we find the colors marking the artifacts (the light red and the light lila) very light. It is therefore hard for us to spot and to detect marked artifacts, especially when the marked segments are short. Is there any way I can change the color or the brightness of the color marking the artifacts either in the browser itself or via a config variable? Or could you add such a config variable? This would help us lots!! Thank you Christine Michel _______________________________________________ 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 michel at cbs.mpg.de Fri Jan 11 11:17:05 2019 From: michel at cbs.mpg.de (Christine Michel) Date: Fri, 11 Jan 2019 11:17:05 +0100 Subject: [FieldTrip] change the color of artifacts - databrowser Message-ID: Dear Geoff and Stephen, thanks a lot for the helpful replies - it worked absolutely fine! :-) Christine -- Dr. Christine Michel Max Planck Research Group on Early Social Cognition Max Planck Institute for Human Cognitive and Brain Sciences Stephanstr. 1A 04103 Leipzig Germany phone: +49 341 9940 2468 From jack.reeves at nih.gov Fri Jan 11 17:43:49 2019 From: jack.reeves at nih.gov (Reeves, Jack (NIH/NINDS) [F]) Date: Fri, 11 Jan 2019 16:43:49 +0000 Subject: [FieldTrip] Alignment error with Fieldtrip source localization Message-ID: Hello- I am trying to source localize TMS-EEG data using the Fieldtrip tutorials in the links below. I am able to run all of the steps, but the headmodel and the freesurfer-processed sourcemodel are misaligned at the end. There are some pictures below which show the issue. The issue is the same for all subjects I try to process. Does anyone have any idea what could be causing this issue? I can send additional information or my scripts if needed. http://www.fieldtriptoolbox.org/tutorial/headmodel_meg/ http://www.fieldtriptoolbox.org/tutorial/sourcemodel/ http://www.fieldtriptoolbox.org/tutorial/minimumnormestimate/ [cid:image001.png at 01D4A9A1.8670B870][cid:image002.png at 01D4A9A1.8670B870] Thanks, Jack Reeves -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image001.png Type: image/png Size: 34966 bytes Desc: image001.png URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image002.png Type: image/png Size: 27668 bytes Desc: image002.png URL: From vale.nasato at gmail.com Sun Jan 13 16:45:35 2019 From: vale.nasato at gmail.com (Valentina Nasato) Date: Sun, 13 Jan 2019 16:45:35 +0100 Subject: [FieldTrip] Help: sourceanalysis Message-ID: <5c3b5d1f.1c69fb81.9d9a6.0a5b@mx.google.com> Good evening everyone, through the fieldtrip toolbox I solved the direct problem using the FEM method for EEG data. The EEG data are in resting state. Now I have to implement the indirect problem but on the tutorial there is no guide. How should I implement fieldtrip sourceanalysis? I have the sourcemodel, headmodel, leadfield and covariance matrix. I calculated the covariance matrix directly in Matlab. My problem now is to understand how to calculate the average of the EEG data to be given as input to the sourceanalysis. How to calculate an average of resting state data ? thanks Inviato da Posta per Windows 10 -------------- next part -------------- An HTML attachment was scrubbed... URL: From athina.tz at gmail.com Mon Jan 14 07:07:22 2019 From: athina.tz at gmail.com (Athina Tzovara) Date: Sun, 13 Jan 2019 22:07:22 -0800 Subject: [FieldTrip] Announcement for 2 PhD positions Message-ID: Dear all, Applications are invited for 2 PhD students in machine learning & computational neuroscience at the University of Bern, Switzerland. The research focus will be on using machine learning techniques to model electrophysiological data related to epilepsy and consciousness research. The positions will be part of a newly formed group between the Institute of Computer Science and Faculty of Medicine at the University of Bern and will be funded by the Interfaculty Research Cooperation (IRC) project on sleep research. The successful applicants will have the opportunity to work at the intersection of computational and clinical research in neuroscience. They will have access to scalp and intracranial electroencephalography (EEG) data and will get hands-on experience with data analysis and computational techniques. The ideal candidates should have a Master of Science or an equivalent degree in neuroscience, biomedical engineering, computer science, or a related discipline. Prior experience with EEG, machine learning or deep learning are advantageous. Funding is available for 3 years (with evaluation after 1 year) according to Swiss regulations. If you are interested please send one pdf document including your CV, a brief statement of research interests, and the contact details of two references to: athina.tz at gmail.com. Informal inquiries are welcome. Best wishes, Athina Tzovara ----- Athina Tzovara, PhD Helen Wills Neuroscience Institute Knight Cognitive Neuroscience Lab University of California Berkeley Web: https://aath0.github.io/ Tel: +1-510-944-4302 -------------- next part -------------- An HTML attachment was scrubbed... URL: From popwatson at hotmail.com Mon Jan 14 10:03:59 2019 From: popwatson at hotmail.com (Poppy Watson) Date: Mon, 14 Jan 2019 09:03:59 +0000 Subject: [FieldTrip] Identifying bad channels Message-ID: Dear fieldtrippers, I’m following our lab protocol for pre-processing of EEG data – but implementing it in Fieldtrip rather than Brain Vision Analyzer. So far things are great. However, I’m going back to preprocessing stage because ideally I would like to stick as closely to the procedure we use for automated artifact/channel rejection in BVA but am wondering about the most efficient way to implement this in fieldtrip. What I have done in fieldtrip is: 1. Remove channels that were marked as bad during recording and interpolated them. 2. After lots of playing around, find zvalue cutoff settings that I’m comfortable with and use the same settings on every participant for jump artifacts, muscle artifacts and eye movements and remove these using ft_rejectartifact (conservative but easily replicable). 3. I then quickly scrolled through each trial using ft_rejectvisual to make sure all channels looked ok – any really messy noisy channels I then made a note of and repeated steps 1 and 2 above. I’m not happy with this step 3 however, because it is quite subjective. The way that we identify bad channels in BVA which I would ultimately like to implement is: 1. Mark trials as bad where a channel is present that has: a. Low activity of less than 0.5 microvolts in any 100ms interval b. Noisy activity where the absolute max-min voltage in any 200ms interval is greater than 200 microvolts (sometimes this is 100Uv depends on expected motor activity in paradigm). 2. Identify, for every channel, the percentage of data that is being marked as bad – if this is higher than a given threshold (i.e. 25%), then remove the channel and/or interpolate. 3. Rerun step 1 and remove bad trials. What I am planning to do in Fieldtrip, but would appreciate some input from those more experienced is: 1. Remove trials with eyeblinks etc using the Fieldtrip methods described above 2. Split each trial segment into 100ms or 200ms intervals 3. Calculate the max-min per channel in order to identify intervals that have low voltage or noisy activity etc as per a and b above 4. Keep track of the proportion of trials/intervals that any given channel is identified as bad so that I can remove those channels that are above a threshold (i.e. 25%). Is there a more efficient way to implement something like this? Am I missing out on a great Fieldtrip tool? Please advise Thanks --------------------------------------------------------------------- Poppy Watson --------------------------------------------------------------------- -------------- next part -------------- An HTML attachment was scrubbed... URL: From e.spaak at donders.ru.nl Mon Jan 14 10:29:18 2019 From: e.spaak at donders.ru.nl (Eelke Spaak) Date: Mon, 14 Jan 2019 10:29:18 +0100 Subject: [FieldTrip] Help: sourceanalysis In-Reply-To: <5c3b5d1f.1c69fb81.9d9a6.0a5b@mx.google.com> References: <5c3b5d1f.1c69fb81.9d9a6.0a5b@mx.google.com> Message-ID: Hi Valentina, The computation of the beamformer spatial filter only uses the covariance matrix, and does not use the average data itself. Since you have the covariance matrix computed "manually", you should be able to wrap it in a FieldTrip-style timelock structure: tl = []; tl.cov = cov; and put some zeroes of appropriate size in tl.avg. Then, make sure to use cfg.lcmv.keepfilter = 'yes' in the call to ft_sourceanalysis, and get the filters out from the resulting source structure. (Note that the dipole moments in the source structure will be meaningless since the avg data was fake; but the filters are still meaningful.) After that, simply multiply your sensor-level resting state data with the spatial filters to get the source time courses. I hope that helps. (If you have no idea what I'm talking about, then it's probably a good idea to go through some tutorials and examples (including about so-called "virtual channels") anyway using event-related fields before attempting this on resting state data.) Cheers, Eelke On Sun, 13 Jan 2019 at 16:45, Valentina Nasato wrote: > > Good evening everyone, > > through the fieldtrip toolbox I solved the direct problem using the FEM method for EEG data. The EEG data are in resting state. Now I have to implement the indirect problem but on the tutorial there is no guide. How should I implement fieldtrip sourceanalysis? I have the sourcemodel, headmodel, leadfield and covariance matrix. I calculated the covariance matrix directly in Matlab. My problem now is to understand how to calculate the average of the EEG data to be given as input to the sourceanalysis. How to calculate an average of resting state data ? > > thanks > > > > > > Inviato da Posta per Windows 10 > > > > _______________________________________________ > fieldtrip mailing list > https://mailman.science.ru.nl/mailman/listinfo/fieldtrip > https://doi.org/10.1371/journal.pcbi.1002202 From Silvia.Formica at UGent.be Mon Jan 14 10:39:17 2019 From: Silvia.Formica at UGent.be (Silvia Formica) Date: Mon, 14 Jan 2019 09:39:17 +0000 Subject: [FieldTrip] EEG source reconstruction with template - elec file In-Reply-To: <1547136727937.84008@donders.ru.nl> References: <1547112671759.73597@UGent.be>, , <1547132711097.19484@UGent.be>,<1547136727937.84008@donders.ru.nl> Message-ID: <1547458759308.35828@UGent.be> Thank you all for your very useful contributions! I noticed that in my case the method "project" gives nice results, so I'm currently using that one. Cheers, Silvia ________________________________ From: fieldtrip on behalf of Homölle, S. (Simon) Sent: 10 January 2019 17:12 To: FieldTrip discussion list Subject: Re: [FieldTrip] EEG source reconstruction with template - elec file Dear Silvia, I also can suggest you look at some of the tutorials here and here​. Especially the latter part of both tutorials deal with your current problem! Cheers, Simon Homölle PhD Candidate Donders Institute for Brain, Cognition and Behaviour Centre for Cognitive Neuroimaging Radboud University Nijmegen Phone: +31-(0)24-36-65059 ________________________________ From: fieldtrip on behalf of Silvia Formica Sent: Thursday, January 10, 2019 4:05 PM To: FieldTrip discussion list Subject: Re: [FieldTrip] EEG source reconstruction with template - elec file Dear Julian, thanks for your quick response! You are absolutely right, my problem was that I was not creating the elec file correctly as a struct with the fields chanpos, elecpos and label. I'm now facing another problem, though. I'm trying to use ft_electroderealign, but I can't seem to achieve a satisfying result. Here is what I am doing: cfg = []; cfg.method = 'headshape'; % cfg.warp = cfg.elec = elec; cfg.headshape = vol.bnd(1); elec_new = ft_electroderealign(cfg); I then try to plot overlaid the skin surface as loaded from 'standard_skin_14038.vol' and the new electrode location but I get inconsistent results, the electrodes are always inside the head. I tried different warping methods without success. This is the closest I managed to get: [cid:809f04f6-d9d9-4e7d-b722-79f7a535c0fd] Do you have any recommendation on how to better align the electrodes to the template? Thanks! Silvia ________________________________ From: fieldtrip on behalf of Julian Keil Sent: 10 January 2019 11:58 To: FieldTrip discussion list Subject: Re: [FieldTrip] EEG source reconstruction with template - elec file Dear Silvia, how is the electrode location information from the BioSemi website not enough? Basically, you can create your own electrode definition by giving the labels and locations to a structure, e.g. elec.label{1} = 'Fp1'; elec.chanpos(1,:) = [-27.0333934563814, 83.2002299946862, -3.05493522574547]; or for all your electrodes in one go: elec.label = {'Fp1','AF7','AF3','F1','F5'}; elec.chanpos = [-27.0333934563814, 83.2002299946862, -3.05493522574547;... -51.4205700085246, 70.7743429000555, -3.05493522574547;... -35.5608995849164, 76.2605952593987, 24.1279774030766;... -25.1195714566887, 62.1731210759014, 56.2665567427342;... -47.7073482911603, 58.9136687505812, 43.7676114900325]; plot3(elec.chanpos(:,1),elec.chanpos(:,2),elec.chanpos(:,3),'*') or of course read them more elegantly from a text file ;-) It might be a good idea to double check the alignment with the template headmodel afterwards using ft_electroderealign You can then use this elec structure in all subsequent analyses. I hope that helps, Julian On Thu, Jan 10, 2019 at 10:59 AM Silvia Formica > wrote: Dear all, I have a EEG dataset, collected with a Biosemi system with 64 channels. I don't have the individual anatomical data for each participant, but I want to perform source reconstruction to have at least a rough localization of the activation I find. Therefore, I intend to use the templates provided by fieldtrip. If I understand correctly, independently of the source modelling technique that I will choose to use, I need the following information: 1) the head model : this would be the template 'standard_bem' 2) the source model : the template 'cortex_5124.surf.gii' 3) the elec information :​ this file should describe the spatial configuration of the electrodes, but I can't retrieve it. I don't think any of the templates available fits my data (they all have more than 64 channels and different configurations). I tried to use the function ft_read_sens on my data but I get the following error elec = ft_read_sens([data_filt5.mat'],'senstype','eeg'); Undefined function or variable 'lab'. Error in channelposition (line 316) n = size(lab,2); Error in ft_datatype_sens (line 349) [chanpos, chanori, lab] = channelposition(sens); Error in ft_datatype_sens (line 158) sens = ft_datatype_sens(sens, 'version', '2011v2'); Error in ft_read_sens (line 380) sens = ft_datatype_sens(sens); I found the cartesian coordinates of the electrodes on the Biosemi website, with the x y z coordinates for each electrodes (as the little example I'm giving below, but that's not enough. Channel x y z Fp1 -27.0333934563814 83.2002299946862 -3.05493522574547 AF7 -51.4205700085246 70.7743429000555 -3.05493522574547 AF3 -35.5608995849164 76.2605952593987 24.1279774030766 F1 -25.1195714566887 62.1731210759014 56.2665567427342 F5 -47.7073482911603 58.9136687505812 43.7676114900325 ... ​ ... ... ... Do you have any suggestions on how to create a correct elec file fitting my data? Any help would be highly appreciated! Silvia _______________________________________________ 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: pastedImage.png Type: image/png Size: 82198 bytes Desc: pastedImage.png URL: From elene.beitia at alumni.mondragon.edu Mon Jan 14 10:52:04 2019 From: elene.beitia at alumni.mondragon.edu (Elene Beitia Loinaz) Date: Mon, 14 Jan 2019 10:52:04 +0100 Subject: [FieldTrip] Source reconstructions Message-ID: Dear fieldtripers, I am tryng to visualize the electrodes and the headmodel at the same time. The problem that I have is that I need to reescale one of them. I have tried to function ft_convert_units, but I just obtain the image attached. The structure of the information are the next ones, *headmodel:* bnd: [1×3 struct] cond: [0.3300 0.0041 0.3300] mat: [3000×3000 double] type: 'dipoli' unit: 'mm' *electrodes:* pnt: [133×3 double] label: {1×133 cell} Code that I have used to obtained the image below: ft_determine_coordsys (vol, 'interactive','no') figure; sens=data.elec; sens=ft_convert_units(sens, 'cm'); ft_plot_vol(vol,'facecolor','skin','edgecolor','none') ft_plot_sens(sens,'elecsize',10) camlight alpha 0.5 If somebody could help my I would be very grateful, Elene [image: image.png] -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image.png Type: image/png Size: 78865 bytes Desc: not available URL: From dlozanosoldevilla at gmail.com Mon Jan 14 11:19:36 2019 From: dlozanosoldevilla at gmail.com (Diego Lozano-Soldevilla) Date: Mon, 14 Jan 2019 11:19:36 +0100 Subject: [FieldTrip] Source reconstructions In-Reply-To: References: Message-ID: Dear Elene Please make sure the units of your headmodel (mm in your case) and sensors (cm) are the same. Best Diego On Mon, 14 Jan 2019 at 11:17, Elene Beitia Loinaz < elene.beitia at alumni.mondragon.edu> wrote: > Dear fieldtripers, > > I am tryng to visualize the electrodes and the headmodel at the same time. > The problem that I have is that I need to reescale one of them. > > I have tried to function ft_convert_units, but I just obtain the image > attached. > > The structure of the information are the next ones, > *headmodel:* > bnd: [1×3 struct] > cond: [0.3300 0.0041 0.3300] > mat: [3000×3000 double] > type: 'dipoli' > unit: 'mm' > *electrodes:* > pnt: [133×3 double] > label: {1×133 cell} > > Code that I have used to obtained the image below: > ft_determine_coordsys (vol, 'interactive','no') > > > figure; > sens=data.elec; > sens=ft_convert_units(sens, 'cm'); > ft_plot_vol(vol,'facecolor','skin','edgecolor','none') > ft_plot_sens(sens,'elecsize',10) > camlight > alpha 0.5 > > If somebody could help my I would be very grateful, > > Elene > > > [image: image.png] > _______________________________________________ > 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 S.Homolle at donders.ru.nl Mon Jan 14 11:24:47 2019 From: S.Homolle at donders.ru.nl (=?utf-8?B?SG9tw7ZsbGUsIFMuIChTaW1vbik=?=) Date: Mon, 14 Jan 2019 10:24:47 +0000 Subject: [FieldTrip] EEG source reconstruction with template - elec file In-Reply-To: <1547458759308.35828@UGent.be> References: <1547112671759.73597@UGent.be>, , <1547132711097.19484@UGent.be>, <1547136727937.84008@donders.ru.nl>, <1547458759308.35828@UGent.be> Message-ID: <1547461487128.16656@donders.ru.nl> Dear Silvia, So in general before considering the method "project", the electrodes need to be quite close to the head surface to yield reasonable results. In the email you sent earlier you see the electrode position around Cz are quite far away from the head. The method "project" works in such a way that it tries to find the closest surface point for each electrode, and then projects it onto that spot. Therefore, for electrodes that are far away from the head surface unexpected projections can happen. So what I suggest to is that before you use "project", you should use the method "interactive" to improve the electrode positions in such a way that the electrodes have a better alignment to the head surface. Cheers, Simon Homölle PhD Candidate Donders Institute for Brain, Cognition and Behaviour Centre for Cognitive Neuroimaging Radboud University Nijmegen Phone: +31-(0)24-36-65059 ________________________________ From: fieldtrip on behalf of Silvia Formica Sent: Monday, January 14, 2019 10:39 AM To: FieldTrip discussion list Subject: Re: [FieldTrip] EEG source reconstruction with template - elec file Thank you all for your very useful contributions! I noticed that in my case the method "project" gives nice results, so I'm currently using that one. Cheers, Silvia ________________________________ From: fieldtrip on behalf of Homölle, S. (Simon) Sent: 10 January 2019 17:12 To: FieldTrip discussion list Subject: Re: [FieldTrip] EEG source reconstruction with template - elec file Dear Silvia, I also can suggest you look at some of the tutorials here and here​. Especially the latter part of both tutorials deal with your current problem! Cheers, Simon Homölle PhD Candidate Donders Institute for Brain, Cognition and Behaviour Centre for Cognitive Neuroimaging Radboud University Nijmegen Phone: +31-(0)24-36-65059 ________________________________ From: fieldtrip on behalf of Silvia Formica Sent: Thursday, January 10, 2019 4:05 PM To: FieldTrip discussion list Subject: Re: [FieldTrip] EEG source reconstruction with template - elec file Dear Julian, thanks for your quick response! You are absolutely right, my problem was that I was not creating the elec file correctly as a struct with the fields chanpos, elecpos and label. I'm now facing another problem, though. I'm trying to use ft_electroderealign, but I can't seem to achieve a satisfying result. Here is what I am doing: cfg = []; cfg.method = 'headshape'; % cfg.warp = cfg.elec = elec; cfg.headshape = vol.bnd(1); elec_new = ft_electroderealign(cfg); I then try to plot overlaid the skin surface as loaded from 'standard_skin_14038.vol' and the new electrode location but I get inconsistent results, the electrodes are always inside the head. I tried different warping methods without success. This is the closest I managed to get: [cid:809f04f6-d9d9-4e7d-b722-79f7a535c0fd] Do you have any recommendation on how to better align the electrodes to the template? Thanks! Silvia ________________________________ From: fieldtrip on behalf of Julian Keil Sent: 10 January 2019 11:58 To: FieldTrip discussion list Subject: Re: [FieldTrip] EEG source reconstruction with template - elec file Dear Silvia, how is the electrode location information from the BioSemi website not enough? Basically, you can create your own electrode definition by giving the labels and locations to a structure, e.g. elec.label{1} = 'Fp1'; elec.chanpos(1,:) = [-27.0333934563814, 83.2002299946862, -3.05493522574547]; or for all your electrodes in one go: elec.label = {'Fp1','AF7','AF3','F1','F5'}; elec.chanpos = [-27.0333934563814, 83.2002299946862, -3.05493522574547;... -51.4205700085246, 70.7743429000555, -3.05493522574547;... -35.5608995849164, 76.2605952593987, 24.1279774030766;... -25.1195714566887, 62.1731210759014, 56.2665567427342;... -47.7073482911603, 58.9136687505812, 43.7676114900325]; plot3(elec.chanpos(:,1),elec.chanpos(:,2),elec.chanpos(:,3),'*') or of course read them more elegantly from a text file ;-) It might be a good idea to double check the alignment with the template headmodel afterwards using ft_electroderealign You can then use this elec structure in all subsequent analyses. I hope that helps, Julian On Thu, Jan 10, 2019 at 10:59 AM Silvia Formica > wrote: Dear all, I have a EEG dataset, collected with a Biosemi system with 64 channels. I don't have the individual anatomical data for each participant, but I want to perform source reconstruction to have at least a rough localization of the activation I find. Therefore, I intend to use the templates provided by fieldtrip. If I understand correctly, independently of the source modelling technique that I will choose to use, I need the following information: 1) the head model : this would be the template 'standard_bem' 2) the source model : the template 'cortex_5124.surf.gii' 3) the elec information :​ this file should describe the spatial configuration of the electrodes, but I can't retrieve it. I don't think any of the templates available fits my data (they all have more than 64 channels and different configurations). I tried to use the function ft_read_sens on my data but I get the following error elec = ft_read_sens([data_filt5.mat'],'senstype','eeg'); Undefined function or variable 'lab'. Error in channelposition (line 316) n = size(lab,2); Error in ft_datatype_sens (line 349) [chanpos, chanori, lab] = channelposition(sens); Error in ft_datatype_sens (line 158) sens = ft_datatype_sens(sens, 'version', '2011v2'); Error in ft_read_sens (line 380) sens = ft_datatype_sens(sens); I found the cartesian coordinates of the electrodes on the Biosemi website, with the x y z coordinates for each electrodes (as the little example I'm giving below, but that's not enough. Channel x y z Fp1 -27.0333934563814 83.2002299946862 -3.05493522574547 AF7 -51.4205700085246 70.7743429000555 -3.05493522574547 AF3 -35.5608995849164 76.2605952593987 24.1279774030766 F1 -25.1195714566887 62.1731210759014 56.2665567427342 F5 -47.7073482911603 58.9136687505812 43.7676114900325 ... ​ ... ... ... Do you have any suggestions on how to create a correct elec file fitting my data? Any help would be highly appreciated! Silvia _______________________________________________ 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: pastedImage.png Type: image/png Size: 82198 bytes Desc: pastedImage.png URL: From elene.beitia at alumni.mondragon.edu Mon Jan 14 11:25:11 2019 From: elene.beitia at alumni.mondragon.edu (Elene Beitia Loinaz) Date: Mon, 14 Jan 2019 11:25:11 +0100 Subject: [FieldTrip] Source reconstructions In-Reply-To: References: Message-ID: Thank you Diego, I already know that. But if I put it in 'mm' it is even smaller, that is way I put in 'cm'. As I have writen above the structure of the electrodes does not have units, I think that the problem is there. *electrodes:* pnt: [133×3 double] label: {1×133 cell} If someone could help me to obtain the same size for the electrodes and for the headmodel I would be very grateful, Elene. Hau idatzi du Diego Lozano-Soldevilla (dlozanosoldevilla at gmail.com) erabiltzaileak (2019 urt. 14, al. (11:19)): > Dear Elene > Please make sure the units of your headmodel (mm in your case) and sensors > (cm) are the same. > Best > Diego > > On Mon, 14 Jan 2019 at 11:17, Elene Beitia Loinaz < > elene.beitia at alumni.mondragon.edu> wrote: > >> Dear fieldtripers, >> >> I am tryng to visualize the electrodes and the headmodel at the same >> time. The problem that I have is that I need to reescale one of them. >> >> I have tried to function ft_convert_units, but I just obtain the image >> attached. >> >> The structure of the information are the next ones, >> *headmodel:* >> bnd: [1×3 struct] >> cond: [0.3300 0.0041 0.3300] >> mat: [3000×3000 double] >> type: 'dipoli' >> unit: 'mm' >> *electrodes:* >> pnt: [133×3 double] >> label: {1×133 cell} >> >> Code that I have used to obtained the image below: >> ft_determine_coordsys (vol, 'interactive','no') >> >> >> figure; >> sens=data.elec; >> sens=ft_convert_units(sens, 'cm'); >> ft_plot_vol(vol,'facecolor','skin','edgecolor','none') >> ft_plot_sens(sens,'elecsize',10) >> camlight >> alpha 0.5 >> >> If somebody could help my I would be very grateful, >> >> Elene >> >> >> [image: image.png] >> _______________________________________________ >> 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 S.Homolle at donders.ru.nl Mon Jan 14 11:36:02 2019 From: S.Homolle at donders.ru.nl (=?iso-8859-1?Q?Hom=F6lle=2C_S=2E_=28Simon=29?=) Date: Mon, 14 Jan 2019 10:36:02 +0000 Subject: [FieldTrip] Source reconstructions In-Reply-To: References: Message-ID: <1547462162221.35460@donders.ru.nl> Dear Elene, Looking at the structure of "electrodes", I see that there is no information about the units. Do you know in which unit this electrodes are expressed? How did you generate this structure? If I see correctly in the code ft_plot_sens assumes "mm" if no unit is specified. This means your electrode structure is not expressed in mm. As the unit information is missing, ft_convert_units will not work on your electrodes. So you should add this information to the structure, and then you would be able to use ft_convert_units. Hope this resolves your issue! Cheers Simon Homölle PhD Candidate Donders Institute for Brain, Cognition and Behaviour Centre for Cognitive Neuroimaging Radboud University Nijmegen Phone: +31-(0)24-36-65059 ________________________________ From: fieldtrip on behalf of Elene Beitia Loinaz Sent: Monday, January 14, 2019 10:52 AM To: FieldTrip discussion list Subject: [FieldTrip] Source reconstructions Dear fieldtripers, I am tryng to visualize the electrodes and the headmodel at the same time. The problem that I have is that I need to reescale one of them. I have tried to function ft_convert_units, but I just obtain the image attached. The structure of the information are the next ones, headmodel: bnd: [1×3 struct] cond: [0.3300 0.0041 0.3300] mat: [3000×3000 double] type: 'dipoli' unit: 'mm' electrodes: pnt: [133×3 double] label: {1×133 cell} Code that I have used to obtained the image below: ft_determine_coordsys (vol, 'interactive','no') figure; sens=data.elec; sens=ft_convert_units(sens, 'cm'); ft_plot_vol(vol,'facecolor','skin','edgecolor','none') ft_plot_sens(sens,'elecsize',10) camlight alpha 0.5 If somebody could help my I would be very grateful, Elene [image.png] -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image.png Type: image/png Size: 78865 bytes Desc: image.png URL: From e.spaak at donders.ru.nl Mon Jan 14 11:54:55 2019 From: e.spaak at donders.ru.nl (Eelke Spaak) Date: Mon, 14 Jan 2019 11:54:55 +0100 Subject: [FieldTrip] Source reconstructions In-Reply-To: References: Message-ID: Perhaps a stupid question but have you also tried sens = ft_convert_units(sens, 'mm')? Eelke On Mon, 14 Jan 2019 at 10:52, Elene Beitia Loinaz wrote: > > Dear fieldtripers, > > I am tryng to visualize the electrodes and the headmodel at the same time. The problem that I have is that I need to reescale one of them. > > I have tried to function ft_convert_units, but I just obtain the image attached. > > The structure of the information are the next ones, > headmodel: > bnd: [1×3 struct] > cond: [0.3300 0.0041 0.3300] > mat: [3000×3000 double] > type: 'dipoli' > unit: 'mm' > electrodes: > pnt: [133×3 double] > label: {1×133 cell} > > Code that I have used to obtained the image below: > ft_determine_coordsys (vol, 'interactive','no') > > > figure; > sens=data.elec; > sens=ft_convert_units(sens, 'cm'); > ft_plot_vol(vol,'facecolor','skin','edgecolor','none') > ft_plot_sens(sens,'elecsize',10) > camlight > alpha 0.5 > > If somebody could help my I would be very grateful, > > Elene > > > > _______________________________________________ > fieldtrip mailing list > https://mailman.science.ru.nl/mailman/listinfo/fieldtrip > https://doi.org/10.1371/journal.pcbi.1002202 From e.spaak at donders.ru.nl Mon Jan 14 12:53:08 2019 From: e.spaak at donders.ru.nl (Eelke Spaak) Date: Mon, 14 Jan 2019 12:53:08 +0100 Subject: [FieldTrip] Source reconstructions In-Reply-To: References: Message-ID: Ah sorry, I was getting your previous replies with a delay. If 'mm' makes them even smaller, perhaps 'm' is the right unit? In any case, I very strongly suspect that a spatial unit mismatch is the cause of the discrepancy you're seeing. Cheers, Eelke On Mon, 14 Jan 2019 at 11:54, Eelke Spaak wrote: > > Perhaps a stupid question but have you also tried sens = > ft_convert_units(sens, 'mm')? > > Eelke > > > On Mon, 14 Jan 2019 at 10:52, Elene Beitia Loinaz > wrote: > > > > Dear fieldtripers, > > > > I am tryng to visualize the electrodes and the headmodel at the same time. The problem that I have is that I need to reescale one of them. > > > > I have tried to function ft_convert_units, but I just obtain the image attached. > > > > The structure of the information are the next ones, > > headmodel: > > bnd: [1×3 struct] > > cond: [0.3300 0.0041 0.3300] > > mat: [3000×3000 double] > > type: 'dipoli' > > unit: 'mm' > > electrodes: > > pnt: [133×3 double] > > label: {1×133 cell} > > > > Code that I have used to obtained the image below: > > ft_determine_coordsys (vol, 'interactive','no') > > > > > > figure; > > sens=data.elec; > > sens=ft_convert_units(sens, 'cm'); > > ft_plot_vol(vol,'facecolor','skin','edgecolor','none') > > ft_plot_sens(sens,'elecsize',10) > > camlight > > alpha 0.5 > > > > If somebody could help my I would be very grateful, > > > > Elene > > > > > > > > _______________________________________________ > > fieldtrip mailing list > > https://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > https://doi.org/10.1371/journal.pcbi.1002202 From pdhami06 at gmail.com Mon Jan 14 18:26:22 2019 From: pdhami06 at gmail.com (Paul Dhami) Date: Mon, 14 Jan 2019 12:26:22 -0500 Subject: [FieldTrip] Applying Bonferroni Correction to Alpha Parameter Instead of ANOVA Message-ID: Dear Fieldtrip community, I have an ERP experiment with a 2 x 2 design (lets say with one factor having levels A and B and the other having factors 1 and 2), both being within groups measures. As stated in the interaction page, I can't use that to test for an ANOVA design when both factors are within group measures. Instead of running an ANOVA, I was thinking of running separate contrasts of interest, which would be A1 vs A2 and B1 vs B2. My question is: 1) to correct for now the multiple contrasts, would simply setting the alpha parameter (which is used for the inference of accepting or rejecting the null hypothesis) to 0.5/2 be acceptable? What if I wanted to test all possible contrasts, would I simply then divide my alpha parameter by the number of contrasts I have? Any input would be appreciated. Best, Paul -------------- next part -------------- An HTML attachment was scrubbed... URL: From martin.rosenfelder at uni-ulm.de Mon Jan 14 18:29:12 2019 From: martin.rosenfelder at uni-ulm.de (Martin Rosenfelder) Date: Mon, 14 Jan 2019 18:29:12 +0100 Subject: [FieldTrip] redefining data set Message-ID: <21d7-5c3cc700-27-21893940@52196402> Dear Fieldtrip community, I have preprocessed a single dataset with two different conditions ('Swim', 'Rest'). The conditions are stored in the 'eventvalue' field of the cfg as 1x2 cell array. The event values are stored in the 'data_ref.cfg.previous.previous.previous{1,1}.previous.previous.trialdef.eventvalue' field of the data set. Having done the preprocessing I now would like to do ft_timelockanalysis and ft_freqanalysis on the data. Afterwards I statistically compare the two conditions using ft_timelockstatistics and ft_freqstatistics. How can I split the data set according to the event values ('Swim', 'Rest')? I need the event values to split the data set into the two trial classes in the ft_timelockanalysis / ft_freqanalysis and to compare these two conditions. I tried ft_redefinetrial, but do not know how to define the cfg.trials field of this function. % trial redefinition % containing only trials in the 'swim' condition cfg.trials = (1, data_ref.cfg.previous.previous.previous{1,1}.previous.previous.trialdef.eventvalue(1,1)); swim = ft_redefinetrial(cfg,data_ref); % containing only trials in the 'resting' condition cfg.trials = (1, data_ref.cfg.previous.previous.previous{1,1}.previous.previous.trialdef.eventvalue(1,2)); rest = ft_redefinetrial(cfg,data_ref); I hope the description was quite clear. In case, I can provide some more lines of code to clarify the issue. Thank you very much in advance for your advice! Best regards, Martin -- M.Sc.-Psych. Martin Rosenfelder Wissenschaftlicher Mitarbeiter Klinische und Biologische Psychologie Universität Ulm Raum 47.2.259 +49 731-50 26592 martin.rosenfelder at uni-ulm.de From julian.keil at gmail.com Mon Jan 14 18:53:39 2019 From: julian.keil at gmail.com (Julian Keil) Date: Mon, 14 Jan 2019 18:53:39 +0100 Subject: [FieldTrip] redefining data set In-Reply-To: <21d7-5c3cc700-27-21893940@52196402> References: <21d7-5c3cc700-27-21893940@52196402> Message-ID: <1D4E7FC4-1222-43C3-AB4B-D6799C1D7F7A@gmail.com> Dear Martin, I’m not quite sure what you have in the previous…-fields, but cfg.trials need trial indices (e.g. „swim“ is trial [1, 3, 5, 7, 23]). You could use something like find(cfg.previous…{1,1} == 1) to get the indices where your eventvalue matches your category. Please keep in mind though that these „previous“-fields might not get updated if you throw out trials (e.g. due to artefacts), so you need to double-check if the trial selection matches your number of trials in data_ref. Alternatively, you can store condition information in the „trialinfo“-field. This gets updated if you throw out trials, so you don’t have to worry about this. I hope this helps. Best, Julian > Am 14.01.2019 um 18:29 schrieb Martin Rosenfelder : > > Dear Fieldtrip community, > > I have preprocessed a single dataset with two different conditions ('Swim', 'Rest'). The conditions are stored in the 'eventvalue' field of the cfg as 1x2 cell array. The event values are stored in the 'data_ref.cfg.previous.previous.previous{1,1}.previous.previous.trialdef.eventvalue' field of the data set. > Having done the preprocessing I now would like to do ft_timelockanalysis and ft_freqanalysis on the data. Afterwards I statistically compare the two conditions using ft_timelockstatistics and ft_freqstatistics. > How can I split the data set according to the event values ('Swim', 'Rest')? I need the event values to split the data set into the two trial classes in the ft_timelockanalysis / ft_freqanalysis and to compare these two conditions. > > I tried ft_redefinetrial, but do not know how to define the cfg.trials field of this function. > > % trial redefinition > > % containing only trials in the 'swim' condition > cfg.trials = (1, data_ref.cfg.previous.previous.previous{1,1}.previous.previous.trialdef.eventvalue(1,1)); > swim = ft_redefinetrial(cfg,data_ref); > > % containing only trials in the 'resting' condition > cfg.trials = (1, data_ref.cfg.previous.previous.previous{1,1}.previous.previous.trialdef.eventvalue(1,2)); > rest = ft_redefinetrial(cfg,data_ref); > > I hope the description was quite clear. In case, I can provide some more lines of code to clarify the issue. > > Thank you very much in advance for your advice! > > Best regards, > Martin > > -- > M.Sc.-Psych. Martin Rosenfelder > Wissenschaftlicher Mitarbeiter > Klinische und Biologische Psychologie > Universität Ulm > Raum 47.2.259 > +49 731-50 26592 > martin.rosenfelder at uni-ulm.de > > > _______________________________________________ > fieldtrip mailing list > https://mailman.science.ru.nl/mailman/listinfo/fieldtrip > https://doi.org/10.1371/journal.pcbi.1002202 From stephen.whitmarsh at gmail.com Mon Jan 14 19:01:23 2019 From: stephen.whitmarsh at gmail.com (Stephen Whitmarsh) Date: Mon, 14 Jan 2019 19:01:23 +0100 Subject: [FieldTrip] redefining data set In-Reply-To: <21d7-5c3cc700-27-21893940@52196402> References: <21d7-5c3cc700-27-21893940@52196402> Message-ID: Dear Martin, Use ft_selectdata instead of ft_redefinetrial. "cfg.previous.previous.previous{1,1}.previous.previous.trialdef.eventvalue(1,2)" is scary! And I can imagine very inconvenient, as it will move deeper and deeper in to infinite previousnessness. Instead, one of the best 'easter eggs' (i.e. not so well-documented functionality) of FieldTrip is to create extra columns of info in your .trl when using preprocessing to epoch your data. These extra columns will then enter into a field .trialinfo of your data. Most if not all functions, such as ft_selectdata (selecting trials) will update that field. So I advice you to put your eventvalue (as well as RT, response, etc. etc.) as columns in your trialinfo (so same nr. of rows as your nr. of trials). In this way, they will travel with your data, and stay in the same structure and on the same level whatever happens. Cheers, Stephen On Mon, 14 Jan 2019 at 18:47, Martin Rosenfelder < martin.rosenfelder at uni-ulm.de> wrote: > Dear Fieldtrip community, > > I have preprocessed a single dataset with two different conditions > ('Swim', 'Rest'). The conditions are stored in the 'eventvalue' field of > the cfg as 1x2 cell array. The event values are stored in the > 'data_ref.cfg.previous.previous.previous{1,1}.previous.previous.trialdef.eventvalue' > field of the data set. > Having done the preprocessing I now would like to do ft_timelockanalysis > and ft_freqanalysis on the data. Afterwards I statistically compare the two > conditions using ft_timelockstatistics and ft_freqstatistics. > How can I split the data set according to the event values ('Swim', > 'Rest')? I need the event values to split the data set into the two trial > classes in the ft_timelockanalysis / ft_freqanalysis and to compare these > two conditions. > > I tried ft_redefinetrial, but do not know how to define the cfg.trials > field of this function. > > % trial redefinition > > % containing only trials in the 'swim' condition > cfg.trials = (1, > data_ref.cfg.previous.previous.previous{1,1}.previous.previous.trialdef.eventvalue(1,1)); > swim = ft_redefinetrial(cfg,data_ref); > > % containing only trials in the 'resting' condition > cfg.trials = (1, > data_ref.cfg.previous.previous.previous{1,1}.previous.previous.trialdef.eventvalue(1,2)); > rest = ft_redefinetrial(cfg,data_ref); > > I hope the description was quite clear. In case, I can provide some more > lines of code to clarify the issue. > > Thank you very much in advance for your advice! > > Best regards, > Martin > > -- > M.Sc.-Psych. Martin Rosenfelder > Wissenschaftlicher Mitarbeiter > Klinische und Biologische Psychologie > Universität Ulm > Raum 47.2.259 > +49 731-50 26592 > martin.rosenfelder at uni-ulm.de > > > _______________________________________________ > 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 elene.beitia at alumni.mondragon.edu Mon Jan 14 19:03:36 2019 From: elene.beitia at alumni.mondragon.edu (Elene Beitia Loinaz) Date: Mon, 14 Jan 2019 19:03:36 +0100 Subject: [FieldTrip] Source reconstructions In-Reply-To: References: Message-ID: Thank you, that was the problem!!! El lun., 14 ene. 2019 12:53, Eelke Spaak escribió: > Ah sorry, I was getting your previous replies with a delay. If 'mm' > makes them even smaller, perhaps 'm' is the right unit? In any case, I > very strongly suspect that a spatial unit mismatch is the cause of the > discrepancy you're seeing. > > Cheers, > Eelke > > On Mon, 14 Jan 2019 at 11:54, Eelke Spaak wrote: > > > > Perhaps a stupid question but have you also tried sens = > > ft_convert_units(sens, 'mm')? > > > > Eelke > > > > > > On Mon, 14 Jan 2019 at 10:52, Elene Beitia Loinaz > > wrote: > > > > > > Dear fieldtripers, > > > > > > I am tryng to visualize the electrodes and the headmodel at the same > time. The problem that I have is that I need to reescale one of them. > > > > > > I have tried to function ft_convert_units, but I just obtain the image > attached. > > > > > > The structure of the information are the next ones, > > > headmodel: > > > bnd: [1×3 struct] > > > cond: [0.3300 0.0041 0.3300] > > > mat: [3000×3000 double] > > > type: 'dipoli' > > > unit: 'mm' > > > electrodes: > > > pnt: [133×3 double] > > > label: {1×133 cell} > > > > > > Code that I have used to obtained the image below: > > > ft_determine_coordsys (vol, 'interactive','no') > > > > > > > > > figure; > > > sens=data.elec; > > > sens=ft_convert_units(sens, 'cm'); > > > ft_plot_vol(vol,'facecolor','skin','edgecolor','none') > > > ft_plot_sens(sens,'elecsize',10) > > > camlight > > > alpha 0.5 > > > > > > If somebody could help my I would be very grateful, > > > > > > Elene > > > > > > > > > > > > _______________________________________________ > > > 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 J.Verhoef at donders.ru.nl Tue Jan 15 11:18:18 2019 From: J.Verhoef at donders.ru.nl (Verhoef, J.P. (Julia)) Date: Tue, 15 Jan 2019 10:18:18 +0000 Subject: [FieldTrip] Postdoc position in Linguistics for Research Consortium 'Language in Interaction' (1, 0 fte) Message-ID: Postdoc position in Linguistics for Research Consortium 'Language in Interaction' (1,0 fte) Dutch Research Consortium 'Language in Interaction' Application deadline: February 17, 2019, 23:59 CET [Logo][Logo NWO] Responsibilities The Language in Interaction research consortium invites applications for a postdoctoral position in Linguistics. We are looking for a candidate with a background in theoretical and/or computational linguistics. You will contribute to the integration of linguistic expertise into the empirical research performed by teams of researchers in our consortium that are collaborating to collectively address the key questions of our field. You will be provided the opportunity to conduct research in one or more research areas relevant to the position. Supervision of BSc, MSc and PhD projects will be part of your responsibilities. You will be provided with budgetary resources for travel, materials and lab-use. This position provides the opportunity for conducting world-class research as a member of an interdisciplinary team. Moreover, it will provide the opportunity to contribute to developing a theoretical framework for our understanding of the human language faculty. Work environment The Netherlands has an outstanding track record in the language sciences. The research consortium ‘Language in Interaction’, sponsored by a large grant from the Netherlands Organization for Scientific research (NWO), brings together many of the excellent research groups in the Netherlands with a research programme on the foundations of language. In addition to excellence in the domain of language and related relevant fields of cognition, our consortium provides state-of-the-art research facilities and a research team with ample experience in the complex research methods that will be invoked to address the scientific questions at the highest level of methodological sophistication. These include methods from genetics, neuroimaging, computational modelling, and patient-related research. This consortium realizes both quality and critical mass for studying human language at a scale not easily found anywhere else. We have identified five Big Questions (BQ) that are central to our understanding of the human language faculty. These questions are interrelated at multiple levels. Teams of researchers will collaborate to collectively address these key questions of our field. Our five Big Questions are: BQ1: The nature of the mental lexicon: How to bridge neurobiology and psycholinguistic theory by computational modelling? BQ2: What are the characteristics and consequences of internal brain organization for language? BQ3: Creating a shared cognitive space: How is language grounded in and shaped by communicative settings of interacting people? BQ4: Variability in language processing and in language learning: Why does the ability to learn language change with age? How can we characterise and map individual language skills in relation to the population distribution? BQ5: How are other cognitive systems shaped by the presence of a language system in humans? Successful candidates will be appointed at one of the consortium’s home institutions, depending on the position applied for. All successful candidates will become members of our Big Question teams. The research is conducted in an international setting at all participating institutions. English is the lingua franca. You will be appointed at the Max Planck Institute for Psycholinguistics, Nijmegen, The Netherlands. You will be supervised by Peter Hagoort, programme director of the Language in Interaction consortium. The research is conducted in an international setting at all participating institutions. English is the lingua franca. What we expect from you We are looking for highly motivated candidates to enrich a unique consortium of researchers that aims to unravel the neurocognitive mechanisms of language at multiple levels. The goal is to understand both the universality and the variability of the human language faculty from genes to behaviour. · a PhD in Linguistics; · an integrative mindset; · a theory-driven approach; · good communication skills; · strong motivation; · excellent proficiency in written and spoken English. What we have to offer · Full-time position (39 hours per week) with a term of appointment of 4 years. · The salary is according to the German TVöD (Tarifvertrag für den öffentlichen Dienst) and is classified in salary group E13 (depending on the experience of the applicant between EUR 3.827,03 and EUR 5.683,28 gross per month, based on a full-time employment). · In addition to the salary: an 8% holiday allowance · The Max Planck Institute involved has a number of regulations that make it possible for employees to create a good work-life balance. Other Information The institute involved is an equal opportunity employer, committed to building a culturally diverse intellectual community, and as such encourages applications from women and minorities. Would you like to know more? Further information on: the Language in Interaction Consortium. Further information on: Donders Institute for Brain, Cognition and Behaviour For more information about this vacancy, please contact: Prof. dr. Peter Hagoort, programme director Language in Interaction and director of DCCN and MPI Telephone: +31 24 3610648, +31 24 3521301 E-mail: p.hagoort at donders.ru.nl Are you interested? Please submit your application (attn. of Prof. dr. P. Hagoort) to j.verhoef at donders.ru.nl in electronic form. Your application should include (and be limited to) the following attachments: · a cover letter, · your curriculum vitae, including a list of publications and the names of at least two persons who can provide references. Application deadline: February 17, 2019, 23:59 CET. Kind regards, Julia Verhoef Secretary - Language in Interaction Consortium Radboud University | Donders Centre for Cognitive Neuroimaging (DCCN) Room 0.026 Kapittelweg 29, 6525 EN Nijmegen, The Netherlands P.O. Box 9101, 6500 HB, Nijmegen, The Netherlands |T: +31 (0)24 3666272 E: J.Verhoef at donders.ru.nll|Office hours: 9-14 hr on Mon - Fri Follow Language in Interaction on Twitter Like Language in Interaction on Facebook -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image004.jpg Type: image/jpeg Size: 40202 bytes Desc: image004.jpg URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image005.jpg Type: image/jpeg Size: 2461 bytes Desc: image005.jpg URL: From martin.rosenfelder at uni-ulm.de Tue Jan 15 16:20:03 2019 From: martin.rosenfelder at uni-ulm.de (Martin Rosenfelder) Date: Tue, 15 Jan 2019 16:20:03 +0100 Subject: [FieldTrip] =?utf-8?b?Pz09P3V0Zi04P3E/ICByZWRlZmluaW5nIGRhdGEg?= =?utf-8?q?set?= In-Reply-To: Message-ID: <2bb2-5c3dfa00-13-26c45a40@4319113> Dear Stephen, Thank you very much for the hint on ft_selectdata. I tried to build the structure for .trialinfo as you described it in your reply. I did this creating a structure array with the eventvalues as elements. Then I concatenated the .trl matrix and the event value matrix. This however failed, since .trl is a double array and the event value matrix is a struct array. I double-checked that the nr. of rows in the two matrices match each other (120 elements). Is there a way to add the event value matrix (120x1 struct) to the .trl matrix (120x3 double)? Best, Martin -- M.Sc.-Psych. Martin Rosenfelder Wissenschaftlicher Mitarbeiter Klinische und Biologische Psychologie Universität Ulm Raum 47.2.259 +49 731-50 26592 martin.rosenfelder at uni-ulm.de Am Montag, 14. Januar 2019 19:01 CET, Stephen Whitmarsh schrieb: > Dear Martin, > > Use ft_selectdata instead of ft_redefinetrial. > > "cfg.previous.previous.previous{1,1}.previous.previous.trialdef.eventvalue(1,2)" > is scary! And I can imagine very inconvenient, as it will move deeper and > deeper in to infinite previousnessness. > Instead, one of the best 'easter eggs' (i.e. not so well-documented > functionality) of FieldTrip is to create extra columns of info in your .trl > when using preprocessing to epoch your data. These extra columns will then > enter into a field .trialinfo of your data. Most if not all functions, such > as ft_selectdata (selecting trials) will update that field. So I advice you > to put your eventvalue (as well as RT, response, etc. etc.) as columns in > your trialinfo (so same nr. of rows as your nr. of trials). In this way, > they will travel with your data, and stay in the same structure and on the > same level whatever happens. > > Cheers, > Stephen > > > On Mon, 14 Jan 2019 at 18:47, Martin Rosenfelder < > martin.rosenfelder at uni-ulm.de> wrote: > > > Dear Fieldtrip community, > > > > I have preprocessed a single dataset with two different conditions > > ('Swim', 'Rest'). The conditions are stored in the 'eventvalue' field of > > the cfg as 1x2 cell array. The event values are stored in the > > 'data_ref.cfg.previous.previous.previous{1,1}.previous.previous.trialdef.eventvalue' > > field of the data set. > > Having done the preprocessing I now would like to do ft_timelockanalysis > > and ft_freqanalysis on the data. Afterwards I statistically compare the two > > conditions using ft_timelockstatistics and ft_freqstatistics. > > How can I split the data set according to the event values ('Swim', > > 'Rest')? I need the event values to split the data set into the two trial > > classes in the ft_timelockanalysis / ft_freqanalysis and to compare these > > two conditions. > > > > I tried ft_redefinetrial, but do not know how to define the cfg.trials > > field of this function. > > > > % trial redefinition > > > > % containing only trials in the 'swim' condition > > cfg.trials = (1, > > data_ref.cfg.previous.previous.previous{1,1}.previous.previous.trialdef.eventvalue(1,1)); > > swim = ft_redefinetrial(cfg,data_ref); > > > > % containing only trials in the 'resting' condition > > cfg.trials = (1, > > data_ref.cfg.previous.previous.previous{1,1}.previous.previous.trialdef.eventvalue(1,2)); > > rest = ft_redefinetrial(cfg,data_ref); > > > > I hope the description was quite clear. In case, I can provide some more > > lines of code to clarify the issue. > > > > Thank you very much in advance for your advice! > > > > Best regards, > > Martin > > > > -- > > M.Sc.-Psych. Martin Rosenfelder > > Wissenschaftlicher Mitarbeiter > > Klinische und Biologische Psychologie > > Universität Ulm > > Raum 47.2.259 > > +49 731-50 26592 > > martin.rosenfelder at uni-ulm.de > > > > > > _______________________________________________ > > fieldtrip mailing list > > https://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > https://doi.org/10.1371/journal.pcbi.1002202 > > From agnese.zazio at hotmail.it Tue Jan 15 16:36:17 2019 From: agnese.zazio at hotmail.it (Agnese Zazio) Date: Tue, 15 Jan 2019 15:36:17 +0000 Subject: [FieldTrip] Source reconstruction for time-locked EEG data at the group level Message-ID: Dear all, I'm interested in identifying sources of the EEG evoked components I get in the grand average, and I'm not going to apply further statistical analyses on sources. I followed the Fieldtrip tutorial for source reconstruction of MEG event-related fields (http://www.fieldtriptoolbox.org/tutorial/minimumnormestimate/), which is on data from a single subject, and I'm not sure about how to proceed at the group level. I concatenated all trials from all subjects to calculate the covariance and computing the grand average with "ft_timelockanalysis". First, is this an appropriate way to apply mne method in "ft_sourceanalysis" at the group level? Moreover, I was looking for a good way to check the results I obtained, for example by applying another method, such as beamformer. Is it reasonable to think that the two methods would lead to comparable results on time-locked data? If yes, how can I apply the beamformer method in "ft_sourceanalysis"? I replaced the cfg.method field (mne with lcmv), but the output I get does not contain information about time. Here's the code I used. I don't have individual MRIs, thus I am using templates for the headmodel (standard_bem) and the sourcemodel (cortex_5124.surf.gii). --- % create a preprocessed structure cfg =[]; cfg.channel = {'EEG'}; cfg.demean = 'yes'; cfg.baselinewindow = [-0.1 0]; data_prepr = ft_preprocessing(cfg, data_long); cfg =[]; cfg.covariance = 'yes'; cfg.channel ={'EEG'}; cfg.covariancewindow = [0 0.4]; data_tlck = ft_timelockanalysis (cfg, data_prepr); % forward solution [prepare leadfield] cfg = []; cfg.elec = elec; cfg.channel = {'EEG'}; cfg.headmodel = vol; % volume conduction model cfg.grid = ft_read_headshape('cortex_5124.surf.gii'); cfg.grid.pos = sourcemodel.pos; cfg.grid.inside = 1:size(sourcemodel.pos,1); % all source points are inside of the brain leadfield = ft_prepare_leadfield(cfg); % inverse solution (method: mne) cfg = []; cfg.method = 'mne'; %'lcmv'; cfg.elec = elec; cfg.channel = {'EEG'}; cfg.grid = leadfield; cfg.headmodel = vol; cfg.mne.prewhiten = 'yes'; cfg.mne.lambda = 3; cfg.mne.scalesourcecov = 'yes'; source_bial_mne = ft_sourceanalysis(cfg, data_tlck); %%plot bnd.pos = sourcespace.pos; bnd.tri = sourcespace.tri; m=source_bial_mne.avg.pow(:,124); % point in time I want to plot figure; ft_plot_mesh(bnd, 'vertexcolor', m); --- Any help would be really appreciated, thanks in advance! Best, Agnese --- Agnese Zazio, PhD Student Cognitive Neuroscience Section, IRCCS Saint John of God Clinical Research Centre (Brescia, Italy) -------------- next part -------------- An HTML attachment was scrubbed... URL: From stephen.whitmarsh at gmail.com Tue Jan 15 17:40:46 2019 From: stephen.whitmarsh at gmail.com (Stephen Whitmarsh) Date: Tue, 15 Jan 2019 17:40:46 +0100 Subject: [FieldTrip] ?==?utf-8?q? redefining data set In-Reply-To: <2bb2-5c3dfa00-13-26c45a40@4319113> References: <2bb2-5c3dfa00-13-26c45a40@4319113> Message-ID: Hi Martin, No indeed, your conditions/RT/events should indeed be (re)coded as single values. This also makes selecting trials etc. much easier with logical expressions, e.g. you can then simply do cfg.trials = (data.trialinfo(:,1) == 3 && data.trialinfo(:,2) > 0.5, where the first column e.g. is your condition, and the second RT, to just give an example. Cheers, Stephen On Tue, 15 Jan 2019 at 17:35, Martin Rosenfelder < martin.rosenfelder at uni-ulm.de> wrote: > Dear Stephen, > > Thank you very much for the hint on ft_selectdata. > > I tried to build the structure for .trialinfo as you described it in your > reply. I did this creating a structure array with the eventvalues as > elements. > Then I concatenated the .trl matrix and the event value matrix. This > however failed, since .trl is a double array and the event value matrix is > a struct array. > I double-checked that the nr. of rows in the two matrices match each other > (120 elements). > > Is there a way to add the event value matrix (120x1 struct) to the .trl > matrix (120x3 double)? > > Best, > Martin > > > -- > M.Sc.-Psych. Martin Rosenfelder > Wissenschaftlicher Mitarbeiter > Klinische und Biologische Psychologie > Universität Ulm > Raum 47.2.259 > +49 731-50 26592 > martin.rosenfelder at uni-ulm.de > > Am Montag, 14. Januar 2019 19:01 CET, Stephen Whitmarsh < > stephen.whitmarsh at gmail.com> schrieb: > > > Dear Martin, > > > > Use ft_selectdata instead of ft_redefinetrial. > > > > > "cfg.previous.previous.previous{1,1}.previous.previous.trialdef.eventvalue(1,2)" > > is scary! And I can imagine very inconvenient, as it will move deeper and > > deeper in to infinite previousnessness. > > Instead, one of the best 'easter eggs' (i.e. not so well-documented > > functionality) of FieldTrip is to create extra columns of info in your > .trl > > when using preprocessing to epoch your data. These extra columns will > then > > enter into a field .trialinfo of your data. Most if not all functions, > such > > as ft_selectdata (selecting trials) will update that field. So I advice > you > > to put your eventvalue (as well as RT, response, etc. etc.) as columns in > > your trialinfo (so same nr. of rows as your nr. of trials). In this way, > > they will travel with your data, and stay in the same structure and on > the > > same level whatever happens. > > > > Cheers, > > Stephen > > > > > > On Mon, 14 Jan 2019 at 18:47, Martin Rosenfelder < > > martin.rosenfelder at uni-ulm.de> wrote: > > > > > Dear Fieldtrip community, > > > > > > I have preprocessed a single dataset with two different conditions > > > ('Swim', 'Rest'). The conditions are stored in the 'eventvalue' field > of > > > the cfg as 1x2 cell array. The event values are stored in the > > > > 'data_ref.cfg.previous.previous.previous{1,1}.previous.previous.trialdef.eventvalue' > > > field of the data set. > > > Having done the preprocessing I now would like to do > ft_timelockanalysis > > > and ft_freqanalysis on the data. Afterwards I statistically compare > the two > > > conditions using ft_timelockstatistics and ft_freqstatistics. > > > How can I split the data set according to the event values ('Swim', > > > 'Rest')? I need the event values to split the data set into the two > trial > > > classes in the ft_timelockanalysis / ft_freqanalysis and to compare > these > > > two conditions. > > > > > > I tried ft_redefinetrial, but do not know how to define the cfg.trials > > > field of this function. > > > > > > % trial redefinition > > > > > > % containing only trials in the 'swim' condition > > > cfg.trials = (1, > > > > data_ref.cfg.previous.previous.previous{1,1}.previous.previous.trialdef.eventvalue(1,1)); > > > swim = ft_redefinetrial(cfg,data_ref); > > > > > > % containing only trials in the 'resting' condition > > > cfg.trials = (1, > > > > data_ref.cfg.previous.previous.previous{1,1}.previous.previous.trialdef.eventvalue(1,2)); > > > rest = ft_redefinetrial(cfg,data_ref); > > > > > > I hope the description was quite clear. In case, I can provide some > more > > > lines of code to clarify the issue. > > > > > > Thank you very much in advance for your advice! > > > > > > Best regards, > > > Martin > > > > > > -- > > > M.Sc.-Psych. Martin Rosenfelder > > > Wissenschaftlicher Mitarbeiter > > > Klinische und Biologische Psychologie > > > Universität Ulm > > > Raum 47.2.259 > > > +49 731-50 26592 > > > martin.rosenfelder at uni-ulm.de > > > > > > > > > _______________________________________________ > > > 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 jan.schoffelen at donders.ru.nl Tue Jan 15 17:43:14 2019 From: jan.schoffelen at donders.ru.nl (Schoffelen, J.M. (Jan Mathijs)) Date: Tue, 15 Jan 2019 16:43:14 +0000 Subject: [FieldTrip] ?==?utf-8?q? redefining data set In-Reply-To: References: <2bb2-5c3dfa00-13-26c45a40@4319113> Message-ID: <855A27CB-F840-43CD-A39C-755734B3177B@donders.ru.nl> If I may chime in: are you by any chance looking for data.trialinfo(:,x) = [event.value]’ ? Best JM On 15 Jan 2019, at 17:40, Stephen Whitmarsh > wrote: Hi Martin, No indeed, your conditions/RT/events should indeed be (re)coded as single values. This also makes selecting trials etc. much easier with logical expressions, e.g. you can then simply do cfg.trials = (data.trialinfo(:,1) == 3 && data.trialinfo(:,2) > 0.5, where the first column e.g. is your condition, and the second RT, to just give an example. Cheers, Stephen On Tue, 15 Jan 2019 at 17:35, Martin Rosenfelder > wrote: Dear Stephen, Thank you very much for the hint on ft_selectdata. I tried to build the structure for .trialinfo as you described it in your reply. I did this creating a structure array with the eventvalues as elements. Then I concatenated the .trl matrix and the event value matrix. This however failed, since .trl is a double array and the event value matrix is a struct array. I double-checked that the nr. of rows in the two matrices match each other (120 elements). Is there a way to add the event value matrix (120x1 struct) to the .trl matrix (120x3 double)? Best, Martin -- M.Sc.-Psych. Martin Rosenfelder Wissenschaftlicher Mitarbeiter Klinische und Biologische Psychologie Universität Ulm Raum 47.2.259 +49 731-50 26592 martin.rosenfelder at uni-ulm.de Am Montag, 14. Januar 2019 19:01 CET, Stephen Whitmarsh > schrieb: > Dear Martin, > > Use ft_selectdata instead of ft_redefinetrial. > > "cfg.previous.previous.previous{1,1}.previous.previous.trialdef.eventvalue(1,2)" > is scary! And I can imagine very inconvenient, as it will move deeper and > deeper in to infinite previousnessness. > Instead, one of the best 'easter eggs' (i.e. not so well-documented > functionality) of FieldTrip is to create extra columns of info in your .trl > when using preprocessing to epoch your data. These extra columns will then > enter into a field .trialinfo of your data. Most if not all functions, such > as ft_selectdata (selecting trials) will update that field. So I advice you > to put your eventvalue (as well as RT, response, etc. etc.) as columns in > your trialinfo (so same nr. of rows as your nr. of trials). In this way, > they will travel with your data, and stay in the same structure and on the > same level whatever happens. > > Cheers, > Stephen > > > On Mon, 14 Jan 2019 at 18:47, Martin Rosenfelder < > martin.rosenfelder at uni-ulm.de> wrote: > > > Dear Fieldtrip community, > > > > I have preprocessed a single dataset with two different conditions > > ('Swim', 'Rest'). The conditions are stored in the 'eventvalue' field of > > the cfg as 1x2 cell array. The event values are stored in the > > 'data_ref.cfg.previous.previous.previous{1,1}.previous.previous.trialdef.eventvalue' > > field of the data set. > > Having done the preprocessing I now would like to do ft_timelockanalysis > > and ft_freqanalysis on the data. Afterwards I statistically compare the two > > conditions using ft_timelockstatistics and ft_freqstatistics. > > How can I split the data set according to the event values ('Swim', > > 'Rest')? I need the event values to split the data set into the two trial > > classes in the ft_timelockanalysis / ft_freqanalysis and to compare these > > two conditions. > > > > I tried ft_redefinetrial, but do not know how to define the cfg.trials > > field of this function. > > > > % trial redefinition > > > > % containing only trials in the 'swim' condition > > cfg.trials = (1, > > data_ref.cfg.previous.previous.previous{1,1}.previous.previous.trialdef.eventvalue(1,1)); > > swim = ft_redefinetrial(cfg,data_ref); > > > > % containing only trials in the 'resting' condition > > cfg.trials = (1, > > data_ref.cfg.previous.previous.previous{1,1}.previous.previous.trialdef.eventvalue(1,2)); > > rest = ft_redefinetrial(cfg,data_ref); > > > > I hope the description was quite clear. In case, I can provide some more > > lines of code to clarify the issue. > > > > Thank you very much in advance for your advice! > > > > Best regards, > > Martin > > > > -- > > M.Sc.-Psych. Martin Rosenfelder > > Wissenschaftlicher Mitarbeiter > > Klinische und Biologische Psychologie > > Universität Ulm > > Raum 47.2.259 > > +49 731-50 26592 > > martin.rosenfelder at uni-ulm.de > > > > > > _______________________________________________ > > 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 elene.beitia at alumni.mondragon.edu Wed Jan 16 09:00:26 2019 From: elene.beitia at alumni.mondragon.edu (Elene Beitia Loinaz) Date: Wed, 16 Jan 2019 09:00:26 +0100 Subject: [FieldTrip] headmodel and electrodes alignment Message-ID: Dear fieldtriprs, I still have problemns in aligning correctly the headmodel and the electrodes. Although now both have the correct size, the electrodes do not correctly fit the head. *This is my code:* headmodel=ft_read_vol('standard_vol.mat'); %then we realign them cfg=[]; cfg.method= 'interactive'; %'interactive'% cfg.headshape=headmodel.bnd(1); %the skin surface elec_realigned =ft_electroderealign(cfg,data1.elec); [image: Captura de pantalla 2019-01-16 a las 8.51.49.png] *These are the structures used:* data1.elec structure chanpos: [128×3 double] chantype: {128×1 cell} chanunit: {128×1 cell} elecpos: [128×3 double] label: {1×128 cell} type: 'biosemi128' unit: 'dm' standard_vol structure bnd: [1×3 struct] cond: [0.3300 0.0041 0.3300] mat: [3000×3000 double] type: 'dipoli' unit: 'mm' Thank you in advance, Elene. -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: Captura de pantalla 2019-01-16 a las 8.51.49.png Type: image/png Size: 277926 bytes Desc: not available URL: From stephen.whitmarsh at gmail.com Wed Jan 16 09:55:17 2019 From: stephen.whitmarsh at gmail.com (Stephen Whitmarsh) Date: Wed, 16 Jan 2019 09:55:17 +0100 Subject: [FieldTrip] headmodel and electrodes alignment In-Reply-To: References: Message-ID: Hi Elene, After 'interactive' mode to give it a good start, I use the output for another iteration of automatic 'headshape' method for a tight fit. Hope this helps, Stephen On Wed, 16 Jan 2019 at 09:31, Elene Beitia Loinaz < elene.beitia at alumni.mondragon.edu> wrote: > Dear fieldtriprs, > > I still have problemns in aligning correctly the headmodel and the > electrodes. Although now both have the correct size, the electrodes do not > correctly fit the head. > > *This is my code:* > headmodel=ft_read_vol('standard_vol.mat'); > > > > %then we realign them > > cfg=[]; > > cfg.method= 'interactive'; %'interactive'% > > cfg.headshape=headmodel.bnd(1); %the skin surface > > elec_realigned =ft_electroderealign(cfg,data1.elec); > > > > [image: Captura de pantalla 2019-01-16 a las 8.51.49.png] > > *These are the structures used:* > > data1.elec structure > chanpos: [128×3 double] > chantype: {128×1 cell} > chanunit: {128×1 cell} > elecpos: [128×3 double] > label: {1×128 cell} > type: 'biosemi128' > unit: 'dm' > > standard_vol structure > bnd: [1×3 struct] > cond: [0.3300 0.0041 0.3300] > mat: [3000×3000 double] > type: 'dipoli' > unit: 'mm' > > Thank you in advance, > Elene. > _______________________________________________ > 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 elene.beitia at alumni.mondragon.edu Wed Jan 16 10:09:49 2019 From: elene.beitia at alumni.mondragon.edu (Elene Beitia Loinaz) Date: Wed, 16 Jan 2019 10:09:49 +0100 Subject: [FieldTrip] headmodel and electrodes alignment In-Reply-To: References: Message-ID: Hi Stephen, Thank you for your answer. I already try that, but the result that I obtained is not correct either. Code: cfg=[]; cfg.method= 'headshape'; cfg.headshape=headmodel.bnd(1); % this is the skin surface elec_realigned =ft_electroderealign(cfg,data1.elec); %Plot the result to see if is correct vol = ft_convert_units(vol,'mm'); elec_realigned = ft_convert_units(elec_realigned,'mm') figure ft_plot_sens(elec_realigned, 'style', 'b'); hold on ft_plot_vol(vol); [image: Captura de pantalla 2019-01-16 a las 9.59.14.png] Thank you in advance, Elene. -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: Captura de pantalla 2019-01-16 a las 9.59.14.png Type: image/png Size: 122845 bytes Desc: not available URL: From julian.keil at gmail.com Wed Jan 16 10:41:53 2019 From: julian.keil at gmail.com (Julian Keil) Date: Wed, 16 Jan 2019 10:41:53 +0100 Subject: [FieldTrip] headmodel and electrodes alignment In-Reply-To: References: Message-ID: <089238D1-F8D9-4B35-9908-E4C51D919C40@gmail.com> Hi Elene, please excuse the probably useless question, but did you try to move the electrodes around in the „interactive“-mode? You write: "still have problemns in aligning correctly the headmodel and the electrodes. Although now both have the correct size, the electrodes do not correctly fit the head.“ It is not surprising that the electrodes don’t fit perfectly. That’s why you can use the „rotate“, „scale“ and „translate“-settings to move the electrodes around until they fit better. Cheers, Julian > Am 16.01.2019 um 10:09 schrieb Elene Beitia Loinaz : > > Hi Stephen, > > Thank you for your answer. I already try that, but the result that I obtained is not correct either. > > Code: > > cfg=[]; > cfg.method= 'headshape'; > cfg.headshape=headmodel.bnd(1); % this is the skin surface > elec_realigned =ft_electroderealign(cfg,data1.elec); > > %Plot the result to see if is correct > > vol = ft_convert_units(vol,'mm'); > elec_realigned = ft_convert_units(elec_realigned,'mm') > > figure > ft_plot_sens(elec_realigned, 'style', 'b'); > > hold on > ft_plot_vol(vol); > > > > Thank you in advance, > > Elene. > _______________________________________________ > 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 stephen.whitmarsh at gmail.com Wed Jan 16 10:45:32 2019 From: stephen.whitmarsh at gmail.com (Stephen Whitmarsh) Date: Wed, 16 Jan 2019 10:45:32 +0100 Subject: [FieldTrip] headmodel and electrodes alignment In-Reply-To: References: Message-ID: Hi Elene, In the code you do not use ft_electroderealign twice (once manually, then automatic). Also, you convert units after realignment. For the sake of debugging and clarity, I would: 1. - figure out and set the units correctly for you headmodel and electrodes 2. - convert headmodel and electrodes to same units 3. - plot to check 4. - use 'interactive' realignment 5. - plot to check 6. - use 'headmodel' realignment 7. - plot to check Cheers, Stephen On Wed, 16 Jan 2019 at 10:35, Elene Beitia Loinaz < elene.beitia at alumni.mondragon.edu> wrote: > Hi Stephen, > > Thank you for your answer. I already try that, but the result that I > obtained is not correct either. > > Code: > > cfg=[]; > > cfg.method= 'headshape'; > > cfg.headshape=headmodel.bnd(1); % this is the skin surface > > elec_realigned =ft_electroderealign(cfg,data1.elec); > > > > %Plot the result to see if is correct > > > > vol = ft_convert_units(vol,'mm'); > > elec_realigned = ft_convert_units(elec_realigned,'mm') > > > > figure > > ft_plot_sens(elec_realigned, 'style', 'b'); > > > > hold on > > ft_plot_vol(vol); > > [image: Captura de pantalla 2019-01-16 a las 9.59.14.png] > > Thank you in advance, > > Elene. > _______________________________________________ > 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 martin.rosenfelder at uni-ulm.de Wed Jan 16 16:57:22 2019 From: martin.rosenfelder at uni-ulm.de (Martin Rosenfelder) Date: Wed, 16 Jan 2019 16:57:22 +0100 Subject: [FieldTrip] =?utf-8?b?Pz09P3V0Zi04P3E/ID89PT91dGYtOD9xPyA/PSBy?= =?utf-8?q?edefining_data_se?= In-Reply-To: Message-ID: <47c7-5c3f5480-13-26d82bc0@58067294> Hi Stephen, Exactly, preferably, the events should be single values in a struct array or a cell array. This can then be added to the existing trial array. So far so good. However, my dataset misses a .trialinfo field after calling ft_preprocessing, to which I could add the cell array with the condition labels. I then added the array with the condition labels to 'mydataset.trial'. Unfortunately, this seems to confuse the ft_rejectvisual I call afterwards for artifact rejection. Do I have to create the .trialinfo-field by hand to my dataset? Best, Martin -- M.Sc.-Psych. Martin Rosenfelder Wissenschaftlicher Mitarbeiter Klinische und Biologische Psychologie Universität Ulm Raum 47.2.259 +49 731-50 26592 martin.rosenfelder at uni-ulm.de Am Dienstag, 15. Januar 2019 17:40 CET, Stephen Whitmarsh schrieb: > Hi Martin, > > No indeed, your conditions/RT/events should indeed be (re)coded as single > values. This also makes selecting trials etc. much easier with logical > expressions, e.g. you can then simply do cfg.trials = (data.trialinfo(:,1) > == 3 && data.trialinfo(:,2) > 0.5, where the first column e.g. is your > condition, and the second RT, to just give an example. > > Cheers, > Stephen > > On Tue, 15 Jan 2019 at 17:35, Martin Rosenfelder < > martin.rosenfelder at uni-ulm.de> wrote: > > > Dear Stephen, > > > > Thank you very much for the hint on ft_selectdata. > > > > I tried to build the structure for .trialinfo as you described it in your > > reply. I did this creating a structure array with the eventvalues as > > elements. > > Then I concatenated the .trl matrix and the event value matrix. This > > however failed, since .trl is a double array and the event value matrix is > > a struct array. > > I double-checked that the nr. of rows in the two matrices match each other > > (120 elements). > > > > Is there a way to add the event value matrix (120x1 struct) to the .trl > > matrix (120x3 double)? > > > > Best, > > Martin > > > > > > -- > > M.Sc.-Psych. Martin Rosenfelder > > Wissenschaftlicher Mitarbeiter > > Klinische und Biologische Psychologie > > Universität Ulm > > Raum 47.2.259 > > +49 731-50 26592 > > martin.rosenfelder at uni-ulm.de > > > > Am Montag, 14. Januar 2019 19:01 CET, Stephen Whitmarsh < > > stephen.whitmarsh at gmail.com> schrieb: > > > > > Dear Martin, > > > > > > Use ft_selectdata instead of ft_redefinetrial. > > > > > > > > "cfg.previous.previous.previous{1,1}.previous.previous.trialdef.eventvalue(1,2)" > > > is scary! And I can imagine very inconvenient, as it will move deeper and > > > deeper in to infinite previousnessness. > > > Instead, one of the best 'easter eggs' (i.e. not so well-documented > > > functionality) of FieldTrip is to create extra columns of info in your > > .trl > > > when using preprocessing to epoch your data. These extra columns will > > then > > > enter into a field .trialinfo of your data. Most if not all functions, > > such > > > as ft_selectdata (selecting trials) will update that field. So I advice > > you > > > to put your eventvalue (as well as RT, response, etc. etc.) as columns in > > > your trialinfo (so same nr. of rows as your nr. of trials). In this way, > > > they will travel with your data, and stay in the same structure and on > > the > > > same level whatever happens. > > > > > > Cheers, > > > Stephen > > > > > > > > > On Mon, 14 Jan 2019 at 18:47, Martin Rosenfelder < > > > martin.rosenfelder at uni-ulm.de> wrote: > > > > > > > Dear Fieldtrip community, > > > > > > > > I have preprocessed a single dataset with two different conditions > > > > ('Swim', 'Rest'). The conditions are stored in the 'eventvalue' field > > of > > > > the cfg as 1x2 cell array. The event values are stored in the > > > > > > 'data_ref.cfg.previous.previous.previous{1,1}.previous.previous.trialdef.eventvalue' > > > > field of the data set. > > > > Having done the preprocessing I now would like to do > > ft_timelockanalysis > > > > and ft_freqanalysis on the data. Afterwards I statistically compare > > the two > > > > conditions using ft_timelockstatistics and ft_freqstatistics. > > > > How can I split the data set according to the event values ('Swim', > > > > 'Rest')? I need the event values to split the data set into the two > > trial > > > > classes in the ft_timelockanalysis / ft_freqanalysis and to compare > > these > > > > two conditions. > > > > > > > > I tried ft_redefinetrial, but do not know how to define the cfg.trials > > > > field of this function. > > > > > > > > % trial redefinition > > > > > > > > % containing only trials in the 'swim' condition > > > > cfg.trials = (1, > > > > > > data_ref.cfg.previous.previous.previous{1,1}.previous.previous.trialdef.eventvalue(1,1)); > > > > swim = ft_redefinetrial(cfg,data_ref); > > > > > > > > % containing only trials in the 'resting' condition > > > > cfg.trials = (1, > > > > > > data_ref.cfg.previous.previous.previous{1,1}.previous.previous.trialdef.eventvalue(1,2)); > > > > rest = ft_redefinetrial(cfg,data_ref); > > > > > > > > I hope the description was quite clear. In case, I can provide some > > more > > > > lines of code to clarify the issue. > > > > > > > > Thank you very much in advance for your advice! > > > > > > > > Best regards, > > > > Martin > > > > > > > > -- > > > > M.Sc.-Psych. Martin Rosenfelder > > > > Wissenschaftlicher Mitarbeiter > > > > Klinische und Biologische Psychologie > > > > Universität Ulm > > > > Raum 47.2.259 > > > > +49 731-50 26592 > > > > martin.rosenfelder at uni-ulm.de > > > > > > > > > > > > _______________________________________________ > > > > 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 martin.rosenfelder at uni-ulm.de Wed Jan 16 17:08:22 2019 From: martin.rosenfelder at uni-ulm.de (Martin Rosenfelder) Date: Wed, 16 Jan 2019 17:08:22 +0100 Subject: [FieldTrip] =?utf-8?b?Pz09P3V0Zi04P3E/ID89PT91dGYtOD9xPyA/PSBy?= =?utf-8?q?edefining_data_se?= In-Reply-To: <855A27CB-F840-43CD-A39C-755734B3177B@donders.ru.nl> Message-ID: <4b5d-5c3f5700-5-12ad6c40@225121778> Dear Jan Mathijs, Thank you for your tip. The code you suggested does not work with my data set, as there is no .trialinfo field. The same I wrote to Stephen before. I wonder why the .trialinfo field is not being created automatically (as it should?) when calling ft_preprocessing. Do you have an idea why it is like that? Many thanks in advance! Best, Martin -- M.Sc.-Psych. Martin Rosenfelder Wissenschaftlicher Mitarbeiter Klinische und Biologische Psychologie Universität Ulm Raum 47.2.259 +49 731-50 26592 martin.rosenfelder at uni-ulm.de Am Dienstag, 15. Januar 2019 17:43 CET, "Schoffelen, J.M. (Jan Mathijs)" schrieb: > If I may chime in: are you by any chance looking for data.trialinfo(:,x) = [event.value]’ ? > > Best JM > > > On 15 Jan 2019, at 17:40, Stephen Whitmarsh > wrote: > > Hi Martin, > > No indeed, your conditions/RT/events should indeed be (re)coded as single values. This also makes selecting trials etc. much easier with logical expressions, e.g. you can then simply do cfg.trials = (data.trialinfo(:,1) == 3 && data.trialinfo(:,2) > 0.5, where the first column e.g. is your condition, and the second RT, to just give an example. > > Cheers, > Stephen > > On Tue, 15 Jan 2019 at 17:35, Martin Rosenfelder > wrote: > Dear Stephen, > > Thank you very much for the hint on ft_selectdata. > > I tried to build the structure for .trialinfo as you described it in your reply. I did this creating a structure array with the eventvalues as elements. > Then I concatenated the .trl matrix and the event value matrix. This however failed, since .trl is a double array and the event value matrix is a struct array. > I double-checked that the nr. of rows in the two matrices match each other (120 elements). > > Is there a way to add the event value matrix (120x1 struct) to the .trl matrix (120x3 double)? > > Best, > Martin > > > -- > M.Sc.-Psych. Martin Rosenfelder > Wissenschaftlicher Mitarbeiter > Klinische und Biologische Psychologie > Universität Ulm > Raum 47.2.259 > +49 731-50 26592 > martin.rosenfelder at uni-ulm.de > > Am Montag, 14. Januar 2019 19:01 CET, Stephen Whitmarsh > schrieb: > > > Dear Martin, > > > > Use ft_selectdata instead of ft_redefinetrial. > > > > "cfg.previous.previous.previous{1,1}.previous.previous.trialdef.eventvalue(1,2)" > > is scary! And I can imagine very inconvenient, as it will move deeper and > > deeper in to infinite previousnessness. > > Instead, one of the best 'easter eggs' (i.e. not so well-documented > > functionality) of FieldTrip is to create extra columns of info in your .trl > > when using preprocessing to epoch your data. These extra columns will then > > enter into a field .trialinfo of your data. Most if not all functions, such > > as ft_selectdata (selecting trials) will update that field. So I advice you > > to put your eventvalue (as well as RT, response, etc. etc.) as columns in > > your trialinfo (so same nr. of rows as your nr. of trials). In this way, > > they will travel with your data, and stay in the same structure and on the > > same level whatever happens. > > > > Cheers, > > Stephen > > > > > > On Mon, 14 Jan 2019 at 18:47, Martin Rosenfelder < > > martin.rosenfelder at uni-ulm.de> wrote: > > > > > Dear Fieldtrip community, > > > > > > I have preprocessed a single dataset with two different conditions > > > ('Swim', 'Rest'). The conditions are stored in the 'eventvalue' field of > > > the cfg as 1x2 cell array. The event values are stored in the > > > 'data_ref.cfg.previous.previous.previous{1,1}.previous.previous.trialdef.eventvalue' > > > field of the data set. > > > Having done the preprocessing I now would like to do ft_timelockanalysis > > > and ft_freqanalysis on the data. Afterwards I statistically compare the two > > > conditions using ft_timelockstatistics and ft_freqstatistics. > > > How can I split the data set according to the event values ('Swim', > > > 'Rest')? I need the event values to split the data set into the two trial > > > classes in the ft_timelockanalysis / ft_freqanalysis and to compare these > > > two conditions. > > > > > > I tried ft_redefinetrial, but do not know how to define the cfg.trials > > > field of this function. > > > > > > % trial redefinition > > > > > > % containing only trials in the 'swim' condition > > > cfg.trials = (1, > > > data_ref.cfg.previous.previous.previous{1,1}.previous.previous.trialdef.eventvalue(1,1)); > > > swim = ft_redefinetrial(cfg,data_ref); > > > > > > % containing only trials in the 'resting' condition > > > cfg.trials = (1, > > > data_ref.cfg.previous.previous.previous{1,1}.previous.previous.trialdef.eventvalue(1,2)); > > > rest = ft_redefinetrial(cfg,data_ref); > > > > > > I hope the description was quite clear. In case, I can provide some more > > > lines of code to clarify the issue. > > > > > > Thank you very much in advance for your advice! > > > > > > Best regards, > > > Martin > > > > > > -- > > > M.Sc.-Psych. Martin Rosenfelder > > > Wissenschaftlicher Mitarbeiter > > > Klinische und Biologische Psychologie > > > Universität Ulm > > > Raum 47.2.259 > > > +49 731-50 26592 > > > martin.rosenfelder at uni-ulm.de > > > > > > > > > _______________________________________________ > > > 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 > From stephen.whitmarsh at gmail.com Wed Jan 16 17:35:33 2019 From: stephen.whitmarsh at gmail.com (Stephen Whitmarsh) Date: Wed, 16 Jan 2019 17:35:33 +0100 Subject: [FieldTrip] ?= redefining data se In-Reply-To: <47c7-5c3f5480-13-26d82bc0@58067294> References: <47c7-5c3f5480-13-26d82bc0@58067294> Message-ID: Hi Martin, If I understand correctly: If you add columns* to your .trl field* (so after the first 3 that define start/end/offset samples) which you feed into ft_preprocessing, ft_preprocessing will create the .trialinfo field for you, which should track through your analyses. Cheers, Stephen On Wed, 16 Jan 2019 at 17:15, Martin Rosenfelder < martin.rosenfelder at uni-ulm.de> wrote: > Hi Stephen, > > Exactly, preferably, the events should be single values in a struct array > or a cell array. > This can then be added to the existing trial array. So far so good. > > However, my dataset misses a .trialinfo field after calling > ft_preprocessing, to which I could add the cell array with the condition > labels. > I then added the array with the condition labels to 'mydataset.trial'. > Unfortunately, this seems to confuse the ft_rejectvisual I call afterwards > for artifact rejection. > Do I have to create the .trialinfo-field by hand to my dataset? > > Best, > Martin > > > -- > M.Sc.-Psych. Martin Rosenfelder > Wissenschaftlicher Mitarbeiter > Klinische und Biologische Psychologie > Universität Ulm > Raum 47.2.259 > +49 731-50 26592 > martin.rosenfelder at uni-ulm.de > > Am Dienstag, 15. Januar 2019 17:40 CET, Stephen Whitmarsh < > stephen.whitmarsh at gmail.com> schrieb: > > > Hi Martin, > > > > No indeed, your conditions/RT/events should indeed be (re)coded as single > > values. This also makes selecting trials etc. much easier with logical > > expressions, e.g. you can then simply do cfg.trials = > (data.trialinfo(:,1) > > == 3 && data.trialinfo(:,2) > 0.5, where the first column e.g. is your > > condition, and the second RT, to just give an example. > > > > Cheers, > > Stephen > > > > On Tue, 15 Jan 2019 at 17:35, Martin Rosenfelder < > > martin.rosenfelder at uni-ulm.de> wrote: > > > > > Dear Stephen, > > > > > > Thank you very much for the hint on ft_selectdata. > > > > > > I tried to build the structure for .trialinfo as you described it in > your > > > reply. I did this creating a structure array with the eventvalues as > > > elements. > > > Then I concatenated the .trl matrix and the event value matrix. This > > > however failed, since .trl is a double array and the event value > matrix is > > > a struct array. > > > I double-checked that the nr. of rows in the two matrices match each > other > > > (120 elements). > > > > > > Is there a way to add the event value matrix (120x1 struct) to the .trl > > > matrix (120x3 double)? > > > > > > Best, > > > Martin > > > > > > > > > -- > > > M.Sc.-Psych. Martin Rosenfelder > > > Wissenschaftlicher Mitarbeiter > > > Klinische und Biologische Psychologie > > > Universität Ulm > > > Raum 47.2.259 > > > +49 731-50 26592 > > > martin.rosenfelder at uni-ulm.de > > > > > > Am Montag, 14. Januar 2019 19:01 CET, Stephen Whitmarsh < > > > stephen.whitmarsh at gmail.com> schrieb: > > > > > > > Dear Martin, > > > > > > > > Use ft_selectdata instead of ft_redefinetrial. > > > > > > > > > > > > "cfg.previous.previous.previous{1,1}.previous.previous.trialdef.eventvalue(1,2)" > > > > is scary! And I can imagine very inconvenient, as it will move > deeper and > > > > deeper in to infinite previousnessness. > > > > Instead, one of the best 'easter eggs' (i.e. not so well-documented > > > > functionality) of FieldTrip is to create extra columns of info in > your > > > .trl > > > > when using preprocessing to epoch your data. These extra columns will > > > then > > > > enter into a field .trialinfo of your data. Most if not all > functions, > > > such > > > > as ft_selectdata (selecting trials) will update that field. So I > advice > > > you > > > > to put your eventvalue (as well as RT, response, etc. etc.) as > columns in > > > > your trialinfo (so same nr. of rows as your nr. of trials). In this > way, > > > > they will travel with your data, and stay in the same structure and > on > > > the > > > > same level whatever happens. > > > > > > > > Cheers, > > > > Stephen > > > > > > > > > > > > On Mon, 14 Jan 2019 at 18:47, Martin Rosenfelder < > > > > martin.rosenfelder at uni-ulm.de> wrote: > > > > > > > > > Dear Fieldtrip community, > > > > > > > > > > I have preprocessed a single dataset with two different conditions > > > > > ('Swim', 'Rest'). The conditions are stored in the 'eventvalue' > field > > > of > > > > > the cfg as 1x2 cell array. The event values are stored in the > > > > > > > > > 'data_ref.cfg.previous.previous.previous{1,1}.previous.previous.trialdef.eventvalue' > > > > > field of the data set. > > > > > Having done the preprocessing I now would like to do > > > ft_timelockanalysis > > > > > and ft_freqanalysis on the data. Afterwards I statistically compare > > > the two > > > > > conditions using ft_timelockstatistics and ft_freqstatistics. > > > > > How can I split the data set according to the event values ('Swim', > > > > > 'Rest')? I need the event values to split the data set into the two > > > trial > > > > > classes in the ft_timelockanalysis / ft_freqanalysis and to compare > > > these > > > > > two conditions. > > > > > > > > > > I tried ft_redefinetrial, but do not know how to define the > cfg.trials > > > > > field of this function. > > > > > > > > > > % trial redefinition > > > > > > > > > > % containing only trials in the 'swim' condition > > > > > cfg.trials = (1, > > > > > > > > > data_ref.cfg.previous.previous.previous{1,1}.previous.previous.trialdef.eventvalue(1,1)); > > > > > swim = ft_redefinetrial(cfg,data_ref); > > > > > > > > > > % containing only trials in the 'resting' condition > > > > > cfg.trials = (1, > > > > > > > > > data_ref.cfg.previous.previous.previous{1,1}.previous.previous.trialdef.eventvalue(1,2)); > > > > > rest = ft_redefinetrial(cfg,data_ref); > > > > > > > > > > I hope the description was quite clear. In case, I can provide some > > > more > > > > > lines of code to clarify the issue. > > > > > > > > > > Thank you very much in advance for your advice! > > > > > > > > > > Best regards, > > > > > Martin > > > > > > > > > > -- > > > > > M.Sc.-Psych. Martin Rosenfelder > > > > > Wissenschaftlicher Mitarbeiter > > > > > Klinische und Biologische Psychologie > > > > > Universität Ulm > > > > > Raum 47.2.259 > > > > > +49 731-50 26592 > > > > > martin.rosenfelder at uni-ulm.de > > > > > > > > > > > > > > > _______________________________________________ > > > > > 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 marion.vincent at univ-lille.fr Thu Jan 17 10:37:20 2019 From: marion.vincent at univ-lille.fr (Marion Vincent) Date: Thu, 17 Jan 2019 10:37:20 +0100 (CET) Subject: [FieldTrip] Baseline removal errors in trials preprocessing Message-ID: <1783145268.1402885.1547717840566.JavaMail.zimbra@zimbra-store10.univ-lille.fr> Dear FIeldtrip users, I’m new in using Fieldtrip for EEG processing and I’ve encountred some issues while removing the Baseline of my trials. I’m working on EEG signals recorded with the BioSemi system. My pre-processing method is : (1) Re-referecing the channels (necessary with BioSemi) (2) Trial definition (3) Baseline removal I’ve read on the documentation that ft_preprocessing xcan have several cfg parameter for the Baseline removal : % cfg.demean = 'yes';%'no' or 'yes', whether to apply baseline correction (default = 'no') % cfg.baselinewindow = 'all';%[begin end] ;%in seconds, the default is the complete trial (default = 'all') % cfg.detrend = 'no'; %'no' or 'yes', remove linear trend from the data (done per trial) (default = 'no') I wanted to remove a Baseline defined as the average of a given window preceeding my stimulus onset. I tried to use : cfg.baselinewindow = [-0.5 0 ]; cfg.baselinewindow = [0 0.1] or the default window . But the problem is that I always have the same result, no matter the window I use : the first point of my trial is put to zero and substracted to all my trial. I’m sure I’m doing something wrong (and that the answer is very simple), but I can’t manage to understand what is the issue. Do you have any advice ? Thanks ! Marion Marion VINCENT Eng., PhD , CNRS Research Engineer -------------- next part -------------- An HTML attachment was scrubbed... URL: From martin.rosenfelder at uni-ulm.de Thu Jan 17 11:14:15 2019 From: martin.rosenfelder at uni-ulm.de (Martin Rosenfelder) Date: Thu, 17 Jan 2019 11:14:15 +0100 Subject: [FieldTrip] =?utf-8?b?Pz09P3V0Zi04P3E/ID89PT91dGYtOD9xPyA/PSBy?= =?utf-8?q?edefining_data_se?= In-Reply-To: Message-ID: <1bc3-5c405580-5-1e7d9040@211415180> Hi Stephen, I now managed to add the event column to my .trl field. This is now a (120x4) matrix. When calling ft_preprocessing, it automatically creates the .trialinfo field. Surprisingly, this .trialinfo matrix is now only a (1x120) matrix instead of a (4x120) matrix and it contains solely the event values. The start/end/offset samples are missing. At the moment I don't have any disadvantages from that, but I don't know if this will turn out to be problematic. Best, Martin -- M.Sc.-Psych. Martin Rosenfelder Wissenschaftlicher Mitarbeiter Klinische und Biologische Psychologie Universität Ulm Raum 47.2.259 +49 731-50 26592 martin.rosenfelder at uni-ulm.de Am Mittwoch, 16. Januar 2019 17:35 CET, Stephen Whitmarsh schrieb: > Hi Martin, > > If I understand correctly: If you add columns* to your .trl field* (so > after the first 3 that define start/end/offset samples) which you feed into > ft_preprocessing, ft_preprocessing will create the .trialinfo field for > you, which should track through your analyses. > > Cheers, > Stephen > > On Wed, 16 Jan 2019 at 17:15, Martin Rosenfelder < > martin.rosenfelder at uni-ulm.de> wrote: > > > Hi Stephen, > > > > Exactly, preferably, the events should be single values in a struct array > > or a cell array. > > This can then be added to the existing trial array. So far so good. > > > > However, my dataset misses a .trialinfo field after calling > > ft_preprocessing, to which I could add the cell array with the condition > > labels. > > I then added the array with the condition labels to 'mydataset.trial'. > > Unfortunately, this seems to confuse the ft_rejectvisual I call afterwards > > for artifact rejection. > > Do I have to create the .trialinfo-field by hand to my dataset? > > > > Best, > > Martin > > > > > > -- > > M.Sc.-Psych. Martin Rosenfelder > > Wissenschaftlicher Mitarbeiter > > Klinische und Biologische Psychologie > > Universität Ulm > > Raum 47.2.259 > > +49 731-50 26592 > > martin.rosenfelder at uni-ulm.de > > > > Am Dienstag, 15. Januar 2019 17:40 CET, Stephen Whitmarsh < > > stephen.whitmarsh at gmail.com> schrieb: > > > > > Hi Martin, > > > > > > No indeed, your conditions/RT/events should indeed be (re)coded as single > > > values. This also makes selecting trials etc. much easier with logical > > > expressions, e.g. you can then simply do cfg.trials = > > (data.trialinfo(:,1) > > > == 3 && data.trialinfo(:,2) > 0.5, where the first column e.g. is your > > > condition, and the second RT, to just give an example. > > > > > > Cheers, > > > Stephen > > > > > > On Tue, 15 Jan 2019 at 17:35, Martin Rosenfelder < > > > martin.rosenfelder at uni-ulm.de> wrote: > > > > > > > Dear Stephen, > > > > > > > > Thank you very much for the hint on ft_selectdata. > > > > > > > > I tried to build the structure for .trialinfo as you described it in > > your > > > > reply. I did this creating a structure array with the eventvalues as > > > > elements. > > > > Then I concatenated the .trl matrix and the event value matrix. This > > > > however failed, since .trl is a double array and the event value > > matrix is > > > > a struct array. > > > > I double-checked that the nr. of rows in the two matrices match each > > other > > > > (120 elements). > > > > > > > > Is there a way to add the event value matrix (120x1 struct) to the .trl > > > > matrix (120x3 double)? > > > > > > > > Best, > > > > Martin > > > > > > > > > > > > -- > > > > M.Sc.-Psych. Martin Rosenfelder > > > > Wissenschaftlicher Mitarbeiter > > > > Klinische und Biologische Psychologie > > > > Universität Ulm > > > > Raum 47.2.259 > > > > +49 731-50 26592 > > > > martin.rosenfelder at uni-ulm.de > > > > > > > > Am Montag, 14. Januar 2019 19:01 CET, Stephen Whitmarsh < > > > > stephen.whitmarsh at gmail.com> schrieb: > > > > > > > > > Dear Martin, > > > > > > > > > > Use ft_selectdata instead of ft_redefinetrial. > > > > > > > > > > > > > > > > "cfg.previous.previous.previous{1,1}.previous.previous.trialdef.eventvalue(1,2)" > > > > > is scary! And I can imagine very inconvenient, as it will move > > deeper and > > > > > deeper in to infinite previousnessness. > > > > > Instead, one of the best 'easter eggs' (i.e. not so well-documented > > > > > functionality) of FieldTrip is to create extra columns of info in > > your > > > > .trl > > > > > when using preprocessing to epoch your data. These extra columns will > > > > then > > > > > enter into a field .trialinfo of your data. Most if not all > > functions, > > > > such > > > > > as ft_selectdata (selecting trials) will update that field. So I > > advice > > > > you > > > > > to put your eventvalue (as well as RT, response, etc. etc.) as > > columns in > > > > > your trialinfo (so same nr. of rows as your nr. of trials). In this > > way, > > > > > they will travel with your data, and stay in the same structure and > > on > > > > the > > > > > same level whatever happens. > > > > > > > > > > Cheers, > > > > > Stephen > > > > > > > > > > > > > > > On Mon, 14 Jan 2019 at 18:47, Martin Rosenfelder < > > > > > martin.rosenfelder at uni-ulm.de> wrote: > > > > > > > > > > > Dear Fieldtrip community, > > > > > > > > > > > > I have preprocessed a single dataset with two different conditions > > > > > > ('Swim', 'Rest'). The conditions are stored in the 'eventvalue' > > field > > > > of > > > > > > the cfg as 1x2 cell array. The event values are stored in the > > > > > > > > > > > > 'data_ref.cfg.previous.previous.previous{1,1}.previous.previous.trialdef.eventvalue' > > > > > > field of the data set. > > > > > > Having done the preprocessing I now would like to do > > > > ft_timelockanalysis > > > > > > and ft_freqanalysis on the data. Afterwards I statistically compare > > > > the two > > > > > > conditions using ft_timelockstatistics and ft_freqstatistics. > > > > > > How can I split the data set according to the event values ('Swim', > > > > > > 'Rest')? I need the event values to split the data set into the two > > > > trial > > > > > > classes in the ft_timelockanalysis / ft_freqanalysis and to compare > > > > these > > > > > > two conditions. > > > > > > > > > > > > I tried ft_redefinetrial, but do not know how to define the > > cfg.trials > > > > > > field of this function. > > > > > > > > > > > > % trial redefinition > > > > > > > > > > > > % containing only trials in the 'swim' condition > > > > > > cfg.trials = (1, > > > > > > > > > > > > data_ref.cfg.previous.previous.previous{1,1}.previous.previous.trialdef.eventvalue(1,1)); > > > > > > swim = ft_redefinetrial(cfg,data_ref); > > > > > > > > > > > > % containing only trials in the 'resting' condition > > > > > > cfg.trials = (1, > > > > > > > > > > > > data_ref.cfg.previous.previous.previous{1,1}.previous.previous.trialdef.eventvalue(1,2)); > > > > > > rest = ft_redefinetrial(cfg,data_ref); > > > > > > > > > > > > I hope the description was quite clear. In case, I can provide some > > > > more > > > > > > lines of code to clarify the issue. > > > > > > > > > > > > Thank you very much in advance for your advice! > > > > > > > > > > > > Best regards, > > > > > > Martin > > > > > > > > > > > > -- > > > > > > M.Sc.-Psych. Martin Rosenfelder > > > > > > Wissenschaftlicher Mitarbeiter > > > > > > Klinische und Biologische Psychologie > > > > > > Universität Ulm > > > > > > Raum 47.2.259 > > > > > > +49 731-50 26592 > > > > > > martin.rosenfelder at uni-ulm.de > > > > > > > > > > > > > > > > > > _______________________________________________ > > > > > > 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 > > From stephen.whitmarsh at gmail.com Thu Jan 17 11:34:39 2019 From: stephen.whitmarsh at gmail.com (Stephen Whitmarsh) Date: Thu, 17 Jan 2019 11:34:39 +0100 Subject: [FieldTrip] Baseline removal errors in trials preprocessing In-Reply-To: <1783145268.1402885.1547717840566.JavaMail.zimbra@zimbra-store10.univ-lille.fr> References: <1783145268.1402885.1547717840566.JavaMail.zimbra@zimbra-store10.univ-lille.fr> Message-ID: <010801d4ae50$40028270$c0078750$@gmail.com> Dear Marion, It sounds it might indeed be something as simple as a typo. Could you paste the part of your script – from baseline removal to plotting (where you don’t see a difference) - so we can take a look? Cheers, Stephen From: fieldtrip On Behalf Of Marion Vincent Sent: Thursday, January 17, 2019 10:37 AM To: fieldtrip at science.ru.nl Subject: [FieldTrip] Baseline removal errors in trials preprocessing Dear FIeldtrip users, I’m new in using Fieldtrip for EEG processing and I’ve encountred some issues while removing the Baseline of my trials. I’m working on EEG signals recorded with the BioSemi system. My pre-processing method is : (1) Re-referecing the channels (necessary with BioSemi) (2) Trial definition (3) Baseline removal I’ve read on the documentation that ft_preprocessing xcan have several cfg parameter for the Baseline removal : % cfg.demean = 'yes';%'no' or 'yes', whether to apply baseline correction (default = 'no') % cfg.baselinewindow = 'all';%[begin end] ;%in seconds, the default is the complete trial (default = 'all') % cfg.detrend = 'no'; %'no' or 'yes', remove linear trend from the data (done per trial) (default = 'no') I wanted to remove a Baseline defined as the average of a given window preceeding my stimulus onset. I tried to use : cfg.baselinewindow = [-0.5 0 ]; cfg.baselinewindow = [0 0.1] or the default window . But the problem is that I always have the same result, no matter the window I use : the first point of my trial is put to zero and substracted to all my trial. I’m sure I’m doing something wrong (and that the answer is very simple), but I can’t manage to understand what is the issue. Do you have any advice ? Thanks ! Marion Marion VINCENT Eng., PhD , CNRS Research Engineer -------------- next part -------------- An HTML attachment was scrubbed... URL: From stephen.whitmarsh at gmail.com Thu Jan 17 12:25:03 2019 From: stephen.whitmarsh at gmail.com (Stephen Whitmarsh) Date: Thu, 17 Jan 2019 12:25:03 +0100 Subject: [FieldTrip] ?= redefining data se In-Reply-To: <1bc3-5c405580-5-1e7d9040@211415180> References: <1bc3-5c405580-5-1e7d9040@211415180> Message-ID: Hi Martin, Great. That is what is expected. The time-units of the original data was in samples. The first 3 columns defined the trial start, end, and offset, with respect to trial onset, i.e. stimulation, *defined in samples*. After segmentation, time is expressed not in samples but with *time relative to trial onset*, i.e. your .time field. Start and end samples (i.. reference to original dataset in samples) are maintained, not in the trialinfo, but in the sampleinfo field of your data. However, after you e.g. concatenate datasets, resample your data, that information becomes erroneous, and will be removed by functions such as append-data. So as an answer - no, it should be a problem later one. HTH, good FieldTripping! Stephen On Thu, 17 Jan 2019 at 11:43, Martin Rosenfelder < martin.rosenfelder at uni-ulm.de> wrote: > Hi Stephen, > > I now managed to add the event column to my .trl field. This is now a > (120x4) matrix. When calling ft_preprocessing, it automatically creates the > .trialinfo field. Surprisingly, this .trialinfo matrix is now only a > (1x120) matrix instead of a (4x120) matrix and it contains solely the event > values. The start/end/offset samples are missing. At the moment I don't > have any disadvantages from that, but I don't know if this will turn out to > be problematic. > > Best, > Martin > > -- > M.Sc.-Psych. Martin Rosenfelder > Wissenschaftlicher Mitarbeiter > Klinische und Biologische Psychologie > Universität Ulm > Raum 47.2.259 > +49 731-50 26592 > martin.rosenfelder at uni-ulm.de > > Am Mittwoch, 16. Januar 2019 17:35 CET, Stephen Whitmarsh < > stephen.whitmarsh at gmail.com> schrieb: > > > Hi Martin, > > > > If I understand correctly: If you add columns* to your .trl field* (so > > after the first 3 that define start/end/offset samples) which you feed > into > > ft_preprocessing, ft_preprocessing will create the .trialinfo field for > > you, which should track through your analyses. > > > > Cheers, > > Stephen > > > > On Wed, 16 Jan 2019 at 17:15, Martin Rosenfelder < > > martin.rosenfelder at uni-ulm.de> wrote: > > > > > Hi Stephen, > > > > > > Exactly, preferably, the events should be single values in a struct > array > > > or a cell array. > > > This can then be added to the existing trial array. So far so good. > > > > > > However, my dataset misses a .trialinfo field after calling > > > ft_preprocessing, to which I could add the cell array with the > condition > > > labels. > > > I then added the array with the condition labels to 'mydataset.trial'. > > > Unfortunately, this seems to confuse the ft_rejectvisual I call > afterwards > > > for artifact rejection. > > > Do I have to create the .trialinfo-field by hand to my dataset? > > > > > > Best, > > > Martin > > > > > > > > > -- > > > M.Sc.-Psych. Martin Rosenfelder > > > Wissenschaftlicher Mitarbeiter > > > Klinische und Biologische Psychologie > > > Universität Ulm > > > Raum 47.2.259 > > > +49 731-50 26592 > > > martin.rosenfelder at uni-ulm.de > > > > > > Am Dienstag, 15. Januar 2019 17:40 CET, Stephen Whitmarsh < > > > stephen.whitmarsh at gmail.com> schrieb: > > > > > > > Hi Martin, > > > > > > > > No indeed, your conditions/RT/events should indeed be (re)coded as > single > > > > values. This also makes selecting trials etc. much easier with > logical > > > > expressions, e.g. you can then simply do cfg.trials = > > > (data.trialinfo(:,1) > > > > == 3 && data.trialinfo(:,2) > 0.5, where the first column e.g. is > your > > > > condition, and the second RT, to just give an example. > > > > > > > > Cheers, > > > > Stephen > > > > > > > > On Tue, 15 Jan 2019 at 17:35, Martin Rosenfelder < > > > > martin.rosenfelder at uni-ulm.de> wrote: > > > > > > > > > Dear Stephen, > > > > > > > > > > Thank you very much for the hint on ft_selectdata. > > > > > > > > > > I tried to build the structure for .trialinfo as you described it > in > > > your > > > > > reply. I did this creating a structure array with the eventvalues > as > > > > > elements. > > > > > Then I concatenated the .trl matrix and the event value matrix. > This > > > > > however failed, since .trl is a double array and the event value > > > matrix is > > > > > a struct array. > > > > > I double-checked that the nr. of rows in the two matrices match > each > > > other > > > > > (120 elements). > > > > > > > > > > Is there a way to add the event value matrix (120x1 struct) to the > .trl > > > > > matrix (120x3 double)? > > > > > > > > > > Best, > > > > > Martin > > > > > > > > > > > > > > > -- > > > > > M.Sc.-Psych. Martin Rosenfelder > > > > > Wissenschaftlicher Mitarbeiter > > > > > Klinische und Biologische Psychologie > > > > > Universität Ulm > > > > > Raum 47.2.259 > > > > > +49 731-50 26592 > > > > > martin.rosenfelder at uni-ulm.de > > > > > > > > > > Am Montag, 14. Januar 2019 19:01 CET, Stephen Whitmarsh < > > > > > stephen.whitmarsh at gmail.com> schrieb: > > > > > > > > > > > Dear Martin, > > > > > > > > > > > > Use ft_selectdata instead of ft_redefinetrial. > > > > > > > > > > > > > > > > > > > > > "cfg.previous.previous.previous{1,1}.previous.previous.trialdef.eventvalue(1,2)" > > > > > > is scary! And I can imagine very inconvenient, as it will move > > > deeper and > > > > > > deeper in to infinite previousnessness. > > > > > > Instead, one of the best 'easter eggs' (i.e. not so > well-documented > > > > > > functionality) of FieldTrip is to create extra columns of info in > > > your > > > > > .trl > > > > > > when using preprocessing to epoch your data. These extra columns > will > > > > > then > > > > > > enter into a field .trialinfo of your data. Most if not all > > > functions, > > > > > such > > > > > > as ft_selectdata (selecting trials) will update that field. So I > > > advice > > > > > you > > > > > > to put your eventvalue (as well as RT, response, etc. etc.) as > > > columns in > > > > > > your trialinfo (so same nr. of rows as your nr. of trials). In > this > > > way, > > > > > > they will travel with your data, and stay in the same structure > and > > > on > > > > > the > > > > > > same level whatever happens. > > > > > > > > > > > > Cheers, > > > > > > Stephen > > > > > > > > > > > > > > > > > > On Mon, 14 Jan 2019 at 18:47, Martin Rosenfelder < > > > > > > martin.rosenfelder at uni-ulm.de> wrote: > > > > > > > > > > > > > Dear Fieldtrip community, > > > > > > > > > > > > > > I have preprocessed a single dataset with two different > conditions > > > > > > > ('Swim', 'Rest'). The conditions are stored in the 'eventvalue' > > > field > > > > > of > > > > > > > the cfg as 1x2 cell array. The event values are stored in the > > > > > > > > > > > > > > > > 'data_ref.cfg.previous.previous.previous{1,1}.previous.previous.trialdef.eventvalue' > > > > > > > field of the data set. > > > > > > > Having done the preprocessing I now would like to do > > > > > ft_timelockanalysis > > > > > > > and ft_freqanalysis on the data. Afterwards I statistically > compare > > > > > the two > > > > > > > conditions using ft_timelockstatistics and ft_freqstatistics. > > > > > > > How can I split the data set according to the event values > ('Swim', > > > > > > > 'Rest')? I need the event values to split the data set into > the two > > > > > trial > > > > > > > classes in the ft_timelockanalysis / ft_freqanalysis and to > compare > > > > > these > > > > > > > two conditions. > > > > > > > > > > > > > > I tried ft_redefinetrial, but do not know how to define the > > > cfg.trials > > > > > > > field of this function. > > > > > > > > > > > > > > % trial redefinition > > > > > > > > > > > > > > % containing only trials in the 'swim' condition > > > > > > > cfg.trials = (1, > > > > > > > > > > > > > > > > data_ref.cfg.previous.previous.previous{1,1}.previous.previous.trialdef.eventvalue(1,1)); > > > > > > > swim = ft_redefinetrial(cfg,data_ref); > > > > > > > > > > > > > > % containing only trials in the 'resting' condition > > > > > > > cfg.trials = (1, > > > > > > > > > > > > > > > > data_ref.cfg.previous.previous.previous{1,1}.previous.previous.trialdef.eventvalue(1,2)); > > > > > > > rest = ft_redefinetrial(cfg,data_ref); > > > > > > > > > > > > > > I hope the description was quite clear. In case, I can provide > some > > > > > more > > > > > > > lines of code to clarify the issue. > > > > > > > > > > > > > > Thank you very much in advance for your advice! > > > > > > > > > > > > > > Best regards, > > > > > > > Martin > > > > > > > > > > > > > > -- > > > > > > > M.Sc.-Psych. Martin Rosenfelder > > > > > > > Wissenschaftlicher Mitarbeiter > > > > > > > Klinische und Biologische Psychologie > > > > > > > Universität Ulm > > > > > > > Raum 47.2.259 > > > > > > > +49 731-50 26592 > > > > > > > martin.rosenfelder at uni-ulm.de > > > > > > > > > > > > > > > > > > > > > _______________________________________________ > > > > > > > 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 > > > > > > > > > _______________________________________________ > 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 martabortoletto at yahoo.it Thu Jan 17 12:39:10 2019 From: martabortoletto at yahoo.it (Marta Bortoletto) Date: Thu, 17 Jan 2019 11:39:10 +0000 (UTC) Subject: [FieldTrip] How to handle results from cluster based permutation? References: <1806037147.1487896.1547725150947.ref@mail.yahoo.com> Message-ID: <1806037147.1487896.1547725150947@mail.yahoo.com> Dear Fieldtrip community,I have a queston related to further exploration of results after a significant effect of a cluster based permutation analysis. I am using cluster based permutation test to look for differences in evoked potentials amplitude before and after a learning task. I found that there is a significant difference between the two conditions, with the largest cluster between 80 and 140 ms on frontocentral electrodes. Now, I would like to test if the change in evoked potentials between pre- and post-task is related to the behavioral improvement by running correlation analyses. My question is how can I do that. My understanding is that taking the mean activity in the cluster to run the correlation with behavioural data is problematic. Shall I rather run correlation analyses with cluster based permutation on the evoked potentials, perhaps restricting the analyses to the time window highlighted in the first analysis (80-140 ms)? I would really appreciate your help with this.Marta -------------- next part -------------- An HTML attachment was scrubbed... URL: From juan.lei at hotmail.com Thu Jan 17 13:21:18 2019 From: juan.lei at hotmail.com (Juan Lei) Date: Thu, 17 Jan 2019 12:21:18 +0000 Subject: [FieldTrip] calculatng behavioral-power correlation Message-ID: Dear Fieldtrip users and developers I am confused about some information regarding calculating behavioral-power correlation. on this pape http://www.fieldtriptoolbox.org/faq/how_can_i_test_for_correlations_between_neuronal_data_and_quantitative_stimulus_and_behavioural_variables/ How can I test for correlations between neuronal data and quantitative stimulus and behavioural variables? - FieldTrip toolbox It is important to make a distinction between categorical and quantitative independent variables, because these are associated with different test statistics. www.fieldtriptoolbox.org in the examples for Quantitative Independent Variable, it seems that all parameter settings are the same for both ft_statfun_indepsamplesregrT and ft_statfun_correlationT. "design" only has one row with behavioural data, and only the brain data as Input for ft_freqstatistics: n1 = 3; % n1 is the number of subjects design(1,1:n1) = [0.6 0.9 0.1]; %here we insert our independent variable (behavioral data) in the cfg.design matrix, in this case reaction times of 3 subjects. cfg.design = design; cfg.ivar = 1; stat = ft_freqstatistics(cfg, data_brain{:}); However, in another post https://mailman.science.ru.nl/pipermail/fieldtrip/2015-February/008950.html [FieldTrip] calculating behavioural-power correlation Dear Frederic, >From my limited understanding, the way you specify your design matrix seems correct to me.I did the same thing as well, however, I was not interested in the correlation along the time dimension, and I averaged some frequencies to examine my behavioural-power change correlation with specific frequency bands (e.g. 2 - 4 Hz for Delta band, 4 - 8 Hz for Theta band, etc). mailman.science.ru.nl it says "create a variable for the behavioural measure such that the variable contains a powspctrm field with the behavioural information for every frequency" as the other Input for ft_freqstatistica. Here "design" has two rows. cfg.design = []; cfg.design(1,:) = [ones(1,lenght(Y)) 2*ones(1,length(Y))]; cfg.design(2,:) = [1:length(Y) 1:length(Y)]; freq_stat = ft_freqstatistica(cfg,AVG,dum); Therefore the information is not consistent. Could someone help me understanding it? Best, Juan -------------- next part -------------- An HTML attachment was scrubbed... URL: From marion.vincent at univ-lille.fr Thu Jan 17 13:59:59 2019 From: marion.vincent at univ-lille.fr (Marion Vincent) Date: Thu, 17 Jan 2019 13:59:59 +0100 (CET) Subject: [FieldTrip] Baseline removal errors in trials preprocessing In-Reply-To: <010801d4ae50$40028270$c0078750$@gmail.com> References: <1783145268.1402885.1547717840566.JavaMail.zimbra@zimbra-store10.univ-lille.fr> <010801d4ae50$40028270$c0078750$@gmail.com> Message-ID: <368923767.1656133.1547729999196.JavaMail.zimbra@zimbra-store10.univ-lille.fr> An HTML attachment was scrubbed... URL: -------------- next part -------------- Dear Stephen, Here is my script: %segmentation seg_window=[0.1 1]; % in seconds %preStim/postStim %config cfg= []; cfg.dataset = filename_Data; %% *********** TRIAL DEFINITION PART *********** (that works) […] cfg = ft_definetrial(cfg); % ***********  Re-References *********** (that also works) cfg.reref = 'yes'; cfg.refchannel = {'EXG3', 'EXG4'};% electrode 131/132 // cell-array with new EEG reference channel(s), this can be 'all' for a common average reference cfg.refmethod     = 'avg'; % 'avg', 'median', or 'bipolar' for bipolar derivation of sequential channels (default = 'avg') data_Raw = ft_preprocessing(cfg); %% *********** Baseline *********** cfg.demean = 'yes'; cfg1=cfg; cfg1.baselinewindow = [-seg_window(1) 0 ]; cfg2=cfg; cfg2.baselinewindow = [0 0.1]; cfg3=cfg; cfg3.baselinewindow = 'all'; data1 = ft_preprocessing(cfg1); data2 = ft_preprocessing(cfg2); data3 = ft_preprocessing(cfg3); I’ve attached the figure with the results. PS: In fact I made a mistake in my previous email: the result wasn’t the same when the Baseline window was ‘all’. Let me know if you need more informations. Thanks for your help. Marion Marion VINCENT Eng., PhD , CNRS Research Engineer Tel: +33 607 59 46 76 Laboratoire SCALab UMR CNRS 9193 Université Lille 3 BP 60149 59653 Villeneuve d'Ascq Cedex http://scalab.cnrs.fr -------------------------------------------- L’Imaginarium / SCV-IrDIVE Equipex 99a Boulevard Descat 59200 Tourcoing http://www.irdive.fr/ De: Stephen Whitmarsh Envoyé le:jeudi 17 janvier 2019 11:51 À: 'FieldTrip discussion list' Objet:Re: [FieldTrip] Baseline removal errors in trials preprocessing Dear Marion, It sounds it might indeed be something as simple as a typo. Could you paste the part of your script – from baseline removal to plotting (where you don’t see a difference) - so we can take a look? Cheers, Stephen From: fieldtrip On Behalf Of Marion Vincent Sent: Thursday, January 17, 2019 10:37 AM To: fieldtrip at science.ru.nl Subject: [FieldTrip] Baseline removal errors in trials preprocessing Dear FIeldtrip users, I’m new in using Fieldtrip for EEG processing and I’ve encountred some issues while removing the Baseline of my trials. I’m working on EEG signals recorded with the BioSemi system. My pre-processing method is : (1) Re-referecing the channels (necessary with BioSemi) (2) Trial definition (3) Baseline removal I’ve read on the documentation that ft_preprocessing xcan have several cfg parameter for the Baseline removal : % cfg.demean = 'yes';%'no' or 'yes', whether to apply baseline correction (default = 'no') % cfg.baselinewindow = 'all';%[begin end] ;%in seconds, the default is the complete trial (default = 'all') % cfg.detrend = 'no'; %'no' or 'yes', remove linear trend from the data (done per trial) (default = 'no') I wanted to remove a Baseline defined as the average of a given window preceeding my stimulus onset. I tried to use : cfg.baselinewindow = [-0.5 0 ]; cfg.baselinewindow = [0 0.1] or the default window . But the problem is that I always have the same result, no matter the window I use : the first point of my trial is put to zero and substracted to all my trial. I’m sure I’m doing something wrong (and that the answer is very simple), but I can’t manage to understand what is the issue. Do you have any advice ? Thanks ! Marion Marion VINCENT Eng., PhD , CNRS Research Engineer _______________________________________________ fieldtrip mailing list https://mailman.science.ru.nl/mailman/listinfo/fieldtrip https://doi.org/10.1371/journal.pcbi.1002202 -------------- next part -------------- A non-text attachment was scrubbed... Name: BaselineRemoved_Trial1.JPG Type: image/jpeg Size: 115224 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: BaselineRemoved_Trial1.fig Type: application/octet-stream Size: 129935 bytes Desc: not available URL: From julian.keil at gmail.com Thu Jan 17 14:37:30 2019 From: julian.keil at gmail.com (Julian Keil) Date: Thu, 17 Jan 2019 14:37:30 +0100 Subject: [FieldTrip] Baseline removal errors in trials preprocessing In-Reply-To: <368923767.1656133.1547729999196.JavaMail.zimbra@zimbra-store10.univ-lille.fr> References: <1783145268.1402885.1547717840566.JavaMail.zimbra@zimbra-store10.univ-lille.fr> <010801d4ae50$40028270$c0078750$@gmail.com> <368923767.1656133.1547729999196.JavaMail.zimbra@zimbra-store10.univ-lille.fr> Message-ID: Dear Marion, when you state: seg_window=[0.1 1]; % in seconds %preStim/postStim Does that mean, you segment your data to 0.1 s to 1 s after the stimulus? In that case, there is no data to use prior to 0.1 later on. So, these two statements: cfg1=cfg; cfg1.baselinewindow = [-seg_window(1) 0 ]; cfg2=cfg; cfg2.baselinewindow = [0 0.1]; are basically identical, as the interval -0.1 to 0 (cfg1) and 0 to 0.1 (cfg2) will both contain no data. Please double check this with the seg_window set to [-0.1 1] Hope that helps, Julian On Thu, Jan 17, 2019 at 2:29 PM Marion Vincent wrote: > Dear Stephen, > Here is my script: > %segmentation > seg_window=[0.1 1]; % in seconds %preStim/postStim > %config > cfg= []; > cfg.dataset = filename_Data; > %% *********** TRIAL DEFINITION PART *********** (that works) > […] > cfg = ft_definetrial(cfg); > % *********** Re-References *********** (that also works) > cfg.reref = 'yes'; > cfg.refchannel = {'EXG3', 'EXG4'};% electrode 131/132 // cell-array with > new EEG reference channel(s), this can be 'all' for a common average > reference > cfg.refmethod = 'avg'; % 'avg', 'median', or 'bipolar' for bipolar > derivation of sequential channels (default = 'avg') > data_Raw = ft_preprocessing(cfg); > %% *********** Baseline *********** > cfg.demean = 'yes'; > cfg1=cfg; > cfg1.baselinewindow = [-seg_window(1) 0 ]; > cfg2=cfg; > cfg2.baselinewindow = [0 0.1]; > cfg3=cfg; > cfg3.baselinewindow = 'all'; > data1 = ft_preprocessing(cfg1); > data2 = ft_preprocessing(cfg2); > data3 = ft_preprocessing(cfg3); > I’ve attached the figure with the results. > PS: In fact I made a mistake in my previous email: the result wasn’t the > same when the Baseline window was ‘all’. > Let me know if you need more informations. > Thanks for your help. > Marion > Marion VINCENT > Eng., PhD , CNRS Research Engineer > Tel: +33 607 59 46 76 > Laboratoire SCALab UMR CNRS 9193 > Université Lille 3 > BP 60149 > 59653 Villeneuve d'Ascq Cedex > http://scalab.cnrs.fr > -------------------------------------------- > L’Imaginarium / SCV-IrDIVE Equipex > 99a Boulevard Descat > 59200 Tourcoing > http://www.irdive.fr/ > De: Stephen Whitmarsh > Envoyé le:jeudi 17 janvier 2019 11:51 > À: 'FieldTrip discussion list' > Objet:Re: [FieldTrip] Baseline removal errors in trials preprocessing > > > Dear Marion, > > > > It sounds it might indeed be something as simple as a typo. Could you > paste the part of your script – from baseline removal to plotting (where > you don’t see a difference) - so we can take a look? > > > > Cheers, > > Stephen > > > > From: fieldtrip On Behalf Of Marion > Vincent > Sent: Thursday, January 17, 2019 10:37 AM > To: fieldtrip at science.ru.nl > Subject: [FieldTrip] Baseline removal errors in trials preprocessing > > > > Dear FIeldtrip users, > > > > I’m new in using Fieldtrip for EEG processing and I’ve encountred some > issues while removing the Baseline of my trials. > > > > I’m working on EEG signals recorded with the BioSemi system. My > pre-processing method is : > > (1) Re-referecing the channels (necessary with BioSemi) > > (2) Trial definition > > (3) Baseline removal > > > > I’ve read on the documentation that ft_preprocessing xcan have several cfg > parameter for the Baseline removal : > > > > % cfg.demean = 'yes';%'no' or 'yes', whether to apply baseline correction > (default = 'no') > > % cfg.baselinewindow = 'all';%[begin end] ;%in seconds, the default is the > complete trial (default = 'all') > > % cfg.detrend = 'no'; %'no' or 'yes', remove linear trend from the > data (done per trial) (default = 'no') > > > > I wanted to remove a Baseline defined as the average of a given window > preceeding my stimulus onset. > > > > I tried to use : cfg.baselinewindow = [-0.5 0 ]; cfg.baselinewindow = [0 > 0.1] or the default window . > > But the problem is that I always have the same result, no matter the > window I use : the first point of my trial is put to zero and substracted > to all my trial. > > > > I’m sure I’m doing something wrong (and that the answer is very simple), > but I can’t manage to understand what is the issue. > > > > Do you have any advice ? > > > > Thanks ! > > Marion > > > > Marion VINCENT > Eng., PhD , CNRS Research Engineer > > > > > > > > _______________________________________________ > 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 stephen.whitmarsh at gmail.com Thu Jan 17 14:52:45 2019 From: stephen.whitmarsh at gmail.com (Stephen Whitmarsh) Date: Thu, 17 Jan 2019 14:52:45 +0100 Subject: [FieldTrip] Baseline removal errors in trials preprocessing In-Reply-To: <368923767.1656133.1547729999196.JavaMail.zimbra@zimbra-store10.univ-lille.fr> References: <1783145268.1402885.1547717840566.JavaMail.zimbra@zimbra-store10.univ-lille.fr> <010801d4ae50$40028270$c0078750$@gmail.com> <368923767.1656133.1547729999196.JavaMail.zimbra@zimbra-store10.univ-lille.fr> Message-ID: <017901d4ae6b$ecd2d200$c6787600$@gmail.com> Dear Marion, Your script is a bit messy. I would start with: 1) Always clear your cfg before calling a FT function. Don’t go around saving different cfg’s. This is the nr. 1 cause of confusing results J 2) Load/segment etc. your data first with ft_preprocessing. Then call ft_preprocessing again to baseline correct, entering the output of the first run. I have a hunch that might fix your problem. So, something like: % load your data, apply rereferencing and segment in one go cfg = []; cfg.dataset = filename_Data; cfg.reref = 'yes'; cfg.refchannel = {'EXG3', 'EXG4'} ; cfg.refmethod = 'avg'; cfg.trl = … ; cfg = ft_definetrial(cfg); data_Raw = ft_preprocessing(cfg); % somehow plot your data to check figure ; plot(data_Raw.trial{1}(1, :)) ; % baseline correct your raw data structure, method 1 cfg = [] ; cfg.demean = ‘yes’ ; cfg.baselinewindow = [0 0.1] ; data_Raw_reref_1 = ft_preprocessing(cfg, data_Raw); % somehow plot your data to check figure ; plot(data_Raw_reref_1.trial{1}(1, :)) ; % baseline correct your raw data structure, method 2 cfg = [] ; cfg.demean = ‘yes’ ; cfg.baselinewindow = [-1 -0.1] ; % or whatever data_Raw_reref_2 = ft_preprocessing(cfg, data_Raw); % somehow plot your data to check figure ; plot(data_Raw_reref_2.trial{1}(1, :)) ; And oh, wait, I see what you did there… Don’t use different variables for your cfg, (e.g. cfg1, cfg2, etc.). See the mistake? Those are too easy to make if you don’t do something like the above. Cheers and good FieldTripping! Stepen From: fieldtrip On Behalf Of Marion Vincent Sent: Thursday, January 17, 2019 2:00 PM To: FieldTrip discussion list Subject: Re: [FieldTrip] Baseline removal errors in trials preprocessing Dear Stephen, Here is my script : %segmentation seg_window=[0.1 1]; % in seconds %preStim/postStim %config cfg= []; cfg.dataset = filename_Data; %% *********** TRIAL DEFINITION PART *********** (that works ) […] cfg = ft_definetrial(cfg); % *********** Re-References *********** (that also works ) cfg.reref = 'yes'; cfg.refchannel = {'EXG3', 'EXG4'};% electrode 131/132 // cell-array with new EEG reference channel(s), this can be 'all' for a common average reference cfg.refmethod = 'avg'; % 'avg', 'median', or 'bipolar' for bipolar derivation of sequential channels (default = 'avg') data_Raw = ft_preprocessing(cfg); %% *********** Baseline *********** cfg.demean = 'yes'; cfg1=cfg; cfg1.baselinewindow = [-seg_window(1) 0 ]; cfg2=cfg; cfg2.baselinewindow = [0 0.1]; cfg3=cfg; cfg3.baselinewindow = 'all'; data1 = ft_preprocessing(cfg1); data2 = ft_preprocessing(cfg2); data3 = ft_preprocessing(cfg3); ð I’ve attached the figure with the results. PS : In fact I made a mistake in my previous email : the result wasn’t the same when the Baseline window was ‘all’. Let me know if you need more informations. Thanks for your help. Marion Marion VINCENT Eng., PhD , CNRS Research Engineer Tel: +33 607 59 46 76 Laboratoire SCALab UMR CNRS 9193 Université Lille 3 BP 60149 59653 Villeneuve d'Ascq Cedex http://scalab.cnrs.fr -------------------------------------------- L’Imaginarium / SCV-IrDIVE Equipex 99a Boulevard Descat 59200 Tourcoing http://www.irdive.fr / De : Stephen Whitmarsh Envoyé le :jeudi 17 janvier 2019 11:51 À : 'FieldTrip discussion list' Objet :Re: [FieldTrip] Baseline removal errors in trials preprocessing Dear Marion, It sounds it might indeed be something as simple as a typo. Could you paste the part of your script – from baseline removal to plotting (where you don’t see a difference) - so we can take a look? Cheers, Stephen From: fieldtrip > On Behalf Of Marion Vincent Sent: Thursday, January 17, 2019 10:37 AM To: fieldtrip at science.ru.nl Subject: [FieldTrip] Baseline removal errors in trials preprocessing Dear FIeldtrip users, I’m new in using Fieldtrip for EEG processing and I’ve encountred some issues while removing the Baseline of my trials. I’m working on EEG signals recorded with the BioSemi system. My pre-processing method is : (1) Re-referecing the channels (necessary with BioSemi) (2) Trial definition (3) Baseline removal I’ve read on the documentation that ft_preprocessing xcan have several cfg parameter for the Baseline removal : % cfg.demean = 'yes';%'no' or 'yes', whether to apply baseline correction (default = 'no') % cfg.baselinewindow = 'all';%[begin end] ;%in seconds, the default is the complete trial (default = 'all') % cfg.detrend = 'no'; %'no' or 'yes', remove linear trend from the data (done per trial) (default = 'no') I wanted to remove a Baseline defined as the average of a given window preceeding my stimulus onset. I tried to use : cfg.baselinewindow = [-0.5 0 ]; cfg.baselinewindow = [0 0.1] or the default window . But the problem is that I always have the same result, no matter the window I use : the first point of my trial is put to zero and substracted to all my trial. I’m sure I’m doing something wrong (and that the answer is very simple), but I can’t manage to understand what is the issue. Do you have any advice ? Thanks ! Marion Marion VINCENT Eng., PhD , CNRS Research Engineer -------------- next part -------------- An HTML attachment was scrubbed... URL: From marion.vincent at univ-lille.fr Thu Jan 17 15:16:58 2019 From: marion.vincent at univ-lille.fr (Marion Vincent) Date: Thu, 17 Jan 2019 15:16:58 +0100 (CET) Subject: [FieldTrip] Baseline removal errors in trials preprocessing Message-ID: <444186168.1761650.1547734618751.JavaMail.zimbra@zimbra-store10.univ-lille.fr> Dear Julian, seg_window=[0.1 1]; % in seconds %preStim/postStim Does that mean, you segment your data to 0.1 s to 1 s after the stimulus? In that case, there is no data to use prior to 0.1 later on. The seg_window I used was to defined the trials (prestim to poststim interval). Then in my one trial definition function I define my trial as the interval [t0-preStim ; t0+postStim], with t0 the stimulus onset. ⇨ My trial goes from 0.1s before t0 to 1 s after. That is why the preStim value is positive in seg_window. So, these two statements: cfg1=cfg; cfg1.baselinewindow = [-seg_window(1) 0 ]; cfg2=cfg; cfg2.baselinewindow = [0 0.1]; are basically identical, as the interval -0.1 to 0 (cfg1) and 0 to 0.1 (cfg2) will both contain no data. Please double check this with the seg_window set to [-0.1 1] I think I might not understood how to pass the time interval in the cfg.baselinewindow. For me as I stated [ - seg_window(1)  ; 0], in had in mind to take the interval [ - 0.1 ; 0] before the stimulus onset (at t0=0) . Marion VINCENT Eng., PhD , CNRS Research Engineer Tel: +33 607 59 46 76 Laboratoire SCALab UMR CNRS 9193 Université Lille 3 BP 60149 59653 Villeneuve d'Ascq Cedex http://scalab.cnrs.fr -------------------------------------------- L’Imaginarium / SCV-IrDIVE Equipex 99a Boulevard Descat 59200 Tourcoing http://www.irdive.fr/ De : Julian Keil Envoyé le :jeudi 17 janvier 2019 14:57 À : FieldTrip discussion list Objet :Re: [FieldTrip] Baseline removal errors in trials preprocessing Dear Marion, when you state: seg_window=[0.1 1]; % in seconds %preStim/postStim Does that mean, you segment your data to 0.1 s to 1 s after the stimulus? In that case, there is no data to use prior to 0.1 later on. So, these two statements: cfg1=cfg; cfg1.baselinewindow = [-seg_window(1) 0 ]; cfg2=cfg; cfg2.baselinewindow = [0 0.1]; are basically identical, as the interval -0.1 to 0 (cfg1) and 0 to 0.1 (cfg2) will both contain no data. Please double check this with the seg_window set to [-0.1 1] Hope that helps, Julian On Thu, Jan 17, 2019 at 2:29 PM Marion Vincent wrote: Dear Stephen, Here is my script: %segmentation seg_window=[0.1 1]; % in seconds %preStim/postStim %config cfg= []; cfg.dataset = filename_Data; %% *********** TRIAL DEFINITION PART *********** (that works) […] cfg = ft_definetrial(cfg); % ***********  Re-References *********** (that also works) cfg.reref = 'yes'; cfg.refchannel = {'EXG3', 'EXG4'};% electrode 131/132 // cell-array with new EEG reference channel(s), this can be 'all' for a common average reference cfg.refmethod     = 'avg'; % 'avg', 'median', or 'bipolar' for bipolar derivation of sequential channels (default = 'avg') data_Raw = ft_preprocessing(cfg); %% *********** Baseline *********** cfg.demean = 'yes'; cfg1=cfg; cfg1.baselinewindow = [-seg_window(1) 0 ]; cfg2=cfg; cfg2.baselinewindow = [0 0.1]; cfg3=cfg; cfg3.baselinewindow = 'all'; data1 = ft_preprocessing(cfg1); data2 = ft_preprocessing(cfg2); data3 = ft_preprocessing(cfg3); I’ve attached the figure with the results. PS: In fact I made a mistake in my previous email: the result wasn’t the same when the Baseline window was ‘all’. Let me know if you need more informations. Thanks for your help. Marion Marion VINCENT Eng., PhD , CNRS Research Engineer Tel: +33 607 59 46 76 Laboratoire SCALab UMR CNRS 9193 Université Lille 3 BP 60149 59653 Villeneuve d'Ascq Cedex http://scalab.cnrs.fr -------------------------------------------- L’Imaginarium / SCV-IrDIVE Equipex 99a Boulevard Descat 59200 Tourcoing http://www.irdive.fr/ De: Stephen Whitmarsh Envoyé le:jeudi 17 janvier 2019 11:51 À: 'FieldTrip discussion list' Objet:Re: [FieldTrip] Baseline removal errors in trials preprocessing Dear Marion, It sounds it might indeed be something as simple as a typo. Could you paste the part of your script – from baseline removal to plotting (where you don’t see a difference) - so we can take a look? Cheers, Stephen From: fieldtrip On Behalf Of Marion Vincent Sent: Thursday, January 17, 2019 10:37 AM To: fieldtrip at science.ru.nl Subject: [FieldTrip] Baseline removal errors in trials preprocessing Dear FIeldtrip users, I’m new in using Fieldtrip for EEG processing and I’ve encountred some issues while removing the Baseline of my trials. I’m working on EEG signals recorded with the BioSemi system.  My pre-processing method is : (1)    Re-referecing the channels (necessary with BioSemi) (2)    Trial definition (3)    Baseline removal I’ve read on the documentation that ft_preprocessing xcan have several cfg parameter for the Baseline removal : % cfg.demean  = 'yes';%'no' or 'yes', whether to apply baseline correction (default = 'no') % cfg.baselinewindow = 'all';%[begin end] ;%in seconds, the default is the complete trial (default = 'all') % cfg.detrend       = 'no'; %'no' or 'yes', remove linear trend from the data (done per trial) (default = 'no') I wanted to remove a Baseline defined as the average of a given window preceeding my stimulus onset. I tried to use : cfg.baselinewindow = [-0.5 0 ]; cfg.baselinewindow = [0 0.1] or the default window . But the problem is that I always have the same result, no matter the window I use : the first point of my trial is put to zero and substracted to all my trial. I’m sure I’m doing something wrong (and that the answer is very simple), but I can’t manage to understand what is the issue. Do you have any advice ? Thanks ! Marion Marion VINCENT Eng., PhD , CNRS Research Engineer _______________________________________________ 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 stephen.whitmarsh at gmail.com Thu Jan 17 15:17:39 2019 From: stephen.whitmarsh at gmail.com (Stephen Whitmarsh) Date: Thu, 17 Jan 2019 15:17:39 +0100 Subject: [FieldTrip] Baseline removal errors in trials preprocessing In-Reply-To: References: <1783145268.1402885.1547717840566.JavaMail.zimbra@zimbra-store10.univ-lille.fr> <010801d4ae50$40028270$c0078750$@gmail.com> <368923767.1656133.1547729999196.JavaMail.zimbra@zimbra-store10.univ-lille.fr> Message-ID: <019d01d4ae6f$6780bc80$36823580$@gmail.com> Good point Julian. I though that cfg1, cfg2, and cfg3 were never used, but see I was wrong. Back to my own cfg’s now… Cheers, Stephen From: fieldtrip On Behalf Of Julian Keil Sent: Thursday, January 17, 2019 2:38 PM To: FieldTrip discussion list Subject: Re: [FieldTrip] Baseline removal errors in trials preprocessing Dear Marion, when you state: seg_window=[0.1 1]; % in seconds %preStim/postStim Does that mean, you segment your data to 0.1 s to 1 s after the stimulus? In that case, there is no data to use prior to 0.1 later on. So, these two statements: cfg1=cfg; cfg1.baselinewindow = [-seg_window(1) 0 ]; cfg2=cfg; cfg2.baselinewindow = [0 0.1]; are basically identical, as the interval -0.1 to 0 (cfg1) and 0 to 0.1 (cfg2) will both contain no data. Please double check this with the seg_window set to [-0.1 1] Hope that helps, Julian On Thu, Jan 17, 2019 at 2:29 PM Marion Vincent > wrote: Dear Stephen, Here is my script: %segmentation seg_window=[0.1 1]; % in seconds %preStim/postStim %config cfg= []; cfg.dataset = filename_Data; %% *********** TRIAL DEFINITION PART *********** (that works) […] cfg = ft_definetrial(cfg); % *********** Re-References *********** (that also works) cfg.reref = 'yes'; cfg.refchannel = {'EXG3', 'EXG4'};% electrode 131/132 // cell-array with new EEG reference channel(s), this can be 'all' for a common average reference cfg.refmethod = 'avg'; % 'avg', 'median', or 'bipolar' for bipolar derivation of sequential channels (default = 'avg') data_Raw = ft_preprocessing(cfg); %% *********** Baseline *********** cfg.demean = 'yes'; cfg1=cfg; cfg1.baselinewindow = [-seg_window(1) 0 ]; cfg2=cfg; cfg2.baselinewindow = [0 0.1]; cfg3=cfg; cfg3.baselinewindow = 'all'; data1 = ft_preprocessing(cfg1); data2 = ft_preprocessing(cfg2); data3 = ft_preprocessing(cfg3); I’ve attached the figure with the results. PS: In fact I made a mistake in my previous email: the result wasn’t the same when the Baseline window was ‘all’. Let me know if you need more informations. Thanks for your help. Marion Marion VINCENT Eng., PhD , CNRS Research Engineer Tel: +33 607 59 46 76 Laboratoire SCALab UMR CNRS 9193 Université Lille 3 BP 60149 59653 Villeneuve d'Ascq Cedex http://scalab.cnrs.fr -------------------------------------------- L’Imaginarium / SCV-IrDIVE Equipex 99a Boulevard Descat 59200 Tourcoing http://www.irdive.fr/ De: Stephen Whitmarsh Envoyé le:jeudi 17 janvier 2019 11:51 À: 'FieldTrip discussion list' Objet:Re: [FieldTrip] Baseline removal errors in trials preprocessing Dear Marion, It sounds it might indeed be something as simple as a typo. Could you paste the part of your script – from baseline removal to plotting (where you don’t see a difference) - so we can take a look? Cheers, Stephen From: fieldtrip > On Behalf Of Marion Vincent Sent: Thursday, January 17, 2019 10:37 AM To: fieldtrip at science.ru.nl Subject: [FieldTrip] Baseline removal errors in trials preprocessing Dear FIeldtrip users, I’m new in using Fieldtrip for EEG processing and I’ve encountred some issues while removing the Baseline of my trials. I’m working on EEG signals recorded with the BioSemi system. My pre-processing method is : (1) Re-referecing the channels (necessary with BioSemi) (2) Trial definition (3) Baseline removal I’ve read on the documentation that ft_preprocessing xcan have several cfg parameter for the Baseline removal : % cfg.demean = 'yes';%'no' or 'yes', whether to apply baseline correction (default = 'no') % cfg.baselinewindow = 'all';%[begin end] ;%in seconds, the default is the complete trial (default = 'all') % cfg.detrend = 'no'; %'no' or 'yes', remove linear trend from the data (done per trial) (default = 'no') I wanted to remove a Baseline defined as the average of a given window preceeding my stimulus onset. I tried to use : cfg.baselinewindow = [-0.5 0 ]; cfg.baselinewindow = [0 0.1] or the default window . But the problem is that I always have the same result, no matter the window I use : the first point of my trial is put to zero and substracted to all my trial. I’m sure I’m doing something wrong (and that the answer is very simple), but I can’t manage to understand what is the issue. Do you have any advice ? Thanks ! Marion Marion VINCENT Eng., PhD , CNRS Research Engineer _______________________________________________ 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 weberi at staff.uni-marburg.de Thu Jan 17 17:31:51 2019 From: weberi at staff.uni-marburg.de (weberi at staff.uni-marburg.de) Date: Thu, 17 Jan 2019 17:31:51 +0100 Subject: [FieldTrip] PhD project in Clinical Neurosciences Message-ID: <20190117173151.Horde.3FU1CgXluh3mw7DhE7jj8VI@home.staff.uni-marburg.de> Dear community, we are looking for a highly motivated student (f/m) for a PhD project in Clinical Neurosciences. When? The project will start 01.April 2019 and is estimated to be completed within three years. Where? This project will be conducted in the Clinical Systems Neuroscience Lab in the Department of Neurology of the University Hospital Marburg, Germany. We work closely with the Department of Neurosurgery. The hospital is affiliated with the Philipps University of Marburg, one of the oldest universities in Europe and home to one of Germany's most traditional medical faculties. Alumni range from the Brothers Grimm to Nobel Laureates Emil von Behring, Otto Loewi and Jules Hoffmann. The project The aim of the PhD project will be to predict and optimize the clinical outcome of Deep Brain Stimulation for Parkinson’s disease based on preoperatively and intraoperatively acquired multimodal data using machine learning. The team The Clinical Systems Neuroscience Lab is a multidisciplinary lab composed of neurologists, neuroscientists, psychologists, biologists and medical technicians. We use innovative analytic techniques to advance the understanding of physiological and pathological neural oscillations and develop new treatment options for neurological disorders. To this end, we employ high-resolution scalp electroencephalography (EEG) and direct recordings from the human brain (intracranial EEG). Intracranially, we record local field potentials, as well as single unit recordings from several brain regions, such as the thalamus, hippocampus, prefrontal cortex and basal ganglia. We are particularly interested in the frequency-specific effects of deep brain stimulation on the neural signature of motor and cognitive brain functions. For further details, visit our website: www.systemsneuroscience.de. We offer… • An innovative and highly relevant research topic • Cutting edge infrastructure and technology • The possibility to learn innovative analysis techniques of neurophysiological data • A young, interdisciplinary and international team • The possibility to work with patients and apply your research clinically  We are looking for… We are looking for a highly motivated, reliable student with experience in research, who is able to critically appraise information and work independently. The applicant should have a background in neuroscience, biology, mathematics, physics or related fields (MSc or equivalent degree). Programming skills and/or experience with machine learning are advantageous, but not a prerequisite for an application. The applicant should have an affinity for mathematics and the motivation to employ and advance new complex computational methods. We are looking for a team player, who is interested in working with neurological patients as part of their research project. As the project requires communication with patients, a certain level of proficiency in German is required. Funding Funding is available for three years and can be extended, if necessary. Application Applications should include a letter of motivation, your curriculum vitae including your research experience and list of publications. Please also provide two letters of recommendation of previous employers or principle investigators of previous labs. We look forward to receiving your application by February 24nd 2019. Please send all documents as pdf to the junior principal investigator Carina Oehrn: Carina Oehrn University Hospital Gießen & Marburg Department of Neurology Baldingerstraße 35043 Marburg, Germany E-Mail: carina.oehrn at staff.uni-marburg.de Best wishes, Immo Weber Dipl.-Biol. Immo Weber Department of Neurology Clinical Systems Neuroscience Lab University Hospital Gießen & Marburg Marburg Baldingerstraße D-35033 Marburg, Germany Phone (+49) 06421 - 58 66276 E-Mail: immo.weber at staff.uni-marburg.de url: http://www.systemsneuroscience.de Aufsichtsratsvorsitzender: Dr. Dr. Martin Siebert Geschäftsführung: Dr. Gunther Weiß (Vorsitzender), Prof. Dr. Werner Seeger (Stv. Vors.), Dr. Christiane Hinck-Kneip, Prof. Dr. Harald Renz Sitz der Gesellschaft: Gießen Amtsgericht Gießen HRB 6384 From marion.vincent at univ-lille.fr Thu Jan 17 17:59:44 2019 From: marion.vincent at univ-lille.fr (Marion Vincent) Date: Thu, 17 Jan 2019 17:59:44 +0100 (CET) Subject: [FieldTrip] Baseline removal errors in trials preprocessing In-Reply-To: <017901d4ae6b$ecd2d200$c6787600$@gmail.com> References: <1783145268.1402885.1547717840566.JavaMail.zimbra@zimbra-store10.univ-lille.fr> <010801d4ae50$40028270$c0078750$@gmail.com> <368923767.1656133.1547729999196.JavaMail.zimbra@zimbra-store10.univ-lille.fr> <017901d4ae6b$ecd2d200$c6787600$@gmail.com> Message-ID: <1674442156.2004986.1547744384621.JavaMail.zimbra@zimbra-store10.univ-lille.fr> An HTML attachment was scrubbed... URL: -------------- next part -------------- Dear Stephen, Thanks for your comments. In fact I only used the cgf1, cfg2.. for plotting the figure I sent you. So it was not my «real» code. But you’re rigth cleaning the cfg will prevent some errors. I’ve done so and still have some errors: (for each case, I compared it to a personnal calculation) If I use the ‘all’ default cfg.baselinewindow => I have the result I expected: the Baseline is the mean value of all the signal. (cf. figure Baseline_AllSignal)If I use a given time window (here from 0.1 to 0 sec before the stimulsu onset) => in fieldtrip, the Baseline is only the «first point» of the raw signal, but not its mean value on the Baseline window (as in my own calculation: cf. figure Baseline_TimeWindow). I also tried with exorbitant window [-10000 0], [0 0.1], etc ) and each time I Always have the exact same result for the filedtrip calculation. Here is my entire code(I hope it will be clearer): ************************************************************** seg_window=[0.1 1]; % in seconds %preStim/postStim trig_Type=[1 5 2 6 3 7 4 8]; % trigger value load(filename_Trig); % ** READ FILE INFO % read the header information and the events from the data hdr   = ft_read_header(filename_Data); % Config cfg= []; cfg.dataset       = filename_Data; % **RE-REFERENCES cfg.reref         = 'yes'; cfg.refchannel    = {'EXG3', 'EXG4'} ; % electrode 131/132 // cell-array with new EEG reference channel(s), this can be 'all' for a common average reference cfg.refmethod     = 'avg'; % 'avg', 'median', or 'bipolar' for bipolar derivation of sequential channels (default = 'avg') % ** TRIAL DEFINITION event_All = ft_read_event(filename_Data); % Select only the trigger codes, not the battery and CMS status sel = find(strcmp({event_All.type}, 'STATUS')); event_All = event_All(sel); cfg.eventType=[trig_Type(1) trig_Type(2)]; cfg.trialfun = 'AVExp_trialfun'; cfg.trialdef.pre  = seg_window(1); cfg.trialdef.post = seg_window(2); cfg.Fs=hdr.Fs; % convert seconds in sample cfg = ft_definetrial(cfg); % Remove trials from Cartool selection cfg.trl(find(Triggers{num_Cond}(:,1)==0),:) = []; data_Raw = ft_preprocessing(cfg); % Plot data to check figure ; chan_num=1; trial_num=1; figure; plot(data_Raw.trial{trial_num}(chan_num,:)); % ** BASELINE CORRECTION: BASELINE IS ALL THE SIGNAL %baseline correct the raw data structure, automatic cfg                     = [] ; cfg.demean              = 'yes'; cfg.baselinewindow      = 'all'; data_Raw_reref        = ft_preprocessing(cfg, data_Raw); % Manual correction test for trial_num=1:length(data_Raw.trial)     for chan_num=1:length(data_Raw.label)         Signal=data_Raw.trial{trial_num}(chan_num,:);         baseline_value=mean(Signal); % for comparison with the default value of         data_Raw_reref_Manual.trial{trial_num}(chan_num,:)=data_Raw.trial{trial_num}(chan_num,:)-baseline_value*ones(1,length(Signal));     end end % plot comparison figure;chan_num=1; trial_num=1; hold all plot(data_Raw_reref.trial{trial_num}(chan_num,:)); plot(data_Raw_reref_Manual.trial{trial_num}(chan_num,:)); legend('FieldTrip','Manual'); title('Baseline is all the signal'); % ** BASELINE CORRECTION: BASELINE IS THE MEAN VALUE OF A WINDOW of 0.1sec before the stimulus onset %baseline correct the raw data structure, automatic cfg                     = [] ; cfg.demean              = 'yes'; cfg.baselinewindow      = [-0.1 0] ; %as the baseline lasts 0.1 s  before the stimulus onset data_Raw_reref_1       = ft_preprocessing(cfg, data_Raw); % Manual correction test for trial 1 - comparison to automatic calculation for trial_num=1:length(data_Raw.trial)     for chan_num=1:length(data_Raw.label)         Signal=data_Raw.trial{trial_num}(chan_num,:);         baseline_window=[1  round(hdr.Fs*0.1)];% because baseline lasts 0.1 s  before the stimulus onset         baseline_value=mean(Signal(baseline_window(1):baseline_window(2)));         data_Raw_reref_Manual_1.trial{trial_num}(chan_num,:)=data_Raw.trial{trial_num}(chan_num,:)-baseline_value*ones(1,length(Signal));     end end % plot comparison figure;chan_num=1; trial_num=1; hold all plot(data_Raw_reref_1.trial{trial_num}(chan_num,:)); plot(data_Raw_reref_Manual_1.trial{trial_num}(chan_num,:)); legend('FieldTrip','Manual'); title('Baseline is a given time window’); ************************************************************** I’m sure it’s a silly mistake, but I really can’t find it. Thanks Marion Marion VINCENT Eng., PhD , CNRS Research Engineer Tel: +33 607 59 46 76 Laboratoire SCALab UMR CNRS 9193 Université Lille 3 BP 60149 59653 Villeneuve d'Ascq Cedex http://scalab.cnrs.fr -------------------------------------------- L’Imaginarium / SCV-IrDIVE Equipex 99a Boulevard Descat 59200 Tourcoing http://www.irdive.fr/ De: Stephen Whitmarsh Envoyé le:jeudi 17 janvier 2019 15:03 À: 'FieldTrip discussion list' Objet:Re: [FieldTrip] Baseline removal errors in trials preprocessing Dear Marion, Your script is a bit messy. I would start with: 1) Always clear your cfg before calling a FT function. Don’t go around saving different cfg’s. This is the nr. 1 cause of confusing results J 2) Load/segment etc. your data first with ft_preprocessing. Then call ft_preprocessing again to baseline correct, entering the output of the first run. I have a hunch that might fix your problem. So, something like: % load your data, apply rereferencing and segment in one go cfg = []; cfg.dataset = filename_Data; cfg.reref = 'yes'; cfg.refchannel = {'EXG3', 'EXG4'} ; cfg.refmethod = 'avg'; cfg.trl = … ; cfg = ft_definetrial(cfg); data_Raw = ft_preprocessing(cfg); % somehow plot your data to check figure ; plot(data_Raw.trial{1}(1, :)) ; % baseline correct your raw data structure, method 1 cfg = [] ; cfg.demean = ‘yes’ ; cfg.baselinewindow = [0 0.1] ; data_Raw_reref_1 = ft_preprocessing(cfg, data_Raw); % somehow plot your data to check figure ; plot(data_Raw_reref_1.trial{1}(1, :)) ; % baseline correct your raw data structure, method 2 cfg = [] ; cfg.demean = ‘yes’ ; cfg.baselinewindow = [-1 -0.1] ; % or whatever data_Raw_reref_2 = ft_preprocessing(cfg, data_Raw); % somehow plot your data to check figure ; plot(data_Raw_reref_2.trial{1}(1, :)) ; And oh, wait, I see what you did there… Don’t use different variables for your cfg, (e.g. cfg1, cfg2, etc.). See the mistake? Those are too easy to make if you don’t do something like the above. Cheers and good FieldTripping! Stepen From: fieldtrip On Behalf Of Marion Vincent Sent: Thursday, January 17, 2019 2:00 PM To: FieldTrip discussion list Subject: Re: [FieldTrip] Baseline removal errors in trials preprocessing Dear Stephen, Here is my script : %segmentation seg_window=[0.1 1]; % in seconds %preStim/postStim %config cfg= []; cfg.dataset = filename_Data; %% *********** TRIAL DEFINITION PART *********** (that works ) […] cfg = ft_definetrial(cfg); % *********** Re-References *********** (that also works ) cfg.reref = 'yes'; cfg.refchannel = {'EXG3', 'EXG4'};% electrode 131/132 // cell-array with new EEG reference channel(s), this can be 'all' for a common average reference cfg.refmethod = 'avg'; % 'avg', 'median', or 'bipolar' for bipolar derivation of sequential channels (default = 'avg') data_Raw = ft_preprocessing(cfg); %% *********** Baseline *********** cfg.demean = 'yes'; cfg1=cfg; cfg1.baselinewindow = [-seg_window(1) 0 ]; cfg2=cfg; cfg2.baselinewindow = [0 0.1]; cfg3=cfg; cfg3.baselinewindow = 'all'; data1 = ft_preprocessing(cfg1); data2 = ft_preprocessing(cfg2); data3 = ft_preprocessing(cfg3); ð I’ve attached the figure with the results. PS : In fact I made a mistake in my previous email : the result wasn’t the same when the Baseline window was ‘all’. Let me know if you need more informations. Thanks for your help. Marion Marion VINCENT Eng., PhD , CNRS Research Engineer Tel: +33 607 59 46 76 Laboratoire SCALab UMR CNRS 9193 Université Lille 3 BP 60149 59653 Villeneuve d'Ascq Cedex http://scalab.cnrs.fr -------------------------------------------- L’Imaginarium / SCV-IrDIVE Equipex 99a Boulevard Descat 59200 Tourcoing http://www.irdive.fr / De : Stephen Whitmarsh Envoyé le :jeudi 17 janvier 2019 11:51 À : 'FieldTrip discussion list' Objet :Re: [FieldTrip] Baseline removal errors in trials preprocessing Dear Marion, It sounds it might indeed be something as simple as a typo. Could you paste the part of your script – from baseline removal to plotting (where you don’t see a difference) - so we can take a look? Cheers, Stephen From: fieldtrip > On Behalf Of Marion Vincent Sent: Thursday, January 17, 2019 10:37 AM To: fieldtrip at science.ru.nl Subject: [FieldTrip] Baseline removal errors in trials preprocessing Dear FIeldtrip users, I’m new in using Fieldtrip for EEG processing and I’ve encountred some issues while removing the Baseline of my trials. I’m working on EEG signals recorded with the BioSemi system. My pre-processing method is : (1) Re-referecing the channels (necessary with BioSemi) (2) Trial definition (3) Baseline removal I’ve read on the documentation that ft_preprocessing xcan have several cfg parameter for the Baseline removal : % cfg.demean = 'yes';%'no' or 'yes', whether to apply baseline correction (default = 'no') % cfg.baselinewindow = 'all';%[begin end] ;%in seconds, the default is the complete trial (default = 'all') % cfg.detrend = 'no'; %'no' or 'yes', remove linear trend from the data (done per trial) (default = 'no') I wanted to remove a Baseline defined as the average of a given window preceeding my stimulus onset. I tried to use : cfg.baselinewindow = [-0.5 0 ]; cfg.baselinewindow = [0 0.1] or the default window . But the problem is that I always have the same result, no matter the window I use : the first point of my trial is put to zero and substracted to all my trial. I’m sure I’m doing something wrong (and that the answer is very simple), but I can’t manage to understand what is the issue. Do you have any advice ? Thanks ! Marion Marion VINCENT Eng., PhD , CNRS Research Engineer _______________________________________________ fieldtrip mailing list https://mailman.science.ru.nl/mailman/listinfo/fieldtrip https://doi.org/10.1371/journal.pcbi.1002202 -------------- next part -------------- A non-text attachment was scrubbed... Name: Baseline_AllSignal.png Type: image/png Size: 21466 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: Baseline_TimeWindow.png Type: image/png Size: 69724 bytes Desc: not available URL: From giulia.lioi at inria.fr Thu Jan 17 18:05:24 2019 From: giulia.lioi at inria.fr (Giulia Lioi) Date: Thu, 17 Jan 2019 18:05:24 +0100 (CET) Subject: [FieldTrip] eeg source analysis units Message-ID: <698173411.1999032.1547744724187.JavaMail.zimbra@inria.fr> Dear Fieldtrip users, I am using ft_sourceanalysis for time-lock dipole source estimation with mne approach. Is someone aware of the units in wich results (i.e. source.pow() ) are expressed? Many thanks Giulia Giulia Lioi, PhD | Engineer R&D Visages-Hybrid teams Univ Rennes, Inria, CNRS, IRISA F-35000 Rennes Tel: 0033 767466577 -------------- next part -------------- An HTML attachment was scrubbed... URL: From stephen.whitmarsh at gmail.com Thu Jan 17 18:50:16 2019 From: stephen.whitmarsh at gmail.com (Stephen Whitmarsh) Date: Thu, 17 Jan 2019 18:50:16 +0100 Subject: [FieldTrip] Baseline removal errors in trials preprocessing In-Reply-To: <1674442156.2004986.1547744384621.JavaMail.zimbra@zimbra-store10.univ-lille.fr> References: <1783145268.1402885.1547717840566.JavaMail.zimbra@zimbra-store10.univ-lille.fr> <010801d4ae50$40028270$c0078750$@gmail.com> <368923767.1656133.1547729999196.JavaMail.zimbra@zimbra-store10.univ-lille.fr> <017901d4ae6b$ecd2d200$c6787600$@gmail.com> <1674442156.2004986.1547744384621.JavaMail.zimbra@zimbra-store10.univ-lille.fr> Message-ID: Hi Marion, I would check your time axis. I never use ft_definetrial like that (I make my own .trl field), so I'm not sure it went through correctly with the offset (t=0). So check your data_Raw.time{1}. Does it really go from -0.1 to 1.0? If not, Julian's point is right, and your point on that is 'first point' might be explained as well, if I understood that correctly. Cheers, Stephen On Thu, 17 Jan 2019 at 18:29, Marion Vincent wrote: > Dear Stephen, > Thanks for your comments. > In fact I only used the cgf1, cfg2.. for plotting the figure I sent you. > So it was not my «real» code. > But you’re rigth cleaning the cfg will prevent some errors. > I’ve done so and still have some errors: (for each case, I compared it to > a personnal calculation) > If I use the ‘all’ default cfg.baselinewindow => I have the result I > expected: the Baseline is the mean value of all the signal. (cf. figure > Baseline_AllSignal)If I use a given time window (here from 0.1 to 0 sec > before the stimulsu onset) => in fieldtrip, the Baseline is only the «first > point» of the raw signal, but not its mean value on the Baseline window (as > in my own calculation: cf. figure Baseline_TimeWindow). I also tried with > exorbitant window [-10000 0], [0 0.1], etc ) and each time I Always have > the exact same result for the filedtrip calculation. > Here is my entire code(I hope it will be clearer): > ************************************************************** > seg_window=[0.1 1]; % in seconds %preStim/postStim > trig_Type=[1 5 2 6 3 7 4 8]; % trigger value > load(filename_Trig); > % ** READ FILE INFO > % read the header information and the events from the data > hdr = ft_read_header(filename_Data); > % Config > cfg= []; > cfg.dataset = filename_Data; > % **RE-REFERENCES > cfg.reref = 'yes'; > cfg.refchannel = {'EXG3', 'EXG4'} ; % electrode 131/132 // cell-array > with new EEG reference channel(s), this can be 'all' for a common average > reference > cfg.refmethod = 'avg'; % 'avg', 'median', or 'bipolar' for bipolar > derivation of sequential channels (default = 'avg') > % ** TRIAL DEFINITION > event_All = ft_read_event(filename_Data); > % Select only the trigger codes, not the battery and CMS status > sel = find(strcmp({event_All.type}, 'STATUS')); > event_All = event_All(sel); > cfg.eventType=[trig_Type(1) trig_Type(2)]; > cfg.trialfun = 'AVExp_trialfun'; > cfg.trialdef.pre = seg_window(1); > cfg.trialdef.post = seg_window(2); > cfg.Fs=hdr.Fs; % convert seconds in sample > cfg = ft_definetrial(cfg); > % Remove trials from Cartool selection > cfg.trl(find(Triggers{num_Cond}(:,1)==0),:) = []; > data_Raw = ft_preprocessing(cfg); > % Plot data to check > figure ; chan_num=1; > trial_num=1; > figure; > plot(data_Raw.trial{trial_num}(chan_num,:)); > % ** BASELINE CORRECTION: BASELINE IS ALL THE SIGNAL > %baseline correct the raw data structure, automatic > cfg = [] ; > cfg.demean = 'yes'; > cfg.baselinewindow = 'all'; > data_Raw_reref = ft_preprocessing(cfg, data_Raw); > % Manual correction test > for trial_num=1:length(data_Raw.trial) > for chan_num=1:length(data_Raw.label) > Signal=data_Raw.trial{trial_num}(chan_num,:); > baseline_value=mean(Signal); % for comparison with the default > value of > > data_Raw_reref_Manual.trial{trial_num}(chan_num,:)=data_Raw.trial{trial_num}(chan_num,:)-baseline_value*ones(1,length(Signal)); > end > end > % plot comparison > figure;chan_num=1; > trial_num=1; > hold all > plot(data_Raw_reref.trial{trial_num}(chan_num,:)); > plot(data_Raw_reref_Manual.trial{trial_num}(chan_num,:)); > legend('FieldTrip','Manual'); > title('Baseline is all the signal'); > % ** BASELINE CORRECTION: BASELINE IS THE MEAN VALUE OF A WINDOW of 0.1sec > before the stimulus onset > %baseline correct the raw data structure, automatic > cfg = [] ; > cfg.demean = 'yes'; > cfg.baselinewindow = [-0.1 0] ; %as the baseline lasts 0.1 s before > the stimulus onset > data_Raw_reref_1 = ft_preprocessing(cfg, data_Raw); > % Manual correction test for trial 1 - comparison to automatic calculation > for trial_num=1:length(data_Raw.trial) > for chan_num=1:length(data_Raw.label) > Signal=data_Raw.trial{trial_num}(chan_num,:); > baseline_window=[1 round(hdr.Fs*0.1)];% because baseline lasts > 0.1 s before the stimulus onset > baseline_value=mean(Signal(baseline_window(1):baseline_window(2))); > > data_Raw_reref_Manual_1.trial{trial_num}(chan_num,:)=data_Raw.trial{trial_num}(chan_num,:)-baseline_value*ones(1,length(Signal)); > end > end > % plot comparison > figure;chan_num=1; > trial_num=1; > hold all > plot(data_Raw_reref_1.trial{trial_num}(chan_num,:)); > plot(data_Raw_reref_Manual_1.trial{trial_num}(chan_num,:)); > legend('FieldTrip','Manual'); > title('Baseline is a given time window’); > ************************************************************** > I’m sure it’s a silly mistake, but I really can’t find it. > Thanks > Marion > Marion VINCENT > Eng., PhD , CNRS Research Engineer > Tel: +33 607 59 46 76 > Laboratoire SCALab UMR CNRS 9193 > Université Lille 3 > BP 60149 > 59653 Villeneuve d'Ascq Cedex > http://scalab.cnrs.fr > -------------------------------------------- > L’Imaginarium / SCV-IrDIVE Equipex > 99a Boulevard Descat > 59200 Tourcoing > http://www.irdive.fr/ > De: Stephen Whitmarsh > Envoyé le:jeudi 17 janvier 2019 15:03 > À: 'FieldTrip discussion list' > Objet:Re: [FieldTrip] Baseline removal errors in trials preprocessing > > > Dear Marion, > > > > Your script is a bit messy. I would start with: > > 1) Always clear your cfg before calling a FT function. Don’t go > around saving different cfg’s. This is the nr. 1 cause of confusing results > J > > 2) Load/segment etc. your data first with ft_preprocessing. Then call > ft_preprocessing again to baseline correct, entering the output of the > first run. > > I have a hunch that might fix your problem. So, something like: > > > > % load your data, apply rereferencing and segment in one go > > cfg = []; > > cfg.dataset = filename_Data; > > cfg.reref = 'yes'; > > cfg.refchannel = {'EXG3', 'EXG4'} ; > > cfg.refmethod = 'avg'; > > cfg.trl = … ; > > cfg = ft_definetrial(cfg); > > data_Raw = ft_preprocessing(cfg); > > > > % somehow plot your data to check > > figure ; plot(data_Raw.trial{1}(1, :)) ; > > > > % baseline correct your raw data structure, method 1 > > cfg = [] ; > > cfg.demean = ‘yes’ ; > > cfg.baselinewindow = [0 0.1] ; > > data_Raw_reref_1 = ft_preprocessing(cfg, data_Raw); > > > > % somehow plot your data to check > > figure ; plot(data_Raw_reref_1.trial{1}(1, :)) ; > > > > % baseline correct your raw data structure, method 2 > > cfg = [] ; > > cfg.demean = ‘yes’ ; > > cfg.baselinewindow = [-1 -0.1] ; % or whatever > > data_Raw_reref_2 = ft_preprocessing(cfg, data_Raw); > > > > % somehow plot your data to check > > figure ; plot(data_Raw_reref_2.trial{1}(1, :)) ; > > > > And oh, wait, I see what you did there… Don’t use different variables for > your cfg, (e.g. cfg1, cfg2, etc.). See the mistake? Those are too easy to > make if you don’t do something like the above. > > > > Cheers and good FieldTripping! > > Stepen > > > > > > > > From: fieldtrip On Behalf Of Marion > Vincent > Sent: Thursday, January 17, 2019 2:00 PM > To: FieldTrip discussion list > Subject: Re: [FieldTrip] Baseline removal errors in trials preprocessing > > > > Dear Stephen, > > > > Here is my script : > > > > %segmentation > > seg_window=[0.1 1]; % in seconds %preStim/postStim > > > > %config > > cfg= []; > > cfg.dataset = filename_Data; > > > > %% *********** TRIAL DEFINITION PART *********** (that works ) > > […] > > cfg = ft_definetrial(cfg); > > > > % *********** Re-References *********** (that also works ) > > cfg.reref = 'yes'; > > cfg.refchannel = {'EXG3', 'EXG4'};% electrode 131/132 // cell-array with > new EEG reference channel(s), this can be 'all' for a common average > reference > > cfg.refmethod = 'avg'; % 'avg', 'median', or 'bipolar' for bipolar > derivation of sequential channels (default = 'avg') > > > > data_Raw = ft_preprocessing(cfg); > > > > %% *********** Baseline *********** > > cfg.demean = 'yes'; > > > > cfg1=cfg; > > cfg1.baselinewindow = [-seg_window(1) 0 ]; > > cfg2=cfg; > > cfg2.baselinewindow = [0 0.1]; > > cfg3=cfg; > > cfg3.baselinewindow = 'all'; > > > > data1 = ft_preprocessing(cfg1); > > data2 = ft_preprocessing(cfg2); > > data3 = ft_preprocessing(cfg3); > > > > > > ð I’ve attached the figure with the results. > > > > PS : In fact I made a mistake in my previous email : the result wasn’t the > same when the Baseline window was ‘all’. > > > > Let me know if you need more informations. > > Thanks for your help. > > > > Marion > > > > > > Marion VINCENT > Eng., PhD , CNRS Research Engineer > Tel: +33 607 59 46 76 > > Laboratoire SCALab UMR CNRS 9193 > Université Lille 3 > BP 60149 > 59653 Villeneuve d'Ascq Cedex > http://scalab.cnrs.fr > -------------------------------------------- > L’Imaginarium / SCV-IrDIVE Equipex > 99a Boulevard Descat > 59200 Tourcoing > http://www.irdive.fr / > > > > De : Stephen Whitmarsh > Envoyé le :jeudi 17 janvier 2019 11:51 > À : 'FieldTrip discussion list' > Objet :Re: [FieldTrip] Baseline removal errors in trials preprocessing > > > > > > Dear Marion, > > > > It sounds it might indeed be something as simple as a typo. Could you > paste the part of your script – from baseline removal to plotting (where > you don’t see a difference) - so we can take a look? > > > > Cheers, > > Stephen > > > > From: fieldtrip fieldtrip-bounces at science.ru.nl> > On Behalf Of Marion Vincent > Sent: Thursday, January 17, 2019 10:37 AM > To: fieldtrip at science.ru.nl > Subject: [FieldTrip] Baseline removal errors in trials preprocessing > > > > Dear FIeldtrip users, > > > > I’m new in using Fieldtrip for EEG processing and I’ve encountred some > issues while removing the Baseline of my trials. > > > > I’m working on EEG signals recorded with the BioSemi system. My > pre-processing method is : > > (1) Re-referecing the channels (necessary with BioSemi) > > (2) Trial definition > > (3) Baseline removal > > > > I’ve read on the documentation that ft_preprocessing xcan have several cfg > parameter for the Baseline removal : > > > > % cfg.demean = 'yes';%'no' or 'yes', whether to apply baseline correction > (default = 'no') > > % cfg.baselinewindow = 'all';%[begin end] ;%in seconds, the default is the > complete trial (default = 'all') > > % cfg.detrend = 'no'; %'no' or 'yes', remove linear trend from the > data (done per trial) (default = 'no') > > > > I wanted to remove a Baseline defined as the average of a given window > preceeding my stimulus onset. > > > > I tried to use : cfg.baselinewindow = [-0.5 0 ]; cfg.baselinewindow = [0 > 0.1] or the default window . > > But the problem is that I always have the same result, no matter the > window I use : the first point of my trial is put to zero and substracted > to all my trial. > > > > I’m sure I’m doing something wrong (and that the answer is very simple), > but I can’t manage to understand what is the issue. > > > > Do you have any advice ? > > > > Thanks ! > > Marion > > > > Marion VINCENT > Eng., PhD , CNRS Research Engineer > > > > > > _______________________________________________ > 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 elene.beitia at alumni.mondragon.edu Fri Jan 18 09:20:14 2019 From: elene.beitia at alumni.mondragon.edu (Elene Beitia Loinaz) Date: Fri, 18 Jan 2019 09:20:14 +0100 Subject: [FieldTrip] headmodel and electrodes alignment In-Reply-To: References: Message-ID: Thank you Stephen and Julian, I already fixed the problem. It was a problem between different standards. Hau idatzi du Stephen Whitmarsh (stephen.whitmarsh at gmail.com) erabiltzaileak (2019 urt. 16, az. (10:45)): > Hi Elene, > > In the code you do not use ft_electroderealign twice (once manually, then > automatic). Also, you convert units after realignment. > > For the sake of debugging and clarity, I would: > > > 1. - figure out and set the units correctly for you headmodel and > electrodes > 2. - convert headmodel and electrodes to same units > 3. - plot to check > 4. - use 'interactive' realignment > 5. - plot to check > 6. - use 'headmodel' realignment > 7. - plot to check > > > Cheers, > Stephen > > > On Wed, 16 Jan 2019 at 10:35, Elene Beitia Loinaz < > elene.beitia at alumni.mondragon.edu> wrote: > >> Hi Stephen, >> >> Thank you for your answer. I already try that, but the result that I >> obtained is not correct either. >> >> Code: >> >> cfg=[]; >> >> cfg.method= 'headshape'; >> >> cfg.headshape=headmodel.bnd(1); % this is the skin surface >> >> elec_realigned =ft_electroderealign(cfg,data1.elec); >> >> >> >> %Plot the result to see if is correct >> >> >> >> vol = ft_convert_units(vol,'mm'); >> >> elec_realigned = ft_convert_units(elec_realigned,'mm') >> >> >> >> figure >> >> ft_plot_sens(elec_realigned, 'style', 'b'); >> >> >> >> hold on >> >> ft_plot_vol(vol); >> >> [image: Captura de pantalla 2019-01-16 a las 9.59.14.png] >> >> Thank you in advance, >> >> Elene. >> _______________________________________________ >> 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 aitor.martinezegurcegui at uzh.ch Fri Jan 18 16:16:42 2019 From: aitor.martinezegurcegui at uzh.ch (Aitor Egurtzegi) Date: Fri, 18 Jan 2019 16:16:42 +0100 Subject: [FieldTrip] automatic channel rejection Message-ID: Dear Fieldtrip subscribers, I was wondering if anyone knew how to automatically reject bad channels in Fieldtrip, as it is done in EEGLAB based on e.g. kurtosis. Basically, I'm looking for the Fieldtrip equivalent of the EEGLAB function pop_rejchan. Many thanks in advance, Aitor From dlozanosoldevilla at gmail.com Fri Jan 18 16:47:17 2019 From: dlozanosoldevilla at gmail.com (Diego Lozano-Soldevilla) Date: Fri, 18 Jan 2019 16:47:17 +0100 Subject: [FieldTrip] automatic channel rejection In-Reply-To: References: Message-ID: Hi Aitor, Take a look at this http://www.fieldtriptoolbox.org/tutorial/visual_artifact_rejection/#manual-artifact-rejection---display-a-summary Best, Diego On Fri, 18 Jan 2019 at 16:43, Aitor Egurtzegi < aitor.martinezegurcegui at uzh.ch> wrote: > Dear Fieldtrip subscribers, > > I was wondering if anyone knew how to automatically reject bad channels > in Fieldtrip, as it is done in EEGLAB based on e.g. kurtosis. Basically, > I'm looking for the Fieldtrip equivalent of the EEGLAB function > pop_rejchan. > > Many thanks in advance, > Aitor > > _______________________________________________ > 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 ali.mazah at gmail.com Fri Jan 18 16:46:18 2019 From: ali.mazah at gmail.com (Ali Mazaheri) Date: Fri, 18 Jan 2019 15:46:18 +0000 Subject: [FieldTrip] Postdoc position in the Experimental Linguistics Laboratory (ELL) Message-ID: Postdoctoral Research Fellow in the Experimental Linguistics Laboratory (ELL) A temporary, full-time position as a Postdoctoral Research Fellow is available at the University of Agder for a duration of two years. The position is affiliated with the Department of Foreign Languages and Translation, Faculty of Humanities and Pedagogy. The position is located at the University of Agder’s Kristiansand campus. The starting date is *1 August 2019,* or subject to agreement during the recruitment process. The person hired will contribute to a research project within the Experimental Linguistics Laboratory (ELL) run by Prof. Linda Wheeldon and Prof. Allison Wetterlin. The project will be run in collaboration with Prof. Aditi Lahiri (Language and Brain Laboratory, Oxford University) and Dr. Steven Frisson (Language Research Group, University of Birmingham). The research will employ eye-tracking and EEG methodologies to examine morpho-phonological processes in second language English reading and speech comprehension in Norwegian-English bilinguals. The Postdoctoral Research Fellow (RF) will be fully involved in the design, running, analysis and dissemination of the research. The project will support the career development of the RF by enabling the development of their research expertise in a theoretically and methodologically demanding project. Applicants must have a PhD in Experimental Linguistics or Psycholinguistics and expertise in the design, running of EEG experiments and in EEG data analysis. They must also have excellent spoken and written English. They must have obtained their doctorate within the last four years, and preferably within the last two. The dissertation must have been approved within the application deadline. Documented research publications beyond the doctoral thesis and experience from externally financed research projects (including writing applications and implementing projects) will be given priority. Engagement as a postdoctoral research fellow is carried out in accordance with the *Regulations concerning terms and conditions of employment for the positions of post-doctoral research fellows, research fellows, research assistants and specialized residents* as determined by the Ministry of Education and Research of 31.01.06, pursuant to the Act covering universities and colleges § 6-4, sixth paragraph, located at http://www.lovdata.no/for/sf/kd/xd-20060131-0102.html Cooperative skills and personal suitability will be emphasised. In the ranking of the candidates. Emphasis will also be placed upon the applicants’ competence and academic specialisation in relation to the needs of the research project. The successful applicant will have rights and obligations in accordance with the current regulations for the public service. Shortlisted applicants will be invited to attend an interview for the position. Appointments are made by the University of Agder’s Appointments Committee for Instruction and Research Positions. The Norwegian public sector is committed to reflecting the diversity of society, and the personnel policy of the University of Agder aims to achieve a balanced workforce. All qualified persons are therefore encouraged to apply for the position, irrespective of cultural background, gender, age or disability. The position is remunerated according to the State Salary Scale, Salary Plan 17.510, code 1352 Postdoctor, lr. 24, NOK 524 200 - 597 400. For especially well-qualified applicants, a higher salary may be considered. A 2 % compulsory pension contribution to the Norwegian Public Service Pension Fund is deducted from the pay according to current statutory provisions. Applicants are requested to submit their application online. Please use the link “Send Application”. - Certified transcripts - List of publications - Up to 5 publications or academic articles (including the PhD thesis) The applicant is also responsible for making sure that the appropriate number of documents are submitted by the application deadline. Be aware that incomplete applications will not be considered. In accordance with §25(2) of the Freedom of Information Act, applicants may request that they are not identified in the open list of applicants. The University, however, reserves the right to publish the name of applicants. Applicants will be advised of the University’s intention to exercise this right. *Application deadline: 15 March 2019.* Further information about the position may be obtained from Prof. Linda Wheeldonand Prof. Allison Wetterlin -- Dr Ali Mazaheri, PhD Associate Professor School of Psychology 3.03 Hills Building University of Birmingham +44(0)121 414 2863 www.alimazaheri.com -------------- next part -------------- An HTML attachment was scrubbed... URL: From J.Billington at leeds.ac.uk Fri Jan 18 19:07:04 2019 From: J.Billington at leeds.ac.uk (Jac Billington) Date: Fri, 18 Jan 2019 18:07:04 +0000 Subject: [FieldTrip] ft_clusterplot error? Message-ID: Dear experts, I've recently begun using fieldtrip and have been following tutorials well. however, I have perhaps run into a problem with ft_clusterplot. An example output is located in dropbox here: https://www.dropbox.com/sh/64m3xpgco2uavky/AADT6-rXEdylVzHN1lY-q7SNa?dl=0 My negative cluster labels don't seem to be located in a cluster per se, or in regions with a greater raw effect. This seems at odds with tutorial examples and papers. Apologies if I'm missing something, but can this be correct? I did have earlier errors (' ft_error('unsupported dimord %s', dimord);') but I realised this was because dimensions of my stat.raweffect (64 5 200) were in conflict with collapsing time and frequency when running ft_freqstatistics. Reducing stat.raweefect to 64 1 solved this error, but I'm wondering if I have done something wrong. My code is posted below and I'd happily be poited to some papers if I'm misunderstanding this. Thank you in advance. Jac % load data (from ft_freqanalysis) load(filename1); con1= freqScaling load(filename2); con2=freqScaling; %%%% run the stats: cfg = []; cfg.channel = 'all'; cfg.latency = [4 6]; cfg.frequency = [8 12]; cfg.method = 'montecarlo'; cfg.statistic = 'ft_statfun_indepsamplesT'; cfg.correctm = 'cluster'; cfg.clusteralpha = 0.05; cfg.clusterstatistic = 'maxsum'; cfg.minnbchan = 2; cfg.tail = 0; cfg.clustertail = 0; cfg.alpha = 0.025; cfg.numrandomization = 500; cfg.avgoverchan = 'no' cfg.avgovertime = 'yes' cfg.avgoverfreq = 'yes' % prepare_neighbours determines what sensors may form clusters cfg_neighb.method = 'distance'; cfg.neighbours = ft_prepare_neighbours(cfg_neighb, elec); design = zeros(1,size(con1.powspctrm,1) + size(con2.powspctrm,1)); design(1,1:size(con1.powspctrm,1)) = 1; design(1,(size(con1.powspctrm,1)+1):(size(con1.powspctrm,1)+ size(con2.powspctrm,1))) = 2; cfg.design = design; cfg.ivar = 1; [stat] = ft_freqstatistics(cfg, con1, con2); cfg=[] cfg.keeptrials = 'no' cfg.latency = [4 6]; cfg.frequency = [8 12]; con1 = ft_freqdescriptives(cfg, con1); con2 = ft_freqdescriptives(cfg, con2); %%%% resize powerspec to avoid dimord error. Collapse freq/ time con1rs=mean(con1.powspctrm,3) %%% collapse time dim con2rs=mean(con2.powspctrm,3) %%% collapse time dim con1rs=mean(con1rs,2) %%% collapse freq con2rs=mean(con2rs,2) stat.raweffect = con1rs-con2rs cfg.alpha = 0.025; cfg.zparam = 'raweffect'; cfg.zlim = [-1 3]; cfg.layout = 'biosemi64.lay'; cfg.subplotsize = ([1 1]); ft_clusterplot(cfg, stat); -------------- next part -------------- An HTML attachment was scrubbed... URL: From a.stolk8 at gmail.com Fri Jan 18 20:30:49 2019 From: a.stolk8 at gmail.com (Arjen Stolk) Date: Fri, 18 Jan 2019 11:30:49 -0800 Subject: [FieldTrip] ECoG/sEEG FieldTrip bootcamp at UC Davis Message-ID: Dear community, and (aspiring) intracranial researchers in particular, We're hosting the first ECoG/sEEG FieldTrip bootcamp at the UC Davis Medical Center (Sacramento, California) on March 20-22. The workshop will consist of lectures and hands-on sessions covering the methods implemented in FieldTrip. Speakers include Robert Oostenveld (Donders Institute), Bob Knight (UC Berkeley), and myself (UC Berkeley, Donders). For more information, including how to register, please visit the bootcamp website . Best regards, Arjen Stolk Ignacio Saez (UC Davis) Robert Oostenveld -------------- next part -------------- An HTML attachment was scrubbed... URL: From stephen.whitmarsh at gmail.com Sat Jan 19 11:04:46 2019 From: stephen.whitmarsh at gmail.com (Stephen Whitmarsh) Date: Sat, 19 Jan 2019 11:04:46 +0100 Subject: [FieldTrip] ft_clusterplot error? In-Reply-To: References: Message-ID: Hi Jac, I would start by plotting your (t)stats, and for simplicity doing that with ft_singleplotER (cfg.param = 'stat') rather than ft_clusterplot. Then try plotting the power-difference. This should not be more than a subtraction of data_diff.powspctrm = data1.powspctrm - data2.powspctrm, . No reshaping should be needed. The problem is probably a mistake somewhere keeping track of dimensions/latencies etc. which is tricky with clusters. Also, make sure to clear your cfg before every function so you don't carry the cfg of a previous function into the next. That will also help readability and debugging. HTH, Stephen On Fri, 18 Jan 2019 at 19:28, Jac Billington wrote: > Dear experts, > > > I've recently begun using fieldtrip and have been following tutorials > well. however, I have perhaps run into a problem with ft_clusterplot. > > > An example output is located in dropbox here: > https://www.dropbox.com/sh/64m3xpgco2uavky/AADT6-rXEdylVzHN1lY-q7SNa?dl=0 > > > My negative cluster labels don't seem to be located in a cluster per se, > or in regions with a greater raw effect. This seems at odds with tutorial > examples and papers. Apologies if I'm missing something, but can this be > correct? > > > I did have earlier errors (' ft_error('unsupported dimord %s', dimord);') > but I realised this was because dimensions of my stat.raweffect (64 5 > 200) were in conflict with collapsing time and frequency when running > ft_freqstatistics. Reducing stat.raweefect to 64 1 solved this error, but > I'm wondering if I have done something wrong. > > > My code is posted below and I'd happily be poited to some papers if I'm > misunderstanding this. > > > Thank you in advance. Jac > > > > % load data (from ft_freqanalysis) > load(filename1); > con1= freqScaling > load(filename2); > con2=freqScaling; > > %%%% run the stats: > cfg = []; > cfg.channel = 'all'; > cfg.latency = [4 6]; > cfg.frequency = [8 12]; > cfg.method = 'montecarlo'; > cfg.statistic = 'ft_statfun_indepsamplesT'; > cfg.correctm = 'cluster'; > cfg.clusteralpha = 0.05; > cfg.clusterstatistic = 'maxsum'; > cfg.minnbchan = 2; > cfg.tail = 0; > cfg.clustertail = 0; > cfg.alpha = 0.025; > cfg.numrandomization = 500; > cfg.avgoverchan = 'no' > cfg.avgovertime = 'yes' > cfg.avgoverfreq = 'yes' > % prepare_neighbours determines what sensors may form clusters > cfg_neighb.method = 'distance'; > cfg.neighbours = ft_prepare_neighbours(cfg_neighb, elec); > > design = zeros(1,size(con1.powspctrm,1) + size(con2.powspctrm,1)); > design(1,1:size(con1.powspctrm,1)) = 1; > design(1,(size(con1.powspctrm,1)+1):(size(con1.powspctrm,1)+ > size(con2.powspctrm,1))) = 2; > cfg.design = design; > cfg.ivar = 1; > > > [stat] = ft_freqstatistics(cfg, con1, con2); > > > > cfg=[] > cfg.keeptrials = 'no' > cfg.latency = [4 6]; > cfg.frequency = [8 12]; > con1 = ft_freqdescriptives(cfg, con1); > con2 = ft_freqdescriptives(cfg, con2); > > %%%% resize powerspec to avoid dimord error. Collapse freq/ time > con1rs=mean(con1.powspctrm,3) %%% collapse time dim > con2rs=mean(con2.powspctrm,3) %%% collapse time dim > con1rs=mean(con1rs,2) %%% collapse freq > con2rs=mean(con2rs,2) > stat.raweffect = con1rs-con2rs > > cfg.alpha = 0.025; > cfg.zparam = 'raweffect'; > cfg.zlim = [-1 3]; > cfg.layout = 'biosemi64.lay'; > cfg.subplotsize = ([1 1]); > ft_clusterplot(cfg, stat); > > > _______________________________________________ > 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 aitor.martinezegurcegui at uzh.ch Sun Jan 20 17:22:07 2019 From: aitor.martinezegurcegui at uzh.ch (Aitor Egurtzegi) Date: Sun, 20 Jan 2019 17:22:07 +0100 Subject: [FieldTrip] automatic channel rejection In-Reply-To: References: Message-ID: <10d93c05-c66e-18d6-7533-ef40b858a218@uzh.ch> Hi Diego, Thanks for the help. However, I was wondering if there is a way to reject artifacts without visually inspecting them. Like, from the manual you sent I see that I still would have to click on the trials / channels I would like to reject? Is there a way to script it based on some previously established parameters, without having to check all trials / channels for each participant? Best, Aitor > Date: Fri, 18 Jan 2019 16:47:17 +0100 > From: Diego Lozano-Soldevilla > To: FieldTrip discussion list > Subject: Re: [FieldTrip] automatic channel rejection > Message-ID: > > Content-Type: text/plain; charset="utf-8" > > Hi Aitor, > Take a look at this > http://www.fieldtriptoolbox.org/tutorial/visual_artifact_rejection/#manual-artifact-rejection---display-a-summary > Best, > Diego > > On Fri, 18 Jan 2019 at 16:43, Aitor Egurtzegi < > aitor.martinezegurcegui at uzh.ch> wrote: > >> Dear Fieldtrip subscribers, >> >> I was wondering if anyone knew how to automatically reject bad channels >> in Fieldtrip, as it is done in EEGLAB based on e.g. kurtosis. Basically, >> I'm looking for the Fieldtrip equivalent of the EEGLAB function >> pop_rejchan. >> >> Many thanks in advance, >> Aitor >> >> _______________________________________________ >> fieldtrip mailing list >> https://mailman.science.ru.nl/mailman/listinfo/fieldtrip >> https://doi.org/10.1371/journal.pcbi.1002202 From r.oostenveld at donders.ru.nl Mon Jan 21 10:25:29 2019 From: r.oostenveld at donders.ru.nl (Robert Oostenveld) Date: Mon, 21 Jan 2019 10:25:29 +0100 Subject: [FieldTrip] MEG/EEG FieldTrip toolkit course: pre-registration now open In-Reply-To: References: Message-ID: Dear all, On 8-12 April 2019 we will again host the yearly “Advanced MEG/EEG toolkit" at the Donders Institute in Nijmegen. The course is aimed at researchers that have already performed some MEG/EEG data acquisition and have a good understanding of their own experimental design. Furthermore, we expect that you know the basics of MATLAB and that you already have some experience with MEG/EEG preprocessing and analysis. This intense 5-day toolkit course will teach you advanced MEG and EEG data analysis methods. We will cover preprocessing, frequency analysis, source reconstruction, connectivity and various statistical methods. The toolkit will consist of a number of lectures, followed by hands-on sessions in which you will be tutored through the complete analysis of a MEG data set using the FieldTrip toolbox. There will be plenty of opportunity to interact and ask questions about your research and data. On the final day you will have the opportunity to work on your own dataset under supervision of skilled tutors. We can only host a limited number of participants. From past experience we expect the course to be oversubscribed, hence we will start with pre-registration. The final selection of the participants will be based on the motivation, background experience and research interests that are provided in the registration form. The deadline for pre-registration is March 1, 2019. More information, including information about the registration details and last years program can be found at http://www.fieldtriptoolbox.org/workshop/toolkit2019/ . Looking forward to seeing you at the toolkit course, Robert ----------------------------------------------------------- Robert Oostenveld, PhD Senior Researcher & MEG Physicist Donders Institute for Brain, Cognition and Behaviour Radboud University, Nijmegen, The Netherlands tel.: +31 (0)24 3619695 e-mail: r.oostenveld at donders.ru.nl web: http://www.ru.nl/donders skype: r.oostenveld ----------------------------------------------------------- -------------- next part -------------- An HTML attachment was scrubbed... URL: From elene.beitia at alumni.mondragon.edu Mon Jan 21 12:15:02 2019 From: elene.beitia at alumni.mondragon.edu (Elene Beitia Loinaz) Date: Mon, 21 Jan 2019 12:15:02 +0100 Subject: [FieldTrip] Problem selecting frequency range for source reconstruction using beamforming DICS technique Message-ID: Dear Fieldtripers, I am trying to select a time-frequency tile for the performance of the Bermforming using DICS recostruction. First, usng freq analysis I have chosen the time-frequency range I want, you can see it in the next code: cfg = []; cfg.continuous = 'yes'; cfg.output = 'fourier'; cfg.channel = 'all'; cfg.keeptrials = 'yes'; cfg.method = 'mtmfft'; cfg.taper = 'hanning'; cfg.foilim = [8 12]; cfg.t_ftimwin =[160:0.0039063:175]; data_Fourier = ft_freqanalysis(cfg, data1); If I look in the data_Fourier the frequency is define like a range, but when I do the beamforming it choses only one frequency (the middle of the range), I have not configured anything in cfg.frequency since I want to take the full range and not a single number in Hz, but still takes only one (in my case 10Hz). Error: Warning: could not determine dimord of "freq" in: label: {128×1 cell} freq: 10.0000 fourierspctrm: [1×128 double] cumsumcnt: 94464 cumtapcnt: 1 elec: [1×1 struct] cfg: [1×1 struct] dimord: 'rpttap_chan_freq' Warning: the selected value 10 should be within the range of the array from 10 to 10 Is there anyway to consider all the rage? Is it necessary to set other parameters in the cfg of the ft_freqanalysis/ft_sourceanalysis? Thank you in advanced, Elene. -------------- next part -------------- An HTML attachment was scrubbed... URL: From stephen.whitmarsh at gmail.com Mon Jan 21 13:03:16 2019 From: stephen.whitmarsh at gmail.com (Stephen Whitmarsh) Date: Mon, 21 Jan 2019 13:03:16 +0100 Subject: [FieldTrip] Problem selecting frequency range for source reconstruction using beamforming DICS technique In-Reply-To: References: Message-ID: Dear Elene, ft_sourceanalysis only takes a single number (as stated in the help) in cfg.frequency. If cfg.frquency is empty it will first default to 'all', and then take the average frequency of the input data (cfg.frequency = mean(cfg.frequency) %on line 306). This is not clear, and I would suppose just breaking with an error would have been clearer. If you want all the frequencies beamformed separately you will have to loop over frequencies. If you want all the frequencies beamformed as an average over frequencies you can average your frequency data first with e.g. ft_selectdata (cfg.avgoverfreq = 'yes') or, better, do your freqanalysis with some sleppian smoothing (cfg.taper = 'dpss'). HTH, Stephen On Mon, 21 Jan 2019 at 12:35, Elene Beitia Loinaz < elene.beitia at alumni.mondragon.edu> wrote: > Dear Fieldtripers, > > I am trying to select a time-frequency tile for the performance of the > Bermforming using DICS recostruction. > > First, usng freq analysis I have chosen the time-frequency range I want, > you can see it in the next code: > > cfg = []; > cfg.continuous = 'yes'; > cfg.output = 'fourier'; > cfg.channel = 'all'; > cfg.keeptrials = 'yes'; > cfg.method = 'mtmfft'; > cfg.taper = 'hanning'; > cfg.foilim = [8 12]; > cfg.t_ftimwin =[160:0.0039063:175]; > data_Fourier = ft_freqanalysis(cfg, data1); > > If I look in the data_Fourier the frequency is define like a range, but > when I do the beamforming it choses only one frequency (the middle of the > range), I have not configured anything in cfg.frequency since I want to > take the full range and not a single number in Hz, but still takes only one > (in my case 10Hz). > > Error: > Warning: could not determine dimord of "freq" in: > > label: {128×1 cell} > freq: 10.0000 > fourierspctrm: [1×128 double] > cumsumcnt: 94464 > cumtapcnt: 1 > elec: [1×1 struct] > cfg: [1×1 struct] > dimord: 'rpttap_chan_freq' > > > Warning: the selected value 10 should be within the range of the array > from 10 to 10 > > Is there anyway to consider all the rage? Is it necessary to set other > parameters in the cfg of the ft_freqanalysis/ft_sourceanalysis? > > Thank you in advanced, > > Elene. > > > > _______________________________________________ > 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 J.Billington at leeds.ac.uk Mon Jan 21 13:51:26 2019 From: J.Billington at leeds.ac.uk (Jac Billington) Date: Mon, 21 Jan 2019 12:51:26 +0000 Subject: [FieldTrip] ft_clusterplot error? In-Reply-To: References: Message-ID: Dear Stephen, Thank you for the useful reply, I've been doing some trouble shooting and it seems the output of ft_freqstatistics doesn't seem to be reflecting my raw data. See "stat_discrepency.jpg" in dropbox link. This plots condition 1 and 2 and the raw difference (as per your suggestion data_diff.powspctrm = data1.powspctrm - data2.powspctrm). I then plot stat.stat and the clusterplot output, clusterplot is representing my stat output. In general I want to look at all channels, time 4-6seconds, for frequencies 8-12. The latter 2 parameters I want averaged. I noticed that the T-stat plot (of stat.stat) reports only one time and frequency. I presumed this was the average for display purposes (- double checked by plotting only that time and frequency in "stat_discrepency_onetimefreq.jpg" and it is different). I think my design matrix is correct (following http://www.fieldtriptoolbox.org/tutorial/cluster_permutation_timelock/). I have 28 trials in con1 and 25 in con2, my design matrix is 1x53 reflecting the trials for the two conditions. I don't think I need to specify anything further until I move on to group analysis (this is just a single subject). The only other issue I can think of is in the parameter: cfg.neighbours = ft_prepare_neighbours(cfg_neighb, elec); I create 'elec' by using ft_read_sens to read the preprocessing output from EEGlab. filenameA=strcat([det.subjects{s} '_postPreProICA_epoched_' det.epochs{1} '.set']) elec = ft_read_sens(filenameA) Again, I'd be grateful for any pointers. My computation of ft_freqstatistics has not changed from the original post. Thank you. Jac https://www.dropbox.com/sh/64m3xpgco2uavky/AADT6-rXEdylVzHN1lY-q7SNa?dl=0 [https://www.dropbox.com/static/images/spectrum-icons/generated/content/content-folder_dropbox-large.png] fieldtrip www.dropbox.com Shared with Dropbox FieldTrip discussion list Subject: Re: [FieldTrip] ft_clusterplot error? Message-ID: Content-Type: text/plain; charset="utf-8" Hi Jac, I would start by plotting your (t)stats, and for simplicity doing that with ft_singleplotER (cfg.param = 'stat') rather than ft_clusterplot. Then try plotting the power-difference. This should not be more than a subtraction of data_diff.powspctrm = data1.powspctrm - data2.powspctrm, . No reshaping should be needed. The problem is probably a mistake somewhere keeping track of dimensions/latencies etc. which is tricky with clusters. Also, make sure to clear your cfg before every function so you don't carry the cfg of a previous function into the next. That will also help readability and debugging. HTH, Stephen ________________________________ From: Jac Billington Sent: 18 January 2019 18:07:04 To: fieldtrip at science.ru.nl Subject: ft_clusterplot error? Dear experts, I've recently begun using fieldtrip and have been following tutorials well. however, I have perhaps run into a problem with ft_clusterplot. An example output is located in dropbox here: https://www.dropbox.com/sh/64m3xpgco2uavky/AADT6-rXEdylVzHN1lY-q7SNa?dl=0 My negative cluster labels don't seem to be located in a cluster per se, or in regions with a greater raw effect. This seems at odds with tutorial examples and papers. Apologies if I'm missing something, but can this be correct? I did have earlier errors (' ft_error('unsupported dimord %s', dimord);') but I realised this was because dimensions of my stat.raweffect (64 5 200) were in conflict with collapsing time and frequency when running ft_freqstatistics. Reducing stat.raweefect to 64 1 solved this error, but I'm wondering if I have done something wrong. My code is posted below and I'd happily be poited to some papers if I'm misunderstanding this. Thank you in advance. Jac % load data (from ft_freqanalysis) load(filename1); con1= freqScaling load(filename2); con2=freqScaling; %%%% run the stats: cfg = []; cfg.channel = 'all'; cfg.latency = [4 6]; cfg.frequency = [8 12]; cfg.method = 'montecarlo'; cfg.statistic = 'ft_statfun_indepsamplesT'; cfg.correctm = 'cluster'; cfg.clusteralpha = 0.05; cfg.clusterstatistic = 'maxsum'; cfg.minnbchan = 2; cfg.tail = 0; cfg.clustertail = 0; cfg.alpha = 0.025; cfg.numrandomization = 500; cfg.avgoverchan = 'no' cfg.avgovertime = 'yes' cfg.avgoverfreq = 'yes' % prepare_neighbours determines what sensors may form clusters cfg_neighb.method = 'distance'; cfg.neighbours = ft_prepare_neighbours(cfg_neighb, elec); design = zeros(1,size(con1.powspctrm,1) + size(con2.powspctrm,1)); design(1,1:size(con1.powspctrm,1)) = 1; design(1,(size(con1.powspctrm,1)+1):(size(con1.powspctrm,1)+ size(con2.powspctrm,1))) = 2; cfg.design = design; cfg.ivar = 1; [stat] = ft_freqstatistics(cfg, con1, con2); cfg=[] cfg.keeptrials = 'no' cfg.latency = [4 6]; cfg.frequency = [8 12]; con1 = ft_freqdescriptives(cfg, con1); con2 = ft_freqdescriptives(cfg, con2); %%%% resize powerspec to avoid dimord error. Collapse freq/ time con1rs=mean(con1.powspctrm,3) %%% collapse time dim con2rs=mean(con2.powspctrm,3) %%% collapse time dim con1rs=mean(con1rs,2) %%% collapse freq con2rs=mean(con2rs,2) stat.raweffect = con1rs-con2rs cfg.alpha = 0.025; cfg.zparam = 'raweffect'; cfg.zlim = [-1 3]; cfg.layout = 'biosemi64.lay'; cfg.subplotsize = ([1 1]); ft_clusterplot(cfg, stat); -------------- next part -------------- An HTML attachment was scrubbed... URL: From stephen.whitmarsh at gmail.com Mon Jan 21 14:56:37 2019 From: stephen.whitmarsh at gmail.com (Stephen Whitmarsh) Date: Mon, 21 Jan 2019 14:56:37 +0100 Subject: [FieldTrip] ft_clusterplot error? In-Reply-To: References: Message-ID: Hi Jac, To my eyes all looks fine to me! - Your stat output seems to fit your raw difference rather well, I would say! Why do you think otherwise? Sure, the t-stats are not the same as absolute differences, but that's to be expected - the general topography looks rather similar. If you don't trust the calculation you can perhaps just do a MATLAB ttest on one electrode and compare that to the freqstatistics output. - Yes, you seem to be plotting the average over time ([5 5] in the plot) and frequency ([10 10] in the plot). As I said earlier, I can't track the clusterplot at the point (it also has no parameters in the image). Without the code that you use, I can't see if anything else is going on. - The significant cluster/electrodes you see in the clusterplot seems to correspond to that blue central blog on the stats left of it in the same image file just fine. - You can check your neighbours with ft_neighbourplot Since you are probably doing your statistics on average time and freq, the only dimension that your cluster extends to is 'space', i.e. electrodes, so for now you don't need to use clusterplot, but just highlight the electrodes in ft_topoplotXX based on your stats. This is just to not make it more confusing than it is - clusters that span time/freq/space are just very hard to plot. Cheers, Stephen On Mon, 21 Jan 2019 at 14:35, Jac Billington wrote: > Dear Stephen, > > > Thank you for the useful reply, I've been doing some trouble shooting and > it seems the output of ft_freqstatistics doesn't seem to be reflecting > my raw data. See "stat_discrepency.jpg" in dropbox link. > > > This plots condition 1 and 2 and the raw difference (as per your > suggestion data_diff.powspctrm = data1.powspctrm - data2.powspctrm). I > then plot stat.stat and the clusterplot output, clusterplot is representing > my stat output. > > > In general I want to look at all channels, time 4-6seconds, for > frequencies 8-12. The latter 2 parameters I want averaged. > > > I noticed that the T-stat plot (of stat.stat) reports only one time and > frequency. I presumed this was the average for display purposes (- double > checked by plotting only that time and frequency in " > stat_discrepency_onetimefreq.jpg" and it is different). > > > I think my design matrix is correct (following > http://www.fieldtriptoolbox.org/tutorial/cluster_permutation_timelock/). > I have 28 trials in con1 and 25 in con2, my design matrix is 1x53 > reflecting the trials for the two conditions. I don't think I need to > specify anything further until I move on to group analysis (this is just a > single subject). > > > > > The only other issue I can think of is in the parameter: > > cfg.neighbours = ft_prepare_neighbours(cfg_neighb, elec); > > > I create 'elec' by using ft_read_sens to read the preprocessing output > from EEGlab. > > > filenameA=strcat([det.subjects{s} '_postPreProICA_epoched_' > det.epochs{1} '.set']) > elec = ft_read_sens(filenameA) > > > Again, I'd be grateful for any pointers. My computation of > ft_freqstatistics has not changed from the original post. > > Thank you. Jac > > > > https://www.dropbox.com/sh/64m3xpgco2uavky/AADT6-rXEdylVzHN1lY-q7SNa?dl=0 > > fieldtrip > > www.dropbox.com > Shared with Dropbox > > > > > FieldTrip discussion list > Subject: Re: [FieldTrip] ft_clusterplot error? > Message-ID: > zMQuaKsyyBxOewfS5GgBYDMrXoUpHMk674WYFWXSfA+w at mail.gmail.com> > Content-Type: text/plain; charset="utf-8" > > Hi Jac, > > I would start by plotting your (t)stats, and for simplicity doing that with > ft_singleplotER (cfg.param = 'stat') rather than ft_clusterplot. > Then try plotting the power-difference. This should not be more than a > subtraction of data_diff.powspctrm = data1.powspctrm - data2.powspctrm, . > No reshaping should be needed. > The problem is probably a mistake somewhere keeping track of > dimensions/latencies etc. which is tricky with clusters. > Also, make sure to clear your cfg before every function so you don't carry > the cfg of a previous function into the next. That will also help > readability and debugging. > > HTH, > Stephen > > ------------------------------ > *From:* Jac Billington > *Sent:* 18 January 2019 18:07:04 > *To:* fieldtrip at science.ru.nl > *Subject:* ft_clusterplot error? > > > Dear experts, > > > I've recently begun using fieldtrip and have been following tutorials > well. however, I have perhaps run into a problem with ft_clusterplot. > > > An example output is located in dropbox here: > https://www.dropbox.com/sh/64m3xpgco2uavky/AADT6-rXEdylVzHN1lY-q7SNa?dl=0 > > > My negative cluster labels don't seem to be located in a cluster per se, > or in regions with a greater raw effect. This seems at odds with tutorial > examples and papers. Apologies if I'm missing something, but can this be > correct? > > > I did have earlier errors (' ft_error('unsupported dimord %s', dimord);') > but I realised this was because dimensions of my stat.raweffect (64 5 > 200) were in conflict with collapsing time and frequency when running > ft_freqstatistics. Reducing stat.raweefect to 64 1 solved this error, but > I'm wondering if I have done something wrong. > > > My code is posted below and I'd happily be poited to some papers if I'm > misunderstanding this. > > > Thank you in advance. Jac > > > > % load data (from ft_freqanalysis) > load(filename1); > con1= freqScaling > load(filename2); > con2=freqScaling; > > %%%% run the stats: > cfg = []; > cfg.channel = 'all'; > cfg.latency = [4 6]; > cfg.frequency = [8 12]; > cfg.method = 'montecarlo'; > cfg.statistic = 'ft_statfun_indepsamplesT'; > cfg.correctm = 'cluster'; > cfg.clusteralpha = 0.05; > cfg.clusterstatistic = 'maxsum'; > cfg.minnbchan = 2; > cfg.tail = 0; > cfg.clustertail = 0; > cfg.alpha = 0.025; > cfg.numrandomization = 500; > cfg.avgoverchan = 'no' > cfg.avgovertime = 'yes' > cfg.avgoverfreq = 'yes' > % prepare_neighbours determines what sensors may form clusters > cfg_neighb.method = 'distance'; > cfg.neighbours = ft_prepare_neighbours(cfg_neighb, elec); > > design = zeros(1,size(con1.powspctrm,1) + size(con2.powspctrm,1)); > design(1,1:size(con1.powspctrm,1)) = 1; > design(1,(size(con1.powspctrm,1)+1):(size(con1.powspctrm,1)+ > size(con2.powspctrm,1))) = 2; > cfg.design = design; > cfg.ivar = 1; > > > [stat] = ft_freqstatistics(cfg, con1, con2); > > > > cfg=[] > cfg.keeptrials = 'no' > cfg.latency = [4 6]; > cfg.frequency = [8 12]; > con1 = ft_freqdescriptives(cfg, con1); > con2 = ft_freqdescriptives(cfg, con2); > > %%%% resize powerspec to avoid dimord error. Collapse freq/ time > con1rs=mean(con1.powspctrm,3) %%% collapse time dim > con2rs=mean(con2.powspctrm,3) %%% collapse time dim > con1rs=mean(con1rs,2) %%% collapse freq > con2rs=mean(con2rs,2) > stat.raweffect = con1rs-con2rs > > cfg.alpha = 0.025; > cfg.zparam = 'raweffect'; > cfg.zlim = [-1 3]; > cfg.layout = 'biosemi64.lay'; > cfg.subplotsize = ([1 1]); > ft_clusterplot(cfg, stat); > > > _______________________________________________ > 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 elene.beitia at alumni.mondragon.edu Mon Jan 21 17:38:11 2019 From: elene.beitia at alumni.mondragon.edu (Elene Beitia Loinaz) Date: Mon, 21 Jan 2019 17:38:11 +0100 Subject: [FieldTrip] Problem selecting frequency range for source reconstruction using beamforming DICS technique In-Reply-To: References: Message-ID: Thank you Stephen, Your answer has being very useful. I try your suggestions but as what I want is to perform the reconstruction of a range of frequency with the loop I do not achieve that, and the dpss method gives me error in matlab due to the lack of memory. Even so than you very much!!! Hau idatzi du Stephen Whitmarsh (stephen.whitmarsh at gmail.com) erabiltzaileak (2019 urt. 21, al. (13:03)): > Dear Elene, > > ft_sourceanalysis only takes a single number (as stated in the help) in > cfg.frequency. If cfg.frquency is empty it will first default to 'all', and > then take the average frequency of the input data (cfg.frequency = > mean(cfg.frequency) %on line 306). This is not clear, and I would suppose > just breaking with an error would have been clearer. > > If you want all the frequencies beamformed separately you will have to > loop over frequencies. > If you want all the frequencies beamformed as an average over frequencies > you can average your frequency data first with e.g. ft_selectdata > (cfg.avgoverfreq = 'yes') or, better, do your freqanalysis with some > sleppian smoothing (cfg.taper = 'dpss'). > > HTH, > > Stephen > > > > On Mon, 21 Jan 2019 at 12:35, Elene Beitia Loinaz < > elene.beitia at alumni.mondragon.edu> wrote: > >> Dear Fieldtripers, >> >> I am trying to select a time-frequency tile for the performance of the >> Bermforming using DICS recostruction. >> >> First, usng freq analysis I have chosen the time-frequency range I want, >> you can see it in the next code: >> >> cfg = []; >> cfg.continuous = 'yes'; >> cfg.output = 'fourier'; >> cfg.channel = 'all'; >> cfg.keeptrials = 'yes'; >> cfg.method = 'mtmfft'; >> cfg.taper = 'hanning'; >> cfg.foilim = [8 12]; >> cfg.t_ftimwin =[160:0.0039063:175]; >> data_Fourier = ft_freqanalysis(cfg, data1); >> >> If I look in the data_Fourier the frequency is define like a range, but >> when I do the beamforming it choses only one frequency (the middle of the >> range), I have not configured anything in cfg.frequency since I want to >> take the full range and not a single number in Hz, but still takes only one >> (in my case 10Hz). >> >> Error: >> Warning: could not determine dimord of "freq" in: >> >> label: {128×1 cell} >> freq: 10.0000 >> fourierspctrm: [1×128 double] >> cumsumcnt: 94464 >> cumtapcnt: 1 >> elec: [1×1 struct] >> cfg: [1×1 struct] >> dimord: 'rpttap_chan_freq' >> >> >> Warning: the selected value 10 should be within the range of the array >> from 10 to 10 >> >> Is there anyway to consider all the rage? Is it necessary to set other >> parameters in the cfg of the ft_freqanalysis/ft_sourceanalysis? >> >> Thank you in advanced, >> >> Elene. >> >> >> >> _______________________________________________ >> 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 jedmeltzer at yahoo.com Mon Jan 21 17:47:29 2019 From: jedmeltzer at yahoo.com (Jed Meltzer) Date: Mon, 21 Jan 2019 16:47:29 +0000 (UTC) Subject: [FieldTrip] Postdoctoral Position in Toronto: Treatment and Neuroimaging of Chronic Pain References: <1512049305.1097532.1548089249976.ref@mail.yahoo.com> Message-ID: <1512049305.1097532.1548089249976@mail.yahoo.com> Postdoctoral Position: Treatment and Neuroimaging of Chronic Pain   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. 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: February 18, 2019 (negotiable)Duration: 2 years Supervisor: Dr. Lee Bartel, Faculty of Music, University of TorontoCollaborating Supervisors:  Dr. Tania Di Renna, 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 Monday January 28, 2019.  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 vitae3) Your highest degree transcript (unofficial copy acceptable) 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, pain research, epigenetic analysis, music,  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.caInterviews will commence immediately following the application deadline.  -------------- next part -------------- An HTML attachment was scrubbed... URL: From jyrki at nmr.mgh.harvard.edu Mon Jan 21 21:12:16 2019 From: jyrki at nmr.mgh.harvard.edu (Jyrki Ahveninen) Date: Mon, 21 Jan 2019 15:12:16 -0500 Subject: [FieldTrip] =?utf-8?q?Postdoctoral_Research_Fellow_=E2=80=93_Mas?= =?utf-8?q?sachusetts_General_Hospital/Harvard_Medical_School?= Message-ID: <0C1FE580-0273-4A4A-A996-0297EC894E1C@nmr.mgh.harvard.edu> Postdoctoral Research Fellow – Massachusetts General Hospital/Harvard Medical School We are seeking a talented, highly motivated individual to join a multimodal human neuroimaging research group in Athinoula A. Martinos Center for Biomedical Imaging at Department of Radiology, Massachusetts General Hospital/ Harvard Medical School, Boston, MA. Our NIDCD-funded research examines human auditory working memory, attention, and multisensory feedforward/feedback influences using multivariate statistical/machine learning analyses of MEG/EEG, high-field (3T) and ultra-high field (7T) fMRI, and MRI-navigated TMS/EEG. The noninvasive measures are validated by using ECoG/iEEG recordings in presurgical human patients. Athinoula A. Martinos Center for Biomedical Imaging at Massachusetts General Hospital is one of the largest biomedical imaging centers in the United States with over 200 research faculty members, post-doctoral Research Fellows, and graduate students. This position offers a unique opportunity to work and collaborate with leading researchers who develop and implement cutting edge technologies that could have a high impact on researchers of human auditory cognition, attention/working memory, and multisensory processing, as well as on the broader non-invasive neuroimaging and brain stimulation communities. Required Skills/Abilities/Competencies: Ph.D. or equivalent in Neuroscience, Biomedical Engineering, Electrical Engineering, Psychology, or related fields. Must have experience in at least one of the imaging modalities utilized (MEG/EEG, TMS, TMS/EEG, fMRI, or fMRI/EEG). Experience in subdural or extracellular neurophysiological recordings is a plus. Proven understanding of cognitive neuroscience, particularly auditory cognition, attention and working memory, and multisensory integration. Experience in Matlab, Python, and Linux-based command line operations. Applicants with experience in advanced multivariate statistical analysis and machine learning techniques are strongly preferred. Excellent teamwork, time management and organizational skills. Excellent oral and written communication skills are required. Strong publication record in peer-reviewed scientific journals The approved applicant will hold a Massachusetts General Hospital and a Harvard Medical School appointment as a Research Fellow. This position offers an opportunity to work with an engaged group of scientists that utilize the cutting-edge multimodal neuroimaging infrastructure at MGH Martinos Center to examine neuronal bases of human cognition. Interested candidates should send their cover-letter, full CV, and the names of 3 references to Dr. Jyrki Ahveninen (jyrki at nmr.mgh.harvard.edu). If you wish to obtain more information on the project, please contact Dr. Ahveninen by email. The position is full-time with benefits and available immediately. A two-year time commitment is required with a possible extension of another two years. Salary will be based on qualifications and experience. The Massachusetts General Hospital is an Equal Opportunity/Affirmative Action Employer. -------------- next part -------------- An HTML attachment was scrubbed... URL: From max-philipp.stenner at med.ovgu.de Tue Jan 22 13:07:39 2019 From: max-philipp.stenner at med.ovgu.de (Stenner, Max-Philipp) Date: Tue, 22 Jan 2019 12:07:39 +0000 Subject: [FieldTrip] Postdoc position in Freigeist Research Group (University of Magdeburg) In-Reply-To: <32078_1544429470_5C0E1F9D_32078_1978_1_FBEFFA1F493D8944969D2F5AE78E5883D6FFC367@esen3.imed.uni-magdeburg.de> References: <32078_1544429470_5C0E1F9D_32078_1978_1_FBEFFA1F493D8944969D2F5AE78E5883D6FFC367@esen3.imed.uni-magdeburg.de> Message-ID: Dear all an exciting opportunity has become available for a PostDoc Researcher in Human Motor Neuroscience (for 4 years) in the newly funded Freigeist Research Group "Motor Learning" at the Leibniz Institute for Neurobiology & Department of Neurology at the University of Magdeburg, Germany. Please find a detailed job description and instructions how to apply attached (deadline January 31st 2019). Looking forward to welcoming you to Magdeburg, Max-Philipp Stenner http://www.lin-magdeburg.de/de/abteilungen/verhaltensneurologie/physiology_motorlearning/index.jsp -------------- next part -------------- A non-text attachment was scrubbed... Name: PostDoc Human Motor Neuroscience.pdf Type: application/pdf Size: 379098 bytes Desc: PostDoc Human Motor Neuroscience.pdf URL: -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: ATT00001.txt URL: From J.Billington at leeds.ac.uk Tue Jan 22 15:00:41 2019 From: J.Billington at leeds.ac.uk (Jac Billington) Date: Tue, 22 Jan 2019 14:00:41 +0000 Subject: [FieldTrip] ft_clusterplot error? In-Reply-To: References: , Message-ID: Hi Stephen, Thanks again for the reply and reassurance. ft_neighbourplot is looking fine. I didn't expect the t-stats to look exactly the same but I'd have thought the occipital difference might have been more prominent in the t-stat. That said, my hypothesis is a central-parietal difference so perhaps I shouldn't worry about it! I'll double check the means and variance. Thanks for your help. Jac Hi Jac, To my eyes all looks fine to me! - Your stat output seems to fit your raw difference rather well, I would say! Why do you think otherwise? Sure, the t-stats are not the same as absolute differences, but that's to be expected - the general topography looks rather similar. If you don't trust the calculation you can perhaps just do a MATLAB ttest on one electrode and compare that to the freqstatistics output. - Yes, you seem to be plotting the average over time ([5 5] in the plot) and frequency ([10 10] in the plot). As I said earlier, I can't track the clusterplot at the point (it also has no parameters in the image). Without the code that you use, I can't see if anything else is going on. - The significant cluster/electrodes you see in the clusterplot seems to correspond to that blue central blog on the stats left of it in the same image file just fine. - You can check your neighbours with ft_neighbourplot Since you are probably doing your statistics on average time and freq, the only dimension that your cluster extends to is 'space', i.e. electrodes, so for now you don't need to use clusterplot, but just highlight the electrodes in ft_topoplotXX based on your stats. This is just to not make it more confusing than it is - clusters that span time/freq/space are just very hard to plot. Cheers, Stephen Dr Jac Billington Lecturer in Cognitive Neuroscience School of Psychology, Rm G.06A University of Leeds Leeds, LS2 9JT Tel: +44(0)113 343 6686 Jac Billington CoNi Lab ________________________________ From: Jac Billington Sent: 21 January 2019 12:51:26 To: fieldtrip at science.ru.nl Subject: Re: ft_clusterplot error? Dear Stephen, Thank you for the useful reply, I've been doing some trouble shooting and it seems the output of ft_freqstatistics doesn't seem to be reflecting my raw data. See "stat_discrepency.jpg" in dropbox link. This plots condition 1 and 2 and the raw difference (as per your suggestion data_diff.powspctrm = data1.powspctrm - data2.powspctrm). I then plot stat.stat and the clusterplot output, clusterplot is representing my stat output. In general I want to look at all channels, time 4-6seconds, for frequencies 8-12. The latter 2 parameters I want averaged. I noticed that the T-stat plot (of stat.stat) reports only one time and frequency. I presumed this was the average for display purposes (- double checked by plotting only that time and frequency in "stat_discrepency_onetimefreq.jpg" and it is different). I think my design matrix is correct (following http://www.fieldtriptoolbox.org/tutorial/cluster_permutation_timelock/). I have 28 trials in con1 and 25 in con2, my design matrix is 1x53 reflecting the trials for the two conditions. I don't think I need to specify anything further until I move on to group analysis (this is just a single subject). The only other issue I can think of is in the parameter: cfg.neighbours = ft_prepare_neighbours(cfg_neighb, elec); I create 'elec' by using ft_read_sens to read the preprocessing output from EEGlab. filenameA=strcat([det.subjects{s} '_postPreProICA_epoched_' det.epochs{1} '.set']) elec = ft_read_sens(filenameA) Again, I'd be grateful for any pointers. My computation of ft_freqstatistics has not changed from the original post. Thank you. Jac https://www.dropbox.com/sh/64m3xpgco2uavky/AADT6-rXEdylVzHN1lY-q7SNa?dl=0 [https://www.dropbox.com/static/images/spectrum-icons/generated/content/content-folder_dropbox-large.png] fieldtrip www.dropbox.com Shared with Dropbox FieldTrip discussion list Subject: Re: [FieldTrip] ft_clusterplot error? Message-ID: Content-Type: text/plain; charset="utf-8" Hi Jac, I would start by plotting your (t)stats, and for simplicity doing that with ft_singleplotER (cfg.param = 'stat') rather than ft_clusterplot. Then try plotting the power-difference. This should not be more than a subtraction of data_diff.powspctrm = data1.powspctrm - data2.powspctrm, . No reshaping should be needed. The problem is probably a mistake somewhere keeping track of dimensions/latencies etc. which is tricky with clusters. Also, make sure to clear your cfg before every function so you don't carry the cfg of a previous function into the next. That will also help readability and debugging. HTH, Stephen ________________________________ From: Jac Billington Sent: 18 January 2019 18:07:04 To: fieldtrip at science.ru.nl Subject: ft_clusterplot error? Dear experts, I've recently begun using fieldtrip and have been following tutorials well. however, I have perhaps run into a problem with ft_clusterplot. An example output is located in dropbox here: https://www.dropbox.com/sh/64m3xpgco2uavky/AADT6-rXEdylVzHN1lY-q7SNa?dl=0 My negative cluster labels don't seem to be located in a cluster per se, or in regions with a greater raw effect. This seems at odds with tutorial examples and papers. Apologies if I'm missing something, but can this be correct? I did have earlier errors (' ft_error('unsupported dimord %s', dimord);') but I realised this was because dimensions of my stat.raweffect (64 5 200) were in conflict with collapsing time and frequency when running ft_freqstatistics. Reducing stat.raweefect to 64 1 solved this error, but I'm wondering if I have done something wrong. My code is posted below and I'd happily be poited to some papers if I'm misunderstanding this. Thank you in advance. Jac % load data (from ft_freqanalysis) load(filename1); con1= freqScaling load(filename2); con2=freqScaling; %%%% run the stats: cfg = []; cfg.channel = 'all'; cfg.latency = [4 6]; cfg.frequency = [8 12]; cfg.method = 'montecarlo'; cfg.statistic = 'ft_statfun_indepsamplesT'; cfg.correctm = 'cluster'; cfg.clusteralpha = 0.05; cfg.clusterstatistic = 'maxsum'; cfg.minnbchan = 2; cfg.tail = 0; cfg.clustertail = 0; cfg.alpha = 0.025; cfg.numrandomization = 500; cfg.avgoverchan = 'no' cfg.avgovertime = 'yes' cfg.avgoverfreq = 'yes' % prepare_neighbours determines what sensors may form clusters cfg_neighb.method = 'distance'; cfg.neighbours = ft_prepare_neighbours(cfg_neighb, elec); design = zeros(1,size(con1.powspctrm,1) + size(con2.powspctrm,1)); design(1,1:size(con1.powspctrm,1)) = 1; design(1,(size(con1.powspctrm,1)+1):(size(con1.powspctrm,1)+ size(con2.powspctrm,1))) = 2; cfg.design = design; cfg.ivar = 1; [stat] = ft_freqstatistics(cfg, con1, con2); cfg=[] cfg.keeptrials = 'no' cfg.latency = [4 6]; cfg.frequency = [8 12]; con1 = ft_freqdescriptives(cfg, con1); con2 = ft_freqdescriptives(cfg, con2); %%%% resize powerspec to avoid dimord error. Collapse freq/ time con1rs=mean(con1.powspctrm,3) %%% collapse time dim con2rs=mean(con2.powspctrm,3) %%% collapse time dim con1rs=mean(con1rs,2) %%% collapse freq con2rs=mean(con2rs,2) stat.raweffect = con1rs-con2rs cfg.alpha = 0.025; cfg.zparam = 'raweffect'; cfg.zlim = [-1 3]; cfg.layout = 'biosemi64.lay'; cfg.subplotsize = ([1 1]); ft_clusterplot(cfg, stat); -------------- next part -------------- An HTML attachment was scrubbed... URL: From ighoyota at tlu.ee Wed Jan 23 00:48:35 2019 From: ighoyota at tlu.ee (Ben Ighoyota Ajenaghughrure) Date: Wed, 23 Jan 2019 01:48:35 +0200 Subject: [FieldTrip] Trial definition using events from seperate text file and continous eeg data Message-ID: Hello All, I need help creating trial definitions for my continous eeg data using events time locked in a seperate text file. I have my continous eeg data recorded during game interaction without any event information. The Game events are stored in a text file in miliseconds precission. Both game and eeg recorder runs on the same PC. To take care time synchronisation issues. My problem is how to define trails for eeg data using the event file stored seperately , because currently my eeg data does not have any event information. I am new to fieldtrip but have done this task in eeglab and would love to move on to using fieldtrip toolbox. Looking forward to your support. Best Regards Ighoyota ben. -------------- next part -------------- An HTML attachment was scrubbed... URL: From eunchanna at gmail.com Wed Jan 23 06:30:33 2019 From: eunchanna at gmail.com (=?UTF-8?B?64KY7J2A7LCs?=) Date: Wed, 23 Jan 2019 14:30:33 +0900 Subject: [FieldTrip] Question regarding loreta2fieldtrip Message-ID: Hello, I'm using MATLAB R2017b and sLORETA free software. I'm interested in using sLORETA software to perform source localization on ERD/ERS. I'm getting used to sLORETA, but I'm having a problem loading the sLORETA solution (slor file) into MATLAB. After some web searching, I found loreta2fieldtrip and I wanted to test whether it works. Here are the results I encountered: >> [source] = loreta2fieldtrip('C:\Users\OLEDEEG\Documents\sLORETA-ExampleDataSets\ExampleEEGdata(PeterAnderer)\Pilot\RestEEG_Young\REEG01_Y-slor.txt') 다음 사용 중 오류가 발생함: ft_preamble (line 80) Could not run ft_preamble_callinfo - does not seem to exist 오류 발생: loreta2fieldtrip (line 48) ft_preamble callinfo >> I've only installed Fieldtrip toolbox and didn't add/delete anything yet. Would you be able to help me with this? Thank you in advance for your help. Regards, Eunchan. ᐧ -------------- next part -------------- An HTML attachment was scrubbed... URL: From a.stolk8 at gmail.com Wed Jan 23 06:36:40 2019 From: a.stolk8 at gmail.com (Arjen Stolk) Date: Tue, 22 Jan 2019 21:36:40 -0800 Subject: [FieldTrip] Question regarding loreta2fieldtrip In-Reply-To: References: Message-ID: Hi Eunchan, Briefly checking, did you correctly add fieldtrip and its subdirectories to your matlab path, as described here ? Best regards, Arjen On Tue, Jan 22, 2019 at 9:32 PM 나은찬 wrote: > Hello, > > I'm using MATLAB R2017b and sLORETA free software. > > I'm interested in using sLORETA software to perform source localization on > ERD/ERS. > > I'm getting used to sLORETA, but I'm having a problem loading the sLORETA > solution (slor file) into MATLAB. > > After some web searching, I found loreta2fieldtrip and I wanted to test > whether it works. > > Here are the results I encountered: > > >> [source] = > loreta2fieldtrip('C:\Users\OLEDEEG\Documents\sLORETA-ExampleDataSets\ExampleEEGdata(PeterAnderer)\Pilot\RestEEG_Young\REEG01_Y-slor.txt') > 다음 사용 중 오류가 발생함: ft_preamble (line 80) > Could not run ft_preamble_callinfo - does not seem to exist > > 오류 발생: loreta2fieldtrip (line 48) > ft_preamble callinfo > > >> > > I've only installed Fieldtrip toolbox and didn't add/delete anything yet. > > Would you be able to help me with this? > > Thank you in advance for your help. > > Regards, > > Eunchan. > > ᐧ > _______________________________________________ > 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 stephen.whitmarsh at gmail.com Wed Jan 23 09:13:32 2019 From: stephen.whitmarsh at gmail.com (Stephen Whitmarsh) Date: Wed, 23 Jan 2019 09:13:32 +0100 Subject: [FieldTrip] Trial definition using events from seperate text file and continous eeg data In-Reply-To: References: Message-ID: Hi Ighoyota ben, You will have to create your own trial definition (trl). In (very) short: 1) read your text file in matlab, using whatever MATLAB functions are easiest (e.g. dlmread) 2) create a variable called *trl *that contains N rows for N trials, with 3 columns: start, end, and offset in *samples, *with sample numbers starting from the beginning of you file. The offset determines t=0, e.g. when you want to read data before the trigger. E.g., if sampled at 1000Hz, and want trials from -1.0 to 2.0 around your triggers (i.e. 3000 samples), you would have something like (taking random sample values for where your trials occur): trl = [12300, 15300, -1000; 18000, 21000, -1000; 25050, 28050, -1000] 3) enter that in *cfg.trl*, together with your file name in *cfg.dataset*, and run data = ft_preprocessing(cfg). E.g.: cfg = []; cfg.dataset = 'myfile.edf'; cfg.trl = trl; data = ft_preprocessing(cfg) I hope this explains the general idea. It will be good to follow a tutorial, to get the whole run-through. and take extra care to look at the trial definition part (take e.g. a peak at the cfg.trl) HTH, Stephen On Wed, 23 Jan 2019 at 01:12, Ben Ighoyota Ajenaghughrure wrote: > Hello All, > > I need help creating trial definitions for my continous eeg data using > events time locked in a seperate text file. > > I have my continous eeg data recorded during game interaction without any > event information. > The Game events are stored in a text file in miliseconds precission. > > Both game and eeg recorder runs on the same PC. To take care time > synchronisation issues. > > My problem is how to define trails for eeg data using the event file > stored seperately , because currently my eeg data does not have any event > information. > > I am new to fieldtrip but have done this task in eeglab and would love to > move on to using fieldtrip toolbox. > > Looking forward to your support. > > Best Regards > > Ighoyota ben. > _______________________________________________ > 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 Darren.Kadis at cchmc.org Wed Jan 23 20:47:23 2019 From: Darren.Kadis at cchmc.org (Kadis, Darren) Date: Wed, 23 Jan 2019 19:47:23 +0000 Subject: [FieldTrip] deep sources when warping from template (MNI) to individual space Message-ID: <54b1511bd167466db12ca9e8d2ab30b2@cchmc.org> Dear FieldTrippers: Wanted to follow-up on a discussion regarding poor normalization, and specifically, an inward bias, when warping template (MNI space) source positions to individual subject space. This is a useful approach to normalization, facilitating group-level analyses and anatomical referencing, though meaningful inference is predicated on having accurate normalization/warps. At least one relevant discussion thread, here: https://mailman.science.ru.nl/pipermail/fieldtrip/2015-April/009111.html, though I don't see resolution. In my lab, we're consistently observing an 'inward bias' when warping template source positions to individual space (see attached). Superficial sources seem to shift excessively deep, particularly at the dorsum. Has anyone adjusted the normalization parameters or implemented alternate warping procedures to generate accurate transformations? I will note that default normalization of individual MRI to template works well in both SPM8 and SPM12 (confirmed with checkreg). I believe ft_preparesourcemodel calls upon ft_volumenormalize and spm routines to generate the deformation field. We've tried adjusted the warping regularization parameters in ft_volumenormalise both up and down by an order of magnitude, but did not see any real improvement. Suggestions? Below, I'm sharing a short script used to visualize the relative performance of normalization with SPM8, SPM12 linear-only, and SPM12 nonlinear approaches, as implemented in FieldTrip. I used 346 source positions, located approximately 3.6mm deep to the template brain surface (roughly corresponding to mid-sulcal depth across the cerebral mantle; attached). %% start clear all; close all; restoredefaultpath; addpath('PATH TO CURRENT FIELDTRIP DISTRO'); ft_defaults; vs_pos = []; % n×3, coords of interest, MNI space; see attached text, if interested in replicating template_mri = ft_read_mri('PATH TO SPM12\spm12\canonical\avg152T1.nii'); template_mri.coordsys = 'spm'; % ft_volumesegment needs coordsys of the template volume cfg = []; cfg.output = {'brain', 'skull', 'scalp'}; cfg.spmversion = 'spm12'; cfg.spmmethod = 'new'; template_seg = ft_volumesegment(cfg, template_mri); cfg = []; cfg.method = 'singleshell'; template_headmodel = ft_prepare_headmodel(cfg, template_seg); cfg = []; cfg.grid.pos = vs_pos; cfg.spmversion = 'spm12'; cfg.spmmethod = 'new'; cfg.headmodel = template_headmodel; template_grid = ft_prepare_sourcemodel(cfg); % evaluate dipole positions relative to modeled brain figure; ft_plot_vol(template_headmodel, 'facecolor', 'cortex', 'edgecolor', 'none'); alpha 0.5; camlight; hold on; ft_plot_mesh(template_grid.pos); % generate the individual headmodel; warp source positions from template to subject space T1 = 'PATH TO SUBJECT T1'; % high-quality 3D-T1, 1mm isotropic, here individual_mri = ft_read_mri(T1, 'dataformat', 'nifti_spm'); individual_mri.coordsys = 'spm'; cfg = []; cfg.output = {'brain', 'skull', 'scalp'}; cfg.spmversion = 'spm12'; cfg.spmmethod = 'new'; individual_segmented_mri = ft_volumesegment(cfg, individual_mri); cfg = []; cfg.method = 'singleshell'; individual_headmodel = ft_prepare_headmodel(cfg, individual_segmented_mri); individual_headmodel = ft_convert_units(individual_headmodel, 'cm'); cfg = []; cfg.grid.warpmni = 'yes'; cfg.grid.template = template_grid; cfg.grid.nonlinear = 'yes'; cfg.spmversion = 'spm8'; cfg.mri = individual_mri; individual_grid_spm8 = ft_prepare_sourcemodel(cfg); cfg = []; cfg.grid.warpmni = 'yes'; cfg.grid.template = template_grid; cfg.grid.nonlinear = 'no'; cfg.spmversion = 'spm12'; cfg.spmmethod = 'new'; cfg.mri = individual_mri; individual_grid_spm12_linear = ft_prepare_sourcemodel(cfg); cfg = []; cfg.grid.warpmni = 'yes'; cfg.grid.template = template_grid; cfg.grid.nonlinear = 'yes'; cfg.spmversion = 'spm12'; cfg.spmmethod = 'old'; cfg.mri = individual_mri; individual_grid_spm12_nonlinear = ft_prepare_sourcemodel(cfg); figure; subplot(2, 2, 1); ft_plot_vol(template_headmodel, 'facecolor', 'cortex', 'edgecolor', 'none'); alpha 0.25; camlight; hold on; ft_plot_mesh(template_grid.pos, 'vertexcolor', 'red'); title('template'); subplot(2, 2, 2); ft_plot_vol(individual_headmodel, 'facecolor', 'cortex', 'edgecolor', 'none'); alpha 0.25; camlight; hold on; ft_plot_mesh(individual_grid_spm8.pos); title('individual spm8 nonlinear'); subplot(2, 2, 3); ft_plot_vol(individual_headmodel, 'facecolor', 'cortex', 'edgecolor', 'none'); alpha 0.25; camlight; hold on; ft_plot_mesh(individual_grid_spm12_linear.pos); title('individual spm12 linear only'); subplot(2, 2, 4); ft_plot_vol(individual_headmodel, 'facecolor', 'cortex', 'edgecolor', 'none'); alpha 0.25; camlight; hold on; ft_plot_mesh(individual_grid_spm12_nonlinear.pos); title('individual spm12 nonlinear'); %% end In advance, thanks for your help. Darren S. Kadis, PhD Assistant Professor Co-Director, MEG Core Division of Neurology Pediatric Neuroimaging Research Consortium Cincinnati Children's Hospital Medical Center MLC 15008, 3333 Burnet Avenue Cincinnati, OH 45229-3026 Neurology and Neuroscience Graduate Program College of Medicine, Department of Pediatrics University of Cincinnati -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: compare_normalization.jpg Type: image/jpeg Size: 597389 bytes Desc: compare_normalization.jpg URL: -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: cortical_sources.txt URL: From bick35 at gmail.com Wed Jan 23 23:40:54 2019 From: bick35 at gmail.com (Steph bick) Date: Wed, 23 Jan 2019 22:40:54 +0000 Subject: [FieldTrip] edf import error Message-ID: Dear fieldtrip experts, I exported an EEG file to edf from our clinical system (Natus XLTEK) and am trying to import it. Below I pasted the error and what I tried. I’m using a macbook pro Mojave, and FieldTrip revision beead1127. Any help is highly appreciated. Thank you! Stephan But run into this error: Index exceeds matrix dimensions. Error in read_edf (line 129) if EDF.T0(1) < 91 Error in ft_read_header (line 787) hdr = read_edf(filename); Error in ft_preprocessing (line 397) hdr = ft_read_header(cfg.headerfile, 'headerformat', cfg.headerformat,... I am running this command: cfg=[]; cfg.dataset = '/Users/tst/Downloads/test.edf'; data = ft_preprocessing(cfg) What I tried This is the snipped of read_edf where it gets stuck (in bold is line 129). H1=char(fread(EDF.FILE.FID,256,'char')'); EDF.VERSION=H1(1:8); % 8 Byte Versionsnummer %if 0 fprintf(2,'LOADEDF: WARNING Version EDF Format %i',ver); end EDF.PID = deblank(H1(9:88)); % 80 Byte local patient identification EDF.RID = deblank(H1(89:168)); % 80 Byte local recording identification %EDF.H.StartDate = H1(169:176); % 8 Byte %EDF.H.StartTime = H1(177:184); % 8 Byte EDF.T0=[str2num(H1(168+[7 8])) str2num(H1(168+[4 5])) str2num(H1(168+[1 2])) str2num(H1(168+[9 10])) str2num(H1(168+[12 13])) str2num(H1(168+[15 16])) ]; % Y2K compatibility until year 2090 if EDF.VERSION(1)=='0' if EDF.T0(1) < 91 EDF.T0(1)=2000+EDF.T0(1); else EDF.T0(1)=1900+EDF.T0(1); end else % in a future version, this is hopefully not needed End Some outputs at this stage: K>> EDF.T0 ans = [] K>> EDF EDF = struct with fields: FILE: [1×1 struct] FileName: '/Users/tst/Downloads/NS136_Day4_Seizure1_clipANON.edf' VERSION: '0 ' PID: 'ReX' RID: '' T0: [] K>> H1 H1 = '0 ReX IF I import the edf to an EEG viewer and export from that software again, the import works. It seems that the export writes additional info to what is read into H1. The outputs at the same stage of import for this new file is: EDF = struct with fields: FILE: [1×1 struct] FileName: '/Users/tst/Downloads/NewFile.edf' VERSION: '0 ' PID: 'X X X X' RID: 'Startdate 23-JAN-2019 X X AnyWave_EDF+_exporter' T0: [19 1 23 16 49 29] K>> H1 H1 = '0 X X X X Startdate 23-JAN-2019 X X AnyWave_EDF+_exporter -------------- next part -------------- An HTML attachment was scrubbed... URL: From leizhang at psych.ac.cn Thu Jan 24 05:35:58 2019 From: leizhang at psych.ac.cn (leizhang) Date: Thu, 24 Jan 2019 12:35:58 +0800 Subject: [FieldTrip] =?utf-8?q?can=27t_find_the_ft=5Fpostfreesurferscript?= =?utf-8?b?LnNo?= References: Message-ID: Dear community, My name is Zhang Lei and I am working in the institute of psychology, CAS. Currently I am analyzing an MEG data. I'm doing the 'Creating a source model for source-reconstruction of MEG or EEG data' part according to the tutorial. After the freesurfer step, ft_postfreesurferscript.sh are used. However, I couldn't find the script in the fieldtrip/bin/, and I couldn't find it in other folder or on the web either. I wander where I can get this script to complete the step. Thanks! Best,  Zhang Lei Sent from YoMail -------------- next part -------------- An HTML attachment was scrubbed... URL: From jan.schoffelen at donders.ru.nl Fri Jan 25 01:19:19 2019 From: jan.schoffelen at donders.ru.nl (Schoffelen, J.M. (Jan Mathijs)) Date: Fri, 25 Jan 2019 00:19:19 +0000 Subject: [FieldTrip] can't find the ft_postfreesurferscript.sh In-Reply-To: References: Message-ID: <418E7C2D-700B-44F7-A10F-7D5771B24557@donders.ru.nl> Hi Zhang Lei, Please check the completeness of your fieldtrip repository. The current version on github has the ft_postfreesurferscript.sh in the bin folder. Best wishes, Jan-Mathijs J.M.Schoffelen, MD PhD Senior Researcher, VIDI-fellow - PI, language in interaction Telephone: +31-24-3614793 Physical location: room 00.028 Donders Centre for Cognitive Neuroimaging, Nijmegen, The Netherlands On 24 Jan 2019, at 04:35, leizhang > wrote: Dear community, My name is Zhang Lei and I am working in the institute of psychology, CAS. Currently I am analyzing an MEG data. I'm doing the 'Creating a source model for source-reconstruction of MEG or EEG data' part according to the tutorial. After the freesurfer step, ft_postfreesurferscript.sh are used. However, I couldn't find the script in the fieldtrip/bin/, and I couldn't find it in other folder or on the web either. I wander where I can get this script to complete the step. Thanks! Best, Zhang Lei ________________________________ Sent from YoMail _______________________________________________ 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 jan.schoffelen at donders.ru.nl Fri Jan 25 01:25:45 2019 From: jan.schoffelen at donders.ru.nl (Schoffelen, J.M. (Jan Mathijs)) Date: Fri, 25 Jan 2019 00:25:45 +0000 Subject: [FieldTrip] deep sources when warping from template (MNI) to individual space In-Reply-To: <54b1511bd167466db12ca9e8d2ab30b2@cchmc.org> References: <54b1511bd167466db12ca9e8d2ab30b2@cchmc.org> Message-ID: <1333A06A-B511-4D34-A2E0-CD44B2AEA6DB@donders.ru.nl> Dear Darren, That’s certainly a creative way to use the inverse warp for the creation of the subject specific grids :). I don’t know what might be going on, but recently we noticed that the warp might go wrong if the metric units of the data object are unexpected. I am not sure whether this is the case for you, but I noticed that the individual headmodels are explicitly converted into cm. Now, the warping parameters extracted from spm might be agnostic with respect to the units of the input, and probably are defined in ‘mm’. I know that we have been looking into this (i.e. the unit related issue) recently, but don’t know whether it has been resolved. Just as a diagnostic, could you keep the individual headmodel in mm and check what happens? Best wishes, Jan-Mathijs J.M.Schoffelen, MD PhD Senior Researcher, VIDI-fellow - PI, language in interaction Telephone: +31-24-3614793 Physical location: room 00.028 Donders Centre for Cognitive Neuroimaging, Nijmegen, The Netherlands On 23 Jan 2019, at 19:47, Kadis, Darren > wrote: Dear FieldTrippers: Wanted to follow-up on a discussion regarding poor normalization, and specifically, an inward bias, when warping template (MNI space) source positions to individual subject space. This is a useful approach to normalization, facilitating group-level analyses and anatomical referencing, though meaningful inference is predicated on having accurate normalization/warps. At least one relevant discussion thread, here: https://mailman.science.ru.nl/pipermail/fieldtrip/2015-April/009111.html, though I don’t see resolution. In my lab, we’re consistently observing an ‘inward bias’ when warping template source positions to individual space (see attached). Superficial sources seem to shift excessively deep, particularly at the dorsum. Has anyone adjusted the normalization parameters or implemented alternate warping procedures to generate accurate transformations? I will note that default normalization of individual MRI to template works well in both SPM8 and SPM12 (confirmed with checkreg). I believe ft_preparesourcemodel calls upon ft_volumenormalize and spm routines to generate the deformation field. We’ve tried adjusted the warping regularization parameters in ft_volumenormalise both up and down by an order of magnitude, but did not see any real improvement. Suggestions? Below, I’m sharing a short script used to visualize the relative performance of normalization with SPM8, SPM12 linear-only, and SPM12 nonlinear approaches, as implemented in FieldTrip. I used 346 source positions, located approximately 3.6mm deep to the template brain surface (roughly corresponding to mid-sulcal depth across the cerebral mantle; attached). %% start clear all; close all; restoredefaultpath; addpath('PATH TO CURRENT FIELDTRIP DISTRO'); ft_defaults; vs_pos = []; % n×3, coords of interest, MNI space; see attached text, if interested in replicating template_mri = ft_read_mri('PATH TO SPM12\spm12\canonical\avg152T1.nii'); template_mri.coordsys = 'spm'; % ft_volumesegment needs coordsys of the template volume cfg = []; cfg.output = {'brain', 'skull', 'scalp'}; cfg.spmversion = 'spm12'; cfg.spmmethod = 'new'; template_seg = ft_volumesegment(cfg, template_mri); cfg = []; cfg.method = 'singleshell'; template_headmodel = ft_prepare_headmodel(cfg, template_seg); cfg = []; cfg.grid.pos = vs_pos; cfg.spmversion = 'spm12'; cfg.spmmethod = 'new'; cfg.headmodel = template_headmodel; template_grid = ft_prepare_sourcemodel(cfg); % evaluate dipole positions relative to modeled brain figure; ft_plot_vol(template_headmodel, 'facecolor', 'cortex', 'edgecolor', 'none'); alpha 0.5; camlight; hold on; ft_plot_mesh(template_grid.pos); % generate the individual headmodel; warp source positions from template to subject space T1 = 'PATH TO SUBJECT T1'; % high-quality 3D-T1, 1mm isotropic, here individual_mri = ft_read_mri(T1, 'dataformat', 'nifti_spm'); individual_mri.coordsys = 'spm'; cfg = []; cfg.output = {'brain', 'skull', 'scalp'}; cfg.spmversion = 'spm12'; cfg.spmmethod = 'new'; individual_segmented_mri = ft_volumesegment(cfg, individual_mri); cfg = []; cfg.method = 'singleshell'; individual_headmodel = ft_prepare_headmodel(cfg, individual_segmented_mri); individual_headmodel = ft_convert_units(individual_headmodel, 'cm'); cfg = []; cfg.grid.warpmni = 'yes'; cfg.grid.template = template_grid; cfg.grid.nonlinear = 'yes'; cfg.spmversion = 'spm8'; cfg.mri = individual_mri; individual_grid_spm8 = ft_prepare_sourcemodel(cfg); cfg = []; cfg.grid.warpmni = 'yes'; cfg.grid.template = template_grid; cfg.grid.nonlinear = 'no'; cfg.spmversion = 'spm12'; cfg.spmmethod = 'new'; cfg.mri = individual_mri; individual_grid_spm12_linear = ft_prepare_sourcemodel(cfg); cfg = []; cfg.grid.warpmni = 'yes'; cfg.grid.template = template_grid; cfg.grid.nonlinear = 'yes'; cfg.spmversion = 'spm12'; cfg.spmmethod = 'old'; cfg.mri = individual_mri; individual_grid_spm12_nonlinear = ft_prepare_sourcemodel(cfg); figure; subplot(2, 2, 1); ft_plot_vol(template_headmodel, 'facecolor', 'cortex', 'edgecolor', 'none'); alpha 0.25; camlight; hold on; ft_plot_mesh(template_grid.pos, 'vertexcolor', 'red'); title('template'); subplot(2, 2, 2); ft_plot_vol(individual_headmodel, 'facecolor', 'cortex', 'edgecolor', 'none'); alpha 0.25; camlight; hold on; ft_plot_mesh(individual_grid_spm8.pos); title('individual spm8 nonlinear'); subplot(2, 2, 3); ft_plot_vol(individual_headmodel, 'facecolor', 'cortex', 'edgecolor', 'none'); alpha 0.25; camlight; hold on; ft_plot_mesh(individual_grid_spm12_linear.pos); title('individual spm12 linear only'); subplot(2, 2, 4); ft_plot_vol(individual_headmodel, 'facecolor', 'cortex', 'edgecolor', 'none'); alpha 0.25; camlight; hold on; ft_plot_mesh(individual_grid_spm12_nonlinear.pos); title('individual spm12 nonlinear'); %% end In advance, thanks for your help. Darren S. Kadis, PhD Assistant Professor Co-Director, MEG Core Division of Neurology Pediatric Neuroimaging Research Consortium Cincinnati Children's Hospital Medical Center MLC 15008, 3333 Burnet Avenue Cincinnati, OH 45229-3026 Neurology and Neuroscience Graduate Program College of Medicine, Department of Pediatrics University of Cincinnati _______________________________________________ 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 leizhang at psych.ac.cn Fri Jan 25 07:29:19 2019 From: leizhang at psych.ac.cn (leizhang) Date: Fri, 25 Jan 2019 14:29:19 +0800 Subject: [FieldTrip] =?utf-8?q?can=27t_find_the_ft=5Fpostf__reesurferscri?= =?utf-8?q?pt=2Esh?= References: <418E7C2D-700B-44F7-A10F-7D5771B24557@donders.ru.nl> Message-ID: Thanks a lot! I find it. best, Zhang Lei Sent from YoMail -------------- next part -------------- An HTML attachment was scrubbed... URL: From muthuraman10 at hotmail.com Fri Jan 25 13:03:26 2019 From: muthuraman10 at hotmail.com (Muthuraman Muthuraman) Date: Fri, 25 Jan 2019 12:03:26 +0000 Subject: [FieldTrip] Neuroscientist with focus on electrophysiology and imaging in Parkinson disease patients! Message-ID: Doctoral Student Neuroscientist with focus on electrophysiology and imaging in Parkinson disease patients The clinic of neurology, imaging and neurostimulation group (http://imaging-neurostim.com) University of Mainz, Germany, invites applications for a PhD Student for a functional translational neuroscience (FTN) scholarship three year position to work on electrophysiology and imaging in Parkinson disease (PD) patients. A project with multimodality usage of modalities like electroencephalography (EEG) and functional magnetic resonance imaging (fMRI) to analyze network fingerprints in PD patients. The successful applicant holds a Master’s degree (or equivalent) in a relevant academic area such as basic life sciences, neuropsychology, applied mathematics or biomedical engineering or similar disciplines. German language proficiency is mandatory for communicating with the patients. The working language at the institute is English. Experience with electrophysiology and the analysis of brain signals is advantageous, but not essential. The applicant’s merits are assessed on the basis of the quality of Master’s level studies and thesis, previous experience with the brain imaging, motivation and research interests. The location for this research will mainly be the workgroups “Section of Movement Disorders, Neurostimulation and Neuroimaging“ of Prof. Sergiu Groppa at the Department of Neurology and “Biomedical Statistics and Multimodal Signal Processing Unit” of Prof. Muthuraman Muthuraman, both at the Focus Program Translational Neurosciences (http://www.ftn.uni-mainz.de/) and Neuroimaging Centre Mainz (http://www.ftn.nic.uni-mainz.de/). Expected close collaborations with national and international partners. The application should include a statement of research interests, a curriculum vitae (max. 4 pages) composed according to good scientific practice, a certificate of Master’s degree, copy of the master’s thesis and grades of Master’s level studies, the names and e-mail addresses of two referees and a proof of proficiency in English. The position will be open until filled. To apply for the position, please send the above documents as pdfs until 15.02.2019 to Prof. Sergiu Groppa, and Prof. Muthuraman Muthuraman, Department of Neurology, Section of movement disorders and neurostimulation, University of Mainz, Langenbeckstrasse 1, 55131 Mainz, Germany, or by Email to segroppa(at)uni-mainz.de; mmuthura(at)uni-mainz.de. For additional information please contact Muthuraman Muthuraman. -------------- next part -------------- An HTML attachment was scrubbed... URL: From dlozanosoldevilla at gmail.com Fri Jan 25 13:59:49 2019 From: dlozanosoldevilla at gmail.com (Diego Lozano-Soldevilla) Date: Fri, 25 Jan 2019 13:59:49 +0100 Subject: [FieldTrip] automatic channel rejection In-Reply-To: <10d93c05-c66e-18d6-7533-ef40b858a218@uzh.ch> References: <10d93c05-c66e-18d6-7533-ef40b858a218@uzh.ch> Message-ID: Hi Aitor, May be what you're looking for is "ft_artifact_threshold.m". That being said, I don't recommend rejecting artifacts without visually inspecting the data. Absolute threshold do not necessarily generalize across subjects and/or experimental sessions. I hope that helps, Diego On Sun, 20 Jan 2019 at 17:45, Aitor Egurtzegi < aitor.martinezegurcegui at uzh.ch> wrote: > Hi Diego, > > Thanks for the help. However, I was wondering if there is a way to > reject artifacts without visually inspecting them. Like, from the manual > you sent I see that I still would have to click on the trials / channels > I would like to reject? Is there a way to script it based on some > previously established parameters, without having to check all trials / > channels for each participant? > > Best, > Aitor > > > Date: Fri, 18 Jan 2019 16:47:17 +0100 > > From: Diego Lozano-Soldevilla > > To: FieldTrip discussion list > > Subject: Re: [FieldTrip] automatic channel rejection > > Message-ID: > > < > CAEVBUjij4o8J-U10rF4Oxfa9d81tE_BD3t81DcdSy-VQfeTnUA at mail.gmail.com> > > Content-Type: text/plain; charset="utf-8" > > > > Hi Aitor, > > Take a look at this > > > http://www.fieldtriptoolbox.org/tutorial/visual_artifact_rejection/#manual-artifact-rejection---display-a-summary > > Best, > > Diego > > > > On Fri, 18 Jan 2019 at 16:43, Aitor Egurtzegi < > > aitor.martinezegurcegui at uzh.ch> wrote: > > > >> Dear Fieldtrip subscribers, > >> > >> I was wondering if anyone knew how to automatically reject bad channels > >> in Fieldtrip, as it is done in EEGLAB based on e.g. kurtosis. Basically, > >> I'm looking for the Fieldtrip equivalent of the EEGLAB function > >> pop_rejchan. > >> > >> Many thanks in advance, > >> Aitor > >> > >> _______________________________________________ > >> 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 Darren.Kadis at cchmc.org Fri Jan 25 17:53:59 2019 From: Darren.Kadis at cchmc.org (Kadis, Darren) Date: Fri, 25 Jan 2019 16:53:59 +0000 Subject: [FieldTrip] deep sources when warping from template (MNI) to individual space (Schoffelen, J.M. (Jan Mathijs)) Message-ID: Jan-Mathijs, thanks for the speedy response. As suggested, I re-ran the sourcemodel comparison, keeping the individual headmodel in mm, but also explicitly specifying 'mm' when calling ft_prepare_sourcemodel (cfg.grid.unit = 'mm'; else assumes cm). Unfortunately, I'm still seeing the 'deep bias' for the warped positions. Units for the for the data object don’t seem to be the problem - the resulting source positions (.pos field) for the mm-defined vs cm-defined headmodel are identical, after accounting for order of magnitude difference, and rounding. I'll keep digging, and welcome other suggestions. For now, the 'SPM12 linear only' option seems to produce the most reasonable-looking positions in individual space (I believe Stephen Whitmarsh previously concluded the same - https://mailman.science.ru.nl/pipermail/fieldtrip/2015-April/009111.html). Thanks, Darren > -----Original Message----- > From: fieldtrip On Behalf Of fieldtrip- > request at science.ru.nl > Sent: Friday, January 25, 2019 6:00 AM > To: fieldtrip at science.ru.nl > Subject: fieldtrip Digest, Vol 98, Issue 30 > > Send fieldtrip mailing list submissions to > fieldtrip at science.ru.nl > > To subscribe or unsubscribe via the World Wide Web, visit > https://mailman.science.ru.nl/mailman/listinfo/fieldtrip > or, via email, send a message with subject or body 'help' to > fieldtrip-request at science.ru.nl > > You can reach the person managing the list at > fieldtrip-owner at science.ru.nl > > When replying, please edit your Subject line so it is more specific than "Re: > Contents of fieldtrip digest..." > > > Today's Topics: > > 1. Re: can't find the ft_postfreesurferscript.sh > (Schoffelen, J.M. (Jan Mathijs)) > 2. Re: deep sources when warping from template (MNI) to > individual space (Schoffelen, J.M. (Jan Mathijs)) > 3. Re: can't find the ft_postf reesurferscript.sh (leizhang) > > > ---------------------------------------------------------------------- > > Message: 1 > Date: Fri, 25 Jan 2019 00:19:19 +0000 > From: "Schoffelen, J.M. (Jan Mathijs)" > To: FieldTrip discussion list > Subject: Re: [FieldTrip] can't find the ft_postfreesurferscript.sh > Message-ID: <418E7C2D-700B-44F7-A10F-7D5771B24557 at donders.ru.nl> > Content-Type: text/plain; charset="utf-8" > > Hi Zhang Lei, > > Please check the completeness of your fieldtrip repository. The current > version on github has the ft_postfreesurferscript.sh in the bin folder. > > Best wishes, > Jan-Mathijs > > > J.M.Schoffelen, MD PhD > Senior Researcher, VIDI-fellow - PI, language in interaction > Telephone: +31-24-3614793 > Physical location: room 00.028 > Donders Centre for Cognitive Neuroimaging, Nijmegen, The Netherlands > > > > On 24 Jan 2019, at 04:35, leizhang > > wrote: > > Dear community, > > My name is Zhang Lei and I am working in the institute of psychology, CAS. > Currently I am analyzing an MEG data. > > I'm doing the 'Creating a source model for source-reconstruction of MEG or > EEG data' part according to the tutorial. After the freesurfer step, > ft_postfreesurferscript.sh are used. However, I couldn't find the script in the > fieldtrip/bin/, and I couldn't find it in other folder or on the web either. I > wander where I can get this script to complete the step. > > Thanks! > Best, > Zhang Lei > > ________________________________ > Sent from YoMail > _______________________________________________ > 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: > 1ccd55/attachment-0001.html> > > ------------------------------ > > Message: 2 > Date: Fri, 25 Jan 2019 00:25:45 +0000 > From: "Schoffelen, J.M. (Jan Mathijs)" > To: FieldTrip discussion list > Subject: Re: [FieldTrip] deep sources when warping from template (MNI) > to individual space > Message-ID: <1333A06A-B511-4D34-A2E0-CD44B2AEA6DB at donders.ru.nl> > Content-Type: text/plain; charset="utf-8" > > Dear Darren, > > That’s certainly a creative way to use the inverse warp for the creation of the > subject specific grids :). I don’t know what might be going on, but recently we > noticed that the warp might go wrong if the metric units of the data object > are unexpected. I am not sure whether this is the case for you, but I noticed > that the individual headmodels are explicitly converted into cm. Now, the > warping parameters extracted from spm might be agnostic with respect to > the units of the input, and probably are defined in ‘mm’. I know that we have > been looking into this (i.e. the unit related issue) recently, but don’t know > whether it has been resolved. Just as a diagnostic, could you keep the > individual headmodel in mm and check what happens? > > Best wishes, > Jan-Mathijs > > > > J.M.Schoffelen, MD PhD > Senior Researcher, VIDI-fellow - PI, language in interaction > Telephone: +31-24-3614793 > Physical location: room 00.028 > Donders Centre for Cognitive Neuroimaging, Nijmegen, The Netherlands > > > > On 23 Jan 2019, at 19:47, Kadis, Darren > > wrote: > > Dear FieldTrippers: > > Wanted to follow-up on a discussion regarding poor normalization, and > specifically, an inward bias, when warping template (MNI space) source > positions to individual subject space. This is a useful approach to > normalization, facilitating group-level analyses and anatomical referencing, > though meaningful inference is predicated on having accurate > normalization/warps. At least one relevant discussion thread, here: > https://mailman.science.ru.nl/pipermail/fieldtrip/2015-April/009111.html, > though I don’t see resolution. > > In my lab, we’re consistently observing an ‘inward bias’ when warping > template source positions to individual space (see attached). Superficial > sources seem to shift excessively deep, particularly at the dorsum. Has > anyone adjusted the normalization parameters or implemented alternate > warping procedures to generate accurate transformations? I will note that > default normalization of individual MRI to template works well in both SPM8 > and SPM12 (confirmed with checkreg). > > I believe ft_preparesourcemodel calls upon ft_volumenormalize and spm > routines to generate the deformation field. We’ve tried adjusted the > warping regularization parameters in ft_volumenormalise both up and down > by an order of magnitude, but did not see any real improvement. > Suggestions? > > Below, I’m sharing a short script used to visualize the relative performance of > normalization with SPM8, SPM12 linear-only, and SPM12 nonlinear > approaches, as implemented in FieldTrip. I used 346 source positions, > located approximately 3.6mm deep to the template brain surface (roughly > corresponding to mid-sulcal depth across the cerebral mantle; attached). > > > %% start > > clear all; close all; > > restoredefaultpath; addpath('PATH TO CURRENT FIELDTRIP DISTRO'); > ft_defaults; > > vs_pos = []; % n×3, coords of interest, MNI space; see attached text, if > interested in replicating > > template_mri = ft_read_mri('PATH TO > SPM12\spm12\canonical\avg152T1.nii'); > template_mri.coordsys = 'spm'; % ft_volumesegment needs coordsys of the > template volume > > cfg = []; > cfg.output = {'brain', 'skull', 'scalp'}; cfg.spmversion = 'spm12'; > cfg.spmmethod = 'new'; template_seg = ft_volumesegment(cfg, > template_mri); > > cfg = []; > cfg.method = 'singleshell'; > template_headmodel = ft_prepare_headmodel(cfg, template_seg); > > cfg = []; > cfg.grid.pos = vs_pos; > cfg.spmversion = 'spm12'; > cfg.spmmethod = 'new'; > cfg.headmodel = template_headmodel; > template_grid = ft_prepare_sourcemodel(cfg); > > > % evaluate dipole positions relative to modeled brain figure; > ft_plot_vol(template_headmodel, 'facecolor', 'cortex', 'edgecolor', 'none'); > alpha 0.5; camlight; hold on; ft_plot_mesh(template_grid.pos); > > % generate the individual headmodel; warp source positions from template > to subject space > T1 = 'PATH TO SUBJECT T1'; % high-quality 3D-T1, 1mm isotropic, here > individual_mri = ft_read_mri(T1, 'dataformat', 'nifti_spm'); > individual_mri.coordsys = 'spm'; > > cfg = []; > cfg.output = {'brain', 'skull', 'scalp'}; cfg.spmversion = 'spm12'; > cfg.spmmethod = 'new'; individual_segmented_mri = ft_volumesegment(cfg, > individual_mri); > > cfg = []; > cfg.method = 'singleshell'; > individual_headmodel = ft_prepare_headmodel(cfg, > individual_segmented_mri); individual_headmodel = > ft_convert_units(individual_headmodel, 'cm'); > > cfg = []; > cfg.grid.warpmni = 'yes'; > cfg.grid.template = template_grid; > cfg.grid.nonlinear = 'yes'; > cfg.spmversion = 'spm8'; > cfg.mri = individual_mri; > individual_grid_spm8 = ft_prepare_sourcemodel(cfg); > > cfg = []; > cfg.grid.warpmni = 'yes'; > cfg.grid.template = template_grid; > cfg.grid.nonlinear = 'no'; > cfg.spmversion = 'spm12'; > cfg.spmmethod = 'new'; > cfg.mri = individual_mri; > individual_grid_spm12_linear = ft_prepare_sourcemodel(cfg); > > cfg = []; > cfg.grid.warpmni = 'yes'; > cfg.grid.template = template_grid; > cfg.grid.nonlinear = 'yes'; > cfg.spmversion = 'spm12'; > cfg.spmmethod = 'old'; > cfg.mri = individual_mri; > individual_grid_spm12_nonlinear = ft_prepare_sourcemodel(cfg); > > figure; > subplot(2, 2, 1); ft_plot_vol(template_headmodel, 'facecolor', 'cortex', > 'edgecolor', 'none'); alpha 0.25; camlight; hold on; > ft_plot_mesh(template_grid.pos, 'vertexcolor', 'red'); title('template'); > subplot(2, 2, 2); ft_plot_vol(individual_headmodel, 'facecolor', 'cortex', > 'edgecolor', 'none'); alpha 0.25; camlight; hold on; > ft_plot_mesh(individual_grid_spm8.pos); title('individual spm8 nonlinear'); > subplot(2, 2, 3); ft_plot_vol(individual_headmodel, 'facecolor', 'cortex', > 'edgecolor', 'none'); alpha 0.25; camlight; hold on; > ft_plot_mesh(individual_grid_spm12_linear.pos); title('individual spm12 > linear only'); subplot(2, 2, 4); ft_plot_vol(individual_headmodel, 'facecolor', > 'cortex', 'edgecolor', 'none'); alpha 0.25; camlight; hold on; > ft_plot_mesh(individual_grid_spm12_nonlinear.pos); title('individual spm12 > nonlinear'); > > %% end > > In advance, thanks for your help. > > Darren S. Kadis, PhD > Assistant Professor > Co-Director, MEG Core > > Division of Neurology > Pediatric Neuroimaging Research Consortium Cincinnati Children's Hospital > Medical Center MLC 15008, 3333 Burnet Avenue Cincinnati, OH 45229-3026 > > Neurology and Neuroscience Graduate Program College of Medicine, > Department of Pediatrics University of Cincinnati > _____________________ > __________________________ > 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: > f75225/attachment-0001.html> > > ------------------------------ > > Message: 3 > Date: Fri, 25 Jan 2019 14:29:19 +0800 > From: "leizhang" > To: "=?utf-8?B?RmllbGRUcmlwIGRpc2N1c3Npb24gbGlzdA==?=" > > Subject: Re: [FieldTrip] can't find the ft_postf reesurferscript.sh > Message-ID: > Content-Type: text/plain; charset="utf-8" > > Thanks a lot! I find it. > > best, > Zhang Lei > > Sent from YoMail > > -------------- next part -------------- > An HTML attachment was scrubbed... > URL: > c25255/attachment-0001.html> > > ------------------------------ > > Subject: Digest Footer > > _______________________________________________ > fieldtrip mailing list > https://mailman.science.ru.nl/mailman/listinfo/fieldtrip > _______________________________________________ > fieldtrip mailing list > https://mailman.science.ru.nl/mailman/listinfo/fieldtrip > https://doi.org/10.1371/journal.pcbi.1002202 > > > ------------------------------ > > End of fieldtrip Digest, Vol 98, Issue 30 > ***************************************** From omerxsharon at gmail.com Sun Jan 27 15:10:15 2019 From: omerxsharon at gmail.com (Omer Sharon) Date: Sun, 27 Jan 2019 16:10:15 +0200 Subject: [FieldTrip] fieldtrip ram usage explodes since Matlab2019 Message-ID: Dear Fieldtrippers I recently upgrade my Matlab to 2018b, as a result my older fieldtrip version which I did not want to upgrade (20160326) did not work anymore (some wierd error was evoked already by ft_definetrials). Therefore I upgrade to a newer fieldtrip version (20181231). The code once perfectly worked is now exploding my 64GB RAM. I'm loading 89 trials of about 30sec each 1000Hz file (total size about 4Gb) from an MFF file. This used to work in the old version... I tried loading just one channel but the problem persists. It doesn't make any sense since the total size of the file is much lower. Did anyone encounter that problem? or have an idea? Great Thanks Omer -------------- next part -------------- An HTML attachment was scrubbed... URL: From aitor.martinezegurcegui at uzh.ch Sun Jan 27 17:14:00 2019 From: aitor.martinezegurcegui at uzh.ch (Aitor Egurtzegi) Date: Sun, 27 Jan 2019 17:14:00 +0100 Subject: [FieldTrip] automatic channel rejection In-Reply-To: References: Message-ID: <1c80e074-c18a-3903-1ef1-c6aa0427772a@uzh.ch> Hi Diego, Thanks for your message. Is it possible to reject the trials / channels by giving a list of indices to a function, just like when running ft_rejectcomponent, where you reject components by passing a list of the components to be rejected to the cfg.component method? Best, Aitor > Message: 2 > Date: Fri, 25 Jan 2019 13:59:49 +0100 > From: Diego Lozano-Soldevilla > To: FieldTrip discussion list > Subject: Re: [FieldTrip] automatic channel rejection > Message-ID: > > Content-Type: text/plain; charset="utf-8" > > Hi Aitor, > May be what you're looking for is "ft_artifact_threshold.m". That being > said, I don't recommend rejecting artifacts without visually inspecting the > data. Absolute threshold do not necessarily generalize across subjects > and/or experimental sessions. > I hope that helps, > Diego > > On Sun, 20 Jan 2019 at 17:45, Aitor Egurtzegi < > aitor.martinezegurcegui at uzh.ch> wrote: > >> Hi Diego, >> >> Thanks for the help. However, I was wondering if there is a way to >> reject artifacts without visually inspecting them. Like, from the manual >> you sent I see that I still would have to click on the trials / channels >> I would like to reject? Is there a way to script it based on some >> previously established parameters, without having to check all trials / >> channels for each participant? >> >> Best, >> Aitor >> >>> Date: Fri, 18 Jan 2019 16:47:17 +0100 >>> From: Diego Lozano-Soldevilla >>> To: FieldTrip discussion list >>> Subject: Re: [FieldTrip] automatic channel rejection >>> Message-ID: >>> < >> CAEVBUjij4o8J-U10rF4Oxfa9d81tE_BD3t81DcdSy-VQfeTnUA at mail.gmail.com> >>> Content-Type: text/plain; charset="utf-8" >>> >>> Hi Aitor, >>> Take a look at this >>> >> http://www.fieldtriptoolbox.org/tutorial/visual_artifact_rejection/#manual-artifact-rejection---display-a-summary >>> Best, >>> Diego >>> >>> On Fri, 18 Jan 2019 at 16:43, Aitor Egurtzegi < >>> aitor.martinezegurcegui at uzh.ch> wrote: >>> >>>> Dear Fieldtrip subscribers, >>>> >>>> I was wondering if anyone knew how to automatically reject bad channels >>>> in Fieldtrip, as it is done in EEGLAB based on e.g. kurtosis. Basically, >>>> I'm looking for the Fieldtrip equivalent of the EEGLAB function >>>> pop_rejchan. >>>> >>>> Many thanks in advance, >>>> Aitor >>>> >>>> _______________________________________________ >>>> 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 Sun Jan 27 21:05:33 2019 From: dlozanosoldevilla at gmail.com (Diego Lozano-Soldevilla) Date: Sun, 27 Jan 2019 21:05:33 +0100 Subject: [FieldTrip] automatic channel rejection In-Reply-To: <1c80e074-c18a-3903-1ef1-c6aa0427772a@uzh.ch> References: <1c80e074-c18a-3903-1ef1-c6aa0427772a@uzh.ch> Message-ID: Hi Aitor, Take a look to ft_selectdata.m Best, Diego On Sun, Jan 27, 2019, 18:10 Aitor Egurtzegi Hi Diego, > > Thanks for your message. Is it possible to reject the trials / channels > by giving a list of indices to a function, just like when running > ft_rejectcomponent, where you reject components by passing a list of the > components to be rejected to the cfg.component method? > > Best, > Aitor > > Message: 2 > > Date: Fri, 25 Jan 2019 13:59:49 +0100 > > From: Diego Lozano-Soldevilla > > To: FieldTrip discussion list > > Subject: Re: [FieldTrip] automatic channel rejection > > Message-ID: > > < > CAEVBUjiq4uriOg1pawV58eGhsBTUrzpB2KW9mweQWhEOkGi6kA at mail.gmail.com> > > Content-Type: text/plain; charset="utf-8" > > > > Hi Aitor, > > May be what you're looking for is "ft_artifact_threshold.m". That being > > said, I don't recommend rejecting artifacts without visually inspecting > the > > data. Absolute threshold do not necessarily generalize across subjects > > and/or experimental sessions. > > I hope that helps, > > Diego > > > > On Sun, 20 Jan 2019 at 17:45, Aitor Egurtzegi < > > aitor.martinezegurcegui at uzh.ch> wrote: > > > >> Hi Diego, > >> > >> Thanks for the help. However, I was wondering if there is a way to > >> reject artifacts without visually inspecting them. Like, from the manual > >> you sent I see that I still would have to click on the trials / channels > >> I would like to reject? Is there a way to script it based on some > >> previously established parameters, without having to check all trials / > >> channels for each participant? > >> > >> Best, > >> Aitor > >> > >>> Date: Fri, 18 Jan 2019 16:47:17 +0100 > >>> From: Diego Lozano-Soldevilla > >>> To: FieldTrip discussion list > >>> Subject: Re: [FieldTrip] automatic channel rejection > >>> Message-ID: > >>> < > >> CAEVBUjij4o8J-U10rF4Oxfa9d81tE_BD3t81DcdSy-VQfeTnUA at mail.gmail.com> > >>> Content-Type: text/plain; charset="utf-8" > >>> > >>> Hi Aitor, > >>> Take a look at this > >>> > >> > http://www.fieldtriptoolbox.org/tutorial/visual_artifact_rejection/#manual-artifact-rejection---display-a-summary > >>> Best, > >>> Diego > >>> > >>> On Fri, 18 Jan 2019 at 16:43, Aitor Egurtzegi < > >>> aitor.martinezegurcegui at uzh.ch> wrote: > >>> > >>>> Dear Fieldtrip subscribers, > >>>> > >>>> I was wondering if anyone knew how to automatically reject bad > channels > >>>> in Fieldtrip, as it is done in EEGLAB based on e.g. kurtosis. > Basically, > >>>> I'm looking for the Fieldtrip equivalent of the EEGLAB function > >>>> pop_rejchan. > >>>> > >>>> Many thanks in advance, > >>>> Aitor > >>>> > >>>> _______________________________________________ > >>>> 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 vale.nasato at gmail.com Mon Jan 28 09:04:51 2019 From: vale.nasato at gmail.com (Valentina Nasato) Date: Mon, 28 Jan 2019 09:04:51 +0100 Subject: [FieldTrip] KERNEL Message-ID: <5c4eb7a3.1c69fb81.b2d2c.6405@mx.google.com> Hello to everyone, By fieldtrip I obtained the direct model (FEM) and solved the inverse problem by eloreta and sloreta of EEG dataset. Now the data weights about 2 Gb. I wanted to calculate the kernel of the source just calculated in order to have a smaller file. I can not understand how to calculate the kernel from ' keepfilter', 'keep...' etc. put in input to ft_sourceanalysis. thanks for the helpfulness Valentina Translated with www.DeepL.com/Translator Inviato da Posta per Windows 10 -------------- next part -------------- An HTML attachment was scrubbed... URL: From iliazaharov at gmail.com Mon Jan 28 09:36:41 2019 From: iliazaharov at gmail.com (=?UTF-8?B?0JjQu9GM0Y8g0JfQsNGF0LDRgNC+0LI=?=) Date: Mon, 28 Jan 2019 11:36:41 +0300 Subject: [FieldTrip] cluster-based correlation on one-dimensional data Message-ID: Dear fieldtrip experts, We want to use FieldTrip toolbox to calculate cluster-based correlations between behavioural measure and power averaged for each channel. How should the design matrix for our kind of data look like? Also, if we have our own specific measure for each channel (calculated outside of FieldTrip), how can we use it for cluster-based permutations in a between-subject design? Best regards, -- Ilya Zakharov research associate Developmental Behavioral Genetics Lab Psychological Institute Russian Academy of Education -------------- next part -------------- An HTML attachment was scrubbed... URL: From dlozanosoldevilla at gmail.com Mon Jan 28 10:12:34 2019 From: dlozanosoldevilla at gmail.com (Diego Lozano-Soldevilla) Date: Mon, 28 Jan 2019 10:12:34 +0100 Subject: [FieldTrip] cluster-based correlation on one-dimensional data In-Reply-To: References: Message-ID: Hi Илья Захаров To compute cluster-based correlations please visit: http://www.fieldtriptoolbox.org/faq/how_can_i_test_for_correlations_between_neuronal_data_and_quantitative_stimulus_and_behavioural_variables/ http://www.fieldtriptoolbox.org/workshop/madrid2019/tutorial_stats/#5-compute-a-correlation-between-an-external-variable-and-the-power-spectrum To compute between-participants(trials) please visit: http://www.fieldtriptoolbox.org/tutorial/cluster_permutation_timelock/#between-trials-experiments http://www.fieldtriptoolbox.org/workshop/madrid2019/tutorial_stats/#2-compute--between-participants-contrasts I hope that helps, Diego On Mon, 28 Jan 2019 at 10:03, Илья Захаров wrote: > Dear fieldtrip experts, > > We want to use FieldTrip toolbox to calculate cluster-based correlations > between behavioural measure and power averaged for each channel. How should > the design matrix for our kind of data look like? Also, if we have our own > specific measure for each channel (calculated outside of FieldTrip), how > can we use it for cluster-based permutations in a between-subject design? > > Best regards, > > -- > Ilya Zakharov > research associate > Developmental Behavioral Genetics Lab > Psychological Institute > Russian Academy of Education > _______________________________________________ > 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 vale.nasato at gmail.com Mon Jan 28 14:46:43 2019 From: vale.nasato at gmail.com (Valentina Nasato) Date: Mon, 28 Jan 2019 14:46:43 +0100 Subject: [FieldTrip] inverse kernel of source Message-ID: <5c4f07c3.1c69fb81.b2d2c.cd9e@mx.google.com> Dears, by fieldtrip I have implemented on EEG data the direct problem (FEM) and the inverse problem using sLORETA and eLORETA. Now I would like to calculate the inverse kernel of the source obtained through ft_sourceanalysis. Which command should I add in the struct? thank you Valentina -------------- next part -------------- An HTML attachment was scrubbed... URL: From M.Wimber at bham.ac.uk Tue Jan 29 11:31:16 2019 From: M.Wimber at bham.ac.uk (Maria Wimber) Date: Tue, 29 Jan 2019 10:31:16 +0000 Subject: [FieldTrip] PhD position @MemoryBham Message-ID: The Memory Group Birmingham is currently recruiting a PhD student for a project led by Dr Maria Wimber. This is a 3-year PhD position fully funded by the ERC Starting Grant "STREAM - The Spatio-Temporal Representational Architecture of Memory". The candidate will work on a project investigating the neural dynamics of memory reconstruction, using multivariate analyses of electrophysiological and neuroimaging data, together with neural network modelling. Applications will be reviewed on a rolling basis, with a deadline is Feb 15th. For further details see here. Interested candidates should feel free to email m.wimber at bham.ac.uk directly including a CV and a short statement of interest. ---------------------- Maria Wimber, PhD Senior Lecturer School of Psychology University of Birmingham tel +44 121 4144659 www.memorybham.com/maria-wimber -------------- next part -------------- An HTML attachment was scrubbed... URL: From aitor.martinezegurcegui at uzh.ch Tue Jan 29 20:31:50 2019 From: aitor.martinezegurcegui at uzh.ch (Aitor Egurtzegi) Date: Tue, 29 Jan 2019 20:31:50 +0100 Subject: [FieldTrip] very large weight changes when running ICA Message-ID: <7651d1a4-bae2-490e-eccc-3dcde522586b@uzh.ch> Dear Fieldtrip community, I am running an ICA with the default parameters, only specifying cfg.method = 'runica', and I get the following, extremely large values for weight changes when running it. Is there a way to fix this? step 1 - lrate 0.000089, wchange 339727227227851.18750000, angledelta  0.0 deg Lowering learning rate to 6.38132e-05 and starting again. step 1 - lrate 0.000064, wchange 6691091255065.47558594, angledelta  0.0 deg Lowering learning rate to 4.59455e-05 and starting again. step 1 - lrate 0.000046, wchange 57360369209.21232605, angledelta 0.0 deg step 2 - lrate 0.000037, wchange 42285711168995.46093750, angledelta  0.0 deg Lowering learning rate to 2.64646e-05 and starting again. step 1 - lrate 0.000026, wchange 1597187.26777422, angledelta  0.0 deg step 2 - lrate 0.000026, wchange 1837915373349.00170898, angledelta  0.0 deg step 3 - lrate 0.000021, wchange 6356182039233.50097656, angledelta 89.8 deg step 4 - lrate 0.000015, wchange 327277436065.93859863, angledelta 44.6 deg step 5 - lrate 0.000012, wchange 256497271977.77600098, angledelta 86.4 deg step 6 - lrate 0.000009, wchange 94836930214915.39062500, angledelta 81.8 deg step 7 - lrate 0.000006, wchange 9813461305830484.00000000, angledelta 52.6 deg step 8 - lrate 0.000005, wchange 270943944736795648.00000000, angledelta 82.3 deg step 9 - lrate 0.000004, wchange 195304431631393856.00000000, angledelta 59.3 deg Thanks in advance, Aitor From pdhami06 at gmail.com Wed Jan 30 05:57:12 2019 From: pdhami06 at gmail.com (Paul Dhami) Date: Tue, 29 Jan 2019 23:57:12 -0500 Subject: [FieldTrip] Error: Could not determine the parametric critical value for clustering Message-ID: Dear FieldTrip community, I am attempting to compare the frequency values between two groups using freqstatistics, but I am running into this error below in regards to 'could not determine the parametric critical value for clustering'. Any help would be greatly appreciated as to how to solve this problem. MDD_vs_Controls_sp_lpfc_freq_mcc = ft_freqstatistics(cfg,ControlsSubj_sp_lpfc_freq{:}, MDDSubj_sp_lpfc_freq{:}) the call to "ft_selectdata" took 2 seconds and required the additional allocation of an estimated 2 MB using "ft_statistics_montecarlo" for the statistical testing using "ft_statfun_indepsamplesT" for the single-sample statistics constructing randomized design total number of measurements = 58 total number of variables = 1 number of independent variables = 1 number of unit variables = 0 number of within-cell variables = 0 number of control variables = 0 using a permutation resampling approach computing a parametric threshold for clustering Index exceeds the number of array elements (0). Error using ft_statistics_montecarlo (line 247) could not determine the parametric critical value for clustering Error in ft_freqstatistics (line 190) [stat, cfg] = statmethod(cfg, dat, design); Best, Paul -------------- next part -------------- An HTML attachment was scrubbed... URL: From stephen.whitmarsh at gmail.com Wed Jan 30 08:21:44 2019 From: stephen.whitmarsh at gmail.com (Stephen Whitmarsh) Date: Wed, 30 Jan 2019 08:21:44 +0100 Subject: [FieldTrip] Error: Could not determine the parametric critical value for clustering In-Reply-To: References: Message-ID: Dear Paul, Please supply the script that you used to call ft_freqstatistics, and a description of the data structures, otherwise it's very hard to give any advice. Best, Stephen On Wed, 30 Jan 2019 at 06:15, Paul Dhami wrote: > Dear FieldTrip community, > > I am attempting to compare the frequency values between two groups using > freqstatistics, but I am running into this error below in regards to 'could > not determine the parametric critical value for clustering'. > > Any help would be greatly appreciated as to how to solve this problem. > > MDD_vs_Controls_sp_lpfc_freq_mcc = > ft_freqstatistics(cfg,ControlsSubj_sp_lpfc_freq{:}, MDDSubj_sp_lpfc_freq{:}) > the call to "ft_selectdata" took 2 seconds and required the additional > allocation of an estimated 2 MB > using "ft_statistics_montecarlo" for the statistical testing > using "ft_statfun_indepsamplesT" for the single-sample statistics > constructing randomized design > total number of measurements = 58 > total number of variables = 1 > number of independent variables = 1 > number of unit variables = 0 > number of within-cell variables = 0 > number of control variables = 0 > using a permutation resampling approach > computing a parametric threshold for clustering > Index exceeds the number of array elements (0). > Error using ft_statistics_montecarlo (line 247) > could not determine the parametric critical value for clustering > > Error in ft_freqstatistics (line 190) > [stat, cfg] = statmethod(cfg, dat, design); > > Best, > Paul > _______________________________________________ > 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 404164884 at qq.com Wed Jan 30 09:16:06 2019 From: 404164884 at qq.com (=?gb18030?B?s8K/pbrG?=) Date: Wed, 30 Jan 2019 16:16:06 +0800 Subject: [FieldTrip] :Questions about source interpolate and source reconstruction for specific MNI coordinate Message-ID: Dear Fieldtripers, I tried to conduct source reconstruction and extract time series from specific MNI coordinate on MEG data, but I got some problems. I sorted my questions as follow: (1 In the process of constructing sourcemodel, firstly I conducted ‘ft_volumerealign’ (cfg.coordsys='4d') on subject MRI to define the position of LPA, RPA and nasion according to 4d/bti coordinate system. Then I conducted: cfg = []; cfg.output = ‘brain’; segmentedmri=ft_volumesegment(cfg,mri); I checked the segmentedmri but I saw the brain stem and part of spinal cord were also comprised in it (Fig.1 and Fig.2). I think this result may affect source reconstruction. So, is this result normal? Or did I do something incorrectly? (2 Next I used template-sourcemodel and subject-MRI to construct sourcemodel in MNI space. After I got subject headmodel and sourcemodel, I conducted ‘ft_prepare_leadfield’ and then ‘ft_sourceanalysis’. When I conducted ‘ft_soureinterpolate’ to interpolate this source on subject MRI and plot it, I saw some activation outside the brain, especially in brain stem and spinal cord. But the most important thing is when I interpolate source on template-MRI (spm8-T1.nii), the functional image and anatomical image do not match, the sagittal plane of functional image is plotted on the coronal plane of anatomical image, the transverse plane of functional image is plotted on the sagittal plane of anatomical image (Fig. 3). I have not conducted ‘ft_volumelookup’ and ‘ft_volumereslice’ in the process, is this the reason? Or did I do wrong step in the process? (3 I want to extract time series form specific ROI in MNI space according to MNI coordinate. And I prepare to do this by: norm = ft_volumenormalise([],mri); %normalise subject MRI to MNI space mnipos = [x y z]; %define ROI position in MNI space posback=ft_warp_apply(norm.params,mnipos,'sn2individual'); btipos= ft_warp_apply(pinv(norm.initial),posback); % position in individual coordinates Then conducted ‘ft_prepare_leadfield’ again for ROI only, and conducted ‘ft_sourceanalysis’. Can this process work? Thank you very much for your time and consideration. Looking forward to your reply. Best regards, Chan -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: Fig. 1.png Type: application/octet-stream Size: 265329 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: Fig. 2.png Type: application/octet-stream Size: 22899 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: Fig. 3.png Type: application/octet-stream Size: 183732 bytes Desc: not available URL: From pdhami06 at gmail.com Wed Jan 30 14:56:29 2019 From: pdhami06 at gmail.com (Paul Dhami) Date: Wed, 30 Jan 2019 08:56:29 -0500 Subject: [FieldTrip] Error: Could not determine the parametric critical value for clustering Message-ID: Dear Stephen, apologizes for not including that information. The data structure (e.g. ControlsSubj_sp_lpfc_freq) was created using: % frequency analysis cfg = []; cfg.output = 'powandcsd'; cfg.method = 'mtmconvol'; cfg.foi = 2:1:60; %40 cfg.t_ftimwin = 2 ./ cfg.foi; %length of the sliding time window in seconds cfg.tapsmofrq = 0.4 *cfg.foi; % smoothing increases with increase in freq cfg.toi = -1:0.01:1; % -0.4:0.01:0.4 dataSPfreq = ft_freqanalysis(cfg, dataSPfreq); %baseline correction cfg = []; cfg.baseline = [-1 -0.1]; %-0.4 cfg.baselinetype = 'db'; dataSPfreq = ft_freqbaseline(cfg, dataSPfreq); The call to freqstatistics is as follows: cfg = []; cfg.method = 'template'; % using template method cfg.template = 'Control_neighb.mat'; % specify type of template cfg.layout = 'quickcap64.mat'; % specify layout of sensors cfg.feedback = 'yes'; % show a neighbour plot neighbours = ft_prepare_neighbours(cfg, MDDSubj_sp_lpfc_freq{1}); cfg.channel = 'all'; cfg.latency = [0.01 1] ; cfg.frequency = 'all' ; cfg.parameter = 'powspctrm'; cfg.neighbours = neighbours; % defined as above cfg.method = 'montecarlo'; cfg.statistic = 'ft_statfun_indepsamplesT'; cfg.correcttail = 'alpha'; cfg.correctm = 'cluster'; %cfg.alpha = 0.05 cfg.numrandomization = 2000; cfg.minnbchan = 2; cfg.spmversion = 'spm12'; cfg.fsample = 1000; Nsub = length(ControlsSubj_sp_lpfc_freq) + length(MDDSubj_sp_lpfc_freq) ; cfg.design = []; cfg.design(1,1:Nsub) = [ones(1, length(ControlsSubj_sp_lpfc_freq)) (2*ones(1, length(MDDSubj_sp_lpfc_freq)))]; cfg.ivar = 1; % Resulting Cluster Corrected Permutation test % !!order of structures must follow that specified in the design matrix!! MDD_vs_Controls_sp_lpfc_freq_mcc = ft_freqstatistics(cfg,ControlsSubj_sp_lpfc_freq{:}, MDDSubj_sp_lpfc_freq{:}); It is after calling ft_freqstatistics that I get the error "Could not determine the parametric critical value for clustering". Any help would be greatly appreciated. Thank you, Paul -------------- next part -------------- An HTML attachment was scrubbed... URL: From stephen.whitmarsh at gmail.com Wed Jan 30 15:34:14 2019 From: stephen.whitmarsh at gmail.com (Stephen Whitmarsh) Date: Wed, 30 Jan 2019 15:34:14 +0100 Subject: [FieldTrip] Error: Could not determine the parametric critical value for clustering In-Reply-To: References: Message-ID: <07d401d4b8a8$dfce1af0$9f6a50d0$@gmail.com> Dear Paul, Thanks. Although I still can’t see how you got to the data that goes into your ft_freqstatistics (the variable names don’t match up), something is probably wrong with your first level-statistics. - Have you tried running your stats first without cluster corrections, i.e. cfg.method = ‘analytic’? I would do so (always) and first check the results. I suspect you’ll find something like only NaNs due to perhaps some wrong latencies, design, etc. Around line 244 ft_statistics_montecarlo tries to threshold your first-level statistics. You could also add a breakpoint there and see why it fails, but first running your first-level statistics might already clarify. - Just in case - make sure you empty your cfg before you set your parameters for ft_freqstatistics J HTH, Stephen From: fieldtrip On Behalf Of Paul Dhami Sent: Wednesday, January 30, 2019 2:56 PM To: fieldtrip at science.ru.nl Subject: Re: [FieldTrip] Error: Could not determine the parametric critical value for clustering Dear Stephen, apologizes for not including that information. The data structure (e.g. ControlsSubj_sp_lpfc_freq) was created using: % frequency analysis cfg = []; cfg.output = 'powandcsd'; cfg.method = 'mtmconvol'; cfg.foi = 2:1:60; %40 cfg.t_ftimwin = 2 ./ cfg.foi; %length of the sliding time window in seconds cfg.tapsmofrq = 0.4 *cfg.foi; % smoothing increases with increase in freq cfg.toi = -1:0.01:1; % -0.4:0.01:0.4 dataSPfreq = ft_freqanalysis(cfg, dataSPfreq); %baseline correction cfg = []; cfg.baseline = [-1 -0.1]; %-0.4 cfg.baselinetype = 'db'; dataSPfreq = ft_freqbaseline(cfg, dataSPfreq); The call to freqstatistics is as follows: cfg = []; cfg.method = 'template'; % using template method cfg.template = 'Control_neighb.mat'; % specify type of template cfg.layout = 'quickcap64.mat'; % specify layout of sensors cfg.feedback = 'yes'; % show a neighbour plot neighbours = ft_prepare_neighbours(cfg, MDDSubj_sp_lpfc_freq{1}); cfg.channel = 'all'; cfg.latency = [0.01 1] ; cfg.frequency = 'all' ; cfg.parameter = 'powspctrm'; cfg.neighbours = neighbours; % defined as above cfg.method = 'montecarlo'; cfg.statistic = 'ft_statfun_indepsamplesT'; cfg.correcttail = 'alpha'; cfg.correctm = 'cluster'; %cfg.alpha = 0.05 cfg.numrandomization = 2000; cfg.minnbchan = 2; cfg.spmversion = 'spm12'; cfg.fsample = 1000; Nsub = length(ControlsSubj_sp_lpfc_freq) + length(MDDSubj_sp_lpfc_freq) ; cfg.design = []; cfg.design(1,1:Nsub) = [ones(1, length(ControlsSubj_sp_lpfc_freq)) (2*ones(1, length(MDDSubj_sp_lpfc_freq)))]; cfg.ivar = 1; % Resulting Cluster Corrected Permutation test % !!order of structures must follow that specified in the design matrix!! MDD_vs_Controls_sp_lpfc_freq_mcc = ft_freqstatistics(cfg,ControlsSubj_sp_lpfc_freq{:}, MDDSubj_sp_lpfc_freq{:}); It is after calling ft_freqstatistics that I get the error "Could not determine the parametric critical value for clustering". Any help would be greatly appreciated. Thank you, Paul -------------- next part -------------- An HTML attachment was scrubbed... URL: From RICHARDS at mailbox.sc.edu Wed Jan 30 17:57:24 2019 From: RICHARDS at mailbox.sc.edu (RICHARDS, JOHN) Date: Wed, 30 Jan 2019 16:57:24 +0000 Subject: [FieldTrip] Postdoc position Message-ID: John Richards in the Department of Psychology at the University of South Carolina is seeking a qualified PhD for a postdoctoral position. The position involves research on the development of infant attention. The laboratory uses psychophysiological methods (heart rate, EEG, ERP) and MRI (structural) to examine the brain bases of the development of infant attention and recognition memory (http://jerlab.sc.edu). The position would be to further develop the "Neurodevelopmental MRI Database", work on analysis writeup of existing projects examining tools for cortical source analysis in infants, and analysis of current datasets on infant attention and brain development. The ideal candidate would have background neuroimaging such as EEG/ERP, structural MRI or fMRI, programming experience (MATLAB, FSL, EEGLab/ERPLab) and interests/background in infant cognition, perception, or attention. We also do some work on multimodal neuroimaging in adults (sMRI, dMRI, fMRI, EEG/ERP) and the candidate could either have relevant experience, or participate in these studies. Writing experience and a publication record is required; and extensive writing and publication will be expected. At the candidate's interest, teaching experiences are available. The position is initially funded for one year, and subsequent years will be available depending on funding. The position is available now and candidates could start immediately. The salary is set at NIH standards accounting for years of postdoctoral experience. The position could be extended to a "Research Assistant Professor" for a qualified candidate with a supplement source of support. Review of applications will begin immediately and continue until the position is filled. Materials should be submitted online to https://uscjobs.sc.edu/postings/51089; and also send a note or information to richards-john at sc.edu, John E. Richards, Department of Psychology, University of South Carolina, Columbia SC 29208. *********************************************** John E. Richards Carolina Distinguished Professor Department of Psychology University of South Carolina Columbia, SC 29208 Dept Phone: 803 777 2079 Fax: 803 777 9558 Email: richards-john at sc.edu https://jerlab.sc.edu ************************************************* -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: U of SC Richards Postdoc ad January 2018.docx Type: application/vnd.openxmlformats-officedocument.wordprocessingml.document Size: 14001 bytes Desc: U of SC Richards Postdoc ad January 2018.docx URL: From nemethd at gmail.com Thu Jan 31 10:24:10 2019 From: nemethd at gmail.com (Dezso Nemeth) Date: Thu, 31 Jan 2019 10:24:10 +0100 Subject: [FieldTrip] Postdoc in Lyon - Deadline approaching In-Reply-To: References: Message-ID: Postdoc Position in Lyon (Cognitive or Computational Neuroscience) Institution: Lyon Neuroscience Research Center (CRNL) Location: Lyon, France Application Due: 02/15/2019 Applications are invited for a highly motivated, enthusiastic postdoctoral researcher with a PhD in cognitive neuroscience (or related field) to join a well-supported, friendly research team, based in the internationally renowned Center for Research in Neuroscience in Lyon (University of Lyon, CRNS, INSERM). The postdoctoral position is part of a research project named REWIRING that is funded by IDEXLYON Fellowship. The postdoc will be embedded in the IDEXLYON team (PI: Dezso Nemeth) at CRNL, Lyon. Using methods of M/EEG, fMRI and non-invasive brain stimulation (e.g., TMS), the project aims to investigate how memory representations can be updated ('rewired') in the human brain. More specifically, we will investigate the entire process of how statistical and sequential regularities are extracted from the environment (memory formation), how the extracted knowledge is consolidated and how it can be rewired. For more details see the publications of Dezso Nemeth and Karolina Janacsek at http://nemethlab.com/publications/, and particularly the following paper: Szegedi-Hallgató, E., Janacsek, K., Vékony, T., Tasi, L. A., Kerepes, L., Hompoth, E. A., ... & Németh, D. (2017). Explicit instructions and consolidation promote rewiring of automatic behaviors in the human mind.?Scientific Reports,?7(1), 4365. The overall aim of Project REWIRING is to improve human learning and memory performance and boost rewiring of automatic behaviors. Within this project, the post-holder will be responsible for designing and carrying out experiments, analyzing data, and writing up manuscripts. Additionally, the postdoc will be closely involved in daily supervision of PhD and MSc students who work on the project. Profile (Person specification) - Candidates who only partially meet the following profile are nonetheless strongly encouraged to apply! - PhD in cognitive neuroscience or an adjacent field (psychological, biological, biomedical, or computer sciences, also physics and mathematics); - A strong academic track record including publications in leading (inter)disciplinary journals; - A strong interest for fundamental research in cognitive neurosciences; - Advanced computational and/or programming skills (Matlab, Python, or other languages); - Experience in functional connectivity analysis (EEG, MEG or MRI); - Experience and interest in training and supervising junior scientists; - Capacity to participate in an interdisciplinary and international research environment; - Excellent interpersonal and communication skills to effectively collaborate and communicate in academia; - A proactive and goal-directed attitude, good organizational skills; - Fluency in written and spoken English and motivation to learn French. Organization The project is embedded in the unique and excellent infrastructure of the CRNL - Center for Research in Neuroscience in Lyon. Researchers working on this theme jointly organize regular discussion meetings and lectures to promote integration of research conducted within systems, behavioral, and cognitive neurosciences. Read more about what it means?to work at CRNL: https://crnl.univ-lyon1.fr/index.php/en Employment conditions Salary will be in accordance with the relevant national labor agreement and based on research experience and qualifications. The earliest start date for this position is May 10 (later start possible upon agreement). Application We request applicants to send the following documents: 1) A cover letter briefly describing how their skills and experience meet the profile as set out in the person specification (max 1 page) 2) A research statement explaining their research interests in relation to Project REWIRING or to the PI’s publications (max 2 pages) 3) A recent CV and publication list 4) Two writing samples of the applicant's most significant work (published or unpublished manuscripts). 5) Contact information of three professional references. Information All additional information about the vacancy can be obtained from Dezso Nemeth, Principal Investigator, via nemeth at nemethlab.com. Submit your application to the following email address: hr at nemethlab.com APPLICATION INFORMATION Contact: hr at nemethlab.com Link: https://www.higheredjobs.com/faculty/details.cfm?JobCode=176890317 -------------- next part -------------- An HTML attachment was scrubbed... URL: From jorn at artinis.com Thu Jan 31 17:08:18 2019 From: jorn at artinis.com (=?iso-8859-2?Q?J=F6rn_M._Horschig?=) Date: Thu, 31 Jan 2019 17:08:18 +0100 Subject: [FieldTrip] ESR / PhD-student positions available Message-ID: <012601d4b97f$2f0d6860$8d283920$@artinis.com> Dear list, We from Artinis have exciting research projects, in which we have the opportunity for graduates to work with us as early stage researchers on the forefront of fNIRS development. We have three outstanding positions, two on algorithm development and one on hardware development. Envisioned starting date for all positions is this summer. More information on these positions can be found here: ESR position on extraction of physiological signals in clinical settings (in collaboration with University Centre Utrecht, Netherlands): https://euraxess.ec.europa.eu/jobs/375619 https://www.artinis.com/jobs-early-stage-researcher-doctoral-student-inf ans ESR position on machine learning on character traits and neuroeconomics (in collaboration with Donders Institute Nijmegen, Netherlands): https://euraxess.ec.europa.eu/jobs/364609 (still in review, page will be up soon) https://www.artinis.com/jobs-esr ESR position on fNIRS hardware development for clinical application (in collaboration with University Centre Utrecht, Netherlands): https://euraxess.ec.europa.eu/jobs/375632 https://www.artinis.com/jobs-early-stage-researcher-infans All three positions are part of different Marie-Curie Skłodowska international training networks, which means you will be embedded in a larger project, meet and collaborate with many interesting and smart people from different countries, and enjoy the benefits of both academic and industrial work life. We look forward to receiving your application and would welcome if you pass these open positions on to potentially interesting candidates. With kind regards, Jörn -- Jörn M. Horschig, PhD Software Manager & Project Leader Artinis Medical Systems | +31 481 350 980 A Einsteinweg 17 6662PW Elst The Netherlands T +31 481 350 980 I www.artinis.com The information in this e-mail is confidential and intended solely for the person to whom it is addressed. If this message is not addressed to you, please be aware that you have no authorization to read this e-mail, to copy it, to furnish it to any person other than the addressee, or to use or misuse its content in any way whatsoever. Should you have received this e-mail by mistake, please bring this to the attention of the sender, after which you are kindly requested to destroy the original message. Sign up for our NIRS newsletter Or meet us here: February 12-14, 2019 - 6th Israeli Conference on Cognition Research, Acre, Israel February 14-15, 2019 - 11th Annual Meeting of the Swiss Society of Sport Science, Freiburg, Switzerland February 20-22, 2019 - German Exercise Science and Training (GEST:19), Würzburg, Germany February 24-27, 2019 - 3rd International Brain Stimulation Conference, Vancouver, Canada March 7-9, 2019 - International Convention of Psychological Science (ICPS), Paris, France March 21-23, 2019 - Society for Research in Child Development (SRCD), Baltimore, Maryland, USA May 9-11, 2019 - Artscientific: 3rd Artinis symposium, Egmond aan Zee, The Netherlands May 28-June 1, 2019 - American College of Sports Medicine (ACSM), Orlando, Florida, USA July 3-6, 2019 - European College on Sport Science (ECSS), Prague, Czech Republic September 19-21, 2019 - Japanese Society of Physical Fitness and Sports Medicine, Tsukuba, Ibaragi, Japan -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image001.png Type: image/png Size: 9919 bytes Desc: not available URL: From J.Verhoef at donders.ru.nl Wed Jan 2 08:37:16 2019 From: J.Verhoef at donders.ru.nl (Verhoef, J.P. (Julia)) Date: Wed, 2 Jan 2019 07:37:16 +0000 Subject: [FieldTrip] Postdoctoral Position for Dutch Research Consortium 'Language in Interaction' In-Reply-To: <92b5c7b6b5594ed8a658687d1da8a272@EXPRD05.hosting.ru.nl> References: <5d1e863b01d7453e8f53ca640ca2b9f9@Umcexchp06.umcn.nl>, <92b5c7b6b5594ed8a658687d1da8a272@EXPRD05.hosting.ru.nl> Message-ID: <1546414651619.43955@donders.ru.nl> A new Postdoctoral Position is available within the Language in Interaction consortium! The Language in Interaction research consortium invites applications for a postdoctoral position. This position provides the opportunity for conducting world-class research as a member of an interdisciplinary team. The institute involved is an equal opportunity employer, committed to building a culturally diverse intellectual community. For more information and how to apply, please visit: https://www.radboudumc.nl/en/vacancies/63921-postdoctoral-position-for-dutch-research-consortium-language-in-interaction Kind regards, Julia Verhoef Secretary Language in Interaction consortium From elene.beitia at alumni.mondragon.edu Thu Jan 3 09:06:30 2019 From: elene.beitia at alumni.mondragon.edu (Elene Beitia Loinaz) Date: Thu, 3 Jan 2019 09:06:30 +0100 Subject: [FieldTrip] =?utf-8?q?=28no_subject=29?= Message-ID: Hello, My name is Elene Beitia and I am a student in Mondragon Unibertsitatea. We are working in the reconstruction of EEG in resting state with previous pre-process data. That data was pre-process using eeglab and we need to convert it to fieltrip. We know about eeglab2fieltrip function, but we are having problems using it. Can someone share information about how to use it? Thank you in advanced, Elene. -------------- next part -------------- An HTML attachment was scrubbed... URL: From julian.keil at gmail.com Thu Jan 3 09:34:14 2019 From: julian.keil at gmail.com (Julian Keil) Date: Thu, 3 Jan 2019 09:34:14 +0100 Subject: [FieldTrip] (no subject) In-Reply-To: References: Message-ID: <9079FE5E-0DD4-4957-89C5-C4659625D5EF@gmail.com> Dear Elene, could you explain what problems you are having? eeglab2fieldtrip creates the basic structure used in FT, but depending on what you want to do, you need to add some additional info to the created FT structure. Best, Julian ________________ Prof. Dr. Julian Keil Biological Psychology Olshausenstrasse 62 - R. 306 24118 Kiel, Germany +49 - 0431 - 880 - 4872 http://www.biopsych.uni-kiel.de/en > Am 03.01.2019 um 09:06 schrieb Elene Beitia Loinaz : > > Hello, > My name is Elene Beitia and I am a student in Mondragon Unibertsitatea. > We are working in the reconstruction of EEG in resting state with previous pre-process data. That data was pre-process using eeglab and we need to convert it to fieltrip. We know about eeglab2fieltrip function, but we are having problems using it. Can someone share information about how to use it? > Thank you in advanced, > Elene. > _______________________________________________ > 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 jiaxiangzhang at gmail.com Fri Jan 4 00:13:50 2019 From: jiaxiangzhang at gmail.com (Jiaxiang ZHANG) Date: Thu, 3 Jan 2019 23:13:50 +0000 Subject: [FieldTrip] Research associate and PhD studentship opportunities at Cardiff, UK Message-ID: [Apologize for cross-posting] Dear all, We are seeking applicants for one research associate position and one PhD studentships at Cardiff University Brain Research Imaging Centre (CUBRIC). These posts link to a project funded by the European Research Council (ERC). The successful candidates will work with Dr Jiaxiang Zhang and collaborators to understand the neural mechanisms of intentional decision, using multimodal brain imaging and computational modelling. We encourage applicants from different disciplines, including cognitive neuroscience, imaging neuroscience, psychology, computer science, mathematics or physics. Job specs and application details are available online (see links below). For informal enquiries about the project, please contact Dr Jiaxiang Zhang ( zhangj73 at cardiff.ac.uk) with your CV. A. 3-year postdoc position (Deadline: Jan 11, 2019) https://krb-sjobs.brassring.com/TGnewUI/Search/Home/HomeWithPreLoad?partnerid=30011&siteid=5460&PageType=searchResults&SearchType=linkquery&LinkID=6#jobDetails=1421535_5460 B. PhD studentship (Deadline: Feb 1, 2019) https://www.findaphd.com/phds/project/multimodal-understanding-of-intentional-decision-in-the-human-brain/?p105180 The successful candidates will be based at CUBRIC. CUBRIC houses a unique combination of state-of-the-art facilities and world-leading expertise, with 4 human MRI systems (2 x Siemens Prisma, 1 x Siemens Connectom, 1 x Siemens 7T), MEG, EEG, TMS, tDCS, clinical research units and testing labs. Further details of CUBRIC can be found online ( http://sites.cardiff.ac.uk/cubric). Kind regards, Jiaxiang Zhang Cardiff University Brain Research Imaging Centre (CUBRIC) School of Psychology Cardiff University Maindy Road, Cardiff, CF24 4HQ Lab: http://ccbrain.org Faculty: http://psych.cf.ac.uk/zhang Email: zhangj73 at cardiff.ac.uk Tel: +44 (0)29 2087 0471 -------------- next part -------------- An HTML attachment was scrubbed... URL: From martin.rosenfelder at uni-ulm.de Fri Jan 4 10:01:40 2019 From: martin.rosenfelder at uni-ulm.de (Martin Rosenfelder) Date: Fri, 04 Jan 2019 10:01:40 +0100 Subject: [FieldTrip] EEG data preprocessing Message-ID: <59be-5c2f2100-b-26948b40@80576441> Dear Fieldtrip community, I am analyzing time-frequency EEG data with respect to power spectra differences between an experimental and a resting condition. I am reading in the data from EGI raw files, which is then filtered and cut into trials (60 trials for each of the two conditions). The two conditions are then concatenated to one file using ft_appenddata. The output of the preprocessing is then passed to visual artifact rejection, an ICA and another visual artifact rejection. When trying to split the dataset into two conditions for multivariate analyses purposes, Fieldtrip throws an error saying that there are no event values in the data set any more. Splitting the data set into the two conditions does not seem to be possible any more. Is there a way to keep the event values during the artifact rejection so that the data set can be splitted into the conditions afterwards? Thank you very much in advance for your time and effort! I appreciate any hint regarding the issue described above. Best, Martin -- M.Sc.-Psych. Martin Rosenfelder Wissenschaftlicher Mitarbeiter Klinische und Biologische Psychologie Universität Ulm Raum 47.2.259 +49 731-50 26592 martin.rosenfelder at uni-ulm.de From julian.keil at gmail.com Fri Jan 4 10:27:42 2019 From: julian.keil at gmail.com (Julian Keil) Date: Fri, 4 Jan 2019 10:27:42 +0100 Subject: [FieldTrip] EEG data preprocessing In-Reply-To: <59be-5c2f2100-b-26948b40@80576441> References: <59be-5c2f2100-b-26948b40@80576441> Message-ID: <8013F35F-319A-4EB0-A78B-DCE144E6978F@gmail.com> Dear Martin, see here: http://www.fieldtriptoolbox.org/faq/is_it_possible_to_keep_track_of_trial-specific_information_in_my_fieldtrip_analysis_pipeline/ Best, Julian ________________ Prof. Dr. Julian Keil Biological Psychology Olshausenstrasse 62 - R. 306 24118 Kiel, Germany +49 - 0431 - 880 - 4872 http://www.biopsych.uni-kiel.de/en > Am 04.01.2019 um 10:01 schrieb Martin Rosenfelder : > > Dear Fieldtrip community, > > I am analyzing time-frequency EEG data with respect to power spectra differences between an experimental and a resting condition. > I am reading in the data from EGI raw files, which is then filtered and cut into trials (60 trials for each of the two conditions). The two conditions are then concatenated to one file using ft_appenddata. The output of the preprocessing is then passed to visual artifact rejection, an ICA and another visual artifact rejection. > When trying to split the dataset into two conditions for multivariate analyses purposes, Fieldtrip throws an error saying that there are no event values in the data set any more. Splitting the data set into the two conditions does not seem to be possible any more. > > Is there a way to keep the event values during the artifact rejection so that the data set can be splitted into the conditions afterwards? > > Thank you very much in advance for your time and effort! I appreciate any hint regarding the issue described above. > > Best, > Martin > > -- > M.Sc.-Psych. Martin Rosenfelder > Wissenschaftlicher Mitarbeiter > Klinische und Biologische Psychologie > Universität Ulm > Raum 47.2.259 > +49 731-50 26592 > martin.rosenfelder at uni-ulm.de > > > _______________________________________________ > 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 irene.varela at alumni.mondragon.edu Fri Jan 4 12:47:06 2019 From: irene.varela at alumni.mondragon.edu (Irene Varela Leniz) Date: Fri, 4 Jan 2019 12:47:06 +0100 Subject: [FieldTrip] problems using fieldtrip for source reconstruction EEG Message-ID: Hi, I am a researcher in Mondragon University working on source reconstruction of EEG data. I am new at fieldtrip and I feel a little bit lost about this software. I have some errors in a code I have developed but I do not manage to solve them. Could you please help me? I want to plot EEG data of a channel called 'A1' which is the first row in a 2D matrix variable called data, which is inside EEG structure. The code I have developed is below and I get the following error: *Error using ft_checkdata (line 525)* *This function requires 'timelock' or 'freq' data as input, see ft_datatype_timelock or ft_datatype_freq.* The code is the following: *clc; clear all; close all;* *clear variables* *restoredefaultpath; % set a clean path* *main='E:\';* *cd='E:\fieldtrip-20181217'; % change this* *addpath(cd);* *ft_defaults;* *filename = "E:\PBLdata\O200_RS1_final.set"; %cambiar aqui y poner vuestro directorio* *load(filename, '-mat'); %Create EEG struct* *location = EEG.chanlocs;* *data = EEG.data; * *cfg = [];* *cfg.xlim = [-0.2 1.0];* *cfg.ylim = [-1e-13 3e-13];* *cfg.channel = 'A1';* *datos = data(1,:);* *Ndata = numel(datos);* *for i=1:Ndata* * % check if the input data is valid for this function* * datos(i) = ft_checkdata(datos(i), 'datatype', {'timelock', 'freq'});* *end* *figure; ft_singleplotER(cfg,datos);* Thank you in advance, Irene -------------- next part -------------- An HTML attachment was scrubbed... URL: From julian.keil at gmail.com Fri Jan 4 14:08:35 2019 From: julian.keil at gmail.com (Julian Keil) Date: Fri, 4 Jan 2019 14:08:35 +0100 Subject: [FieldTrip] problems using fieldtrip for source reconstruction EEG In-Reply-To: References: Message-ID: <2F70506F-5E8C-4A34-8A4F-030FF9B78A80@gmail.com> Hi Irene, what is the reason to use the extra checkdata step? The function checks if the input data has the correct „datatype“ field. Since you probably don’t have that field, the function will throw an error. Also, I’d recommend using the eeglab2fieldtrip-function to get from EEGlab .set to a fieldtrip-like structure. Best, Julian > Am 04.01.2019 um 12:47 schrieb Irene Varela Leniz : > > Hi, > > I am a researcher in Mondragon University working on source reconstruction of EEG data. I am new at fieldtrip and I feel a little bit lost about this software. I have some errors in a code I have developed but I do not manage to solve them. Could you please help me? > > I want to plot EEG data of a channel called 'A1' which is the first row in a 2D matrix variable called data, which is inside EEG structure. The code I have developed is below and I get the following error: > > Error using ft_checkdata (line 525) > This function requires 'timelock' or 'freq' data as input, see ft_datatype_timelock or ft_datatype_freq. > > The code is the following: > clc; clear all; close all; > clear variables > restoredefaultpath; % set a clean path > main='E:\'; > cd='E:\fieldtrip-20181217'; % change this > addpath(cd); > > ft_defaults; > filename = "E:\PBLdata\O200_RS1_final.set"; %cambiar aqui y poner vuestro directorio > load(filename, '-mat'); %Create EEG struct > location = EEG.chanlocs; > data = EEG.data; > > cfg = []; > cfg.xlim = [-0.2 1.0]; > cfg.ylim = [-1e-13 3e-13]; > cfg.channel = 'A1'; > datos = data(1,:); > Ndata = numel(datos); > for i=1:Ndata > % check if the input data is valid for this function > datos(i) = ft_checkdata(datos(i), 'datatype', {'timelock', 'freq'}); > end > > figure; ft_singleplotER(cfg,datos); > > Thank you in advance, > > Irene > > _______________________________________________ > 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 nicole.landi at yale.edu Sat Jan 5 17:36:39 2019 From: nicole.landi at yale.edu (Landi, Nicole) Date: Sat, 5 Jan 2019 16:36:39 +0000 Subject: [FieldTrip] =?utf-8?q?=28no_subject=29?= Message-ID: POSTDOCTORAL FELLOWSHIP IN ELECTROPHYSIOLOGY (EEG AND ERP) The GENESIS (Genetic and Neurobehavioral Systems: Interdisciplinary Studies) lab (PI: Elena Grigorenko) at the University of Houston and Baylor College of Medicine has an opening for a postdoctoral research fellow to join ongoing projects investigating the neural basis of cognitive and linguistic development in laboratory and field settings. The successful applicant will contribute to two funded projects that utilize electrophysiological techniques (EEG, ERP) to characterize children who are at elevated genetic or environmental (e.g., early neglect and abuse) risk for developmental language/reading disorder. Applicants must have a background in research using EEG or ERP methods, including experimental design and data collection, analysis, and interpretation. Required qualifications: • PhD or equivalent in Psychology, Cognitive Science, Communication Disorders, Neuroscience, or related field • Experience with the analysis of EEG data and one or more of the following analysis packages: EEGlab/ERPlab, Brain Vision Analyzer, NetStation, or an equivalent EEG software analysis package • Experience designing and conducting EEG/ERP studies • Programming skills, including knowledge of at least one programming language and basic Unix commands • Demonstrable interest in the cognitive neuroscience of language and cognition and/or reading development • Proficiency with writing academic manuscripts, particularly those related to EEG/ERP Preferred qualifications: • Experience with advanced electrophysiology analysis techniques; e.g., independent components analysis, connectivity, source localization • Advanced knowledge and expertise in statistics, e.g. multivariate statistics, or Bayesian methods • Experience working with developmental populations (e.g., school-age children and adolescents) • Leadership, communication, and organizational skills This position is based at the University of Houston in Houston, TX, but will coordinate with research partners at multiple offsite locations, including Dr. Nicole Landi (University of Connecticut, Haskins Laboratories, Yale Child Study Center https://landi.lab.uconn.edu/), and Natalia Rakhlin (Wayne State University). Offsite coordination will involve training of research associates, designing and implementing experiments, and supervision of data collection and sharing. Interested candidates should send: 1) a CV; 2) the names of three references; and 3) a cover letter to Drs. Grigorenko (elena.grigorenko at times.uh.edu), Landi (nicole.landi at uconn.edu), or Rakhlin (natalia.rakhlin at wayne.edu). This position will remain open until filled; desired start date is on or before June 2019. Salary will be commensurate with NIH postdoctoral funding levels. -------------- next part -------------- An HTML attachment was scrubbed... URL: From nemethd at gmail.com Sat Jan 5 19:52:29 2019 From: nemethd at gmail.com (Dezso Nemeth) Date: Sat, 5 Jan 2019 19:52:29 +0100 Subject: [FieldTrip] Postdoc position in Lyon (Cognitive Neuroscience) Message-ID: Hi all, there is a very cool postdoc position in Lyon. Feel free to pass this on. https://neurojobs.sfn.org/jobs/11838210/postdoc-position-in-lyon-cognitive-or-computational-neuroscience Best, Dezso -------------------------------------- NEMETH, Dezso (PhD, DSc) Lyon Neuroscience Research Center (CRNL) Université de Lyon Brain, Memory and Language Lab: http://www.memory-and-language.com -------------- next part -------------- An HTML attachment was scrubbed... URL: From irene.varela at alumni.mondragon.edu Mon Jan 7 09:57:10 2019 From: irene.varela at alumni.mondragon.edu (Irene Varela Leniz) Date: Mon, 7 Jan 2019 09:57:10 +0100 Subject: [FieldTrip] problems using fieldtrip for source reconstruction EEG In-Reply-To: <2F70506F-5E8C-4A34-8A4F-030FF9B78A80@gmail.com> References: <2F70506F-5E8C-4A34-8A4F-030FF9B78A80@gmail.com> Message-ID: Good morning Julian, Can you help me with plotting some resting state EEG signals? I am new in Fieldtrip and I dont find clear information about this topic and I dont really know how to do plottings in Fieldtrip. I feel like the fieldtrip documentation is a little bit weak.... Thank you in advance, Best regards, Irene Varela El vie., 4 ene. 2019 a las 14:08, Julian Keil () escribió: > Hi Irene, > > what is the reason to use the extra checkdata step? > The function checks if the input data has the correct „datatype“ field. > Since you probably don’t have that field, the function will throw an error. > > Also, I’d recommend using the eeglab2fieldtrip-function to get from EEGlab > .set to a fieldtrip-like structure. > > Best, > > Julian > > > Am 04.01.2019 um 12:47 schrieb Irene Varela Leniz < > irene.varela at alumni.mondragon.edu>: > > Hi, > > I am a researcher in Mondragon University working on source reconstruction > of EEG data. I am new at fieldtrip and I feel a little bit lost about this > software. I have some errors in a code I have developed but I do not manage > to solve them. Could you please help me? > > I want to plot EEG data of a channel called 'A1' which is the first row in > a 2D matrix variable called data, which is inside EEG structure. The code I > have developed is below and I get the following error: > > *Error using ft_checkdata (line 525)* > *This function requires 'timelock' or 'freq' data as input, see > ft_datatype_timelock or ft_datatype_freq.* > > The code is the following: > *clc; clear all; close all;* > *clear variables* > *restoredefaultpath; % set a clean path* > *main='E:\';* > *cd='E:\fieldtrip-20181217'; % change this* > *addpath(cd);* > > *ft_defaults;* > *filename = "E:\PBLdata\O200_RS1_final.set"; %cambiar aqui y poner vuestro > directorio* > *load(filename, '-mat'); %Create EEG struct* > *location = EEG.chanlocs;* > *data = EEG.data; * > > *cfg = [];* > *cfg.xlim = [-0.2 1.0];* > *cfg.ylim = [-1e-13 3e-13];* > *cfg.channel = 'A1';* > *datos = data(1,:);* > *Ndata = numel(datos);* > *for i=1:Ndata* > * % check if the input data is valid for this function* > * datos(i) = ft_checkdata(datos(i), 'datatype', {'timelock', 'freq'});* > *end* > > *figure; ft_singleplotER(cfg,datos);* > > Thank you in advance, > > Irene > > _______________________________________________ > 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 julian.keil at gmail.com Mon Jan 7 10:27:48 2019 From: julian.keil at gmail.com (Julian Keil) Date: Mon, 7 Jan 2019 10:27:48 +0100 Subject: [FieldTrip] problems using fieldtrip for source reconstruction EEG In-Reply-To: References: <2F70506F-5E8C-4A34-8A4F-030FF9B78A80@gmail.com> Message-ID: Hi Irene, it helps if you describe exactly what you want to do (I don’t mean to be rude or patronizing, but check here for suggestions: https://journals.plos.org/ploscompbiol/article?id=10.1371/journal.pcbi.1002202 ). There are many ways to visualize resting state EEG signals, and you don’t need fieldtrip for all of them. E.g., if you just want to plot the timecourse of the data, you can use the matlab built-in „plot“ function (e.g. use something like "plot(data.time{1},data.trial{1})“ to plot one trial). If you want to explore your data, ft_databrowser is your friend http://www.fieldtriptoolbox.org/faq/how_can_i_use_the_databrowser/ Best, Julian ________________ Prof. Dr. Julian Keil Biological Psychology Olshausenstrasse 62 - R. 306 24118 Kiel, Germany +49 - 0431 - 880 - 4872 http://www.biopsych.uni-kiel.de/en > Am 07.01.2019 um 09:57 schrieb Irene Varela Leniz : > > Good morning Julian, > > Can you help me with plotting some resting state EEG signals? I am new in Fieldtrip and I dont find clear information about this topic and I dont really know how to do plottings in Fieldtrip. I feel like the fieldtrip documentation is a little bit weak.... > > Thank you in advance, > Best regards, > > Irene Varela > > El vie., 4 ene. 2019 a las 14:08, Julian Keil (>) escribió: > Hi Irene, > > what is the reason to use the extra checkdata step? > The function checks if the input data has the correct „datatype“ field. > Since you probably don’t have that field, the function will throw an error. > > Also, I’d recommend using the eeglab2fieldtrip-function to get from EEGlab .set to a fieldtrip-like structure. > > Best, > > Julian > > >> Am 04.01.2019 um 12:47 schrieb Irene Varela Leniz >: >> >> Hi, >> >> I am a researcher in Mondragon University working on source reconstruction of EEG data. I am new at fieldtrip and I feel a little bit lost about this software. I have some errors in a code I have developed but I do not manage to solve them. Could you please help me? >> >> I want to plot EEG data of a channel called 'A1' which is the first row in a 2D matrix variable called data, which is inside EEG structure. The code I have developed is below and I get the following error: >> >> Error using ft_checkdata (line 525) >> This function requires 'timelock' or 'freq' data as input, see ft_datatype_timelock or ft_datatype_freq. >> >> The code is the following: >> clc; clear all; close all; >> clear variables >> restoredefaultpath; % set a clean path >> main='E:\'; >> cd='E:\fieldtrip-20181217'; % change this >> addpath(cd); >> >> ft_defaults; >> filename = "E:\PBLdata\O200_RS1_final.set"; %cambiar aqui y poner vuestro directorio >> load(filename, '-mat'); %Create EEG struct >> location = EEG.chanlocs; >> data = EEG.data; >> >> cfg = []; >> cfg.xlim = [-0.2 1.0]; >> cfg.ylim = [-1e-13 3e-13]; >> cfg.channel = 'A1'; >> datos = data(1,:); >> Ndata = numel(datos); >> for i=1:Ndata >> % check if the input data is valid for this function >> datos(i) = ft_checkdata(datos(i), 'datatype', {'timelock', 'freq'}); >> end >> >> figure; ft_singleplotER(cfg,datos); >> >> Thank you in advance, >> >> Irene >> >> _______________________________________________ >> 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 dlozanosoldevilla at gmail.com Mon Jan 7 10:30:16 2019 From: dlozanosoldevilla at gmail.com (Diego Lozano-Soldevilla) Date: Mon, 7 Jan 2019 10:30:16 +0100 Subject: [FieldTrip] problems using fieldtrip for source reconstruction EEG In-Reply-To: References: <2F70506F-5E8C-4A34-8A4F-030FF9B78A80@gmail.com> Message-ID: Dear Irene, Here a link about plotting in general: http://www.fieldtriptoolbox.org/tutorial/#visualizingthe-results-of-an-analysis Here a tutorial about basic power analysis using resting state data and connectivity analysis in source space http://www.fieldtriptoolbox.org/tutorial/networkanalysis/ And here how you can help us to improve the documentation http://www.fieldtriptoolbox.org/contribute/ I hope that helps, Diego On Mon, 7 Jan 2019 at 10:18, Irene Varela Leniz < irene.varela at alumni.mondragon.edu> wrote: > Good morning Julian, > > Can you help me with plotting some resting state EEG signals? I am new in > Fieldtrip and I dont find clear information about this topic and I dont > really know how to do plottings in Fieldtrip. I feel like the fieldtrip > documentation is a little bit weak.... > > Thank you in advance, > Best regards, > > Irene Varela > > El vie., 4 ene. 2019 a las 14:08, Julian Keil () > escribió: > >> Hi Irene, >> >> what is the reason to use the extra checkdata step? >> The function checks if the input data has the correct „datatype“ field. >> Since you probably don’t have that field, the function will throw an >> error. >> >> Also, I’d recommend using the eeglab2fieldtrip-function to get from >> EEGlab .set to a fieldtrip-like structure. >> >> Best, >> >> Julian >> >> >> Am 04.01.2019 um 12:47 schrieb Irene Varela Leniz < >> irene.varela at alumni.mondragon.edu>: >> >> Hi, >> >> I am a researcher in Mondragon University working on source >> reconstruction of EEG data. I am new at fieldtrip and I feel a little bit >> lost about this software. I have some errors in a code I have developed but >> I do not manage to solve them. Could you please help me? >> >> I want to plot EEG data of a channel called 'A1' which is the first row >> in a 2D matrix variable called data, which is inside EEG structure. The >> code I have developed is below and I get the following error: >> >> *Error using ft_checkdata (line 525)* >> *This function requires 'timelock' or 'freq' data as input, see >> ft_datatype_timelock or ft_datatype_freq.* >> >> The code is the following: >> *clc; clear all; close all;* >> *clear variables* >> *restoredefaultpath; % set a clean path* >> *main='E:\';* >> *cd='E:\fieldtrip-20181217'; % change this* >> *addpath(cd);* >> >> *ft_defaults;* >> *filename = "E:\PBLdata\O200_RS1_final.set"; %cambiar aqui y poner >> vuestro directorio* >> *load(filename, '-mat'); %Create EEG struct* >> *location = EEG.chanlocs;* >> *data = EEG.data; * >> >> *cfg = [];* >> *cfg.xlim = [-0.2 1.0];* >> *cfg.ylim = [-1e-13 3e-13];* >> *cfg.channel = 'A1';* >> *datos = data(1,:);* >> *Ndata = numel(datos);* >> *for i=1:Ndata* >> * % check if the input data is valid for this function* >> * datos(i) = ft_checkdata(datos(i), 'datatype', {'timelock', 'freq'});* >> *end* >> >> *figure; ft_singleplotER(cfg,datos);* >> >> Thank you in advance, >> >> Irene >> >> _______________________________________________ >> 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 irene.varela at alumni.mondragon.edu Mon Jan 7 10:34:58 2019 From: irene.varela at alumni.mondragon.edu (Irene Varela Leniz) Date: Mon, 7 Jan 2019 10:34:58 +0100 Subject: [FieldTrip] problems using fieldtrip for source reconstruction EEG In-Reply-To: References: <2F70506F-5E8C-4A34-8A4F-030FF9B78A80@gmail.com> Message-ID: Hi Julian, I have read about them in Fieldtrip documentation but I still dont manage to do nothing. I am looking for a topographic visualization of data and I am interesed in using Fieldtrip. Moreover, whenever I try different command I get the following error: Error using ft_checkdata (line 525) This function requires 'timelock' or 'freq' data as input, see ft_datatype_timelock or ft_datatype_freq. Error in ft_singleplotER (line 133) varargin{i} = ft_checkdata(varargin{i}, 'datatype', {'timelock', 'freq'}); The data comes from eeglab using eeglab2fieldtrip function, so that we have the data stored in a struct. Thank you in advance, Irene El lun., 7 ene. 2019 a las 10:27, Julian Keil () escribió: > Hi Irene, > > it helps if you describe exactly what you want to do (I don’t mean to be > rude or patronizing, but check here for suggestions: > https://journals.plos.org/ploscompbiol/article?id=10.1371/journal.pcbi.1002202 > ). > > There are many ways to visualize resting state EEG signals, and you don’t > need fieldtrip for all of them. > E.g., if you just want to plot the timecourse of the data, you can use the > matlab built-in „plot“ function (e.g. use something like > "plot(data.time{1},data.trial{1})“ to plot one trial). If you want to > explore your data, ft_databrowser is your friend > http://www.fieldtriptoolbox.org/faq/how_can_i_use_the_databrowser/ > > Best, > > Julian > > ________________ > Prof. Dr. Julian Keil > > Biological Psychology > Olshausenstrasse 62 - R. 306 > 24118 Kiel, Germany > > +49 - 0431 - 880 - 4872 > http://www.biopsych.uni-kiel.de/en > > > Am 07.01.2019 um 09:57 schrieb Irene Varela Leniz < > irene.varela at alumni.mondragon.edu>: > > Good morning Julian, > > Can you help me with plotting some resting state EEG signals? I am new in > Fieldtrip and I dont find clear information about this topic and I dont > really know how to do plottings in Fieldtrip. I feel like the fieldtrip > documentation is a little bit weak.... > > Thank you in advance, > Best regards, > > Irene Varela > > El vie., 4 ene. 2019 a las 14:08, Julian Keil () > escribió: > >> Hi Irene, >> >> what is the reason to use the extra checkdata step? >> The function checks if the input data has the correct „datatype“ field. >> Since you probably don’t have that field, the function will throw an >> error. >> >> Also, I’d recommend using the eeglab2fieldtrip-function to get from >> EEGlab .set to a fieldtrip-like structure. >> >> Best, >> >> Julian >> >> >> Am 04.01.2019 um 12:47 schrieb Irene Varela Leniz < >> irene.varela at alumni.mondragon.edu>: >> >> Hi, >> >> I am a researcher in Mondragon University working on source >> reconstruction of EEG data. I am new at fieldtrip and I feel a little bit >> lost about this software. I have some errors in a code I have developed but >> I do not manage to solve them. Could you please help me? >> >> I want to plot EEG data of a channel called 'A1' which is the first row >> in a 2D matrix variable called data, which is inside EEG structure. The >> code I have developed is below and I get the following error: >> >> *Error using ft_checkdata (line 525)* >> *This function requires 'timelock' or 'freq' data as input, see >> ft_datatype_timelock or ft_datatype_freq.* >> >> The code is the following: >> *clc; clear all; close all;* >> *clear variables* >> *restoredefaultpath; % set a clean path* >> *main='E:\';* >> *cd='E:\fieldtrip-20181217'; % change this* >> *addpath(cd);* >> >> *ft_defaults;* >> *filename = "E:\PBLdata\O200_RS1_final.set"; %cambiar aqui y poner >> vuestro directorio* >> *load(filename, '-mat'); %Create EEG struct* >> *location = EEG.chanlocs;* >> *data = EEG.data; * >> >> *cfg = [];* >> *cfg.xlim = [-0.2 1.0];* >> *cfg.ylim = [-1e-13 3e-13];* >> *cfg.channel = 'A1';* >> *datos = data(1,:);* >> *Ndata = numel(datos);* >> *for i=1:Ndata* >> * % check if the input data is valid for this function* >> * datos(i) = ft_checkdata(datos(i), 'datatype', {'timelock', 'freq'});* >> *end* >> >> *figure; ft_singleplotER(cfg,datos);* >> >> Thank you in advance, >> >> Irene >> >> _______________________________________________ >> 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 > > > _______________________________________________ > 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 julian.keil at gmail.com Mon Jan 7 11:15:02 2019 From: julian.keil at gmail.com (Julian Keil) Date: Mon, 7 Jan 2019 11:15:02 +0100 Subject: [FieldTrip] problems using fieldtrip for source reconstruction EEG In-Reply-To: References: <2F70506F-5E8C-4A34-8A4F-030FF9B78A80@gmail.com> Message-ID: <0C15616B-7C07-44BB-9AAD-1A86EEA454AE@gmail.com> Hi Irene, ft_topoplotER requires indeed timelock data, i.e. data in which you have computed the average over trials. Given that you wrote before that you are using resting-state data, I’m not sure this is the right function you need. Can you post the content of the struct you want to plot? In any way, if you are hitting a wall in using fieldtrip, I suggest starting with one of the many tutorials to get a sense of how things work. Just diving in with your own data without knowing exactly what each function does will be rather frustrating. Best, Julian ________________ Prof. Dr. Julian Keil Biological Psychology Olshausenstrasse 62 - R. 306 24118 Kiel, Germany +49 - 0431 - 880 - 4872 http://www.biopsych.uni-kiel.de/en > Am 07.01.2019 um 10:34 schrieb Irene Varela Leniz : > > Hi Julian, > > I have read about them in Fieldtrip documentation but I still dont manage to do nothing. I am looking for a topographic visualization of data and I am interesed in using Fieldtrip. Moreover, whenever I try different command I get the following error: > > Error using ft_checkdata (line 525) > This function requires 'timelock' or 'freq' data as input, see ft_datatype_timelock or ft_datatype_freq. > Error in ft_singleplotER (line 133) > varargin{i} = ft_checkdata(varargin{i}, 'datatype', {'timelock', 'freq'}); > > The data comes from eeglab using eeglab2fieldtrip function, so that we have the data stored in a struct. > > Thank you in advance, > Irene > > El lun., 7 ene. 2019 a las 10:27, Julian Keil (>) escribió: > Hi Irene, > > it helps if you describe exactly what you want to do (I don’t mean to be rude or patronizing, but check here for suggestions: https://journals.plos.org/ploscompbiol/article?id=10.1371/journal.pcbi.1002202 ). > > There are many ways to visualize resting state EEG signals, and you don’t need fieldtrip for all of them. > E.g., if you just want to plot the timecourse of the data, you can use the matlab built-in „plot“ function (e.g. use something like "plot(data.time{1},data.trial{1})“ to plot one trial). If you want to explore your data, ft_databrowser is your friend http://www.fieldtriptoolbox.org/faq/how_can_i_use_the_databrowser/ > > Best, > > Julian > > ________________ > Prof. Dr. Julian Keil > > Biological Psychology > Olshausenstrasse 62 - R. 306 > 24118 Kiel, Germany > > +49 - 0431 - 880 - 4872 > http://www.biopsych.uni-kiel.de/en > > >> Am 07.01.2019 um 09:57 schrieb Irene Varela Leniz >: >> >> Good morning Julian, >> >> Can you help me with plotting some resting state EEG signals? I am new in Fieldtrip and I dont find clear information about this topic and I dont really know how to do plottings in Fieldtrip. I feel like the fieldtrip documentation is a little bit weak.... >> >> Thank you in advance, >> Best regards, >> >> Irene Varela >> >> El vie., 4 ene. 2019 a las 14:08, Julian Keil (>) escribió: >> Hi Irene, >> >> what is the reason to use the extra checkdata step? >> The function checks if the input data has the correct „datatype“ field. >> Since you probably don’t have that field, the function will throw an error. >> >> Also, I’d recommend using the eeglab2fieldtrip-function to get from EEGlab .set to a fieldtrip-like structure. >> >> Best, >> >> Julian >> >> >>> Am 04.01.2019 um 12:47 schrieb Irene Varela Leniz >: >>> >>> Hi, >>> >>> I am a researcher in Mondragon University working on source reconstruction of EEG data. I am new at fieldtrip and I feel a little bit lost about this software. I have some errors in a code I have developed but I do not manage to solve them. Could you please help me? >>> >>> I want to plot EEG data of a channel called 'A1' which is the first row in a 2D matrix variable called data, which is inside EEG structure. The code I have developed is below and I get the following error: >>> >>> Error using ft_checkdata (line 525) >>> This function requires 'timelock' or 'freq' data as input, see ft_datatype_timelock or ft_datatype_freq. >>> >>> The code is the following: >>> clc; clear all; close all; >>> clear variables >>> restoredefaultpath; % set a clean path >>> main='E:\'; >>> cd='E:\fieldtrip-20181217'; % change this >>> addpath(cd); >>> >>> ft_defaults; >>> filename = "E:\PBLdata\O200_RS1_final.set"; %cambiar aqui y poner vuestro directorio >>> load(filename, '-mat'); %Create EEG struct >>> location = EEG.chanlocs; >>> data = EEG.data; >>> >>> cfg = []; >>> cfg.xlim = [-0.2 1.0]; >>> cfg.ylim = [-1e-13 3e-13]; >>> cfg.channel = 'A1'; >>> datos = data(1,:); >>> Ndata = numel(datos); >>> for i=1:Ndata >>> % check if the input data is valid for this function >>> datos(i) = ft_checkdata(datos(i), 'datatype', {'timelock', 'freq'}); >>> end >>> >>> figure; ft_singleplotER(cfg,datos); >>> >>> Thank you in advance, >>> >>> Irene >>> >>> _______________________________________________ >>> 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 > > _______________________________________________ > 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 alexisperezbellido at gmail.com Mon Jan 7 11:19:50 2019 From: alexisperezbellido at gmail.com (=?UTF-8?Q?Alexis_P=C3=A9rez?=) Date: Mon, 7 Jan 2019 11:19:50 +0100 Subject: [FieldTrip] problems using fieldtrip for source reconstruction EEG In-Reply-To: References: <2F70506F-5E8C-4A34-8A4F-030FF9B78A80@gmail.com> Message-ID: Hi Irene, here you have different examples on how you can plot data in fieldtrip. http://www.fieldtriptoolbox.org/tutorial/plotting/ I recommend you to follow the tutorial by running the little snippets of code and trying to understand: 1 what are the fields that your data structure should contain in order to be plotted (e.g. if you want to plot timefrequency amplitide representations you must have a power representation). 2 how each of the cfg. arguments modify your plot (you can also use the matlab help command in each plotting function to see a description of the different plot features that you can modify). 3 what different types of data you can find and what are the different ways to plot them. Once you have understood how yo plot the data in the fieldtrip examples, then you can start to generalize and customize those functions to your own needs. In your particular example, if you want to plot the topology then you must use ft_topoplotER (and not ft_singleplotER). Remember to indicate what is your helmet sensor/electrodes layout otherwise you will get errors or incorrect representation of your data. Good luck and patience. alex On Mon, Jan 7, 2019 at 10:36 AM Irene Varela Leniz < irene.varela at alumni.mondragon.edu> wrote: > Hi Julian, > > I have read about them in Fieldtrip documentation but I still dont manage > to do nothing. I am looking for a topographic visualization of data and I > am interesed in using Fieldtrip. Moreover, whenever I try different command > I get the following error: > > Error using ft_checkdata (line 525) > This function requires 'timelock' or 'freq' data as input, see > ft_datatype_timelock or ft_datatype_freq. > Error in ft_singleplotER (line 133) > varargin{i} = ft_checkdata(varargin{i}, 'datatype', {'timelock', > 'freq'}); > > The data comes from eeglab using eeglab2fieldtrip function, so that we > have the data stored in a struct. > > Thank you in advance, > Irene > > El lun., 7 ene. 2019 a las 10:27, Julian Keil () > escribió: > >> Hi Irene, >> >> it helps if you describe exactly what you want to do (I don’t mean to be >> rude or patronizing, but check here for suggestions: >> https://journals.plos.org/ploscompbiol/article?id=10.1371/journal.pcbi.1002202 >> ). >> >> There are many ways to visualize resting state EEG signals, and you don’t >> need fieldtrip for all of them. >> E.g., if you just want to plot the timecourse of the data, you can use >> the matlab built-in „plot“ function (e.g. use something like >> "plot(data.time{1},data.trial{1})“ to plot one trial). If you want to >> explore your data, ft_databrowser is your friend >> http://www.fieldtriptoolbox.org/faq/how_can_i_use_the_databrowser/ >> >> Best, >> >> Julian >> >> ________________ >> Prof. Dr. Julian Keil >> >> Biological Psychology >> Olshausenstrasse 62 - R. 306 >> 24118 Kiel, Germany >> >> +49 - 0431 - 880 - 4872 >> http://www.biopsych.uni-kiel.de/en >> >> >> Am 07.01.2019 um 09:57 schrieb Irene Varela Leniz < >> irene.varela at alumni.mondragon.edu>: >> >> Good morning Julian, >> >> Can you help me with plotting some resting state EEG signals? I am new in >> Fieldtrip and I dont find clear information about this topic and I dont >> really know how to do plottings in Fieldtrip. I feel like the fieldtrip >> documentation is a little bit weak.... >> >> Thank you in advance, >> Best regards, >> >> Irene Varela >> >> El vie., 4 ene. 2019 a las 14:08, Julian Keil () >> escribió: >> >>> Hi Irene, >>> >>> what is the reason to use the extra checkdata step? >>> The function checks if the input data has the correct „datatype“ field. >>> Since you probably don’t have that field, the function will throw an >>> error. >>> >>> Also, I’d recommend using the eeglab2fieldtrip-function to get from >>> EEGlab .set to a fieldtrip-like structure. >>> >>> Best, >>> >>> Julian >>> >>> >>> Am 04.01.2019 um 12:47 schrieb Irene Varela Leniz < >>> irene.varela at alumni.mondragon.edu>: >>> >>> Hi, >>> >>> I am a researcher in Mondragon University working on source >>> reconstruction of EEG data. I am new at fieldtrip and I feel a little bit >>> lost about this software. I have some errors in a code I have developed but >>> I do not manage to solve them. Could you please help me? >>> >>> I want to plot EEG data of a channel called 'A1' which is the first row >>> in a 2D matrix variable called data, which is inside EEG structure. The >>> code I have developed is below and I get the following error: >>> >>> *Error using ft_checkdata (line 525)* >>> *This function requires 'timelock' or 'freq' data as input, see >>> ft_datatype_timelock or ft_datatype_freq.* >>> >>> The code is the following: >>> *clc; clear all; close all;* >>> *clear variables* >>> *restoredefaultpath; % set a clean path* >>> *main='E:\';* >>> *cd='E:\fieldtrip-20181217'; % change this* >>> *addpath(cd);* >>> >>> *ft_defaults;* >>> *filename = "E:\PBLdata\O200_RS1_final.set"; %cambiar aqui y poner >>> vuestro directorio* >>> *load(filename, '-mat'); %Create EEG struct* >>> *location = EEG.chanlocs;* >>> *data = EEG.data; * >>> >>> *cfg = [];* >>> *cfg.xlim = [-0.2 1.0];* >>> *cfg.ylim = [-1e-13 3e-13];* >>> *cfg.channel = 'A1';* >>> *datos = data(1,:);* >>> *Ndata = numel(datos);* >>> *for i=1:Ndata* >>> * % check if the input data is valid for this function* >>> * datos(i) = ft_checkdata(datos(i), 'datatype', {'timelock', 'freq'});* >>> *end* >>> >>> *figure; ft_singleplotER(cfg,datos);* >>> >>> Thank you in advance, >>> >>> Irene >>> >>> _______________________________________________ >>> 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 >> >> >> _______________________________________________ >> 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 > -- Alexis Pérez-Bellido, PhD Donders Institute for Brain, Cognition and Behavior, Nijmegen, Netherlands Prediction & Attention group web: https://www.predictivebrainlab.com/ gmail: alexisperezbellido at gmail.com skype: alexisperezbellido -------------- next part -------------- An HTML attachment was scrubbed... URL: From irene.varela at alumni.mondragon.edu Mon Jan 7 11:25:06 2019 From: irene.varela at alumni.mondragon.edu (Irene Varela Leniz) Date: Mon, 7 Jan 2019 11:25:06 +0100 Subject: [FieldTrip] problems using fieldtrip for source reconstruction EEG In-Reply-To: <0C15616B-7C07-44BB-9AAD-1A86EEA454AE@gmail.com> References: <2F70506F-5E8C-4A34-8A4F-030FF9B78A80@gmail.com> <0C15616B-7C07-44BB-9AAD-1A86EEA454AE@gmail.com> Message-ID: Hi Julian, So I think there is a missunderstanding. We have a EEG structure, which has been imported from EEGLAB using eeglab2fieldtrip, and that structures contains all the data about trials, elecs... But what we want is to plot data without calculating any average, but a topographic map per channel... Thats why we do not manage to do it with the information we have... Thank you in advance, Irene El lun., 7 ene. 2019 a las 11:15, Julian Keil () escribió: > Hi Irene, > > ft_topoplotER requires indeed timelock data, i.e. data in which you have > computed the average over trials. Given that you wrote before that you are > using resting-state data, I’m not sure this is the right function you need. > > Can you post the content of the struct you want to plot? > > In any way, if you are hitting a wall in using fieldtrip, I suggest > starting with one of the many tutorials to get a sense of how things work. > Just diving in with your own data without knowing exactly what each > function does will be rather frustrating. > > Best, > > Julian > > ________________ > Prof. Dr. Julian Keil > > Biological Psychology > Olshausenstrasse 62 - R. 306 > 24118 Kiel, Germany > > +49 - 0431 - 880 - 4872 > http://www.biopsych.uni-kiel.de/en > > > Am 07.01.2019 um 10:34 schrieb Irene Varela Leniz < > irene.varela at alumni.mondragon.edu>: > > Hi Julian, > > I have read about them in Fieldtrip documentation but I still dont manage > to do nothing. I am looking for a topographic visualization of data and I > am interesed in using Fieldtrip. Moreover, whenever I try different command > I get the following error: > > Error using ft_checkdata (line 525) > This function requires 'timelock' or 'freq' data as input, see > ft_datatype_timelock or ft_datatype_freq. > Error in ft_singleplotER (line 133) > varargin{i} = ft_checkdata(varargin{i}, 'datatype', {'timelock', > 'freq'}); > > The data comes from eeglab using eeglab2fieldtrip function, so that we > have the data stored in a struct. > > Thank you in advance, > Irene > > El lun., 7 ene. 2019 a las 10:27, Julian Keil () > escribió: > >> Hi Irene, >> >> it helps if you describe exactly what you want to do (I don’t mean to be >> rude or patronizing, but check here for suggestions: >> https://journals.plos.org/ploscompbiol/article?id=10.1371/journal.pcbi.1002202 >> ). >> >> There are many ways to visualize resting state EEG signals, and you don’t >> need fieldtrip for all of them. >> E.g., if you just want to plot the timecourse of the data, you can use >> the matlab built-in „plot“ function (e.g. use something like >> "plot(data.time{1},data.trial{1})“ to plot one trial). If you want to >> explore your data, ft_databrowser is your friend >> http://www.fieldtriptoolbox.org/faq/how_can_i_use_the_databrowser/ >> >> Best, >> >> Julian >> >> ________________ >> Prof. Dr. Julian Keil >> >> Biological Psychology >> Olshausenstrasse 62 - R. 306 >> 24118 Kiel, Germany >> >> +49 - 0431 - 880 - 4872 >> http://www.biopsych.uni-kiel.de/en >> >> >> Am 07.01.2019 um 09:57 schrieb Irene Varela Leniz < >> irene.varela at alumni.mondragon.edu>: >> >> Good morning Julian, >> >> Can you help me with plotting some resting state EEG signals? I am new in >> Fieldtrip and I dont find clear information about this topic and I dont >> really know how to do plottings in Fieldtrip. I feel like the fieldtrip >> documentation is a little bit weak.... >> >> Thank you in advance, >> Best regards, >> >> Irene Varela >> >> El vie., 4 ene. 2019 a las 14:08, Julian Keil () >> escribió: >> >>> Hi Irene, >>> >>> what is the reason to use the extra checkdata step? >>> The function checks if the input data has the correct „datatype“ field. >>> Since you probably don’t have that field, the function will throw an >>> error. >>> >>> Also, I’d recommend using the eeglab2fieldtrip-function to get from >>> EEGlab .set to a fieldtrip-like structure. >>> >>> Best, >>> >>> Julian >>> >>> >>> Am 04.01.2019 um 12:47 schrieb Irene Varela Leniz < >>> irene.varela at alumni.mondragon.edu>: >>> >>> Hi, >>> >>> I am a researcher in Mondragon University working on source >>> reconstruction of EEG data. I am new at fieldtrip and I feel a little bit >>> lost about this software. I have some errors in a code I have developed but >>> I do not manage to solve them. Could you please help me? >>> >>> I want to plot EEG data of a channel called 'A1' which is the first row >>> in a 2D matrix variable called data, which is inside EEG structure. The >>> code I have developed is below and I get the following error: >>> >>> *Error using ft_checkdata (line 525)* >>> *This function requires 'timelock' or 'freq' data as input, see >>> ft_datatype_timelock or ft_datatype_freq.* >>> >>> The code is the following: >>> *clc; clear all; close all;* >>> *clear variables* >>> *restoredefaultpath; % set a clean path* >>> *main='E:\';* >>> *cd='E:\fieldtrip-20181217'; % change this* >>> *addpath(cd);* >>> >>> *ft_defaults;* >>> *filename = "E:\PBLdata\O200_RS1_final.set"; %cambiar aqui y poner >>> vuestro directorio* >>> *load(filename, '-mat'); %Create EEG struct* >>> *location = EEG.chanlocs;* >>> *data = EEG.data; * >>> >>> *cfg = [];* >>> *cfg.xlim = [-0.2 1.0];* >>> *cfg.ylim = [-1e-13 3e-13];* >>> *cfg.channel = 'A1';* >>> *datos = data(1,:);* >>> *Ndata = numel(datos);* >>> *for i=1:Ndata* >>> * % check if the input data is valid for this function* >>> * datos(i) = ft_checkdata(datos(i), 'datatype', {'timelock', 'freq'});* >>> *end* >>> >>> *figure; ft_singleplotER(cfg,datos);* >>> >>> Thank you in advance, >>> >>> Irene >>> >>> _______________________________________________ >>> 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 >> >> >> _______________________________________________ >> 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 irene.varela at alumni.mondragon.edu Mon Jan 7 11:30:16 2019 From: irene.varela at alumni.mondragon.edu (Irene Varela Leniz) Date: Mon, 7 Jan 2019 11:30:16 +0100 Subject: [FieldTrip] problems using fieldtrip for source reconstruction EEG In-Reply-To: References: <2F70506F-5E8C-4A34-8A4F-030FF9B78A80@gmail.com> Message-ID: Hello Alex, I have tried the tutorial you mention, but as I stated above, I get error related with the definition of the structure (This function requires 'timelock' or 'freq' data as input, see ft_datatype_timelock or ft_datatype_freq.). We dont really know how to obtain this from data. Do we have to add something more to obtain timelock and freq? Example: EEG=load(filename); data=EEG.data; cfg = []; cfg.xlim = [-0.2 1.0]; cfg.ylim = [-1e-13 3e-13]; cfg.channel = 'A1'; figure; ft_singleplotER(cfg,data); Thank you in advance, Irene El lun., 7 ene. 2019 a las 11:20, Alexis Pérez (< alexisperezbellido at gmail.com>) escribió: > Hi Irene, > > here you have different examples on how you can plot data in fieldtrip. > http://www.fieldtriptoolbox.org/tutorial/plotting/ > > I recommend you to follow the tutorial by running the little snippets of > code and trying to understand: > 1 what are the fields that your data structure should contain in order to > be plotted (e.g. if you want to plot timefrequency amplitide > representations you must have a power representation). > 2 how each of the cfg. arguments modify your plot (you can also use the > matlab help command in each plotting function to see a description of the > different plot features that you can modify). > 3 what different types of data you can find and what are the different > ways to plot them. > > Once you have understood how yo plot the data in the fieldtrip examples, > then you can start to generalize and customize those functions to your own > needs. > > In your particular example, if you want to plot the topology then you must > use ft_topoplotER (and not ft_singleplotER). Remember to indicate what is > your helmet sensor/electrodes layout otherwise you will get errors or > incorrect representation of your data. > > Good luck and patience. > > alex > > On Mon, Jan 7, 2019 at 10:36 AM Irene Varela Leniz < > irene.varela at alumni.mondragon.edu> wrote: > >> Hi Julian, >> >> I have read about them in Fieldtrip documentation but I still dont manage >> to do nothing. I am looking for a topographic visualization of data and I >> am interesed in using Fieldtrip. Moreover, whenever I try different command >> I get the following error: >> >> Error using ft_checkdata (line 525) >> This function requires 'timelock' or 'freq' data as input, see >> ft_datatype_timelock or ft_datatype_freq. >> Error in ft_singleplotER (line 133) >> varargin{i} = ft_checkdata(varargin{i}, 'datatype', {'timelock', >> 'freq'}); >> >> The data comes from eeglab using eeglab2fieldtrip function, so that we >> have the data stored in a struct. >> >> Thank you in advance, >> Irene >> >> El lun., 7 ene. 2019 a las 10:27, Julian Keil () >> escribió: >> >>> Hi Irene, >>> >>> it helps if you describe exactly what you want to do (I don’t mean to be >>> rude or patronizing, but check here for suggestions: >>> https://journals.plos.org/ploscompbiol/article?id=10.1371/journal.pcbi.1002202 >>> ). >>> >>> There are many ways to visualize resting state EEG signals, and you >>> don’t need fieldtrip for all of them. >>> E.g., if you just want to plot the timecourse of the data, you can use >>> the matlab built-in „plot“ function (e.g. use something like >>> "plot(data.time{1},data.trial{1})“ to plot one trial). If you want to >>> explore your data, ft_databrowser is your friend >>> http://www.fieldtriptoolbox.org/faq/how_can_i_use_the_databrowser/ >>> >>> Best, >>> >>> Julian >>> >>> ________________ >>> Prof. Dr. Julian Keil >>> >>> Biological Psychology >>> Olshausenstrasse 62 - R. 306 >>> 24118 Kiel, Germany >>> >>> +49 - 0431 - 880 - 4872 >>> http://www.biopsych.uni-kiel.de/en >>> >>> >>> Am 07.01.2019 um 09:57 schrieb Irene Varela Leniz < >>> irene.varela at alumni.mondragon.edu>: >>> >>> Good morning Julian, >>> >>> Can you help me with plotting some resting state EEG signals? I am new >>> in Fieldtrip and I dont find clear information about this topic and I dont >>> really know how to do plottings in Fieldtrip. I feel like the fieldtrip >>> documentation is a little bit weak.... >>> >>> Thank you in advance, >>> Best regards, >>> >>> Irene Varela >>> >>> El vie., 4 ene. 2019 a las 14:08, Julian Keil () >>> escribió: >>> >>>> Hi Irene, >>>> >>>> what is the reason to use the extra checkdata step? >>>> The function checks if the input data has the correct „datatype“ field. >>>> Since you probably don’t have that field, the function will throw an >>>> error. >>>> >>>> Also, I’d recommend using the eeglab2fieldtrip-function to get from >>>> EEGlab .set to a fieldtrip-like structure. >>>> >>>> Best, >>>> >>>> Julian >>>> >>>> >>>> Am 04.01.2019 um 12:47 schrieb Irene Varela Leniz < >>>> irene.varela at alumni.mondragon.edu>: >>>> >>>> Hi, >>>> >>>> I am a researcher in Mondragon University working on source >>>> reconstruction of EEG data. I am new at fieldtrip and I feel a little bit >>>> lost about this software. I have some errors in a code I have developed but >>>> I do not manage to solve them. Could you please help me? >>>> >>>> I want to plot EEG data of a channel called 'A1' which is the first row >>>> in a 2D matrix variable called data, which is inside EEG structure. The >>>> code I have developed is below and I get the following error: >>>> >>>> *Error using ft_checkdata (line 525)* >>>> *This function requires 'timelock' or 'freq' data as input, see >>>> ft_datatype_timelock or ft_datatype_freq.* >>>> >>>> The code is the following: >>>> *clc; clear all; close all;* >>>> *clear variables* >>>> *restoredefaultpath; % set a clean path* >>>> *main='E:\';* >>>> *cd='E:\fieldtrip-20181217'; % change this* >>>> *addpath(cd);* >>>> >>>> *ft_defaults;* >>>> *filename = "E:\PBLdata\O200_RS1_final.set"; %cambiar aqui y poner >>>> vuestro directorio* >>>> *load(filename, '-mat'); %Create EEG struct* >>>> *location = EEG.chanlocs;* >>>> *data = EEG.data; * >>>> >>>> *cfg = [];* >>>> *cfg.xlim = [-0.2 1.0];* >>>> *cfg.ylim = [-1e-13 3e-13];* >>>> *cfg.channel = 'A1';* >>>> *datos = data(1,:);* >>>> *Ndata = numel(datos);* >>>> *for i=1:Ndata* >>>> * % check if the input data is valid for this function* >>>> * datos(i) = ft_checkdata(datos(i), 'datatype', {'timelock', 'freq'});* >>>> *end* >>>> >>>> *figure; ft_singleplotER(cfg,datos);* >>>> >>>> Thank you in advance, >>>> >>>> Irene >>>> >>>> _______________________________________________ >>>> 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 >>> >>> >>> _______________________________________________ >>> 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 >> > > > -- > Alexis Pérez-Bellido, PhD > Donders Institute for Brain, Cognition and Behavior, Nijmegen, Netherlands > Prediction & Attention group > web: https://www.predictivebrainlab.com/ > gmail: alexisperezbellido at gmail.com > skype: alexisperezbellido > > > _______________________________________________ > 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 alexisperezbellido at gmail.com Mon Jan 7 12:01:32 2019 From: alexisperezbellido at gmail.com (=?UTF-8?Q?Alexis_P=C3=A9rez?=) Date: Mon, 7 Jan 2019 12:01:32 +0100 Subject: [FieldTrip] problems using fieldtrip for source reconstruction EEG In-Reply-To: References: <2F70506F-5E8C-4A34-8A4F-030FF9B78A80@gmail.com> Message-ID: Hi, On Mon, Jan 7, 2019 at 11:30 AM Irene Varela Leniz < irene.varela at alumni.mondragon.edu> wrote: > Hello Alex, > > I have tried the tutorial you mention, but as I stated above, I get error > related with the definition of the structure (This function requires > 'timelock' or 'freq' data as input, see ft_datatype_timelock or > ft_datatype_freq.). We dont really know how to obtain this from data. Do > we have to add something more to obtain timelock and freq? > What I was suggesting is, first as a learning practice, you can run the different fieldtrip examples (on fieldtrip example data) just to understand how the plotting functions work. Because these examples must work, you can play around with the different parameters in order to understand how the data should be organized and what manipulations you can apply to your plots. Second, once that you feel confident in plotting the fieldtrip example data (for instance, make sure that you understand what each of the fields in your data structure variable contain), you can try to find out what is the problem when you try to plot your own dataset. Example: > > EEG=load(filename); > data=EEG.data; > cfg = []; > cfg.xlim = [-0.2 1.0]; > cfg.ylim = [-1e-13 3e-13]; > cfg.channel = 'A1'; > figure; ft_singleplotER(cfg,data); > > > Thank you in advance, > Irene > > Probably you can share with us what is the content of your data struct variable. Otherwise it is difficult to tell where the problem might be. > > > > El lun., 7 ene. 2019 a las 11:20, Alexis Pérez (< > alexisperezbellido at gmail.com>) escribió: > >> Hi Irene, >> >> here you have different examples on how you can plot data in fieldtrip. >> http://www.fieldtriptoolbox.org/tutorial/plotting/ >> >> I recommend you to follow the tutorial by running the little snippets of >> code and trying to understand: >> 1 what are the fields that your data structure should contain in order to >> be plotted (e.g. if you want to plot timefrequency amplitide >> representations you must have a power representation). >> 2 how each of the cfg. arguments modify your plot (you can also use the >> matlab help command in each plotting function to see a description of the >> different plot features that you can modify). >> 3 what different types of data you can find and what are the different >> ways to plot them. >> >> Once you have understood how yo plot the data in the fieldtrip examples, >> then you can start to generalize and customize those functions to your own >> needs. >> >> In your particular example, if you want to plot the topology then you >> must use ft_topoplotER (and not ft_singleplotER). Remember to indicate >> what is your helmet sensor/electrodes layout otherwise you will get errors >> or incorrect representation of your data. >> >> Good luck and patience. >> >> alex >> >> On Mon, Jan 7, 2019 at 10:36 AM Irene Varela Leniz < >> irene.varela at alumni.mondragon.edu> wrote: >> >>> Hi Julian, >>> >>> I have read about them in Fieldtrip documentation but I still dont >>> manage to do nothing. I am looking for a topographic visualization of data >>> and I am interesed in using Fieldtrip. Moreover, whenever I try different >>> command I get the following error: >>> >>> Error using ft_checkdata (line 525) >>> This function requires 'timelock' or 'freq' data as input, see >>> ft_datatype_timelock or ft_datatype_freq. >>> Error in ft_singleplotER (line 133) >>> varargin{i} = ft_checkdata(varargin{i}, 'datatype', {'timelock', >>> 'freq'}); >>> >>> The data comes from eeglab using eeglab2fieldtrip function, so that we >>> have the data stored in a struct. >>> >>> Thank you in advance, >>> Irene >>> >>> El lun., 7 ene. 2019 a las 10:27, Julian Keil () >>> escribió: >>> >>>> Hi Irene, >>>> >>>> it helps if you describe exactly what you want to do (I don’t mean to >>>> be rude or patronizing, but check here for suggestions: >>>> https://journals.plos.org/ploscompbiol/article?id=10.1371/journal.pcbi.1002202 >>>> ). >>>> >>>> There are many ways to visualize resting state EEG signals, and you >>>> don’t need fieldtrip for all of them. >>>> E.g., if you just want to plot the timecourse of the data, you can use >>>> the matlab built-in „plot“ function (e.g. use something like >>>> "plot(data.time{1},data.trial{1})“ to plot one trial). If you want to >>>> explore your data, ft_databrowser is your friend >>>> http://www.fieldtriptoolbox.org/faq/how_can_i_use_the_databrowser/ >>>> >>>> Best, >>>> >>>> Julian >>>> >>>> ________________ >>>> Prof. Dr. Julian Keil >>>> >>>> Biological Psychology >>>> Olshausenstrasse 62 - R. 306 >>>> 24118 Kiel, Germany >>>> >>>> +49 - 0431 - 880 - 4872 >>>> http://www.biopsych.uni-kiel.de/en >>>> >>>> >>>> Am 07.01.2019 um 09:57 schrieb Irene Varela Leniz < >>>> irene.varela at alumni.mondragon.edu>: >>>> >>>> Good morning Julian, >>>> >>>> Can you help me with plotting some resting state EEG signals? I am new >>>> in Fieldtrip and I dont find clear information about this topic and I dont >>>> really know how to do plottings in Fieldtrip. I feel like the fieldtrip >>>> documentation is a little bit weak.... >>>> >>>> Thank you in advance, >>>> Best regards, >>>> >>>> Irene Varela >>>> >>>> El vie., 4 ene. 2019 a las 14:08, Julian Keil () >>>> escribió: >>>> >>>>> Hi Irene, >>>>> >>>>> what is the reason to use the extra checkdata step? >>>>> The function checks if the input data has the correct „datatype“ field. >>>>> Since you probably don’t have that field, the function will throw an >>>>> error. >>>>> >>>>> Also, I’d recommend using the eeglab2fieldtrip-function to get from >>>>> EEGlab .set to a fieldtrip-like structure. >>>>> >>>>> Best, >>>>> >>>>> Julian >>>>> >>>>> >>>>> Am 04.01.2019 um 12:47 schrieb Irene Varela Leniz < >>>>> irene.varela at alumni.mondragon.edu>: >>>>> >>>>> Hi, >>>>> >>>>> I am a researcher in Mondragon University working on source >>>>> reconstruction of EEG data. I am new at fieldtrip and I feel a little bit >>>>> lost about this software. I have some errors in a code I have developed but >>>>> I do not manage to solve them. Could you please help me? >>>>> >>>>> I want to plot EEG data of a channel called 'A1' which is the first >>>>> row in a 2D matrix variable called data, which is inside EEG structure. The >>>>> code I have developed is below and I get the following error: >>>>> >>>>> *Error using ft_checkdata (line 525)* >>>>> *This function requires 'timelock' or 'freq' data as input, see >>>>> ft_datatype_timelock or ft_datatype_freq.* >>>>> >>>>> The code is the following: >>>>> *clc; clear all; close all;* >>>>> *clear variables* >>>>> *restoredefaultpath; % set a clean path* >>>>> *main='E:\';* >>>>> *cd='E:\fieldtrip-20181217'; % change this* >>>>> *addpath(cd);* >>>>> >>>>> *ft_defaults;* >>>>> *filename = "E:\PBLdata\O200_RS1_final.set"; %cambiar aqui y poner >>>>> vuestro directorio* >>>>> *load(filename, '-mat'); %Create EEG struct* >>>>> *location = EEG.chanlocs;* >>>>> *data = EEG.data; * >>>>> >>>>> *cfg = [];* >>>>> *cfg.xlim = [-0.2 1.0];* >>>>> *cfg.ylim = [-1e-13 3e-13];* >>>>> *cfg.channel = 'A1';* >>>>> *datos = data(1,:);* >>>>> *Ndata = numel(datos);* >>>>> *for i=1:Ndata* >>>>> * % check if the input data is valid for this function* >>>>> * datos(i) = ft_checkdata(datos(i), 'datatype', {'timelock', >>>>> 'freq'});* >>>>> *end* >>>>> >>>>> *figure; ft_singleplotER(cfg,datos);* >>>>> >>>>> Thank you in advance, >>>>> >>>>> Irene >>>>> >>>>> _______________________________________________ >>>>> 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 >>>> >>>> >>>> _______________________________________________ >>>> 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 >>> >> >> >> -- >> Alexis Pérez-Bellido, PhD >> Donders Institute for Brain, Cognition and Behavior, Nijmegen, Netherlands >> Prediction & Attention group >> web: https://www.predictivebrainlab.com/ >> gmail: alexisperezbellido at gmail.com >> skype: alexisperezbellido >> >> >> _______________________________________________ >> 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 > -- Alexis Pérez-Bellido, PhD Donders Institute for Brain, Cognition and Behavior, Nijmegen, Netherlands Prediction & Attention group web: https://www.predictivebrainlab.com/ gmail: alexisperezbellido at gmail.com skype: alexisperezbellido -------------- next part -------------- An HTML attachment was scrubbed... URL: From elene.beitia at alumni.mondragon.edu Mon Jan 7 12:09:14 2019 From: elene.beitia at alumni.mondragon.edu (Elene Beitia Loinaz) Date: Mon, 7 Jan 2019 12:09:14 +0100 Subject: [FieldTrip] (no subject) In-Reply-To: <9079FE5E-0DD4-4957-89C5-C4659625D5EF@gmail.com> References: <9079FE5E-0DD4-4957-89C5-C4659625D5EF@gmail.com> Message-ID: Thank you Julian, We already solve the problem. Best, Elene. Hau idatzi du Julian Keil (julian.keil at gmail.com) erabiltzaileak (2019 urt. 3, og. (09:34)): > Dear Elene, > > could you explain what problems you are having? > eeglab2fieldtrip creates the basic structure used in FT, but depending on > what you want to do, you need to add some additional info to the created FT > structure. > > Best, > > Julian > ________________ > Prof. Dr. Julian Keil > > Biological Psychology > Olshausenstrasse 62 - R. 306 > 24118 Kiel, Germany > > +49 - 0431 - 880 - 4872 > http://www.biopsych.uni-kiel.de/en > > > Am 03.01.2019 um 09:06 schrieb Elene Beitia Loinaz < > elene.beitia at alumni.mondragon.edu>: > > Hello, > > My name is Elene Beitia and I am a student in Mondragon Unibertsitatea. > > We are working in the reconstruction of EEG in resting state with previous pre-process data. That data was pre-process using eeglab and we need to convert it to fieltrip. We know about eeglab2fieltrip function, but we are having problems using it. Can someone share information about how to use it? > > Thank you in advanced, > > Elene. > > _______________________________________________ > 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 jan.schoffelen at donders.ru.nl Mon Jan 7 12:49:43 2019 From: jan.schoffelen at donders.ru.nl (Schoffelen, J.M. (Jan Mathijs)) Date: Mon, 7 Jan 2019 11:49:43 +0000 Subject: [FieldTrip] ft_artifact_zvalue In-Reply-To: References: Message-ID: <799914D1-7D63-4E7F-BA6D-35022C6BA07C@donders.ru.nl> Dear Vahab, Indeed, ft_artifact_zvalue looks for positive values for artifacts. What is the comment you are looking for? Best wishes, Jan-Mathijs > On 12 Dec 2018, at 21:34, Vahab Yousofzadeh wrote: > > Dear FT experts, > > Seems that the ft_artifact_zvalue only takes positive z-values to look > for artifacts: > https://www.dropbox.com/s/zbhslrn12j6ug7o/EOG_Artifacts.tif?dl=0 > > different than a sample figure in, > http://www.fieldtriptoolbox.org/tutorial/automatic_artifact_rejection/ > > Here are my settings: > cfg = []; > cfg.continuous = 'yes'; > cfg.artfctdef.zvalue.channel = refchan; > cfg.artfctdef.zvalue.cutoff = z_ther; > cfg.artfctdef.zvalue.trlpadding = 0; > cfg.artfctdef.zvalue.artpadding = 0.1; > cfg.artfctdef.zvalue.fltpadding = 0; > cfg.artfctdef.zvalue.bpfilter = 'yes'; > cfg.artfctdef.zvalue.bpfilttype = 'but'; > cfg.artfctdef.zvalue.bpfreq = [1 15]; > cfg.artfctdef.zvalue.bpfiltord = 4; > cfg.artfctdef.zvalue.hilbert = 'yes'; > cfg.artfctdef.zvalue.interactive = interactive; > [~, artifact_EOG] = ft_artifact_zvalue(cfg, data); > > Any comments are welcomed, > - Vahab > _______________________________________________ > fieldtrip mailing list > https://mailman.science.ru.nl/mailman/listinfo/fieldtrip > https://doi.org/10.1371/journal.pcbi.1002202 From bahman at neuromotor.org Mon Jan 7 13:10:31 2019 From: bahman at neuromotor.org (Bahman Nasseroleslami) Date: Mon, 7 Jan 2019 12:10:31 +0000 Subject: [FieldTrip] Research Assistant Position (Neurology/Neurophysiology) - Trinity College Dublin, the University of Dublin, Dublin, Ireland Message-ID: Dear all, There is a research assistant position available in Academic Unit of Neurology, Trinity College Dublin, the University of Dublin, Dublin, Ireland. ------------------------------------------------------- Post Specification (033543) Post Title: Research Assistant (Neurology/Neurophysiology) Post Status: 12 month Fixed-term Contract, Full-time Research Group / Department / School: Academic Unit of Neurology, School of Medicine, Trinity College Dublin, the University of Dublin Location: Trinity Biomedical Sciences Institute, Trinity College Dublin, the University of Dublin College Green, Dublin D02 R590, Ireland Reports to: Professor Orla Hardiman/Dr Bahman Nasseroleslami Salary: Appointment will be made on the Research Assistant (Level 1) Salary Scale at a point in line with Government Pay Policy, €22,109 to €28,904 per annum (commensurate with qualifications and experience). Appointment will be made no higher than point 10. Hours of Work: 32-40 hours per week (0.8-1.0 Full Time Equivalent) Closing Date: 12 Noon (Irish Standard Time), 15 January 2019 Please note that Garda vetting will be sought in respect of individuals who come under consideration for a post. Post Summary: Applications are invited for a motivated and self-driven individual for the position of research assistant with the Irish ALS Research Group, hosted in the Trinity Biomedical Sciences Institute (TBSI)'s Academic Unit of Neurology. The ideal candidate will have an undergraduate or master's degree in STEM (Science, Technology, Engineering, Mathematics) e.g. Neuroscience, Physiology, Biology, Biomedical Engineering, Mathematics, or a cognate area. Familiarity with and/or the ability to quickly acquire skills in electrophysiological recordings (e.g. EEG/EMG) and Clinical Neurophysiology techniques (e.g. TMS), would be highly desirable. The post is available for 1 year, initially, with the possibility of extension to 3 years given the availability of funding and performance. ------------------------------------------------------- The detailed job description file (PDF) and the application instructions can be found online at http://jobs.tcd.ie. or directly from https://drive.google.com/file/d/1mYcN5qHU717OyzWucSNpHVxNz4c1djaI/view?usp=sharing Informal enquiries can be sent to Bahman Nasseroleslami at nasserob at tcd.ie To apply, please follow the instructions in "Application Procedure" (i.e. submit the application by email to Mr Mark Heverin). It would be really appreciated if you could share this with those that may be interested. Sincerely Bahman –––––––––––– Bahman Nasseroleslami, PhD Senior Research Fellow Academic Unit of Neurology, School of Medicine Trinity College Dublin, the University of Dublin Dublin, Ireland. Room 5.43, Trinity Biomedical Sciences Institute 152-160 Pearse Street, Dublin D02 R590, Ireland. nasserob at tcd.ie www.tcd.ie/medicine/staff/nasserob/ –––––––––––– -------------- next part -------------- An HTML attachment was scrubbed... URL: From martabortoletto at yahoo.it Mon Jan 7 16:21:46 2019 From: martabortoletto at yahoo.it (Marta Bortoletto) Date: Mon, 7 Jan 2019 15:21:46 +0000 (UTC) Subject: [FieldTrip] Post-doc position available References: <1473313532.15676384.1546874506091.ref@mail.yahoo.com> Message-ID: <1473313532.15676384.1546874506091@mail.yahoo.com> Dears, We are a looking for a Post-doc candidateinterested in exploring the brain mechanisms underlying motor planning and jointactions in a project with TMS and TMS-EEG coregistration. The position is openat the IRCCS Centro San Giovanni di Dio Fatebenefratelli (Brescia, Italy), in theCognitive Neuroscience Unit led by Prof. Carlo Miniussi. The project is fundedby BIAL foundation and led by Marta Bortoletto in close collaboration with prof.Corrado Sinigaglia of the University of Study of Milan. The position will remain open until March2019 or until the appropriate candidates are identified, and is funded for 18months.   Applicants should have:  ·     A background and a PhD degree ina neuroscience-related field ·     Substantial experience in TMS-EEGor EEG research ·     Skills with analysis softwaresconcerning evoked potentials and EEG signals (e.g. EEGlab, Fieldtrip) ·     Ability to code in Matlab, Pythonor R ·     Good command of the Englishlanguage (written and oral) ·     Skills for teamwork in amultidisciplinary research group   Experience with advanced EEG signalprocessing, EEG source localization, connectivity analyses and a strongpublication record are an advantage.     Whatwe offer   ·     Gross salary: 23.000-27.000euro per annum ·     Excellent working environment ·     Opportunity to work in amotivated, skilled, inspired and supportive group ·     A chance to work in Italy – oneof the most beautiful countries in the world     Forfurther information please contact   Marta Bortoletto IRCCS Centro San Giovannidi Dio Fatebenefratelli marta.bortoletto at cognitiveneuroscience.it     Toapply, please send the following items, as ONE PDF FILE and via email to Dr. MartaBortoletto (marta.bortoletto at cognitiveneuroscience.it).   ·     A letter of intent including abrief description of your past and current research interests ·     Curriculum vitae including the listof your publication and degrees ·     Names and contact informationof 2 referees.       Aboutthe employer   The IRCCS San Giovanni di DioFatebenefratelli is operating since 120 years and has been appointed and fundedas national centre of excellence in research and care by the Italian Ministryof Health since 1996. More than 4500 patients with Alzheimer’s Dementia orassociated disorders and about 1700 patients with psychiatric diseases aretreated each year. The research division, besides the Cognitive NeuroscienceSection, includes the laboratories of Genetics, Neuropsychopharmacology,Neurobiology, Proteomic, Neuroimaging, Ethic and Epidemiology and employs aboutfifty professional researchers. The Cognitive Neuroscience Unit is providedwith several state-of-the-art devices necessary for the application of brainstimulation techniques (transcranial magnetic stimulation: TMS, rTMS, andtranscranial electrical stimulation: tDCS, tACS and tRNS) and for the recordingand the analysis of electrophysiological signals (EEG, EMG) as well asneuropsychological testing. The simultaneous co-registration ofelectroencephalography and TMS application is also available, field where wehave been pioneers in the national research. Marta Bortoletto, PhD Cognitive Neuroscience Section, IRCCS Centro San Giovanni di Dio Fatebenefratelli Via Pilastroni 4, 25125 Brescia, Italy Phone number: (+39) 0303501594 E-mail: marta.bortoletto at cognitiveneuroscience.it web: http://www.cognitiveneuroscience.it/ -------------- next part -------------- An HTML attachment was scrubbed... URL: From agnese.zazio at hotmail.it Mon Jan 7 16:41:12 2019 From: agnese.zazio at hotmail.it (Agnese Zazio) Date: Mon, 7 Jan 2019 15:41:12 +0000 Subject: [FieldTrip] Source analysis for grand averaged-TMS-evoked potentials Message-ID: Dear Fieldtrip Community, my name is Agnese Zazio and I would be grateful if you could help me with source analysis of TMS-EEG data. Specifically, I am interested in source reconstruction of TMS-evoked potentials. To this am, I used the minimum-norm estimation following the Fieldtrip tutorial for source reconstruction of MEG event-related fields (http://www.fieldtriptoolbox.org/tutorial/minimumnormestimate/). I don't have individual MRIs, thus I am using templates for the headmodel and the sourcemodel. Importantly, I am working on the the grand average at the group level. Here's the code I used. --- % create a preprocessed structure cfg =[]; cfg.channel = {'EEG'}; cfg.demean = 'yes'; cfg.baselinewindow = [-0.01 0]; data_prepr = ft_preprocessing(cfg, data); cfg =[]; cfg.covariance = 'yes'; cfg.channel ={'EEG'}; cfg.covariancewindow = [0 0.4]; data_tlck = ft_timelockanalysis (cfg, data_prepr); % forward solution [prepare leadfield] cfg = []; cfg.elec = elec; cfg.channel = {'EEG'}; cfg.headmodel = vol; % volume conduction model cfg.grid = ft_read_headshape('cortex_5124.surf.gii'); cfg.grid.pos = sourcespace.pos; cfg.grid.inside = 1:size(sourcespace.pos,1); % all source points are inside of the brain leadfield = ft_prepare_leadfield(cfg); % inverse solution (method: mne) cfg = []; cfg.method = 'mne'; %'lcmv'; cfg.elec = elec; cfg.channel = {'EEG'}; cfg.grid = leadfield; cfg.headmodel = vol; cfg.mne.prewhiten = 'yes'; cfg.mne.lambda = 3; cfg.mne.scalesourcecov = 'yes'; source_bial_mne = ft_sourceanalysis(cfg, data_tlck); %%plot bnd.pos = sourcespace.pos; bnd.tri = sourcespace.tri; m=source_bial_mne.avg.pow(:,124); % point in time I want to plot figure; ft_plot_mesh(bnd, 'vertexcolor', m); --- I have two main questions: First, is this approach correct to get sources for TMS-evoked potentials starting from the grandaverage? Second, is it possible to use the same code but applying the beamformer method (lcmv) in "ft_sourceanalysis"? I have simply replaced the cfg.method field, but the output I get does not contain information about time. Thanks in advance for your help. Best, Agnese Agnese Zazio, PhD Student Cognitive Neuroscience Section, IRCCS Saint John of God Clinical Research Centre Via Pilastroni 4, 25125 Brescia, Italy Site: http://www.cognitiveneuroscience.it -------------- next part -------------- An HTML attachment was scrubbed... URL: From elene.beitia at alumni.mondragon.edu Mon Jan 7 18:21:22 2019 From: elene.beitia at alumni.mondragon.edu (Elene Beitia Loinaz) Date: Mon, 7 Jan 2019 18:21:22 +0100 Subject: [FieldTrip] EEG RESTING STATE SOURCE RECONSTRUCTION Message-ID: Dear Fieldtrip Community, My name is Elene Beitia, I am a student from the Basque Country. I am trying to use the fieltrip toolbox to do a source reconstruction of EEG`s in Resting State. I am having troubles in doing the fourier transform. The input data that I am using is in 'ms' and the error that I get is the next one: Error using ft_checkdata (line 525) This function requires 'raw', 'raw+comp' or 'mvar' data as input, see ft_datatype_raw or ft_datatype_mvar. Error in ft_freqanalysis (line 212) data = ft_checkdata(data, 'datatype', {'raw', 'raw+comp', 'mvar'}, 'feedback', cfg.feedback, 'hassampleinfo', 'yes'); I have change the parameters to see if the problem was there but I still get the same. I add the code in this message: %%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %% FOURIER TRANSFORMS cfg = []; cfg.dataset = filename; cfg.datatype ='mvar'; cfg.continuous ='yes'; cfg.output = 'fourier'; cfg.channelcmb = 'all'; cfg.channel = 'all'; cfg.trials = 'all'; cfg.keeptrials = 'yes'; cfg.keeptapers = 'yes'; cfg.method = 'mtmfft'; cfg.taper = 'hanning'; cfg.toi = [-1 : 0.10 : 1.5]; cfg.foi = 1:40; cfg.t_ftimwin = ones(size(cfg.foi)) * 0.5; cfg.pad ='nextpow2'; cfg.feedback = 'no'; %cfg.hassampleinfo= 'yes'; data_Fourier = ft_freqanalysis(cfg); %%%%%%%%%%%%%%%%%%%%%%%%%%%%%% Hope you can give me some information in order to solve the problem, Thank you in advanced, Elene. -------------- next part -------------- An HTML attachment was scrubbed... URL: From jan.schoffelen at donders.ru.nl Tue Jan 8 09:00:48 2019 From: jan.schoffelen at donders.ru.nl (Schoffelen, J.M. (Jan Mathijs)) Date: Tue, 8 Jan 2019 08:00:48 +0000 Subject: [FieldTrip] EEG RESTING STATE SOURCE RECONSTRUCTION In-Reply-To: References: Message-ID: Hi Elena, Just like almost all high level fieldtrip functions, ft_freqanalysis requires both a ‘cfg’ variable, and a ‘data’ variable in its input. In your code you only use cfg. Best wishes, Jan-Mathijs J.M.Schoffelen, MD PhD Senior Researcher, VIDI-fellow - PI, language in interaction Telephone: +31-24-3614793 Physical location: room 00.028 Donders Centre for Cognitive Neuroimaging, Nijmegen, The Netherlands On 7 Jan 2019, at 18:21, Elene Beitia Loinaz > wrote: Dear Fieldtrip Community, My name is Elene Beitia, I am a student from the Basque Country. I am trying to use the fieltrip toolbox to do a source reconstruction of EEG`s in Resting State. I am having troubles in doing the fourier transform. The input data that I am using is in 'ms' and the error that I get is the next one: Error using ft_checkdata (line 525) This function requires 'raw', 'raw+comp' or 'mvar' data as input, see ft_datatype_raw or ft_datatype_mvar. Error in ft_freqanalysis (line 212) data = ft_checkdata(data, 'datatype', {'raw', 'raw+comp', 'mvar'}, 'feedback', cfg.feedback, 'hassampleinfo', 'yes'); I have change the parameters to see if the problem was there but I still get the same. I add the code in this message: %%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %% FOURIER TRANSFORMS cfg = []; cfg.dataset = filename; cfg.datatype ='mvar'; cfg.continuous ='yes'; cfg.output = 'fourier'; cfg.channelcmb = 'all'; cfg.channel = 'all'; cfg.trials = 'all'; cfg.keeptrials = 'yes'; cfg.keeptapers = 'yes'; cfg.method = 'mtmfft'; cfg.taper = 'hanning'; cfg.toi = [-1 : 0.10 : 1.5]; cfg.foi = 1:40; cfg.t_ftimwin = ones(size(cfg.foi)) * 0.5; cfg.pad ='nextpow2'; cfg.feedback = 'no'; %cfg.hassampleinfo= 'yes'; data_Fourier = ft_freqanalysis(cfg); %%%%%%%%%%%%%%%%%%%%%%%%%%%%%% Hope you can give me some information in order to solve the problem, Thank you in advanced, Elene. _______________________________________________ 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 elene.beitia at alumni.mondragon.edu Tue Jan 8 09:12:57 2019 From: elene.beitia at alumni.mondragon.edu (Elene Beitia Loinaz) Date: Tue, 8 Jan 2019 09:12:57 +0100 Subject: [FieldTrip] EEG RESTING STATE SOURCE RECONSTRUCTION In-Reply-To: References: Message-ID: Hi Jan, Thank you for your answer. It has been really helpful. Elene. Hau idatzi du Schoffelen, J.M. (Jan Mathijs) (jan.schoffelen at donders.ru.nl) erabiltzaileak (2019 urt. 8, ar. (09:00)): > Hi Elena, > > Just like almost all high level fieldtrip functions, ft_freqanalysis > requires both a ‘cfg’ variable, and a ‘data’ variable in its input. In your > code you only use cfg. > > Best wishes, > Jan-Mathijs > > > J.M.Schoffelen, MD PhD > Senior Researcher, VIDI-fellow - PI, language in interaction > Telephone: +31-24-3614793 > Physical location: room 00.028 > Donders Centre for Cognitive Neuroimaging, Nijmegen, The Netherlands > > > > On 7 Jan 2019, at 18:21, Elene Beitia Loinaz < > elene.beitia at alumni.mondragon.edu> wrote: > > Dear Fieldtrip Community, > > My name is Elene Beitia, I am a student from the Basque Country. I am > trying to use the fieltrip toolbox to do a source reconstruction of EEG`s > in Resting State. > > I am having troubles in doing the fourier transform. The input data that > I am using is in 'ms' and the error that I get is the next one: > > Error using ft_checkdata (line 525) > This function requires 'raw', 'raw+comp' or 'mvar' data as input, see > ft_datatype_raw or ft_datatype_mvar. > > Error in ft_freqanalysis (line 212) > data = ft_checkdata(data, 'datatype', {'raw', 'raw+comp', 'mvar'}, > 'feedback', cfg.feedback, 'hassampleinfo', 'yes'); > > I have change the parameters to see if the problem was there but I still > get the same. > > I add the code in this message: > > %%%%%%%%%%%%%%%%%%%%%%%%%%%%%% > > %% FOURIER TRANSFORMS > > cfg = []; > cfg.dataset = filename; > cfg.datatype ='mvar'; > cfg.continuous ='yes'; > cfg.output = 'fourier'; > cfg.channelcmb = 'all'; > cfg.channel = 'all'; > cfg.trials = 'all'; > cfg.keeptrials = 'yes'; > cfg.keeptapers = 'yes'; > cfg.method = 'mtmfft'; > cfg.taper = 'hanning'; > cfg.toi = [-1 : 0.10 : 1.5]; > cfg.foi = 1:40; > cfg.t_ftimwin = ones(size(cfg.foi)) * 0.5; > cfg.pad ='nextpow2'; > cfg.feedback = 'no'; > %cfg.hassampleinfo= 'yes'; > > data_Fourier = ft_freqanalysis(cfg); > > %%%%%%%%%%%%%%%%%%%%%%%%%%%%%% > > Hope you can give me some information in order to solve the problem, > > Thank you in advanced, > > Elene. > > > > > > > > > _______________________________________________ > 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 joerg.hipp at googlemail.com Tue Jan 8 10:13:48 2019 From: joerg.hipp at googlemail.com (Joerg Hipp) Date: Tue, 8 Jan 2019 10:13:48 +0100 Subject: [FieldTrip] Biomarker and Experimental Medicine Leader in Neuroscience at Roche in Basel, Switzerland Message-ID: Dear all, We are offering a position as a Biomarker and Experimental Medicine Leader in Neuroscience at Roche in Basel, Switzerland. The position is based in the Biomarker and Translational Technology (BTT) group of the Neuroscience, Ophthalmology, and Rare Diseases (NORD) department in Roche Pharma Research and Early Development (pRED) in Basel, Switzerland. The BTT group utilizes the most advanced methods (including digital biomarkers, imaging (MRI and PET), EEG, fluid biomarkers, genetics and cognitive testing) and analytical approaches to support scientific decision-making in drug development. Roche has one of the largest and most exciting neuroscience portfolios ranging from programs in neurodevelopmental (e.g. ASD) and neuropsychiatric (e.g. Schizophrenia) to neurodegenerative disorders (e.g. AD, PD, MS) and including rare genetic disorders (e.g. Angelman Syndrome, Huntington's disease, SMA). We are looking for a highly motivated, creative, collaborative and innovative standout colleague with very strong quantitative and methodological skills, and a deep understanding of neuroscience, preferable with experience working in neuropsychiatric or neurological disorders. Details on the position can be found here: https://roche.wd3.myworkdayjobs.com/roche-ext/job/Basel-Headquarter/Biomarker-and-Experimental-Medicine-Leader-in-Neuroscience--Temporary-for-2-years-_201811-128841-1 Best wishes, Joerg -- Joerg Hipp, PhD Biomarker and Experimental Medicine Leader Group Leader: Electrophysiology and Analytics Biomarker and Translational Technology Group Pharma Research and Early Development (pRED) F. Hoffmann-La Roche Ltd. Grenzacherstrasse 124 4070 Basel, Switzerland Email: joerg.hipp at roche.com https://scholar.google.ch/citations?user=oxsJ6q4AAAAJ&hl=en -------------- next part -------------- An HTML attachment was scrubbed... URL: From r.oostenveld at donders.ru.nl Tue Jan 8 11:06:38 2019 From: r.oostenveld at donders.ru.nl (Robert Oostenveld) Date: Tue, 8 Jan 2019 11:06:38 +0100 Subject: [FieldTrip] questions In-Reply-To: References: <26BC20C23720E94A9FF826794B6D0CCE0100422E5E@PVTH-EXMBX11.cnmc.org> <252EB8AF-77EE-4336-8345-E463D50E9A42@childrensnational.org> Message-ID: <9A29530A-2183-4D24-B5CD-13BBAACE434E@donders.ru.nl> Hi Rathinaswamy > I have MRIs in DICOM format. I followed the instructions in the tutorial > which are as follows: > > f1=’/Volumes/FDATA_1/HACO_Project/CT_MRI T1 SPGR/ARS_MRI_T1 SPGR/1.2.840.113619.2.353.4120.14262029.13982.1485259768.788.dcm’; > > > mri = ft_read_mri(f1); > > > This threw the following error message. > ERROR: /Volumes/FDATA_1/HACO_Project/CT_MRI T1 SPGR/ARS_MRI_T1 > SPGR/1.2.840.113619.2.353.4120.14262029.13982.1485259768.788.dcm does not have a series number > Output argument "vol" (and maybe others) not assigned during call > to "load_dicom_series." > > Error in ft_read_mri (line 300) > [img,transform,hdr,mr_params] = > load_dicom_series(dcmdir,dcmdir,filename); This error happens in fieldtrip/external/freesurfer/load_dicom_series.m. The series number is used to determine from the (usually long list of) dicom files which ones belong together. You could try mri = ft_read_mri(filename, ‘dataformat’, ‘dicom_old’) which uses another low-level reading function. Please look at the code in ft_read_mri, around line 302. Alternatively, you may be able to use an external tool such as dcm2niix to convert the dicom to nifti. best regards, Robert From sherrykhan78 at gmail.com Tue Jan 8 14:04:55 2019 From: sherrykhan78 at gmail.com (Sheraz Khan) Date: Tue, 8 Jan 2019 08:04:55 -0500 Subject: [FieldTrip] MNE Postdoc opportunities @ Harvard Medical School & Massachusetts General Hospital Message-ID: On behalf of Dr. Matti Hämäläinen (msh at nmr.mgh.harvard.edu) [Apologies for cross posting] ---------------------------------------------------------------------------------------------- The academic MEG/EEG software packages are becoming more and more important to the field as new new sensor technologies are being applied and new commercial MEG systems are becoming available. We welcome new young scientists to become part of this endeavor! With best regards, Matti ---------------------------------------------------------------------------------------------- There are two postdoctoral positions available in the MNE projects at: Athinoula A. Martinos Center for Biomedical Massachusetts General Hospital and Harvard Medical School *Position 1: Postdoctoral Research Fellow (MNE-Python)* *Overview:* Applications are invited for a Postdoctoral Research Fellow available at the Massachusetts General Hospital Athinoula A. Martinos Center for Biomedical Imaging (www.nmr.mgh.harvard.edu). The postdoctoral fellow will also be affiliated with Harvard Medical School. We are using electrophysiological recordings in combination with anatomical and functional MRI to understand the functions of the healthy brain and how they are altered in neurological and psychiatric diseases. We capitalize on the insights from our basic and clinical research to develop new methods and tools to be applied in clinical practice. *Responsibilities:* The postdoc will work in an NIH-funded project whose overall aim is to provide well-documented and tested novel analysis software to promote both basic neuroscience and clinical research applications using MEG and EEG. In particular, during the past eight years we have developed, with NIH support, the MNE-Python software http://www.- martinos.org/mne/, which covers multiple methods of data preprocessing, source localization, statistical analysis, and estimation of functional connectivity between distributed brain regions. In this new project we will extend our software to meet the needs of a growing user base and reflect recent developments in the MEG/EEG field. Requirements: Candidates should have a Doctoral degree in biomedical engineering, computer science or related fields. Strong Python programming skills are required and background and experience in acquiring and analyzing MEG/EEG data are highly desirable. Candidates need to be able to work in a modern software development environment and be familiar with controlled software development processes. A successful candidate is able to work in a dynamic, international, and collaborative work environment. He/She will gain experience in recording and analyzing electrophysiological data, working with state-of-the-art brain mapping technologies as well as engaging in top-level research. Familiarity with MEG/EEG and MRI analysis software packages, in particular MNE-Python and FreeSurfer is highly beneficial. ---------------------------------------------------------------------------------------------- *Position 2: Postdoctoral Research Fellow (MNE-Scan)* *Overview:* Applications are invited for a postdoctoral position available at the Massachusetts General Hospital Athinoula A. Martinos Center for Biomedical Imaging (http://www.nmr.mgh.harvard.edu). The postdoctoral fellow will also be affiliated with Harvard Medical School. Our MEG/EEG laboratory is using electrophysiological recordings in combination with anatomical and functional MRI to understand the functions of the healthy brain and how they are altered in neurological and psychiatric diseases. Our ultimate goal is to capitalize on the insights from our basic and clinical research to develop new methods and tools to be applied in clinical practice. *Responsibilities:* The Postdoctoral fellow will work in an NIH-funded project which aim is to develop a device-independent and real-time capable software (MNE Scan). MNE Scan is based on the MNE-CPP framework ( www.mne-cpp.org) and will significantly increase the ease and efficiency of acquiring, monitoring, analyzing, and integrating electroencephalography (EEG), magnetoencephalography (MEG), electrocorticography (ECoG), and stereotactic EEG (SEEG) data. The MNE Scan software will format incoming electrographic data from any recording device for EEG, ECoG, SEEG, and MEG, store the data, carry out preprocessing for noise reduction and signal conditioning, display the incoming data in real time, and carry out the data analysis at the level of active tissues instead of the sensor level. Its realtime capability will provide immediate feedback to clinicians, enabling them to use this information for improving diagnosis and surgical management of epilepsy. Furthermore, MNE Scan will be used during neurofeedback experiments, including brain state dependent stimulation. The Postdoctoral fellow will work with other members of the investigative team to identify and develop new scientific use cases and research questions for the MNE Scan software described above. He will also work together with other investigators in the team to enhance source estimation and connectivity estimation methods to work efficiently in the real-time environment. *Requirements:* The successful candidate must hold a Ph.D. degree in biomedical engineering, computer science, or related fields. A successful candidate will benefit from working in a dynamic, international, and collaborative supportive work environment. He/She will gain experience in recording and analyzing electrophysiological data, working with state-of-the-art brain mapping technologies as well as engaging in top-level research. Previous experience in acquiring and analyzing MEG/EEG data is a strength. Strong C++ programming skills and experience in the Qt toolkit are highly desirable. It is preferred that the candidate has familiarity with MEG/EEG and MRI analysis software packages, in particular MNE and FreeSurfer. ---------------------------------------------------------------------------------------------- Welcome to the MNE Family! Massachusetts General Hospital is an equal opportunity employer. Full-time employees receive full benefits, competitive salaries, and excellent resources for career development. ********************************************************** *Contact: Matti Hämäläinen * *msh at nmr.mgh.harvard.edu * *Athinoula A. Martinos Center for Biomedical* *Massachusetts General Hospital and Harvard Medical School* *Boston, MA, USA* ********************************************************** -------------- next part -------------- An HTML attachment was scrubbed... URL: From sherrykhan78 at gmail.com Tue Jan 8 14:05:05 2019 From: sherrykhan78 at gmail.com (Sheraz Khan) Date: Tue, 8 Jan 2019 08:05:05 -0500 Subject: [FieldTrip] MNE Postdoc opportunities @ Harvard Medical School & Massachusetts General Hospital Message-ID: On behalf of Dr. Matti Hämäläinen (msh at nmr.mgh.harvard.edu) [Apologies for cross posting] ---------------------------------------------------------------------------------------------- The academic MEG/EEG software packages are becoming more and more important to the field as new new sensor technologies are being applied and new commercial MEG systems are becoming available. We welcome new young scientists to become part of this endeavor! With best regards, Matti ---------------------------------------------------------------------------------------------- There are two postdoctoral positions available in the MNE projects at: Athinoula A. Martinos Center for Biomedical Massachusetts General Hospital and Harvard Medical School *Position 1: Postdoctoral Research Fellow (MNE-Python)* *Overview:* Applications are invited for a Postdoctoral Research Fellow available at the Massachusetts General Hospital Athinoula A. Martinos Center for Biomedical Imaging (www.nmr.mgh.harvard.edu). The postdoctoral fellow will also be affiliated with Harvard Medical School. We are using electrophysiological recordings in combination with anatomical and functional MRI to understand the functions of the healthy brain and how they are altered in neurological and psychiatric diseases. We capitalize on the insights from our basic and clinical research to develop new methods and tools to be applied in clinical practice. *Responsibilities:* The postdoc will work in an NIH-funded project whose overall aim is to provide well-documented and tested novel analysis software to promote both basic neuroscience and clinical research applications using MEG and EEG. In particular, during the past eight years we have developed, with NIH support, the MNE-Python software http://www.- martinos.org/mne/, which covers multiple methods of data preprocessing, source localization, statistical analysis, and estimation of functional connectivity between distributed brain regions. In this new project we will extend our software to meet the needs of a growing user base and reflect recent developments in the MEG/EEG field. Requirements: Candidates should have a Doctoral degree in biomedical engineering, computer science or related fields. Strong Python programming skills are required and background and experience in acquiring and analyzing MEG/EEG data are highly desirable. Candidates need to be able to work in a modern software development environment and be familiar with controlled software development processes. A successful candidate is able to work in a dynamic, international, and collaborative work environment. He/She will gain experience in recording and analyzing electrophysiological data, working with state-of-the-art brain mapping technologies as well as engaging in top-level research. Familiarity with MEG/EEG and MRI analysis software packages, in particular MNE-Python and FreeSurfer is highly beneficial. ---------------------------------------------------------------------------------------------- *Position 2: Postdoctoral Research Fellow (MNE-Scan)* *Overview:* Applications are invited for a postdoctoral position available at the Massachusetts General Hospital Athinoula A. Martinos Center for Biomedical Imaging (http://www.nmr.mgh.harvard.edu). The postdoctoral fellow will also be affiliated with Harvard Medical School. Our MEG/EEG laboratory is using electrophysiological recordings in combination with anatomical and functional MRI to understand the functions of the healthy brain and how they are altered in neurological and psychiatric diseases. Our ultimate goal is to capitalize on the insights from our basic and clinical research to develop new methods and tools to be applied in clinical practice. *Responsibilities:* The Postdoctoral fellow will work in an NIH-funded project which aim is to develop a device-independent and real-time capable software (MNE Scan). MNE Scan is based on the MNE-CPP framework ( www.mne-cpp.org) and will significantly increase the ease and efficiency of acquiring, monitoring, analyzing, and integrating electroencephalography (EEG), magnetoencephalography (MEG), electrocorticography (ECoG), and stereotactic EEG (SEEG) data. The MNE Scan software will format incoming electrographic data from any recording device for EEG, ECoG, SEEG, and MEG, store the data, carry out preprocessing for noise reduction and signal conditioning, display the incoming data in real time, and carry out the data analysis at the level of active tissues instead of the sensor level. Its realtime capability will provide immediate feedback to clinicians, enabling them to use this information for improving diagnosis and surgical management of epilepsy. Furthermore, MNE Scan will be used during neurofeedback experiments, including brain state dependent stimulation. The Postdoctoral fellow will work with other members of the investigative team to identify and develop new scientific use cases and research questions for the MNE Scan software described above. He will also work together with other investigators in the team to enhance source estimation and connectivity estimation methods to work efficiently in the real-time environment. *Requirements:* The successful candidate must hold a Ph.D. degree in biomedical engineering, computer science, or related fields. A successful candidate will benefit from working in a dynamic, international, and collaborative supportive work environment. He/She will gain experience in recording and analyzing electrophysiological data, working with state-of-the-art brain mapping technologies as well as engaging in top-level research. Previous experience in acquiring and analyzing MEG/EEG data is a strength. Strong C++ programming skills and experience in the Qt toolkit are highly desirable. It is preferred that the candidate has familiarity with MEG/EEG and MRI analysis software packages, in particular MNE and FreeSurfer. ---------------------------------------------------------------------------------------------- Welcome to the MNE Family! Massachusetts General Hospital is an equal opportunity employer. Full-time employees receive full benefits, competitive salaries, and excellent resources for career development. ********************************************************** *Contact: Matti Hämäläinen * *msh at nmr.mgh.harvard.edu * *Athinoula A. Martinos Center for Biomedical* *Massachusetts General Hospital and Harvard Medical School* *Boston, MA, USA* ********************************************************** -------------- next part -------------- An HTML attachment was scrubbed... URL: From elene.beitia at alumni.mondragon.edu Tue Jan 8 17:58:44 2019 From: elene.beitia at alumni.mondragon.edu (Elene Beitia Loinaz) Date: Tue, 8 Jan 2019 17:58:44 +0100 Subject: [FieldTrip] =?utf-8?q?=28no_subject=29?= Message-ID: Dear all, I am trying to create a .lay to perform a ft_multiplotTFR. The information that we have is in .locs, we achieve to convert the data to struct but the ft_multiplotTFR function needs a .mat or .lay. (we have try to achieve this using struct2cell and cell2mat) Does someone know how to convert a .locs to .mat or .lay? And do you know if it is posible to use ft_multiplotTFR for EEG`s?, because in the examples that we have found it is only used with MEG. If it is not posible, do you know if there is another function to obtain the same result? Thank you in advanced, Elene. -------------- next part -------------- An HTML attachment was scrubbed... URL: From stephen.whitmarsh at gmail.com Tue Jan 8 18:45:15 2019 From: stephen.whitmarsh at gmail.com (Stephen Whitmarsh) Date: Tue, 8 Jan 2019 18:45:15 +0100 Subject: [FieldTrip] (no subject) In-Reply-To: References: Message-ID: Dear Elene, Have you looked at this: http://www.fieldtriptoolbox.org/tutorial/layout/ ? And to you second question, absolutely. It's just a matter of convenience that the examples are for MEG mainly. But see e.g.: http://www.fieldtriptoolbox.org/workshop/natmeg/ Cheers, Stephen On Tue, 8 Jan 2019 at 18:32, Elene Beitia Loinaz < elene.beitia at alumni.mondragon.edu> wrote: > Dear all, > > I am trying to create a .lay to perform a ft_multiplotTFR. > > The information that we have is in .locs, we achieve to convert the data > to struct but the ft_multiplotTFR function needs a .mat or .lay. (we have > try to achieve this using struct2cell and cell2mat) > > Does someone know how to convert a .locs to .mat or .lay? > > And do you know if it is posible to use ft_multiplotTFR for EEG`s?, > because in the examples that we have found it is only used with MEG. If it > is not posible, do you know if there is another function to obtain the same > result? > > Thank you in advanced, > > Elene. > _______________________________________________ > 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 RICHARDS at mailbox.sc.edu Tue Jan 8 20:23:47 2019 From: RICHARDS at mailbox.sc.edu (RICHARDS, JOHN) Date: Tue, 8 Jan 2019 19:23:47 +0000 Subject: [FieldTrip] Postdoc position In-Reply-To: References: Message-ID: John Richards in the Department of Psychology at the University of South Carolina is seeking a qualified PhD for a postdoctoral position. The position involves research on the development of infant attention. The laboratory uses psychophysiological methods (heart rate, EEG, ERP) and MRI (structural) to examine the brain bases of the development of infant attention and recognition memory (http://jerlab.sc.edu). The position would be to further develop the “Neurodevelopmental MRI Database”, work on analysis writeup of existing projects examining tools for cortical source analysis in infants, and analysis of current datasets on infant attention and brain development. The ideal candidate would have background neuroimaging such as EEG/ERP, structural MRI or fMRI, programming experience (MATLAB, FSL, EEGLab/ERPLab) and interests/background in infant cognition, perception, or attention. We also do some work on multimodal neuroimaging in adults (sMRI, dMRI, fMRI, EEG/ERP) and the candidate could either have relevant experience, or participate in these studies. Writing experience and a publication record is required; and extensive writing and publication will be expected. At the candidate’s interest, teaching experiences are available. The position is initially funded for one year, and subsequent years will be available depending on funding. The position is available now and candidates could start immediately. The salary is set at NIH standards accounting for years of postdoctoral experience. The position could be extended to a “Research Assistant Professor” for a qualified candidate with a supplement source of support. Review of applications will begin immediately and continue until the position is filled. Please send a letter of application, curriculum vitae, 1-2 writing samples, and the names and contact information of three references to richards-john at sc.edu, John E. Richards, Department of Psychology, University of South Carolina, Columbia SC 29208. *********************************************** John E. Richards Carolina Distinguished Professor Department of Psychology University of South Carolina Columbia, SC 29208 Dept Phone: 803 777 2079 Fax: 803 777 9558 Email: richards-john at sc.edu https://jerlab.sc.edu ************************************************* -------------- next part -------------- An HTML attachment was scrubbed... URL: From xusihua80 at 163.com Wed Jan 9 12:18:14 2019 From: xusihua80 at 163.com (xusihua) Date: Wed, 9 Jan 2019 19:18:14 +0800 (CST) Subject: [FieldTrip] Fw:Is there someone that has ANT neuro eego 32 channels fieldtrip layout file? Message-ID: <3eae9a3a.de0a.16832558eb5.Coremail.xusihua80@163.com> Hi everyone Is there someone that has ANT neuro eego 32 channels fieldtrip layout file or can someone help me to find out how to create a layout file? Best wishes! -- Sihua Xu, PhD Postdoc Center for Functional Neuroimaging (cfn.upenn.edu) Perelman School of Medicine University of Pennsylvania Philadelphia, PA, 19104, USA -------------- next part -------------- An HTML attachment was scrubbed... URL: From xusihua80 at 163.com Thu Jan 10 01:30:48 2019 From: xusihua80 at 163.com (xusihua) Date: Thu, 10 Jan 2019 08:30:48 +0800 (CST) Subject: [FieldTrip] Fw:Is there someone that has ANT neuro eego 32 channels fieldtrip layout file? Message-ID: <63861b2.1fd3.168352b2cad.Coremail.xusihua80@163.com> Hi everyone Is there someone that has ANT neuro eego 32 channels fieldtrip layout file or can someone help me to find out how to create a layout file? Best wishes! -- Sihua Xu, PhD Postdoc Center for Functional Neuroimaging (cfn.upenn.edu) Perelman School of Medicine University of Pennsylvania Philadelphia, PA, 19104, USA -------------- next part -------------- An HTML attachment was scrubbed... URL: From popwatson at hotmail.com Thu Jan 10 05:57:24 2019 From: popwatson at hotmail.com (Poppy Watson) Date: Thu, 10 Jan 2019 04:57:24 +0000 Subject: [FieldTrip] time frequency data looks blocky and stripy rather than smooth and swirly Message-ID: Dear fieldtrippers, I'm replicating a study that used fieldtrip for TF analysis (and has some lovely single electrode TF plots for each experimental condition). I've been running ft_freqanalysis using the following settings. cfg = []; cfg.trials = trialsToUse; % this is a vector of trial numbers cfg.method = 'mtmconvol'; cfg.output = 'pow'; cfg.channel = 'eeg'; cfg.taper = 'hanning'; cfg.foi = 2:2:30; %cfg.t_ftimwin = 4 ./ cfg.foi; cfg.t_ftimwin = ones(length(cfg.foi),1).*0.5; cfg.toi = -1.25:0.10:0.25; % 100 ms sliding time window The output and stats etc seem to all make sense but my concern is that when I plot the data e.g. from one electrode (collapsed across the whole pp group)- I don't get beautiful fuzzy TF graphs - instead I get very blocky/stripy figures like the attached where there doesn't seem to be any smoothing/bleeding across different frequencies. I've tried playing around with the cfg.foi as well as the length of the time window and sliding window (cfg.t_ftimwin and cfg.toi) but the results always look very blocky rather than all warm and fuzzy (i.e. as seen in raw-TFdata-of-single-electrode images in various publications). Am I missing some smoothing parameters?? This is my singleplot_TFR code: cfg = [ ] ; cfg.channel = 'FCz'; cfg.xlim = [-1 0]; %before stimulus appears cfg.ylim = [2 20]; % [8 12] only alpha cfg.zlim = [0 15]; cfg.maskstyle = 'saturation'; cfg.masknans = 'yes'; ft_singleplotTFR(cfg, allPPdata_suc_collapsed_high); Many Thanks P. Watson -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: example.png Type: image/png Size: 11648 bytes Desc: example.png URL: From stephen.whitmarsh at gmail.com Thu Jan 10 07:35:30 2019 From: stephen.whitmarsh at gmail.com (Stephen Whitmarsh) Date: Thu, 10 Jan 2019 07:35:30 +0100 Subject: [FieldTrip] time frequency data looks blocky and stripy rather than smooth and swirly In-Reply-To: References: Message-ID: Dear P., I suspect this is because: 1) you are using half a second for your sliding time-window, which is reasonable, but only have 1.5 seconds of data, of which you plot only one. This doesn't give much room for 'fuzzyness' in the sense of changes over time. 2) because you are not baseline correcting the results, you will mosly see 1/f power, i.e. more power in the lower frequency bands, which will be relatively stronger than any changes over time. To solve this: 1) calculate the TFR over a longer time-window, both before and after stimulation onset. 2) use a relative baseline correction That should hopefully give you the fuzzyness you want. Cheers, Stephen On Thu, 10 Jan 2019 at 06:14, Poppy Watson wrote: > Dear fieldtrippers, > > > > I’m replicating a study that used fieldtrip for TF analysis (and has some > lovely single electrode TF plots for each experimental condition). I’ve > been running ft_freqanalysis using the following settings. > > > > cfg = []; > > cfg.trials = trialsToUse; % this is a vector of trial numbers > > cfg.method = 'mtmconvol'; > > cfg.output = 'pow'; > > cfg.channel = 'eeg'; > > cfg.taper = 'hanning'; > > cfg.foi = 2:2:30; > > %cfg.t_ftimwin = 4 ./ cfg.foi; > > cfg.t_ftimwin = ones(length(cfg.foi),1).*0.5; > > cfg.toi = -1.25:0.10:0.25; % 100 ms sliding time window > > > > The output and stats etc seem to all make sense but my concern is that > when I plot the data e.g. from one electrode (collapsed across the whole pp > group)– I don’t get beautiful fuzzy TF graphs – instead I get very > blocky/stripy figures like the attached where there doesn’t seem to be any > smoothing/bleeding across different frequencies. I’ve tried playing around > with the cfg.foi as well as the length of the time window and sliding > window (cfg.t_ftimwin and cfg.toi) but the results always look very blocky > rather than all warm and fuzzy (i.e. as seen in > raw-TFdata-of-single-electrode images in various publications). Am I > missing some smoothing parameters?? > > > > This is my singleplot_TFR code: > > > > cfg = [ ] ; > > cfg.channel = 'FCz'; > > cfg.xlim = [-1 0]; %before stimulus appears > > cfg.ylim = [2 20]; % [8 12] only alpha > > cfg.zlim = [0 15]; > > cfg.maskstyle = 'saturation'; > > cfg.masknans = 'yes'; > > ft_singleplotTFR(cfg, allPPdata_suc_collapsed_high); > > > > Many Thanks > > P. Watson > > > _______________________________________________ > 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 stephen.whitmarsh at gmail.com Thu Jan 10 07:38:21 2019 From: stephen.whitmarsh at gmail.com (Stephen Whitmarsh) Date: Thu, 10 Jan 2019 07:38:21 +0100 Subject: [FieldTrip] Fw:Is there someone that has ANT neuro eego 32 channels fieldtrip layout file? In-Reply-To: <63861b2.1fd3.168352b2cad.Coremail.xusihua80@163.com> References: <63861b2.1fd3.168352b2cad.Coremail.xusihua80@163.com> Message-ID: Dear Sihua, Please see: http://www.fieldtriptoolbox.org/tutorial/layout/ maybe taking an existing one to start with: http://www.fieldtriptoolbox.org/template/layout/ Cheers, Stephen On Thu, 10 Jan 2019 at 01:59, xusihua wrote: > > Hi everyone > Is there someone that has ANT neuro eego 32 channels fieldtrip layout > file or can someone help me to find out how to create a layout file? Best > wishes! > > > > -- > Sihua Xu, PhD > > Postdoc > Center for Functional Neuroimaging (cfn.upenn.edu) > > Perelman School of Medicine > University of Pennsylvania > Philadelphia, PA, 19104, USA > > > > > > > > > > > _______________________________________________ > 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 julian.keil at gmail.com Thu Jan 10 07:39:45 2019 From: julian.keil at gmail.com (Julian Keil) Date: Thu, 10 Jan 2019 07:39:45 +0100 Subject: [FieldTrip] time frequency data looks blocky and stripy rather than smooth and swirly In-Reply-To: References: Message-ID: Dear Poppy, did you do some sort of baseline correction or condition contrast? Otherwise, what you see is simply the 1/f distribution in the power spectrum. Best, Julian ________________ Prof. Dr. Julian Keil Biological Psychology Olshausenstrasse 62 - R. 306 24118 Kiel, Germany +49 - 0431 - 880 - 4872 http://www.biopsych.uni-kiel.de/en > Am 10.01.2019 um 05:57 schrieb Poppy Watson : > > Dear fieldtrippers, > > I’m replicating a study that used fieldtrip for TF analysis (and has some lovely single electrode TF plots for each experimental condition). I’ve been running ft_freqanalysis using the following settings. > > cfg = []; > cfg.trials = trialsToUse; % this is a vector of trial numbers > cfg.method = 'mtmconvol'; > cfg.output = 'pow'; > cfg.channel = 'eeg'; > cfg.taper = 'hanning'; > cfg.foi = 2:2:30; > %cfg.t_ftimwin = 4 ./ cfg.foi; > cfg.t_ftimwin = ones(length(cfg.foi),1).*0.5; > cfg.toi = -1.25:0.10:0.25; % 100 ms sliding time window > > The output and stats etc seem to all make sense but my concern is that when I plot the data e.g. from one electrode (collapsed across the whole pp group)– I don’t get beautiful fuzzy TF graphs – instead I get very blocky/stripy figures like the attached where there doesn’t seem to be any smoothing/bleeding across different frequencies. I’ve tried playing around with the cfg.foi as well as the length of the time window and sliding window (cfg.t_ftimwin and cfg.toi) but the results always look very blocky rather than all warm and fuzzy (i.e. as seen in raw-TFdata-of-single-electrode images in various publications). Am I missing some smoothing parameters?? > > This is my singleplot_TFR code: > > cfg = [ ] ; > cfg.channel = 'FCz'; > cfg.xlim = [-1 0]; %before stimulus appears > cfg.ylim = [2 20]; % [8 12] only alpha > cfg.zlim = [0 15]; > cfg.maskstyle = 'saturation'; > cfg.masknans = 'yes'; > ft_singleplotTFR(cfg, allPPdata_suc_collapsed_high); > > Many Thanks > P. Watson > > _______________________________________________ > 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 popwatson at hotmail.com Thu Jan 10 09:10:57 2019 From: popwatson at hotmail.com (Poppy Watson) Date: Thu, 10 Jan 2019 08:10:57 +0000 Subject: [FieldTrip] time frequency data looks blocky and stripy rather than smooth and swirly In-Reply-To: References: , Message-ID: Thanks Stephen (and Julian who replied at the same time). I suspected it was something along these lines as indeed when I subtract one condition from the other, the figures look much more like traditional swirly depictions. The paper I am replicating does not mention anything re. baseline correction of results but I guess that's what they must have done. Just glad to know that all makes sense! Many thanks ________________________________ From: fieldtrip on behalf of Stephen Whitmarsh Sent: 10 January 2019 5:35 PM To: FieldTrip discussion list Subject: Re: [FieldTrip] time frequency data looks blocky and stripy rather than smooth and swirly Dear P., I suspect this is because: 1) you are using half a second for your sliding time-window, which is reasonable, but only have 1.5 seconds of data, of which you plot only one. This doesn't give much room for 'fuzzyness' in the sense of changes over time. 2) because you are not baseline correcting the results, you will mosly see 1/f power, i.e. more power in the lower frequency bands, which will be relatively stronger than any changes over time. To solve this: 1) calculate the TFR over a longer time-window, both before and after stimulation onset. 2) use a relative baseline correction That should hopefully give you the fuzzyness you want. Cheers, Stephen On Thu, 10 Jan 2019 at 06:14, Poppy Watson > wrote: Dear fieldtrippers, I’m replicating a study that used fieldtrip for TF analysis (and has some lovely single electrode TF plots for each experimental condition). I’ve been running ft_freqanalysis using the following settings. cfg = []; cfg.trials = trialsToUse; % this is a vector of trial numbers cfg.method = 'mtmconvol'; cfg.output = 'pow'; cfg.channel = 'eeg'; cfg.taper = 'hanning'; cfg.foi = 2:2:30; %cfg.t_ftimwin = 4 ./ cfg.foi; cfg.t_ftimwin = ones(length(cfg.foi),1).*0.5; cfg.toi = -1.25:0.10:0.25; % 100 ms sliding time window The output and stats etc seem to all make sense but my concern is that when I plot the data e.g. from one electrode (collapsed across the whole pp group)– I don’t get beautiful fuzzy TF graphs – instead I get very blocky/stripy figures like the attached where there doesn’t seem to be any smoothing/bleeding across different frequencies. I’ve tried playing around with the cfg.foi as well as the length of the time window and sliding window (cfg.t_ftimwin and cfg.toi) but the results always look very blocky rather than all warm and fuzzy (i.e. as seen in raw-TFdata-of-single-electrode images in various publications). Am I missing some smoothing parameters?? This is my singleplot_TFR code: cfg = [ ] ; cfg.channel = 'FCz'; cfg.xlim = [-1 0]; %before stimulus appears cfg.ylim = [2 20]; % [8 12] only alpha cfg.zlim = [0 15]; cfg.maskstyle = 'saturation'; cfg.masknans = 'yes'; ft_singleplotTFR(cfg, allPPdata_suc_collapsed_high); Many Thanks P. Watson _______________________________________________ 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 Silvia.Formica at UGent.be Thu Jan 10 10:31:10 2019 From: Silvia.Formica at UGent.be (Silvia Formica) Date: Thu, 10 Jan 2019 09:31:10 +0000 Subject: [FieldTrip] EEG source reconstruction with template - elec file Message-ID: <1547112671759.73597@UGent.be> Dear all, I have a EEG dataset, collected with a Biosemi system with 64 channels. I don't have the individual anatomical data for each participant, but I want to perform source reconstruction to have at least a rough localization of the activation I find. Therefore, I intend to use the templates provided by fieldtrip. If I understand correctly, independently of the source modelling technique that I will choose to use, I need the following information: 1) the head model : this would be the template 'standard_bem' 2) the source model : the template 'cortex_5124.surf.gii' 3) the elec information :? this file should describe the spatial configuration of the electrodes, but I can't retrieve it. I don't think any of the templates available fits my data (they all have more than 64 channels and different configurations). I tried to use the function ft_read_sens on my data but I get the following error elec = ft_read_sens([data_filt5.mat'],'senstype','eeg'); Undefined function or variable 'lab'. Error in channelposition (line 316) n = size(lab,2); Error in ft_datatype_sens (line 349) [chanpos, chanori, lab] = channelposition(sens); Error in ft_datatype_sens (line 158) sens = ft_datatype_sens(sens, 'version', '2011v2'); Error in ft_read_sens (line 380) sens = ft_datatype_sens(sens); I found the cartesian coordinates of the electrodes on the Biosemi website, with the x y z coordinates for each electrodes (as the little example I'm giving below, but that's not enough. Channel x y z Fp1 -27.0333934563814 83.2002299946862 -3.05493522574547 AF7 -51.4205700085246 70.7743429000555 -3.05493522574547 AF3 -35.5608995849164 76.2605952593987 24.1279774030766 F1 -25.1195714566887 62.1731210759014 56.2665567427342 F5 -47.7073482911603 58.9136687505812 43.7676114900325 ... ? ... ... ... Do you have any suggestions on how to create a correct elec file fitting my data? Any help would be highly appreciated! Silvia -------------- next part -------------- An HTML attachment was scrubbed... URL: From julian.keil at gmail.com Thu Jan 10 11:58:18 2019 From: julian.keil at gmail.com (Julian Keil) Date: Thu, 10 Jan 2019 11:58:18 +0100 Subject: [FieldTrip] EEG source reconstruction with template - elec file In-Reply-To: <1547112671759.73597@UGent.be> References: <1547112671759.73597@UGent.be> Message-ID: Dear Silvia, how is the electrode location information from the BioSemi website not enough? Basically, you can create your own electrode definition by giving the labels and locations to a structure, e.g. elec.label{1} = 'Fp1'; elec.chanpos(1,:) = [-27.0333934563814, 83.2002299946862, -3.05493522574547]; or for all your electrodes in one go: elec.label = {'Fp1','AF7','AF3','F1','F5'}; elec.chanpos = [-27.0333934563814, 83.2002299946862, -3.05493522574547;... -51.4205700085246, 70.7743429000555, -3.05493522574547;... -35.5608995849164, 76.2605952593987, 24.1279774030766;... -25.1195714566887, 62.1731210759014, 56.2665567427342;... -47.7073482911603, 58.9136687505812, 43.7676114900325]; plot3(elec.chanpos(:,1),elec.chanpos(:,2),elec.chanpos(:,3),'*') or of course read them more elegantly from a text file ;-) It might be a good idea to double check the alignment with the template headmodel afterwards using ft_electroderealign You can then use this elec structure in all subsequent analyses. I hope that helps, Julian On Thu, Jan 10, 2019 at 10:59 AM Silvia Formica wrote: > Dear all, > > > I have a EEG dataset, collected with a Biosemi system with 64 channels. I > don't have the individual anatomical data for each participant, but I want > to perform source reconstruction to have at least a rough localization of > the activation I find. > > > Therefore, I intend to use the templates provided by fieldtrip. If I > understand correctly, independently of the source modelling technique that > I will choose to use, I need the following information: > > > 1) the *head model* : this would be the template '*standard_bem'* > > > 2) the *source model* : the template '*cortex_5124.surf.gii*' > > > 3) the *elec information* :​ this file should describe the spatial > configuration of the electrodes, but I can't retrieve it. I don't think any > of the templates available fits my data (they all have more than 64 > channels and different configurations). > > > I tried to use the function ft_read_sens on my data but I get the > following error > > > elec = ft_read_sens([data_filt5.mat'],'senstype','eeg'); > > > Undefined function or variable 'lab'. > > > Error in channelposition (line 316) > > n = size(lab,2); > > > Error in ft_datatype_sens (line 349) > > [chanpos, chanori, lab] = channelposition(sens); > > > Error in ft_datatype_sens (line 158) > > sens = ft_datatype_sens(sens, 'version', '2011v2'); > > > Error in ft_read_sens (line 380) > > sens = ft_datatype_sens(sens); > > > > I found the cartesian coordinates of the electrodes on the Biosemi > website, with the x y z coordinates for each electrodes (as the little > example I'm giving below, but that's not enough. > > > Channel x y > z > Fp1 -27.0333934563814 83.2002299946862 -3.05493522574547 > AF7 -51.4205700085246 70.7743429000555 -3.05493522574547 > AF3 -35.5608995849164 76.2605952593987 24.1279774030766 > F1 -25.1195714566887 62.1731210759014 56.2665567427342 > F5 -47.7073482911603 58.9136687505812 43.7676114900325 > > ... > ​ ... ... ... > > > > *Do you have any suggestions on how to create a correct elec file fitting > my data?* > > Any help would be highly appreciated! > > > Silvia > > > > > _______________________________________________ > 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 Silvia.Formica at UGent.be Thu Jan 10 16:05:09 2019 From: Silvia.Formica at UGent.be (Silvia Formica) Date: Thu, 10 Jan 2019 15:05:09 +0000 Subject: [FieldTrip] EEG source reconstruction with template - elec file In-Reply-To: References: <1547112671759.73597@UGent.be>, Message-ID: <1547132711097.19484@UGent.be> Dear Julian, thanks for your quick response! You are absolutely right, my problem was that I was not creating the elec file correctly as a struct with the fields chanpos, elecpos and label. I'm now facing another problem, though. I'm trying to use ft_electroderealign, but I can't seem to achieve a satisfying result. Here is what I am doing: cfg = []; cfg.method = 'headshape'; % cfg.warp = cfg.elec = elec; cfg.headshape = vol.bnd(1); elec_new = ft_electroderealign(cfg); I then try to plot overlaid the skin surface as loaded from 'standard_skin_14038.vol' and the new electrode location but I get inconsistent results, the electrodes are always inside the head. I tried different warping methods without success. This is the closest I managed to get: [cid:809f04f6-d9d9-4e7d-b722-79f7a535c0fd] Do you have any recommendation on how to better align the electrodes to the template? Thanks! Silvia ________________________________ From: fieldtrip on behalf of Julian Keil Sent: 10 January 2019 11:58 To: FieldTrip discussion list Subject: Re: [FieldTrip] EEG source reconstruction with template - elec file Dear Silvia, how is the electrode location information from the BioSemi website not enough? Basically, you can create your own electrode definition by giving the labels and locations to a structure, e.g. elec.label{1} = 'Fp1'; elec.chanpos(1,:) = [-27.0333934563814, 83.2002299946862, -3.05493522574547]; or for all your electrodes in one go: elec.label = {'Fp1','AF7','AF3','F1','F5'}; elec.chanpos = [-27.0333934563814, 83.2002299946862, -3.05493522574547;... -51.4205700085246, 70.7743429000555, -3.05493522574547;... -35.5608995849164, 76.2605952593987, 24.1279774030766;... -25.1195714566887, 62.1731210759014, 56.2665567427342;... -47.7073482911603, 58.9136687505812, 43.7676114900325]; plot3(elec.chanpos(:,1),elec.chanpos(:,2),elec.chanpos(:,3),'*') or of course read them more elegantly from a text file ;-) It might be a good idea to double check the alignment with the template headmodel afterwards using ft_electroderealign You can then use this elec structure in all subsequent analyses. I hope that helps, Julian On Thu, Jan 10, 2019 at 10:59 AM Silvia Formica > wrote: Dear all, I have a EEG dataset, collected with a Biosemi system with 64 channels. I don't have the individual anatomical data for each participant, but I want to perform source reconstruction to have at least a rough localization of the activation I find. Therefore, I intend to use the templates provided by fieldtrip. If I understand correctly, independently of the source modelling technique that I will choose to use, I need the following information: 1) the head model : this would be the template 'standard_bem' 2) the source model : the template 'cortex_5124.surf.gii' 3) the elec information :​ this file should describe the spatial configuration of the electrodes, but I can't retrieve it. I don't think any of the templates available fits my data (they all have more than 64 channels and different configurations). I tried to use the function ft_read_sens on my data but I get the following error elec = ft_read_sens([data_filt5.mat'],'senstype','eeg'); Undefined function or variable 'lab'. Error in channelposition (line 316) n = size(lab,2); Error in ft_datatype_sens (line 349) [chanpos, chanori, lab] = channelposition(sens); Error in ft_datatype_sens (line 158) sens = ft_datatype_sens(sens, 'version', '2011v2'); Error in ft_read_sens (line 380) sens = ft_datatype_sens(sens); I found the cartesian coordinates of the electrodes on the Biosemi website, with the x y z coordinates for each electrodes (as the little example I'm giving below, but that's not enough. Channel x y z Fp1 -27.0333934563814 83.2002299946862 -3.05493522574547 AF7 -51.4205700085246 70.7743429000555 -3.05493522574547 AF3 -35.5608995849164 76.2605952593987 24.1279774030766 F1 -25.1195714566887 62.1731210759014 56.2665567427342 F5 -47.7073482911603 58.9136687505812 43.7676114900325 ... ​ ... ... ... Do you have any suggestions on how to create a correct elec file fitting my data? Any help would be highly appreciated! Silvia _______________________________________________ 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: pastedImage.png Type: image/png Size: 82198 bytes Desc: pastedImage.png URL: From mcarlapiastra at gmail.com Thu Jan 10 16:21:07 2019 From: mcarlapiastra at gmail.com (Maria Carla Piastra) Date: Thu, 10 Jan 2019 16:21:07 +0100 Subject: [FieldTrip] ChildBrain conference in Leuven!! Message-ID: <52f33f09-2013-bdf1-5c43-f681040624be@gmail.com> Dear all, please see and share the invitation to our ChildBrain conference in Leuven (Belgium). The deadline is close! (Apologies for multiple posting.) Best regards, Maria Carla Piastra ​ * * * * * * ***The Childbrain Conference* *Leuven, Belgium 5 - 7 Febuary, 2019* We are pleased to invite you to the "ChildBrain Conference" organized by ChildBrain Marie Skłodowska-Curie Action (MSCA) Innovative Training Network (ITN), that will be held from 5 until 7 February 2019, at KU Leuven, in Leuven, Belgium. This conference is about research on children’s brain in typical development and brain disorders, specifically on results based on recent neuroimaging methods combining modalities as electroencephalography (EEG), magnetoencephalography (MEG) and magnetic resonance imaging (MRI). At the conference, invited speakers and researchers from ChildBrain will give presentations in four main sessions: atypical neurodevelopment, typical neurodevelopment, methodological advances for pediatric neuroimaging and future perspectives. There is also the possibility to attend a pre-conference session in which a methodological demonstration is given on the acquisition and application of head models in children brain data We aim at calling together researchers and students from various domains such as language and audition, as well as mathematics, physics and engineering to build bridges between applications and methodology and share this common and exciting interest on child brain development. For participants to the conference, there is the opportunity to share your work in a poster session and/or as a selected speaker. If you wish to present at the Childbrain Conference, you are invited to send an abstract. *You can submit your abstract and register **here **. The abstract submission deadline is on 14 January 2019 at 23:59 CET. You can view our detailed **schedule ** for further information.* -------------- next part -------------- An HTML attachment was scrubbed... URL: From julian.keil at gmail.com Thu Jan 10 16:40:35 2019 From: julian.keil at gmail.com (Julian Keil) Date: Thu, 10 Jan 2019 16:40:35 +0100 Subject: [FieldTrip] EEG source reconstruction with template - elec file In-Reply-To: <1547132711097.19484@UGent.be> References: <1547112671759.73597@UGent.be> <1547132711097.19484@UGent.be> Message-ID: Hi Silvia, have you tried the "interactive" method? It lets you play around with the alignment. Best, Julian On Thu, Jan 10, 2019 at 4:35 PM Silvia Formica wrote: > Dear Julian, > > > thanks for your quick response! > > You are absolutely right, my problem was that I was not creating the elec > file correctly as a struct with the fields chanpos, elecpos and label. > > > I'm now facing another problem, though. I'm trying to use > ft_electroderealign, but I can't seem to achieve a satisfying result. Here > is what I am doing: > > > cfg = []; > cfg.method = 'headshape'; > % cfg.warp = > cfg.elec = elec; > cfg.headshape = vol.bnd(1); > elec_new = ft_electroderealign(cfg); > > > I then try to plot overlaid the skin surface as loaded > from 'standard_skin_14038.vol' and the new electrode location but I get > inconsistent results, the electrodes are always inside the head. I tried > different warping methods without success. This is the closest I managed to > get: > > > > > Do you have any recommendation on how to better align the electrodes to > the template? > > > Thanks! > > Silvia > ------------------------------ > *From:* fieldtrip on behalf of Julian > Keil > *Sent:* 10 January 2019 11:58 > *To:* FieldTrip discussion list > *Subject:* Re: [FieldTrip] EEG source reconstruction with template - elec > file > > Dear Silvia, > > how is the electrode location information from the BioSemi website not > enough? > Basically, you can create your own electrode definition by giving the > labels and locations to a structure, e.g. > elec.label{1} = 'Fp1'; > elec.chanpos(1,:) = [-27.0333934563814, 83.2002299946862, > -3.05493522574547]; > > or for all your electrodes in one go: > elec.label = {'Fp1','AF7','AF3','F1','F5'}; > elec.chanpos = [-27.0333934563814, 83.2002299946862, -3.05493522574547;... > -51.4205700085246, 70.7743429000555, -3.05493522574547;... > -35.5608995849164, 76.2605952593987, 24.1279774030766;... > -25.1195714566887, 62.1731210759014, 56.2665567427342;... > -47.7073482911603, 58.9136687505812, 43.7676114900325]; > > plot3(elec.chanpos(:,1),elec.chanpos(:,2),elec.chanpos(:,3),'*') > > or of course read them more elegantly from a text file ;-) > > It might be a good idea to double check the alignment with the template > headmodel afterwards using ft_electroderealign > You can then use this elec structure in all subsequent analyses. > > I hope that helps, > > Julian > > On Thu, Jan 10, 2019 at 10:59 AM Silvia Formica > wrote: > >> Dear all, >> >> >> I have a EEG dataset, collected with a Biosemi system with 64 channels. I >> don't have the individual anatomical data for each participant, but I want >> to perform source reconstruction to have at least a rough localization of >> the activation I find. >> >> >> Therefore, I intend to use the templates provided by fieldtrip. If I >> understand correctly, independently of the source modelling technique that >> I will choose to use, I need the following information: >> >> >> 1) the *head model* : this would be the template '*standard_bem'* >> >> >> 2) the *source model* : the template '*cortex_5124.surf.gii*' >> >> >> 3) the *elec information* :​ this file should describe the spatial >> configuration of the electrodes, but I can't retrieve it. I don't think any >> of the templates available fits my data (they all have more than 64 >> channels and different configurations). >> >> >> I tried to use the function ft_read_sens on my data but I get the >> following error >> >> >> elec = ft_read_sens([data_filt5.mat'],'senstype','eeg'); >> >> >> Undefined function or variable 'lab'. >> >> >> Error in channelposition (line 316) >> >> n = size(lab,2); >> >> >> Error in ft_datatype_sens (line 349) >> >> [chanpos, chanori, lab] = channelposition(sens); >> >> >> Error in ft_datatype_sens (line 158) >> >> sens = ft_datatype_sens(sens, 'version', '2011v2'); >> >> >> Error in ft_read_sens (line 380) >> >> sens = ft_datatype_sens(sens); >> >> >> >> I found the cartesian coordinates of the electrodes on the Biosemi >> website, with the x y z coordinates for each electrodes (as the little >> example I'm giving below, but that's not enough. >> >> >> Channel x y >> z >> Fp1 -27.0333934563814 83.2002299946862 -3.05493522574547 >> AF7 -51.4205700085246 70.7743429000555 -3.05493522574547 >> AF3 -35.5608995849164 76.2605952593987 24.1279774030766 >> F1 -25.1195714566887 62.1731210759014 >> 56.2665567427342 >> F5 -47.7073482911603 58.9136687505812 >> 43.7676114900325 >> >> ... >> ​ ... ... ... >> >> >> >> *Do you have any suggestions on how to create a correct elec file fitting >> my data?* >> >> Any help would be highly appreciated! >> >> >> Silvia >> >> >> >> >> _______________________________________________ >> 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: pastedImage.png Type: image/png Size: 82198 bytes Desc: not available URL: From S.Homolle at donders.ru.nl Thu Jan 10 17:12:07 2019 From: S.Homolle at donders.ru.nl (=?utf-8?B?SG9tw7ZsbGUsIFMuIChTaW1vbik=?=) Date: Thu, 10 Jan 2019 16:12:07 +0000 Subject: [FieldTrip] EEG source reconstruction with template - elec file In-Reply-To: <1547132711097.19484@UGent.be> References: <1547112671759.73597@UGent.be>, , <1547132711097.19484@UGent.be> Message-ID: <1547136727937.84008@donders.ru.nl> Dear Silvia, I also can suggest you look at some of the tutorials here and here​. Especially the latter part of both tutorials deal with your current problem! Cheers, Simon Homölle PhD Candidate Donders Institute for Brain, Cognition and Behaviour Centre for Cognitive Neuroimaging Radboud University Nijmegen Phone: +31-(0)24-36-65059 ________________________________ From: fieldtrip on behalf of Silvia Formica Sent: Thursday, January 10, 2019 4:05 PM To: FieldTrip discussion list Subject: Re: [FieldTrip] EEG source reconstruction with template - elec file Dear Julian, thanks for your quick response! You are absolutely right, my problem was that I was not creating the elec file correctly as a struct with the fields chanpos, elecpos and label. I'm now facing another problem, though. I'm trying to use ft_electroderealign, but I can't seem to achieve a satisfying result. Here is what I am doing: cfg = []; cfg.method = 'headshape'; % cfg.warp = cfg.elec = elec; cfg.headshape = vol.bnd(1); elec_new = ft_electroderealign(cfg); I then try to plot overlaid the skin surface as loaded from 'standard_skin_14038.vol' and the new electrode location but I get inconsistent results, the electrodes are always inside the head. I tried different warping methods without success. This is the closest I managed to get: [cid:809f04f6-d9d9-4e7d-b722-79f7a535c0fd] Do you have any recommendation on how to better align the electrodes to the template? Thanks! Silvia ________________________________ From: fieldtrip on behalf of Julian Keil Sent: 10 January 2019 11:58 To: FieldTrip discussion list Subject: Re: [FieldTrip] EEG source reconstruction with template - elec file Dear Silvia, how is the electrode location information from the BioSemi website not enough? Basically, you can create your own electrode definition by giving the labels and locations to a structure, e.g. elec.label{1} = 'Fp1'; elec.chanpos(1,:) = [-27.0333934563814, 83.2002299946862, -3.05493522574547]; or for all your electrodes in one go: elec.label = {'Fp1','AF7','AF3','F1','F5'}; elec.chanpos = [-27.0333934563814, 83.2002299946862, -3.05493522574547;... -51.4205700085246, 70.7743429000555, -3.05493522574547;... -35.5608995849164, 76.2605952593987, 24.1279774030766;... -25.1195714566887, 62.1731210759014, 56.2665567427342;... -47.7073482911603, 58.9136687505812, 43.7676114900325]; plot3(elec.chanpos(:,1),elec.chanpos(:,2),elec.chanpos(:,3),'*') or of course read them more elegantly from a text file ;-) It might be a good idea to double check the alignment with the template headmodel afterwards using ft_electroderealign You can then use this elec structure in all subsequent analyses. I hope that helps, Julian On Thu, Jan 10, 2019 at 10:59 AM Silvia Formica > wrote: Dear all, I have a EEG dataset, collected with a Biosemi system with 64 channels. I don't have the individual anatomical data for each participant, but I want to perform source reconstruction to have at least a rough localization of the activation I find. Therefore, I intend to use the templates provided by fieldtrip. If I understand correctly, independently of the source modelling technique that I will choose to use, I need the following information: 1) the head model : this would be the template 'standard_bem' 2) the source model : the template 'cortex_5124.surf.gii' 3) the elec information :​ this file should describe the spatial configuration of the electrodes, but I can't retrieve it. I don't think any of the templates available fits my data (they all have more than 64 channels and different configurations). I tried to use the function ft_read_sens on my data but I get the following error elec = ft_read_sens([data_filt5.mat'],'senstype','eeg'); Undefined function or variable 'lab'. Error in channelposition (line 316) n = size(lab,2); Error in ft_datatype_sens (line 349) [chanpos, chanori, lab] = channelposition(sens); Error in ft_datatype_sens (line 158) sens = ft_datatype_sens(sens, 'version', '2011v2'); Error in ft_read_sens (line 380) sens = ft_datatype_sens(sens); I found the cartesian coordinates of the electrodes on the Biosemi website, with the x y z coordinates for each electrodes (as the little example I'm giving below, but that's not enough. Channel x y z Fp1 -27.0333934563814 83.2002299946862 -3.05493522574547 AF7 -51.4205700085246 70.7743429000555 -3.05493522574547 AF3 -35.5608995849164 76.2605952593987 24.1279774030766 F1 -25.1195714566887 62.1731210759014 56.2665567427342 F5 -47.7073482911603 58.9136687505812 43.7676114900325 ... ​ ... ... ... Do you have any suggestions on how to create a correct elec file fitting my data? Any help would be highly appreciated! Silvia _______________________________________________ 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: pastedImage.png Type: image/png Size: 82198 bytes Desc: pastedImage.png URL: From michel at cbs.mpg.de Thu Jan 10 17:47:29 2019 From: michel at cbs.mpg.de (Christine Michel) Date: Thu, 10 Jan 2019 17:47:29 +0100 Subject: [FieldTrip] change the color of artifacts - databrowser Message-ID: Dear fieldtrip experts, My colleagues and I are using the fieldtrip data browser to show artifacts marked via a threshold criterion or via visual inspection. It all works very well. However, we find the colors marking the artifacts (the light red and the light lila) very light. It is therefore hard for us to spot and to detect marked artifacts, especially when the marked segments are short. Is there any way I can change the color or the brightness of the color marking the artifacts either in the browser itself or via a config variable? Or could you add such a config variable? This would help us lots!! Thank you Christine Michel From carsten.wolters at uni-muenster.de Thu Jan 10 15:52:14 2019 From: carsten.wolters at uni-muenster.de (Carsten Wolters) Date: Thu, 10 Jan 2019 15:52:14 +0100 Subject: [FieldTrip] ChildBrain conference in Leuven/Belgium, February 5-7, 2019 Message-ID: Dear colleagues, please see the announcement for the upcoming ChildBrain conference below. Please also forward it to those that might be interested to participate. I apologize for multiple postings. BR Carsten Wolters ****************************** *The Childbrain Conference* *Leuven, Belgium 5 - 7 Febuary, 2019* We are pleased to invite you to the "ChildBrain Conference" organized by ChildBrain Marie Skłodowska-Curie Action (MSCA) Innovative Training Network (ITN), that will be held from 5 until 7 February 2019, at KU Leuven, in Leuven, Belgium. This conference is about research on children’s brain in typical development and brain disorders, specifically on results based on recent neuroimaging methods combining modalities as electroencephalography (EEG), magnetoencephalography (MEG) and magnetic resonance imaging (MRI). At the conference, invited speakers and researchers from ChildBrain will give presentations in four main sessions: atypical neurodevelopment, typical neurodevelopment, methodological advances for pediatric neuroimaging and future perspectives. There is also the possibility to attend a pre-conference session in which a methodological demonstration is given on the acquisition and application of head models in children brain data We aim at calling together researchers and students from various domains such as language and audition, as well as mathematics, physics and engineering to build bridges between applications and methodology and share this common and exciting interest on child brain development. For participants to the conference, there is the opportunity to share your work in a poster session and/or as a selected speaker. If you wish to present at the Childbrain Conference, you are invited to send an abstract. *You can submit your abstract and register **here **. The abstract submission deadline is on 14 January 2019 at 23:59 CET. You can view our detailed **schedule ** for further information.* -- Prof. Dr.rer.nat. Carsten H. Wolters University of Münster Institute for Biomagnetism and Biosignalanalysis Malmedyweg 15 48149 Münster, Germany Phone: +49 (0)251 83 56904 +49 (0)251 83 56865 (secr.) Fax: +49 (0)251 83 56874 Email: carsten.wolters at uni-muenster.de Web: https://campus.uni-muenster.de/biomag/das-institut/mitarbeiter/carsten-wolters/ -------------- next part -------------- An HTML attachment was scrubbed... URL: From brookshire at uchicago.edu Thu Jan 10 18:13:06 2019 From: brookshire at uchicago.edu (Geoff Brookshire) Date: Thu, 10 Jan 2019 17:13:06 +0000 Subject: [FieldTrip] change the color of artifacts - databrowser In-Reply-To: <8ed5cbadf23c4e809ea3acf1577c05f8@BN6PR11MB1394.namprd11.prod.outlook.com> References: <8ed5cbadf23c4e809ea3acf1577c05f8@BN6PR11MB1394.namprd11.prod.outlook.com> Message-ID: Hi Christine, You can make the tagged artifacts darker by adding this line before you call ft_databrowser: cfg.artifactalpha = 0.5; cheers, geoff On Thu, Jan 10, 2019 at 4:50 PM Christine Michel wrote: > Dear fieldtrip experts, > > My colleagues and I are using the fieldtrip data browser to show > artifacts marked via a threshold criterion or via visual inspection. It > all works very well. However, we find the colors marking the artifacts > (the light red and the light lila) very light. It is therefore hard for > us to spot and to detect marked artifacts, especially when the marked > segments are short. > > Is there any way I can change the color or the brightness of the color > marking the artifacts either in the browser itself or via a config > variable? Or could you add such a config variable? This would help us > lots!! > > Thank you > > Christine Michel > > > _______________________________________________ > 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 stephen.whitmarsh at gmail.com Thu Jan 10 18:28:39 2019 From: stephen.whitmarsh at gmail.com (Stephen Whitmarsh) Date: Thu, 10 Jan 2019 18:28:39 +0100 Subject: [FieldTrip] change the color of artifacts - databrowser In-Reply-To: References: Message-ID: Dear Christine, Take a look at line 631 (opt.artifactcolors) of ft_databrowser. Edit it to you hearts content! Cheers, Stephen On Thu, 10 Jan 2019 at 18:13, Christine Michel wrote: > Dear fieldtrip experts, > > My colleagues and I are using the fieldtrip data browser to show > artifacts marked via a threshold criterion or via visual inspection. It > all works very well. However, we find the colors marking the artifacts > (the light red and the light lila) very light. It is therefore hard for > us to spot and to detect marked artifacts, especially when the marked > segments are short. > > Is there any way I can change the color or the brightness of the color > marking the artifacts either in the browser itself or via a config > variable? Or could you add such a config variable? This would help us > lots!! > > Thank you > > Christine Michel > > > _______________________________________________ > 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 stephen.whitmarsh at gmail.com Thu Jan 10 18:33:54 2019 From: stephen.whitmarsh at gmail.com (Stephen Whitmarsh) Date: Thu, 10 Jan 2019 18:33:54 +0100 Subject: [FieldTrip] change the color of artifacts - databrowser In-Reply-To: References: <8ed5cbadf23c4e809ea3acf1577c05f8@BN6PR11MB1394.namprd11.prod.outlook.com> Message-ID: <0c2e01d4a90a$a8a9bb90$f9fd32b0$@gmail.com> Ah, my mistake. Thanks Geoff, Stephen From: fieldtrip On Behalf Of Geoff Brookshire Sent: Thursday, January 10, 2019 6:13 PM To: FieldTrip discussion list Subject: Re: [FieldTrip] change the color of artifacts - databrowser Hi Christine, You can make the tagged artifacts darker by adding this line before you call ft_databrowser: cfg.artifactalpha = 0.5; cheers, geoff On Thu, Jan 10, 2019 at 4:50 PM Christine Michel > wrote: Dear fieldtrip experts, My colleagues and I are using the fieldtrip data browser to show artifacts marked via a threshold criterion or via visual inspection. It all works very well. However, we find the colors marking the artifacts (the light red and the light lila) very light. It is therefore hard for us to spot and to detect marked artifacts, especially when the marked segments are short. Is there any way I can change the color or the brightness of the color marking the artifacts either in the browser itself or via a config variable? Or could you add such a config variable? This would help us lots!! Thank you Christine Michel _______________________________________________ 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 michel at cbs.mpg.de Fri Jan 11 11:17:05 2019 From: michel at cbs.mpg.de (Christine Michel) Date: Fri, 11 Jan 2019 11:17:05 +0100 Subject: [FieldTrip] change the color of artifacts - databrowser Message-ID: Dear Geoff and Stephen, thanks a lot for the helpful replies - it worked absolutely fine! :-) Christine -- Dr. Christine Michel Max Planck Research Group on Early Social Cognition Max Planck Institute for Human Cognitive and Brain Sciences Stephanstr. 1A 04103 Leipzig Germany phone: +49 341 9940 2468 From jack.reeves at nih.gov Fri Jan 11 17:43:49 2019 From: jack.reeves at nih.gov (Reeves, Jack (NIH/NINDS) [F]) Date: Fri, 11 Jan 2019 16:43:49 +0000 Subject: [FieldTrip] Alignment error with Fieldtrip source localization Message-ID: Hello- I am trying to source localize TMS-EEG data using the Fieldtrip tutorials in the links below. I am able to run all of the steps, but the headmodel and the freesurfer-processed sourcemodel are misaligned at the end. There are some pictures below which show the issue. The issue is the same for all subjects I try to process. Does anyone have any idea what could be causing this issue? I can send additional information or my scripts if needed. http://www.fieldtriptoolbox.org/tutorial/headmodel_meg/ http://www.fieldtriptoolbox.org/tutorial/sourcemodel/ http://www.fieldtriptoolbox.org/tutorial/minimumnormestimate/ [cid:image001.png at 01D4A9A1.8670B870][cid:image002.png at 01D4A9A1.8670B870] Thanks, Jack Reeves -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image001.png Type: image/png Size: 34966 bytes Desc: image001.png URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image002.png Type: image/png Size: 27668 bytes Desc: image002.png URL: From vale.nasato at gmail.com Sun Jan 13 16:45:35 2019 From: vale.nasato at gmail.com (Valentina Nasato) Date: Sun, 13 Jan 2019 16:45:35 +0100 Subject: [FieldTrip] Help: sourceanalysis Message-ID: <5c3b5d1f.1c69fb81.9d9a6.0a5b@mx.google.com> Good evening everyone, through the fieldtrip toolbox I solved the direct problem using the FEM method for EEG data. The EEG data are in resting state. Now I have to implement the indirect problem but on the tutorial there is no guide. How should I implement fieldtrip sourceanalysis? I have the sourcemodel, headmodel, leadfield and covariance matrix. I calculated the covariance matrix directly in Matlab. My problem now is to understand how to calculate the average of the EEG data to be given as input to the sourceanalysis. How to calculate an average of resting state data ? thanks Inviato da Posta per Windows 10 -------------- next part -------------- An HTML attachment was scrubbed... URL: From athina.tz at gmail.com Mon Jan 14 07:07:22 2019 From: athina.tz at gmail.com (Athina Tzovara) Date: Sun, 13 Jan 2019 22:07:22 -0800 Subject: [FieldTrip] Announcement for 2 PhD positions Message-ID: Dear all, Applications are invited for 2 PhD students in machine learning & computational neuroscience at the University of Bern, Switzerland. The research focus will be on using machine learning techniques to model electrophysiological data related to epilepsy and consciousness research. The positions will be part of a newly formed group between the Institute of Computer Science and Faculty of Medicine at the University of Bern and will be funded by the Interfaculty Research Cooperation (IRC) project on sleep research. The successful applicants will have the opportunity to work at the intersection of computational and clinical research in neuroscience. They will have access to scalp and intracranial electroencephalography (EEG) data and will get hands-on experience with data analysis and computational techniques. The ideal candidates should have a Master of Science or an equivalent degree in neuroscience, biomedical engineering, computer science, or a related discipline. Prior experience with EEG, machine learning or deep learning are advantageous. Funding is available for 3 years (with evaluation after 1 year) according to Swiss regulations. If you are interested please send one pdf document including your CV, a brief statement of research interests, and the contact details of two references to: athina.tz at gmail.com. Informal inquiries are welcome. Best wishes, Athina Tzovara ----- Athina Tzovara, PhD Helen Wills Neuroscience Institute Knight Cognitive Neuroscience Lab University of California Berkeley Web: https://aath0.github.io/ Tel: +1-510-944-4302 -------------- next part -------------- An HTML attachment was scrubbed... URL: From popwatson at hotmail.com Mon Jan 14 10:03:59 2019 From: popwatson at hotmail.com (Poppy Watson) Date: Mon, 14 Jan 2019 09:03:59 +0000 Subject: [FieldTrip] Identifying bad channels Message-ID: Dear fieldtrippers, I’m following our lab protocol for pre-processing of EEG data – but implementing it in Fieldtrip rather than Brain Vision Analyzer. So far things are great. However, I’m going back to preprocessing stage because ideally I would like to stick as closely to the procedure we use for automated artifact/channel rejection in BVA but am wondering about the most efficient way to implement this in fieldtrip. What I have done in fieldtrip is: 1. Remove channels that were marked as bad during recording and interpolated them. 2. After lots of playing around, find zvalue cutoff settings that I’m comfortable with and use the same settings on every participant for jump artifacts, muscle artifacts and eye movements and remove these using ft_rejectartifact (conservative but easily replicable). 3. I then quickly scrolled through each trial using ft_rejectvisual to make sure all channels looked ok – any really messy noisy channels I then made a note of and repeated steps 1 and 2 above. I’m not happy with this step 3 however, because it is quite subjective. The way that we identify bad channels in BVA which I would ultimately like to implement is: 1. Mark trials as bad where a channel is present that has: a. Low activity of less than 0.5 microvolts in any 100ms interval b. Noisy activity where the absolute max-min voltage in any 200ms interval is greater than 200 microvolts (sometimes this is 100Uv depends on expected motor activity in paradigm). 2. Identify, for every channel, the percentage of data that is being marked as bad – if this is higher than a given threshold (i.e. 25%), then remove the channel and/or interpolate. 3. Rerun step 1 and remove bad trials. What I am planning to do in Fieldtrip, but would appreciate some input from those more experienced is: 1. Remove trials with eyeblinks etc using the Fieldtrip methods described above 2. Split each trial segment into 100ms or 200ms intervals 3. Calculate the max-min per channel in order to identify intervals that have low voltage or noisy activity etc as per a and b above 4. Keep track of the proportion of trials/intervals that any given channel is identified as bad so that I can remove those channels that are above a threshold (i.e. 25%). Is there a more efficient way to implement something like this? Am I missing out on a great Fieldtrip tool? Please advise Thanks --------------------------------------------------------------------- Poppy Watson --------------------------------------------------------------------- -------------- next part -------------- An HTML attachment was scrubbed... URL: From e.spaak at donders.ru.nl Mon Jan 14 10:29:18 2019 From: e.spaak at donders.ru.nl (Eelke Spaak) Date: Mon, 14 Jan 2019 10:29:18 +0100 Subject: [FieldTrip] Help: sourceanalysis In-Reply-To: <5c3b5d1f.1c69fb81.9d9a6.0a5b@mx.google.com> References: <5c3b5d1f.1c69fb81.9d9a6.0a5b@mx.google.com> Message-ID: Hi Valentina, The computation of the beamformer spatial filter only uses the covariance matrix, and does not use the average data itself. Since you have the covariance matrix computed "manually", you should be able to wrap it in a FieldTrip-style timelock structure: tl = []; tl.cov = cov; and put some zeroes of appropriate size in tl.avg. Then, make sure to use cfg.lcmv.keepfilter = 'yes' in the call to ft_sourceanalysis, and get the filters out from the resulting source structure. (Note that the dipole moments in the source structure will be meaningless since the avg data was fake; but the filters are still meaningful.) After that, simply multiply your sensor-level resting state data with the spatial filters to get the source time courses. I hope that helps. (If you have no idea what I'm talking about, then it's probably a good idea to go through some tutorials and examples (including about so-called "virtual channels") anyway using event-related fields before attempting this on resting state data.) Cheers, Eelke On Sun, 13 Jan 2019 at 16:45, Valentina Nasato wrote: > > Good evening everyone, > > through the fieldtrip toolbox I solved the direct problem using the FEM method for EEG data. The EEG data are in resting state. Now I have to implement the indirect problem but on the tutorial there is no guide. How should I implement fieldtrip sourceanalysis? I have the sourcemodel, headmodel, leadfield and covariance matrix. I calculated the covariance matrix directly in Matlab. My problem now is to understand how to calculate the average of the EEG data to be given as input to the sourceanalysis. How to calculate an average of resting state data ? > > thanks > > > > > > Inviato da Posta per Windows 10 > > > > _______________________________________________ > fieldtrip mailing list > https://mailman.science.ru.nl/mailman/listinfo/fieldtrip > https://doi.org/10.1371/journal.pcbi.1002202 From Silvia.Formica at UGent.be Mon Jan 14 10:39:17 2019 From: Silvia.Formica at UGent.be (Silvia Formica) Date: Mon, 14 Jan 2019 09:39:17 +0000 Subject: [FieldTrip] EEG source reconstruction with template - elec file In-Reply-To: <1547136727937.84008@donders.ru.nl> References: <1547112671759.73597@UGent.be>, , <1547132711097.19484@UGent.be>,<1547136727937.84008@donders.ru.nl> Message-ID: <1547458759308.35828@UGent.be> Thank you all for your very useful contributions! I noticed that in my case the method "project" gives nice results, so I'm currently using that one. Cheers, Silvia ________________________________ From: fieldtrip on behalf of Homölle, S. (Simon) Sent: 10 January 2019 17:12 To: FieldTrip discussion list Subject: Re: [FieldTrip] EEG source reconstruction with template - elec file Dear Silvia, I also can suggest you look at some of the tutorials here and here​. Especially the latter part of both tutorials deal with your current problem! Cheers, Simon Homölle PhD Candidate Donders Institute for Brain, Cognition and Behaviour Centre for Cognitive Neuroimaging Radboud University Nijmegen Phone: +31-(0)24-36-65059 ________________________________ From: fieldtrip on behalf of Silvia Formica Sent: Thursday, January 10, 2019 4:05 PM To: FieldTrip discussion list Subject: Re: [FieldTrip] EEG source reconstruction with template - elec file Dear Julian, thanks for your quick response! You are absolutely right, my problem was that I was not creating the elec file correctly as a struct with the fields chanpos, elecpos and label. I'm now facing another problem, though. I'm trying to use ft_electroderealign, but I can't seem to achieve a satisfying result. Here is what I am doing: cfg = []; cfg.method = 'headshape'; % cfg.warp = cfg.elec = elec; cfg.headshape = vol.bnd(1); elec_new = ft_electroderealign(cfg); I then try to plot overlaid the skin surface as loaded from 'standard_skin_14038.vol' and the new electrode location but I get inconsistent results, the electrodes are always inside the head. I tried different warping methods without success. This is the closest I managed to get: [cid:809f04f6-d9d9-4e7d-b722-79f7a535c0fd] Do you have any recommendation on how to better align the electrodes to the template? Thanks! Silvia ________________________________ From: fieldtrip on behalf of Julian Keil Sent: 10 January 2019 11:58 To: FieldTrip discussion list Subject: Re: [FieldTrip] EEG source reconstruction with template - elec file Dear Silvia, how is the electrode location information from the BioSemi website not enough? Basically, you can create your own electrode definition by giving the labels and locations to a structure, e.g. elec.label{1} = 'Fp1'; elec.chanpos(1,:) = [-27.0333934563814, 83.2002299946862, -3.05493522574547]; or for all your electrodes in one go: elec.label = {'Fp1','AF7','AF3','F1','F5'}; elec.chanpos = [-27.0333934563814, 83.2002299946862, -3.05493522574547;... -51.4205700085246, 70.7743429000555, -3.05493522574547;... -35.5608995849164, 76.2605952593987, 24.1279774030766;... -25.1195714566887, 62.1731210759014, 56.2665567427342;... -47.7073482911603, 58.9136687505812, 43.7676114900325]; plot3(elec.chanpos(:,1),elec.chanpos(:,2),elec.chanpos(:,3),'*') or of course read them more elegantly from a text file ;-) It might be a good idea to double check the alignment with the template headmodel afterwards using ft_electroderealign You can then use this elec structure in all subsequent analyses. I hope that helps, Julian On Thu, Jan 10, 2019 at 10:59 AM Silvia Formica > wrote: Dear all, I have a EEG dataset, collected with a Biosemi system with 64 channels. I don't have the individual anatomical data for each participant, but I want to perform source reconstruction to have at least a rough localization of the activation I find. Therefore, I intend to use the templates provided by fieldtrip. If I understand correctly, independently of the source modelling technique that I will choose to use, I need the following information: 1) the head model : this would be the template 'standard_bem' 2) the source model : the template 'cortex_5124.surf.gii' 3) the elec information :​ this file should describe the spatial configuration of the electrodes, but I can't retrieve it. I don't think any of the templates available fits my data (they all have more than 64 channels and different configurations). I tried to use the function ft_read_sens on my data but I get the following error elec = ft_read_sens([data_filt5.mat'],'senstype','eeg'); Undefined function or variable 'lab'. Error in channelposition (line 316) n = size(lab,2); Error in ft_datatype_sens (line 349) [chanpos, chanori, lab] = channelposition(sens); Error in ft_datatype_sens (line 158) sens = ft_datatype_sens(sens, 'version', '2011v2'); Error in ft_read_sens (line 380) sens = ft_datatype_sens(sens); I found the cartesian coordinates of the electrodes on the Biosemi website, with the x y z coordinates for each electrodes (as the little example I'm giving below, but that's not enough. Channel x y z Fp1 -27.0333934563814 83.2002299946862 -3.05493522574547 AF7 -51.4205700085246 70.7743429000555 -3.05493522574547 AF3 -35.5608995849164 76.2605952593987 24.1279774030766 F1 -25.1195714566887 62.1731210759014 56.2665567427342 F5 -47.7073482911603 58.9136687505812 43.7676114900325 ... ​ ... ... ... Do you have any suggestions on how to create a correct elec file fitting my data? Any help would be highly appreciated! Silvia _______________________________________________ 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: pastedImage.png Type: image/png Size: 82198 bytes Desc: pastedImage.png URL: From elene.beitia at alumni.mondragon.edu Mon Jan 14 10:52:04 2019 From: elene.beitia at alumni.mondragon.edu (Elene Beitia Loinaz) Date: Mon, 14 Jan 2019 10:52:04 +0100 Subject: [FieldTrip] Source reconstructions Message-ID: Dear fieldtripers, I am tryng to visualize the electrodes and the headmodel at the same time. The problem that I have is that I need to reescale one of them. I have tried to function ft_convert_units, but I just obtain the image attached. The structure of the information are the next ones, *headmodel:* bnd: [1×3 struct] cond: [0.3300 0.0041 0.3300] mat: [3000×3000 double] type: 'dipoli' unit: 'mm' *electrodes:* pnt: [133×3 double] label: {1×133 cell} Code that I have used to obtained the image below: ft_determine_coordsys (vol, 'interactive','no') figure; sens=data.elec; sens=ft_convert_units(sens, 'cm'); ft_plot_vol(vol,'facecolor','skin','edgecolor','none') ft_plot_sens(sens,'elecsize',10) camlight alpha 0.5 If somebody could help my I would be very grateful, Elene [image: image.png] -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image.png Type: image/png Size: 78865 bytes Desc: not available URL: From dlozanosoldevilla at gmail.com Mon Jan 14 11:19:36 2019 From: dlozanosoldevilla at gmail.com (Diego Lozano-Soldevilla) Date: Mon, 14 Jan 2019 11:19:36 +0100 Subject: [FieldTrip] Source reconstructions In-Reply-To: References: Message-ID: Dear Elene Please make sure the units of your headmodel (mm in your case) and sensors (cm) are the same. Best Diego On Mon, 14 Jan 2019 at 11:17, Elene Beitia Loinaz < elene.beitia at alumni.mondragon.edu> wrote: > Dear fieldtripers, > > I am tryng to visualize the electrodes and the headmodel at the same time. > The problem that I have is that I need to reescale one of them. > > I have tried to function ft_convert_units, but I just obtain the image > attached. > > The structure of the information are the next ones, > *headmodel:* > bnd: [1×3 struct] > cond: [0.3300 0.0041 0.3300] > mat: [3000×3000 double] > type: 'dipoli' > unit: 'mm' > *electrodes:* > pnt: [133×3 double] > label: {1×133 cell} > > Code that I have used to obtained the image below: > ft_determine_coordsys (vol, 'interactive','no') > > > figure; > sens=data.elec; > sens=ft_convert_units(sens, 'cm'); > ft_plot_vol(vol,'facecolor','skin','edgecolor','none') > ft_plot_sens(sens,'elecsize',10) > camlight > alpha 0.5 > > If somebody could help my I would be very grateful, > > Elene > > > [image: image.png] > _______________________________________________ > 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 S.Homolle at donders.ru.nl Mon Jan 14 11:24:47 2019 From: S.Homolle at donders.ru.nl (=?utf-8?B?SG9tw7ZsbGUsIFMuIChTaW1vbik=?=) Date: Mon, 14 Jan 2019 10:24:47 +0000 Subject: [FieldTrip] EEG source reconstruction with template - elec file In-Reply-To: <1547458759308.35828@UGent.be> References: <1547112671759.73597@UGent.be>, , <1547132711097.19484@UGent.be>, <1547136727937.84008@donders.ru.nl>, <1547458759308.35828@UGent.be> Message-ID: <1547461487128.16656@donders.ru.nl> Dear Silvia, So in general before considering the method "project", the electrodes need to be quite close to the head surface to yield reasonable results. In the email you sent earlier you see the electrode position around Cz are quite far away from the head. The method "project" works in such a way that it tries to find the closest surface point for each electrode, and then projects it onto that spot. Therefore, for electrodes that are far away from the head surface unexpected projections can happen. So what I suggest to is that before you use "project", you should use the method "interactive" to improve the electrode positions in such a way that the electrodes have a better alignment to the head surface. Cheers, Simon Homölle PhD Candidate Donders Institute for Brain, Cognition and Behaviour Centre for Cognitive Neuroimaging Radboud University Nijmegen Phone: +31-(0)24-36-65059 ________________________________ From: fieldtrip on behalf of Silvia Formica Sent: Monday, January 14, 2019 10:39 AM To: FieldTrip discussion list Subject: Re: [FieldTrip] EEG source reconstruction with template - elec file Thank you all for your very useful contributions! I noticed that in my case the method "project" gives nice results, so I'm currently using that one. Cheers, Silvia ________________________________ From: fieldtrip on behalf of Homölle, S. (Simon) Sent: 10 January 2019 17:12 To: FieldTrip discussion list Subject: Re: [FieldTrip] EEG source reconstruction with template - elec file Dear Silvia, I also can suggest you look at some of the tutorials here and here​. Especially the latter part of both tutorials deal with your current problem! Cheers, Simon Homölle PhD Candidate Donders Institute for Brain, Cognition and Behaviour Centre for Cognitive Neuroimaging Radboud University Nijmegen Phone: +31-(0)24-36-65059 ________________________________ From: fieldtrip on behalf of Silvia Formica Sent: Thursday, January 10, 2019 4:05 PM To: FieldTrip discussion list Subject: Re: [FieldTrip] EEG source reconstruction with template - elec file Dear Julian, thanks for your quick response! You are absolutely right, my problem was that I was not creating the elec file correctly as a struct with the fields chanpos, elecpos and label. I'm now facing another problem, though. I'm trying to use ft_electroderealign, but I can't seem to achieve a satisfying result. Here is what I am doing: cfg = []; cfg.method = 'headshape'; % cfg.warp = cfg.elec = elec; cfg.headshape = vol.bnd(1); elec_new = ft_electroderealign(cfg); I then try to plot overlaid the skin surface as loaded from 'standard_skin_14038.vol' and the new electrode location but I get inconsistent results, the electrodes are always inside the head. I tried different warping methods without success. This is the closest I managed to get: [cid:809f04f6-d9d9-4e7d-b722-79f7a535c0fd] Do you have any recommendation on how to better align the electrodes to the template? Thanks! Silvia ________________________________ From: fieldtrip on behalf of Julian Keil Sent: 10 January 2019 11:58 To: FieldTrip discussion list Subject: Re: [FieldTrip] EEG source reconstruction with template - elec file Dear Silvia, how is the electrode location information from the BioSemi website not enough? Basically, you can create your own electrode definition by giving the labels and locations to a structure, e.g. elec.label{1} = 'Fp1'; elec.chanpos(1,:) = [-27.0333934563814, 83.2002299946862, -3.05493522574547]; or for all your electrodes in one go: elec.label = {'Fp1','AF7','AF3','F1','F5'}; elec.chanpos = [-27.0333934563814, 83.2002299946862, -3.05493522574547;... -51.4205700085246, 70.7743429000555, -3.05493522574547;... -35.5608995849164, 76.2605952593987, 24.1279774030766;... -25.1195714566887, 62.1731210759014, 56.2665567427342;... -47.7073482911603, 58.9136687505812, 43.7676114900325]; plot3(elec.chanpos(:,1),elec.chanpos(:,2),elec.chanpos(:,3),'*') or of course read them more elegantly from a text file ;-) It might be a good idea to double check the alignment with the template headmodel afterwards using ft_electroderealign You can then use this elec structure in all subsequent analyses. I hope that helps, Julian On Thu, Jan 10, 2019 at 10:59 AM Silvia Formica > wrote: Dear all, I have a EEG dataset, collected with a Biosemi system with 64 channels. I don't have the individual anatomical data for each participant, but I want to perform source reconstruction to have at least a rough localization of the activation I find. Therefore, I intend to use the templates provided by fieldtrip. If I understand correctly, independently of the source modelling technique that I will choose to use, I need the following information: 1) the head model : this would be the template 'standard_bem' 2) the source model : the template 'cortex_5124.surf.gii' 3) the elec information :​ this file should describe the spatial configuration of the electrodes, but I can't retrieve it. I don't think any of the templates available fits my data (they all have more than 64 channels and different configurations). I tried to use the function ft_read_sens on my data but I get the following error elec = ft_read_sens([data_filt5.mat'],'senstype','eeg'); Undefined function or variable 'lab'. Error in channelposition (line 316) n = size(lab,2); Error in ft_datatype_sens (line 349) [chanpos, chanori, lab] = channelposition(sens); Error in ft_datatype_sens (line 158) sens = ft_datatype_sens(sens, 'version', '2011v2'); Error in ft_read_sens (line 380) sens = ft_datatype_sens(sens); I found the cartesian coordinates of the electrodes on the Biosemi website, with the x y z coordinates for each electrodes (as the little example I'm giving below, but that's not enough. Channel x y z Fp1 -27.0333934563814 83.2002299946862 -3.05493522574547 AF7 -51.4205700085246 70.7743429000555 -3.05493522574547 AF3 -35.5608995849164 76.2605952593987 24.1279774030766 F1 -25.1195714566887 62.1731210759014 56.2665567427342 F5 -47.7073482911603 58.9136687505812 43.7676114900325 ... ​ ... ... ... Do you have any suggestions on how to create a correct elec file fitting my data? Any help would be highly appreciated! Silvia _______________________________________________ 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: pastedImage.png Type: image/png Size: 82198 bytes Desc: pastedImage.png URL: From elene.beitia at alumni.mondragon.edu Mon Jan 14 11:25:11 2019 From: elene.beitia at alumni.mondragon.edu (Elene Beitia Loinaz) Date: Mon, 14 Jan 2019 11:25:11 +0100 Subject: [FieldTrip] Source reconstructions In-Reply-To: References: Message-ID: Thank you Diego, I already know that. But if I put it in 'mm' it is even smaller, that is way I put in 'cm'. As I have writen above the structure of the electrodes does not have units, I think that the problem is there. *electrodes:* pnt: [133×3 double] label: {1×133 cell} If someone could help me to obtain the same size for the electrodes and for the headmodel I would be very grateful, Elene. Hau idatzi du Diego Lozano-Soldevilla (dlozanosoldevilla at gmail.com) erabiltzaileak (2019 urt. 14, al. (11:19)): > Dear Elene > Please make sure the units of your headmodel (mm in your case) and sensors > (cm) are the same. > Best > Diego > > On Mon, 14 Jan 2019 at 11:17, Elene Beitia Loinaz < > elene.beitia at alumni.mondragon.edu> wrote: > >> Dear fieldtripers, >> >> I am tryng to visualize the electrodes and the headmodel at the same >> time. The problem that I have is that I need to reescale one of them. >> >> I have tried to function ft_convert_units, but I just obtain the image >> attached. >> >> The structure of the information are the next ones, >> *headmodel:* >> bnd: [1×3 struct] >> cond: [0.3300 0.0041 0.3300] >> mat: [3000×3000 double] >> type: 'dipoli' >> unit: 'mm' >> *electrodes:* >> pnt: [133×3 double] >> label: {1×133 cell} >> >> Code that I have used to obtained the image below: >> ft_determine_coordsys (vol, 'interactive','no') >> >> >> figure; >> sens=data.elec; >> sens=ft_convert_units(sens, 'cm'); >> ft_plot_vol(vol,'facecolor','skin','edgecolor','none') >> ft_plot_sens(sens,'elecsize',10) >> camlight >> alpha 0.5 >> >> If somebody could help my I would be very grateful, >> >> Elene >> >> >> [image: image.png] >> _______________________________________________ >> 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 S.Homolle at donders.ru.nl Mon Jan 14 11:36:02 2019 From: S.Homolle at donders.ru.nl (=?iso-8859-1?Q?Hom=F6lle=2C_S=2E_=28Simon=29?=) Date: Mon, 14 Jan 2019 10:36:02 +0000 Subject: [FieldTrip] Source reconstructions In-Reply-To: References: Message-ID: <1547462162221.35460@donders.ru.nl> Dear Elene, Looking at the structure of "electrodes", I see that there is no information about the units. Do you know in which unit this electrodes are expressed? How did you generate this structure? If I see correctly in the code ft_plot_sens assumes "mm" if no unit is specified. This means your electrode structure is not expressed in mm. As the unit information is missing, ft_convert_units will not work on your electrodes. So you should add this information to the structure, and then you would be able to use ft_convert_units. Hope this resolves your issue! Cheers Simon Homölle PhD Candidate Donders Institute for Brain, Cognition and Behaviour Centre for Cognitive Neuroimaging Radboud University Nijmegen Phone: +31-(0)24-36-65059 ________________________________ From: fieldtrip on behalf of Elene Beitia Loinaz Sent: Monday, January 14, 2019 10:52 AM To: FieldTrip discussion list Subject: [FieldTrip] Source reconstructions Dear fieldtripers, I am tryng to visualize the electrodes and the headmodel at the same time. The problem that I have is that I need to reescale one of them. I have tried to function ft_convert_units, but I just obtain the image attached. The structure of the information are the next ones, headmodel: bnd: [1×3 struct] cond: [0.3300 0.0041 0.3300] mat: [3000×3000 double] type: 'dipoli' unit: 'mm' electrodes: pnt: [133×3 double] label: {1×133 cell} Code that I have used to obtained the image below: ft_determine_coordsys (vol, 'interactive','no') figure; sens=data.elec; sens=ft_convert_units(sens, 'cm'); ft_plot_vol(vol,'facecolor','skin','edgecolor','none') ft_plot_sens(sens,'elecsize',10) camlight alpha 0.5 If somebody could help my I would be very grateful, Elene [image.png] -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image.png Type: image/png Size: 78865 bytes Desc: image.png URL: From e.spaak at donders.ru.nl Mon Jan 14 11:54:55 2019 From: e.spaak at donders.ru.nl (Eelke Spaak) Date: Mon, 14 Jan 2019 11:54:55 +0100 Subject: [FieldTrip] Source reconstructions In-Reply-To: References: Message-ID: Perhaps a stupid question but have you also tried sens = ft_convert_units(sens, 'mm')? Eelke On Mon, 14 Jan 2019 at 10:52, Elene Beitia Loinaz wrote: > > Dear fieldtripers, > > I am tryng to visualize the electrodes and the headmodel at the same time. The problem that I have is that I need to reescale one of them. > > I have tried to function ft_convert_units, but I just obtain the image attached. > > The structure of the information are the next ones, > headmodel: > bnd: [1×3 struct] > cond: [0.3300 0.0041 0.3300] > mat: [3000×3000 double] > type: 'dipoli' > unit: 'mm' > electrodes: > pnt: [133×3 double] > label: {1×133 cell} > > Code that I have used to obtained the image below: > ft_determine_coordsys (vol, 'interactive','no') > > > figure; > sens=data.elec; > sens=ft_convert_units(sens, 'cm'); > ft_plot_vol(vol,'facecolor','skin','edgecolor','none') > ft_plot_sens(sens,'elecsize',10) > camlight > alpha 0.5 > > If somebody could help my I would be very grateful, > > Elene > > > > _______________________________________________ > fieldtrip mailing list > https://mailman.science.ru.nl/mailman/listinfo/fieldtrip > https://doi.org/10.1371/journal.pcbi.1002202 From e.spaak at donders.ru.nl Mon Jan 14 12:53:08 2019 From: e.spaak at donders.ru.nl (Eelke Spaak) Date: Mon, 14 Jan 2019 12:53:08 +0100 Subject: [FieldTrip] Source reconstructions In-Reply-To: References: Message-ID: Ah sorry, I was getting your previous replies with a delay. If 'mm' makes them even smaller, perhaps 'm' is the right unit? In any case, I very strongly suspect that a spatial unit mismatch is the cause of the discrepancy you're seeing. Cheers, Eelke On Mon, 14 Jan 2019 at 11:54, Eelke Spaak wrote: > > Perhaps a stupid question but have you also tried sens = > ft_convert_units(sens, 'mm')? > > Eelke > > > On Mon, 14 Jan 2019 at 10:52, Elene Beitia Loinaz > wrote: > > > > Dear fieldtripers, > > > > I am tryng to visualize the electrodes and the headmodel at the same time. The problem that I have is that I need to reescale one of them. > > > > I have tried to function ft_convert_units, but I just obtain the image attached. > > > > The structure of the information are the next ones, > > headmodel: > > bnd: [1×3 struct] > > cond: [0.3300 0.0041 0.3300] > > mat: [3000×3000 double] > > type: 'dipoli' > > unit: 'mm' > > electrodes: > > pnt: [133×3 double] > > label: {1×133 cell} > > > > Code that I have used to obtained the image below: > > ft_determine_coordsys (vol, 'interactive','no') > > > > > > figure; > > sens=data.elec; > > sens=ft_convert_units(sens, 'cm'); > > ft_plot_vol(vol,'facecolor','skin','edgecolor','none') > > ft_plot_sens(sens,'elecsize',10) > > camlight > > alpha 0.5 > > > > If somebody could help my I would be very grateful, > > > > Elene > > > > > > > > _______________________________________________ > > fieldtrip mailing list > > https://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > https://doi.org/10.1371/journal.pcbi.1002202 From pdhami06 at gmail.com Mon Jan 14 18:26:22 2019 From: pdhami06 at gmail.com (Paul Dhami) Date: Mon, 14 Jan 2019 12:26:22 -0500 Subject: [FieldTrip] Applying Bonferroni Correction to Alpha Parameter Instead of ANOVA Message-ID: Dear Fieldtrip community, I have an ERP experiment with a 2 x 2 design (lets say with one factor having levels A and B and the other having factors 1 and 2), both being within groups measures. As stated in the interaction page, I can't use that to test for an ANOVA design when both factors are within group measures. Instead of running an ANOVA, I was thinking of running separate contrasts of interest, which would be A1 vs A2 and B1 vs B2. My question is: 1) to correct for now the multiple contrasts, would simply setting the alpha parameter (which is used for the inference of accepting or rejecting the null hypothesis) to 0.5/2 be acceptable? What if I wanted to test all possible contrasts, would I simply then divide my alpha parameter by the number of contrasts I have? Any input would be appreciated. Best, Paul -------------- next part -------------- An HTML attachment was scrubbed... URL: From martin.rosenfelder at uni-ulm.de Mon Jan 14 18:29:12 2019 From: martin.rosenfelder at uni-ulm.de (Martin Rosenfelder) Date: Mon, 14 Jan 2019 18:29:12 +0100 Subject: [FieldTrip] redefining data set Message-ID: <21d7-5c3cc700-27-21893940@52196402> Dear Fieldtrip community, I have preprocessed a single dataset with two different conditions ('Swim', 'Rest'). The conditions are stored in the 'eventvalue' field of the cfg as 1x2 cell array. The event values are stored in the 'data_ref.cfg.previous.previous.previous{1,1}.previous.previous.trialdef.eventvalue' field of the data set. Having done the preprocessing I now would like to do ft_timelockanalysis and ft_freqanalysis on the data. Afterwards I statistically compare the two conditions using ft_timelockstatistics and ft_freqstatistics. How can I split the data set according to the event values ('Swim', 'Rest')? I need the event values to split the data set into the two trial classes in the ft_timelockanalysis / ft_freqanalysis and to compare these two conditions. I tried ft_redefinetrial, but do not know how to define the cfg.trials field of this function. % trial redefinition % containing only trials in the 'swim' condition cfg.trials = (1, data_ref.cfg.previous.previous.previous{1,1}.previous.previous.trialdef.eventvalue(1,1)); swim = ft_redefinetrial(cfg,data_ref); % containing only trials in the 'resting' condition cfg.trials = (1, data_ref.cfg.previous.previous.previous{1,1}.previous.previous.trialdef.eventvalue(1,2)); rest = ft_redefinetrial(cfg,data_ref); I hope the description was quite clear. In case, I can provide some more lines of code to clarify the issue. Thank you very much in advance for your advice! Best regards, Martin -- M.Sc.-Psych. Martin Rosenfelder Wissenschaftlicher Mitarbeiter Klinische und Biologische Psychologie Universität Ulm Raum 47.2.259 +49 731-50 26592 martin.rosenfelder at uni-ulm.de From julian.keil at gmail.com Mon Jan 14 18:53:39 2019 From: julian.keil at gmail.com (Julian Keil) Date: Mon, 14 Jan 2019 18:53:39 +0100 Subject: [FieldTrip] redefining data set In-Reply-To: <21d7-5c3cc700-27-21893940@52196402> References: <21d7-5c3cc700-27-21893940@52196402> Message-ID: <1D4E7FC4-1222-43C3-AB4B-D6799C1D7F7A@gmail.com> Dear Martin, I’m not quite sure what you have in the previous…-fields, but cfg.trials need trial indices (e.g. „swim“ is trial [1, 3, 5, 7, 23]). You could use something like find(cfg.previous…{1,1} == 1) to get the indices where your eventvalue matches your category. Please keep in mind though that these „previous“-fields might not get updated if you throw out trials (e.g. due to artefacts), so you need to double-check if the trial selection matches your number of trials in data_ref. Alternatively, you can store condition information in the „trialinfo“-field. This gets updated if you throw out trials, so you don’t have to worry about this. I hope this helps. Best, Julian > Am 14.01.2019 um 18:29 schrieb Martin Rosenfelder : > > Dear Fieldtrip community, > > I have preprocessed a single dataset with two different conditions ('Swim', 'Rest'). The conditions are stored in the 'eventvalue' field of the cfg as 1x2 cell array. The event values are stored in the 'data_ref.cfg.previous.previous.previous{1,1}.previous.previous.trialdef.eventvalue' field of the data set. > Having done the preprocessing I now would like to do ft_timelockanalysis and ft_freqanalysis on the data. Afterwards I statistically compare the two conditions using ft_timelockstatistics and ft_freqstatistics. > How can I split the data set according to the event values ('Swim', 'Rest')? I need the event values to split the data set into the two trial classes in the ft_timelockanalysis / ft_freqanalysis and to compare these two conditions. > > I tried ft_redefinetrial, but do not know how to define the cfg.trials field of this function. > > % trial redefinition > > % containing only trials in the 'swim' condition > cfg.trials = (1, data_ref.cfg.previous.previous.previous{1,1}.previous.previous.trialdef.eventvalue(1,1)); > swim = ft_redefinetrial(cfg,data_ref); > > % containing only trials in the 'resting' condition > cfg.trials = (1, data_ref.cfg.previous.previous.previous{1,1}.previous.previous.trialdef.eventvalue(1,2)); > rest = ft_redefinetrial(cfg,data_ref); > > I hope the description was quite clear. In case, I can provide some more lines of code to clarify the issue. > > Thank you very much in advance for your advice! > > Best regards, > Martin > > -- > M.Sc.-Psych. Martin Rosenfelder > Wissenschaftlicher Mitarbeiter > Klinische und Biologische Psychologie > Universität Ulm > Raum 47.2.259 > +49 731-50 26592 > martin.rosenfelder at uni-ulm.de > > > _______________________________________________ > fieldtrip mailing list > https://mailman.science.ru.nl/mailman/listinfo/fieldtrip > https://doi.org/10.1371/journal.pcbi.1002202 From stephen.whitmarsh at gmail.com Mon Jan 14 19:01:23 2019 From: stephen.whitmarsh at gmail.com (Stephen Whitmarsh) Date: Mon, 14 Jan 2019 19:01:23 +0100 Subject: [FieldTrip] redefining data set In-Reply-To: <21d7-5c3cc700-27-21893940@52196402> References: <21d7-5c3cc700-27-21893940@52196402> Message-ID: Dear Martin, Use ft_selectdata instead of ft_redefinetrial. "cfg.previous.previous.previous{1,1}.previous.previous.trialdef.eventvalue(1,2)" is scary! And I can imagine very inconvenient, as it will move deeper and deeper in to infinite previousnessness. Instead, one of the best 'easter eggs' (i.e. not so well-documented functionality) of FieldTrip is to create extra columns of info in your .trl when using preprocessing to epoch your data. These extra columns will then enter into a field .trialinfo of your data. Most if not all functions, such as ft_selectdata (selecting trials) will update that field. So I advice you to put your eventvalue (as well as RT, response, etc. etc.) as columns in your trialinfo (so same nr. of rows as your nr. of trials). In this way, they will travel with your data, and stay in the same structure and on the same level whatever happens. Cheers, Stephen On Mon, 14 Jan 2019 at 18:47, Martin Rosenfelder < martin.rosenfelder at uni-ulm.de> wrote: > Dear Fieldtrip community, > > I have preprocessed a single dataset with two different conditions > ('Swim', 'Rest'). The conditions are stored in the 'eventvalue' field of > the cfg as 1x2 cell array. The event values are stored in the > 'data_ref.cfg.previous.previous.previous{1,1}.previous.previous.trialdef.eventvalue' > field of the data set. > Having done the preprocessing I now would like to do ft_timelockanalysis > and ft_freqanalysis on the data. Afterwards I statistically compare the two > conditions using ft_timelockstatistics and ft_freqstatistics. > How can I split the data set according to the event values ('Swim', > 'Rest')? I need the event values to split the data set into the two trial > classes in the ft_timelockanalysis / ft_freqanalysis and to compare these > two conditions. > > I tried ft_redefinetrial, but do not know how to define the cfg.trials > field of this function. > > % trial redefinition > > % containing only trials in the 'swim' condition > cfg.trials = (1, > data_ref.cfg.previous.previous.previous{1,1}.previous.previous.trialdef.eventvalue(1,1)); > swim = ft_redefinetrial(cfg,data_ref); > > % containing only trials in the 'resting' condition > cfg.trials = (1, > data_ref.cfg.previous.previous.previous{1,1}.previous.previous.trialdef.eventvalue(1,2)); > rest = ft_redefinetrial(cfg,data_ref); > > I hope the description was quite clear. In case, I can provide some more > lines of code to clarify the issue. > > Thank you very much in advance for your advice! > > Best regards, > Martin > > -- > M.Sc.-Psych. Martin Rosenfelder > Wissenschaftlicher Mitarbeiter > Klinische und Biologische Psychologie > Universität Ulm > Raum 47.2.259 > +49 731-50 26592 > martin.rosenfelder at uni-ulm.de > > > _______________________________________________ > 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 elene.beitia at alumni.mondragon.edu Mon Jan 14 19:03:36 2019 From: elene.beitia at alumni.mondragon.edu (Elene Beitia Loinaz) Date: Mon, 14 Jan 2019 19:03:36 +0100 Subject: [FieldTrip] Source reconstructions In-Reply-To: References: Message-ID: Thank you, that was the problem!!! El lun., 14 ene. 2019 12:53, Eelke Spaak escribió: > Ah sorry, I was getting your previous replies with a delay. If 'mm' > makes them even smaller, perhaps 'm' is the right unit? In any case, I > very strongly suspect that a spatial unit mismatch is the cause of the > discrepancy you're seeing. > > Cheers, > Eelke > > On Mon, 14 Jan 2019 at 11:54, Eelke Spaak wrote: > > > > Perhaps a stupid question but have you also tried sens = > > ft_convert_units(sens, 'mm')? > > > > Eelke > > > > > > On Mon, 14 Jan 2019 at 10:52, Elene Beitia Loinaz > > wrote: > > > > > > Dear fieldtripers, > > > > > > I am tryng to visualize the electrodes and the headmodel at the same > time. The problem that I have is that I need to reescale one of them. > > > > > > I have tried to function ft_convert_units, but I just obtain the image > attached. > > > > > > The structure of the information are the next ones, > > > headmodel: > > > bnd: [1×3 struct] > > > cond: [0.3300 0.0041 0.3300] > > > mat: [3000×3000 double] > > > type: 'dipoli' > > > unit: 'mm' > > > electrodes: > > > pnt: [133×3 double] > > > label: {1×133 cell} > > > > > > Code that I have used to obtained the image below: > > > ft_determine_coordsys (vol, 'interactive','no') > > > > > > > > > figure; > > > sens=data.elec; > > > sens=ft_convert_units(sens, 'cm'); > > > ft_plot_vol(vol,'facecolor','skin','edgecolor','none') > > > ft_plot_sens(sens,'elecsize',10) > > > camlight > > > alpha 0.5 > > > > > > If somebody could help my I would be very grateful, > > > > > > Elene > > > > > > > > > > > > _______________________________________________ > > > 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 J.Verhoef at donders.ru.nl Tue Jan 15 11:18:18 2019 From: J.Verhoef at donders.ru.nl (Verhoef, J.P. (Julia)) Date: Tue, 15 Jan 2019 10:18:18 +0000 Subject: [FieldTrip] Postdoc position in Linguistics for Research Consortium 'Language in Interaction' (1, 0 fte) Message-ID: Postdoc position in Linguistics for Research Consortium 'Language in Interaction' (1,0 fte) Dutch Research Consortium 'Language in Interaction' Application deadline: February 17, 2019, 23:59 CET [Logo][Logo NWO] Responsibilities The Language in Interaction research consortium invites applications for a postdoctoral position in Linguistics. We are looking for a candidate with a background in theoretical and/or computational linguistics. You will contribute to the integration of linguistic expertise into the empirical research performed by teams of researchers in our consortium that are collaborating to collectively address the key questions of our field. You will be provided the opportunity to conduct research in one or more research areas relevant to the position. Supervision of BSc, MSc and PhD projects will be part of your responsibilities. You will be provided with budgetary resources for travel, materials and lab-use. This position provides the opportunity for conducting world-class research as a member of an interdisciplinary team. Moreover, it will provide the opportunity to contribute to developing a theoretical framework for our understanding of the human language faculty. Work environment The Netherlands has an outstanding track record in the language sciences. The research consortium ‘Language in Interaction’, sponsored by a large grant from the Netherlands Organization for Scientific research (NWO), brings together many of the excellent research groups in the Netherlands with a research programme on the foundations of language. In addition to excellence in the domain of language and related relevant fields of cognition, our consortium provides state-of-the-art research facilities and a research team with ample experience in the complex research methods that will be invoked to address the scientific questions at the highest level of methodological sophistication. These include methods from genetics, neuroimaging, computational modelling, and patient-related research. This consortium realizes both quality and critical mass for studying human language at a scale not easily found anywhere else. We have identified five Big Questions (BQ) that are central to our understanding of the human language faculty. These questions are interrelated at multiple levels. Teams of researchers will collaborate to collectively address these key questions of our field. Our five Big Questions are: BQ1: The nature of the mental lexicon: How to bridge neurobiology and psycholinguistic theory by computational modelling? BQ2: What are the characteristics and consequences of internal brain organization for language? BQ3: Creating a shared cognitive space: How is language grounded in and shaped by communicative settings of interacting people? BQ4: Variability in language processing and in language learning: Why does the ability to learn language change with age? How can we characterise and map individual language skills in relation to the population distribution? BQ5: How are other cognitive systems shaped by the presence of a language system in humans? Successful candidates will be appointed at one of the consortium’s home institutions, depending on the position applied for. All successful candidates will become members of our Big Question teams. The research is conducted in an international setting at all participating institutions. English is the lingua franca. You will be appointed at the Max Planck Institute for Psycholinguistics, Nijmegen, The Netherlands. You will be supervised by Peter Hagoort, programme director of the Language in Interaction consortium. The research is conducted in an international setting at all participating institutions. English is the lingua franca. What we expect from you We are looking for highly motivated candidates to enrich a unique consortium of researchers that aims to unravel the neurocognitive mechanisms of language at multiple levels. The goal is to understand both the universality and the variability of the human language faculty from genes to behaviour. · a PhD in Linguistics; · an integrative mindset; · a theory-driven approach; · good communication skills; · strong motivation; · excellent proficiency in written and spoken English. What we have to offer · Full-time position (39 hours per week) with a term of appointment of 4 years. · The salary is according to the German TVöD (Tarifvertrag für den öffentlichen Dienst) and is classified in salary group E13 (depending on the experience of the applicant between EUR 3.827,03 and EUR 5.683,28 gross per month, based on a full-time employment). · In addition to the salary: an 8% holiday allowance · The Max Planck Institute involved has a number of regulations that make it possible for employees to create a good work-life balance. Other Information The institute involved is an equal opportunity employer, committed to building a culturally diverse intellectual community, and as such encourages applications from women and minorities. Would you like to know more? Further information on: the Language in Interaction Consortium. Further information on: Donders Institute for Brain, Cognition and Behaviour For more information about this vacancy, please contact: Prof. dr. Peter Hagoort, programme director Language in Interaction and director of DCCN and MPI Telephone: +31 24 3610648, +31 24 3521301 E-mail: p.hagoort at donders.ru.nl Are you interested? Please submit your application (attn. of Prof. dr. P. Hagoort) to j.verhoef at donders.ru.nl in electronic form. Your application should include (and be limited to) the following attachments: · a cover letter, · your curriculum vitae, including a list of publications and the names of at least two persons who can provide references. Application deadline: February 17, 2019, 23:59 CET. Kind regards, Julia Verhoef Secretary - Language in Interaction Consortium Radboud University | Donders Centre for Cognitive Neuroimaging (DCCN) Room 0.026 Kapittelweg 29, 6525 EN Nijmegen, The Netherlands P.O. Box 9101, 6500 HB, Nijmegen, The Netherlands |T: +31 (0)24 3666272 E: J.Verhoef at donders.ru.nll|Office hours: 9-14 hr on Mon - Fri Follow Language in Interaction on Twitter Like Language in Interaction on Facebook -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image004.jpg Type: image/jpeg Size: 40202 bytes Desc: image004.jpg URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image005.jpg Type: image/jpeg Size: 2461 bytes Desc: image005.jpg URL: From martin.rosenfelder at uni-ulm.de Tue Jan 15 16:20:03 2019 From: martin.rosenfelder at uni-ulm.de (Martin Rosenfelder) Date: Tue, 15 Jan 2019 16:20:03 +0100 Subject: [FieldTrip] =?utf-8?b?Pz09P3V0Zi04P3E/ICByZWRlZmluaW5nIGRhdGEg?= =?utf-8?q?set?= In-Reply-To: Message-ID: <2bb2-5c3dfa00-13-26c45a40@4319113> Dear Stephen, Thank you very much for the hint on ft_selectdata. I tried to build the structure for .trialinfo as you described it in your reply. I did this creating a structure array with the eventvalues as elements. Then I concatenated the .trl matrix and the event value matrix. This however failed, since .trl is a double array and the event value matrix is a struct array. I double-checked that the nr. of rows in the two matrices match each other (120 elements). Is there a way to add the event value matrix (120x1 struct) to the .trl matrix (120x3 double)? Best, Martin -- M.Sc.-Psych. Martin Rosenfelder Wissenschaftlicher Mitarbeiter Klinische und Biologische Psychologie Universität Ulm Raum 47.2.259 +49 731-50 26592 martin.rosenfelder at uni-ulm.de Am Montag, 14. Januar 2019 19:01 CET, Stephen Whitmarsh schrieb: > Dear Martin, > > Use ft_selectdata instead of ft_redefinetrial. > > "cfg.previous.previous.previous{1,1}.previous.previous.trialdef.eventvalue(1,2)" > is scary! And I can imagine very inconvenient, as it will move deeper and > deeper in to infinite previousnessness. > Instead, one of the best 'easter eggs' (i.e. not so well-documented > functionality) of FieldTrip is to create extra columns of info in your .trl > when using preprocessing to epoch your data. These extra columns will then > enter into a field .trialinfo of your data. Most if not all functions, such > as ft_selectdata (selecting trials) will update that field. So I advice you > to put your eventvalue (as well as RT, response, etc. etc.) as columns in > your trialinfo (so same nr. of rows as your nr. of trials). In this way, > they will travel with your data, and stay in the same structure and on the > same level whatever happens. > > Cheers, > Stephen > > > On Mon, 14 Jan 2019 at 18:47, Martin Rosenfelder < > martin.rosenfelder at uni-ulm.de> wrote: > > > Dear Fieldtrip community, > > > > I have preprocessed a single dataset with two different conditions > > ('Swim', 'Rest'). The conditions are stored in the 'eventvalue' field of > > the cfg as 1x2 cell array. The event values are stored in the > > 'data_ref.cfg.previous.previous.previous{1,1}.previous.previous.trialdef.eventvalue' > > field of the data set. > > Having done the preprocessing I now would like to do ft_timelockanalysis > > and ft_freqanalysis on the data. Afterwards I statistically compare the two > > conditions using ft_timelockstatistics and ft_freqstatistics. > > How can I split the data set according to the event values ('Swim', > > 'Rest')? I need the event values to split the data set into the two trial > > classes in the ft_timelockanalysis / ft_freqanalysis and to compare these > > two conditions. > > > > I tried ft_redefinetrial, but do not know how to define the cfg.trials > > field of this function. > > > > % trial redefinition > > > > % containing only trials in the 'swim' condition > > cfg.trials = (1, > > data_ref.cfg.previous.previous.previous{1,1}.previous.previous.trialdef.eventvalue(1,1)); > > swim = ft_redefinetrial(cfg,data_ref); > > > > % containing only trials in the 'resting' condition > > cfg.trials = (1, > > data_ref.cfg.previous.previous.previous{1,1}.previous.previous.trialdef.eventvalue(1,2)); > > rest = ft_redefinetrial(cfg,data_ref); > > > > I hope the description was quite clear. In case, I can provide some more > > lines of code to clarify the issue. > > > > Thank you very much in advance for your advice! > > > > Best regards, > > Martin > > > > -- > > M.Sc.-Psych. Martin Rosenfelder > > Wissenschaftlicher Mitarbeiter > > Klinische und Biologische Psychologie > > Universität Ulm > > Raum 47.2.259 > > +49 731-50 26592 > > martin.rosenfelder at uni-ulm.de > > > > > > _______________________________________________ > > fieldtrip mailing list > > https://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > https://doi.org/10.1371/journal.pcbi.1002202 > > From agnese.zazio at hotmail.it Tue Jan 15 16:36:17 2019 From: agnese.zazio at hotmail.it (Agnese Zazio) Date: Tue, 15 Jan 2019 15:36:17 +0000 Subject: [FieldTrip] Source reconstruction for time-locked EEG data at the group level Message-ID: Dear all, I'm interested in identifying sources of the EEG evoked components I get in the grand average, and I'm not going to apply further statistical analyses on sources. I followed the Fieldtrip tutorial for source reconstruction of MEG event-related fields (http://www.fieldtriptoolbox.org/tutorial/minimumnormestimate/), which is on data from a single subject, and I'm not sure about how to proceed at the group level. I concatenated all trials from all subjects to calculate the covariance and computing the grand average with "ft_timelockanalysis". First, is this an appropriate way to apply mne method in "ft_sourceanalysis" at the group level? Moreover, I was looking for a good way to check the results I obtained, for example by applying another method, such as beamformer. Is it reasonable to think that the two methods would lead to comparable results on time-locked data? If yes, how can I apply the beamformer method in "ft_sourceanalysis"? I replaced the cfg.method field (mne with lcmv), but the output I get does not contain information about time. Here's the code I used. I don't have individual MRIs, thus I am using templates for the headmodel (standard_bem) and the sourcemodel (cortex_5124.surf.gii). --- % create a preprocessed structure cfg =[]; cfg.channel = {'EEG'}; cfg.demean = 'yes'; cfg.baselinewindow = [-0.1 0]; data_prepr = ft_preprocessing(cfg, data_long); cfg =[]; cfg.covariance = 'yes'; cfg.channel ={'EEG'}; cfg.covariancewindow = [0 0.4]; data_tlck = ft_timelockanalysis (cfg, data_prepr); % forward solution [prepare leadfield] cfg = []; cfg.elec = elec; cfg.channel = {'EEG'}; cfg.headmodel = vol; % volume conduction model cfg.grid = ft_read_headshape('cortex_5124.surf.gii'); cfg.grid.pos = sourcemodel.pos; cfg.grid.inside = 1:size(sourcemodel.pos,1); % all source points are inside of the brain leadfield = ft_prepare_leadfield(cfg); % inverse solution (method: mne) cfg = []; cfg.method = 'mne'; %'lcmv'; cfg.elec = elec; cfg.channel = {'EEG'}; cfg.grid = leadfield; cfg.headmodel = vol; cfg.mne.prewhiten = 'yes'; cfg.mne.lambda = 3; cfg.mne.scalesourcecov = 'yes'; source_bial_mne = ft_sourceanalysis(cfg, data_tlck); %%plot bnd.pos = sourcespace.pos; bnd.tri = sourcespace.tri; m=source_bial_mne.avg.pow(:,124); % point in time I want to plot figure; ft_plot_mesh(bnd, 'vertexcolor', m); --- Any help would be really appreciated, thanks in advance! Best, Agnese --- Agnese Zazio, PhD Student Cognitive Neuroscience Section, IRCCS Saint John of God Clinical Research Centre (Brescia, Italy) -------------- next part -------------- An HTML attachment was scrubbed... URL: From stephen.whitmarsh at gmail.com Tue Jan 15 17:40:46 2019 From: stephen.whitmarsh at gmail.com (Stephen Whitmarsh) Date: Tue, 15 Jan 2019 17:40:46 +0100 Subject: [FieldTrip] ?==?utf-8?q? redefining data set In-Reply-To: <2bb2-5c3dfa00-13-26c45a40@4319113> References: <2bb2-5c3dfa00-13-26c45a40@4319113> Message-ID: Hi Martin, No indeed, your conditions/RT/events should indeed be (re)coded as single values. This also makes selecting trials etc. much easier with logical expressions, e.g. you can then simply do cfg.trials = (data.trialinfo(:,1) == 3 && data.trialinfo(:,2) > 0.5, where the first column e.g. is your condition, and the second RT, to just give an example. Cheers, Stephen On Tue, 15 Jan 2019 at 17:35, Martin Rosenfelder < martin.rosenfelder at uni-ulm.de> wrote: > Dear Stephen, > > Thank you very much for the hint on ft_selectdata. > > I tried to build the structure for .trialinfo as you described it in your > reply. I did this creating a structure array with the eventvalues as > elements. > Then I concatenated the .trl matrix and the event value matrix. This > however failed, since .trl is a double array and the event value matrix is > a struct array. > I double-checked that the nr. of rows in the two matrices match each other > (120 elements). > > Is there a way to add the event value matrix (120x1 struct) to the .trl > matrix (120x3 double)? > > Best, > Martin > > > -- > M.Sc.-Psych. Martin Rosenfelder > Wissenschaftlicher Mitarbeiter > Klinische und Biologische Psychologie > Universität Ulm > Raum 47.2.259 > +49 731-50 26592 > martin.rosenfelder at uni-ulm.de > > Am Montag, 14. Januar 2019 19:01 CET, Stephen Whitmarsh < > stephen.whitmarsh at gmail.com> schrieb: > > > Dear Martin, > > > > Use ft_selectdata instead of ft_redefinetrial. > > > > > "cfg.previous.previous.previous{1,1}.previous.previous.trialdef.eventvalue(1,2)" > > is scary! And I can imagine very inconvenient, as it will move deeper and > > deeper in to infinite previousnessness. > > Instead, one of the best 'easter eggs' (i.e. not so well-documented > > functionality) of FieldTrip is to create extra columns of info in your > .trl > > when using preprocessing to epoch your data. These extra columns will > then > > enter into a field .trialinfo of your data. Most if not all functions, > such > > as ft_selectdata (selecting trials) will update that field. So I advice > you > > to put your eventvalue (as well as RT, response, etc. etc.) as columns in > > your trialinfo (so same nr. of rows as your nr. of trials). In this way, > > they will travel with your data, and stay in the same structure and on > the > > same level whatever happens. > > > > Cheers, > > Stephen > > > > > > On Mon, 14 Jan 2019 at 18:47, Martin Rosenfelder < > > martin.rosenfelder at uni-ulm.de> wrote: > > > > > Dear Fieldtrip community, > > > > > > I have preprocessed a single dataset with two different conditions > > > ('Swim', 'Rest'). The conditions are stored in the 'eventvalue' field > of > > > the cfg as 1x2 cell array. The event values are stored in the > > > > 'data_ref.cfg.previous.previous.previous{1,1}.previous.previous.trialdef.eventvalue' > > > field of the data set. > > > Having done the preprocessing I now would like to do > ft_timelockanalysis > > > and ft_freqanalysis on the data. Afterwards I statistically compare > the two > > > conditions using ft_timelockstatistics and ft_freqstatistics. > > > How can I split the data set according to the event values ('Swim', > > > 'Rest')? I need the event values to split the data set into the two > trial > > > classes in the ft_timelockanalysis / ft_freqanalysis and to compare > these > > > two conditions. > > > > > > I tried ft_redefinetrial, but do not know how to define the cfg.trials > > > field of this function. > > > > > > % trial redefinition > > > > > > % containing only trials in the 'swim' condition > > > cfg.trials = (1, > > > > data_ref.cfg.previous.previous.previous{1,1}.previous.previous.trialdef.eventvalue(1,1)); > > > swim = ft_redefinetrial(cfg,data_ref); > > > > > > % containing only trials in the 'resting' condition > > > cfg.trials = (1, > > > > data_ref.cfg.previous.previous.previous{1,1}.previous.previous.trialdef.eventvalue(1,2)); > > > rest = ft_redefinetrial(cfg,data_ref); > > > > > > I hope the description was quite clear. In case, I can provide some > more > > > lines of code to clarify the issue. > > > > > > Thank you very much in advance for your advice! > > > > > > Best regards, > > > Martin > > > > > > -- > > > M.Sc.-Psych. Martin Rosenfelder > > > Wissenschaftlicher Mitarbeiter > > > Klinische und Biologische Psychologie > > > Universität Ulm > > > Raum 47.2.259 > > > +49 731-50 26592 > > > martin.rosenfelder at uni-ulm.de > > > > > > > > > _______________________________________________ > > > 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 jan.schoffelen at donders.ru.nl Tue Jan 15 17:43:14 2019 From: jan.schoffelen at donders.ru.nl (Schoffelen, J.M. (Jan Mathijs)) Date: Tue, 15 Jan 2019 16:43:14 +0000 Subject: [FieldTrip] ?==?utf-8?q? redefining data set In-Reply-To: References: <2bb2-5c3dfa00-13-26c45a40@4319113> Message-ID: <855A27CB-F840-43CD-A39C-755734B3177B@donders.ru.nl> If I may chime in: are you by any chance looking for data.trialinfo(:,x) = [event.value]’ ? Best JM On 15 Jan 2019, at 17:40, Stephen Whitmarsh > wrote: Hi Martin, No indeed, your conditions/RT/events should indeed be (re)coded as single values. This also makes selecting trials etc. much easier with logical expressions, e.g. you can then simply do cfg.trials = (data.trialinfo(:,1) == 3 && data.trialinfo(:,2) > 0.5, where the first column e.g. is your condition, and the second RT, to just give an example. Cheers, Stephen On Tue, 15 Jan 2019 at 17:35, Martin Rosenfelder > wrote: Dear Stephen, Thank you very much for the hint on ft_selectdata. I tried to build the structure for .trialinfo as you described it in your reply. I did this creating a structure array with the eventvalues as elements. Then I concatenated the .trl matrix and the event value matrix. This however failed, since .trl is a double array and the event value matrix is a struct array. I double-checked that the nr. of rows in the two matrices match each other (120 elements). Is there a way to add the event value matrix (120x1 struct) to the .trl matrix (120x3 double)? Best, Martin -- M.Sc.-Psych. Martin Rosenfelder Wissenschaftlicher Mitarbeiter Klinische und Biologische Psychologie Universität Ulm Raum 47.2.259 +49 731-50 26592 martin.rosenfelder at uni-ulm.de Am Montag, 14. Januar 2019 19:01 CET, Stephen Whitmarsh > schrieb: > Dear Martin, > > Use ft_selectdata instead of ft_redefinetrial. > > "cfg.previous.previous.previous{1,1}.previous.previous.trialdef.eventvalue(1,2)" > is scary! And I can imagine very inconvenient, as it will move deeper and > deeper in to infinite previousnessness. > Instead, one of the best 'easter eggs' (i.e. not so well-documented > functionality) of FieldTrip is to create extra columns of info in your .trl > when using preprocessing to epoch your data. These extra columns will then > enter into a field .trialinfo of your data. Most if not all functions, such > as ft_selectdata (selecting trials) will update that field. So I advice you > to put your eventvalue (as well as RT, response, etc. etc.) as columns in > your trialinfo (so same nr. of rows as your nr. of trials). In this way, > they will travel with your data, and stay in the same structure and on the > same level whatever happens. > > Cheers, > Stephen > > > On Mon, 14 Jan 2019 at 18:47, Martin Rosenfelder < > martin.rosenfelder at uni-ulm.de> wrote: > > > Dear Fieldtrip community, > > > > I have preprocessed a single dataset with two different conditions > > ('Swim', 'Rest'). The conditions are stored in the 'eventvalue' field of > > the cfg as 1x2 cell array. The event values are stored in the > > 'data_ref.cfg.previous.previous.previous{1,1}.previous.previous.trialdef.eventvalue' > > field of the data set. > > Having done the preprocessing I now would like to do ft_timelockanalysis > > and ft_freqanalysis on the data. Afterwards I statistically compare the two > > conditions using ft_timelockstatistics and ft_freqstatistics. > > How can I split the data set according to the event values ('Swim', > > 'Rest')? I need the event values to split the data set into the two trial > > classes in the ft_timelockanalysis / ft_freqanalysis and to compare these > > two conditions. > > > > I tried ft_redefinetrial, but do not know how to define the cfg.trials > > field of this function. > > > > % trial redefinition > > > > % containing only trials in the 'swim' condition > > cfg.trials = (1, > > data_ref.cfg.previous.previous.previous{1,1}.previous.previous.trialdef.eventvalue(1,1)); > > swim = ft_redefinetrial(cfg,data_ref); > > > > % containing only trials in the 'resting' condition > > cfg.trials = (1, > > data_ref.cfg.previous.previous.previous{1,1}.previous.previous.trialdef.eventvalue(1,2)); > > rest = ft_redefinetrial(cfg,data_ref); > > > > I hope the description was quite clear. In case, I can provide some more > > lines of code to clarify the issue. > > > > Thank you very much in advance for your advice! > > > > Best regards, > > Martin > > > > -- > > M.Sc.-Psych. Martin Rosenfelder > > Wissenschaftlicher Mitarbeiter > > Klinische und Biologische Psychologie > > Universität Ulm > > Raum 47.2.259 > > +49 731-50 26592 > > martin.rosenfelder at uni-ulm.de > > > > > > _______________________________________________ > > 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 elene.beitia at alumni.mondragon.edu Wed Jan 16 09:00:26 2019 From: elene.beitia at alumni.mondragon.edu (Elene Beitia Loinaz) Date: Wed, 16 Jan 2019 09:00:26 +0100 Subject: [FieldTrip] headmodel and electrodes alignment Message-ID: Dear fieldtriprs, I still have problemns in aligning correctly the headmodel and the electrodes. Although now both have the correct size, the electrodes do not correctly fit the head. *This is my code:* headmodel=ft_read_vol('standard_vol.mat'); %then we realign them cfg=[]; cfg.method= 'interactive'; %'interactive'% cfg.headshape=headmodel.bnd(1); %the skin surface elec_realigned =ft_electroderealign(cfg,data1.elec); [image: Captura de pantalla 2019-01-16 a las 8.51.49.png] *These are the structures used:* data1.elec structure chanpos: [128×3 double] chantype: {128×1 cell} chanunit: {128×1 cell} elecpos: [128×3 double] label: {1×128 cell} type: 'biosemi128' unit: 'dm' standard_vol structure bnd: [1×3 struct] cond: [0.3300 0.0041 0.3300] mat: [3000×3000 double] type: 'dipoli' unit: 'mm' Thank you in advance, Elene. -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: Captura de pantalla 2019-01-16 a las 8.51.49.png Type: image/png Size: 277926 bytes Desc: not available URL: From stephen.whitmarsh at gmail.com Wed Jan 16 09:55:17 2019 From: stephen.whitmarsh at gmail.com (Stephen Whitmarsh) Date: Wed, 16 Jan 2019 09:55:17 +0100 Subject: [FieldTrip] headmodel and electrodes alignment In-Reply-To: References: Message-ID: Hi Elene, After 'interactive' mode to give it a good start, I use the output for another iteration of automatic 'headshape' method for a tight fit. Hope this helps, Stephen On Wed, 16 Jan 2019 at 09:31, Elene Beitia Loinaz < elene.beitia at alumni.mondragon.edu> wrote: > Dear fieldtriprs, > > I still have problemns in aligning correctly the headmodel and the > electrodes. Although now both have the correct size, the electrodes do not > correctly fit the head. > > *This is my code:* > headmodel=ft_read_vol('standard_vol.mat'); > > > > %then we realign them > > cfg=[]; > > cfg.method= 'interactive'; %'interactive'% > > cfg.headshape=headmodel.bnd(1); %the skin surface > > elec_realigned =ft_electroderealign(cfg,data1.elec); > > > > [image: Captura de pantalla 2019-01-16 a las 8.51.49.png] > > *These are the structures used:* > > data1.elec structure > chanpos: [128×3 double] > chantype: {128×1 cell} > chanunit: {128×1 cell} > elecpos: [128×3 double] > label: {1×128 cell} > type: 'biosemi128' > unit: 'dm' > > standard_vol structure > bnd: [1×3 struct] > cond: [0.3300 0.0041 0.3300] > mat: [3000×3000 double] > type: 'dipoli' > unit: 'mm' > > Thank you in advance, > Elene. > _______________________________________________ > 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 elene.beitia at alumni.mondragon.edu Wed Jan 16 10:09:49 2019 From: elene.beitia at alumni.mondragon.edu (Elene Beitia Loinaz) Date: Wed, 16 Jan 2019 10:09:49 +0100 Subject: [FieldTrip] headmodel and electrodes alignment In-Reply-To: References: Message-ID: Hi Stephen, Thank you for your answer. I already try that, but the result that I obtained is not correct either. Code: cfg=[]; cfg.method= 'headshape'; cfg.headshape=headmodel.bnd(1); % this is the skin surface elec_realigned =ft_electroderealign(cfg,data1.elec); %Plot the result to see if is correct vol = ft_convert_units(vol,'mm'); elec_realigned = ft_convert_units(elec_realigned,'mm') figure ft_plot_sens(elec_realigned, 'style', 'b'); hold on ft_plot_vol(vol); [image: Captura de pantalla 2019-01-16 a las 9.59.14.png] Thank you in advance, Elene. -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: Captura de pantalla 2019-01-16 a las 9.59.14.png Type: image/png Size: 122845 bytes Desc: not available URL: From julian.keil at gmail.com Wed Jan 16 10:41:53 2019 From: julian.keil at gmail.com (Julian Keil) Date: Wed, 16 Jan 2019 10:41:53 +0100 Subject: [FieldTrip] headmodel and electrodes alignment In-Reply-To: References: Message-ID: <089238D1-F8D9-4B35-9908-E4C51D919C40@gmail.com> Hi Elene, please excuse the probably useless question, but did you try to move the electrodes around in the „interactive“-mode? You write: "still have problemns in aligning correctly the headmodel and the electrodes. Although now both have the correct size, the electrodes do not correctly fit the head.“ It is not surprising that the electrodes don’t fit perfectly. That’s why you can use the „rotate“, „scale“ and „translate“-settings to move the electrodes around until they fit better. Cheers, Julian > Am 16.01.2019 um 10:09 schrieb Elene Beitia Loinaz : > > Hi Stephen, > > Thank you for your answer. I already try that, but the result that I obtained is not correct either. > > Code: > > cfg=[]; > cfg.method= 'headshape'; > cfg.headshape=headmodel.bnd(1); % this is the skin surface > elec_realigned =ft_electroderealign(cfg,data1.elec); > > %Plot the result to see if is correct > > vol = ft_convert_units(vol,'mm'); > elec_realigned = ft_convert_units(elec_realigned,'mm') > > figure > ft_plot_sens(elec_realigned, 'style', 'b'); > > hold on > ft_plot_vol(vol); > > > > Thank you in advance, > > Elene. > _______________________________________________ > 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 stephen.whitmarsh at gmail.com Wed Jan 16 10:45:32 2019 From: stephen.whitmarsh at gmail.com (Stephen Whitmarsh) Date: Wed, 16 Jan 2019 10:45:32 +0100 Subject: [FieldTrip] headmodel and electrodes alignment In-Reply-To: References: Message-ID: Hi Elene, In the code you do not use ft_electroderealign twice (once manually, then automatic). Also, you convert units after realignment. For the sake of debugging and clarity, I would: 1. - figure out and set the units correctly for you headmodel and electrodes 2. - convert headmodel and electrodes to same units 3. - plot to check 4. - use 'interactive' realignment 5. - plot to check 6. - use 'headmodel' realignment 7. - plot to check Cheers, Stephen On Wed, 16 Jan 2019 at 10:35, Elene Beitia Loinaz < elene.beitia at alumni.mondragon.edu> wrote: > Hi Stephen, > > Thank you for your answer. I already try that, but the result that I > obtained is not correct either. > > Code: > > cfg=[]; > > cfg.method= 'headshape'; > > cfg.headshape=headmodel.bnd(1); % this is the skin surface > > elec_realigned =ft_electroderealign(cfg,data1.elec); > > > > %Plot the result to see if is correct > > > > vol = ft_convert_units(vol,'mm'); > > elec_realigned = ft_convert_units(elec_realigned,'mm') > > > > figure > > ft_plot_sens(elec_realigned, 'style', 'b'); > > > > hold on > > ft_plot_vol(vol); > > [image: Captura de pantalla 2019-01-16 a las 9.59.14.png] > > Thank you in advance, > > Elene. > _______________________________________________ > 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 martin.rosenfelder at uni-ulm.de Wed Jan 16 16:57:22 2019 From: martin.rosenfelder at uni-ulm.de (Martin Rosenfelder) Date: Wed, 16 Jan 2019 16:57:22 +0100 Subject: [FieldTrip] =?utf-8?b?Pz09P3V0Zi04P3E/ID89PT91dGYtOD9xPyA/PSBy?= =?utf-8?q?edefining_data_se?= In-Reply-To: Message-ID: <47c7-5c3f5480-13-26d82bc0@58067294> Hi Stephen, Exactly, preferably, the events should be single values in a struct array or a cell array. This can then be added to the existing trial array. So far so good. However, my dataset misses a .trialinfo field after calling ft_preprocessing, to which I could add the cell array with the condition labels. I then added the array with the condition labels to 'mydataset.trial'. Unfortunately, this seems to confuse the ft_rejectvisual I call afterwards for artifact rejection. Do I have to create the .trialinfo-field by hand to my dataset? Best, Martin -- M.Sc.-Psych. Martin Rosenfelder Wissenschaftlicher Mitarbeiter Klinische und Biologische Psychologie Universität Ulm Raum 47.2.259 +49 731-50 26592 martin.rosenfelder at uni-ulm.de Am Dienstag, 15. Januar 2019 17:40 CET, Stephen Whitmarsh schrieb: > Hi Martin, > > No indeed, your conditions/RT/events should indeed be (re)coded as single > values. This also makes selecting trials etc. much easier with logical > expressions, e.g. you can then simply do cfg.trials = (data.trialinfo(:,1) > == 3 && data.trialinfo(:,2) > 0.5, where the first column e.g. is your > condition, and the second RT, to just give an example. > > Cheers, > Stephen > > On Tue, 15 Jan 2019 at 17:35, Martin Rosenfelder < > martin.rosenfelder at uni-ulm.de> wrote: > > > Dear Stephen, > > > > Thank you very much for the hint on ft_selectdata. > > > > I tried to build the structure for .trialinfo as you described it in your > > reply. I did this creating a structure array with the eventvalues as > > elements. > > Then I concatenated the .trl matrix and the event value matrix. This > > however failed, since .trl is a double array and the event value matrix is > > a struct array. > > I double-checked that the nr. of rows in the two matrices match each other > > (120 elements). > > > > Is there a way to add the event value matrix (120x1 struct) to the .trl > > matrix (120x3 double)? > > > > Best, > > Martin > > > > > > -- > > M.Sc.-Psych. Martin Rosenfelder > > Wissenschaftlicher Mitarbeiter > > Klinische und Biologische Psychologie > > Universität Ulm > > Raum 47.2.259 > > +49 731-50 26592 > > martin.rosenfelder at uni-ulm.de > > > > Am Montag, 14. Januar 2019 19:01 CET, Stephen Whitmarsh < > > stephen.whitmarsh at gmail.com> schrieb: > > > > > Dear Martin, > > > > > > Use ft_selectdata instead of ft_redefinetrial. > > > > > > > > "cfg.previous.previous.previous{1,1}.previous.previous.trialdef.eventvalue(1,2)" > > > is scary! And I can imagine very inconvenient, as it will move deeper and > > > deeper in to infinite previousnessness. > > > Instead, one of the best 'easter eggs' (i.e. not so well-documented > > > functionality) of FieldTrip is to create extra columns of info in your > > .trl > > > when using preprocessing to epoch your data. These extra columns will > > then > > > enter into a field .trialinfo of your data. Most if not all functions, > > such > > > as ft_selectdata (selecting trials) will update that field. So I advice > > you > > > to put your eventvalue (as well as RT, response, etc. etc.) as columns in > > > your trialinfo (so same nr. of rows as your nr. of trials). In this way, > > > they will travel with your data, and stay in the same structure and on > > the > > > same level whatever happens. > > > > > > Cheers, > > > Stephen > > > > > > > > > On Mon, 14 Jan 2019 at 18:47, Martin Rosenfelder < > > > martin.rosenfelder at uni-ulm.de> wrote: > > > > > > > Dear Fieldtrip community, > > > > > > > > I have preprocessed a single dataset with two different conditions > > > > ('Swim', 'Rest'). The conditions are stored in the 'eventvalue' field > > of > > > > the cfg as 1x2 cell array. The event values are stored in the > > > > > > 'data_ref.cfg.previous.previous.previous{1,1}.previous.previous.trialdef.eventvalue' > > > > field of the data set. > > > > Having done the preprocessing I now would like to do > > ft_timelockanalysis > > > > and ft_freqanalysis on the data. Afterwards I statistically compare > > the two > > > > conditions using ft_timelockstatistics and ft_freqstatistics. > > > > How can I split the data set according to the event values ('Swim', > > > > 'Rest')? I need the event values to split the data set into the two > > trial > > > > classes in the ft_timelockanalysis / ft_freqanalysis and to compare > > these > > > > two conditions. > > > > > > > > I tried ft_redefinetrial, but do not know how to define the cfg.trials > > > > field of this function. > > > > > > > > % trial redefinition > > > > > > > > % containing only trials in the 'swim' condition > > > > cfg.trials = (1, > > > > > > data_ref.cfg.previous.previous.previous{1,1}.previous.previous.trialdef.eventvalue(1,1)); > > > > swim = ft_redefinetrial(cfg,data_ref); > > > > > > > > % containing only trials in the 'resting' condition > > > > cfg.trials = (1, > > > > > > data_ref.cfg.previous.previous.previous{1,1}.previous.previous.trialdef.eventvalue(1,2)); > > > > rest = ft_redefinetrial(cfg,data_ref); > > > > > > > > I hope the description was quite clear. In case, I can provide some > > more > > > > lines of code to clarify the issue. > > > > > > > > Thank you very much in advance for your advice! > > > > > > > > Best regards, > > > > Martin > > > > > > > > -- > > > > M.Sc.-Psych. Martin Rosenfelder > > > > Wissenschaftlicher Mitarbeiter > > > > Klinische und Biologische Psychologie > > > > Universität Ulm > > > > Raum 47.2.259 > > > > +49 731-50 26592 > > > > martin.rosenfelder at uni-ulm.de > > > > > > > > > > > > _______________________________________________ > > > > 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 martin.rosenfelder at uni-ulm.de Wed Jan 16 17:08:22 2019 From: martin.rosenfelder at uni-ulm.de (Martin Rosenfelder) Date: Wed, 16 Jan 2019 17:08:22 +0100 Subject: [FieldTrip] =?utf-8?b?Pz09P3V0Zi04P3E/ID89PT91dGYtOD9xPyA/PSBy?= =?utf-8?q?edefining_data_se?= In-Reply-To: <855A27CB-F840-43CD-A39C-755734B3177B@donders.ru.nl> Message-ID: <4b5d-5c3f5700-5-12ad6c40@225121778> Dear Jan Mathijs, Thank you for your tip. The code you suggested does not work with my data set, as there is no .trialinfo field. The same I wrote to Stephen before. I wonder why the .trialinfo field is not being created automatically (as it should?) when calling ft_preprocessing. Do you have an idea why it is like that? Many thanks in advance! Best, Martin -- M.Sc.-Psych. Martin Rosenfelder Wissenschaftlicher Mitarbeiter Klinische und Biologische Psychologie Universität Ulm Raum 47.2.259 +49 731-50 26592 martin.rosenfelder at uni-ulm.de Am Dienstag, 15. Januar 2019 17:43 CET, "Schoffelen, J.M. (Jan Mathijs)" schrieb: > If I may chime in: are you by any chance looking for data.trialinfo(:,x) = [event.value]’ ? > > Best JM > > > On 15 Jan 2019, at 17:40, Stephen Whitmarsh > wrote: > > Hi Martin, > > No indeed, your conditions/RT/events should indeed be (re)coded as single values. This also makes selecting trials etc. much easier with logical expressions, e.g. you can then simply do cfg.trials = (data.trialinfo(:,1) == 3 && data.trialinfo(:,2) > 0.5, where the first column e.g. is your condition, and the second RT, to just give an example. > > Cheers, > Stephen > > On Tue, 15 Jan 2019 at 17:35, Martin Rosenfelder > wrote: > Dear Stephen, > > Thank you very much for the hint on ft_selectdata. > > I tried to build the structure for .trialinfo as you described it in your reply. I did this creating a structure array with the eventvalues as elements. > Then I concatenated the .trl matrix and the event value matrix. This however failed, since .trl is a double array and the event value matrix is a struct array. > I double-checked that the nr. of rows in the two matrices match each other (120 elements). > > Is there a way to add the event value matrix (120x1 struct) to the .trl matrix (120x3 double)? > > Best, > Martin > > > -- > M.Sc.-Psych. Martin Rosenfelder > Wissenschaftlicher Mitarbeiter > Klinische und Biologische Psychologie > Universität Ulm > Raum 47.2.259 > +49 731-50 26592 > martin.rosenfelder at uni-ulm.de > > Am Montag, 14. Januar 2019 19:01 CET, Stephen Whitmarsh > schrieb: > > > Dear Martin, > > > > Use ft_selectdata instead of ft_redefinetrial. > > > > "cfg.previous.previous.previous{1,1}.previous.previous.trialdef.eventvalue(1,2)" > > is scary! And I can imagine very inconvenient, as it will move deeper and > > deeper in to infinite previousnessness. > > Instead, one of the best 'easter eggs' (i.e. not so well-documented > > functionality) of FieldTrip is to create extra columns of info in your .trl > > when using preprocessing to epoch your data. These extra columns will then > > enter into a field .trialinfo of your data. Most if not all functions, such > > as ft_selectdata (selecting trials) will update that field. So I advice you > > to put your eventvalue (as well as RT, response, etc. etc.) as columns in > > your trialinfo (so same nr. of rows as your nr. of trials). In this way, > > they will travel with your data, and stay in the same structure and on the > > same level whatever happens. > > > > Cheers, > > Stephen > > > > > > On Mon, 14 Jan 2019 at 18:47, Martin Rosenfelder < > > martin.rosenfelder at uni-ulm.de> wrote: > > > > > Dear Fieldtrip community, > > > > > > I have preprocessed a single dataset with two different conditions > > > ('Swim', 'Rest'). The conditions are stored in the 'eventvalue' field of > > > the cfg as 1x2 cell array. The event values are stored in the > > > 'data_ref.cfg.previous.previous.previous{1,1}.previous.previous.trialdef.eventvalue' > > > field of the data set. > > > Having done the preprocessing I now would like to do ft_timelockanalysis > > > and ft_freqanalysis on the data. Afterwards I statistically compare the two > > > conditions using ft_timelockstatistics and ft_freqstatistics. > > > How can I split the data set according to the event values ('Swim', > > > 'Rest')? I need the event values to split the data set into the two trial > > > classes in the ft_timelockanalysis / ft_freqanalysis and to compare these > > > two conditions. > > > > > > I tried ft_redefinetrial, but do not know how to define the cfg.trials > > > field of this function. > > > > > > % trial redefinition > > > > > > % containing only trials in the 'swim' condition > > > cfg.trials = (1, > > > data_ref.cfg.previous.previous.previous{1,1}.previous.previous.trialdef.eventvalue(1,1)); > > > swim = ft_redefinetrial(cfg,data_ref); > > > > > > % containing only trials in the 'resting' condition > > > cfg.trials = (1, > > > data_ref.cfg.previous.previous.previous{1,1}.previous.previous.trialdef.eventvalue(1,2)); > > > rest = ft_redefinetrial(cfg,data_ref); > > > > > > I hope the description was quite clear. In case, I can provide some more > > > lines of code to clarify the issue. > > > > > > Thank you very much in advance for your advice! > > > > > > Best regards, > > > Martin > > > > > > -- > > > M.Sc.-Psych. Martin Rosenfelder > > > Wissenschaftlicher Mitarbeiter > > > Klinische und Biologische Psychologie > > > Universität Ulm > > > Raum 47.2.259 > > > +49 731-50 26592 > > > martin.rosenfelder at uni-ulm.de > > > > > > > > > _______________________________________________ > > > 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 > From stephen.whitmarsh at gmail.com Wed Jan 16 17:35:33 2019 From: stephen.whitmarsh at gmail.com (Stephen Whitmarsh) Date: Wed, 16 Jan 2019 17:35:33 +0100 Subject: [FieldTrip] ?= redefining data se In-Reply-To: <47c7-5c3f5480-13-26d82bc0@58067294> References: <47c7-5c3f5480-13-26d82bc0@58067294> Message-ID: Hi Martin, If I understand correctly: If you add columns* to your .trl field* (so after the first 3 that define start/end/offset samples) which you feed into ft_preprocessing, ft_preprocessing will create the .trialinfo field for you, which should track through your analyses. Cheers, Stephen On Wed, 16 Jan 2019 at 17:15, Martin Rosenfelder < martin.rosenfelder at uni-ulm.de> wrote: > Hi Stephen, > > Exactly, preferably, the events should be single values in a struct array > or a cell array. > This can then be added to the existing trial array. So far so good. > > However, my dataset misses a .trialinfo field after calling > ft_preprocessing, to which I could add the cell array with the condition > labels. > I then added the array with the condition labels to 'mydataset.trial'. > Unfortunately, this seems to confuse the ft_rejectvisual I call afterwards > for artifact rejection. > Do I have to create the .trialinfo-field by hand to my dataset? > > Best, > Martin > > > -- > M.Sc.-Psych. Martin Rosenfelder > Wissenschaftlicher Mitarbeiter > Klinische und Biologische Psychologie > Universität Ulm > Raum 47.2.259 > +49 731-50 26592 > martin.rosenfelder at uni-ulm.de > > Am Dienstag, 15. Januar 2019 17:40 CET, Stephen Whitmarsh < > stephen.whitmarsh at gmail.com> schrieb: > > > Hi Martin, > > > > No indeed, your conditions/RT/events should indeed be (re)coded as single > > values. This also makes selecting trials etc. much easier with logical > > expressions, e.g. you can then simply do cfg.trials = > (data.trialinfo(:,1) > > == 3 && data.trialinfo(:,2) > 0.5, where the first column e.g. is your > > condition, and the second RT, to just give an example. > > > > Cheers, > > Stephen > > > > On Tue, 15 Jan 2019 at 17:35, Martin Rosenfelder < > > martin.rosenfelder at uni-ulm.de> wrote: > > > > > Dear Stephen, > > > > > > Thank you very much for the hint on ft_selectdata. > > > > > > I tried to build the structure for .trialinfo as you described it in > your > > > reply. I did this creating a structure array with the eventvalues as > > > elements. > > > Then I concatenated the .trl matrix and the event value matrix. This > > > however failed, since .trl is a double array and the event value > matrix is > > > a struct array. > > > I double-checked that the nr. of rows in the two matrices match each > other > > > (120 elements). > > > > > > Is there a way to add the event value matrix (120x1 struct) to the .trl > > > matrix (120x3 double)? > > > > > > Best, > > > Martin > > > > > > > > > -- > > > M.Sc.-Psych. Martin Rosenfelder > > > Wissenschaftlicher Mitarbeiter > > > Klinische und Biologische Psychologie > > > Universität Ulm > > > Raum 47.2.259 > > > +49 731-50 26592 > > > martin.rosenfelder at uni-ulm.de > > > > > > Am Montag, 14. Januar 2019 19:01 CET, Stephen Whitmarsh < > > > stephen.whitmarsh at gmail.com> schrieb: > > > > > > > Dear Martin, > > > > > > > > Use ft_selectdata instead of ft_redefinetrial. > > > > > > > > > > > > "cfg.previous.previous.previous{1,1}.previous.previous.trialdef.eventvalue(1,2)" > > > > is scary! And I can imagine very inconvenient, as it will move > deeper and > > > > deeper in to infinite previousnessness. > > > > Instead, one of the best 'easter eggs' (i.e. not so well-documented > > > > functionality) of FieldTrip is to create extra columns of info in > your > > > .trl > > > > when using preprocessing to epoch your data. These extra columns will > > > then > > > > enter into a field .trialinfo of your data. Most if not all > functions, > > > such > > > > as ft_selectdata (selecting trials) will update that field. So I > advice > > > you > > > > to put your eventvalue (as well as RT, response, etc. etc.) as > columns in > > > > your trialinfo (so same nr. of rows as your nr. of trials). In this > way, > > > > they will travel with your data, and stay in the same structure and > on > > > the > > > > same level whatever happens. > > > > > > > > Cheers, > > > > Stephen > > > > > > > > > > > > On Mon, 14 Jan 2019 at 18:47, Martin Rosenfelder < > > > > martin.rosenfelder at uni-ulm.de> wrote: > > > > > > > > > Dear Fieldtrip community, > > > > > > > > > > I have preprocessed a single dataset with two different conditions > > > > > ('Swim', 'Rest'). The conditions are stored in the 'eventvalue' > field > > > of > > > > > the cfg as 1x2 cell array. The event values are stored in the > > > > > > > > > 'data_ref.cfg.previous.previous.previous{1,1}.previous.previous.trialdef.eventvalue' > > > > > field of the data set. > > > > > Having done the preprocessing I now would like to do > > > ft_timelockanalysis > > > > > and ft_freqanalysis on the data. Afterwards I statistically compare > > > the two > > > > > conditions using ft_timelockstatistics and ft_freqstatistics. > > > > > How can I split the data set according to the event values ('Swim', > > > > > 'Rest')? I need the event values to split the data set into the two > > > trial > > > > > classes in the ft_timelockanalysis / ft_freqanalysis and to compare > > > these > > > > > two conditions. > > > > > > > > > > I tried ft_redefinetrial, but do not know how to define the > cfg.trials > > > > > field of this function. > > > > > > > > > > % trial redefinition > > > > > > > > > > % containing only trials in the 'swim' condition > > > > > cfg.trials = (1, > > > > > > > > > data_ref.cfg.previous.previous.previous{1,1}.previous.previous.trialdef.eventvalue(1,1)); > > > > > swim = ft_redefinetrial(cfg,data_ref); > > > > > > > > > > % containing only trials in the 'resting' condition > > > > > cfg.trials = (1, > > > > > > > > > data_ref.cfg.previous.previous.previous{1,1}.previous.previous.trialdef.eventvalue(1,2)); > > > > > rest = ft_redefinetrial(cfg,data_ref); > > > > > > > > > > I hope the description was quite clear. In case, I can provide some > > > more > > > > > lines of code to clarify the issue. > > > > > > > > > > Thank you very much in advance for your advice! > > > > > > > > > > Best regards, > > > > > Martin > > > > > > > > > > -- > > > > > M.Sc.-Psych. Martin Rosenfelder > > > > > Wissenschaftlicher Mitarbeiter > > > > > Klinische und Biologische Psychologie > > > > > Universität Ulm > > > > > Raum 47.2.259 > > > > > +49 731-50 26592 > > > > > martin.rosenfelder at uni-ulm.de > > > > > > > > > > > > > > > _______________________________________________ > > > > > 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 marion.vincent at univ-lille.fr Thu Jan 17 10:37:20 2019 From: marion.vincent at univ-lille.fr (Marion Vincent) Date: Thu, 17 Jan 2019 10:37:20 +0100 (CET) Subject: [FieldTrip] Baseline removal errors in trials preprocessing Message-ID: <1783145268.1402885.1547717840566.JavaMail.zimbra@zimbra-store10.univ-lille.fr> Dear FIeldtrip users, I’m new in using Fieldtrip for EEG processing and I’ve encountred some issues while removing the Baseline of my trials. I’m working on EEG signals recorded with the BioSemi system. My pre-processing method is : (1) Re-referecing the channels (necessary with BioSemi) (2) Trial definition (3) Baseline removal I’ve read on the documentation that ft_preprocessing xcan have several cfg parameter for the Baseline removal : % cfg.demean = 'yes';%'no' or 'yes', whether to apply baseline correction (default = 'no') % cfg.baselinewindow = 'all';%[begin end] ;%in seconds, the default is the complete trial (default = 'all') % cfg.detrend = 'no'; %'no' or 'yes', remove linear trend from the data (done per trial) (default = 'no') I wanted to remove a Baseline defined as the average of a given window preceeding my stimulus onset. I tried to use : cfg.baselinewindow = [-0.5 0 ]; cfg.baselinewindow = [0 0.1] or the default window . But the problem is that I always have the same result, no matter the window I use : the first point of my trial is put to zero and substracted to all my trial. I’m sure I’m doing something wrong (and that the answer is very simple), but I can’t manage to understand what is the issue. Do you have any advice ? Thanks ! Marion Marion VINCENT Eng., PhD , CNRS Research Engineer -------------- next part -------------- An HTML attachment was scrubbed... URL: From martin.rosenfelder at uni-ulm.de Thu Jan 17 11:14:15 2019 From: martin.rosenfelder at uni-ulm.de (Martin Rosenfelder) Date: Thu, 17 Jan 2019 11:14:15 +0100 Subject: [FieldTrip] =?utf-8?b?Pz09P3V0Zi04P3E/ID89PT91dGYtOD9xPyA/PSBy?= =?utf-8?q?edefining_data_se?= In-Reply-To: Message-ID: <1bc3-5c405580-5-1e7d9040@211415180> Hi Stephen, I now managed to add the event column to my .trl field. This is now a (120x4) matrix. When calling ft_preprocessing, it automatically creates the .trialinfo field. Surprisingly, this .trialinfo matrix is now only a (1x120) matrix instead of a (4x120) matrix and it contains solely the event values. The start/end/offset samples are missing. At the moment I don't have any disadvantages from that, but I don't know if this will turn out to be problematic. Best, Martin -- M.Sc.-Psych. Martin Rosenfelder Wissenschaftlicher Mitarbeiter Klinische und Biologische Psychologie Universität Ulm Raum 47.2.259 +49 731-50 26592 martin.rosenfelder at uni-ulm.de Am Mittwoch, 16. Januar 2019 17:35 CET, Stephen Whitmarsh schrieb: > Hi Martin, > > If I understand correctly: If you add columns* to your .trl field* (so > after the first 3 that define start/end/offset samples) which you feed into > ft_preprocessing, ft_preprocessing will create the .trialinfo field for > you, which should track through your analyses. > > Cheers, > Stephen > > On Wed, 16 Jan 2019 at 17:15, Martin Rosenfelder < > martin.rosenfelder at uni-ulm.de> wrote: > > > Hi Stephen, > > > > Exactly, preferably, the events should be single values in a struct array > > or a cell array. > > This can then be added to the existing trial array. So far so good. > > > > However, my dataset misses a .trialinfo field after calling > > ft_preprocessing, to which I could add the cell array with the condition > > labels. > > I then added the array with the condition labels to 'mydataset.trial'. > > Unfortunately, this seems to confuse the ft_rejectvisual I call afterwards > > for artifact rejection. > > Do I have to create the .trialinfo-field by hand to my dataset? > > > > Best, > > Martin > > > > > > -- > > M.Sc.-Psych. Martin Rosenfelder > > Wissenschaftlicher Mitarbeiter > > Klinische und Biologische Psychologie > > Universität Ulm > > Raum 47.2.259 > > +49 731-50 26592 > > martin.rosenfelder at uni-ulm.de > > > > Am Dienstag, 15. Januar 2019 17:40 CET, Stephen Whitmarsh < > > stephen.whitmarsh at gmail.com> schrieb: > > > > > Hi Martin, > > > > > > No indeed, your conditions/RT/events should indeed be (re)coded as single > > > values. This also makes selecting trials etc. much easier with logical > > > expressions, e.g. you can then simply do cfg.trials = > > (data.trialinfo(:,1) > > > == 3 && data.trialinfo(:,2) > 0.5, where the first column e.g. is your > > > condition, and the second RT, to just give an example. > > > > > > Cheers, > > > Stephen > > > > > > On Tue, 15 Jan 2019 at 17:35, Martin Rosenfelder < > > > martin.rosenfelder at uni-ulm.de> wrote: > > > > > > > Dear Stephen, > > > > > > > > Thank you very much for the hint on ft_selectdata. > > > > > > > > I tried to build the structure for .trialinfo as you described it in > > your > > > > reply. I did this creating a structure array with the eventvalues as > > > > elements. > > > > Then I concatenated the .trl matrix and the event value matrix. This > > > > however failed, since .trl is a double array and the event value > > matrix is > > > > a struct array. > > > > I double-checked that the nr. of rows in the two matrices match each > > other > > > > (120 elements). > > > > > > > > Is there a way to add the event value matrix (120x1 struct) to the .trl > > > > matrix (120x3 double)? > > > > > > > > Best, > > > > Martin > > > > > > > > > > > > -- > > > > M.Sc.-Psych. Martin Rosenfelder > > > > Wissenschaftlicher Mitarbeiter > > > > Klinische und Biologische Psychologie > > > > Universität Ulm > > > > Raum 47.2.259 > > > > +49 731-50 26592 > > > > martin.rosenfelder at uni-ulm.de > > > > > > > > Am Montag, 14. Januar 2019 19:01 CET, Stephen Whitmarsh < > > > > stephen.whitmarsh at gmail.com> schrieb: > > > > > > > > > Dear Martin, > > > > > > > > > > Use ft_selectdata instead of ft_redefinetrial. > > > > > > > > > > > > > > > > "cfg.previous.previous.previous{1,1}.previous.previous.trialdef.eventvalue(1,2)" > > > > > is scary! And I can imagine very inconvenient, as it will move > > deeper and > > > > > deeper in to infinite previousnessness. > > > > > Instead, one of the best 'easter eggs' (i.e. not so well-documented > > > > > functionality) of FieldTrip is to create extra columns of info in > > your > > > > .trl > > > > > when using preprocessing to epoch your data. These extra columns will > > > > then > > > > > enter into a field .trialinfo of your data. Most if not all > > functions, > > > > such > > > > > as ft_selectdata (selecting trials) will update that field. So I > > advice > > > > you > > > > > to put your eventvalue (as well as RT, response, etc. etc.) as > > columns in > > > > > your trialinfo (so same nr. of rows as your nr. of trials). In this > > way, > > > > > they will travel with your data, and stay in the same structure and > > on > > > > the > > > > > same level whatever happens. > > > > > > > > > > Cheers, > > > > > Stephen > > > > > > > > > > > > > > > On Mon, 14 Jan 2019 at 18:47, Martin Rosenfelder < > > > > > martin.rosenfelder at uni-ulm.de> wrote: > > > > > > > > > > > Dear Fieldtrip community, > > > > > > > > > > > > I have preprocessed a single dataset with two different conditions > > > > > > ('Swim', 'Rest'). The conditions are stored in the 'eventvalue' > > field > > > > of > > > > > > the cfg as 1x2 cell array. The event values are stored in the > > > > > > > > > > > > 'data_ref.cfg.previous.previous.previous{1,1}.previous.previous.trialdef.eventvalue' > > > > > > field of the data set. > > > > > > Having done the preprocessing I now would like to do > > > > ft_timelockanalysis > > > > > > and ft_freqanalysis on the data. Afterwards I statistically compare > > > > the two > > > > > > conditions using ft_timelockstatistics and ft_freqstatistics. > > > > > > How can I split the data set according to the event values ('Swim', > > > > > > 'Rest')? I need the event values to split the data set into the two > > > > trial > > > > > > classes in the ft_timelockanalysis / ft_freqanalysis and to compare > > > > these > > > > > > two conditions. > > > > > > > > > > > > I tried ft_redefinetrial, but do not know how to define the > > cfg.trials > > > > > > field of this function. > > > > > > > > > > > > % trial redefinition > > > > > > > > > > > > % containing only trials in the 'swim' condition > > > > > > cfg.trials = (1, > > > > > > > > > > > > data_ref.cfg.previous.previous.previous{1,1}.previous.previous.trialdef.eventvalue(1,1)); > > > > > > swim = ft_redefinetrial(cfg,data_ref); > > > > > > > > > > > > % containing only trials in the 'resting' condition > > > > > > cfg.trials = (1, > > > > > > > > > > > > data_ref.cfg.previous.previous.previous{1,1}.previous.previous.trialdef.eventvalue(1,2)); > > > > > > rest = ft_redefinetrial(cfg,data_ref); > > > > > > > > > > > > I hope the description was quite clear. In case, I can provide some > > > > more > > > > > > lines of code to clarify the issue. > > > > > > > > > > > > Thank you very much in advance for your advice! > > > > > > > > > > > > Best regards, > > > > > > Martin > > > > > > > > > > > > -- > > > > > > M.Sc.-Psych. Martin Rosenfelder > > > > > > Wissenschaftlicher Mitarbeiter > > > > > > Klinische und Biologische Psychologie > > > > > > Universität Ulm > > > > > > Raum 47.2.259 > > > > > > +49 731-50 26592 > > > > > > martin.rosenfelder at uni-ulm.de > > > > > > > > > > > > > > > > > > _______________________________________________ > > > > > > 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 > > From stephen.whitmarsh at gmail.com Thu Jan 17 11:34:39 2019 From: stephen.whitmarsh at gmail.com (Stephen Whitmarsh) Date: Thu, 17 Jan 2019 11:34:39 +0100 Subject: [FieldTrip] Baseline removal errors in trials preprocessing In-Reply-To: <1783145268.1402885.1547717840566.JavaMail.zimbra@zimbra-store10.univ-lille.fr> References: <1783145268.1402885.1547717840566.JavaMail.zimbra@zimbra-store10.univ-lille.fr> Message-ID: <010801d4ae50$40028270$c0078750$@gmail.com> Dear Marion, It sounds it might indeed be something as simple as a typo. Could you paste the part of your script – from baseline removal to plotting (where you don’t see a difference) - so we can take a look? Cheers, Stephen From: fieldtrip On Behalf Of Marion Vincent Sent: Thursday, January 17, 2019 10:37 AM To: fieldtrip at science.ru.nl Subject: [FieldTrip] Baseline removal errors in trials preprocessing Dear FIeldtrip users, I’m new in using Fieldtrip for EEG processing and I’ve encountred some issues while removing the Baseline of my trials. I’m working on EEG signals recorded with the BioSemi system. My pre-processing method is : (1) Re-referecing the channels (necessary with BioSemi) (2) Trial definition (3) Baseline removal I’ve read on the documentation that ft_preprocessing xcan have several cfg parameter for the Baseline removal : % cfg.demean = 'yes';%'no' or 'yes', whether to apply baseline correction (default = 'no') % cfg.baselinewindow = 'all';%[begin end] ;%in seconds, the default is the complete trial (default = 'all') % cfg.detrend = 'no'; %'no' or 'yes', remove linear trend from the data (done per trial) (default = 'no') I wanted to remove a Baseline defined as the average of a given window preceeding my stimulus onset. I tried to use : cfg.baselinewindow = [-0.5 0 ]; cfg.baselinewindow = [0 0.1] or the default window . But the problem is that I always have the same result, no matter the window I use : the first point of my trial is put to zero and substracted to all my trial. I’m sure I’m doing something wrong (and that the answer is very simple), but I can’t manage to understand what is the issue. Do you have any advice ? Thanks ! Marion Marion VINCENT Eng., PhD , CNRS Research Engineer -------------- next part -------------- An HTML attachment was scrubbed... URL: From stephen.whitmarsh at gmail.com Thu Jan 17 12:25:03 2019 From: stephen.whitmarsh at gmail.com (Stephen Whitmarsh) Date: Thu, 17 Jan 2019 12:25:03 +0100 Subject: [FieldTrip] ?= redefining data se In-Reply-To: <1bc3-5c405580-5-1e7d9040@211415180> References: <1bc3-5c405580-5-1e7d9040@211415180> Message-ID: Hi Martin, Great. That is what is expected. The time-units of the original data was in samples. The first 3 columns defined the trial start, end, and offset, with respect to trial onset, i.e. stimulation, *defined in samples*. After segmentation, time is expressed not in samples but with *time relative to trial onset*, i.e. your .time field. Start and end samples (i.. reference to original dataset in samples) are maintained, not in the trialinfo, but in the sampleinfo field of your data. However, after you e.g. concatenate datasets, resample your data, that information becomes erroneous, and will be removed by functions such as append-data. So as an answer - no, it should be a problem later one. HTH, good FieldTripping! Stephen On Thu, 17 Jan 2019 at 11:43, Martin Rosenfelder < martin.rosenfelder at uni-ulm.de> wrote: > Hi Stephen, > > I now managed to add the event column to my .trl field. This is now a > (120x4) matrix. When calling ft_preprocessing, it automatically creates the > .trialinfo field. Surprisingly, this .trialinfo matrix is now only a > (1x120) matrix instead of a (4x120) matrix and it contains solely the event > values. The start/end/offset samples are missing. At the moment I don't > have any disadvantages from that, but I don't know if this will turn out to > be problematic. > > Best, > Martin > > -- > M.Sc.-Psych. Martin Rosenfelder > Wissenschaftlicher Mitarbeiter > Klinische und Biologische Psychologie > Universität Ulm > Raum 47.2.259 > +49 731-50 26592 > martin.rosenfelder at uni-ulm.de > > Am Mittwoch, 16. Januar 2019 17:35 CET, Stephen Whitmarsh < > stephen.whitmarsh at gmail.com> schrieb: > > > Hi Martin, > > > > If I understand correctly: If you add columns* to your .trl field* (so > > after the first 3 that define start/end/offset samples) which you feed > into > > ft_preprocessing, ft_preprocessing will create the .trialinfo field for > > you, which should track through your analyses. > > > > Cheers, > > Stephen > > > > On Wed, 16 Jan 2019 at 17:15, Martin Rosenfelder < > > martin.rosenfelder at uni-ulm.de> wrote: > > > > > Hi Stephen, > > > > > > Exactly, preferably, the events should be single values in a struct > array > > > or a cell array. > > > This can then be added to the existing trial array. So far so good. > > > > > > However, my dataset misses a .trialinfo field after calling > > > ft_preprocessing, to which I could add the cell array with the > condition > > > labels. > > > I then added the array with the condition labels to 'mydataset.trial'. > > > Unfortunately, this seems to confuse the ft_rejectvisual I call > afterwards > > > for artifact rejection. > > > Do I have to create the .trialinfo-field by hand to my dataset? > > > > > > Best, > > > Martin > > > > > > > > > -- > > > M.Sc.-Psych. Martin Rosenfelder > > > Wissenschaftlicher Mitarbeiter > > > Klinische und Biologische Psychologie > > > Universität Ulm > > > Raum 47.2.259 > > > +49 731-50 26592 > > > martin.rosenfelder at uni-ulm.de > > > > > > Am Dienstag, 15. Januar 2019 17:40 CET, Stephen Whitmarsh < > > > stephen.whitmarsh at gmail.com> schrieb: > > > > > > > Hi Martin, > > > > > > > > No indeed, your conditions/RT/events should indeed be (re)coded as > single > > > > values. This also makes selecting trials etc. much easier with > logical > > > > expressions, e.g. you can then simply do cfg.trials = > > > (data.trialinfo(:,1) > > > > == 3 && data.trialinfo(:,2) > 0.5, where the first column e.g. is > your > > > > condition, and the second RT, to just give an example. > > > > > > > > Cheers, > > > > Stephen > > > > > > > > On Tue, 15 Jan 2019 at 17:35, Martin Rosenfelder < > > > > martin.rosenfelder at uni-ulm.de> wrote: > > > > > > > > > Dear Stephen, > > > > > > > > > > Thank you very much for the hint on ft_selectdata. > > > > > > > > > > I tried to build the structure for .trialinfo as you described it > in > > > your > > > > > reply. I did this creating a structure array with the eventvalues > as > > > > > elements. > > > > > Then I concatenated the .trl matrix and the event value matrix. > This > > > > > however failed, since .trl is a double array and the event value > > > matrix is > > > > > a struct array. > > > > > I double-checked that the nr. of rows in the two matrices match > each > > > other > > > > > (120 elements). > > > > > > > > > > Is there a way to add the event value matrix (120x1 struct) to the > .trl > > > > > matrix (120x3 double)? > > > > > > > > > > Best, > > > > > Martin > > > > > > > > > > > > > > > -- > > > > > M.Sc.-Psych. Martin Rosenfelder > > > > > Wissenschaftlicher Mitarbeiter > > > > > Klinische und Biologische Psychologie > > > > > Universität Ulm > > > > > Raum 47.2.259 > > > > > +49 731-50 26592 > > > > > martin.rosenfelder at uni-ulm.de > > > > > > > > > > Am Montag, 14. Januar 2019 19:01 CET, Stephen Whitmarsh < > > > > > stephen.whitmarsh at gmail.com> schrieb: > > > > > > > > > > > Dear Martin, > > > > > > > > > > > > Use ft_selectdata instead of ft_redefinetrial. > > > > > > > > > > > > > > > > > > > > > "cfg.previous.previous.previous{1,1}.previous.previous.trialdef.eventvalue(1,2)" > > > > > > is scary! And I can imagine very inconvenient, as it will move > > > deeper and > > > > > > deeper in to infinite previousnessness. > > > > > > Instead, one of the best 'easter eggs' (i.e. not so > well-documented > > > > > > functionality) of FieldTrip is to create extra columns of info in > > > your > > > > > .trl > > > > > > when using preprocessing to epoch your data. These extra columns > will > > > > > then > > > > > > enter into a field .trialinfo of your data. Most if not all > > > functions, > > > > > such > > > > > > as ft_selectdata (selecting trials) will update that field. So I > > > advice > > > > > you > > > > > > to put your eventvalue (as well as RT, response, etc. etc.) as > > > columns in > > > > > > your trialinfo (so same nr. of rows as your nr. of trials). In > this > > > way, > > > > > > they will travel with your data, and stay in the same structure > and > > > on > > > > > the > > > > > > same level whatever happens. > > > > > > > > > > > > Cheers, > > > > > > Stephen > > > > > > > > > > > > > > > > > > On Mon, 14 Jan 2019 at 18:47, Martin Rosenfelder < > > > > > > martin.rosenfelder at uni-ulm.de> wrote: > > > > > > > > > > > > > Dear Fieldtrip community, > > > > > > > > > > > > > > I have preprocessed a single dataset with two different > conditions > > > > > > > ('Swim', 'Rest'). The conditions are stored in the 'eventvalue' > > > field > > > > > of > > > > > > > the cfg as 1x2 cell array. The event values are stored in the > > > > > > > > > > > > > > > > 'data_ref.cfg.previous.previous.previous{1,1}.previous.previous.trialdef.eventvalue' > > > > > > > field of the data set. > > > > > > > Having done the preprocessing I now would like to do > > > > > ft_timelockanalysis > > > > > > > and ft_freqanalysis on the data. Afterwards I statistically > compare > > > > > the two > > > > > > > conditions using ft_timelockstatistics and ft_freqstatistics. > > > > > > > How can I split the data set according to the event values > ('Swim', > > > > > > > 'Rest')? I need the event values to split the data set into > the two > > > > > trial > > > > > > > classes in the ft_timelockanalysis / ft_freqanalysis and to > compare > > > > > these > > > > > > > two conditions. > > > > > > > > > > > > > > I tried ft_redefinetrial, but do not know how to define the > > > cfg.trials > > > > > > > field of this function. > > > > > > > > > > > > > > % trial redefinition > > > > > > > > > > > > > > % containing only trials in the 'swim' condition > > > > > > > cfg.trials = (1, > > > > > > > > > > > > > > > > data_ref.cfg.previous.previous.previous{1,1}.previous.previous.trialdef.eventvalue(1,1)); > > > > > > > swim = ft_redefinetrial(cfg,data_ref); > > > > > > > > > > > > > > % containing only trials in the 'resting' condition > > > > > > > cfg.trials = (1, > > > > > > > > > > > > > > > > data_ref.cfg.previous.previous.previous{1,1}.previous.previous.trialdef.eventvalue(1,2)); > > > > > > > rest = ft_redefinetrial(cfg,data_ref); > > > > > > > > > > > > > > I hope the description was quite clear. In case, I can provide > some > > > > > more > > > > > > > lines of code to clarify the issue. > > > > > > > > > > > > > > Thank you very much in advance for your advice! > > > > > > > > > > > > > > Best regards, > > > > > > > Martin > > > > > > > > > > > > > > -- > > > > > > > M.Sc.-Psych. Martin Rosenfelder > > > > > > > Wissenschaftlicher Mitarbeiter > > > > > > > Klinische und Biologische Psychologie > > > > > > > Universität Ulm > > > > > > > Raum 47.2.259 > > > > > > > +49 731-50 26592 > > > > > > > martin.rosenfelder at uni-ulm.de > > > > > > > > > > > > > > > > > > > > > _______________________________________________ > > > > > > > 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 > > > > > > > > > _______________________________________________ > 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 martabortoletto at yahoo.it Thu Jan 17 12:39:10 2019 From: martabortoletto at yahoo.it (Marta Bortoletto) Date: Thu, 17 Jan 2019 11:39:10 +0000 (UTC) Subject: [FieldTrip] How to handle results from cluster based permutation? References: <1806037147.1487896.1547725150947.ref@mail.yahoo.com> Message-ID: <1806037147.1487896.1547725150947@mail.yahoo.com> Dear Fieldtrip community,I have a queston related to further exploration of results after a significant effect of a cluster based permutation analysis. I am using cluster based permutation test to look for differences in evoked potentials amplitude before and after a learning task. I found that there is a significant difference between the two conditions, with the largest cluster between 80 and 140 ms on frontocentral electrodes. Now, I would like to test if the change in evoked potentials between pre- and post-task is related to the behavioral improvement by running correlation analyses. My question is how can I do that. My understanding is that taking the mean activity in the cluster to run the correlation with behavioural data is problematic. Shall I rather run correlation analyses with cluster based permutation on the evoked potentials, perhaps restricting the analyses to the time window highlighted in the first analysis (80-140 ms)? I would really appreciate your help with this.Marta -------------- next part -------------- An HTML attachment was scrubbed... URL: From juan.lei at hotmail.com Thu Jan 17 13:21:18 2019 From: juan.lei at hotmail.com (Juan Lei) Date: Thu, 17 Jan 2019 12:21:18 +0000 Subject: [FieldTrip] calculatng behavioral-power correlation Message-ID: Dear Fieldtrip users and developers I am confused about some information regarding calculating behavioral-power correlation. on this pape http://www.fieldtriptoolbox.org/faq/how_can_i_test_for_correlations_between_neuronal_data_and_quantitative_stimulus_and_behavioural_variables/ How can I test for correlations between neuronal data and quantitative stimulus and behavioural variables? - FieldTrip toolbox It is important to make a distinction between categorical and quantitative independent variables, because these are associated with different test statistics. www.fieldtriptoolbox.org in the examples for Quantitative Independent Variable, it seems that all parameter settings are the same for both ft_statfun_indepsamplesregrT and ft_statfun_correlationT. "design" only has one row with behavioural data, and only the brain data as Input for ft_freqstatistics: n1 = 3; % n1 is the number of subjects design(1,1:n1) = [0.6 0.9 0.1]; %here we insert our independent variable (behavioral data) in the cfg.design matrix, in this case reaction times of 3 subjects. cfg.design = design; cfg.ivar = 1; stat = ft_freqstatistics(cfg, data_brain{:}); However, in another post https://mailman.science.ru.nl/pipermail/fieldtrip/2015-February/008950.html [FieldTrip] calculating behavioural-power correlation Dear Frederic, >From my limited understanding, the way you specify your design matrix seems correct to me.I did the same thing as well, however, I was not interested in the correlation along the time dimension, and I averaged some frequencies to examine my behavioural-power change correlation with specific frequency bands (e.g. 2 - 4 Hz for Delta band, 4 - 8 Hz for Theta band, etc). mailman.science.ru.nl it says "create a variable for the behavioural measure such that the variable contains a powspctrm field with the behavioural information for every frequency" as the other Input for ft_freqstatistica. Here "design" has two rows. cfg.design = []; cfg.design(1,:) = [ones(1,lenght(Y)) 2*ones(1,length(Y))]; cfg.design(2,:) = [1:length(Y) 1:length(Y)]; freq_stat = ft_freqstatistica(cfg,AVG,dum); Therefore the information is not consistent. Could someone help me understanding it? Best, Juan -------------- next part -------------- An HTML attachment was scrubbed... URL: From marion.vincent at univ-lille.fr Thu Jan 17 13:59:59 2019 From: marion.vincent at univ-lille.fr (Marion Vincent) Date: Thu, 17 Jan 2019 13:59:59 +0100 (CET) Subject: [FieldTrip] Baseline removal errors in trials preprocessing In-Reply-To: <010801d4ae50$40028270$c0078750$@gmail.com> References: <1783145268.1402885.1547717840566.JavaMail.zimbra@zimbra-store10.univ-lille.fr> <010801d4ae50$40028270$c0078750$@gmail.com> Message-ID: <368923767.1656133.1547729999196.JavaMail.zimbra@zimbra-store10.univ-lille.fr> An HTML attachment was scrubbed... URL: -------------- next part -------------- Dear Stephen, Here is my script: %segmentation seg_window=[0.1 1]; % in seconds %preStim/postStim %config cfg= []; cfg.dataset = filename_Data; %% *********** TRIAL DEFINITION PART *********** (that works) […] cfg = ft_definetrial(cfg); % ***********  Re-References *********** (that also works) cfg.reref = 'yes'; cfg.refchannel = {'EXG3', 'EXG4'};% electrode 131/132 // cell-array with new EEG reference channel(s), this can be 'all' for a common average reference cfg.refmethod     = 'avg'; % 'avg', 'median', or 'bipolar' for bipolar derivation of sequential channels (default = 'avg') data_Raw = ft_preprocessing(cfg); %% *********** Baseline *********** cfg.demean = 'yes'; cfg1=cfg; cfg1.baselinewindow = [-seg_window(1) 0 ]; cfg2=cfg; cfg2.baselinewindow = [0 0.1]; cfg3=cfg; cfg3.baselinewindow = 'all'; data1 = ft_preprocessing(cfg1); data2 = ft_preprocessing(cfg2); data3 = ft_preprocessing(cfg3); I’ve attached the figure with the results. PS: In fact I made a mistake in my previous email: the result wasn’t the same when the Baseline window was ‘all’. Let me know if you need more informations. Thanks for your help. Marion Marion VINCENT Eng., PhD , CNRS Research Engineer Tel: +33 607 59 46 76 Laboratoire SCALab UMR CNRS 9193 Université Lille 3 BP 60149 59653 Villeneuve d'Ascq Cedex http://scalab.cnrs.fr -------------------------------------------- L’Imaginarium / SCV-IrDIVE Equipex 99a Boulevard Descat 59200 Tourcoing http://www.irdive.fr/ De: Stephen Whitmarsh Envoyé le:jeudi 17 janvier 2019 11:51 À: 'FieldTrip discussion list' Objet:Re: [FieldTrip] Baseline removal errors in trials preprocessing Dear Marion, It sounds it might indeed be something as simple as a typo. Could you paste the part of your script – from baseline removal to plotting (where you don’t see a difference) - so we can take a look? Cheers, Stephen From: fieldtrip On Behalf Of Marion Vincent Sent: Thursday, January 17, 2019 10:37 AM To: fieldtrip at science.ru.nl Subject: [FieldTrip] Baseline removal errors in trials preprocessing Dear FIeldtrip users, I’m new in using Fieldtrip for EEG processing and I’ve encountred some issues while removing the Baseline of my trials. I’m working on EEG signals recorded with the BioSemi system. My pre-processing method is : (1) Re-referecing the channels (necessary with BioSemi) (2) Trial definition (3) Baseline removal I’ve read on the documentation that ft_preprocessing xcan have several cfg parameter for the Baseline removal : % cfg.demean = 'yes';%'no' or 'yes', whether to apply baseline correction (default = 'no') % cfg.baselinewindow = 'all';%[begin end] ;%in seconds, the default is the complete trial (default = 'all') % cfg.detrend = 'no'; %'no' or 'yes', remove linear trend from the data (done per trial) (default = 'no') I wanted to remove a Baseline defined as the average of a given window preceeding my stimulus onset. I tried to use : cfg.baselinewindow = [-0.5 0 ]; cfg.baselinewindow = [0 0.1] or the default window . But the problem is that I always have the same result, no matter the window I use : the first point of my trial is put to zero and substracted to all my trial. I’m sure I’m doing something wrong (and that the answer is very simple), but I can’t manage to understand what is the issue. Do you have any advice ? Thanks ! Marion Marion VINCENT Eng., PhD , CNRS Research Engineer _______________________________________________ fieldtrip mailing list https://mailman.science.ru.nl/mailman/listinfo/fieldtrip https://doi.org/10.1371/journal.pcbi.1002202 -------------- next part -------------- A non-text attachment was scrubbed... Name: BaselineRemoved_Trial1.JPG Type: image/jpeg Size: 115224 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: BaselineRemoved_Trial1.fig Type: application/octet-stream Size: 129935 bytes Desc: not available URL: From julian.keil at gmail.com Thu Jan 17 14:37:30 2019 From: julian.keil at gmail.com (Julian Keil) Date: Thu, 17 Jan 2019 14:37:30 +0100 Subject: [FieldTrip] Baseline removal errors in trials preprocessing In-Reply-To: <368923767.1656133.1547729999196.JavaMail.zimbra@zimbra-store10.univ-lille.fr> References: <1783145268.1402885.1547717840566.JavaMail.zimbra@zimbra-store10.univ-lille.fr> <010801d4ae50$40028270$c0078750$@gmail.com> <368923767.1656133.1547729999196.JavaMail.zimbra@zimbra-store10.univ-lille.fr> Message-ID: Dear Marion, when you state: seg_window=[0.1 1]; % in seconds %preStim/postStim Does that mean, you segment your data to 0.1 s to 1 s after the stimulus? In that case, there is no data to use prior to 0.1 later on. So, these two statements: cfg1=cfg; cfg1.baselinewindow = [-seg_window(1) 0 ]; cfg2=cfg; cfg2.baselinewindow = [0 0.1]; are basically identical, as the interval -0.1 to 0 (cfg1) and 0 to 0.1 (cfg2) will both contain no data. Please double check this with the seg_window set to [-0.1 1] Hope that helps, Julian On Thu, Jan 17, 2019 at 2:29 PM Marion Vincent wrote: > Dear Stephen, > Here is my script: > %segmentation > seg_window=[0.1 1]; % in seconds %preStim/postStim > %config > cfg= []; > cfg.dataset = filename_Data; > %% *********** TRIAL DEFINITION PART *********** (that works) > […] > cfg = ft_definetrial(cfg); > % *********** Re-References *********** (that also works) > cfg.reref = 'yes'; > cfg.refchannel = {'EXG3', 'EXG4'};% electrode 131/132 // cell-array with > new EEG reference channel(s), this can be 'all' for a common average > reference > cfg.refmethod = 'avg'; % 'avg', 'median', or 'bipolar' for bipolar > derivation of sequential channels (default = 'avg') > data_Raw = ft_preprocessing(cfg); > %% *********** Baseline *********** > cfg.demean = 'yes'; > cfg1=cfg; > cfg1.baselinewindow = [-seg_window(1) 0 ]; > cfg2=cfg; > cfg2.baselinewindow = [0 0.1]; > cfg3=cfg; > cfg3.baselinewindow = 'all'; > data1 = ft_preprocessing(cfg1); > data2 = ft_preprocessing(cfg2); > data3 = ft_preprocessing(cfg3); > I’ve attached the figure with the results. > PS: In fact I made a mistake in my previous email: the result wasn’t the > same when the Baseline window was ‘all’. > Let me know if you need more informations. > Thanks for your help. > Marion > Marion VINCENT > Eng., PhD , CNRS Research Engineer > Tel: +33 607 59 46 76 > Laboratoire SCALab UMR CNRS 9193 > Université Lille 3 > BP 60149 > 59653 Villeneuve d'Ascq Cedex > http://scalab.cnrs.fr > -------------------------------------------- > L’Imaginarium / SCV-IrDIVE Equipex > 99a Boulevard Descat > 59200 Tourcoing > http://www.irdive.fr/ > De: Stephen Whitmarsh > Envoyé le:jeudi 17 janvier 2019 11:51 > À: 'FieldTrip discussion list' > Objet:Re: [FieldTrip] Baseline removal errors in trials preprocessing > > > Dear Marion, > > > > It sounds it might indeed be something as simple as a typo. Could you > paste the part of your script – from baseline removal to plotting (where > you don’t see a difference) - so we can take a look? > > > > Cheers, > > Stephen > > > > From: fieldtrip On Behalf Of Marion > Vincent > Sent: Thursday, January 17, 2019 10:37 AM > To: fieldtrip at science.ru.nl > Subject: [FieldTrip] Baseline removal errors in trials preprocessing > > > > Dear FIeldtrip users, > > > > I’m new in using Fieldtrip for EEG processing and I’ve encountred some > issues while removing the Baseline of my trials. > > > > I’m working on EEG signals recorded with the BioSemi system. My > pre-processing method is : > > (1) Re-referecing the channels (necessary with BioSemi) > > (2) Trial definition > > (3) Baseline removal > > > > I’ve read on the documentation that ft_preprocessing xcan have several cfg > parameter for the Baseline removal : > > > > % cfg.demean = 'yes';%'no' or 'yes', whether to apply baseline correction > (default = 'no') > > % cfg.baselinewindow = 'all';%[begin end] ;%in seconds, the default is the > complete trial (default = 'all') > > % cfg.detrend = 'no'; %'no' or 'yes', remove linear trend from the > data (done per trial) (default = 'no') > > > > I wanted to remove a Baseline defined as the average of a given window > preceeding my stimulus onset. > > > > I tried to use : cfg.baselinewindow = [-0.5 0 ]; cfg.baselinewindow = [0 > 0.1] or the default window . > > But the problem is that I always have the same result, no matter the > window I use : the first point of my trial is put to zero and substracted > to all my trial. > > > > I’m sure I’m doing something wrong (and that the answer is very simple), > but I can’t manage to understand what is the issue. > > > > Do you have any advice ? > > > > Thanks ! > > Marion > > > > Marion VINCENT > Eng., PhD , CNRS Research Engineer > > > > > > > > _______________________________________________ > 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 stephen.whitmarsh at gmail.com Thu Jan 17 14:52:45 2019 From: stephen.whitmarsh at gmail.com (Stephen Whitmarsh) Date: Thu, 17 Jan 2019 14:52:45 +0100 Subject: [FieldTrip] Baseline removal errors in trials preprocessing In-Reply-To: <368923767.1656133.1547729999196.JavaMail.zimbra@zimbra-store10.univ-lille.fr> References: <1783145268.1402885.1547717840566.JavaMail.zimbra@zimbra-store10.univ-lille.fr> <010801d4ae50$40028270$c0078750$@gmail.com> <368923767.1656133.1547729999196.JavaMail.zimbra@zimbra-store10.univ-lille.fr> Message-ID: <017901d4ae6b$ecd2d200$c6787600$@gmail.com> Dear Marion, Your script is a bit messy. I would start with: 1) Always clear your cfg before calling a FT function. Don’t go around saving different cfg’s. This is the nr. 1 cause of confusing results J 2) Load/segment etc. your data first with ft_preprocessing. Then call ft_preprocessing again to baseline correct, entering the output of the first run. I have a hunch that might fix your problem. So, something like: % load your data, apply rereferencing and segment in one go cfg = []; cfg.dataset = filename_Data; cfg.reref = 'yes'; cfg.refchannel = {'EXG3', 'EXG4'} ; cfg.refmethod = 'avg'; cfg.trl = … ; cfg = ft_definetrial(cfg); data_Raw = ft_preprocessing(cfg); % somehow plot your data to check figure ; plot(data_Raw.trial{1}(1, :)) ; % baseline correct your raw data structure, method 1 cfg = [] ; cfg.demean = ‘yes’ ; cfg.baselinewindow = [0 0.1] ; data_Raw_reref_1 = ft_preprocessing(cfg, data_Raw); % somehow plot your data to check figure ; plot(data_Raw_reref_1.trial{1}(1, :)) ; % baseline correct your raw data structure, method 2 cfg = [] ; cfg.demean = ‘yes’ ; cfg.baselinewindow = [-1 -0.1] ; % or whatever data_Raw_reref_2 = ft_preprocessing(cfg, data_Raw); % somehow plot your data to check figure ; plot(data_Raw_reref_2.trial{1}(1, :)) ; And oh, wait, I see what you did there… Don’t use different variables for your cfg, (e.g. cfg1, cfg2, etc.). See the mistake? Those are too easy to make if you don’t do something like the above. Cheers and good FieldTripping! Stepen From: fieldtrip On Behalf Of Marion Vincent Sent: Thursday, January 17, 2019 2:00 PM To: FieldTrip discussion list Subject: Re: [FieldTrip] Baseline removal errors in trials preprocessing Dear Stephen, Here is my script : %segmentation seg_window=[0.1 1]; % in seconds %preStim/postStim %config cfg= []; cfg.dataset = filename_Data; %% *********** TRIAL DEFINITION PART *********** (that works ) […] cfg = ft_definetrial(cfg); % *********** Re-References *********** (that also works ) cfg.reref = 'yes'; cfg.refchannel = {'EXG3', 'EXG4'};% electrode 131/132 // cell-array with new EEG reference channel(s), this can be 'all' for a common average reference cfg.refmethod = 'avg'; % 'avg', 'median', or 'bipolar' for bipolar derivation of sequential channels (default = 'avg') data_Raw = ft_preprocessing(cfg); %% *********** Baseline *********** cfg.demean = 'yes'; cfg1=cfg; cfg1.baselinewindow = [-seg_window(1) 0 ]; cfg2=cfg; cfg2.baselinewindow = [0 0.1]; cfg3=cfg; cfg3.baselinewindow = 'all'; data1 = ft_preprocessing(cfg1); data2 = ft_preprocessing(cfg2); data3 = ft_preprocessing(cfg3); ð I’ve attached the figure with the results. PS : In fact I made a mistake in my previous email : the result wasn’t the same when the Baseline window was ‘all’. Let me know if you need more informations. Thanks for your help. Marion Marion VINCENT Eng., PhD , CNRS Research Engineer Tel: +33 607 59 46 76 Laboratoire SCALab UMR CNRS 9193 Université Lille 3 BP 60149 59653 Villeneuve d'Ascq Cedex http://scalab.cnrs.fr -------------------------------------------- L’Imaginarium / SCV-IrDIVE Equipex 99a Boulevard Descat 59200 Tourcoing http://www.irdive.fr / De : Stephen Whitmarsh Envoyé le :jeudi 17 janvier 2019 11:51 À : 'FieldTrip discussion list' Objet :Re: [FieldTrip] Baseline removal errors in trials preprocessing Dear Marion, It sounds it might indeed be something as simple as a typo. Could you paste the part of your script – from baseline removal to plotting (where you don’t see a difference) - so we can take a look? Cheers, Stephen From: fieldtrip > On Behalf Of Marion Vincent Sent: Thursday, January 17, 2019 10:37 AM To: fieldtrip at science.ru.nl Subject: [FieldTrip] Baseline removal errors in trials preprocessing Dear FIeldtrip users, I’m new in using Fieldtrip for EEG processing and I’ve encountred some issues while removing the Baseline of my trials. I’m working on EEG signals recorded with the BioSemi system. My pre-processing method is : (1) Re-referecing the channels (necessary with BioSemi) (2) Trial definition (3) Baseline removal I’ve read on the documentation that ft_preprocessing xcan have several cfg parameter for the Baseline removal : % cfg.demean = 'yes';%'no' or 'yes', whether to apply baseline correction (default = 'no') % cfg.baselinewindow = 'all';%[begin end] ;%in seconds, the default is the complete trial (default = 'all') % cfg.detrend = 'no'; %'no' or 'yes', remove linear trend from the data (done per trial) (default = 'no') I wanted to remove a Baseline defined as the average of a given window preceeding my stimulus onset. I tried to use : cfg.baselinewindow = [-0.5 0 ]; cfg.baselinewindow = [0 0.1] or the default window . But the problem is that I always have the same result, no matter the window I use : the first point of my trial is put to zero and substracted to all my trial. I’m sure I’m doing something wrong (and that the answer is very simple), but I can’t manage to understand what is the issue. Do you have any advice ? Thanks ! Marion Marion VINCENT Eng., PhD , CNRS Research Engineer -------------- next part -------------- An HTML attachment was scrubbed... URL: From marion.vincent at univ-lille.fr Thu Jan 17 15:16:58 2019 From: marion.vincent at univ-lille.fr (Marion Vincent) Date: Thu, 17 Jan 2019 15:16:58 +0100 (CET) Subject: [FieldTrip] Baseline removal errors in trials preprocessing Message-ID: <444186168.1761650.1547734618751.JavaMail.zimbra@zimbra-store10.univ-lille.fr> Dear Julian, seg_window=[0.1 1]; % in seconds %preStim/postStim Does that mean, you segment your data to 0.1 s to 1 s after the stimulus? In that case, there is no data to use prior to 0.1 later on. The seg_window I used was to defined the trials (prestim to poststim interval). Then in my one trial definition function I define my trial as the interval [t0-preStim ; t0+postStim], with t0 the stimulus onset. ⇨ My trial goes from 0.1s before t0 to 1 s after. That is why the preStim value is positive in seg_window. So, these two statements: cfg1=cfg; cfg1.baselinewindow = [-seg_window(1) 0 ]; cfg2=cfg; cfg2.baselinewindow = [0 0.1]; are basically identical, as the interval -0.1 to 0 (cfg1) and 0 to 0.1 (cfg2) will both contain no data. Please double check this with the seg_window set to [-0.1 1] I think I might not understood how to pass the time interval in the cfg.baselinewindow. For me as I stated [ - seg_window(1)  ; 0], in had in mind to take the interval [ - 0.1 ; 0] before the stimulus onset (at t0=0) . Marion VINCENT Eng., PhD , CNRS Research Engineer Tel: +33 607 59 46 76 Laboratoire SCALab UMR CNRS 9193 Université Lille 3 BP 60149 59653 Villeneuve d'Ascq Cedex http://scalab.cnrs.fr -------------------------------------------- L’Imaginarium / SCV-IrDIVE Equipex 99a Boulevard Descat 59200 Tourcoing http://www.irdive.fr/ De : Julian Keil Envoyé le :jeudi 17 janvier 2019 14:57 À : FieldTrip discussion list Objet :Re: [FieldTrip] Baseline removal errors in trials preprocessing Dear Marion, when you state: seg_window=[0.1 1]; % in seconds %preStim/postStim Does that mean, you segment your data to 0.1 s to 1 s after the stimulus? In that case, there is no data to use prior to 0.1 later on. So, these two statements: cfg1=cfg; cfg1.baselinewindow = [-seg_window(1) 0 ]; cfg2=cfg; cfg2.baselinewindow = [0 0.1]; are basically identical, as the interval -0.1 to 0 (cfg1) and 0 to 0.1 (cfg2) will both contain no data. Please double check this with the seg_window set to [-0.1 1] Hope that helps, Julian On Thu, Jan 17, 2019 at 2:29 PM Marion Vincent wrote: Dear Stephen, Here is my script: %segmentation seg_window=[0.1 1]; % in seconds %preStim/postStim %config cfg= []; cfg.dataset = filename_Data; %% *********** TRIAL DEFINITION PART *********** (that works) […] cfg = ft_definetrial(cfg); % ***********  Re-References *********** (that also works) cfg.reref = 'yes'; cfg.refchannel = {'EXG3', 'EXG4'};% electrode 131/132 // cell-array with new EEG reference channel(s), this can be 'all' for a common average reference cfg.refmethod     = 'avg'; % 'avg', 'median', or 'bipolar' for bipolar derivation of sequential channels (default = 'avg') data_Raw = ft_preprocessing(cfg); %% *********** Baseline *********** cfg.demean = 'yes'; cfg1=cfg; cfg1.baselinewindow = [-seg_window(1) 0 ]; cfg2=cfg; cfg2.baselinewindow = [0 0.1]; cfg3=cfg; cfg3.baselinewindow = 'all'; data1 = ft_preprocessing(cfg1); data2 = ft_preprocessing(cfg2); data3 = ft_preprocessing(cfg3); I’ve attached the figure with the results. PS: In fact I made a mistake in my previous email: the result wasn’t the same when the Baseline window was ‘all’. Let me know if you need more informations. Thanks for your help. Marion Marion VINCENT Eng., PhD , CNRS Research Engineer Tel: +33 607 59 46 76 Laboratoire SCALab UMR CNRS 9193 Université Lille 3 BP 60149 59653 Villeneuve d'Ascq Cedex http://scalab.cnrs.fr -------------------------------------------- L’Imaginarium / SCV-IrDIVE Equipex 99a Boulevard Descat 59200 Tourcoing http://www.irdive.fr/ De: Stephen Whitmarsh Envoyé le:jeudi 17 janvier 2019 11:51 À: 'FieldTrip discussion list' Objet:Re: [FieldTrip] Baseline removal errors in trials preprocessing Dear Marion, It sounds it might indeed be something as simple as a typo. Could you paste the part of your script – from baseline removal to plotting (where you don’t see a difference) - so we can take a look? Cheers, Stephen From: fieldtrip On Behalf Of Marion Vincent Sent: Thursday, January 17, 2019 10:37 AM To: fieldtrip at science.ru.nl Subject: [FieldTrip] Baseline removal errors in trials preprocessing Dear FIeldtrip users, I’m new in using Fieldtrip for EEG processing and I’ve encountred some issues while removing the Baseline of my trials. I’m working on EEG signals recorded with the BioSemi system.  My pre-processing method is : (1)    Re-referecing the channels (necessary with BioSemi) (2)    Trial definition (3)    Baseline removal I’ve read on the documentation that ft_preprocessing xcan have several cfg parameter for the Baseline removal : % cfg.demean  = 'yes';%'no' or 'yes', whether to apply baseline correction (default = 'no') % cfg.baselinewindow = 'all';%[begin end] ;%in seconds, the default is the complete trial (default = 'all') % cfg.detrend       = 'no'; %'no' or 'yes', remove linear trend from the data (done per trial) (default = 'no') I wanted to remove a Baseline defined as the average of a given window preceeding my stimulus onset. I tried to use : cfg.baselinewindow = [-0.5 0 ]; cfg.baselinewindow = [0 0.1] or the default window . But the problem is that I always have the same result, no matter the window I use : the first point of my trial is put to zero and substracted to all my trial. I’m sure I’m doing something wrong (and that the answer is very simple), but I can’t manage to understand what is the issue. Do you have any advice ? Thanks ! Marion Marion VINCENT Eng., PhD , CNRS Research Engineer _______________________________________________ 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 stephen.whitmarsh at gmail.com Thu Jan 17 15:17:39 2019 From: stephen.whitmarsh at gmail.com (Stephen Whitmarsh) Date: Thu, 17 Jan 2019 15:17:39 +0100 Subject: [FieldTrip] Baseline removal errors in trials preprocessing In-Reply-To: References: <1783145268.1402885.1547717840566.JavaMail.zimbra@zimbra-store10.univ-lille.fr> <010801d4ae50$40028270$c0078750$@gmail.com> <368923767.1656133.1547729999196.JavaMail.zimbra@zimbra-store10.univ-lille.fr> Message-ID: <019d01d4ae6f$6780bc80$36823580$@gmail.com> Good point Julian. I though that cfg1, cfg2, and cfg3 were never used, but see I was wrong. Back to my own cfg’s now… Cheers, Stephen From: fieldtrip On Behalf Of Julian Keil Sent: Thursday, January 17, 2019 2:38 PM To: FieldTrip discussion list Subject: Re: [FieldTrip] Baseline removal errors in trials preprocessing Dear Marion, when you state: seg_window=[0.1 1]; % in seconds %preStim/postStim Does that mean, you segment your data to 0.1 s to 1 s after the stimulus? In that case, there is no data to use prior to 0.1 later on. So, these two statements: cfg1=cfg; cfg1.baselinewindow = [-seg_window(1) 0 ]; cfg2=cfg; cfg2.baselinewindow = [0 0.1]; are basically identical, as the interval -0.1 to 0 (cfg1) and 0 to 0.1 (cfg2) will both contain no data. Please double check this with the seg_window set to [-0.1 1] Hope that helps, Julian On Thu, Jan 17, 2019 at 2:29 PM Marion Vincent > wrote: Dear Stephen, Here is my script: %segmentation seg_window=[0.1 1]; % in seconds %preStim/postStim %config cfg= []; cfg.dataset = filename_Data; %% *********** TRIAL DEFINITION PART *********** (that works) […] cfg = ft_definetrial(cfg); % *********** Re-References *********** (that also works) cfg.reref = 'yes'; cfg.refchannel = {'EXG3', 'EXG4'};% electrode 131/132 // cell-array with new EEG reference channel(s), this can be 'all' for a common average reference cfg.refmethod = 'avg'; % 'avg', 'median', or 'bipolar' for bipolar derivation of sequential channels (default = 'avg') data_Raw = ft_preprocessing(cfg); %% *********** Baseline *********** cfg.demean = 'yes'; cfg1=cfg; cfg1.baselinewindow = [-seg_window(1) 0 ]; cfg2=cfg; cfg2.baselinewindow = [0 0.1]; cfg3=cfg; cfg3.baselinewindow = 'all'; data1 = ft_preprocessing(cfg1); data2 = ft_preprocessing(cfg2); data3 = ft_preprocessing(cfg3); I’ve attached the figure with the results. PS: In fact I made a mistake in my previous email: the result wasn’t the same when the Baseline window was ‘all’. Let me know if you need more informations. Thanks for your help. Marion Marion VINCENT Eng., PhD , CNRS Research Engineer Tel: +33 607 59 46 76 Laboratoire SCALab UMR CNRS 9193 Université Lille 3 BP 60149 59653 Villeneuve d'Ascq Cedex http://scalab.cnrs.fr -------------------------------------------- L’Imaginarium / SCV-IrDIVE Equipex 99a Boulevard Descat 59200 Tourcoing http://www.irdive.fr/ De: Stephen Whitmarsh Envoyé le:jeudi 17 janvier 2019 11:51 À: 'FieldTrip discussion list' Objet:Re: [FieldTrip] Baseline removal errors in trials preprocessing Dear Marion, It sounds it might indeed be something as simple as a typo. Could you paste the part of your script – from baseline removal to plotting (where you don’t see a difference) - so we can take a look? Cheers, Stephen From: fieldtrip > On Behalf Of Marion Vincent Sent: Thursday, January 17, 2019 10:37 AM To: fieldtrip at science.ru.nl Subject: [FieldTrip] Baseline removal errors in trials preprocessing Dear FIeldtrip users, I’m new in using Fieldtrip for EEG processing and I’ve encountred some issues while removing the Baseline of my trials. I’m working on EEG signals recorded with the BioSemi system. My pre-processing method is : (1) Re-referecing the channels (necessary with BioSemi) (2) Trial definition (3) Baseline removal I’ve read on the documentation that ft_preprocessing xcan have several cfg parameter for the Baseline removal : % cfg.demean = 'yes';%'no' or 'yes', whether to apply baseline correction (default = 'no') % cfg.baselinewindow = 'all';%[begin end] ;%in seconds, the default is the complete trial (default = 'all') % cfg.detrend = 'no'; %'no' or 'yes', remove linear trend from the data (done per trial) (default = 'no') I wanted to remove a Baseline defined as the average of a given window preceeding my stimulus onset. I tried to use : cfg.baselinewindow = [-0.5 0 ]; cfg.baselinewindow = [0 0.1] or the default window . But the problem is that I always have the same result, no matter the window I use : the first point of my trial is put to zero and substracted to all my trial. I’m sure I’m doing something wrong (and that the answer is very simple), but I can’t manage to understand what is the issue. Do you have any advice ? Thanks ! Marion Marion VINCENT Eng., PhD , CNRS Research Engineer _______________________________________________ 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 weberi at staff.uni-marburg.de Thu Jan 17 17:31:51 2019 From: weberi at staff.uni-marburg.de (weberi at staff.uni-marburg.de) Date: Thu, 17 Jan 2019 17:31:51 +0100 Subject: [FieldTrip] PhD project in Clinical Neurosciences Message-ID: <20190117173151.Horde.3FU1CgXluh3mw7DhE7jj8VI@home.staff.uni-marburg.de> Dear community, we are looking for a highly motivated student (f/m) for a PhD project in Clinical Neurosciences. When? The project will start 01.April 2019 and is estimated to be completed within three years. Where? This project will be conducted in the Clinical Systems Neuroscience Lab in the Department of Neurology of the University Hospital Marburg, Germany. We work closely with the Department of Neurosurgery. The hospital is affiliated with the Philipps University of Marburg, one of the oldest universities in Europe and home to one of Germany's most traditional medical faculties. Alumni range from the Brothers Grimm to Nobel Laureates Emil von Behring, Otto Loewi and Jules Hoffmann. The project The aim of the PhD project will be to predict and optimize the clinical outcome of Deep Brain Stimulation for Parkinson’s disease based on preoperatively and intraoperatively acquired multimodal data using machine learning. The team The Clinical Systems Neuroscience Lab is a multidisciplinary lab composed of neurologists, neuroscientists, psychologists, biologists and medical technicians. We use innovative analytic techniques to advance the understanding of physiological and pathological neural oscillations and develop new treatment options for neurological disorders. To this end, we employ high-resolution scalp electroencephalography (EEG) and direct recordings from the human brain (intracranial EEG). Intracranially, we record local field potentials, as well as single unit recordings from several brain regions, such as the thalamus, hippocampus, prefrontal cortex and basal ganglia. We are particularly interested in the frequency-specific effects of deep brain stimulation on the neural signature of motor and cognitive brain functions. For further details, visit our website: www.systemsneuroscience.de. We offer… • An innovative and highly relevant research topic • Cutting edge infrastructure and technology • The possibility to learn innovative analysis techniques of neurophysiological data • A young, interdisciplinary and international team • The possibility to work with patients and apply your research clinically  We are looking for… We are looking for a highly motivated, reliable student with experience in research, who is able to critically appraise information and work independently. The applicant should have a background in neuroscience, biology, mathematics, physics or related fields (MSc or equivalent degree). Programming skills and/or experience with machine learning are advantageous, but not a prerequisite for an application. The applicant should have an affinity for mathematics and the motivation to employ and advance new complex computational methods. We are looking for a team player, who is interested in working with neurological patients as part of their research project. As the project requires communication with patients, a certain level of proficiency in German is required. Funding Funding is available for three years and can be extended, if necessary. Application Applications should include a letter of motivation, your curriculum vitae including your research experience and list of publications. Please also provide two letters of recommendation of previous employers or principle investigators of previous labs. We look forward to receiving your application by February 24nd 2019. Please send all documents as pdf to the junior principal investigator Carina Oehrn: Carina Oehrn University Hospital Gießen & Marburg Department of Neurology Baldingerstraße 35043 Marburg, Germany E-Mail: carina.oehrn at staff.uni-marburg.de Best wishes, Immo Weber Dipl.-Biol. Immo Weber Department of Neurology Clinical Systems Neuroscience Lab University Hospital Gießen & Marburg Marburg Baldingerstraße D-35033 Marburg, Germany Phone (+49) 06421 - 58 66276 E-Mail: immo.weber at staff.uni-marburg.de url: http://www.systemsneuroscience.de Aufsichtsratsvorsitzender: Dr. Dr. Martin Siebert Geschäftsführung: Dr. Gunther Weiß (Vorsitzender), Prof. Dr. Werner Seeger (Stv. Vors.), Dr. Christiane Hinck-Kneip, Prof. Dr. Harald Renz Sitz der Gesellschaft: Gießen Amtsgericht Gießen HRB 6384 From marion.vincent at univ-lille.fr Thu Jan 17 17:59:44 2019 From: marion.vincent at univ-lille.fr (Marion Vincent) Date: Thu, 17 Jan 2019 17:59:44 +0100 (CET) Subject: [FieldTrip] Baseline removal errors in trials preprocessing In-Reply-To: <017901d4ae6b$ecd2d200$c6787600$@gmail.com> References: <1783145268.1402885.1547717840566.JavaMail.zimbra@zimbra-store10.univ-lille.fr> <010801d4ae50$40028270$c0078750$@gmail.com> <368923767.1656133.1547729999196.JavaMail.zimbra@zimbra-store10.univ-lille.fr> <017901d4ae6b$ecd2d200$c6787600$@gmail.com> Message-ID: <1674442156.2004986.1547744384621.JavaMail.zimbra@zimbra-store10.univ-lille.fr> An HTML attachment was scrubbed... URL: -------------- next part -------------- Dear Stephen, Thanks for your comments. In fact I only used the cgf1, cfg2.. for plotting the figure I sent you. So it was not my «real» code. But you’re rigth cleaning the cfg will prevent some errors. I’ve done so and still have some errors: (for each case, I compared it to a personnal calculation) If I use the ‘all’ default cfg.baselinewindow => I have the result I expected: the Baseline is the mean value of all the signal. (cf. figure Baseline_AllSignal)If I use a given time window (here from 0.1 to 0 sec before the stimulsu onset) => in fieldtrip, the Baseline is only the «first point» of the raw signal, but not its mean value on the Baseline window (as in my own calculation: cf. figure Baseline_TimeWindow). I also tried with exorbitant window [-10000 0], [0 0.1], etc ) and each time I Always have the exact same result for the filedtrip calculation. Here is my entire code(I hope it will be clearer): ************************************************************** seg_window=[0.1 1]; % in seconds %preStim/postStim trig_Type=[1 5 2 6 3 7 4 8]; % trigger value load(filename_Trig); % ** READ FILE INFO % read the header information and the events from the data hdr   = ft_read_header(filename_Data); % Config cfg= []; cfg.dataset       = filename_Data; % **RE-REFERENCES cfg.reref         = 'yes'; cfg.refchannel    = {'EXG3', 'EXG4'} ; % electrode 131/132 // cell-array with new EEG reference channel(s), this can be 'all' for a common average reference cfg.refmethod     = 'avg'; % 'avg', 'median', or 'bipolar' for bipolar derivation of sequential channels (default = 'avg') % ** TRIAL DEFINITION event_All = ft_read_event(filename_Data); % Select only the trigger codes, not the battery and CMS status sel = find(strcmp({event_All.type}, 'STATUS')); event_All = event_All(sel); cfg.eventType=[trig_Type(1) trig_Type(2)]; cfg.trialfun = 'AVExp_trialfun'; cfg.trialdef.pre  = seg_window(1); cfg.trialdef.post = seg_window(2); cfg.Fs=hdr.Fs; % convert seconds in sample cfg = ft_definetrial(cfg); % Remove trials from Cartool selection cfg.trl(find(Triggers{num_Cond}(:,1)==0),:) = []; data_Raw = ft_preprocessing(cfg); % Plot data to check figure ; chan_num=1; trial_num=1; figure; plot(data_Raw.trial{trial_num}(chan_num,:)); % ** BASELINE CORRECTION: BASELINE IS ALL THE SIGNAL %baseline correct the raw data structure, automatic cfg                     = [] ; cfg.demean              = 'yes'; cfg.baselinewindow      = 'all'; data_Raw_reref        = ft_preprocessing(cfg, data_Raw); % Manual correction test for trial_num=1:length(data_Raw.trial)     for chan_num=1:length(data_Raw.label)         Signal=data_Raw.trial{trial_num}(chan_num,:);         baseline_value=mean(Signal); % for comparison with the default value of         data_Raw_reref_Manual.trial{trial_num}(chan_num,:)=data_Raw.trial{trial_num}(chan_num,:)-baseline_value*ones(1,length(Signal));     end end % plot comparison figure;chan_num=1; trial_num=1; hold all plot(data_Raw_reref.trial{trial_num}(chan_num,:)); plot(data_Raw_reref_Manual.trial{trial_num}(chan_num,:)); legend('FieldTrip','Manual'); title('Baseline is all the signal'); % ** BASELINE CORRECTION: BASELINE IS THE MEAN VALUE OF A WINDOW of 0.1sec before the stimulus onset %baseline correct the raw data structure, automatic cfg                     = [] ; cfg.demean              = 'yes'; cfg.baselinewindow      = [-0.1 0] ; %as the baseline lasts 0.1 s  before the stimulus onset data_Raw_reref_1       = ft_preprocessing(cfg, data_Raw); % Manual correction test for trial 1 - comparison to automatic calculation for trial_num=1:length(data_Raw.trial)     for chan_num=1:length(data_Raw.label)         Signal=data_Raw.trial{trial_num}(chan_num,:);         baseline_window=[1  round(hdr.Fs*0.1)];% because baseline lasts 0.1 s  before the stimulus onset         baseline_value=mean(Signal(baseline_window(1):baseline_window(2)));         data_Raw_reref_Manual_1.trial{trial_num}(chan_num,:)=data_Raw.trial{trial_num}(chan_num,:)-baseline_value*ones(1,length(Signal));     end end % plot comparison figure;chan_num=1; trial_num=1; hold all plot(data_Raw_reref_1.trial{trial_num}(chan_num,:)); plot(data_Raw_reref_Manual_1.trial{trial_num}(chan_num,:)); legend('FieldTrip','Manual'); title('Baseline is a given time window’); ************************************************************** I’m sure it’s a silly mistake, but I really can’t find it. Thanks Marion Marion VINCENT Eng., PhD , CNRS Research Engineer Tel: +33 607 59 46 76 Laboratoire SCALab UMR CNRS 9193 Université Lille 3 BP 60149 59653 Villeneuve d'Ascq Cedex http://scalab.cnrs.fr -------------------------------------------- L’Imaginarium / SCV-IrDIVE Equipex 99a Boulevard Descat 59200 Tourcoing http://www.irdive.fr/ De: Stephen Whitmarsh Envoyé le:jeudi 17 janvier 2019 15:03 À: 'FieldTrip discussion list' Objet:Re: [FieldTrip] Baseline removal errors in trials preprocessing Dear Marion, Your script is a bit messy. I would start with: 1) Always clear your cfg before calling a FT function. Don’t go around saving different cfg’s. This is the nr. 1 cause of confusing results J 2) Load/segment etc. your data first with ft_preprocessing. Then call ft_preprocessing again to baseline correct, entering the output of the first run. I have a hunch that might fix your problem. So, something like: % load your data, apply rereferencing and segment in one go cfg = []; cfg.dataset = filename_Data; cfg.reref = 'yes'; cfg.refchannel = {'EXG3', 'EXG4'} ; cfg.refmethod = 'avg'; cfg.trl = … ; cfg = ft_definetrial(cfg); data_Raw = ft_preprocessing(cfg); % somehow plot your data to check figure ; plot(data_Raw.trial{1}(1, :)) ; % baseline correct your raw data structure, method 1 cfg = [] ; cfg.demean = ‘yes’ ; cfg.baselinewindow = [0 0.1] ; data_Raw_reref_1 = ft_preprocessing(cfg, data_Raw); % somehow plot your data to check figure ; plot(data_Raw_reref_1.trial{1}(1, :)) ; % baseline correct your raw data structure, method 2 cfg = [] ; cfg.demean = ‘yes’ ; cfg.baselinewindow = [-1 -0.1] ; % or whatever data_Raw_reref_2 = ft_preprocessing(cfg, data_Raw); % somehow plot your data to check figure ; plot(data_Raw_reref_2.trial{1}(1, :)) ; And oh, wait, I see what you did there… Don’t use different variables for your cfg, (e.g. cfg1, cfg2, etc.). See the mistake? Those are too easy to make if you don’t do something like the above. Cheers and good FieldTripping! Stepen From: fieldtrip On Behalf Of Marion Vincent Sent: Thursday, January 17, 2019 2:00 PM To: FieldTrip discussion list Subject: Re: [FieldTrip] Baseline removal errors in trials preprocessing Dear Stephen, Here is my script : %segmentation seg_window=[0.1 1]; % in seconds %preStim/postStim %config cfg= []; cfg.dataset = filename_Data; %% *********** TRIAL DEFINITION PART *********** (that works ) […] cfg = ft_definetrial(cfg); % *********** Re-References *********** (that also works ) cfg.reref = 'yes'; cfg.refchannel = {'EXG3', 'EXG4'};% electrode 131/132 // cell-array with new EEG reference channel(s), this can be 'all' for a common average reference cfg.refmethod = 'avg'; % 'avg', 'median', or 'bipolar' for bipolar derivation of sequential channels (default = 'avg') data_Raw = ft_preprocessing(cfg); %% *********** Baseline *********** cfg.demean = 'yes'; cfg1=cfg; cfg1.baselinewindow = [-seg_window(1) 0 ]; cfg2=cfg; cfg2.baselinewindow = [0 0.1]; cfg3=cfg; cfg3.baselinewindow = 'all'; data1 = ft_preprocessing(cfg1); data2 = ft_preprocessing(cfg2); data3 = ft_preprocessing(cfg3); ð I’ve attached the figure with the results. PS : In fact I made a mistake in my previous email : the result wasn’t the same when the Baseline window was ‘all’. Let me know if you need more informations. Thanks for your help. Marion Marion VINCENT Eng., PhD , CNRS Research Engineer Tel: +33 607 59 46 76 Laboratoire SCALab UMR CNRS 9193 Université Lille 3 BP 60149 59653 Villeneuve d'Ascq Cedex http://scalab.cnrs.fr -------------------------------------------- L’Imaginarium / SCV-IrDIVE Equipex 99a Boulevard Descat 59200 Tourcoing http://www.irdive.fr / De : Stephen Whitmarsh Envoyé le :jeudi 17 janvier 2019 11:51 À : 'FieldTrip discussion list' Objet :Re: [FieldTrip] Baseline removal errors in trials preprocessing Dear Marion, It sounds it might indeed be something as simple as a typo. Could you paste the part of your script – from baseline removal to plotting (where you don’t see a difference) - so we can take a look? Cheers, Stephen From: fieldtrip > On Behalf Of Marion Vincent Sent: Thursday, January 17, 2019 10:37 AM To: fieldtrip at science.ru.nl Subject: [FieldTrip] Baseline removal errors in trials preprocessing Dear FIeldtrip users, I’m new in using Fieldtrip for EEG processing and I’ve encountred some issues while removing the Baseline of my trials. I’m working on EEG signals recorded with the BioSemi system. My pre-processing method is : (1) Re-referecing the channels (necessary with BioSemi) (2) Trial definition (3) Baseline removal I’ve read on the documentation that ft_preprocessing xcan have several cfg parameter for the Baseline removal : % cfg.demean = 'yes';%'no' or 'yes', whether to apply baseline correction (default = 'no') % cfg.baselinewindow = 'all';%[begin end] ;%in seconds, the default is the complete trial (default = 'all') % cfg.detrend = 'no'; %'no' or 'yes', remove linear trend from the data (done per trial) (default = 'no') I wanted to remove a Baseline defined as the average of a given window preceeding my stimulus onset. I tried to use : cfg.baselinewindow = [-0.5 0 ]; cfg.baselinewindow = [0 0.1] or the default window . But the problem is that I always have the same result, no matter the window I use : the first point of my trial is put to zero and substracted to all my trial. I’m sure I’m doing something wrong (and that the answer is very simple), but I can’t manage to understand what is the issue. Do you have any advice ? Thanks ! Marion Marion VINCENT Eng., PhD , CNRS Research Engineer _______________________________________________ fieldtrip mailing list https://mailman.science.ru.nl/mailman/listinfo/fieldtrip https://doi.org/10.1371/journal.pcbi.1002202 -------------- next part -------------- A non-text attachment was scrubbed... Name: Baseline_AllSignal.png Type: image/png Size: 21466 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: Baseline_TimeWindow.png Type: image/png Size: 69724 bytes Desc: not available URL: From giulia.lioi at inria.fr Thu Jan 17 18:05:24 2019 From: giulia.lioi at inria.fr (Giulia Lioi) Date: Thu, 17 Jan 2019 18:05:24 +0100 (CET) Subject: [FieldTrip] eeg source analysis units Message-ID: <698173411.1999032.1547744724187.JavaMail.zimbra@inria.fr> Dear Fieldtrip users, I am using ft_sourceanalysis for time-lock dipole source estimation with mne approach. Is someone aware of the units in wich results (i.e. source.pow() ) are expressed? Many thanks Giulia Giulia Lioi, PhD | Engineer R&D Visages-Hybrid teams Univ Rennes, Inria, CNRS, IRISA F-35000 Rennes Tel: 0033 767466577 -------------- next part -------------- An HTML attachment was scrubbed... URL: From stephen.whitmarsh at gmail.com Thu Jan 17 18:50:16 2019 From: stephen.whitmarsh at gmail.com (Stephen Whitmarsh) Date: Thu, 17 Jan 2019 18:50:16 +0100 Subject: [FieldTrip] Baseline removal errors in trials preprocessing In-Reply-To: <1674442156.2004986.1547744384621.JavaMail.zimbra@zimbra-store10.univ-lille.fr> References: <1783145268.1402885.1547717840566.JavaMail.zimbra@zimbra-store10.univ-lille.fr> <010801d4ae50$40028270$c0078750$@gmail.com> <368923767.1656133.1547729999196.JavaMail.zimbra@zimbra-store10.univ-lille.fr> <017901d4ae6b$ecd2d200$c6787600$@gmail.com> <1674442156.2004986.1547744384621.JavaMail.zimbra@zimbra-store10.univ-lille.fr> Message-ID: Hi Marion, I would check your time axis. I never use ft_definetrial like that (I make my own .trl field), so I'm not sure it went through correctly with the offset (t=0). So check your data_Raw.time{1}. Does it really go from -0.1 to 1.0? If not, Julian's point is right, and your point on that is 'first point' might be explained as well, if I understood that correctly. Cheers, Stephen On Thu, 17 Jan 2019 at 18:29, Marion Vincent wrote: > Dear Stephen, > Thanks for your comments. > In fact I only used the cgf1, cfg2.. for plotting the figure I sent you. > So it was not my «real» code. > But you’re rigth cleaning the cfg will prevent some errors. > I’ve done so and still have some errors: (for each case, I compared it to > a personnal calculation) > If I use the ‘all’ default cfg.baselinewindow => I have the result I > expected: the Baseline is the mean value of all the signal. (cf. figure > Baseline_AllSignal)If I use a given time window (here from 0.1 to 0 sec > before the stimulsu onset) => in fieldtrip, the Baseline is only the «first > point» of the raw signal, but not its mean value on the Baseline window (as > in my own calculation: cf. figure Baseline_TimeWindow). I also tried with > exorbitant window [-10000 0], [0 0.1], etc ) and each time I Always have > the exact same result for the filedtrip calculation. > Here is my entire code(I hope it will be clearer): > ************************************************************** > seg_window=[0.1 1]; % in seconds %preStim/postStim > trig_Type=[1 5 2 6 3 7 4 8]; % trigger value > load(filename_Trig); > % ** READ FILE INFO > % read the header information and the events from the data > hdr = ft_read_header(filename_Data); > % Config > cfg= []; > cfg.dataset = filename_Data; > % **RE-REFERENCES > cfg.reref = 'yes'; > cfg.refchannel = {'EXG3', 'EXG4'} ; % electrode 131/132 // cell-array > with new EEG reference channel(s), this can be 'all' for a common average > reference > cfg.refmethod = 'avg'; % 'avg', 'median', or 'bipolar' for bipolar > derivation of sequential channels (default = 'avg') > % ** TRIAL DEFINITION > event_All = ft_read_event(filename_Data); > % Select only the trigger codes, not the battery and CMS status > sel = find(strcmp({event_All.type}, 'STATUS')); > event_All = event_All(sel); > cfg.eventType=[trig_Type(1) trig_Type(2)]; > cfg.trialfun = 'AVExp_trialfun'; > cfg.trialdef.pre = seg_window(1); > cfg.trialdef.post = seg_window(2); > cfg.Fs=hdr.Fs; % convert seconds in sample > cfg = ft_definetrial(cfg); > % Remove trials from Cartool selection > cfg.trl(find(Triggers{num_Cond}(:,1)==0),:) = []; > data_Raw = ft_preprocessing(cfg); > % Plot data to check > figure ; chan_num=1; > trial_num=1; > figure; > plot(data_Raw.trial{trial_num}(chan_num,:)); > % ** BASELINE CORRECTION: BASELINE IS ALL THE SIGNAL > %baseline correct the raw data structure, automatic > cfg = [] ; > cfg.demean = 'yes'; > cfg.baselinewindow = 'all'; > data_Raw_reref = ft_preprocessing(cfg, data_Raw); > % Manual correction test > for trial_num=1:length(data_Raw.trial) > for chan_num=1:length(data_Raw.label) > Signal=data_Raw.trial{trial_num}(chan_num,:); > baseline_value=mean(Signal); % for comparison with the default > value of > > data_Raw_reref_Manual.trial{trial_num}(chan_num,:)=data_Raw.trial{trial_num}(chan_num,:)-baseline_value*ones(1,length(Signal)); > end > end > % plot comparison > figure;chan_num=1; > trial_num=1; > hold all > plot(data_Raw_reref.trial{trial_num}(chan_num,:)); > plot(data_Raw_reref_Manual.trial{trial_num}(chan_num,:)); > legend('FieldTrip','Manual'); > title('Baseline is all the signal'); > % ** BASELINE CORRECTION: BASELINE IS THE MEAN VALUE OF A WINDOW of 0.1sec > before the stimulus onset > %baseline correct the raw data structure, automatic > cfg = [] ; > cfg.demean = 'yes'; > cfg.baselinewindow = [-0.1 0] ; %as the baseline lasts 0.1 s before > the stimulus onset > data_Raw_reref_1 = ft_preprocessing(cfg, data_Raw); > % Manual correction test for trial 1 - comparison to automatic calculation > for trial_num=1:length(data_Raw.trial) > for chan_num=1:length(data_Raw.label) > Signal=data_Raw.trial{trial_num}(chan_num,:); > baseline_window=[1 round(hdr.Fs*0.1)];% because baseline lasts > 0.1 s before the stimulus onset > baseline_value=mean(Signal(baseline_window(1):baseline_window(2))); > > data_Raw_reref_Manual_1.trial{trial_num}(chan_num,:)=data_Raw.trial{trial_num}(chan_num,:)-baseline_value*ones(1,length(Signal)); > end > end > % plot comparison > figure;chan_num=1; > trial_num=1; > hold all > plot(data_Raw_reref_1.trial{trial_num}(chan_num,:)); > plot(data_Raw_reref_Manual_1.trial{trial_num}(chan_num,:)); > legend('FieldTrip','Manual'); > title('Baseline is a given time window’); > ************************************************************** > I’m sure it’s a silly mistake, but I really can’t find it. > Thanks > Marion > Marion VINCENT > Eng., PhD , CNRS Research Engineer > Tel: +33 607 59 46 76 > Laboratoire SCALab UMR CNRS 9193 > Université Lille 3 > BP 60149 > 59653 Villeneuve d'Ascq Cedex > http://scalab.cnrs.fr > -------------------------------------------- > L’Imaginarium / SCV-IrDIVE Equipex > 99a Boulevard Descat > 59200 Tourcoing > http://www.irdive.fr/ > De: Stephen Whitmarsh > Envoyé le:jeudi 17 janvier 2019 15:03 > À: 'FieldTrip discussion list' > Objet:Re: [FieldTrip] Baseline removal errors in trials preprocessing > > > Dear Marion, > > > > Your script is a bit messy. I would start with: > > 1) Always clear your cfg before calling a FT function. Don’t go > around saving different cfg’s. This is the nr. 1 cause of confusing results > J > > 2) Load/segment etc. your data first with ft_preprocessing. Then call > ft_preprocessing again to baseline correct, entering the output of the > first run. > > I have a hunch that might fix your problem. So, something like: > > > > % load your data, apply rereferencing and segment in one go > > cfg = []; > > cfg.dataset = filename_Data; > > cfg.reref = 'yes'; > > cfg.refchannel = {'EXG3', 'EXG4'} ; > > cfg.refmethod = 'avg'; > > cfg.trl = … ; > > cfg = ft_definetrial(cfg); > > data_Raw = ft_preprocessing(cfg); > > > > % somehow plot your data to check > > figure ; plot(data_Raw.trial{1}(1, :)) ; > > > > % baseline correct your raw data structure, method 1 > > cfg = [] ; > > cfg.demean = ‘yes’ ; > > cfg.baselinewindow = [0 0.1] ; > > data_Raw_reref_1 = ft_preprocessing(cfg, data_Raw); > > > > % somehow plot your data to check > > figure ; plot(data_Raw_reref_1.trial{1}(1, :)) ; > > > > % baseline correct your raw data structure, method 2 > > cfg = [] ; > > cfg.demean = ‘yes’ ; > > cfg.baselinewindow = [-1 -0.1] ; % or whatever > > data_Raw_reref_2 = ft_preprocessing(cfg, data_Raw); > > > > % somehow plot your data to check > > figure ; plot(data_Raw_reref_2.trial{1}(1, :)) ; > > > > And oh, wait, I see what you did there… Don’t use different variables for > your cfg, (e.g. cfg1, cfg2, etc.). See the mistake? Those are too easy to > make if you don’t do something like the above. > > > > Cheers and good FieldTripping! > > Stepen > > > > > > > > From: fieldtrip On Behalf Of Marion > Vincent > Sent: Thursday, January 17, 2019 2:00 PM > To: FieldTrip discussion list > Subject: Re: [FieldTrip] Baseline removal errors in trials preprocessing > > > > Dear Stephen, > > > > Here is my script : > > > > %segmentation > > seg_window=[0.1 1]; % in seconds %preStim/postStim > > > > %config > > cfg= []; > > cfg.dataset = filename_Data; > > > > %% *********** TRIAL DEFINITION PART *********** (that works ) > > […] > > cfg = ft_definetrial(cfg); > > > > % *********** Re-References *********** (that also works ) > > cfg.reref = 'yes'; > > cfg.refchannel = {'EXG3', 'EXG4'};% electrode 131/132 // cell-array with > new EEG reference channel(s), this can be 'all' for a common average > reference > > cfg.refmethod = 'avg'; % 'avg', 'median', or 'bipolar' for bipolar > derivation of sequential channels (default = 'avg') > > > > data_Raw = ft_preprocessing(cfg); > > > > %% *********** Baseline *********** > > cfg.demean = 'yes'; > > > > cfg1=cfg; > > cfg1.baselinewindow = [-seg_window(1) 0 ]; > > cfg2=cfg; > > cfg2.baselinewindow = [0 0.1]; > > cfg3=cfg; > > cfg3.baselinewindow = 'all'; > > > > data1 = ft_preprocessing(cfg1); > > data2 = ft_preprocessing(cfg2); > > data3 = ft_preprocessing(cfg3); > > > > > > ð I’ve attached the figure with the results. > > > > PS : In fact I made a mistake in my previous email : the result wasn’t the > same when the Baseline window was ‘all’. > > > > Let me know if you need more informations. > > Thanks for your help. > > > > Marion > > > > > > Marion VINCENT > Eng., PhD , CNRS Research Engineer > Tel: +33 607 59 46 76 > > Laboratoire SCALab UMR CNRS 9193 > Université Lille 3 > BP 60149 > 59653 Villeneuve d'Ascq Cedex > http://scalab.cnrs.fr > -------------------------------------------- > L’Imaginarium / SCV-IrDIVE Equipex > 99a Boulevard Descat > 59200 Tourcoing > http://www.irdive.fr / > > > > De : Stephen Whitmarsh > Envoyé le :jeudi 17 janvier 2019 11:51 > À : 'FieldTrip discussion list' > Objet :Re: [FieldTrip] Baseline removal errors in trials preprocessing > > > > > > Dear Marion, > > > > It sounds it might indeed be something as simple as a typo. Could you > paste the part of your script – from baseline removal to plotting (where > you don’t see a difference) - so we can take a look? > > > > Cheers, > > Stephen > > > > From: fieldtrip fieldtrip-bounces at science.ru.nl> > On Behalf Of Marion Vincent > Sent: Thursday, January 17, 2019 10:37 AM > To: fieldtrip at science.ru.nl > Subject: [FieldTrip] Baseline removal errors in trials preprocessing > > > > Dear FIeldtrip users, > > > > I’m new in using Fieldtrip for EEG processing and I’ve encountred some > issues while removing the Baseline of my trials. > > > > I’m working on EEG signals recorded with the BioSemi system. My > pre-processing method is : > > (1) Re-referecing the channels (necessary with BioSemi) > > (2) Trial definition > > (3) Baseline removal > > > > I’ve read on the documentation that ft_preprocessing xcan have several cfg > parameter for the Baseline removal : > > > > % cfg.demean = 'yes';%'no' or 'yes', whether to apply baseline correction > (default = 'no') > > % cfg.baselinewindow = 'all';%[begin end] ;%in seconds, the default is the > complete trial (default = 'all') > > % cfg.detrend = 'no'; %'no' or 'yes', remove linear trend from the > data (done per trial) (default = 'no') > > > > I wanted to remove a Baseline defined as the average of a given window > preceeding my stimulus onset. > > > > I tried to use : cfg.baselinewindow = [-0.5 0 ]; cfg.baselinewindow = [0 > 0.1] or the default window . > > But the problem is that I always have the same result, no matter the > window I use : the first point of my trial is put to zero and substracted > to all my trial. > > > > I’m sure I’m doing something wrong (and that the answer is very simple), > but I can’t manage to understand what is the issue. > > > > Do you have any advice ? > > > > Thanks ! > > Marion > > > > Marion VINCENT > Eng., PhD , CNRS Research Engineer > > > > > > _______________________________________________ > 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 elene.beitia at alumni.mondragon.edu Fri Jan 18 09:20:14 2019 From: elene.beitia at alumni.mondragon.edu (Elene Beitia Loinaz) Date: Fri, 18 Jan 2019 09:20:14 +0100 Subject: [FieldTrip] headmodel and electrodes alignment In-Reply-To: References: Message-ID: Thank you Stephen and Julian, I already fixed the problem. It was a problem between different standards. Hau idatzi du Stephen Whitmarsh (stephen.whitmarsh at gmail.com) erabiltzaileak (2019 urt. 16, az. (10:45)): > Hi Elene, > > In the code you do not use ft_electroderealign twice (once manually, then > automatic). Also, you convert units after realignment. > > For the sake of debugging and clarity, I would: > > > 1. - figure out and set the units correctly for you headmodel and > electrodes > 2. - convert headmodel and electrodes to same units > 3. - plot to check > 4. - use 'interactive' realignment > 5. - plot to check > 6. - use 'headmodel' realignment > 7. - plot to check > > > Cheers, > Stephen > > > On Wed, 16 Jan 2019 at 10:35, Elene Beitia Loinaz < > elene.beitia at alumni.mondragon.edu> wrote: > >> Hi Stephen, >> >> Thank you for your answer. I already try that, but the result that I >> obtained is not correct either. >> >> Code: >> >> cfg=[]; >> >> cfg.method= 'headshape'; >> >> cfg.headshape=headmodel.bnd(1); % this is the skin surface >> >> elec_realigned =ft_electroderealign(cfg,data1.elec); >> >> >> >> %Plot the result to see if is correct >> >> >> >> vol = ft_convert_units(vol,'mm'); >> >> elec_realigned = ft_convert_units(elec_realigned,'mm') >> >> >> >> figure >> >> ft_plot_sens(elec_realigned, 'style', 'b'); >> >> >> >> hold on >> >> ft_plot_vol(vol); >> >> [image: Captura de pantalla 2019-01-16 a las 9.59.14.png] >> >> Thank you in advance, >> >> Elene. >> _______________________________________________ >> 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 aitor.martinezegurcegui at uzh.ch Fri Jan 18 16:16:42 2019 From: aitor.martinezegurcegui at uzh.ch (Aitor Egurtzegi) Date: Fri, 18 Jan 2019 16:16:42 +0100 Subject: [FieldTrip] automatic channel rejection Message-ID: Dear Fieldtrip subscribers, I was wondering if anyone knew how to automatically reject bad channels in Fieldtrip, as it is done in EEGLAB based on e.g. kurtosis. Basically, I'm looking for the Fieldtrip equivalent of the EEGLAB function pop_rejchan. Many thanks in advance, Aitor From dlozanosoldevilla at gmail.com Fri Jan 18 16:47:17 2019 From: dlozanosoldevilla at gmail.com (Diego Lozano-Soldevilla) Date: Fri, 18 Jan 2019 16:47:17 +0100 Subject: [FieldTrip] automatic channel rejection In-Reply-To: References: Message-ID: Hi Aitor, Take a look at this http://www.fieldtriptoolbox.org/tutorial/visual_artifact_rejection/#manual-artifact-rejection---display-a-summary Best, Diego On Fri, 18 Jan 2019 at 16:43, Aitor Egurtzegi < aitor.martinezegurcegui at uzh.ch> wrote: > Dear Fieldtrip subscribers, > > I was wondering if anyone knew how to automatically reject bad channels > in Fieldtrip, as it is done in EEGLAB based on e.g. kurtosis. Basically, > I'm looking for the Fieldtrip equivalent of the EEGLAB function > pop_rejchan. > > Many thanks in advance, > Aitor > > _______________________________________________ > 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 ali.mazah at gmail.com Fri Jan 18 16:46:18 2019 From: ali.mazah at gmail.com (Ali Mazaheri) Date: Fri, 18 Jan 2019 15:46:18 +0000 Subject: [FieldTrip] Postdoc position in the Experimental Linguistics Laboratory (ELL) Message-ID: Postdoctoral Research Fellow in the Experimental Linguistics Laboratory (ELL) A temporary, full-time position as a Postdoctoral Research Fellow is available at the University of Agder for a duration of two years. The position is affiliated with the Department of Foreign Languages and Translation, Faculty of Humanities and Pedagogy. The position is located at the University of Agder’s Kristiansand campus. The starting date is *1 August 2019,* or subject to agreement during the recruitment process. The person hired will contribute to a research project within the Experimental Linguistics Laboratory (ELL) run by Prof. Linda Wheeldon and Prof. Allison Wetterlin. The project will be run in collaboration with Prof. Aditi Lahiri (Language and Brain Laboratory, Oxford University) and Dr. Steven Frisson (Language Research Group, University of Birmingham). The research will employ eye-tracking and EEG methodologies to examine morpho-phonological processes in second language English reading and speech comprehension in Norwegian-English bilinguals. The Postdoctoral Research Fellow (RF) will be fully involved in the design, running, analysis and dissemination of the research. The project will support the career development of the RF by enabling the development of their research expertise in a theoretically and methodologically demanding project. Applicants must have a PhD in Experimental Linguistics or Psycholinguistics and expertise in the design, running of EEG experiments and in EEG data analysis. They must also have excellent spoken and written English. They must have obtained their doctorate within the last four years, and preferably within the last two. The dissertation must have been approved within the application deadline. Documented research publications beyond the doctoral thesis and experience from externally financed research projects (including writing applications and implementing projects) will be given priority. Engagement as a postdoctoral research fellow is carried out in accordance with the *Regulations concerning terms and conditions of employment for the positions of post-doctoral research fellows, research fellows, research assistants and specialized residents* as determined by the Ministry of Education and Research of 31.01.06, pursuant to the Act covering universities and colleges § 6-4, sixth paragraph, located at http://www.lovdata.no/for/sf/kd/xd-20060131-0102.html Cooperative skills and personal suitability will be emphasised. In the ranking of the candidates. Emphasis will also be placed upon the applicants’ competence and academic specialisation in relation to the needs of the research project. The successful applicant will have rights and obligations in accordance with the current regulations for the public service. Shortlisted applicants will be invited to attend an interview for the position. Appointments are made by the University of Agder’s Appointments Committee for Instruction and Research Positions. The Norwegian public sector is committed to reflecting the diversity of society, and the personnel policy of the University of Agder aims to achieve a balanced workforce. All qualified persons are therefore encouraged to apply for the position, irrespective of cultural background, gender, age or disability. The position is remunerated according to the State Salary Scale, Salary Plan 17.510, code 1352 Postdoctor, lr. 24, NOK 524 200 - 597 400. For especially well-qualified applicants, a higher salary may be considered. A 2 % compulsory pension contribution to the Norwegian Public Service Pension Fund is deducted from the pay according to current statutory provisions. Applicants are requested to submit their application online. Please use the link “Send Application”. - Certified transcripts - List of publications - Up to 5 publications or academic articles (including the PhD thesis) The applicant is also responsible for making sure that the appropriate number of documents are submitted by the application deadline. Be aware that incomplete applications will not be considered. In accordance with §25(2) of the Freedom of Information Act, applicants may request that they are not identified in the open list of applicants. The University, however, reserves the right to publish the name of applicants. Applicants will be advised of the University’s intention to exercise this right. *Application deadline: 15 March 2019.* Further information about the position may be obtained from Prof. Linda Wheeldonand Prof. Allison Wetterlin -- Dr Ali Mazaheri, PhD Associate Professor School of Psychology 3.03 Hills Building University of Birmingham +44(0)121 414 2863 www.alimazaheri.com -------------- next part -------------- An HTML attachment was scrubbed... URL: From J.Billington at leeds.ac.uk Fri Jan 18 19:07:04 2019 From: J.Billington at leeds.ac.uk (Jac Billington) Date: Fri, 18 Jan 2019 18:07:04 +0000 Subject: [FieldTrip] ft_clusterplot error? Message-ID: Dear experts, I've recently begun using fieldtrip and have been following tutorials well. however, I have perhaps run into a problem with ft_clusterplot. An example output is located in dropbox here: https://www.dropbox.com/sh/64m3xpgco2uavky/AADT6-rXEdylVzHN1lY-q7SNa?dl=0 My negative cluster labels don't seem to be located in a cluster per se, or in regions with a greater raw effect. This seems at odds with tutorial examples and papers. Apologies if I'm missing something, but can this be correct? I did have earlier errors (' ft_error('unsupported dimord %s', dimord);') but I realised this was because dimensions of my stat.raweffect (64 5 200) were in conflict with collapsing time and frequency when running ft_freqstatistics. Reducing stat.raweefect to 64 1 solved this error, but I'm wondering if I have done something wrong. My code is posted below and I'd happily be poited to some papers if I'm misunderstanding this. Thank you in advance. Jac % load data (from ft_freqanalysis) load(filename1); con1= freqScaling load(filename2); con2=freqScaling; %%%% run the stats: cfg = []; cfg.channel = 'all'; cfg.latency = [4 6]; cfg.frequency = [8 12]; cfg.method = 'montecarlo'; cfg.statistic = 'ft_statfun_indepsamplesT'; cfg.correctm = 'cluster'; cfg.clusteralpha = 0.05; cfg.clusterstatistic = 'maxsum'; cfg.minnbchan = 2; cfg.tail = 0; cfg.clustertail = 0; cfg.alpha = 0.025; cfg.numrandomization = 500; cfg.avgoverchan = 'no' cfg.avgovertime = 'yes' cfg.avgoverfreq = 'yes' % prepare_neighbours determines what sensors may form clusters cfg_neighb.method = 'distance'; cfg.neighbours = ft_prepare_neighbours(cfg_neighb, elec); design = zeros(1,size(con1.powspctrm,1) + size(con2.powspctrm,1)); design(1,1:size(con1.powspctrm,1)) = 1; design(1,(size(con1.powspctrm,1)+1):(size(con1.powspctrm,1)+ size(con2.powspctrm,1))) = 2; cfg.design = design; cfg.ivar = 1; [stat] = ft_freqstatistics(cfg, con1, con2); cfg=[] cfg.keeptrials = 'no' cfg.latency = [4 6]; cfg.frequency = [8 12]; con1 = ft_freqdescriptives(cfg, con1); con2 = ft_freqdescriptives(cfg, con2); %%%% resize powerspec to avoid dimord error. Collapse freq/ time con1rs=mean(con1.powspctrm,3) %%% collapse time dim con2rs=mean(con2.powspctrm,3) %%% collapse time dim con1rs=mean(con1rs,2) %%% collapse freq con2rs=mean(con2rs,2) stat.raweffect = con1rs-con2rs cfg.alpha = 0.025; cfg.zparam = 'raweffect'; cfg.zlim = [-1 3]; cfg.layout = 'biosemi64.lay'; cfg.subplotsize = ([1 1]); ft_clusterplot(cfg, stat); -------------- next part -------------- An HTML attachment was scrubbed... URL: From a.stolk8 at gmail.com Fri Jan 18 20:30:49 2019 From: a.stolk8 at gmail.com (Arjen Stolk) Date: Fri, 18 Jan 2019 11:30:49 -0800 Subject: [FieldTrip] ECoG/sEEG FieldTrip bootcamp at UC Davis Message-ID: Dear community, and (aspiring) intracranial researchers in particular, We're hosting the first ECoG/sEEG FieldTrip bootcamp at the UC Davis Medical Center (Sacramento, California) on March 20-22. The workshop will consist of lectures and hands-on sessions covering the methods implemented in FieldTrip. Speakers include Robert Oostenveld (Donders Institute), Bob Knight (UC Berkeley), and myself (UC Berkeley, Donders). For more information, including how to register, please visit the bootcamp website . Best regards, Arjen Stolk Ignacio Saez (UC Davis) Robert Oostenveld -------------- next part -------------- An HTML attachment was scrubbed... URL: From stephen.whitmarsh at gmail.com Sat Jan 19 11:04:46 2019 From: stephen.whitmarsh at gmail.com (Stephen Whitmarsh) Date: Sat, 19 Jan 2019 11:04:46 +0100 Subject: [FieldTrip] ft_clusterplot error? In-Reply-To: References: Message-ID: Hi Jac, I would start by plotting your (t)stats, and for simplicity doing that with ft_singleplotER (cfg.param = 'stat') rather than ft_clusterplot. Then try plotting the power-difference. This should not be more than a subtraction of data_diff.powspctrm = data1.powspctrm - data2.powspctrm, . No reshaping should be needed. The problem is probably a mistake somewhere keeping track of dimensions/latencies etc. which is tricky with clusters. Also, make sure to clear your cfg before every function so you don't carry the cfg of a previous function into the next. That will also help readability and debugging. HTH, Stephen On Fri, 18 Jan 2019 at 19:28, Jac Billington wrote: > Dear experts, > > > I've recently begun using fieldtrip and have been following tutorials > well. however, I have perhaps run into a problem with ft_clusterplot. > > > An example output is located in dropbox here: > https://www.dropbox.com/sh/64m3xpgco2uavky/AADT6-rXEdylVzHN1lY-q7SNa?dl=0 > > > My negative cluster labels don't seem to be located in a cluster per se, > or in regions with a greater raw effect. This seems at odds with tutorial > examples and papers. Apologies if I'm missing something, but can this be > correct? > > > I did have earlier errors (' ft_error('unsupported dimord %s', dimord);') > but I realised this was because dimensions of my stat.raweffect (64 5 > 200) were in conflict with collapsing time and frequency when running > ft_freqstatistics. Reducing stat.raweefect to 64 1 solved this error, but > I'm wondering if I have done something wrong. > > > My code is posted below and I'd happily be poited to some papers if I'm > misunderstanding this. > > > Thank you in advance. Jac > > > > % load data (from ft_freqanalysis) > load(filename1); > con1= freqScaling > load(filename2); > con2=freqScaling; > > %%%% run the stats: > cfg = []; > cfg.channel = 'all'; > cfg.latency = [4 6]; > cfg.frequency = [8 12]; > cfg.method = 'montecarlo'; > cfg.statistic = 'ft_statfun_indepsamplesT'; > cfg.correctm = 'cluster'; > cfg.clusteralpha = 0.05; > cfg.clusterstatistic = 'maxsum'; > cfg.minnbchan = 2; > cfg.tail = 0; > cfg.clustertail = 0; > cfg.alpha = 0.025; > cfg.numrandomization = 500; > cfg.avgoverchan = 'no' > cfg.avgovertime = 'yes' > cfg.avgoverfreq = 'yes' > % prepare_neighbours determines what sensors may form clusters > cfg_neighb.method = 'distance'; > cfg.neighbours = ft_prepare_neighbours(cfg_neighb, elec); > > design = zeros(1,size(con1.powspctrm,1) + size(con2.powspctrm,1)); > design(1,1:size(con1.powspctrm,1)) = 1; > design(1,(size(con1.powspctrm,1)+1):(size(con1.powspctrm,1)+ > size(con2.powspctrm,1))) = 2; > cfg.design = design; > cfg.ivar = 1; > > > [stat] = ft_freqstatistics(cfg, con1, con2); > > > > cfg=[] > cfg.keeptrials = 'no' > cfg.latency = [4 6]; > cfg.frequency = [8 12]; > con1 = ft_freqdescriptives(cfg, con1); > con2 = ft_freqdescriptives(cfg, con2); > > %%%% resize powerspec to avoid dimord error. Collapse freq/ time > con1rs=mean(con1.powspctrm,3) %%% collapse time dim > con2rs=mean(con2.powspctrm,3) %%% collapse time dim > con1rs=mean(con1rs,2) %%% collapse freq > con2rs=mean(con2rs,2) > stat.raweffect = con1rs-con2rs > > cfg.alpha = 0.025; > cfg.zparam = 'raweffect'; > cfg.zlim = [-1 3]; > cfg.layout = 'biosemi64.lay'; > cfg.subplotsize = ([1 1]); > ft_clusterplot(cfg, stat); > > > _______________________________________________ > 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 aitor.martinezegurcegui at uzh.ch Sun Jan 20 17:22:07 2019 From: aitor.martinezegurcegui at uzh.ch (Aitor Egurtzegi) Date: Sun, 20 Jan 2019 17:22:07 +0100 Subject: [FieldTrip] automatic channel rejection In-Reply-To: References: Message-ID: <10d93c05-c66e-18d6-7533-ef40b858a218@uzh.ch> Hi Diego, Thanks for the help. However, I was wondering if there is a way to reject artifacts without visually inspecting them. Like, from the manual you sent I see that I still would have to click on the trials / channels I would like to reject? Is there a way to script it based on some previously established parameters, without having to check all trials / channels for each participant? Best, Aitor > Date: Fri, 18 Jan 2019 16:47:17 +0100 > From: Diego Lozano-Soldevilla > To: FieldTrip discussion list > Subject: Re: [FieldTrip] automatic channel rejection > Message-ID: > > Content-Type: text/plain; charset="utf-8" > > Hi Aitor, > Take a look at this > http://www.fieldtriptoolbox.org/tutorial/visual_artifact_rejection/#manual-artifact-rejection---display-a-summary > Best, > Diego > > On Fri, 18 Jan 2019 at 16:43, Aitor Egurtzegi < > aitor.martinezegurcegui at uzh.ch> wrote: > >> Dear Fieldtrip subscribers, >> >> I was wondering if anyone knew how to automatically reject bad channels >> in Fieldtrip, as it is done in EEGLAB based on e.g. kurtosis. Basically, >> I'm looking for the Fieldtrip equivalent of the EEGLAB function >> pop_rejchan. >> >> Many thanks in advance, >> Aitor >> >> _______________________________________________ >> fieldtrip mailing list >> https://mailman.science.ru.nl/mailman/listinfo/fieldtrip >> https://doi.org/10.1371/journal.pcbi.1002202 From r.oostenveld at donders.ru.nl Mon Jan 21 10:25:29 2019 From: r.oostenveld at donders.ru.nl (Robert Oostenveld) Date: Mon, 21 Jan 2019 10:25:29 +0100 Subject: [FieldTrip] MEG/EEG FieldTrip toolkit course: pre-registration now open In-Reply-To: References: Message-ID: Dear all, On 8-12 April 2019 we will again host the yearly “Advanced MEG/EEG toolkit" at the Donders Institute in Nijmegen. The course is aimed at researchers that have already performed some MEG/EEG data acquisition and have a good understanding of their own experimental design. Furthermore, we expect that you know the basics of MATLAB and that you already have some experience with MEG/EEG preprocessing and analysis. This intense 5-day toolkit course will teach you advanced MEG and EEG data analysis methods. We will cover preprocessing, frequency analysis, source reconstruction, connectivity and various statistical methods. The toolkit will consist of a number of lectures, followed by hands-on sessions in which you will be tutored through the complete analysis of a MEG data set using the FieldTrip toolbox. There will be plenty of opportunity to interact and ask questions about your research and data. On the final day you will have the opportunity to work on your own dataset under supervision of skilled tutors. We can only host a limited number of participants. From past experience we expect the course to be oversubscribed, hence we will start with pre-registration. The final selection of the participants will be based on the motivation, background experience and research interests that are provided in the registration form. The deadline for pre-registration is March 1, 2019. More information, including information about the registration details and last years program can be found at http://www.fieldtriptoolbox.org/workshop/toolkit2019/ . Looking forward to seeing you at the toolkit course, Robert ----------------------------------------------------------- Robert Oostenveld, PhD Senior Researcher & MEG Physicist Donders Institute for Brain, Cognition and Behaviour Radboud University, Nijmegen, The Netherlands tel.: +31 (0)24 3619695 e-mail: r.oostenveld at donders.ru.nl web: http://www.ru.nl/donders skype: r.oostenveld ----------------------------------------------------------- -------------- next part -------------- An HTML attachment was scrubbed... URL: From elene.beitia at alumni.mondragon.edu Mon Jan 21 12:15:02 2019 From: elene.beitia at alumni.mondragon.edu (Elene Beitia Loinaz) Date: Mon, 21 Jan 2019 12:15:02 +0100 Subject: [FieldTrip] Problem selecting frequency range for source reconstruction using beamforming DICS technique Message-ID: Dear Fieldtripers, I am trying to select a time-frequency tile for the performance of the Bermforming using DICS recostruction. First, usng freq analysis I have chosen the time-frequency range I want, you can see it in the next code: cfg = []; cfg.continuous = 'yes'; cfg.output = 'fourier'; cfg.channel = 'all'; cfg.keeptrials = 'yes'; cfg.method = 'mtmfft'; cfg.taper = 'hanning'; cfg.foilim = [8 12]; cfg.t_ftimwin =[160:0.0039063:175]; data_Fourier = ft_freqanalysis(cfg, data1); If I look in the data_Fourier the frequency is define like a range, but when I do the beamforming it choses only one frequency (the middle of the range), I have not configured anything in cfg.frequency since I want to take the full range and not a single number in Hz, but still takes only one (in my case 10Hz). Error: Warning: could not determine dimord of "freq" in: label: {128×1 cell} freq: 10.0000 fourierspctrm: [1×128 double] cumsumcnt: 94464 cumtapcnt: 1 elec: [1×1 struct] cfg: [1×1 struct] dimord: 'rpttap_chan_freq' Warning: the selected value 10 should be within the range of the array from 10 to 10 Is there anyway to consider all the rage? Is it necessary to set other parameters in the cfg of the ft_freqanalysis/ft_sourceanalysis? Thank you in advanced, Elene. -------------- next part -------------- An HTML attachment was scrubbed... URL: From stephen.whitmarsh at gmail.com Mon Jan 21 13:03:16 2019 From: stephen.whitmarsh at gmail.com (Stephen Whitmarsh) Date: Mon, 21 Jan 2019 13:03:16 +0100 Subject: [FieldTrip] Problem selecting frequency range for source reconstruction using beamforming DICS technique In-Reply-To: References: Message-ID: Dear Elene, ft_sourceanalysis only takes a single number (as stated in the help) in cfg.frequency. If cfg.frquency is empty it will first default to 'all', and then take the average frequency of the input data (cfg.frequency = mean(cfg.frequency) %on line 306). This is not clear, and I would suppose just breaking with an error would have been clearer. If you want all the frequencies beamformed separately you will have to loop over frequencies. If you want all the frequencies beamformed as an average over frequencies you can average your frequency data first with e.g. ft_selectdata (cfg.avgoverfreq = 'yes') or, better, do your freqanalysis with some sleppian smoothing (cfg.taper = 'dpss'). HTH, Stephen On Mon, 21 Jan 2019 at 12:35, Elene Beitia Loinaz < elene.beitia at alumni.mondragon.edu> wrote: > Dear Fieldtripers, > > I am trying to select a time-frequency tile for the performance of the > Bermforming using DICS recostruction. > > First, usng freq analysis I have chosen the time-frequency range I want, > you can see it in the next code: > > cfg = []; > cfg.continuous = 'yes'; > cfg.output = 'fourier'; > cfg.channel = 'all'; > cfg.keeptrials = 'yes'; > cfg.method = 'mtmfft'; > cfg.taper = 'hanning'; > cfg.foilim = [8 12]; > cfg.t_ftimwin =[160:0.0039063:175]; > data_Fourier = ft_freqanalysis(cfg, data1); > > If I look in the data_Fourier the frequency is define like a range, but > when I do the beamforming it choses only one frequency (the middle of the > range), I have not configured anything in cfg.frequency since I want to > take the full range and not a single number in Hz, but still takes only one > (in my case 10Hz). > > Error: > Warning: could not determine dimord of "freq" in: > > label: {128×1 cell} > freq: 10.0000 > fourierspctrm: [1×128 double] > cumsumcnt: 94464 > cumtapcnt: 1 > elec: [1×1 struct] > cfg: [1×1 struct] > dimord: 'rpttap_chan_freq' > > > Warning: the selected value 10 should be within the range of the array > from 10 to 10 > > Is there anyway to consider all the rage? Is it necessary to set other > parameters in the cfg of the ft_freqanalysis/ft_sourceanalysis? > > Thank you in advanced, > > Elene. > > > > _______________________________________________ > 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 J.Billington at leeds.ac.uk Mon Jan 21 13:51:26 2019 From: J.Billington at leeds.ac.uk (Jac Billington) Date: Mon, 21 Jan 2019 12:51:26 +0000 Subject: [FieldTrip] ft_clusterplot error? In-Reply-To: References: Message-ID: Dear Stephen, Thank you for the useful reply, I've been doing some trouble shooting and it seems the output of ft_freqstatistics doesn't seem to be reflecting my raw data. See "stat_discrepency.jpg" in dropbox link. This plots condition 1 and 2 and the raw difference (as per your suggestion data_diff.powspctrm = data1.powspctrm - data2.powspctrm). I then plot stat.stat and the clusterplot output, clusterplot is representing my stat output. In general I want to look at all channels, time 4-6seconds, for frequencies 8-12. The latter 2 parameters I want averaged. I noticed that the T-stat plot (of stat.stat) reports only one time and frequency. I presumed this was the average for display purposes (- double checked by plotting only that time and frequency in "stat_discrepency_onetimefreq.jpg" and it is different). I think my design matrix is correct (following http://www.fieldtriptoolbox.org/tutorial/cluster_permutation_timelock/). I have 28 trials in con1 and 25 in con2, my design matrix is 1x53 reflecting the trials for the two conditions. I don't think I need to specify anything further until I move on to group analysis (this is just a single subject). The only other issue I can think of is in the parameter: cfg.neighbours = ft_prepare_neighbours(cfg_neighb, elec); I create 'elec' by using ft_read_sens to read the preprocessing output from EEGlab. filenameA=strcat([det.subjects{s} '_postPreProICA_epoched_' det.epochs{1} '.set']) elec = ft_read_sens(filenameA) Again, I'd be grateful for any pointers. My computation of ft_freqstatistics has not changed from the original post. Thank you. Jac https://www.dropbox.com/sh/64m3xpgco2uavky/AADT6-rXEdylVzHN1lY-q7SNa?dl=0 [https://www.dropbox.com/static/images/spectrum-icons/generated/content/content-folder_dropbox-large.png] fieldtrip www.dropbox.com Shared with Dropbox FieldTrip discussion list Subject: Re: [FieldTrip] ft_clusterplot error? Message-ID: Content-Type: text/plain; charset="utf-8" Hi Jac, I would start by plotting your (t)stats, and for simplicity doing that with ft_singleplotER (cfg.param = 'stat') rather than ft_clusterplot. Then try plotting the power-difference. This should not be more than a subtraction of data_diff.powspctrm = data1.powspctrm - data2.powspctrm, . No reshaping should be needed. The problem is probably a mistake somewhere keeping track of dimensions/latencies etc. which is tricky with clusters. Also, make sure to clear your cfg before every function so you don't carry the cfg of a previous function into the next. That will also help readability and debugging. HTH, Stephen ________________________________ From: Jac Billington Sent: 18 January 2019 18:07:04 To: fieldtrip at science.ru.nl Subject: ft_clusterplot error? Dear experts, I've recently begun using fieldtrip and have been following tutorials well. however, I have perhaps run into a problem with ft_clusterplot. An example output is located in dropbox here: https://www.dropbox.com/sh/64m3xpgco2uavky/AADT6-rXEdylVzHN1lY-q7SNa?dl=0 My negative cluster labels don't seem to be located in a cluster per se, or in regions with a greater raw effect. This seems at odds with tutorial examples and papers. Apologies if I'm missing something, but can this be correct? I did have earlier errors (' ft_error('unsupported dimord %s', dimord);') but I realised this was because dimensions of my stat.raweffect (64 5 200) were in conflict with collapsing time and frequency when running ft_freqstatistics. Reducing stat.raweefect to 64 1 solved this error, but I'm wondering if I have done something wrong. My code is posted below and I'd happily be poited to some papers if I'm misunderstanding this. Thank you in advance. Jac % load data (from ft_freqanalysis) load(filename1); con1= freqScaling load(filename2); con2=freqScaling; %%%% run the stats: cfg = []; cfg.channel = 'all'; cfg.latency = [4 6]; cfg.frequency = [8 12]; cfg.method = 'montecarlo'; cfg.statistic = 'ft_statfun_indepsamplesT'; cfg.correctm = 'cluster'; cfg.clusteralpha = 0.05; cfg.clusterstatistic = 'maxsum'; cfg.minnbchan = 2; cfg.tail = 0; cfg.clustertail = 0; cfg.alpha = 0.025; cfg.numrandomization = 500; cfg.avgoverchan = 'no' cfg.avgovertime = 'yes' cfg.avgoverfreq = 'yes' % prepare_neighbours determines what sensors may form clusters cfg_neighb.method = 'distance'; cfg.neighbours = ft_prepare_neighbours(cfg_neighb, elec); design = zeros(1,size(con1.powspctrm,1) + size(con2.powspctrm,1)); design(1,1:size(con1.powspctrm,1)) = 1; design(1,(size(con1.powspctrm,1)+1):(size(con1.powspctrm,1)+ size(con2.powspctrm,1))) = 2; cfg.design = design; cfg.ivar = 1; [stat] = ft_freqstatistics(cfg, con1, con2); cfg=[] cfg.keeptrials = 'no' cfg.latency = [4 6]; cfg.frequency = [8 12]; con1 = ft_freqdescriptives(cfg, con1); con2 = ft_freqdescriptives(cfg, con2); %%%% resize powerspec to avoid dimord error. Collapse freq/ time con1rs=mean(con1.powspctrm,3) %%% collapse time dim con2rs=mean(con2.powspctrm,3) %%% collapse time dim con1rs=mean(con1rs,2) %%% collapse freq con2rs=mean(con2rs,2) stat.raweffect = con1rs-con2rs cfg.alpha = 0.025; cfg.zparam = 'raweffect'; cfg.zlim = [-1 3]; cfg.layout = 'biosemi64.lay'; cfg.subplotsize = ([1 1]); ft_clusterplot(cfg, stat); -------------- next part -------------- An HTML attachment was scrubbed... URL: From stephen.whitmarsh at gmail.com Mon Jan 21 14:56:37 2019 From: stephen.whitmarsh at gmail.com (Stephen Whitmarsh) Date: Mon, 21 Jan 2019 14:56:37 +0100 Subject: [FieldTrip] ft_clusterplot error? In-Reply-To: References: Message-ID: Hi Jac, To my eyes all looks fine to me! - Your stat output seems to fit your raw difference rather well, I would say! Why do you think otherwise? Sure, the t-stats are not the same as absolute differences, but that's to be expected - the general topography looks rather similar. If you don't trust the calculation you can perhaps just do a MATLAB ttest on one electrode and compare that to the freqstatistics output. - Yes, you seem to be plotting the average over time ([5 5] in the plot) and frequency ([10 10] in the plot). As I said earlier, I can't track the clusterplot at the point (it also has no parameters in the image). Without the code that you use, I can't see if anything else is going on. - The significant cluster/electrodes you see in the clusterplot seems to correspond to that blue central blog on the stats left of it in the same image file just fine. - You can check your neighbours with ft_neighbourplot Since you are probably doing your statistics on average time and freq, the only dimension that your cluster extends to is 'space', i.e. electrodes, so for now you don't need to use clusterplot, but just highlight the electrodes in ft_topoplotXX based on your stats. This is just to not make it more confusing than it is - clusters that span time/freq/space are just very hard to plot. Cheers, Stephen On Mon, 21 Jan 2019 at 14:35, Jac Billington wrote: > Dear Stephen, > > > Thank you for the useful reply, I've been doing some trouble shooting and > it seems the output of ft_freqstatistics doesn't seem to be reflecting > my raw data. See "stat_discrepency.jpg" in dropbox link. > > > This plots condition 1 and 2 and the raw difference (as per your > suggestion data_diff.powspctrm = data1.powspctrm - data2.powspctrm). I > then plot stat.stat and the clusterplot output, clusterplot is representing > my stat output. > > > In general I want to look at all channels, time 4-6seconds, for > frequencies 8-12. The latter 2 parameters I want averaged. > > > I noticed that the T-stat plot (of stat.stat) reports only one time and > frequency. I presumed this was the average for display purposes (- double > checked by plotting only that time and frequency in " > stat_discrepency_onetimefreq.jpg" and it is different). > > > I think my design matrix is correct (following > http://www.fieldtriptoolbox.org/tutorial/cluster_permutation_timelock/). > I have 28 trials in con1 and 25 in con2, my design matrix is 1x53 > reflecting the trials for the two conditions. I don't think I need to > specify anything further until I move on to group analysis (this is just a > single subject). > > > > > The only other issue I can think of is in the parameter: > > cfg.neighbours = ft_prepare_neighbours(cfg_neighb, elec); > > > I create 'elec' by using ft_read_sens to read the preprocessing output > from EEGlab. > > > filenameA=strcat([det.subjects{s} '_postPreProICA_epoched_' > det.epochs{1} '.set']) > elec = ft_read_sens(filenameA) > > > Again, I'd be grateful for any pointers. My computation of > ft_freqstatistics has not changed from the original post. > > Thank you. Jac > > > > https://www.dropbox.com/sh/64m3xpgco2uavky/AADT6-rXEdylVzHN1lY-q7SNa?dl=0 > > fieldtrip > > www.dropbox.com > Shared with Dropbox > > > > > FieldTrip discussion list > Subject: Re: [FieldTrip] ft_clusterplot error? > Message-ID: > zMQuaKsyyBxOewfS5GgBYDMrXoUpHMk674WYFWXSfA+w at mail.gmail.com> > Content-Type: text/plain; charset="utf-8" > > Hi Jac, > > I would start by plotting your (t)stats, and for simplicity doing that with > ft_singleplotER (cfg.param = 'stat') rather than ft_clusterplot. > Then try plotting the power-difference. This should not be more than a > subtraction of data_diff.powspctrm = data1.powspctrm - data2.powspctrm, . > No reshaping should be needed. > The problem is probably a mistake somewhere keeping track of > dimensions/latencies etc. which is tricky with clusters. > Also, make sure to clear your cfg before every function so you don't carry > the cfg of a previous function into the next. That will also help > readability and debugging. > > HTH, > Stephen > > ------------------------------ > *From:* Jac Billington > *Sent:* 18 January 2019 18:07:04 > *To:* fieldtrip at science.ru.nl > *Subject:* ft_clusterplot error? > > > Dear experts, > > > I've recently begun using fieldtrip and have been following tutorials > well. however, I have perhaps run into a problem with ft_clusterplot. > > > An example output is located in dropbox here: > https://www.dropbox.com/sh/64m3xpgco2uavky/AADT6-rXEdylVzHN1lY-q7SNa?dl=0 > > > My negative cluster labels don't seem to be located in a cluster per se, > or in regions with a greater raw effect. This seems at odds with tutorial > examples and papers. Apologies if I'm missing something, but can this be > correct? > > > I did have earlier errors (' ft_error('unsupported dimord %s', dimord);') > but I realised this was because dimensions of my stat.raweffect (64 5 > 200) were in conflict with collapsing time and frequency when running > ft_freqstatistics. Reducing stat.raweefect to 64 1 solved this error, but > I'm wondering if I have done something wrong. > > > My code is posted below and I'd happily be poited to some papers if I'm > misunderstanding this. > > > Thank you in advance. Jac > > > > % load data (from ft_freqanalysis) > load(filename1); > con1= freqScaling > load(filename2); > con2=freqScaling; > > %%%% run the stats: > cfg = []; > cfg.channel = 'all'; > cfg.latency = [4 6]; > cfg.frequency = [8 12]; > cfg.method = 'montecarlo'; > cfg.statistic = 'ft_statfun_indepsamplesT'; > cfg.correctm = 'cluster'; > cfg.clusteralpha = 0.05; > cfg.clusterstatistic = 'maxsum'; > cfg.minnbchan = 2; > cfg.tail = 0; > cfg.clustertail = 0; > cfg.alpha = 0.025; > cfg.numrandomization = 500; > cfg.avgoverchan = 'no' > cfg.avgovertime = 'yes' > cfg.avgoverfreq = 'yes' > % prepare_neighbours determines what sensors may form clusters > cfg_neighb.method = 'distance'; > cfg.neighbours = ft_prepare_neighbours(cfg_neighb, elec); > > design = zeros(1,size(con1.powspctrm,1) + size(con2.powspctrm,1)); > design(1,1:size(con1.powspctrm,1)) = 1; > design(1,(size(con1.powspctrm,1)+1):(size(con1.powspctrm,1)+ > size(con2.powspctrm,1))) = 2; > cfg.design = design; > cfg.ivar = 1; > > > [stat] = ft_freqstatistics(cfg, con1, con2); > > > > cfg=[] > cfg.keeptrials = 'no' > cfg.latency = [4 6]; > cfg.frequency = [8 12]; > con1 = ft_freqdescriptives(cfg, con1); > con2 = ft_freqdescriptives(cfg, con2); > > %%%% resize powerspec to avoid dimord error. Collapse freq/ time > con1rs=mean(con1.powspctrm,3) %%% collapse time dim > con2rs=mean(con2.powspctrm,3) %%% collapse time dim > con1rs=mean(con1rs,2) %%% collapse freq > con2rs=mean(con2rs,2) > stat.raweffect = con1rs-con2rs > > cfg.alpha = 0.025; > cfg.zparam = 'raweffect'; > cfg.zlim = [-1 3]; > cfg.layout = 'biosemi64.lay'; > cfg.subplotsize = ([1 1]); > ft_clusterplot(cfg, stat); > > > _______________________________________________ > 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 elene.beitia at alumni.mondragon.edu Mon Jan 21 17:38:11 2019 From: elene.beitia at alumni.mondragon.edu (Elene Beitia Loinaz) Date: Mon, 21 Jan 2019 17:38:11 +0100 Subject: [FieldTrip] Problem selecting frequency range for source reconstruction using beamforming DICS technique In-Reply-To: References: Message-ID: Thank you Stephen, Your answer has being very useful. I try your suggestions but as what I want is to perform the reconstruction of a range of frequency with the loop I do not achieve that, and the dpss method gives me error in matlab due to the lack of memory. Even so than you very much!!! Hau idatzi du Stephen Whitmarsh (stephen.whitmarsh at gmail.com) erabiltzaileak (2019 urt. 21, al. (13:03)): > Dear Elene, > > ft_sourceanalysis only takes a single number (as stated in the help) in > cfg.frequency. If cfg.frquency is empty it will first default to 'all', and > then take the average frequency of the input data (cfg.frequency = > mean(cfg.frequency) %on line 306). This is not clear, and I would suppose > just breaking with an error would have been clearer. > > If you want all the frequencies beamformed separately you will have to > loop over frequencies. > If you want all the frequencies beamformed as an average over frequencies > you can average your frequency data first with e.g. ft_selectdata > (cfg.avgoverfreq = 'yes') or, better, do your freqanalysis with some > sleppian smoothing (cfg.taper = 'dpss'). > > HTH, > > Stephen > > > > On Mon, 21 Jan 2019 at 12:35, Elene Beitia Loinaz < > elene.beitia at alumni.mondragon.edu> wrote: > >> Dear Fieldtripers, >> >> I am trying to select a time-frequency tile for the performance of the >> Bermforming using DICS recostruction. >> >> First, usng freq analysis I have chosen the time-frequency range I want, >> you can see it in the next code: >> >> cfg = []; >> cfg.continuous = 'yes'; >> cfg.output = 'fourier'; >> cfg.channel = 'all'; >> cfg.keeptrials = 'yes'; >> cfg.method = 'mtmfft'; >> cfg.taper = 'hanning'; >> cfg.foilim = [8 12]; >> cfg.t_ftimwin =[160:0.0039063:175]; >> data_Fourier = ft_freqanalysis(cfg, data1); >> >> If I look in the data_Fourier the frequency is define like a range, but >> when I do the beamforming it choses only one frequency (the middle of the >> range), I have not configured anything in cfg.frequency since I want to >> take the full range and not a single number in Hz, but still takes only one >> (in my case 10Hz). >> >> Error: >> Warning: could not determine dimord of "freq" in: >> >> label: {128×1 cell} >> freq: 10.0000 >> fourierspctrm: [1×128 double] >> cumsumcnt: 94464 >> cumtapcnt: 1 >> elec: [1×1 struct] >> cfg: [1×1 struct] >> dimord: 'rpttap_chan_freq' >> >> >> Warning: the selected value 10 should be within the range of the array >> from 10 to 10 >> >> Is there anyway to consider all the rage? Is it necessary to set other >> parameters in the cfg of the ft_freqanalysis/ft_sourceanalysis? >> >> Thank you in advanced, >> >> Elene. >> >> >> >> _______________________________________________ >> 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 jedmeltzer at yahoo.com Mon Jan 21 17:47:29 2019 From: jedmeltzer at yahoo.com (Jed Meltzer) Date: Mon, 21 Jan 2019 16:47:29 +0000 (UTC) Subject: [FieldTrip] Postdoctoral Position in Toronto: Treatment and Neuroimaging of Chronic Pain References: <1512049305.1097532.1548089249976.ref@mail.yahoo.com> Message-ID: <1512049305.1097532.1548089249976@mail.yahoo.com> Postdoctoral Position: Treatment and Neuroimaging of Chronic Pain   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. 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: February 18, 2019 (negotiable)Duration: 2 years Supervisor: Dr. Lee Bartel, Faculty of Music, University of TorontoCollaborating Supervisors:  Dr. Tania Di Renna, 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 Monday January 28, 2019.  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 vitae3) Your highest degree transcript (unofficial copy acceptable) 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, pain research, epigenetic analysis, music,  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.caInterviews will commence immediately following the application deadline.  -------------- next part -------------- An HTML attachment was scrubbed... URL: From jyrki at nmr.mgh.harvard.edu Mon Jan 21 21:12:16 2019 From: jyrki at nmr.mgh.harvard.edu (Jyrki Ahveninen) Date: Mon, 21 Jan 2019 15:12:16 -0500 Subject: [FieldTrip] =?utf-8?q?Postdoctoral_Research_Fellow_=E2=80=93_Mas?= =?utf-8?q?sachusetts_General_Hospital/Harvard_Medical_School?= Message-ID: <0C1FE580-0273-4A4A-A996-0297EC894E1C@nmr.mgh.harvard.edu> Postdoctoral Research Fellow – Massachusetts General Hospital/Harvard Medical School We are seeking a talented, highly motivated individual to join a multimodal human neuroimaging research group in Athinoula A. Martinos Center for Biomedical Imaging at Department of Radiology, Massachusetts General Hospital/ Harvard Medical School, Boston, MA. Our NIDCD-funded research examines human auditory working memory, attention, and multisensory feedforward/feedback influences using multivariate statistical/machine learning analyses of MEG/EEG, high-field (3T) and ultra-high field (7T) fMRI, and MRI-navigated TMS/EEG. The noninvasive measures are validated by using ECoG/iEEG recordings in presurgical human patients. Athinoula A. Martinos Center for Biomedical Imaging at Massachusetts General Hospital is one of the largest biomedical imaging centers in the United States with over 200 research faculty members, post-doctoral Research Fellows, and graduate students. This position offers a unique opportunity to work and collaborate with leading researchers who develop and implement cutting edge technologies that could have a high impact on researchers of human auditory cognition, attention/working memory, and multisensory processing, as well as on the broader non-invasive neuroimaging and brain stimulation communities. Required Skills/Abilities/Competencies: Ph.D. or equivalent in Neuroscience, Biomedical Engineering, Electrical Engineering, Psychology, or related fields. Must have experience in at least one of the imaging modalities utilized (MEG/EEG, TMS, TMS/EEG, fMRI, or fMRI/EEG). Experience in subdural or extracellular neurophysiological recordings is a plus. Proven understanding of cognitive neuroscience, particularly auditory cognition, attention and working memory, and multisensory integration. Experience in Matlab, Python, and Linux-based command line operations. Applicants with experience in advanced multivariate statistical analysis and machine learning techniques are strongly preferred. Excellent teamwork, time management and organizational skills. Excellent oral and written communication skills are required. Strong publication record in peer-reviewed scientific journals The approved applicant will hold a Massachusetts General Hospital and a Harvard Medical School appointment as a Research Fellow. This position offers an opportunity to work with an engaged group of scientists that utilize the cutting-edge multimodal neuroimaging infrastructure at MGH Martinos Center to examine neuronal bases of human cognition. Interested candidates should send their cover-letter, full CV, and the names of 3 references to Dr. Jyrki Ahveninen (jyrki at nmr.mgh.harvard.edu). If you wish to obtain more information on the project, please contact Dr. Ahveninen by email. The position is full-time with benefits and available immediately. A two-year time commitment is required with a possible extension of another two years. Salary will be based on qualifications and experience. The Massachusetts General Hospital is an Equal Opportunity/Affirmative Action Employer. -------------- next part -------------- An HTML attachment was scrubbed... URL: From max-philipp.stenner at med.ovgu.de Tue Jan 22 13:07:39 2019 From: max-philipp.stenner at med.ovgu.de (Stenner, Max-Philipp) Date: Tue, 22 Jan 2019 12:07:39 +0000 Subject: [FieldTrip] Postdoc position in Freigeist Research Group (University of Magdeburg) In-Reply-To: <32078_1544429470_5C0E1F9D_32078_1978_1_FBEFFA1F493D8944969D2F5AE78E5883D6FFC367@esen3.imed.uni-magdeburg.de> References: <32078_1544429470_5C0E1F9D_32078_1978_1_FBEFFA1F493D8944969D2F5AE78E5883D6FFC367@esen3.imed.uni-magdeburg.de> Message-ID: Dear all an exciting opportunity has become available for a PostDoc Researcher in Human Motor Neuroscience (for 4 years) in the newly funded Freigeist Research Group "Motor Learning" at the Leibniz Institute for Neurobiology & Department of Neurology at the University of Magdeburg, Germany. Please find a detailed job description and instructions how to apply attached (deadline January 31st 2019). Looking forward to welcoming you to Magdeburg, Max-Philipp Stenner http://www.lin-magdeburg.de/de/abteilungen/verhaltensneurologie/physiology_motorlearning/index.jsp -------------- next part -------------- A non-text attachment was scrubbed... Name: PostDoc Human Motor Neuroscience.pdf Type: application/pdf Size: 379098 bytes Desc: PostDoc Human Motor Neuroscience.pdf URL: -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: ATT00001.txt URL: From J.Billington at leeds.ac.uk Tue Jan 22 15:00:41 2019 From: J.Billington at leeds.ac.uk (Jac Billington) Date: Tue, 22 Jan 2019 14:00:41 +0000 Subject: [FieldTrip] ft_clusterplot error? In-Reply-To: References: , Message-ID: Hi Stephen, Thanks again for the reply and reassurance. ft_neighbourplot is looking fine. I didn't expect the t-stats to look exactly the same but I'd have thought the occipital difference might have been more prominent in the t-stat. That said, my hypothesis is a central-parietal difference so perhaps I shouldn't worry about it! I'll double check the means and variance. Thanks for your help. Jac Hi Jac, To my eyes all looks fine to me! - Your stat output seems to fit your raw difference rather well, I would say! Why do you think otherwise? Sure, the t-stats are not the same as absolute differences, but that's to be expected - the general topography looks rather similar. If you don't trust the calculation you can perhaps just do a MATLAB ttest on one electrode and compare that to the freqstatistics output. - Yes, you seem to be plotting the average over time ([5 5] in the plot) and frequency ([10 10] in the plot). As I said earlier, I can't track the clusterplot at the point (it also has no parameters in the image). Without the code that you use, I can't see if anything else is going on. - The significant cluster/electrodes you see in the clusterplot seems to correspond to that blue central blog on the stats left of it in the same image file just fine. - You can check your neighbours with ft_neighbourplot Since you are probably doing your statistics on average time and freq, the only dimension that your cluster extends to is 'space', i.e. electrodes, so for now you don't need to use clusterplot, but just highlight the electrodes in ft_topoplotXX based on your stats. This is just to not make it more confusing than it is - clusters that span time/freq/space are just very hard to plot. Cheers, Stephen Dr Jac Billington Lecturer in Cognitive Neuroscience School of Psychology, Rm G.06A University of Leeds Leeds, LS2 9JT Tel: +44(0)113 343 6686 Jac Billington CoNi Lab ________________________________ From: Jac Billington Sent: 21 January 2019 12:51:26 To: fieldtrip at science.ru.nl Subject: Re: ft_clusterplot error? Dear Stephen, Thank you for the useful reply, I've been doing some trouble shooting and it seems the output of ft_freqstatistics doesn't seem to be reflecting my raw data. See "stat_discrepency.jpg" in dropbox link. This plots condition 1 and 2 and the raw difference (as per your suggestion data_diff.powspctrm = data1.powspctrm - data2.powspctrm). I then plot stat.stat and the clusterplot output, clusterplot is representing my stat output. In general I want to look at all channels, time 4-6seconds, for frequencies 8-12. The latter 2 parameters I want averaged. I noticed that the T-stat plot (of stat.stat) reports only one time and frequency. I presumed this was the average for display purposes (- double checked by plotting only that time and frequency in "stat_discrepency_onetimefreq.jpg" and it is different). I think my design matrix is correct (following http://www.fieldtriptoolbox.org/tutorial/cluster_permutation_timelock/). I have 28 trials in con1 and 25 in con2, my design matrix is 1x53 reflecting the trials for the two conditions. I don't think I need to specify anything further until I move on to group analysis (this is just a single subject). The only other issue I can think of is in the parameter: cfg.neighbours = ft_prepare_neighbours(cfg_neighb, elec); I create 'elec' by using ft_read_sens to read the preprocessing output from EEGlab. filenameA=strcat([det.subjects{s} '_postPreProICA_epoched_' det.epochs{1} '.set']) elec = ft_read_sens(filenameA) Again, I'd be grateful for any pointers. My computation of ft_freqstatistics has not changed from the original post. Thank you. Jac https://www.dropbox.com/sh/64m3xpgco2uavky/AADT6-rXEdylVzHN1lY-q7SNa?dl=0 [https://www.dropbox.com/static/images/spectrum-icons/generated/content/content-folder_dropbox-large.png] fieldtrip www.dropbox.com Shared with Dropbox FieldTrip discussion list Subject: Re: [FieldTrip] ft_clusterplot error? Message-ID: Content-Type: text/plain; charset="utf-8" Hi Jac, I would start by plotting your (t)stats, and for simplicity doing that with ft_singleplotER (cfg.param = 'stat') rather than ft_clusterplot. Then try plotting the power-difference. This should not be more than a subtraction of data_diff.powspctrm = data1.powspctrm - data2.powspctrm, . No reshaping should be needed. The problem is probably a mistake somewhere keeping track of dimensions/latencies etc. which is tricky with clusters. Also, make sure to clear your cfg before every function so you don't carry the cfg of a previous function into the next. That will also help readability and debugging. HTH, Stephen ________________________________ From: Jac Billington Sent: 18 January 2019 18:07:04 To: fieldtrip at science.ru.nl Subject: ft_clusterplot error? Dear experts, I've recently begun using fieldtrip and have been following tutorials well. however, I have perhaps run into a problem with ft_clusterplot. An example output is located in dropbox here: https://www.dropbox.com/sh/64m3xpgco2uavky/AADT6-rXEdylVzHN1lY-q7SNa?dl=0 My negative cluster labels don't seem to be located in a cluster per se, or in regions with a greater raw effect. This seems at odds with tutorial examples and papers. Apologies if I'm missing something, but can this be correct? I did have earlier errors (' ft_error('unsupported dimord %s', dimord);') but I realised this was because dimensions of my stat.raweffect (64 5 200) were in conflict with collapsing time and frequency when running ft_freqstatistics. Reducing stat.raweefect to 64 1 solved this error, but I'm wondering if I have done something wrong. My code is posted below and I'd happily be poited to some papers if I'm misunderstanding this. Thank you in advance. Jac % load data (from ft_freqanalysis) load(filename1); con1= freqScaling load(filename2); con2=freqScaling; %%%% run the stats: cfg = []; cfg.channel = 'all'; cfg.latency = [4 6]; cfg.frequency = [8 12]; cfg.method = 'montecarlo'; cfg.statistic = 'ft_statfun_indepsamplesT'; cfg.correctm = 'cluster'; cfg.clusteralpha = 0.05; cfg.clusterstatistic = 'maxsum'; cfg.minnbchan = 2; cfg.tail = 0; cfg.clustertail = 0; cfg.alpha = 0.025; cfg.numrandomization = 500; cfg.avgoverchan = 'no' cfg.avgovertime = 'yes' cfg.avgoverfreq = 'yes' % prepare_neighbours determines what sensors may form clusters cfg_neighb.method = 'distance'; cfg.neighbours = ft_prepare_neighbours(cfg_neighb, elec); design = zeros(1,size(con1.powspctrm,1) + size(con2.powspctrm,1)); design(1,1:size(con1.powspctrm,1)) = 1; design(1,(size(con1.powspctrm,1)+1):(size(con1.powspctrm,1)+ size(con2.powspctrm,1))) = 2; cfg.design = design; cfg.ivar = 1; [stat] = ft_freqstatistics(cfg, con1, con2); cfg=[] cfg.keeptrials = 'no' cfg.latency = [4 6]; cfg.frequency = [8 12]; con1 = ft_freqdescriptives(cfg, con1); con2 = ft_freqdescriptives(cfg, con2); %%%% resize powerspec to avoid dimord error. Collapse freq/ time con1rs=mean(con1.powspctrm,3) %%% collapse time dim con2rs=mean(con2.powspctrm,3) %%% collapse time dim con1rs=mean(con1rs,2) %%% collapse freq con2rs=mean(con2rs,2) stat.raweffect = con1rs-con2rs cfg.alpha = 0.025; cfg.zparam = 'raweffect'; cfg.zlim = [-1 3]; cfg.layout = 'biosemi64.lay'; cfg.subplotsize = ([1 1]); ft_clusterplot(cfg, stat); -------------- next part -------------- An HTML attachment was scrubbed... URL: From ighoyota at tlu.ee Wed Jan 23 00:48:35 2019 From: ighoyota at tlu.ee (Ben Ighoyota Ajenaghughrure) Date: Wed, 23 Jan 2019 01:48:35 +0200 Subject: [FieldTrip] Trial definition using events from seperate text file and continous eeg data Message-ID: Hello All, I need help creating trial definitions for my continous eeg data using events time locked in a seperate text file. I have my continous eeg data recorded during game interaction without any event information. The Game events are stored in a text file in miliseconds precission. Both game and eeg recorder runs on the same PC. To take care time synchronisation issues. My problem is how to define trails for eeg data using the event file stored seperately , because currently my eeg data does not have any event information. I am new to fieldtrip but have done this task in eeglab and would love to move on to using fieldtrip toolbox. Looking forward to your support. Best Regards Ighoyota ben. -------------- next part -------------- An HTML attachment was scrubbed... URL: From eunchanna at gmail.com Wed Jan 23 06:30:33 2019 From: eunchanna at gmail.com (=?UTF-8?B?64KY7J2A7LCs?=) Date: Wed, 23 Jan 2019 14:30:33 +0900 Subject: [FieldTrip] Question regarding loreta2fieldtrip Message-ID: Hello, I'm using MATLAB R2017b and sLORETA free software. I'm interested in using sLORETA software to perform source localization on ERD/ERS. I'm getting used to sLORETA, but I'm having a problem loading the sLORETA solution (slor file) into MATLAB. After some web searching, I found loreta2fieldtrip and I wanted to test whether it works. Here are the results I encountered: >> [source] = loreta2fieldtrip('C:\Users\OLEDEEG\Documents\sLORETA-ExampleDataSets\ExampleEEGdata(PeterAnderer)\Pilot\RestEEG_Young\REEG01_Y-slor.txt') 다음 사용 중 오류가 발생함: ft_preamble (line 80) Could not run ft_preamble_callinfo - does not seem to exist 오류 발생: loreta2fieldtrip (line 48) ft_preamble callinfo >> I've only installed Fieldtrip toolbox and didn't add/delete anything yet. Would you be able to help me with this? Thank you in advance for your help. Regards, Eunchan. ᐧ -------------- next part -------------- An HTML attachment was scrubbed... URL: From a.stolk8 at gmail.com Wed Jan 23 06:36:40 2019 From: a.stolk8 at gmail.com (Arjen Stolk) Date: Tue, 22 Jan 2019 21:36:40 -0800 Subject: [FieldTrip] Question regarding loreta2fieldtrip In-Reply-To: References: Message-ID: Hi Eunchan, Briefly checking, did you correctly add fieldtrip and its subdirectories to your matlab path, as described here ? Best regards, Arjen On Tue, Jan 22, 2019 at 9:32 PM 나은찬 wrote: > Hello, > > I'm using MATLAB R2017b and sLORETA free software. > > I'm interested in using sLORETA software to perform source localization on > ERD/ERS. > > I'm getting used to sLORETA, but I'm having a problem loading the sLORETA > solution (slor file) into MATLAB. > > After some web searching, I found loreta2fieldtrip and I wanted to test > whether it works. > > Here are the results I encountered: > > >> [source] = > loreta2fieldtrip('C:\Users\OLEDEEG\Documents\sLORETA-ExampleDataSets\ExampleEEGdata(PeterAnderer)\Pilot\RestEEG_Young\REEG01_Y-slor.txt') > 다음 사용 중 오류가 발생함: ft_preamble (line 80) > Could not run ft_preamble_callinfo - does not seem to exist > > 오류 발생: loreta2fieldtrip (line 48) > ft_preamble callinfo > > >> > > I've only installed Fieldtrip toolbox and didn't add/delete anything yet. > > Would you be able to help me with this? > > Thank you in advance for your help. > > Regards, > > Eunchan. > > ᐧ > _______________________________________________ > 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 stephen.whitmarsh at gmail.com Wed Jan 23 09:13:32 2019 From: stephen.whitmarsh at gmail.com (Stephen Whitmarsh) Date: Wed, 23 Jan 2019 09:13:32 +0100 Subject: [FieldTrip] Trial definition using events from seperate text file and continous eeg data In-Reply-To: References: Message-ID: Hi Ighoyota ben, You will have to create your own trial definition (trl). In (very) short: 1) read your text file in matlab, using whatever MATLAB functions are easiest (e.g. dlmread) 2) create a variable called *trl *that contains N rows for N trials, with 3 columns: start, end, and offset in *samples, *with sample numbers starting from the beginning of you file. The offset determines t=0, e.g. when you want to read data before the trigger. E.g., if sampled at 1000Hz, and want trials from -1.0 to 2.0 around your triggers (i.e. 3000 samples), you would have something like (taking random sample values for where your trials occur): trl = [12300, 15300, -1000; 18000, 21000, -1000; 25050, 28050, -1000] 3) enter that in *cfg.trl*, together with your file name in *cfg.dataset*, and run data = ft_preprocessing(cfg). E.g.: cfg = []; cfg.dataset = 'myfile.edf'; cfg.trl = trl; data = ft_preprocessing(cfg) I hope this explains the general idea. It will be good to follow a tutorial, to get the whole run-through. and take extra care to look at the trial definition part (take e.g. a peak at the cfg.trl) HTH, Stephen On Wed, 23 Jan 2019 at 01:12, Ben Ighoyota Ajenaghughrure wrote: > Hello All, > > I need help creating trial definitions for my continous eeg data using > events time locked in a seperate text file. > > I have my continous eeg data recorded during game interaction without any > event information. > The Game events are stored in a text file in miliseconds precission. > > Both game and eeg recorder runs on the same PC. To take care time > synchronisation issues. > > My problem is how to define trails for eeg data using the event file > stored seperately , because currently my eeg data does not have any event > information. > > I am new to fieldtrip but have done this task in eeglab and would love to > move on to using fieldtrip toolbox. > > Looking forward to your support. > > Best Regards > > Ighoyota ben. > _______________________________________________ > 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 Darren.Kadis at cchmc.org Wed Jan 23 20:47:23 2019 From: Darren.Kadis at cchmc.org (Kadis, Darren) Date: Wed, 23 Jan 2019 19:47:23 +0000 Subject: [FieldTrip] deep sources when warping from template (MNI) to individual space Message-ID: <54b1511bd167466db12ca9e8d2ab30b2@cchmc.org> Dear FieldTrippers: Wanted to follow-up on a discussion regarding poor normalization, and specifically, an inward bias, when warping template (MNI space) source positions to individual subject space. This is a useful approach to normalization, facilitating group-level analyses and anatomical referencing, though meaningful inference is predicated on having accurate normalization/warps. At least one relevant discussion thread, here: https://mailman.science.ru.nl/pipermail/fieldtrip/2015-April/009111.html, though I don't see resolution. In my lab, we're consistently observing an 'inward bias' when warping template source positions to individual space (see attached). Superficial sources seem to shift excessively deep, particularly at the dorsum. Has anyone adjusted the normalization parameters or implemented alternate warping procedures to generate accurate transformations? I will note that default normalization of individual MRI to template works well in both SPM8 and SPM12 (confirmed with checkreg). I believe ft_preparesourcemodel calls upon ft_volumenormalize and spm routines to generate the deformation field. We've tried adjusted the warping regularization parameters in ft_volumenormalise both up and down by an order of magnitude, but did not see any real improvement. Suggestions? Below, I'm sharing a short script used to visualize the relative performance of normalization with SPM8, SPM12 linear-only, and SPM12 nonlinear approaches, as implemented in FieldTrip. I used 346 source positions, located approximately 3.6mm deep to the template brain surface (roughly corresponding to mid-sulcal depth across the cerebral mantle; attached). %% start clear all; close all; restoredefaultpath; addpath('PATH TO CURRENT FIELDTRIP DISTRO'); ft_defaults; vs_pos = []; % n×3, coords of interest, MNI space; see attached text, if interested in replicating template_mri = ft_read_mri('PATH TO SPM12\spm12\canonical\avg152T1.nii'); template_mri.coordsys = 'spm'; % ft_volumesegment needs coordsys of the template volume cfg = []; cfg.output = {'brain', 'skull', 'scalp'}; cfg.spmversion = 'spm12'; cfg.spmmethod = 'new'; template_seg = ft_volumesegment(cfg, template_mri); cfg = []; cfg.method = 'singleshell'; template_headmodel = ft_prepare_headmodel(cfg, template_seg); cfg = []; cfg.grid.pos = vs_pos; cfg.spmversion = 'spm12'; cfg.spmmethod = 'new'; cfg.headmodel = template_headmodel; template_grid = ft_prepare_sourcemodel(cfg); % evaluate dipole positions relative to modeled brain figure; ft_plot_vol(template_headmodel, 'facecolor', 'cortex', 'edgecolor', 'none'); alpha 0.5; camlight; hold on; ft_plot_mesh(template_grid.pos); % generate the individual headmodel; warp source positions from template to subject space T1 = 'PATH TO SUBJECT T1'; % high-quality 3D-T1, 1mm isotropic, here individual_mri = ft_read_mri(T1, 'dataformat', 'nifti_spm'); individual_mri.coordsys = 'spm'; cfg = []; cfg.output = {'brain', 'skull', 'scalp'}; cfg.spmversion = 'spm12'; cfg.spmmethod = 'new'; individual_segmented_mri = ft_volumesegment(cfg, individual_mri); cfg = []; cfg.method = 'singleshell'; individual_headmodel = ft_prepare_headmodel(cfg, individual_segmented_mri); individual_headmodel = ft_convert_units(individual_headmodel, 'cm'); cfg = []; cfg.grid.warpmni = 'yes'; cfg.grid.template = template_grid; cfg.grid.nonlinear = 'yes'; cfg.spmversion = 'spm8'; cfg.mri = individual_mri; individual_grid_spm8 = ft_prepare_sourcemodel(cfg); cfg = []; cfg.grid.warpmni = 'yes'; cfg.grid.template = template_grid; cfg.grid.nonlinear = 'no'; cfg.spmversion = 'spm12'; cfg.spmmethod = 'new'; cfg.mri = individual_mri; individual_grid_spm12_linear = ft_prepare_sourcemodel(cfg); cfg = []; cfg.grid.warpmni = 'yes'; cfg.grid.template = template_grid; cfg.grid.nonlinear = 'yes'; cfg.spmversion = 'spm12'; cfg.spmmethod = 'old'; cfg.mri = individual_mri; individual_grid_spm12_nonlinear = ft_prepare_sourcemodel(cfg); figure; subplot(2, 2, 1); ft_plot_vol(template_headmodel, 'facecolor', 'cortex', 'edgecolor', 'none'); alpha 0.25; camlight; hold on; ft_plot_mesh(template_grid.pos, 'vertexcolor', 'red'); title('template'); subplot(2, 2, 2); ft_plot_vol(individual_headmodel, 'facecolor', 'cortex', 'edgecolor', 'none'); alpha 0.25; camlight; hold on; ft_plot_mesh(individual_grid_spm8.pos); title('individual spm8 nonlinear'); subplot(2, 2, 3); ft_plot_vol(individual_headmodel, 'facecolor', 'cortex', 'edgecolor', 'none'); alpha 0.25; camlight; hold on; ft_plot_mesh(individual_grid_spm12_linear.pos); title('individual spm12 linear only'); subplot(2, 2, 4); ft_plot_vol(individual_headmodel, 'facecolor', 'cortex', 'edgecolor', 'none'); alpha 0.25; camlight; hold on; ft_plot_mesh(individual_grid_spm12_nonlinear.pos); title('individual spm12 nonlinear'); %% end In advance, thanks for your help. Darren S. Kadis, PhD Assistant Professor Co-Director, MEG Core Division of Neurology Pediatric Neuroimaging Research Consortium Cincinnati Children's Hospital Medical Center MLC 15008, 3333 Burnet Avenue Cincinnati, OH 45229-3026 Neurology and Neuroscience Graduate Program College of Medicine, Department of Pediatrics University of Cincinnati -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: compare_normalization.jpg Type: image/jpeg Size: 597389 bytes Desc: compare_normalization.jpg URL: -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: cortical_sources.txt URL: From bick35 at gmail.com Wed Jan 23 23:40:54 2019 From: bick35 at gmail.com (Steph bick) Date: Wed, 23 Jan 2019 22:40:54 +0000 Subject: [FieldTrip] edf import error Message-ID: Dear fieldtrip experts, I exported an EEG file to edf from our clinical system (Natus XLTEK) and am trying to import it. Below I pasted the error and what I tried. I’m using a macbook pro Mojave, and FieldTrip revision beead1127. Any help is highly appreciated. Thank you! Stephan But run into this error: Index exceeds matrix dimensions. Error in read_edf (line 129) if EDF.T0(1) < 91 Error in ft_read_header (line 787) hdr = read_edf(filename); Error in ft_preprocessing (line 397) hdr = ft_read_header(cfg.headerfile, 'headerformat', cfg.headerformat,... I am running this command: cfg=[]; cfg.dataset = '/Users/tst/Downloads/test.edf'; data = ft_preprocessing(cfg) What I tried This is the snipped of read_edf where it gets stuck (in bold is line 129). H1=char(fread(EDF.FILE.FID,256,'char')'); EDF.VERSION=H1(1:8); % 8 Byte Versionsnummer %if 0 fprintf(2,'LOADEDF: WARNING Version EDF Format %i',ver); end EDF.PID = deblank(H1(9:88)); % 80 Byte local patient identification EDF.RID = deblank(H1(89:168)); % 80 Byte local recording identification %EDF.H.StartDate = H1(169:176); % 8 Byte %EDF.H.StartTime = H1(177:184); % 8 Byte EDF.T0=[str2num(H1(168+[7 8])) str2num(H1(168+[4 5])) str2num(H1(168+[1 2])) str2num(H1(168+[9 10])) str2num(H1(168+[12 13])) str2num(H1(168+[15 16])) ]; % Y2K compatibility until year 2090 if EDF.VERSION(1)=='0' if EDF.T0(1) < 91 EDF.T0(1)=2000+EDF.T0(1); else EDF.T0(1)=1900+EDF.T0(1); end else % in a future version, this is hopefully not needed End Some outputs at this stage: K>> EDF.T0 ans = [] K>> EDF EDF = struct with fields: FILE: [1×1 struct] FileName: '/Users/tst/Downloads/NS136_Day4_Seizure1_clipANON.edf' VERSION: '0 ' PID: 'ReX' RID: '' T0: [] K>> H1 H1 = '0 ReX IF I import the edf to an EEG viewer and export from that software again, the import works. It seems that the export writes additional info to what is read into H1. The outputs at the same stage of import for this new file is: EDF = struct with fields: FILE: [1×1 struct] FileName: '/Users/tst/Downloads/NewFile.edf' VERSION: '0 ' PID: 'X X X X' RID: 'Startdate 23-JAN-2019 X X AnyWave_EDF+_exporter' T0: [19 1 23 16 49 29] K>> H1 H1 = '0 X X X X Startdate 23-JAN-2019 X X AnyWave_EDF+_exporter -------------- next part -------------- An HTML attachment was scrubbed... URL: From leizhang at psych.ac.cn Thu Jan 24 05:35:58 2019 From: leizhang at psych.ac.cn (leizhang) Date: Thu, 24 Jan 2019 12:35:58 +0800 Subject: [FieldTrip] =?utf-8?q?can=27t_find_the_ft=5Fpostfreesurferscript?= =?utf-8?b?LnNo?= References: Message-ID: Dear community, My name is Zhang Lei and I am working in the institute of psychology, CAS. Currently I am analyzing an MEG data. I'm doing the 'Creating a source model for source-reconstruction of MEG or EEG data' part according to the tutorial. After the freesurfer step, ft_postfreesurferscript.sh are used. However, I couldn't find the script in the fieldtrip/bin/, and I couldn't find it in other folder or on the web either. I wander where I can get this script to complete the step. Thanks! Best,  Zhang Lei Sent from YoMail -------------- next part -------------- An HTML attachment was scrubbed... URL: From jan.schoffelen at donders.ru.nl Fri Jan 25 01:19:19 2019 From: jan.schoffelen at donders.ru.nl (Schoffelen, J.M. (Jan Mathijs)) Date: Fri, 25 Jan 2019 00:19:19 +0000 Subject: [FieldTrip] can't find the ft_postfreesurferscript.sh In-Reply-To: References: Message-ID: <418E7C2D-700B-44F7-A10F-7D5771B24557@donders.ru.nl> Hi Zhang Lei, Please check the completeness of your fieldtrip repository. The current version on github has the ft_postfreesurferscript.sh in the bin folder. Best wishes, Jan-Mathijs J.M.Schoffelen, MD PhD Senior Researcher, VIDI-fellow - PI, language in interaction Telephone: +31-24-3614793 Physical location: room 00.028 Donders Centre for Cognitive Neuroimaging, Nijmegen, The Netherlands On 24 Jan 2019, at 04:35, leizhang > wrote: Dear community, My name is Zhang Lei and I am working in the institute of psychology, CAS. Currently I am analyzing an MEG data. I'm doing the 'Creating a source model for source-reconstruction of MEG or EEG data' part according to the tutorial. After the freesurfer step, ft_postfreesurferscript.sh are used. However, I couldn't find the script in the fieldtrip/bin/, and I couldn't find it in other folder or on the web either. I wander where I can get this script to complete the step. Thanks! Best, Zhang Lei ________________________________ Sent from YoMail _______________________________________________ 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 jan.schoffelen at donders.ru.nl Fri Jan 25 01:25:45 2019 From: jan.schoffelen at donders.ru.nl (Schoffelen, J.M. (Jan Mathijs)) Date: Fri, 25 Jan 2019 00:25:45 +0000 Subject: [FieldTrip] deep sources when warping from template (MNI) to individual space In-Reply-To: <54b1511bd167466db12ca9e8d2ab30b2@cchmc.org> References: <54b1511bd167466db12ca9e8d2ab30b2@cchmc.org> Message-ID: <1333A06A-B511-4D34-A2E0-CD44B2AEA6DB@donders.ru.nl> Dear Darren, That’s certainly a creative way to use the inverse warp for the creation of the subject specific grids :). I don’t know what might be going on, but recently we noticed that the warp might go wrong if the metric units of the data object are unexpected. I am not sure whether this is the case for you, but I noticed that the individual headmodels are explicitly converted into cm. Now, the warping parameters extracted from spm might be agnostic with respect to the units of the input, and probably are defined in ‘mm’. I know that we have been looking into this (i.e. the unit related issue) recently, but don’t know whether it has been resolved. Just as a diagnostic, could you keep the individual headmodel in mm and check what happens? Best wishes, Jan-Mathijs J.M.Schoffelen, MD PhD Senior Researcher, VIDI-fellow - PI, language in interaction Telephone: +31-24-3614793 Physical location: room 00.028 Donders Centre for Cognitive Neuroimaging, Nijmegen, The Netherlands On 23 Jan 2019, at 19:47, Kadis, Darren > wrote: Dear FieldTrippers: Wanted to follow-up on a discussion regarding poor normalization, and specifically, an inward bias, when warping template (MNI space) source positions to individual subject space. This is a useful approach to normalization, facilitating group-level analyses and anatomical referencing, though meaningful inference is predicated on having accurate normalization/warps. At least one relevant discussion thread, here: https://mailman.science.ru.nl/pipermail/fieldtrip/2015-April/009111.html, though I don’t see resolution. In my lab, we’re consistently observing an ‘inward bias’ when warping template source positions to individual space (see attached). Superficial sources seem to shift excessively deep, particularly at the dorsum. Has anyone adjusted the normalization parameters or implemented alternate warping procedures to generate accurate transformations? I will note that default normalization of individual MRI to template works well in both SPM8 and SPM12 (confirmed with checkreg). I believe ft_preparesourcemodel calls upon ft_volumenormalize and spm routines to generate the deformation field. We’ve tried adjusted the warping regularization parameters in ft_volumenormalise both up and down by an order of magnitude, but did not see any real improvement. Suggestions? Below, I’m sharing a short script used to visualize the relative performance of normalization with SPM8, SPM12 linear-only, and SPM12 nonlinear approaches, as implemented in FieldTrip. I used 346 source positions, located approximately 3.6mm deep to the template brain surface (roughly corresponding to mid-sulcal depth across the cerebral mantle; attached). %% start clear all; close all; restoredefaultpath; addpath('PATH TO CURRENT FIELDTRIP DISTRO'); ft_defaults; vs_pos = []; % n×3, coords of interest, MNI space; see attached text, if interested in replicating template_mri = ft_read_mri('PATH TO SPM12\spm12\canonical\avg152T1.nii'); template_mri.coordsys = 'spm'; % ft_volumesegment needs coordsys of the template volume cfg = []; cfg.output = {'brain', 'skull', 'scalp'}; cfg.spmversion = 'spm12'; cfg.spmmethod = 'new'; template_seg = ft_volumesegment(cfg, template_mri); cfg = []; cfg.method = 'singleshell'; template_headmodel = ft_prepare_headmodel(cfg, template_seg); cfg = []; cfg.grid.pos = vs_pos; cfg.spmversion = 'spm12'; cfg.spmmethod = 'new'; cfg.headmodel = template_headmodel; template_grid = ft_prepare_sourcemodel(cfg); % evaluate dipole positions relative to modeled brain figure; ft_plot_vol(template_headmodel, 'facecolor', 'cortex', 'edgecolor', 'none'); alpha 0.5; camlight; hold on; ft_plot_mesh(template_grid.pos); % generate the individual headmodel; warp source positions from template to subject space T1 = 'PATH TO SUBJECT T1'; % high-quality 3D-T1, 1mm isotropic, here individual_mri = ft_read_mri(T1, 'dataformat', 'nifti_spm'); individual_mri.coordsys = 'spm'; cfg = []; cfg.output = {'brain', 'skull', 'scalp'}; cfg.spmversion = 'spm12'; cfg.spmmethod = 'new'; individual_segmented_mri = ft_volumesegment(cfg, individual_mri); cfg = []; cfg.method = 'singleshell'; individual_headmodel = ft_prepare_headmodel(cfg, individual_segmented_mri); individual_headmodel = ft_convert_units(individual_headmodel, 'cm'); cfg = []; cfg.grid.warpmni = 'yes'; cfg.grid.template = template_grid; cfg.grid.nonlinear = 'yes'; cfg.spmversion = 'spm8'; cfg.mri = individual_mri; individual_grid_spm8 = ft_prepare_sourcemodel(cfg); cfg = []; cfg.grid.warpmni = 'yes'; cfg.grid.template = template_grid; cfg.grid.nonlinear = 'no'; cfg.spmversion = 'spm12'; cfg.spmmethod = 'new'; cfg.mri = individual_mri; individual_grid_spm12_linear = ft_prepare_sourcemodel(cfg); cfg = []; cfg.grid.warpmni = 'yes'; cfg.grid.template = template_grid; cfg.grid.nonlinear = 'yes'; cfg.spmversion = 'spm12'; cfg.spmmethod = 'old'; cfg.mri = individual_mri; individual_grid_spm12_nonlinear = ft_prepare_sourcemodel(cfg); figure; subplot(2, 2, 1); ft_plot_vol(template_headmodel, 'facecolor', 'cortex', 'edgecolor', 'none'); alpha 0.25; camlight; hold on; ft_plot_mesh(template_grid.pos, 'vertexcolor', 'red'); title('template'); subplot(2, 2, 2); ft_plot_vol(individual_headmodel, 'facecolor', 'cortex', 'edgecolor', 'none'); alpha 0.25; camlight; hold on; ft_plot_mesh(individual_grid_spm8.pos); title('individual spm8 nonlinear'); subplot(2, 2, 3); ft_plot_vol(individual_headmodel, 'facecolor', 'cortex', 'edgecolor', 'none'); alpha 0.25; camlight; hold on; ft_plot_mesh(individual_grid_spm12_linear.pos); title('individual spm12 linear only'); subplot(2, 2, 4); ft_plot_vol(individual_headmodel, 'facecolor', 'cortex', 'edgecolor', 'none'); alpha 0.25; camlight; hold on; ft_plot_mesh(individual_grid_spm12_nonlinear.pos); title('individual spm12 nonlinear'); %% end In advance, thanks for your help. Darren S. Kadis, PhD Assistant Professor Co-Director, MEG Core Division of Neurology Pediatric Neuroimaging Research Consortium Cincinnati Children's Hospital Medical Center MLC 15008, 3333 Burnet Avenue Cincinnati, OH 45229-3026 Neurology and Neuroscience Graduate Program College of Medicine, Department of Pediatrics University of Cincinnati _______________________________________________ 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 leizhang at psych.ac.cn Fri Jan 25 07:29:19 2019 From: leizhang at psych.ac.cn (leizhang) Date: Fri, 25 Jan 2019 14:29:19 +0800 Subject: [FieldTrip] =?utf-8?q?can=27t_find_the_ft=5Fpostf__reesurferscri?= =?utf-8?q?pt=2Esh?= References: <418E7C2D-700B-44F7-A10F-7D5771B24557@donders.ru.nl> Message-ID: Thanks a lot! I find it. best, Zhang Lei Sent from YoMail -------------- next part -------------- An HTML attachment was scrubbed... URL: From muthuraman10 at hotmail.com Fri Jan 25 13:03:26 2019 From: muthuraman10 at hotmail.com (Muthuraman Muthuraman) Date: Fri, 25 Jan 2019 12:03:26 +0000 Subject: [FieldTrip] Neuroscientist with focus on electrophysiology and imaging in Parkinson disease patients! Message-ID: Doctoral Student Neuroscientist with focus on electrophysiology and imaging in Parkinson disease patients The clinic of neurology, imaging and neurostimulation group (http://imaging-neurostim.com) University of Mainz, Germany, invites applications for a PhD Student for a functional translational neuroscience (FTN) scholarship three year position to work on electrophysiology and imaging in Parkinson disease (PD) patients. A project with multimodality usage of modalities like electroencephalography (EEG) and functional magnetic resonance imaging (fMRI) to analyze network fingerprints in PD patients. The successful applicant holds a Master’s degree (or equivalent) in a relevant academic area such as basic life sciences, neuropsychology, applied mathematics or biomedical engineering or similar disciplines. German language proficiency is mandatory for communicating with the patients. The working language at the institute is English. Experience with electrophysiology and the analysis of brain signals is advantageous, but not essential. The applicant’s merits are assessed on the basis of the quality of Master’s level studies and thesis, previous experience with the brain imaging, motivation and research interests. The location for this research will mainly be the workgroups “Section of Movement Disorders, Neurostimulation and Neuroimaging“ of Prof. Sergiu Groppa at the Department of Neurology and “Biomedical Statistics and Multimodal Signal Processing Unit” of Prof. Muthuraman Muthuraman, both at the Focus Program Translational Neurosciences (http://www.ftn.uni-mainz.de/) and Neuroimaging Centre Mainz (http://www.ftn.nic.uni-mainz.de/). Expected close collaborations with national and international partners. The application should include a statement of research interests, a curriculum vitae (max. 4 pages) composed according to good scientific practice, a certificate of Master’s degree, copy of the master’s thesis and grades of Master’s level studies, the names and e-mail addresses of two referees and a proof of proficiency in English. The position will be open until filled. To apply for the position, please send the above documents as pdfs until 15.02.2019 to Prof. Sergiu Groppa, and Prof. Muthuraman Muthuraman, Department of Neurology, Section of movement disorders and neurostimulation, University of Mainz, Langenbeckstrasse 1, 55131 Mainz, Germany, or by Email to segroppa(at)uni-mainz.de; mmuthura(at)uni-mainz.de. For additional information please contact Muthuraman Muthuraman. -------------- next part -------------- An HTML attachment was scrubbed... URL: From dlozanosoldevilla at gmail.com Fri Jan 25 13:59:49 2019 From: dlozanosoldevilla at gmail.com (Diego Lozano-Soldevilla) Date: Fri, 25 Jan 2019 13:59:49 +0100 Subject: [FieldTrip] automatic channel rejection In-Reply-To: <10d93c05-c66e-18d6-7533-ef40b858a218@uzh.ch> References: <10d93c05-c66e-18d6-7533-ef40b858a218@uzh.ch> Message-ID: Hi Aitor, May be what you're looking for is "ft_artifact_threshold.m". That being said, I don't recommend rejecting artifacts without visually inspecting the data. Absolute threshold do not necessarily generalize across subjects and/or experimental sessions. I hope that helps, Diego On Sun, 20 Jan 2019 at 17:45, Aitor Egurtzegi < aitor.martinezegurcegui at uzh.ch> wrote: > Hi Diego, > > Thanks for the help. However, I was wondering if there is a way to > reject artifacts without visually inspecting them. Like, from the manual > you sent I see that I still would have to click on the trials / channels > I would like to reject? Is there a way to script it based on some > previously established parameters, without having to check all trials / > channels for each participant? > > Best, > Aitor > > > Date: Fri, 18 Jan 2019 16:47:17 +0100 > > From: Diego Lozano-Soldevilla > > To: FieldTrip discussion list > > Subject: Re: [FieldTrip] automatic channel rejection > > Message-ID: > > < > CAEVBUjij4o8J-U10rF4Oxfa9d81tE_BD3t81DcdSy-VQfeTnUA at mail.gmail.com> > > Content-Type: text/plain; charset="utf-8" > > > > Hi Aitor, > > Take a look at this > > > http://www.fieldtriptoolbox.org/tutorial/visual_artifact_rejection/#manual-artifact-rejection---display-a-summary > > Best, > > Diego > > > > On Fri, 18 Jan 2019 at 16:43, Aitor Egurtzegi < > > aitor.martinezegurcegui at uzh.ch> wrote: > > > >> Dear Fieldtrip subscribers, > >> > >> I was wondering if anyone knew how to automatically reject bad channels > >> in Fieldtrip, as it is done in EEGLAB based on e.g. kurtosis. Basically, > >> I'm looking for the Fieldtrip equivalent of the EEGLAB function > >> pop_rejchan. > >> > >> Many thanks in advance, > >> Aitor > >> > >> _______________________________________________ > >> 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 Darren.Kadis at cchmc.org Fri Jan 25 17:53:59 2019 From: Darren.Kadis at cchmc.org (Kadis, Darren) Date: Fri, 25 Jan 2019 16:53:59 +0000 Subject: [FieldTrip] deep sources when warping from template (MNI) to individual space (Schoffelen, J.M. (Jan Mathijs)) Message-ID: Jan-Mathijs, thanks for the speedy response. As suggested, I re-ran the sourcemodel comparison, keeping the individual headmodel in mm, but also explicitly specifying 'mm' when calling ft_prepare_sourcemodel (cfg.grid.unit = 'mm'; else assumes cm). Unfortunately, I'm still seeing the 'deep bias' for the warped positions. Units for the for the data object don’t seem to be the problem - the resulting source positions (.pos field) for the mm-defined vs cm-defined headmodel are identical, after accounting for order of magnitude difference, and rounding. I'll keep digging, and welcome other suggestions. For now, the 'SPM12 linear only' option seems to produce the most reasonable-looking positions in individual space (I believe Stephen Whitmarsh previously concluded the same - https://mailman.science.ru.nl/pipermail/fieldtrip/2015-April/009111.html). Thanks, Darren > -----Original Message----- > From: fieldtrip On Behalf Of fieldtrip- > request at science.ru.nl > Sent: Friday, January 25, 2019 6:00 AM > To: fieldtrip at science.ru.nl > Subject: fieldtrip Digest, Vol 98, Issue 30 > > Send fieldtrip mailing list submissions to > fieldtrip at science.ru.nl > > To subscribe or unsubscribe via the World Wide Web, visit > https://mailman.science.ru.nl/mailman/listinfo/fieldtrip > or, via email, send a message with subject or body 'help' to > fieldtrip-request at science.ru.nl > > You can reach the person managing the list at > fieldtrip-owner at science.ru.nl > > When replying, please edit your Subject line so it is more specific than "Re: > Contents of fieldtrip digest..." > > > Today's Topics: > > 1. Re: can't find the ft_postfreesurferscript.sh > (Schoffelen, J.M. (Jan Mathijs)) > 2. Re: deep sources when warping from template (MNI) to > individual space (Schoffelen, J.M. (Jan Mathijs)) > 3. Re: can't find the ft_postf reesurferscript.sh (leizhang) > > > ---------------------------------------------------------------------- > > Message: 1 > Date: Fri, 25 Jan 2019 00:19:19 +0000 > From: "Schoffelen, J.M. (Jan Mathijs)" > To: FieldTrip discussion list > Subject: Re: [FieldTrip] can't find the ft_postfreesurferscript.sh > Message-ID: <418E7C2D-700B-44F7-A10F-7D5771B24557 at donders.ru.nl> > Content-Type: text/plain; charset="utf-8" > > Hi Zhang Lei, > > Please check the completeness of your fieldtrip repository. The current > version on github has the ft_postfreesurferscript.sh in the bin folder. > > Best wishes, > Jan-Mathijs > > > J.M.Schoffelen, MD PhD > Senior Researcher, VIDI-fellow - PI, language in interaction > Telephone: +31-24-3614793 > Physical location: room 00.028 > Donders Centre for Cognitive Neuroimaging, Nijmegen, The Netherlands > > > > On 24 Jan 2019, at 04:35, leizhang > > wrote: > > Dear community, > > My name is Zhang Lei and I am working in the institute of psychology, CAS. > Currently I am analyzing an MEG data. > > I'm doing the 'Creating a source model for source-reconstruction of MEG or > EEG data' part according to the tutorial. After the freesurfer step, > ft_postfreesurferscript.sh are used. However, I couldn't find the script in the > fieldtrip/bin/, and I couldn't find it in other folder or on the web either. I > wander where I can get this script to complete the step. > > Thanks! > Best, > Zhang Lei > > ________________________________ > Sent from YoMail > _______________________________________________ > 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: > 1ccd55/attachment-0001.html> > > ------------------------------ > > Message: 2 > Date: Fri, 25 Jan 2019 00:25:45 +0000 > From: "Schoffelen, J.M. (Jan Mathijs)" > To: FieldTrip discussion list > Subject: Re: [FieldTrip] deep sources when warping from template (MNI) > to individual space > Message-ID: <1333A06A-B511-4D34-A2E0-CD44B2AEA6DB at donders.ru.nl> > Content-Type: text/plain; charset="utf-8" > > Dear Darren, > > That’s certainly a creative way to use the inverse warp for the creation of the > subject specific grids :). I don’t know what might be going on, but recently we > noticed that the warp might go wrong if the metric units of the data object > are unexpected. I am not sure whether this is the case for you, but I noticed > that the individual headmodels are explicitly converted into cm. Now, the > warping parameters extracted from spm might be agnostic with respect to > the units of the input, and probably are defined in ‘mm’. I know that we have > been looking into this (i.e. the unit related issue) recently, but don’t know > whether it has been resolved. Just as a diagnostic, could you keep the > individual headmodel in mm and check what happens? > > Best wishes, > Jan-Mathijs > > > > J.M.Schoffelen, MD PhD > Senior Researcher, VIDI-fellow - PI, language in interaction > Telephone: +31-24-3614793 > Physical location: room 00.028 > Donders Centre for Cognitive Neuroimaging, Nijmegen, The Netherlands > > > > On 23 Jan 2019, at 19:47, Kadis, Darren > > wrote: > > Dear FieldTrippers: > > Wanted to follow-up on a discussion regarding poor normalization, and > specifically, an inward bias, when warping template (MNI space) source > positions to individual subject space. This is a useful approach to > normalization, facilitating group-level analyses and anatomical referencing, > though meaningful inference is predicated on having accurate > normalization/warps. At least one relevant discussion thread, here: > https://mailman.science.ru.nl/pipermail/fieldtrip/2015-April/009111.html, > though I don’t see resolution. > > In my lab, we’re consistently observing an ‘inward bias’ when warping > template source positions to individual space (see attached). Superficial > sources seem to shift excessively deep, particularly at the dorsum. Has > anyone adjusted the normalization parameters or implemented alternate > warping procedures to generate accurate transformations? I will note that > default normalization of individual MRI to template works well in both SPM8 > and SPM12 (confirmed with checkreg). > > I believe ft_preparesourcemodel calls upon ft_volumenormalize and spm > routines to generate the deformation field. We’ve tried adjusted the > warping regularization parameters in ft_volumenormalise both up and down > by an order of magnitude, but did not see any real improvement. > Suggestions? > > Below, I’m sharing a short script used to visualize the relative performance of > normalization with SPM8, SPM12 linear-only, and SPM12 nonlinear > approaches, as implemented in FieldTrip. I used 346 source positions, > located approximately 3.6mm deep to the template brain surface (roughly > corresponding to mid-sulcal depth across the cerebral mantle; attached). > > > %% start > > clear all; close all; > > restoredefaultpath; addpath('PATH TO CURRENT FIELDTRIP DISTRO'); > ft_defaults; > > vs_pos = []; % n×3, coords of interest, MNI space; see attached text, if > interested in replicating > > template_mri = ft_read_mri('PATH TO > SPM12\spm12\canonical\avg152T1.nii'); > template_mri.coordsys = 'spm'; % ft_volumesegment needs coordsys of the > template volume > > cfg = []; > cfg.output = {'brain', 'skull', 'scalp'}; cfg.spmversion = 'spm12'; > cfg.spmmethod = 'new'; template_seg = ft_volumesegment(cfg, > template_mri); > > cfg = []; > cfg.method = 'singleshell'; > template_headmodel = ft_prepare_headmodel(cfg, template_seg); > > cfg = []; > cfg.grid.pos = vs_pos; > cfg.spmversion = 'spm12'; > cfg.spmmethod = 'new'; > cfg.headmodel = template_headmodel; > template_grid = ft_prepare_sourcemodel(cfg); > > > % evaluate dipole positions relative to modeled brain figure; > ft_plot_vol(template_headmodel, 'facecolor', 'cortex', 'edgecolor', 'none'); > alpha 0.5; camlight; hold on; ft_plot_mesh(template_grid.pos); > > % generate the individual headmodel; warp source positions from template > to subject space > T1 = 'PATH TO SUBJECT T1'; % high-quality 3D-T1, 1mm isotropic, here > individual_mri = ft_read_mri(T1, 'dataformat', 'nifti_spm'); > individual_mri.coordsys = 'spm'; > > cfg = []; > cfg.output = {'brain', 'skull', 'scalp'}; cfg.spmversion = 'spm12'; > cfg.spmmethod = 'new'; individual_segmented_mri = ft_volumesegment(cfg, > individual_mri); > > cfg = []; > cfg.method = 'singleshell'; > individual_headmodel = ft_prepare_headmodel(cfg, > individual_segmented_mri); individual_headmodel = > ft_convert_units(individual_headmodel, 'cm'); > > cfg = []; > cfg.grid.warpmni = 'yes'; > cfg.grid.template = template_grid; > cfg.grid.nonlinear = 'yes'; > cfg.spmversion = 'spm8'; > cfg.mri = individual_mri; > individual_grid_spm8 = ft_prepare_sourcemodel(cfg); > > cfg = []; > cfg.grid.warpmni = 'yes'; > cfg.grid.template = template_grid; > cfg.grid.nonlinear = 'no'; > cfg.spmversion = 'spm12'; > cfg.spmmethod = 'new'; > cfg.mri = individual_mri; > individual_grid_spm12_linear = ft_prepare_sourcemodel(cfg); > > cfg = []; > cfg.grid.warpmni = 'yes'; > cfg.grid.template = template_grid; > cfg.grid.nonlinear = 'yes'; > cfg.spmversion = 'spm12'; > cfg.spmmethod = 'old'; > cfg.mri = individual_mri; > individual_grid_spm12_nonlinear = ft_prepare_sourcemodel(cfg); > > figure; > subplot(2, 2, 1); ft_plot_vol(template_headmodel, 'facecolor', 'cortex', > 'edgecolor', 'none'); alpha 0.25; camlight; hold on; > ft_plot_mesh(template_grid.pos, 'vertexcolor', 'red'); title('template'); > subplot(2, 2, 2); ft_plot_vol(individual_headmodel, 'facecolor', 'cortex', > 'edgecolor', 'none'); alpha 0.25; camlight; hold on; > ft_plot_mesh(individual_grid_spm8.pos); title('individual spm8 nonlinear'); > subplot(2, 2, 3); ft_plot_vol(individual_headmodel, 'facecolor', 'cortex', > 'edgecolor', 'none'); alpha 0.25; camlight; hold on; > ft_plot_mesh(individual_grid_spm12_linear.pos); title('individual spm12 > linear only'); subplot(2, 2, 4); ft_plot_vol(individual_headmodel, 'facecolor', > 'cortex', 'edgecolor', 'none'); alpha 0.25; camlight; hold on; > ft_plot_mesh(individual_grid_spm12_nonlinear.pos); title('individual spm12 > nonlinear'); > > %% end > > In advance, thanks for your help. > > Darren S. Kadis, PhD > Assistant Professor > Co-Director, MEG Core > > Division of Neurology > Pediatric Neuroimaging Research Consortium Cincinnati Children's Hospital > Medical Center MLC 15008, 3333 Burnet Avenue Cincinnati, OH 45229-3026 > > Neurology and Neuroscience Graduate Program College of Medicine, > Department of Pediatrics University of Cincinnati > _____________________ > __________________________ > 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: > f75225/attachment-0001.html> > > ------------------------------ > > Message: 3 > Date: Fri, 25 Jan 2019 14:29:19 +0800 > From: "leizhang" > To: "=?utf-8?B?RmllbGRUcmlwIGRpc2N1c3Npb24gbGlzdA==?=" > > Subject: Re: [FieldTrip] can't find the ft_postf reesurferscript.sh > Message-ID: > Content-Type: text/plain; charset="utf-8" > > Thanks a lot! I find it. > > best, > Zhang Lei > > Sent from YoMail > > -------------- next part -------------- > An HTML attachment was scrubbed... > URL: > c25255/attachment-0001.html> > > ------------------------------ > > Subject: Digest Footer > > _______________________________________________ > fieldtrip mailing list > https://mailman.science.ru.nl/mailman/listinfo/fieldtrip > _______________________________________________ > fieldtrip mailing list > https://mailman.science.ru.nl/mailman/listinfo/fieldtrip > https://doi.org/10.1371/journal.pcbi.1002202 > > > ------------------------------ > > End of fieldtrip Digest, Vol 98, Issue 30 > ***************************************** From omerxsharon at gmail.com Sun Jan 27 15:10:15 2019 From: omerxsharon at gmail.com (Omer Sharon) Date: Sun, 27 Jan 2019 16:10:15 +0200 Subject: [FieldTrip] fieldtrip ram usage explodes since Matlab2019 Message-ID: Dear Fieldtrippers I recently upgrade my Matlab to 2018b, as a result my older fieldtrip version which I did not want to upgrade (20160326) did not work anymore (some wierd error was evoked already by ft_definetrials). Therefore I upgrade to a newer fieldtrip version (20181231). The code once perfectly worked is now exploding my 64GB RAM. I'm loading 89 trials of about 30sec each 1000Hz file (total size about 4Gb) from an MFF file. This used to work in the old version... I tried loading just one channel but the problem persists. It doesn't make any sense since the total size of the file is much lower. Did anyone encounter that problem? or have an idea? Great Thanks Omer -------------- next part -------------- An HTML attachment was scrubbed... URL: From aitor.martinezegurcegui at uzh.ch Sun Jan 27 17:14:00 2019 From: aitor.martinezegurcegui at uzh.ch (Aitor Egurtzegi) Date: Sun, 27 Jan 2019 17:14:00 +0100 Subject: [FieldTrip] automatic channel rejection In-Reply-To: References: Message-ID: <1c80e074-c18a-3903-1ef1-c6aa0427772a@uzh.ch> Hi Diego, Thanks for your message. Is it possible to reject the trials / channels by giving a list of indices to a function, just like when running ft_rejectcomponent, where you reject components by passing a list of the components to be rejected to the cfg.component method? Best, Aitor > Message: 2 > Date: Fri, 25 Jan 2019 13:59:49 +0100 > From: Diego Lozano-Soldevilla > To: FieldTrip discussion list > Subject: Re: [FieldTrip] automatic channel rejection > Message-ID: > > Content-Type: text/plain; charset="utf-8" > > Hi Aitor, > May be what you're looking for is "ft_artifact_threshold.m". That being > said, I don't recommend rejecting artifacts without visually inspecting the > data. Absolute threshold do not necessarily generalize across subjects > and/or experimental sessions. > I hope that helps, > Diego > > On Sun, 20 Jan 2019 at 17:45, Aitor Egurtzegi < > aitor.martinezegurcegui at uzh.ch> wrote: > >> Hi Diego, >> >> Thanks for the help. However, I was wondering if there is a way to >> reject artifacts without visually inspecting them. Like, from the manual >> you sent I see that I still would have to click on the trials / channels >> I would like to reject? Is there a way to script it based on some >> previously established parameters, without having to check all trials / >> channels for each participant? >> >> Best, >> Aitor >> >>> Date: Fri, 18 Jan 2019 16:47:17 +0100 >>> From: Diego Lozano-Soldevilla >>> To: FieldTrip discussion list >>> Subject: Re: [FieldTrip] automatic channel rejection >>> Message-ID: >>> < >> CAEVBUjij4o8J-U10rF4Oxfa9d81tE_BD3t81DcdSy-VQfeTnUA at mail.gmail.com> >>> Content-Type: text/plain; charset="utf-8" >>> >>> Hi Aitor, >>> Take a look at this >>> >> http://www.fieldtriptoolbox.org/tutorial/visual_artifact_rejection/#manual-artifact-rejection---display-a-summary >>> Best, >>> Diego >>> >>> On Fri, 18 Jan 2019 at 16:43, Aitor Egurtzegi < >>> aitor.martinezegurcegui at uzh.ch> wrote: >>> >>>> Dear Fieldtrip subscribers, >>>> >>>> I was wondering if anyone knew how to automatically reject bad channels >>>> in Fieldtrip, as it is done in EEGLAB based on e.g. kurtosis. Basically, >>>> I'm looking for the Fieldtrip equivalent of the EEGLAB function >>>> pop_rejchan. >>>> >>>> Many thanks in advance, >>>> Aitor >>>> >>>> _______________________________________________ >>>> 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 Sun Jan 27 21:05:33 2019 From: dlozanosoldevilla at gmail.com (Diego Lozano-Soldevilla) Date: Sun, 27 Jan 2019 21:05:33 +0100 Subject: [FieldTrip] automatic channel rejection In-Reply-To: <1c80e074-c18a-3903-1ef1-c6aa0427772a@uzh.ch> References: <1c80e074-c18a-3903-1ef1-c6aa0427772a@uzh.ch> Message-ID: Hi Aitor, Take a look to ft_selectdata.m Best, Diego On Sun, Jan 27, 2019, 18:10 Aitor Egurtzegi Hi Diego, > > Thanks for your message. Is it possible to reject the trials / channels > by giving a list of indices to a function, just like when running > ft_rejectcomponent, where you reject components by passing a list of the > components to be rejected to the cfg.component method? > > Best, > Aitor > > Message: 2 > > Date: Fri, 25 Jan 2019 13:59:49 +0100 > > From: Diego Lozano-Soldevilla > > To: FieldTrip discussion list > > Subject: Re: [FieldTrip] automatic channel rejection > > Message-ID: > > < > CAEVBUjiq4uriOg1pawV58eGhsBTUrzpB2KW9mweQWhEOkGi6kA at mail.gmail.com> > > Content-Type: text/plain; charset="utf-8" > > > > Hi Aitor, > > May be what you're looking for is "ft_artifact_threshold.m". That being > > said, I don't recommend rejecting artifacts without visually inspecting > the > > data. Absolute threshold do not necessarily generalize across subjects > > and/or experimental sessions. > > I hope that helps, > > Diego > > > > On Sun, 20 Jan 2019 at 17:45, Aitor Egurtzegi < > > aitor.martinezegurcegui at uzh.ch> wrote: > > > >> Hi Diego, > >> > >> Thanks for the help. However, I was wondering if there is a way to > >> reject artifacts without visually inspecting them. Like, from the manual > >> you sent I see that I still would have to click on the trials / channels > >> I would like to reject? Is there a way to script it based on some > >> previously established parameters, without having to check all trials / > >> channels for each participant? > >> > >> Best, > >> Aitor > >> > >>> Date: Fri, 18 Jan 2019 16:47:17 +0100 > >>> From: Diego Lozano-Soldevilla > >>> To: FieldTrip discussion list > >>> Subject: Re: [FieldTrip] automatic channel rejection > >>> Message-ID: > >>> < > >> CAEVBUjij4o8J-U10rF4Oxfa9d81tE_BD3t81DcdSy-VQfeTnUA at mail.gmail.com> > >>> Content-Type: text/plain; charset="utf-8" > >>> > >>> Hi Aitor, > >>> Take a look at this > >>> > >> > http://www.fieldtriptoolbox.org/tutorial/visual_artifact_rejection/#manual-artifact-rejection---display-a-summary > >>> Best, > >>> Diego > >>> > >>> On Fri, 18 Jan 2019 at 16:43, Aitor Egurtzegi < > >>> aitor.martinezegurcegui at uzh.ch> wrote: > >>> > >>>> Dear Fieldtrip subscribers, > >>>> > >>>> I was wondering if anyone knew how to automatically reject bad > channels > >>>> in Fieldtrip, as it is done in EEGLAB based on e.g. kurtosis. > Basically, > >>>> I'm looking for the Fieldtrip equivalent of the EEGLAB function > >>>> pop_rejchan. > >>>> > >>>> Many thanks in advance, > >>>> Aitor > >>>> > >>>> _______________________________________________ > >>>> 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 vale.nasato at gmail.com Mon Jan 28 09:04:51 2019 From: vale.nasato at gmail.com (Valentina Nasato) Date: Mon, 28 Jan 2019 09:04:51 +0100 Subject: [FieldTrip] KERNEL Message-ID: <5c4eb7a3.1c69fb81.b2d2c.6405@mx.google.com> Hello to everyone, By fieldtrip I obtained the direct model (FEM) and solved the inverse problem by eloreta and sloreta of EEG dataset. Now the data weights about 2 Gb. I wanted to calculate the kernel of the source just calculated in order to have a smaller file. I can not understand how to calculate the kernel from ' keepfilter', 'keep...' etc. put in input to ft_sourceanalysis. thanks for the helpfulness Valentina Translated with www.DeepL.com/Translator Inviato da Posta per Windows 10 -------------- next part -------------- An HTML attachment was scrubbed... URL: From iliazaharov at gmail.com Mon Jan 28 09:36:41 2019 From: iliazaharov at gmail.com (=?UTF-8?B?0JjQu9GM0Y8g0JfQsNGF0LDRgNC+0LI=?=) Date: Mon, 28 Jan 2019 11:36:41 +0300 Subject: [FieldTrip] cluster-based correlation on one-dimensional data Message-ID: Dear fieldtrip experts, We want to use FieldTrip toolbox to calculate cluster-based correlations between behavioural measure and power averaged for each channel. How should the design matrix for our kind of data look like? Also, if we have our own specific measure for each channel (calculated outside of FieldTrip), how can we use it for cluster-based permutations in a between-subject design? Best regards, -- Ilya Zakharov research associate Developmental Behavioral Genetics Lab Psychological Institute Russian Academy of Education -------------- next part -------------- An HTML attachment was scrubbed... URL: From dlozanosoldevilla at gmail.com Mon Jan 28 10:12:34 2019 From: dlozanosoldevilla at gmail.com (Diego Lozano-Soldevilla) Date: Mon, 28 Jan 2019 10:12:34 +0100 Subject: [FieldTrip] cluster-based correlation on one-dimensional data In-Reply-To: References: Message-ID: Hi Илья Захаров To compute cluster-based correlations please visit: http://www.fieldtriptoolbox.org/faq/how_can_i_test_for_correlations_between_neuronal_data_and_quantitative_stimulus_and_behavioural_variables/ http://www.fieldtriptoolbox.org/workshop/madrid2019/tutorial_stats/#5-compute-a-correlation-between-an-external-variable-and-the-power-spectrum To compute between-participants(trials) please visit: http://www.fieldtriptoolbox.org/tutorial/cluster_permutation_timelock/#between-trials-experiments http://www.fieldtriptoolbox.org/workshop/madrid2019/tutorial_stats/#2-compute--between-participants-contrasts I hope that helps, Diego On Mon, 28 Jan 2019 at 10:03, Илья Захаров wrote: > Dear fieldtrip experts, > > We want to use FieldTrip toolbox to calculate cluster-based correlations > between behavioural measure and power averaged for each channel. How should > the design matrix for our kind of data look like? Also, if we have our own > specific measure for each channel (calculated outside of FieldTrip), how > can we use it for cluster-based permutations in a between-subject design? > > Best regards, > > -- > Ilya Zakharov > research associate > Developmental Behavioral Genetics Lab > Psychological Institute > Russian Academy of Education > _______________________________________________ > 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 vale.nasato at gmail.com Mon Jan 28 14:46:43 2019 From: vale.nasato at gmail.com (Valentina Nasato) Date: Mon, 28 Jan 2019 14:46:43 +0100 Subject: [FieldTrip] inverse kernel of source Message-ID: <5c4f07c3.1c69fb81.b2d2c.cd9e@mx.google.com> Dears, by fieldtrip I have implemented on EEG data the direct problem (FEM) and the inverse problem using sLORETA and eLORETA. Now I would like to calculate the inverse kernel of the source obtained through ft_sourceanalysis. Which command should I add in the struct? thank you Valentina -------------- next part -------------- An HTML attachment was scrubbed... URL: From M.Wimber at bham.ac.uk Tue Jan 29 11:31:16 2019 From: M.Wimber at bham.ac.uk (Maria Wimber) Date: Tue, 29 Jan 2019 10:31:16 +0000 Subject: [FieldTrip] PhD position @MemoryBham Message-ID: The Memory Group Birmingham is currently recruiting a PhD student for a project led by Dr Maria Wimber. This is a 3-year PhD position fully funded by the ERC Starting Grant "STREAM - The Spatio-Temporal Representational Architecture of Memory". The candidate will work on a project investigating the neural dynamics of memory reconstruction, using multivariate analyses of electrophysiological and neuroimaging data, together with neural network modelling. Applications will be reviewed on a rolling basis, with a deadline is Feb 15th. For further details see here. Interested candidates should feel free to email m.wimber at bham.ac.uk directly including a CV and a short statement of interest. ---------------------- Maria Wimber, PhD Senior Lecturer School of Psychology University of Birmingham tel +44 121 4144659 www.memorybham.com/maria-wimber -------------- next part -------------- An HTML attachment was scrubbed... URL: From aitor.martinezegurcegui at uzh.ch Tue Jan 29 20:31:50 2019 From: aitor.martinezegurcegui at uzh.ch (Aitor Egurtzegi) Date: Tue, 29 Jan 2019 20:31:50 +0100 Subject: [FieldTrip] very large weight changes when running ICA Message-ID: <7651d1a4-bae2-490e-eccc-3dcde522586b@uzh.ch> Dear Fieldtrip community, I am running an ICA with the default parameters, only specifying cfg.method = 'runica', and I get the following, extremely large values for weight changes when running it. Is there a way to fix this? step 1 - lrate 0.000089, wchange 339727227227851.18750000, angledelta  0.0 deg Lowering learning rate to 6.38132e-05 and starting again. step 1 - lrate 0.000064, wchange 6691091255065.47558594, angledelta  0.0 deg Lowering learning rate to 4.59455e-05 and starting again. step 1 - lrate 0.000046, wchange 57360369209.21232605, angledelta 0.0 deg step 2 - lrate 0.000037, wchange 42285711168995.46093750, angledelta  0.0 deg Lowering learning rate to 2.64646e-05 and starting again. step 1 - lrate 0.000026, wchange 1597187.26777422, angledelta  0.0 deg step 2 - lrate 0.000026, wchange 1837915373349.00170898, angledelta  0.0 deg step 3 - lrate 0.000021, wchange 6356182039233.50097656, angledelta 89.8 deg step 4 - lrate 0.000015, wchange 327277436065.93859863, angledelta 44.6 deg step 5 - lrate 0.000012, wchange 256497271977.77600098, angledelta 86.4 deg step 6 - lrate 0.000009, wchange 94836930214915.39062500, angledelta 81.8 deg step 7 - lrate 0.000006, wchange 9813461305830484.00000000, angledelta 52.6 deg step 8 - lrate 0.000005, wchange 270943944736795648.00000000, angledelta 82.3 deg step 9 - lrate 0.000004, wchange 195304431631393856.00000000, angledelta 59.3 deg Thanks in advance, Aitor From pdhami06 at gmail.com Wed Jan 30 05:57:12 2019 From: pdhami06 at gmail.com (Paul Dhami) Date: Tue, 29 Jan 2019 23:57:12 -0500 Subject: [FieldTrip] Error: Could not determine the parametric critical value for clustering Message-ID: Dear FieldTrip community, I am attempting to compare the frequency values between two groups using freqstatistics, but I am running into this error below in regards to 'could not determine the parametric critical value for clustering'. Any help would be greatly appreciated as to how to solve this problem. MDD_vs_Controls_sp_lpfc_freq_mcc = ft_freqstatistics(cfg,ControlsSubj_sp_lpfc_freq{:}, MDDSubj_sp_lpfc_freq{:}) the call to "ft_selectdata" took 2 seconds and required the additional allocation of an estimated 2 MB using "ft_statistics_montecarlo" for the statistical testing using "ft_statfun_indepsamplesT" for the single-sample statistics constructing randomized design total number of measurements = 58 total number of variables = 1 number of independent variables = 1 number of unit variables = 0 number of within-cell variables = 0 number of control variables = 0 using a permutation resampling approach computing a parametric threshold for clustering Index exceeds the number of array elements (0). Error using ft_statistics_montecarlo (line 247) could not determine the parametric critical value for clustering Error in ft_freqstatistics (line 190) [stat, cfg] = statmethod(cfg, dat, design); Best, Paul -------------- next part -------------- An HTML attachment was scrubbed... URL: From stephen.whitmarsh at gmail.com Wed Jan 30 08:21:44 2019 From: stephen.whitmarsh at gmail.com (Stephen Whitmarsh) Date: Wed, 30 Jan 2019 08:21:44 +0100 Subject: [FieldTrip] Error: Could not determine the parametric critical value for clustering In-Reply-To: References: Message-ID: Dear Paul, Please supply the script that you used to call ft_freqstatistics, and a description of the data structures, otherwise it's very hard to give any advice. Best, Stephen On Wed, 30 Jan 2019 at 06:15, Paul Dhami wrote: > Dear FieldTrip community, > > I am attempting to compare the frequency values between two groups using > freqstatistics, but I am running into this error below in regards to 'could > not determine the parametric critical value for clustering'. > > Any help would be greatly appreciated as to how to solve this problem. > > MDD_vs_Controls_sp_lpfc_freq_mcc = > ft_freqstatistics(cfg,ControlsSubj_sp_lpfc_freq{:}, MDDSubj_sp_lpfc_freq{:}) > the call to "ft_selectdata" took 2 seconds and required the additional > allocation of an estimated 2 MB > using "ft_statistics_montecarlo" for the statistical testing > using "ft_statfun_indepsamplesT" for the single-sample statistics > constructing randomized design > total number of measurements = 58 > total number of variables = 1 > number of independent variables = 1 > number of unit variables = 0 > number of within-cell variables = 0 > number of control variables = 0 > using a permutation resampling approach > computing a parametric threshold for clustering > Index exceeds the number of array elements (0). > Error using ft_statistics_montecarlo (line 247) > could not determine the parametric critical value for clustering > > Error in ft_freqstatistics (line 190) > [stat, cfg] = statmethod(cfg, dat, design); > > Best, > Paul > _______________________________________________ > 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 404164884 at qq.com Wed Jan 30 09:16:06 2019 From: 404164884 at qq.com (=?gb18030?B?s8K/pbrG?=) Date: Wed, 30 Jan 2019 16:16:06 +0800 Subject: [FieldTrip] :Questions about source interpolate and source reconstruction for specific MNI coordinate Message-ID: Dear Fieldtripers, I tried to conduct source reconstruction and extract time series from specific MNI coordinate on MEG data, but I got some problems. I sorted my questions as follow: (1 In the process of constructing sourcemodel, firstly I conducted ‘ft_volumerealign’ (cfg.coordsys='4d') on subject MRI to define the position of LPA, RPA and nasion according to 4d/bti coordinate system. Then I conducted: cfg = []; cfg.output = ‘brain’; segmentedmri=ft_volumesegment(cfg,mri); I checked the segmentedmri but I saw the brain stem and part of spinal cord were also comprised in it (Fig.1 and Fig.2). I think this result may affect source reconstruction. So, is this result normal? Or did I do something incorrectly? (2 Next I used template-sourcemodel and subject-MRI to construct sourcemodel in MNI space. After I got subject headmodel and sourcemodel, I conducted ‘ft_prepare_leadfield’ and then ‘ft_sourceanalysis’. When I conducted ‘ft_soureinterpolate’ to interpolate this source on subject MRI and plot it, I saw some activation outside the brain, especially in brain stem and spinal cord. But the most important thing is when I interpolate source on template-MRI (spm8-T1.nii), the functional image and anatomical image do not match, the sagittal plane of functional image is plotted on the coronal plane of anatomical image, the transverse plane of functional image is plotted on the sagittal plane of anatomical image (Fig. 3). I have not conducted ‘ft_volumelookup’ and ‘ft_volumereslice’ in the process, is this the reason? Or did I do wrong step in the process? (3 I want to extract time series form specific ROI in MNI space according to MNI coordinate. And I prepare to do this by: norm = ft_volumenormalise([],mri); %normalise subject MRI to MNI space mnipos = [x y z]; %define ROI position in MNI space posback=ft_warp_apply(norm.params,mnipos,'sn2individual'); btipos= ft_warp_apply(pinv(norm.initial),posback); % position in individual coordinates Then conducted ‘ft_prepare_leadfield’ again for ROI only, and conducted ‘ft_sourceanalysis’. Can this process work? Thank you very much for your time and consideration. Looking forward to your reply. Best regards, Chan -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: Fig. 1.png Type: application/octet-stream Size: 265329 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: Fig. 2.png Type: application/octet-stream Size: 22899 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: Fig. 3.png Type: application/octet-stream Size: 183732 bytes Desc: not available URL: From pdhami06 at gmail.com Wed Jan 30 14:56:29 2019 From: pdhami06 at gmail.com (Paul Dhami) Date: Wed, 30 Jan 2019 08:56:29 -0500 Subject: [FieldTrip] Error: Could not determine the parametric critical value for clustering Message-ID: Dear Stephen, apologizes for not including that information. The data structure (e.g. ControlsSubj_sp_lpfc_freq) was created using: % frequency analysis cfg = []; cfg.output = 'powandcsd'; cfg.method = 'mtmconvol'; cfg.foi = 2:1:60; %40 cfg.t_ftimwin = 2 ./ cfg.foi; %length of the sliding time window in seconds cfg.tapsmofrq = 0.4 *cfg.foi; % smoothing increases with increase in freq cfg.toi = -1:0.01:1; % -0.4:0.01:0.4 dataSPfreq = ft_freqanalysis(cfg, dataSPfreq); %baseline correction cfg = []; cfg.baseline = [-1 -0.1]; %-0.4 cfg.baselinetype = 'db'; dataSPfreq = ft_freqbaseline(cfg, dataSPfreq); The call to freqstatistics is as follows: cfg = []; cfg.method = 'template'; % using template method cfg.template = 'Control_neighb.mat'; % specify type of template cfg.layout = 'quickcap64.mat'; % specify layout of sensors cfg.feedback = 'yes'; % show a neighbour plot neighbours = ft_prepare_neighbours(cfg, MDDSubj_sp_lpfc_freq{1}); cfg.channel = 'all'; cfg.latency = [0.01 1] ; cfg.frequency = 'all' ; cfg.parameter = 'powspctrm'; cfg.neighbours = neighbours; % defined as above cfg.method = 'montecarlo'; cfg.statistic = 'ft_statfun_indepsamplesT'; cfg.correcttail = 'alpha'; cfg.correctm = 'cluster'; %cfg.alpha = 0.05 cfg.numrandomization = 2000; cfg.minnbchan = 2; cfg.spmversion = 'spm12'; cfg.fsample = 1000; Nsub = length(ControlsSubj_sp_lpfc_freq) + length(MDDSubj_sp_lpfc_freq) ; cfg.design = []; cfg.design(1,1:Nsub) = [ones(1, length(ControlsSubj_sp_lpfc_freq)) (2*ones(1, length(MDDSubj_sp_lpfc_freq)))]; cfg.ivar = 1; % Resulting Cluster Corrected Permutation test % !!order of structures must follow that specified in the design matrix!! MDD_vs_Controls_sp_lpfc_freq_mcc = ft_freqstatistics(cfg,ControlsSubj_sp_lpfc_freq{:}, MDDSubj_sp_lpfc_freq{:}); It is after calling ft_freqstatistics that I get the error "Could not determine the parametric critical value for clustering". Any help would be greatly appreciated. Thank you, Paul -------------- next part -------------- An HTML attachment was scrubbed... URL: From stephen.whitmarsh at gmail.com Wed Jan 30 15:34:14 2019 From: stephen.whitmarsh at gmail.com (Stephen Whitmarsh) Date: Wed, 30 Jan 2019 15:34:14 +0100 Subject: [FieldTrip] Error: Could not determine the parametric critical value for clustering In-Reply-To: References: Message-ID: <07d401d4b8a8$dfce1af0$9f6a50d0$@gmail.com> Dear Paul, Thanks. Although I still can’t see how you got to the data that goes into your ft_freqstatistics (the variable names don’t match up), something is probably wrong with your first level-statistics. - Have you tried running your stats first without cluster corrections, i.e. cfg.method = ‘analytic’? I would do so (always) and first check the results. I suspect you’ll find something like only NaNs due to perhaps some wrong latencies, design, etc. Around line 244 ft_statistics_montecarlo tries to threshold your first-level statistics. You could also add a breakpoint there and see why it fails, but first running your first-level statistics might already clarify. - Just in case - make sure you empty your cfg before you set your parameters for ft_freqstatistics J HTH, Stephen From: fieldtrip On Behalf Of Paul Dhami Sent: Wednesday, January 30, 2019 2:56 PM To: fieldtrip at science.ru.nl Subject: Re: [FieldTrip] Error: Could not determine the parametric critical value for clustering Dear Stephen, apologizes for not including that information. The data structure (e.g. ControlsSubj_sp_lpfc_freq) was created using: % frequency analysis cfg = []; cfg.output = 'powandcsd'; cfg.method = 'mtmconvol'; cfg.foi = 2:1:60; %40 cfg.t_ftimwin = 2 ./ cfg.foi; %length of the sliding time window in seconds cfg.tapsmofrq = 0.4 *cfg.foi; % smoothing increases with increase in freq cfg.toi = -1:0.01:1; % -0.4:0.01:0.4 dataSPfreq = ft_freqanalysis(cfg, dataSPfreq); %baseline correction cfg = []; cfg.baseline = [-1 -0.1]; %-0.4 cfg.baselinetype = 'db'; dataSPfreq = ft_freqbaseline(cfg, dataSPfreq); The call to freqstatistics is as follows: cfg = []; cfg.method = 'template'; % using template method cfg.template = 'Control_neighb.mat'; % specify type of template cfg.layout = 'quickcap64.mat'; % specify layout of sensors cfg.feedback = 'yes'; % show a neighbour plot neighbours = ft_prepare_neighbours(cfg, MDDSubj_sp_lpfc_freq{1}); cfg.channel = 'all'; cfg.latency = [0.01 1] ; cfg.frequency = 'all' ; cfg.parameter = 'powspctrm'; cfg.neighbours = neighbours; % defined as above cfg.method = 'montecarlo'; cfg.statistic = 'ft_statfun_indepsamplesT'; cfg.correcttail = 'alpha'; cfg.correctm = 'cluster'; %cfg.alpha = 0.05 cfg.numrandomization = 2000; cfg.minnbchan = 2; cfg.spmversion = 'spm12'; cfg.fsample = 1000; Nsub = length(ControlsSubj_sp_lpfc_freq) + length(MDDSubj_sp_lpfc_freq) ; cfg.design = []; cfg.design(1,1:Nsub) = [ones(1, length(ControlsSubj_sp_lpfc_freq)) (2*ones(1, length(MDDSubj_sp_lpfc_freq)))]; cfg.ivar = 1; % Resulting Cluster Corrected Permutation test % !!order of structures must follow that specified in the design matrix!! MDD_vs_Controls_sp_lpfc_freq_mcc = ft_freqstatistics(cfg,ControlsSubj_sp_lpfc_freq{:}, MDDSubj_sp_lpfc_freq{:}); It is after calling ft_freqstatistics that I get the error "Could not determine the parametric critical value for clustering". Any help would be greatly appreciated. Thank you, Paul -------------- next part -------------- An HTML attachment was scrubbed... URL: From RICHARDS at mailbox.sc.edu Wed Jan 30 17:57:24 2019 From: RICHARDS at mailbox.sc.edu (RICHARDS, JOHN) Date: Wed, 30 Jan 2019 16:57:24 +0000 Subject: [FieldTrip] Postdoc position Message-ID: John Richards in the Department of Psychology at the University of South Carolina is seeking a qualified PhD for a postdoctoral position. The position involves research on the development of infant attention. The laboratory uses psychophysiological methods (heart rate, EEG, ERP) and MRI (structural) to examine the brain bases of the development of infant attention and recognition memory (http://jerlab.sc.edu). The position would be to further develop the "Neurodevelopmental MRI Database", work on analysis writeup of existing projects examining tools for cortical source analysis in infants, and analysis of current datasets on infant attention and brain development. The ideal candidate would have background neuroimaging such as EEG/ERP, structural MRI or fMRI, programming experience (MATLAB, FSL, EEGLab/ERPLab) and interests/background in infant cognition, perception, or attention. We also do some work on multimodal neuroimaging in adults (sMRI, dMRI, fMRI, EEG/ERP) and the candidate could either have relevant experience, or participate in these studies. Writing experience and a publication record is required; and extensive writing and publication will be expected. At the candidate's interest, teaching experiences are available. The position is initially funded for one year, and subsequent years will be available depending on funding. The position is available now and candidates could start immediately. The salary is set at NIH standards accounting for years of postdoctoral experience. The position could be extended to a "Research Assistant Professor" for a qualified candidate with a supplement source of support. Review of applications will begin immediately and continue until the position is filled. Materials should be submitted online to https://uscjobs.sc.edu/postings/51089; and also send a note or information to richards-john at sc.edu, John E. Richards, Department of Psychology, University of South Carolina, Columbia SC 29208. *********************************************** John E. Richards Carolina Distinguished Professor Department of Psychology University of South Carolina Columbia, SC 29208 Dept Phone: 803 777 2079 Fax: 803 777 9558 Email: richards-john at sc.edu https://jerlab.sc.edu ************************************************* -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: U of SC Richards Postdoc ad January 2018.docx Type: application/vnd.openxmlformats-officedocument.wordprocessingml.document Size: 14001 bytes Desc: U of SC Richards Postdoc ad January 2018.docx URL: From nemethd at gmail.com Thu Jan 31 10:24:10 2019 From: nemethd at gmail.com (Dezso Nemeth) Date: Thu, 31 Jan 2019 10:24:10 +0100 Subject: [FieldTrip] Postdoc in Lyon - Deadline approaching In-Reply-To: References: Message-ID: Postdoc Position in Lyon (Cognitive or Computational Neuroscience) Institution: Lyon Neuroscience Research Center (CRNL) Location: Lyon, France Application Due: 02/15/2019 Applications are invited for a highly motivated, enthusiastic postdoctoral researcher with a PhD in cognitive neuroscience (or related field) to join a well-supported, friendly research team, based in the internationally renowned Center for Research in Neuroscience in Lyon (University of Lyon, CRNS, INSERM). The postdoctoral position is part of a research project named REWIRING that is funded by IDEXLYON Fellowship. The postdoc will be embedded in the IDEXLYON team (PI: Dezso Nemeth) at CRNL, Lyon. Using methods of M/EEG, fMRI and non-invasive brain stimulation (e.g., TMS), the project aims to investigate how memory representations can be updated ('rewired') in the human brain. More specifically, we will investigate the entire process of how statistical and sequential regularities are extracted from the environment (memory formation), how the extracted knowledge is consolidated and how it can be rewired. For more details see the publications of Dezso Nemeth and Karolina Janacsek at http://nemethlab.com/publications/, and particularly the following paper: Szegedi-Hallgató, E., Janacsek, K., Vékony, T., Tasi, L. A., Kerepes, L., Hompoth, E. A., ... & Németh, D. (2017). Explicit instructions and consolidation promote rewiring of automatic behaviors in the human mind.?Scientific Reports,?7(1), 4365. The overall aim of Project REWIRING is to improve human learning and memory performance and boost rewiring of automatic behaviors. Within this project, the post-holder will be responsible for designing and carrying out experiments, analyzing data, and writing up manuscripts. Additionally, the postdoc will be closely involved in daily supervision of PhD and MSc students who work on the project. Profile (Person specification) - Candidates who only partially meet the following profile are nonetheless strongly encouraged to apply! - PhD in cognitive neuroscience or an adjacent field (psychological, biological, biomedical, or computer sciences, also physics and mathematics); - A strong academic track record including publications in leading (inter)disciplinary journals; - A strong interest for fundamental research in cognitive neurosciences; - Advanced computational and/or programming skills (Matlab, Python, or other languages); - Experience in functional connectivity analysis (EEG, MEG or MRI); - Experience and interest in training and supervising junior scientists; - Capacity to participate in an interdisciplinary and international research environment; - Excellent interpersonal and communication skills to effectively collaborate and communicate in academia; - A proactive and goal-directed attitude, good organizational skills; - Fluency in written and spoken English and motivation to learn French. Organization The project is embedded in the unique and excellent infrastructure of the CRNL - Center for Research in Neuroscience in Lyon. Researchers working on this theme jointly organize regular discussion meetings and lectures to promote integration of research conducted within systems, behavioral, and cognitive neurosciences. Read more about what it means?to work at CRNL: https://crnl.univ-lyon1.fr/index.php/en Employment conditions Salary will be in accordance with the relevant national labor agreement and based on research experience and qualifications. The earliest start date for this position is May 10 (later start possible upon agreement). Application We request applicants to send the following documents: 1) A cover letter briefly describing how their skills and experience meet the profile as set out in the person specification (max 1 page) 2) A research statement explaining their research interests in relation to Project REWIRING or to the PI’s publications (max 2 pages) 3) A recent CV and publication list 4) Two writing samples of the applicant's most significant work (published or unpublished manuscripts). 5) Contact information of three professional references. Information All additional information about the vacancy can be obtained from Dezso Nemeth, Principal Investigator, via nemeth at nemethlab.com. Submit your application to the following email address: hr at nemethlab.com APPLICATION INFORMATION Contact: hr at nemethlab.com Link: https://www.higheredjobs.com/faculty/details.cfm?JobCode=176890317 -------------- next part -------------- An HTML attachment was scrubbed... URL: From jorn at artinis.com Thu Jan 31 17:08:18 2019 From: jorn at artinis.com (=?iso-8859-2?Q?J=F6rn_M._Horschig?=) Date: Thu, 31 Jan 2019 17:08:18 +0100 Subject: [FieldTrip] ESR / PhD-student positions available Message-ID: <012601d4b97f$2f0d6860$8d283920$@artinis.com> Dear list, We from Artinis have exciting research projects, in which we have the opportunity for graduates to work with us as early stage researchers on the forefront of fNIRS development. We have three outstanding positions, two on algorithm development and one on hardware development. Envisioned starting date for all positions is this summer. More information on these positions can be found here: ESR position on extraction of physiological signals in clinical settings (in collaboration with University Centre Utrecht, Netherlands): https://euraxess.ec.europa.eu/jobs/375619 https://www.artinis.com/jobs-early-stage-researcher-doctoral-student-inf ans ESR position on machine learning on character traits and neuroeconomics (in collaboration with Donders Institute Nijmegen, Netherlands): https://euraxess.ec.europa.eu/jobs/364609 (still in review, page will be up soon) https://www.artinis.com/jobs-esr ESR position on fNIRS hardware development for clinical application (in collaboration with University Centre Utrecht, Netherlands): https://euraxess.ec.europa.eu/jobs/375632 https://www.artinis.com/jobs-early-stage-researcher-infans All three positions are part of different Marie-Curie Skłodowska international training networks, which means you will be embedded in a larger project, meet and collaborate with many interesting and smart people from different countries, and enjoy the benefits of both academic and industrial work life. We look forward to receiving your application and would welcome if you pass these open positions on to potentially interesting candidates. With kind regards, Jörn -- Jörn M. Horschig, PhD Software Manager & Project Leader Artinis Medical Systems | +31 481 350 980 A Einsteinweg 17 6662PW Elst The Netherlands T +31 481 350 980 I www.artinis.com The information in this e-mail is confidential and intended solely for the person to whom it is addressed. If this message is not addressed to you, please be aware that you have no authorization to read this e-mail, to copy it, to furnish it to any person other than the addressee, or to use or misuse its content in any way whatsoever. Should you have received this e-mail by mistake, please bring this to the attention of the sender, after which you are kindly requested to destroy the original message. Sign up for our NIRS newsletter Or meet us here: February 12-14, 2019 - 6th Israeli Conference on Cognition Research, Acre, Israel February 14-15, 2019 - 11th Annual Meeting of the Swiss Society of Sport Science, Freiburg, Switzerland February 20-22, 2019 - German Exercise Science and Training (GEST:19), Würzburg, Germany February 24-27, 2019 - 3rd International Brain Stimulation Conference, Vancouver, Canada March 7-9, 2019 - International Convention of Psychological Science (ICPS), Paris, France March 21-23, 2019 - Society for Research in Child Development (SRCD), Baltimore, Maryland, USA May 9-11, 2019 - Artscientific: 3rd Artinis symposium, Egmond aan Zee, The Netherlands May 28-June 1, 2019 - American College of Sports Medicine (ACSM), Orlando, Florida, USA July 3-6, 2019 - European College on Sport Science (ECSS), Prague, Czech Republic September 19-21, 2019 - Japanese Society of Physical Fitness and Sports Medicine, Tsukuba, Ibaragi, Japan -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image001.png Type: image/png Size: 9919 bytes Desc: not available URL: From J.Verhoef at donders.ru.nl Wed Jan 2 08:37:16 2019 From: J.Verhoef at donders.ru.nl (Verhoef, J.P. (Julia)) Date: Wed, 2 Jan 2019 07:37:16 +0000 Subject: [FieldTrip] Postdoctoral Position for Dutch Research Consortium 'Language in Interaction' In-Reply-To: <92b5c7b6b5594ed8a658687d1da8a272@EXPRD05.hosting.ru.nl> References: <5d1e863b01d7453e8f53ca640ca2b9f9@Umcexchp06.umcn.nl>, <92b5c7b6b5594ed8a658687d1da8a272@EXPRD05.hosting.ru.nl> Message-ID: <1546414651619.43955@donders.ru.nl> A new Postdoctoral Position is available within the Language in Interaction consortium! The Language in Interaction research consortium invites applications for a postdoctoral position. This position provides the opportunity for conducting world-class research as a member of an interdisciplinary team. The institute involved is an equal opportunity employer, committed to building a culturally diverse intellectual community. For more information and how to apply, please visit: https://www.radboudumc.nl/en/vacancies/63921-postdoctoral-position-for-dutch-research-consortium-language-in-interaction Kind regards, Julia Verhoef Secretary Language in Interaction consortium From elene.beitia at alumni.mondragon.edu Thu Jan 3 09:06:30 2019 From: elene.beitia at alumni.mondragon.edu (Elene Beitia Loinaz) Date: Thu, 3 Jan 2019 09:06:30 +0100 Subject: [FieldTrip] =?utf-8?q?=28no_subject=29?= Message-ID: Hello, My name is Elene Beitia and I am a student in Mondragon Unibertsitatea. We are working in the reconstruction of EEG in resting state with previous pre-process data. That data was pre-process using eeglab and we need to convert it to fieltrip. We know about eeglab2fieltrip function, but we are having problems using it. Can someone share information about how to use it? Thank you in advanced, Elene. -------------- next part -------------- An HTML attachment was scrubbed... URL: From julian.keil at gmail.com Thu Jan 3 09:34:14 2019 From: julian.keil at gmail.com (Julian Keil) Date: Thu, 3 Jan 2019 09:34:14 +0100 Subject: [FieldTrip] (no subject) In-Reply-To: References: Message-ID: <9079FE5E-0DD4-4957-89C5-C4659625D5EF@gmail.com> Dear Elene, could you explain what problems you are having? eeglab2fieldtrip creates the basic structure used in FT, but depending on what you want to do, you need to add some additional info to the created FT structure. Best, Julian ________________ Prof. Dr. Julian Keil Biological Psychology Olshausenstrasse 62 - R. 306 24118 Kiel, Germany +49 - 0431 - 880 - 4872 http://www.biopsych.uni-kiel.de/en > Am 03.01.2019 um 09:06 schrieb Elene Beitia Loinaz : > > Hello, > My name is Elene Beitia and I am a student in Mondragon Unibertsitatea. > We are working in the reconstruction of EEG in resting state with previous pre-process data. That data was pre-process using eeglab and we need to convert it to fieltrip. We know about eeglab2fieltrip function, but we are having problems using it. Can someone share information about how to use it? > Thank you in advanced, > Elene. > _______________________________________________ > 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 jiaxiangzhang at gmail.com Fri Jan 4 00:13:50 2019 From: jiaxiangzhang at gmail.com (Jiaxiang ZHANG) Date: Thu, 3 Jan 2019 23:13:50 +0000 Subject: [FieldTrip] Research associate and PhD studentship opportunities at Cardiff, UK Message-ID: [Apologize for cross-posting] Dear all, We are seeking applicants for one research associate position and one PhD studentships at Cardiff University Brain Research Imaging Centre (CUBRIC). These posts link to a project funded by the European Research Council (ERC). The successful candidates will work with Dr Jiaxiang Zhang and collaborators to understand the neural mechanisms of intentional decision, using multimodal brain imaging and computational modelling. We encourage applicants from different disciplines, including cognitive neuroscience, imaging neuroscience, psychology, computer science, mathematics or physics. Job specs and application details are available online (see links below). For informal enquiries about the project, please contact Dr Jiaxiang Zhang ( zhangj73 at cardiff.ac.uk) with your CV. A. 3-year postdoc position (Deadline: Jan 11, 2019) https://krb-sjobs.brassring.com/TGnewUI/Search/Home/HomeWithPreLoad?partnerid=30011&siteid=5460&PageType=searchResults&SearchType=linkquery&LinkID=6#jobDetails=1421535_5460 B. PhD studentship (Deadline: Feb 1, 2019) https://www.findaphd.com/phds/project/multimodal-understanding-of-intentional-decision-in-the-human-brain/?p105180 The successful candidates will be based at CUBRIC. CUBRIC houses a unique combination of state-of-the-art facilities and world-leading expertise, with 4 human MRI systems (2 x Siemens Prisma, 1 x Siemens Connectom, 1 x Siemens 7T), MEG, EEG, TMS, tDCS, clinical research units and testing labs. Further details of CUBRIC can be found online ( http://sites.cardiff.ac.uk/cubric). Kind regards, Jiaxiang Zhang Cardiff University Brain Research Imaging Centre (CUBRIC) School of Psychology Cardiff University Maindy Road, Cardiff, CF24 4HQ Lab: http://ccbrain.org Faculty: http://psych.cf.ac.uk/zhang Email: zhangj73 at cardiff.ac.uk Tel: +44 (0)29 2087 0471 -------------- next part -------------- An HTML attachment was scrubbed... URL: From martin.rosenfelder at uni-ulm.de Fri Jan 4 10:01:40 2019 From: martin.rosenfelder at uni-ulm.de (Martin Rosenfelder) Date: Fri, 04 Jan 2019 10:01:40 +0100 Subject: [FieldTrip] EEG data preprocessing Message-ID: <59be-5c2f2100-b-26948b40@80576441> Dear Fieldtrip community, I am analyzing time-frequency EEG data with respect to power spectra differences between an experimental and a resting condition. I am reading in the data from EGI raw files, which is then filtered and cut into trials (60 trials for each of the two conditions). The two conditions are then concatenated to one file using ft_appenddata. The output of the preprocessing is then passed to visual artifact rejection, an ICA and another visual artifact rejection. When trying to split the dataset into two conditions for multivariate analyses purposes, Fieldtrip throws an error saying that there are no event values in the data set any more. Splitting the data set into the two conditions does not seem to be possible any more. Is there a way to keep the event values during the artifact rejection so that the data set can be splitted into the conditions afterwards? Thank you very much in advance for your time and effort! I appreciate any hint regarding the issue described above. Best, Martin -- M.Sc.-Psych. Martin Rosenfelder Wissenschaftlicher Mitarbeiter Klinische und Biologische Psychologie Universität Ulm Raum 47.2.259 +49 731-50 26592 martin.rosenfelder at uni-ulm.de From julian.keil at gmail.com Fri Jan 4 10:27:42 2019 From: julian.keil at gmail.com (Julian Keil) Date: Fri, 4 Jan 2019 10:27:42 +0100 Subject: [FieldTrip] EEG data preprocessing In-Reply-To: <59be-5c2f2100-b-26948b40@80576441> References: <59be-5c2f2100-b-26948b40@80576441> Message-ID: <8013F35F-319A-4EB0-A78B-DCE144E6978F@gmail.com> Dear Martin, see here: http://www.fieldtriptoolbox.org/faq/is_it_possible_to_keep_track_of_trial-specific_information_in_my_fieldtrip_analysis_pipeline/ Best, Julian ________________ Prof. Dr. Julian Keil Biological Psychology Olshausenstrasse 62 - R. 306 24118 Kiel, Germany +49 - 0431 - 880 - 4872 http://www.biopsych.uni-kiel.de/en > Am 04.01.2019 um 10:01 schrieb Martin Rosenfelder : > > Dear Fieldtrip community, > > I am analyzing time-frequency EEG data with respect to power spectra differences between an experimental and a resting condition. > I am reading in the data from EGI raw files, which is then filtered and cut into trials (60 trials for each of the two conditions). The two conditions are then concatenated to one file using ft_appenddata. The output of the preprocessing is then passed to visual artifact rejection, an ICA and another visual artifact rejection. > When trying to split the dataset into two conditions for multivariate analyses purposes, Fieldtrip throws an error saying that there are no event values in the data set any more. Splitting the data set into the two conditions does not seem to be possible any more. > > Is there a way to keep the event values during the artifact rejection so that the data set can be splitted into the conditions afterwards? > > Thank you very much in advance for your time and effort! I appreciate any hint regarding the issue described above. > > Best, > Martin > > -- > M.Sc.-Psych. Martin Rosenfelder > Wissenschaftlicher Mitarbeiter > Klinische und Biologische Psychologie > Universität Ulm > Raum 47.2.259 > +49 731-50 26592 > martin.rosenfelder at uni-ulm.de > > > _______________________________________________ > 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 irene.varela at alumni.mondragon.edu Fri Jan 4 12:47:06 2019 From: irene.varela at alumni.mondragon.edu (Irene Varela Leniz) Date: Fri, 4 Jan 2019 12:47:06 +0100 Subject: [FieldTrip] problems using fieldtrip for source reconstruction EEG Message-ID: Hi, I am a researcher in Mondragon University working on source reconstruction of EEG data. I am new at fieldtrip and I feel a little bit lost about this software. I have some errors in a code I have developed but I do not manage to solve them. Could you please help me? I want to plot EEG data of a channel called 'A1' which is the first row in a 2D matrix variable called data, which is inside EEG structure. The code I have developed is below and I get the following error: *Error using ft_checkdata (line 525)* *This function requires 'timelock' or 'freq' data as input, see ft_datatype_timelock or ft_datatype_freq.* The code is the following: *clc; clear all; close all;* *clear variables* *restoredefaultpath; % set a clean path* *main='E:\';* *cd='E:\fieldtrip-20181217'; % change this* *addpath(cd);* *ft_defaults;* *filename = "E:\PBLdata\O200_RS1_final.set"; %cambiar aqui y poner vuestro directorio* *load(filename, '-mat'); %Create EEG struct* *location = EEG.chanlocs;* *data = EEG.data; * *cfg = [];* *cfg.xlim = [-0.2 1.0];* *cfg.ylim = [-1e-13 3e-13];* *cfg.channel = 'A1';* *datos = data(1,:);* *Ndata = numel(datos);* *for i=1:Ndata* * % check if the input data is valid for this function* * datos(i) = ft_checkdata(datos(i), 'datatype', {'timelock', 'freq'});* *end* *figure; ft_singleplotER(cfg,datos);* Thank you in advance, Irene -------------- next part -------------- An HTML attachment was scrubbed... URL: From julian.keil at gmail.com Fri Jan 4 14:08:35 2019 From: julian.keil at gmail.com (Julian Keil) Date: Fri, 4 Jan 2019 14:08:35 +0100 Subject: [FieldTrip] problems using fieldtrip for source reconstruction EEG In-Reply-To: References: Message-ID: <2F70506F-5E8C-4A34-8A4F-030FF9B78A80@gmail.com> Hi Irene, what is the reason to use the extra checkdata step? The function checks if the input data has the correct „datatype“ field. Since you probably don’t have that field, the function will throw an error. Also, I’d recommend using the eeglab2fieldtrip-function to get from EEGlab .set to a fieldtrip-like structure. Best, Julian > Am 04.01.2019 um 12:47 schrieb Irene Varela Leniz : > > Hi, > > I am a researcher in Mondragon University working on source reconstruction of EEG data. I am new at fieldtrip and I feel a little bit lost about this software. I have some errors in a code I have developed but I do not manage to solve them. Could you please help me? > > I want to plot EEG data of a channel called 'A1' which is the first row in a 2D matrix variable called data, which is inside EEG structure. The code I have developed is below and I get the following error: > > Error using ft_checkdata (line 525) > This function requires 'timelock' or 'freq' data as input, see ft_datatype_timelock or ft_datatype_freq. > > The code is the following: > clc; clear all; close all; > clear variables > restoredefaultpath; % set a clean path > main='E:\'; > cd='E:\fieldtrip-20181217'; % change this > addpath(cd); > > ft_defaults; > filename = "E:\PBLdata\O200_RS1_final.set"; %cambiar aqui y poner vuestro directorio > load(filename, '-mat'); %Create EEG struct > location = EEG.chanlocs; > data = EEG.data; > > cfg = []; > cfg.xlim = [-0.2 1.0]; > cfg.ylim = [-1e-13 3e-13]; > cfg.channel = 'A1'; > datos = data(1,:); > Ndata = numel(datos); > for i=1:Ndata > % check if the input data is valid for this function > datos(i) = ft_checkdata(datos(i), 'datatype', {'timelock', 'freq'}); > end > > figure; ft_singleplotER(cfg,datos); > > Thank you in advance, > > Irene > > _______________________________________________ > 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 nicole.landi at yale.edu Sat Jan 5 17:36:39 2019 From: nicole.landi at yale.edu (Landi, Nicole) Date: Sat, 5 Jan 2019 16:36:39 +0000 Subject: [FieldTrip] =?utf-8?q?=28no_subject=29?= Message-ID: POSTDOCTORAL FELLOWSHIP IN ELECTROPHYSIOLOGY (EEG AND ERP) The GENESIS (Genetic and Neurobehavioral Systems: Interdisciplinary Studies) lab (PI: Elena Grigorenko) at the University of Houston and Baylor College of Medicine has an opening for a postdoctoral research fellow to join ongoing projects investigating the neural basis of cognitive and linguistic development in laboratory and field settings. The successful applicant will contribute to two funded projects that utilize electrophysiological techniques (EEG, ERP) to characterize children who are at elevated genetic or environmental (e.g., early neglect and abuse) risk for developmental language/reading disorder. Applicants must have a background in research using EEG or ERP methods, including experimental design and data collection, analysis, and interpretation. Required qualifications: • PhD or equivalent in Psychology, Cognitive Science, Communication Disorders, Neuroscience, or related field • Experience with the analysis of EEG data and one or more of the following analysis packages: EEGlab/ERPlab, Brain Vision Analyzer, NetStation, or an equivalent EEG software analysis package • Experience designing and conducting EEG/ERP studies • Programming skills, including knowledge of at least one programming language and basic Unix commands • Demonstrable interest in the cognitive neuroscience of language and cognition and/or reading development • Proficiency with writing academic manuscripts, particularly those related to EEG/ERP Preferred qualifications: • Experience with advanced electrophysiology analysis techniques; e.g., independent components analysis, connectivity, source localization • Advanced knowledge and expertise in statistics, e.g. multivariate statistics, or Bayesian methods • Experience working with developmental populations (e.g., school-age children and adolescents) • Leadership, communication, and organizational skills This position is based at the University of Houston in Houston, TX, but will coordinate with research partners at multiple offsite locations, including Dr. Nicole Landi (University of Connecticut, Haskins Laboratories, Yale Child Study Center https://landi.lab.uconn.edu/), and Natalia Rakhlin (Wayne State University). Offsite coordination will involve training of research associates, designing and implementing experiments, and supervision of data collection and sharing. Interested candidates should send: 1) a CV; 2) the names of three references; and 3) a cover letter to Drs. Grigorenko (elena.grigorenko at times.uh.edu), Landi (nicole.landi at uconn.edu), or Rakhlin (natalia.rakhlin at wayne.edu). This position will remain open until filled; desired start date is on or before June 2019. Salary will be commensurate with NIH postdoctoral funding levels. -------------- next part -------------- An HTML attachment was scrubbed... URL: From nemethd at gmail.com Sat Jan 5 19:52:29 2019 From: nemethd at gmail.com (Dezso Nemeth) Date: Sat, 5 Jan 2019 19:52:29 +0100 Subject: [FieldTrip] Postdoc position in Lyon (Cognitive Neuroscience) Message-ID: Hi all, there is a very cool postdoc position in Lyon. Feel free to pass this on. https://neurojobs.sfn.org/jobs/11838210/postdoc-position-in-lyon-cognitive-or-computational-neuroscience Best, Dezso -------------------------------------- NEMETH, Dezso (PhD, DSc) Lyon Neuroscience Research Center (CRNL) Université de Lyon Brain, Memory and Language Lab: http://www.memory-and-language.com -------------- next part -------------- An HTML attachment was scrubbed... URL: From irene.varela at alumni.mondragon.edu Mon Jan 7 09:57:10 2019 From: irene.varela at alumni.mondragon.edu (Irene Varela Leniz) Date: Mon, 7 Jan 2019 09:57:10 +0100 Subject: [FieldTrip] problems using fieldtrip for source reconstruction EEG In-Reply-To: <2F70506F-5E8C-4A34-8A4F-030FF9B78A80@gmail.com> References: <2F70506F-5E8C-4A34-8A4F-030FF9B78A80@gmail.com> Message-ID: Good morning Julian, Can you help me with plotting some resting state EEG signals? I am new in Fieldtrip and I dont find clear information about this topic and I dont really know how to do plottings in Fieldtrip. I feel like the fieldtrip documentation is a little bit weak.... Thank you in advance, Best regards, Irene Varela El vie., 4 ene. 2019 a las 14:08, Julian Keil () escribió: > Hi Irene, > > what is the reason to use the extra checkdata step? > The function checks if the input data has the correct „datatype“ field. > Since you probably don’t have that field, the function will throw an error. > > Also, I’d recommend using the eeglab2fieldtrip-function to get from EEGlab > .set to a fieldtrip-like structure. > > Best, > > Julian > > > Am 04.01.2019 um 12:47 schrieb Irene Varela Leniz < > irene.varela at alumni.mondragon.edu>: > > Hi, > > I am a researcher in Mondragon University working on source reconstruction > of EEG data. I am new at fieldtrip and I feel a little bit lost about this > software. I have some errors in a code I have developed but I do not manage > to solve them. Could you please help me? > > I want to plot EEG data of a channel called 'A1' which is the first row in > a 2D matrix variable called data, which is inside EEG structure. The code I > have developed is below and I get the following error: > > *Error using ft_checkdata (line 525)* > *This function requires 'timelock' or 'freq' data as input, see > ft_datatype_timelock or ft_datatype_freq.* > > The code is the following: > *clc; clear all; close all;* > *clear variables* > *restoredefaultpath; % set a clean path* > *main='E:\';* > *cd='E:\fieldtrip-20181217'; % change this* > *addpath(cd);* > > *ft_defaults;* > *filename = "E:\PBLdata\O200_RS1_final.set"; %cambiar aqui y poner vuestro > directorio* > *load(filename, '-mat'); %Create EEG struct* > *location = EEG.chanlocs;* > *data = EEG.data; * > > *cfg = [];* > *cfg.xlim = [-0.2 1.0];* > *cfg.ylim = [-1e-13 3e-13];* > *cfg.channel = 'A1';* > *datos = data(1,:);* > *Ndata = numel(datos);* > *for i=1:Ndata* > * % check if the input data is valid for this function* > * datos(i) = ft_checkdata(datos(i), 'datatype', {'timelock', 'freq'});* > *end* > > *figure; ft_singleplotER(cfg,datos);* > > Thank you in advance, > > Irene > > _______________________________________________ > 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 julian.keil at gmail.com Mon Jan 7 10:27:48 2019 From: julian.keil at gmail.com (Julian Keil) Date: Mon, 7 Jan 2019 10:27:48 +0100 Subject: [FieldTrip] problems using fieldtrip for source reconstruction EEG In-Reply-To: References: <2F70506F-5E8C-4A34-8A4F-030FF9B78A80@gmail.com> Message-ID: Hi Irene, it helps if you describe exactly what you want to do (I don’t mean to be rude or patronizing, but check here for suggestions: https://journals.plos.org/ploscompbiol/article?id=10.1371/journal.pcbi.1002202 ). There are many ways to visualize resting state EEG signals, and you don’t need fieldtrip for all of them. E.g., if you just want to plot the timecourse of the data, you can use the matlab built-in „plot“ function (e.g. use something like "plot(data.time{1},data.trial{1})“ to plot one trial). If you want to explore your data, ft_databrowser is your friend http://www.fieldtriptoolbox.org/faq/how_can_i_use_the_databrowser/ Best, Julian ________________ Prof. Dr. Julian Keil Biological Psychology Olshausenstrasse 62 - R. 306 24118 Kiel, Germany +49 - 0431 - 880 - 4872 http://www.biopsych.uni-kiel.de/en > Am 07.01.2019 um 09:57 schrieb Irene Varela Leniz : > > Good morning Julian, > > Can you help me with plotting some resting state EEG signals? I am new in Fieldtrip and I dont find clear information about this topic and I dont really know how to do plottings in Fieldtrip. I feel like the fieldtrip documentation is a little bit weak.... > > Thank you in advance, > Best regards, > > Irene Varela > > El vie., 4 ene. 2019 a las 14:08, Julian Keil (>) escribió: > Hi Irene, > > what is the reason to use the extra checkdata step? > The function checks if the input data has the correct „datatype“ field. > Since you probably don’t have that field, the function will throw an error. > > Also, I’d recommend using the eeglab2fieldtrip-function to get from EEGlab .set to a fieldtrip-like structure. > > Best, > > Julian > > >> Am 04.01.2019 um 12:47 schrieb Irene Varela Leniz >: >> >> Hi, >> >> I am a researcher in Mondragon University working on source reconstruction of EEG data. I am new at fieldtrip and I feel a little bit lost about this software. I have some errors in a code I have developed but I do not manage to solve them. Could you please help me? >> >> I want to plot EEG data of a channel called 'A1' which is the first row in a 2D matrix variable called data, which is inside EEG structure. The code I have developed is below and I get the following error: >> >> Error using ft_checkdata (line 525) >> This function requires 'timelock' or 'freq' data as input, see ft_datatype_timelock or ft_datatype_freq. >> >> The code is the following: >> clc; clear all; close all; >> clear variables >> restoredefaultpath; % set a clean path >> main='E:\'; >> cd='E:\fieldtrip-20181217'; % change this >> addpath(cd); >> >> ft_defaults; >> filename = "E:\PBLdata\O200_RS1_final.set"; %cambiar aqui y poner vuestro directorio >> load(filename, '-mat'); %Create EEG struct >> location = EEG.chanlocs; >> data = EEG.data; >> >> cfg = []; >> cfg.xlim = [-0.2 1.0]; >> cfg.ylim = [-1e-13 3e-13]; >> cfg.channel = 'A1'; >> datos = data(1,:); >> Ndata = numel(datos); >> for i=1:Ndata >> % check if the input data is valid for this function >> datos(i) = ft_checkdata(datos(i), 'datatype', {'timelock', 'freq'}); >> end >> >> figure; ft_singleplotER(cfg,datos); >> >> Thank you in advance, >> >> Irene >> >> _______________________________________________ >> 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 dlozanosoldevilla at gmail.com Mon Jan 7 10:30:16 2019 From: dlozanosoldevilla at gmail.com (Diego Lozano-Soldevilla) Date: Mon, 7 Jan 2019 10:30:16 +0100 Subject: [FieldTrip] problems using fieldtrip for source reconstruction EEG In-Reply-To: References: <2F70506F-5E8C-4A34-8A4F-030FF9B78A80@gmail.com> Message-ID: Dear Irene, Here a link about plotting in general: http://www.fieldtriptoolbox.org/tutorial/#visualizingthe-results-of-an-analysis Here a tutorial about basic power analysis using resting state data and connectivity analysis in source space http://www.fieldtriptoolbox.org/tutorial/networkanalysis/ And here how you can help us to improve the documentation http://www.fieldtriptoolbox.org/contribute/ I hope that helps, Diego On Mon, 7 Jan 2019 at 10:18, Irene Varela Leniz < irene.varela at alumni.mondragon.edu> wrote: > Good morning Julian, > > Can you help me with plotting some resting state EEG signals? I am new in > Fieldtrip and I dont find clear information about this topic and I dont > really know how to do plottings in Fieldtrip. I feel like the fieldtrip > documentation is a little bit weak.... > > Thank you in advance, > Best regards, > > Irene Varela > > El vie., 4 ene. 2019 a las 14:08, Julian Keil () > escribió: > >> Hi Irene, >> >> what is the reason to use the extra checkdata step? >> The function checks if the input data has the correct „datatype“ field. >> Since you probably don’t have that field, the function will throw an >> error. >> >> Also, I’d recommend using the eeglab2fieldtrip-function to get from >> EEGlab .set to a fieldtrip-like structure. >> >> Best, >> >> Julian >> >> >> Am 04.01.2019 um 12:47 schrieb Irene Varela Leniz < >> irene.varela at alumni.mondragon.edu>: >> >> Hi, >> >> I am a researcher in Mondragon University working on source >> reconstruction of EEG data. I am new at fieldtrip and I feel a little bit >> lost about this software. I have some errors in a code I have developed but >> I do not manage to solve them. Could you please help me? >> >> I want to plot EEG data of a channel called 'A1' which is the first row >> in a 2D matrix variable called data, which is inside EEG structure. The >> code I have developed is below and I get the following error: >> >> *Error using ft_checkdata (line 525)* >> *This function requires 'timelock' or 'freq' data as input, see >> ft_datatype_timelock or ft_datatype_freq.* >> >> The code is the following: >> *clc; clear all; close all;* >> *clear variables* >> *restoredefaultpath; % set a clean path* >> *main='E:\';* >> *cd='E:\fieldtrip-20181217'; % change this* >> *addpath(cd);* >> >> *ft_defaults;* >> *filename = "E:\PBLdata\O200_RS1_final.set"; %cambiar aqui y poner >> vuestro directorio* >> *load(filename, '-mat'); %Create EEG struct* >> *location = EEG.chanlocs;* >> *data = EEG.data; * >> >> *cfg = [];* >> *cfg.xlim = [-0.2 1.0];* >> *cfg.ylim = [-1e-13 3e-13];* >> *cfg.channel = 'A1';* >> *datos = data(1,:);* >> *Ndata = numel(datos);* >> *for i=1:Ndata* >> * % check if the input data is valid for this function* >> * datos(i) = ft_checkdata(datos(i), 'datatype', {'timelock', 'freq'});* >> *end* >> >> *figure; ft_singleplotER(cfg,datos);* >> >> Thank you in advance, >> >> Irene >> >> _______________________________________________ >> 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 irene.varela at alumni.mondragon.edu Mon Jan 7 10:34:58 2019 From: irene.varela at alumni.mondragon.edu (Irene Varela Leniz) Date: Mon, 7 Jan 2019 10:34:58 +0100 Subject: [FieldTrip] problems using fieldtrip for source reconstruction EEG In-Reply-To: References: <2F70506F-5E8C-4A34-8A4F-030FF9B78A80@gmail.com> Message-ID: Hi Julian, I have read about them in Fieldtrip documentation but I still dont manage to do nothing. I am looking for a topographic visualization of data and I am interesed in using Fieldtrip. Moreover, whenever I try different command I get the following error: Error using ft_checkdata (line 525) This function requires 'timelock' or 'freq' data as input, see ft_datatype_timelock or ft_datatype_freq. Error in ft_singleplotER (line 133) varargin{i} = ft_checkdata(varargin{i}, 'datatype', {'timelock', 'freq'}); The data comes from eeglab using eeglab2fieldtrip function, so that we have the data stored in a struct. Thank you in advance, Irene El lun., 7 ene. 2019 a las 10:27, Julian Keil () escribió: > Hi Irene, > > it helps if you describe exactly what you want to do (I don’t mean to be > rude or patronizing, but check here for suggestions: > https://journals.plos.org/ploscompbiol/article?id=10.1371/journal.pcbi.1002202 > ). > > There are many ways to visualize resting state EEG signals, and you don’t > need fieldtrip for all of them. > E.g., if you just want to plot the timecourse of the data, you can use the > matlab built-in „plot“ function (e.g. use something like > "plot(data.time{1},data.trial{1})“ to plot one trial). If you want to > explore your data, ft_databrowser is your friend > http://www.fieldtriptoolbox.org/faq/how_can_i_use_the_databrowser/ > > Best, > > Julian > > ________________ > Prof. Dr. Julian Keil > > Biological Psychology > Olshausenstrasse 62 - R. 306 > 24118 Kiel, Germany > > +49 - 0431 - 880 - 4872 > http://www.biopsych.uni-kiel.de/en > > > Am 07.01.2019 um 09:57 schrieb Irene Varela Leniz < > irene.varela at alumni.mondragon.edu>: > > Good morning Julian, > > Can you help me with plotting some resting state EEG signals? I am new in > Fieldtrip and I dont find clear information about this topic and I dont > really know how to do plottings in Fieldtrip. I feel like the fieldtrip > documentation is a little bit weak.... > > Thank you in advance, > Best regards, > > Irene Varela > > El vie., 4 ene. 2019 a las 14:08, Julian Keil () > escribió: > >> Hi Irene, >> >> what is the reason to use the extra checkdata step? >> The function checks if the input data has the correct „datatype“ field. >> Since you probably don’t have that field, the function will throw an >> error. >> >> Also, I’d recommend using the eeglab2fieldtrip-function to get from >> EEGlab .set to a fieldtrip-like structure. >> >> Best, >> >> Julian >> >> >> Am 04.01.2019 um 12:47 schrieb Irene Varela Leniz < >> irene.varela at alumni.mondragon.edu>: >> >> Hi, >> >> I am a researcher in Mondragon University working on source >> reconstruction of EEG data. I am new at fieldtrip and I feel a little bit >> lost about this software. I have some errors in a code I have developed but >> I do not manage to solve them. Could you please help me? >> >> I want to plot EEG data of a channel called 'A1' which is the first row >> in a 2D matrix variable called data, which is inside EEG structure. The >> code I have developed is below and I get the following error: >> >> *Error using ft_checkdata (line 525)* >> *This function requires 'timelock' or 'freq' data as input, see >> ft_datatype_timelock or ft_datatype_freq.* >> >> The code is the following: >> *clc; clear all; close all;* >> *clear variables* >> *restoredefaultpath; % set a clean path* >> *main='E:\';* >> *cd='E:\fieldtrip-20181217'; % change this* >> *addpath(cd);* >> >> *ft_defaults;* >> *filename = "E:\PBLdata\O200_RS1_final.set"; %cambiar aqui y poner >> vuestro directorio* >> *load(filename, '-mat'); %Create EEG struct* >> *location = EEG.chanlocs;* >> *data = EEG.data; * >> >> *cfg = [];* >> *cfg.xlim = [-0.2 1.0];* >> *cfg.ylim = [-1e-13 3e-13];* >> *cfg.channel = 'A1';* >> *datos = data(1,:);* >> *Ndata = numel(datos);* >> *for i=1:Ndata* >> * % check if the input data is valid for this function* >> * datos(i) = ft_checkdata(datos(i), 'datatype', {'timelock', 'freq'});* >> *end* >> >> *figure; ft_singleplotER(cfg,datos);* >> >> Thank you in advance, >> >> Irene >> >> _______________________________________________ >> 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 > > > _______________________________________________ > 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 julian.keil at gmail.com Mon Jan 7 11:15:02 2019 From: julian.keil at gmail.com (Julian Keil) Date: Mon, 7 Jan 2019 11:15:02 +0100 Subject: [FieldTrip] problems using fieldtrip for source reconstruction EEG In-Reply-To: References: <2F70506F-5E8C-4A34-8A4F-030FF9B78A80@gmail.com> Message-ID: <0C15616B-7C07-44BB-9AAD-1A86EEA454AE@gmail.com> Hi Irene, ft_topoplotER requires indeed timelock data, i.e. data in which you have computed the average over trials. Given that you wrote before that you are using resting-state data, I’m not sure this is the right function you need. Can you post the content of the struct you want to plot? In any way, if you are hitting a wall in using fieldtrip, I suggest starting with one of the many tutorials to get a sense of how things work. Just diving in with your own data without knowing exactly what each function does will be rather frustrating. Best, Julian ________________ Prof. Dr. Julian Keil Biological Psychology Olshausenstrasse 62 - R. 306 24118 Kiel, Germany +49 - 0431 - 880 - 4872 http://www.biopsych.uni-kiel.de/en > Am 07.01.2019 um 10:34 schrieb Irene Varela Leniz : > > Hi Julian, > > I have read about them in Fieldtrip documentation but I still dont manage to do nothing. I am looking for a topographic visualization of data and I am interesed in using Fieldtrip. Moreover, whenever I try different command I get the following error: > > Error using ft_checkdata (line 525) > This function requires 'timelock' or 'freq' data as input, see ft_datatype_timelock or ft_datatype_freq. > Error in ft_singleplotER (line 133) > varargin{i} = ft_checkdata(varargin{i}, 'datatype', {'timelock', 'freq'}); > > The data comes from eeglab using eeglab2fieldtrip function, so that we have the data stored in a struct. > > Thank you in advance, > Irene > > El lun., 7 ene. 2019 a las 10:27, Julian Keil (>) escribió: > Hi Irene, > > it helps if you describe exactly what you want to do (I don’t mean to be rude or patronizing, but check here for suggestions: https://journals.plos.org/ploscompbiol/article?id=10.1371/journal.pcbi.1002202 ). > > There are many ways to visualize resting state EEG signals, and you don’t need fieldtrip for all of them. > E.g., if you just want to plot the timecourse of the data, you can use the matlab built-in „plot“ function (e.g. use something like "plot(data.time{1},data.trial{1})“ to plot one trial). If you want to explore your data, ft_databrowser is your friend http://www.fieldtriptoolbox.org/faq/how_can_i_use_the_databrowser/ > > Best, > > Julian > > ________________ > Prof. Dr. Julian Keil > > Biological Psychology > Olshausenstrasse 62 - R. 306 > 24118 Kiel, Germany > > +49 - 0431 - 880 - 4872 > http://www.biopsych.uni-kiel.de/en > > >> Am 07.01.2019 um 09:57 schrieb Irene Varela Leniz >: >> >> Good morning Julian, >> >> Can you help me with plotting some resting state EEG signals? I am new in Fieldtrip and I dont find clear information about this topic and I dont really know how to do plottings in Fieldtrip. I feel like the fieldtrip documentation is a little bit weak.... >> >> Thank you in advance, >> Best regards, >> >> Irene Varela >> >> El vie., 4 ene. 2019 a las 14:08, Julian Keil (>) escribió: >> Hi Irene, >> >> what is the reason to use the extra checkdata step? >> The function checks if the input data has the correct „datatype“ field. >> Since you probably don’t have that field, the function will throw an error. >> >> Also, I’d recommend using the eeglab2fieldtrip-function to get from EEGlab .set to a fieldtrip-like structure. >> >> Best, >> >> Julian >> >> >>> Am 04.01.2019 um 12:47 schrieb Irene Varela Leniz >: >>> >>> Hi, >>> >>> I am a researcher in Mondragon University working on source reconstruction of EEG data. I am new at fieldtrip and I feel a little bit lost about this software. I have some errors in a code I have developed but I do not manage to solve them. Could you please help me? >>> >>> I want to plot EEG data of a channel called 'A1' which is the first row in a 2D matrix variable called data, which is inside EEG structure. The code I have developed is below and I get the following error: >>> >>> Error using ft_checkdata (line 525) >>> This function requires 'timelock' or 'freq' data as input, see ft_datatype_timelock or ft_datatype_freq. >>> >>> The code is the following: >>> clc; clear all; close all; >>> clear variables >>> restoredefaultpath; % set a clean path >>> main='E:\'; >>> cd='E:\fieldtrip-20181217'; % change this >>> addpath(cd); >>> >>> ft_defaults; >>> filename = "E:\PBLdata\O200_RS1_final.set"; %cambiar aqui y poner vuestro directorio >>> load(filename, '-mat'); %Create EEG struct >>> location = EEG.chanlocs; >>> data = EEG.data; >>> >>> cfg = []; >>> cfg.xlim = [-0.2 1.0]; >>> cfg.ylim = [-1e-13 3e-13]; >>> cfg.channel = 'A1'; >>> datos = data(1,:); >>> Ndata = numel(datos); >>> for i=1:Ndata >>> % check if the input data is valid for this function >>> datos(i) = ft_checkdata(datos(i), 'datatype', {'timelock', 'freq'}); >>> end >>> >>> figure; ft_singleplotER(cfg,datos); >>> >>> Thank you in advance, >>> >>> Irene >>> >>> _______________________________________________ >>> 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 > > _______________________________________________ > 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 alexisperezbellido at gmail.com Mon Jan 7 11:19:50 2019 From: alexisperezbellido at gmail.com (=?UTF-8?Q?Alexis_P=C3=A9rez?=) Date: Mon, 7 Jan 2019 11:19:50 +0100 Subject: [FieldTrip] problems using fieldtrip for source reconstruction EEG In-Reply-To: References: <2F70506F-5E8C-4A34-8A4F-030FF9B78A80@gmail.com> Message-ID: Hi Irene, here you have different examples on how you can plot data in fieldtrip. http://www.fieldtriptoolbox.org/tutorial/plotting/ I recommend you to follow the tutorial by running the little snippets of code and trying to understand: 1 what are the fields that your data structure should contain in order to be plotted (e.g. if you want to plot timefrequency amplitide representations you must have a power representation). 2 how each of the cfg. arguments modify your plot (you can also use the matlab help command in each plotting function to see a description of the different plot features that you can modify). 3 what different types of data you can find and what are the different ways to plot them. Once you have understood how yo plot the data in the fieldtrip examples, then you can start to generalize and customize those functions to your own needs. In your particular example, if you want to plot the topology then you must use ft_topoplotER (and not ft_singleplotER). Remember to indicate what is your helmet sensor/electrodes layout otherwise you will get errors or incorrect representation of your data. Good luck and patience. alex On Mon, Jan 7, 2019 at 10:36 AM Irene Varela Leniz < irene.varela at alumni.mondragon.edu> wrote: > Hi Julian, > > I have read about them in Fieldtrip documentation but I still dont manage > to do nothing. I am looking for a topographic visualization of data and I > am interesed in using Fieldtrip. Moreover, whenever I try different command > I get the following error: > > Error using ft_checkdata (line 525) > This function requires 'timelock' or 'freq' data as input, see > ft_datatype_timelock or ft_datatype_freq. > Error in ft_singleplotER (line 133) > varargin{i} = ft_checkdata(varargin{i}, 'datatype', {'timelock', > 'freq'}); > > The data comes from eeglab using eeglab2fieldtrip function, so that we > have the data stored in a struct. > > Thank you in advance, > Irene > > El lun., 7 ene. 2019 a las 10:27, Julian Keil () > escribió: > >> Hi Irene, >> >> it helps if you describe exactly what you want to do (I don’t mean to be >> rude or patronizing, but check here for suggestions: >> https://journals.plos.org/ploscompbiol/article?id=10.1371/journal.pcbi.1002202 >> ). >> >> There are many ways to visualize resting state EEG signals, and you don’t >> need fieldtrip for all of them. >> E.g., if you just want to plot the timecourse of the data, you can use >> the matlab built-in „plot“ function (e.g. use something like >> "plot(data.time{1},data.trial{1})“ to plot one trial). If you want to >> explore your data, ft_databrowser is your friend >> http://www.fieldtriptoolbox.org/faq/how_can_i_use_the_databrowser/ >> >> Best, >> >> Julian >> >> ________________ >> Prof. Dr. Julian Keil >> >> Biological Psychology >> Olshausenstrasse 62 - R. 306 >> 24118 Kiel, Germany >> >> +49 - 0431 - 880 - 4872 >> http://www.biopsych.uni-kiel.de/en >> >> >> Am 07.01.2019 um 09:57 schrieb Irene Varela Leniz < >> irene.varela at alumni.mondragon.edu>: >> >> Good morning Julian, >> >> Can you help me with plotting some resting state EEG signals? I am new in >> Fieldtrip and I dont find clear information about this topic and I dont >> really know how to do plottings in Fieldtrip. I feel like the fieldtrip >> documentation is a little bit weak.... >> >> Thank you in advance, >> Best regards, >> >> Irene Varela >> >> El vie., 4 ene. 2019 a las 14:08, Julian Keil () >> escribió: >> >>> Hi Irene, >>> >>> what is the reason to use the extra checkdata step? >>> The function checks if the input data has the correct „datatype“ field. >>> Since you probably don’t have that field, the function will throw an >>> error. >>> >>> Also, I’d recommend using the eeglab2fieldtrip-function to get from >>> EEGlab .set to a fieldtrip-like structure. >>> >>> Best, >>> >>> Julian >>> >>> >>> Am 04.01.2019 um 12:47 schrieb Irene Varela Leniz < >>> irene.varela at alumni.mondragon.edu>: >>> >>> Hi, >>> >>> I am a researcher in Mondragon University working on source >>> reconstruction of EEG data. I am new at fieldtrip and I feel a little bit >>> lost about this software. I have some errors in a code I have developed but >>> I do not manage to solve them. Could you please help me? >>> >>> I want to plot EEG data of a channel called 'A1' which is the first row >>> in a 2D matrix variable called data, which is inside EEG structure. The >>> code I have developed is below and I get the following error: >>> >>> *Error using ft_checkdata (line 525)* >>> *This function requires 'timelock' or 'freq' data as input, see >>> ft_datatype_timelock or ft_datatype_freq.* >>> >>> The code is the following: >>> *clc; clear all; close all;* >>> *clear variables* >>> *restoredefaultpath; % set a clean path* >>> *main='E:\';* >>> *cd='E:\fieldtrip-20181217'; % change this* >>> *addpath(cd);* >>> >>> *ft_defaults;* >>> *filename = "E:\PBLdata\O200_RS1_final.set"; %cambiar aqui y poner >>> vuestro directorio* >>> *load(filename, '-mat'); %Create EEG struct* >>> *location = EEG.chanlocs;* >>> *data = EEG.data; * >>> >>> *cfg = [];* >>> *cfg.xlim = [-0.2 1.0];* >>> *cfg.ylim = [-1e-13 3e-13];* >>> *cfg.channel = 'A1';* >>> *datos = data(1,:);* >>> *Ndata = numel(datos);* >>> *for i=1:Ndata* >>> * % check if the input data is valid for this function* >>> * datos(i) = ft_checkdata(datos(i), 'datatype', {'timelock', 'freq'});* >>> *end* >>> >>> *figure; ft_singleplotER(cfg,datos);* >>> >>> Thank you in advance, >>> >>> Irene >>> >>> _______________________________________________ >>> 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 >> >> >> _______________________________________________ >> 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 > -- Alexis Pérez-Bellido, PhD Donders Institute for Brain, Cognition and Behavior, Nijmegen, Netherlands Prediction & Attention group web: https://www.predictivebrainlab.com/ gmail: alexisperezbellido at gmail.com skype: alexisperezbellido -------------- next part -------------- An HTML attachment was scrubbed... URL: From irene.varela at alumni.mondragon.edu Mon Jan 7 11:25:06 2019 From: irene.varela at alumni.mondragon.edu (Irene Varela Leniz) Date: Mon, 7 Jan 2019 11:25:06 +0100 Subject: [FieldTrip] problems using fieldtrip for source reconstruction EEG In-Reply-To: <0C15616B-7C07-44BB-9AAD-1A86EEA454AE@gmail.com> References: <2F70506F-5E8C-4A34-8A4F-030FF9B78A80@gmail.com> <0C15616B-7C07-44BB-9AAD-1A86EEA454AE@gmail.com> Message-ID: Hi Julian, So I think there is a missunderstanding. We have a EEG structure, which has been imported from EEGLAB using eeglab2fieldtrip, and that structures contains all the data about trials, elecs... But what we want is to plot data without calculating any average, but a topographic map per channel... Thats why we do not manage to do it with the information we have... Thank you in advance, Irene El lun., 7 ene. 2019 a las 11:15, Julian Keil () escribió: > Hi Irene, > > ft_topoplotER requires indeed timelock data, i.e. data in which you have > computed the average over trials. Given that you wrote before that you are > using resting-state data, I’m not sure this is the right function you need. > > Can you post the content of the struct you want to plot? > > In any way, if you are hitting a wall in using fieldtrip, I suggest > starting with one of the many tutorials to get a sense of how things work. > Just diving in with your own data without knowing exactly what each > function does will be rather frustrating. > > Best, > > Julian > > ________________ > Prof. Dr. Julian Keil > > Biological Psychology > Olshausenstrasse 62 - R. 306 > 24118 Kiel, Germany > > +49 - 0431 - 880 - 4872 > http://www.biopsych.uni-kiel.de/en > > > Am 07.01.2019 um 10:34 schrieb Irene Varela Leniz < > irene.varela at alumni.mondragon.edu>: > > Hi Julian, > > I have read about them in Fieldtrip documentation but I still dont manage > to do nothing. I am looking for a topographic visualization of data and I > am interesed in using Fieldtrip. Moreover, whenever I try different command > I get the following error: > > Error using ft_checkdata (line 525) > This function requires 'timelock' or 'freq' data as input, see > ft_datatype_timelock or ft_datatype_freq. > Error in ft_singleplotER (line 133) > varargin{i} = ft_checkdata(varargin{i}, 'datatype', {'timelock', > 'freq'}); > > The data comes from eeglab using eeglab2fieldtrip function, so that we > have the data stored in a struct. > > Thank you in advance, > Irene > > El lun., 7 ene. 2019 a las 10:27, Julian Keil () > escribió: > >> Hi Irene, >> >> it helps if you describe exactly what you want to do (I don’t mean to be >> rude or patronizing, but check here for suggestions: >> https://journals.plos.org/ploscompbiol/article?id=10.1371/journal.pcbi.1002202 >> ). >> >> There are many ways to visualize resting state EEG signals, and you don’t >> need fieldtrip for all of them. >> E.g., if you just want to plot the timecourse of the data, you can use >> the matlab built-in „plot“ function (e.g. use something like >> "plot(data.time{1},data.trial{1})“ to plot one trial). If you want to >> explore your data, ft_databrowser is your friend >> http://www.fieldtriptoolbox.org/faq/how_can_i_use_the_databrowser/ >> >> Best, >> >> Julian >> >> ________________ >> Prof. Dr. Julian Keil >> >> Biological Psychology >> Olshausenstrasse 62 - R. 306 >> 24118 Kiel, Germany >> >> +49 - 0431 - 880 - 4872 >> http://www.biopsych.uni-kiel.de/en >> >> >> Am 07.01.2019 um 09:57 schrieb Irene Varela Leniz < >> irene.varela at alumni.mondragon.edu>: >> >> Good morning Julian, >> >> Can you help me with plotting some resting state EEG signals? I am new in >> Fieldtrip and I dont find clear information about this topic and I dont >> really know how to do plottings in Fieldtrip. I feel like the fieldtrip >> documentation is a little bit weak.... >> >> Thank you in advance, >> Best regards, >> >> Irene Varela >> >> El vie., 4 ene. 2019 a las 14:08, Julian Keil () >> escribió: >> >>> Hi Irene, >>> >>> what is the reason to use the extra checkdata step? >>> The function checks if the input data has the correct „datatype“ field. >>> Since you probably don’t have that field, the function will throw an >>> error. >>> >>> Also, I’d recommend using the eeglab2fieldtrip-function to get from >>> EEGlab .set to a fieldtrip-like structure. >>> >>> Best, >>> >>> Julian >>> >>> >>> Am 04.01.2019 um 12:47 schrieb Irene Varela Leniz < >>> irene.varela at alumni.mondragon.edu>: >>> >>> Hi, >>> >>> I am a researcher in Mondragon University working on source >>> reconstruction of EEG data. I am new at fieldtrip and I feel a little bit >>> lost about this software. I have some errors in a code I have developed but >>> I do not manage to solve them. Could you please help me? >>> >>> I want to plot EEG data of a channel called 'A1' which is the first row >>> in a 2D matrix variable called data, which is inside EEG structure. The >>> code I have developed is below and I get the following error: >>> >>> *Error using ft_checkdata (line 525)* >>> *This function requires 'timelock' or 'freq' data as input, see >>> ft_datatype_timelock or ft_datatype_freq.* >>> >>> The code is the following: >>> *clc; clear all; close all;* >>> *clear variables* >>> *restoredefaultpath; % set a clean path* >>> *main='E:\';* >>> *cd='E:\fieldtrip-20181217'; % change this* >>> *addpath(cd);* >>> >>> *ft_defaults;* >>> *filename = "E:\PBLdata\O200_RS1_final.set"; %cambiar aqui y poner >>> vuestro directorio* >>> *load(filename, '-mat'); %Create EEG struct* >>> *location = EEG.chanlocs;* >>> *data = EEG.data; * >>> >>> *cfg = [];* >>> *cfg.xlim = [-0.2 1.0];* >>> *cfg.ylim = [-1e-13 3e-13];* >>> *cfg.channel = 'A1';* >>> *datos = data(1,:);* >>> *Ndata = numel(datos);* >>> *for i=1:Ndata* >>> * % check if the input data is valid for this function* >>> * datos(i) = ft_checkdata(datos(i), 'datatype', {'timelock', 'freq'});* >>> *end* >>> >>> *figure; ft_singleplotER(cfg,datos);* >>> >>> Thank you in advance, >>> >>> Irene >>> >>> _______________________________________________ >>> 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 >> >> >> _______________________________________________ >> 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 irene.varela at alumni.mondragon.edu Mon Jan 7 11:30:16 2019 From: irene.varela at alumni.mondragon.edu (Irene Varela Leniz) Date: Mon, 7 Jan 2019 11:30:16 +0100 Subject: [FieldTrip] problems using fieldtrip for source reconstruction EEG In-Reply-To: References: <2F70506F-5E8C-4A34-8A4F-030FF9B78A80@gmail.com> Message-ID: Hello Alex, I have tried the tutorial you mention, but as I stated above, I get error related with the definition of the structure (This function requires 'timelock' or 'freq' data as input, see ft_datatype_timelock or ft_datatype_freq.). We dont really know how to obtain this from data. Do we have to add something more to obtain timelock and freq? Example: EEG=load(filename); data=EEG.data; cfg = []; cfg.xlim = [-0.2 1.0]; cfg.ylim = [-1e-13 3e-13]; cfg.channel = 'A1'; figure; ft_singleplotER(cfg,data); Thank you in advance, Irene El lun., 7 ene. 2019 a las 11:20, Alexis Pérez (< alexisperezbellido at gmail.com>) escribió: > Hi Irene, > > here you have different examples on how you can plot data in fieldtrip. > http://www.fieldtriptoolbox.org/tutorial/plotting/ > > I recommend you to follow the tutorial by running the little snippets of > code and trying to understand: > 1 what are the fields that your data structure should contain in order to > be plotted (e.g. if you want to plot timefrequency amplitide > representations you must have a power representation). > 2 how each of the cfg. arguments modify your plot (you can also use the > matlab help command in each plotting function to see a description of the > different plot features that you can modify). > 3 what different types of data you can find and what are the different > ways to plot them. > > Once you have understood how yo plot the data in the fieldtrip examples, > then you can start to generalize and customize those functions to your own > needs. > > In your particular example, if you want to plot the topology then you must > use ft_topoplotER (and not ft_singleplotER). Remember to indicate what is > your helmet sensor/electrodes layout otherwise you will get errors or > incorrect representation of your data. > > Good luck and patience. > > alex > > On Mon, Jan 7, 2019 at 10:36 AM Irene Varela Leniz < > irene.varela at alumni.mondragon.edu> wrote: > >> Hi Julian, >> >> I have read about them in Fieldtrip documentation but I still dont manage >> to do nothing. I am looking for a topographic visualization of data and I >> am interesed in using Fieldtrip. Moreover, whenever I try different command >> I get the following error: >> >> Error using ft_checkdata (line 525) >> This function requires 'timelock' or 'freq' data as input, see >> ft_datatype_timelock or ft_datatype_freq. >> Error in ft_singleplotER (line 133) >> varargin{i} = ft_checkdata(varargin{i}, 'datatype', {'timelock', >> 'freq'}); >> >> The data comes from eeglab using eeglab2fieldtrip function, so that we >> have the data stored in a struct. >> >> Thank you in advance, >> Irene >> >> El lun., 7 ene. 2019 a las 10:27, Julian Keil () >> escribió: >> >>> Hi Irene, >>> >>> it helps if you describe exactly what you want to do (I don’t mean to be >>> rude or patronizing, but check here for suggestions: >>> https://journals.plos.org/ploscompbiol/article?id=10.1371/journal.pcbi.1002202 >>> ). >>> >>> There are many ways to visualize resting state EEG signals, and you >>> don’t need fieldtrip for all of them. >>> E.g., if you just want to plot the timecourse of the data, you can use >>> the matlab built-in „plot“ function (e.g. use something like >>> "plot(data.time{1},data.trial{1})“ to plot one trial). If you want to >>> explore your data, ft_databrowser is your friend >>> http://www.fieldtriptoolbox.org/faq/how_can_i_use_the_databrowser/ >>> >>> Best, >>> >>> Julian >>> >>> ________________ >>> Prof. Dr. Julian Keil >>> >>> Biological Psychology >>> Olshausenstrasse 62 - R. 306 >>> 24118 Kiel, Germany >>> >>> +49 - 0431 - 880 - 4872 >>> http://www.biopsych.uni-kiel.de/en >>> >>> >>> Am 07.01.2019 um 09:57 schrieb Irene Varela Leniz < >>> irene.varela at alumni.mondragon.edu>: >>> >>> Good morning Julian, >>> >>> Can you help me with plotting some resting state EEG signals? I am new >>> in Fieldtrip and I dont find clear information about this topic and I dont >>> really know how to do plottings in Fieldtrip. I feel like the fieldtrip >>> documentation is a little bit weak.... >>> >>> Thank you in advance, >>> Best regards, >>> >>> Irene Varela >>> >>> El vie., 4 ene. 2019 a las 14:08, Julian Keil () >>> escribió: >>> >>>> Hi Irene, >>>> >>>> what is the reason to use the extra checkdata step? >>>> The function checks if the input data has the correct „datatype“ field. >>>> Since you probably don’t have that field, the function will throw an >>>> error. >>>> >>>> Also, I’d recommend using the eeglab2fieldtrip-function to get from >>>> EEGlab .set to a fieldtrip-like structure. >>>> >>>> Best, >>>> >>>> Julian >>>> >>>> >>>> Am 04.01.2019 um 12:47 schrieb Irene Varela Leniz < >>>> irene.varela at alumni.mondragon.edu>: >>>> >>>> Hi, >>>> >>>> I am a researcher in Mondragon University working on source >>>> reconstruction of EEG data. I am new at fieldtrip and I feel a little bit >>>> lost about this software. I have some errors in a code I have developed but >>>> I do not manage to solve them. Could you please help me? >>>> >>>> I want to plot EEG data of a channel called 'A1' which is the first row >>>> in a 2D matrix variable called data, which is inside EEG structure. The >>>> code I have developed is below and I get the following error: >>>> >>>> *Error using ft_checkdata (line 525)* >>>> *This function requires 'timelock' or 'freq' data as input, see >>>> ft_datatype_timelock or ft_datatype_freq.* >>>> >>>> The code is the following: >>>> *clc; clear all; close all;* >>>> *clear variables* >>>> *restoredefaultpath; % set a clean path* >>>> *main='E:\';* >>>> *cd='E:\fieldtrip-20181217'; % change this* >>>> *addpath(cd);* >>>> >>>> *ft_defaults;* >>>> *filename = "E:\PBLdata\O200_RS1_final.set"; %cambiar aqui y poner >>>> vuestro directorio* >>>> *load(filename, '-mat'); %Create EEG struct* >>>> *location = EEG.chanlocs;* >>>> *data = EEG.data; * >>>> >>>> *cfg = [];* >>>> *cfg.xlim = [-0.2 1.0];* >>>> *cfg.ylim = [-1e-13 3e-13];* >>>> *cfg.channel = 'A1';* >>>> *datos = data(1,:);* >>>> *Ndata = numel(datos);* >>>> *for i=1:Ndata* >>>> * % check if the input data is valid for this function* >>>> * datos(i) = ft_checkdata(datos(i), 'datatype', {'timelock', 'freq'});* >>>> *end* >>>> >>>> *figure; ft_singleplotER(cfg,datos);* >>>> >>>> Thank you in advance, >>>> >>>> Irene >>>> >>>> _______________________________________________ >>>> 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 >>> >>> >>> _______________________________________________ >>> 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 >> > > > -- > Alexis Pérez-Bellido, PhD > Donders Institute for Brain, Cognition and Behavior, Nijmegen, Netherlands > Prediction & Attention group > web: https://www.predictivebrainlab.com/ > gmail: alexisperezbellido at gmail.com > skype: alexisperezbellido > > > _______________________________________________ > 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 alexisperezbellido at gmail.com Mon Jan 7 12:01:32 2019 From: alexisperezbellido at gmail.com (=?UTF-8?Q?Alexis_P=C3=A9rez?=) Date: Mon, 7 Jan 2019 12:01:32 +0100 Subject: [FieldTrip] problems using fieldtrip for source reconstruction EEG In-Reply-To: References: <2F70506F-5E8C-4A34-8A4F-030FF9B78A80@gmail.com> Message-ID: Hi, On Mon, Jan 7, 2019 at 11:30 AM Irene Varela Leniz < irene.varela at alumni.mondragon.edu> wrote: > Hello Alex, > > I have tried the tutorial you mention, but as I stated above, I get error > related with the definition of the structure (This function requires > 'timelock' or 'freq' data as input, see ft_datatype_timelock or > ft_datatype_freq.). We dont really know how to obtain this from data. Do > we have to add something more to obtain timelock and freq? > What I was suggesting is, first as a learning practice, you can run the different fieldtrip examples (on fieldtrip example data) just to understand how the plotting functions work. Because these examples must work, you can play around with the different parameters in order to understand how the data should be organized and what manipulations you can apply to your plots. Second, once that you feel confident in plotting the fieldtrip example data (for instance, make sure that you understand what each of the fields in your data structure variable contain), you can try to find out what is the problem when you try to plot your own dataset. Example: > > EEG=load(filename); > data=EEG.data; > cfg = []; > cfg.xlim = [-0.2 1.0]; > cfg.ylim = [-1e-13 3e-13]; > cfg.channel = 'A1'; > figure; ft_singleplotER(cfg,data); > > > Thank you in advance, > Irene > > Probably you can share with us what is the content of your data struct variable. Otherwise it is difficult to tell where the problem might be. > > > > El lun., 7 ene. 2019 a las 11:20, Alexis Pérez (< > alexisperezbellido at gmail.com>) escribió: > >> Hi Irene, >> >> here you have different examples on how you can plot data in fieldtrip. >> http://www.fieldtriptoolbox.org/tutorial/plotting/ >> >> I recommend you to follow the tutorial by running the little snippets of >> code and trying to understand: >> 1 what are the fields that your data structure should contain in order to >> be plotted (e.g. if you want to plot timefrequency amplitide >> representations you must have a power representation). >> 2 how each of the cfg. arguments modify your plot (you can also use the >> matlab help command in each plotting function to see a description of the >> different plot features that you can modify). >> 3 what different types of data you can find and what are the different >> ways to plot them. >> >> Once you have understood how yo plot the data in the fieldtrip examples, >> then you can start to generalize and customize those functions to your own >> needs. >> >> In your particular example, if you want to plot the topology then you >> must use ft_topoplotER (and not ft_singleplotER). Remember to indicate >> what is your helmet sensor/electrodes layout otherwise you will get errors >> or incorrect representation of your data. >> >> Good luck and patience. >> >> alex >> >> On Mon, Jan 7, 2019 at 10:36 AM Irene Varela Leniz < >> irene.varela at alumni.mondragon.edu> wrote: >> >>> Hi Julian, >>> >>> I have read about them in Fieldtrip documentation but I still dont >>> manage to do nothing. I am looking for a topographic visualization of data >>> and I am interesed in using Fieldtrip. Moreover, whenever I try different >>> command I get the following error: >>> >>> Error using ft_checkdata (line 525) >>> This function requires 'timelock' or 'freq' data as input, see >>> ft_datatype_timelock or ft_datatype_freq. >>> Error in ft_singleplotER (line 133) >>> varargin{i} = ft_checkdata(varargin{i}, 'datatype', {'timelock', >>> 'freq'}); >>> >>> The data comes from eeglab using eeglab2fieldtrip function, so that we >>> have the data stored in a struct. >>> >>> Thank you in advance, >>> Irene >>> >>> El lun., 7 ene. 2019 a las 10:27, Julian Keil () >>> escribió: >>> >>>> Hi Irene, >>>> >>>> it helps if you describe exactly what you want to do (I don’t mean to >>>> be rude or patronizing, but check here for suggestions: >>>> https://journals.plos.org/ploscompbiol/article?id=10.1371/journal.pcbi.1002202 >>>> ). >>>> >>>> There are many ways to visualize resting state EEG signals, and you >>>> don’t need fieldtrip for all of them. >>>> E.g., if you just want to plot the timecourse of the data, you can use >>>> the matlab built-in „plot“ function (e.g. use something like >>>> "plot(data.time{1},data.trial{1})“ to plot one trial). If you want to >>>> explore your data, ft_databrowser is your friend >>>> http://www.fieldtriptoolbox.org/faq/how_can_i_use_the_databrowser/ >>>> >>>> Best, >>>> >>>> Julian >>>> >>>> ________________ >>>> Prof. Dr. Julian Keil >>>> >>>> Biological Psychology >>>> Olshausenstrasse 62 - R. 306 >>>> 24118 Kiel, Germany >>>> >>>> +49 - 0431 - 880 - 4872 >>>> http://www.biopsych.uni-kiel.de/en >>>> >>>> >>>> Am 07.01.2019 um 09:57 schrieb Irene Varela Leniz < >>>> irene.varela at alumni.mondragon.edu>: >>>> >>>> Good morning Julian, >>>> >>>> Can you help me with plotting some resting state EEG signals? I am new >>>> in Fieldtrip and I dont find clear information about this topic and I dont >>>> really know how to do plottings in Fieldtrip. I feel like the fieldtrip >>>> documentation is a little bit weak.... >>>> >>>> Thank you in advance, >>>> Best regards, >>>> >>>> Irene Varela >>>> >>>> El vie., 4 ene. 2019 a las 14:08, Julian Keil () >>>> escribió: >>>> >>>>> Hi Irene, >>>>> >>>>> what is the reason to use the extra checkdata step? >>>>> The function checks if the input data has the correct „datatype“ field. >>>>> Since you probably don’t have that field, the function will throw an >>>>> error. >>>>> >>>>> Also, I’d recommend using the eeglab2fieldtrip-function to get from >>>>> EEGlab .set to a fieldtrip-like structure. >>>>> >>>>> Best, >>>>> >>>>> Julian >>>>> >>>>> >>>>> Am 04.01.2019 um 12:47 schrieb Irene Varela Leniz < >>>>> irene.varela at alumni.mondragon.edu>: >>>>> >>>>> Hi, >>>>> >>>>> I am a researcher in Mondragon University working on source >>>>> reconstruction of EEG data. I am new at fieldtrip and I feel a little bit >>>>> lost about this software. I have some errors in a code I have developed but >>>>> I do not manage to solve them. Could you please help me? >>>>> >>>>> I want to plot EEG data of a channel called 'A1' which is the first >>>>> row in a 2D matrix variable called data, which is inside EEG structure. The >>>>> code I have developed is below and I get the following error: >>>>> >>>>> *Error using ft_checkdata (line 525)* >>>>> *This function requires 'timelock' or 'freq' data as input, see >>>>> ft_datatype_timelock or ft_datatype_freq.* >>>>> >>>>> The code is the following: >>>>> *clc; clear all; close all;* >>>>> *clear variables* >>>>> *restoredefaultpath; % set a clean path* >>>>> *main='E:\';* >>>>> *cd='E:\fieldtrip-20181217'; % change this* >>>>> *addpath(cd);* >>>>> >>>>> *ft_defaults;* >>>>> *filename = "E:\PBLdata\O200_RS1_final.set"; %cambiar aqui y poner >>>>> vuestro directorio* >>>>> *load(filename, '-mat'); %Create EEG struct* >>>>> *location = EEG.chanlocs;* >>>>> *data = EEG.data; * >>>>> >>>>> *cfg = [];* >>>>> *cfg.xlim = [-0.2 1.0];* >>>>> *cfg.ylim = [-1e-13 3e-13];* >>>>> *cfg.channel = 'A1';* >>>>> *datos = data(1,:);* >>>>> *Ndata = numel(datos);* >>>>> *for i=1:Ndata* >>>>> * % check if the input data is valid for this function* >>>>> * datos(i) = ft_checkdata(datos(i), 'datatype', {'timelock', >>>>> 'freq'});* >>>>> *end* >>>>> >>>>> *figure; ft_singleplotER(cfg,datos);* >>>>> >>>>> Thank you in advance, >>>>> >>>>> Irene >>>>> >>>>> _______________________________________________ >>>>> 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 >>>> >>>> >>>> _______________________________________________ >>>> 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 >>> >> >> >> -- >> Alexis Pérez-Bellido, PhD >> Donders Institute for Brain, Cognition and Behavior, Nijmegen, Netherlands >> Prediction & Attention group >> web: https://www.predictivebrainlab.com/ >> gmail: alexisperezbellido at gmail.com >> skype: alexisperezbellido >> >> >> _______________________________________________ >> 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 > -- Alexis Pérez-Bellido, PhD Donders Institute for Brain, Cognition and Behavior, Nijmegen, Netherlands Prediction & Attention group web: https://www.predictivebrainlab.com/ gmail: alexisperezbellido at gmail.com skype: alexisperezbellido -------------- next part -------------- An HTML attachment was scrubbed... URL: From elene.beitia at alumni.mondragon.edu Mon Jan 7 12:09:14 2019 From: elene.beitia at alumni.mondragon.edu (Elene Beitia Loinaz) Date: Mon, 7 Jan 2019 12:09:14 +0100 Subject: [FieldTrip] (no subject) In-Reply-To: <9079FE5E-0DD4-4957-89C5-C4659625D5EF@gmail.com> References: <9079FE5E-0DD4-4957-89C5-C4659625D5EF@gmail.com> Message-ID: Thank you Julian, We already solve the problem. Best, Elene. Hau idatzi du Julian Keil (julian.keil at gmail.com) erabiltzaileak (2019 urt. 3, og. (09:34)): > Dear Elene, > > could you explain what problems you are having? > eeglab2fieldtrip creates the basic structure used in FT, but depending on > what you want to do, you need to add some additional info to the created FT > structure. > > Best, > > Julian > ________________ > Prof. Dr. Julian Keil > > Biological Psychology > Olshausenstrasse 62 - R. 306 > 24118 Kiel, Germany > > +49 - 0431 - 880 - 4872 > http://www.biopsych.uni-kiel.de/en > > > Am 03.01.2019 um 09:06 schrieb Elene Beitia Loinaz < > elene.beitia at alumni.mondragon.edu>: > > Hello, > > My name is Elene Beitia and I am a student in Mondragon Unibertsitatea. > > We are working in the reconstruction of EEG in resting state with previous pre-process data. That data was pre-process using eeglab and we need to convert it to fieltrip. We know about eeglab2fieltrip function, but we are having problems using it. Can someone share information about how to use it? > > Thank you in advanced, > > Elene. > > _______________________________________________ > 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 jan.schoffelen at donders.ru.nl Mon Jan 7 12:49:43 2019 From: jan.schoffelen at donders.ru.nl (Schoffelen, J.M. (Jan Mathijs)) Date: Mon, 7 Jan 2019 11:49:43 +0000 Subject: [FieldTrip] ft_artifact_zvalue In-Reply-To: References: Message-ID: <799914D1-7D63-4E7F-BA6D-35022C6BA07C@donders.ru.nl> Dear Vahab, Indeed, ft_artifact_zvalue looks for positive values for artifacts. What is the comment you are looking for? Best wishes, Jan-Mathijs > On 12 Dec 2018, at 21:34, Vahab Yousofzadeh wrote: > > Dear FT experts, > > Seems that the ft_artifact_zvalue only takes positive z-values to look > for artifacts: > https://www.dropbox.com/s/zbhslrn12j6ug7o/EOG_Artifacts.tif?dl=0 > > different than a sample figure in, > http://www.fieldtriptoolbox.org/tutorial/automatic_artifact_rejection/ > > Here are my settings: > cfg = []; > cfg.continuous = 'yes'; > cfg.artfctdef.zvalue.channel = refchan; > cfg.artfctdef.zvalue.cutoff = z_ther; > cfg.artfctdef.zvalue.trlpadding = 0; > cfg.artfctdef.zvalue.artpadding = 0.1; > cfg.artfctdef.zvalue.fltpadding = 0; > cfg.artfctdef.zvalue.bpfilter = 'yes'; > cfg.artfctdef.zvalue.bpfilttype = 'but'; > cfg.artfctdef.zvalue.bpfreq = [1 15]; > cfg.artfctdef.zvalue.bpfiltord = 4; > cfg.artfctdef.zvalue.hilbert = 'yes'; > cfg.artfctdef.zvalue.interactive = interactive; > [~, artifact_EOG] = ft_artifact_zvalue(cfg, data); > > Any comments are welcomed, > - Vahab > _______________________________________________ > fieldtrip mailing list > https://mailman.science.ru.nl/mailman/listinfo/fieldtrip > https://doi.org/10.1371/journal.pcbi.1002202 From bahman at neuromotor.org Mon Jan 7 13:10:31 2019 From: bahman at neuromotor.org (Bahman Nasseroleslami) Date: Mon, 7 Jan 2019 12:10:31 +0000 Subject: [FieldTrip] Research Assistant Position (Neurology/Neurophysiology) - Trinity College Dublin, the University of Dublin, Dublin, Ireland Message-ID: Dear all, There is a research assistant position available in Academic Unit of Neurology, Trinity College Dublin, the University of Dublin, Dublin, Ireland. ------------------------------------------------------- Post Specification (033543) Post Title: Research Assistant (Neurology/Neurophysiology) Post Status: 12 month Fixed-term Contract, Full-time Research Group / Department / School: Academic Unit of Neurology, School of Medicine, Trinity College Dublin, the University of Dublin Location: Trinity Biomedical Sciences Institute, Trinity College Dublin, the University of Dublin College Green, Dublin D02 R590, Ireland Reports to: Professor Orla Hardiman/Dr Bahman Nasseroleslami Salary: Appointment will be made on the Research Assistant (Level 1) Salary Scale at a point in line with Government Pay Policy, €22,109 to €28,904 per annum (commensurate with qualifications and experience). Appointment will be made no higher than point 10. Hours of Work: 32-40 hours per week (0.8-1.0 Full Time Equivalent) Closing Date: 12 Noon (Irish Standard Time), 15 January 2019 Please note that Garda vetting will be sought in respect of individuals who come under consideration for a post. Post Summary: Applications are invited for a motivated and self-driven individual for the position of research assistant with the Irish ALS Research Group, hosted in the Trinity Biomedical Sciences Institute (TBSI)'s Academic Unit of Neurology. The ideal candidate will have an undergraduate or master's degree in STEM (Science, Technology, Engineering, Mathematics) e.g. Neuroscience, Physiology, Biology, Biomedical Engineering, Mathematics, or a cognate area. Familiarity with and/or the ability to quickly acquire skills in electrophysiological recordings (e.g. EEG/EMG) and Clinical Neurophysiology techniques (e.g. TMS), would be highly desirable. The post is available for 1 year, initially, with the possibility of extension to 3 years given the availability of funding and performance. ------------------------------------------------------- The detailed job description file (PDF) and the application instructions can be found online at http://jobs.tcd.ie. or directly from https://drive.google.com/file/d/1mYcN5qHU717OyzWucSNpHVxNz4c1djaI/view?usp=sharing Informal enquiries can be sent to Bahman Nasseroleslami at nasserob at tcd.ie To apply, please follow the instructions in "Application Procedure" (i.e. submit the application by email to Mr Mark Heverin). It would be really appreciated if you could share this with those that may be interested. Sincerely Bahman –––––––––––– Bahman Nasseroleslami, PhD Senior Research Fellow Academic Unit of Neurology, School of Medicine Trinity College Dublin, the University of Dublin Dublin, Ireland. Room 5.43, Trinity Biomedical Sciences Institute 152-160 Pearse Street, Dublin D02 R590, Ireland. nasserob at tcd.ie www.tcd.ie/medicine/staff/nasserob/ –––––––––––– -------------- next part -------------- An HTML attachment was scrubbed... URL: From martabortoletto at yahoo.it Mon Jan 7 16:21:46 2019 From: martabortoletto at yahoo.it (Marta Bortoletto) Date: Mon, 7 Jan 2019 15:21:46 +0000 (UTC) Subject: [FieldTrip] Post-doc position available References: <1473313532.15676384.1546874506091.ref@mail.yahoo.com> Message-ID: <1473313532.15676384.1546874506091@mail.yahoo.com> Dears, We are a looking for a Post-doc candidateinterested in exploring the brain mechanisms underlying motor planning and jointactions in a project with TMS and TMS-EEG coregistration. The position is openat the IRCCS Centro San Giovanni di Dio Fatebenefratelli (Brescia, Italy), in theCognitive Neuroscience Unit led by Prof. Carlo Miniussi. The project is fundedby BIAL foundation and led by Marta Bortoletto in close collaboration with prof.Corrado Sinigaglia of the University of Study of Milan. The position will remain open until March2019 or until the appropriate candidates are identified, and is funded for 18months.   Applicants should have:  ·     A background and a PhD degree ina neuroscience-related field ·     Substantial experience in TMS-EEGor EEG research ·     Skills with analysis softwaresconcerning evoked potentials and EEG signals (e.g. EEGlab, Fieldtrip) ·     Ability to code in Matlab, Pythonor R ·     Good command of the Englishlanguage (written and oral) ·     Skills for teamwork in amultidisciplinary research group   Experience with advanced EEG signalprocessing, EEG source localization, connectivity analyses and a strongpublication record are an advantage.     Whatwe offer   ·     Gross salary: 23.000-27.000euro per annum ·     Excellent working environment ·     Opportunity to work in amotivated, skilled, inspired and supportive group ·     A chance to work in Italy – oneof the most beautiful countries in the world     Forfurther information please contact   Marta Bortoletto IRCCS Centro San Giovannidi Dio Fatebenefratelli marta.bortoletto at cognitiveneuroscience.it     Toapply, please send the following items, as ONE PDF FILE and via email to Dr. MartaBortoletto (marta.bortoletto at cognitiveneuroscience.it).   ·     A letter of intent including abrief description of your past and current research interests ·     Curriculum vitae including the listof your publication and degrees ·     Names and contact informationof 2 referees.       Aboutthe employer   The IRCCS San Giovanni di DioFatebenefratelli is operating since 120 years and has been appointed and fundedas national centre of excellence in research and care by the Italian Ministryof Health since 1996. More than 4500 patients with Alzheimer’s Dementia orassociated disorders and about 1700 patients with psychiatric diseases aretreated each year. The research division, besides the Cognitive NeuroscienceSection, includes the laboratories of Genetics, Neuropsychopharmacology,Neurobiology, Proteomic, Neuroimaging, Ethic and Epidemiology and employs aboutfifty professional researchers. The Cognitive Neuroscience Unit is providedwith several state-of-the-art devices necessary for the application of brainstimulation techniques (transcranial magnetic stimulation: TMS, rTMS, andtranscranial electrical stimulation: tDCS, tACS and tRNS) and for the recordingand the analysis of electrophysiological signals (EEG, EMG) as well asneuropsychological testing. The simultaneous co-registration ofelectroencephalography and TMS application is also available, field where wehave been pioneers in the national research. Marta Bortoletto, PhD Cognitive Neuroscience Section, IRCCS Centro San Giovanni di Dio Fatebenefratelli Via Pilastroni 4, 25125 Brescia, Italy Phone number: (+39) 0303501594 E-mail: marta.bortoletto at cognitiveneuroscience.it web: http://www.cognitiveneuroscience.it/ -------------- next part -------------- An HTML attachment was scrubbed... URL: From agnese.zazio at hotmail.it Mon Jan 7 16:41:12 2019 From: agnese.zazio at hotmail.it (Agnese Zazio) Date: Mon, 7 Jan 2019 15:41:12 +0000 Subject: [FieldTrip] Source analysis for grand averaged-TMS-evoked potentials Message-ID: Dear Fieldtrip Community, my name is Agnese Zazio and I would be grateful if you could help me with source analysis of TMS-EEG data. Specifically, I am interested in source reconstruction of TMS-evoked potentials. To this am, I used the minimum-norm estimation following the Fieldtrip tutorial for source reconstruction of MEG event-related fields (http://www.fieldtriptoolbox.org/tutorial/minimumnormestimate/). I don't have individual MRIs, thus I am using templates for the headmodel and the sourcemodel. Importantly, I am working on the the grand average at the group level. Here's the code I used. --- % create a preprocessed structure cfg =[]; cfg.channel = {'EEG'}; cfg.demean = 'yes'; cfg.baselinewindow = [-0.01 0]; data_prepr = ft_preprocessing(cfg, data); cfg =[]; cfg.covariance = 'yes'; cfg.channel ={'EEG'}; cfg.covariancewindow = [0 0.4]; data_tlck = ft_timelockanalysis (cfg, data_prepr); % forward solution [prepare leadfield] cfg = []; cfg.elec = elec; cfg.channel = {'EEG'}; cfg.headmodel = vol; % volume conduction model cfg.grid = ft_read_headshape('cortex_5124.surf.gii'); cfg.grid.pos = sourcespace.pos; cfg.grid.inside = 1:size(sourcespace.pos,1); % all source points are inside of the brain leadfield = ft_prepare_leadfield(cfg); % inverse solution (method: mne) cfg = []; cfg.method = 'mne'; %'lcmv'; cfg.elec = elec; cfg.channel = {'EEG'}; cfg.grid = leadfield; cfg.headmodel = vol; cfg.mne.prewhiten = 'yes'; cfg.mne.lambda = 3; cfg.mne.scalesourcecov = 'yes'; source_bial_mne = ft_sourceanalysis(cfg, data_tlck); %%plot bnd.pos = sourcespace.pos; bnd.tri = sourcespace.tri; m=source_bial_mne.avg.pow(:,124); % point in time I want to plot figure; ft_plot_mesh(bnd, 'vertexcolor', m); --- I have two main questions: First, is this approach correct to get sources for TMS-evoked potentials starting from the grandaverage? Second, is it possible to use the same code but applying the beamformer method (lcmv) in "ft_sourceanalysis"? I have simply replaced the cfg.method field, but the output I get does not contain information about time. Thanks in advance for your help. Best, Agnese Agnese Zazio, PhD Student Cognitive Neuroscience Section, IRCCS Saint John of God Clinical Research Centre Via Pilastroni 4, 25125 Brescia, Italy Site: http://www.cognitiveneuroscience.it -------------- next part -------------- An HTML attachment was scrubbed... URL: From elene.beitia at alumni.mondragon.edu Mon Jan 7 18:21:22 2019 From: elene.beitia at alumni.mondragon.edu (Elene Beitia Loinaz) Date: Mon, 7 Jan 2019 18:21:22 +0100 Subject: [FieldTrip] EEG RESTING STATE SOURCE RECONSTRUCTION Message-ID: Dear Fieldtrip Community, My name is Elene Beitia, I am a student from the Basque Country. I am trying to use the fieltrip toolbox to do a source reconstruction of EEG`s in Resting State. I am having troubles in doing the fourier transform. The input data that I am using is in 'ms' and the error that I get is the next one: Error using ft_checkdata (line 525) This function requires 'raw', 'raw+comp' or 'mvar' data as input, see ft_datatype_raw or ft_datatype_mvar. Error in ft_freqanalysis (line 212) data = ft_checkdata(data, 'datatype', {'raw', 'raw+comp', 'mvar'}, 'feedback', cfg.feedback, 'hassampleinfo', 'yes'); I have change the parameters to see if the problem was there but I still get the same. I add the code in this message: %%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %% FOURIER TRANSFORMS cfg = []; cfg.dataset = filename; cfg.datatype ='mvar'; cfg.continuous ='yes'; cfg.output = 'fourier'; cfg.channelcmb = 'all'; cfg.channel = 'all'; cfg.trials = 'all'; cfg.keeptrials = 'yes'; cfg.keeptapers = 'yes'; cfg.method = 'mtmfft'; cfg.taper = 'hanning'; cfg.toi = [-1 : 0.10 : 1.5]; cfg.foi = 1:40; cfg.t_ftimwin = ones(size(cfg.foi)) * 0.5; cfg.pad ='nextpow2'; cfg.feedback = 'no'; %cfg.hassampleinfo= 'yes'; data_Fourier = ft_freqanalysis(cfg); %%%%%%%%%%%%%%%%%%%%%%%%%%%%%% Hope you can give me some information in order to solve the problem, Thank you in advanced, Elene. -------------- next part -------------- An HTML attachment was scrubbed... URL: From jan.schoffelen at donders.ru.nl Tue Jan 8 09:00:48 2019 From: jan.schoffelen at donders.ru.nl (Schoffelen, J.M. (Jan Mathijs)) Date: Tue, 8 Jan 2019 08:00:48 +0000 Subject: [FieldTrip] EEG RESTING STATE SOURCE RECONSTRUCTION In-Reply-To: References: Message-ID: Hi Elena, Just like almost all high level fieldtrip functions, ft_freqanalysis requires both a ‘cfg’ variable, and a ‘data’ variable in its input. In your code you only use cfg. Best wishes, Jan-Mathijs J.M.Schoffelen, MD PhD Senior Researcher, VIDI-fellow - PI, language in interaction Telephone: +31-24-3614793 Physical location: room 00.028 Donders Centre for Cognitive Neuroimaging, Nijmegen, The Netherlands On 7 Jan 2019, at 18:21, Elene Beitia Loinaz > wrote: Dear Fieldtrip Community, My name is Elene Beitia, I am a student from the Basque Country. I am trying to use the fieltrip toolbox to do a source reconstruction of EEG`s in Resting State. I am having troubles in doing the fourier transform. The input data that I am using is in 'ms' and the error that I get is the next one: Error using ft_checkdata (line 525) This function requires 'raw', 'raw+comp' or 'mvar' data as input, see ft_datatype_raw or ft_datatype_mvar. Error in ft_freqanalysis (line 212) data = ft_checkdata(data, 'datatype', {'raw', 'raw+comp', 'mvar'}, 'feedback', cfg.feedback, 'hassampleinfo', 'yes'); I have change the parameters to see if the problem was there but I still get the same. I add the code in this message: %%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %% FOURIER TRANSFORMS cfg = []; cfg.dataset = filename; cfg.datatype ='mvar'; cfg.continuous ='yes'; cfg.output = 'fourier'; cfg.channelcmb = 'all'; cfg.channel = 'all'; cfg.trials = 'all'; cfg.keeptrials = 'yes'; cfg.keeptapers = 'yes'; cfg.method = 'mtmfft'; cfg.taper = 'hanning'; cfg.toi = [-1 : 0.10 : 1.5]; cfg.foi = 1:40; cfg.t_ftimwin = ones(size(cfg.foi)) * 0.5; cfg.pad ='nextpow2'; cfg.feedback = 'no'; %cfg.hassampleinfo= 'yes'; data_Fourier = ft_freqanalysis(cfg); %%%%%%%%%%%%%%%%%%%%%%%%%%%%%% Hope you can give me some information in order to solve the problem, Thank you in advanced, Elene. _______________________________________________ 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 elene.beitia at alumni.mondragon.edu Tue Jan 8 09:12:57 2019 From: elene.beitia at alumni.mondragon.edu (Elene Beitia Loinaz) Date: Tue, 8 Jan 2019 09:12:57 +0100 Subject: [FieldTrip] EEG RESTING STATE SOURCE RECONSTRUCTION In-Reply-To: References: Message-ID: Hi Jan, Thank you for your answer. It has been really helpful. Elene. Hau idatzi du Schoffelen, J.M. (Jan Mathijs) (jan.schoffelen at donders.ru.nl) erabiltzaileak (2019 urt. 8, ar. (09:00)): > Hi Elena, > > Just like almost all high level fieldtrip functions, ft_freqanalysis > requires both a ‘cfg’ variable, and a ‘data’ variable in its input. In your > code you only use cfg. > > Best wishes, > Jan-Mathijs > > > J.M.Schoffelen, MD PhD > Senior Researcher, VIDI-fellow - PI, language in interaction > Telephone: +31-24-3614793 > Physical location: room 00.028 > Donders Centre for Cognitive Neuroimaging, Nijmegen, The Netherlands > > > > On 7 Jan 2019, at 18:21, Elene Beitia Loinaz < > elene.beitia at alumni.mondragon.edu> wrote: > > Dear Fieldtrip Community, > > My name is Elene Beitia, I am a student from the Basque Country. I am > trying to use the fieltrip toolbox to do a source reconstruction of EEG`s > in Resting State. > > I am having troubles in doing the fourier transform. The input data that > I am using is in 'ms' and the error that I get is the next one: > > Error using ft_checkdata (line 525) > This function requires 'raw', 'raw+comp' or 'mvar' data as input, see > ft_datatype_raw or ft_datatype_mvar. > > Error in ft_freqanalysis (line 212) > data = ft_checkdata(data, 'datatype', {'raw', 'raw+comp', 'mvar'}, > 'feedback', cfg.feedback, 'hassampleinfo', 'yes'); > > I have change the parameters to see if the problem was there but I still > get the same. > > I add the code in this message: > > %%%%%%%%%%%%%%%%%%%%%%%%%%%%%% > > %% FOURIER TRANSFORMS > > cfg = []; > cfg.dataset = filename; > cfg.datatype ='mvar'; > cfg.continuous ='yes'; > cfg.output = 'fourier'; > cfg.channelcmb = 'all'; > cfg.channel = 'all'; > cfg.trials = 'all'; > cfg.keeptrials = 'yes'; > cfg.keeptapers = 'yes'; > cfg.method = 'mtmfft'; > cfg.taper = 'hanning'; > cfg.toi = [-1 : 0.10 : 1.5]; > cfg.foi = 1:40; > cfg.t_ftimwin = ones(size(cfg.foi)) * 0.5; > cfg.pad ='nextpow2'; > cfg.feedback = 'no'; > %cfg.hassampleinfo= 'yes'; > > data_Fourier = ft_freqanalysis(cfg); > > %%%%%%%%%%%%%%%%%%%%%%%%%%%%%% > > Hope you can give me some information in order to solve the problem, > > Thank you in advanced, > > Elene. > > > > > > > > > _______________________________________________ > 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 joerg.hipp at googlemail.com Tue Jan 8 10:13:48 2019 From: joerg.hipp at googlemail.com (Joerg Hipp) Date: Tue, 8 Jan 2019 10:13:48 +0100 Subject: [FieldTrip] Biomarker and Experimental Medicine Leader in Neuroscience at Roche in Basel, Switzerland Message-ID: Dear all, We are offering a position as a Biomarker and Experimental Medicine Leader in Neuroscience at Roche in Basel, Switzerland. The position is based in the Biomarker and Translational Technology (BTT) group of the Neuroscience, Ophthalmology, and Rare Diseases (NORD) department in Roche Pharma Research and Early Development (pRED) in Basel, Switzerland. The BTT group utilizes the most advanced methods (including digital biomarkers, imaging (MRI and PET), EEG, fluid biomarkers, genetics and cognitive testing) and analytical approaches to support scientific decision-making in drug development. Roche has one of the largest and most exciting neuroscience portfolios ranging from programs in neurodevelopmental (e.g. ASD) and neuropsychiatric (e.g. Schizophrenia) to neurodegenerative disorders (e.g. AD, PD, MS) and including rare genetic disorders (e.g. Angelman Syndrome, Huntington's disease, SMA). We are looking for a highly motivated, creative, collaborative and innovative standout colleague with very strong quantitative and methodological skills, and a deep understanding of neuroscience, preferable with experience working in neuropsychiatric or neurological disorders. Details on the position can be found here: https://roche.wd3.myworkdayjobs.com/roche-ext/job/Basel-Headquarter/Biomarker-and-Experimental-Medicine-Leader-in-Neuroscience--Temporary-for-2-years-_201811-128841-1 Best wishes, Joerg -- Joerg Hipp, PhD Biomarker and Experimental Medicine Leader Group Leader: Electrophysiology and Analytics Biomarker and Translational Technology Group Pharma Research and Early Development (pRED) F. Hoffmann-La Roche Ltd. Grenzacherstrasse 124 4070 Basel, Switzerland Email: joerg.hipp at roche.com https://scholar.google.ch/citations?user=oxsJ6q4AAAAJ&hl=en -------------- next part -------------- An HTML attachment was scrubbed... URL: From r.oostenveld at donders.ru.nl Tue Jan 8 11:06:38 2019 From: r.oostenveld at donders.ru.nl (Robert Oostenveld) Date: Tue, 8 Jan 2019 11:06:38 +0100 Subject: [FieldTrip] questions In-Reply-To: References: <26BC20C23720E94A9FF826794B6D0CCE0100422E5E@PVTH-EXMBX11.cnmc.org> <252EB8AF-77EE-4336-8345-E463D50E9A42@childrensnational.org> Message-ID: <9A29530A-2183-4D24-B5CD-13BBAACE434E@donders.ru.nl> Hi Rathinaswamy > I have MRIs in DICOM format. I followed the instructions in the tutorial > which are as follows: > > f1=’/Volumes/FDATA_1/HACO_Project/CT_MRI T1 SPGR/ARS_MRI_T1 SPGR/1.2.840.113619.2.353.4120.14262029.13982.1485259768.788.dcm’; > > > mri = ft_read_mri(f1); > > > This threw the following error message. > ERROR: /Volumes/FDATA_1/HACO_Project/CT_MRI T1 SPGR/ARS_MRI_T1 > SPGR/1.2.840.113619.2.353.4120.14262029.13982.1485259768.788.dcm does not have a series number > Output argument "vol" (and maybe others) not assigned during call > to "load_dicom_series." > > Error in ft_read_mri (line 300) > [img,transform,hdr,mr_params] = > load_dicom_series(dcmdir,dcmdir,filename); This error happens in fieldtrip/external/freesurfer/load_dicom_series.m. The series number is used to determine from the (usually long list of) dicom files which ones belong together. You could try mri = ft_read_mri(filename, ‘dataformat’, ‘dicom_old’) which uses another low-level reading function. Please look at the code in ft_read_mri, around line 302. Alternatively, you may be able to use an external tool such as dcm2niix to convert the dicom to nifti. best regards, Robert From sherrykhan78 at gmail.com Tue Jan 8 14:04:55 2019 From: sherrykhan78 at gmail.com (Sheraz Khan) Date: Tue, 8 Jan 2019 08:04:55 -0500 Subject: [FieldTrip] MNE Postdoc opportunities @ Harvard Medical School & Massachusetts General Hospital Message-ID: On behalf of Dr. Matti Hämäläinen (msh at nmr.mgh.harvard.edu) [Apologies for cross posting] ---------------------------------------------------------------------------------------------- The academic MEG/EEG software packages are becoming more and more important to the field as new new sensor technologies are being applied and new commercial MEG systems are becoming available. We welcome new young scientists to become part of this endeavor! With best regards, Matti ---------------------------------------------------------------------------------------------- There are two postdoctoral positions available in the MNE projects at: Athinoula A. Martinos Center for Biomedical Massachusetts General Hospital and Harvard Medical School *Position 1: Postdoctoral Research Fellow (MNE-Python)* *Overview:* Applications are invited for a Postdoctoral Research Fellow available at the Massachusetts General Hospital Athinoula A. Martinos Center for Biomedical Imaging (www.nmr.mgh.harvard.edu). The postdoctoral fellow will also be affiliated with Harvard Medical School. We are using electrophysiological recordings in combination with anatomical and functional MRI to understand the functions of the healthy brain and how they are altered in neurological and psychiatric diseases. We capitalize on the insights from our basic and clinical research to develop new methods and tools to be applied in clinical practice. *Responsibilities:* The postdoc will work in an NIH-funded project whose overall aim is to provide well-documented and tested novel analysis software to promote both basic neuroscience and clinical research applications using MEG and EEG. In particular, during the past eight years we have developed, with NIH support, the MNE-Python software http://www.- martinos.org/mne/, which covers multiple methods of data preprocessing, source localization, statistical analysis, and estimation of functional connectivity between distributed brain regions. In this new project we will extend our software to meet the needs of a growing user base and reflect recent developments in the MEG/EEG field. Requirements: Candidates should have a Doctoral degree in biomedical engineering, computer science or related fields. Strong Python programming skills are required and background and experience in acquiring and analyzing MEG/EEG data are highly desirable. Candidates need to be able to work in a modern software development environment and be familiar with controlled software development processes. A successful candidate is able to work in a dynamic, international, and collaborative work environment. He/She will gain experience in recording and analyzing electrophysiological data, working with state-of-the-art brain mapping technologies as well as engaging in top-level research. Familiarity with MEG/EEG and MRI analysis software packages, in particular MNE-Python and FreeSurfer is highly beneficial. ---------------------------------------------------------------------------------------------- *Position 2: Postdoctoral Research Fellow (MNE-Scan)* *Overview:* Applications are invited for a postdoctoral position available at the Massachusetts General Hospital Athinoula A. Martinos Center for Biomedical Imaging (http://www.nmr.mgh.harvard.edu). The postdoctoral fellow will also be affiliated with Harvard Medical School. Our MEG/EEG laboratory is using electrophysiological recordings in combination with anatomical and functional MRI to understand the functions of the healthy brain and how they are altered in neurological and psychiatric diseases. Our ultimate goal is to capitalize on the insights from our basic and clinical research to develop new methods and tools to be applied in clinical practice. *Responsibilities:* The Postdoctoral fellow will work in an NIH-funded project which aim is to develop a device-independent and real-time capable software (MNE Scan). MNE Scan is based on the MNE-CPP framework ( www.mne-cpp.org) and will significantly increase the ease and efficiency of acquiring, monitoring, analyzing, and integrating electroencephalography (EEG), magnetoencephalography (MEG), electrocorticography (ECoG), and stereotactic EEG (SEEG) data. The MNE Scan software will format incoming electrographic data from any recording device for EEG, ECoG, SEEG, and MEG, store the data, carry out preprocessing for noise reduction and signal conditioning, display the incoming data in real time, and carry out the data analysis at the level of active tissues instead of the sensor level. Its realtime capability will provide immediate feedback to clinicians, enabling them to use this information for improving diagnosis and surgical management of epilepsy. Furthermore, MNE Scan will be used during neurofeedback experiments, including brain state dependent stimulation. The Postdoctoral fellow will work with other members of the investigative team to identify and develop new scientific use cases and research questions for the MNE Scan software described above. He will also work together with other investigators in the team to enhance source estimation and connectivity estimation methods to work efficiently in the real-time environment. *Requirements:* The successful candidate must hold a Ph.D. degree in biomedical engineering, computer science, or related fields. A successful candidate will benefit from working in a dynamic, international, and collaborative supportive work environment. He/She will gain experience in recording and analyzing electrophysiological data, working with state-of-the-art brain mapping technologies as well as engaging in top-level research. Previous experience in acquiring and analyzing MEG/EEG data is a strength. Strong C++ programming skills and experience in the Qt toolkit are highly desirable. It is preferred that the candidate has familiarity with MEG/EEG and MRI analysis software packages, in particular MNE and FreeSurfer. ---------------------------------------------------------------------------------------------- Welcome to the MNE Family! Massachusetts General Hospital is an equal opportunity employer. Full-time employees receive full benefits, competitive salaries, and excellent resources for career development. ********************************************************** *Contact: Matti Hämäläinen * *msh at nmr.mgh.harvard.edu * *Athinoula A. Martinos Center for Biomedical* *Massachusetts General Hospital and Harvard Medical School* *Boston, MA, USA* ********************************************************** -------------- next part -------------- An HTML attachment was scrubbed... URL: From sherrykhan78 at gmail.com Tue Jan 8 14:05:05 2019 From: sherrykhan78 at gmail.com (Sheraz Khan) Date: Tue, 8 Jan 2019 08:05:05 -0500 Subject: [FieldTrip] MNE Postdoc opportunities @ Harvard Medical School & Massachusetts General Hospital Message-ID: On behalf of Dr. Matti Hämäläinen (msh at nmr.mgh.harvard.edu) [Apologies for cross posting] ---------------------------------------------------------------------------------------------- The academic MEG/EEG software packages are becoming more and more important to the field as new new sensor technologies are being applied and new commercial MEG systems are becoming available. We welcome new young scientists to become part of this endeavor! With best regards, Matti ---------------------------------------------------------------------------------------------- There are two postdoctoral positions available in the MNE projects at: Athinoula A. Martinos Center for Biomedical Massachusetts General Hospital and Harvard Medical School *Position 1: Postdoctoral Research Fellow (MNE-Python)* *Overview:* Applications are invited for a Postdoctoral Research Fellow available at the Massachusetts General Hospital Athinoula A. Martinos Center for Biomedical Imaging (www.nmr.mgh.harvard.edu). The postdoctoral fellow will also be affiliated with Harvard Medical School. We are using electrophysiological recordings in combination with anatomical and functional MRI to understand the functions of the healthy brain and how they are altered in neurological and psychiatric diseases. We capitalize on the insights from our basic and clinical research to develop new methods and tools to be applied in clinical practice. *Responsibilities:* The postdoc will work in an NIH-funded project whose overall aim is to provide well-documented and tested novel analysis software to promote both basic neuroscience and clinical research applications using MEG and EEG. In particular, during the past eight years we have developed, with NIH support, the MNE-Python software http://www.- martinos.org/mne/, which covers multiple methods of data preprocessing, source localization, statistical analysis, and estimation of functional connectivity between distributed brain regions. In this new project we will extend our software to meet the needs of a growing user base and reflect recent developments in the MEG/EEG field. Requirements: Candidates should have a Doctoral degree in biomedical engineering, computer science or related fields. Strong Python programming skills are required and background and experience in acquiring and analyzing MEG/EEG data are highly desirable. Candidates need to be able to work in a modern software development environment and be familiar with controlled software development processes. A successful candidate is able to work in a dynamic, international, and collaborative work environment. He/She will gain experience in recording and analyzing electrophysiological data, working with state-of-the-art brain mapping technologies as well as engaging in top-level research. Familiarity with MEG/EEG and MRI analysis software packages, in particular MNE-Python and FreeSurfer is highly beneficial. ---------------------------------------------------------------------------------------------- *Position 2: Postdoctoral Research Fellow (MNE-Scan)* *Overview:* Applications are invited for a postdoctoral position available at the Massachusetts General Hospital Athinoula A. Martinos Center for Biomedical Imaging (http://www.nmr.mgh.harvard.edu). The postdoctoral fellow will also be affiliated with Harvard Medical School. Our MEG/EEG laboratory is using electrophysiological recordings in combination with anatomical and functional MRI to understand the functions of the healthy brain and how they are altered in neurological and psychiatric diseases. Our ultimate goal is to capitalize on the insights from our basic and clinical research to develop new methods and tools to be applied in clinical practice. *Responsibilities:* The Postdoctoral fellow will work in an NIH-funded project which aim is to develop a device-independent and real-time capable software (MNE Scan). MNE Scan is based on the MNE-CPP framework ( www.mne-cpp.org) and will significantly increase the ease and efficiency of acquiring, monitoring, analyzing, and integrating electroencephalography (EEG), magnetoencephalography (MEG), electrocorticography (ECoG), and stereotactic EEG (SEEG) data. The MNE Scan software will format incoming electrographic data from any recording device for EEG, ECoG, SEEG, and MEG, store the data, carry out preprocessing for noise reduction and signal conditioning, display the incoming data in real time, and carry out the data analysis at the level of active tissues instead of the sensor level. Its realtime capability will provide immediate feedback to clinicians, enabling them to use this information for improving diagnosis and surgical management of epilepsy. Furthermore, MNE Scan will be used during neurofeedback experiments, including brain state dependent stimulation. The Postdoctoral fellow will work with other members of the investigative team to identify and develop new scientific use cases and research questions for the MNE Scan software described above. He will also work together with other investigators in the team to enhance source estimation and connectivity estimation methods to work efficiently in the real-time environment. *Requirements:* The successful candidate must hold a Ph.D. degree in biomedical engineering, computer science, or related fields. A successful candidate will benefit from working in a dynamic, international, and collaborative supportive work environment. He/She will gain experience in recording and analyzing electrophysiological data, working with state-of-the-art brain mapping technologies as well as engaging in top-level research. Previous experience in acquiring and analyzing MEG/EEG data is a strength. Strong C++ programming skills and experience in the Qt toolkit are highly desirable. It is preferred that the candidate has familiarity with MEG/EEG and MRI analysis software packages, in particular MNE and FreeSurfer. ---------------------------------------------------------------------------------------------- Welcome to the MNE Family! Massachusetts General Hospital is an equal opportunity employer. Full-time employees receive full benefits, competitive salaries, and excellent resources for career development. ********************************************************** *Contact: Matti Hämäläinen * *msh at nmr.mgh.harvard.edu * *Athinoula A. Martinos Center for Biomedical* *Massachusetts General Hospital and Harvard Medical School* *Boston, MA, USA* ********************************************************** -------------- next part -------------- An HTML attachment was scrubbed... URL: From elene.beitia at alumni.mondragon.edu Tue Jan 8 17:58:44 2019 From: elene.beitia at alumni.mondragon.edu (Elene Beitia Loinaz) Date: Tue, 8 Jan 2019 17:58:44 +0100 Subject: [FieldTrip] =?utf-8?q?=28no_subject=29?= Message-ID: Dear all, I am trying to create a .lay to perform a ft_multiplotTFR. The information that we have is in .locs, we achieve to convert the data to struct but the ft_multiplotTFR function needs a .mat or .lay. (we have try to achieve this using struct2cell and cell2mat) Does someone know how to convert a .locs to .mat or .lay? And do you know if it is posible to use ft_multiplotTFR for EEG`s?, because in the examples that we have found it is only used with MEG. If it is not posible, do you know if there is another function to obtain the same result? Thank you in advanced, Elene. -------------- next part -------------- An HTML attachment was scrubbed... URL: From stephen.whitmarsh at gmail.com Tue Jan 8 18:45:15 2019 From: stephen.whitmarsh at gmail.com (Stephen Whitmarsh) Date: Tue, 8 Jan 2019 18:45:15 +0100 Subject: [FieldTrip] (no subject) In-Reply-To: References: Message-ID: Dear Elene, Have you looked at this: http://www.fieldtriptoolbox.org/tutorial/layout/ ? And to you second question, absolutely. It's just a matter of convenience that the examples are for MEG mainly. But see e.g.: http://www.fieldtriptoolbox.org/workshop/natmeg/ Cheers, Stephen On Tue, 8 Jan 2019 at 18:32, Elene Beitia Loinaz < elene.beitia at alumni.mondragon.edu> wrote: > Dear all, > > I am trying to create a .lay to perform a ft_multiplotTFR. > > The information that we have is in .locs, we achieve to convert the data > to struct but the ft_multiplotTFR function needs a .mat or .lay. (we have > try to achieve this using struct2cell and cell2mat) > > Does someone know how to convert a .locs to .mat or .lay? > > And do you know if it is posible to use ft_multiplotTFR for EEG`s?, > because in the examples that we have found it is only used with MEG. If it > is not posible, do you know if there is another function to obtain the same > result? > > Thank you in advanced, > > Elene. > _______________________________________________ > 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 RICHARDS at mailbox.sc.edu Tue Jan 8 20:23:47 2019 From: RICHARDS at mailbox.sc.edu (RICHARDS, JOHN) Date: Tue, 8 Jan 2019 19:23:47 +0000 Subject: [FieldTrip] Postdoc position In-Reply-To: References: Message-ID: John Richards in the Department of Psychology at the University of South Carolina is seeking a qualified PhD for a postdoctoral position. The position involves research on the development of infant attention. The laboratory uses psychophysiological methods (heart rate, EEG, ERP) and MRI (structural) to examine the brain bases of the development of infant attention and recognition memory (http://jerlab.sc.edu). The position would be to further develop the “Neurodevelopmental MRI Database”, work on analysis writeup of existing projects examining tools for cortical source analysis in infants, and analysis of current datasets on infant attention and brain development. The ideal candidate would have background neuroimaging such as EEG/ERP, structural MRI or fMRI, programming experience (MATLAB, FSL, EEGLab/ERPLab) and interests/background in infant cognition, perception, or attention. We also do some work on multimodal neuroimaging in adults (sMRI, dMRI, fMRI, EEG/ERP) and the candidate could either have relevant experience, or participate in these studies. Writing experience and a publication record is required; and extensive writing and publication will be expected. At the candidate’s interest, teaching experiences are available. The position is initially funded for one year, and subsequent years will be available depending on funding. The position is available now and candidates could start immediately. The salary is set at NIH standards accounting for years of postdoctoral experience. The position could be extended to a “Research Assistant Professor” for a qualified candidate with a supplement source of support. Review of applications will begin immediately and continue until the position is filled. Please send a letter of application, curriculum vitae, 1-2 writing samples, and the names and contact information of three references to richards-john at sc.edu, John E. Richards, Department of Psychology, University of South Carolina, Columbia SC 29208. *********************************************** John E. Richards Carolina Distinguished Professor Department of Psychology University of South Carolina Columbia, SC 29208 Dept Phone: 803 777 2079 Fax: 803 777 9558 Email: richards-john at sc.edu https://jerlab.sc.edu ************************************************* -------------- next part -------------- An HTML attachment was scrubbed... URL: From xusihua80 at 163.com Wed Jan 9 12:18:14 2019 From: xusihua80 at 163.com (xusihua) Date: Wed, 9 Jan 2019 19:18:14 +0800 (CST) Subject: [FieldTrip] Fw:Is there someone that has ANT neuro eego 32 channels fieldtrip layout file? Message-ID: <3eae9a3a.de0a.16832558eb5.Coremail.xusihua80@163.com> Hi everyone Is there someone that has ANT neuro eego 32 channels fieldtrip layout file or can someone help me to find out how to create a layout file? Best wishes! -- Sihua Xu, PhD Postdoc Center for Functional Neuroimaging (cfn.upenn.edu) Perelman School of Medicine University of Pennsylvania Philadelphia, PA, 19104, USA -------------- next part -------------- An HTML attachment was scrubbed... URL: From xusihua80 at 163.com Thu Jan 10 01:30:48 2019 From: xusihua80 at 163.com (xusihua) Date: Thu, 10 Jan 2019 08:30:48 +0800 (CST) Subject: [FieldTrip] Fw:Is there someone that has ANT neuro eego 32 channels fieldtrip layout file? Message-ID: <63861b2.1fd3.168352b2cad.Coremail.xusihua80@163.com> Hi everyone Is there someone that has ANT neuro eego 32 channels fieldtrip layout file or can someone help me to find out how to create a layout file? Best wishes! -- Sihua Xu, PhD Postdoc Center for Functional Neuroimaging (cfn.upenn.edu) Perelman School of Medicine University of Pennsylvania Philadelphia, PA, 19104, USA -------------- next part -------------- An HTML attachment was scrubbed... URL: From popwatson at hotmail.com Thu Jan 10 05:57:24 2019 From: popwatson at hotmail.com (Poppy Watson) Date: Thu, 10 Jan 2019 04:57:24 +0000 Subject: [FieldTrip] time frequency data looks blocky and stripy rather than smooth and swirly Message-ID: Dear fieldtrippers, I'm replicating a study that used fieldtrip for TF analysis (and has some lovely single electrode TF plots for each experimental condition). I've been running ft_freqanalysis using the following settings. cfg = []; cfg.trials = trialsToUse; % this is a vector of trial numbers cfg.method = 'mtmconvol'; cfg.output = 'pow'; cfg.channel = 'eeg'; cfg.taper = 'hanning'; cfg.foi = 2:2:30; %cfg.t_ftimwin = 4 ./ cfg.foi; cfg.t_ftimwin = ones(length(cfg.foi),1).*0.5; cfg.toi = -1.25:0.10:0.25; % 100 ms sliding time window The output and stats etc seem to all make sense but my concern is that when I plot the data e.g. from one electrode (collapsed across the whole pp group)- I don't get beautiful fuzzy TF graphs - instead I get very blocky/stripy figures like the attached where there doesn't seem to be any smoothing/bleeding across different frequencies. I've tried playing around with the cfg.foi as well as the length of the time window and sliding window (cfg.t_ftimwin and cfg.toi) but the results always look very blocky rather than all warm and fuzzy (i.e. as seen in raw-TFdata-of-single-electrode images in various publications). Am I missing some smoothing parameters?? This is my singleplot_TFR code: cfg = [ ] ; cfg.channel = 'FCz'; cfg.xlim = [-1 0]; %before stimulus appears cfg.ylim = [2 20]; % [8 12] only alpha cfg.zlim = [0 15]; cfg.maskstyle = 'saturation'; cfg.masknans = 'yes'; ft_singleplotTFR(cfg, allPPdata_suc_collapsed_high); Many Thanks P. Watson -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: example.png Type: image/png Size: 11648 bytes Desc: example.png URL: From stephen.whitmarsh at gmail.com Thu Jan 10 07:35:30 2019 From: stephen.whitmarsh at gmail.com (Stephen Whitmarsh) Date: Thu, 10 Jan 2019 07:35:30 +0100 Subject: [FieldTrip] time frequency data looks blocky and stripy rather than smooth and swirly In-Reply-To: References: Message-ID: Dear P., I suspect this is because: 1) you are using half a second for your sliding time-window, which is reasonable, but only have 1.5 seconds of data, of which you plot only one. This doesn't give much room for 'fuzzyness' in the sense of changes over time. 2) because you are not baseline correcting the results, you will mosly see 1/f power, i.e. more power in the lower frequency bands, which will be relatively stronger than any changes over time. To solve this: 1) calculate the TFR over a longer time-window, both before and after stimulation onset. 2) use a relative baseline correction That should hopefully give you the fuzzyness you want. Cheers, Stephen On Thu, 10 Jan 2019 at 06:14, Poppy Watson wrote: > Dear fieldtrippers, > > > > I’m replicating a study that used fieldtrip for TF analysis (and has some > lovely single electrode TF plots for each experimental condition). I’ve > been running ft_freqanalysis using the following settings. > > > > cfg = []; > > cfg.trials = trialsToUse; % this is a vector of trial numbers > > cfg.method = 'mtmconvol'; > > cfg.output = 'pow'; > > cfg.channel = 'eeg'; > > cfg.taper = 'hanning'; > > cfg.foi = 2:2:30; > > %cfg.t_ftimwin = 4 ./ cfg.foi; > > cfg.t_ftimwin = ones(length(cfg.foi),1).*0.5; > > cfg.toi = -1.25:0.10:0.25; % 100 ms sliding time window > > > > The output and stats etc seem to all make sense but my concern is that > when I plot the data e.g. from one electrode (collapsed across the whole pp > group)– I don’t get beautiful fuzzy TF graphs – instead I get very > blocky/stripy figures like the attached where there doesn’t seem to be any > smoothing/bleeding across different frequencies. I’ve tried playing around > with the cfg.foi as well as the length of the time window and sliding > window (cfg.t_ftimwin and cfg.toi) but the results always look very blocky > rather than all warm and fuzzy (i.e. as seen in > raw-TFdata-of-single-electrode images in various publications). Am I > missing some smoothing parameters?? > > > > This is my singleplot_TFR code: > > > > cfg = [ ] ; > > cfg.channel = 'FCz'; > > cfg.xlim = [-1 0]; %before stimulus appears > > cfg.ylim = [2 20]; % [8 12] only alpha > > cfg.zlim = [0 15]; > > cfg.maskstyle = 'saturation'; > > cfg.masknans = 'yes'; > > ft_singleplotTFR(cfg, allPPdata_suc_collapsed_high); > > > > Many Thanks > > P. Watson > > > _______________________________________________ > 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 stephen.whitmarsh at gmail.com Thu Jan 10 07:38:21 2019 From: stephen.whitmarsh at gmail.com (Stephen Whitmarsh) Date: Thu, 10 Jan 2019 07:38:21 +0100 Subject: [FieldTrip] Fw:Is there someone that has ANT neuro eego 32 channels fieldtrip layout file? In-Reply-To: <63861b2.1fd3.168352b2cad.Coremail.xusihua80@163.com> References: <63861b2.1fd3.168352b2cad.Coremail.xusihua80@163.com> Message-ID: Dear Sihua, Please see: http://www.fieldtriptoolbox.org/tutorial/layout/ maybe taking an existing one to start with: http://www.fieldtriptoolbox.org/template/layout/ Cheers, Stephen On Thu, 10 Jan 2019 at 01:59, xusihua wrote: > > Hi everyone > Is there someone that has ANT neuro eego 32 channels fieldtrip layout > file or can someone help me to find out how to create a layout file? Best > wishes! > > > > -- > Sihua Xu, PhD > > Postdoc > Center for Functional Neuroimaging (cfn.upenn.edu) > > Perelman School of Medicine > University of Pennsylvania > Philadelphia, PA, 19104, USA > > > > > > > > > > > _______________________________________________ > 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 julian.keil at gmail.com Thu Jan 10 07:39:45 2019 From: julian.keil at gmail.com (Julian Keil) Date: Thu, 10 Jan 2019 07:39:45 +0100 Subject: [FieldTrip] time frequency data looks blocky and stripy rather than smooth and swirly In-Reply-To: References: Message-ID: Dear Poppy, did you do some sort of baseline correction or condition contrast? Otherwise, what you see is simply the 1/f distribution in the power spectrum. Best, Julian ________________ Prof. Dr. Julian Keil Biological Psychology Olshausenstrasse 62 - R. 306 24118 Kiel, Germany +49 - 0431 - 880 - 4872 http://www.biopsych.uni-kiel.de/en > Am 10.01.2019 um 05:57 schrieb Poppy Watson : > > Dear fieldtrippers, > > I’m replicating a study that used fieldtrip for TF analysis (and has some lovely single electrode TF plots for each experimental condition). I’ve been running ft_freqanalysis using the following settings. > > cfg = []; > cfg.trials = trialsToUse; % this is a vector of trial numbers > cfg.method = 'mtmconvol'; > cfg.output = 'pow'; > cfg.channel = 'eeg'; > cfg.taper = 'hanning'; > cfg.foi = 2:2:30; > %cfg.t_ftimwin = 4 ./ cfg.foi; > cfg.t_ftimwin = ones(length(cfg.foi),1).*0.5; > cfg.toi = -1.25:0.10:0.25; % 100 ms sliding time window > > The output and stats etc seem to all make sense but my concern is that when I plot the data e.g. from one electrode (collapsed across the whole pp group)– I don’t get beautiful fuzzy TF graphs – instead I get very blocky/stripy figures like the attached where there doesn’t seem to be any smoothing/bleeding across different frequencies. I’ve tried playing around with the cfg.foi as well as the length of the time window and sliding window (cfg.t_ftimwin and cfg.toi) but the results always look very blocky rather than all warm and fuzzy (i.e. as seen in raw-TFdata-of-single-electrode images in various publications). Am I missing some smoothing parameters?? > > This is my singleplot_TFR code: > > cfg = [ ] ; > cfg.channel = 'FCz'; > cfg.xlim = [-1 0]; %before stimulus appears > cfg.ylim = [2 20]; % [8 12] only alpha > cfg.zlim = [0 15]; > cfg.maskstyle = 'saturation'; > cfg.masknans = 'yes'; > ft_singleplotTFR(cfg, allPPdata_suc_collapsed_high); > > Many Thanks > P. Watson > > _______________________________________________ > 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 popwatson at hotmail.com Thu Jan 10 09:10:57 2019 From: popwatson at hotmail.com (Poppy Watson) Date: Thu, 10 Jan 2019 08:10:57 +0000 Subject: [FieldTrip] time frequency data looks blocky and stripy rather than smooth and swirly In-Reply-To: References: , Message-ID: Thanks Stephen (and Julian who replied at the same time). I suspected it was something along these lines as indeed when I subtract one condition from the other, the figures look much more like traditional swirly depictions. The paper I am replicating does not mention anything re. baseline correction of results but I guess that's what they must have done. Just glad to know that all makes sense! Many thanks ________________________________ From: fieldtrip on behalf of Stephen Whitmarsh Sent: 10 January 2019 5:35 PM To: FieldTrip discussion list Subject: Re: [FieldTrip] time frequency data looks blocky and stripy rather than smooth and swirly Dear P., I suspect this is because: 1) you are using half a second for your sliding time-window, which is reasonable, but only have 1.5 seconds of data, of which you plot only one. This doesn't give much room for 'fuzzyness' in the sense of changes over time. 2) because you are not baseline correcting the results, you will mosly see 1/f power, i.e. more power in the lower frequency bands, which will be relatively stronger than any changes over time. To solve this: 1) calculate the TFR over a longer time-window, both before and after stimulation onset. 2) use a relative baseline correction That should hopefully give you the fuzzyness you want. Cheers, Stephen On Thu, 10 Jan 2019 at 06:14, Poppy Watson > wrote: Dear fieldtrippers, I’m replicating a study that used fieldtrip for TF analysis (and has some lovely single electrode TF plots for each experimental condition). I’ve been running ft_freqanalysis using the following settings. cfg = []; cfg.trials = trialsToUse; % this is a vector of trial numbers cfg.method = 'mtmconvol'; cfg.output = 'pow'; cfg.channel = 'eeg'; cfg.taper = 'hanning'; cfg.foi = 2:2:30; %cfg.t_ftimwin = 4 ./ cfg.foi; cfg.t_ftimwin = ones(length(cfg.foi),1).*0.5; cfg.toi = -1.25:0.10:0.25; % 100 ms sliding time window The output and stats etc seem to all make sense but my concern is that when I plot the data e.g. from one electrode (collapsed across the whole pp group)– I don’t get beautiful fuzzy TF graphs – instead I get very blocky/stripy figures like the attached where there doesn’t seem to be any smoothing/bleeding across different frequencies. I’ve tried playing around with the cfg.foi as well as the length of the time window and sliding window (cfg.t_ftimwin and cfg.toi) but the results always look very blocky rather than all warm and fuzzy (i.e. as seen in raw-TFdata-of-single-electrode images in various publications). Am I missing some smoothing parameters?? This is my singleplot_TFR code: cfg = [ ] ; cfg.channel = 'FCz'; cfg.xlim = [-1 0]; %before stimulus appears cfg.ylim = [2 20]; % [8 12] only alpha cfg.zlim = [0 15]; cfg.maskstyle = 'saturation'; cfg.masknans = 'yes'; ft_singleplotTFR(cfg, allPPdata_suc_collapsed_high); Many Thanks P. Watson _______________________________________________ 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 Silvia.Formica at UGent.be Thu Jan 10 10:31:10 2019 From: Silvia.Formica at UGent.be (Silvia Formica) Date: Thu, 10 Jan 2019 09:31:10 +0000 Subject: [FieldTrip] EEG source reconstruction with template - elec file Message-ID: <1547112671759.73597@UGent.be> Dear all, I have a EEG dataset, collected with a Biosemi system with 64 channels. I don't have the individual anatomical data for each participant, but I want to perform source reconstruction to have at least a rough localization of the activation I find. Therefore, I intend to use the templates provided by fieldtrip. If I understand correctly, independently of the source modelling technique that I will choose to use, I need the following information: 1) the head model : this would be the template 'standard_bem' 2) the source model : the template 'cortex_5124.surf.gii' 3) the elec information :? this file should describe the spatial configuration of the electrodes, but I can't retrieve it. I don't think any of the templates available fits my data (they all have more than 64 channels and different configurations). I tried to use the function ft_read_sens on my data but I get the following error elec = ft_read_sens([data_filt5.mat'],'senstype','eeg'); Undefined function or variable 'lab'. Error in channelposition (line 316) n = size(lab,2); Error in ft_datatype_sens (line 349) [chanpos, chanori, lab] = channelposition(sens); Error in ft_datatype_sens (line 158) sens = ft_datatype_sens(sens, 'version', '2011v2'); Error in ft_read_sens (line 380) sens = ft_datatype_sens(sens); I found the cartesian coordinates of the electrodes on the Biosemi website, with the x y z coordinates for each electrodes (as the little example I'm giving below, but that's not enough. Channel x y z Fp1 -27.0333934563814 83.2002299946862 -3.05493522574547 AF7 -51.4205700085246 70.7743429000555 -3.05493522574547 AF3 -35.5608995849164 76.2605952593987 24.1279774030766 F1 -25.1195714566887 62.1731210759014 56.2665567427342 F5 -47.7073482911603 58.9136687505812 43.7676114900325 ... ? ... ... ... Do you have any suggestions on how to create a correct elec file fitting my data? Any help would be highly appreciated! Silvia -------------- next part -------------- An HTML attachment was scrubbed... URL: From julian.keil at gmail.com Thu Jan 10 11:58:18 2019 From: julian.keil at gmail.com (Julian Keil) Date: Thu, 10 Jan 2019 11:58:18 +0100 Subject: [FieldTrip] EEG source reconstruction with template - elec file In-Reply-To: <1547112671759.73597@UGent.be> References: <1547112671759.73597@UGent.be> Message-ID: Dear Silvia, how is the electrode location information from the BioSemi website not enough? Basically, you can create your own electrode definition by giving the labels and locations to a structure, e.g. elec.label{1} = 'Fp1'; elec.chanpos(1,:) = [-27.0333934563814, 83.2002299946862, -3.05493522574547]; or for all your electrodes in one go: elec.label = {'Fp1','AF7','AF3','F1','F5'}; elec.chanpos = [-27.0333934563814, 83.2002299946862, -3.05493522574547;... -51.4205700085246, 70.7743429000555, -3.05493522574547;... -35.5608995849164, 76.2605952593987, 24.1279774030766;... -25.1195714566887, 62.1731210759014, 56.2665567427342;... -47.7073482911603, 58.9136687505812, 43.7676114900325]; plot3(elec.chanpos(:,1),elec.chanpos(:,2),elec.chanpos(:,3),'*') or of course read them more elegantly from a text file ;-) It might be a good idea to double check the alignment with the template headmodel afterwards using ft_electroderealign You can then use this elec structure in all subsequent analyses. I hope that helps, Julian On Thu, Jan 10, 2019 at 10:59 AM Silvia Formica wrote: > Dear all, > > > I have a EEG dataset, collected with a Biosemi system with 64 channels. I > don't have the individual anatomical data for each participant, but I want > to perform source reconstruction to have at least a rough localization of > the activation I find. > > > Therefore, I intend to use the templates provided by fieldtrip. If I > understand correctly, independently of the source modelling technique that > I will choose to use, I need the following information: > > > 1) the *head model* : this would be the template '*standard_bem'* > > > 2) the *source model* : the template '*cortex_5124.surf.gii*' > > > 3) the *elec information* :​ this file should describe the spatial > configuration of the electrodes, but I can't retrieve it. I don't think any > of the templates available fits my data (they all have more than 64 > channels and different configurations). > > > I tried to use the function ft_read_sens on my data but I get the > following error > > > elec = ft_read_sens([data_filt5.mat'],'senstype','eeg'); > > > Undefined function or variable 'lab'. > > > Error in channelposition (line 316) > > n = size(lab,2); > > > Error in ft_datatype_sens (line 349) > > [chanpos, chanori, lab] = channelposition(sens); > > > Error in ft_datatype_sens (line 158) > > sens = ft_datatype_sens(sens, 'version', '2011v2'); > > > Error in ft_read_sens (line 380) > > sens = ft_datatype_sens(sens); > > > > I found the cartesian coordinates of the electrodes on the Biosemi > website, with the x y z coordinates for each electrodes (as the little > example I'm giving below, but that's not enough. > > > Channel x y > z > Fp1 -27.0333934563814 83.2002299946862 -3.05493522574547 > AF7 -51.4205700085246 70.7743429000555 -3.05493522574547 > AF3 -35.5608995849164 76.2605952593987 24.1279774030766 > F1 -25.1195714566887 62.1731210759014 56.2665567427342 > F5 -47.7073482911603 58.9136687505812 43.7676114900325 > > ... > ​ ... ... ... > > > > *Do you have any suggestions on how to create a correct elec file fitting > my data?* > > Any help would be highly appreciated! > > > Silvia > > > > > _______________________________________________ > 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 Silvia.Formica at UGent.be Thu Jan 10 16:05:09 2019 From: Silvia.Formica at UGent.be (Silvia Formica) Date: Thu, 10 Jan 2019 15:05:09 +0000 Subject: [FieldTrip] EEG source reconstruction with template - elec file In-Reply-To: References: <1547112671759.73597@UGent.be>, Message-ID: <1547132711097.19484@UGent.be> Dear Julian, thanks for your quick response! You are absolutely right, my problem was that I was not creating the elec file correctly as a struct with the fields chanpos, elecpos and label. I'm now facing another problem, though. I'm trying to use ft_electroderealign, but I can't seem to achieve a satisfying result. Here is what I am doing: cfg = []; cfg.method = 'headshape'; % cfg.warp = cfg.elec = elec; cfg.headshape = vol.bnd(1); elec_new = ft_electroderealign(cfg); I then try to plot overlaid the skin surface as loaded from 'standard_skin_14038.vol' and the new electrode location but I get inconsistent results, the electrodes are always inside the head. I tried different warping methods without success. This is the closest I managed to get: [cid:809f04f6-d9d9-4e7d-b722-79f7a535c0fd] Do you have any recommendation on how to better align the electrodes to the template? Thanks! Silvia ________________________________ From: fieldtrip on behalf of Julian Keil Sent: 10 January 2019 11:58 To: FieldTrip discussion list Subject: Re: [FieldTrip] EEG source reconstruction with template - elec file Dear Silvia, how is the electrode location information from the BioSemi website not enough? Basically, you can create your own electrode definition by giving the labels and locations to a structure, e.g. elec.label{1} = 'Fp1'; elec.chanpos(1,:) = [-27.0333934563814, 83.2002299946862, -3.05493522574547]; or for all your electrodes in one go: elec.label = {'Fp1','AF7','AF3','F1','F5'}; elec.chanpos = [-27.0333934563814, 83.2002299946862, -3.05493522574547;... -51.4205700085246, 70.7743429000555, -3.05493522574547;... -35.5608995849164, 76.2605952593987, 24.1279774030766;... -25.1195714566887, 62.1731210759014, 56.2665567427342;... -47.7073482911603, 58.9136687505812, 43.7676114900325]; plot3(elec.chanpos(:,1),elec.chanpos(:,2),elec.chanpos(:,3),'*') or of course read them more elegantly from a text file ;-) It might be a good idea to double check the alignment with the template headmodel afterwards using ft_electroderealign You can then use this elec structure in all subsequent analyses. I hope that helps, Julian On Thu, Jan 10, 2019 at 10:59 AM Silvia Formica > wrote: Dear all, I have a EEG dataset, collected with a Biosemi system with 64 channels. I don't have the individual anatomical data for each participant, but I want to perform source reconstruction to have at least a rough localization of the activation I find. Therefore, I intend to use the templates provided by fieldtrip. If I understand correctly, independently of the source modelling technique that I will choose to use, I need the following information: 1) the head model : this would be the template 'standard_bem' 2) the source model : the template 'cortex_5124.surf.gii' 3) the elec information :​ this file should describe the spatial configuration of the electrodes, but I can't retrieve it. I don't think any of the templates available fits my data (they all have more than 64 channels and different configurations). I tried to use the function ft_read_sens on my data but I get the following error elec = ft_read_sens([data_filt5.mat'],'senstype','eeg'); Undefined function or variable 'lab'. Error in channelposition (line 316) n = size(lab,2); Error in ft_datatype_sens (line 349) [chanpos, chanori, lab] = channelposition(sens); Error in ft_datatype_sens (line 158) sens = ft_datatype_sens(sens, 'version', '2011v2'); Error in ft_read_sens (line 380) sens = ft_datatype_sens(sens); I found the cartesian coordinates of the electrodes on the Biosemi website, with the x y z coordinates for each electrodes (as the little example I'm giving below, but that's not enough. Channel x y z Fp1 -27.0333934563814 83.2002299946862 -3.05493522574547 AF7 -51.4205700085246 70.7743429000555 -3.05493522574547 AF3 -35.5608995849164 76.2605952593987 24.1279774030766 F1 -25.1195714566887 62.1731210759014 56.2665567427342 F5 -47.7073482911603 58.9136687505812 43.7676114900325 ... ​ ... ... ... Do you have any suggestions on how to create a correct elec file fitting my data? Any help would be highly appreciated! Silvia _______________________________________________ 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: pastedImage.png Type: image/png Size: 82198 bytes Desc: pastedImage.png URL: From mcarlapiastra at gmail.com Thu Jan 10 16:21:07 2019 From: mcarlapiastra at gmail.com (Maria Carla Piastra) Date: Thu, 10 Jan 2019 16:21:07 +0100 Subject: [FieldTrip] ChildBrain conference in Leuven!! Message-ID: <52f33f09-2013-bdf1-5c43-f681040624be@gmail.com> Dear all, please see and share the invitation to our ChildBrain conference in Leuven (Belgium). The deadline is close! (Apologies for multiple posting.) Best regards, Maria Carla Piastra ​ * * * * * * ***The Childbrain Conference* *Leuven, Belgium 5 - 7 Febuary, 2019* We are pleased to invite you to the "ChildBrain Conference" organized by ChildBrain Marie Skłodowska-Curie Action (MSCA) Innovative Training Network (ITN), that will be held from 5 until 7 February 2019, at KU Leuven, in Leuven, Belgium. This conference is about research on children’s brain in typical development and brain disorders, specifically on results based on recent neuroimaging methods combining modalities as electroencephalography (EEG), magnetoencephalography (MEG) and magnetic resonance imaging (MRI). At the conference, invited speakers and researchers from ChildBrain will give presentations in four main sessions: atypical neurodevelopment, typical neurodevelopment, methodological advances for pediatric neuroimaging and future perspectives. There is also the possibility to attend a pre-conference session in which a methodological demonstration is given on the acquisition and application of head models in children brain data We aim at calling together researchers and students from various domains such as language and audition, as well as mathematics, physics and engineering to build bridges between applications and methodology and share this common and exciting interest on child brain development. For participants to the conference, there is the opportunity to share your work in a poster session and/or as a selected speaker. If you wish to present at the Childbrain Conference, you are invited to send an abstract. *You can submit your abstract and register **here **. The abstract submission deadline is on 14 January 2019 at 23:59 CET. You can view our detailed **schedule ** for further information.* -------------- next part -------------- An HTML attachment was scrubbed... URL: From julian.keil at gmail.com Thu Jan 10 16:40:35 2019 From: julian.keil at gmail.com (Julian Keil) Date: Thu, 10 Jan 2019 16:40:35 +0100 Subject: [FieldTrip] EEG source reconstruction with template - elec file In-Reply-To: <1547132711097.19484@UGent.be> References: <1547112671759.73597@UGent.be> <1547132711097.19484@UGent.be> Message-ID: Hi Silvia, have you tried the "interactive" method? It lets you play around with the alignment. Best, Julian On Thu, Jan 10, 2019 at 4:35 PM Silvia Formica wrote: > Dear Julian, > > > thanks for your quick response! > > You are absolutely right, my problem was that I was not creating the elec > file correctly as a struct with the fields chanpos, elecpos and label. > > > I'm now facing another problem, though. I'm trying to use > ft_electroderealign, but I can't seem to achieve a satisfying result. Here > is what I am doing: > > > cfg = []; > cfg.method = 'headshape'; > % cfg.warp = > cfg.elec = elec; > cfg.headshape = vol.bnd(1); > elec_new = ft_electroderealign(cfg); > > > I then try to plot overlaid the skin surface as loaded > from 'standard_skin_14038.vol' and the new electrode location but I get > inconsistent results, the electrodes are always inside the head. I tried > different warping methods without success. This is the closest I managed to > get: > > > > > Do you have any recommendation on how to better align the electrodes to > the template? > > > Thanks! > > Silvia > ------------------------------ > *From:* fieldtrip on behalf of Julian > Keil > *Sent:* 10 January 2019 11:58 > *To:* FieldTrip discussion list > *Subject:* Re: [FieldTrip] EEG source reconstruction with template - elec > file > > Dear Silvia, > > how is the electrode location information from the BioSemi website not > enough? > Basically, you can create your own electrode definition by giving the > labels and locations to a structure, e.g. > elec.label{1} = 'Fp1'; > elec.chanpos(1,:) = [-27.0333934563814, 83.2002299946862, > -3.05493522574547]; > > or for all your electrodes in one go: > elec.label = {'Fp1','AF7','AF3','F1','F5'}; > elec.chanpos = [-27.0333934563814, 83.2002299946862, -3.05493522574547;... > -51.4205700085246, 70.7743429000555, -3.05493522574547;... > -35.5608995849164, 76.2605952593987, 24.1279774030766;... > -25.1195714566887, 62.1731210759014, 56.2665567427342;... > -47.7073482911603, 58.9136687505812, 43.7676114900325]; > > plot3(elec.chanpos(:,1),elec.chanpos(:,2),elec.chanpos(:,3),'*') > > or of course read them more elegantly from a text file ;-) > > It might be a good idea to double check the alignment with the template > headmodel afterwards using ft_electroderealign > You can then use this elec structure in all subsequent analyses. > > I hope that helps, > > Julian > > On Thu, Jan 10, 2019 at 10:59 AM Silvia Formica > wrote: > >> Dear all, >> >> >> I have a EEG dataset, collected with a Biosemi system with 64 channels. I >> don't have the individual anatomical data for each participant, but I want >> to perform source reconstruction to have at least a rough localization of >> the activation I find. >> >> >> Therefore, I intend to use the templates provided by fieldtrip. If I >> understand correctly, independently of the source modelling technique that >> I will choose to use, I need the following information: >> >> >> 1) the *head model* : this would be the template '*standard_bem'* >> >> >> 2) the *source model* : the template '*cortex_5124.surf.gii*' >> >> >> 3) the *elec information* :​ this file should describe the spatial >> configuration of the electrodes, but I can't retrieve it. I don't think any >> of the templates available fits my data (they all have more than 64 >> channels and different configurations). >> >> >> I tried to use the function ft_read_sens on my data but I get the >> following error >> >> >> elec = ft_read_sens([data_filt5.mat'],'senstype','eeg'); >> >> >> Undefined function or variable 'lab'. >> >> >> Error in channelposition (line 316) >> >> n = size(lab,2); >> >> >> Error in ft_datatype_sens (line 349) >> >> [chanpos, chanori, lab] = channelposition(sens); >> >> >> Error in ft_datatype_sens (line 158) >> >> sens = ft_datatype_sens(sens, 'version', '2011v2'); >> >> >> Error in ft_read_sens (line 380) >> >> sens = ft_datatype_sens(sens); >> >> >> >> I found the cartesian coordinates of the electrodes on the Biosemi >> website, with the x y z coordinates for each electrodes (as the little >> example I'm giving below, but that's not enough. >> >> >> Channel x y >> z >> Fp1 -27.0333934563814 83.2002299946862 -3.05493522574547 >> AF7 -51.4205700085246 70.7743429000555 -3.05493522574547 >> AF3 -35.5608995849164 76.2605952593987 24.1279774030766 >> F1 -25.1195714566887 62.1731210759014 >> 56.2665567427342 >> F5 -47.7073482911603 58.9136687505812 >> 43.7676114900325 >> >> ... >> ​ ... ... ... >> >> >> >> *Do you have any suggestions on how to create a correct elec file fitting >> my data?* >> >> Any help would be highly appreciated! >> >> >> Silvia >> >> >> >> >> _______________________________________________ >> 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: pastedImage.png Type: image/png Size: 82198 bytes Desc: not available URL: From S.Homolle at donders.ru.nl Thu Jan 10 17:12:07 2019 From: S.Homolle at donders.ru.nl (=?utf-8?B?SG9tw7ZsbGUsIFMuIChTaW1vbik=?=) Date: Thu, 10 Jan 2019 16:12:07 +0000 Subject: [FieldTrip] EEG source reconstruction with template - elec file In-Reply-To: <1547132711097.19484@UGent.be> References: <1547112671759.73597@UGent.be>, , <1547132711097.19484@UGent.be> Message-ID: <1547136727937.84008@donders.ru.nl> Dear Silvia, I also can suggest you look at some of the tutorials here and here​. Especially the latter part of both tutorials deal with your current problem! Cheers, Simon Homölle PhD Candidate Donders Institute for Brain, Cognition and Behaviour Centre for Cognitive Neuroimaging Radboud University Nijmegen Phone: +31-(0)24-36-65059 ________________________________ From: fieldtrip on behalf of Silvia Formica Sent: Thursday, January 10, 2019 4:05 PM To: FieldTrip discussion list Subject: Re: [FieldTrip] EEG source reconstruction with template - elec file Dear Julian, thanks for your quick response! You are absolutely right, my problem was that I was not creating the elec file correctly as a struct with the fields chanpos, elecpos and label. I'm now facing another problem, though. I'm trying to use ft_electroderealign, but I can't seem to achieve a satisfying result. Here is what I am doing: cfg = []; cfg.method = 'headshape'; % cfg.warp = cfg.elec = elec; cfg.headshape = vol.bnd(1); elec_new = ft_electroderealign(cfg); I then try to plot overlaid the skin surface as loaded from 'standard_skin_14038.vol' and the new electrode location but I get inconsistent results, the electrodes are always inside the head. I tried different warping methods without success. This is the closest I managed to get: [cid:809f04f6-d9d9-4e7d-b722-79f7a535c0fd] Do you have any recommendation on how to better align the electrodes to the template? Thanks! Silvia ________________________________ From: fieldtrip on behalf of Julian Keil Sent: 10 January 2019 11:58 To: FieldTrip discussion list Subject: Re: [FieldTrip] EEG source reconstruction with template - elec file Dear Silvia, how is the electrode location information from the BioSemi website not enough? Basically, you can create your own electrode definition by giving the labels and locations to a structure, e.g. elec.label{1} = 'Fp1'; elec.chanpos(1,:) = [-27.0333934563814, 83.2002299946862, -3.05493522574547]; or for all your electrodes in one go: elec.label = {'Fp1','AF7','AF3','F1','F5'}; elec.chanpos = [-27.0333934563814, 83.2002299946862, -3.05493522574547;... -51.4205700085246, 70.7743429000555, -3.05493522574547;... -35.5608995849164, 76.2605952593987, 24.1279774030766;... -25.1195714566887, 62.1731210759014, 56.2665567427342;... -47.7073482911603, 58.9136687505812, 43.7676114900325]; plot3(elec.chanpos(:,1),elec.chanpos(:,2),elec.chanpos(:,3),'*') or of course read them more elegantly from a text file ;-) It might be a good idea to double check the alignment with the template headmodel afterwards using ft_electroderealign You can then use this elec structure in all subsequent analyses. I hope that helps, Julian On Thu, Jan 10, 2019 at 10:59 AM Silvia Formica > wrote: Dear all, I have a EEG dataset, collected with a Biosemi system with 64 channels. I don't have the individual anatomical data for each participant, but I want to perform source reconstruction to have at least a rough localization of the activation I find. Therefore, I intend to use the templates provided by fieldtrip. If I understand correctly, independently of the source modelling technique that I will choose to use, I need the following information: 1) the head model : this would be the template 'standard_bem' 2) the source model : the template 'cortex_5124.surf.gii' 3) the elec information :​ this file should describe the spatial configuration of the electrodes, but I can't retrieve it. I don't think any of the templates available fits my data (they all have more than 64 channels and different configurations). I tried to use the function ft_read_sens on my data but I get the following error elec = ft_read_sens([data_filt5.mat'],'senstype','eeg'); Undefined function or variable 'lab'. Error in channelposition (line 316) n = size(lab,2); Error in ft_datatype_sens (line 349) [chanpos, chanori, lab] = channelposition(sens); Error in ft_datatype_sens (line 158) sens = ft_datatype_sens(sens, 'version', '2011v2'); Error in ft_read_sens (line 380) sens = ft_datatype_sens(sens); I found the cartesian coordinates of the electrodes on the Biosemi website, with the x y z coordinates for each electrodes (as the little example I'm giving below, but that's not enough. Channel x y z Fp1 -27.0333934563814 83.2002299946862 -3.05493522574547 AF7 -51.4205700085246 70.7743429000555 -3.05493522574547 AF3 -35.5608995849164 76.2605952593987 24.1279774030766 F1 -25.1195714566887 62.1731210759014 56.2665567427342 F5 -47.7073482911603 58.9136687505812 43.7676114900325 ... ​ ... ... ... Do you have any suggestions on how to create a correct elec file fitting my data? Any help would be highly appreciated! Silvia _______________________________________________ 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: pastedImage.png Type: image/png Size: 82198 bytes Desc: pastedImage.png URL: From michel at cbs.mpg.de Thu Jan 10 17:47:29 2019 From: michel at cbs.mpg.de (Christine Michel) Date: Thu, 10 Jan 2019 17:47:29 +0100 Subject: [FieldTrip] change the color of artifacts - databrowser Message-ID: Dear fieldtrip experts, My colleagues and I are using the fieldtrip data browser to show artifacts marked via a threshold criterion or via visual inspection. It all works very well. However, we find the colors marking the artifacts (the light red and the light lila) very light. It is therefore hard for us to spot and to detect marked artifacts, especially when the marked segments are short. Is there any way I can change the color or the brightness of the color marking the artifacts either in the browser itself or via a config variable? Or could you add such a config variable? This would help us lots!! Thank you Christine Michel From carsten.wolters at uni-muenster.de Thu Jan 10 15:52:14 2019 From: carsten.wolters at uni-muenster.de (Carsten Wolters) Date: Thu, 10 Jan 2019 15:52:14 +0100 Subject: [FieldTrip] ChildBrain conference in Leuven/Belgium, February 5-7, 2019 Message-ID: Dear colleagues, please see the announcement for the upcoming ChildBrain conference below. Please also forward it to those that might be interested to participate. I apologize for multiple postings. BR Carsten Wolters ****************************** *The Childbrain Conference* *Leuven, Belgium 5 - 7 Febuary, 2019* We are pleased to invite you to the "ChildBrain Conference" organized by ChildBrain Marie Skłodowska-Curie Action (MSCA) Innovative Training Network (ITN), that will be held from 5 until 7 February 2019, at KU Leuven, in Leuven, Belgium. This conference is about research on children’s brain in typical development and brain disorders, specifically on results based on recent neuroimaging methods combining modalities as electroencephalography (EEG), magnetoencephalography (MEG) and magnetic resonance imaging (MRI). At the conference, invited speakers and researchers from ChildBrain will give presentations in four main sessions: atypical neurodevelopment, typical neurodevelopment, methodological advances for pediatric neuroimaging and future perspectives. There is also the possibility to attend a pre-conference session in which a methodological demonstration is given on the acquisition and application of head models in children brain data We aim at calling together researchers and students from various domains such as language and audition, as well as mathematics, physics and engineering to build bridges between applications and methodology and share this common and exciting interest on child brain development. For participants to the conference, there is the opportunity to share your work in a poster session and/or as a selected speaker. If you wish to present at the Childbrain Conference, you are invited to send an abstract. *You can submit your abstract and register **here **. The abstract submission deadline is on 14 January 2019 at 23:59 CET. You can view our detailed **schedule ** for further information.* -- Prof. Dr.rer.nat. Carsten H. Wolters University of Münster Institute for Biomagnetism and Biosignalanalysis Malmedyweg 15 48149 Münster, Germany Phone: +49 (0)251 83 56904 +49 (0)251 83 56865 (secr.) Fax: +49 (0)251 83 56874 Email: carsten.wolters at uni-muenster.de Web: https://campus.uni-muenster.de/biomag/das-institut/mitarbeiter/carsten-wolters/ -------------- next part -------------- An HTML attachment was scrubbed... URL: From brookshire at uchicago.edu Thu Jan 10 18:13:06 2019 From: brookshire at uchicago.edu (Geoff Brookshire) Date: Thu, 10 Jan 2019 17:13:06 +0000 Subject: [FieldTrip] change the color of artifacts - databrowser In-Reply-To: <8ed5cbadf23c4e809ea3acf1577c05f8@BN6PR11MB1394.namprd11.prod.outlook.com> References: <8ed5cbadf23c4e809ea3acf1577c05f8@BN6PR11MB1394.namprd11.prod.outlook.com> Message-ID: Hi Christine, You can make the tagged artifacts darker by adding this line before you call ft_databrowser: cfg.artifactalpha = 0.5; cheers, geoff On Thu, Jan 10, 2019 at 4:50 PM Christine Michel wrote: > Dear fieldtrip experts, > > My colleagues and I are using the fieldtrip data browser to show > artifacts marked via a threshold criterion or via visual inspection. It > all works very well. However, we find the colors marking the artifacts > (the light red and the light lila) very light. It is therefore hard for > us to spot and to detect marked artifacts, especially when the marked > segments are short. > > Is there any way I can change the color or the brightness of the color > marking the artifacts either in the browser itself or via a config > variable? Or could you add such a config variable? This would help us > lots!! > > Thank you > > Christine Michel > > > _______________________________________________ > 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 stephen.whitmarsh at gmail.com Thu Jan 10 18:28:39 2019 From: stephen.whitmarsh at gmail.com (Stephen Whitmarsh) Date: Thu, 10 Jan 2019 18:28:39 +0100 Subject: [FieldTrip] change the color of artifacts - databrowser In-Reply-To: References: Message-ID: Dear Christine, Take a look at line 631 (opt.artifactcolors) of ft_databrowser. Edit it to you hearts content! Cheers, Stephen On Thu, 10 Jan 2019 at 18:13, Christine Michel wrote: > Dear fieldtrip experts, > > My colleagues and I are using the fieldtrip data browser to show > artifacts marked via a threshold criterion or via visual inspection. It > all works very well. However, we find the colors marking the artifacts > (the light red and the light lila) very light. It is therefore hard for > us to spot and to detect marked artifacts, especially when the marked > segments are short. > > Is there any way I can change the color or the brightness of the color > marking the artifacts either in the browser itself or via a config > variable? Or could you add such a config variable? This would help us > lots!! > > Thank you > > Christine Michel > > > _______________________________________________ > 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 stephen.whitmarsh at gmail.com Thu Jan 10 18:33:54 2019 From: stephen.whitmarsh at gmail.com (Stephen Whitmarsh) Date: Thu, 10 Jan 2019 18:33:54 +0100 Subject: [FieldTrip] change the color of artifacts - databrowser In-Reply-To: References: <8ed5cbadf23c4e809ea3acf1577c05f8@BN6PR11MB1394.namprd11.prod.outlook.com> Message-ID: <0c2e01d4a90a$a8a9bb90$f9fd32b0$@gmail.com> Ah, my mistake. Thanks Geoff, Stephen From: fieldtrip On Behalf Of Geoff Brookshire Sent: Thursday, January 10, 2019 6:13 PM To: FieldTrip discussion list Subject: Re: [FieldTrip] change the color of artifacts - databrowser Hi Christine, You can make the tagged artifacts darker by adding this line before you call ft_databrowser: cfg.artifactalpha = 0.5; cheers, geoff On Thu, Jan 10, 2019 at 4:50 PM Christine Michel > wrote: Dear fieldtrip experts, My colleagues and I are using the fieldtrip data browser to show artifacts marked via a threshold criterion or via visual inspection. It all works very well. However, we find the colors marking the artifacts (the light red and the light lila) very light. It is therefore hard for us to spot and to detect marked artifacts, especially when the marked segments are short. Is there any way I can change the color or the brightness of the color marking the artifacts either in the browser itself or via a config variable? Or could you add such a config variable? This would help us lots!! Thank you Christine Michel _______________________________________________ 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 michel at cbs.mpg.de Fri Jan 11 11:17:05 2019 From: michel at cbs.mpg.de (Christine Michel) Date: Fri, 11 Jan 2019 11:17:05 +0100 Subject: [FieldTrip] change the color of artifacts - databrowser Message-ID: Dear Geoff and Stephen, thanks a lot for the helpful replies - it worked absolutely fine! :-) Christine -- Dr. Christine Michel Max Planck Research Group on Early Social Cognition Max Planck Institute for Human Cognitive and Brain Sciences Stephanstr. 1A 04103 Leipzig Germany phone: +49 341 9940 2468 From jack.reeves at nih.gov Fri Jan 11 17:43:49 2019 From: jack.reeves at nih.gov (Reeves, Jack (NIH/NINDS) [F]) Date: Fri, 11 Jan 2019 16:43:49 +0000 Subject: [FieldTrip] Alignment error with Fieldtrip source localization Message-ID: Hello- I am trying to source localize TMS-EEG data using the Fieldtrip tutorials in the links below. I am able to run all of the steps, but the headmodel and the freesurfer-processed sourcemodel are misaligned at the end. There are some pictures below which show the issue. The issue is the same for all subjects I try to process. Does anyone have any idea what could be causing this issue? I can send additional information or my scripts if needed. http://www.fieldtriptoolbox.org/tutorial/headmodel_meg/ http://www.fieldtriptoolbox.org/tutorial/sourcemodel/ http://www.fieldtriptoolbox.org/tutorial/minimumnormestimate/ [cid:image001.png at 01D4A9A1.8670B870][cid:image002.png at 01D4A9A1.8670B870] Thanks, Jack Reeves -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image001.png Type: image/png Size: 34966 bytes Desc: image001.png URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image002.png Type: image/png Size: 27668 bytes Desc: image002.png URL: From vale.nasato at gmail.com Sun Jan 13 16:45:35 2019 From: vale.nasato at gmail.com (Valentina Nasato) Date: Sun, 13 Jan 2019 16:45:35 +0100 Subject: [FieldTrip] Help: sourceanalysis Message-ID: <5c3b5d1f.1c69fb81.9d9a6.0a5b@mx.google.com> Good evening everyone, through the fieldtrip toolbox I solved the direct problem using the FEM method for EEG data. The EEG data are in resting state. Now I have to implement the indirect problem but on the tutorial there is no guide. How should I implement fieldtrip sourceanalysis? I have the sourcemodel, headmodel, leadfield and covariance matrix. I calculated the covariance matrix directly in Matlab. My problem now is to understand how to calculate the average of the EEG data to be given as input to the sourceanalysis. How to calculate an average of resting state data ? thanks Inviato da Posta per Windows 10 -------------- next part -------------- An HTML attachment was scrubbed... URL: From athina.tz at gmail.com Mon Jan 14 07:07:22 2019 From: athina.tz at gmail.com (Athina Tzovara) Date: Sun, 13 Jan 2019 22:07:22 -0800 Subject: [FieldTrip] Announcement for 2 PhD positions Message-ID: Dear all, Applications are invited for 2 PhD students in machine learning & computational neuroscience at the University of Bern, Switzerland. The research focus will be on using machine learning techniques to model electrophysiological data related to epilepsy and consciousness research. The positions will be part of a newly formed group between the Institute of Computer Science and Faculty of Medicine at the University of Bern and will be funded by the Interfaculty Research Cooperation (IRC) project on sleep research. The successful applicants will have the opportunity to work at the intersection of computational and clinical research in neuroscience. They will have access to scalp and intracranial electroencephalography (EEG) data and will get hands-on experience with data analysis and computational techniques. The ideal candidates should have a Master of Science or an equivalent degree in neuroscience, biomedical engineering, computer science, or a related discipline. Prior experience with EEG, machine learning or deep learning are advantageous. Funding is available for 3 years (with evaluation after 1 year) according to Swiss regulations. If you are interested please send one pdf document including your CV, a brief statement of research interests, and the contact details of two references to: athina.tz at gmail.com. Informal inquiries are welcome. Best wishes, Athina Tzovara ----- Athina Tzovara, PhD Helen Wills Neuroscience Institute Knight Cognitive Neuroscience Lab University of California Berkeley Web: https://aath0.github.io/ Tel: +1-510-944-4302 -------------- next part -------------- An HTML attachment was scrubbed... URL: From popwatson at hotmail.com Mon Jan 14 10:03:59 2019 From: popwatson at hotmail.com (Poppy Watson) Date: Mon, 14 Jan 2019 09:03:59 +0000 Subject: [FieldTrip] Identifying bad channels Message-ID: Dear fieldtrippers, I’m following our lab protocol for pre-processing of EEG data – but implementing it in Fieldtrip rather than Brain Vision Analyzer. So far things are great. However, I’m going back to preprocessing stage because ideally I would like to stick as closely to the procedure we use for automated artifact/channel rejection in BVA but am wondering about the most efficient way to implement this in fieldtrip. What I have done in fieldtrip is: 1. Remove channels that were marked as bad during recording and interpolated them. 2. After lots of playing around, find zvalue cutoff settings that I’m comfortable with and use the same settings on every participant for jump artifacts, muscle artifacts and eye movements and remove these using ft_rejectartifact (conservative but easily replicable). 3. I then quickly scrolled through each trial using ft_rejectvisual to make sure all channels looked ok – any really messy noisy channels I then made a note of and repeated steps 1 and 2 above. I’m not happy with this step 3 however, because it is quite subjective. The way that we identify bad channels in BVA which I would ultimately like to implement is: 1. Mark trials as bad where a channel is present that has: a. Low activity of less than 0.5 microvolts in any 100ms interval b. Noisy activity where the absolute max-min voltage in any 200ms interval is greater than 200 microvolts (sometimes this is 100Uv depends on expected motor activity in paradigm). 2. Identify, for every channel, the percentage of data that is being marked as bad – if this is higher than a given threshold (i.e. 25%), then remove the channel and/or interpolate. 3. Rerun step 1 and remove bad trials. What I am planning to do in Fieldtrip, but would appreciate some input from those more experienced is: 1. Remove trials with eyeblinks etc using the Fieldtrip methods described above 2. Split each trial segment into 100ms or 200ms intervals 3. Calculate the max-min per channel in order to identify intervals that have low voltage or noisy activity etc as per a and b above 4. Keep track of the proportion of trials/intervals that any given channel is identified as bad so that I can remove those channels that are above a threshold (i.e. 25%). Is there a more efficient way to implement something like this? Am I missing out on a great Fieldtrip tool? Please advise Thanks --------------------------------------------------------------------- Poppy Watson --------------------------------------------------------------------- -------------- next part -------------- An HTML attachment was scrubbed... URL: From e.spaak at donders.ru.nl Mon Jan 14 10:29:18 2019 From: e.spaak at donders.ru.nl (Eelke Spaak) Date: Mon, 14 Jan 2019 10:29:18 +0100 Subject: [FieldTrip] Help: sourceanalysis In-Reply-To: <5c3b5d1f.1c69fb81.9d9a6.0a5b@mx.google.com> References: <5c3b5d1f.1c69fb81.9d9a6.0a5b@mx.google.com> Message-ID: Hi Valentina, The computation of the beamformer spatial filter only uses the covariance matrix, and does not use the average data itself. Since you have the covariance matrix computed "manually", you should be able to wrap it in a FieldTrip-style timelock structure: tl = []; tl.cov = cov; and put some zeroes of appropriate size in tl.avg. Then, make sure to use cfg.lcmv.keepfilter = 'yes' in the call to ft_sourceanalysis, and get the filters out from the resulting source structure. (Note that the dipole moments in the source structure will be meaningless since the avg data was fake; but the filters are still meaningful.) After that, simply multiply your sensor-level resting state data with the spatial filters to get the source time courses. I hope that helps. (If you have no idea what I'm talking about, then it's probably a good idea to go through some tutorials and examples (including about so-called "virtual channels") anyway using event-related fields before attempting this on resting state data.) Cheers, Eelke On Sun, 13 Jan 2019 at 16:45, Valentina Nasato wrote: > > Good evening everyone, > > through the fieldtrip toolbox I solved the direct problem using the FEM method for EEG data. The EEG data are in resting state. Now I have to implement the indirect problem but on the tutorial there is no guide. How should I implement fieldtrip sourceanalysis? I have the sourcemodel, headmodel, leadfield and covariance matrix. I calculated the covariance matrix directly in Matlab. My problem now is to understand how to calculate the average of the EEG data to be given as input to the sourceanalysis. How to calculate an average of resting state data ? > > thanks > > > > > > Inviato da Posta per Windows 10 > > > > _______________________________________________ > fieldtrip mailing list > https://mailman.science.ru.nl/mailman/listinfo/fieldtrip > https://doi.org/10.1371/journal.pcbi.1002202 From Silvia.Formica at UGent.be Mon Jan 14 10:39:17 2019 From: Silvia.Formica at UGent.be (Silvia Formica) Date: Mon, 14 Jan 2019 09:39:17 +0000 Subject: [FieldTrip] EEG source reconstruction with template - elec file In-Reply-To: <1547136727937.84008@donders.ru.nl> References: <1547112671759.73597@UGent.be>, , <1547132711097.19484@UGent.be>,<1547136727937.84008@donders.ru.nl> Message-ID: <1547458759308.35828@UGent.be> Thank you all for your very useful contributions! I noticed that in my case the method "project" gives nice results, so I'm currently using that one. Cheers, Silvia ________________________________ From: fieldtrip on behalf of Homölle, S. (Simon) Sent: 10 January 2019 17:12 To: FieldTrip discussion list Subject: Re: [FieldTrip] EEG source reconstruction with template - elec file Dear Silvia, I also can suggest you look at some of the tutorials here and here​. Especially the latter part of both tutorials deal with your current problem! Cheers, Simon Homölle PhD Candidate Donders Institute for Brain, Cognition and Behaviour Centre for Cognitive Neuroimaging Radboud University Nijmegen Phone: +31-(0)24-36-65059 ________________________________ From: fieldtrip on behalf of Silvia Formica Sent: Thursday, January 10, 2019 4:05 PM To: FieldTrip discussion list Subject: Re: [FieldTrip] EEG source reconstruction with template - elec file Dear Julian, thanks for your quick response! You are absolutely right, my problem was that I was not creating the elec file correctly as a struct with the fields chanpos, elecpos and label. I'm now facing another problem, though. I'm trying to use ft_electroderealign, but I can't seem to achieve a satisfying result. Here is what I am doing: cfg = []; cfg.method = 'headshape'; % cfg.warp = cfg.elec = elec; cfg.headshape = vol.bnd(1); elec_new = ft_electroderealign(cfg); I then try to plot overlaid the skin surface as loaded from 'standard_skin_14038.vol' and the new electrode location but I get inconsistent results, the electrodes are always inside the head. I tried different warping methods without success. This is the closest I managed to get: [cid:809f04f6-d9d9-4e7d-b722-79f7a535c0fd] Do you have any recommendation on how to better align the electrodes to the template? Thanks! Silvia ________________________________ From: fieldtrip on behalf of Julian Keil Sent: 10 January 2019 11:58 To: FieldTrip discussion list Subject: Re: [FieldTrip] EEG source reconstruction with template - elec file Dear Silvia, how is the electrode location information from the BioSemi website not enough? Basically, you can create your own electrode definition by giving the labels and locations to a structure, e.g. elec.label{1} = 'Fp1'; elec.chanpos(1,:) = [-27.0333934563814, 83.2002299946862, -3.05493522574547]; or for all your electrodes in one go: elec.label = {'Fp1','AF7','AF3','F1','F5'}; elec.chanpos = [-27.0333934563814, 83.2002299946862, -3.05493522574547;... -51.4205700085246, 70.7743429000555, -3.05493522574547;... -35.5608995849164, 76.2605952593987, 24.1279774030766;... -25.1195714566887, 62.1731210759014, 56.2665567427342;... -47.7073482911603, 58.9136687505812, 43.7676114900325]; plot3(elec.chanpos(:,1),elec.chanpos(:,2),elec.chanpos(:,3),'*') or of course read them more elegantly from a text file ;-) It might be a good idea to double check the alignment with the template headmodel afterwards using ft_electroderealign You can then use this elec structure in all subsequent analyses. I hope that helps, Julian On Thu, Jan 10, 2019 at 10:59 AM Silvia Formica > wrote: Dear all, I have a EEG dataset, collected with a Biosemi system with 64 channels. I don't have the individual anatomical data for each participant, but I want to perform source reconstruction to have at least a rough localization of the activation I find. Therefore, I intend to use the templates provided by fieldtrip. If I understand correctly, independently of the source modelling technique that I will choose to use, I need the following information: 1) the head model : this would be the template 'standard_bem' 2) the source model : the template 'cortex_5124.surf.gii' 3) the elec information :​ this file should describe the spatial configuration of the electrodes, but I can't retrieve it. I don't think any of the templates available fits my data (they all have more than 64 channels and different configurations). I tried to use the function ft_read_sens on my data but I get the following error elec = ft_read_sens([data_filt5.mat'],'senstype','eeg'); Undefined function or variable 'lab'. Error in channelposition (line 316) n = size(lab,2); Error in ft_datatype_sens (line 349) [chanpos, chanori, lab] = channelposition(sens); Error in ft_datatype_sens (line 158) sens = ft_datatype_sens(sens, 'version', '2011v2'); Error in ft_read_sens (line 380) sens = ft_datatype_sens(sens); I found the cartesian coordinates of the electrodes on the Biosemi website, with the x y z coordinates for each electrodes (as the little example I'm giving below, but that's not enough. Channel x y z Fp1 -27.0333934563814 83.2002299946862 -3.05493522574547 AF7 -51.4205700085246 70.7743429000555 -3.05493522574547 AF3 -35.5608995849164 76.2605952593987 24.1279774030766 F1 -25.1195714566887 62.1731210759014 56.2665567427342 F5 -47.7073482911603 58.9136687505812 43.7676114900325 ... ​ ... ... ... Do you have any suggestions on how to create a correct elec file fitting my data? Any help would be highly appreciated! Silvia _______________________________________________ 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: pastedImage.png Type: image/png Size: 82198 bytes Desc: pastedImage.png URL: From elene.beitia at alumni.mondragon.edu Mon Jan 14 10:52:04 2019 From: elene.beitia at alumni.mondragon.edu (Elene Beitia Loinaz) Date: Mon, 14 Jan 2019 10:52:04 +0100 Subject: [FieldTrip] Source reconstructions Message-ID: Dear fieldtripers, I am tryng to visualize the electrodes and the headmodel at the same time. The problem that I have is that I need to reescale one of them. I have tried to function ft_convert_units, but I just obtain the image attached. The structure of the information are the next ones, *headmodel:* bnd: [1×3 struct] cond: [0.3300 0.0041 0.3300] mat: [3000×3000 double] type: 'dipoli' unit: 'mm' *electrodes:* pnt: [133×3 double] label: {1×133 cell} Code that I have used to obtained the image below: ft_determine_coordsys (vol, 'interactive','no') figure; sens=data.elec; sens=ft_convert_units(sens, 'cm'); ft_plot_vol(vol,'facecolor','skin','edgecolor','none') ft_plot_sens(sens,'elecsize',10) camlight alpha 0.5 If somebody could help my I would be very grateful, Elene [image: image.png] -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image.png Type: image/png Size: 78865 bytes Desc: not available URL: From dlozanosoldevilla at gmail.com Mon Jan 14 11:19:36 2019 From: dlozanosoldevilla at gmail.com (Diego Lozano-Soldevilla) Date: Mon, 14 Jan 2019 11:19:36 +0100 Subject: [FieldTrip] Source reconstructions In-Reply-To: References: Message-ID: Dear Elene Please make sure the units of your headmodel (mm in your case) and sensors (cm) are the same. Best Diego On Mon, 14 Jan 2019 at 11:17, Elene Beitia Loinaz < elene.beitia at alumni.mondragon.edu> wrote: > Dear fieldtripers, > > I am tryng to visualize the electrodes and the headmodel at the same time. > The problem that I have is that I need to reescale one of them. > > I have tried to function ft_convert_units, but I just obtain the image > attached. > > The structure of the information are the next ones, > *headmodel:* > bnd: [1×3 struct] > cond: [0.3300 0.0041 0.3300] > mat: [3000×3000 double] > type: 'dipoli' > unit: 'mm' > *electrodes:* > pnt: [133×3 double] > label: {1×133 cell} > > Code that I have used to obtained the image below: > ft_determine_coordsys (vol, 'interactive','no') > > > figure; > sens=data.elec; > sens=ft_convert_units(sens, 'cm'); > ft_plot_vol(vol,'facecolor','skin','edgecolor','none') > ft_plot_sens(sens,'elecsize',10) > camlight > alpha 0.5 > > If somebody could help my I would be very grateful, > > Elene > > > [image: image.png] > _______________________________________________ > 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 S.Homolle at donders.ru.nl Mon Jan 14 11:24:47 2019 From: S.Homolle at donders.ru.nl (=?utf-8?B?SG9tw7ZsbGUsIFMuIChTaW1vbik=?=) Date: Mon, 14 Jan 2019 10:24:47 +0000 Subject: [FieldTrip] EEG source reconstruction with template - elec file In-Reply-To: <1547458759308.35828@UGent.be> References: <1547112671759.73597@UGent.be>, , <1547132711097.19484@UGent.be>, <1547136727937.84008@donders.ru.nl>, <1547458759308.35828@UGent.be> Message-ID: <1547461487128.16656@donders.ru.nl> Dear Silvia, So in general before considering the method "project", the electrodes need to be quite close to the head surface to yield reasonable results. In the email you sent earlier you see the electrode position around Cz are quite far away from the head. The method "project" works in such a way that it tries to find the closest surface point for each electrode, and then projects it onto that spot. Therefore, for electrodes that are far away from the head surface unexpected projections can happen. So what I suggest to is that before you use "project", you should use the method "interactive" to improve the electrode positions in such a way that the electrodes have a better alignment to the head surface. Cheers, Simon Homölle PhD Candidate Donders Institute for Brain, Cognition and Behaviour Centre for Cognitive Neuroimaging Radboud University Nijmegen Phone: +31-(0)24-36-65059 ________________________________ From: fieldtrip on behalf of Silvia Formica Sent: Monday, January 14, 2019 10:39 AM To: FieldTrip discussion list Subject: Re: [FieldTrip] EEG source reconstruction with template - elec file Thank you all for your very useful contributions! I noticed that in my case the method "project" gives nice results, so I'm currently using that one. Cheers, Silvia ________________________________ From: fieldtrip on behalf of Homölle, S. (Simon) Sent: 10 January 2019 17:12 To: FieldTrip discussion list Subject: Re: [FieldTrip] EEG source reconstruction with template - elec file Dear Silvia, I also can suggest you look at some of the tutorials here and here​. Especially the latter part of both tutorials deal with your current problem! Cheers, Simon Homölle PhD Candidate Donders Institute for Brain, Cognition and Behaviour Centre for Cognitive Neuroimaging Radboud University Nijmegen Phone: +31-(0)24-36-65059 ________________________________ From: fieldtrip on behalf of Silvia Formica Sent: Thursday, January 10, 2019 4:05 PM To: FieldTrip discussion list Subject: Re: [FieldTrip] EEG source reconstruction with template - elec file Dear Julian, thanks for your quick response! You are absolutely right, my problem was that I was not creating the elec file correctly as a struct with the fields chanpos, elecpos and label. I'm now facing another problem, though. I'm trying to use ft_electroderealign, but I can't seem to achieve a satisfying result. Here is what I am doing: cfg = []; cfg.method = 'headshape'; % cfg.warp = cfg.elec = elec; cfg.headshape = vol.bnd(1); elec_new = ft_electroderealign(cfg); I then try to plot overlaid the skin surface as loaded from 'standard_skin_14038.vol' and the new electrode location but I get inconsistent results, the electrodes are always inside the head. I tried different warping methods without success. This is the closest I managed to get: [cid:809f04f6-d9d9-4e7d-b722-79f7a535c0fd] Do you have any recommendation on how to better align the electrodes to the template? Thanks! Silvia ________________________________ From: fieldtrip on behalf of Julian Keil Sent: 10 January 2019 11:58 To: FieldTrip discussion list Subject: Re: [FieldTrip] EEG source reconstruction with template - elec file Dear Silvia, how is the electrode location information from the BioSemi website not enough? Basically, you can create your own electrode definition by giving the labels and locations to a structure, e.g. elec.label{1} = 'Fp1'; elec.chanpos(1,:) = [-27.0333934563814, 83.2002299946862, -3.05493522574547]; or for all your electrodes in one go: elec.label = {'Fp1','AF7','AF3','F1','F5'}; elec.chanpos = [-27.0333934563814, 83.2002299946862, -3.05493522574547;... -51.4205700085246, 70.7743429000555, -3.05493522574547;... -35.5608995849164, 76.2605952593987, 24.1279774030766;... -25.1195714566887, 62.1731210759014, 56.2665567427342;... -47.7073482911603, 58.9136687505812, 43.7676114900325]; plot3(elec.chanpos(:,1),elec.chanpos(:,2),elec.chanpos(:,3),'*') or of course read them more elegantly from a text file ;-) It might be a good idea to double check the alignment with the template headmodel afterwards using ft_electroderealign You can then use this elec structure in all subsequent analyses. I hope that helps, Julian On Thu, Jan 10, 2019 at 10:59 AM Silvia Formica > wrote: Dear all, I have a EEG dataset, collected with a Biosemi system with 64 channels. I don't have the individual anatomical data for each participant, but I want to perform source reconstruction to have at least a rough localization of the activation I find. Therefore, I intend to use the templates provided by fieldtrip. If I understand correctly, independently of the source modelling technique that I will choose to use, I need the following information: 1) the head model : this would be the template 'standard_bem' 2) the source model : the template 'cortex_5124.surf.gii' 3) the elec information :​ this file should describe the spatial configuration of the electrodes, but I can't retrieve it. I don't think any of the templates available fits my data (they all have more than 64 channels and different configurations). I tried to use the function ft_read_sens on my data but I get the following error elec = ft_read_sens([data_filt5.mat'],'senstype','eeg'); Undefined function or variable 'lab'. Error in channelposition (line 316) n = size(lab,2); Error in ft_datatype_sens (line 349) [chanpos, chanori, lab] = channelposition(sens); Error in ft_datatype_sens (line 158) sens = ft_datatype_sens(sens, 'version', '2011v2'); Error in ft_read_sens (line 380) sens = ft_datatype_sens(sens); I found the cartesian coordinates of the electrodes on the Biosemi website, with the x y z coordinates for each electrodes (as the little example I'm giving below, but that's not enough. Channel x y z Fp1 -27.0333934563814 83.2002299946862 -3.05493522574547 AF7 -51.4205700085246 70.7743429000555 -3.05493522574547 AF3 -35.5608995849164 76.2605952593987 24.1279774030766 F1 -25.1195714566887 62.1731210759014 56.2665567427342 F5 -47.7073482911603 58.9136687505812 43.7676114900325 ... ​ ... ... ... Do you have any suggestions on how to create a correct elec file fitting my data? Any help would be highly appreciated! Silvia _______________________________________________ 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: pastedImage.png Type: image/png Size: 82198 bytes Desc: pastedImage.png URL: From elene.beitia at alumni.mondragon.edu Mon Jan 14 11:25:11 2019 From: elene.beitia at alumni.mondragon.edu (Elene Beitia Loinaz) Date: Mon, 14 Jan 2019 11:25:11 +0100 Subject: [FieldTrip] Source reconstructions In-Reply-To: References: Message-ID: Thank you Diego, I already know that. But if I put it in 'mm' it is even smaller, that is way I put in 'cm'. As I have writen above the structure of the electrodes does not have units, I think that the problem is there. *electrodes:* pnt: [133×3 double] label: {1×133 cell} If someone could help me to obtain the same size for the electrodes and for the headmodel I would be very grateful, Elene. Hau idatzi du Diego Lozano-Soldevilla (dlozanosoldevilla at gmail.com) erabiltzaileak (2019 urt. 14, al. (11:19)): > Dear Elene > Please make sure the units of your headmodel (mm in your case) and sensors > (cm) are the same. > Best > Diego > > On Mon, 14 Jan 2019 at 11:17, Elene Beitia Loinaz < > elene.beitia at alumni.mondragon.edu> wrote: > >> Dear fieldtripers, >> >> I am tryng to visualize the electrodes and the headmodel at the same >> time. The problem that I have is that I need to reescale one of them. >> >> I have tried to function ft_convert_units, but I just obtain the image >> attached. >> >> The structure of the information are the next ones, >> *headmodel:* >> bnd: [1×3 struct] >> cond: [0.3300 0.0041 0.3300] >> mat: [3000×3000 double] >> type: 'dipoli' >> unit: 'mm' >> *electrodes:* >> pnt: [133×3 double] >> label: {1×133 cell} >> >> Code that I have used to obtained the image below: >> ft_determine_coordsys (vol, 'interactive','no') >> >> >> figure; >> sens=data.elec; >> sens=ft_convert_units(sens, 'cm'); >> ft_plot_vol(vol,'facecolor','skin','edgecolor','none') >> ft_plot_sens(sens,'elecsize',10) >> camlight >> alpha 0.5 >> >> If somebody could help my I would be very grateful, >> >> Elene >> >> >> [image: image.png] >> _______________________________________________ >> 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 S.Homolle at donders.ru.nl Mon Jan 14 11:36:02 2019 From: S.Homolle at donders.ru.nl (=?iso-8859-1?Q?Hom=F6lle=2C_S=2E_=28Simon=29?=) Date: Mon, 14 Jan 2019 10:36:02 +0000 Subject: [FieldTrip] Source reconstructions In-Reply-To: References: Message-ID: <1547462162221.35460@donders.ru.nl> Dear Elene, Looking at the structure of "electrodes", I see that there is no information about the units. Do you know in which unit this electrodes are expressed? How did you generate this structure? If I see correctly in the code ft_plot_sens assumes "mm" if no unit is specified. This means your electrode structure is not expressed in mm. As the unit information is missing, ft_convert_units will not work on your electrodes. So you should add this information to the structure, and then you would be able to use ft_convert_units. Hope this resolves your issue! Cheers Simon Homölle PhD Candidate Donders Institute for Brain, Cognition and Behaviour Centre for Cognitive Neuroimaging Radboud University Nijmegen Phone: +31-(0)24-36-65059 ________________________________ From: fieldtrip on behalf of Elene Beitia Loinaz Sent: Monday, January 14, 2019 10:52 AM To: FieldTrip discussion list Subject: [FieldTrip] Source reconstructions Dear fieldtripers, I am tryng to visualize the electrodes and the headmodel at the same time. The problem that I have is that I need to reescale one of them. I have tried to function ft_convert_units, but I just obtain the image attached. The structure of the information are the next ones, headmodel: bnd: [1×3 struct] cond: [0.3300 0.0041 0.3300] mat: [3000×3000 double] type: 'dipoli' unit: 'mm' electrodes: pnt: [133×3 double] label: {1×133 cell} Code that I have used to obtained the image below: ft_determine_coordsys (vol, 'interactive','no') figure; sens=data.elec; sens=ft_convert_units(sens, 'cm'); ft_plot_vol(vol,'facecolor','skin','edgecolor','none') ft_plot_sens(sens,'elecsize',10) camlight alpha 0.5 If somebody could help my I would be very grateful, Elene [image.png] -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image.png Type: image/png Size: 78865 bytes Desc: image.png URL: From e.spaak at donders.ru.nl Mon Jan 14 11:54:55 2019 From: e.spaak at donders.ru.nl (Eelke Spaak) Date: Mon, 14 Jan 2019 11:54:55 +0100 Subject: [FieldTrip] Source reconstructions In-Reply-To: References: Message-ID: Perhaps a stupid question but have you also tried sens = ft_convert_units(sens, 'mm')? Eelke On Mon, 14 Jan 2019 at 10:52, Elene Beitia Loinaz wrote: > > Dear fieldtripers, > > I am tryng to visualize the electrodes and the headmodel at the same time. The problem that I have is that I need to reescale one of them. > > I have tried to function ft_convert_units, but I just obtain the image attached. > > The structure of the information are the next ones, > headmodel: > bnd: [1×3 struct] > cond: [0.3300 0.0041 0.3300] > mat: [3000×3000 double] > type: 'dipoli' > unit: 'mm' > electrodes: > pnt: [133×3 double] > label: {1×133 cell} > > Code that I have used to obtained the image below: > ft_determine_coordsys (vol, 'interactive','no') > > > figure; > sens=data.elec; > sens=ft_convert_units(sens, 'cm'); > ft_plot_vol(vol,'facecolor','skin','edgecolor','none') > ft_plot_sens(sens,'elecsize',10) > camlight > alpha 0.5 > > If somebody could help my I would be very grateful, > > Elene > > > > _______________________________________________ > fieldtrip mailing list > https://mailman.science.ru.nl/mailman/listinfo/fieldtrip > https://doi.org/10.1371/journal.pcbi.1002202 From e.spaak at donders.ru.nl Mon Jan 14 12:53:08 2019 From: e.spaak at donders.ru.nl (Eelke Spaak) Date: Mon, 14 Jan 2019 12:53:08 +0100 Subject: [FieldTrip] Source reconstructions In-Reply-To: References: Message-ID: Ah sorry, I was getting your previous replies with a delay. If 'mm' makes them even smaller, perhaps 'm' is the right unit? In any case, I very strongly suspect that a spatial unit mismatch is the cause of the discrepancy you're seeing. Cheers, Eelke On Mon, 14 Jan 2019 at 11:54, Eelke Spaak wrote: > > Perhaps a stupid question but have you also tried sens = > ft_convert_units(sens, 'mm')? > > Eelke > > > On Mon, 14 Jan 2019 at 10:52, Elene Beitia Loinaz > wrote: > > > > Dear fieldtripers, > > > > I am tryng to visualize the electrodes and the headmodel at the same time. The problem that I have is that I need to reescale one of them. > > > > I have tried to function ft_convert_units, but I just obtain the image attached. > > > > The structure of the information are the next ones, > > headmodel: > > bnd: [1×3 struct] > > cond: [0.3300 0.0041 0.3300] > > mat: [3000×3000 double] > > type: 'dipoli' > > unit: 'mm' > > electrodes: > > pnt: [133×3 double] > > label: {1×133 cell} > > > > Code that I have used to obtained the image below: > > ft_determine_coordsys (vol, 'interactive','no') > > > > > > figure; > > sens=data.elec; > > sens=ft_convert_units(sens, 'cm'); > > ft_plot_vol(vol,'facecolor','skin','edgecolor','none') > > ft_plot_sens(sens,'elecsize',10) > > camlight > > alpha 0.5 > > > > If somebody could help my I would be very grateful, > > > > Elene > > > > > > > > _______________________________________________ > > fieldtrip mailing list > > https://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > https://doi.org/10.1371/journal.pcbi.1002202 From pdhami06 at gmail.com Mon Jan 14 18:26:22 2019 From: pdhami06 at gmail.com (Paul Dhami) Date: Mon, 14 Jan 2019 12:26:22 -0500 Subject: [FieldTrip] Applying Bonferroni Correction to Alpha Parameter Instead of ANOVA Message-ID: Dear Fieldtrip community, I have an ERP experiment with a 2 x 2 design (lets say with one factor having levels A and B and the other having factors 1 and 2), both being within groups measures. As stated in the interaction page, I can't use that to test for an ANOVA design when both factors are within group measures. Instead of running an ANOVA, I was thinking of running separate contrasts of interest, which would be A1 vs A2 and B1 vs B2. My question is: 1) to correct for now the multiple contrasts, would simply setting the alpha parameter (which is used for the inference of accepting or rejecting the null hypothesis) to 0.5/2 be acceptable? What if I wanted to test all possible contrasts, would I simply then divide my alpha parameter by the number of contrasts I have? Any input would be appreciated. Best, Paul -------------- next part -------------- An HTML attachment was scrubbed... URL: From martin.rosenfelder at uni-ulm.de Mon Jan 14 18:29:12 2019 From: martin.rosenfelder at uni-ulm.de (Martin Rosenfelder) Date: Mon, 14 Jan 2019 18:29:12 +0100 Subject: [FieldTrip] redefining data set Message-ID: <21d7-5c3cc700-27-21893940@52196402> Dear Fieldtrip community, I have preprocessed a single dataset with two different conditions ('Swim', 'Rest'). The conditions are stored in the 'eventvalue' field of the cfg as 1x2 cell array. The event values are stored in the 'data_ref.cfg.previous.previous.previous{1,1}.previous.previous.trialdef.eventvalue' field of the data set. Having done the preprocessing I now would like to do ft_timelockanalysis and ft_freqanalysis on the data. Afterwards I statistically compare the two conditions using ft_timelockstatistics and ft_freqstatistics. How can I split the data set according to the event values ('Swim', 'Rest')? I need the event values to split the data set into the two trial classes in the ft_timelockanalysis / ft_freqanalysis and to compare these two conditions. I tried ft_redefinetrial, but do not know how to define the cfg.trials field of this function. % trial redefinition % containing only trials in the 'swim' condition cfg.trials = (1, data_ref.cfg.previous.previous.previous{1,1}.previous.previous.trialdef.eventvalue(1,1)); swim = ft_redefinetrial(cfg,data_ref); % containing only trials in the 'resting' condition cfg.trials = (1, data_ref.cfg.previous.previous.previous{1,1}.previous.previous.trialdef.eventvalue(1,2)); rest = ft_redefinetrial(cfg,data_ref); I hope the description was quite clear. In case, I can provide some more lines of code to clarify the issue. Thank you very much in advance for your advice! Best regards, Martin -- M.Sc.-Psych. Martin Rosenfelder Wissenschaftlicher Mitarbeiter Klinische und Biologische Psychologie Universität Ulm Raum 47.2.259 +49 731-50 26592 martin.rosenfelder at uni-ulm.de From julian.keil at gmail.com Mon Jan 14 18:53:39 2019 From: julian.keil at gmail.com (Julian Keil) Date: Mon, 14 Jan 2019 18:53:39 +0100 Subject: [FieldTrip] redefining data set In-Reply-To: <21d7-5c3cc700-27-21893940@52196402> References: <21d7-5c3cc700-27-21893940@52196402> Message-ID: <1D4E7FC4-1222-43C3-AB4B-D6799C1D7F7A@gmail.com> Dear Martin, I’m not quite sure what you have in the previous…-fields, but cfg.trials need trial indices (e.g. „swim“ is trial [1, 3, 5, 7, 23]). You could use something like find(cfg.previous…{1,1} == 1) to get the indices where your eventvalue matches your category. Please keep in mind though that these „previous“-fields might not get updated if you throw out trials (e.g. due to artefacts), so you need to double-check if the trial selection matches your number of trials in data_ref. Alternatively, you can store condition information in the „trialinfo“-field. This gets updated if you throw out trials, so you don’t have to worry about this. I hope this helps. Best, Julian > Am 14.01.2019 um 18:29 schrieb Martin Rosenfelder : > > Dear Fieldtrip community, > > I have preprocessed a single dataset with two different conditions ('Swim', 'Rest'). The conditions are stored in the 'eventvalue' field of the cfg as 1x2 cell array. The event values are stored in the 'data_ref.cfg.previous.previous.previous{1,1}.previous.previous.trialdef.eventvalue' field of the data set. > Having done the preprocessing I now would like to do ft_timelockanalysis and ft_freqanalysis on the data. Afterwards I statistically compare the two conditions using ft_timelockstatistics and ft_freqstatistics. > How can I split the data set according to the event values ('Swim', 'Rest')? I need the event values to split the data set into the two trial classes in the ft_timelockanalysis / ft_freqanalysis and to compare these two conditions. > > I tried ft_redefinetrial, but do not know how to define the cfg.trials field of this function. > > % trial redefinition > > % containing only trials in the 'swim' condition > cfg.trials = (1, data_ref.cfg.previous.previous.previous{1,1}.previous.previous.trialdef.eventvalue(1,1)); > swim = ft_redefinetrial(cfg,data_ref); > > % containing only trials in the 'resting' condition > cfg.trials = (1, data_ref.cfg.previous.previous.previous{1,1}.previous.previous.trialdef.eventvalue(1,2)); > rest = ft_redefinetrial(cfg,data_ref); > > I hope the description was quite clear. In case, I can provide some more lines of code to clarify the issue. > > Thank you very much in advance for your advice! > > Best regards, > Martin > > -- > M.Sc.-Psych. Martin Rosenfelder > Wissenschaftlicher Mitarbeiter > Klinische und Biologische Psychologie > Universität Ulm > Raum 47.2.259 > +49 731-50 26592 > martin.rosenfelder at uni-ulm.de > > > _______________________________________________ > fieldtrip mailing list > https://mailman.science.ru.nl/mailman/listinfo/fieldtrip > https://doi.org/10.1371/journal.pcbi.1002202 From stephen.whitmarsh at gmail.com Mon Jan 14 19:01:23 2019 From: stephen.whitmarsh at gmail.com (Stephen Whitmarsh) Date: Mon, 14 Jan 2019 19:01:23 +0100 Subject: [FieldTrip] redefining data set In-Reply-To: <21d7-5c3cc700-27-21893940@52196402> References: <21d7-5c3cc700-27-21893940@52196402> Message-ID: Dear Martin, Use ft_selectdata instead of ft_redefinetrial. "cfg.previous.previous.previous{1,1}.previous.previous.trialdef.eventvalue(1,2)" is scary! And I can imagine very inconvenient, as it will move deeper and deeper in to infinite previousnessness. Instead, one of the best 'easter eggs' (i.e. not so well-documented functionality) of FieldTrip is to create extra columns of info in your .trl when using preprocessing to epoch your data. These extra columns will then enter into a field .trialinfo of your data. Most if not all functions, such as ft_selectdata (selecting trials) will update that field. So I advice you to put your eventvalue (as well as RT, response, etc. etc.) as columns in your trialinfo (so same nr. of rows as your nr. of trials). In this way, they will travel with your data, and stay in the same structure and on the same level whatever happens. Cheers, Stephen On Mon, 14 Jan 2019 at 18:47, Martin Rosenfelder < martin.rosenfelder at uni-ulm.de> wrote: > Dear Fieldtrip community, > > I have preprocessed a single dataset with two different conditions > ('Swim', 'Rest'). The conditions are stored in the 'eventvalue' field of > the cfg as 1x2 cell array. The event values are stored in the > 'data_ref.cfg.previous.previous.previous{1,1}.previous.previous.trialdef.eventvalue' > field of the data set. > Having done the preprocessing I now would like to do ft_timelockanalysis > and ft_freqanalysis on the data. Afterwards I statistically compare the two > conditions using ft_timelockstatistics and ft_freqstatistics. > How can I split the data set according to the event values ('Swim', > 'Rest')? I need the event values to split the data set into the two trial > classes in the ft_timelockanalysis / ft_freqanalysis and to compare these > two conditions. > > I tried ft_redefinetrial, but do not know how to define the cfg.trials > field of this function. > > % trial redefinition > > % containing only trials in the 'swim' condition > cfg.trials = (1, > data_ref.cfg.previous.previous.previous{1,1}.previous.previous.trialdef.eventvalue(1,1)); > swim = ft_redefinetrial(cfg,data_ref); > > % containing only trials in the 'resting' condition > cfg.trials = (1, > data_ref.cfg.previous.previous.previous{1,1}.previous.previous.trialdef.eventvalue(1,2)); > rest = ft_redefinetrial(cfg,data_ref); > > I hope the description was quite clear. In case, I can provide some more > lines of code to clarify the issue. > > Thank you very much in advance for your advice! > > Best regards, > Martin > > -- > M.Sc.-Psych. Martin Rosenfelder > Wissenschaftlicher Mitarbeiter > Klinische und Biologische Psychologie > Universität Ulm > Raum 47.2.259 > +49 731-50 26592 > martin.rosenfelder at uni-ulm.de > > > _______________________________________________ > 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 elene.beitia at alumni.mondragon.edu Mon Jan 14 19:03:36 2019 From: elene.beitia at alumni.mondragon.edu (Elene Beitia Loinaz) Date: Mon, 14 Jan 2019 19:03:36 +0100 Subject: [FieldTrip] Source reconstructions In-Reply-To: References: Message-ID: Thank you, that was the problem!!! El lun., 14 ene. 2019 12:53, Eelke Spaak escribió: > Ah sorry, I was getting your previous replies with a delay. If 'mm' > makes them even smaller, perhaps 'm' is the right unit? In any case, I > very strongly suspect that a spatial unit mismatch is the cause of the > discrepancy you're seeing. > > Cheers, > Eelke > > On Mon, 14 Jan 2019 at 11:54, Eelke Spaak wrote: > > > > Perhaps a stupid question but have you also tried sens = > > ft_convert_units(sens, 'mm')? > > > > Eelke > > > > > > On Mon, 14 Jan 2019 at 10:52, Elene Beitia Loinaz > > wrote: > > > > > > Dear fieldtripers, > > > > > > I am tryng to visualize the electrodes and the headmodel at the same > time. The problem that I have is that I need to reescale one of them. > > > > > > I have tried to function ft_convert_units, but I just obtain the image > attached. > > > > > > The structure of the information are the next ones, > > > headmodel: > > > bnd: [1×3 struct] > > > cond: [0.3300 0.0041 0.3300] > > > mat: [3000×3000 double] > > > type: 'dipoli' > > > unit: 'mm' > > > electrodes: > > > pnt: [133×3 double] > > > label: {1×133 cell} > > > > > > Code that I have used to obtained the image below: > > > ft_determine_coordsys (vol, 'interactive','no') > > > > > > > > > figure; > > > sens=data.elec; > > > sens=ft_convert_units(sens, 'cm'); > > > ft_plot_vol(vol,'facecolor','skin','edgecolor','none') > > > ft_plot_sens(sens,'elecsize',10) > > > camlight > > > alpha 0.5 > > > > > > If somebody could help my I would be very grateful, > > > > > > Elene > > > > > > > > > > > > _______________________________________________ > > > 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 J.Verhoef at donders.ru.nl Tue Jan 15 11:18:18 2019 From: J.Verhoef at donders.ru.nl (Verhoef, J.P. (Julia)) Date: Tue, 15 Jan 2019 10:18:18 +0000 Subject: [FieldTrip] Postdoc position in Linguistics for Research Consortium 'Language in Interaction' (1, 0 fte) Message-ID: Postdoc position in Linguistics for Research Consortium 'Language in Interaction' (1,0 fte) Dutch Research Consortium 'Language in Interaction' Application deadline: February 17, 2019, 23:59 CET [Logo][Logo NWO] Responsibilities The Language in Interaction research consortium invites applications for a postdoctoral position in Linguistics. We are looking for a candidate with a background in theoretical and/or computational linguistics. You will contribute to the integration of linguistic expertise into the empirical research performed by teams of researchers in our consortium that are collaborating to collectively address the key questions of our field. You will be provided the opportunity to conduct research in one or more research areas relevant to the position. Supervision of BSc, MSc and PhD projects will be part of your responsibilities. You will be provided with budgetary resources for travel, materials and lab-use. This position provides the opportunity for conducting world-class research as a member of an interdisciplinary team. Moreover, it will provide the opportunity to contribute to developing a theoretical framework for our understanding of the human language faculty. Work environment The Netherlands has an outstanding track record in the language sciences. The research consortium ‘Language in Interaction’, sponsored by a large grant from the Netherlands Organization for Scientific research (NWO), brings together many of the excellent research groups in the Netherlands with a research programme on the foundations of language. In addition to excellence in the domain of language and related relevant fields of cognition, our consortium provides state-of-the-art research facilities and a research team with ample experience in the complex research methods that will be invoked to address the scientific questions at the highest level of methodological sophistication. These include methods from genetics, neuroimaging, computational modelling, and patient-related research. This consortium realizes both quality and critical mass for studying human language at a scale not easily found anywhere else. We have identified five Big Questions (BQ) that are central to our understanding of the human language faculty. These questions are interrelated at multiple levels. Teams of researchers will collaborate to collectively address these key questions of our field. Our five Big Questions are: BQ1: The nature of the mental lexicon: How to bridge neurobiology and psycholinguistic theory by computational modelling? BQ2: What are the characteristics and consequences of internal brain organization for language? BQ3: Creating a shared cognitive space: How is language grounded in and shaped by communicative settings of interacting people? BQ4: Variability in language processing and in language learning: Why does the ability to learn language change with age? How can we characterise and map individual language skills in relation to the population distribution? BQ5: How are other cognitive systems shaped by the presence of a language system in humans? Successful candidates will be appointed at one of the consortium’s home institutions, depending on the position applied for. All successful candidates will become members of our Big Question teams. The research is conducted in an international setting at all participating institutions. English is the lingua franca. You will be appointed at the Max Planck Institute for Psycholinguistics, Nijmegen, The Netherlands. You will be supervised by Peter Hagoort, programme director of the Language in Interaction consortium. The research is conducted in an international setting at all participating institutions. English is the lingua franca. What we expect from you We are looking for highly motivated candidates to enrich a unique consortium of researchers that aims to unravel the neurocognitive mechanisms of language at multiple levels. The goal is to understand both the universality and the variability of the human language faculty from genes to behaviour. · a PhD in Linguistics; · an integrative mindset; · a theory-driven approach; · good communication skills; · strong motivation; · excellent proficiency in written and spoken English. What we have to offer · Full-time position (39 hours per week) with a term of appointment of 4 years. · The salary is according to the German TVöD (Tarifvertrag für den öffentlichen Dienst) and is classified in salary group E13 (depending on the experience of the applicant between EUR 3.827,03 and EUR 5.683,28 gross per month, based on a full-time employment). · In addition to the salary: an 8% holiday allowance · The Max Planck Institute involved has a number of regulations that make it possible for employees to create a good work-life balance. Other Information The institute involved is an equal opportunity employer, committed to building a culturally diverse intellectual community, and as such encourages applications from women and minorities. Would you like to know more? Further information on: the Language in Interaction Consortium. Further information on: Donders Institute for Brain, Cognition and Behaviour For more information about this vacancy, please contact: Prof. dr. Peter Hagoort, programme director Language in Interaction and director of DCCN and MPI Telephone: +31 24 3610648, +31 24 3521301 E-mail: p.hagoort at donders.ru.nl Are you interested? Please submit your application (attn. of Prof. dr. P. Hagoort) to j.verhoef at donders.ru.nl in electronic form. Your application should include (and be limited to) the following attachments: · a cover letter, · your curriculum vitae, including a list of publications and the names of at least two persons who can provide references. Application deadline: February 17, 2019, 23:59 CET. Kind regards, Julia Verhoef Secretary - Language in Interaction Consortium Radboud University | Donders Centre for Cognitive Neuroimaging (DCCN) Room 0.026 Kapittelweg 29, 6525 EN Nijmegen, The Netherlands P.O. Box 9101, 6500 HB, Nijmegen, The Netherlands |T: +31 (0)24 3666272 E: J.Verhoef at donders.ru.nll|Office hours: 9-14 hr on Mon - Fri Follow Language in Interaction on Twitter Like Language in Interaction on Facebook -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image004.jpg Type: image/jpeg Size: 40202 bytes Desc: image004.jpg URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image005.jpg Type: image/jpeg Size: 2461 bytes Desc: image005.jpg URL: From martin.rosenfelder at uni-ulm.de Tue Jan 15 16:20:03 2019 From: martin.rosenfelder at uni-ulm.de (Martin Rosenfelder) Date: Tue, 15 Jan 2019 16:20:03 +0100 Subject: [FieldTrip] =?utf-8?b?Pz09P3V0Zi04P3E/ICByZWRlZmluaW5nIGRhdGEg?= =?utf-8?q?set?= In-Reply-To: Message-ID: <2bb2-5c3dfa00-13-26c45a40@4319113> Dear Stephen, Thank you very much for the hint on ft_selectdata. I tried to build the structure for .trialinfo as you described it in your reply. I did this creating a structure array with the eventvalues as elements. Then I concatenated the .trl matrix and the event value matrix. This however failed, since .trl is a double array and the event value matrix is a struct array. I double-checked that the nr. of rows in the two matrices match each other (120 elements). Is there a way to add the event value matrix (120x1 struct) to the .trl matrix (120x3 double)? Best, Martin -- M.Sc.-Psych. Martin Rosenfelder Wissenschaftlicher Mitarbeiter Klinische und Biologische Psychologie Universität Ulm Raum 47.2.259 +49 731-50 26592 martin.rosenfelder at uni-ulm.de Am Montag, 14. Januar 2019 19:01 CET, Stephen Whitmarsh schrieb: > Dear Martin, > > Use ft_selectdata instead of ft_redefinetrial. > > "cfg.previous.previous.previous{1,1}.previous.previous.trialdef.eventvalue(1,2)" > is scary! And I can imagine very inconvenient, as it will move deeper and > deeper in to infinite previousnessness. > Instead, one of the best 'easter eggs' (i.e. not so well-documented > functionality) of FieldTrip is to create extra columns of info in your .trl > when using preprocessing to epoch your data. These extra columns will then > enter into a field .trialinfo of your data. Most if not all functions, such > as ft_selectdata (selecting trials) will update that field. So I advice you > to put your eventvalue (as well as RT, response, etc. etc.) as columns in > your trialinfo (so same nr. of rows as your nr. of trials). In this way, > they will travel with your data, and stay in the same structure and on the > same level whatever happens. > > Cheers, > Stephen > > > On Mon, 14 Jan 2019 at 18:47, Martin Rosenfelder < > martin.rosenfelder at uni-ulm.de> wrote: > > > Dear Fieldtrip community, > > > > I have preprocessed a single dataset with two different conditions > > ('Swim', 'Rest'). The conditions are stored in the 'eventvalue' field of > > the cfg as 1x2 cell array. The event values are stored in the > > 'data_ref.cfg.previous.previous.previous{1,1}.previous.previous.trialdef.eventvalue' > > field of the data set. > > Having done the preprocessing I now would like to do ft_timelockanalysis > > and ft_freqanalysis on the data. Afterwards I statistically compare the two > > conditions using ft_timelockstatistics and ft_freqstatistics. > > How can I split the data set according to the event values ('Swim', > > 'Rest')? I need the event values to split the data set into the two trial > > classes in the ft_timelockanalysis / ft_freqanalysis and to compare these > > two conditions. > > > > I tried ft_redefinetrial, but do not know how to define the cfg.trials > > field of this function. > > > > % trial redefinition > > > > % containing only trials in the 'swim' condition > > cfg.trials = (1, > > data_ref.cfg.previous.previous.previous{1,1}.previous.previous.trialdef.eventvalue(1,1)); > > swim = ft_redefinetrial(cfg,data_ref); > > > > % containing only trials in the 'resting' condition > > cfg.trials = (1, > > data_ref.cfg.previous.previous.previous{1,1}.previous.previous.trialdef.eventvalue(1,2)); > > rest = ft_redefinetrial(cfg,data_ref); > > > > I hope the description was quite clear. In case, I can provide some more > > lines of code to clarify the issue. > > > > Thank you very much in advance for your advice! > > > > Best regards, > > Martin > > > > -- > > M.Sc.-Psych. Martin Rosenfelder > > Wissenschaftlicher Mitarbeiter > > Klinische und Biologische Psychologie > > Universität Ulm > > Raum 47.2.259 > > +49 731-50 26592 > > martin.rosenfelder at uni-ulm.de > > > > > > _______________________________________________ > > fieldtrip mailing list > > https://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > https://doi.org/10.1371/journal.pcbi.1002202 > > From agnese.zazio at hotmail.it Tue Jan 15 16:36:17 2019 From: agnese.zazio at hotmail.it (Agnese Zazio) Date: Tue, 15 Jan 2019 15:36:17 +0000 Subject: [FieldTrip] Source reconstruction for time-locked EEG data at the group level Message-ID: Dear all, I'm interested in identifying sources of the EEG evoked components I get in the grand average, and I'm not going to apply further statistical analyses on sources. I followed the Fieldtrip tutorial for source reconstruction of MEG event-related fields (http://www.fieldtriptoolbox.org/tutorial/minimumnormestimate/), which is on data from a single subject, and I'm not sure about how to proceed at the group level. I concatenated all trials from all subjects to calculate the covariance and computing the grand average with "ft_timelockanalysis". First, is this an appropriate way to apply mne method in "ft_sourceanalysis" at the group level? Moreover, I was looking for a good way to check the results I obtained, for example by applying another method, such as beamformer. Is it reasonable to think that the two methods would lead to comparable results on time-locked data? If yes, how can I apply the beamformer method in "ft_sourceanalysis"? I replaced the cfg.method field (mne with lcmv), but the output I get does not contain information about time. Here's the code I used. I don't have individual MRIs, thus I am using templates for the headmodel (standard_bem) and the sourcemodel (cortex_5124.surf.gii). --- % create a preprocessed structure cfg =[]; cfg.channel = {'EEG'}; cfg.demean = 'yes'; cfg.baselinewindow = [-0.1 0]; data_prepr = ft_preprocessing(cfg, data_long); cfg =[]; cfg.covariance = 'yes'; cfg.channel ={'EEG'}; cfg.covariancewindow = [0 0.4]; data_tlck = ft_timelockanalysis (cfg, data_prepr); % forward solution [prepare leadfield] cfg = []; cfg.elec = elec; cfg.channel = {'EEG'}; cfg.headmodel = vol; % volume conduction model cfg.grid = ft_read_headshape('cortex_5124.surf.gii'); cfg.grid.pos = sourcemodel.pos; cfg.grid.inside = 1:size(sourcemodel.pos,1); % all source points are inside of the brain leadfield = ft_prepare_leadfield(cfg); % inverse solution (method: mne) cfg = []; cfg.method = 'mne'; %'lcmv'; cfg.elec = elec; cfg.channel = {'EEG'}; cfg.grid = leadfield; cfg.headmodel = vol; cfg.mne.prewhiten = 'yes'; cfg.mne.lambda = 3; cfg.mne.scalesourcecov = 'yes'; source_bial_mne = ft_sourceanalysis(cfg, data_tlck); %%plot bnd.pos = sourcespace.pos; bnd.tri = sourcespace.tri; m=source_bial_mne.avg.pow(:,124); % point in time I want to plot figure; ft_plot_mesh(bnd, 'vertexcolor', m); --- Any help would be really appreciated, thanks in advance! Best, Agnese --- Agnese Zazio, PhD Student Cognitive Neuroscience Section, IRCCS Saint John of God Clinical Research Centre (Brescia, Italy) -------------- next part -------------- An HTML attachment was scrubbed... URL: From stephen.whitmarsh at gmail.com Tue Jan 15 17:40:46 2019 From: stephen.whitmarsh at gmail.com (Stephen Whitmarsh) Date: Tue, 15 Jan 2019 17:40:46 +0100 Subject: [FieldTrip] ?==?utf-8?q? redefining data set In-Reply-To: <2bb2-5c3dfa00-13-26c45a40@4319113> References: <2bb2-5c3dfa00-13-26c45a40@4319113> Message-ID: Hi Martin, No indeed, your conditions/RT/events should indeed be (re)coded as single values. This also makes selecting trials etc. much easier with logical expressions, e.g. you can then simply do cfg.trials = (data.trialinfo(:,1) == 3 && data.trialinfo(:,2) > 0.5, where the first column e.g. is your condition, and the second RT, to just give an example. Cheers, Stephen On Tue, 15 Jan 2019 at 17:35, Martin Rosenfelder < martin.rosenfelder at uni-ulm.de> wrote: > Dear Stephen, > > Thank you very much for the hint on ft_selectdata. > > I tried to build the structure for .trialinfo as you described it in your > reply. I did this creating a structure array with the eventvalues as > elements. > Then I concatenated the .trl matrix and the event value matrix. This > however failed, since .trl is a double array and the event value matrix is > a struct array. > I double-checked that the nr. of rows in the two matrices match each other > (120 elements). > > Is there a way to add the event value matrix (120x1 struct) to the .trl > matrix (120x3 double)? > > Best, > Martin > > > -- > M.Sc.-Psych. Martin Rosenfelder > Wissenschaftlicher Mitarbeiter > Klinische und Biologische Psychologie > Universität Ulm > Raum 47.2.259 > +49 731-50 26592 > martin.rosenfelder at uni-ulm.de > > Am Montag, 14. Januar 2019 19:01 CET, Stephen Whitmarsh < > stephen.whitmarsh at gmail.com> schrieb: > > > Dear Martin, > > > > Use ft_selectdata instead of ft_redefinetrial. > > > > > "cfg.previous.previous.previous{1,1}.previous.previous.trialdef.eventvalue(1,2)" > > is scary! And I can imagine very inconvenient, as it will move deeper and > > deeper in to infinite previousnessness. > > Instead, one of the best 'easter eggs' (i.e. not so well-documented > > functionality) of FieldTrip is to create extra columns of info in your > .trl > > when using preprocessing to epoch your data. These extra columns will > then > > enter into a field .trialinfo of your data. Most if not all functions, > such > > as ft_selectdata (selecting trials) will update that field. So I advice > you > > to put your eventvalue (as well as RT, response, etc. etc.) as columns in > > your trialinfo (so same nr. of rows as your nr. of trials). In this way, > > they will travel with your data, and stay in the same structure and on > the > > same level whatever happens. > > > > Cheers, > > Stephen > > > > > > On Mon, 14 Jan 2019 at 18:47, Martin Rosenfelder < > > martin.rosenfelder at uni-ulm.de> wrote: > > > > > Dear Fieldtrip community, > > > > > > I have preprocessed a single dataset with two different conditions > > > ('Swim', 'Rest'). The conditions are stored in the 'eventvalue' field > of > > > the cfg as 1x2 cell array. The event values are stored in the > > > > 'data_ref.cfg.previous.previous.previous{1,1}.previous.previous.trialdef.eventvalue' > > > field of the data set. > > > Having done the preprocessing I now would like to do > ft_timelockanalysis > > > and ft_freqanalysis on the data. Afterwards I statistically compare > the two > > > conditions using ft_timelockstatistics and ft_freqstatistics. > > > How can I split the data set according to the event values ('Swim', > > > 'Rest')? I need the event values to split the data set into the two > trial > > > classes in the ft_timelockanalysis / ft_freqanalysis and to compare > these > > > two conditions. > > > > > > I tried ft_redefinetrial, but do not know how to define the cfg.trials > > > field of this function. > > > > > > % trial redefinition > > > > > > % containing only trials in the 'swim' condition > > > cfg.trials = (1, > > > > data_ref.cfg.previous.previous.previous{1,1}.previous.previous.trialdef.eventvalue(1,1)); > > > swim = ft_redefinetrial(cfg,data_ref); > > > > > > % containing only trials in the 'resting' condition > > > cfg.trials = (1, > > > > data_ref.cfg.previous.previous.previous{1,1}.previous.previous.trialdef.eventvalue(1,2)); > > > rest = ft_redefinetrial(cfg,data_ref); > > > > > > I hope the description was quite clear. In case, I can provide some > more > > > lines of code to clarify the issue. > > > > > > Thank you very much in advance for your advice! > > > > > > Best regards, > > > Martin > > > > > > -- > > > M.Sc.-Psych. Martin Rosenfelder > > > Wissenschaftlicher Mitarbeiter > > > Klinische und Biologische Psychologie > > > Universität Ulm > > > Raum 47.2.259 > > > +49 731-50 26592 > > > martin.rosenfelder at uni-ulm.de > > > > > > > > > _______________________________________________ > > > 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 jan.schoffelen at donders.ru.nl Tue Jan 15 17:43:14 2019 From: jan.schoffelen at donders.ru.nl (Schoffelen, J.M. (Jan Mathijs)) Date: Tue, 15 Jan 2019 16:43:14 +0000 Subject: [FieldTrip] ?==?utf-8?q? redefining data set In-Reply-To: References: <2bb2-5c3dfa00-13-26c45a40@4319113> Message-ID: <855A27CB-F840-43CD-A39C-755734B3177B@donders.ru.nl> If I may chime in: are you by any chance looking for data.trialinfo(:,x) = [event.value]’ ? Best JM On 15 Jan 2019, at 17:40, Stephen Whitmarsh > wrote: Hi Martin, No indeed, your conditions/RT/events should indeed be (re)coded as single values. This also makes selecting trials etc. much easier with logical expressions, e.g. you can then simply do cfg.trials = (data.trialinfo(:,1) == 3 && data.trialinfo(:,2) > 0.5, where the first column e.g. is your condition, and the second RT, to just give an example. Cheers, Stephen On Tue, 15 Jan 2019 at 17:35, Martin Rosenfelder > wrote: Dear Stephen, Thank you very much for the hint on ft_selectdata. I tried to build the structure for .trialinfo as you described it in your reply. I did this creating a structure array with the eventvalues as elements. Then I concatenated the .trl matrix and the event value matrix. This however failed, since .trl is a double array and the event value matrix is a struct array. I double-checked that the nr. of rows in the two matrices match each other (120 elements). Is there a way to add the event value matrix (120x1 struct) to the .trl matrix (120x3 double)? Best, Martin -- M.Sc.-Psych. Martin Rosenfelder Wissenschaftlicher Mitarbeiter Klinische und Biologische Psychologie Universität Ulm Raum 47.2.259 +49 731-50 26592 martin.rosenfelder at uni-ulm.de Am Montag, 14. Januar 2019 19:01 CET, Stephen Whitmarsh > schrieb: > Dear Martin, > > Use ft_selectdata instead of ft_redefinetrial. > > "cfg.previous.previous.previous{1,1}.previous.previous.trialdef.eventvalue(1,2)" > is scary! And I can imagine very inconvenient, as it will move deeper and > deeper in to infinite previousnessness. > Instead, one of the best 'easter eggs' (i.e. not so well-documented > functionality) of FieldTrip is to create extra columns of info in your .trl > when using preprocessing to epoch your data. These extra columns will then > enter into a field .trialinfo of your data. Most if not all functions, such > as ft_selectdata (selecting trials) will update that field. So I advice you > to put your eventvalue (as well as RT, response, etc. etc.) as columns in > your trialinfo (so same nr. of rows as your nr. of trials). In this way, > they will travel with your data, and stay in the same structure and on the > same level whatever happens. > > Cheers, > Stephen > > > On Mon, 14 Jan 2019 at 18:47, Martin Rosenfelder < > martin.rosenfelder at uni-ulm.de> wrote: > > > Dear Fieldtrip community, > > > > I have preprocessed a single dataset with two different conditions > > ('Swim', 'Rest'). The conditions are stored in the 'eventvalue' field of > > the cfg as 1x2 cell array. The event values are stored in the > > 'data_ref.cfg.previous.previous.previous{1,1}.previous.previous.trialdef.eventvalue' > > field of the data set. > > Having done the preprocessing I now would like to do ft_timelockanalysis > > and ft_freqanalysis on the data. Afterwards I statistically compare the two > > conditions using ft_timelockstatistics and ft_freqstatistics. > > How can I split the data set according to the event values ('Swim', > > 'Rest')? I need the event values to split the data set into the two trial > > classes in the ft_timelockanalysis / ft_freqanalysis and to compare these > > two conditions. > > > > I tried ft_redefinetrial, but do not know how to define the cfg.trials > > field of this function. > > > > % trial redefinition > > > > % containing only trials in the 'swim' condition > > cfg.trials = (1, > > data_ref.cfg.previous.previous.previous{1,1}.previous.previous.trialdef.eventvalue(1,1)); > > swim = ft_redefinetrial(cfg,data_ref); > > > > % containing only trials in the 'resting' condition > > cfg.trials = (1, > > data_ref.cfg.previous.previous.previous{1,1}.previous.previous.trialdef.eventvalue(1,2)); > > rest = ft_redefinetrial(cfg,data_ref); > > > > I hope the description was quite clear. In case, I can provide some more > > lines of code to clarify the issue. > > > > Thank you very much in advance for your advice! > > > > Best regards, > > Martin > > > > -- > > M.Sc.-Psych. Martin Rosenfelder > > Wissenschaftlicher Mitarbeiter > > Klinische und Biologische Psychologie > > Universität Ulm > > Raum 47.2.259 > > +49 731-50 26592 > > martin.rosenfelder at uni-ulm.de > > > > > > _______________________________________________ > > 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 elene.beitia at alumni.mondragon.edu Wed Jan 16 09:00:26 2019 From: elene.beitia at alumni.mondragon.edu (Elene Beitia Loinaz) Date: Wed, 16 Jan 2019 09:00:26 +0100 Subject: [FieldTrip] headmodel and electrodes alignment Message-ID: Dear fieldtriprs, I still have problemns in aligning correctly the headmodel and the electrodes. Although now both have the correct size, the electrodes do not correctly fit the head. *This is my code:* headmodel=ft_read_vol('standard_vol.mat'); %then we realign them cfg=[]; cfg.method= 'interactive'; %'interactive'% cfg.headshape=headmodel.bnd(1); %the skin surface elec_realigned =ft_electroderealign(cfg,data1.elec); [image: Captura de pantalla 2019-01-16 a las 8.51.49.png] *These are the structures used:* data1.elec structure chanpos: [128×3 double] chantype: {128×1 cell} chanunit: {128×1 cell} elecpos: [128×3 double] label: {1×128 cell} type: 'biosemi128' unit: 'dm' standard_vol structure bnd: [1×3 struct] cond: [0.3300 0.0041 0.3300] mat: [3000×3000 double] type: 'dipoli' unit: 'mm' Thank you in advance, Elene. -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: Captura de pantalla 2019-01-16 a las 8.51.49.png Type: image/png Size: 277926 bytes Desc: not available URL: From stephen.whitmarsh at gmail.com Wed Jan 16 09:55:17 2019 From: stephen.whitmarsh at gmail.com (Stephen Whitmarsh) Date: Wed, 16 Jan 2019 09:55:17 +0100 Subject: [FieldTrip] headmodel and electrodes alignment In-Reply-To: References: Message-ID: Hi Elene, After 'interactive' mode to give it a good start, I use the output for another iteration of automatic 'headshape' method for a tight fit. Hope this helps, Stephen On Wed, 16 Jan 2019 at 09:31, Elene Beitia Loinaz < elene.beitia at alumni.mondragon.edu> wrote: > Dear fieldtriprs, > > I still have problemns in aligning correctly the headmodel and the > electrodes. Although now both have the correct size, the electrodes do not > correctly fit the head. > > *This is my code:* > headmodel=ft_read_vol('standard_vol.mat'); > > > > %then we realign them > > cfg=[]; > > cfg.method= 'interactive'; %'interactive'% > > cfg.headshape=headmodel.bnd(1); %the skin surface > > elec_realigned =ft_electroderealign(cfg,data1.elec); > > > > [image: Captura de pantalla 2019-01-16 a las 8.51.49.png] > > *These are the structures used:* > > data1.elec structure > chanpos: [128×3 double] > chantype: {128×1 cell} > chanunit: {128×1 cell} > elecpos: [128×3 double] > label: {1×128 cell} > type: 'biosemi128' > unit: 'dm' > > standard_vol structure > bnd: [1×3 struct] > cond: [0.3300 0.0041 0.3300] > mat: [3000×3000 double] > type: 'dipoli' > unit: 'mm' > > Thank you in advance, > Elene. > _______________________________________________ > 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 elene.beitia at alumni.mondragon.edu Wed Jan 16 10:09:49 2019 From: elene.beitia at alumni.mondragon.edu (Elene Beitia Loinaz) Date: Wed, 16 Jan 2019 10:09:49 +0100 Subject: [FieldTrip] headmodel and electrodes alignment In-Reply-To: References: Message-ID: Hi Stephen, Thank you for your answer. I already try that, but the result that I obtained is not correct either. Code: cfg=[]; cfg.method= 'headshape'; cfg.headshape=headmodel.bnd(1); % this is the skin surface elec_realigned =ft_electroderealign(cfg,data1.elec); %Plot the result to see if is correct vol = ft_convert_units(vol,'mm'); elec_realigned = ft_convert_units(elec_realigned,'mm') figure ft_plot_sens(elec_realigned, 'style', 'b'); hold on ft_plot_vol(vol); [image: Captura de pantalla 2019-01-16 a las 9.59.14.png] Thank you in advance, Elene. -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: Captura de pantalla 2019-01-16 a las 9.59.14.png Type: image/png Size: 122845 bytes Desc: not available URL: From julian.keil at gmail.com Wed Jan 16 10:41:53 2019 From: julian.keil at gmail.com (Julian Keil) Date: Wed, 16 Jan 2019 10:41:53 +0100 Subject: [FieldTrip] headmodel and electrodes alignment In-Reply-To: References: Message-ID: <089238D1-F8D9-4B35-9908-E4C51D919C40@gmail.com> Hi Elene, please excuse the probably useless question, but did you try to move the electrodes around in the „interactive“-mode? You write: "still have problemns in aligning correctly the headmodel and the electrodes. Although now both have the correct size, the electrodes do not correctly fit the head.“ It is not surprising that the electrodes don’t fit perfectly. That’s why you can use the „rotate“, „scale“ and „translate“-settings to move the electrodes around until they fit better. Cheers, Julian > Am 16.01.2019 um 10:09 schrieb Elene Beitia Loinaz : > > Hi Stephen, > > Thank you for your answer. I already try that, but the result that I obtained is not correct either. > > Code: > > cfg=[]; > cfg.method= 'headshape'; > cfg.headshape=headmodel.bnd(1); % this is the skin surface > elec_realigned =ft_electroderealign(cfg,data1.elec); > > %Plot the result to see if is correct > > vol = ft_convert_units(vol,'mm'); > elec_realigned = ft_convert_units(elec_realigned,'mm') > > figure > ft_plot_sens(elec_realigned, 'style', 'b'); > > hold on > ft_plot_vol(vol); > > > > Thank you in advance, > > Elene. > _______________________________________________ > 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 stephen.whitmarsh at gmail.com Wed Jan 16 10:45:32 2019 From: stephen.whitmarsh at gmail.com (Stephen Whitmarsh) Date: Wed, 16 Jan 2019 10:45:32 +0100 Subject: [FieldTrip] headmodel and electrodes alignment In-Reply-To: References: Message-ID: Hi Elene, In the code you do not use ft_electroderealign twice (once manually, then automatic). Also, you convert units after realignment. For the sake of debugging and clarity, I would: 1. - figure out and set the units correctly for you headmodel and electrodes 2. - convert headmodel and electrodes to same units 3. - plot to check 4. - use 'interactive' realignment 5. - plot to check 6. - use 'headmodel' realignment 7. - plot to check Cheers, Stephen On Wed, 16 Jan 2019 at 10:35, Elene Beitia Loinaz < elene.beitia at alumni.mondragon.edu> wrote: > Hi Stephen, > > Thank you for your answer. I already try that, but the result that I > obtained is not correct either. > > Code: > > cfg=[]; > > cfg.method= 'headshape'; > > cfg.headshape=headmodel.bnd(1); % this is the skin surface > > elec_realigned =ft_electroderealign(cfg,data1.elec); > > > > %Plot the result to see if is correct > > > > vol = ft_convert_units(vol,'mm'); > > elec_realigned = ft_convert_units(elec_realigned,'mm') > > > > figure > > ft_plot_sens(elec_realigned, 'style', 'b'); > > > > hold on > > ft_plot_vol(vol); > > [image: Captura de pantalla 2019-01-16 a las 9.59.14.png] > > Thank you in advance, > > Elene. > _______________________________________________ > 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 martin.rosenfelder at uni-ulm.de Wed Jan 16 16:57:22 2019 From: martin.rosenfelder at uni-ulm.de (Martin Rosenfelder) Date: Wed, 16 Jan 2019 16:57:22 +0100 Subject: [FieldTrip] =?utf-8?b?Pz09P3V0Zi04P3E/ID89PT91dGYtOD9xPyA/PSBy?= =?utf-8?q?edefining_data_se?= In-Reply-To: Message-ID: <47c7-5c3f5480-13-26d82bc0@58067294> Hi Stephen, Exactly, preferably, the events should be single values in a struct array or a cell array. This can then be added to the existing trial array. So far so good. However, my dataset misses a .trialinfo field after calling ft_preprocessing, to which I could add the cell array with the condition labels. I then added the array with the condition labels to 'mydataset.trial'. Unfortunately, this seems to confuse the ft_rejectvisual I call afterwards for artifact rejection. Do I have to create the .trialinfo-field by hand to my dataset? Best, Martin -- M.Sc.-Psych. Martin Rosenfelder Wissenschaftlicher Mitarbeiter Klinische und Biologische Psychologie Universität Ulm Raum 47.2.259 +49 731-50 26592 martin.rosenfelder at uni-ulm.de Am Dienstag, 15. Januar 2019 17:40 CET, Stephen Whitmarsh schrieb: > Hi Martin, > > No indeed, your conditions/RT/events should indeed be (re)coded as single > values. This also makes selecting trials etc. much easier with logical > expressions, e.g. you can then simply do cfg.trials = (data.trialinfo(:,1) > == 3 && data.trialinfo(:,2) > 0.5, where the first column e.g. is your > condition, and the second RT, to just give an example. > > Cheers, > Stephen > > On Tue, 15 Jan 2019 at 17:35, Martin Rosenfelder < > martin.rosenfelder at uni-ulm.de> wrote: > > > Dear Stephen, > > > > Thank you very much for the hint on ft_selectdata. > > > > I tried to build the structure for .trialinfo as you described it in your > > reply. I did this creating a structure array with the eventvalues as > > elements. > > Then I concatenated the .trl matrix and the event value matrix. This > > however failed, since .trl is a double array and the event value matrix is > > a struct array. > > I double-checked that the nr. of rows in the two matrices match each other > > (120 elements). > > > > Is there a way to add the event value matrix (120x1 struct) to the .trl > > matrix (120x3 double)? > > > > Best, > > Martin > > > > > > -- > > M.Sc.-Psych. Martin Rosenfelder > > Wissenschaftlicher Mitarbeiter > > Klinische und Biologische Psychologie > > Universität Ulm > > Raum 47.2.259 > > +49 731-50 26592 > > martin.rosenfelder at uni-ulm.de > > > > Am Montag, 14. Januar 2019 19:01 CET, Stephen Whitmarsh < > > stephen.whitmarsh at gmail.com> schrieb: > > > > > Dear Martin, > > > > > > Use ft_selectdata instead of ft_redefinetrial. > > > > > > > > "cfg.previous.previous.previous{1,1}.previous.previous.trialdef.eventvalue(1,2)" > > > is scary! And I can imagine very inconvenient, as it will move deeper and > > > deeper in to infinite previousnessness. > > > Instead, one of the best 'easter eggs' (i.e. not so well-documented > > > functionality) of FieldTrip is to create extra columns of info in your > > .trl > > > when using preprocessing to epoch your data. These extra columns will > > then > > > enter into a field .trialinfo of your data. Most if not all functions, > > such > > > as ft_selectdata (selecting trials) will update that field. So I advice > > you > > > to put your eventvalue (as well as RT, response, etc. etc.) as columns in > > > your trialinfo (so same nr. of rows as your nr. of trials). In this way, > > > they will travel with your data, and stay in the same structure and on > > the > > > same level whatever happens. > > > > > > Cheers, > > > Stephen > > > > > > > > > On Mon, 14 Jan 2019 at 18:47, Martin Rosenfelder < > > > martin.rosenfelder at uni-ulm.de> wrote: > > > > > > > Dear Fieldtrip community, > > > > > > > > I have preprocessed a single dataset with two different conditions > > > > ('Swim', 'Rest'). The conditions are stored in the 'eventvalue' field > > of > > > > the cfg as 1x2 cell array. The event values are stored in the > > > > > > 'data_ref.cfg.previous.previous.previous{1,1}.previous.previous.trialdef.eventvalue' > > > > field of the data set. > > > > Having done the preprocessing I now would like to do > > ft_timelockanalysis > > > > and ft_freqanalysis on the data. Afterwards I statistically compare > > the two > > > > conditions using ft_timelockstatistics and ft_freqstatistics. > > > > How can I split the data set according to the event values ('Swim', > > > > 'Rest')? I need the event values to split the data set into the two > > trial > > > > classes in the ft_timelockanalysis / ft_freqanalysis and to compare > > these > > > > two conditions. > > > > > > > > I tried ft_redefinetrial, but do not know how to define the cfg.trials > > > > field of this function. > > > > > > > > % trial redefinition > > > > > > > > % containing only trials in the 'swim' condition > > > > cfg.trials = (1, > > > > > > data_ref.cfg.previous.previous.previous{1,1}.previous.previous.trialdef.eventvalue(1,1)); > > > > swim = ft_redefinetrial(cfg,data_ref); > > > > > > > > % containing only trials in the 'resting' condition > > > > cfg.trials = (1, > > > > > > data_ref.cfg.previous.previous.previous{1,1}.previous.previous.trialdef.eventvalue(1,2)); > > > > rest = ft_redefinetrial(cfg,data_ref); > > > > > > > > I hope the description was quite clear. In case, I can provide some > > more > > > > lines of code to clarify the issue. > > > > > > > > Thank you very much in advance for your advice! > > > > > > > > Best regards, > > > > Martin > > > > > > > > -- > > > > M.Sc.-Psych. Martin Rosenfelder > > > > Wissenschaftlicher Mitarbeiter > > > > Klinische und Biologische Psychologie > > > > Universität Ulm > > > > Raum 47.2.259 > > > > +49 731-50 26592 > > > > martin.rosenfelder at uni-ulm.de > > > > > > > > > > > > _______________________________________________ > > > > 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 martin.rosenfelder at uni-ulm.de Wed Jan 16 17:08:22 2019 From: martin.rosenfelder at uni-ulm.de (Martin Rosenfelder) Date: Wed, 16 Jan 2019 17:08:22 +0100 Subject: [FieldTrip] =?utf-8?b?Pz09P3V0Zi04P3E/ID89PT91dGYtOD9xPyA/PSBy?= =?utf-8?q?edefining_data_se?= In-Reply-To: <855A27CB-F840-43CD-A39C-755734B3177B@donders.ru.nl> Message-ID: <4b5d-5c3f5700-5-12ad6c40@225121778> Dear Jan Mathijs, Thank you for your tip. The code you suggested does not work with my data set, as there is no .trialinfo field. The same I wrote to Stephen before. I wonder why the .trialinfo field is not being created automatically (as it should?) when calling ft_preprocessing. Do you have an idea why it is like that? Many thanks in advance! Best, Martin -- M.Sc.-Psych. Martin Rosenfelder Wissenschaftlicher Mitarbeiter Klinische und Biologische Psychologie Universität Ulm Raum 47.2.259 +49 731-50 26592 martin.rosenfelder at uni-ulm.de Am Dienstag, 15. Januar 2019 17:43 CET, "Schoffelen, J.M. (Jan Mathijs)" schrieb: > If I may chime in: are you by any chance looking for data.trialinfo(:,x) = [event.value]’ ? > > Best JM > > > On 15 Jan 2019, at 17:40, Stephen Whitmarsh > wrote: > > Hi Martin, > > No indeed, your conditions/RT/events should indeed be (re)coded as single values. This also makes selecting trials etc. much easier with logical expressions, e.g. you can then simply do cfg.trials = (data.trialinfo(:,1) == 3 && data.trialinfo(:,2) > 0.5, where the first column e.g. is your condition, and the second RT, to just give an example. > > Cheers, > Stephen > > On Tue, 15 Jan 2019 at 17:35, Martin Rosenfelder > wrote: > Dear Stephen, > > Thank you very much for the hint on ft_selectdata. > > I tried to build the structure for .trialinfo as you described it in your reply. I did this creating a structure array with the eventvalues as elements. > Then I concatenated the .trl matrix and the event value matrix. This however failed, since .trl is a double array and the event value matrix is a struct array. > I double-checked that the nr. of rows in the two matrices match each other (120 elements). > > Is there a way to add the event value matrix (120x1 struct) to the .trl matrix (120x3 double)? > > Best, > Martin > > > -- > M.Sc.-Psych. Martin Rosenfelder > Wissenschaftlicher Mitarbeiter > Klinische und Biologische Psychologie > Universität Ulm > Raum 47.2.259 > +49 731-50 26592 > martin.rosenfelder at uni-ulm.de > > Am Montag, 14. Januar 2019 19:01 CET, Stephen Whitmarsh > schrieb: > > > Dear Martin, > > > > Use ft_selectdata instead of ft_redefinetrial. > > > > "cfg.previous.previous.previous{1,1}.previous.previous.trialdef.eventvalue(1,2)" > > is scary! And I can imagine very inconvenient, as it will move deeper and > > deeper in to infinite previousnessness. > > Instead, one of the best 'easter eggs' (i.e. not so well-documented > > functionality) of FieldTrip is to create extra columns of info in your .trl > > when using preprocessing to epoch your data. These extra columns will then > > enter into a field .trialinfo of your data. Most if not all functions, such > > as ft_selectdata (selecting trials) will update that field. So I advice you > > to put your eventvalue (as well as RT, response, etc. etc.) as columns in > > your trialinfo (so same nr. of rows as your nr. of trials). In this way, > > they will travel with your data, and stay in the same structure and on the > > same level whatever happens. > > > > Cheers, > > Stephen > > > > > > On Mon, 14 Jan 2019 at 18:47, Martin Rosenfelder < > > martin.rosenfelder at uni-ulm.de> wrote: > > > > > Dear Fieldtrip community, > > > > > > I have preprocessed a single dataset with two different conditions > > > ('Swim', 'Rest'). The conditions are stored in the 'eventvalue' field of > > > the cfg as 1x2 cell array. The event values are stored in the > > > 'data_ref.cfg.previous.previous.previous{1,1}.previous.previous.trialdef.eventvalue' > > > field of the data set. > > > Having done the preprocessing I now would like to do ft_timelockanalysis > > > and ft_freqanalysis on the data. Afterwards I statistically compare the two > > > conditions using ft_timelockstatistics and ft_freqstatistics. > > > How can I split the data set according to the event values ('Swim', > > > 'Rest')? I need the event values to split the data set into the two trial > > > classes in the ft_timelockanalysis / ft_freqanalysis and to compare these > > > two conditions. > > > > > > I tried ft_redefinetrial, but do not know how to define the cfg.trials > > > field of this function. > > > > > > % trial redefinition > > > > > > % containing only trials in the 'swim' condition > > > cfg.trials = (1, > > > data_ref.cfg.previous.previous.previous{1,1}.previous.previous.trialdef.eventvalue(1,1)); > > > swim = ft_redefinetrial(cfg,data_ref); > > > > > > % containing only trials in the 'resting' condition > > > cfg.trials = (1, > > > data_ref.cfg.previous.previous.previous{1,1}.previous.previous.trialdef.eventvalue(1,2)); > > > rest = ft_redefinetrial(cfg,data_ref); > > > > > > I hope the description was quite clear. In case, I can provide some more > > > lines of code to clarify the issue. > > > > > > Thank you very much in advance for your advice! > > > > > > Best regards, > > > Martin > > > > > > -- > > > M.Sc.-Psych. Martin Rosenfelder > > > Wissenschaftlicher Mitarbeiter > > > Klinische und Biologische Psychologie > > > Universität Ulm > > > Raum 47.2.259 > > > +49 731-50 26592 > > > martin.rosenfelder at uni-ulm.de > > > > > > > > > _______________________________________________ > > > 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 > From stephen.whitmarsh at gmail.com Wed Jan 16 17:35:33 2019 From: stephen.whitmarsh at gmail.com (Stephen Whitmarsh) Date: Wed, 16 Jan 2019 17:35:33 +0100 Subject: [FieldTrip] ?= redefining data se In-Reply-To: <47c7-5c3f5480-13-26d82bc0@58067294> References: <47c7-5c3f5480-13-26d82bc0@58067294> Message-ID: Hi Martin, If I understand correctly: If you add columns* to your .trl field* (so after the first 3 that define start/end/offset samples) which you feed into ft_preprocessing, ft_preprocessing will create the .trialinfo field for you, which should track through your analyses. Cheers, Stephen On Wed, 16 Jan 2019 at 17:15, Martin Rosenfelder < martin.rosenfelder at uni-ulm.de> wrote: > Hi Stephen, > > Exactly, preferably, the events should be single values in a struct array > or a cell array. > This can then be added to the existing trial array. So far so good. > > However, my dataset misses a .trialinfo field after calling > ft_preprocessing, to which I could add the cell array with the condition > labels. > I then added the array with the condition labels to 'mydataset.trial'. > Unfortunately, this seems to confuse the ft_rejectvisual I call afterwards > for artifact rejection. > Do I have to create the .trialinfo-field by hand to my dataset? > > Best, > Martin > > > -- > M.Sc.-Psych. Martin Rosenfelder > Wissenschaftlicher Mitarbeiter > Klinische und Biologische Psychologie > Universität Ulm > Raum 47.2.259 > +49 731-50 26592 > martin.rosenfelder at uni-ulm.de > > Am Dienstag, 15. Januar 2019 17:40 CET, Stephen Whitmarsh < > stephen.whitmarsh at gmail.com> schrieb: > > > Hi Martin, > > > > No indeed, your conditions/RT/events should indeed be (re)coded as single > > values. This also makes selecting trials etc. much easier with logical > > expressions, e.g. you can then simply do cfg.trials = > (data.trialinfo(:,1) > > == 3 && data.trialinfo(:,2) > 0.5, where the first column e.g. is your > > condition, and the second RT, to just give an example. > > > > Cheers, > > Stephen > > > > On Tue, 15 Jan 2019 at 17:35, Martin Rosenfelder < > > martin.rosenfelder at uni-ulm.de> wrote: > > > > > Dear Stephen, > > > > > > Thank you very much for the hint on ft_selectdata. > > > > > > I tried to build the structure for .trialinfo as you described it in > your > > > reply. I did this creating a structure array with the eventvalues as > > > elements. > > > Then I concatenated the .trl matrix and the event value matrix. This > > > however failed, since .trl is a double array and the event value > matrix is > > > a struct array. > > > I double-checked that the nr. of rows in the two matrices match each > other > > > (120 elements). > > > > > > Is there a way to add the event value matrix (120x1 struct) to the .trl > > > matrix (120x3 double)? > > > > > > Best, > > > Martin > > > > > > > > > -- > > > M.Sc.-Psych. Martin Rosenfelder > > > Wissenschaftlicher Mitarbeiter > > > Klinische und Biologische Psychologie > > > Universität Ulm > > > Raum 47.2.259 > > > +49 731-50 26592 > > > martin.rosenfelder at uni-ulm.de > > > > > > Am Montag, 14. Januar 2019 19:01 CET, Stephen Whitmarsh < > > > stephen.whitmarsh at gmail.com> schrieb: > > > > > > > Dear Martin, > > > > > > > > Use ft_selectdata instead of ft_redefinetrial. > > > > > > > > > > > > "cfg.previous.previous.previous{1,1}.previous.previous.trialdef.eventvalue(1,2)" > > > > is scary! And I can imagine very inconvenient, as it will move > deeper and > > > > deeper in to infinite previousnessness. > > > > Instead, one of the best 'easter eggs' (i.e. not so well-documented > > > > functionality) of FieldTrip is to create extra columns of info in > your > > > .trl > > > > when using preprocessing to epoch your data. These extra columns will > > > then > > > > enter into a field .trialinfo of your data. Most if not all > functions, > > > such > > > > as ft_selectdata (selecting trials) will update that field. So I > advice > > > you > > > > to put your eventvalue (as well as RT, response, etc. etc.) as > columns in > > > > your trialinfo (so same nr. of rows as your nr. of trials). In this > way, > > > > they will travel with your data, and stay in the same structure and > on > > > the > > > > same level whatever happens. > > > > > > > > Cheers, > > > > Stephen > > > > > > > > > > > > On Mon, 14 Jan 2019 at 18:47, Martin Rosenfelder < > > > > martin.rosenfelder at uni-ulm.de> wrote: > > > > > > > > > Dear Fieldtrip community, > > > > > > > > > > I have preprocessed a single dataset with two different conditions > > > > > ('Swim', 'Rest'). The conditions are stored in the 'eventvalue' > field > > > of > > > > > the cfg as 1x2 cell array. The event values are stored in the > > > > > > > > > 'data_ref.cfg.previous.previous.previous{1,1}.previous.previous.trialdef.eventvalue' > > > > > field of the data set. > > > > > Having done the preprocessing I now would like to do > > > ft_timelockanalysis > > > > > and ft_freqanalysis on the data. Afterwards I statistically compare > > > the two > > > > > conditions using ft_timelockstatistics and ft_freqstatistics. > > > > > How can I split the data set according to the event values ('Swim', > > > > > 'Rest')? I need the event values to split the data set into the two > > > trial > > > > > classes in the ft_timelockanalysis / ft_freqanalysis and to compare > > > these > > > > > two conditions. > > > > > > > > > > I tried ft_redefinetrial, but do not know how to define the > cfg.trials > > > > > field of this function. > > > > > > > > > > % trial redefinition > > > > > > > > > > % containing only trials in the 'swim' condition > > > > > cfg.trials = (1, > > > > > > > > > data_ref.cfg.previous.previous.previous{1,1}.previous.previous.trialdef.eventvalue(1,1)); > > > > > swim = ft_redefinetrial(cfg,data_ref); > > > > > > > > > > % containing only trials in the 'resting' condition > > > > > cfg.trials = (1, > > > > > > > > > data_ref.cfg.previous.previous.previous{1,1}.previous.previous.trialdef.eventvalue(1,2)); > > > > > rest = ft_redefinetrial(cfg,data_ref); > > > > > > > > > > I hope the description was quite clear. In case, I can provide some > > > more > > > > > lines of code to clarify the issue. > > > > > > > > > > Thank you very much in advance for your advice! > > > > > > > > > > Best regards, > > > > > Martin > > > > > > > > > > -- > > > > > M.Sc.-Psych. Martin Rosenfelder > > > > > Wissenschaftlicher Mitarbeiter > > > > > Klinische und Biologische Psychologie > > > > > Universität Ulm > > > > > Raum 47.2.259 > > > > > +49 731-50 26592 > > > > > martin.rosenfelder at uni-ulm.de > > > > > > > > > > > > > > > _______________________________________________ > > > > > 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 marion.vincent at univ-lille.fr Thu Jan 17 10:37:20 2019 From: marion.vincent at univ-lille.fr (Marion Vincent) Date: Thu, 17 Jan 2019 10:37:20 +0100 (CET) Subject: [FieldTrip] Baseline removal errors in trials preprocessing Message-ID: <1783145268.1402885.1547717840566.JavaMail.zimbra@zimbra-store10.univ-lille.fr> Dear FIeldtrip users, I’m new in using Fieldtrip for EEG processing and I’ve encountred some issues while removing the Baseline of my trials. I’m working on EEG signals recorded with the BioSemi system. My pre-processing method is : (1) Re-referecing the channels (necessary with BioSemi) (2) Trial definition (3) Baseline removal I’ve read on the documentation that ft_preprocessing xcan have several cfg parameter for the Baseline removal : % cfg.demean = 'yes';%'no' or 'yes', whether to apply baseline correction (default = 'no') % cfg.baselinewindow = 'all';%[begin end] ;%in seconds, the default is the complete trial (default = 'all') % cfg.detrend = 'no'; %'no' or 'yes', remove linear trend from the data (done per trial) (default = 'no') I wanted to remove a Baseline defined as the average of a given window preceeding my stimulus onset. I tried to use : cfg.baselinewindow = [-0.5 0 ]; cfg.baselinewindow = [0 0.1] or the default window . But the problem is that I always have the same result, no matter the window I use : the first point of my trial is put to zero and substracted to all my trial. I’m sure I’m doing something wrong (and that the answer is very simple), but I can’t manage to understand what is the issue. Do you have any advice ? Thanks ! Marion Marion VINCENT Eng., PhD , CNRS Research Engineer -------------- next part -------------- An HTML attachment was scrubbed... URL: From martin.rosenfelder at uni-ulm.de Thu Jan 17 11:14:15 2019 From: martin.rosenfelder at uni-ulm.de (Martin Rosenfelder) Date: Thu, 17 Jan 2019 11:14:15 +0100 Subject: [FieldTrip] =?utf-8?b?Pz09P3V0Zi04P3E/ID89PT91dGYtOD9xPyA/PSBy?= =?utf-8?q?edefining_data_se?= In-Reply-To: Message-ID: <1bc3-5c405580-5-1e7d9040@211415180> Hi Stephen, I now managed to add the event column to my .trl field. This is now a (120x4) matrix. When calling ft_preprocessing, it automatically creates the .trialinfo field. Surprisingly, this .trialinfo matrix is now only a (1x120) matrix instead of a (4x120) matrix and it contains solely the event values. The start/end/offset samples are missing. At the moment I don't have any disadvantages from that, but I don't know if this will turn out to be problematic. Best, Martin -- M.Sc.-Psych. Martin Rosenfelder Wissenschaftlicher Mitarbeiter Klinische und Biologische Psychologie Universität Ulm Raum 47.2.259 +49 731-50 26592 martin.rosenfelder at uni-ulm.de Am Mittwoch, 16. Januar 2019 17:35 CET, Stephen Whitmarsh schrieb: > Hi Martin, > > If I understand correctly: If you add columns* to your .trl field* (so > after the first 3 that define start/end/offset samples) which you feed into > ft_preprocessing, ft_preprocessing will create the .trialinfo field for > you, which should track through your analyses. > > Cheers, > Stephen > > On Wed, 16 Jan 2019 at 17:15, Martin Rosenfelder < > martin.rosenfelder at uni-ulm.de> wrote: > > > Hi Stephen, > > > > Exactly, preferably, the events should be single values in a struct array > > or a cell array. > > This can then be added to the existing trial array. So far so good. > > > > However, my dataset misses a .trialinfo field after calling > > ft_preprocessing, to which I could add the cell array with the condition > > labels. > > I then added the array with the condition labels to 'mydataset.trial'. > > Unfortunately, this seems to confuse the ft_rejectvisual I call afterwards > > for artifact rejection. > > Do I have to create the .trialinfo-field by hand to my dataset? > > > > Best, > > Martin > > > > > > -- > > M.Sc.-Psych. Martin Rosenfelder > > Wissenschaftlicher Mitarbeiter > > Klinische und Biologische Psychologie > > Universität Ulm > > Raum 47.2.259 > > +49 731-50 26592 > > martin.rosenfelder at uni-ulm.de > > > > Am Dienstag, 15. Januar 2019 17:40 CET, Stephen Whitmarsh < > > stephen.whitmarsh at gmail.com> schrieb: > > > > > Hi Martin, > > > > > > No indeed, your conditions/RT/events should indeed be (re)coded as single > > > values. This also makes selecting trials etc. much easier with logical > > > expressions, e.g. you can then simply do cfg.trials = > > (data.trialinfo(:,1) > > > == 3 && data.trialinfo(:,2) > 0.5, where the first column e.g. is your > > > condition, and the second RT, to just give an example. > > > > > > Cheers, > > > Stephen > > > > > > On Tue, 15 Jan 2019 at 17:35, Martin Rosenfelder < > > > martin.rosenfelder at uni-ulm.de> wrote: > > > > > > > Dear Stephen, > > > > > > > > Thank you very much for the hint on ft_selectdata. > > > > > > > > I tried to build the structure for .trialinfo as you described it in > > your > > > > reply. I did this creating a structure array with the eventvalues as > > > > elements. > > > > Then I concatenated the .trl matrix and the event value matrix. This > > > > however failed, since .trl is a double array and the event value > > matrix is > > > > a struct array. > > > > I double-checked that the nr. of rows in the two matrices match each > > other > > > > (120 elements). > > > > > > > > Is there a way to add the event value matrix (120x1 struct) to the .trl > > > > matrix (120x3 double)? > > > > > > > > Best, > > > > Martin > > > > > > > > > > > > -- > > > > M.Sc.-Psych. Martin Rosenfelder > > > > Wissenschaftlicher Mitarbeiter > > > > Klinische und Biologische Psychologie > > > > Universität Ulm > > > > Raum 47.2.259 > > > > +49 731-50 26592 > > > > martin.rosenfelder at uni-ulm.de > > > > > > > > Am Montag, 14. Januar 2019 19:01 CET, Stephen Whitmarsh < > > > > stephen.whitmarsh at gmail.com> schrieb: > > > > > > > > > Dear Martin, > > > > > > > > > > Use ft_selectdata instead of ft_redefinetrial. > > > > > > > > > > > > > > > > "cfg.previous.previous.previous{1,1}.previous.previous.trialdef.eventvalue(1,2)" > > > > > is scary! And I can imagine very inconvenient, as it will move > > deeper and > > > > > deeper in to infinite previousnessness. > > > > > Instead, one of the best 'easter eggs' (i.e. not so well-documented > > > > > functionality) of FieldTrip is to create extra columns of info in > > your > > > > .trl > > > > > when using preprocessing to epoch your data. These extra columns will > > > > then > > > > > enter into a field .trialinfo of your data. Most if not all > > functions, > > > > such > > > > > as ft_selectdata (selecting trials) will update that field. So I > > advice > > > > you > > > > > to put your eventvalue (as well as RT, response, etc. etc.) as > > columns in > > > > > your trialinfo (so same nr. of rows as your nr. of trials). In this > > way, > > > > > they will travel with your data, and stay in the same structure and > > on > > > > the > > > > > same level whatever happens. > > > > > > > > > > Cheers, > > > > > Stephen > > > > > > > > > > > > > > > On Mon, 14 Jan 2019 at 18:47, Martin Rosenfelder < > > > > > martin.rosenfelder at uni-ulm.de> wrote: > > > > > > > > > > > Dear Fieldtrip community, > > > > > > > > > > > > I have preprocessed a single dataset with two different conditions > > > > > > ('Swim', 'Rest'). The conditions are stored in the 'eventvalue' > > field > > > > of > > > > > > the cfg as 1x2 cell array. The event values are stored in the > > > > > > > > > > > > 'data_ref.cfg.previous.previous.previous{1,1}.previous.previous.trialdef.eventvalue' > > > > > > field of the data set. > > > > > > Having done the preprocessing I now would like to do > > > > ft_timelockanalysis > > > > > > and ft_freqanalysis on the data. Afterwards I statistically compare > > > > the two > > > > > > conditions using ft_timelockstatistics and ft_freqstatistics. > > > > > > How can I split the data set according to the event values ('Swim', > > > > > > 'Rest')? I need the event values to split the data set into the two > > > > trial > > > > > > classes in the ft_timelockanalysis / ft_freqanalysis and to compare > > > > these > > > > > > two conditions. > > > > > > > > > > > > I tried ft_redefinetrial, but do not know how to define the > > cfg.trials > > > > > > field of this function. > > > > > > > > > > > > % trial redefinition > > > > > > > > > > > > % containing only trials in the 'swim' condition > > > > > > cfg.trials = (1, > > > > > > > > > > > > data_ref.cfg.previous.previous.previous{1,1}.previous.previous.trialdef.eventvalue(1,1)); > > > > > > swim = ft_redefinetrial(cfg,data_ref); > > > > > > > > > > > > % containing only trials in the 'resting' condition > > > > > > cfg.trials = (1, > > > > > > > > > > > > data_ref.cfg.previous.previous.previous{1,1}.previous.previous.trialdef.eventvalue(1,2)); > > > > > > rest = ft_redefinetrial(cfg,data_ref); > > > > > > > > > > > > I hope the description was quite clear. In case, I can provide some > > > > more > > > > > > lines of code to clarify the issue. > > > > > > > > > > > > Thank you very much in advance for your advice! > > > > > > > > > > > > Best regards, > > > > > > Martin > > > > > > > > > > > > -- > > > > > > M.Sc.-Psych. Martin Rosenfelder > > > > > > Wissenschaftlicher Mitarbeiter > > > > > > Klinische und Biologische Psychologie > > > > > > Universität Ulm > > > > > > Raum 47.2.259 > > > > > > +49 731-50 26592 > > > > > > martin.rosenfelder at uni-ulm.de > > > > > > > > > > > > > > > > > > _______________________________________________ > > > > > > 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 > > From stephen.whitmarsh at gmail.com Thu Jan 17 11:34:39 2019 From: stephen.whitmarsh at gmail.com (Stephen Whitmarsh) Date: Thu, 17 Jan 2019 11:34:39 +0100 Subject: [FieldTrip] Baseline removal errors in trials preprocessing In-Reply-To: <1783145268.1402885.1547717840566.JavaMail.zimbra@zimbra-store10.univ-lille.fr> References: <1783145268.1402885.1547717840566.JavaMail.zimbra@zimbra-store10.univ-lille.fr> Message-ID: <010801d4ae50$40028270$c0078750$@gmail.com> Dear Marion, It sounds it might indeed be something as simple as a typo. Could you paste the part of your script – from baseline removal to plotting (where you don’t see a difference) - so we can take a look? Cheers, Stephen From: fieldtrip On Behalf Of Marion Vincent Sent: Thursday, January 17, 2019 10:37 AM To: fieldtrip at science.ru.nl Subject: [FieldTrip] Baseline removal errors in trials preprocessing Dear FIeldtrip users, I’m new in using Fieldtrip for EEG processing and I’ve encountred some issues while removing the Baseline of my trials. I’m working on EEG signals recorded with the BioSemi system. My pre-processing method is : (1) Re-referecing the channels (necessary with BioSemi) (2) Trial definition (3) Baseline removal I’ve read on the documentation that ft_preprocessing xcan have several cfg parameter for the Baseline removal : % cfg.demean = 'yes';%'no' or 'yes', whether to apply baseline correction (default = 'no') % cfg.baselinewindow = 'all';%[begin end] ;%in seconds, the default is the complete trial (default = 'all') % cfg.detrend = 'no'; %'no' or 'yes', remove linear trend from the data (done per trial) (default = 'no') I wanted to remove a Baseline defined as the average of a given window preceeding my stimulus onset. I tried to use : cfg.baselinewindow = [-0.5 0 ]; cfg.baselinewindow = [0 0.1] or the default window . But the problem is that I always have the same result, no matter the window I use : the first point of my trial is put to zero and substracted to all my trial. I’m sure I’m doing something wrong (and that the answer is very simple), but I can’t manage to understand what is the issue. Do you have any advice ? Thanks ! Marion Marion VINCENT Eng., PhD , CNRS Research Engineer -------------- next part -------------- An HTML attachment was scrubbed... URL: From stephen.whitmarsh at gmail.com Thu Jan 17 12:25:03 2019 From: stephen.whitmarsh at gmail.com (Stephen Whitmarsh) Date: Thu, 17 Jan 2019 12:25:03 +0100 Subject: [FieldTrip] ?= redefining data se In-Reply-To: <1bc3-5c405580-5-1e7d9040@211415180> References: <1bc3-5c405580-5-1e7d9040@211415180> Message-ID: Hi Martin, Great. That is what is expected. The time-units of the original data was in samples. The first 3 columns defined the trial start, end, and offset, with respect to trial onset, i.e. stimulation, *defined in samples*. After segmentation, time is expressed not in samples but with *time relative to trial onset*, i.e. your .time field. Start and end samples (i.. reference to original dataset in samples) are maintained, not in the trialinfo, but in the sampleinfo field of your data. However, after you e.g. concatenate datasets, resample your data, that information becomes erroneous, and will be removed by functions such as append-data. So as an answer - no, it should be a problem later one. HTH, good FieldTripping! Stephen On Thu, 17 Jan 2019 at 11:43, Martin Rosenfelder < martin.rosenfelder at uni-ulm.de> wrote: > Hi Stephen, > > I now managed to add the event column to my .trl field. This is now a > (120x4) matrix. When calling ft_preprocessing, it automatically creates the > .trialinfo field. Surprisingly, this .trialinfo matrix is now only a > (1x120) matrix instead of a (4x120) matrix and it contains solely the event > values. The start/end/offset samples are missing. At the moment I don't > have any disadvantages from that, but I don't know if this will turn out to > be problematic. > > Best, > Martin > > -- > M.Sc.-Psych. Martin Rosenfelder > Wissenschaftlicher Mitarbeiter > Klinische und Biologische Psychologie > Universität Ulm > Raum 47.2.259 > +49 731-50 26592 > martin.rosenfelder at uni-ulm.de > > Am Mittwoch, 16. Januar 2019 17:35 CET, Stephen Whitmarsh < > stephen.whitmarsh at gmail.com> schrieb: > > > Hi Martin, > > > > If I understand correctly: If you add columns* to your .trl field* (so > > after the first 3 that define start/end/offset samples) which you feed > into > > ft_preprocessing, ft_preprocessing will create the .trialinfo field for > > you, which should track through your analyses. > > > > Cheers, > > Stephen > > > > On Wed, 16 Jan 2019 at 17:15, Martin Rosenfelder < > > martin.rosenfelder at uni-ulm.de> wrote: > > > > > Hi Stephen, > > > > > > Exactly, preferably, the events should be single values in a struct > array > > > or a cell array. > > > This can then be added to the existing trial array. So far so good. > > > > > > However, my dataset misses a .trialinfo field after calling > > > ft_preprocessing, to which I could add the cell array with the > condition > > > labels. > > > I then added the array with the condition labels to 'mydataset.trial'. > > > Unfortunately, this seems to confuse the ft_rejectvisual I call > afterwards > > > for artifact rejection. > > > Do I have to create the .trialinfo-field by hand to my dataset? > > > > > > Best, > > > Martin > > > > > > > > > -- > > > M.Sc.-Psych. Martin Rosenfelder > > > Wissenschaftlicher Mitarbeiter > > > Klinische und Biologische Psychologie > > > Universität Ulm > > > Raum 47.2.259 > > > +49 731-50 26592 > > > martin.rosenfelder at uni-ulm.de > > > > > > Am Dienstag, 15. Januar 2019 17:40 CET, Stephen Whitmarsh < > > > stephen.whitmarsh at gmail.com> schrieb: > > > > > > > Hi Martin, > > > > > > > > No indeed, your conditions/RT/events should indeed be (re)coded as > single > > > > values. This also makes selecting trials etc. much easier with > logical > > > > expressions, e.g. you can then simply do cfg.trials = > > > (data.trialinfo(:,1) > > > > == 3 && data.trialinfo(:,2) > 0.5, where the first column e.g. is > your > > > > condition, and the second RT, to just give an example. > > > > > > > > Cheers, > > > > Stephen > > > > > > > > On Tue, 15 Jan 2019 at 17:35, Martin Rosenfelder < > > > > martin.rosenfelder at uni-ulm.de> wrote: > > > > > > > > > Dear Stephen, > > > > > > > > > > Thank you very much for the hint on ft_selectdata. > > > > > > > > > > I tried to build the structure for .trialinfo as you described it > in > > > your > > > > > reply. I did this creating a structure array with the eventvalues > as > > > > > elements. > > > > > Then I concatenated the .trl matrix and the event value matrix. > This > > > > > however failed, since .trl is a double array and the event value > > > matrix is > > > > > a struct array. > > > > > I double-checked that the nr. of rows in the two matrices match > each > > > other > > > > > (120 elements). > > > > > > > > > > Is there a way to add the event value matrix (120x1 struct) to the > .trl > > > > > matrix (120x3 double)? > > > > > > > > > > Best, > > > > > Martin > > > > > > > > > > > > > > > -- > > > > > M.Sc.-Psych. Martin Rosenfelder > > > > > Wissenschaftlicher Mitarbeiter > > > > > Klinische und Biologische Psychologie > > > > > Universität Ulm > > > > > Raum 47.2.259 > > > > > +49 731-50 26592 > > > > > martin.rosenfelder at uni-ulm.de > > > > > > > > > > Am Montag, 14. Januar 2019 19:01 CET, Stephen Whitmarsh < > > > > > stephen.whitmarsh at gmail.com> schrieb: > > > > > > > > > > > Dear Martin, > > > > > > > > > > > > Use ft_selectdata instead of ft_redefinetrial. > > > > > > > > > > > > > > > > > > > > > "cfg.previous.previous.previous{1,1}.previous.previous.trialdef.eventvalue(1,2)" > > > > > > is scary! And I can imagine very inconvenient, as it will move > > > deeper and > > > > > > deeper in to infinite previousnessness. > > > > > > Instead, one of the best 'easter eggs' (i.e. not so > well-documented > > > > > > functionality) of FieldTrip is to create extra columns of info in > > > your > > > > > .trl > > > > > > when using preprocessing to epoch your data. These extra columns > will > > > > > then > > > > > > enter into a field .trialinfo of your data. Most if not all > > > functions, > > > > > such > > > > > > as ft_selectdata (selecting trials) will update that field. So I > > > advice > > > > > you > > > > > > to put your eventvalue (as well as RT, response, etc. etc.) as > > > columns in > > > > > > your trialinfo (so same nr. of rows as your nr. of trials). In > this > > > way, > > > > > > they will travel with your data, and stay in the same structure > and > > > on > > > > > the > > > > > > same level whatever happens. > > > > > > > > > > > > Cheers, > > > > > > Stephen > > > > > > > > > > > > > > > > > > On Mon, 14 Jan 2019 at 18:47, Martin Rosenfelder < > > > > > > martin.rosenfelder at uni-ulm.de> wrote: > > > > > > > > > > > > > Dear Fieldtrip community, > > > > > > > > > > > > > > I have preprocessed a single dataset with two different > conditions > > > > > > > ('Swim', 'Rest'). The conditions are stored in the 'eventvalue' > > > field > > > > > of > > > > > > > the cfg as 1x2 cell array. The event values are stored in the > > > > > > > > > > > > > > > > 'data_ref.cfg.previous.previous.previous{1,1}.previous.previous.trialdef.eventvalue' > > > > > > > field of the data set. > > > > > > > Having done the preprocessing I now would like to do > > > > > ft_timelockanalysis > > > > > > > and ft_freqanalysis on the data. Afterwards I statistically > compare > > > > > the two > > > > > > > conditions using ft_timelockstatistics and ft_freqstatistics. > > > > > > > How can I split the data set according to the event values > ('Swim', > > > > > > > 'Rest')? I need the event values to split the data set into > the two > > > > > trial > > > > > > > classes in the ft_timelockanalysis / ft_freqanalysis and to > compare > > > > > these > > > > > > > two conditions. > > > > > > > > > > > > > > I tried ft_redefinetrial, but do not know how to define the > > > cfg.trials > > > > > > > field of this function. > > > > > > > > > > > > > > % trial redefinition > > > > > > > > > > > > > > % containing only trials in the 'swim' condition > > > > > > > cfg.trials = (1, > > > > > > > > > > > > > > > > data_ref.cfg.previous.previous.previous{1,1}.previous.previous.trialdef.eventvalue(1,1)); > > > > > > > swim = ft_redefinetrial(cfg,data_ref); > > > > > > > > > > > > > > % containing only trials in the 'resting' condition > > > > > > > cfg.trials = (1, > > > > > > > > > > > > > > > > data_ref.cfg.previous.previous.previous{1,1}.previous.previous.trialdef.eventvalue(1,2)); > > > > > > > rest = ft_redefinetrial(cfg,data_ref); > > > > > > > > > > > > > > I hope the description was quite clear. In case, I can provide > some > > > > > more > > > > > > > lines of code to clarify the issue. > > > > > > > > > > > > > > Thank you very much in advance for your advice! > > > > > > > > > > > > > > Best regards, > > > > > > > Martin > > > > > > > > > > > > > > -- > > > > > > > M.Sc.-Psych. Martin Rosenfelder > > > > > > > Wissenschaftlicher Mitarbeiter > > > > > > > Klinische und Biologische Psychologie > > > > > > > Universität Ulm > > > > > > > Raum 47.2.259 > > > > > > > +49 731-50 26592 > > > > > > > martin.rosenfelder at uni-ulm.de > > > > > > > > > > > > > > > > > > > > > _______________________________________________ > > > > > > > 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 > > > > > > > > > _______________________________________________ > 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 martabortoletto at yahoo.it Thu Jan 17 12:39:10 2019 From: martabortoletto at yahoo.it (Marta Bortoletto) Date: Thu, 17 Jan 2019 11:39:10 +0000 (UTC) Subject: [FieldTrip] How to handle results from cluster based permutation? References: <1806037147.1487896.1547725150947.ref@mail.yahoo.com> Message-ID: <1806037147.1487896.1547725150947@mail.yahoo.com> Dear Fieldtrip community,I have a queston related to further exploration of results after a significant effect of a cluster based permutation analysis. I am using cluster based permutation test to look for differences in evoked potentials amplitude before and after a learning task. I found that there is a significant difference between the two conditions, with the largest cluster between 80 and 140 ms on frontocentral electrodes. Now, I would like to test if the change in evoked potentials between pre- and post-task is related to the behavioral improvement by running correlation analyses. My question is how can I do that. My understanding is that taking the mean activity in the cluster to run the correlation with behavioural data is problematic. Shall I rather run correlation analyses with cluster based permutation on the evoked potentials, perhaps restricting the analyses to the time window highlighted in the first analysis (80-140 ms)? I would really appreciate your help with this.Marta -------------- next part -------------- An HTML attachment was scrubbed... URL: From juan.lei at hotmail.com Thu Jan 17 13:21:18 2019 From: juan.lei at hotmail.com (Juan Lei) Date: Thu, 17 Jan 2019 12:21:18 +0000 Subject: [FieldTrip] calculatng behavioral-power correlation Message-ID: Dear Fieldtrip users and developers I am confused about some information regarding calculating behavioral-power correlation. on this pape http://www.fieldtriptoolbox.org/faq/how_can_i_test_for_correlations_between_neuronal_data_and_quantitative_stimulus_and_behavioural_variables/ How can I test for correlations between neuronal data and quantitative stimulus and behavioural variables? - FieldTrip toolbox It is important to make a distinction between categorical and quantitative independent variables, because these are associated with different test statistics. www.fieldtriptoolbox.org in the examples for Quantitative Independent Variable, it seems that all parameter settings are the same for both ft_statfun_indepsamplesregrT and ft_statfun_correlationT. "design" only has one row with behavioural data, and only the brain data as Input for ft_freqstatistics: n1 = 3; % n1 is the number of subjects design(1,1:n1) = [0.6 0.9 0.1]; %here we insert our independent variable (behavioral data) in the cfg.design matrix, in this case reaction times of 3 subjects. cfg.design = design; cfg.ivar = 1; stat = ft_freqstatistics(cfg, data_brain{:}); However, in another post https://mailman.science.ru.nl/pipermail/fieldtrip/2015-February/008950.html [FieldTrip] calculating behavioural-power correlation Dear Frederic, >From my limited understanding, the way you specify your design matrix seems correct to me.I did the same thing as well, however, I was not interested in the correlation along the time dimension, and I averaged some frequencies to examine my behavioural-power change correlation with specific frequency bands (e.g. 2 - 4 Hz for Delta band, 4 - 8 Hz for Theta band, etc). mailman.science.ru.nl it says "create a variable for the behavioural measure such that the variable contains a powspctrm field with the behavioural information for every frequency" as the other Input for ft_freqstatistica. Here "design" has two rows. cfg.design = []; cfg.design(1,:) = [ones(1,lenght(Y)) 2*ones(1,length(Y))]; cfg.design(2,:) = [1:length(Y) 1:length(Y)]; freq_stat = ft_freqstatistica(cfg,AVG,dum); Therefore the information is not consistent. Could someone help me understanding it? Best, Juan -------------- next part -------------- An HTML attachment was scrubbed... URL: From marion.vincent at univ-lille.fr Thu Jan 17 13:59:59 2019 From: marion.vincent at univ-lille.fr (Marion Vincent) Date: Thu, 17 Jan 2019 13:59:59 +0100 (CET) Subject: [FieldTrip] Baseline removal errors in trials preprocessing In-Reply-To: <010801d4ae50$40028270$c0078750$@gmail.com> References: <1783145268.1402885.1547717840566.JavaMail.zimbra@zimbra-store10.univ-lille.fr> <010801d4ae50$40028270$c0078750$@gmail.com> Message-ID: <368923767.1656133.1547729999196.JavaMail.zimbra@zimbra-store10.univ-lille.fr> An HTML attachment was scrubbed... URL: -------------- next part -------------- Dear Stephen, Here is my script: %segmentation seg_window=[0.1 1]; % in seconds %preStim/postStim %config cfg= []; cfg.dataset = filename_Data; %% *********** TRIAL DEFINITION PART *********** (that works) […] cfg = ft_definetrial(cfg); % ***********  Re-References *********** (that also works) cfg.reref = 'yes'; cfg.refchannel = {'EXG3', 'EXG4'};% electrode 131/132 // cell-array with new EEG reference channel(s), this can be 'all' for a common average reference cfg.refmethod     = 'avg'; % 'avg', 'median', or 'bipolar' for bipolar derivation of sequential channels (default = 'avg') data_Raw = ft_preprocessing(cfg); %% *********** Baseline *********** cfg.demean = 'yes'; cfg1=cfg; cfg1.baselinewindow = [-seg_window(1) 0 ]; cfg2=cfg; cfg2.baselinewindow = [0 0.1]; cfg3=cfg; cfg3.baselinewindow = 'all'; data1 = ft_preprocessing(cfg1); data2 = ft_preprocessing(cfg2); data3 = ft_preprocessing(cfg3); I’ve attached the figure with the results. PS: In fact I made a mistake in my previous email: the result wasn’t the same when the Baseline window was ‘all’. Let me know if you need more informations. Thanks for your help. Marion Marion VINCENT Eng., PhD , CNRS Research Engineer Tel: +33 607 59 46 76 Laboratoire SCALab UMR CNRS 9193 Université Lille 3 BP 60149 59653 Villeneuve d'Ascq Cedex http://scalab.cnrs.fr -------------------------------------------- L’Imaginarium / SCV-IrDIVE Equipex 99a Boulevard Descat 59200 Tourcoing http://www.irdive.fr/ De: Stephen Whitmarsh Envoyé le:jeudi 17 janvier 2019 11:51 À: 'FieldTrip discussion list' Objet:Re: [FieldTrip] Baseline removal errors in trials preprocessing Dear Marion, It sounds it might indeed be something as simple as a typo. Could you paste the part of your script – from baseline removal to plotting (where you don’t see a difference) - so we can take a look? Cheers, Stephen From: fieldtrip On Behalf Of Marion Vincent Sent: Thursday, January 17, 2019 10:37 AM To: fieldtrip at science.ru.nl Subject: [FieldTrip] Baseline removal errors in trials preprocessing Dear FIeldtrip users, I’m new in using Fieldtrip for EEG processing and I’ve encountred some issues while removing the Baseline of my trials. I’m working on EEG signals recorded with the BioSemi system. My pre-processing method is : (1) Re-referecing the channels (necessary with BioSemi) (2) Trial definition (3) Baseline removal I’ve read on the documentation that ft_preprocessing xcan have several cfg parameter for the Baseline removal : % cfg.demean = 'yes';%'no' or 'yes', whether to apply baseline correction (default = 'no') % cfg.baselinewindow = 'all';%[begin end] ;%in seconds, the default is the complete trial (default = 'all') % cfg.detrend = 'no'; %'no' or 'yes', remove linear trend from the data (done per trial) (default = 'no') I wanted to remove a Baseline defined as the average of a given window preceeding my stimulus onset. I tried to use : cfg.baselinewindow = [-0.5 0 ]; cfg.baselinewindow = [0 0.1] or the default window . But the problem is that I always have the same result, no matter the window I use : the first point of my trial is put to zero and substracted to all my trial. I’m sure I’m doing something wrong (and that the answer is very simple), but I can’t manage to understand what is the issue. Do you have any advice ? Thanks ! Marion Marion VINCENT Eng., PhD , CNRS Research Engineer _______________________________________________ fieldtrip mailing list https://mailman.science.ru.nl/mailman/listinfo/fieldtrip https://doi.org/10.1371/journal.pcbi.1002202 -------------- next part -------------- A non-text attachment was scrubbed... Name: BaselineRemoved_Trial1.JPG Type: image/jpeg Size: 115224 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: BaselineRemoved_Trial1.fig Type: application/octet-stream Size: 129935 bytes Desc: not available URL: From julian.keil at gmail.com Thu Jan 17 14:37:30 2019 From: julian.keil at gmail.com (Julian Keil) Date: Thu, 17 Jan 2019 14:37:30 +0100 Subject: [FieldTrip] Baseline removal errors in trials preprocessing In-Reply-To: <368923767.1656133.1547729999196.JavaMail.zimbra@zimbra-store10.univ-lille.fr> References: <1783145268.1402885.1547717840566.JavaMail.zimbra@zimbra-store10.univ-lille.fr> <010801d4ae50$40028270$c0078750$@gmail.com> <368923767.1656133.1547729999196.JavaMail.zimbra@zimbra-store10.univ-lille.fr> Message-ID: Dear Marion, when you state: seg_window=[0.1 1]; % in seconds %preStim/postStim Does that mean, you segment your data to 0.1 s to 1 s after the stimulus? In that case, there is no data to use prior to 0.1 later on. So, these two statements: cfg1=cfg; cfg1.baselinewindow = [-seg_window(1) 0 ]; cfg2=cfg; cfg2.baselinewindow = [0 0.1]; are basically identical, as the interval -0.1 to 0 (cfg1) and 0 to 0.1 (cfg2) will both contain no data. Please double check this with the seg_window set to [-0.1 1] Hope that helps, Julian On Thu, Jan 17, 2019 at 2:29 PM Marion Vincent wrote: > Dear Stephen, > Here is my script: > %segmentation > seg_window=[0.1 1]; % in seconds %preStim/postStim > %config > cfg= []; > cfg.dataset = filename_Data; > %% *********** TRIAL DEFINITION PART *********** (that works) > […] > cfg = ft_definetrial(cfg); > % *********** Re-References *********** (that also works) > cfg.reref = 'yes'; > cfg.refchannel = {'EXG3', 'EXG4'};% electrode 131/132 // cell-array with > new EEG reference channel(s), this can be 'all' for a common average > reference > cfg.refmethod = 'avg'; % 'avg', 'median', or 'bipolar' for bipolar > derivation of sequential channels (default = 'avg') > data_Raw = ft_preprocessing(cfg); > %% *********** Baseline *********** > cfg.demean = 'yes'; > cfg1=cfg; > cfg1.baselinewindow = [-seg_window(1) 0 ]; > cfg2=cfg; > cfg2.baselinewindow = [0 0.1]; > cfg3=cfg; > cfg3.baselinewindow = 'all'; > data1 = ft_preprocessing(cfg1); > data2 = ft_preprocessing(cfg2); > data3 = ft_preprocessing(cfg3); > I’ve attached the figure with the results. > PS: In fact I made a mistake in my previous email: the result wasn’t the > same when the Baseline window was ‘all’. > Let me know if you need more informations. > Thanks for your help. > Marion > Marion VINCENT > Eng., PhD , CNRS Research Engineer > Tel: +33 607 59 46 76 > Laboratoire SCALab UMR CNRS 9193 > Université Lille 3 > BP 60149 > 59653 Villeneuve d'Ascq Cedex > http://scalab.cnrs.fr > -------------------------------------------- > L’Imaginarium / SCV-IrDIVE Equipex > 99a Boulevard Descat > 59200 Tourcoing > http://www.irdive.fr/ > De: Stephen Whitmarsh > Envoyé le:jeudi 17 janvier 2019 11:51 > À: 'FieldTrip discussion list' > Objet:Re: [FieldTrip] Baseline removal errors in trials preprocessing > > > Dear Marion, > > > > It sounds it might indeed be something as simple as a typo. Could you > paste the part of your script – from baseline removal to plotting (where > you don’t see a difference) - so we can take a look? > > > > Cheers, > > Stephen > > > > From: fieldtrip On Behalf Of Marion > Vincent > Sent: Thursday, January 17, 2019 10:37 AM > To: fieldtrip at science.ru.nl > Subject: [FieldTrip] Baseline removal errors in trials preprocessing > > > > Dear FIeldtrip users, > > > > I’m new in using Fieldtrip for EEG processing and I’ve encountred some > issues while removing the Baseline of my trials. > > > > I’m working on EEG signals recorded with the BioSemi system. My > pre-processing method is : > > (1) Re-referecing the channels (necessary with BioSemi) > > (2) Trial definition > > (3) Baseline removal > > > > I’ve read on the documentation that ft_preprocessing xcan have several cfg > parameter for the Baseline removal : > > > > % cfg.demean = 'yes';%'no' or 'yes', whether to apply baseline correction > (default = 'no') > > % cfg.baselinewindow = 'all';%[begin end] ;%in seconds, the default is the > complete trial (default = 'all') > > % cfg.detrend = 'no'; %'no' or 'yes', remove linear trend from the > data (done per trial) (default = 'no') > > > > I wanted to remove a Baseline defined as the average of a given window > preceeding my stimulus onset. > > > > I tried to use : cfg.baselinewindow = [-0.5 0 ]; cfg.baselinewindow = [0 > 0.1] or the default window . > > But the problem is that I always have the same result, no matter the > window I use : the first point of my trial is put to zero and substracted > to all my trial. > > > > I’m sure I’m doing something wrong (and that the answer is very simple), > but I can’t manage to understand what is the issue. > > > > Do you have any advice ? > > > > Thanks ! > > Marion > > > > Marion VINCENT > Eng., PhD , CNRS Research Engineer > > > > > > > > _______________________________________________ > 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 stephen.whitmarsh at gmail.com Thu Jan 17 14:52:45 2019 From: stephen.whitmarsh at gmail.com (Stephen Whitmarsh) Date: Thu, 17 Jan 2019 14:52:45 +0100 Subject: [FieldTrip] Baseline removal errors in trials preprocessing In-Reply-To: <368923767.1656133.1547729999196.JavaMail.zimbra@zimbra-store10.univ-lille.fr> References: <1783145268.1402885.1547717840566.JavaMail.zimbra@zimbra-store10.univ-lille.fr> <010801d4ae50$40028270$c0078750$@gmail.com> <368923767.1656133.1547729999196.JavaMail.zimbra@zimbra-store10.univ-lille.fr> Message-ID: <017901d4ae6b$ecd2d200$c6787600$@gmail.com> Dear Marion, Your script is a bit messy. I would start with: 1) Always clear your cfg before calling a FT function. Don’t go around saving different cfg’s. This is the nr. 1 cause of confusing results J 2) Load/segment etc. your data first with ft_preprocessing. Then call ft_preprocessing again to baseline correct, entering the output of the first run. I have a hunch that might fix your problem. So, something like: % load your data, apply rereferencing and segment in one go cfg = []; cfg.dataset = filename_Data; cfg.reref = 'yes'; cfg.refchannel = {'EXG3', 'EXG4'} ; cfg.refmethod = 'avg'; cfg.trl = … ; cfg = ft_definetrial(cfg); data_Raw = ft_preprocessing(cfg); % somehow plot your data to check figure ; plot(data_Raw.trial{1}(1, :)) ; % baseline correct your raw data structure, method 1 cfg = [] ; cfg.demean = ‘yes’ ; cfg.baselinewindow = [0 0.1] ; data_Raw_reref_1 = ft_preprocessing(cfg, data_Raw); % somehow plot your data to check figure ; plot(data_Raw_reref_1.trial{1}(1, :)) ; % baseline correct your raw data structure, method 2 cfg = [] ; cfg.demean = ‘yes’ ; cfg.baselinewindow = [-1 -0.1] ; % or whatever data_Raw_reref_2 = ft_preprocessing(cfg, data_Raw); % somehow plot your data to check figure ; plot(data_Raw_reref_2.trial{1}(1, :)) ; And oh, wait, I see what you did there… Don’t use different variables for your cfg, (e.g. cfg1, cfg2, etc.). See the mistake? Those are too easy to make if you don’t do something like the above. Cheers and good FieldTripping! Stepen From: fieldtrip On Behalf Of Marion Vincent Sent: Thursday, January 17, 2019 2:00 PM To: FieldTrip discussion list Subject: Re: [FieldTrip] Baseline removal errors in trials preprocessing Dear Stephen, Here is my script : %segmentation seg_window=[0.1 1]; % in seconds %preStim/postStim %config cfg= []; cfg.dataset = filename_Data; %% *********** TRIAL DEFINITION PART *********** (that works ) […] cfg = ft_definetrial(cfg); % *********** Re-References *********** (that also works ) cfg.reref = 'yes'; cfg.refchannel = {'EXG3', 'EXG4'};% electrode 131/132 // cell-array with new EEG reference channel(s), this can be 'all' for a common average reference cfg.refmethod = 'avg'; % 'avg', 'median', or 'bipolar' for bipolar derivation of sequential channels (default = 'avg') data_Raw = ft_preprocessing(cfg); %% *********** Baseline *********** cfg.demean = 'yes'; cfg1=cfg; cfg1.baselinewindow = [-seg_window(1) 0 ]; cfg2=cfg; cfg2.baselinewindow = [0 0.1]; cfg3=cfg; cfg3.baselinewindow = 'all'; data1 = ft_preprocessing(cfg1); data2 = ft_preprocessing(cfg2); data3 = ft_preprocessing(cfg3); ð I’ve attached the figure with the results. PS : In fact I made a mistake in my previous email : the result wasn’t the same when the Baseline window was ‘all’. Let me know if you need more informations. Thanks for your help. Marion Marion VINCENT Eng., PhD , CNRS Research Engineer Tel: +33 607 59 46 76 Laboratoire SCALab UMR CNRS 9193 Université Lille 3 BP 60149 59653 Villeneuve d'Ascq Cedex http://scalab.cnrs.fr -------------------------------------------- L’Imaginarium / SCV-IrDIVE Equipex 99a Boulevard Descat 59200 Tourcoing http://www.irdive.fr / De : Stephen Whitmarsh Envoyé le :jeudi 17 janvier 2019 11:51 À : 'FieldTrip discussion list' Objet :Re: [FieldTrip] Baseline removal errors in trials preprocessing Dear Marion, It sounds it might indeed be something as simple as a typo. Could you paste the part of your script – from baseline removal to plotting (where you don’t see a difference) - so we can take a look? Cheers, Stephen From: fieldtrip > On Behalf Of Marion Vincent Sent: Thursday, January 17, 2019 10:37 AM To: fieldtrip at science.ru.nl Subject: [FieldTrip] Baseline removal errors in trials preprocessing Dear FIeldtrip users, I’m new in using Fieldtrip for EEG processing and I’ve encountred some issues while removing the Baseline of my trials. I’m working on EEG signals recorded with the BioSemi system. My pre-processing method is : (1) Re-referecing the channels (necessary with BioSemi) (2) Trial definition (3) Baseline removal I’ve read on the documentation that ft_preprocessing xcan have several cfg parameter for the Baseline removal : % cfg.demean = 'yes';%'no' or 'yes', whether to apply baseline correction (default = 'no') % cfg.baselinewindow = 'all';%[begin end] ;%in seconds, the default is the complete trial (default = 'all') % cfg.detrend = 'no'; %'no' or 'yes', remove linear trend from the data (done per trial) (default = 'no') I wanted to remove a Baseline defined as the average of a given window preceeding my stimulus onset. I tried to use : cfg.baselinewindow = [-0.5 0 ]; cfg.baselinewindow = [0 0.1] or the default window . But the problem is that I always have the same result, no matter the window I use : the first point of my trial is put to zero and substracted to all my trial. I’m sure I’m doing something wrong (and that the answer is very simple), but I can’t manage to understand what is the issue. Do you have any advice ? Thanks ! Marion Marion VINCENT Eng., PhD , CNRS Research Engineer -------------- next part -------------- An HTML attachment was scrubbed... URL: From marion.vincent at univ-lille.fr Thu Jan 17 15:16:58 2019 From: marion.vincent at univ-lille.fr (Marion Vincent) Date: Thu, 17 Jan 2019 15:16:58 +0100 (CET) Subject: [FieldTrip] Baseline removal errors in trials preprocessing Message-ID: <444186168.1761650.1547734618751.JavaMail.zimbra@zimbra-store10.univ-lille.fr> Dear Julian, seg_window=[0.1 1]; % in seconds %preStim/postStim Does that mean, you segment your data to 0.1 s to 1 s after the stimulus? In that case, there is no data to use prior to 0.1 later on. The seg_window I used was to defined the trials (prestim to poststim interval). Then in my one trial definition function I define my trial as the interval [t0-preStim ; t0+postStim], with t0 the stimulus onset. ⇨ My trial goes from 0.1s before t0 to 1 s after. That is why the preStim value is positive in seg_window. So, these two statements: cfg1=cfg; cfg1.baselinewindow = [-seg_window(1) 0 ]; cfg2=cfg; cfg2.baselinewindow = [0 0.1]; are basically identical, as the interval -0.1 to 0 (cfg1) and 0 to 0.1 (cfg2) will both contain no data. Please double check this with the seg_window set to [-0.1 1] I think I might not understood how to pass the time interval in the cfg.baselinewindow. For me as I stated [ - seg_window(1)  ; 0], in had in mind to take the interval [ - 0.1 ; 0] before the stimulus onset (at t0=0) . Marion VINCENT Eng., PhD , CNRS Research Engineer Tel: +33 607 59 46 76 Laboratoire SCALab UMR CNRS 9193 Université Lille 3 BP 60149 59653 Villeneuve d'Ascq Cedex http://scalab.cnrs.fr -------------------------------------------- L’Imaginarium / SCV-IrDIVE Equipex 99a Boulevard Descat 59200 Tourcoing http://www.irdive.fr/ De : Julian Keil Envoyé le :jeudi 17 janvier 2019 14:57 À : FieldTrip discussion list Objet :Re: [FieldTrip] Baseline removal errors in trials preprocessing Dear Marion, when you state: seg_window=[0.1 1]; % in seconds %preStim/postStim Does that mean, you segment your data to 0.1 s to 1 s after the stimulus? In that case, there is no data to use prior to 0.1 later on. So, these two statements: cfg1=cfg; cfg1.baselinewindow = [-seg_window(1) 0 ]; cfg2=cfg; cfg2.baselinewindow = [0 0.1]; are basically identical, as the interval -0.1 to 0 (cfg1) and 0 to 0.1 (cfg2) will both contain no data. Please double check this with the seg_window set to [-0.1 1] Hope that helps, Julian On Thu, Jan 17, 2019 at 2:29 PM Marion Vincent wrote: Dear Stephen, Here is my script: %segmentation seg_window=[0.1 1]; % in seconds %preStim/postStim %config cfg= []; cfg.dataset = filename_Data; %% *********** TRIAL DEFINITION PART *********** (that works) […] cfg = ft_definetrial(cfg); % ***********  Re-References *********** (that also works) cfg.reref = 'yes'; cfg.refchannel = {'EXG3', 'EXG4'};% electrode 131/132 // cell-array with new EEG reference channel(s), this can be 'all' for a common average reference cfg.refmethod     = 'avg'; % 'avg', 'median', or 'bipolar' for bipolar derivation of sequential channels (default = 'avg') data_Raw = ft_preprocessing(cfg); %% *********** Baseline *********** cfg.demean = 'yes'; cfg1=cfg; cfg1.baselinewindow = [-seg_window(1) 0 ]; cfg2=cfg; cfg2.baselinewindow = [0 0.1]; cfg3=cfg; cfg3.baselinewindow = 'all'; data1 = ft_preprocessing(cfg1); data2 = ft_preprocessing(cfg2); data3 = ft_preprocessing(cfg3); I’ve attached the figure with the results. PS: In fact I made a mistake in my previous email: the result wasn’t the same when the Baseline window was ‘all’. Let me know if you need more informations. Thanks for your help. Marion Marion VINCENT Eng., PhD , CNRS Research Engineer Tel: +33 607 59 46 76 Laboratoire SCALab UMR CNRS 9193 Université Lille 3 BP 60149 59653 Villeneuve d'Ascq Cedex http://scalab.cnrs.fr -------------------------------------------- L’Imaginarium / SCV-IrDIVE Equipex 99a Boulevard Descat 59200 Tourcoing http://www.irdive.fr/ De: Stephen Whitmarsh Envoyé le:jeudi 17 janvier 2019 11:51 À: 'FieldTrip discussion list' Objet:Re: [FieldTrip] Baseline removal errors in trials preprocessing Dear Marion, It sounds it might indeed be something as simple as a typo. Could you paste the part of your script – from baseline removal to plotting (where you don’t see a difference) - so we can take a look? Cheers, Stephen From: fieldtrip On Behalf Of Marion Vincent Sent: Thursday, January 17, 2019 10:37 AM To: fieldtrip at science.ru.nl Subject: [FieldTrip] Baseline removal errors in trials preprocessing Dear FIeldtrip users, I’m new in using Fieldtrip for EEG processing and I’ve encountred some issues while removing the Baseline of my trials. I’m working on EEG signals recorded with the BioSemi system.  My pre-processing method is : (1)    Re-referecing the channels (necessary with BioSemi) (2)    Trial definition (3)    Baseline removal I’ve read on the documentation that ft_preprocessing xcan have several cfg parameter for the Baseline removal : % cfg.demean  = 'yes';%'no' or 'yes', whether to apply baseline correction (default = 'no') % cfg.baselinewindow = 'all';%[begin end] ;%in seconds, the default is the complete trial (default = 'all') % cfg.detrend       = 'no'; %'no' or 'yes', remove linear trend from the data (done per trial) (default = 'no') I wanted to remove a Baseline defined as the average of a given window preceeding my stimulus onset. I tried to use : cfg.baselinewindow = [-0.5 0 ]; cfg.baselinewindow = [0 0.1] or the default window . But the problem is that I always have the same result, no matter the window I use : the first point of my trial is put to zero and substracted to all my trial. I’m sure I’m doing something wrong (and that the answer is very simple), but I can’t manage to understand what is the issue. Do you have any advice ? Thanks ! Marion Marion VINCENT Eng., PhD , CNRS Research Engineer _______________________________________________ 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 stephen.whitmarsh at gmail.com Thu Jan 17 15:17:39 2019 From: stephen.whitmarsh at gmail.com (Stephen Whitmarsh) Date: Thu, 17 Jan 2019 15:17:39 +0100 Subject: [FieldTrip] Baseline removal errors in trials preprocessing In-Reply-To: References: <1783145268.1402885.1547717840566.JavaMail.zimbra@zimbra-store10.univ-lille.fr> <010801d4ae50$40028270$c0078750$@gmail.com> <368923767.1656133.1547729999196.JavaMail.zimbra@zimbra-store10.univ-lille.fr> Message-ID: <019d01d4ae6f$6780bc80$36823580$@gmail.com> Good point Julian. I though that cfg1, cfg2, and cfg3 were never used, but see I was wrong. Back to my own cfg’s now… Cheers, Stephen From: fieldtrip On Behalf Of Julian Keil Sent: Thursday, January 17, 2019 2:38 PM To: FieldTrip discussion list Subject: Re: [FieldTrip] Baseline removal errors in trials preprocessing Dear Marion, when you state: seg_window=[0.1 1]; % in seconds %preStim/postStim Does that mean, you segment your data to 0.1 s to 1 s after the stimulus? In that case, there is no data to use prior to 0.1 later on. So, these two statements: cfg1=cfg; cfg1.baselinewindow = [-seg_window(1) 0 ]; cfg2=cfg; cfg2.baselinewindow = [0 0.1]; are basically identical, as the interval -0.1 to 0 (cfg1) and 0 to 0.1 (cfg2) will both contain no data. Please double check this with the seg_window set to [-0.1 1] Hope that helps, Julian On Thu, Jan 17, 2019 at 2:29 PM Marion Vincent > wrote: Dear Stephen, Here is my script: %segmentation seg_window=[0.1 1]; % in seconds %preStim/postStim %config cfg= []; cfg.dataset = filename_Data; %% *********** TRIAL DEFINITION PART *********** (that works) […] cfg = ft_definetrial(cfg); % *********** Re-References *********** (that also works) cfg.reref = 'yes'; cfg.refchannel = {'EXG3', 'EXG4'};% electrode 131/132 // cell-array with new EEG reference channel(s), this can be 'all' for a common average reference cfg.refmethod = 'avg'; % 'avg', 'median', or 'bipolar' for bipolar derivation of sequential channels (default = 'avg') data_Raw = ft_preprocessing(cfg); %% *********** Baseline *********** cfg.demean = 'yes'; cfg1=cfg; cfg1.baselinewindow = [-seg_window(1) 0 ]; cfg2=cfg; cfg2.baselinewindow = [0 0.1]; cfg3=cfg; cfg3.baselinewindow = 'all'; data1 = ft_preprocessing(cfg1); data2 = ft_preprocessing(cfg2); data3 = ft_preprocessing(cfg3); I’ve attached the figure with the results. PS: In fact I made a mistake in my previous email: the result wasn’t the same when the Baseline window was ‘all’. Let me know if you need more informations. Thanks for your help. Marion Marion VINCENT Eng., PhD , CNRS Research Engineer Tel: +33 607 59 46 76 Laboratoire SCALab UMR CNRS 9193 Université Lille 3 BP 60149 59653 Villeneuve d'Ascq Cedex http://scalab.cnrs.fr -------------------------------------------- L’Imaginarium / SCV-IrDIVE Equipex 99a Boulevard Descat 59200 Tourcoing http://www.irdive.fr/ De: Stephen Whitmarsh Envoyé le:jeudi 17 janvier 2019 11:51 À: 'FieldTrip discussion list' Objet:Re: [FieldTrip] Baseline removal errors in trials preprocessing Dear Marion, It sounds it might indeed be something as simple as a typo. Could you paste the part of your script – from baseline removal to plotting (where you don’t see a difference) - so we can take a look? Cheers, Stephen From: fieldtrip > On Behalf Of Marion Vincent Sent: Thursday, January 17, 2019 10:37 AM To: fieldtrip at science.ru.nl Subject: [FieldTrip] Baseline removal errors in trials preprocessing Dear FIeldtrip users, I’m new in using Fieldtrip for EEG processing and I’ve encountred some issues while removing the Baseline of my trials. I’m working on EEG signals recorded with the BioSemi system. My pre-processing method is : (1) Re-referecing the channels (necessary with BioSemi) (2) Trial definition (3) Baseline removal I’ve read on the documentation that ft_preprocessing xcan have several cfg parameter for the Baseline removal : % cfg.demean = 'yes';%'no' or 'yes', whether to apply baseline correction (default = 'no') % cfg.baselinewindow = 'all';%[begin end] ;%in seconds, the default is the complete trial (default = 'all') % cfg.detrend = 'no'; %'no' or 'yes', remove linear trend from the data (done per trial) (default = 'no') I wanted to remove a Baseline defined as the average of a given window preceeding my stimulus onset. I tried to use : cfg.baselinewindow = [-0.5 0 ]; cfg.baselinewindow = [0 0.1] or the default window . But the problem is that I always have the same result, no matter the window I use : the first point of my trial is put to zero and substracted to all my trial. I’m sure I’m doing something wrong (and that the answer is very simple), but I can’t manage to understand what is the issue. Do you have any advice ? Thanks ! Marion Marion VINCENT Eng., PhD , CNRS Research Engineer _______________________________________________ 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 weberi at staff.uni-marburg.de Thu Jan 17 17:31:51 2019 From: weberi at staff.uni-marburg.de (weberi at staff.uni-marburg.de) Date: Thu, 17 Jan 2019 17:31:51 +0100 Subject: [FieldTrip] PhD project in Clinical Neurosciences Message-ID: <20190117173151.Horde.3FU1CgXluh3mw7DhE7jj8VI@home.staff.uni-marburg.de> Dear community, we are looking for a highly motivated student (f/m) for a PhD project in Clinical Neurosciences. When? The project will start 01.April 2019 and is estimated to be completed within three years. Where? This project will be conducted in the Clinical Systems Neuroscience Lab in the Department of Neurology of the University Hospital Marburg, Germany. We work closely with the Department of Neurosurgery. The hospital is affiliated with the Philipps University of Marburg, one of the oldest universities in Europe and home to one of Germany's most traditional medical faculties. Alumni range from the Brothers Grimm to Nobel Laureates Emil von Behring, Otto Loewi and Jules Hoffmann. The project The aim of the PhD project will be to predict and optimize the clinical outcome of Deep Brain Stimulation for Parkinson’s disease based on preoperatively and intraoperatively acquired multimodal data using machine learning. The team The Clinical Systems Neuroscience Lab is a multidisciplinary lab composed of neurologists, neuroscientists, psychologists, biologists and medical technicians. We use innovative analytic techniques to advance the understanding of physiological and pathological neural oscillations and develop new treatment options for neurological disorders. To this end, we employ high-resolution scalp electroencephalography (EEG) and direct recordings from the human brain (intracranial EEG). Intracranially, we record local field potentials, as well as single unit recordings from several brain regions, such as the thalamus, hippocampus, prefrontal cortex and basal ganglia. We are particularly interested in the frequency-specific effects of deep brain stimulation on the neural signature of motor and cognitive brain functions. For further details, visit our website: www.systemsneuroscience.de. We offer… • An innovative and highly relevant research topic • Cutting edge infrastructure and technology • The possibility to learn innovative analysis techniques of neurophysiological data • A young, interdisciplinary and international team • The possibility to work with patients and apply your research clinically  We are looking for… We are looking for a highly motivated, reliable student with experience in research, who is able to critically appraise information and work independently. The applicant should have a background in neuroscience, biology, mathematics, physics or related fields (MSc or equivalent degree). Programming skills and/or experience with machine learning are advantageous, but not a prerequisite for an application. The applicant should have an affinity for mathematics and the motivation to employ and advance new complex computational methods. We are looking for a team player, who is interested in working with neurological patients as part of their research project. As the project requires communication with patients, a certain level of proficiency in German is required. Funding Funding is available for three years and can be extended, if necessary. Application Applications should include a letter of motivation, your curriculum vitae including your research experience and list of publications. Please also provide two letters of recommendation of previous employers or principle investigators of previous labs. We look forward to receiving your application by February 24nd 2019. Please send all documents as pdf to the junior principal investigator Carina Oehrn: Carina Oehrn University Hospital Gießen & Marburg Department of Neurology Baldingerstraße 35043 Marburg, Germany E-Mail: carina.oehrn at staff.uni-marburg.de Best wishes, Immo Weber Dipl.-Biol. Immo Weber Department of Neurology Clinical Systems Neuroscience Lab University Hospital Gießen & Marburg Marburg Baldingerstraße D-35033 Marburg, Germany Phone (+49) 06421 - 58 66276 E-Mail: immo.weber at staff.uni-marburg.de url: http://www.systemsneuroscience.de Aufsichtsratsvorsitzender: Dr. Dr. Martin Siebert Geschäftsführung: Dr. Gunther Weiß (Vorsitzender), Prof. Dr. Werner Seeger (Stv. Vors.), Dr. Christiane Hinck-Kneip, Prof. Dr. Harald Renz Sitz der Gesellschaft: Gießen Amtsgericht Gießen HRB 6384 From marion.vincent at univ-lille.fr Thu Jan 17 17:59:44 2019 From: marion.vincent at univ-lille.fr (Marion Vincent) Date: Thu, 17 Jan 2019 17:59:44 +0100 (CET) Subject: [FieldTrip] Baseline removal errors in trials preprocessing In-Reply-To: <017901d4ae6b$ecd2d200$c6787600$@gmail.com> References: <1783145268.1402885.1547717840566.JavaMail.zimbra@zimbra-store10.univ-lille.fr> <010801d4ae50$40028270$c0078750$@gmail.com> <368923767.1656133.1547729999196.JavaMail.zimbra@zimbra-store10.univ-lille.fr> <017901d4ae6b$ecd2d200$c6787600$@gmail.com> Message-ID: <1674442156.2004986.1547744384621.JavaMail.zimbra@zimbra-store10.univ-lille.fr> An HTML attachment was scrubbed... URL: -------------- next part -------------- Dear Stephen, Thanks for your comments. In fact I only used the cgf1, cfg2.. for plotting the figure I sent you. So it was not my «real» code. But you’re rigth cleaning the cfg will prevent some errors. I’ve done so and still have some errors: (for each case, I compared it to a personnal calculation) If I use the ‘all’ default cfg.baselinewindow => I have the result I expected: the Baseline is the mean value of all the signal. (cf. figure Baseline_AllSignal)If I use a given time window (here from 0.1 to 0 sec before the stimulsu onset) => in fieldtrip, the Baseline is only the «first point» of the raw signal, but not its mean value on the Baseline window (as in my own calculation: cf. figure Baseline_TimeWindow). I also tried with exorbitant window [-10000 0], [0 0.1], etc ) and each time I Always have the exact same result for the filedtrip calculation. Here is my entire code(I hope it will be clearer): ************************************************************** seg_window=[0.1 1]; % in seconds %preStim/postStim trig_Type=[1 5 2 6 3 7 4 8]; % trigger value load(filename_Trig); % ** READ FILE INFO % read the header information and the events from the data hdr   = ft_read_header(filename_Data); % Config cfg= []; cfg.dataset       = filename_Data; % **RE-REFERENCES cfg.reref         = 'yes'; cfg.refchannel    = {'EXG3', 'EXG4'} ; % electrode 131/132 // cell-array with new EEG reference channel(s), this can be 'all' for a common average reference cfg.refmethod     = 'avg'; % 'avg', 'median', or 'bipolar' for bipolar derivation of sequential channels (default = 'avg') % ** TRIAL DEFINITION event_All = ft_read_event(filename_Data); % Select only the trigger codes, not the battery and CMS status sel = find(strcmp({event_All.type}, 'STATUS')); event_All = event_All(sel); cfg.eventType=[trig_Type(1) trig_Type(2)]; cfg.trialfun = 'AVExp_trialfun'; cfg.trialdef.pre  = seg_window(1); cfg.trialdef.post = seg_window(2); cfg.Fs=hdr.Fs; % convert seconds in sample cfg = ft_definetrial(cfg); % Remove trials from Cartool selection cfg.trl(find(Triggers{num_Cond}(:,1)==0),:) = []; data_Raw = ft_preprocessing(cfg); % Plot data to check figure ; chan_num=1; trial_num=1; figure; plot(data_Raw.trial{trial_num}(chan_num,:)); % ** BASELINE CORRECTION: BASELINE IS ALL THE SIGNAL %baseline correct the raw data structure, automatic cfg                     = [] ; cfg.demean              = 'yes'; cfg.baselinewindow      = 'all'; data_Raw_reref        = ft_preprocessing(cfg, data_Raw); % Manual correction test for trial_num=1:length(data_Raw.trial)     for chan_num=1:length(data_Raw.label)         Signal=data_Raw.trial{trial_num}(chan_num,:);         baseline_value=mean(Signal); % for comparison with the default value of         data_Raw_reref_Manual.trial{trial_num}(chan_num,:)=data_Raw.trial{trial_num}(chan_num,:)-baseline_value*ones(1,length(Signal));     end end % plot comparison figure;chan_num=1; trial_num=1; hold all plot(data_Raw_reref.trial{trial_num}(chan_num,:)); plot(data_Raw_reref_Manual.trial{trial_num}(chan_num,:)); legend('FieldTrip','Manual'); title('Baseline is all the signal'); % ** BASELINE CORRECTION: BASELINE IS THE MEAN VALUE OF A WINDOW of 0.1sec before the stimulus onset %baseline correct the raw data structure, automatic cfg                     = [] ; cfg.demean              = 'yes'; cfg.baselinewindow      = [-0.1 0] ; %as the baseline lasts 0.1 s  before the stimulus onset data_Raw_reref_1       = ft_preprocessing(cfg, data_Raw); % Manual correction test for trial 1 - comparison to automatic calculation for trial_num=1:length(data_Raw.trial)     for chan_num=1:length(data_Raw.label)         Signal=data_Raw.trial{trial_num}(chan_num,:);         baseline_window=[1  round(hdr.Fs*0.1)];% because baseline lasts 0.1 s  before the stimulus onset         baseline_value=mean(Signal(baseline_window(1):baseline_window(2)));         data_Raw_reref_Manual_1.trial{trial_num}(chan_num,:)=data_Raw.trial{trial_num}(chan_num,:)-baseline_value*ones(1,length(Signal));     end end % plot comparison figure;chan_num=1; trial_num=1; hold all plot(data_Raw_reref_1.trial{trial_num}(chan_num,:)); plot(data_Raw_reref_Manual_1.trial{trial_num}(chan_num,:)); legend('FieldTrip','Manual'); title('Baseline is a given time window’); ************************************************************** I’m sure it’s a silly mistake, but I really can’t find it. Thanks Marion Marion VINCENT Eng., PhD , CNRS Research Engineer Tel: +33 607 59 46 76 Laboratoire SCALab UMR CNRS 9193 Université Lille 3 BP 60149 59653 Villeneuve d'Ascq Cedex http://scalab.cnrs.fr -------------------------------------------- L’Imaginarium / SCV-IrDIVE Equipex 99a Boulevard Descat 59200 Tourcoing http://www.irdive.fr/ De: Stephen Whitmarsh Envoyé le:jeudi 17 janvier 2019 15:03 À: 'FieldTrip discussion list' Objet:Re: [FieldTrip] Baseline removal errors in trials preprocessing Dear Marion, Your script is a bit messy. I would start with: 1) Always clear your cfg before calling a FT function. Don’t go around saving different cfg’s. This is the nr. 1 cause of confusing results J 2) Load/segment etc. your data first with ft_preprocessing. Then call ft_preprocessing again to baseline correct, entering the output of the first run. I have a hunch that might fix your problem. So, something like: % load your data, apply rereferencing and segment in one go cfg = []; cfg.dataset = filename_Data; cfg.reref = 'yes'; cfg.refchannel = {'EXG3', 'EXG4'} ; cfg.refmethod = 'avg'; cfg.trl = … ; cfg = ft_definetrial(cfg); data_Raw = ft_preprocessing(cfg); % somehow plot your data to check figure ; plot(data_Raw.trial{1}(1, :)) ; % baseline correct your raw data structure, method 1 cfg = [] ; cfg.demean = ‘yes’ ; cfg.baselinewindow = [0 0.1] ; data_Raw_reref_1 = ft_preprocessing(cfg, data_Raw); % somehow plot your data to check figure ; plot(data_Raw_reref_1.trial{1}(1, :)) ; % baseline correct your raw data structure, method 2 cfg = [] ; cfg.demean = ‘yes’ ; cfg.baselinewindow = [-1 -0.1] ; % or whatever data_Raw_reref_2 = ft_preprocessing(cfg, data_Raw); % somehow plot your data to check figure ; plot(data_Raw_reref_2.trial{1}(1, :)) ; And oh, wait, I see what you did there… Don’t use different variables for your cfg, (e.g. cfg1, cfg2, etc.). See the mistake? Those are too easy to make if you don’t do something like the above. Cheers and good FieldTripping! Stepen From: fieldtrip On Behalf Of Marion Vincent Sent: Thursday, January 17, 2019 2:00 PM To: FieldTrip discussion list Subject: Re: [FieldTrip] Baseline removal errors in trials preprocessing Dear Stephen, Here is my script : %segmentation seg_window=[0.1 1]; % in seconds %preStim/postStim %config cfg= []; cfg.dataset = filename_Data; %% *********** TRIAL DEFINITION PART *********** (that works ) […] cfg = ft_definetrial(cfg); % *********** Re-References *********** (that also works ) cfg.reref = 'yes'; cfg.refchannel = {'EXG3', 'EXG4'};% electrode 131/132 // cell-array with new EEG reference channel(s), this can be 'all' for a common average reference cfg.refmethod = 'avg'; % 'avg', 'median', or 'bipolar' for bipolar derivation of sequential channels (default = 'avg') data_Raw = ft_preprocessing(cfg); %% *********** Baseline *********** cfg.demean = 'yes'; cfg1=cfg; cfg1.baselinewindow = [-seg_window(1) 0 ]; cfg2=cfg; cfg2.baselinewindow = [0 0.1]; cfg3=cfg; cfg3.baselinewindow = 'all'; data1 = ft_preprocessing(cfg1); data2 = ft_preprocessing(cfg2); data3 = ft_preprocessing(cfg3); ð I’ve attached the figure with the results. PS : In fact I made a mistake in my previous email : the result wasn’t the same when the Baseline window was ‘all’. Let me know if you need more informations. Thanks for your help. Marion Marion VINCENT Eng., PhD , CNRS Research Engineer Tel: +33 607 59 46 76 Laboratoire SCALab UMR CNRS 9193 Université Lille 3 BP 60149 59653 Villeneuve d'Ascq Cedex http://scalab.cnrs.fr -------------------------------------------- L’Imaginarium / SCV-IrDIVE Equipex 99a Boulevard Descat 59200 Tourcoing http://www.irdive.fr / De : Stephen Whitmarsh Envoyé le :jeudi 17 janvier 2019 11:51 À : 'FieldTrip discussion list' Objet :Re: [FieldTrip] Baseline removal errors in trials preprocessing Dear Marion, It sounds it might indeed be something as simple as a typo. Could you paste the part of your script – from baseline removal to plotting (where you don’t see a difference) - so we can take a look? Cheers, Stephen From: fieldtrip > On Behalf Of Marion Vincent Sent: Thursday, January 17, 2019 10:37 AM To: fieldtrip at science.ru.nl Subject: [FieldTrip] Baseline removal errors in trials preprocessing Dear FIeldtrip users, I’m new in using Fieldtrip for EEG processing and I’ve encountred some issues while removing the Baseline of my trials. I’m working on EEG signals recorded with the BioSemi system. My pre-processing method is : (1) Re-referecing the channels (necessary with BioSemi) (2) Trial definition (3) Baseline removal I’ve read on the documentation that ft_preprocessing xcan have several cfg parameter for the Baseline removal : % cfg.demean = 'yes';%'no' or 'yes', whether to apply baseline correction (default = 'no') % cfg.baselinewindow = 'all';%[begin end] ;%in seconds, the default is the complete trial (default = 'all') % cfg.detrend = 'no'; %'no' or 'yes', remove linear trend from the data (done per trial) (default = 'no') I wanted to remove a Baseline defined as the average of a given window preceeding my stimulus onset. I tried to use : cfg.baselinewindow = [-0.5 0 ]; cfg.baselinewindow = [0 0.1] or the default window . But the problem is that I always have the same result, no matter the window I use : the first point of my trial is put to zero and substracted to all my trial. I’m sure I’m doing something wrong (and that the answer is very simple), but I can’t manage to understand what is the issue. Do you have any advice ? Thanks ! Marion Marion VINCENT Eng., PhD , CNRS Research Engineer _______________________________________________ fieldtrip mailing list https://mailman.science.ru.nl/mailman/listinfo/fieldtrip https://doi.org/10.1371/journal.pcbi.1002202 -------------- next part -------------- A non-text attachment was scrubbed... Name: Baseline_AllSignal.png Type: image/png Size: 21466 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: Baseline_TimeWindow.png Type: image/png Size: 69724 bytes Desc: not available URL: From giulia.lioi at inria.fr Thu Jan 17 18:05:24 2019 From: giulia.lioi at inria.fr (Giulia Lioi) Date: Thu, 17 Jan 2019 18:05:24 +0100 (CET) Subject: [FieldTrip] eeg source analysis units Message-ID: <698173411.1999032.1547744724187.JavaMail.zimbra@inria.fr> Dear Fieldtrip users, I am using ft_sourceanalysis for time-lock dipole source estimation with mne approach. Is someone aware of the units in wich results (i.e. source.pow() ) are expressed? Many thanks Giulia Giulia Lioi, PhD | Engineer R&D Visages-Hybrid teams Univ Rennes, Inria, CNRS, IRISA F-35000 Rennes Tel: 0033 767466577 -------------- next part -------------- An HTML attachment was scrubbed... URL: From stephen.whitmarsh at gmail.com Thu Jan 17 18:50:16 2019 From: stephen.whitmarsh at gmail.com (Stephen Whitmarsh) Date: Thu, 17 Jan 2019 18:50:16 +0100 Subject: [FieldTrip] Baseline removal errors in trials preprocessing In-Reply-To: <1674442156.2004986.1547744384621.JavaMail.zimbra@zimbra-store10.univ-lille.fr> References: <1783145268.1402885.1547717840566.JavaMail.zimbra@zimbra-store10.univ-lille.fr> <010801d4ae50$40028270$c0078750$@gmail.com> <368923767.1656133.1547729999196.JavaMail.zimbra@zimbra-store10.univ-lille.fr> <017901d4ae6b$ecd2d200$c6787600$@gmail.com> <1674442156.2004986.1547744384621.JavaMail.zimbra@zimbra-store10.univ-lille.fr> Message-ID: Hi Marion, I would check your time axis. I never use ft_definetrial like that (I make my own .trl field), so I'm not sure it went through correctly with the offset (t=0). So check your data_Raw.time{1}. Does it really go from -0.1 to 1.0? If not, Julian's point is right, and your point on that is 'first point' might be explained as well, if I understood that correctly. Cheers, Stephen On Thu, 17 Jan 2019 at 18:29, Marion Vincent wrote: > Dear Stephen, > Thanks for your comments. > In fact I only used the cgf1, cfg2.. for plotting the figure I sent you. > So it was not my «real» code. > But you’re rigth cleaning the cfg will prevent some errors. > I’ve done so and still have some errors: (for each case, I compared it to > a personnal calculation) > If I use the ‘all’ default cfg.baselinewindow => I have the result I > expected: the Baseline is the mean value of all the signal. (cf. figure > Baseline_AllSignal)If I use a given time window (here from 0.1 to 0 sec > before the stimulsu onset) => in fieldtrip, the Baseline is only the «first > point» of the raw signal, but not its mean value on the Baseline window (as > in my own calculation: cf. figure Baseline_TimeWindow). I also tried with > exorbitant window [-10000 0], [0 0.1], etc ) and each time I Always have > the exact same result for the filedtrip calculation. > Here is my entire code(I hope it will be clearer): > ************************************************************** > seg_window=[0.1 1]; % in seconds %preStim/postStim > trig_Type=[1 5 2 6 3 7 4 8]; % trigger value > load(filename_Trig); > % ** READ FILE INFO > % read the header information and the events from the data > hdr = ft_read_header(filename_Data); > % Config > cfg= []; > cfg.dataset = filename_Data; > % **RE-REFERENCES > cfg.reref = 'yes'; > cfg.refchannel = {'EXG3', 'EXG4'} ; % electrode 131/132 // cell-array > with new EEG reference channel(s), this can be 'all' for a common average > reference > cfg.refmethod = 'avg'; % 'avg', 'median', or 'bipolar' for bipolar > derivation of sequential channels (default = 'avg') > % ** TRIAL DEFINITION > event_All = ft_read_event(filename_Data); > % Select only the trigger codes, not the battery and CMS status > sel = find(strcmp({event_All.type}, 'STATUS')); > event_All = event_All(sel); > cfg.eventType=[trig_Type(1) trig_Type(2)]; > cfg.trialfun = 'AVExp_trialfun'; > cfg.trialdef.pre = seg_window(1); > cfg.trialdef.post = seg_window(2); > cfg.Fs=hdr.Fs; % convert seconds in sample > cfg = ft_definetrial(cfg); > % Remove trials from Cartool selection > cfg.trl(find(Triggers{num_Cond}(:,1)==0),:) = []; > data_Raw = ft_preprocessing(cfg); > % Plot data to check > figure ; chan_num=1; > trial_num=1; > figure; > plot(data_Raw.trial{trial_num}(chan_num,:)); > % ** BASELINE CORRECTION: BASELINE IS ALL THE SIGNAL > %baseline correct the raw data structure, automatic > cfg = [] ; > cfg.demean = 'yes'; > cfg.baselinewindow = 'all'; > data_Raw_reref = ft_preprocessing(cfg, data_Raw); > % Manual correction test > for trial_num=1:length(data_Raw.trial) > for chan_num=1:length(data_Raw.label) > Signal=data_Raw.trial{trial_num}(chan_num,:); > baseline_value=mean(Signal); % for comparison with the default > value of > > data_Raw_reref_Manual.trial{trial_num}(chan_num,:)=data_Raw.trial{trial_num}(chan_num,:)-baseline_value*ones(1,length(Signal)); > end > end > % plot comparison > figure;chan_num=1; > trial_num=1; > hold all > plot(data_Raw_reref.trial{trial_num}(chan_num,:)); > plot(data_Raw_reref_Manual.trial{trial_num}(chan_num,:)); > legend('FieldTrip','Manual'); > title('Baseline is all the signal'); > % ** BASELINE CORRECTION: BASELINE IS THE MEAN VALUE OF A WINDOW of 0.1sec > before the stimulus onset > %baseline correct the raw data structure, automatic > cfg = [] ; > cfg.demean = 'yes'; > cfg.baselinewindow = [-0.1 0] ; %as the baseline lasts 0.1 s before > the stimulus onset > data_Raw_reref_1 = ft_preprocessing(cfg, data_Raw); > % Manual correction test for trial 1 - comparison to automatic calculation > for trial_num=1:length(data_Raw.trial) > for chan_num=1:length(data_Raw.label) > Signal=data_Raw.trial{trial_num}(chan_num,:); > baseline_window=[1 round(hdr.Fs*0.1)];% because baseline lasts > 0.1 s before the stimulus onset > baseline_value=mean(Signal(baseline_window(1):baseline_window(2))); > > data_Raw_reref_Manual_1.trial{trial_num}(chan_num,:)=data_Raw.trial{trial_num}(chan_num,:)-baseline_value*ones(1,length(Signal)); > end > end > % plot comparison > figure;chan_num=1; > trial_num=1; > hold all > plot(data_Raw_reref_1.trial{trial_num}(chan_num,:)); > plot(data_Raw_reref_Manual_1.trial{trial_num}(chan_num,:)); > legend('FieldTrip','Manual'); > title('Baseline is a given time window’); > ************************************************************** > I’m sure it’s a silly mistake, but I really can’t find it. > Thanks > Marion > Marion VINCENT > Eng., PhD , CNRS Research Engineer > Tel: +33 607 59 46 76 > Laboratoire SCALab UMR CNRS 9193 > Université Lille 3 > BP 60149 > 59653 Villeneuve d'Ascq Cedex > http://scalab.cnrs.fr > -------------------------------------------- > L’Imaginarium / SCV-IrDIVE Equipex > 99a Boulevard Descat > 59200 Tourcoing > http://www.irdive.fr/ > De: Stephen Whitmarsh > Envoyé le:jeudi 17 janvier 2019 15:03 > À: 'FieldTrip discussion list' > Objet:Re: [FieldTrip] Baseline removal errors in trials preprocessing > > > Dear Marion, > > > > Your script is a bit messy. I would start with: > > 1) Always clear your cfg before calling a FT function. Don’t go > around saving different cfg’s. This is the nr. 1 cause of confusing results > J > > 2) Load/segment etc. your data first with ft_preprocessing. Then call > ft_preprocessing again to baseline correct, entering the output of the > first run. > > I have a hunch that might fix your problem. So, something like: > > > > % load your data, apply rereferencing and segment in one go > > cfg = []; > > cfg.dataset = filename_Data; > > cfg.reref = 'yes'; > > cfg.refchannel = {'EXG3', 'EXG4'} ; > > cfg.refmethod = 'avg'; > > cfg.trl = … ; > > cfg = ft_definetrial(cfg); > > data_Raw = ft_preprocessing(cfg); > > > > % somehow plot your data to check > > figure ; plot(data_Raw.trial{1}(1, :)) ; > > > > % baseline correct your raw data structure, method 1 > > cfg = [] ; > > cfg.demean = ‘yes’ ; > > cfg.baselinewindow = [0 0.1] ; > > data_Raw_reref_1 = ft_preprocessing(cfg, data_Raw); > > > > % somehow plot your data to check > > figure ; plot(data_Raw_reref_1.trial{1}(1, :)) ; > > > > % baseline correct your raw data structure, method 2 > > cfg = [] ; > > cfg.demean = ‘yes’ ; > > cfg.baselinewindow = [-1 -0.1] ; % or whatever > > data_Raw_reref_2 = ft_preprocessing(cfg, data_Raw); > > > > % somehow plot your data to check > > figure ; plot(data_Raw_reref_2.trial{1}(1, :)) ; > > > > And oh, wait, I see what you did there… Don’t use different variables for > your cfg, (e.g. cfg1, cfg2, etc.). See the mistake? Those are too easy to > make if you don’t do something like the above. > > > > Cheers and good FieldTripping! > > Stepen > > > > > > > > From: fieldtrip On Behalf Of Marion > Vincent > Sent: Thursday, January 17, 2019 2:00 PM > To: FieldTrip discussion list > Subject: Re: [FieldTrip] Baseline removal errors in trials preprocessing > > > > Dear Stephen, > > > > Here is my script : > > > > %segmentation > > seg_window=[0.1 1]; % in seconds %preStim/postStim > > > > %config > > cfg= []; > > cfg.dataset = filename_Data; > > > > %% *********** TRIAL DEFINITION PART *********** (that works ) > > […] > > cfg = ft_definetrial(cfg); > > > > % *********** Re-References *********** (that also works ) > > cfg.reref = 'yes'; > > cfg.refchannel = {'EXG3', 'EXG4'};% electrode 131/132 // cell-array with > new EEG reference channel(s), this can be 'all' for a common average > reference > > cfg.refmethod = 'avg'; % 'avg', 'median', or 'bipolar' for bipolar > derivation of sequential channels (default = 'avg') > > > > data_Raw = ft_preprocessing(cfg); > > > > %% *********** Baseline *********** > > cfg.demean = 'yes'; > > > > cfg1=cfg; > > cfg1.baselinewindow = [-seg_window(1) 0 ]; > > cfg2=cfg; > > cfg2.baselinewindow = [0 0.1]; > > cfg3=cfg; > > cfg3.baselinewindow = 'all'; > > > > data1 = ft_preprocessing(cfg1); > > data2 = ft_preprocessing(cfg2); > > data3 = ft_preprocessing(cfg3); > > > > > > ð I’ve attached the figure with the results. > > > > PS : In fact I made a mistake in my previous email : the result wasn’t the > same when the Baseline window was ‘all’. > > > > Let me know if you need more informations. > > Thanks for your help. > > > > Marion > > > > > > Marion VINCENT > Eng., PhD , CNRS Research Engineer > Tel: +33 607 59 46 76 > > Laboratoire SCALab UMR CNRS 9193 > Université Lille 3 > BP 60149 > 59653 Villeneuve d'Ascq Cedex > http://scalab.cnrs.fr > -------------------------------------------- > L’Imaginarium / SCV-IrDIVE Equipex > 99a Boulevard Descat > 59200 Tourcoing > http://www.irdive.fr / > > > > De : Stephen Whitmarsh > Envoyé le :jeudi 17 janvier 2019 11:51 > À : 'FieldTrip discussion list' > Objet :Re: [FieldTrip] Baseline removal errors in trials preprocessing > > > > > > Dear Marion, > > > > It sounds it might indeed be something as simple as a typo. Could you > paste the part of your script – from baseline removal to plotting (where > you don’t see a difference) - so we can take a look? > > > > Cheers, > > Stephen > > > > From: fieldtrip fieldtrip-bounces at science.ru.nl> > On Behalf Of Marion Vincent > Sent: Thursday, January 17, 2019 10:37 AM > To: fieldtrip at science.ru.nl > Subject: [FieldTrip] Baseline removal errors in trials preprocessing > > > > Dear FIeldtrip users, > > > > I’m new in using Fieldtrip for EEG processing and I’ve encountred some > issues while removing the Baseline of my trials. > > > > I’m working on EEG signals recorded with the BioSemi system. My > pre-processing method is : > > (1) Re-referecing the channels (necessary with BioSemi) > > (2) Trial definition > > (3) Baseline removal > > > > I’ve read on the documentation that ft_preprocessing xcan have several cfg > parameter for the Baseline removal : > > > > % cfg.demean = 'yes';%'no' or 'yes', whether to apply baseline correction > (default = 'no') > > % cfg.baselinewindow = 'all';%[begin end] ;%in seconds, the default is the > complete trial (default = 'all') > > % cfg.detrend = 'no'; %'no' or 'yes', remove linear trend from the > data (done per trial) (default = 'no') > > > > I wanted to remove a Baseline defined as the average of a given window > preceeding my stimulus onset. > > > > I tried to use : cfg.baselinewindow = [-0.5 0 ]; cfg.baselinewindow = [0 > 0.1] or the default window . > > But the problem is that I always have the same result, no matter the > window I use : the first point of my trial is put to zero and substracted > to all my trial. > > > > I’m sure I’m doing something wrong (and that the answer is very simple), > but I can’t manage to understand what is the issue. > > > > Do you have any advice ? > > > > Thanks ! > > Marion > > > > Marion VINCENT > Eng., PhD , CNRS Research Engineer > > > > > > _______________________________________________ > 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 elene.beitia at alumni.mondragon.edu Fri Jan 18 09:20:14 2019 From: elene.beitia at alumni.mondragon.edu (Elene Beitia Loinaz) Date: Fri, 18 Jan 2019 09:20:14 +0100 Subject: [FieldTrip] headmodel and electrodes alignment In-Reply-To: References: Message-ID: Thank you Stephen and Julian, I already fixed the problem. It was a problem between different standards. Hau idatzi du Stephen Whitmarsh (stephen.whitmarsh at gmail.com) erabiltzaileak (2019 urt. 16, az. (10:45)): > Hi Elene, > > In the code you do not use ft_electroderealign twice (once manually, then > automatic). Also, you convert units after realignment. > > For the sake of debugging and clarity, I would: > > > 1. - figure out and set the units correctly for you headmodel and > electrodes > 2. - convert headmodel and electrodes to same units > 3. - plot to check > 4. - use 'interactive' realignment > 5. - plot to check > 6. - use 'headmodel' realignment > 7. - plot to check > > > Cheers, > Stephen > > > On Wed, 16 Jan 2019 at 10:35, Elene Beitia Loinaz < > elene.beitia at alumni.mondragon.edu> wrote: > >> Hi Stephen, >> >> Thank you for your answer. I already try that, but the result that I >> obtained is not correct either. >> >> Code: >> >> cfg=[]; >> >> cfg.method= 'headshape'; >> >> cfg.headshape=headmodel.bnd(1); % this is the skin surface >> >> elec_realigned =ft_electroderealign(cfg,data1.elec); >> >> >> >> %Plot the result to see if is correct >> >> >> >> vol = ft_convert_units(vol,'mm'); >> >> elec_realigned = ft_convert_units(elec_realigned,'mm') >> >> >> >> figure >> >> ft_plot_sens(elec_realigned, 'style', 'b'); >> >> >> >> hold on >> >> ft_plot_vol(vol); >> >> [image: Captura de pantalla 2019-01-16 a las 9.59.14.png] >> >> Thank you in advance, >> >> Elene. >> _______________________________________________ >> 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 aitor.martinezegurcegui at uzh.ch Fri Jan 18 16:16:42 2019 From: aitor.martinezegurcegui at uzh.ch (Aitor Egurtzegi) Date: Fri, 18 Jan 2019 16:16:42 +0100 Subject: [FieldTrip] automatic channel rejection Message-ID: Dear Fieldtrip subscribers, I was wondering if anyone knew how to automatically reject bad channels in Fieldtrip, as it is done in EEGLAB based on e.g. kurtosis. Basically, I'm looking for the Fieldtrip equivalent of the EEGLAB function pop_rejchan. Many thanks in advance, Aitor From dlozanosoldevilla at gmail.com Fri Jan 18 16:47:17 2019 From: dlozanosoldevilla at gmail.com (Diego Lozano-Soldevilla) Date: Fri, 18 Jan 2019 16:47:17 +0100 Subject: [FieldTrip] automatic channel rejection In-Reply-To: References: Message-ID: Hi Aitor, Take a look at this http://www.fieldtriptoolbox.org/tutorial/visual_artifact_rejection/#manual-artifact-rejection---display-a-summary Best, Diego On Fri, 18 Jan 2019 at 16:43, Aitor Egurtzegi < aitor.martinezegurcegui at uzh.ch> wrote: > Dear Fieldtrip subscribers, > > I was wondering if anyone knew how to automatically reject bad channels > in Fieldtrip, as it is done in EEGLAB based on e.g. kurtosis. Basically, > I'm looking for the Fieldtrip equivalent of the EEGLAB function > pop_rejchan. > > Many thanks in advance, > Aitor > > _______________________________________________ > 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 ali.mazah at gmail.com Fri Jan 18 16:46:18 2019 From: ali.mazah at gmail.com (Ali Mazaheri) Date: Fri, 18 Jan 2019 15:46:18 +0000 Subject: [FieldTrip] Postdoc position in the Experimental Linguistics Laboratory (ELL) Message-ID: Postdoctoral Research Fellow in the Experimental Linguistics Laboratory (ELL) A temporary, full-time position as a Postdoctoral Research Fellow is available at the University of Agder for a duration of two years. The position is affiliated with the Department of Foreign Languages and Translation, Faculty of Humanities and Pedagogy. The position is located at the University of Agder’s Kristiansand campus. The starting date is *1 August 2019,* or subject to agreement during the recruitment process. The person hired will contribute to a research project within the Experimental Linguistics Laboratory (ELL) run by Prof. Linda Wheeldon and Prof. Allison Wetterlin. The project will be run in collaboration with Prof. Aditi Lahiri (Language and Brain Laboratory, Oxford University) and Dr. Steven Frisson (Language Research Group, University of Birmingham). The research will employ eye-tracking and EEG methodologies to examine morpho-phonological processes in second language English reading and speech comprehension in Norwegian-English bilinguals. The Postdoctoral Research Fellow (RF) will be fully involved in the design, running, analysis and dissemination of the research. The project will support the career development of the RF by enabling the development of their research expertise in a theoretically and methodologically demanding project. Applicants must have a PhD in Experimental Linguistics or Psycholinguistics and expertise in the design, running of EEG experiments and in EEG data analysis. They must also have excellent spoken and written English. They must have obtained their doctorate within the last four years, and preferably within the last two. The dissertation must have been approved within the application deadline. Documented research publications beyond the doctoral thesis and experience from externally financed research projects (including writing applications and implementing projects) will be given priority. Engagement as a postdoctoral research fellow is carried out in accordance with the *Regulations concerning terms and conditions of employment for the positions of post-doctoral research fellows, research fellows, research assistants and specialized residents* as determined by the Ministry of Education and Research of 31.01.06, pursuant to the Act covering universities and colleges § 6-4, sixth paragraph, located at http://www.lovdata.no/for/sf/kd/xd-20060131-0102.html Cooperative skills and personal suitability will be emphasised. In the ranking of the candidates. Emphasis will also be placed upon the applicants’ competence and academic specialisation in relation to the needs of the research project. The successful applicant will have rights and obligations in accordance with the current regulations for the public service. Shortlisted applicants will be invited to attend an interview for the position. Appointments are made by the University of Agder’s Appointments Committee for Instruction and Research Positions. The Norwegian public sector is committed to reflecting the diversity of society, and the personnel policy of the University of Agder aims to achieve a balanced workforce. All qualified persons are therefore encouraged to apply for the position, irrespective of cultural background, gender, age or disability. The position is remunerated according to the State Salary Scale, Salary Plan 17.510, code 1352 Postdoctor, lr. 24, NOK 524 200 - 597 400. For especially well-qualified applicants, a higher salary may be considered. A 2 % compulsory pension contribution to the Norwegian Public Service Pension Fund is deducted from the pay according to current statutory provisions. Applicants are requested to submit their application online. Please use the link “Send Application”. - Certified transcripts - List of publications - Up to 5 publications or academic articles (including the PhD thesis) The applicant is also responsible for making sure that the appropriate number of documents are submitted by the application deadline. Be aware that incomplete applications will not be considered. In accordance with §25(2) of the Freedom of Information Act, applicants may request that they are not identified in the open list of applicants. The University, however, reserves the right to publish the name of applicants. Applicants will be advised of the University’s intention to exercise this right. *Application deadline: 15 March 2019.* Further information about the position may be obtained from Prof. Linda Wheeldonand Prof. Allison Wetterlin -- Dr Ali Mazaheri, PhD Associate Professor School of Psychology 3.03 Hills Building University of Birmingham +44(0)121 414 2863 www.alimazaheri.com -------------- next part -------------- An HTML attachment was scrubbed... URL: From J.Billington at leeds.ac.uk Fri Jan 18 19:07:04 2019 From: J.Billington at leeds.ac.uk (Jac Billington) Date: Fri, 18 Jan 2019 18:07:04 +0000 Subject: [FieldTrip] ft_clusterplot error? Message-ID: Dear experts, I've recently begun using fieldtrip and have been following tutorials well. however, I have perhaps run into a problem with ft_clusterplot. An example output is located in dropbox here: https://www.dropbox.com/sh/64m3xpgco2uavky/AADT6-rXEdylVzHN1lY-q7SNa?dl=0 My negative cluster labels don't seem to be located in a cluster per se, or in regions with a greater raw effect. This seems at odds with tutorial examples and papers. Apologies if I'm missing something, but can this be correct? I did have earlier errors (' ft_error('unsupported dimord %s', dimord);') but I realised this was because dimensions of my stat.raweffect (64 5 200) were in conflict with collapsing time and frequency when running ft_freqstatistics. Reducing stat.raweefect to 64 1 solved this error, but I'm wondering if I have done something wrong. My code is posted below and I'd happily be poited to some papers if I'm misunderstanding this. Thank you in advance. Jac % load data (from ft_freqanalysis) load(filename1); con1= freqScaling load(filename2); con2=freqScaling; %%%% run the stats: cfg = []; cfg.channel = 'all'; cfg.latency = [4 6]; cfg.frequency = [8 12]; cfg.method = 'montecarlo'; cfg.statistic = 'ft_statfun_indepsamplesT'; cfg.correctm = 'cluster'; cfg.clusteralpha = 0.05; cfg.clusterstatistic = 'maxsum'; cfg.minnbchan = 2; cfg.tail = 0; cfg.clustertail = 0; cfg.alpha = 0.025; cfg.numrandomization = 500; cfg.avgoverchan = 'no' cfg.avgovertime = 'yes' cfg.avgoverfreq = 'yes' % prepare_neighbours determines what sensors may form clusters cfg_neighb.method = 'distance'; cfg.neighbours = ft_prepare_neighbours(cfg_neighb, elec); design = zeros(1,size(con1.powspctrm,1) + size(con2.powspctrm,1)); design(1,1:size(con1.powspctrm,1)) = 1; design(1,(size(con1.powspctrm,1)+1):(size(con1.powspctrm,1)+ size(con2.powspctrm,1))) = 2; cfg.design = design; cfg.ivar = 1; [stat] = ft_freqstatistics(cfg, con1, con2); cfg=[] cfg.keeptrials = 'no' cfg.latency = [4 6]; cfg.frequency = [8 12]; con1 = ft_freqdescriptives(cfg, con1); con2 = ft_freqdescriptives(cfg, con2); %%%% resize powerspec to avoid dimord error. Collapse freq/ time con1rs=mean(con1.powspctrm,3) %%% collapse time dim con2rs=mean(con2.powspctrm,3) %%% collapse time dim con1rs=mean(con1rs,2) %%% collapse freq con2rs=mean(con2rs,2) stat.raweffect = con1rs-con2rs cfg.alpha = 0.025; cfg.zparam = 'raweffect'; cfg.zlim = [-1 3]; cfg.layout = 'biosemi64.lay'; cfg.subplotsize = ([1 1]); ft_clusterplot(cfg, stat); -------------- next part -------------- An HTML attachment was scrubbed... URL: From a.stolk8 at gmail.com Fri Jan 18 20:30:49 2019 From: a.stolk8 at gmail.com (Arjen Stolk) Date: Fri, 18 Jan 2019 11:30:49 -0800 Subject: [FieldTrip] ECoG/sEEG FieldTrip bootcamp at UC Davis Message-ID: Dear community, and (aspiring) intracranial researchers in particular, We're hosting the first ECoG/sEEG FieldTrip bootcamp at the UC Davis Medical Center (Sacramento, California) on March 20-22. The workshop will consist of lectures and hands-on sessions covering the methods implemented in FieldTrip. Speakers include Robert Oostenveld (Donders Institute), Bob Knight (UC Berkeley), and myself (UC Berkeley, Donders). For more information, including how to register, please visit the bootcamp website . Best regards, Arjen Stolk Ignacio Saez (UC Davis) Robert Oostenveld -------------- next part -------------- An HTML attachment was scrubbed... URL: From stephen.whitmarsh at gmail.com Sat Jan 19 11:04:46 2019 From: stephen.whitmarsh at gmail.com (Stephen Whitmarsh) Date: Sat, 19 Jan 2019 11:04:46 +0100 Subject: [FieldTrip] ft_clusterplot error? In-Reply-To: References: Message-ID: Hi Jac, I would start by plotting your (t)stats, and for simplicity doing that with ft_singleplotER (cfg.param = 'stat') rather than ft_clusterplot. Then try plotting the power-difference. This should not be more than a subtraction of data_diff.powspctrm = data1.powspctrm - data2.powspctrm, . No reshaping should be needed. The problem is probably a mistake somewhere keeping track of dimensions/latencies etc. which is tricky with clusters. Also, make sure to clear your cfg before every function so you don't carry the cfg of a previous function into the next. That will also help readability and debugging. HTH, Stephen On Fri, 18 Jan 2019 at 19:28, Jac Billington wrote: > Dear experts, > > > I've recently begun using fieldtrip and have been following tutorials > well. however, I have perhaps run into a problem with ft_clusterplot. > > > An example output is located in dropbox here: > https://www.dropbox.com/sh/64m3xpgco2uavky/AADT6-rXEdylVzHN1lY-q7SNa?dl=0 > > > My negative cluster labels don't seem to be located in a cluster per se, > or in regions with a greater raw effect. This seems at odds with tutorial > examples and papers. Apologies if I'm missing something, but can this be > correct? > > > I did have earlier errors (' ft_error('unsupported dimord %s', dimord);') > but I realised this was because dimensions of my stat.raweffect (64 5 > 200) were in conflict with collapsing time and frequency when running > ft_freqstatistics. Reducing stat.raweefect to 64 1 solved this error, but > I'm wondering if I have done something wrong. > > > My code is posted below and I'd happily be poited to some papers if I'm > misunderstanding this. > > > Thank you in advance. Jac > > > > % load data (from ft_freqanalysis) > load(filename1); > con1= freqScaling > load(filename2); > con2=freqScaling; > > %%%% run the stats: > cfg = []; > cfg.channel = 'all'; > cfg.latency = [4 6]; > cfg.frequency = [8 12]; > cfg.method = 'montecarlo'; > cfg.statistic = 'ft_statfun_indepsamplesT'; > cfg.correctm = 'cluster'; > cfg.clusteralpha = 0.05; > cfg.clusterstatistic = 'maxsum'; > cfg.minnbchan = 2; > cfg.tail = 0; > cfg.clustertail = 0; > cfg.alpha = 0.025; > cfg.numrandomization = 500; > cfg.avgoverchan = 'no' > cfg.avgovertime = 'yes' > cfg.avgoverfreq = 'yes' > % prepare_neighbours determines what sensors may form clusters > cfg_neighb.method = 'distance'; > cfg.neighbours = ft_prepare_neighbours(cfg_neighb, elec); > > design = zeros(1,size(con1.powspctrm,1) + size(con2.powspctrm,1)); > design(1,1:size(con1.powspctrm,1)) = 1; > design(1,(size(con1.powspctrm,1)+1):(size(con1.powspctrm,1)+ > size(con2.powspctrm,1))) = 2; > cfg.design = design; > cfg.ivar = 1; > > > [stat] = ft_freqstatistics(cfg, con1, con2); > > > > cfg=[] > cfg.keeptrials = 'no' > cfg.latency = [4 6]; > cfg.frequency = [8 12]; > con1 = ft_freqdescriptives(cfg, con1); > con2 = ft_freqdescriptives(cfg, con2); > > %%%% resize powerspec to avoid dimord error. Collapse freq/ time > con1rs=mean(con1.powspctrm,3) %%% collapse time dim > con2rs=mean(con2.powspctrm,3) %%% collapse time dim > con1rs=mean(con1rs,2) %%% collapse freq > con2rs=mean(con2rs,2) > stat.raweffect = con1rs-con2rs > > cfg.alpha = 0.025; > cfg.zparam = 'raweffect'; > cfg.zlim = [-1 3]; > cfg.layout = 'biosemi64.lay'; > cfg.subplotsize = ([1 1]); > ft_clusterplot(cfg, stat); > > > _______________________________________________ > 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 aitor.martinezegurcegui at uzh.ch Sun Jan 20 17:22:07 2019 From: aitor.martinezegurcegui at uzh.ch (Aitor Egurtzegi) Date: Sun, 20 Jan 2019 17:22:07 +0100 Subject: [FieldTrip] automatic channel rejection In-Reply-To: References: Message-ID: <10d93c05-c66e-18d6-7533-ef40b858a218@uzh.ch> Hi Diego, Thanks for the help. However, I was wondering if there is a way to reject artifacts without visually inspecting them. Like, from the manual you sent I see that I still would have to click on the trials / channels I would like to reject? Is there a way to script it based on some previously established parameters, without having to check all trials / channels for each participant? Best, Aitor > Date: Fri, 18 Jan 2019 16:47:17 +0100 > From: Diego Lozano-Soldevilla > To: FieldTrip discussion list > Subject: Re: [FieldTrip] automatic channel rejection > Message-ID: > > Content-Type: text/plain; charset="utf-8" > > Hi Aitor, > Take a look at this > http://www.fieldtriptoolbox.org/tutorial/visual_artifact_rejection/#manual-artifact-rejection---display-a-summary > Best, > Diego > > On Fri, 18 Jan 2019 at 16:43, Aitor Egurtzegi < > aitor.martinezegurcegui at uzh.ch> wrote: > >> Dear Fieldtrip subscribers, >> >> I was wondering if anyone knew how to automatically reject bad channels >> in Fieldtrip, as it is done in EEGLAB based on e.g. kurtosis. Basically, >> I'm looking for the Fieldtrip equivalent of the EEGLAB function >> pop_rejchan. >> >> Many thanks in advance, >> Aitor >> >> _______________________________________________ >> fieldtrip mailing list >> https://mailman.science.ru.nl/mailman/listinfo/fieldtrip >> https://doi.org/10.1371/journal.pcbi.1002202 From r.oostenveld at donders.ru.nl Mon Jan 21 10:25:29 2019 From: r.oostenveld at donders.ru.nl (Robert Oostenveld) Date: Mon, 21 Jan 2019 10:25:29 +0100 Subject: [FieldTrip] MEG/EEG FieldTrip toolkit course: pre-registration now open In-Reply-To: References: Message-ID: Dear all, On 8-12 April 2019 we will again host the yearly “Advanced MEG/EEG toolkit" at the Donders Institute in Nijmegen. The course is aimed at researchers that have already performed some MEG/EEG data acquisition and have a good understanding of their own experimental design. Furthermore, we expect that you know the basics of MATLAB and that you already have some experience with MEG/EEG preprocessing and analysis. This intense 5-day toolkit course will teach you advanced MEG and EEG data analysis methods. We will cover preprocessing, frequency analysis, source reconstruction, connectivity and various statistical methods. The toolkit will consist of a number of lectures, followed by hands-on sessions in which you will be tutored through the complete analysis of a MEG data set using the FieldTrip toolbox. There will be plenty of opportunity to interact and ask questions about your research and data. On the final day you will have the opportunity to work on your own dataset under supervision of skilled tutors. We can only host a limited number of participants. From past experience we expect the course to be oversubscribed, hence we will start with pre-registration. The final selection of the participants will be based on the motivation, background experience and research interests that are provided in the registration form. The deadline for pre-registration is March 1, 2019. More information, including information about the registration details and last years program can be found at http://www.fieldtriptoolbox.org/workshop/toolkit2019/ . Looking forward to seeing you at the toolkit course, Robert ----------------------------------------------------------- Robert Oostenveld, PhD Senior Researcher & MEG Physicist Donders Institute for Brain, Cognition and Behaviour Radboud University, Nijmegen, The Netherlands tel.: +31 (0)24 3619695 e-mail: r.oostenveld at donders.ru.nl web: http://www.ru.nl/donders skype: r.oostenveld ----------------------------------------------------------- -------------- next part -------------- An HTML attachment was scrubbed... URL: From elene.beitia at alumni.mondragon.edu Mon Jan 21 12:15:02 2019 From: elene.beitia at alumni.mondragon.edu (Elene Beitia Loinaz) Date: Mon, 21 Jan 2019 12:15:02 +0100 Subject: [FieldTrip] Problem selecting frequency range for source reconstruction using beamforming DICS technique Message-ID: Dear Fieldtripers, I am trying to select a time-frequency tile for the performance of the Bermforming using DICS recostruction. First, usng freq analysis I have chosen the time-frequency range I want, you can see it in the next code: cfg = []; cfg.continuous = 'yes'; cfg.output = 'fourier'; cfg.channel = 'all'; cfg.keeptrials = 'yes'; cfg.method = 'mtmfft'; cfg.taper = 'hanning'; cfg.foilim = [8 12]; cfg.t_ftimwin =[160:0.0039063:175]; data_Fourier = ft_freqanalysis(cfg, data1); If I look in the data_Fourier the frequency is define like a range, but when I do the beamforming it choses only one frequency (the middle of the range), I have not configured anything in cfg.frequency since I want to take the full range and not a single number in Hz, but still takes only one (in my case 10Hz). Error: Warning: could not determine dimord of "freq" in: label: {128×1 cell} freq: 10.0000 fourierspctrm: [1×128 double] cumsumcnt: 94464 cumtapcnt: 1 elec: [1×1 struct] cfg: [1×1 struct] dimord: 'rpttap_chan_freq' Warning: the selected value 10 should be within the range of the array from 10 to 10 Is there anyway to consider all the rage? Is it necessary to set other parameters in the cfg of the ft_freqanalysis/ft_sourceanalysis? Thank you in advanced, Elene. -------------- next part -------------- An HTML attachment was scrubbed... URL: From stephen.whitmarsh at gmail.com Mon Jan 21 13:03:16 2019 From: stephen.whitmarsh at gmail.com (Stephen Whitmarsh) Date: Mon, 21 Jan 2019 13:03:16 +0100 Subject: [FieldTrip] Problem selecting frequency range for source reconstruction using beamforming DICS technique In-Reply-To: References: Message-ID: Dear Elene, ft_sourceanalysis only takes a single number (as stated in the help) in cfg.frequency. If cfg.frquency is empty it will first default to 'all', and then take the average frequency of the input data (cfg.frequency = mean(cfg.frequency) %on line 306). This is not clear, and I would suppose just breaking with an error would have been clearer. If you want all the frequencies beamformed separately you will have to loop over frequencies. If you want all the frequencies beamformed as an average over frequencies you can average your frequency data first with e.g. ft_selectdata (cfg.avgoverfreq = 'yes') or, better, do your freqanalysis with some sleppian smoothing (cfg.taper = 'dpss'). HTH, Stephen On Mon, 21 Jan 2019 at 12:35, Elene Beitia Loinaz < elene.beitia at alumni.mondragon.edu> wrote: > Dear Fieldtripers, > > I am trying to select a time-frequency tile for the performance of the > Bermforming using DICS recostruction. > > First, usng freq analysis I have chosen the time-frequency range I want, > you can see it in the next code: > > cfg = []; > cfg.continuous = 'yes'; > cfg.output = 'fourier'; > cfg.channel = 'all'; > cfg.keeptrials = 'yes'; > cfg.method = 'mtmfft'; > cfg.taper = 'hanning'; > cfg.foilim = [8 12]; > cfg.t_ftimwin =[160:0.0039063:175]; > data_Fourier = ft_freqanalysis(cfg, data1); > > If I look in the data_Fourier the frequency is define like a range, but > when I do the beamforming it choses only one frequency (the middle of the > range), I have not configured anything in cfg.frequency since I want to > take the full range and not a single number in Hz, but still takes only one > (in my case 10Hz). > > Error: > Warning: could not determine dimord of "freq" in: > > label: {128×1 cell} > freq: 10.0000 > fourierspctrm: [1×128 double] > cumsumcnt: 94464 > cumtapcnt: 1 > elec: [1×1 struct] > cfg: [1×1 struct] > dimord: 'rpttap_chan_freq' > > > Warning: the selected value 10 should be within the range of the array > from 10 to 10 > > Is there anyway to consider all the rage? Is it necessary to set other > parameters in the cfg of the ft_freqanalysis/ft_sourceanalysis? > > Thank you in advanced, > > Elene. > > > > _______________________________________________ > 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 J.Billington at leeds.ac.uk Mon Jan 21 13:51:26 2019 From: J.Billington at leeds.ac.uk (Jac Billington) Date: Mon, 21 Jan 2019 12:51:26 +0000 Subject: [FieldTrip] ft_clusterplot error? In-Reply-To: References: Message-ID: Dear Stephen, Thank you for the useful reply, I've been doing some trouble shooting and it seems the output of ft_freqstatistics doesn't seem to be reflecting my raw data. See "stat_discrepency.jpg" in dropbox link. This plots condition 1 and 2 and the raw difference (as per your suggestion data_diff.powspctrm = data1.powspctrm - data2.powspctrm). I then plot stat.stat and the clusterplot output, clusterplot is representing my stat output. In general I want to look at all channels, time 4-6seconds, for frequencies 8-12. The latter 2 parameters I want averaged. I noticed that the T-stat plot (of stat.stat) reports only one time and frequency. I presumed this was the average for display purposes (- double checked by plotting only that time and frequency in "stat_discrepency_onetimefreq.jpg" and it is different). I think my design matrix is correct (following http://www.fieldtriptoolbox.org/tutorial/cluster_permutation_timelock/). I have 28 trials in con1 and 25 in con2, my design matrix is 1x53 reflecting the trials for the two conditions. I don't think I need to specify anything further until I move on to group analysis (this is just a single subject). The only other issue I can think of is in the parameter: cfg.neighbours = ft_prepare_neighbours(cfg_neighb, elec); I create 'elec' by using ft_read_sens to read the preprocessing output from EEGlab. filenameA=strcat([det.subjects{s} '_postPreProICA_epoched_' det.epochs{1} '.set']) elec = ft_read_sens(filenameA) Again, I'd be grateful for any pointers. My computation of ft_freqstatistics has not changed from the original post. Thank you. Jac https://www.dropbox.com/sh/64m3xpgco2uavky/AADT6-rXEdylVzHN1lY-q7SNa?dl=0 [https://www.dropbox.com/static/images/spectrum-icons/generated/content/content-folder_dropbox-large.png] fieldtrip www.dropbox.com Shared with Dropbox FieldTrip discussion list Subject: Re: [FieldTrip] ft_clusterplot error? Message-ID: Content-Type: text/plain; charset="utf-8" Hi Jac, I would start by plotting your (t)stats, and for simplicity doing that with ft_singleplotER (cfg.param = 'stat') rather than ft_clusterplot. Then try plotting the power-difference. This should not be more than a subtraction of data_diff.powspctrm = data1.powspctrm - data2.powspctrm, . No reshaping should be needed. The problem is probably a mistake somewhere keeping track of dimensions/latencies etc. which is tricky with clusters. Also, make sure to clear your cfg before every function so you don't carry the cfg of a previous function into the next. That will also help readability and debugging. HTH, Stephen ________________________________ From: Jac Billington Sent: 18 January 2019 18:07:04 To: fieldtrip at science.ru.nl Subject: ft_clusterplot error? Dear experts, I've recently begun using fieldtrip and have been following tutorials well. however, I have perhaps run into a problem with ft_clusterplot. An example output is located in dropbox here: https://www.dropbox.com/sh/64m3xpgco2uavky/AADT6-rXEdylVzHN1lY-q7SNa?dl=0 My negative cluster labels don't seem to be located in a cluster per se, or in regions with a greater raw effect. This seems at odds with tutorial examples and papers. Apologies if I'm missing something, but can this be correct? I did have earlier errors (' ft_error('unsupported dimord %s', dimord);') but I realised this was because dimensions of my stat.raweffect (64 5 200) were in conflict with collapsing time and frequency when running ft_freqstatistics. Reducing stat.raweefect to 64 1 solved this error, but I'm wondering if I have done something wrong. My code is posted below and I'd happily be poited to some papers if I'm misunderstanding this. Thank you in advance. Jac % load data (from ft_freqanalysis) load(filename1); con1= freqScaling load(filename2); con2=freqScaling; %%%% run the stats: cfg = []; cfg.channel = 'all'; cfg.latency = [4 6]; cfg.frequency = [8 12]; cfg.method = 'montecarlo'; cfg.statistic = 'ft_statfun_indepsamplesT'; cfg.correctm = 'cluster'; cfg.clusteralpha = 0.05; cfg.clusterstatistic = 'maxsum'; cfg.minnbchan = 2; cfg.tail = 0; cfg.clustertail = 0; cfg.alpha = 0.025; cfg.numrandomization = 500; cfg.avgoverchan = 'no' cfg.avgovertime = 'yes' cfg.avgoverfreq = 'yes' % prepare_neighbours determines what sensors may form clusters cfg_neighb.method = 'distance'; cfg.neighbours = ft_prepare_neighbours(cfg_neighb, elec); design = zeros(1,size(con1.powspctrm,1) + size(con2.powspctrm,1)); design(1,1:size(con1.powspctrm,1)) = 1; design(1,(size(con1.powspctrm,1)+1):(size(con1.powspctrm,1)+ size(con2.powspctrm,1))) = 2; cfg.design = design; cfg.ivar = 1; [stat] = ft_freqstatistics(cfg, con1, con2); cfg=[] cfg.keeptrials = 'no' cfg.latency = [4 6]; cfg.frequency = [8 12]; con1 = ft_freqdescriptives(cfg, con1); con2 = ft_freqdescriptives(cfg, con2); %%%% resize powerspec to avoid dimord error. Collapse freq/ time con1rs=mean(con1.powspctrm,3) %%% collapse time dim con2rs=mean(con2.powspctrm,3) %%% collapse time dim con1rs=mean(con1rs,2) %%% collapse freq con2rs=mean(con2rs,2) stat.raweffect = con1rs-con2rs cfg.alpha = 0.025; cfg.zparam = 'raweffect'; cfg.zlim = [-1 3]; cfg.layout = 'biosemi64.lay'; cfg.subplotsize = ([1 1]); ft_clusterplot(cfg, stat); -------------- next part -------------- An HTML attachment was scrubbed... URL: From stephen.whitmarsh at gmail.com Mon Jan 21 14:56:37 2019 From: stephen.whitmarsh at gmail.com (Stephen Whitmarsh) Date: Mon, 21 Jan 2019 14:56:37 +0100 Subject: [FieldTrip] ft_clusterplot error? In-Reply-To: References: Message-ID: Hi Jac, To my eyes all looks fine to me! - Your stat output seems to fit your raw difference rather well, I would say! Why do you think otherwise? Sure, the t-stats are not the same as absolute differences, but that's to be expected - the general topography looks rather similar. If you don't trust the calculation you can perhaps just do a MATLAB ttest on one electrode and compare that to the freqstatistics output. - Yes, you seem to be plotting the average over time ([5 5] in the plot) and frequency ([10 10] in the plot). As I said earlier, I can't track the clusterplot at the point (it also has no parameters in the image). Without the code that you use, I can't see if anything else is going on. - The significant cluster/electrodes you see in the clusterplot seems to correspond to that blue central blog on the stats left of it in the same image file just fine. - You can check your neighbours with ft_neighbourplot Since you are probably doing your statistics on average time and freq, the only dimension that your cluster extends to is 'space', i.e. electrodes, so for now you don't need to use clusterplot, but just highlight the electrodes in ft_topoplotXX based on your stats. This is just to not make it more confusing than it is - clusters that span time/freq/space are just very hard to plot. Cheers, Stephen On Mon, 21 Jan 2019 at 14:35, Jac Billington wrote: > Dear Stephen, > > > Thank you for the useful reply, I've been doing some trouble shooting and > it seems the output of ft_freqstatistics doesn't seem to be reflecting > my raw data. See "stat_discrepency.jpg" in dropbox link. > > > This plots condition 1 and 2 and the raw difference (as per your > suggestion data_diff.powspctrm = data1.powspctrm - data2.powspctrm). I > then plot stat.stat and the clusterplot output, clusterplot is representing > my stat output. > > > In general I want to look at all channels, time 4-6seconds, for > frequencies 8-12. The latter 2 parameters I want averaged. > > > I noticed that the T-stat plot (of stat.stat) reports only one time and > frequency. I presumed this was the average for display purposes (- double > checked by plotting only that time and frequency in " > stat_discrepency_onetimefreq.jpg" and it is different). > > > I think my design matrix is correct (following > http://www.fieldtriptoolbox.org/tutorial/cluster_permutation_timelock/). > I have 28 trials in con1 and 25 in con2, my design matrix is 1x53 > reflecting the trials for the two conditions. I don't think I need to > specify anything further until I move on to group analysis (this is just a > single subject). > > > > > The only other issue I can think of is in the parameter: > > cfg.neighbours = ft_prepare_neighbours(cfg_neighb, elec); > > > I create 'elec' by using ft_read_sens to read the preprocessing output > from EEGlab. > > > filenameA=strcat([det.subjects{s} '_postPreProICA_epoched_' > det.epochs{1} '.set']) > elec = ft_read_sens(filenameA) > > > Again, I'd be grateful for any pointers. My computation of > ft_freqstatistics has not changed from the original post. > > Thank you. Jac > > > > https://www.dropbox.com/sh/64m3xpgco2uavky/AADT6-rXEdylVzHN1lY-q7SNa?dl=0 > > fieldtrip > > www.dropbox.com > Shared with Dropbox > > > > > FieldTrip discussion list > Subject: Re: [FieldTrip] ft_clusterplot error? > Message-ID: > zMQuaKsyyBxOewfS5GgBYDMrXoUpHMk674WYFWXSfA+w at mail.gmail.com> > Content-Type: text/plain; charset="utf-8" > > Hi Jac, > > I would start by plotting your (t)stats, and for simplicity doing that with > ft_singleplotER (cfg.param = 'stat') rather than ft_clusterplot. > Then try plotting the power-difference. This should not be more than a > subtraction of data_diff.powspctrm = data1.powspctrm - data2.powspctrm, . > No reshaping should be needed. > The problem is probably a mistake somewhere keeping track of > dimensions/latencies etc. which is tricky with clusters. > Also, make sure to clear your cfg before every function so you don't carry > the cfg of a previous function into the next. That will also help > readability and debugging. > > HTH, > Stephen > > ------------------------------ > *From:* Jac Billington > *Sent:* 18 January 2019 18:07:04 > *To:* fieldtrip at science.ru.nl > *Subject:* ft_clusterplot error? > > > Dear experts, > > > I've recently begun using fieldtrip and have been following tutorials > well. however, I have perhaps run into a problem with ft_clusterplot. > > > An example output is located in dropbox here: > https://www.dropbox.com/sh/64m3xpgco2uavky/AADT6-rXEdylVzHN1lY-q7SNa?dl=0 > > > My negative cluster labels don't seem to be located in a cluster per se, > or in regions with a greater raw effect. This seems at odds with tutorial > examples and papers. Apologies if I'm missing something, but can this be > correct? > > > I did have earlier errors (' ft_error('unsupported dimord %s', dimord);') > but I realised this was because dimensions of my stat.raweffect (64 5 > 200) were in conflict with collapsing time and frequency when running > ft_freqstatistics. Reducing stat.raweefect to 64 1 solved this error, but > I'm wondering if I have done something wrong. > > > My code is posted below and I'd happily be poited to some papers if I'm > misunderstanding this. > > > Thank you in advance. Jac > > > > % load data (from ft_freqanalysis) > load(filename1); > con1= freqScaling > load(filename2); > con2=freqScaling; > > %%%% run the stats: > cfg = []; > cfg.channel = 'all'; > cfg.latency = [4 6]; > cfg.frequency = [8 12]; > cfg.method = 'montecarlo'; > cfg.statistic = 'ft_statfun_indepsamplesT'; > cfg.correctm = 'cluster'; > cfg.clusteralpha = 0.05; > cfg.clusterstatistic = 'maxsum'; > cfg.minnbchan = 2; > cfg.tail = 0; > cfg.clustertail = 0; > cfg.alpha = 0.025; > cfg.numrandomization = 500; > cfg.avgoverchan = 'no' > cfg.avgovertime = 'yes' > cfg.avgoverfreq = 'yes' > % prepare_neighbours determines what sensors may form clusters > cfg_neighb.method = 'distance'; > cfg.neighbours = ft_prepare_neighbours(cfg_neighb, elec); > > design = zeros(1,size(con1.powspctrm,1) + size(con2.powspctrm,1)); > design(1,1:size(con1.powspctrm,1)) = 1; > design(1,(size(con1.powspctrm,1)+1):(size(con1.powspctrm,1)+ > size(con2.powspctrm,1))) = 2; > cfg.design = design; > cfg.ivar = 1; > > > [stat] = ft_freqstatistics(cfg, con1, con2); > > > > cfg=[] > cfg.keeptrials = 'no' > cfg.latency = [4 6]; > cfg.frequency = [8 12]; > con1 = ft_freqdescriptives(cfg, con1); > con2 = ft_freqdescriptives(cfg, con2); > > %%%% resize powerspec to avoid dimord error. Collapse freq/ time > con1rs=mean(con1.powspctrm,3) %%% collapse time dim > con2rs=mean(con2.powspctrm,3) %%% collapse time dim > con1rs=mean(con1rs,2) %%% collapse freq > con2rs=mean(con2rs,2) > stat.raweffect = con1rs-con2rs > > cfg.alpha = 0.025; > cfg.zparam = 'raweffect'; > cfg.zlim = [-1 3]; > cfg.layout = 'biosemi64.lay'; > cfg.subplotsize = ([1 1]); > ft_clusterplot(cfg, stat); > > > _______________________________________________ > 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 elene.beitia at alumni.mondragon.edu Mon Jan 21 17:38:11 2019 From: elene.beitia at alumni.mondragon.edu (Elene Beitia Loinaz) Date: Mon, 21 Jan 2019 17:38:11 +0100 Subject: [FieldTrip] Problem selecting frequency range for source reconstruction using beamforming DICS technique In-Reply-To: References: Message-ID: Thank you Stephen, Your answer has being very useful. I try your suggestions but as what I want is to perform the reconstruction of a range of frequency with the loop I do not achieve that, and the dpss method gives me error in matlab due to the lack of memory. Even so than you very much!!! Hau idatzi du Stephen Whitmarsh (stephen.whitmarsh at gmail.com) erabiltzaileak (2019 urt. 21, al. (13:03)): > Dear Elene, > > ft_sourceanalysis only takes a single number (as stated in the help) in > cfg.frequency. If cfg.frquency is empty it will first default to 'all', and > then take the average frequency of the input data (cfg.frequency = > mean(cfg.frequency) %on line 306). This is not clear, and I would suppose > just breaking with an error would have been clearer. > > If you want all the frequencies beamformed separately you will have to > loop over frequencies. > If you want all the frequencies beamformed as an average over frequencies > you can average your frequency data first with e.g. ft_selectdata > (cfg.avgoverfreq = 'yes') or, better, do your freqanalysis with some > sleppian smoothing (cfg.taper = 'dpss'). > > HTH, > > Stephen > > > > On Mon, 21 Jan 2019 at 12:35, Elene Beitia Loinaz < > elene.beitia at alumni.mondragon.edu> wrote: > >> Dear Fieldtripers, >> >> I am trying to select a time-frequency tile for the performance of the >> Bermforming using DICS recostruction. >> >> First, usng freq analysis I have chosen the time-frequency range I want, >> you can see it in the next code: >> >> cfg = []; >> cfg.continuous = 'yes'; >> cfg.output = 'fourier'; >> cfg.channel = 'all'; >> cfg.keeptrials = 'yes'; >> cfg.method = 'mtmfft'; >> cfg.taper = 'hanning'; >> cfg.foilim = [8 12]; >> cfg.t_ftimwin =[160:0.0039063:175]; >> data_Fourier = ft_freqanalysis(cfg, data1); >> >> If I look in the data_Fourier the frequency is define like a range, but >> when I do the beamforming it choses only one frequency (the middle of the >> range), I have not configured anything in cfg.frequency since I want to >> take the full range and not a single number in Hz, but still takes only one >> (in my case 10Hz). >> >> Error: >> Warning: could not determine dimord of "freq" in: >> >> label: {128×1 cell} >> freq: 10.0000 >> fourierspctrm: [1×128 double] >> cumsumcnt: 94464 >> cumtapcnt: 1 >> elec: [1×1 struct] >> cfg: [1×1 struct] >> dimord: 'rpttap_chan_freq' >> >> >> Warning: the selected value 10 should be within the range of the array >> from 10 to 10 >> >> Is there anyway to consider all the rage? Is it necessary to set other >> parameters in the cfg of the ft_freqanalysis/ft_sourceanalysis? >> >> Thank you in advanced, >> >> Elene. >> >> >> >> _______________________________________________ >> 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 jedmeltzer at yahoo.com Mon Jan 21 17:47:29 2019 From: jedmeltzer at yahoo.com (Jed Meltzer) Date: Mon, 21 Jan 2019 16:47:29 +0000 (UTC) Subject: [FieldTrip] Postdoctoral Position in Toronto: Treatment and Neuroimaging of Chronic Pain References: <1512049305.1097532.1548089249976.ref@mail.yahoo.com> Message-ID: <1512049305.1097532.1548089249976@mail.yahoo.com> Postdoctoral Position: Treatment and Neuroimaging of Chronic Pain   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. 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: February 18, 2019 (negotiable)Duration: 2 years Supervisor: Dr. Lee Bartel, Faculty of Music, University of TorontoCollaborating Supervisors:  Dr. Tania Di Renna, 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 Monday January 28, 2019.  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 vitae3) Your highest degree transcript (unofficial copy acceptable) 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, pain research, epigenetic analysis, music,  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.caInterviews will commence immediately following the application deadline.  -------------- next part -------------- An HTML attachment was scrubbed... URL: From jyrki at nmr.mgh.harvard.edu Mon Jan 21 21:12:16 2019 From: jyrki at nmr.mgh.harvard.edu (Jyrki Ahveninen) Date: Mon, 21 Jan 2019 15:12:16 -0500 Subject: [FieldTrip] =?utf-8?q?Postdoctoral_Research_Fellow_=E2=80=93_Mas?= =?utf-8?q?sachusetts_General_Hospital/Harvard_Medical_School?= Message-ID: <0C1FE580-0273-4A4A-A996-0297EC894E1C@nmr.mgh.harvard.edu> Postdoctoral Research Fellow – Massachusetts General Hospital/Harvard Medical School We are seeking a talented, highly motivated individual to join a multimodal human neuroimaging research group in Athinoula A. Martinos Center for Biomedical Imaging at Department of Radiology, Massachusetts General Hospital/ Harvard Medical School, Boston, MA. Our NIDCD-funded research examines human auditory working memory, attention, and multisensory feedforward/feedback influences using multivariate statistical/machine learning analyses of MEG/EEG, high-field (3T) and ultra-high field (7T) fMRI, and MRI-navigated TMS/EEG. The noninvasive measures are validated by using ECoG/iEEG recordings in presurgical human patients. Athinoula A. Martinos Center for Biomedical Imaging at Massachusetts General Hospital is one of the largest biomedical imaging centers in the United States with over 200 research faculty members, post-doctoral Research Fellows, and graduate students. This position offers a unique opportunity to work and collaborate with leading researchers who develop and implement cutting edge technologies that could have a high impact on researchers of human auditory cognition, attention/working memory, and multisensory processing, as well as on the broader non-invasive neuroimaging and brain stimulation communities. Required Skills/Abilities/Competencies: Ph.D. or equivalent in Neuroscience, Biomedical Engineering, Electrical Engineering, Psychology, or related fields. Must have experience in at least one of the imaging modalities utilized (MEG/EEG, TMS, TMS/EEG, fMRI, or fMRI/EEG). Experience in subdural or extracellular neurophysiological recordings is a plus. Proven understanding of cognitive neuroscience, particularly auditory cognition, attention and working memory, and multisensory integration. Experience in Matlab, Python, and Linux-based command line operations. Applicants with experience in advanced multivariate statistical analysis and machine learning techniques are strongly preferred. Excellent teamwork, time management and organizational skills. Excellent oral and written communication skills are required. Strong publication record in peer-reviewed scientific journals The approved applicant will hold a Massachusetts General Hospital and a Harvard Medical School appointment as a Research Fellow. This position offers an opportunity to work with an engaged group of scientists that utilize the cutting-edge multimodal neuroimaging infrastructure at MGH Martinos Center to examine neuronal bases of human cognition. Interested candidates should send their cover-letter, full CV, and the names of 3 references to Dr. Jyrki Ahveninen (jyrki at nmr.mgh.harvard.edu). If you wish to obtain more information on the project, please contact Dr. Ahveninen by email. The position is full-time with benefits and available immediately. A two-year time commitment is required with a possible extension of another two years. Salary will be based on qualifications and experience. The Massachusetts General Hospital is an Equal Opportunity/Affirmative Action Employer. -------------- next part -------------- An HTML attachment was scrubbed... URL: From max-philipp.stenner at med.ovgu.de Tue Jan 22 13:07:39 2019 From: max-philipp.stenner at med.ovgu.de (Stenner, Max-Philipp) Date: Tue, 22 Jan 2019 12:07:39 +0000 Subject: [FieldTrip] Postdoc position in Freigeist Research Group (University of Magdeburg) In-Reply-To: <32078_1544429470_5C0E1F9D_32078_1978_1_FBEFFA1F493D8944969D2F5AE78E5883D6FFC367@esen3.imed.uni-magdeburg.de> References: <32078_1544429470_5C0E1F9D_32078_1978_1_FBEFFA1F493D8944969D2F5AE78E5883D6FFC367@esen3.imed.uni-magdeburg.de> Message-ID: Dear all an exciting opportunity has become available for a PostDoc Researcher in Human Motor Neuroscience (for 4 years) in the newly funded Freigeist Research Group "Motor Learning" at the Leibniz Institute for Neurobiology & Department of Neurology at the University of Magdeburg, Germany. Please find a detailed job description and instructions how to apply attached (deadline January 31st 2019). Looking forward to welcoming you to Magdeburg, Max-Philipp Stenner http://www.lin-magdeburg.de/de/abteilungen/verhaltensneurologie/physiology_motorlearning/index.jsp -------------- next part -------------- A non-text attachment was scrubbed... Name: PostDoc Human Motor Neuroscience.pdf Type: application/pdf Size: 379098 bytes Desc: PostDoc Human Motor Neuroscience.pdf URL: -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: ATT00001.txt URL: From J.Billington at leeds.ac.uk Tue Jan 22 15:00:41 2019 From: J.Billington at leeds.ac.uk (Jac Billington) Date: Tue, 22 Jan 2019 14:00:41 +0000 Subject: [FieldTrip] ft_clusterplot error? In-Reply-To: References: , Message-ID: Hi Stephen, Thanks again for the reply and reassurance. ft_neighbourplot is looking fine. I didn't expect the t-stats to look exactly the same but I'd have thought the occipital difference might have been more prominent in the t-stat. That said, my hypothesis is a central-parietal difference so perhaps I shouldn't worry about it! I'll double check the means and variance. Thanks for your help. Jac Hi Jac, To my eyes all looks fine to me! - Your stat output seems to fit your raw difference rather well, I would say! Why do you think otherwise? Sure, the t-stats are not the same as absolute differences, but that's to be expected - the general topography looks rather similar. If you don't trust the calculation you can perhaps just do a MATLAB ttest on one electrode and compare that to the freqstatistics output. - Yes, you seem to be plotting the average over time ([5 5] in the plot) and frequency ([10 10] in the plot). As I said earlier, I can't track the clusterplot at the point (it also has no parameters in the image). Without the code that you use, I can't see if anything else is going on. - The significant cluster/electrodes you see in the clusterplot seems to correspond to that blue central blog on the stats left of it in the same image file just fine. - You can check your neighbours with ft_neighbourplot Since you are probably doing your statistics on average time and freq, the only dimension that your cluster extends to is 'space', i.e. electrodes, so for now you don't need to use clusterplot, but just highlight the electrodes in ft_topoplotXX based on your stats. This is just to not make it more confusing than it is - clusters that span time/freq/space are just very hard to plot. Cheers, Stephen Dr Jac Billington Lecturer in Cognitive Neuroscience School of Psychology, Rm G.06A University of Leeds Leeds, LS2 9JT Tel: +44(0)113 343 6686 Jac Billington CoNi Lab ________________________________ From: Jac Billington Sent: 21 January 2019 12:51:26 To: fieldtrip at science.ru.nl Subject: Re: ft_clusterplot error? Dear Stephen, Thank you for the useful reply, I've been doing some trouble shooting and it seems the output of ft_freqstatistics doesn't seem to be reflecting my raw data. See "stat_discrepency.jpg" in dropbox link. This plots condition 1 and 2 and the raw difference (as per your suggestion data_diff.powspctrm = data1.powspctrm - data2.powspctrm). I then plot stat.stat and the clusterplot output, clusterplot is representing my stat output. In general I want to look at all channels, time 4-6seconds, for frequencies 8-12. The latter 2 parameters I want averaged. I noticed that the T-stat plot (of stat.stat) reports only one time and frequency. I presumed this was the average for display purposes (- double checked by plotting only that time and frequency in "stat_discrepency_onetimefreq.jpg" and it is different). I think my design matrix is correct (following http://www.fieldtriptoolbox.org/tutorial/cluster_permutation_timelock/). I have 28 trials in con1 and 25 in con2, my design matrix is 1x53 reflecting the trials for the two conditions. I don't think I need to specify anything further until I move on to group analysis (this is just a single subject). The only other issue I can think of is in the parameter: cfg.neighbours = ft_prepare_neighbours(cfg_neighb, elec); I create 'elec' by using ft_read_sens to read the preprocessing output from EEGlab. filenameA=strcat([det.subjects{s} '_postPreProICA_epoched_' det.epochs{1} '.set']) elec = ft_read_sens(filenameA) Again, I'd be grateful for any pointers. My computation of ft_freqstatistics has not changed from the original post. Thank you. Jac https://www.dropbox.com/sh/64m3xpgco2uavky/AADT6-rXEdylVzHN1lY-q7SNa?dl=0 [https://www.dropbox.com/static/images/spectrum-icons/generated/content/content-folder_dropbox-large.png] fieldtrip www.dropbox.com Shared with Dropbox FieldTrip discussion list Subject: Re: [FieldTrip] ft_clusterplot error? Message-ID: Content-Type: text/plain; charset="utf-8" Hi Jac, I would start by plotting your (t)stats, and for simplicity doing that with ft_singleplotER (cfg.param = 'stat') rather than ft_clusterplot. Then try plotting the power-difference. This should not be more than a subtraction of data_diff.powspctrm = data1.powspctrm - data2.powspctrm, . No reshaping should be needed. The problem is probably a mistake somewhere keeping track of dimensions/latencies etc. which is tricky with clusters. Also, make sure to clear your cfg before every function so you don't carry the cfg of a previous function into the next. That will also help readability and debugging. HTH, Stephen ________________________________ From: Jac Billington Sent: 18 January 2019 18:07:04 To: fieldtrip at science.ru.nl Subject: ft_clusterplot error? Dear experts, I've recently begun using fieldtrip and have been following tutorials well. however, I have perhaps run into a problem with ft_clusterplot. An example output is located in dropbox here: https://www.dropbox.com/sh/64m3xpgco2uavky/AADT6-rXEdylVzHN1lY-q7SNa?dl=0 My negative cluster labels don't seem to be located in a cluster per se, or in regions with a greater raw effect. This seems at odds with tutorial examples and papers. Apologies if I'm missing something, but can this be correct? I did have earlier errors (' ft_error('unsupported dimord %s', dimord);') but I realised this was because dimensions of my stat.raweffect (64 5 200) were in conflict with collapsing time and frequency when running ft_freqstatistics. Reducing stat.raweefect to 64 1 solved this error, but I'm wondering if I have done something wrong. My code is posted below and I'd happily be poited to some papers if I'm misunderstanding this. Thank you in advance. Jac % load data (from ft_freqanalysis) load(filename1); con1= freqScaling load(filename2); con2=freqScaling; %%%% run the stats: cfg = []; cfg.channel = 'all'; cfg.latency = [4 6]; cfg.frequency = [8 12]; cfg.method = 'montecarlo'; cfg.statistic = 'ft_statfun_indepsamplesT'; cfg.correctm = 'cluster'; cfg.clusteralpha = 0.05; cfg.clusterstatistic = 'maxsum'; cfg.minnbchan = 2; cfg.tail = 0; cfg.clustertail = 0; cfg.alpha = 0.025; cfg.numrandomization = 500; cfg.avgoverchan = 'no' cfg.avgovertime = 'yes' cfg.avgoverfreq = 'yes' % prepare_neighbours determines what sensors may form clusters cfg_neighb.method = 'distance'; cfg.neighbours = ft_prepare_neighbours(cfg_neighb, elec); design = zeros(1,size(con1.powspctrm,1) + size(con2.powspctrm,1)); design(1,1:size(con1.powspctrm,1)) = 1; design(1,(size(con1.powspctrm,1)+1):(size(con1.powspctrm,1)+ size(con2.powspctrm,1))) = 2; cfg.design = design; cfg.ivar = 1; [stat] = ft_freqstatistics(cfg, con1, con2); cfg=[] cfg.keeptrials = 'no' cfg.latency = [4 6]; cfg.frequency = [8 12]; con1 = ft_freqdescriptives(cfg, con1); con2 = ft_freqdescriptives(cfg, con2); %%%% resize powerspec to avoid dimord error. Collapse freq/ time con1rs=mean(con1.powspctrm,3) %%% collapse time dim con2rs=mean(con2.powspctrm,3) %%% collapse time dim con1rs=mean(con1rs,2) %%% collapse freq con2rs=mean(con2rs,2) stat.raweffect = con1rs-con2rs cfg.alpha = 0.025; cfg.zparam = 'raweffect'; cfg.zlim = [-1 3]; cfg.layout = 'biosemi64.lay'; cfg.subplotsize = ([1 1]); ft_clusterplot(cfg, stat); -------------- next part -------------- An HTML attachment was scrubbed... URL: From ighoyota at tlu.ee Wed Jan 23 00:48:35 2019 From: ighoyota at tlu.ee (Ben Ighoyota Ajenaghughrure) Date: Wed, 23 Jan 2019 01:48:35 +0200 Subject: [FieldTrip] Trial definition using events from seperate text file and continous eeg data Message-ID: Hello All, I need help creating trial definitions for my continous eeg data using events time locked in a seperate text file. I have my continous eeg data recorded during game interaction without any event information. The Game events are stored in a text file in miliseconds precission. Both game and eeg recorder runs on the same PC. To take care time synchronisation issues. My problem is how to define trails for eeg data using the event file stored seperately , because currently my eeg data does not have any event information. I am new to fieldtrip but have done this task in eeglab and would love to move on to using fieldtrip toolbox. Looking forward to your support. Best Regards Ighoyota ben. -------------- next part -------------- An HTML attachment was scrubbed... URL: From eunchanna at gmail.com Wed Jan 23 06:30:33 2019 From: eunchanna at gmail.com (=?UTF-8?B?64KY7J2A7LCs?=) Date: Wed, 23 Jan 2019 14:30:33 +0900 Subject: [FieldTrip] Question regarding loreta2fieldtrip Message-ID: Hello, I'm using MATLAB R2017b and sLORETA free software. I'm interested in using sLORETA software to perform source localization on ERD/ERS. I'm getting used to sLORETA, but I'm having a problem loading the sLORETA solution (slor file) into MATLAB. After some web searching, I found loreta2fieldtrip and I wanted to test whether it works. Here are the results I encountered: >> [source] = loreta2fieldtrip('C:\Users\OLEDEEG\Documents\sLORETA-ExampleDataSets\ExampleEEGdata(PeterAnderer)\Pilot\RestEEG_Young\REEG01_Y-slor.txt') 다음 사용 중 오류가 발생함: ft_preamble (line 80) Could not run ft_preamble_callinfo - does not seem to exist 오류 발생: loreta2fieldtrip (line 48) ft_preamble callinfo >> I've only installed Fieldtrip toolbox and didn't add/delete anything yet. Would you be able to help me with this? Thank you in advance for your help. Regards, Eunchan. ᐧ -------------- next part -------------- An HTML attachment was scrubbed... URL: From a.stolk8 at gmail.com Wed Jan 23 06:36:40 2019 From: a.stolk8 at gmail.com (Arjen Stolk) Date: Tue, 22 Jan 2019 21:36:40 -0800 Subject: [FieldTrip] Question regarding loreta2fieldtrip In-Reply-To: References: Message-ID: Hi Eunchan, Briefly checking, did you correctly add fieldtrip and its subdirectories to your matlab path, as described here ? Best regards, Arjen On Tue, Jan 22, 2019 at 9:32 PM 나은찬 wrote: > Hello, > > I'm using MATLAB R2017b and sLORETA free software. > > I'm interested in using sLORETA software to perform source localization on > ERD/ERS. > > I'm getting used to sLORETA, but I'm having a problem loading the sLORETA > solution (slor file) into MATLAB. > > After some web searching, I found loreta2fieldtrip and I wanted to test > whether it works. > > Here are the results I encountered: > > >> [source] = > loreta2fieldtrip('C:\Users\OLEDEEG\Documents\sLORETA-ExampleDataSets\ExampleEEGdata(PeterAnderer)\Pilot\RestEEG_Young\REEG01_Y-slor.txt') > 다음 사용 중 오류가 발생함: ft_preamble (line 80) > Could not run ft_preamble_callinfo - does not seem to exist > > 오류 발생: loreta2fieldtrip (line 48) > ft_preamble callinfo > > >> > > I've only installed Fieldtrip toolbox and didn't add/delete anything yet. > > Would you be able to help me with this? > > Thank you in advance for your help. > > Regards, > > Eunchan. > > ᐧ > _______________________________________________ > 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 stephen.whitmarsh at gmail.com Wed Jan 23 09:13:32 2019 From: stephen.whitmarsh at gmail.com (Stephen Whitmarsh) Date: Wed, 23 Jan 2019 09:13:32 +0100 Subject: [FieldTrip] Trial definition using events from seperate text file and continous eeg data In-Reply-To: References: Message-ID: Hi Ighoyota ben, You will have to create your own trial definition (trl). In (very) short: 1) read your text file in matlab, using whatever MATLAB functions are easiest (e.g. dlmread) 2) create a variable called *trl *that contains N rows for N trials, with 3 columns: start, end, and offset in *samples, *with sample numbers starting from the beginning of you file. The offset determines t=0, e.g. when you want to read data before the trigger. E.g., if sampled at 1000Hz, and want trials from -1.0 to 2.0 around your triggers (i.e. 3000 samples), you would have something like (taking random sample values for where your trials occur): trl = [12300, 15300, -1000; 18000, 21000, -1000; 25050, 28050, -1000] 3) enter that in *cfg.trl*, together with your file name in *cfg.dataset*, and run data = ft_preprocessing(cfg). E.g.: cfg = []; cfg.dataset = 'myfile.edf'; cfg.trl = trl; data = ft_preprocessing(cfg) I hope this explains the general idea. It will be good to follow a tutorial, to get the whole run-through. and take extra care to look at the trial definition part (take e.g. a peak at the cfg.trl) HTH, Stephen On Wed, 23 Jan 2019 at 01:12, Ben Ighoyota Ajenaghughrure wrote: > Hello All, > > I need help creating trial definitions for my continous eeg data using > events time locked in a seperate text file. > > I have my continous eeg data recorded during game interaction without any > event information. > The Game events are stored in a text file in miliseconds precission. > > Both game and eeg recorder runs on the same PC. To take care time > synchronisation issues. > > My problem is how to define trails for eeg data using the event file > stored seperately , because currently my eeg data does not have any event > information. > > I am new to fieldtrip but have done this task in eeglab and would love to > move on to using fieldtrip toolbox. > > Looking forward to your support. > > Best Regards > > Ighoyota ben. > _______________________________________________ > 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 Darren.Kadis at cchmc.org Wed Jan 23 20:47:23 2019 From: Darren.Kadis at cchmc.org (Kadis, Darren) Date: Wed, 23 Jan 2019 19:47:23 +0000 Subject: [FieldTrip] deep sources when warping from template (MNI) to individual space Message-ID: <54b1511bd167466db12ca9e8d2ab30b2@cchmc.org> Dear FieldTrippers: Wanted to follow-up on a discussion regarding poor normalization, and specifically, an inward bias, when warping template (MNI space) source positions to individual subject space. This is a useful approach to normalization, facilitating group-level analyses and anatomical referencing, though meaningful inference is predicated on having accurate normalization/warps. At least one relevant discussion thread, here: https://mailman.science.ru.nl/pipermail/fieldtrip/2015-April/009111.html, though I don't see resolution. In my lab, we're consistently observing an 'inward bias' when warping template source positions to individual space (see attached). Superficial sources seem to shift excessively deep, particularly at the dorsum. Has anyone adjusted the normalization parameters or implemented alternate warping procedures to generate accurate transformations? I will note that default normalization of individual MRI to template works well in both SPM8 and SPM12 (confirmed with checkreg). I believe ft_preparesourcemodel calls upon ft_volumenormalize and spm routines to generate the deformation field. We've tried adjusted the warping regularization parameters in ft_volumenormalise both up and down by an order of magnitude, but did not see any real improvement. Suggestions? Below, I'm sharing a short script used to visualize the relative performance of normalization with SPM8, SPM12 linear-only, and SPM12 nonlinear approaches, as implemented in FieldTrip. I used 346 source positions, located approximately 3.6mm deep to the template brain surface (roughly corresponding to mid-sulcal depth across the cerebral mantle; attached). %% start clear all; close all; restoredefaultpath; addpath('PATH TO CURRENT FIELDTRIP DISTRO'); ft_defaults; vs_pos = []; % n×3, coords of interest, MNI space; see attached text, if interested in replicating template_mri = ft_read_mri('PATH TO SPM12\spm12\canonical\avg152T1.nii'); template_mri.coordsys = 'spm'; % ft_volumesegment needs coordsys of the template volume cfg = []; cfg.output = {'brain', 'skull', 'scalp'}; cfg.spmversion = 'spm12'; cfg.spmmethod = 'new'; template_seg = ft_volumesegment(cfg, template_mri); cfg = []; cfg.method = 'singleshell'; template_headmodel = ft_prepare_headmodel(cfg, template_seg); cfg = []; cfg.grid.pos = vs_pos; cfg.spmversion = 'spm12'; cfg.spmmethod = 'new'; cfg.headmodel = template_headmodel; template_grid = ft_prepare_sourcemodel(cfg); % evaluate dipole positions relative to modeled brain figure; ft_plot_vol(template_headmodel, 'facecolor', 'cortex', 'edgecolor', 'none'); alpha 0.5; camlight; hold on; ft_plot_mesh(template_grid.pos); % generate the individual headmodel; warp source positions from template to subject space T1 = 'PATH TO SUBJECT T1'; % high-quality 3D-T1, 1mm isotropic, here individual_mri = ft_read_mri(T1, 'dataformat', 'nifti_spm'); individual_mri.coordsys = 'spm'; cfg = []; cfg.output = {'brain', 'skull', 'scalp'}; cfg.spmversion = 'spm12'; cfg.spmmethod = 'new'; individual_segmented_mri = ft_volumesegment(cfg, individual_mri); cfg = []; cfg.method = 'singleshell'; individual_headmodel = ft_prepare_headmodel(cfg, individual_segmented_mri); individual_headmodel = ft_convert_units(individual_headmodel, 'cm'); cfg = []; cfg.grid.warpmni = 'yes'; cfg.grid.template = template_grid; cfg.grid.nonlinear = 'yes'; cfg.spmversion = 'spm8'; cfg.mri = individual_mri; individual_grid_spm8 = ft_prepare_sourcemodel(cfg); cfg = []; cfg.grid.warpmni = 'yes'; cfg.grid.template = template_grid; cfg.grid.nonlinear = 'no'; cfg.spmversion = 'spm12'; cfg.spmmethod = 'new'; cfg.mri = individual_mri; individual_grid_spm12_linear = ft_prepare_sourcemodel(cfg); cfg = []; cfg.grid.warpmni = 'yes'; cfg.grid.template = template_grid; cfg.grid.nonlinear = 'yes'; cfg.spmversion = 'spm12'; cfg.spmmethod = 'old'; cfg.mri = individual_mri; individual_grid_spm12_nonlinear = ft_prepare_sourcemodel(cfg); figure; subplot(2, 2, 1); ft_plot_vol(template_headmodel, 'facecolor', 'cortex', 'edgecolor', 'none'); alpha 0.25; camlight; hold on; ft_plot_mesh(template_grid.pos, 'vertexcolor', 'red'); title('template'); subplot(2, 2, 2); ft_plot_vol(individual_headmodel, 'facecolor', 'cortex', 'edgecolor', 'none'); alpha 0.25; camlight; hold on; ft_plot_mesh(individual_grid_spm8.pos); title('individual spm8 nonlinear'); subplot(2, 2, 3); ft_plot_vol(individual_headmodel, 'facecolor', 'cortex', 'edgecolor', 'none'); alpha 0.25; camlight; hold on; ft_plot_mesh(individual_grid_spm12_linear.pos); title('individual spm12 linear only'); subplot(2, 2, 4); ft_plot_vol(individual_headmodel, 'facecolor', 'cortex', 'edgecolor', 'none'); alpha 0.25; camlight; hold on; ft_plot_mesh(individual_grid_spm12_nonlinear.pos); title('individual spm12 nonlinear'); %% end In advance, thanks for your help. Darren S. Kadis, PhD Assistant Professor Co-Director, MEG Core Division of Neurology Pediatric Neuroimaging Research Consortium Cincinnati Children's Hospital Medical Center MLC 15008, 3333 Burnet Avenue Cincinnati, OH 45229-3026 Neurology and Neuroscience Graduate Program College of Medicine, Department of Pediatrics University of Cincinnati -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: compare_normalization.jpg Type: image/jpeg Size: 597389 bytes Desc: compare_normalization.jpg URL: -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: cortical_sources.txt URL: From bick35 at gmail.com Wed Jan 23 23:40:54 2019 From: bick35 at gmail.com (Steph bick) Date: Wed, 23 Jan 2019 22:40:54 +0000 Subject: [FieldTrip] edf import error Message-ID: Dear fieldtrip experts, I exported an EEG file to edf from our clinical system (Natus XLTEK) and am trying to import it. Below I pasted the error and what I tried. I’m using a macbook pro Mojave, and FieldTrip revision beead1127. Any help is highly appreciated. Thank you! Stephan But run into this error: Index exceeds matrix dimensions. Error in read_edf (line 129) if EDF.T0(1) < 91 Error in ft_read_header (line 787) hdr = read_edf(filename); Error in ft_preprocessing (line 397) hdr = ft_read_header(cfg.headerfile, 'headerformat', cfg.headerformat,... I am running this command: cfg=[]; cfg.dataset = '/Users/tst/Downloads/test.edf'; data = ft_preprocessing(cfg) What I tried This is the snipped of read_edf where it gets stuck (in bold is line 129). H1=char(fread(EDF.FILE.FID,256,'char')'); EDF.VERSION=H1(1:8); % 8 Byte Versionsnummer %if 0 fprintf(2,'LOADEDF: WARNING Version EDF Format %i',ver); end EDF.PID = deblank(H1(9:88)); % 80 Byte local patient identification EDF.RID = deblank(H1(89:168)); % 80 Byte local recording identification %EDF.H.StartDate = H1(169:176); % 8 Byte %EDF.H.StartTime = H1(177:184); % 8 Byte EDF.T0=[str2num(H1(168+[7 8])) str2num(H1(168+[4 5])) str2num(H1(168+[1 2])) str2num(H1(168+[9 10])) str2num(H1(168+[12 13])) str2num(H1(168+[15 16])) ]; % Y2K compatibility until year 2090 if EDF.VERSION(1)=='0' if EDF.T0(1) < 91 EDF.T0(1)=2000+EDF.T0(1); else EDF.T0(1)=1900+EDF.T0(1); end else % in a future version, this is hopefully not needed End Some outputs at this stage: K>> EDF.T0 ans = [] K>> EDF EDF = struct with fields: FILE: [1×1 struct] FileName: '/Users/tst/Downloads/NS136_Day4_Seizure1_clipANON.edf' VERSION: '0 ' PID: 'ReX' RID: '' T0: [] K>> H1 H1 = '0 ReX IF I import the edf to an EEG viewer and export from that software again, the import works. It seems that the export writes additional info to what is read into H1. The outputs at the same stage of import for this new file is: EDF = struct with fields: FILE: [1×1 struct] FileName: '/Users/tst/Downloads/NewFile.edf' VERSION: '0 ' PID: 'X X X X' RID: 'Startdate 23-JAN-2019 X X AnyWave_EDF+_exporter' T0: [19 1 23 16 49 29] K>> H1 H1 = '0 X X X X Startdate 23-JAN-2019 X X AnyWave_EDF+_exporter -------------- next part -------------- An HTML attachment was scrubbed... URL: From leizhang at psych.ac.cn Thu Jan 24 05:35:58 2019 From: leizhang at psych.ac.cn (leizhang) Date: Thu, 24 Jan 2019 12:35:58 +0800 Subject: [FieldTrip] =?utf-8?q?can=27t_find_the_ft=5Fpostfreesurferscript?= =?utf-8?b?LnNo?= References: Message-ID: Dear community, My name is Zhang Lei and I am working in the institute of psychology, CAS. Currently I am analyzing an MEG data. I'm doing the 'Creating a source model for source-reconstruction of MEG or EEG data' part according to the tutorial. After the freesurfer step, ft_postfreesurferscript.sh are used. However, I couldn't find the script in the fieldtrip/bin/, and I couldn't find it in other folder or on the web either. I wander where I can get this script to complete the step. Thanks! Best,  Zhang Lei Sent from YoMail -------------- next part -------------- An HTML attachment was scrubbed... URL: From jan.schoffelen at donders.ru.nl Fri Jan 25 01:19:19 2019 From: jan.schoffelen at donders.ru.nl (Schoffelen, J.M. (Jan Mathijs)) Date: Fri, 25 Jan 2019 00:19:19 +0000 Subject: [FieldTrip] can't find the ft_postfreesurferscript.sh In-Reply-To: References: Message-ID: <418E7C2D-700B-44F7-A10F-7D5771B24557@donders.ru.nl> Hi Zhang Lei, Please check the completeness of your fieldtrip repository. The current version on github has the ft_postfreesurferscript.sh in the bin folder. Best wishes, Jan-Mathijs J.M.Schoffelen, MD PhD Senior Researcher, VIDI-fellow - PI, language in interaction Telephone: +31-24-3614793 Physical location: room 00.028 Donders Centre for Cognitive Neuroimaging, Nijmegen, The Netherlands On 24 Jan 2019, at 04:35, leizhang > wrote: Dear community, My name is Zhang Lei and I am working in the institute of psychology, CAS. Currently I am analyzing an MEG data. I'm doing the 'Creating a source model for source-reconstruction of MEG or EEG data' part according to the tutorial. After the freesurfer step, ft_postfreesurferscript.sh are used. However, I couldn't find the script in the fieldtrip/bin/, and I couldn't find it in other folder or on the web either. I wander where I can get this script to complete the step. Thanks! Best, Zhang Lei ________________________________ Sent from YoMail _______________________________________________ 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 jan.schoffelen at donders.ru.nl Fri Jan 25 01:25:45 2019 From: jan.schoffelen at donders.ru.nl (Schoffelen, J.M. (Jan Mathijs)) Date: Fri, 25 Jan 2019 00:25:45 +0000 Subject: [FieldTrip] deep sources when warping from template (MNI) to individual space In-Reply-To: <54b1511bd167466db12ca9e8d2ab30b2@cchmc.org> References: <54b1511bd167466db12ca9e8d2ab30b2@cchmc.org> Message-ID: <1333A06A-B511-4D34-A2E0-CD44B2AEA6DB@donders.ru.nl> Dear Darren, That’s certainly a creative way to use the inverse warp for the creation of the subject specific grids :). I don’t know what might be going on, but recently we noticed that the warp might go wrong if the metric units of the data object are unexpected. I am not sure whether this is the case for you, but I noticed that the individual headmodels are explicitly converted into cm. Now, the warping parameters extracted from spm might be agnostic with respect to the units of the input, and probably are defined in ‘mm’. I know that we have been looking into this (i.e. the unit related issue) recently, but don’t know whether it has been resolved. Just as a diagnostic, could you keep the individual headmodel in mm and check what happens? Best wishes, Jan-Mathijs J.M.Schoffelen, MD PhD Senior Researcher, VIDI-fellow - PI, language in interaction Telephone: +31-24-3614793 Physical location: room 00.028 Donders Centre for Cognitive Neuroimaging, Nijmegen, The Netherlands On 23 Jan 2019, at 19:47, Kadis, Darren > wrote: Dear FieldTrippers: Wanted to follow-up on a discussion regarding poor normalization, and specifically, an inward bias, when warping template (MNI space) source positions to individual subject space. This is a useful approach to normalization, facilitating group-level analyses and anatomical referencing, though meaningful inference is predicated on having accurate normalization/warps. At least one relevant discussion thread, here: https://mailman.science.ru.nl/pipermail/fieldtrip/2015-April/009111.html, though I don’t see resolution. In my lab, we’re consistently observing an ‘inward bias’ when warping template source positions to individual space (see attached). Superficial sources seem to shift excessively deep, particularly at the dorsum. Has anyone adjusted the normalization parameters or implemented alternate warping procedures to generate accurate transformations? I will note that default normalization of individual MRI to template works well in both SPM8 and SPM12 (confirmed with checkreg). I believe ft_preparesourcemodel calls upon ft_volumenormalize and spm routines to generate the deformation field. We’ve tried adjusted the warping regularization parameters in ft_volumenormalise both up and down by an order of magnitude, but did not see any real improvement. Suggestions? Below, I’m sharing a short script used to visualize the relative performance of normalization with SPM8, SPM12 linear-only, and SPM12 nonlinear approaches, as implemented in FieldTrip. I used 346 source positions, located approximately 3.6mm deep to the template brain surface (roughly corresponding to mid-sulcal depth across the cerebral mantle; attached). %% start clear all; close all; restoredefaultpath; addpath('PATH TO CURRENT FIELDTRIP DISTRO'); ft_defaults; vs_pos = []; % n×3, coords of interest, MNI space; see attached text, if interested in replicating template_mri = ft_read_mri('PATH TO SPM12\spm12\canonical\avg152T1.nii'); template_mri.coordsys = 'spm'; % ft_volumesegment needs coordsys of the template volume cfg = []; cfg.output = {'brain', 'skull', 'scalp'}; cfg.spmversion = 'spm12'; cfg.spmmethod = 'new'; template_seg = ft_volumesegment(cfg, template_mri); cfg = []; cfg.method = 'singleshell'; template_headmodel = ft_prepare_headmodel(cfg, template_seg); cfg = []; cfg.grid.pos = vs_pos; cfg.spmversion = 'spm12'; cfg.spmmethod = 'new'; cfg.headmodel = template_headmodel; template_grid = ft_prepare_sourcemodel(cfg); % evaluate dipole positions relative to modeled brain figure; ft_plot_vol(template_headmodel, 'facecolor', 'cortex', 'edgecolor', 'none'); alpha 0.5; camlight; hold on; ft_plot_mesh(template_grid.pos); % generate the individual headmodel; warp source positions from template to subject space T1 = 'PATH TO SUBJECT T1'; % high-quality 3D-T1, 1mm isotropic, here individual_mri = ft_read_mri(T1, 'dataformat', 'nifti_spm'); individual_mri.coordsys = 'spm'; cfg = []; cfg.output = {'brain', 'skull', 'scalp'}; cfg.spmversion = 'spm12'; cfg.spmmethod = 'new'; individual_segmented_mri = ft_volumesegment(cfg, individual_mri); cfg = []; cfg.method = 'singleshell'; individual_headmodel = ft_prepare_headmodel(cfg, individual_segmented_mri); individual_headmodel = ft_convert_units(individual_headmodel, 'cm'); cfg = []; cfg.grid.warpmni = 'yes'; cfg.grid.template = template_grid; cfg.grid.nonlinear = 'yes'; cfg.spmversion = 'spm8'; cfg.mri = individual_mri; individual_grid_spm8 = ft_prepare_sourcemodel(cfg); cfg = []; cfg.grid.warpmni = 'yes'; cfg.grid.template = template_grid; cfg.grid.nonlinear = 'no'; cfg.spmversion = 'spm12'; cfg.spmmethod = 'new'; cfg.mri = individual_mri; individual_grid_spm12_linear = ft_prepare_sourcemodel(cfg); cfg = []; cfg.grid.warpmni = 'yes'; cfg.grid.template = template_grid; cfg.grid.nonlinear = 'yes'; cfg.spmversion = 'spm12'; cfg.spmmethod = 'old'; cfg.mri = individual_mri; individual_grid_spm12_nonlinear = ft_prepare_sourcemodel(cfg); figure; subplot(2, 2, 1); ft_plot_vol(template_headmodel, 'facecolor', 'cortex', 'edgecolor', 'none'); alpha 0.25; camlight; hold on; ft_plot_mesh(template_grid.pos, 'vertexcolor', 'red'); title('template'); subplot(2, 2, 2); ft_plot_vol(individual_headmodel, 'facecolor', 'cortex', 'edgecolor', 'none'); alpha 0.25; camlight; hold on; ft_plot_mesh(individual_grid_spm8.pos); title('individual spm8 nonlinear'); subplot(2, 2, 3); ft_plot_vol(individual_headmodel, 'facecolor', 'cortex', 'edgecolor', 'none'); alpha 0.25; camlight; hold on; ft_plot_mesh(individual_grid_spm12_linear.pos); title('individual spm12 linear only'); subplot(2, 2, 4); ft_plot_vol(individual_headmodel, 'facecolor', 'cortex', 'edgecolor', 'none'); alpha 0.25; camlight; hold on; ft_plot_mesh(individual_grid_spm12_nonlinear.pos); title('individual spm12 nonlinear'); %% end In advance, thanks for your help. Darren S. Kadis, PhD Assistant Professor Co-Director, MEG Core Division of Neurology Pediatric Neuroimaging Research Consortium Cincinnati Children's Hospital Medical Center MLC 15008, 3333 Burnet Avenue Cincinnati, OH 45229-3026 Neurology and Neuroscience Graduate Program College of Medicine, Department of Pediatrics University of Cincinnati _______________________________________________ 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 leizhang at psych.ac.cn Fri Jan 25 07:29:19 2019 From: leizhang at psych.ac.cn (leizhang) Date: Fri, 25 Jan 2019 14:29:19 +0800 Subject: [FieldTrip] =?utf-8?q?can=27t_find_the_ft=5Fpostf__reesurferscri?= =?utf-8?q?pt=2Esh?= References: <418E7C2D-700B-44F7-A10F-7D5771B24557@donders.ru.nl> Message-ID: Thanks a lot! I find it. best, Zhang Lei Sent from YoMail -------------- next part -------------- An HTML attachment was scrubbed... URL: From muthuraman10 at hotmail.com Fri Jan 25 13:03:26 2019 From: muthuraman10 at hotmail.com (Muthuraman Muthuraman) Date: Fri, 25 Jan 2019 12:03:26 +0000 Subject: [FieldTrip] Neuroscientist with focus on electrophysiology and imaging in Parkinson disease patients! Message-ID: Doctoral Student Neuroscientist with focus on electrophysiology and imaging in Parkinson disease patients The clinic of neurology, imaging and neurostimulation group (http://imaging-neurostim.com) University of Mainz, Germany, invites applications for a PhD Student for a functional translational neuroscience (FTN) scholarship three year position to work on electrophysiology and imaging in Parkinson disease (PD) patients. A project with multimodality usage of modalities like electroencephalography (EEG) and functional magnetic resonance imaging (fMRI) to analyze network fingerprints in PD patients. The successful applicant holds a Master’s degree (or equivalent) in a relevant academic area such as basic life sciences, neuropsychology, applied mathematics or biomedical engineering or similar disciplines. German language proficiency is mandatory for communicating with the patients. The working language at the institute is English. Experience with electrophysiology and the analysis of brain signals is advantageous, but not essential. The applicant’s merits are assessed on the basis of the quality of Master’s level studies and thesis, previous experience with the brain imaging, motivation and research interests. The location for this research will mainly be the workgroups “Section of Movement Disorders, Neurostimulation and Neuroimaging“ of Prof. Sergiu Groppa at the Department of Neurology and “Biomedical Statistics and Multimodal Signal Processing Unit” of Prof. Muthuraman Muthuraman, both at the Focus Program Translational Neurosciences (http://www.ftn.uni-mainz.de/) and Neuroimaging Centre Mainz (http://www.ftn.nic.uni-mainz.de/). Expected close collaborations with national and international partners. The application should include a statement of research interests, a curriculum vitae (max. 4 pages) composed according to good scientific practice, a certificate of Master’s degree, copy of the master’s thesis and grades of Master’s level studies, the names and e-mail addresses of two referees and a proof of proficiency in English. The position will be open until filled. To apply for the position, please send the above documents as pdfs until 15.02.2019 to Prof. Sergiu Groppa, and Prof. Muthuraman Muthuraman, Department of Neurology, Section of movement disorders and neurostimulation, University of Mainz, Langenbeckstrasse 1, 55131 Mainz, Germany, or by Email to segroppa(at)uni-mainz.de; mmuthura(at)uni-mainz.de. For additional information please contact Muthuraman Muthuraman. -------------- next part -------------- An HTML attachment was scrubbed... URL: From dlozanosoldevilla at gmail.com Fri Jan 25 13:59:49 2019 From: dlozanosoldevilla at gmail.com (Diego Lozano-Soldevilla) Date: Fri, 25 Jan 2019 13:59:49 +0100 Subject: [FieldTrip] automatic channel rejection In-Reply-To: <10d93c05-c66e-18d6-7533-ef40b858a218@uzh.ch> References: <10d93c05-c66e-18d6-7533-ef40b858a218@uzh.ch> Message-ID: Hi Aitor, May be what you're looking for is "ft_artifact_threshold.m". That being said, I don't recommend rejecting artifacts without visually inspecting the data. Absolute threshold do not necessarily generalize across subjects and/or experimental sessions. I hope that helps, Diego On Sun, 20 Jan 2019 at 17:45, Aitor Egurtzegi < aitor.martinezegurcegui at uzh.ch> wrote: > Hi Diego, > > Thanks for the help. However, I was wondering if there is a way to > reject artifacts without visually inspecting them. Like, from the manual > you sent I see that I still would have to click on the trials / channels > I would like to reject? Is there a way to script it based on some > previously established parameters, without having to check all trials / > channels for each participant? > > Best, > Aitor > > > Date: Fri, 18 Jan 2019 16:47:17 +0100 > > From: Diego Lozano-Soldevilla > > To: FieldTrip discussion list > > Subject: Re: [FieldTrip] automatic channel rejection > > Message-ID: > > < > CAEVBUjij4o8J-U10rF4Oxfa9d81tE_BD3t81DcdSy-VQfeTnUA at mail.gmail.com> > > Content-Type: text/plain; charset="utf-8" > > > > Hi Aitor, > > Take a look at this > > > http://www.fieldtriptoolbox.org/tutorial/visual_artifact_rejection/#manual-artifact-rejection---display-a-summary > > Best, > > Diego > > > > On Fri, 18 Jan 2019 at 16:43, Aitor Egurtzegi < > > aitor.martinezegurcegui at uzh.ch> wrote: > > > >> Dear Fieldtrip subscribers, > >> > >> I was wondering if anyone knew how to automatically reject bad channels > >> in Fieldtrip, as it is done in EEGLAB based on e.g. kurtosis. Basically, > >> I'm looking for the Fieldtrip equivalent of the EEGLAB function > >> pop_rejchan. > >> > >> Many thanks in advance, > >> Aitor > >> > >> _______________________________________________ > >> 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 Darren.Kadis at cchmc.org Fri Jan 25 17:53:59 2019 From: Darren.Kadis at cchmc.org (Kadis, Darren) Date: Fri, 25 Jan 2019 16:53:59 +0000 Subject: [FieldTrip] deep sources when warping from template (MNI) to individual space (Schoffelen, J.M. (Jan Mathijs)) Message-ID: Jan-Mathijs, thanks for the speedy response. As suggested, I re-ran the sourcemodel comparison, keeping the individual headmodel in mm, but also explicitly specifying 'mm' when calling ft_prepare_sourcemodel (cfg.grid.unit = 'mm'; else assumes cm). Unfortunately, I'm still seeing the 'deep bias' for the warped positions. Units for the for the data object don’t seem to be the problem - the resulting source positions (.pos field) for the mm-defined vs cm-defined headmodel are identical, after accounting for order of magnitude difference, and rounding. I'll keep digging, and welcome other suggestions. For now, the 'SPM12 linear only' option seems to produce the most reasonable-looking positions in individual space (I believe Stephen Whitmarsh previously concluded the same - https://mailman.science.ru.nl/pipermail/fieldtrip/2015-April/009111.html). Thanks, Darren > -----Original Message----- > From: fieldtrip On Behalf Of fieldtrip- > request at science.ru.nl > Sent: Friday, January 25, 2019 6:00 AM > To: fieldtrip at science.ru.nl > Subject: fieldtrip Digest, Vol 98, Issue 30 > > Send fieldtrip mailing list submissions to > fieldtrip at science.ru.nl > > To subscribe or unsubscribe via the World Wide Web, visit > https://mailman.science.ru.nl/mailman/listinfo/fieldtrip > or, via email, send a message with subject or body 'help' to > fieldtrip-request at science.ru.nl > > You can reach the person managing the list at > fieldtrip-owner at science.ru.nl > > When replying, please edit your Subject line so it is more specific than "Re: > Contents of fieldtrip digest..." > > > Today's Topics: > > 1. Re: can't find the ft_postfreesurferscript.sh > (Schoffelen, J.M. (Jan Mathijs)) > 2. Re: deep sources when warping from template (MNI) to > individual space (Schoffelen, J.M. (Jan Mathijs)) > 3. Re: can't find the ft_postf reesurferscript.sh (leizhang) > > > ---------------------------------------------------------------------- > > Message: 1 > Date: Fri, 25 Jan 2019 00:19:19 +0000 > From: "Schoffelen, J.M. (Jan Mathijs)" > To: FieldTrip discussion list > Subject: Re: [FieldTrip] can't find the ft_postfreesurferscript.sh > Message-ID: <418E7C2D-700B-44F7-A10F-7D5771B24557 at donders.ru.nl> > Content-Type: text/plain; charset="utf-8" > > Hi Zhang Lei, > > Please check the completeness of your fieldtrip repository. The current > version on github has the ft_postfreesurferscript.sh in the bin folder. > > Best wishes, > Jan-Mathijs > > > J.M.Schoffelen, MD PhD > Senior Researcher, VIDI-fellow - PI, language in interaction > Telephone: +31-24-3614793 > Physical location: room 00.028 > Donders Centre for Cognitive Neuroimaging, Nijmegen, The Netherlands > > > > On 24 Jan 2019, at 04:35, leizhang > > wrote: > > Dear community, > > My name is Zhang Lei and I am working in the institute of psychology, CAS. > Currently I am analyzing an MEG data. > > I'm doing the 'Creating a source model for source-reconstruction of MEG or > EEG data' part according to the tutorial. After the freesurfer step, > ft_postfreesurferscript.sh are used. However, I couldn't find the script in the > fieldtrip/bin/, and I couldn't find it in other folder or on the web either. I > wander where I can get this script to complete the step. > > Thanks! > Best, > Zhang Lei > > ________________________________ > Sent from YoMail > _______________________________________________ > 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: > 1ccd55/attachment-0001.html> > > ------------------------------ > > Message: 2 > Date: Fri, 25 Jan 2019 00:25:45 +0000 > From: "Schoffelen, J.M. (Jan Mathijs)" > To: FieldTrip discussion list > Subject: Re: [FieldTrip] deep sources when warping from template (MNI) > to individual space > Message-ID: <1333A06A-B511-4D34-A2E0-CD44B2AEA6DB at donders.ru.nl> > Content-Type: text/plain; charset="utf-8" > > Dear Darren, > > That’s certainly a creative way to use the inverse warp for the creation of the > subject specific grids :). I don’t know what might be going on, but recently we > noticed that the warp might go wrong if the metric units of the data object > are unexpected. I am not sure whether this is the case for you, but I noticed > that the individual headmodels are explicitly converted into cm. Now, the > warping parameters extracted from spm might be agnostic with respect to > the units of the input, and probably are defined in ‘mm’. I know that we have > been looking into this (i.e. the unit related issue) recently, but don’t know > whether it has been resolved. Just as a diagnostic, could you keep the > individual headmodel in mm and check what happens? > > Best wishes, > Jan-Mathijs > > > > J.M.Schoffelen, MD PhD > Senior Researcher, VIDI-fellow - PI, language in interaction > Telephone: +31-24-3614793 > Physical location: room 00.028 > Donders Centre for Cognitive Neuroimaging, Nijmegen, The Netherlands > > > > On 23 Jan 2019, at 19:47, Kadis, Darren > > wrote: > > Dear FieldTrippers: > > Wanted to follow-up on a discussion regarding poor normalization, and > specifically, an inward bias, when warping template (MNI space) source > positions to individual subject space. This is a useful approach to > normalization, facilitating group-level analyses and anatomical referencing, > though meaningful inference is predicated on having accurate > normalization/warps. At least one relevant discussion thread, here: > https://mailman.science.ru.nl/pipermail/fieldtrip/2015-April/009111.html, > though I don’t see resolution. > > In my lab, we’re consistently observing an ‘inward bias’ when warping > template source positions to individual space (see attached). Superficial > sources seem to shift excessively deep, particularly at the dorsum. Has > anyone adjusted the normalization parameters or implemented alternate > warping procedures to generate accurate transformations? I will note that > default normalization of individual MRI to template works well in both SPM8 > and SPM12 (confirmed with checkreg). > > I believe ft_preparesourcemodel calls upon ft_volumenormalize and spm > routines to generate the deformation field. We’ve tried adjusted the > warping regularization parameters in ft_volumenormalise both up and down > by an order of magnitude, but did not see any real improvement. > Suggestions? > > Below, I’m sharing a short script used to visualize the relative performance of > normalization with SPM8, SPM12 linear-only, and SPM12 nonlinear > approaches, as implemented in FieldTrip. I used 346 source positions, > located approximately 3.6mm deep to the template brain surface (roughly > corresponding to mid-sulcal depth across the cerebral mantle; attached). > > > %% start > > clear all; close all; > > restoredefaultpath; addpath('PATH TO CURRENT FIELDTRIP DISTRO'); > ft_defaults; > > vs_pos = []; % n×3, coords of interest, MNI space; see attached text, if > interested in replicating > > template_mri = ft_read_mri('PATH TO > SPM12\spm12\canonical\avg152T1.nii'); > template_mri.coordsys = 'spm'; % ft_volumesegment needs coordsys of the > template volume > > cfg = []; > cfg.output = {'brain', 'skull', 'scalp'}; cfg.spmversion = 'spm12'; > cfg.spmmethod = 'new'; template_seg = ft_volumesegment(cfg, > template_mri); > > cfg = []; > cfg.method = 'singleshell'; > template_headmodel = ft_prepare_headmodel(cfg, template_seg); > > cfg = []; > cfg.grid.pos = vs_pos; > cfg.spmversion = 'spm12'; > cfg.spmmethod = 'new'; > cfg.headmodel = template_headmodel; > template_grid = ft_prepare_sourcemodel(cfg); > > > % evaluate dipole positions relative to modeled brain figure; > ft_plot_vol(template_headmodel, 'facecolor', 'cortex', 'edgecolor', 'none'); > alpha 0.5; camlight; hold on; ft_plot_mesh(template_grid.pos); > > % generate the individual headmodel; warp source positions from template > to subject space > T1 = 'PATH TO SUBJECT T1'; % high-quality 3D-T1, 1mm isotropic, here > individual_mri = ft_read_mri(T1, 'dataformat', 'nifti_spm'); > individual_mri.coordsys = 'spm'; > > cfg = []; > cfg.output = {'brain', 'skull', 'scalp'}; cfg.spmversion = 'spm12'; > cfg.spmmethod = 'new'; individual_segmented_mri = ft_volumesegment(cfg, > individual_mri); > > cfg = []; > cfg.method = 'singleshell'; > individual_headmodel = ft_prepare_headmodel(cfg, > individual_segmented_mri); individual_headmodel = > ft_convert_units(individual_headmodel, 'cm'); > > cfg = []; > cfg.grid.warpmni = 'yes'; > cfg.grid.template = template_grid; > cfg.grid.nonlinear = 'yes'; > cfg.spmversion = 'spm8'; > cfg.mri = individual_mri; > individual_grid_spm8 = ft_prepare_sourcemodel(cfg); > > cfg = []; > cfg.grid.warpmni = 'yes'; > cfg.grid.template = template_grid; > cfg.grid.nonlinear = 'no'; > cfg.spmversion = 'spm12'; > cfg.spmmethod = 'new'; > cfg.mri = individual_mri; > individual_grid_spm12_linear = ft_prepare_sourcemodel(cfg); > > cfg = []; > cfg.grid.warpmni = 'yes'; > cfg.grid.template = template_grid; > cfg.grid.nonlinear = 'yes'; > cfg.spmversion = 'spm12'; > cfg.spmmethod = 'old'; > cfg.mri = individual_mri; > individual_grid_spm12_nonlinear = ft_prepare_sourcemodel(cfg); > > figure; > subplot(2, 2, 1); ft_plot_vol(template_headmodel, 'facecolor', 'cortex', > 'edgecolor', 'none'); alpha 0.25; camlight; hold on; > ft_plot_mesh(template_grid.pos, 'vertexcolor', 'red'); title('template'); > subplot(2, 2, 2); ft_plot_vol(individual_headmodel, 'facecolor', 'cortex', > 'edgecolor', 'none'); alpha 0.25; camlight; hold on; > ft_plot_mesh(individual_grid_spm8.pos); title('individual spm8 nonlinear'); > subplot(2, 2, 3); ft_plot_vol(individual_headmodel, 'facecolor', 'cortex', > 'edgecolor', 'none'); alpha 0.25; camlight; hold on; > ft_plot_mesh(individual_grid_spm12_linear.pos); title('individual spm12 > linear only'); subplot(2, 2, 4); ft_plot_vol(individual_headmodel, 'facecolor', > 'cortex', 'edgecolor', 'none'); alpha 0.25; camlight; hold on; > ft_plot_mesh(individual_grid_spm12_nonlinear.pos); title('individual spm12 > nonlinear'); > > %% end > > In advance, thanks for your help. > > Darren S. Kadis, PhD > Assistant Professor > Co-Director, MEG Core > > Division of Neurology > Pediatric Neuroimaging Research Consortium Cincinnati Children's Hospital > Medical Center MLC 15008, 3333 Burnet Avenue Cincinnati, OH 45229-3026 > > Neurology and Neuroscience Graduate Program College of Medicine, > Department of Pediatrics University of Cincinnati > _____________________ > __________________________ > 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: > f75225/attachment-0001.html> > > ------------------------------ > > Message: 3 > Date: Fri, 25 Jan 2019 14:29:19 +0800 > From: "leizhang" > To: "=?utf-8?B?RmllbGRUcmlwIGRpc2N1c3Npb24gbGlzdA==?=" > > Subject: Re: [FieldTrip] can't find the ft_postf reesurferscript.sh > Message-ID: > Content-Type: text/plain; charset="utf-8" > > Thanks a lot! I find it. > > best, > Zhang Lei > > Sent from YoMail > > -------------- next part -------------- > An HTML attachment was scrubbed... > URL: > c25255/attachment-0001.html> > > ------------------------------ > > Subject: Digest Footer > > _______________________________________________ > fieldtrip mailing list > https://mailman.science.ru.nl/mailman/listinfo/fieldtrip > _______________________________________________ > fieldtrip mailing list > https://mailman.science.ru.nl/mailman/listinfo/fieldtrip > https://doi.org/10.1371/journal.pcbi.1002202 > > > ------------------------------ > > End of fieldtrip Digest, Vol 98, Issue 30 > ***************************************** From omerxsharon at gmail.com Sun Jan 27 15:10:15 2019 From: omerxsharon at gmail.com (Omer Sharon) Date: Sun, 27 Jan 2019 16:10:15 +0200 Subject: [FieldTrip] fieldtrip ram usage explodes since Matlab2019 Message-ID: Dear Fieldtrippers I recently upgrade my Matlab to 2018b, as a result my older fieldtrip version which I did not want to upgrade (20160326) did not work anymore (some wierd error was evoked already by ft_definetrials). Therefore I upgrade to a newer fieldtrip version (20181231). The code once perfectly worked is now exploding my 64GB RAM. I'm loading 89 trials of about 30sec each 1000Hz file (total size about 4Gb) from an MFF file. This used to work in the old version... I tried loading just one channel but the problem persists. It doesn't make any sense since the total size of the file is much lower. Did anyone encounter that problem? or have an idea? Great Thanks Omer -------------- next part -------------- An HTML attachment was scrubbed... URL: From aitor.martinezegurcegui at uzh.ch Sun Jan 27 17:14:00 2019 From: aitor.martinezegurcegui at uzh.ch (Aitor Egurtzegi) Date: Sun, 27 Jan 2019 17:14:00 +0100 Subject: [FieldTrip] automatic channel rejection In-Reply-To: References: Message-ID: <1c80e074-c18a-3903-1ef1-c6aa0427772a@uzh.ch> Hi Diego, Thanks for your message. Is it possible to reject the trials / channels by giving a list of indices to a function, just like when running ft_rejectcomponent, where you reject components by passing a list of the components to be rejected to the cfg.component method? Best, Aitor > Message: 2 > Date: Fri, 25 Jan 2019 13:59:49 +0100 > From: Diego Lozano-Soldevilla > To: FieldTrip discussion list > Subject: Re: [FieldTrip] automatic channel rejection > Message-ID: > > Content-Type: text/plain; charset="utf-8" > > Hi Aitor, > May be what you're looking for is "ft_artifact_threshold.m". That being > said, I don't recommend rejecting artifacts without visually inspecting the > data. Absolute threshold do not necessarily generalize across subjects > and/or experimental sessions. > I hope that helps, > Diego > > On Sun, 20 Jan 2019 at 17:45, Aitor Egurtzegi < > aitor.martinezegurcegui at uzh.ch> wrote: > >> Hi Diego, >> >> Thanks for the help. However, I was wondering if there is a way to >> reject artifacts without visually inspecting them. Like, from the manual >> you sent I see that I still would have to click on the trials / channels >> I would like to reject? Is there a way to script it based on some >> previously established parameters, without having to check all trials / >> channels for each participant? >> >> Best, >> Aitor >> >>> Date: Fri, 18 Jan 2019 16:47:17 +0100 >>> From: Diego Lozano-Soldevilla >>> To: FieldTrip discussion list >>> Subject: Re: [FieldTrip] automatic channel rejection >>> Message-ID: >>> < >> CAEVBUjij4o8J-U10rF4Oxfa9d81tE_BD3t81DcdSy-VQfeTnUA at mail.gmail.com> >>> Content-Type: text/plain; charset="utf-8" >>> >>> Hi Aitor, >>> Take a look at this >>> >> http://www.fieldtriptoolbox.org/tutorial/visual_artifact_rejection/#manual-artifact-rejection---display-a-summary >>> Best, >>> Diego >>> >>> On Fri, 18 Jan 2019 at 16:43, Aitor Egurtzegi < >>> aitor.martinezegurcegui at uzh.ch> wrote: >>> >>>> Dear Fieldtrip subscribers, >>>> >>>> I was wondering if anyone knew how to automatically reject bad channels >>>> in Fieldtrip, as it is done in EEGLAB based on e.g. kurtosis. Basically, >>>> I'm looking for the Fieldtrip equivalent of the EEGLAB function >>>> pop_rejchan. >>>> >>>> Many thanks in advance, >>>> Aitor >>>> >>>> _______________________________________________ >>>> 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 Sun Jan 27 21:05:33 2019 From: dlozanosoldevilla at gmail.com (Diego Lozano-Soldevilla) Date: Sun, 27 Jan 2019 21:05:33 +0100 Subject: [FieldTrip] automatic channel rejection In-Reply-To: <1c80e074-c18a-3903-1ef1-c6aa0427772a@uzh.ch> References: <1c80e074-c18a-3903-1ef1-c6aa0427772a@uzh.ch> Message-ID: Hi Aitor, Take a look to ft_selectdata.m Best, Diego On Sun, Jan 27, 2019, 18:10 Aitor Egurtzegi Hi Diego, > > Thanks for your message. Is it possible to reject the trials / channels > by giving a list of indices to a function, just like when running > ft_rejectcomponent, where you reject components by passing a list of the > components to be rejected to the cfg.component method? > > Best, > Aitor > > Message: 2 > > Date: Fri, 25 Jan 2019 13:59:49 +0100 > > From: Diego Lozano-Soldevilla > > To: FieldTrip discussion list > > Subject: Re: [FieldTrip] automatic channel rejection > > Message-ID: > > < > CAEVBUjiq4uriOg1pawV58eGhsBTUrzpB2KW9mweQWhEOkGi6kA at mail.gmail.com> > > Content-Type: text/plain; charset="utf-8" > > > > Hi Aitor, > > May be what you're looking for is "ft_artifact_threshold.m". That being > > said, I don't recommend rejecting artifacts without visually inspecting > the > > data. Absolute threshold do not necessarily generalize across subjects > > and/or experimental sessions. > > I hope that helps, > > Diego > > > > On Sun, 20 Jan 2019 at 17:45, Aitor Egurtzegi < > > aitor.martinezegurcegui at uzh.ch> wrote: > > > >> Hi Diego, > >> > >> Thanks for the help. However, I was wondering if there is a way to > >> reject artifacts without visually inspecting them. Like, from the manual > >> you sent I see that I still would have to click on the trials / channels > >> I would like to reject? Is there a way to script it based on some > >> previously established parameters, without having to check all trials / > >> channels for each participant? > >> > >> Best, > >> Aitor > >> > >>> Date: Fri, 18 Jan 2019 16:47:17 +0100 > >>> From: Diego Lozano-Soldevilla > >>> To: FieldTrip discussion list > >>> Subject: Re: [FieldTrip] automatic channel rejection > >>> Message-ID: > >>> < > >> CAEVBUjij4o8J-U10rF4Oxfa9d81tE_BD3t81DcdSy-VQfeTnUA at mail.gmail.com> > >>> Content-Type: text/plain; charset="utf-8" > >>> > >>> Hi Aitor, > >>> Take a look at this > >>> > >> > http://www.fieldtriptoolbox.org/tutorial/visual_artifact_rejection/#manual-artifact-rejection---display-a-summary > >>> Best, > >>> Diego > >>> > >>> On Fri, 18 Jan 2019 at 16:43, Aitor Egurtzegi < > >>> aitor.martinezegurcegui at uzh.ch> wrote: > >>> > >>>> Dear Fieldtrip subscribers, > >>>> > >>>> I was wondering if anyone knew how to automatically reject bad > channels > >>>> in Fieldtrip, as it is done in EEGLAB based on e.g. kurtosis. > Basically, > >>>> I'm looking for the Fieldtrip equivalent of the EEGLAB function > >>>> pop_rejchan. > >>>> > >>>> Many thanks in advance, > >>>> Aitor > >>>> > >>>> _______________________________________________ > >>>> 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 vale.nasato at gmail.com Mon Jan 28 09:04:51 2019 From: vale.nasato at gmail.com (Valentina Nasato) Date: Mon, 28 Jan 2019 09:04:51 +0100 Subject: [FieldTrip] KERNEL Message-ID: <5c4eb7a3.1c69fb81.b2d2c.6405@mx.google.com> Hello to everyone, By fieldtrip I obtained the direct model (FEM) and solved the inverse problem by eloreta and sloreta of EEG dataset. Now the data weights about 2 Gb. I wanted to calculate the kernel of the source just calculated in order to have a smaller file. I can not understand how to calculate the kernel from ' keepfilter', 'keep...' etc. put in input to ft_sourceanalysis. thanks for the helpfulness Valentina Translated with www.DeepL.com/Translator Inviato da Posta per Windows 10 -------------- next part -------------- An HTML attachment was scrubbed... URL: From iliazaharov at gmail.com Mon Jan 28 09:36:41 2019 From: iliazaharov at gmail.com (=?UTF-8?B?0JjQu9GM0Y8g0JfQsNGF0LDRgNC+0LI=?=) Date: Mon, 28 Jan 2019 11:36:41 +0300 Subject: [FieldTrip] cluster-based correlation on one-dimensional data Message-ID: Dear fieldtrip experts, We want to use FieldTrip toolbox to calculate cluster-based correlations between behavioural measure and power averaged for each channel. How should the design matrix for our kind of data look like? Also, if we have our own specific measure for each channel (calculated outside of FieldTrip), how can we use it for cluster-based permutations in a between-subject design? Best regards, -- Ilya Zakharov research associate Developmental Behavioral Genetics Lab Psychological Institute Russian Academy of Education -------------- next part -------------- An HTML attachment was scrubbed... URL: From dlozanosoldevilla at gmail.com Mon Jan 28 10:12:34 2019 From: dlozanosoldevilla at gmail.com (Diego Lozano-Soldevilla) Date: Mon, 28 Jan 2019 10:12:34 +0100 Subject: [FieldTrip] cluster-based correlation on one-dimensional data In-Reply-To: References: Message-ID: Hi Илья Захаров To compute cluster-based correlations please visit: http://www.fieldtriptoolbox.org/faq/how_can_i_test_for_correlations_between_neuronal_data_and_quantitative_stimulus_and_behavioural_variables/ http://www.fieldtriptoolbox.org/workshop/madrid2019/tutorial_stats/#5-compute-a-correlation-between-an-external-variable-and-the-power-spectrum To compute between-participants(trials) please visit: http://www.fieldtriptoolbox.org/tutorial/cluster_permutation_timelock/#between-trials-experiments http://www.fieldtriptoolbox.org/workshop/madrid2019/tutorial_stats/#2-compute--between-participants-contrasts I hope that helps, Diego On Mon, 28 Jan 2019 at 10:03, Илья Захаров wrote: > Dear fieldtrip experts, > > We want to use FieldTrip toolbox to calculate cluster-based correlations > between behavioural measure and power averaged for each channel. How should > the design matrix for our kind of data look like? Also, if we have our own > specific measure for each channel (calculated outside of FieldTrip), how > can we use it for cluster-based permutations in a between-subject design? > > Best regards, > > -- > Ilya Zakharov > research associate > Developmental Behavioral Genetics Lab > Psychological Institute > Russian Academy of Education > _______________________________________________ > 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 vale.nasato at gmail.com Mon Jan 28 14:46:43 2019 From: vale.nasato at gmail.com (Valentina Nasato) Date: Mon, 28 Jan 2019 14:46:43 +0100 Subject: [FieldTrip] inverse kernel of source Message-ID: <5c4f07c3.1c69fb81.b2d2c.cd9e@mx.google.com> Dears, by fieldtrip I have implemented on EEG data the direct problem (FEM) and the inverse problem using sLORETA and eLORETA. Now I would like to calculate the inverse kernel of the source obtained through ft_sourceanalysis. Which command should I add in the struct? thank you Valentina -------------- next part -------------- An HTML attachment was scrubbed... URL: From M.Wimber at bham.ac.uk Tue Jan 29 11:31:16 2019 From: M.Wimber at bham.ac.uk (Maria Wimber) Date: Tue, 29 Jan 2019 10:31:16 +0000 Subject: [FieldTrip] PhD position @MemoryBham Message-ID: The Memory Group Birmingham is currently recruiting a PhD student for a project led by Dr Maria Wimber. This is a 3-year PhD position fully funded by the ERC Starting Grant "STREAM - The Spatio-Temporal Representational Architecture of Memory". The candidate will work on a project investigating the neural dynamics of memory reconstruction, using multivariate analyses of electrophysiological and neuroimaging data, together with neural network modelling. Applications will be reviewed on a rolling basis, with a deadline is Feb 15th. For further details see here. Interested candidates should feel free to email m.wimber at bham.ac.uk directly including a CV and a short statement of interest. ---------------------- Maria Wimber, PhD Senior Lecturer School of Psychology University of Birmingham tel +44 121 4144659 www.memorybham.com/maria-wimber -------------- next part -------------- An HTML attachment was scrubbed... URL: From aitor.martinezegurcegui at uzh.ch Tue Jan 29 20:31:50 2019 From: aitor.martinezegurcegui at uzh.ch (Aitor Egurtzegi) Date: Tue, 29 Jan 2019 20:31:50 +0100 Subject: [FieldTrip] very large weight changes when running ICA Message-ID: <7651d1a4-bae2-490e-eccc-3dcde522586b@uzh.ch> Dear Fieldtrip community, I am running an ICA with the default parameters, only specifying cfg.method = 'runica', and I get the following, extremely large values for weight changes when running it. Is there a way to fix this? step 1 - lrate 0.000089, wchange 339727227227851.18750000, angledelta  0.0 deg Lowering learning rate to 6.38132e-05 and starting again. step 1 - lrate 0.000064, wchange 6691091255065.47558594, angledelta  0.0 deg Lowering learning rate to 4.59455e-05 and starting again. step 1 - lrate 0.000046, wchange 57360369209.21232605, angledelta 0.0 deg step 2 - lrate 0.000037, wchange 42285711168995.46093750, angledelta  0.0 deg Lowering learning rate to 2.64646e-05 and starting again. step 1 - lrate 0.000026, wchange 1597187.26777422, angledelta  0.0 deg step 2 - lrate 0.000026, wchange 1837915373349.00170898, angledelta  0.0 deg step 3 - lrate 0.000021, wchange 6356182039233.50097656, angledelta 89.8 deg step 4 - lrate 0.000015, wchange 327277436065.93859863, angledelta 44.6 deg step 5 - lrate 0.000012, wchange 256497271977.77600098, angledelta 86.4 deg step 6 - lrate 0.000009, wchange 94836930214915.39062500, angledelta 81.8 deg step 7 - lrate 0.000006, wchange 9813461305830484.00000000, angledelta 52.6 deg step 8 - lrate 0.000005, wchange 270943944736795648.00000000, angledelta 82.3 deg step 9 - lrate 0.000004, wchange 195304431631393856.00000000, angledelta 59.3 deg Thanks in advance, Aitor From pdhami06 at gmail.com Wed Jan 30 05:57:12 2019 From: pdhami06 at gmail.com (Paul Dhami) Date: Tue, 29 Jan 2019 23:57:12 -0500 Subject: [FieldTrip] Error: Could not determine the parametric critical value for clustering Message-ID: Dear FieldTrip community, I am attempting to compare the frequency values between two groups using freqstatistics, but I am running into this error below in regards to 'could not determine the parametric critical value for clustering'. Any help would be greatly appreciated as to how to solve this problem. MDD_vs_Controls_sp_lpfc_freq_mcc = ft_freqstatistics(cfg,ControlsSubj_sp_lpfc_freq{:}, MDDSubj_sp_lpfc_freq{:}) the call to "ft_selectdata" took 2 seconds and required the additional allocation of an estimated 2 MB using "ft_statistics_montecarlo" for the statistical testing using "ft_statfun_indepsamplesT" for the single-sample statistics constructing randomized design total number of measurements = 58 total number of variables = 1 number of independent variables = 1 number of unit variables = 0 number of within-cell variables = 0 number of control variables = 0 using a permutation resampling approach computing a parametric threshold for clustering Index exceeds the number of array elements (0). Error using ft_statistics_montecarlo (line 247) could not determine the parametric critical value for clustering Error in ft_freqstatistics (line 190) [stat, cfg] = statmethod(cfg, dat, design); Best, Paul -------------- next part -------------- An HTML attachment was scrubbed... URL: From stephen.whitmarsh at gmail.com Wed Jan 30 08:21:44 2019 From: stephen.whitmarsh at gmail.com (Stephen Whitmarsh) Date: Wed, 30 Jan 2019 08:21:44 +0100 Subject: [FieldTrip] Error: Could not determine the parametric critical value for clustering In-Reply-To: References: Message-ID: Dear Paul, Please supply the script that you used to call ft_freqstatistics, and a description of the data structures, otherwise it's very hard to give any advice. Best, Stephen On Wed, 30 Jan 2019 at 06:15, Paul Dhami wrote: > Dear FieldTrip community, > > I am attempting to compare the frequency values between two groups using > freqstatistics, but I am running into this error below in regards to 'could > not determine the parametric critical value for clustering'. > > Any help would be greatly appreciated as to how to solve this problem. > > MDD_vs_Controls_sp_lpfc_freq_mcc = > ft_freqstatistics(cfg,ControlsSubj_sp_lpfc_freq{:}, MDDSubj_sp_lpfc_freq{:}) > the call to "ft_selectdata" took 2 seconds and required the additional > allocation of an estimated 2 MB > using "ft_statistics_montecarlo" for the statistical testing > using "ft_statfun_indepsamplesT" for the single-sample statistics > constructing randomized design > total number of measurements = 58 > total number of variables = 1 > number of independent variables = 1 > number of unit variables = 0 > number of within-cell variables = 0 > number of control variables = 0 > using a permutation resampling approach > computing a parametric threshold for clustering > Index exceeds the number of array elements (0). > Error using ft_statistics_montecarlo (line 247) > could not determine the parametric critical value for clustering > > Error in ft_freqstatistics (line 190) > [stat, cfg] = statmethod(cfg, dat, design); > > Best, > Paul > _______________________________________________ > 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 404164884 at qq.com Wed Jan 30 09:16:06 2019 From: 404164884 at qq.com (=?gb18030?B?s8K/pbrG?=) Date: Wed, 30 Jan 2019 16:16:06 +0800 Subject: [FieldTrip] :Questions about source interpolate and source reconstruction for specific MNI coordinate Message-ID: Dear Fieldtripers, I tried to conduct source reconstruction and extract time series from specific MNI coordinate on MEG data, but I got some problems. I sorted my questions as follow: (1 In the process of constructing sourcemodel, firstly I conducted ‘ft_volumerealign’ (cfg.coordsys='4d') on subject MRI to define the position of LPA, RPA and nasion according to 4d/bti coordinate system. Then I conducted: cfg = []; cfg.output = ‘brain’; segmentedmri=ft_volumesegment(cfg,mri); I checked the segmentedmri but I saw the brain stem and part of spinal cord were also comprised in it (Fig.1 and Fig.2). I think this result may affect source reconstruction. So, is this result normal? Or did I do something incorrectly? (2 Next I used template-sourcemodel and subject-MRI to construct sourcemodel in MNI space. After I got subject headmodel and sourcemodel, I conducted ‘ft_prepare_leadfield’ and then ‘ft_sourceanalysis’. When I conducted ‘ft_soureinterpolate’ to interpolate this source on subject MRI and plot it, I saw some activation outside the brain, especially in brain stem and spinal cord. But the most important thing is when I interpolate source on template-MRI (spm8-T1.nii), the functional image and anatomical image do not match, the sagittal plane of functional image is plotted on the coronal plane of anatomical image, the transverse plane of functional image is plotted on the sagittal plane of anatomical image (Fig. 3). I have not conducted ‘ft_volumelookup’ and ‘ft_volumereslice’ in the process, is this the reason? Or did I do wrong step in the process? (3 I want to extract time series form specific ROI in MNI space according to MNI coordinate. And I prepare to do this by: norm = ft_volumenormalise([],mri); %normalise subject MRI to MNI space mnipos = [x y z]; %define ROI position in MNI space posback=ft_warp_apply(norm.params,mnipos,'sn2individual'); btipos= ft_warp_apply(pinv(norm.initial),posback); % position in individual coordinates Then conducted ‘ft_prepare_leadfield’ again for ROI only, and conducted ‘ft_sourceanalysis’. Can this process work? Thank you very much for your time and consideration. Looking forward to your reply. Best regards, Chan -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: Fig. 1.png Type: application/octet-stream Size: 265329 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: Fig. 2.png Type: application/octet-stream Size: 22899 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: Fig. 3.png Type: application/octet-stream Size: 183732 bytes Desc: not available URL: From pdhami06 at gmail.com Wed Jan 30 14:56:29 2019 From: pdhami06 at gmail.com (Paul Dhami) Date: Wed, 30 Jan 2019 08:56:29 -0500 Subject: [FieldTrip] Error: Could not determine the parametric critical value for clustering Message-ID: Dear Stephen, apologizes for not including that information. The data structure (e.g. ControlsSubj_sp_lpfc_freq) was created using: % frequency analysis cfg = []; cfg.output = 'powandcsd'; cfg.method = 'mtmconvol'; cfg.foi = 2:1:60; %40 cfg.t_ftimwin = 2 ./ cfg.foi; %length of the sliding time window in seconds cfg.tapsmofrq = 0.4 *cfg.foi; % smoothing increases with increase in freq cfg.toi = -1:0.01:1; % -0.4:0.01:0.4 dataSPfreq = ft_freqanalysis(cfg, dataSPfreq); %baseline correction cfg = []; cfg.baseline = [-1 -0.1]; %-0.4 cfg.baselinetype = 'db'; dataSPfreq = ft_freqbaseline(cfg, dataSPfreq); The call to freqstatistics is as follows: cfg = []; cfg.method = 'template'; % using template method cfg.template = 'Control_neighb.mat'; % specify type of template cfg.layout = 'quickcap64.mat'; % specify layout of sensors cfg.feedback = 'yes'; % show a neighbour plot neighbours = ft_prepare_neighbours(cfg, MDDSubj_sp_lpfc_freq{1}); cfg.channel = 'all'; cfg.latency = [0.01 1] ; cfg.frequency = 'all' ; cfg.parameter = 'powspctrm'; cfg.neighbours = neighbours; % defined as above cfg.method = 'montecarlo'; cfg.statistic = 'ft_statfun_indepsamplesT'; cfg.correcttail = 'alpha'; cfg.correctm = 'cluster'; %cfg.alpha = 0.05 cfg.numrandomization = 2000; cfg.minnbchan = 2; cfg.spmversion = 'spm12'; cfg.fsample = 1000; Nsub = length(ControlsSubj_sp_lpfc_freq) + length(MDDSubj_sp_lpfc_freq) ; cfg.design = []; cfg.design(1,1:Nsub) = [ones(1, length(ControlsSubj_sp_lpfc_freq)) (2*ones(1, length(MDDSubj_sp_lpfc_freq)))]; cfg.ivar = 1; % Resulting Cluster Corrected Permutation test % !!order of structures must follow that specified in the design matrix!! MDD_vs_Controls_sp_lpfc_freq_mcc = ft_freqstatistics(cfg,ControlsSubj_sp_lpfc_freq{:}, MDDSubj_sp_lpfc_freq{:}); It is after calling ft_freqstatistics that I get the error "Could not determine the parametric critical value for clustering". Any help would be greatly appreciated. Thank you, Paul -------------- next part -------------- An HTML attachment was scrubbed... URL: From stephen.whitmarsh at gmail.com Wed Jan 30 15:34:14 2019 From: stephen.whitmarsh at gmail.com (Stephen Whitmarsh) Date: Wed, 30 Jan 2019 15:34:14 +0100 Subject: [FieldTrip] Error: Could not determine the parametric critical value for clustering In-Reply-To: References: Message-ID: <07d401d4b8a8$dfce1af0$9f6a50d0$@gmail.com> Dear Paul, Thanks. Although I still can’t see how you got to the data that goes into your ft_freqstatistics (the variable names don’t match up), something is probably wrong with your first level-statistics. - Have you tried running your stats first without cluster corrections, i.e. cfg.method = ‘analytic’? I would do so (always) and first check the results. I suspect you’ll find something like only NaNs due to perhaps some wrong latencies, design, etc. Around line 244 ft_statistics_montecarlo tries to threshold your first-level statistics. You could also add a breakpoint there and see why it fails, but first running your first-level statistics might already clarify. - Just in case - make sure you empty your cfg before you set your parameters for ft_freqstatistics J HTH, Stephen From: fieldtrip On Behalf Of Paul Dhami Sent: Wednesday, January 30, 2019 2:56 PM To: fieldtrip at science.ru.nl Subject: Re: [FieldTrip] Error: Could not determine the parametric critical value for clustering Dear Stephen, apologizes for not including that information. The data structure (e.g. ControlsSubj_sp_lpfc_freq) was created using: % frequency analysis cfg = []; cfg.output = 'powandcsd'; cfg.method = 'mtmconvol'; cfg.foi = 2:1:60; %40 cfg.t_ftimwin = 2 ./ cfg.foi; %length of the sliding time window in seconds cfg.tapsmofrq = 0.4 *cfg.foi; % smoothing increases with increase in freq cfg.toi = -1:0.01:1; % -0.4:0.01:0.4 dataSPfreq = ft_freqanalysis(cfg, dataSPfreq); %baseline correction cfg = []; cfg.baseline = [-1 -0.1]; %-0.4 cfg.baselinetype = 'db'; dataSPfreq = ft_freqbaseline(cfg, dataSPfreq); The call to freqstatistics is as follows: cfg = []; cfg.method = 'template'; % using template method cfg.template = 'Control_neighb.mat'; % specify type of template cfg.layout = 'quickcap64.mat'; % specify layout of sensors cfg.feedback = 'yes'; % show a neighbour plot neighbours = ft_prepare_neighbours(cfg, MDDSubj_sp_lpfc_freq{1}); cfg.channel = 'all'; cfg.latency = [0.01 1] ; cfg.frequency = 'all' ; cfg.parameter = 'powspctrm'; cfg.neighbours = neighbours; % defined as above cfg.method = 'montecarlo'; cfg.statistic = 'ft_statfun_indepsamplesT'; cfg.correcttail = 'alpha'; cfg.correctm = 'cluster'; %cfg.alpha = 0.05 cfg.numrandomization = 2000; cfg.minnbchan = 2; cfg.spmversion = 'spm12'; cfg.fsample = 1000; Nsub = length(ControlsSubj_sp_lpfc_freq) + length(MDDSubj_sp_lpfc_freq) ; cfg.design = []; cfg.design(1,1:Nsub) = [ones(1, length(ControlsSubj_sp_lpfc_freq)) (2*ones(1, length(MDDSubj_sp_lpfc_freq)))]; cfg.ivar = 1; % Resulting Cluster Corrected Permutation test % !!order of structures must follow that specified in the design matrix!! MDD_vs_Controls_sp_lpfc_freq_mcc = ft_freqstatistics(cfg,ControlsSubj_sp_lpfc_freq{:}, MDDSubj_sp_lpfc_freq{:}); It is after calling ft_freqstatistics that I get the error "Could not determine the parametric critical value for clustering". Any help would be greatly appreciated. Thank you, Paul -------------- next part -------------- An HTML attachment was scrubbed... URL: From RICHARDS at mailbox.sc.edu Wed Jan 30 17:57:24 2019 From: RICHARDS at mailbox.sc.edu (RICHARDS, JOHN) Date: Wed, 30 Jan 2019 16:57:24 +0000 Subject: [FieldTrip] Postdoc position Message-ID: John Richards in the Department of Psychology at the University of South Carolina is seeking a qualified PhD for a postdoctoral position. The position involves research on the development of infant attention. The laboratory uses psychophysiological methods (heart rate, EEG, ERP) and MRI (structural) to examine the brain bases of the development of infant attention and recognition memory (http://jerlab.sc.edu). The position would be to further develop the "Neurodevelopmental MRI Database", work on analysis writeup of existing projects examining tools for cortical source analysis in infants, and analysis of current datasets on infant attention and brain development. The ideal candidate would have background neuroimaging such as EEG/ERP, structural MRI or fMRI, programming experience (MATLAB, FSL, EEGLab/ERPLab) and interests/background in infant cognition, perception, or attention. We also do some work on multimodal neuroimaging in adults (sMRI, dMRI, fMRI, EEG/ERP) and the candidate could either have relevant experience, or participate in these studies. Writing experience and a publication record is required; and extensive writing and publication will be expected. At the candidate's interest, teaching experiences are available. The position is initially funded for one year, and subsequent years will be available depending on funding. The position is available now and candidates could start immediately. The salary is set at NIH standards accounting for years of postdoctoral experience. The position could be extended to a "Research Assistant Professor" for a qualified candidate with a supplement source of support. Review of applications will begin immediately and continue until the position is filled. Materials should be submitted online to https://uscjobs.sc.edu/postings/51089; and also send a note or information to richards-john at sc.edu, John E. Richards, Department of Psychology, University of South Carolina, Columbia SC 29208. *********************************************** John E. Richards Carolina Distinguished Professor Department of Psychology University of South Carolina Columbia, SC 29208 Dept Phone: 803 777 2079 Fax: 803 777 9558 Email: richards-john at sc.edu https://jerlab.sc.edu ************************************************* -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: U of SC Richards Postdoc ad January 2018.docx Type: application/vnd.openxmlformats-officedocument.wordprocessingml.document Size: 14001 bytes Desc: U of SC Richards Postdoc ad January 2018.docx URL: From nemethd at gmail.com Thu Jan 31 10:24:10 2019 From: nemethd at gmail.com (Dezso Nemeth) Date: Thu, 31 Jan 2019 10:24:10 +0100 Subject: [FieldTrip] Postdoc in Lyon - Deadline approaching In-Reply-To: References: Message-ID: Postdoc Position in Lyon (Cognitive or Computational Neuroscience) Institution: Lyon Neuroscience Research Center (CRNL) Location: Lyon, France Application Due: 02/15/2019 Applications are invited for a highly motivated, enthusiastic postdoctoral researcher with a PhD in cognitive neuroscience (or related field) to join a well-supported, friendly research team, based in the internationally renowned Center for Research in Neuroscience in Lyon (University of Lyon, CRNS, INSERM). The postdoctoral position is part of a research project named REWIRING that is funded by IDEXLYON Fellowship. The postdoc will be embedded in the IDEXLYON team (PI: Dezso Nemeth) at CRNL, Lyon. Using methods of M/EEG, fMRI and non-invasive brain stimulation (e.g., TMS), the project aims to investigate how memory representations can be updated ('rewired') in the human brain. More specifically, we will investigate the entire process of how statistical and sequential regularities are extracted from the environment (memory formation), how the extracted knowledge is consolidated and how it can be rewired. For more details see the publications of Dezso Nemeth and Karolina Janacsek at http://nemethlab.com/publications/, and particularly the following paper: Szegedi-Hallgató, E., Janacsek, K., Vékony, T., Tasi, L. A., Kerepes, L., Hompoth, E. A., ... & Németh, D. (2017). Explicit instructions and consolidation promote rewiring of automatic behaviors in the human mind.?Scientific Reports,?7(1), 4365. The overall aim of Project REWIRING is to improve human learning and memory performance and boost rewiring of automatic behaviors. Within this project, the post-holder will be responsible for designing and carrying out experiments, analyzing data, and writing up manuscripts. Additionally, the postdoc will be closely involved in daily supervision of PhD and MSc students who work on the project. Profile (Person specification) - Candidates who only partially meet the following profile are nonetheless strongly encouraged to apply! - PhD in cognitive neuroscience or an adjacent field (psychological, biological, biomedical, or computer sciences, also physics and mathematics); - A strong academic track record including publications in leading (inter)disciplinary journals; - A strong interest for fundamental research in cognitive neurosciences; - Advanced computational and/or programming skills (Matlab, Python, or other languages); - Experience in functional connectivity analysis (EEG, MEG or MRI); - Experience and interest in training and supervising junior scientists; - Capacity to participate in an interdisciplinary and international research environment; - Excellent interpersonal and communication skills to effectively collaborate and communicate in academia; - A proactive and goal-directed attitude, good organizational skills; - Fluency in written and spoken English and motivation to learn French. Organization The project is embedded in the unique and excellent infrastructure of the CRNL - Center for Research in Neuroscience in Lyon. Researchers working on this theme jointly organize regular discussion meetings and lectures to promote integration of research conducted within systems, behavioral, and cognitive neurosciences. Read more about what it means?to work at CRNL: https://crnl.univ-lyon1.fr/index.php/en Employment conditions Salary will be in accordance with the relevant national labor agreement and based on research experience and qualifications. The earliest start date for this position is May 10 (later start possible upon agreement). Application We request applicants to send the following documents: 1) A cover letter briefly describing how their skills and experience meet the profile as set out in the person specification (max 1 page) 2) A research statement explaining their research interests in relation to Project REWIRING or to the PI’s publications (max 2 pages) 3) A recent CV and publication list 4) Two writing samples of the applicant's most significant work (published or unpublished manuscripts). 5) Contact information of three professional references. Information All additional information about the vacancy can be obtained from Dezso Nemeth, Principal Investigator, via nemeth at nemethlab.com. Submit your application to the following email address: hr at nemethlab.com APPLICATION INFORMATION Contact: hr at nemethlab.com Link: https://www.higheredjobs.com/faculty/details.cfm?JobCode=176890317 -------------- next part -------------- An HTML attachment was scrubbed... URL: From jorn at artinis.com Thu Jan 31 17:08:18 2019 From: jorn at artinis.com (=?iso-8859-2?Q?J=F6rn_M._Horschig?=) Date: Thu, 31 Jan 2019 17:08:18 +0100 Subject: [FieldTrip] ESR / PhD-student positions available Message-ID: <012601d4b97f$2f0d6860$8d283920$@artinis.com> Dear list, We from Artinis have exciting research projects, in which we have the opportunity for graduates to work with us as early stage researchers on the forefront of fNIRS development. We have three outstanding positions, two on algorithm development and one on hardware development. Envisioned starting date for all positions is this summer. More information on these positions can be found here: ESR position on extraction of physiological signals in clinical settings (in collaboration with University Centre Utrecht, Netherlands): https://euraxess.ec.europa.eu/jobs/375619 https://www.artinis.com/jobs-early-stage-researcher-doctoral-student-inf ans ESR position on machine learning on character traits and neuroeconomics (in collaboration with Donders Institute Nijmegen, Netherlands): https://euraxess.ec.europa.eu/jobs/364609 (still in review, page will be up soon) https://www.artinis.com/jobs-esr ESR position on fNIRS hardware development for clinical application (in collaboration with University Centre Utrecht, Netherlands): https://euraxess.ec.europa.eu/jobs/375632 https://www.artinis.com/jobs-early-stage-researcher-infans All three positions are part of different Marie-Curie Skłodowska international training networks, which means you will be embedded in a larger project, meet and collaborate with many interesting and smart people from different countries, and enjoy the benefits of both academic and industrial work life. We look forward to receiving your application and would welcome if you pass these open positions on to potentially interesting candidates. With kind regards, Jörn -- Jörn M. Horschig, PhD Software Manager & Project Leader Artinis Medical Systems | +31 481 350 980 A Einsteinweg 17 6662PW Elst The Netherlands T +31 481 350 980 I www.artinis.com The information in this e-mail is confidential and intended solely for the person to whom it is addressed. If this message is not addressed to you, please be aware that you have no authorization to read this e-mail, to copy it, to furnish it to any person other than the addressee, or to use or misuse its content in any way whatsoever. Should you have received this e-mail by mistake, please bring this to the attention of the sender, after which you are kindly requested to destroy the original message. Sign up for our NIRS newsletter Or meet us here: February 12-14, 2019 - 6th Israeli Conference on Cognition Research, Acre, Israel February 14-15, 2019 - 11th Annual Meeting of the Swiss Society of Sport Science, Freiburg, Switzerland February 20-22, 2019 - German Exercise Science and Training (GEST:19), Würzburg, Germany February 24-27, 2019 - 3rd International Brain Stimulation Conference, Vancouver, Canada March 7-9, 2019 - International Convention of Psychological Science (ICPS), Paris, France March 21-23, 2019 - Society for Research in Child Development (SRCD), Baltimore, Maryland, USA May 9-11, 2019 - Artscientific: 3rd Artinis symposium, Egmond aan Zee, The Netherlands May 28-June 1, 2019 - American College of Sports Medicine (ACSM), Orlando, Florida, USA July 3-6, 2019 - European College on Sport Science (ECSS), Prague, Czech Republic September 19-21, 2019 - Japanese Society of Physical Fitness and Sports Medicine, Tsukuba, Ibaragi, Japan -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image001.png Type: image/png Size: 9919 bytes Desc: not available URL: