From s.chettouf at vu.nl Wed Jun 1 14:04:20 2016 From: s.chettouf at vu.nl (Chettouf, S.) Date: Wed, 1 Jun 2016 12:04:20 +0000 Subject: [FieldTrip] Layout label ordering Message-ID: Dear field trip community, I want to make a layout for my EEG data measured with a 61-chan Easycap to make a plot with ft_multiplotTRF. My layout looks a lot like EasyCapM11.mat, only the order of channels differers completely. Do I have to correct for this order? Or is there some ‘label detection’? Kind regards, Sabrina Chettouf -------------- next part -------------- An HTML attachment was scrubbed... URL: From j.herring at donders.ru.nl Wed Jun 1 14:28:03 2016 From: j.herring at donders.ru.nl (Herring, J.D. (Jim)) Date: Wed, 1 Jun 2016 12:28:03 +0000 Subject: [FieldTrip] Layout label ordering In-Reply-To: References: Message-ID: <3D00B7615FB58D46A0B49B9AD67A33EB3DA02252@exprd01.hosting.ru.nl> Dear Sabrina, The ordering is not important as long as the labels in your data correspond to labels in the layout file. Best, Jim From: fieldtrip-bounces at science.ru.nl [mailto:fieldtrip-bounces at science.ru.nl] On Behalf Of Chettouf, S. Sent: Wednesday, June 01, 2016 2:04 PM To: fieldtrip at science.ru.nl Subject: [FieldTrip] Layout label ordering Dear field trip community, I want to make a layout for my EEG data measured with a 61-chan Easycap to make a plot with ft_multiplotTRF. My layout looks a lot like EasyCapM11.mat, only the order of channels differers completely. Do I have to correct for this order? Or is there some 'label detection'? Kind regards, Sabrina Chettouf -------------- next part -------------- An HTML attachment was scrubbed... URL: From jan.schoffelen at donders.ru.nl Wed Jun 1 14:56:18 2016 From: jan.schoffelen at donders.ru.nl (Schoffelen, J.M. (Jan Mathijs)) Date: Wed, 1 Jun 2016 12:56:18 +0000 Subject: [FieldTrip] Average referencing and demeaning prior to beamformer In-Reply-To: References: Message-ID: Hi Maris, > Question 1: after I combine the the two cut-out time windows to calculate the common filter, do I need to average reference the combined data set prior to calculating the beamformer filter? The referencing procedure operates across channels, not time points. Thus once the data has been average referenced (and as long as you don’t throw away channels in the mean time, or do something funky that affects the channel mixing, e.g. remove certain topographical patterns based on an ICA), the data does not need to be re-referenced anymore. > Question 2: Do I need to separately average reference each of the two cut-out windows prior to applying the beamformer on each of the cut-out data segments? See above, the rereferencing is independent of time. > Question 3 on demeaning: do the cut-out combined/separate time windows should also be demeaned or demeaning doesn't make any difference for beamformer source reconstruction? The LCMV beamformer requires a covariance matrix. This is generally constructed by the user with ft_timelockanalysis. Unless you specify otherwise, the data will be demeaned by default prior to the covariance computation. Best, Jan-Mathijs > > Thanks! > > Maris > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip From jim.f.cav at gmail.com Wed Jun 1 23:43:46 2016 From: jim.f.cav at gmail.com (Jim Cavanagh) Date: Wed, 1 Jun 2016 15:43:46 -0600 Subject: [FieldTrip] LCMV time window Message-ID: I get radically different outputs depending on the time window used for LCMV (primarily MEG, but also a bit with EEG). My data are sampled at 250 Hz, filtered .5 to 20 Hz, calculated as the percent change (sourcediff = (source A - source B) / source A). With 3 samples (12 ms), LCMV outcomes are uninterpretable (i.e. values of 100,000 % change). Increasing samples yield increasingly realistic values, especially at about 25 samples (100 ms). I presume this has to do with the covariance, especially since there doesn't appear to be much noise in the data. This is unfortunate since some of the ERF events that I'd like to capture are short-lived. 1) Does anyone have an explanation for this issue so I can account for it? 2) Or, barring that, feedback on an optimal way to determine temporal window size for LCMV? -- Jim Cavanagh Assistant Professor University of New Mexico https://sites.google.com/site/jcavanaghunm/home -------------- next part -------------- An HTML attachment was scrubbed... URL: From sarang at cfin.au.dk Thu Jun 2 12:05:56 2016 From: sarang at cfin.au.dk (Sarang S. Dalal) Date: Thu, 2 Jun 2016 10:05:56 +0000 Subject: [FieldTrip] LCMV time window In-Reply-To: References: Message-ID: <675C0D1B-3501-431E-B8F6-5AA54CAC915A@cfin.au.dk> Dear Jim, Indeed, 3 samples is much too few for constructing the beamformer filter —as you guessed, this results in a poor covariance estimate that is furthermore low-rank and therefore difficult to reliably invert. But, it is no matter, as you can construct the filter with your complete trial (perhaps 100ms as a minimum length), but examine the resulting time series (source.avg.mom) for whichever shorter intervals you are interested in. If you are not contrasting conditions, you may consider applying: cfg.lcmv.weightnorm = 'nai’; For reference, our group typically uses the following additional options for such data: cfg.lcmv.reducerank = 'no'; cfg.lcmv.fixedori = 'yes’; cfg.lcmv.projectnoise = 'yes'; It is so far undocumented, but our plotting tools in fieldtrip/contrib/nutmegtrip could help navigating the resulting source time series (in your path you’ll need: a full copy of SPM8, fieldtrip/contrib/nutmegtrip , and fieldtrip/template/atlas/aal ) cfg=[]; cfg.mripath = ‘yourmri.nii’; % or template MRI if voxel grid is in MNI space cfg.funparameter = 'avg.mom'; cfg.atlas = ft_read_atlas('ROI_MNI_V4.nii'); % AAL atlas (optional) nmt_sourceplot_spm8(cfg,ft_convert_units(source,'mm')); Cheers, Sarang On 01 Jun 2016, at 23:43, Jim Cavanagh > wrote: I get radically different outputs depending on the time window used for LCMV (primarily MEG, but also a bit with EEG). My data are sampled at 250 Hz, filtered .5 to 20 Hz, calculated as the percent change (sourcediff = (source A - source B) / source A). With 3 samples (12 ms), LCMV outcomes are uninterpretable (i.e. values of 100,000 % change). Increasing samples yield increasingly realistic values, especially at about 25 samples (100 ms). I presume this has to do with the covariance, especially since there doesn't appear to be much noise in the data. This is unfortunate since some of the ERF events that I'd like to capture are short-lived. 1) Does anyone have an explanation for this issue so I can account for it? 2) Or, barring that, feedback on an optimal way to determine temporal window size for LCMV? -- Jim Cavanagh Assistant Professor University of New Mexico https://sites.google.com/site/jcavanaghunm/home _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -------------- next part -------------- An HTML attachment was scrubbed... URL: From gmichael_ at hotmail.com Thu Jun 2 23:15:20 2016 From: gmichael_ at hotmail.com (george michael) Date: Thu, 2 Jun 2016 21:15:20 +0000 Subject: [FieldTrip] Morphing the single-subject minimum norm estimates into a common standard template mesh with FieldTrip Message-ID: Dear Fieldtrip Community, We are analysing the ERF with NeuromakElekta data and our goal is to do group-analysis on the minimum norm estimates corresponding to the ERF data. We have combined the use of freesurfer and MNE to segment the individual MRI-images, etc, and create the cortical meshes (subj-oct-6-src.fif). Coregistration of MRI-MEG data was also done with those tools. We have used FieldTrip to process the functional data and estimate the minimum norm estimates in the individual subject space. Does somebody have a suggestion for how to morph the single-subject minimum norm estimates into a common standard template using FieldTrip? (i.e. cortex_8196.surf.gii) The goal would be to do group analysis in the common space. Thanks in advance. Best Regards, Giorgos Michail Research Assistant Department of Neurology Charite Medical University, Berlin -------------- next part -------------- An HTML attachment was scrubbed... URL: From jan.schoffelen at donders.ru.nl Fri Jun 3 09:26:58 2016 From: jan.schoffelen at donders.ru.nl (Schoffelen, J.M. (Jan Mathijs)) Date: Fri, 3 Jun 2016 07:26:58 +0000 Subject: [FieldTrip] Morphing the single-subject minimum norm estimates into a common standard template mesh with FieldTrip In-Reply-To: References: Message-ID: <22E6347B-83AD-4295-87D8-9AB67F575522@donders.ru.nl> Dear Giorgos, I’d recommend using hcp-workbench or Caret. Caret is the predecessor of hcp-workbench and not actively maintained anymore, but the procedure should still work. It’s documented here: http://brainvis.wustl.edu/wiki/index.php/Caret:Operations/Freesurfer_to_fs_LR Better still would be to adopt the state of the art, and use hcp-workbench in combination with the appropriate parts of the following script: https://github.com/Washington-University/Pipelines/blob/master/PostFreeSurfer/scripts/FreeSurfer2CaretConvertAndRegisterNonlinear.sh This latter option is probably a bit more tricky to adapt to your situation. Best, Jan-Mathijs On 02 Jun 2016, at 23:15, george michael > wrote: Dear Fieldtrip Community, We are analysing the ERF with NeuromakElekta data and our goal is to do group-analysis on the minimum norm estimates corresponding to the ERF data. We have combined the use of freesurfer and MNE to segment the individual MRI-images, etc, and create the cortical meshes (subj-oct-6-src.fif). Coregistration of MRI-MEG data was also done with those tools. We have used FieldTrip to process the functional data and estimate the minimum norm estimates in the individual subject space. Does somebody have a suggestion for how to morph the single-subject minimum norm estimates into a common standard template using FieldTrip? (i.e. cortex_8196.surf.gii) The goal would be to do group analysis in the common space. Thanks in advance. Best Regards, Giorgos Michail Research Assistant Department of Neurology Charite Medical University, Berlin _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -------------- next part -------------- An HTML attachment was scrubbed... URL: From Markus.Butz at uni-duesseldorf.de Fri Jun 3 14:31:06 2016 From: Markus.Butz at uni-duesseldorf.de (Markus Butz) Date: Fri, 03 Jun 2016 14:31:06 +0200 Subject: [FieldTrip] =?utf-8?q?PostDoc_and_PhD_position_in_D=C3=BCsseldorf?= In-Reply-To: <22E6347B-83AD-4295-87D8-9AB67F575522@donders.ru.nl> References: <22E6347B-83AD-4295-87D8-9AB67F575522@donders.ru.nl> Message-ID: Dear Fieldtrip community, please find attached a job offer for 1 PostDoc and 1 PhD positon in Düsseldorf, Germany available from 1st of July 2016 or until filled. The initial appointment is for 2-3 years (postdoc) or 3 years (PhD student). Both are within the project "Spontaneous brain activity in healthy subjects and Parkinson's disease” and supervised by Prof. Esther Florin. For mor information, please contact Esther directly: esther.florin at med.uni-duesseldorf.de Best wishes, Markus -------------- next part -------------- A non-text attachment was scrubbed... Name: position_duesseldorf.pdf Type: application/pdf Size: 95269 bytes Desc: not available URL: From carine.signoret at liu.se Fri Jun 3 15:36:20 2016 From: carine.signoret at liu.se (Carine Signoret) Date: Fri, 3 Jun 2016 15:36:20 +0200 Subject: [FieldTrip] trigger info Message-ID: <1033a0e9-1eb8-9fc4-469a-86abca565412@liu.se> Dear all, I would like to know if the fact to dowmsample the data before running ICA would imply that I will loose the trigger information? Thank you for your help, -- Carine. -------------------------------------------------- Carine Signoret, Ph.D. Linnaeus Centre HEAD Swedish Institute for Disability Research Department of Behavioral Sciences and Learning Linköping University Campus Valla, I-huset:114 581 83 Linköping Sweden Phone: +46(0)13 28 21 88 Email: carine.signoret at liu.se -------------------------------------------------- -------------- next part -------------- An HTML attachment was scrubbed... URL: From alexander_nakhnikian at hms.harvard.edu Sat Jun 4 00:03:56 2016 From: alexander_nakhnikian at hms.harvard.edu (Alexander Nakhnikian) Date: Fri, 3 Jun 2016 18:03:56 -0400 Subject: [FieldTrip] Strange DICS Results Message-ID: <06b736d6-17ea-9f68-3c97-c0c8fb4fbb39@hms.harvard.edu> Hello all, I'm hitting a wall in my analysis trying to source-localize EEG data in a visual task. I'm trying to localize the 8 to 15 Hz power. Unfortunately, I don't have individual electrode coordinates or sMRIs so I've had to create an electrode coordinate file and manually align it with the scalp in FT's template head. I'm using the standard BEM as the head model and the standard MRI instead of individual structural scans. I'm able to get reasonable results from ft_freqanalysis; importantly, they match the scalp topography we see using other programs, such as IDL. The problem is that when I try to localize these data with DICS, I get absurd results. The source localized power exceeds 3000 at some locations and the maxima are in strange places, such as behind the eye socket and near the base of the skull. When I run ft_sourceinterpolate I get the following warning: Warning: could not reshape freq to the expected dimensions > In ft_datatype_volume (line 136) In ft_checkdata (line 329) In ft_sourceinterpolate (line 163) Otherwise, no errors or warning messages come up. I'm not sure what's causing the odd results. Am I not using the template files correctly? I've included analysis setup below. Thanks in advance, Alexander cfg = []; cfg.method = 'mtmfft'; cfg.output = 'powandcsd'; cfg.tapsmofrq = 4; cfg.foilim = [12 12]; freqData = ft_freqanalysis(cfg,data); cfg = []; cfg.grid.xgrid = 'auto'; cfg.grid.ygrid = 'auto';cfg.grid.zgrid = 'auto'; cfg.resolution = 5; %units are mm cfg.method = 'dics'; cfg.dics.normalize = 'yes'; cfg.headmodel = vol; %from loading 'standard_bem.mat' cfg.elec = elec_aligned; %electrode coordinates (MNI) aligned to template head sources = ft_sourceanalysis(cfg,freqData); cfg = []; cfg.downsample = 2; cfg.parameter = 'pow'; sourcesInt = ft_sourceinterpolate(cfg,sources,mri); %mri from 'standard_mri.mat' in FT's templates cfg = []; cfg.method = 'slice'; cfg.parameter = 'pow; ft_sourceplot(cfg,sourcesInt) -- Alexander Nakhnikian, Ph.D. Postdoctoral Fellow Clinical Research Training Program VA Boston Healthcare System Harvard Medical School From litvak.vladimir at gmail.com Mon Jun 6 12:10:48 2016 From: litvak.vladimir at gmail.com (Vladimir Litvak) Date: Mon, 6 Jun 2016 11:10:48 +0100 Subject: [FieldTrip] New MEG Analysis/Large Data Postdoc job at CUBRIC Message-ID: ---------- Forwarded message ---------- From: Krish Singh Date: Mon, Jun 6, 2016 at 10:57 AM Subject: [megcommunity] New MEG Analysis/Large Data Postdoc job at CUBRIC To: MEGCOMMUNITY at jiscmail.ac.uk Dear All, re: Research Associate in Multi-site MEG Data Cohort Management & Analysis Closing date: 18th June 2016 We are seeking a Research Associate, experienced in Neuroimaging/Electrophysiological cohort data, for a 2-year position supporting the establishment of a multi-site database of normative Magnetoencephalographic (MEG) data, collected across all UK MEG laboratories, and the development of common analysis and management pipelines for mining this resource. The data is already collected and will represent one of the largest and most valuable electrophysiological data cohorts to be freely available to the international community. The post will be based at the Cardiff University Brain Research Imaging Centre (CUBRIC), part of the School of Psychology at Cardiff University, but will involve tight integration with the eight Universities within an MRC-funded MEG Partnership grant. For full details and how to apply: http://www.jobs.ac.uk/job/ANV075/research-associate-in-multi-site-meg-data-cohort-management-and-analysis/ Best Wishes, Krish -- Prof. Krish Singh CUBRIC School of Psychology / Ysgol Seicoleg Cardiff University / Prifysgol Caerdydd Maindy Road / Cardiff / Caerdydd CF24 4HQ, UK Tel / Ffôn: 02920 874690 / 870365 Fax / Ffacs: 02920 870339 Email / Ebost : singhkd at cardiff.ac.uk From seymourr at aston.ac.uk Tue Jun 7 18:54:11 2016 From: seymourr at aston.ac.uk (Seymour, Robert (Research Student)) Date: Tue, 7 Jun 2016 16:54:11 +0000 Subject: [FieldTrip] trigger info Message-ID: Hi Cai -------------- next part -------------- An HTML attachment was scrubbed... URL: From amickan1990 at gmail.com Tue Jun 7 19:24:25 2016 From: amickan1990 at gmail.com (Anne Mickan) Date: Tue, 7 Jun 2016 19:24:25 +0200 Subject: [FieldTrip] Error using ft_prepare_neighbours Message-ID: Dear all, I'm doing permutation tests, for which I wrote a script a while ago, which worked nicely back then, but now gives me the following error when I run the ft_prepare_neighbours function: Error: Undefined function or variable 'hasdata'. I'm assuming that this means that the function does not properly access the data structure that I give it. I just don't know why and how to fix it, given that the very same script worked about half a year ago. I have updated my version to Matlab 2016a in the meantime, but all other things stayed the same. To give you a better idea, here is what my data looks like for one participant: Data{1} avg: [34x600 double] time: [1x600 double] fsample: '500' label: {34x1 cell} dimord: 'chan_time' dof: [34x600 double] var: [34x600 double] I have data for 21 participants. Here is the part of the script up until the prepare neighbours function, Correct and Incorrect being the respective datasets for my two conditions: cfg = []; cfg.channel = 'all'; cfg.latency = 'all'; cfg.parameter = 'avg'; % prepare neighbouring channels cfg_neighb = []; cfg_neighb.method = 'triangulation'; cfg_neighb.channel = 'all'; cfg_neighb.feedback = 'yes'; cfg_neighb.layout = 'easycapCustomMSC.mat'; cfg_neighb.neighbourdist = 0.2; neighbours = ft_prepare_neighbours(cfg_neighb, Correct{1}); I hope this is enough information to help me out. Thanks in advance, Anne -------------- next part -------------- An HTML attachment was scrubbed... URL: From jan.schoffelen at donders.ru.nl Tue Jun 7 20:12:53 2016 From: jan.schoffelen at donders.ru.nl (Schoffelen, J.M. (Jan Mathijs)) Date: Tue, 7 Jun 2016 18:12:53 +0000 Subject: [FieldTrip] Error using ft_prepare_neighbours In-Reply-To: References: Message-ID: <034DFF5E-1EEE-4F7D-BB74-7D745E5467BA@donders.ru.nl> Hi Anne, I believe that this issue has been fixed a while ago. If I check the latest version of the code on https://github.com/fieldtrip/fieldtrip/blob/master/ft_prepare_neighbours.m it looks fine to me. In particular, in line 94 the variable hasdata is explicitly defined. Could you please upgrade to the most recent version of Fieldtrip and try again? Best wishes, Jan-Mathijs On 07 Jun 2016, at 19:24, Anne Mickan > wrote: Dear all, I'm doing permutation tests, for which I wrote a script a while ago, which worked nicely back then, but now gives me the following error when I run the ft_prepare_neighbours function: Error: Undefined function or variable 'hasdata'. I'm assuming that this means that the function does not properly access the data structure that I give it. I just don't know why and how to fix it, given that the very same script worked about half a year ago. I have updated my version to Matlab 2016a in the meantime, but all other things stayed the same. To give you a better idea, here is what my data looks like for one participant: Data{1} avg: [34x600 double] time: [1x600 double] fsample: '500' label: {34x1 cell} dimord: 'chan_time' dof: [34x600 double] var: [34x600 double] I have data for 21 participants. Here is the part of the script up until the prepare neighbours function, Correct and Incorrect being the respective datasets for my two conditions: cfg = []; cfg.channel = 'all'; cfg.latency = 'all'; cfg.parameter = 'avg'; % prepare neighbouring channels cfg_neighb = []; cfg_neighb.method = 'triangulation'; cfg_neighb.channel = 'all'; cfg_neighb.feedback = 'yes'; cfg_neighb.layout = 'easycapCustomMSC.mat'; cfg_neighb.neighbourdist = 0.2; neighbours = ft_prepare_neighbours(cfg_neighb, Correct{1}); I hope this is enough information to help me out. Thanks in advance, Anne _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -------------- next part -------------- An HTML attachment was scrubbed... URL: From h.cecotti at ulster.ac.uk Wed Jun 8 18:32:26 2016 From: h.cecotti at ulster.ac.uk (Cecotti, Hubert) Date: Wed, 8 Jun 2016 16:32:26 +0000 Subject: [FieldTrip] realtime buffer problem Message-ID: Hello, I am trying to use the realtime buffer on windows 7 (64 bits). I get the following message: Invalid MEX-file 'E:\fieldtrip-20160607\realtime\src\buffer\matlab\buffer.mexw64': The specified module could not be found. (the file seems to work when it is accessed directly through the fieldtrip functions (e.g. ft_read..., but alone it doesn't work) Trying to recompile the file, I get: mex buffer.c Building with 'Microsoft Visual C++ 2015 Professional (C)'. Error using mex buffer.c E:\fieldtrip-20160607\realtime\src\buffer\matlab\buffer.c(12): fatal error C1083: Cannot open include file: 'buffer.h': No such file or directory buffer.h is however in : E:\fieldtrip-20160607\realtime\src\buffer\src , so I don't know how the files are mixed, and how to proceed. Please advise. Regards, Hubert ________________________________ This email and any attachments are confidential and intended solely for the use of the addressee and may contain information which is covered by legal, professional or other privilege. If you have received this email in error please notify the system manager at postmaster at ulster.ac.uk and delete this email immediately. Any views or opinions expressed are solely those of the author and do not necessarily represent those of Ulster University. The University's computer systems may be monitored and communications carried out on them may be recorded to secure the effective operation of the system and for other lawful purposes. Ulster University does not guarantee that this email or any attachments are free from viruses or 100% secure. Unless expressly stated in the body of a separate attachment, the text of email is not intended to form a binding contract. Correspondence to and from the University may be subject to requests for disclosure by 3rd parties under relevant legislation. The University of Ulster was founded by Royal Charter in 1984 and is registered with company number RC000726 and VAT registered number GB672390524.The primary contact address for Ulster University in Northern Ireland is Cromore Road, Coleraine, Co. Londonderry BT52 1SA -------------- next part -------------- An HTML attachment was scrubbed... URL: From r.thomas at nin.knaw.nl Wed Jun 8 23:41:27 2016 From: r.thomas at nin.knaw.nl (Rajat Thomas) Date: Wed, 8 Jun 2016 21:41:27 +0000 Subject: [FieldTrip] Transformation from MNI to Native: OF POINTS? Message-ID: <1465422086827.19947@nin.knaw.nl> Dear Fieldtrippers, I have the forward and the inverse deformation field after a segmentation. Now I have some points in MNI coordinates (x,y,z positions). How can find its analog in native space? Thanks in advance. Rajat Rajat Mani Thomas Social Brain Lab Netherlands Institute for Neuroscience Amsterdam -------------- next part -------------- An HTML attachment was scrubbed... URL: From alexander_nakhnikian at hms.harvard.edu Thu Jun 9 00:12:46 2016 From: alexander_nakhnikian at hms.harvard.edu (Alexander Nakhnikian) Date: Wed, 8 Jun 2016 18:12:46 -0400 Subject: [FieldTrip] Transformation from MNI to Native: OF POINTS? In-Reply-To: <1465422086827.19947@nin.knaw.nl> References: <1465422086827.19947@nin.knaw.nl> Message-ID: <1e144453-1f56-8ece-e7c8-2f0d547b28e6@hms.harvard.edu> Dear Rajat, This function might be what you're looking for: http://www.fieldtriptoolbox.org/reference/ft_convert_coordsys Best, Alexander On 6/8/16 5:41 PM, Rajat Thomas wrote: > > Dear Fieldtrippers, > > > I have the forward and the inverse deformation field after a > segmentation. > > > Now I have some points in MNI coordinates (x,y,z positions). How can > find its analog in native space? > > > Thanks in advance. > > Rajat > > > > > Rajat Mani Thomas > Social Brain Lab > Netherlands Institute for Neuroscience > Amsterdam > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -- Alexander Nakhnikian, Ph.D. Postdoctoral Fellow Clinical Research Training Program VA Boston Healthcare System Harvard Medical School -------------- next part -------------- An HTML attachment was scrubbed... URL: From dr.nivethida at gmail.com Thu Jun 9 01:15:46 2016 From: dr.nivethida at gmail.com (nivethida t) Date: Wed, 8 Jun 2016 19:15:46 -0400 Subject: [FieldTrip] statistics for imaginary coherence Message-ID: Hi all, I am trying to do statistical testing for the difference in imaginary coherence between 2 subject groups. Following the tutorial, I was able to perform the ft_freqstatistics for the power spectrum using the output from freqgrandaverage. If I have to run similar statistics for imaginary coherence data, what should be my input for ft_freqstatistics since freqgrandaverage does not work for cohspctrm? Or is there a different statistics function for coherence? Thanks, Nivethida -- Dr.Nivethida Thirugnanasambandam, Postdoctoral Visiting Fellow, Human Motor Control Section, National Institute of Neurological Disorders and Stroke, National Institutes of Health, Building 10, 7D42, 10 Center Drive, MSC 1428 Bethesda, MD 20892 - 1428 Ph: +1-301-402-6231 -------------- next part -------------- An HTML attachment was scrubbed... URL: From dr.nivethida at gmail.com Thu Jun 9 03:23:30 2016 From: dr.nivethida at gmail.com (nivethida t) Date: Wed, 8 Jun 2016 21:23:30 -0400 Subject: [FieldTrip] design matrix Message-ID: Hi all, My study has 2 subject groups (n=15/group) with each performing 4 different tasks. What would be my design matrix to perform statistics on TFA data? Thanks, Nivethida -- Dr.Nivethida Thirugnanasambandam, Postdoctoral Visiting Fellow, Human Motor Control Section, National Institute of Neurological Disorders and Stroke, National Institutes of Health, Building 10, 7D42, 10 Center Drive, MSC 1428 Bethesda, MD 20892 - 1428 Ph: +1-301-402-6231 -------------- next part -------------- An HTML attachment was scrubbed... URL: From jan.schoffelen at donders.ru.nl Thu Jun 9 09:27:09 2016 From: jan.schoffelen at donders.ru.nl (Schoffelen, J.M. (Jan Mathijs)) Date: Thu, 9 Jun 2016 07:27:09 +0000 Subject: [FieldTrip] statistics for imaginary coherence In-Reply-To: References: Message-ID: <50D7AC75-7AA2-47B0-B1FC-6803B8A99DFC@donders.ru.nl> Hi Nivethida, You can circumvent the use of ft_freqgrandaverage using cell-arrays (each data structure a single cell represents a subject). (+ cfg.parameter=‘cohspctrm’) e.g. ft_freqstatistics(cfg, data1{:}, data2{:}); Best, Jan-Mathijs > On 09 Jun 2016, at 01:15, nivethida t wrote: > > Hi all, > I am trying to do statistical testing for the difference in imaginary coherence between 2 subject groups. Following the tutorial, I was able to perform the ft_freqstatistics for the power spectrum using the output from freqgrandaverage. > If I have to run similar statistics for imaginary coherence data, what should be my input for ft_freqstatistics since freqgrandaverage does not work for cohspctrm? Or is there a different statistics function for coherence? > > Thanks, > Nivethida > > > > -- > Dr.Nivethida Thirugnanasambandam, > Postdoctoral Visiting Fellow, > Human Motor Control Section, > National Institute of Neurological Disorders and Stroke, > National Institutes of Health, > Building 10, 7D42, > 10 Center Drive, MSC 1428 > Bethesda, MD 20892 - 1428 > Ph: +1-301-402-6231 > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip From jan.schoffelen at donders.ru.nl Thu Jun 9 09:27:41 2016 From: jan.schoffelen at donders.ru.nl (Schoffelen, J.M. (Jan Mathijs)) Date: Thu, 9 Jun 2016 07:27:41 +0000 Subject: [FieldTrip] design matrix In-Reply-To: References: Message-ID: I guess that this depends on your null hypothesis… Best, Jan-Mathijs > On 09 Jun 2016, at 03:23, nivethida t wrote: > > Hi all, > My study has 2 subject groups (n=15/group) with each performing 4 different tasks. What would be my design matrix to perform statistics on TFA data? > > Thanks, > Nivethida > > -- > Dr.Nivethida Thirugnanasambandam, > Postdoctoral Visiting Fellow, > Human Motor Control Section, > National Institute of Neurological Disorders and Stroke, > National Institutes of Health, > Building 10, 7D42, > 10 Center Drive, MSC 1428 > Bethesda, MD 20892 - 1428 > Ph: +1-301-402-6231 > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip From kramerrobin92 at gmail.com Thu Jun 9 11:03:15 2016 From: kramerrobin92 at gmail.com (Robin Kramer) Date: Thu, 9 Jun 2016 11:03:15 +0200 Subject: [FieldTrip] Importing B-Alert X10 data Message-ID: ​ 000222000.010616.103900.Events.edf ​​ 000222000.010616.103900.Signals.Raw.edf ​Hello, Recently we started a research with a new wearable EEG system called the B-Alert X-10 from Advanced Brain Monitoring. ABM does deliver their own analyzing software and it is compatible with EEGLab but not with Fieldtrip. Has anyone attempted to analyze the B-Alert data via FieldTrip already? The way data is stored is rather odd actually. The data is epoched in every second, with 256 samples (Fs = 256) in each epoch for each channel. In other words, there are as much separate trials as there are seconds. After preprocessing, and some manual labour I could rearrange the epochs and make the data continuous, but then I encountered two challenges. First, the event markers are stored in a different EDF file. Therefore, I have to define my own trial function, but the event-marker data is also stored rather oddly. Second, it seems that fieldtrip cannot segment any data after preprocessing with ft_definetrials(). Sadly, before preprocessing the B-Alert data is in the strange format. Is there a workaround? I have send a link with the two EDF files, in case one would like to inspect them themselves. Thank you so much. Best regards, Robin Kramer Student MSc Human-Machine Communication University of Groningen, the Netherlands -------------- next part -------------- An HTML attachment was scrubbed... URL: From azeez.adebimpe5 at gmail.com Thu Jun 9 11:28:37 2016 From: azeez.adebimpe5 at gmail.com (Azeez Adebimpe) Date: Thu, 9 Jun 2016 11:28:37 +0200 Subject: [FieldTrip] Importing B-Alert X10 data In-Reply-To: References: Message-ID: if it is compatible with EEGLAB, you can use *eeglab2fieldtrip *to convert the data to fieldtrip format if you are interested in doing analysis with fieldtrip. *Az* On Thu, Jun 9, 2016 at 11:03 AM, Robin Kramer wrote: > ​ > 000222000.010616.103900.Events.edf > > ​​ > 000222000.010616.103900.Signals.Raw.edf > > ​Hello, > > Recently we started a research with a new wearable EEG system called the > B-Alert X-10 from Advanced Brain Monitoring. ABM does deliver their own > analyzing software and it is compatible with EEGLab but not with Fieldtrip. > Has anyone attempted to analyze the B-Alert data via FieldTrip already? > > The way data is stored is rather odd actually. The data is epoched in > every second, with 256 samples (Fs = 256) in each epoch for each channel. > In other words, there are as much separate trials as there are seconds. > After preprocessing, and some manual labour I could rearrange the epochs > and make the data continuous, but then I encountered two challenges. > > First, the event markers are stored in a different EDF file. Therefore, I > have to define my own trial function, but the event-marker data is also > stored rather oddly. > Second, it seems that fieldtrip cannot segment any data after > preprocessing with ft_definetrials(). Sadly, before preprocessing the > B-Alert data is in the strange format. Is there a workaround? I have send a > link with the two EDF files, in case one would like to inspect them > themselves. > > Thank you so much. > > Best regards, > > Robin Kramer > Student MSc Human-Machine Communication > University of Groningen, the Netherlands > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > -------------- next part -------------- An HTML attachment was scrubbed... URL: From r.oostenveld at donders.ru.nl Thu Jun 9 13:08:25 2016 From: r.oostenveld at donders.ru.nl (Robert Oostenveld) Date: Thu, 9 Jun 2016 13:08:25 +0200 Subject: [FieldTrip] Importing B-Alert X10 data In-Reply-To: References: Message-ID: <99FA4D49-15F4-4BB9-BD30-C24853A486B0@donders.ru.nl> Hi Robin In terms of segmenting data after it having been read into memory, the following procedure works: 1) ft_preprocessing, without specifying cfg.trl or trialfun -> this reads the data as a single segment (i.e. one very long trial) 2) ft_definetrial, with cfg.trialfun, which could get events from another file -> this results in cfg.trl 3) ft_redefinetrial which takes the trl from step 2 and the continuous data from step 1. With regards to the data format: the files are plain EDF and as such supported by FieldTrip out the box. E.g. >> cfg = [] >> cfg.dataset = '000222000.010616.103900.Events.edf' >> ft_databrowser(cfg) >> hdr = ft_read_header(cfg.dataset) hdr = Fs: 1000 nChans: 1 label: {'EDF Annotations'} nSamples: 13000 nSamplesPre: 0 nTrials: 1 orig: [1x1 struct] chantype: {'unknown'} chanunit: {'unknown'} and >> cfg = [] >> cfg.dataset = '000222000.010616.103900.Signals.Raw.edf' >> ft_databrowser(cfg) >> hdr = ft_read_header(cfg.dataset) Warning: channels with different sampling rate not supported, using a subselection of 10 channels at 256.000000 Hz > In read_edf (line 330) In ft_read_header (line 678) hdr = Fs: 256 nChans: 10 label: {10x1 cell} nSamples: 1145600 nSamplesPre: 0 nTrials: 1 orig: [1x1 struct] chantype: {10x1 cell} chanunit: {10x1 cell} However, non-standard is to have the events in a separate file. Furthermore, the data file has channels with variable sampling rate, which is also not (by default) supported. See http://www.fieldtriptoolbox.org/getting_started/edf and http://www.fieldtriptoolbox.org/reference/edf2fieldtrip. Looking at the Events channel, I do think that you’ll need a separate trialfun anyway. From the Signals.Raw I see >> hdr.orig.Label ans = ECG POz Fz Cz C3 C4 F3 F4 P3 P4 ESUTimestamp SystemTimestamp Tilt X Tilt Y Tilt Z EDF Annotations which means that the annotations also seem to be present in the data file itself and the separate Event file might not be needed. With >> data = edf2fieldtrip('000222000.010616.103900.Signals.Raw.edf') Warning: channels with different sampling rate not supported, using a subselection of 10 channels at 256.000000 Hz > In read_edf (line 330) In ft_read_header (line 678) In edf2fieldtrip (line 36) reading 1 channels with 8 Hz sampling rate reading 3 channels with 128 Hz sampling rate reading 10 channels with 256 Hz sampling rate reading 1 channels with 512 Hz sampling rate reading 1 channels with 1024 Hz sampling rate upsampling 1 channels from 8 to 1024 Hz the input is raw data with 1 channels and 1 trials the call to "ft_selectdata" took 0 seconds and required the additional allocation of an estimated 3 MB resampling data resampling data in trial 1 from 1 original sampling rate = 8 Hz new sampling rate = 1024 Hz the call to "ft_resampledata" took 1 seconds and required the additional allocation of an estimated 146 MB upsampling 3 channels from 128 to 1024 Hz the input is raw data with 3 channels and 1 trials the call to "ft_selectdata" took 0 seconds and required the additional allocation of an estimated 1 MB resampling data resampling data in trial 1 from 1 original sampling rate = 128 Hz new sampling rate = 1024 Hz the call to "ft_resampledata" took 1 seconds and required the additional allocation of an estimated 165 MB upsampling 10 channels from 256 to 1024 Hz the input is raw data with 10 channels and 1 trials the call to "ft_selectdata" took 0 seconds and required the additional allocation of an estimated 1 MB resampling data resampling data in trial 1 from 1 original sampling rate = 256 Hz new sampling rate = 1024 Hz the call to "ft_resampledata" took 2 seconds and required the additional allocation of an estimated 507 MB upsampling 1 channels from 512 to 1024 Hz the input is raw data with 1 channels and 1 trials the call to "ft_selectdata" took 0 seconds and required the additional allocation of an estimated 2 MB resampling data resampling data in trial 1 from 1 original sampling rate = 512 Hz new sampling rate = 1024 Hz the call to "ft_resampledata" took 0 seconds and required the additional allocation of an estimated 105 MB input dataset 1, 1 channels, 1 trials input dataset 2, 3 channels, 1 trials input dataset 3, 10 channels, 1 trials input dataset 4, 1 channels, 1 trials input dataset 5, 1 channels, 1 trials concatenating the channels within each trial the call to "ft_appenddata" took 1 seconds and required the additional allocation of an estimated 560 MB adding the comment: reordered the channels to the original order in the EDF file the call to "ft_annotate" took 0 seconds and required the additional allocation of an estimated 463 MB data = label: {16x1 cell} trial: {[16x4582400 double]} time: {[1x4582400 double]} fsample: 1024 cfg: [1x1 struct] But then >> cfg = []; >> cfg.viewmode = 'vertical'; >> ft_databrowser(cfg, data) shows that the EDF Annotations channel (after upsampling) has been slightly messed up (due to filters). Perhaps it can still be of use. Otherwise I also would not directly know how to link the two files to each other, as the sampling rates are very incompatible (1000 in one, and powers of 2 in the other). Perhaps you can learn something from the EEGLAB code. Good luck with the data Robert > On 09 Jun 2016, at 11:03, Robin Kramer wrote: > > ​ >  000222000.010616.103900.Events.edf ​​ >  000222000.010616.103900.Signals.Raw.edf ​Hello, > > Recently we started a research with a new wearable EEG system called the B-Alert X-10 from Advanced Brain Monitoring. ABM does deliver their own analyzing software and it is compatible with EEGLab but not with Fieldtrip. Has anyone attempted to analyze the B-Alert data via FieldTrip already? > > The way data is stored is rather odd actually. The data is epoched in every second, with 256 samples (Fs = 256) in each epoch for each channel. In other words, there are as much separate trials as there are seconds. After preprocessing, and some manual labour I could rearrange the epochs and make the data continuous, but then I encountered two challenges. > > First, the event markers are stored in a different EDF file. Therefore, I have to define my own trial function, but the event-marker data is also stored rather oddly. > Second, it seems that fieldtrip cannot segment any data after preprocessing with ft_definetrials(). Sadly, before preprocessing the B-Alert data is in the strange format. Is there a workaround? I have send a link with the two EDF files, in case one would like to inspect them themselves. > > Thank you so much. > > Best regards, > > Robin Kramer > Student MSc Human-Machine Communication > University of Groningen, the Netherlands > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -------------- next part -------------- An HTML attachment was scrubbed... URL: From joseluisblues at gmail.com Fri Jun 10 10:42:39 2016 From: joseluisblues at gmail.com (Jose) Date: Fri, 10 Jun 2016 10:42:39 +0200 Subject: [FieldTrip] running FT scripts in a supercomputing cluster Message-ID: dear list, I'm trying to analyse CTF MEG data through the Flemish Supercomputer Centre, I did a matlab script to run the foremost FT functions in my pipeline (ft_read_event, read_ctf_cls, and ft_preprocessing). This script works well when I run it locally. To compile my function in the supercomputing cluster I initially used addpath to include FT and ft_defaults to set the configuration inside my script, but this wasn't working. I tried using a startup.m script but this doesn't work neither. Maybe I'm missing something? My bash script to compile looks like this: #!/bin/bash module load MATLAB/2013b FTDIR=$VSC_DATA_VO_USER/fieldtrip-20160317 mcc -mv FT_0.m I also tried mcc -mv FT_0.m -I $FTDIR I run my compilation in the same folder where I have the FT folder. When I run my bash job I get always the same error: Undefined function 'ft_read_event' for input arguments of type 'char'. I've been looking elsewhere but still I haven't find a solution, Any hints about this would really appreciated, best, Jose -------------- next part -------------- An HTML attachment was scrubbed... URL: From jan.schoffelen at donders.ru.nl Fri Jun 10 11:11:30 2016 From: jan.schoffelen at donders.ru.nl (Schoffelen, J.M. (Jan Mathijs)) Date: Fri, 10 Jun 2016 09:11:30 +0000 Subject: [FieldTrip] running FT scripts in a supercomputing cluster In-Reply-To: References: Message-ID: Hi Jose, Have you tried to explicitly add all required (sub)directories with the -a option? Something like mcc …. -a $FTDIR/fileio -a $FTDIR/… -a $FTDIR/etc It’s been a while that I have tried to compile some stuff myself, but I remember that back then I remember that I needed to instruct mcc with a list of directories explicitly Best, Jan-Mathijs > On 10 Jun 2016, at 10:42, Jose wrote: > > dear list, > > I'm trying to analyse CTF MEG data through the Flemish Supercomputer Centre, > I did a matlab script to run the foremost FT functions in my pipeline (ft_read_event, read_ctf_cls, and ft_preprocessing). This script works well when I run it locally. To compile my function in the supercomputing cluster I initially used addpath to include FT and ft_defaults to set the configuration inside my script, but this wasn't working. I tried using a startup.m script but this doesn't work neither. Maybe I'm missing something? My bash script to compile looks like this: > > #!/bin/bash > module load MATLAB/2013b > FTDIR=$VSC_DATA_VO_USER/fieldtrip-20160317 > mcc -mv FT_0.m > > I also tried mcc -mv FT_0.m -I $FTDIR > I run my compilation in the same folder where I have the FT folder. > When I run my bash job I get always the same error: Undefined function 'ft_read_event' for input arguments of type 'char'. > > I've been looking elsewhere but still I haven't find a solution, > > Any hints about this would really appreciated, > best, > Jose > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip From s.chettouf at vu.nl Fri Jun 10 11:19:49 2016 From: s.chettouf at vu.nl (Chettouf, S.) Date: Fri, 10 Jun 2016 09:19:49 +0000 Subject: [FieldTrip] Layout label ordering Message-ID: Dear Jim, Thanks for the answer. Could you please also tell me what the function of ‘SCALE’ is using the function ft_multiplotTRF? Plotting a colorbar seems more logic to me, but it’s not possible to delete this ’SCALE’ function. So probably it is handy for something? All the best, Sabrina From: > on behalf of "Herring, J.D. (Jim)" > Reply-To: FieldTrip discussion list > Date: Wednesday 1 June 2016 at 14:28 To: FieldTrip discussion list > Subject: Re: [FieldTrip] Layout label ordering Dear Sabrina, The ordering is not important as long as the labels in your data correspond to labels in the layout file. Best, Jim From: fieldtrip-bounces at science.ru.nl [mailto:fieldtrip-bounces at science.ru.nl] On Behalf Of Chettouf, S. Sent: Wednesday, June 01, 2016 2:04 PM To: fieldtrip at science.ru.nl Subject: [FieldTrip] Layout label ordering Dear field trip community, I want to make a layout for my EEG data measured with a 61-chan Easycap to make a plot with ft_multiplotTRF. My layout looks a lot like EasyCapM11.mat, only the order of channels differers completely. Do I have to correct for this order? Or is there some ‘label detection’? Kind regards, Sabrina Chettouf -------------- next part -------------- An HTML attachment was scrubbed... URL: From jan.schoffelen at donders.ru.nl Fri Jun 10 11:27:22 2016 From: jan.schoffelen at donders.ru.nl (Schoffelen, J.M. (Jan Mathijs)) Date: Fri, 10 Jun 2016 09:27:22 +0000 Subject: [FieldTrip] Strange DICS Results In-Reply-To: <06b736d6-17ea-9f68-3c97-c0c8fb4fbb39@hms.harvard.edu> References: <06b736d6-17ea-9f68-3c97-c0c8fb4fbb39@hms.harvard.edu> Message-ID: <0E3F135B-285F-4E9A-ADAE-0800879FCC51@donders.ru.nl> Hi Alex, >From what you describe I think that your results are suffering from numerical issues in the forward model. Once a source location (grid point) is close to the innermost boundary of the BEM, funky things may happen with respect to the computed leadfield, which obviously has large consequences for the shape of the beamformer spatial filter at that location. Best thing would be verify that indeed your ‘absurd’ voxels are near the edges, and mask them out. As a side note, typically volumetric DICS results in isolation (i.e using a single condition) are hard to interpret (even when using normalization). Best, Jan-Mathijs > On 04 Jun 2016, at 00:03, Alexander Nakhnikian wrote: > > Hello all, > > I'm hitting a wall in my analysis trying to source-localize EEG data in a visual task. I'm trying to localize the 8 to 15 Hz power. > > Unfortunately, I don't have individual electrode coordinates or sMRIs so I've had to create an electrode coordinate file and manually align it with the scalp in FT's template head. I'm using the standard BEM as the head model and the standard MRI instead of individual structural scans. > > I'm able to get reasonable results from ft_freqanalysis; importantly, they match the scalp topography we see using other programs, such as IDL. > > The problem is that when I try to localize these data with DICS, I get absurd results. The source localized power exceeds 3000 at some locations and the maxima are in strange places, such as behind the eye socket and near the base of the skull. > > When I run ft_sourceinterpolate I get the following warning: > > Warning: could not reshape freq to the expected dimensions > > In ft_datatype_volume (line 136) > In ft_checkdata (line 329) > In ft_sourceinterpolate (line 163) > > Otherwise, no errors or warning messages come up. I'm not sure what's causing the odd results. Am I not using the template files correctly? I've included analysis setup below. > > Thanks in advance, > > Alexander > > > > cfg = []; > cfg.method = 'mtmfft'; > cfg.output = 'powandcsd'; > cfg.tapsmofrq = 4; > cfg.foilim = [12 12]; > freqData = ft_freqanalysis(cfg,data); > > cfg = []; > cfg.grid.xgrid = 'auto'; cfg.grid.ygrid = 'auto';cfg.grid.zgrid = 'auto'; > cfg.resolution = 5; %units are mm > cfg.method = 'dics'; > cfg.dics.normalize = 'yes'; > cfg.headmodel = vol; %from loading 'standard_bem.mat' > cfg.elec = elec_aligned; %electrode coordinates (MNI) aligned to template head > sources = ft_sourceanalysis(cfg,freqData); > > cfg = []; > cfg.downsample = 2; > cfg.parameter = 'pow'; > sourcesInt = ft_sourceinterpolate(cfg,sources,mri); %mri from 'standard_mri.mat' in FT's templates > > cfg = []; > cfg.method = 'slice'; > cfg.parameter = 'pow; > ft_sourceplot(cfg,sourcesInt) > > > > > > -- > Alexander Nakhnikian, Ph.D. > Postdoctoral Fellow > Clinical Research Training Program > VA Boston Healthcare System > Harvard Medical School > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip From ha438 at georgetown.edu Fri Jun 10 14:57:19 2016 From: ha438 at georgetown.edu (Hassan Aleem) Date: Fri, 10 Jun 2016 08:57:19 -0400 Subject: [FieldTrip] simulated/sample data set for beamforming Message-ID: Hi all, I have a pipeline for beamforming but I am getting unexpected results from my own data, for the sake of sanity I wanted to run some simulated data to see what I get. I am looking to do a timelockanalysis with the LCMV method, so can't use the tutorial data. Would appreciate any help! Best, Hassan -------------- next part -------------- An HTML attachment was scrubbed... URL: From ariel.chang at yale.edu Fri Jun 10 19:57:24 2016 From: ariel.chang at yale.edu (Chang, Ariel) Date: Fri, 10 Jun 2016 17:57:24 +0000 Subject: [FieldTrip] Equating power spectral density Message-ID: <238AE44B-36EF-405D-89C8-4DA67FD1FAD6@yale.edu> Hi all, I don’t quite understand the effects of tapering for power estimates. I have resting data segmented into 2 second epochs. With the following parameters, could someone explain how to equate the data’s power spectral density back to it’s original spectral density (in the for loop)? cfg.method = 'mtmfft'; cfg.taper = 'dpss' cfg.polyremoval = 1; cfg.tapsmofrq = 1; cfg.foilim = [2 80]; cfg.pad= 100; data2 = eeglab2fieldtrip(EEG, 'preprocessing'); sizedat = size(EEG.data); for i = 1:sizedat(3) data2.trial{i} = data2.trial{i}*10; End [freq2] = ft_freqanalysis(cfg, data2); Thanks in advance! Best, Ariel -------------- next part -------------- An HTML attachment was scrubbed... URL: From alexander_nakhnikian at hms.harvard.edu Sat Jun 11 00:44:18 2016 From: alexander_nakhnikian at hms.harvard.edu (Alexander Nakhnikian) Date: Fri, 10 Jun 2016 18:44:18 -0400 Subject: [FieldTrip] Strange DICS Results In-Reply-To: <0E3F135B-285F-4E9A-ADAE-0800879FCC51@donders.ru.nl> References: <06b736d6-17ea-9f68-3c97-c0c8fb4fbb39@hms.harvard.edu> <0E3F135B-285F-4E9A-ADAE-0800879FCC51@donders.ru.nl> Message-ID: <49c2d60d-00f4-3d82-0d6d-ea2e1640fac0@hms.harvard.edu> Hi Jan-Mathijs, Thank you for your reply. Since I posted my original question on the forum, I tried applying eLORETA to the same data set and the sensor-level power localizes to the locations we expect given the scalp topography. Would the issues you discuss have the same effect on both localization methods or would beamformers be more susceptible to errors in the forward model? Best, Alexander On 6/10/16 5:27 AM, Schoffelen, J.M. (Jan Mathijs) wrote: > Hi Alex, > > From what you describe I think that your results are suffering from numerical issues in the forward model. Once a source location (grid point) is close to the innermost boundary of the BEM, funky things may happen with respect to the computed leadfield, which obviously has large consequences for the shape of the beamformer spatial filter at that location. Best thing would be verify that indeed your ‘absurd’ voxels are near the edges, and mask them out. > As a side note, typically volumetric DICS results in isolation (i.e using a single condition) are hard to interpret (even when using normalization). > > Best, > Jan-Mathijs > >> On 04 Jun 2016, at 00:03, Alexander Nakhnikian wrote: >> >> Hello all, >> >> I'm hitting a wall in my analysis trying to source-localize EEG data in a visual task. I'm trying to localize the 8 to 15 Hz power. >> >> Unfortunately, I don't have individual electrode coordinates or sMRIs so I've had to create an electrode coordinate file and manually align it with the scalp in FT's template head. I'm using the standard BEM as the head model and the standard MRI instead of individual structural scans. >> >> I'm able to get reasonable results from ft_freqanalysis; importantly, they match the scalp topography we see using other programs, such as IDL. >> >> The problem is that when I try to localize these data with DICS, I get absurd results. The source localized power exceeds 3000 at some locations and the maxima are in strange places, such as behind the eye socket and near the base of the skull. >> >> When I run ft_sourceinterpolate I get the following warning: >> >> Warning: could not reshape freq to the expected dimensions >>> In ft_datatype_volume (line 136) >> In ft_checkdata (line 329) >> In ft_sourceinterpolate (line 163) >> >> Otherwise, no errors or warning messages come up. I'm not sure what's causing the odd results. Am I not using the template files correctly? I've included analysis setup below. >> >> Thanks in advance, >> >> Alexander >> >> >> >> cfg = []; >> cfg.method = 'mtmfft'; >> cfg.output = 'powandcsd'; >> cfg.tapsmofrq = 4; >> cfg.foilim = [12 12]; >> freqData = ft_freqanalysis(cfg,data); >> >> cfg = []; >> cfg.grid.xgrid = 'auto'; cfg.grid.ygrid = 'auto';cfg.grid.zgrid = 'auto'; >> cfg.resolution = 5; %units are mm >> cfg.method = 'dics'; >> cfg.dics.normalize = 'yes'; >> cfg.headmodel = vol; %from loading 'standard_bem.mat' >> cfg.elec = elec_aligned; %electrode coordinates (MNI) aligned to template head >> sources = ft_sourceanalysis(cfg,freqData); >> >> cfg = []; >> cfg.downsample = 2; >> cfg.parameter = 'pow'; >> sourcesInt = ft_sourceinterpolate(cfg,sources,mri); %mri from 'standard_mri.mat' in FT's templates >> >> cfg = []; >> cfg.method = 'slice'; >> cfg.parameter = 'pow; >> ft_sourceplot(cfg,sourcesInt) >> >> >> >> >> >> -- >> Alexander Nakhnikian, Ph.D. >> Postdoctoral Fellow >> Clinical Research Training Program >> VA Boston Healthcare System >> Harvard Medical School >> >> _______________________________________________ >> fieldtrip mailing list >> fieldtrip at donders.ru.nl >> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -- Alexander Nakhnikian, Ph.D. Postdoctoral Fellow Clinical Research Training Program VA Boston Healthcare System Harvard Medical School From alexander_nakhnikian at hms.harvard.edu Sat Jun 11 19:38:32 2016 From: alexander_nakhnikian at hms.harvard.edu (Alexander Nakhnikian) Date: Sat, 11 Jun 2016 13:38:32 -0400 Subject: [FieldTrip] simulated/sample data set for beamforming In-Reply-To: References: Message-ID: <41ec6c01-246a-9b8a-3679-05e7f0e114ec@hms.harvard.edu> Hi Hassan, I also got some strange results from beamforming, although I was using DICS, not LCMV. I'm working with EEG data so I don't know if we're using the same recording setup. Jan-Mathijs suggested that there might be problems with the forward model that are influencing the shape of the beamformer. You can look at our exchange if it's still in your inbox. Regarding modeling, I think fieldtrip has programs to simulated sensors given a particular dipole distribution but I haven't used them. Another approach would be to save the leadfields and apply them to a simulated matrix of source-level oscillators. Set most of the "sources" to random noise and place sinusoids with a known frequency and high SNR at only a few locations (don't use identical oscillators for each source since beamformers lose spatial resolution for strongly correlated sources). I haven't tried this in fieldtrip, but I was able to do it with brainstorm and the "dipoles" showed up at the correct locations when I applied an inverse model to the simulated sensor data. Best, Alexander On 6/10/16 8:57 AM, Hassan Aleem wrote: > Hi all, > > I have a pipeline for beamforming but I am getting unexpected results > from my own data, for the sake of sanity I wanted to run some > simulated data to see what I get. I am looking to do a > timelockanalysis with the LCMV method, so can't use the tutorial data. > Would appreciate any help! > > Best, > > Hassan > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -- Alexander Nakhnikian, Ph.D. Postdoctoral Fellow Clinical Research Training Program VA Boston Healthcare System Harvard Medical School -------------- next part -------------- An HTML attachment was scrubbed... URL: From v.piai.research at gmail.com Sat Jun 11 20:50:32 2016 From: v.piai.research at gmail.com (=?UTF-8?Q?Vit=c3=b3ria_Piai?=) Date: Sat, 11 Jun 2016 20:50:32 +0200 Subject: [FieldTrip] help diagnosing issues with source analysis (pathological brain) Message-ID: <575C5D78.7030807@gmail.com> Hi everyone, I was hoping someone could help me figure out where my source analysis is going wrong. I have data on brain tumour patients (MRIs are from prior to tumour resection). From the hospital (using CTF), I receive .mri files that already have fiducial points saved as far as I was told. I then reslice and segment the .mri file, after reading it with ft_read_mri mri_reslice = ft_volumereslice([], mri); segmentedmri = ft_volumesegment([], mri_reslice); This seems to be working: Plotting headmodel and sensors, it looks like they are aligned: If I compute the source model with MNI-warping (non-linear transformation), I get something that doesn't seem right. I don't know if this is because these are not normal brains to start with: With linear transformation, things look better: One of my questions is what the consequences are of using linear transformation for the MNI warping given the pathological nature of these brains. Then, the next issue is this result when projecting the source to the surface: This happens regardless of whether I use the MNI-warped grid interpolated to the MNI template, or the patient's individual grid skipping the MNI normalisation step, interpolated to the patient's own T1. But if I plot with 'ortho' method, then I see that the MNI-warped and interpolated source data is misaligned, but the patient-native space one isn't. I can't make sense of this anymore; I've been trying all kinds of things that don't work, so I was wondering whether anyone has an idea of what could be going on by looking at these figures. Is it an error already at the level of alignment of the fiducials? Or is it due to the MNI-warping? Or a combination of issues? Thanks very much for any kind of help! Vitoria -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: bfejiccb.png Type: image/png Size: 75399 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: jidhfdhd.png Type: image/png Size: 4722 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: ebfighdf.png Type: image/png Size: 9956 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: ehffjdea.png Type: image/png Size: 10561 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: dffeehgc.png Type: image/png Size: 274137 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: dcigdbdi.png Type: image/png Size: 150070 bytes Desc: not available URL: From michelic72 at gmail.com Sun Jun 12 13:55:42 2016 From: michelic72 at gmail.com (Cristiano Micheli) Date: Sun, 12 Jun 2016 13:55:42 +0200 Subject: [FieldTrip] help diagnosing issues with source analysis (pathological brain) In-Reply-To: <575C5D78.7030807@gmail.com> References: <575C5D78.7030807@gmail.com> Message-ID: Dear Vitoria I had the same problem when I tried to coregister functional and anatomical data without transitioning through a head-referenced coordinates system. I solved the problem by using ft_volumerealign and selecting comparable anatomical fiducials for different subjects (nasion, left, right,..) BEFORE volume normalization. Maybe a hint towards the solution? Cheers Cris On Sat, Jun 11, 2016 at 8:50 PM, Vitória Piai wrote: > Hi everyone, > > I was hoping someone could help me figure out where my source analysis is > going wrong. > I have data on brain tumour patients (MRIs are from prior to tumour > resection). From the hospital (using CTF), I receive .mri files that > already have fiducial points saved as far as I was told. I then reslice and > segment the .mri file, after reading it with ft_read_mri > mri_reslice = ft_volumereslice([], mri); > segmentedmri = ft_volumesegment([], mri_reslice); > This seems to be working: > > > Plotting headmodel and sensors, it looks like they are aligned: > > If I compute the source model with MNI-warping (non-linear > transformation), I get something that doesn't seem right. I don't know if > this is because these are not normal brains to start with: > > With linear transformation, things look better: > > One of my questions is what the consequences are of using linear > transformation for the MNI warping given the pathological nature of these > brains. > > Then, the next issue is this result when projecting the source to the > surface: > > This happens regardless of whether I use the MNI-warped grid interpolated > to the MNI template, or the patient's individual grid skipping the MNI > normalisation step, interpolated to the patient's own T1. > But if I plot with 'ortho' method, then I see that the MNI-warped and > interpolated source data is misaligned, but the patient-native space one > isn't. > > > I can't make sense of this anymore; I've been trying all kinds of things > that don't work, so I was wondering whether anyone has an idea of what > could be going on by looking at these figures. Is it an error already at > the level of alignment of the fiducials? Or is it due to the MNI-warping? > Or a combination of issues? > > Thanks very much for any kind of help! > Vitoria > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: dcigdbdi.png Type: image/png Size: 150070 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: ehffjdea.png Type: image/png Size: 10561 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: dffeehgc.png Type: image/png Size: 274137 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: jidhfdhd.png Type: image/png Size: 4722 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: ebfighdf.png Type: image/png Size: 9956 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: bfejiccb.png Type: image/png Size: 75399 bytes Desc: not available URL: From sauer.mpih at googlemail.com Sun Jun 12 20:24:17 2016 From: sauer.mpih at googlemail.com (Andreas Sauer) Date: Sun, 12 Jun 2016 20:24:17 +0200 Subject: [FieldTrip] Coordsys issue ft_sourceplot Message-ID: Dear all, after having calculated the sources of a MMN paradigm (4D-system), I’d like to plot the results on one of the anatomy template files in the fieldtrip directory (single_subj_T1_1mm.nii) or alternatively on a MNI T1 template file (mni_icbm152_t1_tal_nlin_sym_09a.nii). Unfortunately, this is not working well… As you can see on the attached picture, the functional data is rotated by 90 degrees. I guess that something gets mixed because of the different coordsystems of functional and anatomical data. The functional data is 4D, which means ALS orientation. The anatomical is MNI, so RAS orientation. The plotting works fine, if I use a mri file which was converted in field trip (V2.mri) and therefore is also in ALS orientation. However, the anatomy doesn’t look very pretty… Is there any way that I can transform the functional data to RAS orientation or the anatomical data to ALS orientation, respectively? I tried with ft_volumerealign. However, since the template file has no fiducials, it is hard to really precisely do this. Any input on how to plot the sources on one of these nice anatomical files is highly appreciated! Thanks and best regards, Andreas -- Dipl.-Psych. Andreas Sauer Max Planck Institute for Brain Research Deutschordenstraße 46 60528 Frankfurt am Main Germany T: +49 69 96769 278 F: +49 69 96769 327 Email: sauer.mpih at gmail.com www.brain.mpg.de -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: Rotated_Source.png Type: image/png Size: 498781 bytes Desc: not available URL: From v.piai.research at gmail.com Mon Jun 13 11:02:11 2016 From: v.piai.research at gmail.com (Vitoria Piai) Date: Mon, 13 Jun 2016 11:02:11 +0200 Subject: [FieldTrip] help diagnosing issues with source analysis (pathological brain) In-Reply-To: References: <575C5D78.7030807@gmail.com> Message-ID: Hi Cris, that makes sense, except that the .mri file I'm getting from the hospital should already contain the right fiducial coordinates (or so I was told by the MEG technician). Maybe the issue is that FieldTrip is not getting these coordinates right from the .mri file if I don't run it through ft_volumerealign first. Any thoughts anyone? Thanks again On 12 June 2016 at 13:55, Cristiano Micheli wrote: > Dear Vitoria > > I had the same problem when I tried to coregister functional and > anatomical data without transitioning through a head-referenced coordinates > system. > I solved the problem by using ft_volumerealign and selecting comparable > anatomical fiducials for different subjects (nasion, left, right,..) BEFORE > volume normalization. > > Maybe a hint towards the solution? > > Cheers > Cris > > > On Sat, Jun 11, 2016 at 8:50 PM, Vitória Piai > wrote: > >> Hi everyone, >> >> I was hoping someone could help me figure out where my source analysis is >> going wrong. >> I have data on brain tumour patients (MRIs are from prior to tumour >> resection). From the hospital (using CTF), I receive .mri files that >> already have fiducial points saved as far as I was told. I then reslice and >> segment the .mri file, after reading it with ft_read_mri >> mri_reslice = ft_volumereslice([], mri); >> segmentedmri = ft_volumesegment([], mri_reslice); >> This seems to be working: >> >> >> Plotting headmodel and sensors, it looks like they are aligned: >> >> If I compute the source model with MNI-warping (non-linear >> transformation), I get something that doesn't seem right. I don't know if >> this is because these are not normal brains to start with: >> >> With linear transformation, things look better: >> >> One of my questions is what the consequences are of using linear >> transformation for the MNI warping given the pathological nature of these >> brains. >> >> Then, the next issue is this result when projecting the source to the >> surface: >> >> This happens regardless of whether I use the MNI-warped grid interpolated >> to the MNI template, or the patient's individual grid skipping the MNI >> normalisation step, interpolated to the patient's own T1. >> But if I plot with 'ortho' method, then I see that the MNI-warped and >> interpolated source data is misaligned, but the patient-native space one >> isn't. >> >> >> I can't make sense of this anymore; I've been trying all kinds of things >> that don't work, so I was wondering whether anyone has an idea of what >> could be going on by looking at these figures. Is it an error already at >> the level of alignment of the fiducials? Or is it due to the MNI-warping? >> Or a combination of issues? >> >> Thanks very much for any kind of help! >> Vitoria >> >> _______________________________________________ >> fieldtrip mailing list >> fieldtrip at donders.ru.nl >> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip >> > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: jidhfdhd.png Type: image/png Size: 4722 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: ebfighdf.png Type: image/png Size: 9956 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: bfejiccb.png Type: image/png Size: 75399 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: dffeehgc.png Type: image/png Size: 274137 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: dcigdbdi.png Type: image/png Size: 150070 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: ehffjdea.png Type: image/png Size: 10561 bytes Desc: not available URL: From hibafouani123 at hotmail.com Mon Jun 13 18:32:06 2016 From: hibafouani123 at hotmail.com (hiba fouani) Date: Mon, 13 Jun 2016 16:32:06 +0000 Subject: [FieldTrip] ROC CURVE In-Reply-To: References: Message-ID: Dear fieldtriper, How can I plot the ROC curve if I want to compare different inverse problems? if dipole is active or not. what should be the threshold? I have the simulated and estimated data on the mesh as an input thank you > From: fieldtrip-request at science.ru.nl > Subject: fieldtrip Digest, Vol 67, Issue 12 > To: fieldtrip at science.ru.nl > Date: Mon, 13 Jun 2016 11:10:44 +0200 > > Send fieldtrip mailing list submissions to > fieldtrip at science.ru.nl > > To subscribe or unsubscribe via the World Wide Web, visit > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > or, via email, send a message with subject or body 'help' to > fieldtrip-request at science.ru.nl > > You can reach the person managing the list at > fieldtrip-owner at science.ru.nl > > When replying, please edit your Subject line so it is more specific > than "Re: Contents of fieldtrip digest..." > > > Today's Topics: > > 1. Re: help diagnosing issues with source analysis (pathological > brain) (Vitoria Piai) > > > ---------------------------------------------------------------------- > > Message: 1 > Date: Mon, 13 Jun 2016 11:02:11 +0200 > From: Vitoria Piai > To: FieldTrip discussion list > Subject: Re: [FieldTrip] help diagnosing issues with source analysis > (pathological brain) > Message-ID: > > Content-Type: text/plain; charset="utf-8" > > Hi Cris, > > that makes sense, except that the .mri file I'm getting from the hospital > should already contain the right fiducial coordinates (or so I was told by > the MEG technician). Maybe the issue is that FieldTrip is not getting these > coordinates right from the .mri file if I don't run it through > ft_volumerealign first. > Any thoughts anyone? > > Thanks again > > On 12 June 2016 at 13:55, Cristiano Micheli wrote: > > > Dear Vitoria > > > > I had the same problem when I tried to coregister functional and > > anatomical data without transitioning through a head-referenced coordinates > > system. > > I solved the problem by using ft_volumerealign and selecting comparable > > anatomical fiducials for different subjects (nasion, left, right,..) BEFORE > > volume normalization. > > > > Maybe a hint towards the solution? > > > > Cheers > > Cris > > > > > > On Sat, Jun 11, 2016 at 8:50 PM, Vit?ria Piai > > wrote: > > > >> Hi everyone, > >> > >> I was hoping someone could help me figure out where my source analysis is > >> going wrong. > >> I have data on brain tumour patients (MRIs are from prior to tumour > >> resection). From the hospital (using CTF), I receive .mri files that > >> already have fiducial points saved as far as I was told. I then reslice and > >> segment the .mri file, after reading it with ft_read_mri > >> mri_reslice = ft_volumereslice([], mri); > >> segmentedmri = ft_volumesegment([], mri_reslice); > >> This seems to be working: > >> > >> > >> Plotting headmodel and sensors, it looks like they are aligned: > >> > >> If I compute the source model with MNI-warping (non-linear > >> transformation), I get something that doesn't seem right. I don't know if > >> this is because these are not normal brains to start with: > >> > >> With linear transformation, things look better: > >> > >> One of my questions is what the consequences are of using linear > >> transformation for the MNI warping given the pathological nature of these > >> brains. > >> > >> Then, the next issue is this result when projecting the source to the > >> surface: > >> > >> This happens regardless of whether I use the MNI-warped grid interpolated > >> to the MNI template, or the patient's individual grid skipping the MNI > >> normalisation step, interpolated to the patient's own T1. > >> But if I plot with 'ortho' method, then I see that the MNI-warped and > >> interpolated source data is misaligned, but the patient-native space one > >> isn't. > >> > >> > >> I can't make sense of this anymore; I've been trying all kinds of things > >> that don't work, so I was wondering whether anyone has an idea of what > >> could be going on by looking at these figures. Is it an error already at > >> the level of alignment of the fiducials? Or is it due to the MNI-warping? > >> Or a combination of issues? > >> > >> Thanks very much for any kind of help! > >> Vitoria > >> > >> _______________________________________________ > >> fieldtrip mailing list > >> fieldtrip at donders.ru.nl > >> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > >> > > > > > > _______________________________________________ > > fieldtrip mailing list > > fieldtrip at donders.ru.nl > > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > > -------------- next part -------------- > An HTML attachment was scrubbed... > URL: > -------------- next part -------------- > A non-text attachment was scrubbed... > Name: jidhfdhd.png > Type: image/png > Size: 4722 bytes > Desc: not available > URL: > -------------- next part -------------- > A non-text attachment was scrubbed... > Name: ebfighdf.png > Type: image/png > Size: 9956 bytes > Desc: not available > URL: > -------------- next part -------------- > A non-text attachment was scrubbed... > Name: bfejiccb.png > Type: image/png > Size: 75399 bytes > Desc: not available > URL: > -------------- next part -------------- > A non-text attachment was scrubbed... > Name: dffeehgc.png > Type: image/png > Size: 274137 bytes > Desc: not available > URL: > -------------- next part -------------- > A non-text attachment was scrubbed... > Name: dcigdbdi.png > Type: image/png > Size: 150070 bytes > Desc: not available > URL: > -------------- next part -------------- > A non-text attachment was scrubbed... > Name: ehffjdea.png > Type: image/png > Size: 10561 bytes > Desc: not available > URL: > > ------------------------------ > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > End of fieldtrip Digest, Vol 67, Issue 12 > ***************************************** -------------- next part -------------- An HTML attachment was scrubbed... URL: From rgilley at deakin.edu.au Tue Jun 14 06:13:30 2016 From: rgilley at deakin.edu.au (RYAN GILLEY) Date: Tue, 14 Jun 2016 04:13:30 +0000 Subject: [FieldTrip] SEP Recording Message-ID: Hi Everyone, This is not a straight forward question for Fieldtrip but with the experience in the group I figured it would be good to ask. Currently I am using a Neuroscan 64 channel EEG system to acquire sensory evoked potential (SEP) data. I am administering TTL pulses from an external system (Digitimer DS7a) run through Powerlab 26T using Labchart's event manager to generate the stimulations. My goal is to attempt to localize a couple of the Somatosensory peaks. My problem at the moment is that on my recording the marker (spike 1) and the stimulus artifact show up as displayed below. I have found that the time interval is inconsistent and because of this I am having trouble aligning the stimulus artifact to average. Is there another way of configuring this so that it works more efficiently or if anyone has used these tools (digitimer and powerlab) with the neuroscan system before, is there any advice anyone can give. Thanks in advance, Ryan [cid:image001.png at 01D1C62E.10DD7840] -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image001.png Type: image/png Size: 70148 bytes Desc: image001.png URL: From jan.schoffelen at donders.ru.nl Tue Jun 14 09:31:34 2016 From: jan.schoffelen at donders.ru.nl (Schoffelen, J.M. (Jan Mathijs)) Date: Tue, 14 Jun 2016 07:31:34 +0000 Subject: [FieldTrip] help diagnosing issues with source analysis (pathological brain) In-Reply-To: References: <575C5D78.7030807@gmail.com> Message-ID: <5F2CACF1-340B-4514-8B1B-8F477EC8FA9C@donders.ru.nl> Hi Vitória, To me it looks as if most of the stuff you describe works as expected, i.e. it works well or it gives funny results, apart from the non-linear normalisation. The extremely distorted warped grid points may be due to the patient’s anatomical being pathological, causing the normalisation to converge to a very strange solution. Now, with respect to the plotting/interpolation: if the coordinate systems of the objects you are overlaying don’t match, you get funny results. This is the case for the sourceplot with the surface method (where the default cortical surface is in MNI-RAS), and your functional image is in CTF’s ALS, as well as for the sourceplot with the ortho method, using the blurry template from SPM (which is also in MNI-RAS). If you want these to match up, you could replace the source positions in your functional image with the ones from the standard grid, because you assume topological equivalence as per the inverse warping strategy applied in the creation of the beamformer grid. So, long story short: it seems that your source analysis just went fine, but you are confused by the different coordinate systems. Best, JM On 13 Jun 2016, at 11:02, Vitoria Piai > wrote: Hi Cris, that makes sense, except that the .mri file I'm getting from the hospital should already contain the right fiducial coordinates (or so I was told by the MEG technician). Maybe the issue is that FieldTrip is not getting these coordinates right from the .mri file if I don't run it through ft_volumerealign first. Any thoughts anyone? Thanks again On 12 June 2016 at 13:55, Cristiano Micheli > wrote: Dear Vitoria I had the same problem when I tried to coregister functional and anatomical data without transitioning through a head-referenced coordinates system. I solved the problem by using ft_volumerealign and selecting comparable anatomical fiducials for different subjects (nasion, left, right,..) BEFORE volume normalization. Maybe a hint towards the solution? Cheers Cris On Sat, Jun 11, 2016 at 8:50 PM, Vitória Piai > wrote: Hi everyone, I was hoping someone could help me figure out where my source analysis is going wrong. I have data on brain tumour patients (MRIs are from prior to tumour resection). From the hospital (using CTF), I receive .mri files that already have fiducial points saved as far as I was told. I then reslice and segment the .mri file, after reading it with ft_read_mri mri_reslice = ft_volumereslice([], mri); segmentedmri = ft_volumesegment([], mri_reslice); This seems to be working: Plotting headmodel and sensors, it looks like they are aligned: If I compute the source model with MNI-warping (non-linear transformation), I get something that doesn't seem right. I don't know if this is because these are not normal brains to start with: With linear transformation, things look better: One of my questions is what the consequences are of using linear transformation for the MNI warping given the pathological nature of these brains. Then, the next issue is this result when projecting the source to the surface: This happens regardless of whether I use the MNI-warped grid interpolated to the MNI template, or the patient's individual grid skipping the MNI normalisation step, interpolated to the patient's own T1. But if I plot with 'ortho' method, then I see that the MNI-warped and interpolated source data is misaligned, but the patient-native space one isn't. I can't make sense of this anymore; I've been trying all kinds of things that don't work, so I was wondering whether anyone has an idea of what could be going on by looking at these figures. Is it an error already at the level of alignment of the fiducials? Or is it due to the MNI-warping? Or a combination of issues? Thanks very much for any kind of help! Vitoria _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -------------- next part -------------- An HTML attachment was scrubbed... URL: From jan.schoffelen at donders.ru.nl Tue Jun 14 09:41:21 2016 From: jan.schoffelen at donders.ru.nl (Schoffelen, J.M. (Jan Mathijs)) Date: Tue, 14 Jun 2016 07:41:21 +0000 Subject: [FieldTrip] Coordsys issue ft_sourceplot In-Reply-To: References: Message-ID: <21D48954-7881-45FF-B596-9F03F618A839@donders.ru.nl> Dear Andreas, after having calculated the sources of a MMN paradigm (4D-system), I’d like to plot the results on one of the anatomy template files in the fieldtrip directory (single_subj_T1_1mm.nii) or alternatively on a MNI T1 template file (mni_icbm152_t1_tal_nlin_sym_09a.nii). Unfortunately, this is not working well… As you can see on the attached picture, the functional data is rotated by 90 degrees. I guess that something gets mixed because of the different coordsystems of functional and anatomical data. The functional data is 4D, which means ALS orientation. The anatomical is MNI, so RAS orientation. The plotting works fine, if I use a mri file which was converted in field trip (V2.mri) and therefore is also in ALS orientation. However, the anatomy doesn’t look very pretty… Is there any way that I can transform the functional data to RAS orientation or the anatomical data to ALS orientation, respectively? I tried with ft_volumerealign. However, since the template file has no fiducials, it is hard to really precisely do this. Fair point. I would however do it the other way around, using the V2 to get the transformation from voxel space to MNI-RAS, and then use the inverse of the transformation on the functional data: in this case you could use ft_volumenormalise, with cfg.nonlinear = ‘no’. Alternatively, if you are using this procedure: http://www.fieldtriptoolbox.org/tutorial/sourcemodel#subject-specific_grids_that_are_equivalent_across_subjects_in_normalized_space, you could directly replace the source.pos of your functional data with the template.pos and then do the interpolation. To summarize: either: mri = ft_read_mri(‘V2.mri’); mri.coordsys = ‘bti’; cfg = []; cfg.nonlinear=’no’; mrin = ft_volumenormalise(cfg, mri); transform_vox2bti = mri.transform; transform_vox2spm = mrin.transform; transform_bti2spm = transform_vox2spm/transform_vox2bti source = ft_transform_geometry(transform_bti2spm, source); source_int = ft_sourceinterpolate(somecfg, source, niceanatomical); or: source.pos = templat.pos; source_int = ft_sourceinterpolate(somecfg, source, niceanatomical); Best, JM Any input on how to plot the sources on one of these nice anatomical files is highly appreciated! Thanks and best regards, Andreas -- Dipl.-Psych. Andreas Sauer Max Planck Institute for Brain Research Deutschordenstraße 46 60528 Frankfurt am Main Germany T: +49 69 96769 278 F: +49 69 96769 327 Email: sauer.mpih at gmail.com www.brain.mpg.de _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -------------- next part -------------- An HTML attachment was scrubbed... URL: From rikkert.hindriks at upf.edu Tue Jun 14 11:44:55 2016 From: rikkert.hindriks at upf.edu (HINDRIKS, RIKKERT) Date: Tue, 14 Jun 2016 11:44:55 +0200 Subject: [FieldTrip] Noise normalization of MNE Message-ID: Dear all, I'm having trouble interpreting the statistical parametric maps obtained from MNE source reconstructions using the method described in (Dale, 2000) . The issue is the following: For each source location (assume the dipole orientations fixed) the noise normalized activity estimate at that location is (approximately) standard normally distributed under the null hypothesis of no activity at all locations. However, I would like to test for activity at a specific location, but under the hypothesis of activity at a specific location, the normalized estimate at that location is only standard normally distributed if the corresponding row of the resolution matrix contains a single non-zero entry. In other words: it seems to me that the statistical parametric map can only be used to test for activity at individual locations if the source reconstruction is unbiased (or equivalently: if the resolution matrix equals the identity matrix) which is not the case in general. It would be very helpful if someone could help me clarifying this. Kind regards, Rikkert -------------- next part -------------- An HTML attachment was scrubbed... URL: From pgoodin at swin.edu.au Tue Jun 14 13:30:00 2016 From: pgoodin at swin.edu.au (Peter Goodin) Date: Tue, 14 Jun 2016 11:30:00 +0000 Subject: [FieldTrip] Why use LCMV + Hilbert envelope vs. DICS? Message-ID: Hi Fieldtrip list, Please excuse a possibly silly question, but I'm hoping someone can explain what difference occurs using DICS vs. LCMV + narrow band filter + hilbert envelope + mean amplitude over time (eg. Brookes et al., 2011)? I notice the latter is the preferred method for functional connectivity using MEG, but as far as I understand it, wouldn't the two produce a comparable result? Are there occasions where one is better than the other? Thanks, Peter _______________________ Dr Peter Goodin, Brain and Psychological Sciences Research Centre (BPsyC) Swinburne University, Hawthorn, Vic, 3122 From pgoodin at swin.edu.au Tue Jun 14 13:30:07 2016 From: pgoodin at swin.edu.au (Peter Goodin) Date: Tue, 14 Jun 2016 11:30:07 +0000 Subject: [FieldTrip] Why use LCMV + Hilbert envelope vs. DICS? Message-ID: Hi Fieldtrip list, Please excuse a possibly silly question, but I'm hoping someone can explain what difference occurs using DICS vs. LCMV + narrow band filter + hilbert envelope + mean amplitude over time (eg. Brookes et al., 2011)? I notice the latter is the preferred method for functional connectivity using MEG, but as far as I understand it, wouldn't the two produce a comparable result? Are there occasions where one is better than the other? Thanks, Peter _______________________ Dr Peter Goodin, Brain and Psychological Sciences Research Centre (BPsyC) Swinburne University, Hawthorn, Vic, 3122 From Claudio.Georgii at stud.sbg.ac.at Tue Jun 14 14:14:47 2016 From: Claudio.Georgii at stud.sbg.ac.at (Claudio Georgii) Date: Tue, 14 Jun 2016 14:14:47 +0200 Subject: [FieldTrip] Memory saving in ft_frequanalysis Message-ID: Hi fieldtrip list, we recently ran into some memory issues using the cfg.output = 'powandcsd' option in ft_frequanalysis. We solved the issue by: (1) changing the following line of code (ft_freqanalysis; line 573-574: if csdflg, crsspctrm = complex(nan(ntrials,nchancmb,nfoi,ntoi,cfg.precision),nan(ntrials,nchancmb,nfoi,ntoi,cfg.precision)); end into if csdflg, crsspctrm = nan+nan(ntrials,nchancmb,nfoi,ntoi,cfg.precision)*1i; end and accordingly, if fftflg, fourierspctrm = complex(nan(ntrials,nchan,nfoi,ntoi,cfg.precision),nan(ntrials,nchan,nfoi,ntoi,cfg.precision)); end into if fftflg, fourierspctrm = nan+nan(ntrials,nchan,nfoi,ntoi,cfg.precision)*1i; end (2) defining cfg.precision as 'single' This two procedures saves a huge amount of memory (~ the order of 4). Now, we wanted to ask, whether these changes/adaptions are okay and do not lead to spurious results? Is there a reason on performing wavelet convolution on double instead of single precision? Thank you in advance. Best, Claudio Georgii -- Claudio Georgii, MSc. Phd student University of Salzburg - Department of Psychology Eating Behavior Laboratory Hellbrunnerstraße 34 5020 Salzburg - Austria Phone: 0043- (0)662 8044 5164 E-Mail: claudio.georgii at sbg.ac.at -------------- next part -------------- An HTML attachment was scrubbed... URL: From nicholas.balderston at nih.gov Tue Jun 14 17:14:11 2016 From: nicholas.balderston at nih.gov (Balderston, Nicholas (NIH/NIMH) [F]) Date: Tue, 14 Jun 2016 15:14:11 +0000 Subject: [FieldTrip] SEP Recording In-Reply-To: References: Message-ID: Hey Ryan, I am not sure that I understand your problem completely, so this solution might not be that helpful. That being said, the DS7A has a BNC out port on the back of the unit, which sends its own TTL pulses whenever it delivers a stimulation. If you can add this as a channel in your recordings, it may give you more accurate timing information. -nick ________________________________ From: RYAN GILLEY [rgilley at deakin.edu.au] Sent: Tuesday, June 14, 2016 12:13 AM To: fieldtrip at tortel.science.ru.nl Subject: [FieldTrip] SEP Recording Hi Everyone, This is not a straight forward question for Fieldtrip but with the experience in the group I figured it would be good to ask. Currently I am using a Neuroscan 64 channel EEG system to acquire sensory evoked potential (SEP) data. I am administering TTL pulses from an external system (Digitimer DS7a) run through Powerlab 26T using Labchart’s event manager to generate the stimulations. My goal is to attempt to localize a couple of the Somatosensory peaks. My problem at the moment is that on my recording the marker (spike 1) and the stimulus artifact show up as displayed below. I have found that the time interval is inconsistent and because of this I am having trouble aligning the stimulus artifact to average. Is there another way of configuring this so that it works more efficiently or if anyone has used these tools (digitimer and powerlab) with the neuroscan system before, is there any advice anyone can give. Thanks in advance, Ryan [cid:image001.png at 01D1C62E.10DD7840] -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image001.png Type: image/png Size: 70148 bytes Desc: image001.png URL: From joerg.hipp at googlemail.com Tue Jun 14 20:39:23 2016 From: joerg.hipp at googlemail.com (Joerg Hipp) Date: Tue, 14 Jun 2016 20:39:23 +0200 Subject: [FieldTrip] 9-month internship developing EEG biomarker at Roche, Basel Message-ID: Dear all, we are offering a 9-month internship in our biomarker group at Roche, Basel. Our group supports preclinical and clinical neuroscience projects within Roche with various biomarker techniques including EEG/MEG, PET, MRI, and neuropsychology. We are looking for a highly motivated person to help develop EEG biomarkers of syndromic forms of autism spectrum disorder. The internship additionally offers a unique opportunity to gain insights into research in the pharmaceutical industry setting. The PhD salary and living expenses will be compensated. Application criteria: - PhD student / medical student interested in exploring the electrophysiological substrate of neurodevelopmental disorders (the candidate should be enrolled in either a natural science PhD or medical program at the time of the application) - Experienced in the analysis of EEG and/or MEG data - Strong statistical and programming skills (preferably MATLAB) Details on the project and application – click here Details on the RiSE program (Roche Internships for Scientific Exchange) – click here Overview of Roche neuroscience activities – click here The project will be supervised by Pilar Garces and myself . Best wishes, Joerg -- Joerg Hipp, PhD Biomarker and Experimental Medicine Leader F. Hoffmann-La Roche Ltd. Grenzacherstrasse 124 4070 Basel, Switzerland Email: joerg.hipp at roche.com -------------- next part -------------- An HTML attachment was scrubbed... URL: From anne.urai at gmail.com Wed Jun 15 11:03:04 2016 From: anne.urai at gmail.com (Anne Urai) Date: Wed, 15 Jun 2016 11:03:04 +0200 Subject: [FieldTrip] running FT scripts in a supercomputing cluster In-Reply-To: References: Message-ID: Hi Jose, I ran into similar dependencies issues when compiling fieldtrip, and converged on the following: % these paths will be added at compilation addpath(genpath('~/code/Tools')); addpath('~/Documents/fieldtrip'); ft_defaults; % add everything to path that we need addpath('~/Documents/fieldtrip/qsub'); addpath(genpath('~/Documents/fieldtrip/template/')); % neighbouring matfile if strcmp(fname, 'B3a_clusterStatsERF.m') || strcmp(fname, 'B3b_clusterStatsTFR.m'), addpath('~/Documents/fieldtrip/statfun/'); % need the combineClusters mex file addpath('~/Documents/fieldtrip/external/spm8/'); % for neighbour definition % http://mailman.science.ru.nl/pipermail/fieldtrip/2014-July/008238.html end % options: compile verbose, only use the toolboxes we really need % !!! runtime options should be preceded by - to work! % dont need to activate the -nojvm flag, can still plot from executable if strcmp(fname, 'B3a_clusterStatsERF.m') || strcmp(fname, 'B3b_clusterStatsTFR.m'), % statfun is called with a weird eval construction, so not recognized % by the dependency analysis of mcc mcc('-mv', '-N', '-p', 'stats', '-p', 'images', '-p', 'signal', ... '-R', '-nodisplay', '-R', '-singleCompThread', ... '-a', '~/Documents/fieldtrip/ft_statistics_montecarlo.m', ... '-a', '~/Documents/fieldtrip/statfun/ft_statfun_depsamplesT.m', ... fname); else % no need to specify additional files mcc('-mv', '-N', '-p', 'stats', '-p', 'images', '-p', 'signal', ... '-R', '-nodisplay', '-R', '-singleCompThread', ... fname); end So, the trick is to add everything to your path before comping, and then use the -N option and define specific folders and possible functions using -a. Make sure to only include additional subfolders from Fieldtrip (such as the templates folder) only if you need them, for including them will increase the size of the executable considerably. Also, some functions like the ft_statistics ones are not directly called but instead evaluated using statmethod = str2func(['ft_statistics_' cfg.method]) - this causes the dependency analysis of the compiler to skip those functions, so you'll have to add them manually. PS a similar setup should work directly from the command line mcc, but I found it easier to run ft_defaults from Matlab and then compile from within a Matlab script. Hope this helps! — Anne E. Urai, MSc PhD student | Institut für Neurophysiologie und Pathophysiologie Universitätsklinikum Hamburg-Eppendorf | Martinistrasse 52, 20246 | Hamburg, Germany www.anneurai.net / @AnneEUrai On 10 June 2016 at 10:42, Jose wrote: > dear list, > > I'm trying to analyse CTF MEG data through the Flemish Supercomputer > Centre, > I did a matlab script to run the foremost FT functions in my pipeline > (ft_read_event, read_ctf_cls, and ft_preprocessing). This script works well > when I run it locally. To compile my function in the supercomputing cluster > I initially used addpath to include FT and ft_defaults to set the > configuration inside my script, but this wasn't working. I tried using a > startup.m script but this doesn't work neither. Maybe I'm missing > something? My bash script to compile looks like this: > > #!/bin/bash > module load MATLAB/2013b > FTDIR=$VSC_DATA_VO_USER/fieldtrip-20160317 > mcc -mv FT_0.m > > I also tried mcc -mv FT_0.m -I $FTDIR > I run my compilation in the same folder where I have the FT folder. > When I run my bash job I get always the same error: Undefined function > 'ft_read_event' for input arguments of type 'char'. > > I've been looking elsewhere but still I haven't find a solution, > > Any hints about this would really appreciated, > best, > Jose > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > -------------- next part -------------- An HTML attachment was scrubbed... URL: From sauer.mpih at googlemail.com Wed Jun 15 14:31:49 2016 From: sauer.mpih at googlemail.com (Andreas Sauer) Date: Wed, 15 Jun 2016 14:31:49 +0200 Subject: [FieldTrip] Coordsys issue ft_sourceplot In-Reply-To: <21D48954-7881-45FF-B596-9F03F618A839@donders.ru.nl> References: <21D48954-7881-45FF-B596-9F03F618A839@donders.ru.nl> Message-ID: Dear Jan, thank you for your email and the example code! I tried both ways to convert the coord systems, but unfortunately it still doesn't work. Since I used the tutorial procedure to create my sourcemodel ( http://www.fieldtriptoolbox.org/tutorial/sourcemodel#subject-specific_grids_that_are_equivalent_across_subjects_in_normalized_space) I tried first with the easy way of only replacing the .pos field. But the plots don't change, the sources are still rotated by 90 degrees. Actually, the .pos fields are already the same before replacing it (see pic). Is there some error in my code? *% Step1: Load mri file* *mri = ft_read_mri('/data/home1/asauer/Projects/RPScZ/Analysis/Beamforming/MRI/HSM12_V2.mri');* *% Step 2: Segment the template brain and construct a volume conduction* *% model (i.e. head model): this is needed for the inside/outside detection of voxels* *cfg = [];* *cfg.output = 'brain';* *segmentedmri = ft_volumesegment(cfg,anatomy);* *cfg = [];* *cfg.method = 'singleshell';* *vol = ft_prepare_headmodel(cfg,segmentedmri);* *vol = ft_convert_units(vol,'m');* *figure; ft_plot_sens(sens,'style','*b'); hold on; ft_plot_vol(vol)* *% Step 3: Load sourcemodel * *load(fullfile(ft_path,'template/sourcemodel/standard_sourcemodel3d5mm'));* *template_grid = sourcemodel;* *clear sourcemodel* *% Step 4: Make sourcemodel* *cfg = [];* *cfg.grid.warpmni = 'yes';* *cfg.grid.template = template_grid;* *cfg.grid.nonlinear = 'yes';* *cfg.mri = mri;* *cfg.grid.unit = 'm';* *grid = ft_prepare_sourcemodel(cfg);* *figure; hold on;* *ft_plot_vol(vol,'facecolor','cortex','edgecolor','none'); alpha 0.5; camlight;* *ft_plot_mesh(grid.pos(grid.inside,:));* The only thing that is different from the tutorial is the unit conversion... After that I tried the transformation. All worked well until the source interpolation. ft_sourceinterpolation throws this error: *Attempted to access sel(1); index out of bounds because numel(sel)=0.* *Error in ft_sourceinterpolate>my_interpn (line 508)* * ft_progress(sel(1)/num, 'interpolating %.1f%%\n', 100*sel(1)/num);* *Error in ft_sourceinterpolate (line 393)* * interp.inside( sel) = my_interpn(double(functional.inside), ax(sel), ay(sel), az(sel), 'nearest', cfg.feedback);* which, to be honest, I don't really understand. Sorry... Best wishes, Andreas 2016-06-14 9:41 GMT+02:00 Schoffelen, J.M. (Jan Mathijs) < jan.schoffelen at donders.ru.nl>: > Dear Andreas, > > after having calculated the sources of a MMN paradigm (4D-system), I’d > like to plot the results on one of the anatomy template files in the > fieldtrip directory (single_subj_T1_1mm.nii) or alternatively on a MNI T1 > template file (mni_icbm152_t1_tal_nlin_sym_09a.nii). Unfortunately, this is > not working well… As you can see on the attached picture, the functional > data is rotated by 90 degrees. > > I guess that something gets mixed because of the different coordsystems of > functional and anatomical data. The functional data is 4D, which means ALS > orientation. The anatomical is MNI, so RAS orientation. The plotting works > fine, if I use a mri file which was converted in field trip (V2.mri) and > therefore is also in ALS orientation. However, the anatomy doesn’t look > very pretty… > > > Is there any way that I can transform the functional data to RAS > orientation or the anatomical data to ALS orientation, respectively? > > > I tried with ft_volumerealign. However, since the template file has no > fiducials, it is hard to really precisely do this. > > > Fair point. I would however do it the other way around, using the V2 to > get the transformation from voxel space to MNI-RAS, and then use the > inverse of the transformation on the functional data: in this case you > could use ft_volumenormalise, with cfg.nonlinear = ‘no’. Alternatively, if > you are using this procedure: > http://www.fieldtriptoolbox.org/tutorial/sourcemodel#subject-specific_grids_that_are_equivalent_across_subjects_in_normalized_space, > you could directly replace the source.pos of your functional data with the > template.pos and then do the interpolation. > > To summarize: > > either: > > mri = ft_read_mri(‘V2.mri’); > mri.coordsys = ‘bti’; > > cfg = []; > cfg.nonlinear=’no’; > mrin = ft_volumenormalise(cfg, mri); > > transform_vox2bti = mri.transform; > transform_vox2spm = mrin.transform; > transform_bti2spm = transform_vox2spm/transform_vox2bti > source = ft_transform_geometry(transform_bti2spm, source); > > source_int = ft_sourceinterpolate(somecfg, source, niceanatomical); > > or: > > source.pos = templat.pos; > source_int = ft_sourceinterpolate(somecfg, source, niceanatomical); > > Best, > JM > > > > Any input on how to plot the sources on one of these nice anatomical files > is highly appreciated! > > Thanks and best regards, > > Andreas > > > -- > Dipl.-Psych. Andreas Sauer > Max Planck Institute for Brain Research > Deutschordenstraße 46 > 60528 Frankfurt am Main > Germany > > T: +49 69 96769 278 > F: +49 69 96769 327 > Email: sauer.mpih at gmail.com > www.brain.mpg.de > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > https://mailman.science.ru.nl/mailman/listinfo/fieldtrip > -- Dipl.-Psych. Andreas Sauer Max Planck Institute for Brain Research Deutschordenstraße 46 60528 Frankfurt am Main Germany T: +49 69 96769 278 F: +49 69 96769 327 Email: sauer.mpih at gmail.com www.brain.mpg.de -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: pos_fields.png Type: image/png Size: 81877 bytes Desc: not available URL: From jan.schoffelen at donders.ru.nl Wed Jun 15 15:06:57 2016 From: jan.schoffelen at donders.ru.nl (Schoffelen, J.M. (Jan Mathijs)) Date: Wed, 15 Jun 2016 13:06:57 +0000 Subject: [FieldTrip] Fwd: Coordsys issue ft_sourceplot References: <08B10307-13ED-40F0-9F87-B50EEDAF25CC@gmail.com> Message-ID: <8EF9FF29-549B-4E5C-9ED3-055147E8DFD0@donders.ru.nl> Are you sure that you use the pos-field from the template, i.e. from the standard_sourcemodel3d5mm? Best, Jan-Mathijs On 15 Jun 2016, at 14:31, Andreas Sauer > wrote: Dear Jan, thank you for your email and the example code! I tried both ways to convert the coord systems, but unfortunately it still doesn't work. Since I used the tutorial procedure to create my sourcemodel (http://www.fieldtriptoolbox.org/tutorial/sourcemodel#subject-specific_grids_that_are_equivalent_across_subjects_in_normalized_space) I tried first with the easy way of only replacing the .pos field. But the plots don't change, the sources are still rotated by 90 degrees. Actually, the .pos fields are already the same before replacing it (see pic). Is there some error in my code? % Step1: Load mri file mri = ft_read_mri('/data/home1/asauer/Projects/RPScZ/Analysis/Beamforming/MRI/HSM12_V2.mri'); % Step 2: Segment the template brain and construct a volume conduction % model (i.e. head model): this is needed for the inside/outside detection of voxels cfg = []; cfg.output = 'brain'; segmentedmri = ft_volumesegment(cfg,anatomy); cfg = []; cfg.method = 'singleshell'; vol = ft_prepare_headmodel(cfg,segmentedmri); vol = ft_convert_units(vol,'m'); figure; ft_plot_sens(sens,'style','*b'); hold on; ft_plot_vol(vol) % Step 3: Load sourcemodel load(fullfile(ft_path,'template/sourcemodel/standard_sourcemodel3d5mm')); template_grid = sourcemodel; clear sourcemodel % Step 4: Make sourcemodel cfg = []; cfg.grid.warpmni = 'yes'; cfg.grid.template = template_grid; cfg.grid.nonlinear = 'yes'; cfg.mri = mri; cfg.grid.unit = 'm'; grid = ft_prepare_sourcemodel(cfg); figure; hold on; ft_plot_vol(vol,'facecolor','cortex','edgecolor','none'); alpha 0.5; camlight; ft_plot_mesh(grid.pos(grid.inside,:)); The only thing that is different from the tutorial is the unit conversion... After that I tried the transformation. All worked well until the source interpolation. ft_sourceinterpolation throws this error: Attempted to access sel(1); index out of bounds because numel(sel)=0. Error in ft_sourceinterpolate>my_interpn (line 508) ft_progress(sel(1)/num, 'interpolating %.1f%%\n', 100*sel(1)/num); Error in ft_sourceinterpolate (line 393) interp.inside( sel) = my_interpn(double(functional.inside), ax(sel), ay(sel), az(sel), 'nearest', cfg.feedback); which, to be honest, I don't really understand. Sorry... Best wishes, Andreas 2016-06-14 9:41 GMT+02:00 Schoffelen, J.M. (Jan Mathijs) >: Dear Andreas, after having calculated the sources of a MMN paradigm (4D-system), I’d like to plot the results on one of the anatomy template files in the fieldtrip directory (single_subj_T1_1mm.nii) or alternatively on a MNI T1 template file (mni_icbm152_t1_tal_nlin_sym_09a.nii). Unfortunately, this is not working well… As you can see on the attached picture, the functional data is rotated by 90 degrees. I guess that something gets mixed because of the different coordsystems of functional and anatomical data. The functional data is 4D, which means ALS orientation. The anatomical is MNI, so RAS orientation. The plotting works fine, if I use a mri file which was converted in field trip (V2.mri) and therefore is also in ALS orientation. However, the anatomy doesn’t look very pretty… Is there any way that I can transform the functional data to RAS orientation or the anatomical data to ALS orientation, respectively? I tried with ft_volumerealign. However, since the template file has no fiducials, it is hard to really precisely do this. Fair point. I would however do it the other way around, using the V2 to get the transformation from voxel space to MNI-RAS, and then use the inverse of the transformation on the functional data: in this case you could use ft_volumenormalise, with cfg.nonlinear = ‘no’. Alternatively, if you are using this procedure: http://www.fieldtriptoolbox.org/tutorial/sourcemodel#subject-specific_grids_that_are_equivalent_across_subjects_in_normalized_space, you could directly replace the source.pos of your functional data with the template.pos and then do the interpolation. To summarize: either: mri = ft_read_mri(‘V2.mri’); mri.coordsys = ‘bti’; cfg = []; cfg.nonlinear=’no’; mrin = ft_volumenormalise(cfg, mri); transform_vox2bti = mri.transform; transform_vox2spm = mrin.transform; transform_bti2spm = transform_vox2spm/transform_vox2bti source = ft_transform_geometry(transform_bti2spm, source); source_int = ft_sourceinterpolate(somecfg, source, niceanatomical); or: source.pos = templat.pos; source_int = ft_sourceinterpolate(somecfg, source, niceanatomical); Best, JM Any input on how to plot the sources on one of these nice anatomical files is highly appreciated! Thanks and best regards, Andreas -- Dipl.-Psych. Andreas Sauer Max Planck Institute for Brain Research Deutschordenstraße 46 60528 Frankfurt am Main Germany T: +49 69 96769 278 F: +49 69 96769 327 Email: sauer.mpih at gmail.com www.brain.mpg.de _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl https://mailman.science.ru.nl/mailman/listinfo/fieldtrip -- Dipl.-Psych. Andreas Sauer Max Planck Institute for Brain Research Deutschordenstraße 46 60528 Frankfurt am Main Germany T: +49 69 96769 278 F: +49 69 96769 327 Email: sauer.mpih at gmail.com www.brain.mpg.de _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl https://mailman.science.ru.nl/mailman/listinfo/fieldtrip -------------- next part -------------- An HTML attachment was scrubbed... URL: From pgoodin at swin.edu.au Wed Jun 15 15:32:06 2016 From: pgoodin at swin.edu.au (Peter Goodin) Date: Wed, 15 Jun 2016 13:32:06 +0000 Subject: [FieldTrip] LCMV returns no time series? Message-ID: Hi FieldTrip list, I'm using LCMV on averaged data (covariancewindow='all') but find the returned source estimates only have a single point. Is there a way to specify the analysis returns the time series for each grid point? Thanks, Peter -------------- next part -------------- An HTML attachment was scrubbed... URL: From joramvandriel at gmail.com Wed Jun 15 15:51:22 2016 From: joramvandriel at gmail.com (Joram van Driel) Date: Wed, 15 Jun 2016 15:51:22 +0200 Subject: [FieldTrip] LCMV returns no time series? In-Reply-To: References: Message-ID: Hi Peter, This is described here: http://www.fieldtriptoolbox.org/tutorial/shared/virtual_sensors You need to keep the weights or filter of the lcmv output, and just apply them on your channel data using matrix algebra; this will transform your channel data time series from x sensors into y voxels. Good luck, Joram On Wed, Jun 15, 2016 at 3:32 PM, Peter Goodin wrote: > Hi FieldTrip list, > > I'm using LCMV on averaged data (covariancewindow='all') but find the > returned source estimates only have a single point. Is there a way to > specify the analysis returns the time series for each grid point? > > Thanks, > > Peter > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > https://mailman.science.ru.nl/mailman/listinfo/fieldtrip > -- *Joram van Driel*, PhD Postdoc @ Vrije Universiteit Amsterdam Cognitive Psychology *E-mail hours:* *Monday/Tuesday: 9-12 | Thursday/Friday: 14-17* -------------- next part -------------- An HTML attachment was scrubbed... URL: From sarang at cfin.au.dk Wed Jun 15 16:10:57 2016 From: sarang at cfin.au.dk (Sarang S. Dalal) Date: Wed, 15 Jun 2016 14:10:57 +0000 Subject: [FieldTrip] LCMV returns no time series? In-Reply-To: References: Message-ID: <1465999857376.33093@cfin.au.dk> Hi Peter, If you've used the 'lcmv' method for ft_sourceanalysis, you ought to have the time series already contained in source.avg.mom. I've been working a lot lately on improving the LCMV functionality, but unfortunately haven't had a chance to document much yet. Especially if you are not contrasting different conditions, you might want to try these parameters: cfg.lcmv.weightnorm = 'nai'; % this is a new option :-) cfg.lcmv.fixedori = 'yes'; I also prefer to turn off reducerank, but YMMV: cfg.lcmv.reducerank = 'no'; Finally I've also contributed a viewer that will greatly help visualizing your virtual time series together with the MRI. You can find it in the latest distributions of FieldTrip under fieldtrip/contrib/nutmegtrip. You'll also need a full version of SPM8 in your path (the external in FieldTrip doesn't have all the necessary functions). You?? can use it like this: cfg = []; cfg.mripath = '/path/to/mri/nii' % must be in nifti (nii) format cfg.funparameter = 'avg.mom' % cfg.atlas = ft_read_atlas('ROI_MNI_V4.nii'); % [optional] you can get atlas labels, if your MRI and grid points are based on the MNI grid nmt_sourceplot_spm8(cfg,ft_convert_units(source,'mm')); Cheers, Sarang ________________________________ From: fieldtrip-bounces at science.ru.nl on behalf of Peter Goodin Sent: Wednesday, June 15, 2016 3:32 PM To: FieldTrip discussion list Subject: [FieldTrip] LCMV returns no time series? Hi FieldTrip list, I'm using LCMV on averaged data (covariancewindow='all') but find the returned source estimates only have a single point. Is there a way to specify the analysis returns the time series for each grid point? Thanks, Peter -------------- next part -------------- An HTML attachment was scrubbed... URL: From ha438 at georgetown.edu Wed Jun 15 22:28:14 2016 From: ha438 at georgetown.edu (Hassan Aleem) Date: Wed, 15 Jun 2016 16:28:14 -0400 Subject: [FieldTrip] compute forward simulated data Message-ID: Hi, Can anyone direct me, or help create a tutorial similar to http://www.fieldtriptoolbox.org/example/compute_forward_simulated_data_and_apply_a_beamformer_scan but for EEG simulated data? Best, Hassan -------------- next part -------------- An HTML attachment was scrubbed... URL: From pgoodin at swin.edu.au Wed Jun 15 23:55:44 2016 From: pgoodin at swin.edu.au (Peter Goodin) Date: Wed, 15 Jun 2016 21:55:44 +0000 Subject: [FieldTrip] LCMV returns no time series? Message-ID: <3804c3f8-b092-4b06-80d6-57f71f68faf9@email.android.com> Hi Joram and Sarang, Thanks very much for the advice and to you Sarang for the new functionality and viewer! Peter On 16 Jun 2016 00:59, "Sarang S. Dalal" wrote: Hi Peter, If you've used the 'lcmv' method for ft_sourceanalysis, you ought to have the time series already contained in source.avg.mom. I've been working a lot lately on improving the LCMV functionality, but unfortunately haven't had a chance to document much yet. Especially if you are not contrasting different conditions, you might want to try these parameters: cfg.lcmv.weightnorm = 'nai'; % this is a new option :-) cfg.lcmv.fixedori = 'yes'; I also prefer to turn off reducerank, but YMMV: cfg.lcmv.reducerank = 'no'; Finally I've also contributed a viewer that will greatly help visualizing your virtual time series together with the MRI. You can find it in the latest distributions of FieldTrip under fieldtrip/contrib/nutmegtrip. You'll also need a full version of SPM8 in your path (the external in FieldTrip doesn't have all the necessary functions). You​​ can use it like this: cfg = []; cfg.mripath = '/path/to/mri/nii' % must be in nifti (nii) format cfg.funparameter = 'avg.mom' % cfg.atlas = ft_read_atlas('ROI_MNI_V4.nii'); % [optional] you can get atlas labels, if your MRI and grid points are based on the MNI grid nmt_sourceplot_spm8(cfg,ft_convert_units(source,'mm')); Cheers, Sarang ________________________________ From: fieldtrip-bounces at science.ru.nl on behalf of Peter Goodin Sent: Wednesday, June 15, 2016 3:32 PM To: FieldTrip discussion list Subject: [FieldTrip] LCMV returns no time series? Hi FieldTrip list, I'm using LCMV on averaged data (covariancewindow='all') but find the returned source estimates only have a single point. Is there a way to specify the analysis returns the time series for each grid point? Thanks, Peter -------------- next part -------------- An HTML attachment was scrubbed... URL: From anne.urai at gmail.com Thu Jun 16 10:43:19 2016 From: anne.urai at gmail.com (Anne Urai) Date: Thu, 16 Jun 2016 04:43:19 -0400 Subject: [FieldTrip] running FT scripts in a supercomputing cluster In-Reply-To: References: Message-ID: Hi Jose, When calling mcc from Matlab, a dependency analysis is first carried out (at least in more recent versions of Matlab) - basically, Matlab goes through the script you're compiling and finds all the functions that are called (which must be on the path). These are all added to the executable. In principle, if all the folders you need are on the path (which should be okay when you call ft_default), the executable can run. Now, only in the case when the dependency analysis doesn't recognize certain functions (because they are, for example, generated through str2func) you should add them manually. I found this out through trial and error - I'd first try to compile using the bare bones mcc('-mv', '-N', '-R', '-nodisplay', '-R', '-singleCompThread', 'FT_0.m'); when you then run the executable, you'll get an error message if a function or a toolbox is missing (and then you can add only those that you need and compile again). In your FT_0.sh, you should indeed load the MCR - otherwise, the executable can't run. For this, I'd recommend contacting the admin of the supercomputer cluster, since the way I do it on the cluster here is specific to the setup. You'll probably have to activate this in your FT_0.sh yourself and add the path to the cache of each node (something like export MCR_CACHE_ROOT=$TMPDIR). Good luck! — Anne E. Urai, MSc PhD student | Institut für Neurophysiologie und Pathophysiologie Universitätsklinikum Hamburg-Eppendorf | Martinistrasse 52, 20246 | Hamburg, Germany www.anneurai.net / @AnneEUrai From: Jose Reply: Jose Date: 15 June 2016 at 19:14:43 To: Anne Urai Subject: Re: [FieldTrip] running FT scripts in a supercomputing cluster Hi Anne, Thanks for the detailed response, I have a couple questions if I may, So, if I understand well I need to know a priori which functions I want to use?. That's a bit strange, no? Because I don't know if any given function depend of another one which I might not notice if don't inspect all the scripts, The other thing is that I was trying to compile in the cluster, not locally, but anyway I tried locally with something like this: % these paths will be added at compilation addpath('/home/joseluis/Documents/Software/fieldtrip-20160317'); ft_defaults, addpath('/home/joseluis/Documents/Software/fieldtrip-20160317/qsub'); addpath('/home/joseluis/Documents/Software/fieldtrip-20160317/fileio'); addpath('/home/joseluis/Documents/Software/fieldtrip-20160317/fileio/private'); % options: compile verbose, only use the toolboxes we really need % !!! runtime options should be preceded by - to work! % dont need to activate the -nojvm flag, can still plot from executable mcc('-mv', '-N', '-p', 'stats', '-p', 'images', '-p', 'signal', ... '-R', '-nodisplay', '-R', '-singleCompThread', ... '-a', '/home/joseluis/Documents/Software/fieldtrip-20160317/fileio/ft_read_event.m', ... '-a', '/home/joseluis/Documents/Software/fieldtrip-20160317/fileio/private/read_ctf_cls.m', ... '-a', '/home/joseluis/Documents/Software/fieldtrip-20160317/ft_preprocessing', ... 'FT_0.m'); However when I copy FT_0 and run_FT_0.sh and run the job I get: ./FT_0: error while loading shared libraries: libmwmclmcrrt.so.8.1: cannot open shared object file: No such file or directory Which looking in Internet seems to be associated to the fact I need to run a mrc installer in the cluster? thanks Jose On 15 June 2016 at 11:03, Anne Urai wrote: > Hi Jose, > > I ran into similar dependencies issues when compiling fieldtrip, and > converged on the following: > > > > % these paths will be added at compilation > > addpath(genpath('~/code/Tools')); > > addpath('~/Documents/fieldtrip'); > > ft_defaults; % add everything to path that we need > > > > addpath('~/Documents/fieldtrip/qsub'); > > addpath(genpath('~/Documents/fieldtrip/template/')); % neighbouring > matfile > > > > if strcmp(fname, 'B3a_clusterStatsERF.m') || strcmp(fname, > 'B3b_clusterStatsTFR.m'), > > addpath('~/Documents/fieldtrip/statfun/'); % need the combineClusters > mex file > > addpath('~/Documents/fieldtrip/external/spm8/'); % for neighbour > definition > > % > http://mailman.science.ru.nl/pipermail/fieldtrip/2014-July/008238.html > > end > > > > % options: compile verbose, only use the toolboxes we really need > > % !!! runtime options should be preceded by - to work! > > % dont need to activate the -nojvm flag, can still plot from executable > > if strcmp(fname, 'B3a_clusterStatsERF.m') || strcmp(fname, > 'B3b_clusterStatsTFR.m'), > > > > % statfun is called with a weird eval construction, so not recognized > > % by the dependency analysis of mcc > > mcc('-mv', '-N', '-p', 'stats', '-p', 'images', '-p', 'signal', ... > > '-R', '-nodisplay', '-R', '-singleCompThread', ... > > '-a', '~/Documents/fieldtrip/ft_statistics_montecarlo.m', ... > > '-a', '~/Documents/fieldtrip/statfun/ft_statfun_depsamplesT.m', > ... > > fname); > > else > > % no need to specify additional files > > mcc('-mv', '-N', '-p', 'stats', '-p', 'images', '-p', 'signal', ... > > '-R', '-nodisplay', '-R', '-singleCompThread', ... > > fname); > > end > > > So, the trick is to add everything to your path before comping, and then > use the -N option and define specific folders and possible functions using > -a. Make sure to only include additional subfolders from Fieldtrip (such as > the templates folder) only if you need them, for including them will > increase the size of the executable considerably. Also, some functions like > the ft_statistics ones are not directly called but instead evaluated using statmethod > = str2func(['ft_statistics_' cfg.method]) - this causes the dependency > analysis of the compiler to skip those functions, so you'll have to add > them manually. > > > PS a similar setup should work directly from the command line mcc, but I > found it easier to run ft_defaults from Matlab and then compile from within > a Matlab script. > > > Hope this helps! > > > — > Anne E. Urai, MSc > PhD student | Institut für Neurophysiologie und Pathophysiologie > Universitätsklinikum Hamburg-Eppendorf | Martinistrasse 52, 20246 | > Hamburg, Germany > www.anneurai.net / @AnneEUrai > > On 10 June 2016 at 10:42, Jose wrote: > >> dear list, >> >> I'm trying to analyse CTF MEG data through the Flemish Supercomputer >> Centre, >> I did a matlab script to run the foremost FT functions in my pipeline >> (ft_read_event, read_ctf_cls, and ft_preprocessing). This script works well >> when I run it locally. To compile my function in the supercomputing cluster >> I initially used addpath to include FT and ft_defaults to set the >> configuration inside my script, but this wasn't working. I tried using a >> startup.m script but this doesn't work neither. Maybe I'm missing >> something? My bash script to compile looks like this: >> >> #!/bin/bash >> module load MATLAB/2013b >> FTDIR=$VSC_DATA_VO_USER/fieldtrip-20160317 >> mcc -mv FT_0.m >> >> I also tried mcc -mv FT_0.m -I $FTDIR >> I run my compilation in the same folder where I have the FT folder. >> When I run my bash job I get always the same error: Undefined function >> 'ft_read_event' for input arguments of type 'char'. >> >> I've been looking elsewhere but still I haven't find a solution, >> >> Any hints about this would really appreciated, >> best, >> Jose >> >> _______________________________________________ >> fieldtrip mailing list >> fieldtrip at donders.ru.nl >> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip >> > > -- José Luis ULLOA FULGERI +32 (0)4 77 42 90 07 +32 (0)4 92 64 64 77 -------------- next part -------------- An HTML attachment was scrubbed... URL: From sauer.mpih at googlemail.com Thu Jun 16 10:57:48 2016 From: sauer.mpih at googlemail.com (Andreas Sauer) Date: Thu, 16 Jun 2016 10:57:48 +0200 Subject: [FieldTrip] Coordsys issue ft_sourceplot In-Reply-To: <8EF9FF29-549B-4E5C-9ED3-055147E8DFD0@donders.ru.nl> References: <08B10307-13ED-40F0-9F87-B50EEDAF25CC@gmail.com> <8EF9FF29-549B-4E5C-9ED3-055147E8DFD0@donders.ru.nl> Message-ID: Dear Jan-Mathijs, oh, sorry! Thanks for the hint. Now it works fine ;-). Best, Andreas Am Mittwoch, 15. Juni 2016 schrieb Schoffelen, J.M. (Jan Mathijs) : > Are you sure that you use the pos-field from the template, i.e. from the > standard_sourcemodel3d5mm? > > Best, > Jan-Mathijs > > On 15 Jun 2016, at 14:31, Andreas Sauer > wrote: > > Dear Jan, > > thank you for your email and the example code! > > I tried both ways to convert the coord systems, but unfortunately it still > doesn't work. > > Since I used the tutorial procedure to create my sourcemodel ( > http://www.fieldtriptoolbox.org/tutorial/sourcemodel#subject-specific_grids_that_are_equivalent_across_subjects_in_normalized_space) > I tried first with the easy way of only replacing the .pos field. But the > plots don't change, the sources are still rotated by 90 degrees. Actually, > the .pos fields are already the same before replacing it (see pic). Is > there some error in my code? > > > *% Step1: Load mri file* > *mri = > ft_read_mri('/data/home1/asauer/Projects/RPScZ/Analysis/Beamforming/MRI/HSM12_V2.mri');* > > *% Step 2: Segment the template brain and construct a volume conduction* > *% model (i.e. head model): this is needed for the inside/outside > detection of voxels* > *cfg = [];* > *cfg.output = 'brain';* > *segmentedmri = ft_volumesegment(cfg,anatomy);* > > *cfg = [];* > *cfg.method = 'singleshell';* > *vol = ft_prepare_headmodel(cfg,segmentedmri);* > *vol = ft_convert_units(vol,'m');* > *figure; ft_plot_sens(sens,'style','*b'); hold on; ft_plot_vol(vol)* > > *% Step 3: Load sourcemodel * > *load(fullfile(ft_path,'template/sourcemodel/standard_sourcemodel3d5mm'));* > *template_grid = sourcemodel;* > *clear sourcemodel* > > *% Step 4: Make sourcemodel* > *cfg = [];* > *cfg.grid.warpmni = 'yes';* > *cfg.grid.template = template_grid;* > *cfg.grid.nonlinear = 'yes';* > *cfg.mri = mri;* > *cfg.grid.unit = 'm';* > *grid = ft_prepare_sourcemodel(cfg);* > *figure; hold on;* > *ft_plot_vol(vol,'facecolor','cortex','edgecolor','none'); alpha 0.5; > camlight;* > *ft_plot_mesh(grid.pos(grid.inside,:));* > > > The only thing that is different from the tutorial is the unit > conversion... > > After that I tried the transformation. All worked well until the source > interpolation. ft_sourceinterpolation throws this error: > > *Attempted to access sel(1); index out of bounds because numel(sel)=0.* > > *Error in ft_sourceinterpolate>my_interpn (line 508)* > * ft_progress(sel(1)/num, 'interpolating %.1f%%\n', 100*sel(1)/num);* > > *Error in ft_sourceinterpolate (line 393)* > * interp.inside( sel) = my_interpn(double(functional.inside), ax(sel), > ay(sel), az(sel), 'nearest', cfg.feedback);* > > > which, to be honest, I don't really understand. Sorry... > > Best wishes, > > Andreas > > > 2016-06-14 9:41 GMT+02:00 Schoffelen, J.M. (Jan Mathijs) < > jan.schoffelen at donders.ru.nl > >: > >> Dear Andreas, >> >> after having calculated the sources of a MMN paradigm (4D-system), I’d >> like to plot the results on one of the anatomy template files in the >> fieldtrip directory (single_subj_T1_1mm.nii) or alternatively on a MNI T1 >> template file (mni_icbm152_t1_tal_nlin_sym_09a.nii). Unfortunately, this is >> not working well… As you can see on the attached picture, the functional >> data is rotated by 90 degrees. >> >> I guess that something gets mixed because of the different coordsystems >> of functional and anatomical data. The functional data is 4D, which means >> ALS orientation. The anatomical is MNI, so RAS orientation. The plotting >> works fine, if I use a mri file which was converted in field trip (V2.mri) >> and therefore is also in ALS orientation. However, the anatomy doesn’t look >> very pretty… >> >> >> Is there any way that I can transform the functional data to RAS >> orientation or the anatomical data to ALS orientation, respectively? >> >> >> I tried with ft_volumerealign. However, since the template file has no >> fiducials, it is hard to really precisely do this. >> >> >> Fair point. I would however do it the other way around, using the V2 to >> get the transformation from voxel space to MNI-RAS, and then use the >> inverse of the transformation on the functional data: in this case you >> could use ft_volumenormalise, with cfg.nonlinear = ‘no’. Alternatively, if >> you are using this procedure: >> http://www.fieldtriptoolbox.org/tutorial/sourcemodel#subject-specific_grids_that_are_equivalent_across_subjects_in_normalized_space, >> you could directly replace the source.pos of your functional data with the >> template.pos and then do the interpolation. >> >> To summarize: >> >> either: >> >> mri = ft_read_mri(‘V2.mri’); >> mri.coordsys = ‘bti’; >> >> cfg = []; >> cfg.nonlinear=’no’; >> mrin = ft_volumenormalise(cfg, mri); >> >> transform_vox2bti = mri.transform; >> transform_vox2spm = mrin.transform; >> transform_bti2spm = transform_vox2spm/transform_vox2bti >> source = ft_transform_geometry(transform_bti2spm, source); >> >> source_int = ft_sourceinterpolate(somecfg, source, niceanatomical); >> >> or: >> >> source.pos = templat.pos; >> source_int = ft_sourceinterpolate(somecfg, source, niceanatomical); >> >> Best, >> JM >> >> >> >> Any input on how to plot the sources on one of these nice anatomical >> files is highly appreciated! >> >> Thanks and best regards, >> >> Andreas >> >> >> -- >> Dipl.-Psych. Andreas Sauer >> Max Planck Institute for Brain Research >> Deutschordenstraße 46 >> 60528 Frankfurt am Main >> Germany >> >> T: +49 69 96769 278 >> F: +49 69 96769 327 >> Email: sauer.mpih at gmail.com >> >> www.brain.mpg.de >> _______________________________________________ >> fieldtrip mailing list >> fieldtrip at donders.ru.nl >> >> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip >> >> >> >> _______________________________________________ >> fieldtrip mailing list >> fieldtrip at donders.ru.nl >> >> https://mailman.science.ru.nl/mailman/listinfo/fieldtrip >> > > > > -- > Dipl.-Psych. Andreas Sauer > Max Planck Institute for Brain Research > Deutschordenstraße 46 > 60528 Frankfurt am Main > Germany > > T: +49 69 96769 278 > F: +49 69 96769 327 > Email: sauer.mpih at gmail.com > > www.brain.mpg.de > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > > https://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > > > -- Dipl.-Psych. Andreas Sauer Max Planck Institute for Brain Research Deutschordenstraße 46 60528 Frankfurt am Main Germany T: +49 69 96769 278 F: +49 69 96769 327 Email: sauer.mpih at gmail.com www.brain.mpg.de -------------- next part -------------- An HTML attachment was scrubbed... URL: From laxmi.shaw22 at gmail.com Thu Jun 16 15:47:48 2016 From: laxmi.shaw22 at gmail.com (Laxmi Shaw) Date: Thu, 16 Jun 2016 19:17:48 +0530 Subject: [FieldTrip] Queries related to 1D topo plots Message-ID: Dear fieldtrip, I am trying to plot the topo plot for my 2D and 1D data using the ft_plot_topo function. In the fieldtrip tutorial website there are examples provided for ft_topoplotER with input data taking a 3D matrix. Kindly provide me with a working example for ft_plot_topo taking an input example of a 2D and 1D input matrix. Thanks and Regards in advance -- Laxmi Shaw Research Scholar(PhD) IIT Kharagpur West Bengal Ph no-08388837821 -------------- next part -------------- An HTML attachment was scrubbed... URL: From s.borbaruah at student.utwente.nl Thu Jun 16 16:19:12 2016 From: s.borbaruah at student.utwente.nl (Soujata Borbaruah) Date: Thu, 16 Jun 2016 14:19:12 +0000 Subject: [FieldTrip] What is the data present in the covariance matrix after using ft_timelockanalysis Message-ID: Hello, I want to calculate the covariance of the data I provide. In the function ft_timelockanalysis there is a portion where the covariance is being normalised over all trials by the total number of samples in all trials. % normalize the covariance over all trials by the total number of samples in all trials if strcmp(cfg.covariance, 'yes') if strcmp(cfg.keeptrials,'yes') for i=1:ntrial if strcmp(cfg.removemean, 'yes') covsig(i,:,:) = covsig(i,:,:) / (numcovsigsamples(i)-1); else covsig(i,:,:) = covsig(i,:,:) / numcovsigsamples(i); end end else if strcmp(cfg.removemean, 'yes') covsig = squeeze(nansum(covsig, 1)) / (sum(numcovsigsamples)-ntrial); else covsig = squeeze(nansum(covsig, 1)) / sum(numcovsigsamples); end end end Please note that the cfg.removemean was selected as yes. Can someone please explain what is the final data present in my covariance matrix? Sent with MailTrack -------------- next part -------------- An HTML attachment was scrubbed... URL: From Alexander_Nakhnikian at hms.harvard.edu Thu Jun 16 17:00:02 2016 From: Alexander_Nakhnikian at hms.harvard.edu (Nakhnikian, Alexander) Date: Thu, 16 Jun 2016 15:00:02 +0000 Subject: [FieldTrip] What is the data present in the covariance matrix after using ft_timelockanalysis In-Reply-To: References: Message-ID: Hi Soujatta, I hope I understand your question. For demeaned data, the covariance is the expected value of sum(xy). For data with finite mean, we have to get the expected value of sum(x-mu(x))*sum(y-mu(y)). Removing the mean and trend doesn't have any impact on the denominators used to compute the unbiased estimate of E{sum(xy)}. The unbiased covariance estimated between x and y for a given trial is sum(xy)/(N_times-1), where N _times is the number of time points in an epoch. When averaging covariance matrices over multiple trials the denominator becomes N_trs-1. I hope that helps. Best, Alexander ________________________________ From: fieldtrip-bounces at science.ru.nl on behalf of Soujata Borbaruah Sent: Thursday, June 16, 2016 10:19:12 AM To: fieldtrip, donders Subject: [FieldTrip] What is the data present in the covariance matrix after using ft_timelockanalysis Hello, I want to calculate the covariance of the data I provide. In the function ft_timelockanalysis there is a portion where the covariance is being normalised over all trials by the total number of samples in all trials. % normalize the covariance over all trials by the total number of samples in all trials if strcmp(cfg.covariance, 'yes') if strcmp(cfg.keeptrials,'yes') for i=1:ntrial if strcmp(cfg.removemean, 'yes') covsig(i,:,:) = covsig(i,:,:) / (numcovsigsamples(i)-1); else covsig(i,:,:) = covsig(i,:,:) / numcovsigsamples(i); end end else if strcmp(cfg.removemean, 'yes') covsig = squeeze(nansum(covsig, 1)) / (sum(numcovsigsamples)-ntrial); else covsig = squeeze(nansum(covsig, 1)) / sum(numcovsigsamples); end end end Please note that the cfg.removemean was selected as yes. Can someone please explain what is the final data present in my covariance matrix? Sent with MailTrack -------------- next part -------------- An HTML attachment was scrubbed... URL: From E.Kinney-Lang at sms.ed.ac.uk Thu Jun 16 17:19:19 2016 From: E.Kinney-Lang at sms.ed.ac.uk (Eli Kinney-lang) Date: Thu, 16 Jun 2016 16:19:19 +0100 Subject: [FieldTrip] Possible Bug using ft_rejectvisual followed by ft_rejectartifact Message-ID: <20160616161919.1085638x99w53ocg@www.staffmail.ed.ac.uk> Hello all, This is my first post, so I apologize if I am not detailed enough/don't give enough correct information for my question. My name is Eli, and I am a researcher at the University of Edinburgh studying non-invasive brain-computer interfaces. Background and summary: In a side project, I am looking at using EEG to determine if there are cognitive difficulties in infants with epilepsy. In this project I am processing the EEG data from 20 channels recorded by a local hospital group. I have set up a fieldtrip processing pipeline in order to investigate this problem. Within the processing pipeline I have a two-step artifact removal chain. First, I visually remove obvious artifacts using the ft_rejectvisual and the cfg.method ='summary'. I then use automatic rejection based on z-value to remove any additional trials which contain muscle, jump or EOG artifacts. However, when I run the automatic rejection, if I have removed a single trial using the visual method, I the automatic rejection method calculates a z-value of '0' for all trials, failing to reject anything. If I do NOT reject anything from ft_rejectvisual (but still call the function) then the automatic rejection works properly. This is inconsistent, and does not happen for each subject, but does occur for some subjects. Other subjects have both functioning properly. Any suggestions as to what may be causing this would be appreciated. Expanded details: -Given a preprocessed EEG data I run ft_rejectvisual using cfg.method = 'summary' as the only cfg. -cfg for automatic rejection: cfg.trl = dat.cfg.trl; cfg.continuous = 'yes'; cfg.artfctdef.zvalue.channel = 'all'; cfg.artfctdef.zvalue.cutoff = 2; cfg.artfctdef.zvalue.trlpadding = 0; cfg.artfctdef.zvalue.artpadding = 0.1; cfg.artfctdef.zvalue.fltpadding = 0.2; cfg.artfctdef.zvalue.bpfilter = 'yes'; cfg.artfctdef.zvalue.bpfreq = [110 140]; cfg.artfctdef.zvalue.bpfiltord = 8; cfg.artfctdef.zvalue.bpfilttype = 'but'; cfg.artfctdef.zvalue.hilbert = 'yes'; cfg.artfctdef.zvalue.boxcar = 0.2; [~, artifact_muscle] = ft_artifact_zvalue(cfg,dat); cfg = []; -data structure: dat = hdr: [1x1 struct] label: {20x1 cell} fsample: 511 trial: {1x94 cell} time: {1x94 cell} sampleinfo: [94x2 double] cfg: [1x1 struct] I cannot upload the data due to confidentiality, but am glad to clarify any questions/provide more information where needed. Is this user error, or is it possibly a bug? Any recommendations are welcome. Thank you. Cheers, Eli Kinney-Lang -- The University of Edinburgh is a charitable body, registered in Scotland, with registration number SC005336. From carine.signoret at liu.se Thu Jun 16 23:15:35 2016 From: carine.signoret at liu.se (Carine Signoret) Date: Thu, 16 Jun 2016 23:15:35 +0200 Subject: [FieldTrip] ft_definetrial header format problem Message-ID: Dear list, I am sorry to ask a so naive question, but I would like to know why it is not possible to read a .mat file when using the function ft_definetrial? Are we only allowed to read a .fif file for defining the trial or is there something that I am missing? Thank you for your help, Carine From stephen.whitmarsh at gmail.com Thu Jun 16 23:24:08 2016 From: stephen.whitmarsh at gmail.com (Stephen Whitmarsh) Date: Thu, 16 Jun 2016 23:24:08 +0200 Subject: [FieldTrip] ft_definetrial header format problem In-Reply-To: References: Message-ID: Hi Carine, Maybe what you are looking for is to enter your data as a second argument in ft_redefinetrial, as in: newdata = ft_redefinetrial(cfg,olddata). You can read that data from a matlab file before that, as in: olddata = load(filename). Cheers, Stephen On 16 June 2016 at 23:15, Carine Signoret wrote: > Dear list, > > I am sorry to ask a so naive question, but I would like to know why it is > not possible to read a .mat file when using the function ft_definetrial? > Are we only allowed to read a .fif file for defining the trial or is there > something that I am missing? > > Thank you for your help, > > Carine > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > https://mailman.science.ru.nl/mailman/listinfo/fieldtrip > -------------- next part -------------- An HTML attachment was scrubbed... URL: From pgoodin at swin.edu.au Fri Jun 17 03:19:28 2016 From: pgoodin at swin.edu.au (Peter Goodin) Date: Fri, 17 Jun 2016 01:19:28 +0000 Subject: [FieldTrip] LCMV returns no time series? In-Reply-To: <1465999857376.33093@cfin.au.dk> References: , <1465999857376.33093@cfin.au.dk> Message-ID: Hi Sarang, Regarding your point on that I should have the time series in source.avg.mom, the function only returns an n x 1 matrix. I've checked the averaged data and it does contain the channel x time series in av.avg, so I'm not really sure what's going on. Peter _______________________ Dr Peter Goodin, Brain and Psychological Sciences Research Centre (BPsyC) Swinburne University, Hawthorn, Vic, 3122 ________________________________________ From: fieldtrip-bounces at science.ru.nl [fieldtrip-bounces at science.ru.nl] on behalf of Sarang S. Dalal [sarang at cfin.au.dk] Sent: Thursday, 16 June 2016 12:10 AM To: FieldTrip discussion list Subject: Re: [FieldTrip] LCMV returns no time series? Hi Peter, If you've used the 'lcmv' method for ft_sourceanalysis, you ought to have the time series already contained in source.avg.mom. I've been working a lot lately on improving the LCMV functionality, but unfortunately haven't had a chance to document much yet. Especially if you are not contrasting different conditions, you might want to try these parameters: cfg.lcmv.weightnorm = 'nai'; % this is a new option :-) cfg.lcmv.fixedori = 'yes'; I also prefer to turn off reducerank, but YMMV: cfg.lcmv.reducerank = 'no'; Finally I've also contributed a viewer that will greatly help visualizing your virtual time series together with the MRI. You can find it in the latest distributions of FieldTrip under fieldtrip/contrib/nutmegtrip. You'll also need a full version of SPM8 in your path (the external in FieldTrip doesn't have all the necessary functions). You​​ can use it like this: cfg = []; cfg.mripath = '/path/to/mri/nii' % must be in nifti (nii) format cfg.funparameter = 'avg.mom' % cfg.atlas = ft_read_atlas('ROI_MNI_V4.nii'); % [optional] you can get atlas labels, if your MRI and grid points are based on the MNI grid nmt_sourceplot_spm8(cfg,ft_convert_units(source,'mm')); Cheers, Sarang ________________________________ From: fieldtrip-bounces at science.ru.nl on behalf of Peter Goodin Sent: Wednesday, June 15, 2016 3:32 PM To: FieldTrip discussion list Subject: [FieldTrip] LCMV returns no time series? Hi FieldTrip list, I'm using LCMV on averaged data (covariancewindow='all') but find the returned source estimates only have a single point. Is there a way to specify the analysis returns the time series for each grid point? Thanks, Peter From rgilley at deakin.edu.au Fri Jun 17 07:36:37 2016 From: rgilley at deakin.edu.au (RYAN GILLEY) Date: Fri, 17 Jun 2016 05:36:37 +0000 Subject: [FieldTrip] SEP Recording In-Reply-To: References: Message-ID: Hey Nick, Thank you for the help! I actually managed to configure it using that port after I read this. I have figured out my issue lies within my unit. Much appreciated again! Regards, Ryan From: fieldtrip-bounces at science.ru.nl [mailto:fieldtrip-bounces at science.ru.nl] On Behalf Of Balderston, Nicholas (NIH/NIMH) [F] Sent: June 15, 2016 1:14 AM To: FieldTrip discussion list Subject: Re: [FieldTrip] SEP Recording Hey Ryan, I am not sure that I understand your problem completely, so this solution might not be that helpful. That being said, the DS7A has a BNC out port on the back of the unit, which sends its own TTL pulses whenever it delivers a stimulation. If you can add this as a channel in your recordings, it may give you more accurate timing information. -nick ________________________________ From: RYAN GILLEY [rgilley at deakin.edu.au] Sent: Tuesday, June 14, 2016 12:13 AM To: fieldtrip at tortel.science.ru.nl Subject: [FieldTrip] SEP Recording Hi Everyone, This is not a straight forward question for Fieldtrip but with the experience in the group I figured it would be good to ask. Currently I am using a Neuroscan 64 channel EEG system to acquire sensory evoked potential (SEP) data. I am administering TTL pulses from an external system (Digitimer DS7a) run through Powerlab 26T using Labchart's event manager to generate the stimulations. My goal is to attempt to localize a couple of the Somatosensory peaks. My problem at the moment is that on my recording the marker (spike 1) and the stimulus artifact show up as displayed below. I have found that the time interval is inconsistent and because of this I am having trouble aligning the stimulus artifact to average. Is there another way of configuring this so that it works more efficiently or if anyone has used these tools (digitimer and powerlab) with the neuroscan system before, is there any advice anyone can give. Thanks in advance, Ryan [cid:image001.png at 01D1C8AE.0B51CCF0] -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image001.png Type: image/png Size: 70148 bytes Desc: image001.png URL: From zsoltturi at gmail.com Fri Jun 17 09:31:58 2016 From: zsoltturi at gmail.com (Zsolt Turi) Date: Fri, 17 Jun 2016 09:31:58 +0200 Subject: [FieldTrip] Difference in trial number per condition Message-ID: Hi, I was wondering if FieldTrip has an optimized solution for such situations when the amount of trials in one condition markedly differs from the number of trials in the other (e.g., the ratio is 1:3 or 1:4). On the website I have found that this issue was already discussed, however, it is not clear to me whether this was indeed addressed by a FieldTrip function. Below is the link about the question I was referring to: http://www.fieldtriptoolbox.org/faq/how_does_a_difference_in_trial_numbers_per_condition_affect_my_statistical_test In case there is no such a function, could someone provide me a rough procedure that is methodologically acceptable in the scientific community to compensate for this issue? I am interested both in conceptual and implementational aspects. I would like to compare TFR or WPLI measures between two conditions and use non-parametric cluster-based permutation test for statistical analysis. My data is characterized by a within-subjects design, in case this is relevant information. Thanks for your input in advance, Zsolt -------------- next part -------------- An HTML attachment was scrubbed... URL: From s.borbaruah at student.utwente.nl Fri Jun 17 10:11:15 2016 From: s.borbaruah at student.utwente.nl (Soujata Borbaruah) Date: Fri, 17 Jun 2016 10:11:15 +0200 Subject: [FieldTrip] What is the data present in the covariance matrix after using ft_timelockanalysis In-Reply-To: References: Message-ID: Hello Alexander, Thank you for your feedback. So is it safe to say that the final data present in the covariance matrix (MxM where M is the number of channels) is the average of the covariance matrices over multiple trials? Regards, Soujata. Sent with MailTrack On Thu, Jun 16, 2016 at 5:00 PM, Nakhnikian, Alexander < Alexander_Nakhnikian at hms.harvard.edu> wrote: > Hi Soujatta, > > > I hope I understand your question. > > > For demeaned data, the covariance is the expected value of sum(xy). For > data with finite mean, we have to get the expected value of > sum(x-mu(x))*sum(y-mu(y)). Removing the mean and trend doesn't have any > impact on the denominators used to compute the unbiased estimate of > E{sum(xy)}. The unbiased covariance estimated between x and y for a given > trial is sum(xy)/(N_times-1), where N _times is the number of time points > in an epoch. When averaging covariance matrices over multiple trials the > denominator becomes N_trs-1. I hope that helps. > > > Best, > > > Alexander > ------------------------------ > *From:* fieldtrip-bounces at science.ru.nl > on behalf of Soujata Borbaruah > *Sent:* Thursday, June 16, 2016 10:19:12 AM > *To:* fieldtrip, donders > *Subject:* [FieldTrip] What is the data present in the covariance matrix > after using ft_timelockanalysis > > Hello, > > I want to calculate the covariance of the data I provide. In the function > ft_timelockanalysis there is a portion where the covariance is being > normalised over all trials by the total number of samples in all trials. > > > % normalize the covariance over all trials by the total number of samples > in all trials > if strcmp(cfg.covariance, 'yes') > if strcmp(cfg.keeptrials,'yes') > for i=1:ntrial > if strcmp(cfg.removemean, 'yes') > covsig(i,:,:) = covsig(i,:,:) / (numcovsigsamples(i)-1); > else > covsig(i,:,:) = covsig(i,:,:) / numcovsigsamples(i); > end > end > else > if strcmp(cfg.removemean, 'yes') > covsig = squeeze(nansum(covsig, 1)) / (sum(numcovsigsamples)-ntrial); > else > covsig = squeeze(nansum(covsig, 1)) / sum(numcovsigsamples); > > end > end > end > > Please note that the cfg.removemean was selected as yes. > > Can someone please explain what is the final data present in my covariance > matrix? > > > > Sent with MailTrack > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > https://mailman.science.ru.nl/mailman/listinfo/fieldtrip > -------------- next part -------------- An HTML attachment was scrubbed... URL: From stan.vanpelt at donders.ru.nl Fri Jun 17 10:51:12 2016 From: stan.vanpelt at donders.ru.nl (Pelt, S. van (Stan)) Date: Fri, 17 Jun 2016 08:51:12 +0000 Subject: [FieldTrip] Difference in trial number per condition In-Reply-To: References: Message-ID: <7CCA2706D7A4DA45931A892DF3C2894C3F956C3C@exprd03.hosting.ru.nl> Hi Zsolt, The amount to which this may be a concern will depend on the measures you want to compare. Also, the risk of drawing incorrect (qualitative) conclusions will of course mainly be large around your statistical threshold value (e.g. p=0.05). Power differences might become biased if groups have unequal size, power begin a squared value. See for a suggested numerical correction method for this, when comparing power spectra or e.g. Bokil et al., 2007 (http://www.ncbi.nlm.nih.gov/pubmed/16945422), but I assume there are also other solutions going around. Best, Stan From: fieldtrip-bounces at science.ru.nl [mailto:fieldtrip-bounces at science.ru.nl] On Behalf Of Zsolt Turi Sent: vrijdag 17 juni 2016 9:32 To: FieldTrip discussion list Subject: [FieldTrip] Difference in trial number per condition Hi, I was wondering if FieldTrip has an optimized solution for such situations when the amount of trials in one condition markedly differs from the number of trials in the other (e.g., the ratio is 1:3 or 1:4). On the website I have found that this issue was already discussed, however, it is not clear to me whether this was indeed addressed by a FieldTrip function. Below is the link about the question I was referring to: http://www.fieldtriptoolbox.org/faq/how_does_a_difference_in_trial_numbers_per_condition_affect_my_statistical_test In case there is no such a function, could someone provide me a rough procedure that is methodologically acceptable in the scientific community to compensate for this issue? I am interested both in conceptual and implementational aspects. I would like to compare TFR or WPLI measures between two conditions and use non-parametric cluster-based permutation test for statistical analysis. My data is characterized by a within-subjects design, in case this is relevant information. Thanks for your input in advance, Zsolt -------------- next part -------------- An HTML attachment was scrubbed... URL: From dlozanosoldevilla at gmail.com Fri Jun 17 11:02:00 2016 From: dlozanosoldevilla at gmail.com (Diego Lozano-Soldevilla) Date: Fri, 17 Jun 2016 11:02:00 +0200 Subject: [FieldTrip] Difference in trial number per condition In-Reply-To: <7CCA2706D7A4DA45931A892DF3C2894C3F956C3C@exprd03.hosting.ru.nl> References: <7CCA2706D7A4DA45931A892DF3C2894C3F956C3C@exprd03.hosting.ru.nl> Message-ID: Hi Zsolt, To complement Stan's suggestions, in case of power differences between conditions, you could use ft_stratify: http://www.fieldtriptoolbox.org/example/stratify best, Diego On 17 June 2016 at 10:51, Pelt, S. van (Stan) wrote: > Hi Zsolt, > > > > The amount to which this may be a concern will depend on the measures you > want to compare. Also, the risk of drawing incorrect (qualitative) > conclusions will of course mainly be large around your statistical > threshold value (e.g. p=0.05). Power differences might become biased if > groups have unequal size, power begin a squared value. See for a suggested > numerical correction method for this, when comparing power spectra or e.g. > Bokil et al., 2007 (http://www.ncbi.nlm.nih.gov/pubmed/16945422), but I > assume there are also other solutions going around. > > > > Best, > > Stan > > > > *From:* fieldtrip-bounces at science.ru.nl [mailto: > fieldtrip-bounces at science.ru.nl] *On Behalf Of *Zsolt Turi > *Sent:* vrijdag 17 juni 2016 9:32 > *To:* FieldTrip discussion list > *Subject:* [FieldTrip] Difference in trial number per condition > > > > Hi, > > > > I was wondering if FieldTrip has an optimized solution for such situations > when the amount of trials in one condition markedly differs from the number > of trials in the other (e.g., the ratio is 1:3 or 1:4). > > > > On the website I have found that this issue was already discussed, > however, it is not clear to me whether this was indeed addressed by a > FieldTrip function. Below is the link about the question I was referring > to: > > > > > http://www.fieldtriptoolbox.org/faq/how_does_a_difference_in_trial_numbers_per_condition_affect_my_statistical_test > > > > In case there is no such a function, could someone provide me a rough > procedure that is methodologically acceptable in the scientific community > to compensate for this issue? > > > > I am interested both in conceptual and implementational aspects. I would > like to compare TFR or WPLI measures between two conditions and use > non-parametric cluster-based permutation test for statistical analysis. My > data is characterized by a within-subjects design, in case this is relevant > information. > > > > Thanks for your input in advance, > > Zsolt > > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > https://mailman.science.ru.nl/mailman/listinfo/fieldtrip > -------------- next part -------------- An HTML attachment was scrubbed... URL: From zsoltturi at gmail.com Fri Jun 17 13:53:17 2016 From: zsoltturi at gmail.com (Zsolt Turi) Date: Fri, 17 Jun 2016 13:53:17 +0200 Subject: [FieldTrip] Difference in trial number per condition In-Reply-To: References: <7CCA2706D7A4DA45931A892DF3C2894C3F956C3C@exprd03.hosting.ru.nl> Message-ID: Hi Stan and Diego, thank you for the input(s), I will try out these procedures. Cheers, Zsolt 2016-06-17 11:02 GMT+02:00 Diego Lozano-Soldevilla < dlozanosoldevilla at gmail.com>: > Hi Zsolt, > To complement Stan's suggestions, in case of power differences between > conditions, you could use ft_stratify: > http://www.fieldtriptoolbox.org/example/stratify > best, > Diego > > > > On 17 June 2016 at 10:51, Pelt, S. van (Stan) > wrote: > >> Hi Zsolt, >> >> >> >> The amount to which this may be a concern will depend on the measures you >> want to compare. Also, the risk of drawing incorrect (qualitative) >> conclusions will of course mainly be large around your statistical >> threshold value (e.g. p=0.05). Power differences might become biased if >> groups have unequal size, power begin a squared value. See for a suggested >> numerical correction method for this, when comparing power spectra or e.g. >> Bokil et al., 2007 (http://www.ncbi.nlm.nih.gov/pubmed/16945422), but I >> assume there are also other solutions going around. >> >> >> >> Best, >> >> Stan >> >> >> >> *From:* fieldtrip-bounces at science.ru.nl [mailto: >> fieldtrip-bounces at science.ru.nl] *On Behalf Of *Zsolt Turi >> *Sent:* vrijdag 17 juni 2016 9:32 >> *To:* FieldTrip discussion list >> *Subject:* [FieldTrip] Difference in trial number per condition >> >> >> >> Hi, >> >> >> >> I was wondering if FieldTrip has an optimized solution for such >> situations when the amount of trials in one condition markedly differs from >> the number of trials in the other (e.g., the ratio is 1:3 or 1:4). >> >> >> >> On the website I have found that this issue was already discussed, >> however, it is not clear to me whether this was indeed addressed by a >> FieldTrip function. Below is the link about the question I was referring >> to: >> >> >> >> >> http://www.fieldtriptoolbox.org/faq/how_does_a_difference_in_trial_numbers_per_condition_affect_my_statistical_test >> >> >> >> In case there is no such a function, could someone provide me a rough >> procedure that is methodologically acceptable in the scientific community >> to compensate for this issue? >> >> >> >> I am interested both in conceptual and implementational aspects. I would >> like to compare TFR or WPLI measures between two conditions and use >> non-parametric cluster-based permutation test for statistical analysis. My >> data is characterized by a within-subjects design, in case this is relevant >> information. >> >> >> >> Thanks for your input in advance, >> >> Zsolt >> >> >> >> _______________________________________________ >> fieldtrip mailing list >> fieldtrip at donders.ru.nl >> https://mailman.science.ru.nl/mailman/listinfo/fieldtrip >> > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > https://mailman.science.ru.nl/mailman/listinfo/fieldtrip > -- Post-doctoral Research Fellow Department of Clinical Neurophysiology Georg-August University, Göttingen Robert-Koch-Str. 40 37075 Goettingen -------------- next part -------------- An HTML attachment was scrubbed... URL: From radiotek at gmail.com Fri Jun 17 16:53:19 2016 From: radiotek at gmail.com (teki) Date: Fri, 17 Jun 2016 15:53:19 +0100 Subject: [FieldTrip] Announcing the Timing Research Forum Message-ID: Dear all, We are pleased to announce the establishment of the Timing Research Forum (TRF), an open community for promoting multidisciplinary research and collaborative work on temporal processing and time perception - http://timingforum.org/. We hope that TRF will serve as a common platform for brain research on all relevant aspects of timing in both health and disease using a combination of methodologies including human psychophysics, cognitive measurement techniques including fMRI, M/EEG, TMS etc., as well as neurophysiological and imaging work in a variety of animal models. We invite you to become members of TRF and participate in advancing the state of timing research through discussions, collaborations, and sharing of resources including code, protocols, data etc. There are no membership fees and the only requirement is to actively pursue research on timing. As a member of TRF, you will have a profile on the website, all your publications will be featured on the publications page, receive members-only newsletters and regular updates on the latest news from the field of timing, and be part of a vibrant research community. To join us, please visit this page - http://timingforum.org/membership/ TRF will also organize annual conferences starting from 2017 that aim to bring together all researchers on timing for highly interactive and open discussions on the latest research in the field - http://timingforum.org/conferences/ Please feel free to follow TRF on Twitter and Facebook for regular updates from the field of timing, and share information about TRF with your colleagues. We look forward to welcoming you to TRF and hope that you will find it a useful platform and contribute actively to the community. With best wishes, Sundeep Teki --- Sundeep Teki PhD Sir Henry Wellcome Fellow Auditory Neuroscience Group Department of Physiology, Anatomy & Genetics University of Oxford South Parks Road, Oxford OX1 3QX Email | Web | Twitter & Argiro Vatakis --- Argiro Vatakis PhD Cognitive Systems Research Institute http://csri.gr/researchers/argiro-vatakis http://www.argirovatakis.com -------------- next part -------------- An HTML attachment was scrubbed... URL: From sarang at cfin.au.dk Fri Jun 17 18:38:53 2016 From: sarang at cfin.au.dk (Sarang S. Dalal) Date: Fri, 17 Jun 2016 16:38:53 +0000 Subject: [FieldTrip] help diagnosing issues with source analysis (pathological brain) In-Reply-To: <5F2CACF1-340B-4514-8B1B-8F477EC8FA9C@donders.ru.nl> References: <575C5D78.7030807@gmail.com> , <5F2CACF1-340B-4514-8B1B-8F477EC8FA9C@donders.ru.nl> Message-ID: <1466181533308.98968@cfin.au.dk> Hi Vitória, I would just add that there is a provision in SPM's normalization procedure to weight or mask areas of your patient's MRI, which you can take advantage of to get much better results. (FieldTrip calls SPM functions behind-the-scenes to implement normalization.) First, you might want to see how 'strange' the default normalization looks. Right before running 'ft_volumenormalise', just run: spm_figure('Create','Graphics'); Then, after ft_volumenormalise finishes, you should see the normalization results compared against the MNI template image. Probably, you will see that they don't match very well. I'm not sure yet how to implement this in your FieldTrip workflow, but you can get started by working with SPM8 directly. Several years ago, we managed to successfully normalize MRIs of patients with brain tumors. We did this by 'painting' the pathological areas with MRIcro to create a mask, saving this mask into its own (binary) MRI file. This masked MRI can then be used by SPM as a 'weight' during the normalization process. You'll want normal brain to have a weight of 1 and the tumor zone to have a weight of 0. Probably this can be converted into command-line functions, but if you use the SPM8 GUI, you would go to "Normalise (Estimate and Write)", select your patient's MRI as the 'Source Image' and 'Images to Write', and the tumor mask as 'Source Weighting Image'. You probably have a T1 MRI, so under 'Template Image' you would select T1.nii. Again, it'll show you the normalized result compared with the template at the end of the process, and hopefully it will have gone better this time. :-) Note that SPM will want to work with Analyze (hdr/img) or Nifti (nii) files, so you'll have to convert them as appropriate. Maybe somebody else can fill you in on the best way to import the resulting normalized MRI back into your FieldTrip pipeline. Cheers Sarang ________________________________ From: fieldtrip-bounces at science.ru.nl on behalf of Schoffelen, J.M. (Jan Mathijs) Sent: Tuesday, June 14, 2016 9:31 AM To: FieldTrip discussion list Subject: Re: [FieldTrip] help diagnosing issues with source analysis (pathological brain) Hi Vitória, To me it looks as if most of the stuff you describe works as expected, i.e. it works well or it gives funny results, apart from the non-linear normalisation. The extremely distorted warped grid points may be due to the patient’s anatomical being pathological, causing the normalisation to converge to a very strange solution. Now, with respect to the plotting/interpolation: if the coordinate systems of the objects you are overlaying don’t match, you get funny results. This is the case for the sourceplot with the surface method (where the default cortical surface is in MNI-RAS), and your functional image is in CTF’s ALS, as well as for the sourceplot with the ortho method, using the blurry template from SPM (which is also in MNI-RAS). If you want these to match up, you could replace the source positions in your functional image with the ones from the standard grid, because you assume topological equivalence as per the inverse warping strategy applied in the creation of the beamformer grid. So, long story short: it seems that your source analysis just went fine, but you are confused by the different coordinate systems. Best, JM On 13 Jun 2016, at 11:02, Vitoria Piai > wrote: Hi Cris, that makes sense, except that the .mri file I'm getting from the hospital should already contain the right fiducial coordinates (or so I was told by the MEG technician). Maybe the issue is that FieldTrip is not getting these coordinates right from the .mri file if I don't run it through ft_volumerealign first. Any thoughts anyone? Thanks again On 12 June 2016 at 13:55, Cristiano Micheli > wrote: Dear Vitoria I had the same problem when I tried to coregister functional and anatomical data without transitioning through a head-referenced coordinates system. I solved the problem by using ft_volumerealign and selecting comparable anatomical fiducials for different subjects (nasion, left, right,..) BEFORE volume normalization. Maybe a hint towards the solution? Cheers Cris On Sat, Jun 11, 2016 at 8:50 PM, Vitória Piai > wrote: Hi everyone, I was hoping someone could help me figure out where my source analysis is going wrong. I have data on brain tumour patients (MRIs are from prior to tumour resection). From the hospital (using CTF), I receive .mri files that already have fiducial points saved as far as I was told. I then reslice and segment the .mri file, after reading it with ft_read_mri mri_reslice = ft_volumereslice([], mri); segmentedmri = ft_volumesegment([], mri_reslice); This seems to be working: Plotting headmodel and sensors, it looks like they are aligned: If I compute the source model with MNI-warping (non-linear transformation), I get something that doesn't seem right. I don't know if this is because these are not normal brains to start with: With linear transformation, things look better: One of my questions is what the consequences are of using linear transformation for the MNI warping given the pathological nature of these brains. Then, the next issue is this result when projecting the source to the surface: This happens regardless of whether I use the MNI-warped grid interpolated to the MNI template, or the patient's individual grid skipping the MNI normalisation step, interpolated to the patient's own T1. But if I plot with 'ortho' method, then I see that the MNI-warped and interpolated source data is misaligned, but the patient-native space one isn't. I can't make sense of this anymore; I've been trying all kinds of things that don't work, so I was wondering whether anyone has an idea of what could be going on by looking at these figures. Is it an error already at the level of alignment of the fiducials? Or is it due to the MNI-warping? Or a combination of issues? Thanks very much for any kind of help! Vitoria _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -------------- next part -------------- An HTML attachment was scrubbed... URL: From amickan1990 at gmail.com Fri Jun 17 18:43:40 2016 From: amickan1990 at gmail.com (Anne Mickan) Date: Fri, 17 Jun 2016 18:43:40 +0200 Subject: [FieldTrip] Theoretical question about cluster-based permutation tests Message-ID: Dear all, I have a theoretical question about cluster-based permutation tests. I've been reading through the website and through Maris & Oostenveld (2007) and I watched the video, all of which left me with the feeling I have a good understanding of *what* the permutation tests is doing (I've also implemented it successfully for my own data). However, I don't yet entirely understand how this test statistic avoids the multiple comparison problem. Particularly I'm wondering how it is that all the tests done initially on a sample-by-sample-basis (step 1 as described in Maris & Oostenveld, p. 180) and the threshold that is used to select samples for clustering (step 2) does not affect the FA. It is referred to a later section, which, however, does not clear it up for me. So I was hoping to get another explanation to fully understand this issue. Thanks a lot in advance. Best, Anne -------------- next part -------------- An HTML attachment was scrubbed... URL: From sarang at cfin.au.dk Fri Jun 17 18:54:04 2016 From: sarang at cfin.au.dk (Sarang S. Dalal) Date: Fri, 17 Jun 2016 16:54:04 +0000 Subject: [FieldTrip] LCMV returns no time series? In-Reply-To: References: , <1465999857376.33093@cfin.au.dk>, Message-ID: <1466182444559.4487@cfin.au.dk> Hi Peter, You likely have an Nvoxels x 1 cell array, which is as expected. Cells corresponding to voxels outside the brain will be empty, while the cells corresponding to voxels inside the brain should each contain an array of size 1xNsamples. (So effectively, you have Nvoxels x Nsamples, just repackaged into a cell array.) Nutmegtrip is designed to visualize and navigate this entire output on your subject's MRI, or you can pull out some voxels of interest and plot the time series with ft_databrowser or with matlab's built-in plot function. Cheers Sarang ________________________________________ From: fieldtrip-bounces at science.ru.nl on behalf of Peter Goodin Sent: Friday, June 17, 2016 3:19 AM To: FieldTrip discussion list Subject: Re: [FieldTrip] LCMV returns no time series? Hi Sarang, Regarding your point on that I should have the time series in source.avg.mom, the function only returns an n x 1 matrix. I've checked the averaged data and it does contain the channel x time series in av.avg, so I'm not really sure what's going on. Peter _______________________ Dr Peter Goodin, Brain and Psychological Sciences Research Centre (BPsyC) Swinburne University, Hawthorn, Vic, 3122 ________________________________________ From: fieldtrip-bounces at science.ru.nl [fieldtrip-bounces at science.ru.nl] on behalf of Sarang S. Dalal [sarang at cfin.au.dk] Sent: Thursday, 16 June 2016 12:10 AM To: FieldTrip discussion list Subject: Re: [FieldTrip] LCMV returns no time series? Hi Peter, If you've used the 'lcmv' method for ft_sourceanalysis, you ought to have the time series already contained in source.avg.mom. I've been working a lot lately on improving the LCMV functionality, but unfortunately haven't had a chance to document much yet. Especially if you are not contrasting different conditions, you might want to try these parameters: cfg.lcmv.weightnorm = 'nai'; % this is a new option :-) cfg.lcmv.fixedori = 'yes'; I also prefer to turn off reducerank, but YMMV: cfg.lcmv.reducerank = 'no'; Finally I've also contributed a viewer that will greatly help visualizing your virtual time series together with the MRI. You can find it in the latest distributions of FieldTrip under fieldtrip/contrib/nutmegtrip. You'll also need a full version of SPM8 in your path (the external in FieldTrip doesn't have all the necessary functions). You​​ can use it like this: cfg = []; cfg.mripath = '/path/to/mri/nii' % must be in nifti (nii) format cfg.funparameter = 'avg.mom' % cfg.atlas = ft_read_atlas('ROI_MNI_V4.nii'); % [optional] you can get atlas labels, if your MRI and grid points are based on the MNI grid nmt_sourceplot_spm8(cfg,ft_convert_units(source,'mm')); Cheers, Sarang ________________________________ From: fieldtrip-bounces at science.ru.nl on behalf of Peter Goodin Sent: Wednesday, June 15, 2016 3:32 PM To: FieldTrip discussion list Subject: [FieldTrip] LCMV returns no time series? Hi FieldTrip list, I'm using LCMV on averaged data (covariancewindow='all') but find the returned source estimates only have a single point. Is there a way to specify the analysis returns the time series for each grid point? Thanks, Peter _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl https://mailman.science.ru.nl/mailman/listinfo/fieldtrip From neuro at aewald.net Sun Jun 19 23:21:11 2016 From: neuro at aewald.net (Arne Ewald) Date: Sun, 19 Jun 2016 23:21:11 +0200 Subject: [FieldTrip] Biomag 2016 Brain Connectivity Analysis Competition Message-ID: Dear colleagues, [apologies for cross-postings] we have just launched a data analysis competition on brain connectivity analysis using EEG and MEG. Detailed information on the challenge and the data to be analyzed can be found at http://bbci.de/supplementary/EEGconnectivity/BBCB.html . At this website, we also offer a basic Matlab-based software framework for generating EEG/MEG data in a realistic head model, plotting results, etc. You and your colleagues are warmly invited to participate in the challenge. Please feel free to pass on this link to anyone else who might be interested. Besides active participation we would also be very happy to just hear your general opinion on the design of the challenge, and about any suggestions for extension (in the future). Our challenge is on of three official data analysis competitions of this year's BIOMAG conference. The invitation to participate in all three challenges is pasted below for your convenience. With best wishes, Arne Ewald and Stefan Haufe -------- Forwarded Message -------- Subject: [megcommunity] Biomag 2016 Data Analysis Competition Date: Mon, 30 May 2016 16:56:31 +0200 From: Ole Jensen Reply-To: Ole Jensen To: MEGCOMMUNITY at JISCMAIL.AC.UK Dear all, We are happy to announce three challenges for the 'Data Analysis Competition' at Biomag 2016. Please see details at http://www.biomag2016.org/data_analysis_competition.php The aim of the competitions is to promote the development and application of new analysis techniques. The challenges will help to elucidate pros and cons of different techniques and attract experts from outside the MEG field. The winners of the competition will be given the opportunity to present their proposal at the Biomag meeting in Seoul (Oct 1-6) in order to spark discussions on analysis. Please encourage colleagues to participate! Best regards, Ole Jensen -- Prof. dr. Ole Jensen http://www.neuosc.com -------------- next part -------------- An HTML attachment was scrubbed... URL: From pooneh.baniasad at gmail.com Mon Jun 20 09:03:51 2016 From: pooneh.baniasad at gmail.com (pooneh baniasad) Date: Mon, 20 Jun 2016 11:33:51 +0430 Subject: [FieldTrip] Generating EEG Message-ID: Dear community, My name is Pouneh Baniasad and I am working on my master thesis in Tehran University of Medical Sciences. I'm trying to generate EEG signal without using any raw data. Actually I want to completely simulating EEG. My question is can Fieldtrip simulate EEG signal? If the answer is yes, what's the procedure? Is it using dipole model or anything e -- Bests Pouneh Baniasad -------------- next part -------------- An HTML attachment was scrubbed... URL: From pgoodin at swin.edu.au Mon Jun 20 11:59:09 2016 From: pgoodin at swin.edu.au (Peter Goodin) Date: Mon, 20 Jun 2016 09:59:09 +0000 Subject: [FieldTrip] LCMV returns no time series? In-Reply-To: <1466182444559.4487@cfin.au.dk> References: , <1465999857376.33093@cfin.au.dk>, , <1466182444559.4487@cfin.au.dk> Message-ID: Hi Sarang, Not sure how I missed that! Thank you for outlining it so succinctly, greatly appreciated! Peter _______________________ Dr Peter Goodin, Brain and Psychological Sciences Research Centre (BPsyC) Swinburne University, Hawthorn, Vic, 3122 ________________________________________ From: fieldtrip-bounces at science.ru.nl [fieldtrip-bounces at science.ru.nl] on behalf of Sarang S. Dalal [sarang at cfin.au.dk] Sent: Saturday, 18 June 2016 2:54 AM To: FieldTrip discussion list Subject: Re: [FieldTrip] LCMV returns no time series? Hi Peter, You likely have an Nvoxels x 1 cell array, which is as expected. Cells corresponding to voxels outside the brain will be empty, while the cells corresponding to voxels inside the brain should each contain an array of size 1xNsamples. (So effectively, you have Nvoxels x Nsamples, just repackaged into a cell array.) Nutmegtrip is designed to visualize and navigate this entire output on your subject's MRI, or you can pull out some voxels of interest and plot the time series with ft_databrowser or with matlab's built-in plot function. Cheers Sarang ________________________________________ From: fieldtrip-bounces at science.ru.nl on behalf of Peter Goodin Sent: Friday, June 17, 2016 3:19 AM To: FieldTrip discussion list Subject: Re: [FieldTrip] LCMV returns no time series? Hi Sarang, Regarding your point on that I should have the time series in source.avg.mom, the function only returns an n x 1 matrix. I've checked the averaged data and it does contain the channel x time series in av.avg, so I'm not really sure what's going on. Peter _______________________ Dr Peter Goodin, Brain and Psychological Sciences Research Centre (BPsyC) Swinburne University, Hawthorn, Vic, 3122 ________________________________________ From: fieldtrip-bounces at science.ru.nl [fieldtrip-bounces at science.ru.nl] on behalf of Sarang S. Dalal [sarang at cfin.au.dk] Sent: Thursday, 16 June 2016 12:10 AM To: FieldTrip discussion list Subject: Re: [FieldTrip] LCMV returns no time series? Hi Peter, If you've used the 'lcmv' method for ft_sourceanalysis, you ought to have the time series already contained in source.avg.mom. I've been working a lot lately on improving the LCMV functionality, but unfortunately haven't had a chance to document much yet. Especially if you are not contrasting different conditions, you might want to try these parameters: cfg.lcmv.weightnorm = 'nai'; % this is a new option :-) cfg.lcmv.fixedori = 'yes'; I also prefer to turn off reducerank, but YMMV: cfg.lcmv.reducerank = 'no'; Finally I've also contributed a viewer that will greatly help visualizing your virtual time series together with the MRI. You can find it in the latest distributions of FieldTrip under fieldtrip/contrib/nutmegtrip. You'll also need a full version of SPM8 in your path (the external in FieldTrip doesn't have all the necessary functions). You​​ can use it like this: cfg = []; cfg.mripath = '/path/to/mri/nii' % must be in nifti (nii) format cfg.funparameter = 'avg.mom' % cfg.atlas = ft_read_atlas('ROI_MNI_V4.nii'); % [optional] you can get atlas labels, if your MRI and grid points are based on the MNI grid nmt_sourceplot_spm8(cfg,ft_convert_units(source,'mm')); Cheers, Sarang ________________________________ From: fieldtrip-bounces at science.ru.nl on behalf of Peter Goodin Sent: Wednesday, June 15, 2016 3:32 PM To: FieldTrip discussion list Subject: [FieldTrip] LCMV returns no time series? Hi FieldTrip list, I'm using LCMV on averaged data (covariancewindow='all') but find the returned source estimates only have a single point. Is there a way to specify the analysis returns the time series for each grid point? Thanks, Peter _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl https://mailman.science.ru.nl/mailman/listinfo/fieldtrip _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl https://mailman.science.ru.nl/mailman/listinfo/fieldtrip From quentin_moreau6 at orange.fr Mon Jun 20 12:50:54 2016 From: quentin_moreau6 at orange.fr (Quentin Moreau) Date: Mon, 20 Jun 2016 12:50:54 +0200 Subject: [FieldTrip] Evoked Power Message-ID: Dear Fieldtrip users, I am new in the EEG analysis, and in Fieldtrip coding. Anyway, for my analysis in the frequency domain, I would like to only have the Evoked Power. After reading a few previous discussions, I realize that the matter isn’t clear for everyone.. My question is this one: would that be a good idea to extract the power from previously computed ERPs, to be sure to only get the Evoked Power ? Thank you for your answers, Quentin Moreau Ph.D. student in Cognitive Social and Affective Neuroscience Department of Psychology AgliotiLab, "Sapienza" University of Rome IRCCS Fondazione Santa Lucia, Rome, Italy email: quentin_moreau6 at orange.fr -------------- next part -------------- An HTML attachment was scrubbed... URL: From ph442 at cam.ac.uk Mon Jun 20 12:53:46 2016 From: ph442 at cam.ac.uk (parham hashemzadeh) Date: Mon, 20 Jun 2016 11:53:46 +0100 Subject: [FieldTrip] Generating EEG In-Reply-To: References: Message-ID: <18671af9961ed227b7f9057f368bd763@cam.ac.uk> Hi Pooneh No it can not generate synthetic data. You will have to define either a set of dipoles or simply define a source function. You will then need to compute the forward problem (BEM) for the defined sources and the given head model. That will then become your raw Syhthetic data. After that, you will need to reconstruct using your generated data. Please note that in order to not commit the inverse error (also known as inverse crime), make sure that you reconstruct on a different mesh. best of luck parham hashemzadeh Senior Research Associate at the University of Cambridge, UK. On 2016-06-20 08:03, pooneh baniasad wrote: > Dear community, > > My name is Pouneh Baniasad and I am working on my master thesis in > Tehran University of Medical Sciences. I'm trying to generate EEG > signal without using any raw data. Actually I want to completely > simulating EEG. My question is can Fieldtrip simulate EEG signal? If > the answer is yes, what's the procedure? Is it using dipole model or > anything e-- > > Bests > > Pouneh Baniasad > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > https://mailman.science.ru.nl/mailman/listinfo/fieldtrip -- best regards Parham Hashemzadeh Research Associate Department of Applied Mathematics and Theoretical Physics University of Cambridge, UK. email: hashemzadeh at damtp.cam.ac.uk From dlozanosoldevilla at gmail.com Mon Jun 20 13:43:02 2016 From: dlozanosoldevilla at gmail.com (Diego Lozano-Soldevilla) Date: Mon, 20 Jun 2016 13:43:02 +0200 Subject: [FieldTrip] Generating EEG In-Reply-To: <18671af9961ed227b7f9057f368bd763@cam.ac.uk> References: <18671af9961ed227b7f9057f368bd763@cam.ac.uk> Message-ID: Hi Pouneh, Please find below some useful example scripts that you can adapt to your needs: http://www.fieldtriptoolbox.org/example/compute_forward_simulated_data_and_apply_a_dipole_fit http://www.fieldtriptoolbox.org/example/compute_forward_simulated_data_and_apply_a_beamformer_scan http://www.fieldtriptoolbox.org/example/combineplanar_pipelineorder best, Diego On 20 June 2016 at 12:53, parham hashemzadeh wrote: > Hi Pooneh > No it can not generate synthetic data. You will have to define either a > set of dipoles or simply define a source function. You will then need to > compute the forward problem (BEM) for the defined sources and the given > head model. That will then become your raw Syhthetic data. > After that, you will need to reconstruct using your generated data. Please > note that in order to not commit the inverse error (also known as inverse > crime), make sure that you reconstruct on a different mesh. > best of luck > parham hashemzadeh > Senior Research Associate at the University of Cambridge, UK. > > On 2016-06-20 08:03, pooneh baniasad wrote: > >> Dear community, >> >> My name is Pouneh Baniasad and I am working on my master thesis in >> Tehran University of Medical Sciences. I'm trying to generate EEG >> signal without using any raw data. Actually I want to completely >> simulating EEG. My question is can Fieldtrip simulate EEG signal? If >> the answer is yes, what's the procedure? Is it using dipole model or >> anything e-- >> >> Bests >> >> Pouneh Baniasad >> _______________________________________________ >> fieldtrip mailing list >> fieldtrip at donders.ru.nl >> https://mailman.science.ru.nl/mailman/listinfo/fieldtrip >> > > -- > best regards > Parham Hashemzadeh > Research Associate > Department of Applied Mathematics and Theoretical Physics > University of Cambridge, UK. > email: hashemzadeh at damtp.cam.ac.uk > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > https://mailman.science.ru.nl/mailman/listinfo/fieldtrip > -------------- next part -------------- An HTML attachment was scrubbed... URL: From hamzaf at sabanciuniv.edu Mon Jun 20 16:29:02 2016 From: hamzaf at sabanciuniv.edu (Hamza Fawzi Altakroury (Alumni)) Date: Mon, 20 Jun 2016 16:29:02 +0200 Subject: [FieldTrip] Interactive alignment for spherical head model Message-ID: Hello, To do an interactive alignment for electrodes with a spherical head model, what should I put in the variable cfg.headshape ? Thank you -- Hamza Fawzi Altakroury Graduate student - MA Faculty of Engineering and Natural Sciences Sabancı University -------------- next part -------------- An HTML attachment was scrubbed... URL: From sauer.mpih at googlemail.com Mon Jun 20 21:22:10 2016 From: sauer.mpih at googlemail.com (Andreas Sauer) Date: Mon, 20 Jun 2016 21:22:10 +0200 Subject: [FieldTrip] Fwd: Coordsys issue ft_sourceplot In-Reply-To: <8EF9FF29-549B-4E5C-9ED3-055147E8DFD0@donders.ru.nl> References: <08B10307-13ED-40F0-9F87-B50EEDAF25CC@gmail.com> <8EF9FF29-549B-4E5C-9ED3-055147E8DFD0@donders.ru.nl> Message-ID: Dear Jan-Mathijs, sorry that I bring up that post again, but I am still having problems with the different coordinate systems in my data. After replacing the .pos field in the source files with the one from the "standard_sourcemodel3d5mm" ft_sourceplot works fine, i.e. the functional data is not rotated anymore. However, the option cfg.atlas doesn't work since I always get the error message "mismatch between the coord sys in the atlas and the coord sys in the data...". I checked the atlas, the functional data (stat) and the anatomy I use for interpolation with ft_determine_coordsys. All three files have RAS orientation. If I change the anatomical label of the axes of the functional data, ft says "neuromag". Unfortunately, the function atlas_lookup works only with "mni", "tal" or "spm". So I see where the error messages comes from... The difference between MNI and neuromas is the unit (mm resp. m), so I thought to use ft_convert_units, but that doesn't work for functional data. Is there any way that I can change the functional data to "MNI" (I thought I did this already)? Sorry if this is a straight forward thing, but I don't see where I make the mistake... Thanks a lot and best wishes, Andreas 2016-06-15 15:06 GMT+02:00 Schoffelen, J.M. (Jan Mathijs) < jan.schoffelen at donders.ru.nl>: > Are you sure that you use the pos-field from the template, i.e. from the > standard_sourcemodel3d5mm? > > Best, > Jan-Mathijs > > On 15 Jun 2016, at 14:31, Andreas Sauer wrote: > > Dear Jan, > > thank you for your email and the example code! > > I tried both ways to convert the coord systems, but unfortunately it still > doesn't work. > > Since I used the tutorial procedure to create my sourcemodel ( > http://www.fieldtriptoolbox.org/tutorial/sourcemodel#subject-specific_grids_that_are_equivalent_across_subjects_in_normalized_space) > I tried first with the easy way of only replacing the .pos field. But the > plots don't change, the sources are still rotated by 90 degrees. Actually, > the .pos fields are already the same before replacing it (see pic). Is > there some error in my code? > > > *% Step1: Load mri file* > *mri = > ft_read_mri('/data/home1/asauer/Projects/RPScZ/Analysis/Beamforming/MRI/HSM12_V2.mri');* > > *% Step 2: Segment the template brain and construct a volume conduction* > *% model (i.e. head model): this is needed for the inside/outside > detection of voxels* > *cfg = [];* > *cfg.output = 'brain';* > *segmentedmri = ft_volumesegment(cfg,anatomy);* > > *cfg = [];* > *cfg.method = 'singleshell';* > *vol = ft_prepare_headmodel(cfg,segmentedmri);* > *vol = ft_convert_units(vol,'m');* > *figure; ft_plot_sens(sens,'style','*b'); hold on; ft_plot_vol(vol)* > > *% Step 3: Load sourcemodel * > *load(fullfile(ft_path,'template/sourcemodel/standard_sourcemodel3d5mm'));* > *template_grid = sourcemodel;* > *clear sourcemodel* > > *% Step 4: Make sourcemodel* > *cfg = [];* > *cfg.grid.warpmni = 'yes';* > *cfg.grid.template = template_grid;* > *cfg.grid.nonlinear = 'yes';* > *cfg.mri = mri;* > *cfg.grid.unit = 'm';* > *grid = ft_prepare_sourcemodel(cfg);* > *figure; hold on;* > *ft_plot_vol(vol,'facecolor','cortex','edgecolor','none'); alpha 0.5; > camlight;* > *ft_plot_mesh(grid.pos(grid.inside,:));* > > > The only thing that is different from the tutorial is the unit > conversion... > > After that I tried the transformation. All worked well until the source > interpolation. ft_sourceinterpolation throws this error: > > *Attempted to access sel(1); index out of bounds because numel(sel)=0.* > > *Error in ft_sourceinterpolate>my_interpn (line 508)* > * ft_progress(sel(1)/num, 'interpolating %.1f%%\n', 100*sel(1)/num);* > > *Error in ft_sourceinterpolate (line 393)* > * interp.inside( sel) = my_interpn(double(functional.inside), ax(sel), > ay(sel), az(sel), 'nearest', cfg.feedback);* > > > which, to be honest, I don't really understand. Sorry... > > Best wishes, > > Andreas > > > 2016-06-14 9:41 GMT+02:00 Schoffelen, J.M. (Jan Mathijs) < > jan.schoffelen at donders.ru.nl>: > >> Dear Andreas, >> >> after having calculated the sources of a MMN paradigm (4D-system), I’d >> like to plot the results on one of the anatomy template files in the >> fieldtrip directory (single_subj_T1_1mm.nii) or alternatively on a MNI T1 >> template file (mni_icbm152_t1_tal_nlin_sym_09a.nii). Unfortunately, this is >> not working well… As you can see on the attached picture, the functional >> data is rotated by 90 degrees. >> >> I guess that something gets mixed because of the different coordsystems >> of functional and anatomical data. The functional data is 4D, which means >> ALS orientation. The anatomical is MNI, so RAS orientation. The plotting >> works fine, if I use a mri file which was converted in field trip (V2.mri) >> and therefore is also in ALS orientation. However, the anatomy doesn’t look >> very pretty… >> >> >> Is there any way that I can transform the functional data to RAS >> orientation or the anatomical data to ALS orientation, respectively? >> >> >> I tried with ft_volumerealign. However, since the template file has no >> fiducials, it is hard to really precisely do this. >> >> >> Fair point. I would however do it the other way around, using the V2 to >> get the transformation from voxel space to MNI-RAS, and then use the >> inverse of the transformation on the functional data: in this case you >> could use ft_volumenormalise, with cfg.nonlinear = ‘no’. Alternatively, if >> you are using this procedure: >> http://www.fieldtriptoolbox.org/tutorial/sourcemodel#subject-specific_grids_that_are_equivalent_across_subjects_in_normalized_space, >> you could directly replace the source.pos of your functional data with the >> template.pos and then do the interpolation. >> >> To summarize: >> >> either: >> >> mri = ft_read_mri(‘V2.mri’); >> mri.coordsys = ‘bti’; >> >> cfg = []; >> cfg.nonlinear=’no’; >> mrin = ft_volumenormalise(cfg, mri); >> >> transform_vox2bti = mri.transform; >> transform_vox2spm = mrin.transform; >> transform_bti2spm = transform_vox2spm/transform_vox2bti >> source = ft_transform_geometry(transform_bti2spm, source); >> >> source_int = ft_sourceinterpolate(somecfg, source, niceanatomical); >> >> or: >> >> source.pos = templat.pos; >> source_int = ft_sourceinterpolate(somecfg, source, niceanatomical); >> >> Best, >> JM >> >> >> >> Any input on how to plot the sources on one of these nice anatomical >> files is highly appreciated! >> >> Thanks and best regards, >> >> Andreas >> >> >> -- >> Dipl.-Psych. Andreas Sauer >> Max Planck Institute for Brain Research >> Deutschordenstraße 46 >> 60528 Frankfurt am Main >> Germany >> >> T: +49 69 96769 278 >> F: +49 69 96769 327 >> Email: sauer.mpih at gmail.com >> www.brain.mpg.de >> _______________________________________________ >> fieldtrip mailing list >> fieldtrip at donders.ru.nl >> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip >> >> >> >> _______________________________________________ >> fieldtrip mailing list >> fieldtrip at donders.ru.nl >> https://mailman.science.ru.nl/mailman/listinfo/fieldtrip >> > > > > -- > Dipl.-Psych. Andreas Sauer > Max Planck Institute for Brain Research > Deutschordenstraße 46 > 60528 Frankfurt am Main > Germany > > T: +49 69 96769 278 > F: +49 69 96769 327 > Email: sauer.mpih at gmail.com > www.brain.mpg.de > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > https://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > https://mailman.science.ru.nl/mailman/listinfo/fieldtrip > -- Dipl.-Psych. Andreas Sauer Max Planck Institute for Brain Research Deutschordenstraße 46 60528 Frankfurt am Main Germany T: +49 69 96769 278 F: +49 69 96769 327 Email: sauer.mpih at gmail.com www.brain.mpg.de -------------- next part -------------- An HTML attachment was scrubbed... URL: From pmetzak at gmail.com Tue Jun 21 02:08:46 2016 From: pmetzak at gmail.com (Paul Metzak) Date: Mon, 20 Jun 2016 17:08:46 -0700 Subject: [FieldTrip] issues compiling matlab code that calls spm and runs a beamformer analysis Message-ID: Hello, I have been attempting to use the MATLAB compile to compile my code and run it on my university's supercomputer. However, I am running into an issue when trying to volume normalise the beamformed images I have created. >From the error messages (see below), the issue arises from an inability to obtain SPM Revision information. I am using SPM8 and it is on my MATLAB path so I am unclear how to avoid this error, or whether it relates to: 1) an issue with my code, 2) what I have on/the order of my MATLAB path, or with the interface between MATLAB/SPM/FieldTrip. If anyone could suggest a workaround, or something that may help me to avoid this error I would be most appreciative. Note: I read that SPM uses a Contents.m file to indicate Revision number and that this file becomes Contents.txt when SPM is compiled to a standalone version but including this file on my MATLAB path both .,m and .txt versions) did not resolve the error. I am very new to compiling so it is possible that I did not do this correctly (if this matters at all). Thanks for any help you can offer, and let me know if any further information would be helpful to diagnose the problem. Paul Converting the coordinate system from ctf to spm > Error using spm>spm_version (line 1269) > Can't obtain SPM Revision information. > Error in spm (line 875) > > > Error in align_ctf2spm (line 121) > > > Error in ft_convert_coordsys (line 95) > > > Error in ft_volumenormalise (line 121) > > > Error in mmcc_beamform_param_twenty3_c2 (line 269) -------------- next part -------------- An HTML attachment was scrubbed... URL: From recasensmarc at gmail.com Tue Jun 21 10:32:31 2016 From: recasensmarc at gmail.com (Marc Recasens) Date: Tue, 21 Jun 2016 09:32:31 +0100 Subject: [FieldTrip] Fwd: Coordsys issue ft_sourceplot In-Reply-To: References: <08B10307-13ED-40F0-9F87-B50EEDAF25CC@gmail.com> <8EF9FF29-549B-4E5C-9ED3-055147E8DFD0@donders.ru.nl> Message-ID: Dear Andreas, I managed to get the AAL atlas labels on ortho-plots by adding the same "coordsys" subfield in both atlas and data files (plus cfg.atlas). I use coordsys = 'spm' even though everything is "mni", I reckon doesn't matter as long as both files share the same "coordsys". Maybe there's a more elegant way to do it but that worked fine for me. atlas = ft_read_atlas(paths_to_AAL_atlas); % read aal atlas atlas.coordsys = 'spm'; interpolated_data.coordsys = 'spm'; cfg_plot = []; cfg_plot.method = 'ortho'; cfg_plot.funparameter = 'pow'; cfg_plot.atlas = atlas; ft_sourceplot(cfg_plot,interpolated_data); Hope it helps Marc On Mon, Jun 20, 2016 at 8:22 PM, Andreas Sauer wrote: > Dear Jan-Mathijs, > > sorry that I bring up that post again, but I am still having problems with > the different coordinate systems in my data. > > After replacing the .pos field in the source files with the one from the > "standard_sourcemodel3d5mm" ft_sourceplot works fine, i.e. the functional > data is not rotated anymore. However, the option cfg.atlas doesn't work > since I always get the error message "mismatch between the coord sys in the > atlas and the coord sys in the data...". > > I checked the atlas, the functional data (stat) and the anatomy I use for > interpolation with ft_determine_coordsys. All three files have RAS > orientation. If I change the anatomical label of the axes of the functional > data, ft says "neuromag". Unfortunately, the function atlas_lookup works > only with "mni", "tal" or "spm". So I see where the error messages comes > from... The difference between MNI and neuromas is the unit (mm resp. m), > so I thought to use ft_convert_units, but that doesn't work for functional > data. > > Is there any way that I can change the functional data to "MNI" (I thought > I did this already)? Sorry if this is a straight forward thing, but I don't > see where I make the mistake... > > Thanks a lot and best wishes, > > Andreas > > 2016-06-15 15:06 GMT+02:00 Schoffelen, J.M. (Jan Mathijs) < > jan.schoffelen at donders.ru.nl>: > >> Are you sure that you use the pos-field from the template, i.e. from the >> standard_sourcemodel3d5mm? >> >> Best, >> Jan-Mathijs >> >> On 15 Jun 2016, at 14:31, Andreas Sauer >> wrote: >> >> Dear Jan, >> >> thank you for your email and the example code! >> >> I tried both ways to convert the coord systems, but unfortunately it >> still doesn't work. >> >> Since I used the tutorial procedure to create my sourcemodel ( >> http://www.fieldtriptoolbox.org/tutorial/sourcemodel#subject-specific_grids_that_are_equivalent_across_subjects_in_normalized_space) >> I tried first with the easy way of only replacing the .pos field. But the >> plots don't change, the sources are still rotated by 90 degrees. Actually, >> the .pos fields are already the same before replacing it (see pic). Is >> there some error in my code? >> >> >> *% Step1: Load mri file* >> *mri = >> ft_read_mri('/data/home1/asauer/Projects/RPScZ/Analysis/Beamforming/MRI/HSM12_V2.mri');* >> >> *% Step 2: Segment the template brain and construct a volume conduction* >> *% model (i.e. head model): this is needed for the inside/outside >> detection of voxels* >> *cfg = [];* >> *cfg.output = 'brain';* >> *segmentedmri = ft_volumesegment(cfg,anatomy);* >> >> *cfg = [];* >> *cfg.method = 'singleshell';* >> *vol = ft_prepare_headmodel(cfg,segmentedmri);* >> *vol = ft_convert_units(vol,'m');* >> *figure; ft_plot_sens(sens,'style','*b'); hold on; ft_plot_vol(vol)* >> >> *% Step 3: Load sourcemodel * >> >> *load(fullfile(ft_path,'template/sourcemodel/standard_sourcemodel3d5mm'));* >> *template_grid = sourcemodel;* >> *clear sourcemodel* >> >> *% Step 4: Make sourcemodel* >> *cfg = [];* >> *cfg.grid.warpmni = 'yes';* >> *cfg.grid.template = template_grid;* >> *cfg.grid.nonlinear = 'yes';* >> *cfg.mri = mri;* >> *cfg.grid.unit = 'm';* >> *grid = ft_prepare_sourcemodel(cfg);* >> *figure; hold on;* >> *ft_plot_vol(vol,'facecolor','cortex','edgecolor','none'); alpha 0.5; >> camlight;* >> *ft_plot_mesh(grid.pos(grid.inside,:));* >> >> >> The only thing that is different from the tutorial is the unit >> conversion... >> >> After that I tried the transformation. All worked well until the source >> interpolation. ft_sourceinterpolation throws this error: >> >> *Attempted to access sel(1); index out of bounds because numel(sel)=0.* >> >> *Error in ft_sourceinterpolate>my_interpn (line 508)* >> * ft_progress(sel(1)/num, 'interpolating %.1f%%\n', 100*sel(1)/num);* >> >> *Error in ft_sourceinterpolate (line 393)* >> * interp.inside( sel) = my_interpn(double(functional.inside), ax(sel), >> ay(sel), az(sel), 'nearest', cfg.feedback);* >> >> >> which, to be honest, I don't really understand. Sorry... >> >> Best wishes, >> >> Andreas >> >> >> 2016-06-14 9:41 GMT+02:00 Schoffelen, J.M. (Jan Mathijs) < >> jan.schoffelen at donders.ru.nl>: >> >>> Dear Andreas, >>> >>> after having calculated the sources of a MMN paradigm (4D-system), I’d >>> like to plot the results on one of the anatomy template files in the >>> fieldtrip directory (single_subj_T1_1mm.nii) or alternatively on a MNI T1 >>> template file (mni_icbm152_t1_tal_nlin_sym_09a.nii). Unfortunately, this is >>> not working well… As you can see on the attached picture, the functional >>> data is rotated by 90 degrees. >>> >>> I guess that something gets mixed because of the different coordsystems >>> of functional and anatomical data. The functional data is 4D, which means >>> ALS orientation. The anatomical is MNI, so RAS orientation. The plotting >>> works fine, if I use a mri file which was converted in field trip (V2.mri) >>> and therefore is also in ALS orientation. However, the anatomy doesn’t look >>> very pretty… >>> >>> >>> Is there any way that I can transform the functional data to RAS >>> orientation or the anatomical data to ALS orientation, respectively? >>> >>> >>> I tried with ft_volumerealign. However, since the template file has no >>> fiducials, it is hard to really precisely do this. >>> >>> >>> Fair point. I would however do it the other way around, using the V2 to >>> get the transformation from voxel space to MNI-RAS, and then use the >>> inverse of the transformation on the functional data: in this case you >>> could use ft_volumenormalise, with cfg.nonlinear = ‘no’. Alternatively, if >>> you are using this procedure: >>> http://www.fieldtriptoolbox.org/tutorial/sourcemodel#subject-specific_grids_that_are_equivalent_across_subjects_in_normalized_space, >>> you could directly replace the source.pos of your functional data with the >>> template.pos and then do the interpolation. >>> >>> To summarize: >>> >>> either: >>> >>> mri = ft_read_mri(‘V2.mri’); >>> mri.coordsys = ‘bti’; >>> >>> cfg = []; >>> cfg.nonlinear=’no’; >>> mrin = ft_volumenormalise(cfg, mri); >>> >>> transform_vox2bti = mri.transform; >>> transform_vox2spm = mrin.transform; >>> transform_bti2spm = transform_vox2spm/transform_vox2bti >>> source = ft_transform_geometry(transform_bti2spm, source); >>> >>> source_int = ft_sourceinterpolate(somecfg, source, niceanatomical); >>> >>> or: >>> >>> source.pos = templat.pos; >>> source_int = ft_sourceinterpolate(somecfg, source, niceanatomical); >>> >>> Best, >>> JM >>> >>> >>> >>> Any input on how to plot the sources on one of these nice anatomical >>> files is highly appreciated! >>> >>> Thanks and best regards, >>> >>> Andreas >>> >>> >>> -- >>> Dipl.-Psych. Andreas Sauer >>> Max Planck Institute for Brain Research >>> Deutschordenstraße 46 >>> 60528 Frankfurt am Main >>> Germany >>> >>> T: +49 69 96769 278 >>> F: +49 69 96769 327 >>> Email: sauer.mpih at gmail.com >>> www.brain.mpg.de >>> _______________________________________________ >>> fieldtrip mailing list >>> fieldtrip at donders.ru.nl >>> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip >>> >>> >>> >>> _______________________________________________ >>> fieldtrip mailing list >>> fieldtrip at donders.ru.nl >>> https://mailman.science.ru.nl/mailman/listinfo/fieldtrip >>> >> >> >> >> -- >> Dipl.-Psych. Andreas Sauer >> Max Planck Institute for Brain Research >> Deutschordenstraße 46 >> 60528 Frankfurt am Main >> Germany >> >> T: +49 69 96769 278 >> F: +49 69 96769 327 >> Email: sauer.mpih at gmail.com >> www.brain.mpg.de >> _______________________________________________ >> fieldtrip mailing list >> fieldtrip at donders.ru.nl >> https://mailman.science.ru.nl/mailman/listinfo/fieldtrip >> >> >> >> >> _______________________________________________ >> fieldtrip mailing list >> fieldtrip at donders.ru.nl >> https://mailman.science.ru.nl/mailman/listinfo/fieldtrip >> > > > > -- > Dipl.-Psych. Andreas Sauer > Max Planck Institute for Brain Research > Deutschordenstraße 46 > 60528 Frankfurt am Main > Germany > > T: +49 69 96769 278 > F: +49 69 96769 327 > Email: sauer.mpih at gmail.com > www.brain.mpg.de > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > https://mailman.science.ru.nl/mailman/listinfo/fieldtrip > -- Marc Recasens Tel.: +44 7845810006 Tel.: +34 639241598 -------------- next part -------------- An HTML attachment was scrubbed... URL: From tineke.snijders at donders.ru.nl Tue Jun 21 11:09:12 2016 From: tineke.snijders at donders.ru.nl (Snijders, T.M. (Tineke)) Date: Tue, 21 Jun 2016 09:09:12 +0000 Subject: [FieldTrip] Theoretical question about cluster-based permutation tests In-Reply-To: References: Message-ID: <815A9820E75FBC4F96B7CD3A8089D11C378EA2A6@exprd04.hosting.ru.nl> Hi Anne, All the tests you do initially and the threshold that is used to select samples for clustering do not affect the FA because they only determine whether a sample-point will be included in a cluster, they do not determine significance. In the end you are only doing ONE test to determine significance, and that is to test whether such a large cluster could have occurred by chance. And you do that by the permutation test, by permuting the data and looking at how large the clusters get when the data would have been random. Then you compare your cluster-statistic to the random distribution of cluster-statistics, and if that large a cluster only happens in <5% of the cases you call it significant. So that's only one test. Note that also in the random data there will be clusters formed of which the sample-points survive the initial thresholds, and if you use e.g. a lower threshold for selecting samples for clustering, this means you will get larger clusters. But, then also your 'real' cluster should be larger to survive the 'significance' question: "how probable is it to see such a large cluster in random data (using these settings)?" Hope this helps, Cheers, Tineke ________________________________ From: fieldtrip-bounces at science.ru.nl [fieldtrip-bounces at science.ru.nl] on behalf of Anne Mickan [amickan1990 at gmail.com] Sent: Friday, June 17, 2016 6:43 PM To: fieldtrip at science.ru.nl Subject: [FieldTrip] Theoretical question about cluster-based permutation tests Dear all, I have a theoretical question about cluster-based permutation tests. I've been reading through the website and through Maris & Oostenveld (2007) and I watched the video, all of which left me with the feeling I have a good understanding of what the permutation tests is doing (I've also implemented it successfully for my own data). However, I don't yet entirely understand how this test statistic avoids the multiple comparison problem. Particularly I'm wondering how it is that all the tests done initially on a sample-by-sample-basis (step 1 as described in Maris & Oostenveld, p. 180) and the threshold that is used to select samples for clustering (step 2) does not affect the FA. It is referred to a later section, which, however, does not clear it up for me. So I was hoping to get another explanation to fully understand this issue. Thanks a lot in advance. Best, Anne -------------- next part -------------- An HTML attachment was scrubbed... URL: From frsantos at fpce.up.pt Tue Jun 21 16:17:46 2016 From: frsantos at fpce.up.pt (Fernando Ferreira-Santos) Date: Tue, 21 Jun 2016 14:17:46 +0000 Subject: [FieldTrip] 2016 Porto EEG/ERP Summer School Message-ID: <2BAB036A9BAEA44984A131DFCE44610801B5468106@SRVMBX01.fpceup.psi.up.pt> Dear colleagues, The Laboratory of Neuropsychopsysiology of the University of Porto (http://www.fpce.up.pt/labpsi/) is pleased to announce the 5th edition of the International Cognitive and Affective Neurophysiology Summer School: Acquisition, processing, and analysis of EEG signal. This summer school is focused on the application of Electroencephalography (EEG) and Event Related Potential (ERP) techniques to the study of cognitive and affective processes. This 36h course will be fully taught in English and is aimed at an introductory level, so no previous experience with EEG or ERP is required. This event will take place from 5-9 of September 2016 in the lovely city of Porto. In last year's edition the course was fully booked and, as such, we recommend early registration (course places are attributed by order of registration). The registration deadline is July 31st. For additional details and instructions on how to register, please consult our website (http://www.fpce.up.pt/labpsi/summerschool/). Please feel free to pass this information along to students or researchers that may be potentially interested. Thanks you and best wishes, -- Fernando Ferreira-Santos, PhD Lecturer Laboratory of Neuropsychophysiology Faculty of Psychology and Education Sciences University of Porto Rua Alfredo Allen, 4200-135 Porto (Portugal) Tel.: +351 226079700 (ext. 409) E-mail: frsantos at fpce.up.pt http://www.fpce.up.pt/labpsi/ -------------- next part -------------- An HTML attachment was scrubbed... URL: From zhangk28 at mcmaster.ca Tue Jun 21 20:55:54 2016 From: zhangk28 at mcmaster.ca (KAIJIE ZHANG) Date: Tue, 21 Jun 2016 14:55:54 -0400 Subject: [FieldTrip] topoplotTFR 2 Channels Not Showing Message-ID: Hi Community, My name is Kaijie Zhang, and I am working with near infrared spectroscopy to analyze functional connectivity in the brain. Everything related to this issue is in a dropbox .zip file via the link here: https://www.dropbox.com/s/umhd6k9uzhieg69/topoplotTFR%20Channels%20Issue.zip?dl=0 First, layoutFieldTrip (self-written script) was used to set up the layout for topoplotTFR. I have successfully used ft_freqanalysis to calculate the coherence for my data. This was done in the function magnitudeSquaredCoherence (self-written). topoplotTFR was then invoked in the last segment of magnitudeSquaredCoherence. The image produced is shown in the .jpeg file named "topoplotTFR Channel Issue", in the zip file. Everything seems to be correct, except for the fact that two channels are missing, in particular channels 23 and 24 in the left posterior side (all 46 channels should produce a symmetrical figure). I am not sure for the cause of this because no errors are produced, and I have labeled everything correctly in layout, as well as their positions. The cfg and data I used for topoplotTFR are displayed as follows: cfg = layout: [1x1 struct] refchannel: 'Ch1' baseline: 'no' xlim: 'maxmin' zlim: 'maxmin' ylim: 'maxmin' marker: 'labels' style: 'both' shading: 'interp' comment: 'no' colorbar: 'EastOutside' directionality: 'outflow' data = label: {46x1 cell} dimord: 'rpt_chan_freq' freq: [1x19 double] powspctrm: [5x46x19 double] labelcmb: {2116x2 cell} crsspctrm: [5x2116x19 double] cumsumcnt: [304 301 303 301 3002] cumtapcnt: [5x1 double] cfg: [1x1 struct] My raw data and self-written MATLAB codes are also attached in the zip file. They can be run after extracting. (Make sure to cd to the correct folder containing all the extracted files!). Thank you very much for any input! Best Regards, Kaijie Zhang -- Kaijie Zhang Electrical & Biomedical Engineering, Level III McMaster University -------------- next part -------------- An HTML attachment was scrubbed... URL: From sauer.mpih at googlemail.com Tue Jun 21 22:14:25 2016 From: sauer.mpih at googlemail.com (Andreas Sauer) Date: Tue, 21 Jun 2016 22:14:25 +0200 Subject: [FieldTrip] Fwd: Coordsys issue ft_sourceplot In-Reply-To: References: <08B10307-13ED-40F0-9F87-B50EEDAF25CC@gmail.com> <8EF9FF29-549B-4E5C-9ED3-055147E8DFD0@donders.ru.nl> Message-ID: Dear Marc, thanks for your comment! It works fine. Best, Andreas 2016-06-21 10:32 GMT+02:00 Marc Recasens : > Dear Andreas, > > I managed to get the AAL atlas labels on ortho-plots by adding the same > "coordsys" subfield in both atlas and data files (plus cfg.atlas). I use > coordsys = 'spm' even though everything is "mni", I reckon doesn't matter > as long as both files share the same "coordsys". Maybe there's a more > elegant way to do it but that worked fine for me. > > atlas = ft_read_atlas(paths_to_AAL_atlas); > % read aal atlas > atlas.coordsys = 'spm'; > interpolated_data.coordsys = 'spm'; > cfg_plot = []; > cfg_plot.method = 'ortho'; > cfg_plot.funparameter = 'pow'; > cfg_plot.atlas = atlas; > ft_sourceplot(cfg_plot,interpolated_data); > > Hope it helps > Marc > > > On Mon, Jun 20, 2016 at 8:22 PM, Andreas Sauer > wrote: > >> Dear Jan-Mathijs, >> >> sorry that I bring up that post again, but I am still having problems >> with the different coordinate systems in my data. >> >> After replacing the .pos field in the source files with the one from the >> "standard_sourcemodel3d5mm" ft_sourceplot works fine, i.e. the functional >> data is not rotated anymore. However, the option cfg.atlas doesn't work >> since I always get the error message "mismatch between the coord sys in the >> atlas and the coord sys in the data...". >> >> I checked the atlas, the functional data (stat) and the anatomy I use for >> interpolation with ft_determine_coordsys. All three files have RAS >> orientation. If I change the anatomical label of the axes of the functional >> data, ft says "neuromag". Unfortunately, the function atlas_lookup works >> only with "mni", "tal" or "spm". So I see where the error messages comes >> from... The difference between MNI and neuromas is the unit (mm resp. m), >> so I thought to use ft_convert_units, but that doesn't work for functional >> data. >> >> Is there any way that I can change the functional data to "MNI" (I >> thought I did this already)? Sorry if this is a straight forward thing, but >> I don't see where I make the mistake... >> >> Thanks a lot and best wishes, >> >> Andreas >> >> 2016-06-15 15:06 GMT+02:00 Schoffelen, J.M. (Jan Mathijs) < >> jan.schoffelen at donders.ru.nl>: >> >>> Are you sure that you use the pos-field from the template, i.e. from the >>> standard_sourcemodel3d5mm? >>> >>> Best, >>> Jan-Mathijs >>> >>> On 15 Jun 2016, at 14:31, Andreas Sauer >>> wrote: >>> >>> Dear Jan, >>> >>> thank you for your email and the example code! >>> >>> I tried both ways to convert the coord systems, but unfortunately it >>> still doesn't work. >>> >>> Since I used the tutorial procedure to create my sourcemodel ( >>> http://www.fieldtriptoolbox.org/tutorial/sourcemodel#subject-specific_grids_that_are_equivalent_across_subjects_in_normalized_space) >>> I tried first with the easy way of only replacing the .pos field. But the >>> plots don't change, the sources are still rotated by 90 degrees. Actually, >>> the .pos fields are already the same before replacing it (see pic). Is >>> there some error in my code? >>> >>> >>> *% Step1: Load mri file* >>> *mri = >>> ft_read_mri('/data/home1/asauer/Projects/RPScZ/Analysis/Beamforming/MRI/HSM12_V2.mri');* >>> >>> *% Step 2: Segment the template brain and construct a volume conduction* >>> *% model (i.e. head model): this is needed for the inside/outside >>> detection of voxels* >>> *cfg = [];* >>> *cfg.output = 'brain';* >>> *segmentedmri = ft_volumesegment(cfg,anatomy);* >>> >>> *cfg = [];* >>> *cfg.method = 'singleshell';* >>> *vol = ft_prepare_headmodel(cfg,segmentedmri);* >>> *vol = ft_convert_units(vol,'m');* >>> *figure; ft_plot_sens(sens,'style','*b'); hold on; ft_plot_vol(vol)* >>> >>> *% Step 3: Load sourcemodel * >>> >>> *load(fullfile(ft_path,'template/sourcemodel/standard_sourcemodel3d5mm'));* >>> *template_grid = sourcemodel;* >>> *clear sourcemodel* >>> >>> *% Step 4: Make sourcemodel* >>> *cfg = [];* >>> *cfg.grid.warpmni = 'yes';* >>> *cfg.grid.template = template_grid;* >>> *cfg.grid.nonlinear = 'yes';* >>> *cfg.mri = mri;* >>> *cfg.grid.unit = 'm';* >>> *grid = ft_prepare_sourcemodel(cfg);* >>> *figure; hold on;* >>> *ft_plot_vol(vol,'facecolor','cortex','edgecolor','none'); alpha 0.5; >>> camlight;* >>> *ft_plot_mesh(grid.pos(grid.inside,:));* >>> >>> >>> The only thing that is different from the tutorial is the unit >>> conversion... >>> >>> After that I tried the transformation. All worked well until the source >>> interpolation. ft_sourceinterpolation throws this error: >>> >>> *Attempted to access sel(1); index out of bounds because numel(sel)=0.* >>> >>> *Error in ft_sourceinterpolate>my_interpn (line 508)* >>> * ft_progress(sel(1)/num, 'interpolating %.1f%%\n', 100*sel(1)/num);* >>> >>> *Error in ft_sourceinterpolate (line 393)* >>> * interp.inside( sel) = my_interpn(double(functional.inside), >>> ax(sel), ay(sel), az(sel), 'nearest', cfg.feedback);* >>> >>> >>> which, to be honest, I don't really understand. Sorry... >>> >>> Best wishes, >>> >>> Andreas >>> >>> >>> 2016-06-14 9:41 GMT+02:00 Schoffelen, J.M. (Jan Mathijs) < >>> jan.schoffelen at donders.ru.nl>: >>> >>>> Dear Andreas, >>>> >>>> after having calculated the sources of a MMN paradigm (4D-system), I’d >>>> like to plot the results on one of the anatomy template files in the >>>> fieldtrip directory (single_subj_T1_1mm.nii) or alternatively on a MNI T1 >>>> template file (mni_icbm152_t1_tal_nlin_sym_09a.nii). Unfortunately, this is >>>> not working well… As you can see on the attached picture, the functional >>>> data is rotated by 90 degrees. >>>> >>>> I guess that something gets mixed because of the different coordsystems >>>> of functional and anatomical data. The functional data is 4D, which means >>>> ALS orientation. The anatomical is MNI, so RAS orientation. The plotting >>>> works fine, if I use a mri file which was converted in field trip (V2.mri) >>>> and therefore is also in ALS orientation. However, the anatomy doesn’t look >>>> very pretty… >>>> >>>> >>>> Is there any way that I can transform the functional data to RAS >>>> orientation or the anatomical data to ALS orientation, respectively? >>>> >>>> >>>> I tried with ft_volumerealign. However, since the template file has no >>>> fiducials, it is hard to really precisely do this. >>>> >>>> >>>> Fair point. I would however do it the other way around, using the V2 to >>>> get the transformation from voxel space to MNI-RAS, and then use the >>>> inverse of the transformation on the functional data: in this case you >>>> could use ft_volumenormalise, with cfg.nonlinear = ‘no’. Alternatively, if >>>> you are using this procedure: >>>> http://www.fieldtriptoolbox.org/tutorial/sourcemodel#subject-specific_grids_that_are_equivalent_across_subjects_in_normalized_space, >>>> you could directly replace the source.pos of your functional data with the >>>> template.pos and then do the interpolation. >>>> >>>> To summarize: >>>> >>>> either: >>>> >>>> mri = ft_read_mri(‘V2.mri’); >>>> mri.coordsys = ‘bti’; >>>> >>>> cfg = []; >>>> cfg.nonlinear=’no’; >>>> mrin = ft_volumenormalise(cfg, mri); >>>> >>>> transform_vox2bti = mri.transform; >>>> transform_vox2spm = mrin.transform; >>>> transform_bti2spm = transform_vox2spm/transform_vox2bti >>>> source = ft_transform_geometry(transform_bti2spm, source); >>>> >>>> source_int = ft_sourceinterpolate(somecfg, source, niceanatomical); >>>> >>>> or: >>>> >>>> source.pos = templat.pos; >>>> source_int = ft_sourceinterpolate(somecfg, source, niceanatomical); >>>> >>>> Best, >>>> JM >>>> >>>> >>>> >>>> Any input on how to plot the sources on one of these nice anatomical >>>> files is highly appreciated! >>>> >>>> Thanks and best regards, >>>> >>>> Andreas >>>> >>>> >>>> -- >>>> Dipl.-Psych. Andreas Sauer >>>> Max Planck Institute for Brain Research >>>> Deutschordenstraße 46 >>>> 60528 Frankfurt am Main >>>> Germany >>>> >>>> T: +49 69 96769 278 >>>> F: +49 69 96769 327 >>>> Email: sauer.mpih at gmail.com >>>> www.brain.mpg.de >>>> _______________________________________________ >>>> fieldtrip mailing list >>>> fieldtrip at donders.ru.nl >>>> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip >>>> >>>> >>>> >>>> _______________________________________________ >>>> fieldtrip mailing list >>>> fieldtrip at donders.ru.nl >>>> https://mailman.science.ru.nl/mailman/listinfo/fieldtrip >>>> >>> >>> >>> >>> -- >>> Dipl.-Psych. Andreas Sauer >>> Max Planck Institute for Brain Research >>> Deutschordenstraße 46 >>> 60528 Frankfurt am Main >>> Germany >>> >>> T: +49 69 96769 278 >>> F: +49 69 96769 327 >>> Email: sauer.mpih at gmail.com >>> www.brain.mpg.de >>> _______________________________________________ >>> fieldtrip mailing list >>> fieldtrip at donders.ru.nl >>> https://mailman.science.ru.nl/mailman/listinfo/fieldtrip >>> >>> >>> >>> >>> _______________________________________________ >>> fieldtrip mailing list >>> fieldtrip at donders.ru.nl >>> https://mailman.science.ru.nl/mailman/listinfo/fieldtrip >>> >> >> >> >> -- >> Dipl.-Psych. Andreas Sauer >> Max Planck Institute for Brain Research >> Deutschordenstraße 46 >> 60528 Frankfurt am Main >> Germany >> >> T: +49 69 96769 278 >> F: +49 69 96769 327 >> Email: sauer.mpih at gmail.com >> www.brain.mpg.de >> >> _______________________________________________ >> fieldtrip mailing list >> fieldtrip at donders.ru.nl >> https://mailman.science.ru.nl/mailman/listinfo/fieldtrip >> > > > > -- > Marc Recasens > > Tel.: +44 7845810006 > Tel.: +34 639241598 > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > https://mailman.science.ru.nl/mailman/listinfo/fieldtrip > -- Dipl.-Psych. Andreas Sauer Max Planck Institute for Brain Research Deutschordenstraße 46 60528 Frankfurt am Main Germany T: +49 69 96769 278 F: +49 69 96769 327 Email: sauer.mpih at gmail.com www.brain.mpg.de -------------- next part -------------- An HTML attachment was scrubbed... URL: From pgoodin at swin.edu.au Tue Jun 21 23:44:08 2016 From: pgoodin at swin.edu.au (Peter Goodin) Date: Tue, 21 Jun 2016 21:44:08 +0000 Subject: [FieldTrip] Compensation for maxfilter in source analysis? Message-ID: Hi list, Just wondering if there's a best practice for source analysis of neuromag maxfiltered data using fieldtrip? Does the lead field need to be normalised to compensate for the mags / grads? If yes, zscore? Smallest eigenvalues? Something else? Does the rank of the source analysis need to be reduced because of the lowered dimensionality of the data? As I used tsss and if it needs to be reduced, should I reduce based on individual eigenvalues (eg diagonal S from SVD) or a fixed value (~60)? Thanks and sorry for the barrage of questions. Peter -------------- next part -------------- An HTML attachment was scrubbed... URL: From pooneh.baniasad at gmail.com Wed Jun 22 08:02:43 2016 From: pooneh.baniasad at gmail.com (pooneh baniasad) Date: Wed, 22 Jun 2016 10:32:43 +0430 Subject: [FieldTrip] Generating EEG In-Reply-To: References: <18671af9961ed227b7f9057f368bd763@cam.ac.uk> Message-ID: ​Dear Pa​rham & Diego Thanks for your suggestions. 😊 On Mon, Jun 20, 2016 at 4:13 PM, Diego Lozano-Soldevilla < dlozanosoldevilla at gmail.com> wrote: > Hi Pouneh, > > Please find below some useful example scripts that you can adapt to your > needs: > > > http://www.fieldtriptoolbox.org/example/compute_forward_simulated_data_and_apply_a_dipole_fit > > http://www.fieldtriptoolbox.org/example/compute_forward_simulated_data_and_apply_a_beamformer_scan > http://www.fieldtriptoolbox.org/example/combineplanar_pipelineorder > > best, > > Diego > > > > On 20 June 2016 at 12:53, parham hashemzadeh wrote: > >> Hi Pooneh >> No it can not generate synthetic data. You will have to define either a >> set of dipoles or simply define a source function. You will then need to >> compute the forward problem (BEM) for the defined sources and the given >> head model. That will then become your raw Syhthetic data. >> After that, you will need to reconstruct using your generated data. >> Please note that in order to not commit the inverse error (also known as >> inverse crime), make sure that you reconstruct on a different mesh. >> best of luck >> parham hashemzadeh >> Senior Research Associate at the University of Cambridge, UK. >> >> On 2016-06-20 08:03, pooneh baniasad wrote: >> >>> Dear community, >>> >>> My name is Pouneh Baniasad and I am working on my master thesis in >>> Tehran University of Medical Sciences. I'm trying to generate EEG >>> signal without using any raw data. Actually I want to completely >>> simulating EEG. My question is can Fieldtrip simulate EEG signal? If >>> the answer is yes, what's the procedure? Is it using dipole model or >>> anything e-- >>> >>> Bests >>> >>> Pouneh Baniasad >>> _______________________________________________ >>> fieldtrip mailing list >>> fieldtrip at donders.ru.nl >>> https://mailman.science.ru.nl/mailman/listinfo/fieldtrip >>> >> >> -- >> best regards >> Parham Hashemzadeh >> Research Associate >> Department of Applied Mathematics and Theoretical Physics >> University of Cambridge, UK. >> email: hashemzadeh at damtp.cam.ac.uk >> _______________________________________________ >> fieldtrip mailing list >> fieldtrip at donders.ru.nl >> https://mailman.science.ru.nl/mailman/listinfo/fieldtrip >> > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > https://mailman.science.ru.nl/mailman/listinfo/fieldtrip > -- Bests Pouneh Baniasad -------------- next part -------------- An HTML attachment was scrubbed... URL: From carsten.wolters at uni-muenster.de Wed Jun 22 08:29:45 2016 From: carsten.wolters at uni-muenster.de (Carsten Wolters) Date: Wed, 22 Jun 2016 08:29:45 +0200 Subject: [FieldTrip] Early Stage Researcher position available in EU-ITN project ChildBrain In-Reply-To: <79D7BF5F-97B6-436B-AA7C-1801AF32F7A1@donders.ru.nl> References: <79D7BF5F-97B6-436B-AA7C-1801AF32F7A1@donders.ru.nl> Message-ID: <331808D9-7527-485B-A8EF-91A9218B1AAC@uni-muenster.de> Early Stage Researcher (ESR) / Doctoral Student Neuroscientist with focus on the EEG/MEG inverse problem (project ESR14) The medical faculty of the University of Münster, Germany, invites applications for an Early Stage Researcher (ESR) / Doctoral Student Ref. 11298 Start is 01.07.2016 for a full-time fixed-term position beginning as soon as possible with funding for 26 months with a possible extension to work on the Electroencephalography (EEG) and Magnetoencephalography (MEG) inverse problem in realistic children head volume conductor models within the ChildBrain consortium (“Advancing brain research in children’s developmental neurocognitive disorders”). ChildBrain is part of the Marie Skłodowska-Curie Actions (MSCA) Innovative Training Networks (ITN). More detailed informations about the ChildBrain project, the ChildBrain consortium and especially more informations for this position, namely the ESR14 project, can be found on www.childbrain.eu . The ESR is expected to pursue a PhD degree at WWU Münster, either the Dr.rer.nat. at the Faculty of Mathematics and Computer Science or the Dr.rer.medic. (see http://campus.uni-muenster.de/395.html?&L=1 ) at the Faculty of Medicine. Therefore, prerequisite for the candidate is a Master’s degree in a relevant academic area such as applied mathematics, computer science, physics, biomedical or electrical engineering or similar disciplines. Good programming expertise in Matlab and/or C++ and experience with the Linux operating system is expected, because large software toolboxes are used and further developed. The working language is English. The applicant’s merits are assessed on the basis of the quality of Master’s level studies and thesis, previous experience with numerical mathematics, inverse problems, software development, motivation and research interests. The location for this research will mainly be the workgroups “SIM-NEURO: Stimulation, Imaging and Modeling of NEUROnal networks” of PD Dr. Wolters at the Institute for Biomagnetism and Biosignalanalysis (IBB) and “Imaging” of Prof. Dr. Martin Burger at the Institute for Computational and Applied Mathematics, both at the University of Münster in Germany. Expected close collaborations and visits are to the partnering institutes, namely Aston University in England, the KU Leuven and Icometrix in Leuven, Belgium. The salary, based on the Marie Curie Program regulations, is competitive and consists of living and mobility allowance and a possible family allowance. Note that we can only hire ESR’s, who are in the first four years of his/her research career and do not have a doctoral degree. Furthermore, they should not have resided in Germany for more than 12 months in the 3 years immediately prior to the recruitment date and not have carried out their main activity (work, studies, etc.) in Germany. Appointee is subject to a six-months trial period. The application should include a statement of research interests and reasons for applying to the ESR14 project, a curriculum vitae (max. 5 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 until 29.6.2016, please send the above documents as pdfs to PD Dr.rer.nat. Carsten Wolters, Institute for Biomagnetism and Biosignalanalysis, University of Münster, Malmedyweg 15, 48149 Münster, Germany, or by Email to carstenDOTwoltersATuni-muensterDOTde. For additional information please see the ChildBrain website (www.childbrain.eu ) or contact PD Dr. Carsten Wolters (Email: carstenDOTwoltersATuni-muensterDOTde, Phone: +49 (0)251 / 83-56904). Applications of women are specifically invited. In the case of similar qualifications, competence, and specific achievements, women will be considered on preferential terms within the framework of the legal possibilities. Handicapped candidates with equivalent qualifications will be given preference. Official link of the position: http://klinikum.uni-muenster.de/index.php?id=3290&tx_ttnews%5Btt_news%5D=6277&cHash=cc9fda89011a31171278368cedc4ec4c -------------- next part -------------- An HTML attachment was scrubbed... URL: From seymourr at aston.ac.uk Wed Jun 22 12:06:17 2016 From: seymourr at aston.ac.uk (Seymour, Robert (Research Student)) Date: Wed, 22 Jun 2016 10:06:17 +0000 Subject: [FieldTrip] trigger info Message-ID: Hi Carine, During my pipeline I downsample before ICA, however the trigger information is left intact. Maybe if you attach your ICA code we could help... Robert Seymour (PhD Student, Aston Brain Centre) -------------- next part -------------- An HTML attachment was scrubbed... URL: From carine.signoret at liu.se Wed Jun 22 12:39:29 2016 From: carine.signoret at liu.se (Carine Signoret) Date: Wed, 22 Jun 2016 12:39:29 +0200 Subject: [FieldTrip] trigger info In-Reply-To: References: Message-ID: Hi Robert, Thank you so much for your reply! In my preprocessing steps, I select the MEG electrodes only, so I loose the trigger information (that is the STI101 channel). So it is not due to downsample but to the fact that I suppressed the channel myself (I still have the info for the triggers I have selected during the preprocessing step -trialinfo-, BUT NOT for the other following triggers that should appear in the segments)... However, if I keep all channels, I wonder that since the trigger channel send a pulse signal at 250Hz, if I downsample below this value (e.g. 150Hz), will I loose the pulse signal? That was my question. What do you think? Best regards, Carine Le 2016-06-22 à 12:06, Seymour, Robert (Research Student) a écrit : > > Hi Carine, > > During my pipeline I downsample before ICA, however the trigger > information is left intact. Maybe if you attach your ICA code we could > help… > > Robert Seymour (PhD Student, Aston Brain Centre) > > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > https://mailman.science.ru.nl/mailman/listinfo/fieldtrip -------------- next part -------------- An HTML attachment was scrubbed... URL: From tiany20032003 at 163.com Wed Jun 22 20:23:52 2016 From: tiany20032003 at 163.com (ty) Date: Thu, 23 Jun 2016 02:23:52 +0800 (CST) Subject: [FieldTrip] Through a Glass, Darkly: the Influence of the EEG Reference on Inference about Brain Function and Disorders Message-ID: <2d4bc578.157.155795aaa74.Coremail.tiany20032003@163.com> Dear all, Since its discovery, the human electroencephalogram (EEG) has proven itself an indispensable tool for brain research. Despite this success story, there is a fundamental technical issue that has yet to be resolved: the selection of the correct EEG reference. Ideally one would like to measure neural activity restricted to certain brain regions. Since EEG amplifiers measure potential difference between the activities recorded by two electrodes, in addition to the active electrode, one must employ a reference electrode which should ideally be at zero. In theory, this might be achieved by placing the reference at a point infinitely far away. Yet the “infinite reference”, in practice, is an antenna for ambient noise which would preempt brain measurements—for example cephalic references that minimize unwanted signal pickup. Examples of such references are the unilateral-mastoid, ear, linked mastoids or ears, vertex, the tip of the nose, neck ring, etc. Unfortunately all such references are doomed to fail since there is no point on the scalp or body surface where the potential is actually zero or a constant. This has serious consequences since the non-neutral reference may itself reflect physiological dynamic processes that will be inevitably embedded into all EEG recordings. Without solving the reference issue we are looking at brain activity, as it were, “through a glass, darkly”. Recent attempts to make this “glass” more transparent have been based on mathematically constructing a reference based on physical principles and subtracting it from all EEG recordings. The best known example is the average reference (AVE). Originally proposed with an analog implementation, it was heuristically espoused by Lehman (1971) and later theoretically justified since the average of a dipole potential over a spherical surface is zero. Consequently, the AVE might be a good choice when a dense and whole brain coverage of an EEG montage is available, which explains why it is widely accepted. Nevertheless, AVE has poor performance with a lower number of electrodes. An alternative is the Reference Electrode Standardization Technique (REST) which used a re-referencing method to reconstruct the desired zero or neutral reference, based on the fact that the underlying neural sources are the same no matter what a reference is actually adopted. This Research Topic will encourage the objective comparison of the effect that various EEG references may have on inference about brain function and disorders—with respect to both physical and computational issues. The crucial point is to determine the reference that best identifies neural activity and therefore be the basis of improved estimates of various linear and non-linear EEG features. These include spectra, amplitude, latency, coherence/correlation, network, symmetry/asymmetry, fractal dimension, complexity, covariance and related statistical tests. If a single reference can be finally recognized universally as the optimal one for general use, we will have indeed rendered the “glass less opaque” and thus “know in part” more about brain function. To contribute to this end, we welcome our colleagues to submit paper with theoretical work, simulation studies, practical experimental data analysis as well as critical reviews. Important Note: All submissions/contributions to this Research Topic must be in line with the scope of the journal and section they are submitted to. While authors are encouraged to draw from other disciplines to enrich their papers where relevant, they must ensure papers fall within the section, as expressed in its Scope. Keywords: EEG, reference, ERPs Detailed information can be found at: http://journal.frontiersin.org/researchtopic/4932/ With best wishes, --------------- Yin Tian, PhD Associate Professor Biomedical engineering department ChongQing University of Posts and Telecommunications, China, 400065 -------------- next part -------------- An HTML attachment was scrubbed... URL: From Elana.Harris at cchmc.org Thu Jun 23 06:19:15 2016 From: Elana.Harris at cchmc.org (Harris, Elana) Date: Thu, 23 Jun 2016 04:19:15 +0000 Subject: [FieldTrip] Through a Glass, Darkly: the Influence of the EEG Reference on Inference about Brain Function and Disorders In-Reply-To: <2d4bc578.157.155795aaa74.Coremail.tiany20032003@163.com> References: <2d4bc578.157.155795aaa74.Coremail.tiany20032003@163.com> Message-ID: Thank you for sharing this Dr. Tian. What would be considered a "lower number of electrodes" that would make the average reference perform poorly? ________________________________ From: fieldtrip-bounces at science.ru.nl [fieldtrip-bounces at science.ru.nl] on behalf of ty [tiany20032003 at 163.com] Sent: Wednesday, June 22, 2016 2:23 PM To: fieldtrip at science.ru.nl Subject: [FieldTrip] Through a Glass, Darkly: the Influence of the EEG Reference on Inference about Brain Function and Disorders Dear all, Since its discovery, the human electroencephalogram (EEG) has proven itself an indispensable tool for brain research. Despite this success story, there is a fundamental technical issue that has yet to be resolved: the selection of the correct EEG reference. Ideally one would like to measure neural activity restricted to certain brain regions. Since EEG amplifiers measure potential difference between the activities recorded by two electrodes, in addition to the active electrode, one must employ a reference electrode which should ideally be at zero. In theory, this might be achieved by placing the reference at a point infinitely far away. Yet the “infinite reference”, in practice, is an antenna for ambient noise which would preempt brain measurements—for example cephalic references that minimize unwanted signal pickup. Examples of such references are the unilateral-mastoid, ear, linked mastoids or ears, vertex, the tip of the nose, neck ring, etc. Unfortunately all such references are doomed to fail since there is no point on the scalp or body surface where the potential is actually zero or a constant. This has serious consequences since the non-neutral reference may itself reflect physiological dynamic processes that will be inevitably embedded into all EEG recordings. Without solving the reference issue we are looking at brain activity, as it were, “through a glass, darkly”. Recent attempts to make this “glass” more transparent have been based on mathematically constructing a reference based on physical principles and subtracting it from all EEG recordings. The best known example is the average reference (AVE). Originally proposed with an analog implementation, it was heuristically espoused by Lehman (1971) and later theoretically justified since the average of a dipole potential over a spherical surface is zero. Consequently, the AVE might be a good choice when a dense and whole brain coverage of an EEG montage is available, which explains why it is widely accepted. Nevertheless, AVE has poor performance with a lower number of electrodes. An alternative is the Reference Electrode Standardization Technique (REST) which used a re-referencing method to reconstruct the desired zero or neutral reference, based on the fact that the underlying neural sources are the same no matter what a reference is actually adopted. This Research Topic will encourage the objective comparison of the effect that various EEG references may have on inference about brain function and disorders—with respect to both physical and computational issues. The crucial point is to determine the reference that best identifies neural activity and therefore be the basis of improved estimates of various linear and non-linear EEG features. These include spectra, amplitude, latency, coherence/correlation, network, symmetry/asymmetry, fractal dimension, complexity, covariance and related statistical tests. If a single reference can be finally recognized universally as the optimal one for general use, we will have indeed rendered the “glass less opaque” and thus “know in part” more about brain function. To contribute to this end, we welcome our colleagues to submit paper with theoretical work, simulation studies, practical experimental data analysis as well as critical reviews. Important Note: All submissions/contributions to this Research Topic must be in line with the scope of the journal and section they are submitted to. While authors are encouraged to draw from other disciplines to enrich their papers where relevant, they must ensure papers fall within the section, as expressed in its Scope. Keywords: EEG, reference, ERPs Detailed information can be found at: http://journal.frontiersin.org/researchtopic/4932/ With best wishes, --------------- Yin Tian, PhD Associate Professor Biomedical engineering department ChongQing University of Posts and Telecommunications, China, 400065 -------------- next part -------------- An HTML attachment was scrubbed... URL: From matthias.duempelmann at uniklinik-freiburg.de Thu Jun 23 09:34:02 2016 From: matthias.duempelmann at uniklinik-freiburg.de (=?iso-8859-1?Q?Dr=2E-Ing=2E_Matthias_D=FCmpelmann?=) Date: Thu, 23 Jun 2016 07:34:02 +0000 Subject: [FieldTrip] Seizure localization problems Message-ID: Dear colleagues, we are trying to evaluate systematically the localization of rhythmic activity at the onset of epileptic seizures in patients, who are subsequently evaluated with intracranial recordings. We are trying to use DICS but quite often receive results, which are obviously wrong. In the attached screenshots you can see the peace of EEG, which is evaluated and the localization result with a maximum in the cerebellum. This a typical localization for the cases with obvious miss localizations. A further seizure with a similar EEG pattern was localized in the right temporal lobe, which matches the EEG pattern and also the intracranial findings. Head model is generated with ASA, also the electrodes file is in the ASA format. The geometrical match of source points, head model and electrodes is checked using ft_plot_.... methods. Here is the code sniplet relevant for the localization algorithm: % Analysis frequency SourceFrequency = 4.0 % read eeg, electrodes and volume conductor model %[dat] = ft_read_data(filename); hdr = ft_read_header(filename); elec = ft_read_sens(elecfile, 'fileformat','asa_elc'); headmodel = ft_read_vol(volumefilename,'fileformat','asa_vol'); mri = ft_read_mri(mrifilename, 'fileformat','asa_mri'); % eeg data preprocessing cfgeeg.dataset = filename; cfgeeg.continuous = 'yes' cfg.covariance = 'yes'; cfg.covariancewindow = 'all'; cfg.demean = 'yes' [data] = ft_preprocessing(cfgeeg); % Freqanalysis for beamformer cfg = []; cfg.channel = {'*'}; cfg.method = 'mtmfft'; cfg.foilim = [1 100]; cfg.tapsmofrq = 4; cfg.taper = 'hanning'; cfg.output = 'powandcsd'; % for common filter over conditions powcsd_all = ft_freqanalysis(cfg, data); % Create leadfield grid cfg = []; cfg.channel = elec.label; cfg.elec = elec; cfg.headmodel = headmodel; cfg.dics.reducerank = 3; % default for MEG is 2, for EEG is 3 cfg.grid.resolution = 0.5; % use a 3-D grid with a 0.5 cm resolution cfg.grid.unit = 'cm'; cfg.grid.tight = 'yes'; [grid] = ft_prepare_leadfield(cfg); % source analysis cfg = []; cfg.channel = elec.label; cfg.method = 'dics'; cfg.frequency = SourceFrequency; cfg.grid = grid; cfg.headmodel = headmodel; cfg.elec = elec; cfg.senstype = 'EEG'; cfg.dics.keepfilter = 'yes'; % We wish to use the calculated filter later on cfg.dics.projectnoise = 'yes'; cfg.dics.lambda = '0.3%'; source_raw = ft_sourceanalysis(cfg, powcsd_all); I played with a couple of parameters like cfg.dics.lambda, but without success. Do you have ideas how to improve our localization results ? Thank you, Matthias UNIVERSITÄTSKLINIKUM FREIBURG Epileptologie Breisacher Str. 64 · 79106 Freiburg Telefon: +49 761 270-52410 matthias.duempelmann at uniklinik-freiburg.de www.uniklinik-freiburg.de -------------- next part -------------- A non-text attachment was scrubbed... Name: analysisinterval_Seizure2.png Type: image/png Size: 110002 bytes Desc: analysisinterval_Seizure2.png URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: localizationresults.png Type: image/png Size: 589001 bytes Desc: localizationresults.png URL: From azeez.adebimpe5 at gmail.com Thu Jun 23 11:07:36 2016 From: azeez.adebimpe5 at gmail.com (Azeez Adebimpe) Date: Thu, 23 Jun 2016 11:07:36 +0200 Subject: [FieldTrip] Seizure localization problems In-Reply-To: References: Message-ID: Hi Mathias, I will suggest you try other method like eLORETA or MNE first and compare the result. Best, AZ On Thu, Jun 23, 2016 at 9:34 AM, Dr.-Ing. Matthias Dümpelmann < matthias.duempelmann at uniklinik-freiburg.de> wrote: > Dear colleagues, > > we are trying to evaluate systematically the localization of rhythmic > activity at the onset of epileptic seizures in patients, who are > subsequently evaluated with intracranial recordings. > > We are trying to use DICS but quite often receive results, which are > obviously wrong. In the attached screenshots you can see the peace of EEG, > which is evaluated and the localization result with a maximum in the > cerebellum. > > This a typical localization for the cases with obvious miss localizations. > A further seizure with a similar EEG pattern was localized in the right > temporal lobe, which matches the EEG pattern and also the intracranial > findings. > > Head model is generated with ASA, also the electrodes file is in the ASA > format. The geometrical match of source points, head model and electrodes > is checked using ft_plot_.... methods. > > Here is the code sniplet relevant for the localization algorithm: > > % Analysis frequency > SourceFrequency = 4.0 > > % read eeg, electrodes and volume conductor model > %[dat] = ft_read_data(filename); > hdr = ft_read_header(filename); > elec = ft_read_sens(elecfile, 'fileformat','asa_elc'); > headmodel = ft_read_vol(volumefilename,'fileformat','asa_vol'); > mri = ft_read_mri(mrifilename, 'fileformat','asa_mri'); > > % eeg data preprocessing > cfgeeg.dataset = filename; > cfgeeg.continuous = 'yes' > cfg.covariance = 'yes'; > cfg.covariancewindow = 'all'; > cfg.demean = 'yes' > > [data] = ft_preprocessing(cfgeeg); > > % Freqanalysis for beamformer > cfg = []; > cfg.channel = {'*'}; > cfg.method = 'mtmfft'; > cfg.foilim = [1 100]; > cfg.tapsmofrq = 4; > cfg.taper = 'hanning'; > cfg.output = 'powandcsd'; > > > % for common filter over conditions > powcsd_all = ft_freqanalysis(cfg, data); > > % Create leadfield grid > cfg = []; > cfg.channel = elec.label; > cfg.elec = elec; > cfg.headmodel = headmodel; > cfg.dics.reducerank = 3; % default for MEG is 2, for EEG is 3 > cfg.grid.resolution = 0.5; % use a 3-D grid with a 0.5 cm resolution > cfg.grid.unit = 'cm'; > cfg.grid.tight = 'yes'; > [grid] = ft_prepare_leadfield(cfg); > > % source analysis > cfg = []; > cfg.channel = elec.label; > cfg.method = 'dics'; > cfg.frequency = SourceFrequency; > cfg.grid = grid; > cfg.headmodel = headmodel; > cfg.elec = elec; > cfg.senstype = 'EEG'; > cfg.dics.keepfilter = 'yes'; % We wish to use the calculated filter > later on > cfg.dics.projectnoise = 'yes'; > cfg.dics.lambda = '0.3%'; > source_raw = ft_sourceanalysis(cfg, powcsd_all); > > > I played with a couple of parameters like cfg.dics.lambda, but without > success. > > Do you have ideas how to improve our localization results ? > > Thank you, > > Matthias > > > > UNIVERSITÄTSKLINIKUM FREIBURG > Epileptologie > Breisacher Str. 64 · 79106 Freiburg > Telefon: +49 761 270-52410 > matthias.duempelmann at uniklinik-freiburg.de > > www.uniklinik-freiburg.de > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > https://mailman.science.ru.nl/mailman/listinfo/fieldtrip > -------------- next part -------------- An HTML attachment was scrubbed... URL: From matthias.duempelmann at uniklinik-freiburg.de Thu Jun 23 14:51:56 2016 From: matthias.duempelmann at uniklinik-freiburg.de (=?utf-8?B?RHIuLUluZy4gTWF0dGhpYXMgRMO8bXBlbG1hbm4=?=) Date: Thu, 23 Jun 2016 12:51:56 +0000 Subject: [FieldTrip] Seizure localization problems In-Reply-To: References: Message-ID: <67d7de139b0440bfad130b5479155478@UKL-EX02.ad.uniklinik-freiburg.de> Dear Azeez, thank you for your suggestion. Just exchanging cfg.method = 'dics'; to cfg.method = 'eloreta'; resulted in a reasonable solution (see attachment). I also get useful results using MUIC or sLORETA in the frequency domain as the methods are implemented in ASA. This makes me even more suspicious, what is going wrong with the DICS algorithm. Best regards, Matthias Von: fieldtrip-bounces at science.ru.nl [mailto:fieldtrip-bounces at science.ru.nl] Im Auftrag von Azeez Adebimpe Gesendet: Thursday, June 23, 2016 11:08 AM An: FieldTrip discussion list Cc: Nino Epitashvili Betreff: Re: [FieldTrip] Seizure localization problems Hi Mathias, I will suggest you try other method like eLORETA or MNE first and compare the result. Best, AZ On Thu, Jun 23, 2016 at 9:34 AM, Dr.-Ing. Matthias Dümpelmann > wrote: Dear colleagues, we are trying to evaluate systematically the localization of rhythmic activity at the onset of epileptic seizures in patients, who are subsequently evaluated with intracranial recordings. We are trying to use DICS but quite often receive results, which are obviously wrong. In the attached screenshots you can see the peace of EEG, which is evaluated and the localization result with a maximum in the cerebellum. This a typical localization for the cases with obvious miss localizations. A further seizure with a similar EEG pattern was localized in the right temporal lobe, which matches the EEG pattern and also the intracranial findings. Head model is generated with ASA, also the electrodes file is in the ASA format. The geometrical match of source points, head model and electrodes is checked using ft_plot_.... methods. Here is the code sniplet relevant for the localization algorithm: % Analysis frequency SourceFrequency = 4.0 % read eeg, electrodes and volume conductor model %[dat] = ft_read_data(filename); hdr = ft_read_header(filename); elec = ft_read_sens(elecfile, 'fileformat','asa_elc'); headmodel = ft_read_vol(volumefilename,'fileformat','asa_vol'); mri = ft_read_mri(mrifilename, 'fileformat','asa_mri'); % eeg data preprocessing cfgeeg.dataset = filename; cfgeeg.continuous = 'yes' cfg.covariance = 'yes'; cfg.covariancewindow = 'all'; cfg.demean = 'yes' [data] = ft_preprocessing(cfgeeg); % Freqanalysis for beamformer cfg = []; cfg.channel = {'*'}; cfg.method = 'mtmfft'; cfg.foilim = [1 100]; cfg.tapsmofrq = 4; cfg.taper = 'hanning'; cfg.output = 'powandcsd'; % for common filter over conditions powcsd_all = ft_freqanalysis(cfg, data); % Create leadfield grid cfg = []; cfg.channel = elec.label; cfg.elec = elec; cfg.headmodel = headmodel; cfg.dics.reducerank = 3; % default for MEG is 2, for EEG is 3 cfg.grid.resolution = 0.5; % use a 3-D grid with a 0.5 cm resolution cfg.grid.unit = 'cm'; cfg.grid.tight = 'yes'; [grid] = ft_prepare_leadfield(cfg); % source analysis cfg = []; cfg.channel = elec.label; cfg.method = 'dics'; cfg.frequency = SourceFrequency; cfg.grid = grid; cfg.headmodel = headmodel; cfg.elec = elec; cfg.senstype = 'EEG'; cfg.dics.keepfilter = 'yes'; % We wish to use the calculated filter later on cfg.dics.projectnoise = 'yes'; cfg.dics.lambda = '0.3%'; source_raw = ft_sourceanalysis(cfg, powcsd_all); I played with a couple of parameters like cfg.dics.lambda, but without success. Do you have ideas how to improve our localization results ? Thank you, Matthias UNIVERSITÄTSKLINIKUM FREIBURG Epileptologie Breisacher Str. 64 · 79106 Freiburg Telefon: +49 761 270-52410 matthias.duempelmann at uniklinik-freiburg.de www.uniklinik-freiburg.de _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl https://mailman.science.ru.nl/mailman/listinfo/fieldtrip -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: eloreta.png Type: image/png Size: 193038 bytes Desc: eloreta.png URL: From azeez.adebimpe5 at gmail.com Thu Jun 23 15:57:15 2016 From: azeez.adebimpe5 at gmail.com (Azeez Adebimpe) Date: Thu, 23 Jun 2016 15:57:15 +0200 Subject: [FieldTrip] Seizure localization problems In-Reply-To: <67d7de139b0440bfad130b5479155478@UKL-EX02.ad.uniklinik-freiburg.de> References: <67d7de139b0440bfad130b5479155478@UKL-EX02.ad.uniklinik-freiburg.de> Message-ID: Hi Mathias, DICS and LCMV can also give reasonable result but require some normalization. Try to estimate to neural activity index as explained in this tutorial. http://www.fieldtriptoolbox.org/tutorial/beamformer Best, Az On Thu, Jun 23, 2016 at 2:51 PM, Dr.-Ing. Matthias Dümpelmann < matthias.duempelmann at uniklinik-freiburg.de> wrote: > Dear Azeez, > > > > thank you for your suggestion. > > > > Just exchanging > > > > cfg.method = 'dics'; > > > > to > > > > cfg.method = 'eloreta'; > > > > resulted in a reasonable solution (see attachment). > > > > I also get useful results using MUIC or sLORETA in the frequency domain as > the methods are implemented in ASA. > > > > This makes me even more suspicious, what is going wrong with the DICS > algorithm. > > > > Best regards, > > > > Matthias > > > > > > > > *Von:* fieldtrip-bounces at science.ru.nl [mailto: > fieldtrip-bounces at science.ru.nl] *Im Auftrag von *Azeez Adebimpe > *Gesendet:* Thursday, June 23, 2016 11:08 AM > *An:* FieldTrip discussion list > *Cc:* Nino Epitashvili > *Betreff:* Re: [FieldTrip] Seizure localization problems > > > > Hi Mathias, > > I will suggest you try other method like eLORETA or MNE first and compare > the result. > > > > Best, > > > > AZ > > > > On Thu, Jun 23, 2016 at 9:34 AM, Dr.-Ing. Matthias Dümpelmann < > matthias.duempelmann at uniklinik-freiburg.de> wrote: > > Dear colleagues, > > we are trying to evaluate systematically the localization of rhythmic > activity at the onset of epileptic seizures in patients, who are > subsequently evaluated with intracranial recordings. > > We are trying to use DICS but quite often receive results, which are > obviously wrong. In the attached screenshots you can see the peace of EEG, > which is evaluated and the localization result with a maximum in the > cerebellum. > > This a typical localization for the cases with obvious miss localizations. > A further seizure with a similar EEG pattern was localized in the right > temporal lobe, which matches the EEG pattern and also the intracranial > findings. > > Head model is generated with ASA, also the electrodes file is in the ASA > format. The geometrical match of source points, head model and electrodes > is checked using ft_plot_.... methods. > > Here is the code sniplet relevant for the localization algorithm: > > % Analysis frequency > SourceFrequency = 4.0 > > % read eeg, electrodes and volume conductor model > %[dat] = ft_read_data(filename); > hdr = ft_read_header(filename); > elec = ft_read_sens(elecfile, 'fileformat','asa_elc'); > headmodel = ft_read_vol(volumefilename,'fileformat','asa_vol'); > mri = ft_read_mri(mrifilename, 'fileformat','asa_mri'); > > % eeg data preprocessing > cfgeeg.dataset = filename; > cfgeeg.continuous = 'yes' > cfg.covariance = 'yes'; > cfg.covariancewindow = 'all'; > cfg.demean = 'yes' > > [data] = ft_preprocessing(cfgeeg); > > % Freqanalysis for beamformer > cfg = []; > cfg.channel = {'*'}; > cfg.method = 'mtmfft'; > cfg.foilim = [1 100]; > cfg.tapsmofrq = 4; > cfg.taper = 'hanning'; > cfg.output = 'powandcsd'; > > > % for common filter over conditions > powcsd_all = ft_freqanalysis(cfg, data); > > % Create leadfield grid > cfg = []; > cfg.channel = elec.label; > cfg.elec = elec; > cfg.headmodel = headmodel; > cfg.dics.reducerank = 3; % default for MEG is 2, for EEG is 3 > cfg.grid.resolution = 0.5; % use a 3-D grid with a 0.5 cm resolution > cfg.grid.unit = 'cm'; > cfg.grid.tight = 'yes'; > [grid] = ft_prepare_leadfield(cfg); > > % source analysis > cfg = []; > cfg.channel = elec.label; > cfg.method = 'dics'; > cfg.frequency = SourceFrequency; > cfg.grid = grid; > cfg.headmodel = headmodel; > cfg.elec = elec; > cfg.senstype = 'EEG'; > cfg.dics.keepfilter = 'yes'; % We wish to use the calculated filter > later on > cfg.dics.projectnoise = 'yes'; > cfg.dics.lambda = '0.3%'; > source_raw = ft_sourceanalysis(cfg, powcsd_all); > > > I played with a couple of parameters like cfg.dics.lambda, but without > success. > > Do you have ideas how to improve our localization results ? > > Thank you, > > Matthias > > > > UNIVERSITÄTSKLINIKUM FREIBURG > Epileptologie > Breisacher Str. 64 · 79106 Freiburg > Telefon: +49 761 270-52410 > matthias.duempelmann at uniklinik-freiburg.de > > www.uniklinik-freiburg.de > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > https://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > https://mailman.science.ru.nl/mailman/listinfo/fieldtrip > -------------- next part -------------- An HTML attachment was scrubbed... URL: From rene.scheeringa at donders.ru.nl Thu Jun 23 17:21:54 2016 From: rene.scheeringa at donders.ru.nl (=?iso-8859-1?B?U2NoZWVyaW5nYSwgUi4gKFJlbukp?=) Date: Thu, 23 Jun 2016 15:21:54 +0000 Subject: [FieldTrip] error in ft_mvaranalysis Message-ID: <0317032ABCAD99429A3D6296AD31B42037CF174E@exprd04.hosting.ru.nl> Dear fellow FieldTrippers, I am planning to do granger causality analysis on human ECoG data. For this I need to first run ft_mvaranalysis (http://www.fieldtriptoolbox.org/tutorial/connectivity). However when I do this I get an error message that the variable 'dof' variable or function is missing, so it seems like for some reason the degrees of freedom are not calculated. I wonder if there is something I am doing wrong inusing thsi function or if this is a potential bug. The data I am trying to analyse is human ECoG of a simple visual stimulation task in which I in first instance want to compare granger-causality in stimulation versus baseline periods. Visual stimulation takes place is 1 second long starting and t=0. Below I have included the the error message and the cconfiguration settings I used. The problem occurs with the latest version of Fieldtrip (June 22nd 2016), and does not depend on whether I specify the 'biosig' or 'bsmart' toolbox. The error occurs after FieldTrip indicates it is cumputing the AR-model and is starting the Best wishes, René Scheeringa Error message: Undefined function or variable 'dof'. Error in ft_mvaranalysis (line 515) mvardata.dof = dof; Configuration structure: cfg=[]; cfg.toolbox = 'biosig'; %bsmart'; cfg.mvarmethod = 2; cfg.order = 10; cfg.channelcmb = cell(3,2); cfg.channelcmb{1,1}='OcL05';cfg.channelcmb{1,2}='OcL07'; cfg.channelcmb{2,1}='OcL05';cfg.channelcmb{2,2}='OcL13'; cfg.channelcmb{3,1}='OcL07';cfg.channelcmb{3,2}='OcL13'; cfg.keeptrials = 'no'; %'yes'; cfg.jackknife = 'no'; % (default) or 'yes' cfg.zscore = 'yes'; %'no' (default) cfg.demean = 'yes'; %'yes' (default) or 'no' cfg.ems = 'no'; %no' (default) or 'yes' explicit removal ensemble mean cfg.t_ftimwin = 0.8; %the width of the sliding window on which the coefficients are estimated cfg.toi = [-0.4 0.6]; %[t1 t2 ... tx] the time points at which the windows are centered mvardata = ft_mvaranalysis(cfg, data_in); -------------- next part -------------- An HTML attachment was scrubbed... URL: From matthias.duempelmann at uniklinik-freiburg.de Fri Jun 24 08:58:15 2016 From: matthias.duempelmann at uniklinik-freiburg.de (=?utf-8?B?RHIuLUluZy4gTWF0dGhpYXMgRMO8bXBlbG1hbm4=?=) Date: Fri, 24 Jun 2016 06:58:15 +0000 Subject: [FieldTrip] Seizure localization problems In-Reply-To: References: <67d7de139b0440bfad130b5479155478@UKL-EX02.ad.uniklinik-freiburg.de> Message-ID: Dear Az, I defined now two intervals, one showing rhythmic seizure activity and one baseline interval prior to the seizure as you can see on the screenshot. Now it localizes as expected in the right temporal lobe. I only wonder about the very small “activation” volume. Thank you, Matthias Von: fieldtrip-bounces at science.ru.nl [mailto:fieldtrip-bounces at science.ru.nl] Im Auftrag von Azeez Adebimpe Gesendet: Thursday, June 23, 2016 3:57 PM An: FieldTrip discussion list Betreff: Re: [FieldTrip] Seizure localization problems Hi Mathias, DICS and LCMV can also give reasonable result but require some normalization. Try to estimate to neural activity index as explained in this tutorial. http://www.fieldtriptoolbox.org/tutorial/beamformer Best, Az On Thu, Jun 23, 2016 at 2:51 PM, Dr.-Ing. Matthias Dümpelmann > wrote: Dear Azeez, thank you for your suggestion. Just exchanging cfg.method = 'dics'; to cfg.method = 'eloreta'; resulted in a reasonable solution (see attachment). I also get useful results using MUIC or sLORETA in the frequency domain as the methods are implemented in ASA. This makes me even more suspicious, what is going wrong with the DICS algorithm. Best regards, Matthias Von: fieldtrip-bounces at science.ru.nl [mailto:fieldtrip-bounces at science.ru.nl] Im Auftrag von Azeez Adebimpe Gesendet: Thursday, June 23, 2016 11:08 AM An: FieldTrip discussion list Cc: Nino Epitashvili Betreff: Re: [FieldTrip] Seizure localization problems Hi Mathias, I will suggest you try other method like eLORETA or MNE first and compare the result. Best, AZ On Thu, Jun 23, 2016 at 9:34 AM, Dr.-Ing. Matthias Dümpelmann > wrote: Dear colleagues, we are trying to evaluate systematically the localization of rhythmic activity at the onset of epileptic seizures in patients, who are subsequently evaluated with intracranial recordings. We are trying to use DICS but quite often receive results, which are obviously wrong. In the attached screenshots you can see the peace of EEG, which is evaluated and the localization result with a maximum in the cerebellum. This a typical localization for the cases with obvious miss localizations. A further seizure with a similar EEG pattern was localized in the right temporal lobe, which matches the EEG pattern and also the intracranial findings. Head model is generated with ASA, also the electrodes file is in the ASA format. The geometrical match of source points, head model and electrodes is checked using ft_plot_.... methods. Here is the code sniplet relevant for the localization algorithm: % Analysis frequency SourceFrequency = 4.0 % read eeg, electrodes and volume conductor model %[dat] = ft_read_data(filename); hdr = ft_read_header(filename); elec = ft_read_sens(elecfile, 'fileformat','asa_elc'); headmodel = ft_read_vol(volumefilename,'fileformat','asa_vol'); mri = ft_read_mri(mrifilename, 'fileformat','asa_mri'); % eeg data preprocessing cfgeeg.dataset = filename; cfgeeg.continuous = 'yes' cfg.covariance = 'yes'; cfg.covariancewindow = 'all'; cfg.demean = 'yes' [data] = ft_preprocessing(cfgeeg); % Freqanalysis for beamformer cfg = []; cfg.channel = {'*'}; cfg.method = 'mtmfft'; cfg.foilim = [1 100]; cfg.tapsmofrq = 4; cfg.taper = 'hanning'; cfg.output = 'powandcsd'; % for common filter over conditions powcsd_all = ft_freqanalysis(cfg, data); % Create leadfield grid cfg = []; cfg.channel = elec.label; cfg.elec = elec; cfg.headmodel = headmodel; cfg.dics.reducerank = 3; % default for MEG is 2, for EEG is 3 cfg.grid.resolution = 0.5; % use a 3-D grid with a 0.5 cm resolution cfg.grid.unit = 'cm'; cfg.grid.tight = 'yes'; [grid] = ft_prepare_leadfield(cfg); % source analysis cfg = []; cfg.channel = elec.label; cfg.method = 'dics'; cfg.frequency = SourceFrequency; cfg.grid = grid; cfg.headmodel = headmodel; cfg.elec = elec; cfg.senstype = 'EEG'; cfg.dics.keepfilter = 'yes'; % We wish to use the calculated filter later on cfg.dics.projectnoise = 'yes'; cfg.dics.lambda = '0.3%'; source_raw = ft_sourceanalysis(cfg, powcsd_all); I played with a couple of parameters like cfg.dics.lambda, but without success. Do you have ideas how to improve our localization results ? Thank you, Matthias UNIVERSITÄTSKLINIKUM FREIBURG Epileptologie Breisacher Str. 64 · 79106 Freiburg Telefon: +49 761 270-52410 matthias.duempelmann at uniklinik-freiburg.de www.uniklinik-freiburg.de _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl https://mailman.science.ru.nl/mailman/listinfo/fieldtrip _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl https://mailman.science.ru.nl/mailman/listinfo/fieldtrip -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: DICS_wbasline.png Type: image/png Size: 565026 bytes Desc: DICS_wbasline.png URL: From joseluisblues at gmail.com Fri Jun 24 11:23:07 2016 From: joseluisblues at gmail.com (Jose) Date: Fri, 24 Jun 2016 11:23:07 +0200 Subject: [FieldTrip] running FT scripts in a supercomputing cluster In-Reply-To: References: Message-ID: Hello, So, finally it works, If never is useful for other persons in the future this is the detail of what I did: 1. copy the fieldtrip folder + data in my_cluster_directory 2. do scripts: -do my main matlab script (FT_0.m) this script do not contain neither the "addpath" nor "ft_defaults" command lines pay attention to use cd(getenv('PWD')) for moving through the temporary folders in the cluster -do a matlab script to compile my main script (compilation_script.m) ### addpath('my_cluster_directory/fieldtrip-20160317'); ft_defaults % define default functions addpath('my_cluster_directory/fieldtrip-20160317/external/ctf') % for CTF MEG data mcc('-mv', '-N', '-p', 'stats', '-p', 'images', '-p', 'signal', ... '-R', '-nodisplay', '-R', '-singleCompThread', ... 'FT_0.m'); ### -do bash script to run the compilation ### #!/bin/bash module load MATLAB/2013b matlab < compilation_script.m exit ### -run it ./run_compilation.sh 3. Once the compiled script is done, two files are generated FT_0 and run_FT_0.sh Next, I need to customize my job bash script as usual ### #!/bin/bash #PBS -N FT_JOSE_1 #PBS -o FT_JOSE_1.log #PBS -e FT_JOSE_1.err #PBS -q default #PBS -l walltime=2:00:00 #PBS -l nodes=1:ppn=1 #PBS -l vmem=10gb #PBS -m ae # Name of Mat file matFileName=FT_0 # directory where the execuatble and script can be found # PBS_O_WORKDIR variable points to the directory you are submitting from ORIGDIR=$PBS_O_WORKDIR WORKDIR=$VSC_SCRATCH_NODE/$PBS_JOBID DATADIR=/user/data/gent/gvo000/gvo00022/vsc41880/ echo Hostname: $(hostname) echo ORIGDIR: $ORIGDIR echo WORKDIR: $WORKDIR mkdir -p $WORKDIR cp -ar $ORIGDIR/run_FT_0.sh $WORKDIR/ cp -ar $ORIGDIR/FT_0 $WORKDIR/ cp -ar $ORIGDIR/1_data $WORKDIR/ cp -ar $ORIGDIR/2_processed_data $WORKDIR/ # version of MATLAB version=2013b # load modules module load cluster module load MATLAB/${version} # check the working directory if [ ! -d $WORKDIR ] then echo "Directory $dir is not a directory" exit 1 fi # enter the working directory cd $WORKDIR echo $WORKDIR # check the Mat file if [ ! -x $matFileName ] then echo "No executable $matFileName found." exit 2 fi # define the sh file script=run_${matFileName}.sh # check the sh file if [ ! -x $script ] then echo "No run script $script found" exit 3 fi # make cache dir # TMPDIR is set and created by torque. 1 unique dir per job cdir=$TMPDIR/mcrcache # check cache dir mkdir -p $cdir if [ ! -d $cdir ] then echo "No tempdir $cdir found." exit 1 fi # define dir export MCR_CACHE_ROOT=$cdir # 1GB cache (more then large enough) export MCR_CACHE_SIZE=$((1024*1024*1024)) # real running ./$script $EBROOTMATLAB cd $WORKDIR cp -r 2_processed_data $ORIGDIR/ cd rm -rf $WORKDIR # END ### 4. Next I run it: sub FT_0_bash.sh Many thanks to Anne! Jose On 16 June 2016 at 10:43, Anne Urai wrote: > Hi Jose, > > When calling mcc from Matlab, a dependency analysis is first carried out > (at least in more recent versions of Matlab) - basically, Matlab goes > through the script you're compiling and finds all the functions that are > called (which must be on the path). These are all added to the executable. > In principle, if all the folders you need are on the path (which should be > okay when you call ft_default), the executable can run. > > Now, only in the case when the dependency analysis doesn't recognize > certain functions (because they are, for example, generated through > str2func) you should add them manually. I found this out through trial and > error - I'd first try to compile using the bare bones > > mcc('-mv', '-N', '-R', '-nodisplay', '-R', '-singleCompThread', 'FT_0.m'); > > when you then run the executable, you'll get an error message if a > function or a toolbox is missing (and then you can add only those that you > need and compile again). > > In your FT_0.sh, you should indeed load the MCR - otherwise, the > executable can't run. For this, I'd recommend contacting the admin of the > supercomputer cluster, since the way I do it on the cluster here is > specific to the setup. You'll probably have to activate this in your > FT_0.sh yourself and add the path to the cache of each node (something > like export MCR_CACHE_ROOT=$TMPDIR). > > Good luck! > > — > Anne E. Urai, MSc > PhD student | Institut für Neurophysiologie und Pathophysiologie > Universitätsklinikum Hamburg-Eppendorf | Martinistrasse 52, 20246 | > Hamburg, Germany > www.anneurai.net / @AnneEUrai > > From: Jose > Reply: Jose > Date: 15 June 2016 at 19:14:43 > To: Anne Urai > Subject: Re: [FieldTrip] running FT scripts in a supercomputing cluster > > Hi Anne, > > Thanks for the detailed response, > I have a couple questions if I may, > > So, if I understand well I need to know a priori which functions I want to > use?. That's a bit strange, no? Because I don't know if any given function > depend of another one which I might not notice if don't inspect all the > scripts, > > The other thing is that I was trying to compile in the cluster, not > locally, but anyway I tried locally with something like this: > > % these paths will be added at compilation > addpath('/home/joseluis/Documents/Software/fieldtrip-20160317'); > ft_defaults, > addpath('/home/joseluis/Documents/Software/fieldtrip-20160317/qsub'); > addpath('/home/joseluis/Documents/Software/fieldtrip-20160317/fileio'); > > addpath('/home/joseluis/Documents/Software/fieldtrip-20160317/fileio/private'); > > % options: compile verbose, only use the toolboxes we really need > % !!! runtime options should be preceded by - to work! > % dont need to activate the -nojvm flag, can still plot from executable > > mcc('-mv', '-N', '-p', 'stats', '-p', 'images', '-p', 'signal', ... > '-R', '-nodisplay', '-R', '-singleCompThread', ... > '-a', > '/home/joseluis/Documents/Software/fieldtrip-20160317/fileio/ft_read_event.m', > ... > '-a', > '/home/joseluis/Documents/Software/fieldtrip-20160317/fileio/private/read_ctf_cls.m', > ... > '-a', > '/home/joseluis/Documents/Software/fieldtrip-20160317/ft_preprocessing', ... > 'FT_0.m'); > > However when I copy FT_0 and run_FT_0.sh and run the job I get: > > ./FT_0: error while loading shared libraries: libmwmclmcrrt.so.8.1: cannot > open shared object file: No such file or directory > > Which looking in Internet seems to be associated to the fact I need to run > a mrc installer in the cluster? > > thanks > > Jose > > On 15 June 2016 at 11:03, Anne Urai wrote: > >> Hi Jose, >> >> I ran into similar dependencies issues when compiling fieldtrip, and >> converged on the following: >> >> >> >> % these paths will be added at compilation >> >> addpath(genpath('~/code/Tools')); >> >> addpath('~/Documents/fieldtrip'); >> >> ft_defaults; % add everything to path that we need >> >> >> >> addpath('~/Documents/fieldtrip/qsub'); >> >> addpath(genpath('~/Documents/fieldtrip/template/')); % neighbouring >> matfile >> >> >> >> if strcmp(fname, 'B3a_clusterStatsERF.m') || strcmp(fname, >> 'B3b_clusterStatsTFR.m'), >> >> addpath('~/Documents/fieldtrip/statfun/'); % need the >> combineClusters mex file >> >> addpath('~/Documents/fieldtrip/external/spm8/'); % for neighbour >> definition >> >> % >> http://mailman.science.ru.nl/pipermail/fieldtrip/2014-July/008238.html >> >> end >> >> >> >> % options: compile verbose, only use the toolboxes we really need >> >> % !!! runtime options should be preceded by - to work! >> >> % dont need to activate the -nojvm flag, can still plot from executable >> >> if strcmp(fname, 'B3a_clusterStatsERF.m') || strcmp(fname, >> 'B3b_clusterStatsTFR.m'), >> >> >> >> % statfun is called with a weird eval construction, so not recognized >> >> % by the dependency analysis of mcc >> >> mcc('-mv', '-N', '-p', 'stats', '-p', 'images', '-p', 'signal', ... >> >> '-R', '-nodisplay', '-R', '-singleCompThread', ... >> >> '-a', '~/Documents/fieldtrip/ft_statistics_montecarlo.m', ... >> >> '-a', '~/Documents/fieldtrip/statfun/ft_statfun_depsamplesT.m', >> ... >> >> fname); >> >> else >> >> % no need to specify additional files >> >> mcc('-mv', '-N', '-p', 'stats', '-p', 'images', '-p', 'signal', ... >> >> '-R', '-nodisplay', '-R', '-singleCompThread', ... >> >> fname); >> >> end >> >> >> So, the trick is to add everything to your path before comping, and then >> use the -N option and define specific folders and possible functions using >> -a. Make sure to only include additional subfolders from Fieldtrip (such as >> the templates folder) only if you need them, for including them will >> increase the size of the executable considerably. Also, some functions like >> the ft_statistics ones are not directly called but instead evaluated using statmethod >> = str2func(['ft_statistics_' cfg.method]) - this causes the dependency >> analysis of the compiler to skip those functions, so you'll have to add >> them manually. >> >> >> PS a similar setup should work directly from the command line mcc, but I >> found it easier to run ft_defaults from Matlab and then compile from within >> a Matlab script. >> >> >> Hope this helps! >> >> >> — >> Anne E. Urai, MSc >> PhD student | Institut für Neurophysiologie und Pathophysiologie >> Universitätsklinikum Hamburg-Eppendorf | Martinistrasse 52, 20246 | >> Hamburg, Germany >> www.anneurai.net / @AnneEUrai >> >> On 10 June 2016 at 10:42, Jose wrote: >> >>> dear list, >>> >>> I'm trying to analyse CTF MEG data through the Flemish Supercomputer >>> Centre, >>> I did a matlab script to run the foremost FT functions in my pipeline >>> (ft_read_event, read_ctf_cls, and ft_preprocessing). This script works well >>> when I run it locally. To compile my function in the supercomputing cluster >>> I initially used addpath to include FT and ft_defaults to set the >>> configuration inside my script, but this wasn't working. I tried using a >>> startup.m script but this doesn't work neither. Maybe I'm missing >>> something? My bash script to compile looks like this: >>> >>> #!/bin/bash >>> module load MATLAB/2013b >>> FTDIR=$VSC_DATA_VO_USER/fieldtrip-20160317 >>> mcc -mv FT_0.m >>> >>> I also tried mcc -mv FT_0.m -I $FTDIR >>> I run my compilation in the same folder where I have the FT folder. >>> When I run my bash job I get always the same error: Undefined function >>> 'ft_read_event' for input arguments of type 'char'. >>> >>> I've been looking elsewhere but still I haven't find a solution, >>> >>> Any hints about this would really appreciated, >>> best, >>> Jose >>> >>> _______________________________________________ >>> fieldtrip mailing list >>> fieldtrip at donders.ru.nl >>> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip >>> >> >> > > > -- > José Luis ULLOA FULGERI > +32 (0)4 77 42 90 07 > +32 (0)4 92 64 64 77 > > -- José Luis ULLOA FULGERI +32 (0)4 77 42 90 07 +32 (0)4 92 64 64 77 -------------- next part -------------- An HTML attachment was scrubbed... URL: From azeez.adebimpe5 at gmail.com Fri Jun 24 11:35:36 2016 From: azeez.adebimpe5 at gmail.com (Azeez Adebimpe) Date: Fri, 24 Jun 2016 11:35:36 +0200 Subject: [FieldTrip] Seizure localization problems In-Reply-To: References: <67d7de139b0440bfad130b5479155478@UKL-EX02.ad.uniklinik-freiburg.de> Message-ID: Hi Mathias, You can adjust the regularization parameter, "lamda", I think the default is zero. Best, Azeez On Fri, Jun 24, 2016 at 8:58 AM, Dr.-Ing. Matthias Dümpelmann < matthias.duempelmann at uniklinik-freiburg.de> wrote: > Dear Az, > > > > > > I defined now two intervals, one showing rhythmic seizure activity and one > baseline interval prior to the seizure as you can see on the screenshot. > > > > Now it localizes as expected in the right temporal lobe. > > > > I only wonder about the very small “activation” volume. > > > > Thank you, > > > > Matthias > > > > *Von:* fieldtrip-bounces at science.ru.nl [mailto: > fieldtrip-bounces at science.ru.nl] *Im Auftrag von *Azeez Adebimpe > *Gesendet:* Thursday, June 23, 2016 3:57 PM > *An:* FieldTrip discussion list > *Betreff:* Re: [FieldTrip] Seizure localization problems > > > > Hi Mathias, > > > > DICS and LCMV can also give reasonable result but require some > normalization. > > Try to estimate to neural activity index as explained in this tutorial. > > > > http://www.fieldtriptoolbox.org/tutorial/beamformer > > Best, > > > > Az > > > > On Thu, Jun 23, 2016 at 2:51 PM, Dr.-Ing. Matthias Dümpelmann < > matthias.duempelmann at uniklinik-freiburg.de> wrote: > > Dear Azeez, > > > > thank you for your suggestion. > > > > Just exchanging > > > > cfg.method = 'dics'; > > > > to > > > > cfg.method = 'eloreta'; > > > > resulted in a reasonable solution (see attachment). > > > > I also get useful results using MUIC or sLORETA in the frequency domain as > the methods are implemented in ASA. > > > > This makes me even more suspicious, what is going wrong with the DICS > algorithm. > > > > Best regards, > > > > Matthias > > > > > > > > *Von:* fieldtrip-bounces at science.ru.nl [mailto: > fieldtrip-bounces at science.ru.nl] *Im Auftrag von *Azeez Adebimpe > *Gesendet:* Thursday, June 23, 2016 11:08 AM > *An:* FieldTrip discussion list > *Cc:* Nino Epitashvili > *Betreff:* Re: [FieldTrip] Seizure localization problems > > > > Hi Mathias, > > I will suggest you try other method like eLORETA or MNE first and compare > the result. > > > > Best, > > > > AZ > > > > On Thu, Jun 23, 2016 at 9:34 AM, Dr.-Ing. Matthias Dümpelmann < > matthias.duempelmann at uniklinik-freiburg.de> wrote: > > Dear colleagues, > > we are trying to evaluate systematically the localization of rhythmic > activity at the onset of epileptic seizures in patients, who are > subsequently evaluated with intracranial recordings. > > We are trying to use DICS but quite often receive results, which are > obviously wrong. In the attached screenshots you can see the peace of EEG, > which is evaluated and the localization result with a maximum in the > cerebellum. > > This a typical localization for the cases with obvious miss localizations. > A further seizure with a similar EEG pattern was localized in the right > temporal lobe, which matches the EEG pattern and also the intracranial > findings. > > Head model is generated with ASA, also the electrodes file is in the ASA > format. The geometrical match of source points, head model and electrodes > is checked using ft_plot_.... methods. > > Here is the code sniplet relevant for the localization algorithm: > > % Analysis frequency > SourceFrequency = 4.0 > > % read eeg, electrodes and volume conductor model > %[dat] = ft_read_data(filename); > hdr = ft_read_header(filename); > elec = ft_read_sens(elecfile, 'fileformat','asa_elc'); > headmodel = ft_read_vol(volumefilename,'fileformat','asa_vol'); > mri = ft_read_mri(mrifilename, 'fileformat','asa_mri'); > > % eeg data preprocessing > cfgeeg.dataset = filename; > cfgeeg.continuous = 'yes' > cfg.covariance = 'yes'; > cfg.covariancewindow = 'all'; > cfg.demean = 'yes' > > [data] = ft_preprocessing(cfgeeg); > > % Freqanalysis for beamformer > cfg = []; > cfg.channel = {'*'}; > cfg.method = 'mtmfft'; > cfg.foilim = [1 100]; > cfg.tapsmofrq = 4; > cfg.taper = 'hanning'; > cfg.output = 'powandcsd'; > > > % for common filter over conditions > powcsd_all = ft_freqanalysis(cfg, data); > > % Create leadfield grid > cfg = []; > cfg.channel = elec.label; > cfg.elec = elec; > cfg.headmodel = headmodel; > cfg.dics.reducerank = 3; % default for MEG is 2, for EEG is 3 > cfg.grid.resolution = 0.5; % use a 3-D grid with a 0.5 cm resolution > cfg.grid.unit = 'cm'; > cfg.grid.tight = 'yes'; > [grid] = ft_prepare_leadfield(cfg); > > % source analysis > cfg = []; > cfg.channel = elec.label; > cfg.method = 'dics'; > cfg.frequency = SourceFrequency; > cfg.grid = grid; > cfg.headmodel = headmodel; > cfg.elec = elec; > cfg.senstype = 'EEG'; > cfg.dics.keepfilter = 'yes'; % We wish to use the calculated filter > later on > cfg.dics.projectnoise = 'yes'; > cfg.dics.lambda = '0.3%'; > source_raw = ft_sourceanalysis(cfg, powcsd_all); > > > I played with a couple of parameters like cfg.dics.lambda, but without > success. > > Do you have ideas how to improve our localization results ? > > Thank you, > > Matthias > > > > UNIVERSITÄTSKLINIKUM FREIBURG > Epileptologie > Breisacher Str. 64 · 79106 Freiburg > Telefon: +49 761 270-52410 > matthias.duempelmann at uniklinik-freiburg.de > > www.uniklinik-freiburg.de > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > https://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > https://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > https://mailman.science.ru.nl/mailman/listinfo/fieldtrip > -------------- next part -------------- An HTML attachment was scrubbed... URL: From matthias.duempelmann at uniklinik-freiburg.de Fri Jun 24 12:02:46 2016 From: matthias.duempelmann at uniklinik-freiburg.de (=?utf-8?B?RHIuLUluZy4gTWF0dGhpYXMgRMO8bXBlbG1hbm4=?=) Date: Fri, 24 Jun 2016 10:02:46 +0000 Subject: [FieldTrip] Seizure localization problems In-Reply-To: References: <67d7de139b0440bfad130b5479155478@UKL-EX02.ad.uniklinik-freiburg.de> Message-ID: Hi Az, now I used the normalization (neural activity index) as you indicated and the results look like in the screenshot. Probably we can use now two options: Baseline or Neural Activity Index. Thank you and have a nice weekend ! Matthias Von: fieldtrip-bounces at science.ru.nl [mailto:fieldtrip-bounces at science.ru.nl] Im Auftrag von Azeez Adebimpe Gesendet: Thursday, June 23, 2016 3:57 PM An: FieldTrip discussion list Betreff: Re: [FieldTrip] Seizure localization problems Hi Mathias, DICS and LCMV can also give reasonable result but require some normalization. Try to estimate to neural activity index as explained in this tutorial. http://www.fieldtriptoolbox.org/tutorial/beamformer Best, Az On Thu, Jun 23, 2016 at 2:51 PM, Dr.-Ing. Matthias Dümpelmann > wrote: Dear Azeez, thank you for your suggestion. Just exchanging cfg.method = 'dics'; to cfg.method = 'eloreta'; resulted in a reasonable solution (see attachment). I also get useful results using MUIC or sLORETA in the frequency domain as the methods are implemented in ASA. This makes me even more suspicious, what is going wrong with the DICS algorithm. Best regards, Matthias Von: fieldtrip-bounces at science.ru.nl [mailto:fieldtrip-bounces at science.ru.nl] Im Auftrag von Azeez Adebimpe Gesendet: Thursday, June 23, 2016 11:08 AM An: FieldTrip discussion list Cc: Nino Epitashvili Betreff: Re: [FieldTrip] Seizure localization problems Hi Mathias, I will suggest you try other method like eLORETA or MNE first and compare the result. Best, AZ On Thu, Jun 23, 2016 at 9:34 AM, Dr.-Ing. Matthias Dümpelmann > wrote: Dear colleagues, we are trying to evaluate systematically the localization of rhythmic activity at the onset of epileptic seizures in patients, who are subsequently evaluated with intracranial recordings. We are trying to use DICS but quite often receive results, which are obviously wrong. In the attached screenshots you can see the peace of EEG, which is evaluated and the localization result with a maximum in the cerebellum. This a typical localization for the cases with obvious miss localizations. A further seizure with a similar EEG pattern was localized in the right temporal lobe, which matches the EEG pattern and also the intracranial findings. Head model is generated with ASA, also the electrodes file is in the ASA format. The geometrical match of source points, head model and electrodes is checked using ft_plot_.... methods. Here is the code sniplet relevant for the localization algorithm: % Analysis frequency SourceFrequency = 4.0 % read eeg, electrodes and volume conductor model %[dat] = ft_read_data(filename); hdr = ft_read_header(filename); elec = ft_read_sens(elecfile, 'fileformat','asa_elc'); headmodel = ft_read_vol(volumefilename,'fileformat','asa_vol'); mri = ft_read_mri(mrifilename, 'fileformat','asa_mri'); % eeg data preprocessing cfgeeg.dataset = filename; cfgeeg.continuous = 'yes' cfg.covariance = 'yes'; cfg.covariancewindow = 'all'; cfg.demean = 'yes' [data] = ft_preprocessing(cfgeeg); % Freqanalysis for beamformer cfg = []; cfg.channel = {'*'}; cfg.method = 'mtmfft'; cfg.foilim = [1 100]; cfg.tapsmofrq = 4; cfg.taper = 'hanning'; cfg.output = 'powandcsd'; % for common filter over conditions powcsd_all = ft_freqanalysis(cfg, data); % Create leadfield grid cfg = []; cfg.channel = elec.label; cfg.elec = elec; cfg.headmodel = headmodel; cfg.dics.reducerank = 3; % default for MEG is 2, for EEG is 3 cfg.grid.resolution = 0.5; % use a 3-D grid with a 0.5 cm resolution cfg.grid.unit = 'cm'; cfg.grid.tight = 'yes'; [grid] = ft_prepare_leadfield(cfg); % source analysis cfg = []; cfg.channel = elec.label; cfg.method = 'dics'; cfg.frequency = SourceFrequency; cfg.grid = grid; cfg.headmodel = headmodel; cfg.elec = elec; cfg.senstype = 'EEG'; cfg.dics.keepfilter = 'yes'; % We wish to use the calculated filter later on cfg.dics.projectnoise = 'yes'; cfg.dics.lambda = '0.3%'; source_raw = ft_sourceanalysis(cfg, powcsd_all); I played with a couple of parameters like cfg.dics.lambda, but without success. Do you have ideas how to improve our localization results ? Thank you, Matthias UNIVERSITÄTSKLINIKUM FREIBURG Epileptologie Breisacher Str. 64 · 79106 Freiburg Telefon: +49 761 270-52410 matthias.duempelmann at uniklinik-freiburg.de www.uniklinik-freiburg.de _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl https://mailman.science.ru.nl/mailman/listinfo/fieldtrip _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl https://mailman.science.ru.nl/mailman/listinfo/fieldtrip -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: seizure_neuralactivityindex.png Type: image/png Size: 653013 bytes Desc: seizure_neuralactivityindex.png URL: From dr.nivethida at gmail.com Fri Jun 24 13:39:46 2016 From: dr.nivethida at gmail.com (nivethida t) Date: Fri, 24 Jun 2016 07:39:46 -0400 Subject: [FieldTrip] ft_definetrial for .mat file Message-ID: Dear all, I am trying to use the ft_definetrial for a dataset saved as .mat file. I figured out how to run the ft_preprocessing on these data from this forum, but the ft_definetrial still gives me an error (something like headerfile not recognized). Any help is appreciated. Thanks, Nivethida -- Dr.Nivethida Thirugnanasambandam, Postdoctoral Visiting Fellow, Human Motor Control Section, National Institute of Neurological Disorders and Stroke, National Institutes of Health, Building 10, 7D42, 10 Center Drive, MSC 1428 Bethesda, MD 20892 - 1428 Ph: +1-301-402-6231 -------------- next part -------------- An HTML attachment was scrubbed... URL: From julian.keil at gmail.com Fri Jun 24 13:50:44 2016 From: julian.keil at gmail.com (Julian Keil) Date: Fri, 24 Jun 2016 13:50:44 +0200 Subject: [FieldTrip] ft_definetrial for .mat file In-Reply-To: References: Message-ID: <60B83AE4-344A-43DE-BA72-78B708BA9F43@gmail.com> Dear Nivethida, have you tried ft_redefinetrial? This function can be used to define trials in already preprocessed data. Good luck, Julian ******************** Dr. Julian Keil AG Multisensorische Integration Psychiatrische Universitätsklinik der Charité im St. Hedwig-Krankenhaus Große Hamburger Straße 5-11 10115 Berlin Telefon: +49-30-2311-1879 Fax: +49-30-2311-2209 http://psy-ccm.charite.de/forschung/bildgebung/ag_multisensorische_integration Am 24.06.2016 um 13:39 schrieb nivethida t: > Dear all, > I am trying to use the ft_definetrial for a dataset saved as .mat file. I figured out how to run the ft_preprocessing on these data from this forum, but the ft_definetrial still gives me an error (something like headerfile not recognized). Any help is appreciated. > > Thanks, > Nivethida > > -- > Dr.Nivethida Thirugnanasambandam, > Postdoctoral Visiting Fellow, > Human Motor Control Section, > National Institute of Neurological Disorders and Stroke, > National Institutes of Health, > Building 10, 7D42, > 10 Center Drive, MSC 1428 > Bethesda, MD 20892 - 1428 > Ph: +1-301-402-6231 > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > https://mailman.science.ru.nl/mailman/listinfo/fieldtrip -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 495 bytes Desc: Message signed with OpenPGP using GPGMail URL: From laxmi.shaw22 at gmail.com Fri Jun 24 17:33:31 2016 From: laxmi.shaw22 at gmail.com (Laxmi Shaw) Date: Fri, 24 Jun 2016 21:03:31 +0530 Subject: [FieldTrip] Query regarding source localisation Message-ID: Dear Field trip users, I am facing a serious issue with the source localisation using fieldtrip. I have the dataset of EEG.Could you please provide me any example of source localisation using fieldtrip. Your help is always appreciable. Thanks and Regards -- Laxmi Shaw Research Scholar(PhD) IIT Kharagpur West Bengal Ph no-08388837821 -------------- next part -------------- An HTML attachment was scrubbed... URL: From dr.nivethida at gmail.com Fri Jun 24 17:34:45 2016 From: dr.nivethida at gmail.com (nivethida t) Date: Fri, 24 Jun 2016 11:34:45 -0400 Subject: [FieldTrip] ft_definetrial for .mat file In-Reply-To: <60B83AE4-344A-43DE-BA72-78B708BA9F43@gmail.com> References: <60B83AE4-344A-43DE-BA72-78B708BA9F43@gmail.com> Message-ID: Yes Julian, I did try that - it works but it does not generate the trial definitions (cfg.trl) which I need. Thanks, Nivethida On Fri, Jun 24, 2016 at 7:50 AM, Julian Keil wrote: > Dear Nivethida, > > have you tried ft_redefinetrial? > This function can be used to define trials in already preprocessed data. > > Good luck, > > Julian > > ******************** > *Dr. Julian Keil* > > AG Multisensorische Integration > Psychiatrische Universitätsklinik > der Charité im St. Hedwig-Krankenhaus > Große Hamburger Straße 5-11 > 10115 Berlin > > Telefon: +49-30-2311-1879 > Fax: +49-30-2311-2209 > > http://psy-ccm.charite.de/forschung/bildgebung/ag_multisensorische_integration > > Am 24.06.2016 um 13:39 schrieb nivethida t: > > Dear all, > I am trying to use the ft_definetrial for a dataset saved as .mat file. I > figured out how to run the ft_preprocessing on these data from this forum, > but the ft_definetrial still gives me an error (something like headerfile > not recognized). Any help is appreciated. > > Thanks, > Nivethida > > -- > Dr.Nivethida Thirugnanasambandam, > Postdoctoral Visiting Fellow, > Human Motor Control Section, > National Institute of Neurological Disorders and Stroke, > National Institutes of Health, > Building 10, 7D42, > 10 Center Drive, MSC 1428 > Bethesda, MD 20892 - 1428 > Ph: +1-301-402-6231 > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > https://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > https://mailman.science.ru.nl/mailman/listinfo/fieldtrip > -- Dr.Nivethida Thirugnanasambandam, Postdoctoral Visiting Fellow, Human Motor Control Section, National Institute of Neurological Disorders and Stroke, National Institutes of Health, Building 10, 7D42, 10 Center Drive, MSC 1428 Bethesda, MD 20892 - 1428 Ph: +1-301-402-6231 -------------- next part -------------- An HTML attachment was scrubbed... URL: From azeez.adebimpe5 at gmail.com Fri Jun 24 19:05:41 2016 From: azeez.adebimpe5 at gmail.com (Azeez Adebimpe) Date: Fri, 24 Jun 2016 19:05:41 +0200 Subject: [FieldTrip] Query regarding source localisation In-Reply-To: References: Message-ID: <20160624170541.5382228.13036.4303@gmail.com> An HTML attachment was scrubbed... URL: From ghumana at upmc.edu Sun Jun 26 00:12:39 2016 From: ghumana at upmc.edu (Ghuman, Avniel) Date: Sat, 25 Jun 2016 22:12:39 +0000 Subject: [FieldTrip] Postdoc Position in Intracranial EEG and eye tracking in visual neuroscience Message-ID: <20385F716E75B746A7F52BBB3C46A1302F171958@MSXMBXNSPRD15.acct.upmchs.net> Applications are invited for an NIH funded postdoctoral position combining eye tracking and intracranial EEG recordings in humans to study the neural basis of face recognition, object recognition, and social and affective perception, at the University of Pittsburgh, USA. The research will focus on understanding the dynamic neural code that underlies the recognition of faces, bodies, objects, facial expressions, and other social and affective stimuli and how this information guides, and is guided by, eye movements. Of particular interest is how this information is coded in interactive neural circuits at the level of large-scale brain networks. The neural data will primarily be local field potentials/ event related potential from intracranial surface electrodes (electrocorticography, ECoG), cortical depth electrodes, and subcortical depth electrodes in humans in conjunction with eye tracking. There is also the potential for studies involving direct cortical stimulation to assess how neural modulation alters visual perception. The ideal applicant would hold a Ph.D. in Neuroscience, Psychology, Computer Science, Mathematics, Statistics, Engineering or a related field. Strong technical, computational, and statistical skills are required. Experience with combining eye tracking and electrophysiological data is required (for example, scalp EEG or MEG and eye tracking). Applicants should have a strong track record of publication. Pittsburgh is consistently ranked the most livable city in America and the neuroscientific community here, particularly at the University of Pittsburgh and Carnegie Mellon University, is both very strong and collaborative. Interested applicants should send a letter of interest, a CV, and the names and contact information for 3 researchers who can provide a recommendation. For further information or to submit an application, please contact Avniel Ghuman, Ph.D. at ghumana at upmc.edu and see our lab webpage at www.lcnd.pitt.edu . From mailtome.2113 at gmail.com Mon Jun 27 09:18:34 2016 From: mailtome.2113 at gmail.com (Arti Abhishek) Date: Mon, 27 Jun 2016 17:18:34 +1000 Subject: [FieldTrip] No trialinfo after epoching Message-ID: Dear list, I am trying to analyse EEG data recorded in EGI system. When I used the following code to epochs the data, the trialinfo information is missing that prevents me to average each trigger seperately. Could anyone suggest a fix? cfg = []; cfg.dataset = 'LL1101_20160622_022943.raw'; cfg.trialdef.prestim = 0.1; cfg.trialdef.poststim = 0.5; cfg.trialdef.eventtype = 'trigger'; cfg.trialdef.eventvalue = {'DI14', 'DI16', 'DI18', 'DI22', 'DI24', 'DIN4','DIN6', 'DIN8'}; data = ft_definetrial(cfg); LL01_epochs = ft_redefinetrial(data, LL01_cont); Thanks, Arti -------------- next part -------------- An HTML attachment was scrubbed... URL: From emilj at drcmr.dk Mon Jun 27 10:53:25 2016 From: emilj at drcmr.dk (=?utf-8?Q?Emil_=C3=98sterg=C3=A5rd_Johansen?=) Date: Mon, 27 Jun 2016 10:53:25 +0200 Subject: [FieldTrip] Baseline correction when epoching after filtering Message-ID: <6021A776-2BF4-4FE7-A7FB-96DA2DAF28F2@drcmr.dk> Dear all, I cannot figure out how to subtract a baseline window in each trial, say [-2.0 0] when using ft_redefinetrial to epoch my data. As far as I can see baseline correction is only an option for ft_preprocessing. My pipeline is as follows: 1) Run ICA on data which is preprocessed in a manner specifically for ICA 2) Apply ICA weights to raw data (after this my data is in .mat format) 3) Reref and filter using ft_preprocessing 4) Epoch data using ft_definetrial and ft_redefinetrial The code for epoching is as follows and works fine: cfg.dataset = [cfg.subjectdir cfg.subjectstr '.bdf’]; % Raw data for defining trials cfg_cond = ft_definetrial(cfg); cfg_cond.inputfile = [cfg.subjectdir cfg.subjectstr '_ICApruned_filtered.mat’]; data = ft_redefinetrial(cfg_cond); I want to subtract the baseline window when epoching (and epoching should be done after filtering to minimize filter artifacts). I tried using ft_preprocessing again to both subtract baseline and epoch the data (instead of ft_redefinetrial): cfg.dataset = [cfg.subjectdir cfg.subjectstr '.bdf’]; % Raw data for defining trials cfg_cond = ft_definetrial(cfg); cfg_cond.inputfile = [cfg.subjectdir cfg.subjectstr '_ICApruned_filtered.mat’]; cfg_cond.demean = 'yes'; cfg_cond.baselinewindow = [-2.0 0]; data = ft_preprocessing(cfg_cond); but got: "Warning: The field cfg.trl is forbidden, it will be removed from your configuration” and no trials were created. You might suggest that I include the cfg.demean in step 3 when filtering, but then I am unsure if it will simply demean the entire dataset using the same value since the data is continuous at that point. If it is of importance I have my own trial function Thank you for your time, Emil Johansen Hvidovre University Hospital Denmark From tineke.snijders at donders.ru.nl Mon Jun 27 11:13:47 2016 From: tineke.snijders at donders.ru.nl (Snijders, T.M. (Tineke)) Date: Mon, 27 Jun 2016 09:13:47 +0000 Subject: [FieldTrip] Baseline correction when epoching after filtering In-Reply-To: <6021A776-2BF4-4FE7-A7FB-96DA2DAF28F2@drcmr.dk> References: <6021A776-2BF4-4FE7-A7FB-96DA2DAF28F2@drcmr.dk> Message-ID: <815A9820E75FBC4F96B7CD3A8089D11C378EC6FB@exprd04.hosting.ru.nl> Hi Emil, You can just use ft_preprocessing on the redefined data, to do baseline-correction only. So after: data = ft_redefinetrial(cfg_cond); you do: cfg=[]; cfg.demean='yes'; cfg.baselinewindow=[-2 0]; dataBL=ft_preprocessing(cfg,data); Cheers, Tineke ________________________________________ From: fieldtrip-bounces at science.ru.nl [fieldtrip-bounces at science.ru.nl] on behalf of Emil Østergård Johansen [emilj at drcmr.dk] Sent: Monday, June 27, 2016 10:53 AM To: fieldtrip at science.ru.nl Subject: [FieldTrip] Baseline correction when epoching after filtering Dear all, I cannot figure out how to subtract a baseline window in each trial, say [-2.0 0] when using ft_redefinetrial to epoch my data. As far as I can see baseline correction is only an option for ft_preprocessing. My pipeline is as follows: 1) Run ICA on data which is preprocessed in a manner specifically for ICA 2) Apply ICA weights to raw data (after this my data is in .mat format) 3) Reref and filter using ft_preprocessing 4) Epoch data using ft_definetrial and ft_redefinetrial The code for epoching is as follows and works fine: cfg.dataset = [cfg.subjectdir cfg.subjectstr '.bdf’]; % Raw data for defining trials cfg_cond = ft_definetrial(cfg); cfg_cond.inputfile = [cfg.subjectdir cfg.subjectstr '_ICApruned_filtered.mat’]; data = ft_redefinetrial(cfg_cond); I want to subtract the baseline window when epoching (and epoching should be done after filtering to minimize filter artifacts). I tried using ft_preprocessing again to both subtract baseline and epoch the data (instead of ft_redefinetrial): cfg.dataset = [cfg.subjectdir cfg.subjectstr '.bdf’]; % Raw data for defining trials cfg_cond = ft_definetrial(cfg); cfg_cond.inputfile = [cfg.subjectdir cfg.subjectstr '_ICApruned_filtered.mat’]; cfg_cond.demean = 'yes'; cfg_cond.baselinewindow = [-2.0 0]; data = ft_preprocessing(cfg_cond); but got: "Warning: The field cfg.trl is forbidden, it will be removed from your configuration” and no trials were created. You might suggest that I include the cfg.demean in step 3 when filtering, but then I am unsure if it will simply demean the entire dataset using the same value since the data is continuous at that point. If it is of importance I have my own trial function Thank you for your time, Emil Johansen Hvidovre University Hospital Denmark _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl https://mailman.science.ru.nl/mailman/listinfo/fieldtrip From christophe.grova at mcgill.ca Mon Jun 27 16:23:56 2016 From: christophe.grova at mcgill.ca (Christophe Grova) Date: Mon, 27 Jun 2016 14:23:56 +0000 Subject: [FieldTrip] Postdoctoral position for a neurologist/epileptologist available in the Multimodal Functional Imaging Lab, Montreal (MNI McGill and PERFORM Concordia) In-Reply-To: <1467035945505.32385@concordia.ca> References: <1467035369587.215@concordia.ca>, <1467035659679.70310@concordia.ca>, <1467035945505.32385@concordia.ca> Message-ID: Dear community, Please see below the opportunity for a postdoctoral position in my lab. I am currently attending HBM conference in Geneva, so I will be happy to start meeting possible candidates if you are around. The candidate will join a multidisciplinary team composed of neurologists and methodologists within the Multimodal Functional Imaging Laboratory, directed by Pr. Christophe Grova. The laboratory is actually based on two sites: (i) Physics Dpt at Concordia University and PERFORM center, (ii) Biomedical Engineering Dpt and epilepsy group of the Montreal Neurological Institute, McGill University. Both environments offer unique platforms with access to several modalities (simultaneous high-density EEG/fMRI, MEG, simultaneous EEG/NIRS, TMS). The candidate will notably have access to the brand new multimodal imaging platform of PERFORM center, dedicated to neuroscience studies over large cohort of subjects (effect of age, exercising, ...), whereas clinical applications during the presurgical investigation of patients with epilepsy will be primarly based at the Montreal Neurological Institute. The main expertise of the team is the development and the validation of source localization methods dedicated for EEG, MEG and NIRS as well as multimodal characterization of resting state brain activity. Project: Multimodal investigation of epileptic activity using simultaneous EEG/MEG and EEG/NIRS acquisitions. The proposed project aims at localizing and characterizing the generators of epileptic activity using simultaneous acquisitions of ElectroEncephaloGraphy (EEG) with Magneto-EncephaloGraphy (MEG), as well as simultaneous acquisitions of EEG with Near Infra-Red Spectroscopy (NIRS). While methodological developments in the lab will consist in 3D reconstructions of the generators of EEG, MEG and NIRS signals and assessing multimodal concordances between bioelectrical neuronal signals and hemodynamic processes, the purpose of this Postdoctoral project will be to assess the integrity of neurovascular coupling processes at the time of epileptic discharges, using a unique multimodal environment involving EEG/MEG, EEG/NIRS and also EEG/fMRI recordings. Close collaborations with the epilepsy group of the Montreal Neurological Institute, involving notably Dr E. Kobayashi MD-PhD, Dr F. Dubeau MD-PhD and Dr. J. Gotman PhD, will provide access to patient populations and additional clinical expertise for this project. Requirements: The candidate should be an MD (neurologist) with previous training in epileptology and neurophysiology (EEG). Expertise in analyzing MEG or NIRS signals and/or computational skills including neuroimaging softwares are appreciated additional qualification. The candidate should be fluent in English (and if possible French) due to the patient population studied. Supervisor: Christophe Grova Ph.D. Assistant Professor, Physics Dpt and PERFORM, Concordia Univ. Chair of PERFORM Applied Bio-Imaging Committee Adjunct Professor, Biomedical Engineering and Neurology & Neurosurgery dpts, McGill Univ. Member Epilepsy Group, Montreal Neurological Institute Director of the Multimodal Functional Imaging Laboratory Email: christophe.grova at concordia.ca christophe.grova at mcgill.ca Please send your CV and motivation letter before July. 20th 2016 to christophe.grova at concordia.ca *************************** Christophe Grova, PhD Assistant Professor, Physics Dpt, Concordia University PERFORM centre, Concordia University Chair of PERFORM Applied Bio-Imaging Committee (ABC) Adjunct Prof in Biomedical Engineering, and Neurology and Neurosurgery Dpt, McGill University Multimodal Functional Imaging Lab (Multi FunkIm) Montreal Neurological Institute - epilepsy group Centre de Recherches en Mathématiques Physics Dpt Concordia University - Loyola Campus - Office SP 365.12 7141 Sherbrooke Street West, Montreal, QC H4B 1R6 Phone: (514) 848-2424 ext.4221 email : christophe.grova at concordia.ca , christophe.grova at mcgill.ca Explore Concordia: http://explore.concordia.ca/christophe-grova Physics, Concordia University: http://www.concordia.ca/artsci/physics/faculty.html?fpid=christophe-grova McGill University: http://www.bic.mni.mcgill.ca/ResearchLabsMFIL/PeopleChristophe MultiFunkIm Lab: http://www.bic.mni.mcgill.ca/ResearchLabsMFIL/HomePage *************************** [X] -------------- next part -------------- An HTML attachment was scrubbed... URL: From mailtome.2113 at gmail.com Tue Jun 28 04:01:16 2016 From: mailtome.2113 at gmail.com (Arti Abhishek) Date: Tue, 28 Jun 2016 12:01:16 +1000 Subject: [FieldTrip] No trialinfo after epoching In-Reply-To: References: Message-ID: Dear list, I am following up on my previous question on mussing trial info after I epoch the data. The fourth column in the data.cfg.trial is present when the triggers are neumeric. But when the triggers are in string format (as in EGI system eg. "DIN8"), the fourth column is not present with the following code. I would really appreciate if someone could suggest a fix. cfg = []; cfg.dataset = 'LL1101_20160622_022943.raw'; cfg.trialdef.prestim = 0.1; cfg.trialdef.poststim = 0.5; cfg.trialdef.eventtype = 'trigger'; cfg.trialdef.eventvalue = {'DI14', 'DI16', 'DI18', 'DI22', 'DI24', 'DIN4','DIN6', 'DIN8'}; data = ft_definetrial(cfg); LL01_epochs = ft_redefinetrial(data, LL01_cont); Thanks, Arti On Mon, Jun 27, 2016 at 5:18 PM, Arti Abhishek wrote: > Dear list, > > I am trying to analyse EEG data recorded in EGI system. When I used the > following code to epochs the data, the trialinfo information is missing > that prevents me to average each trigger seperately. Could anyone suggest a > fix? > > cfg = []; > cfg.dataset = 'LL1101_20160622_022943.raw'; > cfg.trialdef.prestim = 0.1; > cfg.trialdef.poststim = 0.5; > cfg.trialdef.eventtype = 'trigger'; > cfg.trialdef.eventvalue = {'DI14', 'DI16', 'DI18', 'DI22', 'DI24', > 'DIN4','DIN6', 'DIN8'}; > data = ft_definetrial(cfg); > LL01_epochs = ft_redefinetrial(data, LL01_cont); > > Thanks, > Arti > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From lindseyrtate at ou.edu Tue Jun 28 10:05:52 2016 From: lindseyrtate at ou.edu (Tate, Lindsey R.) Date: Tue, 28 Jun 2016 08:05:52 +0000 Subject: [FieldTrip] Tate, Lindsey R. wants to share the file dataFIC4.mat with you Message-ID: To view dataFIC4.mat, sign in or create an account. -------------- next part -------------- An HTML attachment was scrubbed... URL: From lindseyrtate at ou.edu Tue Jun 28 10:05:47 2016 From: lindseyrtate at ou.edu (Tate, Lindsey R.) Date: Tue, 28 Jun 2016 08:05:47 +0000 Subject: [FieldTrip] Beamforming, "Inf" during source estimation by subject Message-ID: Tate, Lindsey R. has shared a?OneDrive for Business?file with you. To view it, click the link below. [https://r1.res.office365.com/owa/prem/images/dc-generic_20.png] dataFIC4.mat Hello Fieldtrip Community, I've been working on beamforming the MEG data collected from 16 subjects during a saccade task. This is my first time beamforming so I've been heavily relying on the tutorial. When I collapse trials across subjects and do beamforming, I can get the ft_sourceplot commands to produce something that makes some sense. However, I need to be able to have the data separated by subject for ft_sourcestatistics. I've created structures that should work for this purpose and that look correct. However, the ".pow" from the Neural Activity Index calculation step ends up mostly "NaN" and partly "Inf" when I run the beamforming divided by subject. Is this related to the number of trials per subject somehow (e.g., do I have too few? is there some kind of setting I need to change?)? Why is the ".pow" coming back "Inf" instead of a real number? Does anyone have suggestions for fixing this problem so that I don't get "Inf" anymore? My code and raw data structure are attached. Thank you, Lindsey Tate University of Oklahoma -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: BF_trial4.m URL: From emilj at drcmr.dk Tue Jun 28 14:33:41 2016 From: emilj at drcmr.dk (=?utf-8?Q?Emil_=C3=98sterg=C3=A5rd_Johansen?=) Date: Tue, 28 Jun 2016 14:33:41 +0200 Subject: [FieldTrip] Baseline correction when epoching after filtering Message-ID: <8CB0822C-27C7-48F5-9A30-E883906C65AC@drcmr.dk> Dear Dr. Snijders, Thank you for your swift response and suggestion. I tried your solution, but since my epochs are not completely adjacent in the data (there is a pause of 4 seconds between epochs), when following your suggestion there is no data available previous to the stimulus because the data in between has been removed when epoching using ft_redefinetrial. So when using a window of [-2 0], Fieldtrip simply reverts to subtracting the first sample value such that all signals start at 0, which is of course not desirable. I have solved it now and will describe it briefly here if others face the same problem: I included data prior to the stimulus onset in the epoch. As an example, say my epoch is 1 second long and I want to use [-0.5 0] as baseline. Then I define my epoch as [-0.5 1] and use ft_redefinetrial to epoch the data. Afterwards I use a cfg.baselinewindow = [0 0.5] and baseline correct the data the way you described. When plotting the ERP’s I then plot the true epoch which is [0.5 1.5] in my “dummy” epoch. Thank you again for your help, Emil From jan.schoffelen at donders.ru.nl Tue Jun 28 14:58:27 2016 From: jan.schoffelen at donders.ru.nl (Schoffelen, J.M. (Jan Mathijs)) Date: Tue, 28 Jun 2016 12:58:27 +0000 Subject: [FieldTrip] No trialinfo after epoching In-Reply-To: References: Message-ID: Hi Arti, I think that this can be easily fixed. Notably, if you have a look at ft_trialfun_general, there’s a specific string-to-number conversion for eventtypes that start with ’S’, or ‘R’. This happens on line 210/211. It might be possible to come up with a generic solution, but this will result in a more or less arbitrary string-to-number mapping. The ’S’ and ‘R’ eventvalues pertain to a particular acquisition system that codes stimuli and responses as ‘Sx’, and ‘Rx’ respectively, where the ‘x’ is a user-specified value. If you come up with a sensible generic solution I’d be more than happy to build it into the code, or you can do so yourself, and submit this to our github repository as a pull request. Best wishes, Jan-Mathijs On 28 Jun 2016, at 04:01, Arti Abhishek > wrote: Dear list, I am following up on my previous question on mussing trial info after I epoch the data. The fourth column in the data.cfg.trial is present when the triggers are neumeric. But when the triggers are in string format (as in EGI system eg. "DIN8"), the fourth column is not present with the following code. I would really appreciate if someone could suggest a fix. cfg = []; cfg.dataset = 'LL1101_20160622_022943.raw'; cfg.trialdef.prestim = 0.1; cfg.trialdef.poststim = 0.5; cfg.trialdef.eventtype = 'trigger'; cfg.trialdef.eventvalue = {'DI14', 'DI16', 'DI18', 'DI22', 'DI24', 'DIN4','DIN6', 'DIN8'}; data = ft_definetrial(cfg); LL01_epochs = ft_redefinetrial(data, LL01_cont); Thanks, Arti On Mon, Jun 27, 2016 at 5:18 PM, Arti Abhishek > wrote: Dear list, I am trying to analyse EEG data recorded in EGI system. When I used the following code to epochs the data, the trialinfo information is missing that prevents me to average each trigger seperately. Could anyone suggest a fix? cfg = []; cfg.dataset = 'LL1101_20160622_022943.raw'; cfg.trialdef.prestim = 0.1; cfg.trialdef.poststim = 0.5; cfg.trialdef.eventtype = 'trigger'; cfg.trialdef.eventvalue = {'DI14', 'DI16', 'DI18', 'DI22', 'DI24', 'DIN4','DIN6', 'DIN8'}; data = ft_definetrial(cfg); LL01_epochs = ft_redefinetrial(data, LL01_cont); Thanks, Arti _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl https://mailman.science.ru.nl/mailman/listinfo/fieldtrip -------------- next part -------------- An HTML attachment was scrubbed... URL: From tineke.snijders at donders.ru.nl Tue Jun 28 16:07:18 2016 From: tineke.snijders at donders.ru.nl (Snijders, T.M. (Tineke)) Date: Tue, 28 Jun 2016 14:07:18 +0000 Subject: [FieldTrip] Baseline correction when epoching after filtering In-Reply-To: <8CB0822C-27C7-48F5-9A30-E883906C65AC@drcmr.dk> References: <8CB0822C-27C7-48F5-9A30-E883906C65AC@drcmr.dk> Message-ID: <815A9820E75FBC4F96B7CD3A8089D11C378EC8CF@exprd04.hosting.ru.nl> Dear Emil, Yes, indeed you should have the prestimulus data available to baseline-correct for it. But note that fieldtrip shifts the timing info in relation with the trigger onset. So if you use cfg.trialdef.prestim = 0.5; cfg.trialdef.poststim = 1; when you define your trials, then your timing information is relative to the trigger, so it will actually go from [-0.5 1.0], and you can use the 'correct' times (with regard to trigger onset) then. So you can just use [-0.5 0] as baselinewindow, and then you don't need to plot [0.5 1.5] when what you actually want to plot is [0 1.0]. If you have done the epoching in some other way, just alter data.time so it gives the 'correct' times. Best, Tineke ________________________________________ From: fieldtrip-bounces at science.ru.nl [fieldtrip-bounces at science.ru.nl] on behalf of Emil Østergård Johansen [emilj at drcmr.dk] Sent: Tuesday, June 28, 2016 2:33 PM To: fieldtrip at science.ru.nl Subject: Re: [FieldTrip] Baseline correction when epoching after filtering Dear Dr. Snijders, Thank you for your swift response and suggestion. I tried your solution, but since my epochs are not completely adjacent in the data (there is a pause of 4 seconds between epochs), when following your suggestion there is no data available previous to the stimulus because the data in between has been removed when epoching using ft_redefinetrial. So when using a window of [-2 0], Fieldtrip simply reverts to subtracting the first sample value such that all signals start at 0, which is of course not desirable. I have solved it now and will describe it briefly here if others face the same problem: I included data prior to the stimulus onset in the epoch. As an example, say my epoch is 1 second long and I want to use [-0.5 0] as baseline. Then I define my epoch as [-0.5 1] and use ft_redefinetrial to epoch the data. Afterwards I use a cfg.baselinewindow = [0 0.5] and baseline correct the data the way you described. When plotting the ERP’s I then plot the true epoch which is [0.5 1.5] in my “dummy” epoch. Thank you again for your help, Emil _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl https://mailman.science.ru.nl/mailman/listinfo/fieldtrip From zhangk28 at mcmaster.ca Tue Jun 28 18:30:45 2016 From: zhangk28 at mcmaster.ca (KAIJIE ZHANG) Date: Tue, 28 Jun 2016 12:30:45 -0400 Subject: [FieldTrip] topoplotTFR Message-ID: Hi Community, I've been using topoplotTFR for plotting NIRS signals, and it has been going pretty well. Just a small thing: I have been plotting topographic maps for several pieces of data, but each plot has a different scaling, thus giving the value of colour a lot of ambiguity. I was wondering if there is any way to keep constant values corresponding to a constant colour with topoplotTFR? Thank you very much for any input! Best Regards, Kaijie Zhang -- Kaijie Zhang Electrical & Biomedical Engineering, Level III McMaster University -------------- next part -------------- An HTML attachment was scrubbed... URL: From p.taesler at uke.uni-hamburg.de Tue Jun 28 19:13:17 2016 From: p.taesler at uke.uni-hamburg.de (Philipp Taesler) Date: Tue, 28 Jun 2016 19:13:17 +0200 Subject: [FieldTrip] topoplotTFR In-Reply-To: <5dd276f263ae4caeb0e909b53c36c538@EXCCAHT-1.mail.uke.ads> References: <5dd276f263ae4caeb0e909b53c36c538@EXCCAHT-1.mail.uke.ads> Message-ID: <5772B02D.50203@uke.uni-hamburg.de> Hello Kaijie, you can use the caxis([min max]) command to set the scaling programmatically for the current axes. You can also pass an axes handle to the command to set it for individual plots if you have multiple figures open. Cheers, Phil Am 28.06.16 um 18:30 schrieb KAIJIE ZHANG: > Hi Community, > > I've been using topoplotTFR for plotting NIRS signals, and it has been > going pretty well. Just a small thing: I have been plotting topographic > maps for several pieces of data, but each plot has a different scaling, > thus giving the value of colour a lot of ambiguity. I was wondering if > there is any way to keep constant values corresponding to a constant > colour with topoplotTFR? Thank you very much for any input! > > Best Regards, > Kaijie Zhang > > -- > Kaijie Zhang > Electrical & Biomedical Engineering, Level III > McMaster University > -- _____________________________________________________________________ Universitätsklinikum Hamburg-Eppendorf; Körperschaft des öffentlichen Rechts; Gerichtsstand: Hamburg | www.uke.de Vorstandsmitglieder: Prof. Dr. Burkhard Göke (Vorsitzender), Prof. Dr. Dr. Uwe Koch-Gromus, Joachim Prölß, Rainer Schoppik _____________________________________________________________________ SAVE PAPER - THINK BEFORE PRINTING From XDu at mprc.umaryland.edu Tue Jun 28 20:04:37 2016 From: XDu at mprc.umaryland.edu (Xiaoming Du) Date: Tue, 28 Jun 2016 14:04:37 -0400 Subject: [FieldTrip] Methold reference for Connectivity analysis Message-ID: <577283F5020000DC0001BB4B@MPRC.UMARYLAND.EDU> Dear all, One of the method for FT_CONNECTIVITYANALYSIS is 'amplcorr'. The description in the help document is " 'amplcorr', amplitude correlation, support for freq and source data". I can not find any further explanation for this method from "Methold reference" page either. http://www.fieldtriptoolbox.org/references_to_implemented_methods Does anyone know which published paper(s) used this method? Thanks. Xiaoming -------------- next part -------------- An HTML attachment was scrubbed... URL: From michelic72 at gmail.com Tue Jun 28 22:45:42 2016 From: michelic72 at gmail.com (Cristiano Micheli) Date: Tue, 28 Jun 2016 22:45:42 +0200 Subject: [FieldTrip] Methold reference for Connectivity analysis In-Reply-To: <577283F5020000DC0001BB4B@MPRC.UMARYLAND.EDU> References: <577283F5020000DC0001BB4B@MPRC.UMARYLAND.EDU> Message-ID: Dear Xiaming, amplcorr implements a set of metrics related to correlation/cross-spectral density. See the reference for the function ft_connectivity_corr.m here: http://www.fieldtriptoolbox.org/reference/ft_connectivity_corr The function help contains a list of references too. IHTH Cris On Tue, Jun 28, 2016 at 8:04 PM, Xiaoming Du wrote: > Dear all, > > One of the method for FT_CONNECTIVITYANALYSIS is *'amplcorr'*. > > The description in the help document is " 'amplcorr', amplitude > correlation, support for freq and source data". > > I can not find any further explanation for this method from "Methold > reference" page either. > http://www.fieldtriptoolbox.org/references_to_implemented_methods > > Does anyone know which published paper(s) used this method? > > Thanks. > > Xiaoming > > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > https://mailman.science.ru.nl/mailman/listinfo/fieldtrip > -------------- next part -------------- An HTML attachment was scrubbed... URL: From anne.urai at gmail.com Wed Jun 29 13:21:01 2016 From: anne.urai at gmail.com (Anne Urai) Date: Wed, 29 Jun 2016 04:21:01 -0700 Subject: [FieldTrip] topoplotTFR Message-ID: Dear Kaijie, see this option from the ft_topoplottfr help, which you can use to pre-specify numerical values cfg.zlim = plotting limits for color dimension, 'maxmin', 'maxabs', 'zeromax', 'minzero', or [zmin zmax] (default = 'maxmin') — Anne E. Urai, MSc PhD student | Institut für Neurophysiologie und Pathophysiologie Universitätsklinikum Hamburg-Eppendorf | Martinistrasse 52, 20246 | Hamburg, Germany www.anneurai.net / @AnneEUrai On 28 June 2016 at 18:30, KAIJIE ZHANG wrote: > Hi Community, > > I've been using topoplotTFR for plotting NIRS signals, and it has been > going pretty well. Just a small thing: I have been plotting topographic > maps for several pieces of data, but each plot has a different scaling, > thus giving the value of colour a lot of ambiguity. I was wondering if > there is any way to keep constant values corresponding to a constant colour > with topoplotTFR? Thank you very much for any input! > > Best Regards, > Kaijie Zhang > > -- > Kaijie Zhang > Electrical & Biomedical Engineering, Level III > McMaster University > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > https://mailman.science.ru.nl/mailman/listinfo/fieldtrip > -------------- next part -------------- An HTML attachment was scrubbed... URL: From XDu at mprc.umaryland.edu Wed Jun 29 15:50:56 2016 From: XDu at mprc.umaryland.edu (Xiaoming Du) Date: Wed, 29 Jun 2016 09:50:56 -0400 Subject: [FieldTrip] Methold reference for Connectivity analysis In-Reply-To: References: <577283F5020000DC0001BB4B@MPRC.UMARYLAND.EDU> Message-ID: <57739A00020000DC0001BBCE@MPRC.UMARYLAND.EDU> Thanks Cris! Very helpful info! >>> Cristiano Micheli 6/28/2016 4:45 PM >>> Dear Xiaming, amplcorr implements a set of metrics related to correlation/cross-spectral density. See the reference for the function ft_connectivity_corr.m here: http://www.fieldtriptoolbox.org/reference/ft_connectivity_corr The function help contains a list of references too. IHTH Cris On Tue, Jun 28, 2016 at 8:04 PM, Xiaoming Du wrote: Dear all, One of the method for FT_CONNECTIVITYANALYSIS is 'amplcorr'. The description in the help document is " 'amplcorr', amplitude correlation, support for freq and source data". I can not find any further explanation for this method from "Methold reference" page either. http://www.fieldtriptoolbox.org/references_to_implemented_methods Does anyone know which published paper(s) used this method? Thanks. Xiaoming _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl https://mailman.science.ru.nl/mailman/listinfo/fieldtrip -------------- next part -------------- An HTML attachment was scrubbed... URL: From pmetzak at gmail.com Wed Jun 29 23:01:02 2016 From: pmetzak at gmail.com (Paul Metzak) Date: Wed, 29 Jun 2016 14:01:02 -0700 Subject: [FieldTrip] issues compiling matlab code that calls spm and runs a beamformer analysis Message-ID: Hi, I solved my own problem so I thought I would reply in case someone else runs into this issue. The problem is that when SPM (or SPM functions) are compiled, they search for a file called Contents.txt in the compiled spm directory; however, this file is not created when only some of the SPM functions are compiled through FieldTrip. Contents.txt is a copy of the Contents.m file found in SPM directories, so the solution was to copy Contents.m, rename it Contents.txt and to place this file in the compiled SPM directory. Note that for me at least, the compiled directories do not appear until the compiled code is run for the first time. I hope that saves someone some time one day! Paul -------------- next part -------------- An HTML attachment was scrubbed... URL: From pmetzak at gmail.com Thu Jun 30 00:01:26 2016 From: pmetzak at gmail.com (Paul Metzak) Date: Wed, 29 Jun 2016 15:01:26 -0700 Subject: [FieldTrip] unexpected image dimensions following ft_volumenormalise Message-ID: Hello, I am in the process of setting up a compiled beamformer script to run on my university's supercomputer. One issue that I have run into is that the dimensions of my beamformed image. I have my beamformed image that I have source interpolated (using ft_sourceinterpolate) with the participant's structural MRI. sourceDIFF_int = > inside: [256x256x256 logical] > pow: [256x256x256 double] > dim: [256 256 256] > transform: [4x4 double] > anatomy: [256x256x256 double] > coordsys: 'ctf' > unit: 'mm' > cfg: [1x1 struct] When I run the volume normalise function on sourceDIFF_int (see below), which lists a template file as input (as required to run when compiled), the output dimensions do not match the dimensions of the template file. I am curious where these mysterious dimensions are coming from, and why the template file is not being used? This happens both in the compiled and MATLAB-based executions of this code. cfg = []; > cfg.nonlinear = 'no'; > cfg.template = 'T1.nii'; > cfg.spmversion = 'spm8'; > sourceDIFF_int_norm = ft_volumenormalise(cfg, sourceDIFF_int); As you can see from the variable information for the normalised data, and the T1 template (see below), the dimensions are different. sourceDIFF_int_norm = > anatomy: [157x189x136 double] > pow: [157x189x136 double] > inside: [157x189x136 logical] > transform: [4x4 double] > dim: [157 189 136] > params: [1x1 struct] > initial: [4x4 double] > coordsys: 'spm' > cfg: [1x1 struct] > > templ_T1 = > dim: [91 109 91] > anatomy: [91x109x91 double] > hdr: [1x1 struct] > transform: [4x4 double] > unit: 'mm' Thank you for any light you can shed on this issue. Please let me know if more information would be helpful in resolving this. Paul -------------- next part -------------- An HTML attachment was scrubbed... URL: From lindseyrtate at ou.edu Thu Jun 30 08:22:41 2016 From: lindseyrtate at ou.edu (Tate, Lindsey R.) Date: Thu, 30 Jun 2016 06:22:41 +0000 Subject: [FieldTrip] Beamforming, "Inf" during source estimation by subject In-Reply-To: References: Message-ID: Tate, Lindsey R. has shared a?OneDrive for Business?file with you. To view it, click the link below. [https://r1.res.office365.com/owa/prem/images/dc-generic_20.png] dataFIC4.mat Hello Fieldtrip Community, On Tuesday 6/28, I sent out the original message forwarded below. I received some response but have been unable to resolve my problem. [Attempted to allow lambda to be estimated/not specified, but this didn't eliminate the "Inf" in the pow matrices.] I've been working on beamforming the MEG data collected from 16 subjects during a saccade task. There are 4 conditions, with a maximum of 30 trials each per subject (some trials eliminated due to loss of focus). This is my first time beamforming so I've been heavily relying on the tutorial. I'm having what appears to be two issues: 1) Number of trials per subject may be too low. When I collapse across all subjects or even collapse across two random subjects so as to artificially increase the number of trials per "artificial subject," real numbers are produced by ft_sourceinterpolate in the pow matrix. When I run each subject individually, the pow matrix from ft_sourceinterpolate "Inf" where numbers were for the other runs. Is there a way to resolve this issue, such as a default setting to override? Or do I have too few trials per condition? 2) The pow matrix from ft_sourceinterpolate produces primarily "NaN," with about 90% of the rows being "NaN." This seems problematic. Also, it seems like it may be causing problems with ft_sourcestatistics as the stat.prob and stat.mask matrices always come back empty, even when ft_sourceinterpolate produces pow matrices with real numbers divided by "artificial subjects." Could this prevalence of "NaN" be an indication that the beamforming isn't happening correctly? Could the prevalence be causing the ft_sourcestatistics to produce blank stat.prob and stat.mask matrices? Code and raw dataset attached. Thank you for any assistance or guidance you may offer! Lindsey University of Oklahoma ________________________________ From: Tate, Lindsey R. Sent: Tuesday, June 28, 2016 3:05 AM To: fieldtrip at science.ru.nl Subject: Beamforming, "Inf" during source estimation by subject Hello Fieldtrip Community, I've been working on beamforming the MEG data collected from 16 subjects during a saccade task. This is my first time beamforming so I've been heavily relying on the tutorial. When I collapse trials across subjects and do beamforming, I can get the ft_sourceplot commands to produce something that makes some sense. However, I need to be able to have the data separated by subject for ft_sourcestatistics. I've created structures that should work for this purpose and that look correct. However, the ".pow" from the Neural Activity Index calculation step ends up mostly "NaN" and partly "Inf" when I run the beamforming divided by subject. Is this related to the number of trials per subject somehow (e.g., do I have too few? is there some kind of setting I need to change?)? Why is the ".pow" coming back "Inf" instead of a real number? Does anyone have suggestions for fixing this problem so that I don't get "Inf" anymore? My code and raw data structure are attached. Thank you, Lindsey Tate University of Oklahoma -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: BF_trial4.m URL: From lindseyrtate at ou.edu Thu Jun 30 08:22:46 2016 From: lindseyrtate at ou.edu (Tate, Lindsey R.) Date: Thu, 30 Jun 2016 06:22:46 +0000 Subject: [FieldTrip] Tate, Lindsey R. wants to share the file dataFIC4.mat with you Message-ID: To view dataFIC4.mat, sign in or create an account. -------------- next part -------------- An HTML attachment was scrubbed... URL: From B.Haendel at gmx.net Thu Jun 30 12:03:01 2016 From: B.Haendel at gmx.net (Barbara Haendel) Date: Thu, 30 Jun 2016 12:03:01 +0200 Subject: [FieldTrip] Postdoc/PhD positions: cognitive Neuroscience - University of Wuerzburg (Germany) Message-ID: An HTML attachment was scrubbed... URL: From alexandre.gramfort at telecom-paristech.fr Thu Jun 30 18:50:32 2016 From: alexandre.gramfort at telecom-paristech.fr (Alexandre Gramfort) Date: Thu, 30 Jun 2016 18:50:32 +0200 Subject: [FieldTrip] [JOB] Post Doc Machine Learning for neuroscience time series Message-ID: *Post-Doc/Research position in:* *Supervised learning on neuroscience time-series with application to epilepsy* Place: TELECOM ParisTech, 75013 Paris, France Duration: 1 year (extension possible) Start: Any date from September 1st, 2016 Salary: according to background and experience *Keywords:* machine learning, time-series, optimization, conditional random fields (CRF), representation learning, electroencephalography (EEG) *Position description* The objective of the project is to develop machine learning tools that can facilitate the review, the visualization, the processing and the annotation of clinical intracranial EEG data in the context of epilepsy. Epilepsy is a pathology that leads to prototypical patterns in the recorded time series (spikes, high frequency oscillations, seizures). The objective of the project is to build algorithms that automatically pinpoint such events in raw intracranial EEG data. The approach envisioned is based on state-of-the-art machine learning techniques (representation learning, conditional random fields). The position is funded by a joint grant between Alexandre Gramfort and Slim Essid at the Signal and Image Processing department at Telecom ParisTech, the companies Dataiku and Bioserenity as well as the ICM Institute at the Salpétrière hospital. *Work Environment* TELECOM ParisTech is the leading graduate School of Institut TELECOM with more than 160 research professors and over 250 Engineering degrees, 50 PhD and 150 specialized masters (post graduates) awarded per year. The signal and image processing (TSI) department conducts leading research in the field of statistics, machine learning and signal processing with regular publications in leading conferences (NIPS, ICML, ICCASP, etc.) and journals (JMLR, IEEE Trans. Med. Imaging, IEEE Trans. Signal Processing, etc.). The candidate will be integrated to a team formed by 6 PIs, more than 10 PhD students, 4 engineers and 3 post-docs, among which are 6 persons dedicated to the statistical analysis of electrophysiological signals. The local expertise is unique with both significant experience in signal processing, machine learning, statistics and in applied neuroscience data munging. *Candidate Profile* As minimum requirements, the candidate will have: a PhD in computer science, statistics / machine learning, signal processing strong programming skills (Experience with Python is a definite plus) strong communication skills in English. The ideal candidate would also have: - Prior experience with EEG data analysis and/or electrophysiology signals - Ability to work in a multi-partner collaborative environment. - Basic knowledge of French (not required). *Contacts *Interested applicants can contact Alexandre Gramfort or Slim Essid for more information or directly email a candidacy letter including a Curriculum Vitae, a list of publications and a statement of research interests. - Alexandre Gramfort (alexandre.gramfort at telecom-paristech.fr) - Slim Essid (slim.essid at telecom-paristech.fr) -------------- next part -------------- An HTML attachment was scrubbed... URL: From s.chettouf at vu.nl Wed Jun 1 14:04:20 2016 From: s.chettouf at vu.nl (Chettouf, S.) Date: Wed, 1 Jun 2016 12:04:20 +0000 Subject: [FieldTrip] Layout label ordering Message-ID: Dear field trip community, I want to make a layout for my EEG data measured with a 61-chan Easycap to make a plot with ft_multiplotTRF. My layout looks a lot like EasyCapM11.mat, only the order of channels differers completely. Do I have to correct for this order? Or is there some ‘label detection’? Kind regards, Sabrina Chettouf -------------- next part -------------- An HTML attachment was scrubbed... URL: From j.herring at donders.ru.nl Wed Jun 1 14:28:03 2016 From: j.herring at donders.ru.nl (Herring, J.D. (Jim)) Date: Wed, 1 Jun 2016 12:28:03 +0000 Subject: [FieldTrip] Layout label ordering In-Reply-To: References: Message-ID: <3D00B7615FB58D46A0B49B9AD67A33EB3DA02252@exprd01.hosting.ru.nl> Dear Sabrina, The ordering is not important as long as the labels in your data correspond to labels in the layout file. Best, Jim From: fieldtrip-bounces at science.ru.nl [mailto:fieldtrip-bounces at science.ru.nl] On Behalf Of Chettouf, S. Sent: Wednesday, June 01, 2016 2:04 PM To: fieldtrip at science.ru.nl Subject: [FieldTrip] Layout label ordering Dear field trip community, I want to make a layout for my EEG data measured with a 61-chan Easycap to make a plot with ft_multiplotTRF. My layout looks a lot like EasyCapM11.mat, only the order of channels differers completely. Do I have to correct for this order? Or is there some 'label detection'? Kind regards, Sabrina Chettouf -------------- next part -------------- An HTML attachment was scrubbed... URL: From jan.schoffelen at donders.ru.nl Wed Jun 1 14:56:18 2016 From: jan.schoffelen at donders.ru.nl (Schoffelen, J.M. (Jan Mathijs)) Date: Wed, 1 Jun 2016 12:56:18 +0000 Subject: [FieldTrip] Average referencing and demeaning prior to beamformer In-Reply-To: References: Message-ID: Hi Maris, > Question 1: after I combine the the two cut-out time windows to calculate the common filter, do I need to average reference the combined data set prior to calculating the beamformer filter? The referencing procedure operates across channels, not time points. Thus once the data has been average referenced (and as long as you don’t throw away channels in the mean time, or do something funky that affects the channel mixing, e.g. remove certain topographical patterns based on an ICA), the data does not need to be re-referenced anymore. > Question 2: Do I need to separately average reference each of the two cut-out windows prior to applying the beamformer on each of the cut-out data segments? See above, the rereferencing is independent of time. > Question 3 on demeaning: do the cut-out combined/separate time windows should also be demeaned or demeaning doesn't make any difference for beamformer source reconstruction? The LCMV beamformer requires a covariance matrix. This is generally constructed by the user with ft_timelockanalysis. Unless you specify otherwise, the data will be demeaned by default prior to the covariance computation. Best, Jan-Mathijs > > Thanks! > > Maris > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip From jim.f.cav at gmail.com Wed Jun 1 23:43:46 2016 From: jim.f.cav at gmail.com (Jim Cavanagh) Date: Wed, 1 Jun 2016 15:43:46 -0600 Subject: [FieldTrip] LCMV time window Message-ID: I get radically different outputs depending on the time window used for LCMV (primarily MEG, but also a bit with EEG). My data are sampled at 250 Hz, filtered .5 to 20 Hz, calculated as the percent change (sourcediff = (source A - source B) / source A). With 3 samples (12 ms), LCMV outcomes are uninterpretable (i.e. values of 100,000 % change). Increasing samples yield increasingly realistic values, especially at about 25 samples (100 ms). I presume this has to do with the covariance, especially since there doesn't appear to be much noise in the data. This is unfortunate since some of the ERF events that I'd like to capture are short-lived. 1) Does anyone have an explanation for this issue so I can account for it? 2) Or, barring that, feedback on an optimal way to determine temporal window size for LCMV? -- Jim Cavanagh Assistant Professor University of New Mexico https://sites.google.com/site/jcavanaghunm/home -------------- next part -------------- An HTML attachment was scrubbed... URL: From sarang at cfin.au.dk Thu Jun 2 12:05:56 2016 From: sarang at cfin.au.dk (Sarang S. Dalal) Date: Thu, 2 Jun 2016 10:05:56 +0000 Subject: [FieldTrip] LCMV time window In-Reply-To: References: Message-ID: <675C0D1B-3501-431E-B8F6-5AA54CAC915A@cfin.au.dk> Dear Jim, Indeed, 3 samples is much too few for constructing the beamformer filter —as you guessed, this results in a poor covariance estimate that is furthermore low-rank and therefore difficult to reliably invert. But, it is no matter, as you can construct the filter with your complete trial (perhaps 100ms as a minimum length), but examine the resulting time series (source.avg.mom) for whichever shorter intervals you are interested in. If you are not contrasting conditions, you may consider applying: cfg.lcmv.weightnorm = 'nai’; For reference, our group typically uses the following additional options for such data: cfg.lcmv.reducerank = 'no'; cfg.lcmv.fixedori = 'yes’; cfg.lcmv.projectnoise = 'yes'; It is so far undocumented, but our plotting tools in fieldtrip/contrib/nutmegtrip could help navigating the resulting source time series (in your path you’ll need: a full copy of SPM8, fieldtrip/contrib/nutmegtrip , and fieldtrip/template/atlas/aal ) cfg=[]; cfg.mripath = ‘yourmri.nii’; % or template MRI if voxel grid is in MNI space cfg.funparameter = 'avg.mom'; cfg.atlas = ft_read_atlas('ROI_MNI_V4.nii'); % AAL atlas (optional) nmt_sourceplot_spm8(cfg,ft_convert_units(source,'mm')); Cheers, Sarang On 01 Jun 2016, at 23:43, Jim Cavanagh > wrote: I get radically different outputs depending on the time window used for LCMV (primarily MEG, but also a bit with EEG). My data are sampled at 250 Hz, filtered .5 to 20 Hz, calculated as the percent change (sourcediff = (source A - source B) / source A). With 3 samples (12 ms), LCMV outcomes are uninterpretable (i.e. values of 100,000 % change). Increasing samples yield increasingly realistic values, especially at about 25 samples (100 ms). I presume this has to do with the covariance, especially since there doesn't appear to be much noise in the data. This is unfortunate since some of the ERF events that I'd like to capture are short-lived. 1) Does anyone have an explanation for this issue so I can account for it? 2) Or, barring that, feedback on an optimal way to determine temporal window size for LCMV? -- Jim Cavanagh Assistant Professor University of New Mexico https://sites.google.com/site/jcavanaghunm/home _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -------------- next part -------------- An HTML attachment was scrubbed... URL: From gmichael_ at hotmail.com Thu Jun 2 23:15:20 2016 From: gmichael_ at hotmail.com (george michael) Date: Thu, 2 Jun 2016 21:15:20 +0000 Subject: [FieldTrip] Morphing the single-subject minimum norm estimates into a common standard template mesh with FieldTrip Message-ID: Dear Fieldtrip Community, We are analysing the ERF with NeuromakElekta data and our goal is to do group-analysis on the minimum norm estimates corresponding to the ERF data. We have combined the use of freesurfer and MNE to segment the individual MRI-images, etc, and create the cortical meshes (subj-oct-6-src.fif). Coregistration of MRI-MEG data was also done with those tools. We have used FieldTrip to process the functional data and estimate the minimum norm estimates in the individual subject space. Does somebody have a suggestion for how to morph the single-subject minimum norm estimates into a common standard template using FieldTrip? (i.e. cortex_8196.surf.gii) The goal would be to do group analysis in the common space. Thanks in advance. Best Regards, Giorgos Michail Research Assistant Department of Neurology Charite Medical University, Berlin -------------- next part -------------- An HTML attachment was scrubbed... URL: From jan.schoffelen at donders.ru.nl Fri Jun 3 09:26:58 2016 From: jan.schoffelen at donders.ru.nl (Schoffelen, J.M. (Jan Mathijs)) Date: Fri, 3 Jun 2016 07:26:58 +0000 Subject: [FieldTrip] Morphing the single-subject minimum norm estimates into a common standard template mesh with FieldTrip In-Reply-To: References: Message-ID: <22E6347B-83AD-4295-87D8-9AB67F575522@donders.ru.nl> Dear Giorgos, I’d recommend using hcp-workbench or Caret. Caret is the predecessor of hcp-workbench and not actively maintained anymore, but the procedure should still work. It’s documented here: http://brainvis.wustl.edu/wiki/index.php/Caret:Operations/Freesurfer_to_fs_LR Better still would be to adopt the state of the art, and use hcp-workbench in combination with the appropriate parts of the following script: https://github.com/Washington-University/Pipelines/blob/master/PostFreeSurfer/scripts/FreeSurfer2CaretConvertAndRegisterNonlinear.sh This latter option is probably a bit more tricky to adapt to your situation. Best, Jan-Mathijs On 02 Jun 2016, at 23:15, george michael > wrote: Dear Fieldtrip Community, We are analysing the ERF with NeuromakElekta data and our goal is to do group-analysis on the minimum norm estimates corresponding to the ERF data. We have combined the use of freesurfer and MNE to segment the individual MRI-images, etc, and create the cortical meshes (subj-oct-6-src.fif). Coregistration of MRI-MEG data was also done with those tools. We have used FieldTrip to process the functional data and estimate the minimum norm estimates in the individual subject space. Does somebody have a suggestion for how to morph the single-subject minimum norm estimates into a common standard template using FieldTrip? (i.e. cortex_8196.surf.gii) The goal would be to do group analysis in the common space. Thanks in advance. Best Regards, Giorgos Michail Research Assistant Department of Neurology Charite Medical University, Berlin _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -------------- next part -------------- An HTML attachment was scrubbed... URL: From Markus.Butz at uni-duesseldorf.de Fri Jun 3 14:31:06 2016 From: Markus.Butz at uni-duesseldorf.de (Markus Butz) Date: Fri, 03 Jun 2016 14:31:06 +0200 Subject: [FieldTrip] =?utf-8?q?PostDoc_and_PhD_position_in_D=C3=BCsseldorf?= In-Reply-To: <22E6347B-83AD-4295-87D8-9AB67F575522@donders.ru.nl> References: <22E6347B-83AD-4295-87D8-9AB67F575522@donders.ru.nl> Message-ID: Dear Fieldtrip community, please find attached a job offer for 1 PostDoc and 1 PhD positon in Düsseldorf, Germany available from 1st of July 2016 or until filled. The initial appointment is for 2-3 years (postdoc) or 3 years (PhD student). Both are within the project "Spontaneous brain activity in healthy subjects and Parkinson's disease” and supervised by Prof. Esther Florin. For mor information, please contact Esther directly: esther.florin at med.uni-duesseldorf.de Best wishes, Markus -------------- next part -------------- A non-text attachment was scrubbed... Name: position_duesseldorf.pdf Type: application/pdf Size: 95269 bytes Desc: not available URL: From carine.signoret at liu.se Fri Jun 3 15:36:20 2016 From: carine.signoret at liu.se (Carine Signoret) Date: Fri, 3 Jun 2016 15:36:20 +0200 Subject: [FieldTrip] trigger info Message-ID: <1033a0e9-1eb8-9fc4-469a-86abca565412@liu.se> Dear all, I would like to know if the fact to dowmsample the data before running ICA would imply that I will loose the trigger information? Thank you for your help, -- Carine. -------------------------------------------------- Carine Signoret, Ph.D. Linnaeus Centre HEAD Swedish Institute for Disability Research Department of Behavioral Sciences and Learning Linköping University Campus Valla, I-huset:114 581 83 Linköping Sweden Phone: +46(0)13 28 21 88 Email: carine.signoret at liu.se -------------------------------------------------- -------------- next part -------------- An HTML attachment was scrubbed... URL: From alexander_nakhnikian at hms.harvard.edu Sat Jun 4 00:03:56 2016 From: alexander_nakhnikian at hms.harvard.edu (Alexander Nakhnikian) Date: Fri, 3 Jun 2016 18:03:56 -0400 Subject: [FieldTrip] Strange DICS Results Message-ID: <06b736d6-17ea-9f68-3c97-c0c8fb4fbb39@hms.harvard.edu> Hello all, I'm hitting a wall in my analysis trying to source-localize EEG data in a visual task. I'm trying to localize the 8 to 15 Hz power. Unfortunately, I don't have individual electrode coordinates or sMRIs so I've had to create an electrode coordinate file and manually align it with the scalp in FT's template head. I'm using the standard BEM as the head model and the standard MRI instead of individual structural scans. I'm able to get reasonable results from ft_freqanalysis; importantly, they match the scalp topography we see using other programs, such as IDL. The problem is that when I try to localize these data with DICS, I get absurd results. The source localized power exceeds 3000 at some locations and the maxima are in strange places, such as behind the eye socket and near the base of the skull. When I run ft_sourceinterpolate I get the following warning: Warning: could not reshape freq to the expected dimensions > In ft_datatype_volume (line 136) In ft_checkdata (line 329) In ft_sourceinterpolate (line 163) Otherwise, no errors or warning messages come up. I'm not sure what's causing the odd results. Am I not using the template files correctly? I've included analysis setup below. Thanks in advance, Alexander cfg = []; cfg.method = 'mtmfft'; cfg.output = 'powandcsd'; cfg.tapsmofrq = 4; cfg.foilim = [12 12]; freqData = ft_freqanalysis(cfg,data); cfg = []; cfg.grid.xgrid = 'auto'; cfg.grid.ygrid = 'auto';cfg.grid.zgrid = 'auto'; cfg.resolution = 5; %units are mm cfg.method = 'dics'; cfg.dics.normalize = 'yes'; cfg.headmodel = vol; %from loading 'standard_bem.mat' cfg.elec = elec_aligned; %electrode coordinates (MNI) aligned to template head sources = ft_sourceanalysis(cfg,freqData); cfg = []; cfg.downsample = 2; cfg.parameter = 'pow'; sourcesInt = ft_sourceinterpolate(cfg,sources,mri); %mri from 'standard_mri.mat' in FT's templates cfg = []; cfg.method = 'slice'; cfg.parameter = 'pow; ft_sourceplot(cfg,sourcesInt) -- Alexander Nakhnikian, Ph.D. Postdoctoral Fellow Clinical Research Training Program VA Boston Healthcare System Harvard Medical School From litvak.vladimir at gmail.com Mon Jun 6 12:10:48 2016 From: litvak.vladimir at gmail.com (Vladimir Litvak) Date: Mon, 6 Jun 2016 11:10:48 +0100 Subject: [FieldTrip] New MEG Analysis/Large Data Postdoc job at CUBRIC Message-ID: ---------- Forwarded message ---------- From: Krish Singh Date: Mon, Jun 6, 2016 at 10:57 AM Subject: [megcommunity] New MEG Analysis/Large Data Postdoc job at CUBRIC To: MEGCOMMUNITY at jiscmail.ac.uk Dear All, re: Research Associate in Multi-site MEG Data Cohort Management & Analysis Closing date: 18th June 2016 We are seeking a Research Associate, experienced in Neuroimaging/Electrophysiological cohort data, for a 2-year position supporting the establishment of a multi-site database of normative Magnetoencephalographic (MEG) data, collected across all UK MEG laboratories, and the development of common analysis and management pipelines for mining this resource. The data is already collected and will represent one of the largest and most valuable electrophysiological data cohorts to be freely available to the international community. The post will be based at the Cardiff University Brain Research Imaging Centre (CUBRIC), part of the School of Psychology at Cardiff University, but will involve tight integration with the eight Universities within an MRC-funded MEG Partnership grant. For full details and how to apply: http://www.jobs.ac.uk/job/ANV075/research-associate-in-multi-site-meg-data-cohort-management-and-analysis/ Best Wishes, Krish -- Prof. Krish Singh CUBRIC School of Psychology / Ysgol Seicoleg Cardiff University / Prifysgol Caerdydd Maindy Road / Cardiff / Caerdydd CF24 4HQ, UK Tel / Ffôn: 02920 874690 / 870365 Fax / Ffacs: 02920 870339 Email / Ebost : singhkd at cardiff.ac.uk From seymourr at aston.ac.uk Tue Jun 7 18:54:11 2016 From: seymourr at aston.ac.uk (Seymour, Robert (Research Student)) Date: Tue, 7 Jun 2016 16:54:11 +0000 Subject: [FieldTrip] trigger info Message-ID: Hi Cai -------------- next part -------------- An HTML attachment was scrubbed... URL: From amickan1990 at gmail.com Tue Jun 7 19:24:25 2016 From: amickan1990 at gmail.com (Anne Mickan) Date: Tue, 7 Jun 2016 19:24:25 +0200 Subject: [FieldTrip] Error using ft_prepare_neighbours Message-ID: Dear all, I'm doing permutation tests, for which I wrote a script a while ago, which worked nicely back then, but now gives me the following error when I run the ft_prepare_neighbours function: Error: Undefined function or variable 'hasdata'. I'm assuming that this means that the function does not properly access the data structure that I give it. I just don't know why and how to fix it, given that the very same script worked about half a year ago. I have updated my version to Matlab 2016a in the meantime, but all other things stayed the same. To give you a better idea, here is what my data looks like for one participant: Data{1} avg: [34x600 double] time: [1x600 double] fsample: '500' label: {34x1 cell} dimord: 'chan_time' dof: [34x600 double] var: [34x600 double] I have data for 21 participants. Here is the part of the script up until the prepare neighbours function, Correct and Incorrect being the respective datasets for my two conditions: cfg = []; cfg.channel = 'all'; cfg.latency = 'all'; cfg.parameter = 'avg'; % prepare neighbouring channels cfg_neighb = []; cfg_neighb.method = 'triangulation'; cfg_neighb.channel = 'all'; cfg_neighb.feedback = 'yes'; cfg_neighb.layout = 'easycapCustomMSC.mat'; cfg_neighb.neighbourdist = 0.2; neighbours = ft_prepare_neighbours(cfg_neighb, Correct{1}); I hope this is enough information to help me out. Thanks in advance, Anne -------------- next part -------------- An HTML attachment was scrubbed... URL: From jan.schoffelen at donders.ru.nl Tue Jun 7 20:12:53 2016 From: jan.schoffelen at donders.ru.nl (Schoffelen, J.M. (Jan Mathijs)) Date: Tue, 7 Jun 2016 18:12:53 +0000 Subject: [FieldTrip] Error using ft_prepare_neighbours In-Reply-To: References: Message-ID: <034DFF5E-1EEE-4F7D-BB74-7D745E5467BA@donders.ru.nl> Hi Anne, I believe that this issue has been fixed a while ago. If I check the latest version of the code on https://github.com/fieldtrip/fieldtrip/blob/master/ft_prepare_neighbours.m it looks fine to me. In particular, in line 94 the variable hasdata is explicitly defined. Could you please upgrade to the most recent version of Fieldtrip and try again? Best wishes, Jan-Mathijs On 07 Jun 2016, at 19:24, Anne Mickan > wrote: Dear all, I'm doing permutation tests, for which I wrote a script a while ago, which worked nicely back then, but now gives me the following error when I run the ft_prepare_neighbours function: Error: Undefined function or variable 'hasdata'. I'm assuming that this means that the function does not properly access the data structure that I give it. I just don't know why and how to fix it, given that the very same script worked about half a year ago. I have updated my version to Matlab 2016a in the meantime, but all other things stayed the same. To give you a better idea, here is what my data looks like for one participant: Data{1} avg: [34x600 double] time: [1x600 double] fsample: '500' label: {34x1 cell} dimord: 'chan_time' dof: [34x600 double] var: [34x600 double] I have data for 21 participants. Here is the part of the script up until the prepare neighbours function, Correct and Incorrect being the respective datasets for my two conditions: cfg = []; cfg.channel = 'all'; cfg.latency = 'all'; cfg.parameter = 'avg'; % prepare neighbouring channels cfg_neighb = []; cfg_neighb.method = 'triangulation'; cfg_neighb.channel = 'all'; cfg_neighb.feedback = 'yes'; cfg_neighb.layout = 'easycapCustomMSC.mat'; cfg_neighb.neighbourdist = 0.2; neighbours = ft_prepare_neighbours(cfg_neighb, Correct{1}); I hope this is enough information to help me out. Thanks in advance, Anne _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -------------- next part -------------- An HTML attachment was scrubbed... URL: From h.cecotti at ulster.ac.uk Wed Jun 8 18:32:26 2016 From: h.cecotti at ulster.ac.uk (Cecotti, Hubert) Date: Wed, 8 Jun 2016 16:32:26 +0000 Subject: [FieldTrip] realtime buffer problem Message-ID: Hello, I am trying to use the realtime buffer on windows 7 (64 bits). I get the following message: Invalid MEX-file 'E:\fieldtrip-20160607\realtime\src\buffer\matlab\buffer.mexw64': The specified module could not be found. (the file seems to work when it is accessed directly through the fieldtrip functions (e.g. ft_read..., but alone it doesn't work) Trying to recompile the file, I get: mex buffer.c Building with 'Microsoft Visual C++ 2015 Professional (C)'. Error using mex buffer.c E:\fieldtrip-20160607\realtime\src\buffer\matlab\buffer.c(12): fatal error C1083: Cannot open include file: 'buffer.h': No such file or directory buffer.h is however in : E:\fieldtrip-20160607\realtime\src\buffer\src , so I don't know how the files are mixed, and how to proceed. Please advise. Regards, Hubert ________________________________ This email and any attachments are confidential and intended solely for the use of the addressee and may contain information which is covered by legal, professional or other privilege. If you have received this email in error please notify the system manager at postmaster at ulster.ac.uk and delete this email immediately. Any views or opinions expressed are solely those of the author and do not necessarily represent those of Ulster University. The University's computer systems may be monitored and communications carried out on them may be recorded to secure the effective operation of the system and for other lawful purposes. Ulster University does not guarantee that this email or any attachments are free from viruses or 100% secure. Unless expressly stated in the body of a separate attachment, the text of email is not intended to form a binding contract. Correspondence to and from the University may be subject to requests for disclosure by 3rd parties under relevant legislation. The University of Ulster was founded by Royal Charter in 1984 and is registered with company number RC000726 and VAT registered number GB672390524.The primary contact address for Ulster University in Northern Ireland is Cromore Road, Coleraine, Co. Londonderry BT52 1SA -------------- next part -------------- An HTML attachment was scrubbed... URL: From r.thomas at nin.knaw.nl Wed Jun 8 23:41:27 2016 From: r.thomas at nin.knaw.nl (Rajat Thomas) Date: Wed, 8 Jun 2016 21:41:27 +0000 Subject: [FieldTrip] Transformation from MNI to Native: OF POINTS? Message-ID: <1465422086827.19947@nin.knaw.nl> Dear Fieldtrippers, I have the forward and the inverse deformation field after a segmentation. Now I have some points in MNI coordinates (x,y,z positions). How can find its analog in native space? Thanks in advance. Rajat Rajat Mani Thomas Social Brain Lab Netherlands Institute for Neuroscience Amsterdam -------------- next part -------------- An HTML attachment was scrubbed... URL: From alexander_nakhnikian at hms.harvard.edu Thu Jun 9 00:12:46 2016 From: alexander_nakhnikian at hms.harvard.edu (Alexander Nakhnikian) Date: Wed, 8 Jun 2016 18:12:46 -0400 Subject: [FieldTrip] Transformation from MNI to Native: OF POINTS? In-Reply-To: <1465422086827.19947@nin.knaw.nl> References: <1465422086827.19947@nin.knaw.nl> Message-ID: <1e144453-1f56-8ece-e7c8-2f0d547b28e6@hms.harvard.edu> Dear Rajat, This function might be what you're looking for: http://www.fieldtriptoolbox.org/reference/ft_convert_coordsys Best, Alexander On 6/8/16 5:41 PM, Rajat Thomas wrote: > > Dear Fieldtrippers, > > > I have the forward and the inverse deformation field after a > segmentation. > > > Now I have some points in MNI coordinates (x,y,z positions). How can > find its analog in native space? > > > Thanks in advance. > > Rajat > > > > > Rajat Mani Thomas > Social Brain Lab > Netherlands Institute for Neuroscience > Amsterdam > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -- Alexander Nakhnikian, Ph.D. Postdoctoral Fellow Clinical Research Training Program VA Boston Healthcare System Harvard Medical School -------------- next part -------------- An HTML attachment was scrubbed... URL: From dr.nivethida at gmail.com Thu Jun 9 01:15:46 2016 From: dr.nivethida at gmail.com (nivethida t) Date: Wed, 8 Jun 2016 19:15:46 -0400 Subject: [FieldTrip] statistics for imaginary coherence Message-ID: Hi all, I am trying to do statistical testing for the difference in imaginary coherence between 2 subject groups. Following the tutorial, I was able to perform the ft_freqstatistics for the power spectrum using the output from freqgrandaverage. If I have to run similar statistics for imaginary coherence data, what should be my input for ft_freqstatistics since freqgrandaverage does not work for cohspctrm? Or is there a different statistics function for coherence? Thanks, Nivethida -- Dr.Nivethida Thirugnanasambandam, Postdoctoral Visiting Fellow, Human Motor Control Section, National Institute of Neurological Disorders and Stroke, National Institutes of Health, Building 10, 7D42, 10 Center Drive, MSC 1428 Bethesda, MD 20892 - 1428 Ph: +1-301-402-6231 -------------- next part -------------- An HTML attachment was scrubbed... URL: From dr.nivethida at gmail.com Thu Jun 9 03:23:30 2016 From: dr.nivethida at gmail.com (nivethida t) Date: Wed, 8 Jun 2016 21:23:30 -0400 Subject: [FieldTrip] design matrix Message-ID: Hi all, My study has 2 subject groups (n=15/group) with each performing 4 different tasks. What would be my design matrix to perform statistics on TFA data? Thanks, Nivethida -- Dr.Nivethida Thirugnanasambandam, Postdoctoral Visiting Fellow, Human Motor Control Section, National Institute of Neurological Disorders and Stroke, National Institutes of Health, Building 10, 7D42, 10 Center Drive, MSC 1428 Bethesda, MD 20892 - 1428 Ph: +1-301-402-6231 -------------- next part -------------- An HTML attachment was scrubbed... URL: From jan.schoffelen at donders.ru.nl Thu Jun 9 09:27:09 2016 From: jan.schoffelen at donders.ru.nl (Schoffelen, J.M. (Jan Mathijs)) Date: Thu, 9 Jun 2016 07:27:09 +0000 Subject: [FieldTrip] statistics for imaginary coherence In-Reply-To: References: Message-ID: <50D7AC75-7AA2-47B0-B1FC-6803B8A99DFC@donders.ru.nl> Hi Nivethida, You can circumvent the use of ft_freqgrandaverage using cell-arrays (each data structure a single cell represents a subject). (+ cfg.parameter=‘cohspctrm’) e.g. ft_freqstatistics(cfg, data1{:}, data2{:}); Best, Jan-Mathijs > On 09 Jun 2016, at 01:15, nivethida t wrote: > > Hi all, > I am trying to do statistical testing for the difference in imaginary coherence between 2 subject groups. Following the tutorial, I was able to perform the ft_freqstatistics for the power spectrum using the output from freqgrandaverage. > If I have to run similar statistics for imaginary coherence data, what should be my input for ft_freqstatistics since freqgrandaverage does not work for cohspctrm? Or is there a different statistics function for coherence? > > Thanks, > Nivethida > > > > -- > Dr.Nivethida Thirugnanasambandam, > Postdoctoral Visiting Fellow, > Human Motor Control Section, > National Institute of Neurological Disorders and Stroke, > National Institutes of Health, > Building 10, 7D42, > 10 Center Drive, MSC 1428 > Bethesda, MD 20892 - 1428 > Ph: +1-301-402-6231 > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip From jan.schoffelen at donders.ru.nl Thu Jun 9 09:27:41 2016 From: jan.schoffelen at donders.ru.nl (Schoffelen, J.M. (Jan Mathijs)) Date: Thu, 9 Jun 2016 07:27:41 +0000 Subject: [FieldTrip] design matrix In-Reply-To: References: Message-ID: I guess that this depends on your null hypothesis… Best, Jan-Mathijs > On 09 Jun 2016, at 03:23, nivethida t wrote: > > Hi all, > My study has 2 subject groups (n=15/group) with each performing 4 different tasks. What would be my design matrix to perform statistics on TFA data? > > Thanks, > Nivethida > > -- > Dr.Nivethida Thirugnanasambandam, > Postdoctoral Visiting Fellow, > Human Motor Control Section, > National Institute of Neurological Disorders and Stroke, > National Institutes of Health, > Building 10, 7D42, > 10 Center Drive, MSC 1428 > Bethesda, MD 20892 - 1428 > Ph: +1-301-402-6231 > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip From kramerrobin92 at gmail.com Thu Jun 9 11:03:15 2016 From: kramerrobin92 at gmail.com (Robin Kramer) Date: Thu, 9 Jun 2016 11:03:15 +0200 Subject: [FieldTrip] Importing B-Alert X10 data Message-ID: ​ 000222000.010616.103900.Events.edf ​​ 000222000.010616.103900.Signals.Raw.edf ​Hello, Recently we started a research with a new wearable EEG system called the B-Alert X-10 from Advanced Brain Monitoring. ABM does deliver their own analyzing software and it is compatible with EEGLab but not with Fieldtrip. Has anyone attempted to analyze the B-Alert data via FieldTrip already? The way data is stored is rather odd actually. The data is epoched in every second, with 256 samples (Fs = 256) in each epoch for each channel. In other words, there are as much separate trials as there are seconds. After preprocessing, and some manual labour I could rearrange the epochs and make the data continuous, but then I encountered two challenges. First, the event markers are stored in a different EDF file. Therefore, I have to define my own trial function, but the event-marker data is also stored rather oddly. Second, it seems that fieldtrip cannot segment any data after preprocessing with ft_definetrials(). Sadly, before preprocessing the B-Alert data is in the strange format. Is there a workaround? I have send a link with the two EDF files, in case one would like to inspect them themselves. Thank you so much. Best regards, Robin Kramer Student MSc Human-Machine Communication University of Groningen, the Netherlands -------------- next part -------------- An HTML attachment was scrubbed... URL: From azeez.adebimpe5 at gmail.com Thu Jun 9 11:28:37 2016 From: azeez.adebimpe5 at gmail.com (Azeez Adebimpe) Date: Thu, 9 Jun 2016 11:28:37 +0200 Subject: [FieldTrip] Importing B-Alert X10 data In-Reply-To: References: Message-ID: if it is compatible with EEGLAB, you can use *eeglab2fieldtrip *to convert the data to fieldtrip format if you are interested in doing analysis with fieldtrip. *Az* On Thu, Jun 9, 2016 at 11:03 AM, Robin Kramer wrote: > ​ > 000222000.010616.103900.Events.edf > > ​​ > 000222000.010616.103900.Signals.Raw.edf > > ​Hello, > > Recently we started a research with a new wearable EEG system called the > B-Alert X-10 from Advanced Brain Monitoring. ABM does deliver their own > analyzing software and it is compatible with EEGLab but not with Fieldtrip. > Has anyone attempted to analyze the B-Alert data via FieldTrip already? > > The way data is stored is rather odd actually. The data is epoched in > every second, with 256 samples (Fs = 256) in each epoch for each channel. > In other words, there are as much separate trials as there are seconds. > After preprocessing, and some manual labour I could rearrange the epochs > and make the data continuous, but then I encountered two challenges. > > First, the event markers are stored in a different EDF file. Therefore, I > have to define my own trial function, but the event-marker data is also > stored rather oddly. > Second, it seems that fieldtrip cannot segment any data after > preprocessing with ft_definetrials(). Sadly, before preprocessing the > B-Alert data is in the strange format. Is there a workaround? I have send a > link with the two EDF files, in case one would like to inspect them > themselves. > > Thank you so much. > > Best regards, > > Robin Kramer > Student MSc Human-Machine Communication > University of Groningen, the Netherlands > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > -------------- next part -------------- An HTML attachment was scrubbed... URL: From r.oostenveld at donders.ru.nl Thu Jun 9 13:08:25 2016 From: r.oostenveld at donders.ru.nl (Robert Oostenveld) Date: Thu, 9 Jun 2016 13:08:25 +0200 Subject: [FieldTrip] Importing B-Alert X10 data In-Reply-To: References: Message-ID: <99FA4D49-15F4-4BB9-BD30-C24853A486B0@donders.ru.nl> Hi Robin In terms of segmenting data after it having been read into memory, the following procedure works: 1) ft_preprocessing, without specifying cfg.trl or trialfun -> this reads the data as a single segment (i.e. one very long trial) 2) ft_definetrial, with cfg.trialfun, which could get events from another file -> this results in cfg.trl 3) ft_redefinetrial which takes the trl from step 2 and the continuous data from step 1. With regards to the data format: the files are plain EDF and as such supported by FieldTrip out the box. E.g. >> cfg = [] >> cfg.dataset = '000222000.010616.103900.Events.edf' >> ft_databrowser(cfg) >> hdr = ft_read_header(cfg.dataset) hdr = Fs: 1000 nChans: 1 label: {'EDF Annotations'} nSamples: 13000 nSamplesPre: 0 nTrials: 1 orig: [1x1 struct] chantype: {'unknown'} chanunit: {'unknown'} and >> cfg = [] >> cfg.dataset = '000222000.010616.103900.Signals.Raw.edf' >> ft_databrowser(cfg) >> hdr = ft_read_header(cfg.dataset) Warning: channels with different sampling rate not supported, using a subselection of 10 channels at 256.000000 Hz > In read_edf (line 330) In ft_read_header (line 678) hdr = Fs: 256 nChans: 10 label: {10x1 cell} nSamples: 1145600 nSamplesPre: 0 nTrials: 1 orig: [1x1 struct] chantype: {10x1 cell} chanunit: {10x1 cell} However, non-standard is to have the events in a separate file. Furthermore, the data file has channels with variable sampling rate, which is also not (by default) supported. See http://www.fieldtriptoolbox.org/getting_started/edf and http://www.fieldtriptoolbox.org/reference/edf2fieldtrip. Looking at the Events channel, I do think that you’ll need a separate trialfun anyway. From the Signals.Raw I see >> hdr.orig.Label ans = ECG POz Fz Cz C3 C4 F3 F4 P3 P4 ESUTimestamp SystemTimestamp Tilt X Tilt Y Tilt Z EDF Annotations which means that the annotations also seem to be present in the data file itself and the separate Event file might not be needed. With >> data = edf2fieldtrip('000222000.010616.103900.Signals.Raw.edf') Warning: channels with different sampling rate not supported, using a subselection of 10 channels at 256.000000 Hz > In read_edf (line 330) In ft_read_header (line 678) In edf2fieldtrip (line 36) reading 1 channels with 8 Hz sampling rate reading 3 channels with 128 Hz sampling rate reading 10 channels with 256 Hz sampling rate reading 1 channels with 512 Hz sampling rate reading 1 channels with 1024 Hz sampling rate upsampling 1 channels from 8 to 1024 Hz the input is raw data with 1 channels and 1 trials the call to "ft_selectdata" took 0 seconds and required the additional allocation of an estimated 3 MB resampling data resampling data in trial 1 from 1 original sampling rate = 8 Hz new sampling rate = 1024 Hz the call to "ft_resampledata" took 1 seconds and required the additional allocation of an estimated 146 MB upsampling 3 channels from 128 to 1024 Hz the input is raw data with 3 channels and 1 trials the call to "ft_selectdata" took 0 seconds and required the additional allocation of an estimated 1 MB resampling data resampling data in trial 1 from 1 original sampling rate = 128 Hz new sampling rate = 1024 Hz the call to "ft_resampledata" took 1 seconds and required the additional allocation of an estimated 165 MB upsampling 10 channels from 256 to 1024 Hz the input is raw data with 10 channels and 1 trials the call to "ft_selectdata" took 0 seconds and required the additional allocation of an estimated 1 MB resampling data resampling data in trial 1 from 1 original sampling rate = 256 Hz new sampling rate = 1024 Hz the call to "ft_resampledata" took 2 seconds and required the additional allocation of an estimated 507 MB upsampling 1 channels from 512 to 1024 Hz the input is raw data with 1 channels and 1 trials the call to "ft_selectdata" took 0 seconds and required the additional allocation of an estimated 2 MB resampling data resampling data in trial 1 from 1 original sampling rate = 512 Hz new sampling rate = 1024 Hz the call to "ft_resampledata" took 0 seconds and required the additional allocation of an estimated 105 MB input dataset 1, 1 channels, 1 trials input dataset 2, 3 channels, 1 trials input dataset 3, 10 channels, 1 trials input dataset 4, 1 channels, 1 trials input dataset 5, 1 channels, 1 trials concatenating the channels within each trial the call to "ft_appenddata" took 1 seconds and required the additional allocation of an estimated 560 MB adding the comment: reordered the channels to the original order in the EDF file the call to "ft_annotate" took 0 seconds and required the additional allocation of an estimated 463 MB data = label: {16x1 cell} trial: {[16x4582400 double]} time: {[1x4582400 double]} fsample: 1024 cfg: [1x1 struct] But then >> cfg = []; >> cfg.viewmode = 'vertical'; >> ft_databrowser(cfg, data) shows that the EDF Annotations channel (after upsampling) has been slightly messed up (due to filters). Perhaps it can still be of use. Otherwise I also would not directly know how to link the two files to each other, as the sampling rates are very incompatible (1000 in one, and powers of 2 in the other). Perhaps you can learn something from the EEGLAB code. Good luck with the data Robert > On 09 Jun 2016, at 11:03, Robin Kramer wrote: > > ​ >  000222000.010616.103900.Events.edf ​​ >  000222000.010616.103900.Signals.Raw.edf ​Hello, > > Recently we started a research with a new wearable EEG system called the B-Alert X-10 from Advanced Brain Monitoring. ABM does deliver their own analyzing software and it is compatible with EEGLab but not with Fieldtrip. Has anyone attempted to analyze the B-Alert data via FieldTrip already? > > The way data is stored is rather odd actually. The data is epoched in every second, with 256 samples (Fs = 256) in each epoch for each channel. In other words, there are as much separate trials as there are seconds. After preprocessing, and some manual labour I could rearrange the epochs and make the data continuous, but then I encountered two challenges. > > First, the event markers are stored in a different EDF file. Therefore, I have to define my own trial function, but the event-marker data is also stored rather oddly. > Second, it seems that fieldtrip cannot segment any data after preprocessing with ft_definetrials(). Sadly, before preprocessing the B-Alert data is in the strange format. Is there a workaround? I have send a link with the two EDF files, in case one would like to inspect them themselves. > > Thank you so much. > > Best regards, > > Robin Kramer > Student MSc Human-Machine Communication > University of Groningen, the Netherlands > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -------------- next part -------------- An HTML attachment was scrubbed... URL: From joseluisblues at gmail.com Fri Jun 10 10:42:39 2016 From: joseluisblues at gmail.com (Jose) Date: Fri, 10 Jun 2016 10:42:39 +0200 Subject: [FieldTrip] running FT scripts in a supercomputing cluster Message-ID: dear list, I'm trying to analyse CTF MEG data through the Flemish Supercomputer Centre, I did a matlab script to run the foremost FT functions in my pipeline (ft_read_event, read_ctf_cls, and ft_preprocessing). This script works well when I run it locally. To compile my function in the supercomputing cluster I initially used addpath to include FT and ft_defaults to set the configuration inside my script, but this wasn't working. I tried using a startup.m script but this doesn't work neither. Maybe I'm missing something? My bash script to compile looks like this: #!/bin/bash module load MATLAB/2013b FTDIR=$VSC_DATA_VO_USER/fieldtrip-20160317 mcc -mv FT_0.m I also tried mcc -mv FT_0.m -I $FTDIR I run my compilation in the same folder where I have the FT folder. When I run my bash job I get always the same error: Undefined function 'ft_read_event' for input arguments of type 'char'. I've been looking elsewhere but still I haven't find a solution, Any hints about this would really appreciated, best, Jose -------------- next part -------------- An HTML attachment was scrubbed... URL: From jan.schoffelen at donders.ru.nl Fri Jun 10 11:11:30 2016 From: jan.schoffelen at donders.ru.nl (Schoffelen, J.M. (Jan Mathijs)) Date: Fri, 10 Jun 2016 09:11:30 +0000 Subject: [FieldTrip] running FT scripts in a supercomputing cluster In-Reply-To: References: Message-ID: Hi Jose, Have you tried to explicitly add all required (sub)directories with the -a option? Something like mcc …. -a $FTDIR/fileio -a $FTDIR/… -a $FTDIR/etc It’s been a while that I have tried to compile some stuff myself, but I remember that back then I remember that I needed to instruct mcc with a list of directories explicitly Best, Jan-Mathijs > On 10 Jun 2016, at 10:42, Jose wrote: > > dear list, > > I'm trying to analyse CTF MEG data through the Flemish Supercomputer Centre, > I did a matlab script to run the foremost FT functions in my pipeline (ft_read_event, read_ctf_cls, and ft_preprocessing). This script works well when I run it locally. To compile my function in the supercomputing cluster I initially used addpath to include FT and ft_defaults to set the configuration inside my script, but this wasn't working. I tried using a startup.m script but this doesn't work neither. Maybe I'm missing something? My bash script to compile looks like this: > > #!/bin/bash > module load MATLAB/2013b > FTDIR=$VSC_DATA_VO_USER/fieldtrip-20160317 > mcc -mv FT_0.m > > I also tried mcc -mv FT_0.m -I $FTDIR > I run my compilation in the same folder where I have the FT folder. > When I run my bash job I get always the same error: Undefined function 'ft_read_event' for input arguments of type 'char'. > > I've been looking elsewhere but still I haven't find a solution, > > Any hints about this would really appreciated, > best, > Jose > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip From s.chettouf at vu.nl Fri Jun 10 11:19:49 2016 From: s.chettouf at vu.nl (Chettouf, S.) Date: Fri, 10 Jun 2016 09:19:49 +0000 Subject: [FieldTrip] Layout label ordering Message-ID: Dear Jim, Thanks for the answer. Could you please also tell me what the function of ‘SCALE’ is using the function ft_multiplotTRF? Plotting a colorbar seems more logic to me, but it’s not possible to delete this ’SCALE’ function. So probably it is handy for something? All the best, Sabrina From: > on behalf of "Herring, J.D. (Jim)" > Reply-To: FieldTrip discussion list > Date: Wednesday 1 June 2016 at 14:28 To: FieldTrip discussion list > Subject: Re: [FieldTrip] Layout label ordering Dear Sabrina, The ordering is not important as long as the labels in your data correspond to labels in the layout file. Best, Jim From: fieldtrip-bounces at science.ru.nl [mailto:fieldtrip-bounces at science.ru.nl] On Behalf Of Chettouf, S. Sent: Wednesday, June 01, 2016 2:04 PM To: fieldtrip at science.ru.nl Subject: [FieldTrip] Layout label ordering Dear field trip community, I want to make a layout for my EEG data measured with a 61-chan Easycap to make a plot with ft_multiplotTRF. My layout looks a lot like EasyCapM11.mat, only the order of channels differers completely. Do I have to correct for this order? Or is there some ‘label detection’? Kind regards, Sabrina Chettouf -------------- next part -------------- An HTML attachment was scrubbed... URL: From jan.schoffelen at donders.ru.nl Fri Jun 10 11:27:22 2016 From: jan.schoffelen at donders.ru.nl (Schoffelen, J.M. (Jan Mathijs)) Date: Fri, 10 Jun 2016 09:27:22 +0000 Subject: [FieldTrip] Strange DICS Results In-Reply-To: <06b736d6-17ea-9f68-3c97-c0c8fb4fbb39@hms.harvard.edu> References: <06b736d6-17ea-9f68-3c97-c0c8fb4fbb39@hms.harvard.edu> Message-ID: <0E3F135B-285F-4E9A-ADAE-0800879FCC51@donders.ru.nl> Hi Alex, >From what you describe I think that your results are suffering from numerical issues in the forward model. Once a source location (grid point) is close to the innermost boundary of the BEM, funky things may happen with respect to the computed leadfield, which obviously has large consequences for the shape of the beamformer spatial filter at that location. Best thing would be verify that indeed your ‘absurd’ voxels are near the edges, and mask them out. As a side note, typically volumetric DICS results in isolation (i.e using a single condition) are hard to interpret (even when using normalization). Best, Jan-Mathijs > On 04 Jun 2016, at 00:03, Alexander Nakhnikian wrote: > > Hello all, > > I'm hitting a wall in my analysis trying to source-localize EEG data in a visual task. I'm trying to localize the 8 to 15 Hz power. > > Unfortunately, I don't have individual electrode coordinates or sMRIs so I've had to create an electrode coordinate file and manually align it with the scalp in FT's template head. I'm using the standard BEM as the head model and the standard MRI instead of individual structural scans. > > I'm able to get reasonable results from ft_freqanalysis; importantly, they match the scalp topography we see using other programs, such as IDL. > > The problem is that when I try to localize these data with DICS, I get absurd results. The source localized power exceeds 3000 at some locations and the maxima are in strange places, such as behind the eye socket and near the base of the skull. > > When I run ft_sourceinterpolate I get the following warning: > > Warning: could not reshape freq to the expected dimensions > > In ft_datatype_volume (line 136) > In ft_checkdata (line 329) > In ft_sourceinterpolate (line 163) > > Otherwise, no errors or warning messages come up. I'm not sure what's causing the odd results. Am I not using the template files correctly? I've included analysis setup below. > > Thanks in advance, > > Alexander > > > > cfg = []; > cfg.method = 'mtmfft'; > cfg.output = 'powandcsd'; > cfg.tapsmofrq = 4; > cfg.foilim = [12 12]; > freqData = ft_freqanalysis(cfg,data); > > cfg = []; > cfg.grid.xgrid = 'auto'; cfg.grid.ygrid = 'auto';cfg.grid.zgrid = 'auto'; > cfg.resolution = 5; %units are mm > cfg.method = 'dics'; > cfg.dics.normalize = 'yes'; > cfg.headmodel = vol; %from loading 'standard_bem.mat' > cfg.elec = elec_aligned; %electrode coordinates (MNI) aligned to template head > sources = ft_sourceanalysis(cfg,freqData); > > cfg = []; > cfg.downsample = 2; > cfg.parameter = 'pow'; > sourcesInt = ft_sourceinterpolate(cfg,sources,mri); %mri from 'standard_mri.mat' in FT's templates > > cfg = []; > cfg.method = 'slice'; > cfg.parameter = 'pow; > ft_sourceplot(cfg,sourcesInt) > > > > > > -- > Alexander Nakhnikian, Ph.D. > Postdoctoral Fellow > Clinical Research Training Program > VA Boston Healthcare System > Harvard Medical School > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip From ha438 at georgetown.edu Fri Jun 10 14:57:19 2016 From: ha438 at georgetown.edu (Hassan Aleem) Date: Fri, 10 Jun 2016 08:57:19 -0400 Subject: [FieldTrip] simulated/sample data set for beamforming Message-ID: Hi all, I have a pipeline for beamforming but I am getting unexpected results from my own data, for the sake of sanity I wanted to run some simulated data to see what I get. I am looking to do a timelockanalysis with the LCMV method, so can't use the tutorial data. Would appreciate any help! Best, Hassan -------------- next part -------------- An HTML attachment was scrubbed... URL: From ariel.chang at yale.edu Fri Jun 10 19:57:24 2016 From: ariel.chang at yale.edu (Chang, Ariel) Date: Fri, 10 Jun 2016 17:57:24 +0000 Subject: [FieldTrip] Equating power spectral density Message-ID: <238AE44B-36EF-405D-89C8-4DA67FD1FAD6@yale.edu> Hi all, I don’t quite understand the effects of tapering for power estimates. I have resting data segmented into 2 second epochs. With the following parameters, could someone explain how to equate the data’s power spectral density back to it’s original spectral density (in the for loop)? cfg.method = 'mtmfft'; cfg.taper = 'dpss' cfg.polyremoval = 1; cfg.tapsmofrq = 1; cfg.foilim = [2 80]; cfg.pad= 100; data2 = eeglab2fieldtrip(EEG, 'preprocessing'); sizedat = size(EEG.data); for i = 1:sizedat(3) data2.trial{i} = data2.trial{i}*10; End [freq2] = ft_freqanalysis(cfg, data2); Thanks in advance! Best, Ariel -------------- next part -------------- An HTML attachment was scrubbed... URL: From alexander_nakhnikian at hms.harvard.edu Sat Jun 11 00:44:18 2016 From: alexander_nakhnikian at hms.harvard.edu (Alexander Nakhnikian) Date: Fri, 10 Jun 2016 18:44:18 -0400 Subject: [FieldTrip] Strange DICS Results In-Reply-To: <0E3F135B-285F-4E9A-ADAE-0800879FCC51@donders.ru.nl> References: <06b736d6-17ea-9f68-3c97-c0c8fb4fbb39@hms.harvard.edu> <0E3F135B-285F-4E9A-ADAE-0800879FCC51@donders.ru.nl> Message-ID: <49c2d60d-00f4-3d82-0d6d-ea2e1640fac0@hms.harvard.edu> Hi Jan-Mathijs, Thank you for your reply. Since I posted my original question on the forum, I tried applying eLORETA to the same data set and the sensor-level power localizes to the locations we expect given the scalp topography. Would the issues you discuss have the same effect on both localization methods or would beamformers be more susceptible to errors in the forward model? Best, Alexander On 6/10/16 5:27 AM, Schoffelen, J.M. (Jan Mathijs) wrote: > Hi Alex, > > From what you describe I think that your results are suffering from numerical issues in the forward model. Once a source location (grid point) is close to the innermost boundary of the BEM, funky things may happen with respect to the computed leadfield, which obviously has large consequences for the shape of the beamformer spatial filter at that location. Best thing would be verify that indeed your ‘absurd’ voxels are near the edges, and mask them out. > As a side note, typically volumetric DICS results in isolation (i.e using a single condition) are hard to interpret (even when using normalization). > > Best, > Jan-Mathijs > >> On 04 Jun 2016, at 00:03, Alexander Nakhnikian wrote: >> >> Hello all, >> >> I'm hitting a wall in my analysis trying to source-localize EEG data in a visual task. I'm trying to localize the 8 to 15 Hz power. >> >> Unfortunately, I don't have individual electrode coordinates or sMRIs so I've had to create an electrode coordinate file and manually align it with the scalp in FT's template head. I'm using the standard BEM as the head model and the standard MRI instead of individual structural scans. >> >> I'm able to get reasonable results from ft_freqanalysis; importantly, they match the scalp topography we see using other programs, such as IDL. >> >> The problem is that when I try to localize these data with DICS, I get absurd results. The source localized power exceeds 3000 at some locations and the maxima are in strange places, such as behind the eye socket and near the base of the skull. >> >> When I run ft_sourceinterpolate I get the following warning: >> >> Warning: could not reshape freq to the expected dimensions >>> In ft_datatype_volume (line 136) >> In ft_checkdata (line 329) >> In ft_sourceinterpolate (line 163) >> >> Otherwise, no errors or warning messages come up. I'm not sure what's causing the odd results. Am I not using the template files correctly? I've included analysis setup below. >> >> Thanks in advance, >> >> Alexander >> >> >> >> cfg = []; >> cfg.method = 'mtmfft'; >> cfg.output = 'powandcsd'; >> cfg.tapsmofrq = 4; >> cfg.foilim = [12 12]; >> freqData = ft_freqanalysis(cfg,data); >> >> cfg = []; >> cfg.grid.xgrid = 'auto'; cfg.grid.ygrid = 'auto';cfg.grid.zgrid = 'auto'; >> cfg.resolution = 5; %units are mm >> cfg.method = 'dics'; >> cfg.dics.normalize = 'yes'; >> cfg.headmodel = vol; %from loading 'standard_bem.mat' >> cfg.elec = elec_aligned; %electrode coordinates (MNI) aligned to template head >> sources = ft_sourceanalysis(cfg,freqData); >> >> cfg = []; >> cfg.downsample = 2; >> cfg.parameter = 'pow'; >> sourcesInt = ft_sourceinterpolate(cfg,sources,mri); %mri from 'standard_mri.mat' in FT's templates >> >> cfg = []; >> cfg.method = 'slice'; >> cfg.parameter = 'pow; >> ft_sourceplot(cfg,sourcesInt) >> >> >> >> >> >> -- >> Alexander Nakhnikian, Ph.D. >> Postdoctoral Fellow >> Clinical Research Training Program >> VA Boston Healthcare System >> Harvard Medical School >> >> _______________________________________________ >> fieldtrip mailing list >> fieldtrip at donders.ru.nl >> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -- Alexander Nakhnikian, Ph.D. Postdoctoral Fellow Clinical Research Training Program VA Boston Healthcare System Harvard Medical School From alexander_nakhnikian at hms.harvard.edu Sat Jun 11 19:38:32 2016 From: alexander_nakhnikian at hms.harvard.edu (Alexander Nakhnikian) Date: Sat, 11 Jun 2016 13:38:32 -0400 Subject: [FieldTrip] simulated/sample data set for beamforming In-Reply-To: References: Message-ID: <41ec6c01-246a-9b8a-3679-05e7f0e114ec@hms.harvard.edu> Hi Hassan, I also got some strange results from beamforming, although I was using DICS, not LCMV. I'm working with EEG data so I don't know if we're using the same recording setup. Jan-Mathijs suggested that there might be problems with the forward model that are influencing the shape of the beamformer. You can look at our exchange if it's still in your inbox. Regarding modeling, I think fieldtrip has programs to simulated sensors given a particular dipole distribution but I haven't used them. Another approach would be to save the leadfields and apply them to a simulated matrix of source-level oscillators. Set most of the "sources" to random noise and place sinusoids with a known frequency and high SNR at only a few locations (don't use identical oscillators for each source since beamformers lose spatial resolution for strongly correlated sources). I haven't tried this in fieldtrip, but I was able to do it with brainstorm and the "dipoles" showed up at the correct locations when I applied an inverse model to the simulated sensor data. Best, Alexander On 6/10/16 8:57 AM, Hassan Aleem wrote: > Hi all, > > I have a pipeline for beamforming but I am getting unexpected results > from my own data, for the sake of sanity I wanted to run some > simulated data to see what I get. I am looking to do a > timelockanalysis with the LCMV method, so can't use the tutorial data. > Would appreciate any help! > > Best, > > Hassan > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -- Alexander Nakhnikian, Ph.D. Postdoctoral Fellow Clinical Research Training Program VA Boston Healthcare System Harvard Medical School -------------- next part -------------- An HTML attachment was scrubbed... URL: From v.piai.research at gmail.com Sat Jun 11 20:50:32 2016 From: v.piai.research at gmail.com (=?UTF-8?Q?Vit=c3=b3ria_Piai?=) Date: Sat, 11 Jun 2016 20:50:32 +0200 Subject: [FieldTrip] help diagnosing issues with source analysis (pathological brain) Message-ID: <575C5D78.7030807@gmail.com> Hi everyone, I was hoping someone could help me figure out where my source analysis is going wrong. I have data on brain tumour patients (MRIs are from prior to tumour resection). From the hospital (using CTF), I receive .mri files that already have fiducial points saved as far as I was told. I then reslice and segment the .mri file, after reading it with ft_read_mri mri_reslice = ft_volumereslice([], mri); segmentedmri = ft_volumesegment([], mri_reslice); This seems to be working: Plotting headmodel and sensors, it looks like they are aligned: If I compute the source model with MNI-warping (non-linear transformation), I get something that doesn't seem right. I don't know if this is because these are not normal brains to start with: With linear transformation, things look better: One of my questions is what the consequences are of using linear transformation for the MNI warping given the pathological nature of these brains. Then, the next issue is this result when projecting the source to the surface: This happens regardless of whether I use the MNI-warped grid interpolated to the MNI template, or the patient's individual grid skipping the MNI normalisation step, interpolated to the patient's own T1. But if I plot with 'ortho' method, then I see that the MNI-warped and interpolated source data is misaligned, but the patient-native space one isn't. I can't make sense of this anymore; I've been trying all kinds of things that don't work, so I was wondering whether anyone has an idea of what could be going on by looking at these figures. Is it an error already at the level of alignment of the fiducials? Or is it due to the MNI-warping? Or a combination of issues? Thanks very much for any kind of help! Vitoria -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: bfejiccb.png Type: image/png Size: 75399 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: jidhfdhd.png Type: image/png Size: 4722 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: ebfighdf.png Type: image/png Size: 9956 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: ehffjdea.png Type: image/png Size: 10561 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: dffeehgc.png Type: image/png Size: 274137 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: dcigdbdi.png Type: image/png Size: 150070 bytes Desc: not available URL: From michelic72 at gmail.com Sun Jun 12 13:55:42 2016 From: michelic72 at gmail.com (Cristiano Micheli) Date: Sun, 12 Jun 2016 13:55:42 +0200 Subject: [FieldTrip] help diagnosing issues with source analysis (pathological brain) In-Reply-To: <575C5D78.7030807@gmail.com> References: <575C5D78.7030807@gmail.com> Message-ID: Dear Vitoria I had the same problem when I tried to coregister functional and anatomical data without transitioning through a head-referenced coordinates system. I solved the problem by using ft_volumerealign and selecting comparable anatomical fiducials for different subjects (nasion, left, right,..) BEFORE volume normalization. Maybe a hint towards the solution? Cheers Cris On Sat, Jun 11, 2016 at 8:50 PM, Vitória Piai wrote: > Hi everyone, > > I was hoping someone could help me figure out where my source analysis is > going wrong. > I have data on brain tumour patients (MRIs are from prior to tumour > resection). From the hospital (using CTF), I receive .mri files that > already have fiducial points saved as far as I was told. I then reslice and > segment the .mri file, after reading it with ft_read_mri > mri_reslice = ft_volumereslice([], mri); > segmentedmri = ft_volumesegment([], mri_reslice); > This seems to be working: > > > Plotting headmodel and sensors, it looks like they are aligned: > > If I compute the source model with MNI-warping (non-linear > transformation), I get something that doesn't seem right. I don't know if > this is because these are not normal brains to start with: > > With linear transformation, things look better: > > One of my questions is what the consequences are of using linear > transformation for the MNI warping given the pathological nature of these > brains. > > Then, the next issue is this result when projecting the source to the > surface: > > This happens regardless of whether I use the MNI-warped grid interpolated > to the MNI template, or the patient's individual grid skipping the MNI > normalisation step, interpolated to the patient's own T1. > But if I plot with 'ortho' method, then I see that the MNI-warped and > interpolated source data is misaligned, but the patient-native space one > isn't. > > > I can't make sense of this anymore; I've been trying all kinds of things > that don't work, so I was wondering whether anyone has an idea of what > could be going on by looking at these figures. Is it an error already at > the level of alignment of the fiducials? Or is it due to the MNI-warping? > Or a combination of issues? > > Thanks very much for any kind of help! > Vitoria > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: dcigdbdi.png Type: image/png Size: 150070 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: ehffjdea.png Type: image/png Size: 10561 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: dffeehgc.png Type: image/png Size: 274137 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: jidhfdhd.png Type: image/png Size: 4722 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: ebfighdf.png Type: image/png Size: 9956 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: bfejiccb.png Type: image/png Size: 75399 bytes Desc: not available URL: From sauer.mpih at googlemail.com Sun Jun 12 20:24:17 2016 From: sauer.mpih at googlemail.com (Andreas Sauer) Date: Sun, 12 Jun 2016 20:24:17 +0200 Subject: [FieldTrip] Coordsys issue ft_sourceplot Message-ID: Dear all, after having calculated the sources of a MMN paradigm (4D-system), I’d like to plot the results on one of the anatomy template files in the fieldtrip directory (single_subj_T1_1mm.nii) or alternatively on a MNI T1 template file (mni_icbm152_t1_tal_nlin_sym_09a.nii). Unfortunately, this is not working well… As you can see on the attached picture, the functional data is rotated by 90 degrees. I guess that something gets mixed because of the different coordsystems of functional and anatomical data. The functional data is 4D, which means ALS orientation. The anatomical is MNI, so RAS orientation. The plotting works fine, if I use a mri file which was converted in field trip (V2.mri) and therefore is also in ALS orientation. However, the anatomy doesn’t look very pretty… Is there any way that I can transform the functional data to RAS orientation or the anatomical data to ALS orientation, respectively? I tried with ft_volumerealign. However, since the template file has no fiducials, it is hard to really precisely do this. Any input on how to plot the sources on one of these nice anatomical files is highly appreciated! Thanks and best regards, Andreas -- Dipl.-Psych. Andreas Sauer Max Planck Institute for Brain Research Deutschordenstraße 46 60528 Frankfurt am Main Germany T: +49 69 96769 278 F: +49 69 96769 327 Email: sauer.mpih at gmail.com www.brain.mpg.de -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: Rotated_Source.png Type: image/png Size: 498781 bytes Desc: not available URL: From v.piai.research at gmail.com Mon Jun 13 11:02:11 2016 From: v.piai.research at gmail.com (Vitoria Piai) Date: Mon, 13 Jun 2016 11:02:11 +0200 Subject: [FieldTrip] help diagnosing issues with source analysis (pathological brain) In-Reply-To: References: <575C5D78.7030807@gmail.com> Message-ID: Hi Cris, that makes sense, except that the .mri file I'm getting from the hospital should already contain the right fiducial coordinates (or so I was told by the MEG technician). Maybe the issue is that FieldTrip is not getting these coordinates right from the .mri file if I don't run it through ft_volumerealign first. Any thoughts anyone? Thanks again On 12 June 2016 at 13:55, Cristiano Micheli wrote: > Dear Vitoria > > I had the same problem when I tried to coregister functional and > anatomical data without transitioning through a head-referenced coordinates > system. > I solved the problem by using ft_volumerealign and selecting comparable > anatomical fiducials for different subjects (nasion, left, right,..) BEFORE > volume normalization. > > Maybe a hint towards the solution? > > Cheers > Cris > > > On Sat, Jun 11, 2016 at 8:50 PM, Vitória Piai > wrote: > >> Hi everyone, >> >> I was hoping someone could help me figure out where my source analysis is >> going wrong. >> I have data on brain tumour patients (MRIs are from prior to tumour >> resection). From the hospital (using CTF), I receive .mri files that >> already have fiducial points saved as far as I was told. I then reslice and >> segment the .mri file, after reading it with ft_read_mri >> mri_reslice = ft_volumereslice([], mri); >> segmentedmri = ft_volumesegment([], mri_reslice); >> This seems to be working: >> >> >> Plotting headmodel and sensors, it looks like they are aligned: >> >> If I compute the source model with MNI-warping (non-linear >> transformation), I get something that doesn't seem right. I don't know if >> this is because these are not normal brains to start with: >> >> With linear transformation, things look better: >> >> One of my questions is what the consequences are of using linear >> transformation for the MNI warping given the pathological nature of these >> brains. >> >> Then, the next issue is this result when projecting the source to the >> surface: >> >> This happens regardless of whether I use the MNI-warped grid interpolated >> to the MNI template, or the patient's individual grid skipping the MNI >> normalisation step, interpolated to the patient's own T1. >> But if I plot with 'ortho' method, then I see that the MNI-warped and >> interpolated source data is misaligned, but the patient-native space one >> isn't. >> >> >> I can't make sense of this anymore; I've been trying all kinds of things >> that don't work, so I was wondering whether anyone has an idea of what >> could be going on by looking at these figures. Is it an error already at >> the level of alignment of the fiducials? Or is it due to the MNI-warping? >> Or a combination of issues? >> >> Thanks very much for any kind of help! >> Vitoria >> >> _______________________________________________ >> fieldtrip mailing list >> fieldtrip at donders.ru.nl >> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip >> > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: jidhfdhd.png Type: image/png Size: 4722 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: ebfighdf.png Type: image/png Size: 9956 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: bfejiccb.png Type: image/png Size: 75399 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: dffeehgc.png Type: image/png Size: 274137 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: dcigdbdi.png Type: image/png Size: 150070 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: ehffjdea.png Type: image/png Size: 10561 bytes Desc: not available URL: From hibafouani123 at hotmail.com Mon Jun 13 18:32:06 2016 From: hibafouani123 at hotmail.com (hiba fouani) Date: Mon, 13 Jun 2016 16:32:06 +0000 Subject: [FieldTrip] ROC CURVE In-Reply-To: References: Message-ID: Dear fieldtriper, How can I plot the ROC curve if I want to compare different inverse problems? if dipole is active or not. what should be the threshold? I have the simulated and estimated data on the mesh as an input thank you > From: fieldtrip-request at science.ru.nl > Subject: fieldtrip Digest, Vol 67, Issue 12 > To: fieldtrip at science.ru.nl > Date: Mon, 13 Jun 2016 11:10:44 +0200 > > Send fieldtrip mailing list submissions to > fieldtrip at science.ru.nl > > To subscribe or unsubscribe via the World Wide Web, visit > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > or, via email, send a message with subject or body 'help' to > fieldtrip-request at science.ru.nl > > You can reach the person managing the list at > fieldtrip-owner at science.ru.nl > > When replying, please edit your Subject line so it is more specific > than "Re: Contents of fieldtrip digest..." > > > Today's Topics: > > 1. Re: help diagnosing issues with source analysis (pathological > brain) (Vitoria Piai) > > > ---------------------------------------------------------------------- > > Message: 1 > Date: Mon, 13 Jun 2016 11:02:11 +0200 > From: Vitoria Piai > To: FieldTrip discussion list > Subject: Re: [FieldTrip] help diagnosing issues with source analysis > (pathological brain) > Message-ID: > > Content-Type: text/plain; charset="utf-8" > > Hi Cris, > > that makes sense, except that the .mri file I'm getting from the hospital > should already contain the right fiducial coordinates (or so I was told by > the MEG technician). Maybe the issue is that FieldTrip is not getting these > coordinates right from the .mri file if I don't run it through > ft_volumerealign first. > Any thoughts anyone? > > Thanks again > > On 12 June 2016 at 13:55, Cristiano Micheli wrote: > > > Dear Vitoria > > > > I had the same problem when I tried to coregister functional and > > anatomical data without transitioning through a head-referenced coordinates > > system. > > I solved the problem by using ft_volumerealign and selecting comparable > > anatomical fiducials for different subjects (nasion, left, right,..) BEFORE > > volume normalization. > > > > Maybe a hint towards the solution? > > > > Cheers > > Cris > > > > > > On Sat, Jun 11, 2016 at 8:50 PM, Vit?ria Piai > > wrote: > > > >> Hi everyone, > >> > >> I was hoping someone could help me figure out where my source analysis is > >> going wrong. > >> I have data on brain tumour patients (MRIs are from prior to tumour > >> resection). From the hospital (using CTF), I receive .mri files that > >> already have fiducial points saved as far as I was told. I then reslice and > >> segment the .mri file, after reading it with ft_read_mri > >> mri_reslice = ft_volumereslice([], mri); > >> segmentedmri = ft_volumesegment([], mri_reslice); > >> This seems to be working: > >> > >> > >> Plotting headmodel and sensors, it looks like they are aligned: > >> > >> If I compute the source model with MNI-warping (non-linear > >> transformation), I get something that doesn't seem right. I don't know if > >> this is because these are not normal brains to start with: > >> > >> With linear transformation, things look better: > >> > >> One of my questions is what the consequences are of using linear > >> transformation for the MNI warping given the pathological nature of these > >> brains. > >> > >> Then, the next issue is this result when projecting the source to the > >> surface: > >> > >> This happens regardless of whether I use the MNI-warped grid interpolated > >> to the MNI template, or the patient's individual grid skipping the MNI > >> normalisation step, interpolated to the patient's own T1. > >> But if I plot with 'ortho' method, then I see that the MNI-warped and > >> interpolated source data is misaligned, but the patient-native space one > >> isn't. > >> > >> > >> I can't make sense of this anymore; I've been trying all kinds of things > >> that don't work, so I was wondering whether anyone has an idea of what > >> could be going on by looking at these figures. Is it an error already at > >> the level of alignment of the fiducials? Or is it due to the MNI-warping? > >> Or a combination of issues? > >> > >> Thanks very much for any kind of help! > >> Vitoria > >> > >> _______________________________________________ > >> fieldtrip mailing list > >> fieldtrip at donders.ru.nl > >> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > >> > > > > > > _______________________________________________ > > fieldtrip mailing list > > fieldtrip at donders.ru.nl > > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > > -------------- next part -------------- > An HTML attachment was scrubbed... > URL: > -------------- next part -------------- > A non-text attachment was scrubbed... > Name: jidhfdhd.png > Type: image/png > Size: 4722 bytes > Desc: not available > URL: > -------------- next part -------------- > A non-text attachment was scrubbed... > Name: ebfighdf.png > Type: image/png > Size: 9956 bytes > Desc: not available > URL: > -------------- next part -------------- > A non-text attachment was scrubbed... > Name: bfejiccb.png > Type: image/png > Size: 75399 bytes > Desc: not available > URL: > -------------- next part -------------- > A non-text attachment was scrubbed... > Name: dffeehgc.png > Type: image/png > Size: 274137 bytes > Desc: not available > URL: > -------------- next part -------------- > A non-text attachment was scrubbed... > Name: dcigdbdi.png > Type: image/png > Size: 150070 bytes > Desc: not available > URL: > -------------- next part -------------- > A non-text attachment was scrubbed... > Name: ehffjdea.png > Type: image/png > Size: 10561 bytes > Desc: not available > URL: > > ------------------------------ > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > End of fieldtrip Digest, Vol 67, Issue 12 > ***************************************** -------------- next part -------------- An HTML attachment was scrubbed... URL: From rgilley at deakin.edu.au Tue Jun 14 06:13:30 2016 From: rgilley at deakin.edu.au (RYAN GILLEY) Date: Tue, 14 Jun 2016 04:13:30 +0000 Subject: [FieldTrip] SEP Recording Message-ID: Hi Everyone, This is not a straight forward question for Fieldtrip but with the experience in the group I figured it would be good to ask. Currently I am using a Neuroscan 64 channel EEG system to acquire sensory evoked potential (SEP) data. I am administering TTL pulses from an external system (Digitimer DS7a) run through Powerlab 26T using Labchart's event manager to generate the stimulations. My goal is to attempt to localize a couple of the Somatosensory peaks. My problem at the moment is that on my recording the marker (spike 1) and the stimulus artifact show up as displayed below. I have found that the time interval is inconsistent and because of this I am having trouble aligning the stimulus artifact to average. Is there another way of configuring this so that it works more efficiently or if anyone has used these tools (digitimer and powerlab) with the neuroscan system before, is there any advice anyone can give. Thanks in advance, Ryan [cid:image001.png at 01D1C62E.10DD7840] -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image001.png Type: image/png Size: 70148 bytes Desc: image001.png URL: From jan.schoffelen at donders.ru.nl Tue Jun 14 09:31:34 2016 From: jan.schoffelen at donders.ru.nl (Schoffelen, J.M. (Jan Mathijs)) Date: Tue, 14 Jun 2016 07:31:34 +0000 Subject: [FieldTrip] help diagnosing issues with source analysis (pathological brain) In-Reply-To: References: <575C5D78.7030807@gmail.com> Message-ID: <5F2CACF1-340B-4514-8B1B-8F477EC8FA9C@donders.ru.nl> Hi Vitória, To me it looks as if most of the stuff you describe works as expected, i.e. it works well or it gives funny results, apart from the non-linear normalisation. The extremely distorted warped grid points may be due to the patient’s anatomical being pathological, causing the normalisation to converge to a very strange solution. Now, with respect to the plotting/interpolation: if the coordinate systems of the objects you are overlaying don’t match, you get funny results. This is the case for the sourceplot with the surface method (where the default cortical surface is in MNI-RAS), and your functional image is in CTF’s ALS, as well as for the sourceplot with the ortho method, using the blurry template from SPM (which is also in MNI-RAS). If you want these to match up, you could replace the source positions in your functional image with the ones from the standard grid, because you assume topological equivalence as per the inverse warping strategy applied in the creation of the beamformer grid. So, long story short: it seems that your source analysis just went fine, but you are confused by the different coordinate systems. Best, JM On 13 Jun 2016, at 11:02, Vitoria Piai > wrote: Hi Cris, that makes sense, except that the .mri file I'm getting from the hospital should already contain the right fiducial coordinates (or so I was told by the MEG technician). Maybe the issue is that FieldTrip is not getting these coordinates right from the .mri file if I don't run it through ft_volumerealign first. Any thoughts anyone? Thanks again On 12 June 2016 at 13:55, Cristiano Micheli > wrote: Dear Vitoria I had the same problem when I tried to coregister functional and anatomical data without transitioning through a head-referenced coordinates system. I solved the problem by using ft_volumerealign and selecting comparable anatomical fiducials for different subjects (nasion, left, right,..) BEFORE volume normalization. Maybe a hint towards the solution? Cheers Cris On Sat, Jun 11, 2016 at 8:50 PM, Vitória Piai > wrote: Hi everyone, I was hoping someone could help me figure out where my source analysis is going wrong. I have data on brain tumour patients (MRIs are from prior to tumour resection). From the hospital (using CTF), I receive .mri files that already have fiducial points saved as far as I was told. I then reslice and segment the .mri file, after reading it with ft_read_mri mri_reslice = ft_volumereslice([], mri); segmentedmri = ft_volumesegment([], mri_reslice); This seems to be working: Plotting headmodel and sensors, it looks like they are aligned: If I compute the source model with MNI-warping (non-linear transformation), I get something that doesn't seem right. I don't know if this is because these are not normal brains to start with: With linear transformation, things look better: One of my questions is what the consequences are of using linear transformation for the MNI warping given the pathological nature of these brains. Then, the next issue is this result when projecting the source to the surface: This happens regardless of whether I use the MNI-warped grid interpolated to the MNI template, or the patient's individual grid skipping the MNI normalisation step, interpolated to the patient's own T1. But if I plot with 'ortho' method, then I see that the MNI-warped and interpolated source data is misaligned, but the patient-native space one isn't. I can't make sense of this anymore; I've been trying all kinds of things that don't work, so I was wondering whether anyone has an idea of what could be going on by looking at these figures. Is it an error already at the level of alignment of the fiducials? Or is it due to the MNI-warping? Or a combination of issues? Thanks very much for any kind of help! Vitoria _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -------------- next part -------------- An HTML attachment was scrubbed... URL: From jan.schoffelen at donders.ru.nl Tue Jun 14 09:41:21 2016 From: jan.schoffelen at donders.ru.nl (Schoffelen, J.M. (Jan Mathijs)) Date: Tue, 14 Jun 2016 07:41:21 +0000 Subject: [FieldTrip] Coordsys issue ft_sourceplot In-Reply-To: References: Message-ID: <21D48954-7881-45FF-B596-9F03F618A839@donders.ru.nl> Dear Andreas, after having calculated the sources of a MMN paradigm (4D-system), I’d like to plot the results on one of the anatomy template files in the fieldtrip directory (single_subj_T1_1mm.nii) or alternatively on a MNI T1 template file (mni_icbm152_t1_tal_nlin_sym_09a.nii). Unfortunately, this is not working well… As you can see on the attached picture, the functional data is rotated by 90 degrees. I guess that something gets mixed because of the different coordsystems of functional and anatomical data. The functional data is 4D, which means ALS orientation. The anatomical is MNI, so RAS orientation. The plotting works fine, if I use a mri file which was converted in field trip (V2.mri) and therefore is also in ALS orientation. However, the anatomy doesn’t look very pretty… Is there any way that I can transform the functional data to RAS orientation or the anatomical data to ALS orientation, respectively? I tried with ft_volumerealign. However, since the template file has no fiducials, it is hard to really precisely do this. Fair point. I would however do it the other way around, using the V2 to get the transformation from voxel space to MNI-RAS, and then use the inverse of the transformation on the functional data: in this case you could use ft_volumenormalise, with cfg.nonlinear = ‘no’. Alternatively, if you are using this procedure: http://www.fieldtriptoolbox.org/tutorial/sourcemodel#subject-specific_grids_that_are_equivalent_across_subjects_in_normalized_space, you could directly replace the source.pos of your functional data with the template.pos and then do the interpolation. To summarize: either: mri = ft_read_mri(‘V2.mri’); mri.coordsys = ‘bti’; cfg = []; cfg.nonlinear=’no’; mrin = ft_volumenormalise(cfg, mri); transform_vox2bti = mri.transform; transform_vox2spm = mrin.transform; transform_bti2spm = transform_vox2spm/transform_vox2bti source = ft_transform_geometry(transform_bti2spm, source); source_int = ft_sourceinterpolate(somecfg, source, niceanatomical); or: source.pos = templat.pos; source_int = ft_sourceinterpolate(somecfg, source, niceanatomical); Best, JM Any input on how to plot the sources on one of these nice anatomical files is highly appreciated! Thanks and best regards, Andreas -- Dipl.-Psych. Andreas Sauer Max Planck Institute for Brain Research Deutschordenstraße 46 60528 Frankfurt am Main Germany T: +49 69 96769 278 F: +49 69 96769 327 Email: sauer.mpih at gmail.com www.brain.mpg.de _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -------------- next part -------------- An HTML attachment was scrubbed... URL: From rikkert.hindriks at upf.edu Tue Jun 14 11:44:55 2016 From: rikkert.hindriks at upf.edu (HINDRIKS, RIKKERT) Date: Tue, 14 Jun 2016 11:44:55 +0200 Subject: [FieldTrip] Noise normalization of MNE Message-ID: Dear all, I'm having trouble interpreting the statistical parametric maps obtained from MNE source reconstructions using the method described in (Dale, 2000) . The issue is the following: For each source location (assume the dipole orientations fixed) the noise normalized activity estimate at that location is (approximately) standard normally distributed under the null hypothesis of no activity at all locations. However, I would like to test for activity at a specific location, but under the hypothesis of activity at a specific location, the normalized estimate at that location is only standard normally distributed if the corresponding row of the resolution matrix contains a single non-zero entry. In other words: it seems to me that the statistical parametric map can only be used to test for activity at individual locations if the source reconstruction is unbiased (or equivalently: if the resolution matrix equals the identity matrix) which is not the case in general. It would be very helpful if someone could help me clarifying this. Kind regards, Rikkert -------------- next part -------------- An HTML attachment was scrubbed... URL: From pgoodin at swin.edu.au Tue Jun 14 13:30:00 2016 From: pgoodin at swin.edu.au (Peter Goodin) Date: Tue, 14 Jun 2016 11:30:00 +0000 Subject: [FieldTrip] Why use LCMV + Hilbert envelope vs. DICS? Message-ID: Hi Fieldtrip list, Please excuse a possibly silly question, but I'm hoping someone can explain what difference occurs using DICS vs. LCMV + narrow band filter + hilbert envelope + mean amplitude over time (eg. Brookes et al., 2011)? I notice the latter is the preferred method for functional connectivity using MEG, but as far as I understand it, wouldn't the two produce a comparable result? Are there occasions where one is better than the other? Thanks, Peter _______________________ Dr Peter Goodin, Brain and Psychological Sciences Research Centre (BPsyC) Swinburne University, Hawthorn, Vic, 3122 From pgoodin at swin.edu.au Tue Jun 14 13:30:07 2016 From: pgoodin at swin.edu.au (Peter Goodin) Date: Tue, 14 Jun 2016 11:30:07 +0000 Subject: [FieldTrip] Why use LCMV + Hilbert envelope vs. DICS? Message-ID: Hi Fieldtrip list, Please excuse a possibly silly question, but I'm hoping someone can explain what difference occurs using DICS vs. LCMV + narrow band filter + hilbert envelope + mean amplitude over time (eg. Brookes et al., 2011)? I notice the latter is the preferred method for functional connectivity using MEG, but as far as I understand it, wouldn't the two produce a comparable result? Are there occasions where one is better than the other? Thanks, Peter _______________________ Dr Peter Goodin, Brain and Psychological Sciences Research Centre (BPsyC) Swinburne University, Hawthorn, Vic, 3122 From Claudio.Georgii at stud.sbg.ac.at Tue Jun 14 14:14:47 2016 From: Claudio.Georgii at stud.sbg.ac.at (Claudio Georgii) Date: Tue, 14 Jun 2016 14:14:47 +0200 Subject: [FieldTrip] Memory saving in ft_frequanalysis Message-ID: Hi fieldtrip list, we recently ran into some memory issues using the cfg.output = 'powandcsd' option in ft_frequanalysis. We solved the issue by: (1) changing the following line of code (ft_freqanalysis; line 573-574: if csdflg, crsspctrm = complex(nan(ntrials,nchancmb,nfoi,ntoi,cfg.precision),nan(ntrials,nchancmb,nfoi,ntoi,cfg.precision)); end into if csdflg, crsspctrm = nan+nan(ntrials,nchancmb,nfoi,ntoi,cfg.precision)*1i; end and accordingly, if fftflg, fourierspctrm = complex(nan(ntrials,nchan,nfoi,ntoi,cfg.precision),nan(ntrials,nchan,nfoi,ntoi,cfg.precision)); end into if fftflg, fourierspctrm = nan+nan(ntrials,nchan,nfoi,ntoi,cfg.precision)*1i; end (2) defining cfg.precision as 'single' This two procedures saves a huge amount of memory (~ the order of 4). Now, we wanted to ask, whether these changes/adaptions are okay and do not lead to spurious results? Is there a reason on performing wavelet convolution on double instead of single precision? Thank you in advance. Best, Claudio Georgii -- Claudio Georgii, MSc. Phd student University of Salzburg - Department of Psychology Eating Behavior Laboratory Hellbrunnerstraße 34 5020 Salzburg - Austria Phone: 0043- (0)662 8044 5164 E-Mail: claudio.georgii at sbg.ac.at -------------- next part -------------- An HTML attachment was scrubbed... URL: From nicholas.balderston at nih.gov Tue Jun 14 17:14:11 2016 From: nicholas.balderston at nih.gov (Balderston, Nicholas (NIH/NIMH) [F]) Date: Tue, 14 Jun 2016 15:14:11 +0000 Subject: [FieldTrip] SEP Recording In-Reply-To: References: Message-ID: Hey Ryan, I am not sure that I understand your problem completely, so this solution might not be that helpful. That being said, the DS7A has a BNC out port on the back of the unit, which sends its own TTL pulses whenever it delivers a stimulation. If you can add this as a channel in your recordings, it may give you more accurate timing information. -nick ________________________________ From: RYAN GILLEY [rgilley at deakin.edu.au] Sent: Tuesday, June 14, 2016 12:13 AM To: fieldtrip at tortel.science.ru.nl Subject: [FieldTrip] SEP Recording Hi Everyone, This is not a straight forward question for Fieldtrip but with the experience in the group I figured it would be good to ask. Currently I am using a Neuroscan 64 channel EEG system to acquire sensory evoked potential (SEP) data. I am administering TTL pulses from an external system (Digitimer DS7a) run through Powerlab 26T using Labchart’s event manager to generate the stimulations. My goal is to attempt to localize a couple of the Somatosensory peaks. My problem at the moment is that on my recording the marker (spike 1) and the stimulus artifact show up as displayed below. I have found that the time interval is inconsistent and because of this I am having trouble aligning the stimulus artifact to average. Is there another way of configuring this so that it works more efficiently or if anyone has used these tools (digitimer and powerlab) with the neuroscan system before, is there any advice anyone can give. Thanks in advance, Ryan [cid:image001.png at 01D1C62E.10DD7840] -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image001.png Type: image/png Size: 70148 bytes Desc: image001.png URL: From joerg.hipp at googlemail.com Tue Jun 14 20:39:23 2016 From: joerg.hipp at googlemail.com (Joerg Hipp) Date: Tue, 14 Jun 2016 20:39:23 +0200 Subject: [FieldTrip] 9-month internship developing EEG biomarker at Roche, Basel Message-ID: Dear all, we are offering a 9-month internship in our biomarker group at Roche, Basel. Our group supports preclinical and clinical neuroscience projects within Roche with various biomarker techniques including EEG/MEG, PET, MRI, and neuropsychology. We are looking for a highly motivated person to help develop EEG biomarkers of syndromic forms of autism spectrum disorder. The internship additionally offers a unique opportunity to gain insights into research in the pharmaceutical industry setting. The PhD salary and living expenses will be compensated. Application criteria: - PhD student / medical student interested in exploring the electrophysiological substrate of neurodevelopmental disorders (the candidate should be enrolled in either a natural science PhD or medical program at the time of the application) - Experienced in the analysis of EEG and/or MEG data - Strong statistical and programming skills (preferably MATLAB) Details on the project and application – click here Details on the RiSE program (Roche Internships for Scientific Exchange) – click here Overview of Roche neuroscience activities – click here The project will be supervised by Pilar Garces and myself . Best wishes, Joerg -- Joerg Hipp, PhD Biomarker and Experimental Medicine Leader F. Hoffmann-La Roche Ltd. Grenzacherstrasse 124 4070 Basel, Switzerland Email: joerg.hipp at roche.com -------------- next part -------------- An HTML attachment was scrubbed... URL: From anne.urai at gmail.com Wed Jun 15 11:03:04 2016 From: anne.urai at gmail.com (Anne Urai) Date: Wed, 15 Jun 2016 11:03:04 +0200 Subject: [FieldTrip] running FT scripts in a supercomputing cluster In-Reply-To: References: Message-ID: Hi Jose, I ran into similar dependencies issues when compiling fieldtrip, and converged on the following: % these paths will be added at compilation addpath(genpath('~/code/Tools')); addpath('~/Documents/fieldtrip'); ft_defaults; % add everything to path that we need addpath('~/Documents/fieldtrip/qsub'); addpath(genpath('~/Documents/fieldtrip/template/')); % neighbouring matfile if strcmp(fname, 'B3a_clusterStatsERF.m') || strcmp(fname, 'B3b_clusterStatsTFR.m'), addpath('~/Documents/fieldtrip/statfun/'); % need the combineClusters mex file addpath('~/Documents/fieldtrip/external/spm8/'); % for neighbour definition % http://mailman.science.ru.nl/pipermail/fieldtrip/2014-July/008238.html end % options: compile verbose, only use the toolboxes we really need % !!! runtime options should be preceded by - to work! % dont need to activate the -nojvm flag, can still plot from executable if strcmp(fname, 'B3a_clusterStatsERF.m') || strcmp(fname, 'B3b_clusterStatsTFR.m'), % statfun is called with a weird eval construction, so not recognized % by the dependency analysis of mcc mcc('-mv', '-N', '-p', 'stats', '-p', 'images', '-p', 'signal', ... '-R', '-nodisplay', '-R', '-singleCompThread', ... '-a', '~/Documents/fieldtrip/ft_statistics_montecarlo.m', ... '-a', '~/Documents/fieldtrip/statfun/ft_statfun_depsamplesT.m', ... fname); else % no need to specify additional files mcc('-mv', '-N', '-p', 'stats', '-p', 'images', '-p', 'signal', ... '-R', '-nodisplay', '-R', '-singleCompThread', ... fname); end So, the trick is to add everything to your path before comping, and then use the -N option and define specific folders and possible functions using -a. Make sure to only include additional subfolders from Fieldtrip (such as the templates folder) only if you need them, for including them will increase the size of the executable considerably. Also, some functions like the ft_statistics ones are not directly called but instead evaluated using statmethod = str2func(['ft_statistics_' cfg.method]) - this causes the dependency analysis of the compiler to skip those functions, so you'll have to add them manually. PS a similar setup should work directly from the command line mcc, but I found it easier to run ft_defaults from Matlab and then compile from within a Matlab script. Hope this helps! — Anne E. Urai, MSc PhD student | Institut für Neurophysiologie und Pathophysiologie Universitätsklinikum Hamburg-Eppendorf | Martinistrasse 52, 20246 | Hamburg, Germany www.anneurai.net / @AnneEUrai On 10 June 2016 at 10:42, Jose wrote: > dear list, > > I'm trying to analyse CTF MEG data through the Flemish Supercomputer > Centre, > I did a matlab script to run the foremost FT functions in my pipeline > (ft_read_event, read_ctf_cls, and ft_preprocessing). This script works well > when I run it locally. To compile my function in the supercomputing cluster > I initially used addpath to include FT and ft_defaults to set the > configuration inside my script, but this wasn't working. I tried using a > startup.m script but this doesn't work neither. Maybe I'm missing > something? My bash script to compile looks like this: > > #!/bin/bash > module load MATLAB/2013b > FTDIR=$VSC_DATA_VO_USER/fieldtrip-20160317 > mcc -mv FT_0.m > > I also tried mcc -mv FT_0.m -I $FTDIR > I run my compilation in the same folder where I have the FT folder. > When I run my bash job I get always the same error: Undefined function > 'ft_read_event' for input arguments of type 'char'. > > I've been looking elsewhere but still I haven't find a solution, > > Any hints about this would really appreciated, > best, > Jose > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > -------------- next part -------------- An HTML attachment was scrubbed... URL: From sauer.mpih at googlemail.com Wed Jun 15 14:31:49 2016 From: sauer.mpih at googlemail.com (Andreas Sauer) Date: Wed, 15 Jun 2016 14:31:49 +0200 Subject: [FieldTrip] Coordsys issue ft_sourceplot In-Reply-To: <21D48954-7881-45FF-B596-9F03F618A839@donders.ru.nl> References: <21D48954-7881-45FF-B596-9F03F618A839@donders.ru.nl> Message-ID: Dear Jan, thank you for your email and the example code! I tried both ways to convert the coord systems, but unfortunately it still doesn't work. Since I used the tutorial procedure to create my sourcemodel ( http://www.fieldtriptoolbox.org/tutorial/sourcemodel#subject-specific_grids_that_are_equivalent_across_subjects_in_normalized_space) I tried first with the easy way of only replacing the .pos field. But the plots don't change, the sources are still rotated by 90 degrees. Actually, the .pos fields are already the same before replacing it (see pic). Is there some error in my code? *% Step1: Load mri file* *mri = ft_read_mri('/data/home1/asauer/Projects/RPScZ/Analysis/Beamforming/MRI/HSM12_V2.mri');* *% Step 2: Segment the template brain and construct a volume conduction* *% model (i.e. head model): this is needed for the inside/outside detection of voxels* *cfg = [];* *cfg.output = 'brain';* *segmentedmri = ft_volumesegment(cfg,anatomy);* *cfg = [];* *cfg.method = 'singleshell';* *vol = ft_prepare_headmodel(cfg,segmentedmri);* *vol = ft_convert_units(vol,'m');* *figure; ft_plot_sens(sens,'style','*b'); hold on; ft_plot_vol(vol)* *% Step 3: Load sourcemodel * *load(fullfile(ft_path,'template/sourcemodel/standard_sourcemodel3d5mm'));* *template_grid = sourcemodel;* *clear sourcemodel* *% Step 4: Make sourcemodel* *cfg = [];* *cfg.grid.warpmni = 'yes';* *cfg.grid.template = template_grid;* *cfg.grid.nonlinear = 'yes';* *cfg.mri = mri;* *cfg.grid.unit = 'm';* *grid = ft_prepare_sourcemodel(cfg);* *figure; hold on;* *ft_plot_vol(vol,'facecolor','cortex','edgecolor','none'); alpha 0.5; camlight;* *ft_plot_mesh(grid.pos(grid.inside,:));* The only thing that is different from the tutorial is the unit conversion... After that I tried the transformation. All worked well until the source interpolation. ft_sourceinterpolation throws this error: *Attempted to access sel(1); index out of bounds because numel(sel)=0.* *Error in ft_sourceinterpolate>my_interpn (line 508)* * ft_progress(sel(1)/num, 'interpolating %.1f%%\n', 100*sel(1)/num);* *Error in ft_sourceinterpolate (line 393)* * interp.inside( sel) = my_interpn(double(functional.inside), ax(sel), ay(sel), az(sel), 'nearest', cfg.feedback);* which, to be honest, I don't really understand. Sorry... Best wishes, Andreas 2016-06-14 9:41 GMT+02:00 Schoffelen, J.M. (Jan Mathijs) < jan.schoffelen at donders.ru.nl>: > Dear Andreas, > > after having calculated the sources of a MMN paradigm (4D-system), I’d > like to plot the results on one of the anatomy template files in the > fieldtrip directory (single_subj_T1_1mm.nii) or alternatively on a MNI T1 > template file (mni_icbm152_t1_tal_nlin_sym_09a.nii). Unfortunately, this is > not working well… As you can see on the attached picture, the functional > data is rotated by 90 degrees. > > I guess that something gets mixed because of the different coordsystems of > functional and anatomical data. The functional data is 4D, which means ALS > orientation. The anatomical is MNI, so RAS orientation. The plotting works > fine, if I use a mri file which was converted in field trip (V2.mri) and > therefore is also in ALS orientation. However, the anatomy doesn’t look > very pretty… > > > Is there any way that I can transform the functional data to RAS > orientation or the anatomical data to ALS orientation, respectively? > > > I tried with ft_volumerealign. However, since the template file has no > fiducials, it is hard to really precisely do this. > > > Fair point. I would however do it the other way around, using the V2 to > get the transformation from voxel space to MNI-RAS, and then use the > inverse of the transformation on the functional data: in this case you > could use ft_volumenormalise, with cfg.nonlinear = ‘no’. Alternatively, if > you are using this procedure: > http://www.fieldtriptoolbox.org/tutorial/sourcemodel#subject-specific_grids_that_are_equivalent_across_subjects_in_normalized_space, > you could directly replace the source.pos of your functional data with the > template.pos and then do the interpolation. > > To summarize: > > either: > > mri = ft_read_mri(‘V2.mri’); > mri.coordsys = ‘bti’; > > cfg = []; > cfg.nonlinear=’no’; > mrin = ft_volumenormalise(cfg, mri); > > transform_vox2bti = mri.transform; > transform_vox2spm = mrin.transform; > transform_bti2spm = transform_vox2spm/transform_vox2bti > source = ft_transform_geometry(transform_bti2spm, source); > > source_int = ft_sourceinterpolate(somecfg, source, niceanatomical); > > or: > > source.pos = templat.pos; > source_int = ft_sourceinterpolate(somecfg, source, niceanatomical); > > Best, > JM > > > > Any input on how to plot the sources on one of these nice anatomical files > is highly appreciated! > > Thanks and best regards, > > Andreas > > > -- > Dipl.-Psych. Andreas Sauer > Max Planck Institute for Brain Research > Deutschordenstraße 46 > 60528 Frankfurt am Main > Germany > > T: +49 69 96769 278 > F: +49 69 96769 327 > Email: sauer.mpih at gmail.com > www.brain.mpg.de > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > https://mailman.science.ru.nl/mailman/listinfo/fieldtrip > -- Dipl.-Psych. Andreas Sauer Max Planck Institute for Brain Research Deutschordenstraße 46 60528 Frankfurt am Main Germany T: +49 69 96769 278 F: +49 69 96769 327 Email: sauer.mpih at gmail.com www.brain.mpg.de -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: pos_fields.png Type: image/png Size: 81877 bytes Desc: not available URL: From jan.schoffelen at donders.ru.nl Wed Jun 15 15:06:57 2016 From: jan.schoffelen at donders.ru.nl (Schoffelen, J.M. (Jan Mathijs)) Date: Wed, 15 Jun 2016 13:06:57 +0000 Subject: [FieldTrip] Fwd: Coordsys issue ft_sourceplot References: <08B10307-13ED-40F0-9F87-B50EEDAF25CC@gmail.com> Message-ID: <8EF9FF29-549B-4E5C-9ED3-055147E8DFD0@donders.ru.nl> Are you sure that you use the pos-field from the template, i.e. from the standard_sourcemodel3d5mm? Best, Jan-Mathijs On 15 Jun 2016, at 14:31, Andreas Sauer > wrote: Dear Jan, thank you for your email and the example code! I tried both ways to convert the coord systems, but unfortunately it still doesn't work. Since I used the tutorial procedure to create my sourcemodel (http://www.fieldtriptoolbox.org/tutorial/sourcemodel#subject-specific_grids_that_are_equivalent_across_subjects_in_normalized_space) I tried first with the easy way of only replacing the .pos field. But the plots don't change, the sources are still rotated by 90 degrees. Actually, the .pos fields are already the same before replacing it (see pic). Is there some error in my code? % Step1: Load mri file mri = ft_read_mri('/data/home1/asauer/Projects/RPScZ/Analysis/Beamforming/MRI/HSM12_V2.mri'); % Step 2: Segment the template brain and construct a volume conduction % model (i.e. head model): this is needed for the inside/outside detection of voxels cfg = []; cfg.output = 'brain'; segmentedmri = ft_volumesegment(cfg,anatomy); cfg = []; cfg.method = 'singleshell'; vol = ft_prepare_headmodel(cfg,segmentedmri); vol = ft_convert_units(vol,'m'); figure; ft_plot_sens(sens,'style','*b'); hold on; ft_plot_vol(vol) % Step 3: Load sourcemodel load(fullfile(ft_path,'template/sourcemodel/standard_sourcemodel3d5mm')); template_grid = sourcemodel; clear sourcemodel % Step 4: Make sourcemodel cfg = []; cfg.grid.warpmni = 'yes'; cfg.grid.template = template_grid; cfg.grid.nonlinear = 'yes'; cfg.mri = mri; cfg.grid.unit = 'm'; grid = ft_prepare_sourcemodel(cfg); figure; hold on; ft_plot_vol(vol,'facecolor','cortex','edgecolor','none'); alpha 0.5; camlight; ft_plot_mesh(grid.pos(grid.inside,:)); The only thing that is different from the tutorial is the unit conversion... After that I tried the transformation. All worked well until the source interpolation. ft_sourceinterpolation throws this error: Attempted to access sel(1); index out of bounds because numel(sel)=0. Error in ft_sourceinterpolate>my_interpn (line 508) ft_progress(sel(1)/num, 'interpolating %.1f%%\n', 100*sel(1)/num); Error in ft_sourceinterpolate (line 393) interp.inside( sel) = my_interpn(double(functional.inside), ax(sel), ay(sel), az(sel), 'nearest', cfg.feedback); which, to be honest, I don't really understand. Sorry... Best wishes, Andreas 2016-06-14 9:41 GMT+02:00 Schoffelen, J.M. (Jan Mathijs) >: Dear Andreas, after having calculated the sources of a MMN paradigm (4D-system), I’d like to plot the results on one of the anatomy template files in the fieldtrip directory (single_subj_T1_1mm.nii) or alternatively on a MNI T1 template file (mni_icbm152_t1_tal_nlin_sym_09a.nii). Unfortunately, this is not working well… As you can see on the attached picture, the functional data is rotated by 90 degrees. I guess that something gets mixed because of the different coordsystems of functional and anatomical data. The functional data is 4D, which means ALS orientation. The anatomical is MNI, so RAS orientation. The plotting works fine, if I use a mri file which was converted in field trip (V2.mri) and therefore is also in ALS orientation. However, the anatomy doesn’t look very pretty… Is there any way that I can transform the functional data to RAS orientation or the anatomical data to ALS orientation, respectively? I tried with ft_volumerealign. However, since the template file has no fiducials, it is hard to really precisely do this. Fair point. I would however do it the other way around, using the V2 to get the transformation from voxel space to MNI-RAS, and then use the inverse of the transformation on the functional data: in this case you could use ft_volumenormalise, with cfg.nonlinear = ‘no’. Alternatively, if you are using this procedure: http://www.fieldtriptoolbox.org/tutorial/sourcemodel#subject-specific_grids_that_are_equivalent_across_subjects_in_normalized_space, you could directly replace the source.pos of your functional data with the template.pos and then do the interpolation. To summarize: either: mri = ft_read_mri(‘V2.mri’); mri.coordsys = ‘bti’; cfg = []; cfg.nonlinear=’no’; mrin = ft_volumenormalise(cfg, mri); transform_vox2bti = mri.transform; transform_vox2spm = mrin.transform; transform_bti2spm = transform_vox2spm/transform_vox2bti source = ft_transform_geometry(transform_bti2spm, source); source_int = ft_sourceinterpolate(somecfg, source, niceanatomical); or: source.pos = templat.pos; source_int = ft_sourceinterpolate(somecfg, source, niceanatomical); Best, JM Any input on how to plot the sources on one of these nice anatomical files is highly appreciated! Thanks and best regards, Andreas -- Dipl.-Psych. Andreas Sauer Max Planck Institute for Brain Research Deutschordenstraße 46 60528 Frankfurt am Main Germany T: +49 69 96769 278 F: +49 69 96769 327 Email: sauer.mpih at gmail.com www.brain.mpg.de _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl https://mailman.science.ru.nl/mailman/listinfo/fieldtrip -- Dipl.-Psych. Andreas Sauer Max Planck Institute for Brain Research Deutschordenstraße 46 60528 Frankfurt am Main Germany T: +49 69 96769 278 F: +49 69 96769 327 Email: sauer.mpih at gmail.com www.brain.mpg.de _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl https://mailman.science.ru.nl/mailman/listinfo/fieldtrip -------------- next part -------------- An HTML attachment was scrubbed... URL: From pgoodin at swin.edu.au Wed Jun 15 15:32:06 2016 From: pgoodin at swin.edu.au (Peter Goodin) Date: Wed, 15 Jun 2016 13:32:06 +0000 Subject: [FieldTrip] LCMV returns no time series? Message-ID: Hi FieldTrip list, I'm using LCMV on averaged data (covariancewindow='all') but find the returned source estimates only have a single point. Is there a way to specify the analysis returns the time series for each grid point? Thanks, Peter -------------- next part -------------- An HTML attachment was scrubbed... URL: From joramvandriel at gmail.com Wed Jun 15 15:51:22 2016 From: joramvandriel at gmail.com (Joram van Driel) Date: Wed, 15 Jun 2016 15:51:22 +0200 Subject: [FieldTrip] LCMV returns no time series? In-Reply-To: References: Message-ID: Hi Peter, This is described here: http://www.fieldtriptoolbox.org/tutorial/shared/virtual_sensors You need to keep the weights or filter of the lcmv output, and just apply them on your channel data using matrix algebra; this will transform your channel data time series from x sensors into y voxels. Good luck, Joram On Wed, Jun 15, 2016 at 3:32 PM, Peter Goodin wrote: > Hi FieldTrip list, > > I'm using LCMV on averaged data (covariancewindow='all') but find the > returned source estimates only have a single point. Is there a way to > specify the analysis returns the time series for each grid point? > > Thanks, > > Peter > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > https://mailman.science.ru.nl/mailman/listinfo/fieldtrip > -- *Joram van Driel*, PhD Postdoc @ Vrije Universiteit Amsterdam Cognitive Psychology *E-mail hours:* *Monday/Tuesday: 9-12 | Thursday/Friday: 14-17* -------------- next part -------------- An HTML attachment was scrubbed... URL: From sarang at cfin.au.dk Wed Jun 15 16:10:57 2016 From: sarang at cfin.au.dk (Sarang S. Dalal) Date: Wed, 15 Jun 2016 14:10:57 +0000 Subject: [FieldTrip] LCMV returns no time series? In-Reply-To: References: Message-ID: <1465999857376.33093@cfin.au.dk> Hi Peter, If you've used the 'lcmv' method for ft_sourceanalysis, you ought to have the time series already contained in source.avg.mom. I've been working a lot lately on improving the LCMV functionality, but unfortunately haven't had a chance to document much yet. Especially if you are not contrasting different conditions, you might want to try these parameters: cfg.lcmv.weightnorm = 'nai'; % this is a new option :-) cfg.lcmv.fixedori = 'yes'; I also prefer to turn off reducerank, but YMMV: cfg.lcmv.reducerank = 'no'; Finally I've also contributed a viewer that will greatly help visualizing your virtual time series together with the MRI. You can find it in the latest distributions of FieldTrip under fieldtrip/contrib/nutmegtrip. You'll also need a full version of SPM8 in your path (the external in FieldTrip doesn't have all the necessary functions). You?? can use it like this: cfg = []; cfg.mripath = '/path/to/mri/nii' % must be in nifti (nii) format cfg.funparameter = 'avg.mom' % cfg.atlas = ft_read_atlas('ROI_MNI_V4.nii'); % [optional] you can get atlas labels, if your MRI and grid points are based on the MNI grid nmt_sourceplot_spm8(cfg,ft_convert_units(source,'mm')); Cheers, Sarang ________________________________ From: fieldtrip-bounces at science.ru.nl on behalf of Peter Goodin Sent: Wednesday, June 15, 2016 3:32 PM To: FieldTrip discussion list Subject: [FieldTrip] LCMV returns no time series? Hi FieldTrip list, I'm using LCMV on averaged data (covariancewindow='all') but find the returned source estimates only have a single point. Is there a way to specify the analysis returns the time series for each grid point? Thanks, Peter -------------- next part -------------- An HTML attachment was scrubbed... URL: From ha438 at georgetown.edu Wed Jun 15 22:28:14 2016 From: ha438 at georgetown.edu (Hassan Aleem) Date: Wed, 15 Jun 2016 16:28:14 -0400 Subject: [FieldTrip] compute forward simulated data Message-ID: Hi, Can anyone direct me, or help create a tutorial similar to http://www.fieldtriptoolbox.org/example/compute_forward_simulated_data_and_apply_a_beamformer_scan but for EEG simulated data? Best, Hassan -------------- next part -------------- An HTML attachment was scrubbed... URL: From pgoodin at swin.edu.au Wed Jun 15 23:55:44 2016 From: pgoodin at swin.edu.au (Peter Goodin) Date: Wed, 15 Jun 2016 21:55:44 +0000 Subject: [FieldTrip] LCMV returns no time series? Message-ID: <3804c3f8-b092-4b06-80d6-57f71f68faf9@email.android.com> Hi Joram and Sarang, Thanks very much for the advice and to you Sarang for the new functionality and viewer! Peter On 16 Jun 2016 00:59, "Sarang S. Dalal" wrote: Hi Peter, If you've used the 'lcmv' method for ft_sourceanalysis, you ought to have the time series already contained in source.avg.mom. I've been working a lot lately on improving the LCMV functionality, but unfortunately haven't had a chance to document much yet. Especially if you are not contrasting different conditions, you might want to try these parameters: cfg.lcmv.weightnorm = 'nai'; % this is a new option :-) cfg.lcmv.fixedori = 'yes'; I also prefer to turn off reducerank, but YMMV: cfg.lcmv.reducerank = 'no'; Finally I've also contributed a viewer that will greatly help visualizing your virtual time series together with the MRI. You can find it in the latest distributions of FieldTrip under fieldtrip/contrib/nutmegtrip. You'll also need a full version of SPM8 in your path (the external in FieldTrip doesn't have all the necessary functions). You​​ can use it like this: cfg = []; cfg.mripath = '/path/to/mri/nii' % must be in nifti (nii) format cfg.funparameter = 'avg.mom' % cfg.atlas = ft_read_atlas('ROI_MNI_V4.nii'); % [optional] you can get atlas labels, if your MRI and grid points are based on the MNI grid nmt_sourceplot_spm8(cfg,ft_convert_units(source,'mm')); Cheers, Sarang ________________________________ From: fieldtrip-bounces at science.ru.nl on behalf of Peter Goodin Sent: Wednesday, June 15, 2016 3:32 PM To: FieldTrip discussion list Subject: [FieldTrip] LCMV returns no time series? Hi FieldTrip list, I'm using LCMV on averaged data (covariancewindow='all') but find the returned source estimates only have a single point. Is there a way to specify the analysis returns the time series for each grid point? Thanks, Peter -------------- next part -------------- An HTML attachment was scrubbed... URL: From anne.urai at gmail.com Thu Jun 16 10:43:19 2016 From: anne.urai at gmail.com (Anne Urai) Date: Thu, 16 Jun 2016 04:43:19 -0400 Subject: [FieldTrip] running FT scripts in a supercomputing cluster In-Reply-To: References: Message-ID: Hi Jose, When calling mcc from Matlab, a dependency analysis is first carried out (at least in more recent versions of Matlab) - basically, Matlab goes through the script you're compiling and finds all the functions that are called (which must be on the path). These are all added to the executable. In principle, if all the folders you need are on the path (which should be okay when you call ft_default), the executable can run. Now, only in the case when the dependency analysis doesn't recognize certain functions (because they are, for example, generated through str2func) you should add them manually. I found this out through trial and error - I'd first try to compile using the bare bones mcc('-mv', '-N', '-R', '-nodisplay', '-R', '-singleCompThread', 'FT_0.m'); when you then run the executable, you'll get an error message if a function or a toolbox is missing (and then you can add only those that you need and compile again). In your FT_0.sh, you should indeed load the MCR - otherwise, the executable can't run. For this, I'd recommend contacting the admin of the supercomputer cluster, since the way I do it on the cluster here is specific to the setup. You'll probably have to activate this in your FT_0.sh yourself and add the path to the cache of each node (something like export MCR_CACHE_ROOT=$TMPDIR). Good luck! — Anne E. Urai, MSc PhD student | Institut für Neurophysiologie und Pathophysiologie Universitätsklinikum Hamburg-Eppendorf | Martinistrasse 52, 20246 | Hamburg, Germany www.anneurai.net / @AnneEUrai From: Jose Reply: Jose Date: 15 June 2016 at 19:14:43 To: Anne Urai Subject: Re: [FieldTrip] running FT scripts in a supercomputing cluster Hi Anne, Thanks for the detailed response, I have a couple questions if I may, So, if I understand well I need to know a priori which functions I want to use?. That's a bit strange, no? Because I don't know if any given function depend of another one which I might not notice if don't inspect all the scripts, The other thing is that I was trying to compile in the cluster, not locally, but anyway I tried locally with something like this: % these paths will be added at compilation addpath('/home/joseluis/Documents/Software/fieldtrip-20160317'); ft_defaults, addpath('/home/joseluis/Documents/Software/fieldtrip-20160317/qsub'); addpath('/home/joseluis/Documents/Software/fieldtrip-20160317/fileio'); addpath('/home/joseluis/Documents/Software/fieldtrip-20160317/fileio/private'); % options: compile verbose, only use the toolboxes we really need % !!! runtime options should be preceded by - to work! % dont need to activate the -nojvm flag, can still plot from executable mcc('-mv', '-N', '-p', 'stats', '-p', 'images', '-p', 'signal', ... '-R', '-nodisplay', '-R', '-singleCompThread', ... '-a', '/home/joseluis/Documents/Software/fieldtrip-20160317/fileio/ft_read_event.m', ... '-a', '/home/joseluis/Documents/Software/fieldtrip-20160317/fileio/private/read_ctf_cls.m', ... '-a', '/home/joseluis/Documents/Software/fieldtrip-20160317/ft_preprocessing', ... 'FT_0.m'); However when I copy FT_0 and run_FT_0.sh and run the job I get: ./FT_0: error while loading shared libraries: libmwmclmcrrt.so.8.1: cannot open shared object file: No such file or directory Which looking in Internet seems to be associated to the fact I need to run a mrc installer in the cluster? thanks Jose On 15 June 2016 at 11:03, Anne Urai wrote: > Hi Jose, > > I ran into similar dependencies issues when compiling fieldtrip, and > converged on the following: > > > > % these paths will be added at compilation > > addpath(genpath('~/code/Tools')); > > addpath('~/Documents/fieldtrip'); > > ft_defaults; % add everything to path that we need > > > > addpath('~/Documents/fieldtrip/qsub'); > > addpath(genpath('~/Documents/fieldtrip/template/')); % neighbouring > matfile > > > > if strcmp(fname, 'B3a_clusterStatsERF.m') || strcmp(fname, > 'B3b_clusterStatsTFR.m'), > > addpath('~/Documents/fieldtrip/statfun/'); % need the combineClusters > mex file > > addpath('~/Documents/fieldtrip/external/spm8/'); % for neighbour > definition > > % > http://mailman.science.ru.nl/pipermail/fieldtrip/2014-July/008238.html > > end > > > > % options: compile verbose, only use the toolboxes we really need > > % !!! runtime options should be preceded by - to work! > > % dont need to activate the -nojvm flag, can still plot from executable > > if strcmp(fname, 'B3a_clusterStatsERF.m') || strcmp(fname, > 'B3b_clusterStatsTFR.m'), > > > > % statfun is called with a weird eval construction, so not recognized > > % by the dependency analysis of mcc > > mcc('-mv', '-N', '-p', 'stats', '-p', 'images', '-p', 'signal', ... > > '-R', '-nodisplay', '-R', '-singleCompThread', ... > > '-a', '~/Documents/fieldtrip/ft_statistics_montecarlo.m', ... > > '-a', '~/Documents/fieldtrip/statfun/ft_statfun_depsamplesT.m', > ... > > fname); > > else > > % no need to specify additional files > > mcc('-mv', '-N', '-p', 'stats', '-p', 'images', '-p', 'signal', ... > > '-R', '-nodisplay', '-R', '-singleCompThread', ... > > fname); > > end > > > So, the trick is to add everything to your path before comping, and then > use the -N option and define specific folders and possible functions using > -a. Make sure to only include additional subfolders from Fieldtrip (such as > the templates folder) only if you need them, for including them will > increase the size of the executable considerably. Also, some functions like > the ft_statistics ones are not directly called but instead evaluated using statmethod > = str2func(['ft_statistics_' cfg.method]) - this causes the dependency > analysis of the compiler to skip those functions, so you'll have to add > them manually. > > > PS a similar setup should work directly from the command line mcc, but I > found it easier to run ft_defaults from Matlab and then compile from within > a Matlab script. > > > Hope this helps! > > > — > Anne E. Urai, MSc > PhD student | Institut für Neurophysiologie und Pathophysiologie > Universitätsklinikum Hamburg-Eppendorf | Martinistrasse 52, 20246 | > Hamburg, Germany > www.anneurai.net / @AnneEUrai > > On 10 June 2016 at 10:42, Jose wrote: > >> dear list, >> >> I'm trying to analyse CTF MEG data through the Flemish Supercomputer >> Centre, >> I did a matlab script to run the foremost FT functions in my pipeline >> (ft_read_event, read_ctf_cls, and ft_preprocessing). This script works well >> when I run it locally. To compile my function in the supercomputing cluster >> I initially used addpath to include FT and ft_defaults to set the >> configuration inside my script, but this wasn't working. I tried using a >> startup.m script but this doesn't work neither. Maybe I'm missing >> something? My bash script to compile looks like this: >> >> #!/bin/bash >> module load MATLAB/2013b >> FTDIR=$VSC_DATA_VO_USER/fieldtrip-20160317 >> mcc -mv FT_0.m >> >> I also tried mcc -mv FT_0.m -I $FTDIR >> I run my compilation in the same folder where I have the FT folder. >> When I run my bash job I get always the same error: Undefined function >> 'ft_read_event' for input arguments of type 'char'. >> >> I've been looking elsewhere but still I haven't find a solution, >> >> Any hints about this would really appreciated, >> best, >> Jose >> >> _______________________________________________ >> fieldtrip mailing list >> fieldtrip at donders.ru.nl >> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip >> > > -- José Luis ULLOA FULGERI +32 (0)4 77 42 90 07 +32 (0)4 92 64 64 77 -------------- next part -------------- An HTML attachment was scrubbed... URL: From sauer.mpih at googlemail.com Thu Jun 16 10:57:48 2016 From: sauer.mpih at googlemail.com (Andreas Sauer) Date: Thu, 16 Jun 2016 10:57:48 +0200 Subject: [FieldTrip] Coordsys issue ft_sourceplot In-Reply-To: <8EF9FF29-549B-4E5C-9ED3-055147E8DFD0@donders.ru.nl> References: <08B10307-13ED-40F0-9F87-B50EEDAF25CC@gmail.com> <8EF9FF29-549B-4E5C-9ED3-055147E8DFD0@donders.ru.nl> Message-ID: Dear Jan-Mathijs, oh, sorry! Thanks for the hint. Now it works fine ;-). Best, Andreas Am Mittwoch, 15. Juni 2016 schrieb Schoffelen, J.M. (Jan Mathijs) : > Are you sure that you use the pos-field from the template, i.e. from the > standard_sourcemodel3d5mm? > > Best, > Jan-Mathijs > > On 15 Jun 2016, at 14:31, Andreas Sauer > wrote: > > Dear Jan, > > thank you for your email and the example code! > > I tried both ways to convert the coord systems, but unfortunately it still > doesn't work. > > Since I used the tutorial procedure to create my sourcemodel ( > http://www.fieldtriptoolbox.org/tutorial/sourcemodel#subject-specific_grids_that_are_equivalent_across_subjects_in_normalized_space) > I tried first with the easy way of only replacing the .pos field. But the > plots don't change, the sources are still rotated by 90 degrees. Actually, > the .pos fields are already the same before replacing it (see pic). Is > there some error in my code? > > > *% Step1: Load mri file* > *mri = > ft_read_mri('/data/home1/asauer/Projects/RPScZ/Analysis/Beamforming/MRI/HSM12_V2.mri');* > > *% Step 2: Segment the template brain and construct a volume conduction* > *% model (i.e. head model): this is needed for the inside/outside > detection of voxels* > *cfg = [];* > *cfg.output = 'brain';* > *segmentedmri = ft_volumesegment(cfg,anatomy);* > > *cfg = [];* > *cfg.method = 'singleshell';* > *vol = ft_prepare_headmodel(cfg,segmentedmri);* > *vol = ft_convert_units(vol,'m');* > *figure; ft_plot_sens(sens,'style','*b'); hold on; ft_plot_vol(vol)* > > *% Step 3: Load sourcemodel * > *load(fullfile(ft_path,'template/sourcemodel/standard_sourcemodel3d5mm'));* > *template_grid = sourcemodel;* > *clear sourcemodel* > > *% Step 4: Make sourcemodel* > *cfg = [];* > *cfg.grid.warpmni = 'yes';* > *cfg.grid.template = template_grid;* > *cfg.grid.nonlinear = 'yes';* > *cfg.mri = mri;* > *cfg.grid.unit = 'm';* > *grid = ft_prepare_sourcemodel(cfg);* > *figure; hold on;* > *ft_plot_vol(vol,'facecolor','cortex','edgecolor','none'); alpha 0.5; > camlight;* > *ft_plot_mesh(grid.pos(grid.inside,:));* > > > The only thing that is different from the tutorial is the unit > conversion... > > After that I tried the transformation. All worked well until the source > interpolation. ft_sourceinterpolation throws this error: > > *Attempted to access sel(1); index out of bounds because numel(sel)=0.* > > *Error in ft_sourceinterpolate>my_interpn (line 508)* > * ft_progress(sel(1)/num, 'interpolating %.1f%%\n', 100*sel(1)/num);* > > *Error in ft_sourceinterpolate (line 393)* > * interp.inside( sel) = my_interpn(double(functional.inside), ax(sel), > ay(sel), az(sel), 'nearest', cfg.feedback);* > > > which, to be honest, I don't really understand. Sorry... > > Best wishes, > > Andreas > > > 2016-06-14 9:41 GMT+02:00 Schoffelen, J.M. (Jan Mathijs) < > jan.schoffelen at donders.ru.nl > >: > >> Dear Andreas, >> >> after having calculated the sources of a MMN paradigm (4D-system), I’d >> like to plot the results on one of the anatomy template files in the >> fieldtrip directory (single_subj_T1_1mm.nii) or alternatively on a MNI T1 >> template file (mni_icbm152_t1_tal_nlin_sym_09a.nii). Unfortunately, this is >> not working well… As you can see on the attached picture, the functional >> data is rotated by 90 degrees. >> >> I guess that something gets mixed because of the different coordsystems >> of functional and anatomical data. The functional data is 4D, which means >> ALS orientation. The anatomical is MNI, so RAS orientation. The plotting >> works fine, if I use a mri file which was converted in field trip (V2.mri) >> and therefore is also in ALS orientation. However, the anatomy doesn’t look >> very pretty… >> >> >> Is there any way that I can transform the functional data to RAS >> orientation or the anatomical data to ALS orientation, respectively? >> >> >> I tried with ft_volumerealign. However, since the template file has no >> fiducials, it is hard to really precisely do this. >> >> >> Fair point. I would however do it the other way around, using the V2 to >> get the transformation from voxel space to MNI-RAS, and then use the >> inverse of the transformation on the functional data: in this case you >> could use ft_volumenormalise, with cfg.nonlinear = ‘no’. Alternatively, if >> you are using this procedure: >> http://www.fieldtriptoolbox.org/tutorial/sourcemodel#subject-specific_grids_that_are_equivalent_across_subjects_in_normalized_space, >> you could directly replace the source.pos of your functional data with the >> template.pos and then do the interpolation. >> >> To summarize: >> >> either: >> >> mri = ft_read_mri(‘V2.mri’); >> mri.coordsys = ‘bti’; >> >> cfg = []; >> cfg.nonlinear=’no’; >> mrin = ft_volumenormalise(cfg, mri); >> >> transform_vox2bti = mri.transform; >> transform_vox2spm = mrin.transform; >> transform_bti2spm = transform_vox2spm/transform_vox2bti >> source = ft_transform_geometry(transform_bti2spm, source); >> >> source_int = ft_sourceinterpolate(somecfg, source, niceanatomical); >> >> or: >> >> source.pos = templat.pos; >> source_int = ft_sourceinterpolate(somecfg, source, niceanatomical); >> >> Best, >> JM >> >> >> >> Any input on how to plot the sources on one of these nice anatomical >> files is highly appreciated! >> >> Thanks and best regards, >> >> Andreas >> >> >> -- >> Dipl.-Psych. Andreas Sauer >> Max Planck Institute for Brain Research >> Deutschordenstraße 46 >> 60528 Frankfurt am Main >> Germany >> >> T: +49 69 96769 278 >> F: +49 69 96769 327 >> Email: sauer.mpih at gmail.com >> >> www.brain.mpg.de >> _______________________________________________ >> fieldtrip mailing list >> fieldtrip at donders.ru.nl >> >> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip >> >> >> >> _______________________________________________ >> fieldtrip mailing list >> fieldtrip at donders.ru.nl >> >> https://mailman.science.ru.nl/mailman/listinfo/fieldtrip >> > > > > -- > Dipl.-Psych. Andreas Sauer > Max Planck Institute for Brain Research > Deutschordenstraße 46 > 60528 Frankfurt am Main > Germany > > T: +49 69 96769 278 > F: +49 69 96769 327 > Email: sauer.mpih at gmail.com > > www.brain.mpg.de > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > > https://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > > > -- Dipl.-Psych. Andreas Sauer Max Planck Institute for Brain Research Deutschordenstraße 46 60528 Frankfurt am Main Germany T: +49 69 96769 278 F: +49 69 96769 327 Email: sauer.mpih at gmail.com www.brain.mpg.de -------------- next part -------------- An HTML attachment was scrubbed... URL: From laxmi.shaw22 at gmail.com Thu Jun 16 15:47:48 2016 From: laxmi.shaw22 at gmail.com (Laxmi Shaw) Date: Thu, 16 Jun 2016 19:17:48 +0530 Subject: [FieldTrip] Queries related to 1D topo plots Message-ID: Dear fieldtrip, I am trying to plot the topo plot for my 2D and 1D data using the ft_plot_topo function. In the fieldtrip tutorial website there are examples provided for ft_topoplotER with input data taking a 3D matrix. Kindly provide me with a working example for ft_plot_topo taking an input example of a 2D and 1D input matrix. Thanks and Regards in advance -- Laxmi Shaw Research Scholar(PhD) IIT Kharagpur West Bengal Ph no-08388837821 -------------- next part -------------- An HTML attachment was scrubbed... URL: From s.borbaruah at student.utwente.nl Thu Jun 16 16:19:12 2016 From: s.borbaruah at student.utwente.nl (Soujata Borbaruah) Date: Thu, 16 Jun 2016 14:19:12 +0000 Subject: [FieldTrip] What is the data present in the covariance matrix after using ft_timelockanalysis Message-ID: Hello, I want to calculate the covariance of the data I provide. In the function ft_timelockanalysis there is a portion where the covariance is being normalised over all trials by the total number of samples in all trials. % normalize the covariance over all trials by the total number of samples in all trials if strcmp(cfg.covariance, 'yes') if strcmp(cfg.keeptrials,'yes') for i=1:ntrial if strcmp(cfg.removemean, 'yes') covsig(i,:,:) = covsig(i,:,:) / (numcovsigsamples(i)-1); else covsig(i,:,:) = covsig(i,:,:) / numcovsigsamples(i); end end else if strcmp(cfg.removemean, 'yes') covsig = squeeze(nansum(covsig, 1)) / (sum(numcovsigsamples)-ntrial); else covsig = squeeze(nansum(covsig, 1)) / sum(numcovsigsamples); end end end Please note that the cfg.removemean was selected as yes. Can someone please explain what is the final data present in my covariance matrix? Sent with MailTrack -------------- next part -------------- An HTML attachment was scrubbed... URL: From Alexander_Nakhnikian at hms.harvard.edu Thu Jun 16 17:00:02 2016 From: Alexander_Nakhnikian at hms.harvard.edu (Nakhnikian, Alexander) Date: Thu, 16 Jun 2016 15:00:02 +0000 Subject: [FieldTrip] What is the data present in the covariance matrix after using ft_timelockanalysis In-Reply-To: References: Message-ID: Hi Soujatta, I hope I understand your question. For demeaned data, the covariance is the expected value of sum(xy). For data with finite mean, we have to get the expected value of sum(x-mu(x))*sum(y-mu(y)). Removing the mean and trend doesn't have any impact on the denominators used to compute the unbiased estimate of E{sum(xy)}. The unbiased covariance estimated between x and y for a given trial is sum(xy)/(N_times-1), where N _times is the number of time points in an epoch. When averaging covariance matrices over multiple trials the denominator becomes N_trs-1. I hope that helps. Best, Alexander ________________________________ From: fieldtrip-bounces at science.ru.nl on behalf of Soujata Borbaruah Sent: Thursday, June 16, 2016 10:19:12 AM To: fieldtrip, donders Subject: [FieldTrip] What is the data present in the covariance matrix after using ft_timelockanalysis Hello, I want to calculate the covariance of the data I provide. In the function ft_timelockanalysis there is a portion where the covariance is being normalised over all trials by the total number of samples in all trials. % normalize the covariance over all trials by the total number of samples in all trials if strcmp(cfg.covariance, 'yes') if strcmp(cfg.keeptrials,'yes') for i=1:ntrial if strcmp(cfg.removemean, 'yes') covsig(i,:,:) = covsig(i,:,:) / (numcovsigsamples(i)-1); else covsig(i,:,:) = covsig(i,:,:) / numcovsigsamples(i); end end else if strcmp(cfg.removemean, 'yes') covsig = squeeze(nansum(covsig, 1)) / (sum(numcovsigsamples)-ntrial); else covsig = squeeze(nansum(covsig, 1)) / sum(numcovsigsamples); end end end Please note that the cfg.removemean was selected as yes. Can someone please explain what is the final data present in my covariance matrix? Sent with MailTrack -------------- next part -------------- An HTML attachment was scrubbed... URL: From E.Kinney-Lang at sms.ed.ac.uk Thu Jun 16 17:19:19 2016 From: E.Kinney-Lang at sms.ed.ac.uk (Eli Kinney-lang) Date: Thu, 16 Jun 2016 16:19:19 +0100 Subject: [FieldTrip] Possible Bug using ft_rejectvisual followed by ft_rejectartifact Message-ID: <20160616161919.1085638x99w53ocg@www.staffmail.ed.ac.uk> Hello all, This is my first post, so I apologize if I am not detailed enough/don't give enough correct information for my question. My name is Eli, and I am a researcher at the University of Edinburgh studying non-invasive brain-computer interfaces. Background and summary: In a side project, I am looking at using EEG to determine if there are cognitive difficulties in infants with epilepsy. In this project I am processing the EEG data from 20 channels recorded by a local hospital group. I have set up a fieldtrip processing pipeline in order to investigate this problem. Within the processing pipeline I have a two-step artifact removal chain. First, I visually remove obvious artifacts using the ft_rejectvisual and the cfg.method ='summary'. I then use automatic rejection based on z-value to remove any additional trials which contain muscle, jump or EOG artifacts. However, when I run the automatic rejection, if I have removed a single trial using the visual method, I the automatic rejection method calculates a z-value of '0' for all trials, failing to reject anything. If I do NOT reject anything from ft_rejectvisual (but still call the function) then the automatic rejection works properly. This is inconsistent, and does not happen for each subject, but does occur for some subjects. Other subjects have both functioning properly. Any suggestions as to what may be causing this would be appreciated. Expanded details: -Given a preprocessed EEG data I run ft_rejectvisual using cfg.method = 'summary' as the only cfg. -cfg for automatic rejection: cfg.trl = dat.cfg.trl; cfg.continuous = 'yes'; cfg.artfctdef.zvalue.channel = 'all'; cfg.artfctdef.zvalue.cutoff = 2; cfg.artfctdef.zvalue.trlpadding = 0; cfg.artfctdef.zvalue.artpadding = 0.1; cfg.artfctdef.zvalue.fltpadding = 0.2; cfg.artfctdef.zvalue.bpfilter = 'yes'; cfg.artfctdef.zvalue.bpfreq = [110 140]; cfg.artfctdef.zvalue.bpfiltord = 8; cfg.artfctdef.zvalue.bpfilttype = 'but'; cfg.artfctdef.zvalue.hilbert = 'yes'; cfg.artfctdef.zvalue.boxcar = 0.2; [~, artifact_muscle] = ft_artifact_zvalue(cfg,dat); cfg = []; -data structure: dat = hdr: [1x1 struct] label: {20x1 cell} fsample: 511 trial: {1x94 cell} time: {1x94 cell} sampleinfo: [94x2 double] cfg: [1x1 struct] I cannot upload the data due to confidentiality, but am glad to clarify any questions/provide more information where needed. Is this user error, or is it possibly a bug? Any recommendations are welcome. Thank you. Cheers, Eli Kinney-Lang -- The University of Edinburgh is a charitable body, registered in Scotland, with registration number SC005336. From carine.signoret at liu.se Thu Jun 16 23:15:35 2016 From: carine.signoret at liu.se (Carine Signoret) Date: Thu, 16 Jun 2016 23:15:35 +0200 Subject: [FieldTrip] ft_definetrial header format problem Message-ID: Dear list, I am sorry to ask a so naive question, but I would like to know why it is not possible to read a .mat file when using the function ft_definetrial? Are we only allowed to read a .fif file for defining the trial or is there something that I am missing? Thank you for your help, Carine From stephen.whitmarsh at gmail.com Thu Jun 16 23:24:08 2016 From: stephen.whitmarsh at gmail.com (Stephen Whitmarsh) Date: Thu, 16 Jun 2016 23:24:08 +0200 Subject: [FieldTrip] ft_definetrial header format problem In-Reply-To: References: Message-ID: Hi Carine, Maybe what you are looking for is to enter your data as a second argument in ft_redefinetrial, as in: newdata = ft_redefinetrial(cfg,olddata). You can read that data from a matlab file before that, as in: olddata = load(filename). Cheers, Stephen On 16 June 2016 at 23:15, Carine Signoret wrote: > Dear list, > > I am sorry to ask a so naive question, but I would like to know why it is > not possible to read a .mat file when using the function ft_definetrial? > Are we only allowed to read a .fif file for defining the trial or is there > something that I am missing? > > Thank you for your help, > > Carine > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > https://mailman.science.ru.nl/mailman/listinfo/fieldtrip > -------------- next part -------------- An HTML attachment was scrubbed... URL: From pgoodin at swin.edu.au Fri Jun 17 03:19:28 2016 From: pgoodin at swin.edu.au (Peter Goodin) Date: Fri, 17 Jun 2016 01:19:28 +0000 Subject: [FieldTrip] LCMV returns no time series? In-Reply-To: <1465999857376.33093@cfin.au.dk> References: , <1465999857376.33093@cfin.au.dk> Message-ID: Hi Sarang, Regarding your point on that I should have the time series in source.avg.mom, the function only returns an n x 1 matrix. I've checked the averaged data and it does contain the channel x time series in av.avg, so I'm not really sure what's going on. Peter _______________________ Dr Peter Goodin, Brain and Psychological Sciences Research Centre (BPsyC) Swinburne University, Hawthorn, Vic, 3122 ________________________________________ From: fieldtrip-bounces at science.ru.nl [fieldtrip-bounces at science.ru.nl] on behalf of Sarang S. Dalal [sarang at cfin.au.dk] Sent: Thursday, 16 June 2016 12:10 AM To: FieldTrip discussion list Subject: Re: [FieldTrip] LCMV returns no time series? Hi Peter, If you've used the 'lcmv' method for ft_sourceanalysis, you ought to have the time series already contained in source.avg.mom. I've been working a lot lately on improving the LCMV functionality, but unfortunately haven't had a chance to document much yet. Especially if you are not contrasting different conditions, you might want to try these parameters: cfg.lcmv.weightnorm = 'nai'; % this is a new option :-) cfg.lcmv.fixedori = 'yes'; I also prefer to turn off reducerank, but YMMV: cfg.lcmv.reducerank = 'no'; Finally I've also contributed a viewer that will greatly help visualizing your virtual time series together with the MRI. You can find it in the latest distributions of FieldTrip under fieldtrip/contrib/nutmegtrip. You'll also need a full version of SPM8 in your path (the external in FieldTrip doesn't have all the necessary functions). You​​ can use it like this: cfg = []; cfg.mripath = '/path/to/mri/nii' % must be in nifti (nii) format cfg.funparameter = 'avg.mom' % cfg.atlas = ft_read_atlas('ROI_MNI_V4.nii'); % [optional] you can get atlas labels, if your MRI and grid points are based on the MNI grid nmt_sourceplot_spm8(cfg,ft_convert_units(source,'mm')); Cheers, Sarang ________________________________ From: fieldtrip-bounces at science.ru.nl on behalf of Peter Goodin Sent: Wednesday, June 15, 2016 3:32 PM To: FieldTrip discussion list Subject: [FieldTrip] LCMV returns no time series? Hi FieldTrip list, I'm using LCMV on averaged data (covariancewindow='all') but find the returned source estimates only have a single point. Is there a way to specify the analysis returns the time series for each grid point? Thanks, Peter From rgilley at deakin.edu.au Fri Jun 17 07:36:37 2016 From: rgilley at deakin.edu.au (RYAN GILLEY) Date: Fri, 17 Jun 2016 05:36:37 +0000 Subject: [FieldTrip] SEP Recording In-Reply-To: References: Message-ID: Hey Nick, Thank you for the help! I actually managed to configure it using that port after I read this. I have figured out my issue lies within my unit. Much appreciated again! Regards, Ryan From: fieldtrip-bounces at science.ru.nl [mailto:fieldtrip-bounces at science.ru.nl] On Behalf Of Balderston, Nicholas (NIH/NIMH) [F] Sent: June 15, 2016 1:14 AM To: FieldTrip discussion list Subject: Re: [FieldTrip] SEP Recording Hey Ryan, I am not sure that I understand your problem completely, so this solution might not be that helpful. That being said, the DS7A has a BNC out port on the back of the unit, which sends its own TTL pulses whenever it delivers a stimulation. If you can add this as a channel in your recordings, it may give you more accurate timing information. -nick ________________________________ From: RYAN GILLEY [rgilley at deakin.edu.au] Sent: Tuesday, June 14, 2016 12:13 AM To: fieldtrip at tortel.science.ru.nl Subject: [FieldTrip] SEP Recording Hi Everyone, This is not a straight forward question for Fieldtrip but with the experience in the group I figured it would be good to ask. Currently I am using a Neuroscan 64 channel EEG system to acquire sensory evoked potential (SEP) data. I am administering TTL pulses from an external system (Digitimer DS7a) run through Powerlab 26T using Labchart's event manager to generate the stimulations. My goal is to attempt to localize a couple of the Somatosensory peaks. My problem at the moment is that on my recording the marker (spike 1) and the stimulus artifact show up as displayed below. I have found that the time interval is inconsistent and because of this I am having trouble aligning the stimulus artifact to average. Is there another way of configuring this so that it works more efficiently or if anyone has used these tools (digitimer and powerlab) with the neuroscan system before, is there any advice anyone can give. Thanks in advance, Ryan [cid:image001.png at 01D1C8AE.0B51CCF0] -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image001.png Type: image/png Size: 70148 bytes Desc: image001.png URL: From zsoltturi at gmail.com Fri Jun 17 09:31:58 2016 From: zsoltturi at gmail.com (Zsolt Turi) Date: Fri, 17 Jun 2016 09:31:58 +0200 Subject: [FieldTrip] Difference in trial number per condition Message-ID: Hi, I was wondering if FieldTrip has an optimized solution for such situations when the amount of trials in one condition markedly differs from the number of trials in the other (e.g., the ratio is 1:3 or 1:4). On the website I have found that this issue was already discussed, however, it is not clear to me whether this was indeed addressed by a FieldTrip function. Below is the link about the question I was referring to: http://www.fieldtriptoolbox.org/faq/how_does_a_difference_in_trial_numbers_per_condition_affect_my_statistical_test In case there is no such a function, could someone provide me a rough procedure that is methodologically acceptable in the scientific community to compensate for this issue? I am interested both in conceptual and implementational aspects. I would like to compare TFR or WPLI measures between two conditions and use non-parametric cluster-based permutation test for statistical analysis. My data is characterized by a within-subjects design, in case this is relevant information. Thanks for your input in advance, Zsolt -------------- next part -------------- An HTML attachment was scrubbed... URL: From s.borbaruah at student.utwente.nl Fri Jun 17 10:11:15 2016 From: s.borbaruah at student.utwente.nl (Soujata Borbaruah) Date: Fri, 17 Jun 2016 10:11:15 +0200 Subject: [FieldTrip] What is the data present in the covariance matrix after using ft_timelockanalysis In-Reply-To: References: Message-ID: Hello Alexander, Thank you for your feedback. So is it safe to say that the final data present in the covariance matrix (MxM where M is the number of channels) is the average of the covariance matrices over multiple trials? Regards, Soujata. Sent with MailTrack On Thu, Jun 16, 2016 at 5:00 PM, Nakhnikian, Alexander < Alexander_Nakhnikian at hms.harvard.edu> wrote: > Hi Soujatta, > > > I hope I understand your question. > > > For demeaned data, the covariance is the expected value of sum(xy). For > data with finite mean, we have to get the expected value of > sum(x-mu(x))*sum(y-mu(y)). Removing the mean and trend doesn't have any > impact on the denominators used to compute the unbiased estimate of > E{sum(xy)}. The unbiased covariance estimated between x and y for a given > trial is sum(xy)/(N_times-1), where N _times is the number of time points > in an epoch. When averaging covariance matrices over multiple trials the > denominator becomes N_trs-1. I hope that helps. > > > Best, > > > Alexander > ------------------------------ > *From:* fieldtrip-bounces at science.ru.nl > on behalf of Soujata Borbaruah > *Sent:* Thursday, June 16, 2016 10:19:12 AM > *To:* fieldtrip, donders > *Subject:* [FieldTrip] What is the data present in the covariance matrix > after using ft_timelockanalysis > > Hello, > > I want to calculate the covariance of the data I provide. In the function > ft_timelockanalysis there is a portion where the covariance is being > normalised over all trials by the total number of samples in all trials. > > > % normalize the covariance over all trials by the total number of samples > in all trials > if strcmp(cfg.covariance, 'yes') > if strcmp(cfg.keeptrials,'yes') > for i=1:ntrial > if strcmp(cfg.removemean, 'yes') > covsig(i,:,:) = covsig(i,:,:) / (numcovsigsamples(i)-1); > else > covsig(i,:,:) = covsig(i,:,:) / numcovsigsamples(i); > end > end > else > if strcmp(cfg.removemean, 'yes') > covsig = squeeze(nansum(covsig, 1)) / (sum(numcovsigsamples)-ntrial); > else > covsig = squeeze(nansum(covsig, 1)) / sum(numcovsigsamples); > > end > end > end > > Please note that the cfg.removemean was selected as yes. > > Can someone please explain what is the final data present in my covariance > matrix? > > > > Sent with MailTrack > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > https://mailman.science.ru.nl/mailman/listinfo/fieldtrip > -------------- next part -------------- An HTML attachment was scrubbed... URL: From stan.vanpelt at donders.ru.nl Fri Jun 17 10:51:12 2016 From: stan.vanpelt at donders.ru.nl (Pelt, S. van (Stan)) Date: Fri, 17 Jun 2016 08:51:12 +0000 Subject: [FieldTrip] Difference in trial number per condition In-Reply-To: References: Message-ID: <7CCA2706D7A4DA45931A892DF3C2894C3F956C3C@exprd03.hosting.ru.nl> Hi Zsolt, The amount to which this may be a concern will depend on the measures you want to compare. Also, the risk of drawing incorrect (qualitative) conclusions will of course mainly be large around your statistical threshold value (e.g. p=0.05). Power differences might become biased if groups have unequal size, power begin a squared value. See for a suggested numerical correction method for this, when comparing power spectra or e.g. Bokil et al., 2007 (http://www.ncbi.nlm.nih.gov/pubmed/16945422), but I assume there are also other solutions going around. Best, Stan From: fieldtrip-bounces at science.ru.nl [mailto:fieldtrip-bounces at science.ru.nl] On Behalf Of Zsolt Turi Sent: vrijdag 17 juni 2016 9:32 To: FieldTrip discussion list Subject: [FieldTrip] Difference in trial number per condition Hi, I was wondering if FieldTrip has an optimized solution for such situations when the amount of trials in one condition markedly differs from the number of trials in the other (e.g., the ratio is 1:3 or 1:4). On the website I have found that this issue was already discussed, however, it is not clear to me whether this was indeed addressed by a FieldTrip function. Below is the link about the question I was referring to: http://www.fieldtriptoolbox.org/faq/how_does_a_difference_in_trial_numbers_per_condition_affect_my_statistical_test In case there is no such a function, could someone provide me a rough procedure that is methodologically acceptable in the scientific community to compensate for this issue? I am interested both in conceptual and implementational aspects. I would like to compare TFR or WPLI measures between two conditions and use non-parametric cluster-based permutation test for statistical analysis. My data is characterized by a within-subjects design, in case this is relevant information. Thanks for your input in advance, Zsolt -------------- next part -------------- An HTML attachment was scrubbed... URL: From dlozanosoldevilla at gmail.com Fri Jun 17 11:02:00 2016 From: dlozanosoldevilla at gmail.com (Diego Lozano-Soldevilla) Date: Fri, 17 Jun 2016 11:02:00 +0200 Subject: [FieldTrip] Difference in trial number per condition In-Reply-To: <7CCA2706D7A4DA45931A892DF3C2894C3F956C3C@exprd03.hosting.ru.nl> References: <7CCA2706D7A4DA45931A892DF3C2894C3F956C3C@exprd03.hosting.ru.nl> Message-ID: Hi Zsolt, To complement Stan's suggestions, in case of power differences between conditions, you could use ft_stratify: http://www.fieldtriptoolbox.org/example/stratify best, Diego On 17 June 2016 at 10:51, Pelt, S. van (Stan) wrote: > Hi Zsolt, > > > > The amount to which this may be a concern will depend on the measures you > want to compare. Also, the risk of drawing incorrect (qualitative) > conclusions will of course mainly be large around your statistical > threshold value (e.g. p=0.05). Power differences might become biased if > groups have unequal size, power begin a squared value. See for a suggested > numerical correction method for this, when comparing power spectra or e.g. > Bokil et al., 2007 (http://www.ncbi.nlm.nih.gov/pubmed/16945422), but I > assume there are also other solutions going around. > > > > Best, > > Stan > > > > *From:* fieldtrip-bounces at science.ru.nl [mailto: > fieldtrip-bounces at science.ru.nl] *On Behalf Of *Zsolt Turi > *Sent:* vrijdag 17 juni 2016 9:32 > *To:* FieldTrip discussion list > *Subject:* [FieldTrip] Difference in trial number per condition > > > > Hi, > > > > I was wondering if FieldTrip has an optimized solution for such situations > when the amount of trials in one condition markedly differs from the number > of trials in the other (e.g., the ratio is 1:3 or 1:4). > > > > On the website I have found that this issue was already discussed, > however, it is not clear to me whether this was indeed addressed by a > FieldTrip function. Below is the link about the question I was referring > to: > > > > > http://www.fieldtriptoolbox.org/faq/how_does_a_difference_in_trial_numbers_per_condition_affect_my_statistical_test > > > > In case there is no such a function, could someone provide me a rough > procedure that is methodologically acceptable in the scientific community > to compensate for this issue? > > > > I am interested both in conceptual and implementational aspects. I would > like to compare TFR or WPLI measures between two conditions and use > non-parametric cluster-based permutation test for statistical analysis. My > data is characterized by a within-subjects design, in case this is relevant > information. > > > > Thanks for your input in advance, > > Zsolt > > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > https://mailman.science.ru.nl/mailman/listinfo/fieldtrip > -------------- next part -------------- An HTML attachment was scrubbed... URL: From zsoltturi at gmail.com Fri Jun 17 13:53:17 2016 From: zsoltturi at gmail.com (Zsolt Turi) Date: Fri, 17 Jun 2016 13:53:17 +0200 Subject: [FieldTrip] Difference in trial number per condition In-Reply-To: References: <7CCA2706D7A4DA45931A892DF3C2894C3F956C3C@exprd03.hosting.ru.nl> Message-ID: Hi Stan and Diego, thank you for the input(s), I will try out these procedures. Cheers, Zsolt 2016-06-17 11:02 GMT+02:00 Diego Lozano-Soldevilla < dlozanosoldevilla at gmail.com>: > Hi Zsolt, > To complement Stan's suggestions, in case of power differences between > conditions, you could use ft_stratify: > http://www.fieldtriptoolbox.org/example/stratify > best, > Diego > > > > On 17 June 2016 at 10:51, Pelt, S. van (Stan) > wrote: > >> Hi Zsolt, >> >> >> >> The amount to which this may be a concern will depend on the measures you >> want to compare. Also, the risk of drawing incorrect (qualitative) >> conclusions will of course mainly be large around your statistical >> threshold value (e.g. p=0.05). Power differences might become biased if >> groups have unequal size, power begin a squared value. See for a suggested >> numerical correction method for this, when comparing power spectra or e.g. >> Bokil et al., 2007 (http://www.ncbi.nlm.nih.gov/pubmed/16945422), but I >> assume there are also other solutions going around. >> >> >> >> Best, >> >> Stan >> >> >> >> *From:* fieldtrip-bounces at science.ru.nl [mailto: >> fieldtrip-bounces at science.ru.nl] *On Behalf Of *Zsolt Turi >> *Sent:* vrijdag 17 juni 2016 9:32 >> *To:* FieldTrip discussion list >> *Subject:* [FieldTrip] Difference in trial number per condition >> >> >> >> Hi, >> >> >> >> I was wondering if FieldTrip has an optimized solution for such >> situations when the amount of trials in one condition markedly differs from >> the number of trials in the other (e.g., the ratio is 1:3 or 1:4). >> >> >> >> On the website I have found that this issue was already discussed, >> however, it is not clear to me whether this was indeed addressed by a >> FieldTrip function. Below is the link about the question I was referring >> to: >> >> >> >> >> http://www.fieldtriptoolbox.org/faq/how_does_a_difference_in_trial_numbers_per_condition_affect_my_statistical_test >> >> >> >> In case there is no such a function, could someone provide me a rough >> procedure that is methodologically acceptable in the scientific community >> to compensate for this issue? >> >> >> >> I am interested both in conceptual and implementational aspects. I would >> like to compare TFR or WPLI measures between two conditions and use >> non-parametric cluster-based permutation test for statistical analysis. My >> data is characterized by a within-subjects design, in case this is relevant >> information. >> >> >> >> Thanks for your input in advance, >> >> Zsolt >> >> >> >> _______________________________________________ >> fieldtrip mailing list >> fieldtrip at donders.ru.nl >> https://mailman.science.ru.nl/mailman/listinfo/fieldtrip >> > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > https://mailman.science.ru.nl/mailman/listinfo/fieldtrip > -- Post-doctoral Research Fellow Department of Clinical Neurophysiology Georg-August University, Göttingen Robert-Koch-Str. 40 37075 Goettingen -------------- next part -------------- An HTML attachment was scrubbed... URL: From radiotek at gmail.com Fri Jun 17 16:53:19 2016 From: radiotek at gmail.com (teki) Date: Fri, 17 Jun 2016 15:53:19 +0100 Subject: [FieldTrip] Announcing the Timing Research Forum Message-ID: Dear all, We are pleased to announce the establishment of the Timing Research Forum (TRF), an open community for promoting multidisciplinary research and collaborative work on temporal processing and time perception - http://timingforum.org/. We hope that TRF will serve as a common platform for brain research on all relevant aspects of timing in both health and disease using a combination of methodologies including human psychophysics, cognitive measurement techniques including fMRI, M/EEG, TMS etc., as well as neurophysiological and imaging work in a variety of animal models. We invite you to become members of TRF and participate in advancing the state of timing research through discussions, collaborations, and sharing of resources including code, protocols, data etc. There are no membership fees and the only requirement is to actively pursue research on timing. As a member of TRF, you will have a profile on the website, all your publications will be featured on the publications page, receive members-only newsletters and regular updates on the latest news from the field of timing, and be part of a vibrant research community. To join us, please visit this page - http://timingforum.org/membership/ TRF will also organize annual conferences starting from 2017 that aim to bring together all researchers on timing for highly interactive and open discussions on the latest research in the field - http://timingforum.org/conferences/ Please feel free to follow TRF on Twitter and Facebook for regular updates from the field of timing, and share information about TRF with your colleagues. We look forward to welcoming you to TRF and hope that you will find it a useful platform and contribute actively to the community. With best wishes, Sundeep Teki --- Sundeep Teki PhD Sir Henry Wellcome Fellow Auditory Neuroscience Group Department of Physiology, Anatomy & Genetics University of Oxford South Parks Road, Oxford OX1 3QX Email | Web | Twitter & Argiro Vatakis --- Argiro Vatakis PhD Cognitive Systems Research Institute http://csri.gr/researchers/argiro-vatakis http://www.argirovatakis.com -------------- next part -------------- An HTML attachment was scrubbed... URL: From sarang at cfin.au.dk Fri Jun 17 18:38:53 2016 From: sarang at cfin.au.dk (Sarang S. Dalal) Date: Fri, 17 Jun 2016 16:38:53 +0000 Subject: [FieldTrip] help diagnosing issues with source analysis (pathological brain) In-Reply-To: <5F2CACF1-340B-4514-8B1B-8F477EC8FA9C@donders.ru.nl> References: <575C5D78.7030807@gmail.com> , <5F2CACF1-340B-4514-8B1B-8F477EC8FA9C@donders.ru.nl> Message-ID: <1466181533308.98968@cfin.au.dk> Hi Vitória, I would just add that there is a provision in SPM's normalization procedure to weight or mask areas of your patient's MRI, which you can take advantage of to get much better results. (FieldTrip calls SPM functions behind-the-scenes to implement normalization.) First, you might want to see how 'strange' the default normalization looks. Right before running 'ft_volumenormalise', just run: spm_figure('Create','Graphics'); Then, after ft_volumenormalise finishes, you should see the normalization results compared against the MNI template image. Probably, you will see that they don't match very well. I'm not sure yet how to implement this in your FieldTrip workflow, but you can get started by working with SPM8 directly. Several years ago, we managed to successfully normalize MRIs of patients with brain tumors. We did this by 'painting' the pathological areas with MRIcro to create a mask, saving this mask into its own (binary) MRI file. This masked MRI can then be used by SPM as a 'weight' during the normalization process. You'll want normal brain to have a weight of 1 and the tumor zone to have a weight of 0. Probably this can be converted into command-line functions, but if you use the SPM8 GUI, you would go to "Normalise (Estimate and Write)", select your patient's MRI as the 'Source Image' and 'Images to Write', and the tumor mask as 'Source Weighting Image'. You probably have a T1 MRI, so under 'Template Image' you would select T1.nii. Again, it'll show you the normalized result compared with the template at the end of the process, and hopefully it will have gone better this time. :-) Note that SPM will want to work with Analyze (hdr/img) or Nifti (nii) files, so you'll have to convert them as appropriate. Maybe somebody else can fill you in on the best way to import the resulting normalized MRI back into your FieldTrip pipeline. Cheers Sarang ________________________________ From: fieldtrip-bounces at science.ru.nl on behalf of Schoffelen, J.M. (Jan Mathijs) Sent: Tuesday, June 14, 2016 9:31 AM To: FieldTrip discussion list Subject: Re: [FieldTrip] help diagnosing issues with source analysis (pathological brain) Hi Vitória, To me it looks as if most of the stuff you describe works as expected, i.e. it works well or it gives funny results, apart from the non-linear normalisation. The extremely distorted warped grid points may be due to the patient’s anatomical being pathological, causing the normalisation to converge to a very strange solution. Now, with respect to the plotting/interpolation: if the coordinate systems of the objects you are overlaying don’t match, you get funny results. This is the case for the sourceplot with the surface method (where the default cortical surface is in MNI-RAS), and your functional image is in CTF’s ALS, as well as for the sourceplot with the ortho method, using the blurry template from SPM (which is also in MNI-RAS). If you want these to match up, you could replace the source positions in your functional image with the ones from the standard grid, because you assume topological equivalence as per the inverse warping strategy applied in the creation of the beamformer grid. So, long story short: it seems that your source analysis just went fine, but you are confused by the different coordinate systems. Best, JM On 13 Jun 2016, at 11:02, Vitoria Piai > wrote: Hi Cris, that makes sense, except that the .mri file I'm getting from the hospital should already contain the right fiducial coordinates (or so I was told by the MEG technician). Maybe the issue is that FieldTrip is not getting these coordinates right from the .mri file if I don't run it through ft_volumerealign first. Any thoughts anyone? Thanks again On 12 June 2016 at 13:55, Cristiano Micheli > wrote: Dear Vitoria I had the same problem when I tried to coregister functional and anatomical data without transitioning through a head-referenced coordinates system. I solved the problem by using ft_volumerealign and selecting comparable anatomical fiducials for different subjects (nasion, left, right,..) BEFORE volume normalization. Maybe a hint towards the solution? Cheers Cris On Sat, Jun 11, 2016 at 8:50 PM, Vitória Piai > wrote: Hi everyone, I was hoping someone could help me figure out where my source analysis is going wrong. I have data on brain tumour patients (MRIs are from prior to tumour resection). From the hospital (using CTF), I receive .mri files that already have fiducial points saved as far as I was told. I then reslice and segment the .mri file, after reading it with ft_read_mri mri_reslice = ft_volumereslice([], mri); segmentedmri = ft_volumesegment([], mri_reslice); This seems to be working: Plotting headmodel and sensors, it looks like they are aligned: If I compute the source model with MNI-warping (non-linear transformation), I get something that doesn't seem right. I don't know if this is because these are not normal brains to start with: With linear transformation, things look better: One of my questions is what the consequences are of using linear transformation for the MNI warping given the pathological nature of these brains. Then, the next issue is this result when projecting the source to the surface: This happens regardless of whether I use the MNI-warped grid interpolated to the MNI template, or the patient's individual grid skipping the MNI normalisation step, interpolated to the patient's own T1. But if I plot with 'ortho' method, then I see that the MNI-warped and interpolated source data is misaligned, but the patient-native space one isn't. I can't make sense of this anymore; I've been trying all kinds of things that don't work, so I was wondering whether anyone has an idea of what could be going on by looking at these figures. Is it an error already at the level of alignment of the fiducials? Or is it due to the MNI-warping? Or a combination of issues? Thanks very much for any kind of help! Vitoria _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -------------- next part -------------- An HTML attachment was scrubbed... URL: From amickan1990 at gmail.com Fri Jun 17 18:43:40 2016 From: amickan1990 at gmail.com (Anne Mickan) Date: Fri, 17 Jun 2016 18:43:40 +0200 Subject: [FieldTrip] Theoretical question about cluster-based permutation tests Message-ID: Dear all, I have a theoretical question about cluster-based permutation tests. I've been reading through the website and through Maris & Oostenveld (2007) and I watched the video, all of which left me with the feeling I have a good understanding of *what* the permutation tests is doing (I've also implemented it successfully for my own data). However, I don't yet entirely understand how this test statistic avoids the multiple comparison problem. Particularly I'm wondering how it is that all the tests done initially on a sample-by-sample-basis (step 1 as described in Maris & Oostenveld, p. 180) and the threshold that is used to select samples for clustering (step 2) does not affect the FA. It is referred to a later section, which, however, does not clear it up for me. So I was hoping to get another explanation to fully understand this issue. Thanks a lot in advance. Best, Anne -------------- next part -------------- An HTML attachment was scrubbed... URL: From sarang at cfin.au.dk Fri Jun 17 18:54:04 2016 From: sarang at cfin.au.dk (Sarang S. Dalal) Date: Fri, 17 Jun 2016 16:54:04 +0000 Subject: [FieldTrip] LCMV returns no time series? In-Reply-To: References: , <1465999857376.33093@cfin.au.dk>, Message-ID: <1466182444559.4487@cfin.au.dk> Hi Peter, You likely have an Nvoxels x 1 cell array, which is as expected. Cells corresponding to voxels outside the brain will be empty, while the cells corresponding to voxels inside the brain should each contain an array of size 1xNsamples. (So effectively, you have Nvoxels x Nsamples, just repackaged into a cell array.) Nutmegtrip is designed to visualize and navigate this entire output on your subject's MRI, or you can pull out some voxels of interest and plot the time series with ft_databrowser or with matlab's built-in plot function. Cheers Sarang ________________________________________ From: fieldtrip-bounces at science.ru.nl on behalf of Peter Goodin Sent: Friday, June 17, 2016 3:19 AM To: FieldTrip discussion list Subject: Re: [FieldTrip] LCMV returns no time series? Hi Sarang, Regarding your point on that I should have the time series in source.avg.mom, the function only returns an n x 1 matrix. I've checked the averaged data and it does contain the channel x time series in av.avg, so I'm not really sure what's going on. Peter _______________________ Dr Peter Goodin, Brain and Psychological Sciences Research Centre (BPsyC) Swinburne University, Hawthorn, Vic, 3122 ________________________________________ From: fieldtrip-bounces at science.ru.nl [fieldtrip-bounces at science.ru.nl] on behalf of Sarang S. Dalal [sarang at cfin.au.dk] Sent: Thursday, 16 June 2016 12:10 AM To: FieldTrip discussion list Subject: Re: [FieldTrip] LCMV returns no time series? Hi Peter, If you've used the 'lcmv' method for ft_sourceanalysis, you ought to have the time series already contained in source.avg.mom. I've been working a lot lately on improving the LCMV functionality, but unfortunately haven't had a chance to document much yet. Especially if you are not contrasting different conditions, you might want to try these parameters: cfg.lcmv.weightnorm = 'nai'; % this is a new option :-) cfg.lcmv.fixedori = 'yes'; I also prefer to turn off reducerank, but YMMV: cfg.lcmv.reducerank = 'no'; Finally I've also contributed a viewer that will greatly help visualizing your virtual time series together with the MRI. You can find it in the latest distributions of FieldTrip under fieldtrip/contrib/nutmegtrip. You'll also need a full version of SPM8 in your path (the external in FieldTrip doesn't have all the necessary functions). You​​ can use it like this: cfg = []; cfg.mripath = '/path/to/mri/nii' % must be in nifti (nii) format cfg.funparameter = 'avg.mom' % cfg.atlas = ft_read_atlas('ROI_MNI_V4.nii'); % [optional] you can get atlas labels, if your MRI and grid points are based on the MNI grid nmt_sourceplot_spm8(cfg,ft_convert_units(source,'mm')); Cheers, Sarang ________________________________ From: fieldtrip-bounces at science.ru.nl on behalf of Peter Goodin Sent: Wednesday, June 15, 2016 3:32 PM To: FieldTrip discussion list Subject: [FieldTrip] LCMV returns no time series? Hi FieldTrip list, I'm using LCMV on averaged data (covariancewindow='all') but find the returned source estimates only have a single point. Is there a way to specify the analysis returns the time series for each grid point? Thanks, Peter _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl https://mailman.science.ru.nl/mailman/listinfo/fieldtrip From neuro at aewald.net Sun Jun 19 23:21:11 2016 From: neuro at aewald.net (Arne Ewald) Date: Sun, 19 Jun 2016 23:21:11 +0200 Subject: [FieldTrip] Biomag 2016 Brain Connectivity Analysis Competition Message-ID: Dear colleagues, [apologies for cross-postings] we have just launched a data analysis competition on brain connectivity analysis using EEG and MEG. Detailed information on the challenge and the data to be analyzed can be found at http://bbci.de/supplementary/EEGconnectivity/BBCB.html . At this website, we also offer a basic Matlab-based software framework for generating EEG/MEG data in a realistic head model, plotting results, etc. You and your colleagues are warmly invited to participate in the challenge. Please feel free to pass on this link to anyone else who might be interested. Besides active participation we would also be very happy to just hear your general opinion on the design of the challenge, and about any suggestions for extension (in the future). Our challenge is on of three official data analysis competitions of this year's BIOMAG conference. The invitation to participate in all three challenges is pasted below for your convenience. With best wishes, Arne Ewald and Stefan Haufe -------- Forwarded Message -------- Subject: [megcommunity] Biomag 2016 Data Analysis Competition Date: Mon, 30 May 2016 16:56:31 +0200 From: Ole Jensen Reply-To: Ole Jensen To: MEGCOMMUNITY at JISCMAIL.AC.UK Dear all, We are happy to announce three challenges for the 'Data Analysis Competition' at Biomag 2016. Please see details at http://www.biomag2016.org/data_analysis_competition.php The aim of the competitions is to promote the development and application of new analysis techniques. The challenges will help to elucidate pros and cons of different techniques and attract experts from outside the MEG field. The winners of the competition will be given the opportunity to present their proposal at the Biomag meeting in Seoul (Oct 1-6) in order to spark discussions on analysis. Please encourage colleagues to participate! Best regards, Ole Jensen -- Prof. dr. Ole Jensen http://www.neuosc.com -------------- next part -------------- An HTML attachment was scrubbed... URL: From pooneh.baniasad at gmail.com Mon Jun 20 09:03:51 2016 From: pooneh.baniasad at gmail.com (pooneh baniasad) Date: Mon, 20 Jun 2016 11:33:51 +0430 Subject: [FieldTrip] Generating EEG Message-ID: Dear community, My name is Pouneh Baniasad and I am working on my master thesis in Tehran University of Medical Sciences. I'm trying to generate EEG signal without using any raw data. Actually I want to completely simulating EEG. My question is can Fieldtrip simulate EEG signal? If the answer is yes, what's the procedure? Is it using dipole model or anything e -- Bests Pouneh Baniasad -------------- next part -------------- An HTML attachment was scrubbed... URL: From pgoodin at swin.edu.au Mon Jun 20 11:59:09 2016 From: pgoodin at swin.edu.au (Peter Goodin) Date: Mon, 20 Jun 2016 09:59:09 +0000 Subject: [FieldTrip] LCMV returns no time series? In-Reply-To: <1466182444559.4487@cfin.au.dk> References: , <1465999857376.33093@cfin.au.dk>, , <1466182444559.4487@cfin.au.dk> Message-ID: Hi Sarang, Not sure how I missed that! Thank you for outlining it so succinctly, greatly appreciated! Peter _______________________ Dr Peter Goodin, Brain and Psychological Sciences Research Centre (BPsyC) Swinburne University, Hawthorn, Vic, 3122 ________________________________________ From: fieldtrip-bounces at science.ru.nl [fieldtrip-bounces at science.ru.nl] on behalf of Sarang S. Dalal [sarang at cfin.au.dk] Sent: Saturday, 18 June 2016 2:54 AM To: FieldTrip discussion list Subject: Re: [FieldTrip] LCMV returns no time series? Hi Peter, You likely have an Nvoxels x 1 cell array, which is as expected. Cells corresponding to voxels outside the brain will be empty, while the cells corresponding to voxels inside the brain should each contain an array of size 1xNsamples. (So effectively, you have Nvoxels x Nsamples, just repackaged into a cell array.) Nutmegtrip is designed to visualize and navigate this entire output on your subject's MRI, or you can pull out some voxels of interest and plot the time series with ft_databrowser or with matlab's built-in plot function. Cheers Sarang ________________________________________ From: fieldtrip-bounces at science.ru.nl on behalf of Peter Goodin Sent: Friday, June 17, 2016 3:19 AM To: FieldTrip discussion list Subject: Re: [FieldTrip] LCMV returns no time series? Hi Sarang, Regarding your point on that I should have the time series in source.avg.mom, the function only returns an n x 1 matrix. I've checked the averaged data and it does contain the channel x time series in av.avg, so I'm not really sure what's going on. Peter _______________________ Dr Peter Goodin, Brain and Psychological Sciences Research Centre (BPsyC) Swinburne University, Hawthorn, Vic, 3122 ________________________________________ From: fieldtrip-bounces at science.ru.nl [fieldtrip-bounces at science.ru.nl] on behalf of Sarang S. Dalal [sarang at cfin.au.dk] Sent: Thursday, 16 June 2016 12:10 AM To: FieldTrip discussion list Subject: Re: [FieldTrip] LCMV returns no time series? Hi Peter, If you've used the 'lcmv' method for ft_sourceanalysis, you ought to have the time series already contained in source.avg.mom. I've been working a lot lately on improving the LCMV functionality, but unfortunately haven't had a chance to document much yet. Especially if you are not contrasting different conditions, you might want to try these parameters: cfg.lcmv.weightnorm = 'nai'; % this is a new option :-) cfg.lcmv.fixedori = 'yes'; I also prefer to turn off reducerank, but YMMV: cfg.lcmv.reducerank = 'no'; Finally I've also contributed a viewer that will greatly help visualizing your virtual time series together with the MRI. You can find it in the latest distributions of FieldTrip under fieldtrip/contrib/nutmegtrip. You'll also need a full version of SPM8 in your path (the external in FieldTrip doesn't have all the necessary functions). You​​ can use it like this: cfg = []; cfg.mripath = '/path/to/mri/nii' % must be in nifti (nii) format cfg.funparameter = 'avg.mom' % cfg.atlas = ft_read_atlas('ROI_MNI_V4.nii'); % [optional] you can get atlas labels, if your MRI and grid points are based on the MNI grid nmt_sourceplot_spm8(cfg,ft_convert_units(source,'mm')); Cheers, Sarang ________________________________ From: fieldtrip-bounces at science.ru.nl on behalf of Peter Goodin Sent: Wednesday, June 15, 2016 3:32 PM To: FieldTrip discussion list Subject: [FieldTrip] LCMV returns no time series? Hi FieldTrip list, I'm using LCMV on averaged data (covariancewindow='all') but find the returned source estimates only have a single point. Is there a way to specify the analysis returns the time series for each grid point? Thanks, Peter _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl https://mailman.science.ru.nl/mailman/listinfo/fieldtrip _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl https://mailman.science.ru.nl/mailman/listinfo/fieldtrip From quentin_moreau6 at orange.fr Mon Jun 20 12:50:54 2016 From: quentin_moreau6 at orange.fr (Quentin Moreau) Date: Mon, 20 Jun 2016 12:50:54 +0200 Subject: [FieldTrip] Evoked Power Message-ID: Dear Fieldtrip users, I am new in the EEG analysis, and in Fieldtrip coding. Anyway, for my analysis in the frequency domain, I would like to only have the Evoked Power. After reading a few previous discussions, I realize that the matter isn’t clear for everyone.. My question is this one: would that be a good idea to extract the power from previously computed ERPs, to be sure to only get the Evoked Power ? Thank you for your answers, Quentin Moreau Ph.D. student in Cognitive Social and Affective Neuroscience Department of Psychology AgliotiLab, "Sapienza" University of Rome IRCCS Fondazione Santa Lucia, Rome, Italy email: quentin_moreau6 at orange.fr -------------- next part -------------- An HTML attachment was scrubbed... URL: From ph442 at cam.ac.uk Mon Jun 20 12:53:46 2016 From: ph442 at cam.ac.uk (parham hashemzadeh) Date: Mon, 20 Jun 2016 11:53:46 +0100 Subject: [FieldTrip] Generating EEG In-Reply-To: References: Message-ID: <18671af9961ed227b7f9057f368bd763@cam.ac.uk> Hi Pooneh No it can not generate synthetic data. You will have to define either a set of dipoles or simply define a source function. You will then need to compute the forward problem (BEM) for the defined sources and the given head model. That will then become your raw Syhthetic data. After that, you will need to reconstruct using your generated data. Please note that in order to not commit the inverse error (also known as inverse crime), make sure that you reconstruct on a different mesh. best of luck parham hashemzadeh Senior Research Associate at the University of Cambridge, UK. On 2016-06-20 08:03, pooneh baniasad wrote: > Dear community, > > My name is Pouneh Baniasad and I am working on my master thesis in > Tehran University of Medical Sciences. I'm trying to generate EEG > signal without using any raw data. Actually I want to completely > simulating EEG. My question is can Fieldtrip simulate EEG signal? If > the answer is yes, what's the procedure? Is it using dipole model or > anything e-- > > Bests > > Pouneh Baniasad > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > https://mailman.science.ru.nl/mailman/listinfo/fieldtrip -- best regards Parham Hashemzadeh Research Associate Department of Applied Mathematics and Theoretical Physics University of Cambridge, UK. email: hashemzadeh at damtp.cam.ac.uk From dlozanosoldevilla at gmail.com Mon Jun 20 13:43:02 2016 From: dlozanosoldevilla at gmail.com (Diego Lozano-Soldevilla) Date: Mon, 20 Jun 2016 13:43:02 +0200 Subject: [FieldTrip] Generating EEG In-Reply-To: <18671af9961ed227b7f9057f368bd763@cam.ac.uk> References: <18671af9961ed227b7f9057f368bd763@cam.ac.uk> Message-ID: Hi Pouneh, Please find below some useful example scripts that you can adapt to your needs: http://www.fieldtriptoolbox.org/example/compute_forward_simulated_data_and_apply_a_dipole_fit http://www.fieldtriptoolbox.org/example/compute_forward_simulated_data_and_apply_a_beamformer_scan http://www.fieldtriptoolbox.org/example/combineplanar_pipelineorder best, Diego On 20 June 2016 at 12:53, parham hashemzadeh wrote: > Hi Pooneh > No it can not generate synthetic data. You will have to define either a > set of dipoles or simply define a source function. You will then need to > compute the forward problem (BEM) for the defined sources and the given > head model. That will then become your raw Syhthetic data. > After that, you will need to reconstruct using your generated data. Please > note that in order to not commit the inverse error (also known as inverse > crime), make sure that you reconstruct on a different mesh. > best of luck > parham hashemzadeh > Senior Research Associate at the University of Cambridge, UK. > > On 2016-06-20 08:03, pooneh baniasad wrote: > >> Dear community, >> >> My name is Pouneh Baniasad and I am working on my master thesis in >> Tehran University of Medical Sciences. I'm trying to generate EEG >> signal without using any raw data. Actually I want to completely >> simulating EEG. My question is can Fieldtrip simulate EEG signal? If >> the answer is yes, what's the procedure? Is it using dipole model or >> anything e-- >> >> Bests >> >> Pouneh Baniasad >> _______________________________________________ >> fieldtrip mailing list >> fieldtrip at donders.ru.nl >> https://mailman.science.ru.nl/mailman/listinfo/fieldtrip >> > > -- > best regards > Parham Hashemzadeh > Research Associate > Department of Applied Mathematics and Theoretical Physics > University of Cambridge, UK. > email: hashemzadeh at damtp.cam.ac.uk > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > https://mailman.science.ru.nl/mailman/listinfo/fieldtrip > -------------- next part -------------- An HTML attachment was scrubbed... URL: From hamzaf at sabanciuniv.edu Mon Jun 20 16:29:02 2016 From: hamzaf at sabanciuniv.edu (Hamza Fawzi Altakroury (Alumni)) Date: Mon, 20 Jun 2016 16:29:02 +0200 Subject: [FieldTrip] Interactive alignment for spherical head model Message-ID: Hello, To do an interactive alignment for electrodes with a spherical head model, what should I put in the variable cfg.headshape ? Thank you -- Hamza Fawzi Altakroury Graduate student - MA Faculty of Engineering and Natural Sciences Sabancı University -------------- next part -------------- An HTML attachment was scrubbed... URL: From sauer.mpih at googlemail.com Mon Jun 20 21:22:10 2016 From: sauer.mpih at googlemail.com (Andreas Sauer) Date: Mon, 20 Jun 2016 21:22:10 +0200 Subject: [FieldTrip] Fwd: Coordsys issue ft_sourceplot In-Reply-To: <8EF9FF29-549B-4E5C-9ED3-055147E8DFD0@donders.ru.nl> References: <08B10307-13ED-40F0-9F87-B50EEDAF25CC@gmail.com> <8EF9FF29-549B-4E5C-9ED3-055147E8DFD0@donders.ru.nl> Message-ID: Dear Jan-Mathijs, sorry that I bring up that post again, but I am still having problems with the different coordinate systems in my data. After replacing the .pos field in the source files with the one from the "standard_sourcemodel3d5mm" ft_sourceplot works fine, i.e. the functional data is not rotated anymore. However, the option cfg.atlas doesn't work since I always get the error message "mismatch between the coord sys in the atlas and the coord sys in the data...". I checked the atlas, the functional data (stat) and the anatomy I use for interpolation with ft_determine_coordsys. All three files have RAS orientation. If I change the anatomical label of the axes of the functional data, ft says "neuromag". Unfortunately, the function atlas_lookup works only with "mni", "tal" or "spm". So I see where the error messages comes from... The difference between MNI and neuromas is the unit (mm resp. m), so I thought to use ft_convert_units, but that doesn't work for functional data. Is there any way that I can change the functional data to "MNI" (I thought I did this already)? Sorry if this is a straight forward thing, but I don't see where I make the mistake... Thanks a lot and best wishes, Andreas 2016-06-15 15:06 GMT+02:00 Schoffelen, J.M. (Jan Mathijs) < jan.schoffelen at donders.ru.nl>: > Are you sure that you use the pos-field from the template, i.e. from the > standard_sourcemodel3d5mm? > > Best, > Jan-Mathijs > > On 15 Jun 2016, at 14:31, Andreas Sauer wrote: > > Dear Jan, > > thank you for your email and the example code! > > I tried both ways to convert the coord systems, but unfortunately it still > doesn't work. > > Since I used the tutorial procedure to create my sourcemodel ( > http://www.fieldtriptoolbox.org/tutorial/sourcemodel#subject-specific_grids_that_are_equivalent_across_subjects_in_normalized_space) > I tried first with the easy way of only replacing the .pos field. But the > plots don't change, the sources are still rotated by 90 degrees. Actually, > the .pos fields are already the same before replacing it (see pic). Is > there some error in my code? > > > *% Step1: Load mri file* > *mri = > ft_read_mri('/data/home1/asauer/Projects/RPScZ/Analysis/Beamforming/MRI/HSM12_V2.mri');* > > *% Step 2: Segment the template brain and construct a volume conduction* > *% model (i.e. head model): this is needed for the inside/outside > detection of voxels* > *cfg = [];* > *cfg.output = 'brain';* > *segmentedmri = ft_volumesegment(cfg,anatomy);* > > *cfg = [];* > *cfg.method = 'singleshell';* > *vol = ft_prepare_headmodel(cfg,segmentedmri);* > *vol = ft_convert_units(vol,'m');* > *figure; ft_plot_sens(sens,'style','*b'); hold on; ft_plot_vol(vol)* > > *% Step 3: Load sourcemodel * > *load(fullfile(ft_path,'template/sourcemodel/standard_sourcemodel3d5mm'));* > *template_grid = sourcemodel;* > *clear sourcemodel* > > *% Step 4: Make sourcemodel* > *cfg = [];* > *cfg.grid.warpmni = 'yes';* > *cfg.grid.template = template_grid;* > *cfg.grid.nonlinear = 'yes';* > *cfg.mri = mri;* > *cfg.grid.unit = 'm';* > *grid = ft_prepare_sourcemodel(cfg);* > *figure; hold on;* > *ft_plot_vol(vol,'facecolor','cortex','edgecolor','none'); alpha 0.5; > camlight;* > *ft_plot_mesh(grid.pos(grid.inside,:));* > > > The only thing that is different from the tutorial is the unit > conversion... > > After that I tried the transformation. All worked well until the source > interpolation. ft_sourceinterpolation throws this error: > > *Attempted to access sel(1); index out of bounds because numel(sel)=0.* > > *Error in ft_sourceinterpolate>my_interpn (line 508)* > * ft_progress(sel(1)/num, 'interpolating %.1f%%\n', 100*sel(1)/num);* > > *Error in ft_sourceinterpolate (line 393)* > * interp.inside( sel) = my_interpn(double(functional.inside), ax(sel), > ay(sel), az(sel), 'nearest', cfg.feedback);* > > > which, to be honest, I don't really understand. Sorry... > > Best wishes, > > Andreas > > > 2016-06-14 9:41 GMT+02:00 Schoffelen, J.M. (Jan Mathijs) < > jan.schoffelen at donders.ru.nl>: > >> Dear Andreas, >> >> after having calculated the sources of a MMN paradigm (4D-system), I’d >> like to plot the results on one of the anatomy template files in the >> fieldtrip directory (single_subj_T1_1mm.nii) or alternatively on a MNI T1 >> template file (mni_icbm152_t1_tal_nlin_sym_09a.nii). Unfortunately, this is >> not working well… As you can see on the attached picture, the functional >> data is rotated by 90 degrees. >> >> I guess that something gets mixed because of the different coordsystems >> of functional and anatomical data. The functional data is 4D, which means >> ALS orientation. The anatomical is MNI, so RAS orientation. The plotting >> works fine, if I use a mri file which was converted in field trip (V2.mri) >> and therefore is also in ALS orientation. However, the anatomy doesn’t look >> very pretty… >> >> >> Is there any way that I can transform the functional data to RAS >> orientation or the anatomical data to ALS orientation, respectively? >> >> >> I tried with ft_volumerealign. However, since the template file has no >> fiducials, it is hard to really precisely do this. >> >> >> Fair point. I would however do it the other way around, using the V2 to >> get the transformation from voxel space to MNI-RAS, and then use the >> inverse of the transformation on the functional data: in this case you >> could use ft_volumenormalise, with cfg.nonlinear = ‘no’. Alternatively, if >> you are using this procedure: >> http://www.fieldtriptoolbox.org/tutorial/sourcemodel#subject-specific_grids_that_are_equivalent_across_subjects_in_normalized_space, >> you could directly replace the source.pos of your functional data with the >> template.pos and then do the interpolation. >> >> To summarize: >> >> either: >> >> mri = ft_read_mri(‘V2.mri’); >> mri.coordsys = ‘bti’; >> >> cfg = []; >> cfg.nonlinear=’no’; >> mrin = ft_volumenormalise(cfg, mri); >> >> transform_vox2bti = mri.transform; >> transform_vox2spm = mrin.transform; >> transform_bti2spm = transform_vox2spm/transform_vox2bti >> source = ft_transform_geometry(transform_bti2spm, source); >> >> source_int = ft_sourceinterpolate(somecfg, source, niceanatomical); >> >> or: >> >> source.pos = templat.pos; >> source_int = ft_sourceinterpolate(somecfg, source, niceanatomical); >> >> Best, >> JM >> >> >> >> Any input on how to plot the sources on one of these nice anatomical >> files is highly appreciated! >> >> Thanks and best regards, >> >> Andreas >> >> >> -- >> Dipl.-Psych. Andreas Sauer >> Max Planck Institute for Brain Research >> Deutschordenstraße 46 >> 60528 Frankfurt am Main >> Germany >> >> T: +49 69 96769 278 >> F: +49 69 96769 327 >> Email: sauer.mpih at gmail.com >> www.brain.mpg.de >> _______________________________________________ >> fieldtrip mailing list >> fieldtrip at donders.ru.nl >> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip >> >> >> >> _______________________________________________ >> fieldtrip mailing list >> fieldtrip at donders.ru.nl >> https://mailman.science.ru.nl/mailman/listinfo/fieldtrip >> > > > > -- > Dipl.-Psych. Andreas Sauer > Max Planck Institute for Brain Research > Deutschordenstraße 46 > 60528 Frankfurt am Main > Germany > > T: +49 69 96769 278 > F: +49 69 96769 327 > Email: sauer.mpih at gmail.com > www.brain.mpg.de > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > https://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > https://mailman.science.ru.nl/mailman/listinfo/fieldtrip > -- Dipl.-Psych. Andreas Sauer Max Planck Institute for Brain Research Deutschordenstraße 46 60528 Frankfurt am Main Germany T: +49 69 96769 278 F: +49 69 96769 327 Email: sauer.mpih at gmail.com www.brain.mpg.de -------------- next part -------------- An HTML attachment was scrubbed... URL: From pmetzak at gmail.com Tue Jun 21 02:08:46 2016 From: pmetzak at gmail.com (Paul Metzak) Date: Mon, 20 Jun 2016 17:08:46 -0700 Subject: [FieldTrip] issues compiling matlab code that calls spm and runs a beamformer analysis Message-ID: Hello, I have been attempting to use the MATLAB compile to compile my code and run it on my university's supercomputer. However, I am running into an issue when trying to volume normalise the beamformed images I have created. >From the error messages (see below), the issue arises from an inability to obtain SPM Revision information. I am using SPM8 and it is on my MATLAB path so I am unclear how to avoid this error, or whether it relates to: 1) an issue with my code, 2) what I have on/the order of my MATLAB path, or with the interface between MATLAB/SPM/FieldTrip. If anyone could suggest a workaround, or something that may help me to avoid this error I would be most appreciative. Note: I read that SPM uses a Contents.m file to indicate Revision number and that this file becomes Contents.txt when SPM is compiled to a standalone version but including this file on my MATLAB path both .,m and .txt versions) did not resolve the error. I am very new to compiling so it is possible that I did not do this correctly (if this matters at all). Thanks for any help you can offer, and let me know if any further information would be helpful to diagnose the problem. Paul Converting the coordinate system from ctf to spm > Error using spm>spm_version (line 1269) > Can't obtain SPM Revision information. > Error in spm (line 875) > > > Error in align_ctf2spm (line 121) > > > Error in ft_convert_coordsys (line 95) > > > Error in ft_volumenormalise (line 121) > > > Error in mmcc_beamform_param_twenty3_c2 (line 269) -------------- next part -------------- An HTML attachment was scrubbed... URL: From recasensmarc at gmail.com Tue Jun 21 10:32:31 2016 From: recasensmarc at gmail.com (Marc Recasens) Date: Tue, 21 Jun 2016 09:32:31 +0100 Subject: [FieldTrip] Fwd: Coordsys issue ft_sourceplot In-Reply-To: References: <08B10307-13ED-40F0-9F87-B50EEDAF25CC@gmail.com> <8EF9FF29-549B-4E5C-9ED3-055147E8DFD0@donders.ru.nl> Message-ID: Dear Andreas, I managed to get the AAL atlas labels on ortho-plots by adding the same "coordsys" subfield in both atlas and data files (plus cfg.atlas). I use coordsys = 'spm' even though everything is "mni", I reckon doesn't matter as long as both files share the same "coordsys". Maybe there's a more elegant way to do it but that worked fine for me. atlas = ft_read_atlas(paths_to_AAL_atlas); % read aal atlas atlas.coordsys = 'spm'; interpolated_data.coordsys = 'spm'; cfg_plot = []; cfg_plot.method = 'ortho'; cfg_plot.funparameter = 'pow'; cfg_plot.atlas = atlas; ft_sourceplot(cfg_plot,interpolated_data); Hope it helps Marc On Mon, Jun 20, 2016 at 8:22 PM, Andreas Sauer wrote: > Dear Jan-Mathijs, > > sorry that I bring up that post again, but I am still having problems with > the different coordinate systems in my data. > > After replacing the .pos field in the source files with the one from the > "standard_sourcemodel3d5mm" ft_sourceplot works fine, i.e. the functional > data is not rotated anymore. However, the option cfg.atlas doesn't work > since I always get the error message "mismatch between the coord sys in the > atlas and the coord sys in the data...". > > I checked the atlas, the functional data (stat) and the anatomy I use for > interpolation with ft_determine_coordsys. All three files have RAS > orientation. If I change the anatomical label of the axes of the functional > data, ft says "neuromag". Unfortunately, the function atlas_lookup works > only with "mni", "tal" or "spm". So I see where the error messages comes > from... The difference between MNI and neuromas is the unit (mm resp. m), > so I thought to use ft_convert_units, but that doesn't work for functional > data. > > Is there any way that I can change the functional data to "MNI" (I thought > I did this already)? Sorry if this is a straight forward thing, but I don't > see where I make the mistake... > > Thanks a lot and best wishes, > > Andreas > > 2016-06-15 15:06 GMT+02:00 Schoffelen, J.M. (Jan Mathijs) < > jan.schoffelen at donders.ru.nl>: > >> Are you sure that you use the pos-field from the template, i.e. from the >> standard_sourcemodel3d5mm? >> >> Best, >> Jan-Mathijs >> >> On 15 Jun 2016, at 14:31, Andreas Sauer >> wrote: >> >> Dear Jan, >> >> thank you for your email and the example code! >> >> I tried both ways to convert the coord systems, but unfortunately it >> still doesn't work. >> >> Since I used the tutorial procedure to create my sourcemodel ( >> http://www.fieldtriptoolbox.org/tutorial/sourcemodel#subject-specific_grids_that_are_equivalent_across_subjects_in_normalized_space) >> I tried first with the easy way of only replacing the .pos field. But the >> plots don't change, the sources are still rotated by 90 degrees. Actually, >> the .pos fields are already the same before replacing it (see pic). Is >> there some error in my code? >> >> >> *% Step1: Load mri file* >> *mri = >> ft_read_mri('/data/home1/asauer/Projects/RPScZ/Analysis/Beamforming/MRI/HSM12_V2.mri');* >> >> *% Step 2: Segment the template brain and construct a volume conduction* >> *% model (i.e. head model): this is needed for the inside/outside >> detection of voxels* >> *cfg = [];* >> *cfg.output = 'brain';* >> *segmentedmri = ft_volumesegment(cfg,anatomy);* >> >> *cfg = [];* >> *cfg.method = 'singleshell';* >> *vol = ft_prepare_headmodel(cfg,segmentedmri);* >> *vol = ft_convert_units(vol,'m');* >> *figure; ft_plot_sens(sens,'style','*b'); hold on; ft_plot_vol(vol)* >> >> *% Step 3: Load sourcemodel * >> >> *load(fullfile(ft_path,'template/sourcemodel/standard_sourcemodel3d5mm'));* >> *template_grid = sourcemodel;* >> *clear sourcemodel* >> >> *% Step 4: Make sourcemodel* >> *cfg = [];* >> *cfg.grid.warpmni = 'yes';* >> *cfg.grid.template = template_grid;* >> *cfg.grid.nonlinear = 'yes';* >> *cfg.mri = mri;* >> *cfg.grid.unit = 'm';* >> *grid = ft_prepare_sourcemodel(cfg);* >> *figure; hold on;* >> *ft_plot_vol(vol,'facecolor','cortex','edgecolor','none'); alpha 0.5; >> camlight;* >> *ft_plot_mesh(grid.pos(grid.inside,:));* >> >> >> The only thing that is different from the tutorial is the unit >> conversion... >> >> After that I tried the transformation. All worked well until the source >> interpolation. ft_sourceinterpolation throws this error: >> >> *Attempted to access sel(1); index out of bounds because numel(sel)=0.* >> >> *Error in ft_sourceinterpolate>my_interpn (line 508)* >> * ft_progress(sel(1)/num, 'interpolating %.1f%%\n', 100*sel(1)/num);* >> >> *Error in ft_sourceinterpolate (line 393)* >> * interp.inside( sel) = my_interpn(double(functional.inside), ax(sel), >> ay(sel), az(sel), 'nearest', cfg.feedback);* >> >> >> which, to be honest, I don't really understand. Sorry... >> >> Best wishes, >> >> Andreas >> >> >> 2016-06-14 9:41 GMT+02:00 Schoffelen, J.M. (Jan Mathijs) < >> jan.schoffelen at donders.ru.nl>: >> >>> Dear Andreas, >>> >>> after having calculated the sources of a MMN paradigm (4D-system), I’d >>> like to plot the results on one of the anatomy template files in the >>> fieldtrip directory (single_subj_T1_1mm.nii) or alternatively on a MNI T1 >>> template file (mni_icbm152_t1_tal_nlin_sym_09a.nii). Unfortunately, this is >>> not working well… As you can see on the attached picture, the functional >>> data is rotated by 90 degrees. >>> >>> I guess that something gets mixed because of the different coordsystems >>> of functional and anatomical data. The functional data is 4D, which means >>> ALS orientation. The anatomical is MNI, so RAS orientation. The plotting >>> works fine, if I use a mri file which was converted in field trip (V2.mri) >>> and therefore is also in ALS orientation. However, the anatomy doesn’t look >>> very pretty… >>> >>> >>> Is there any way that I can transform the functional data to RAS >>> orientation or the anatomical data to ALS orientation, respectively? >>> >>> >>> I tried with ft_volumerealign. However, since the template file has no >>> fiducials, it is hard to really precisely do this. >>> >>> >>> Fair point. I would however do it the other way around, using the V2 to >>> get the transformation from voxel space to MNI-RAS, and then use the >>> inverse of the transformation on the functional data: in this case you >>> could use ft_volumenormalise, with cfg.nonlinear = ‘no’. Alternatively, if >>> you are using this procedure: >>> http://www.fieldtriptoolbox.org/tutorial/sourcemodel#subject-specific_grids_that_are_equivalent_across_subjects_in_normalized_space, >>> you could directly replace the source.pos of your functional data with the >>> template.pos and then do the interpolation. >>> >>> To summarize: >>> >>> either: >>> >>> mri = ft_read_mri(‘V2.mri’); >>> mri.coordsys = ‘bti’; >>> >>> cfg = []; >>> cfg.nonlinear=’no’; >>> mrin = ft_volumenormalise(cfg, mri); >>> >>> transform_vox2bti = mri.transform; >>> transform_vox2spm = mrin.transform; >>> transform_bti2spm = transform_vox2spm/transform_vox2bti >>> source = ft_transform_geometry(transform_bti2spm, source); >>> >>> source_int = ft_sourceinterpolate(somecfg, source, niceanatomical); >>> >>> or: >>> >>> source.pos = templat.pos; >>> source_int = ft_sourceinterpolate(somecfg, source, niceanatomical); >>> >>> Best, >>> JM >>> >>> >>> >>> Any input on how to plot the sources on one of these nice anatomical >>> files is highly appreciated! >>> >>> Thanks and best regards, >>> >>> Andreas >>> >>> >>> -- >>> Dipl.-Psych. Andreas Sauer >>> Max Planck Institute for Brain Research >>> Deutschordenstraße 46 >>> 60528 Frankfurt am Main >>> Germany >>> >>> T: +49 69 96769 278 >>> F: +49 69 96769 327 >>> Email: sauer.mpih at gmail.com >>> www.brain.mpg.de >>> _______________________________________________ >>> fieldtrip mailing list >>> fieldtrip at donders.ru.nl >>> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip >>> >>> >>> >>> _______________________________________________ >>> fieldtrip mailing list >>> fieldtrip at donders.ru.nl >>> https://mailman.science.ru.nl/mailman/listinfo/fieldtrip >>> >> >> >> >> -- >> Dipl.-Psych. Andreas Sauer >> Max Planck Institute for Brain Research >> Deutschordenstraße 46 >> 60528 Frankfurt am Main >> Germany >> >> T: +49 69 96769 278 >> F: +49 69 96769 327 >> Email: sauer.mpih at gmail.com >> www.brain.mpg.de >> _______________________________________________ >> fieldtrip mailing list >> fieldtrip at donders.ru.nl >> https://mailman.science.ru.nl/mailman/listinfo/fieldtrip >> >> >> >> >> _______________________________________________ >> fieldtrip mailing list >> fieldtrip at donders.ru.nl >> https://mailman.science.ru.nl/mailman/listinfo/fieldtrip >> > > > > -- > Dipl.-Psych. Andreas Sauer > Max Planck Institute for Brain Research > Deutschordenstraße 46 > 60528 Frankfurt am Main > Germany > > T: +49 69 96769 278 > F: +49 69 96769 327 > Email: sauer.mpih at gmail.com > www.brain.mpg.de > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > https://mailman.science.ru.nl/mailman/listinfo/fieldtrip > -- Marc Recasens Tel.: +44 7845810006 Tel.: +34 639241598 -------------- next part -------------- An HTML attachment was scrubbed... URL: From tineke.snijders at donders.ru.nl Tue Jun 21 11:09:12 2016 From: tineke.snijders at donders.ru.nl (Snijders, T.M. (Tineke)) Date: Tue, 21 Jun 2016 09:09:12 +0000 Subject: [FieldTrip] Theoretical question about cluster-based permutation tests In-Reply-To: References: Message-ID: <815A9820E75FBC4F96B7CD3A8089D11C378EA2A6@exprd04.hosting.ru.nl> Hi Anne, All the tests you do initially and the threshold that is used to select samples for clustering do not affect the FA because they only determine whether a sample-point will be included in a cluster, they do not determine significance. In the end you are only doing ONE test to determine significance, and that is to test whether such a large cluster could have occurred by chance. And you do that by the permutation test, by permuting the data and looking at how large the clusters get when the data would have been random. Then you compare your cluster-statistic to the random distribution of cluster-statistics, and if that large a cluster only happens in <5% of the cases you call it significant. So that's only one test. Note that also in the random data there will be clusters formed of which the sample-points survive the initial thresholds, and if you use e.g. a lower threshold for selecting samples for clustering, this means you will get larger clusters. But, then also your 'real' cluster should be larger to survive the 'significance' question: "how probable is it to see such a large cluster in random data (using these settings)?" Hope this helps, Cheers, Tineke ________________________________ From: fieldtrip-bounces at science.ru.nl [fieldtrip-bounces at science.ru.nl] on behalf of Anne Mickan [amickan1990 at gmail.com] Sent: Friday, June 17, 2016 6:43 PM To: fieldtrip at science.ru.nl Subject: [FieldTrip] Theoretical question about cluster-based permutation tests Dear all, I have a theoretical question about cluster-based permutation tests. I've been reading through the website and through Maris & Oostenveld (2007) and I watched the video, all of which left me with the feeling I have a good understanding of what the permutation tests is doing (I've also implemented it successfully for my own data). However, I don't yet entirely understand how this test statistic avoids the multiple comparison problem. Particularly I'm wondering how it is that all the tests done initially on a sample-by-sample-basis (step 1 as described in Maris & Oostenveld, p. 180) and the threshold that is used to select samples for clustering (step 2) does not affect the FA. It is referred to a later section, which, however, does not clear it up for me. So I was hoping to get another explanation to fully understand this issue. Thanks a lot in advance. Best, Anne -------------- next part -------------- An HTML attachment was scrubbed... URL: From frsantos at fpce.up.pt Tue Jun 21 16:17:46 2016 From: frsantos at fpce.up.pt (Fernando Ferreira-Santos) Date: Tue, 21 Jun 2016 14:17:46 +0000 Subject: [FieldTrip] 2016 Porto EEG/ERP Summer School Message-ID: <2BAB036A9BAEA44984A131DFCE44610801B5468106@SRVMBX01.fpceup.psi.up.pt> Dear colleagues, The Laboratory of Neuropsychopsysiology of the University of Porto (http://www.fpce.up.pt/labpsi/) is pleased to announce the 5th edition of the International Cognitive and Affective Neurophysiology Summer School: Acquisition, processing, and analysis of EEG signal. This summer school is focused on the application of Electroencephalography (EEG) and Event Related Potential (ERP) techniques to the study of cognitive and affective processes. This 36h course will be fully taught in English and is aimed at an introductory level, so no previous experience with EEG or ERP is required. This event will take place from 5-9 of September 2016 in the lovely city of Porto. In last year's edition the course was fully booked and, as such, we recommend early registration (course places are attributed by order of registration). The registration deadline is July 31st. For additional details and instructions on how to register, please consult our website (http://www.fpce.up.pt/labpsi/summerschool/). Please feel free to pass this information along to students or researchers that may be potentially interested. Thanks you and best wishes, -- Fernando Ferreira-Santos, PhD Lecturer Laboratory of Neuropsychophysiology Faculty of Psychology and Education Sciences University of Porto Rua Alfredo Allen, 4200-135 Porto (Portugal) Tel.: +351 226079700 (ext. 409) E-mail: frsantos at fpce.up.pt http://www.fpce.up.pt/labpsi/ -------------- next part -------------- An HTML attachment was scrubbed... URL: From zhangk28 at mcmaster.ca Tue Jun 21 20:55:54 2016 From: zhangk28 at mcmaster.ca (KAIJIE ZHANG) Date: Tue, 21 Jun 2016 14:55:54 -0400 Subject: [FieldTrip] topoplotTFR 2 Channels Not Showing Message-ID: Hi Community, My name is Kaijie Zhang, and I am working with near infrared spectroscopy to analyze functional connectivity in the brain. Everything related to this issue is in a dropbox .zip file via the link here: https://www.dropbox.com/s/umhd6k9uzhieg69/topoplotTFR%20Channels%20Issue.zip?dl=0 First, layoutFieldTrip (self-written script) was used to set up the layout for topoplotTFR. I have successfully used ft_freqanalysis to calculate the coherence for my data. This was done in the function magnitudeSquaredCoherence (self-written). topoplotTFR was then invoked in the last segment of magnitudeSquaredCoherence. The image produced is shown in the .jpeg file named "topoplotTFR Channel Issue", in the zip file. Everything seems to be correct, except for the fact that two channels are missing, in particular channels 23 and 24 in the left posterior side (all 46 channels should produce a symmetrical figure). I am not sure for the cause of this because no errors are produced, and I have labeled everything correctly in layout, as well as their positions. The cfg and data I used for topoplotTFR are displayed as follows: cfg = layout: [1x1 struct] refchannel: 'Ch1' baseline: 'no' xlim: 'maxmin' zlim: 'maxmin' ylim: 'maxmin' marker: 'labels' style: 'both' shading: 'interp' comment: 'no' colorbar: 'EastOutside' directionality: 'outflow' data = label: {46x1 cell} dimord: 'rpt_chan_freq' freq: [1x19 double] powspctrm: [5x46x19 double] labelcmb: {2116x2 cell} crsspctrm: [5x2116x19 double] cumsumcnt: [304 301 303 301 3002] cumtapcnt: [5x1 double] cfg: [1x1 struct] My raw data and self-written MATLAB codes are also attached in the zip file. They can be run after extracting. (Make sure to cd to the correct folder containing all the extracted files!). Thank you very much for any input! Best Regards, Kaijie Zhang -- Kaijie Zhang Electrical & Biomedical Engineering, Level III McMaster University -------------- next part -------------- An HTML attachment was scrubbed... URL: From sauer.mpih at googlemail.com Tue Jun 21 22:14:25 2016 From: sauer.mpih at googlemail.com (Andreas Sauer) Date: Tue, 21 Jun 2016 22:14:25 +0200 Subject: [FieldTrip] Fwd: Coordsys issue ft_sourceplot In-Reply-To: References: <08B10307-13ED-40F0-9F87-B50EEDAF25CC@gmail.com> <8EF9FF29-549B-4E5C-9ED3-055147E8DFD0@donders.ru.nl> Message-ID: Dear Marc, thanks for your comment! It works fine. Best, Andreas 2016-06-21 10:32 GMT+02:00 Marc Recasens : > Dear Andreas, > > I managed to get the AAL atlas labels on ortho-plots by adding the same > "coordsys" subfield in both atlas and data files (plus cfg.atlas). I use > coordsys = 'spm' even though everything is "mni", I reckon doesn't matter > as long as both files share the same "coordsys". Maybe there's a more > elegant way to do it but that worked fine for me. > > atlas = ft_read_atlas(paths_to_AAL_atlas); > % read aal atlas > atlas.coordsys = 'spm'; > interpolated_data.coordsys = 'spm'; > cfg_plot = []; > cfg_plot.method = 'ortho'; > cfg_plot.funparameter = 'pow'; > cfg_plot.atlas = atlas; > ft_sourceplot(cfg_plot,interpolated_data); > > Hope it helps > Marc > > > On Mon, Jun 20, 2016 at 8:22 PM, Andreas Sauer > wrote: > >> Dear Jan-Mathijs, >> >> sorry that I bring up that post again, but I am still having problems >> with the different coordinate systems in my data. >> >> After replacing the .pos field in the source files with the one from the >> "standard_sourcemodel3d5mm" ft_sourceplot works fine, i.e. the functional >> data is not rotated anymore. However, the option cfg.atlas doesn't work >> since I always get the error message "mismatch between the coord sys in the >> atlas and the coord sys in the data...". >> >> I checked the atlas, the functional data (stat) and the anatomy I use for >> interpolation with ft_determine_coordsys. All three files have RAS >> orientation. If I change the anatomical label of the axes of the functional >> data, ft says "neuromag". Unfortunately, the function atlas_lookup works >> only with "mni", "tal" or "spm". So I see where the error messages comes >> from... The difference between MNI and neuromas is the unit (mm resp. m), >> so I thought to use ft_convert_units, but that doesn't work for functional >> data. >> >> Is there any way that I can change the functional data to "MNI" (I >> thought I did this already)? Sorry if this is a straight forward thing, but >> I don't see where I make the mistake... >> >> Thanks a lot and best wishes, >> >> Andreas >> >> 2016-06-15 15:06 GMT+02:00 Schoffelen, J.M. (Jan Mathijs) < >> jan.schoffelen at donders.ru.nl>: >> >>> Are you sure that you use the pos-field from the template, i.e. from the >>> standard_sourcemodel3d5mm? >>> >>> Best, >>> Jan-Mathijs >>> >>> On 15 Jun 2016, at 14:31, Andreas Sauer >>> wrote: >>> >>> Dear Jan, >>> >>> thank you for your email and the example code! >>> >>> I tried both ways to convert the coord systems, but unfortunately it >>> still doesn't work. >>> >>> Since I used the tutorial procedure to create my sourcemodel ( >>> http://www.fieldtriptoolbox.org/tutorial/sourcemodel#subject-specific_grids_that_are_equivalent_across_subjects_in_normalized_space) >>> I tried first with the easy way of only replacing the .pos field. But the >>> plots don't change, the sources are still rotated by 90 degrees. Actually, >>> the .pos fields are already the same before replacing it (see pic). Is >>> there some error in my code? >>> >>> >>> *% Step1: Load mri file* >>> *mri = >>> ft_read_mri('/data/home1/asauer/Projects/RPScZ/Analysis/Beamforming/MRI/HSM12_V2.mri');* >>> >>> *% Step 2: Segment the template brain and construct a volume conduction* >>> *% model (i.e. head model): this is needed for the inside/outside >>> detection of voxels* >>> *cfg = [];* >>> *cfg.output = 'brain';* >>> *segmentedmri = ft_volumesegment(cfg,anatomy);* >>> >>> *cfg = [];* >>> *cfg.method = 'singleshell';* >>> *vol = ft_prepare_headmodel(cfg,segmentedmri);* >>> *vol = ft_convert_units(vol,'m');* >>> *figure; ft_plot_sens(sens,'style','*b'); hold on; ft_plot_vol(vol)* >>> >>> *% Step 3: Load sourcemodel * >>> >>> *load(fullfile(ft_path,'template/sourcemodel/standard_sourcemodel3d5mm'));* >>> *template_grid = sourcemodel;* >>> *clear sourcemodel* >>> >>> *% Step 4: Make sourcemodel* >>> *cfg = [];* >>> *cfg.grid.warpmni = 'yes';* >>> *cfg.grid.template = template_grid;* >>> *cfg.grid.nonlinear = 'yes';* >>> *cfg.mri = mri;* >>> *cfg.grid.unit = 'm';* >>> *grid = ft_prepare_sourcemodel(cfg);* >>> *figure; hold on;* >>> *ft_plot_vol(vol,'facecolor','cortex','edgecolor','none'); alpha 0.5; >>> camlight;* >>> *ft_plot_mesh(grid.pos(grid.inside,:));* >>> >>> >>> The only thing that is different from the tutorial is the unit >>> conversion... >>> >>> After that I tried the transformation. All worked well until the source >>> interpolation. ft_sourceinterpolation throws this error: >>> >>> *Attempted to access sel(1); index out of bounds because numel(sel)=0.* >>> >>> *Error in ft_sourceinterpolate>my_interpn (line 508)* >>> * ft_progress(sel(1)/num, 'interpolating %.1f%%\n', 100*sel(1)/num);* >>> >>> *Error in ft_sourceinterpolate (line 393)* >>> * interp.inside( sel) = my_interpn(double(functional.inside), >>> ax(sel), ay(sel), az(sel), 'nearest', cfg.feedback);* >>> >>> >>> which, to be honest, I don't really understand. Sorry... >>> >>> Best wishes, >>> >>> Andreas >>> >>> >>> 2016-06-14 9:41 GMT+02:00 Schoffelen, J.M. (Jan Mathijs) < >>> jan.schoffelen at donders.ru.nl>: >>> >>>> Dear Andreas, >>>> >>>> after having calculated the sources of a MMN paradigm (4D-system), I’d >>>> like to plot the results on one of the anatomy template files in the >>>> fieldtrip directory (single_subj_T1_1mm.nii) or alternatively on a MNI T1 >>>> template file (mni_icbm152_t1_tal_nlin_sym_09a.nii). Unfortunately, this is >>>> not working well… As you can see on the attached picture, the functional >>>> data is rotated by 90 degrees. >>>> >>>> I guess that something gets mixed because of the different coordsystems >>>> of functional and anatomical data. The functional data is 4D, which means >>>> ALS orientation. The anatomical is MNI, so RAS orientation. The plotting >>>> works fine, if I use a mri file which was converted in field trip (V2.mri) >>>> and therefore is also in ALS orientation. However, the anatomy doesn’t look >>>> very pretty… >>>> >>>> >>>> Is there any way that I can transform the functional data to RAS >>>> orientation or the anatomical data to ALS orientation, respectively? >>>> >>>> >>>> I tried with ft_volumerealign. However, since the template file has no >>>> fiducials, it is hard to really precisely do this. >>>> >>>> >>>> Fair point. I would however do it the other way around, using the V2 to >>>> get the transformation from voxel space to MNI-RAS, and then use the >>>> inverse of the transformation on the functional data: in this case you >>>> could use ft_volumenormalise, with cfg.nonlinear = ‘no’. Alternatively, if >>>> you are using this procedure: >>>> http://www.fieldtriptoolbox.org/tutorial/sourcemodel#subject-specific_grids_that_are_equivalent_across_subjects_in_normalized_space, >>>> you could directly replace the source.pos of your functional data with the >>>> template.pos and then do the interpolation. >>>> >>>> To summarize: >>>> >>>> either: >>>> >>>> mri = ft_read_mri(‘V2.mri’); >>>> mri.coordsys = ‘bti’; >>>> >>>> cfg = []; >>>> cfg.nonlinear=’no’; >>>> mrin = ft_volumenormalise(cfg, mri); >>>> >>>> transform_vox2bti = mri.transform; >>>> transform_vox2spm = mrin.transform; >>>> transform_bti2spm = transform_vox2spm/transform_vox2bti >>>> source = ft_transform_geometry(transform_bti2spm, source); >>>> >>>> source_int = ft_sourceinterpolate(somecfg, source, niceanatomical); >>>> >>>> or: >>>> >>>> source.pos = templat.pos; >>>> source_int = ft_sourceinterpolate(somecfg, source, niceanatomical); >>>> >>>> Best, >>>> JM >>>> >>>> >>>> >>>> Any input on how to plot the sources on one of these nice anatomical >>>> files is highly appreciated! >>>> >>>> Thanks and best regards, >>>> >>>> Andreas >>>> >>>> >>>> -- >>>> Dipl.-Psych. Andreas Sauer >>>> Max Planck Institute for Brain Research >>>> Deutschordenstraße 46 >>>> 60528 Frankfurt am Main >>>> Germany >>>> >>>> T: +49 69 96769 278 >>>> F: +49 69 96769 327 >>>> Email: sauer.mpih at gmail.com >>>> www.brain.mpg.de >>>> _______________________________________________ >>>> fieldtrip mailing list >>>> fieldtrip at donders.ru.nl >>>> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip >>>> >>>> >>>> >>>> _______________________________________________ >>>> fieldtrip mailing list >>>> fieldtrip at donders.ru.nl >>>> https://mailman.science.ru.nl/mailman/listinfo/fieldtrip >>>> >>> >>> >>> >>> -- >>> Dipl.-Psych. Andreas Sauer >>> Max Planck Institute for Brain Research >>> Deutschordenstraße 46 >>> 60528 Frankfurt am Main >>> Germany >>> >>> T: +49 69 96769 278 >>> F: +49 69 96769 327 >>> Email: sauer.mpih at gmail.com >>> www.brain.mpg.de >>> _______________________________________________ >>> fieldtrip mailing list >>> fieldtrip at donders.ru.nl >>> https://mailman.science.ru.nl/mailman/listinfo/fieldtrip >>> >>> >>> >>> >>> _______________________________________________ >>> fieldtrip mailing list >>> fieldtrip at donders.ru.nl >>> https://mailman.science.ru.nl/mailman/listinfo/fieldtrip >>> >> >> >> >> -- >> Dipl.-Psych. Andreas Sauer >> Max Planck Institute for Brain Research >> Deutschordenstraße 46 >> 60528 Frankfurt am Main >> Germany >> >> T: +49 69 96769 278 >> F: +49 69 96769 327 >> Email: sauer.mpih at gmail.com >> www.brain.mpg.de >> >> _______________________________________________ >> fieldtrip mailing list >> fieldtrip at donders.ru.nl >> https://mailman.science.ru.nl/mailman/listinfo/fieldtrip >> > > > > -- > Marc Recasens > > Tel.: +44 7845810006 > Tel.: +34 639241598 > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > https://mailman.science.ru.nl/mailman/listinfo/fieldtrip > -- Dipl.-Psych. Andreas Sauer Max Planck Institute for Brain Research Deutschordenstraße 46 60528 Frankfurt am Main Germany T: +49 69 96769 278 F: +49 69 96769 327 Email: sauer.mpih at gmail.com www.brain.mpg.de -------------- next part -------------- An HTML attachment was scrubbed... URL: From pgoodin at swin.edu.au Tue Jun 21 23:44:08 2016 From: pgoodin at swin.edu.au (Peter Goodin) Date: Tue, 21 Jun 2016 21:44:08 +0000 Subject: [FieldTrip] Compensation for maxfilter in source analysis? Message-ID: Hi list, Just wondering if there's a best practice for source analysis of neuromag maxfiltered data using fieldtrip? Does the lead field need to be normalised to compensate for the mags / grads? If yes, zscore? Smallest eigenvalues? Something else? Does the rank of the source analysis need to be reduced because of the lowered dimensionality of the data? As I used tsss and if it needs to be reduced, should I reduce based on individual eigenvalues (eg diagonal S from SVD) or a fixed value (~60)? Thanks and sorry for the barrage of questions. Peter -------------- next part -------------- An HTML attachment was scrubbed... URL: From pooneh.baniasad at gmail.com Wed Jun 22 08:02:43 2016 From: pooneh.baniasad at gmail.com (pooneh baniasad) Date: Wed, 22 Jun 2016 10:32:43 +0430 Subject: [FieldTrip] Generating EEG In-Reply-To: References: <18671af9961ed227b7f9057f368bd763@cam.ac.uk> Message-ID: ​Dear Pa​rham & Diego Thanks for your suggestions. 😊 On Mon, Jun 20, 2016 at 4:13 PM, Diego Lozano-Soldevilla < dlozanosoldevilla at gmail.com> wrote: > Hi Pouneh, > > Please find below some useful example scripts that you can adapt to your > needs: > > > http://www.fieldtriptoolbox.org/example/compute_forward_simulated_data_and_apply_a_dipole_fit > > http://www.fieldtriptoolbox.org/example/compute_forward_simulated_data_and_apply_a_beamformer_scan > http://www.fieldtriptoolbox.org/example/combineplanar_pipelineorder > > best, > > Diego > > > > On 20 June 2016 at 12:53, parham hashemzadeh wrote: > >> Hi Pooneh >> No it can not generate synthetic data. You will have to define either a >> set of dipoles or simply define a source function. You will then need to >> compute the forward problem (BEM) for the defined sources and the given >> head model. That will then become your raw Syhthetic data. >> After that, you will need to reconstruct using your generated data. >> Please note that in order to not commit the inverse error (also known as >> inverse crime), make sure that you reconstruct on a different mesh. >> best of luck >> parham hashemzadeh >> Senior Research Associate at the University of Cambridge, UK. >> >> On 2016-06-20 08:03, pooneh baniasad wrote: >> >>> Dear community, >>> >>> My name is Pouneh Baniasad and I am working on my master thesis in >>> Tehran University of Medical Sciences. I'm trying to generate EEG >>> signal without using any raw data. Actually I want to completely >>> simulating EEG. My question is can Fieldtrip simulate EEG signal? If >>> the answer is yes, what's the procedure? Is it using dipole model or >>> anything e-- >>> >>> Bests >>> >>> Pouneh Baniasad >>> _______________________________________________ >>> fieldtrip mailing list >>> fieldtrip at donders.ru.nl >>> https://mailman.science.ru.nl/mailman/listinfo/fieldtrip >>> >> >> -- >> best regards >> Parham Hashemzadeh >> Research Associate >> Department of Applied Mathematics and Theoretical Physics >> University of Cambridge, UK. >> email: hashemzadeh at damtp.cam.ac.uk >> _______________________________________________ >> fieldtrip mailing list >> fieldtrip at donders.ru.nl >> https://mailman.science.ru.nl/mailman/listinfo/fieldtrip >> > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > https://mailman.science.ru.nl/mailman/listinfo/fieldtrip > -- Bests Pouneh Baniasad -------------- next part -------------- An HTML attachment was scrubbed... URL: From carsten.wolters at uni-muenster.de Wed Jun 22 08:29:45 2016 From: carsten.wolters at uni-muenster.de (Carsten Wolters) Date: Wed, 22 Jun 2016 08:29:45 +0200 Subject: [FieldTrip] Early Stage Researcher position available in EU-ITN project ChildBrain In-Reply-To: <79D7BF5F-97B6-436B-AA7C-1801AF32F7A1@donders.ru.nl> References: <79D7BF5F-97B6-436B-AA7C-1801AF32F7A1@donders.ru.nl> Message-ID: <331808D9-7527-485B-A8EF-91A9218B1AAC@uni-muenster.de> Early Stage Researcher (ESR) / Doctoral Student Neuroscientist with focus on the EEG/MEG inverse problem (project ESR14) The medical faculty of the University of Münster, Germany, invites applications for an Early Stage Researcher (ESR) / Doctoral Student Ref. 11298 Start is 01.07.2016 for a full-time fixed-term position beginning as soon as possible with funding for 26 months with a possible extension to work on the Electroencephalography (EEG) and Magnetoencephalography (MEG) inverse problem in realistic children head volume conductor models within the ChildBrain consortium (“Advancing brain research in children’s developmental neurocognitive disorders”). ChildBrain is part of the Marie Skłodowska-Curie Actions (MSCA) Innovative Training Networks (ITN). More detailed informations about the ChildBrain project, the ChildBrain consortium and especially more informations for this position, namely the ESR14 project, can be found on www.childbrain.eu . The ESR is expected to pursue a PhD degree at WWU Münster, either the Dr.rer.nat. at the Faculty of Mathematics and Computer Science or the Dr.rer.medic. (see http://campus.uni-muenster.de/395.html?&L=1 ) at the Faculty of Medicine. Therefore, prerequisite for the candidate is a Master’s degree in a relevant academic area such as applied mathematics, computer science, physics, biomedical or electrical engineering or similar disciplines. Good programming expertise in Matlab and/or C++ and experience with the Linux operating system is expected, because large software toolboxes are used and further developed. The working language is English. The applicant’s merits are assessed on the basis of the quality of Master’s level studies and thesis, previous experience with numerical mathematics, inverse problems, software development, motivation and research interests. The location for this research will mainly be the workgroups “SIM-NEURO: Stimulation, Imaging and Modeling of NEUROnal networks” of PD Dr. Wolters at the Institute for Biomagnetism and Biosignalanalysis (IBB) and “Imaging” of Prof. Dr. Martin Burger at the Institute for Computational and Applied Mathematics, both at the University of Münster in Germany. Expected close collaborations and visits are to the partnering institutes, namely Aston University in England, the KU Leuven and Icometrix in Leuven, Belgium. The salary, based on the Marie Curie Program regulations, is competitive and consists of living and mobility allowance and a possible family allowance. Note that we can only hire ESR’s, who are in the first four years of his/her research career and do not have a doctoral degree. Furthermore, they should not have resided in Germany for more than 12 months in the 3 years immediately prior to the recruitment date and not have carried out their main activity (work, studies, etc.) in Germany. Appointee is subject to a six-months trial period. The application should include a statement of research interests and reasons for applying to the ESR14 project, a curriculum vitae (max. 5 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 until 29.6.2016, please send the above documents as pdfs to PD Dr.rer.nat. Carsten Wolters, Institute for Biomagnetism and Biosignalanalysis, University of Münster, Malmedyweg 15, 48149 Münster, Germany, or by Email to carstenDOTwoltersATuni-muensterDOTde. For additional information please see the ChildBrain website (www.childbrain.eu ) or contact PD Dr. Carsten Wolters (Email: carstenDOTwoltersATuni-muensterDOTde, Phone: +49 (0)251 / 83-56904). Applications of women are specifically invited. In the case of similar qualifications, competence, and specific achievements, women will be considered on preferential terms within the framework of the legal possibilities. Handicapped candidates with equivalent qualifications will be given preference. Official link of the position: http://klinikum.uni-muenster.de/index.php?id=3290&tx_ttnews%5Btt_news%5D=6277&cHash=cc9fda89011a31171278368cedc4ec4c -------------- next part -------------- An HTML attachment was scrubbed... URL: From seymourr at aston.ac.uk Wed Jun 22 12:06:17 2016 From: seymourr at aston.ac.uk (Seymour, Robert (Research Student)) Date: Wed, 22 Jun 2016 10:06:17 +0000 Subject: [FieldTrip] trigger info Message-ID: Hi Carine, During my pipeline I downsample before ICA, however the trigger information is left intact. Maybe if you attach your ICA code we could help... Robert Seymour (PhD Student, Aston Brain Centre) -------------- next part -------------- An HTML attachment was scrubbed... URL: From carine.signoret at liu.se Wed Jun 22 12:39:29 2016 From: carine.signoret at liu.se (Carine Signoret) Date: Wed, 22 Jun 2016 12:39:29 +0200 Subject: [FieldTrip] trigger info In-Reply-To: References: Message-ID: Hi Robert, Thank you so much for your reply! In my preprocessing steps, I select the MEG electrodes only, so I loose the trigger information (that is the STI101 channel). So it is not due to downsample but to the fact that I suppressed the channel myself (I still have the info for the triggers I have selected during the preprocessing step -trialinfo-, BUT NOT for the other following triggers that should appear in the segments)... However, if I keep all channels, I wonder that since the trigger channel send a pulse signal at 250Hz, if I downsample below this value (e.g. 150Hz), will I loose the pulse signal? That was my question. What do you think? Best regards, Carine Le 2016-06-22 à 12:06, Seymour, Robert (Research Student) a écrit : > > Hi Carine, > > During my pipeline I downsample before ICA, however the trigger > information is left intact. Maybe if you attach your ICA code we could > help… > > Robert Seymour (PhD Student, Aston Brain Centre) > > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > https://mailman.science.ru.nl/mailman/listinfo/fieldtrip -------------- next part -------------- An HTML attachment was scrubbed... URL: From tiany20032003 at 163.com Wed Jun 22 20:23:52 2016 From: tiany20032003 at 163.com (ty) Date: Thu, 23 Jun 2016 02:23:52 +0800 (CST) Subject: [FieldTrip] Through a Glass, Darkly: the Influence of the EEG Reference on Inference about Brain Function and Disorders Message-ID: <2d4bc578.157.155795aaa74.Coremail.tiany20032003@163.com> Dear all, Since its discovery, the human electroencephalogram (EEG) has proven itself an indispensable tool for brain research. Despite this success story, there is a fundamental technical issue that has yet to be resolved: the selection of the correct EEG reference. Ideally one would like to measure neural activity restricted to certain brain regions. Since EEG amplifiers measure potential difference between the activities recorded by two electrodes, in addition to the active electrode, one must employ a reference electrode which should ideally be at zero. In theory, this might be achieved by placing the reference at a point infinitely far away. Yet the “infinite reference”, in practice, is an antenna for ambient noise which would preempt brain measurements—for example cephalic references that minimize unwanted signal pickup. Examples of such references are the unilateral-mastoid, ear, linked mastoids or ears, vertex, the tip of the nose, neck ring, etc. Unfortunately all such references are doomed to fail since there is no point on the scalp or body surface where the potential is actually zero or a constant. This has serious consequences since the non-neutral reference may itself reflect physiological dynamic processes that will be inevitably embedded into all EEG recordings. Without solving the reference issue we are looking at brain activity, as it were, “through a glass, darkly”. Recent attempts to make this “glass” more transparent have been based on mathematically constructing a reference based on physical principles and subtracting it from all EEG recordings. The best known example is the average reference (AVE). Originally proposed with an analog implementation, it was heuristically espoused by Lehman (1971) and later theoretically justified since the average of a dipole potential over a spherical surface is zero. Consequently, the AVE might be a good choice when a dense and whole brain coverage of an EEG montage is available, which explains why it is widely accepted. Nevertheless, AVE has poor performance with a lower number of electrodes. An alternative is the Reference Electrode Standardization Technique (REST) which used a re-referencing method to reconstruct the desired zero or neutral reference, based on the fact that the underlying neural sources are the same no matter what a reference is actually adopted. This Research Topic will encourage the objective comparison of the effect that various EEG references may have on inference about brain function and disorders—with respect to both physical and computational issues. The crucial point is to determine the reference that best identifies neural activity and therefore be the basis of improved estimates of various linear and non-linear EEG features. These include spectra, amplitude, latency, coherence/correlation, network, symmetry/asymmetry, fractal dimension, complexity, covariance and related statistical tests. If a single reference can be finally recognized universally as the optimal one for general use, we will have indeed rendered the “glass less opaque” and thus “know in part” more about brain function. To contribute to this end, we welcome our colleagues to submit paper with theoretical work, simulation studies, practical experimental data analysis as well as critical reviews. Important Note: All submissions/contributions to this Research Topic must be in line with the scope of the journal and section they are submitted to. While authors are encouraged to draw from other disciplines to enrich their papers where relevant, they must ensure papers fall within the section, as expressed in its Scope. Keywords: EEG, reference, ERPs Detailed information can be found at: http://journal.frontiersin.org/researchtopic/4932/ With best wishes, --------------- Yin Tian, PhD Associate Professor Biomedical engineering department ChongQing University of Posts and Telecommunications, China, 400065 -------------- next part -------------- An HTML attachment was scrubbed... URL: From Elana.Harris at cchmc.org Thu Jun 23 06:19:15 2016 From: Elana.Harris at cchmc.org (Harris, Elana) Date: Thu, 23 Jun 2016 04:19:15 +0000 Subject: [FieldTrip] Through a Glass, Darkly: the Influence of the EEG Reference on Inference about Brain Function and Disorders In-Reply-To: <2d4bc578.157.155795aaa74.Coremail.tiany20032003@163.com> References: <2d4bc578.157.155795aaa74.Coremail.tiany20032003@163.com> Message-ID: Thank you for sharing this Dr. Tian. What would be considered a "lower number of electrodes" that would make the average reference perform poorly? ________________________________ From: fieldtrip-bounces at science.ru.nl [fieldtrip-bounces at science.ru.nl] on behalf of ty [tiany20032003 at 163.com] Sent: Wednesday, June 22, 2016 2:23 PM To: fieldtrip at science.ru.nl Subject: [FieldTrip] Through a Glass, Darkly: the Influence of the EEG Reference on Inference about Brain Function and Disorders Dear all, Since its discovery, the human electroencephalogram (EEG) has proven itself an indispensable tool for brain research. Despite this success story, there is a fundamental technical issue that has yet to be resolved: the selection of the correct EEG reference. Ideally one would like to measure neural activity restricted to certain brain regions. Since EEG amplifiers measure potential difference between the activities recorded by two electrodes, in addition to the active electrode, one must employ a reference electrode which should ideally be at zero. In theory, this might be achieved by placing the reference at a point infinitely far away. Yet the “infinite reference”, in practice, is an antenna for ambient noise which would preempt brain measurements—for example cephalic references that minimize unwanted signal pickup. Examples of such references are the unilateral-mastoid, ear, linked mastoids or ears, vertex, the tip of the nose, neck ring, etc. Unfortunately all such references are doomed to fail since there is no point on the scalp or body surface where the potential is actually zero or a constant. This has serious consequences since the non-neutral reference may itself reflect physiological dynamic processes that will be inevitably embedded into all EEG recordings. Without solving the reference issue we are looking at brain activity, as it were, “through a glass, darkly”. Recent attempts to make this “glass” more transparent have been based on mathematically constructing a reference based on physical principles and subtracting it from all EEG recordings. The best known example is the average reference (AVE). Originally proposed with an analog implementation, it was heuristically espoused by Lehman (1971) and later theoretically justified since the average of a dipole potential over a spherical surface is zero. Consequently, the AVE might be a good choice when a dense and whole brain coverage of an EEG montage is available, which explains why it is widely accepted. Nevertheless, AVE has poor performance with a lower number of electrodes. An alternative is the Reference Electrode Standardization Technique (REST) which used a re-referencing method to reconstruct the desired zero or neutral reference, based on the fact that the underlying neural sources are the same no matter what a reference is actually adopted. This Research Topic will encourage the objective comparison of the effect that various EEG references may have on inference about brain function and disorders—with respect to both physical and computational issues. The crucial point is to determine the reference that best identifies neural activity and therefore be the basis of improved estimates of various linear and non-linear EEG features. These include spectra, amplitude, latency, coherence/correlation, network, symmetry/asymmetry, fractal dimension, complexity, covariance and related statistical tests. If a single reference can be finally recognized universally as the optimal one for general use, we will have indeed rendered the “glass less opaque” and thus “know in part” more about brain function. To contribute to this end, we welcome our colleagues to submit paper with theoretical work, simulation studies, practical experimental data analysis as well as critical reviews. Important Note: All submissions/contributions to this Research Topic must be in line with the scope of the journal and section they are submitted to. While authors are encouraged to draw from other disciplines to enrich their papers where relevant, they must ensure papers fall within the section, as expressed in its Scope. Keywords: EEG, reference, ERPs Detailed information can be found at: http://journal.frontiersin.org/researchtopic/4932/ With best wishes, --------------- Yin Tian, PhD Associate Professor Biomedical engineering department ChongQing University of Posts and Telecommunications, China, 400065 -------------- next part -------------- An HTML attachment was scrubbed... URL: From matthias.duempelmann at uniklinik-freiburg.de Thu Jun 23 09:34:02 2016 From: matthias.duempelmann at uniklinik-freiburg.de (=?iso-8859-1?Q?Dr=2E-Ing=2E_Matthias_D=FCmpelmann?=) Date: Thu, 23 Jun 2016 07:34:02 +0000 Subject: [FieldTrip] Seizure localization problems Message-ID: Dear colleagues, we are trying to evaluate systematically the localization of rhythmic activity at the onset of epileptic seizures in patients, who are subsequently evaluated with intracranial recordings. We are trying to use DICS but quite often receive results, which are obviously wrong. In the attached screenshots you can see the peace of EEG, which is evaluated and the localization result with a maximum in the cerebellum. This a typical localization for the cases with obvious miss localizations. A further seizure with a similar EEG pattern was localized in the right temporal lobe, which matches the EEG pattern and also the intracranial findings. Head model is generated with ASA, also the electrodes file is in the ASA format. The geometrical match of source points, head model and electrodes is checked using ft_plot_.... methods. Here is the code sniplet relevant for the localization algorithm: % Analysis frequency SourceFrequency = 4.0 % read eeg, electrodes and volume conductor model %[dat] = ft_read_data(filename); hdr = ft_read_header(filename); elec = ft_read_sens(elecfile, 'fileformat','asa_elc'); headmodel = ft_read_vol(volumefilename,'fileformat','asa_vol'); mri = ft_read_mri(mrifilename, 'fileformat','asa_mri'); % eeg data preprocessing cfgeeg.dataset = filename; cfgeeg.continuous = 'yes' cfg.covariance = 'yes'; cfg.covariancewindow = 'all'; cfg.demean = 'yes' [data] = ft_preprocessing(cfgeeg); % Freqanalysis for beamformer cfg = []; cfg.channel = {'*'}; cfg.method = 'mtmfft'; cfg.foilim = [1 100]; cfg.tapsmofrq = 4; cfg.taper = 'hanning'; cfg.output = 'powandcsd'; % for common filter over conditions powcsd_all = ft_freqanalysis(cfg, data); % Create leadfield grid cfg = []; cfg.channel = elec.label; cfg.elec = elec; cfg.headmodel = headmodel; cfg.dics.reducerank = 3; % default for MEG is 2, for EEG is 3 cfg.grid.resolution = 0.5; % use a 3-D grid with a 0.5 cm resolution cfg.grid.unit = 'cm'; cfg.grid.tight = 'yes'; [grid] = ft_prepare_leadfield(cfg); % source analysis cfg = []; cfg.channel = elec.label; cfg.method = 'dics'; cfg.frequency = SourceFrequency; cfg.grid = grid; cfg.headmodel = headmodel; cfg.elec = elec; cfg.senstype = 'EEG'; cfg.dics.keepfilter = 'yes'; % We wish to use the calculated filter later on cfg.dics.projectnoise = 'yes'; cfg.dics.lambda = '0.3%'; source_raw = ft_sourceanalysis(cfg, powcsd_all); I played with a couple of parameters like cfg.dics.lambda, but without success. Do you have ideas how to improve our localization results ? Thank you, Matthias UNIVERSITÄTSKLINIKUM FREIBURG Epileptologie Breisacher Str. 64 · 79106 Freiburg Telefon: +49 761 270-52410 matthias.duempelmann at uniklinik-freiburg.de www.uniklinik-freiburg.de -------------- next part -------------- A non-text attachment was scrubbed... Name: analysisinterval_Seizure2.png Type: image/png Size: 110002 bytes Desc: analysisinterval_Seizure2.png URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: localizationresults.png Type: image/png Size: 589001 bytes Desc: localizationresults.png URL: From azeez.adebimpe5 at gmail.com Thu Jun 23 11:07:36 2016 From: azeez.adebimpe5 at gmail.com (Azeez Adebimpe) Date: Thu, 23 Jun 2016 11:07:36 +0200 Subject: [FieldTrip] Seizure localization problems In-Reply-To: References: Message-ID: Hi Mathias, I will suggest you try other method like eLORETA or MNE first and compare the result. Best, AZ On Thu, Jun 23, 2016 at 9:34 AM, Dr.-Ing. Matthias Dümpelmann < matthias.duempelmann at uniklinik-freiburg.de> wrote: > Dear colleagues, > > we are trying to evaluate systematically the localization of rhythmic > activity at the onset of epileptic seizures in patients, who are > subsequently evaluated with intracranial recordings. > > We are trying to use DICS but quite often receive results, which are > obviously wrong. In the attached screenshots you can see the peace of EEG, > which is evaluated and the localization result with a maximum in the > cerebellum. > > This a typical localization for the cases with obvious miss localizations. > A further seizure with a similar EEG pattern was localized in the right > temporal lobe, which matches the EEG pattern and also the intracranial > findings. > > Head model is generated with ASA, also the electrodes file is in the ASA > format. The geometrical match of source points, head model and electrodes > is checked using ft_plot_.... methods. > > Here is the code sniplet relevant for the localization algorithm: > > % Analysis frequency > SourceFrequency = 4.0 > > % read eeg, electrodes and volume conductor model > %[dat] = ft_read_data(filename); > hdr = ft_read_header(filename); > elec = ft_read_sens(elecfile, 'fileformat','asa_elc'); > headmodel = ft_read_vol(volumefilename,'fileformat','asa_vol'); > mri = ft_read_mri(mrifilename, 'fileformat','asa_mri'); > > % eeg data preprocessing > cfgeeg.dataset = filename; > cfgeeg.continuous = 'yes' > cfg.covariance = 'yes'; > cfg.covariancewindow = 'all'; > cfg.demean = 'yes' > > [data] = ft_preprocessing(cfgeeg); > > % Freqanalysis for beamformer > cfg = []; > cfg.channel = {'*'}; > cfg.method = 'mtmfft'; > cfg.foilim = [1 100]; > cfg.tapsmofrq = 4; > cfg.taper = 'hanning'; > cfg.output = 'powandcsd'; > > > % for common filter over conditions > powcsd_all = ft_freqanalysis(cfg, data); > > % Create leadfield grid > cfg = []; > cfg.channel = elec.label; > cfg.elec = elec; > cfg.headmodel = headmodel; > cfg.dics.reducerank = 3; % default for MEG is 2, for EEG is 3 > cfg.grid.resolution = 0.5; % use a 3-D grid with a 0.5 cm resolution > cfg.grid.unit = 'cm'; > cfg.grid.tight = 'yes'; > [grid] = ft_prepare_leadfield(cfg); > > % source analysis > cfg = []; > cfg.channel = elec.label; > cfg.method = 'dics'; > cfg.frequency = SourceFrequency; > cfg.grid = grid; > cfg.headmodel = headmodel; > cfg.elec = elec; > cfg.senstype = 'EEG'; > cfg.dics.keepfilter = 'yes'; % We wish to use the calculated filter > later on > cfg.dics.projectnoise = 'yes'; > cfg.dics.lambda = '0.3%'; > source_raw = ft_sourceanalysis(cfg, powcsd_all); > > > I played with a couple of parameters like cfg.dics.lambda, but without > success. > > Do you have ideas how to improve our localization results ? > > Thank you, > > Matthias > > > > UNIVERSITÄTSKLINIKUM FREIBURG > Epileptologie > Breisacher Str. 64 · 79106 Freiburg > Telefon: +49 761 270-52410 > matthias.duempelmann at uniklinik-freiburg.de > > www.uniklinik-freiburg.de > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > https://mailman.science.ru.nl/mailman/listinfo/fieldtrip > -------------- next part -------------- An HTML attachment was scrubbed... URL: From matthias.duempelmann at uniklinik-freiburg.de Thu Jun 23 14:51:56 2016 From: matthias.duempelmann at uniklinik-freiburg.de (=?utf-8?B?RHIuLUluZy4gTWF0dGhpYXMgRMO8bXBlbG1hbm4=?=) Date: Thu, 23 Jun 2016 12:51:56 +0000 Subject: [FieldTrip] Seizure localization problems In-Reply-To: References: Message-ID: <67d7de139b0440bfad130b5479155478@UKL-EX02.ad.uniklinik-freiburg.de> Dear Azeez, thank you for your suggestion. Just exchanging cfg.method = 'dics'; to cfg.method = 'eloreta'; resulted in a reasonable solution (see attachment). I also get useful results using MUIC or sLORETA in the frequency domain as the methods are implemented in ASA. This makes me even more suspicious, what is going wrong with the DICS algorithm. Best regards, Matthias Von: fieldtrip-bounces at science.ru.nl [mailto:fieldtrip-bounces at science.ru.nl] Im Auftrag von Azeez Adebimpe Gesendet: Thursday, June 23, 2016 11:08 AM An: FieldTrip discussion list Cc: Nino Epitashvili Betreff: Re: [FieldTrip] Seizure localization problems Hi Mathias, I will suggest you try other method like eLORETA or MNE first and compare the result. Best, AZ On Thu, Jun 23, 2016 at 9:34 AM, Dr.-Ing. Matthias Dümpelmann > wrote: Dear colleagues, we are trying to evaluate systematically the localization of rhythmic activity at the onset of epileptic seizures in patients, who are subsequently evaluated with intracranial recordings. We are trying to use DICS but quite often receive results, which are obviously wrong. In the attached screenshots you can see the peace of EEG, which is evaluated and the localization result with a maximum in the cerebellum. This a typical localization for the cases with obvious miss localizations. A further seizure with a similar EEG pattern was localized in the right temporal lobe, which matches the EEG pattern and also the intracranial findings. Head model is generated with ASA, also the electrodes file is in the ASA format. The geometrical match of source points, head model and electrodes is checked using ft_plot_.... methods. Here is the code sniplet relevant for the localization algorithm: % Analysis frequency SourceFrequency = 4.0 % read eeg, electrodes and volume conductor model %[dat] = ft_read_data(filename); hdr = ft_read_header(filename); elec = ft_read_sens(elecfile, 'fileformat','asa_elc'); headmodel = ft_read_vol(volumefilename,'fileformat','asa_vol'); mri = ft_read_mri(mrifilename, 'fileformat','asa_mri'); % eeg data preprocessing cfgeeg.dataset = filename; cfgeeg.continuous = 'yes' cfg.covariance = 'yes'; cfg.covariancewindow = 'all'; cfg.demean = 'yes' [data] = ft_preprocessing(cfgeeg); % Freqanalysis for beamformer cfg = []; cfg.channel = {'*'}; cfg.method = 'mtmfft'; cfg.foilim = [1 100]; cfg.tapsmofrq = 4; cfg.taper = 'hanning'; cfg.output = 'powandcsd'; % for common filter over conditions powcsd_all = ft_freqanalysis(cfg, data); % Create leadfield grid cfg = []; cfg.channel = elec.label; cfg.elec = elec; cfg.headmodel = headmodel; cfg.dics.reducerank = 3; % default for MEG is 2, for EEG is 3 cfg.grid.resolution = 0.5; % use a 3-D grid with a 0.5 cm resolution cfg.grid.unit = 'cm'; cfg.grid.tight = 'yes'; [grid] = ft_prepare_leadfield(cfg); % source analysis cfg = []; cfg.channel = elec.label; cfg.method = 'dics'; cfg.frequency = SourceFrequency; cfg.grid = grid; cfg.headmodel = headmodel; cfg.elec = elec; cfg.senstype = 'EEG'; cfg.dics.keepfilter = 'yes'; % We wish to use the calculated filter later on cfg.dics.projectnoise = 'yes'; cfg.dics.lambda = '0.3%'; source_raw = ft_sourceanalysis(cfg, powcsd_all); I played with a couple of parameters like cfg.dics.lambda, but without success. Do you have ideas how to improve our localization results ? Thank you, Matthias UNIVERSITÄTSKLINIKUM FREIBURG Epileptologie Breisacher Str. 64 · 79106 Freiburg Telefon: +49 761 270-52410 matthias.duempelmann at uniklinik-freiburg.de www.uniklinik-freiburg.de _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl https://mailman.science.ru.nl/mailman/listinfo/fieldtrip -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: eloreta.png Type: image/png Size: 193038 bytes Desc: eloreta.png URL: From azeez.adebimpe5 at gmail.com Thu Jun 23 15:57:15 2016 From: azeez.adebimpe5 at gmail.com (Azeez Adebimpe) Date: Thu, 23 Jun 2016 15:57:15 +0200 Subject: [FieldTrip] Seizure localization problems In-Reply-To: <67d7de139b0440bfad130b5479155478@UKL-EX02.ad.uniklinik-freiburg.de> References: <67d7de139b0440bfad130b5479155478@UKL-EX02.ad.uniklinik-freiburg.de> Message-ID: Hi Mathias, DICS and LCMV can also give reasonable result but require some normalization. Try to estimate to neural activity index as explained in this tutorial. http://www.fieldtriptoolbox.org/tutorial/beamformer Best, Az On Thu, Jun 23, 2016 at 2:51 PM, Dr.-Ing. Matthias Dümpelmann < matthias.duempelmann at uniklinik-freiburg.de> wrote: > Dear Azeez, > > > > thank you for your suggestion. > > > > Just exchanging > > > > cfg.method = 'dics'; > > > > to > > > > cfg.method = 'eloreta'; > > > > resulted in a reasonable solution (see attachment). > > > > I also get useful results using MUIC or sLORETA in the frequency domain as > the methods are implemented in ASA. > > > > This makes me even more suspicious, what is going wrong with the DICS > algorithm. > > > > Best regards, > > > > Matthias > > > > > > > > *Von:* fieldtrip-bounces at science.ru.nl [mailto: > fieldtrip-bounces at science.ru.nl] *Im Auftrag von *Azeez Adebimpe > *Gesendet:* Thursday, June 23, 2016 11:08 AM > *An:* FieldTrip discussion list > *Cc:* Nino Epitashvili > *Betreff:* Re: [FieldTrip] Seizure localization problems > > > > Hi Mathias, > > I will suggest you try other method like eLORETA or MNE first and compare > the result. > > > > Best, > > > > AZ > > > > On Thu, Jun 23, 2016 at 9:34 AM, Dr.-Ing. Matthias Dümpelmann < > matthias.duempelmann at uniklinik-freiburg.de> wrote: > > Dear colleagues, > > we are trying to evaluate systematically the localization of rhythmic > activity at the onset of epileptic seizures in patients, who are > subsequently evaluated with intracranial recordings. > > We are trying to use DICS but quite often receive results, which are > obviously wrong. In the attached screenshots you can see the peace of EEG, > which is evaluated and the localization result with a maximum in the > cerebellum. > > This a typical localization for the cases with obvious miss localizations. > A further seizure with a similar EEG pattern was localized in the right > temporal lobe, which matches the EEG pattern and also the intracranial > findings. > > Head model is generated with ASA, also the electrodes file is in the ASA > format. The geometrical match of source points, head model and electrodes > is checked using ft_plot_.... methods. > > Here is the code sniplet relevant for the localization algorithm: > > % Analysis frequency > SourceFrequency = 4.0 > > % read eeg, electrodes and volume conductor model > %[dat] = ft_read_data(filename); > hdr = ft_read_header(filename); > elec = ft_read_sens(elecfile, 'fileformat','asa_elc'); > headmodel = ft_read_vol(volumefilename,'fileformat','asa_vol'); > mri = ft_read_mri(mrifilename, 'fileformat','asa_mri'); > > % eeg data preprocessing > cfgeeg.dataset = filename; > cfgeeg.continuous = 'yes' > cfg.covariance = 'yes'; > cfg.covariancewindow = 'all'; > cfg.demean = 'yes' > > [data] = ft_preprocessing(cfgeeg); > > % Freqanalysis for beamformer > cfg = []; > cfg.channel = {'*'}; > cfg.method = 'mtmfft'; > cfg.foilim = [1 100]; > cfg.tapsmofrq = 4; > cfg.taper = 'hanning'; > cfg.output = 'powandcsd'; > > > % for common filter over conditions > powcsd_all = ft_freqanalysis(cfg, data); > > % Create leadfield grid > cfg = []; > cfg.channel = elec.label; > cfg.elec = elec; > cfg.headmodel = headmodel; > cfg.dics.reducerank = 3; % default for MEG is 2, for EEG is 3 > cfg.grid.resolution = 0.5; % use a 3-D grid with a 0.5 cm resolution > cfg.grid.unit = 'cm'; > cfg.grid.tight = 'yes'; > [grid] = ft_prepare_leadfield(cfg); > > % source analysis > cfg = []; > cfg.channel = elec.label; > cfg.method = 'dics'; > cfg.frequency = SourceFrequency; > cfg.grid = grid; > cfg.headmodel = headmodel; > cfg.elec = elec; > cfg.senstype = 'EEG'; > cfg.dics.keepfilter = 'yes'; % We wish to use the calculated filter > later on > cfg.dics.projectnoise = 'yes'; > cfg.dics.lambda = '0.3%'; > source_raw = ft_sourceanalysis(cfg, powcsd_all); > > > I played with a couple of parameters like cfg.dics.lambda, but without > success. > > Do you have ideas how to improve our localization results ? > > Thank you, > > Matthias > > > > UNIVERSITÄTSKLINIKUM FREIBURG > Epileptologie > Breisacher Str. 64 · 79106 Freiburg > Telefon: +49 761 270-52410 > matthias.duempelmann at uniklinik-freiburg.de > > www.uniklinik-freiburg.de > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > https://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > https://mailman.science.ru.nl/mailman/listinfo/fieldtrip > -------------- next part -------------- An HTML attachment was scrubbed... URL: From rene.scheeringa at donders.ru.nl Thu Jun 23 17:21:54 2016 From: rene.scheeringa at donders.ru.nl (=?iso-8859-1?B?U2NoZWVyaW5nYSwgUi4gKFJlbukp?=) Date: Thu, 23 Jun 2016 15:21:54 +0000 Subject: [FieldTrip] error in ft_mvaranalysis Message-ID: <0317032ABCAD99429A3D6296AD31B42037CF174E@exprd04.hosting.ru.nl> Dear fellow FieldTrippers, I am planning to do granger causality analysis on human ECoG data. For this I need to first run ft_mvaranalysis (http://www.fieldtriptoolbox.org/tutorial/connectivity). However when I do this I get an error message that the variable 'dof' variable or function is missing, so it seems like for some reason the degrees of freedom are not calculated. I wonder if there is something I am doing wrong inusing thsi function or if this is a potential bug. The data I am trying to analyse is human ECoG of a simple visual stimulation task in which I in first instance want to compare granger-causality in stimulation versus baseline periods. Visual stimulation takes place is 1 second long starting and t=0. Below I have included the the error message and the cconfiguration settings I used. The problem occurs with the latest version of Fieldtrip (June 22nd 2016), and does not depend on whether I specify the 'biosig' or 'bsmart' toolbox. The error occurs after FieldTrip indicates it is cumputing the AR-model and is starting the Best wishes, René Scheeringa Error message: Undefined function or variable 'dof'. Error in ft_mvaranalysis (line 515) mvardata.dof = dof; Configuration structure: cfg=[]; cfg.toolbox = 'biosig'; %bsmart'; cfg.mvarmethod = 2; cfg.order = 10; cfg.channelcmb = cell(3,2); cfg.channelcmb{1,1}='OcL05';cfg.channelcmb{1,2}='OcL07'; cfg.channelcmb{2,1}='OcL05';cfg.channelcmb{2,2}='OcL13'; cfg.channelcmb{3,1}='OcL07';cfg.channelcmb{3,2}='OcL13'; cfg.keeptrials = 'no'; %'yes'; cfg.jackknife = 'no'; % (default) or 'yes' cfg.zscore = 'yes'; %'no' (default) cfg.demean = 'yes'; %'yes' (default) or 'no' cfg.ems = 'no'; %no' (default) or 'yes' explicit removal ensemble mean cfg.t_ftimwin = 0.8; %the width of the sliding window on which the coefficients are estimated cfg.toi = [-0.4 0.6]; %[t1 t2 ... tx] the time points at which the windows are centered mvardata = ft_mvaranalysis(cfg, data_in); -------------- next part -------------- An HTML attachment was scrubbed... URL: From matthias.duempelmann at uniklinik-freiburg.de Fri Jun 24 08:58:15 2016 From: matthias.duempelmann at uniklinik-freiburg.de (=?utf-8?B?RHIuLUluZy4gTWF0dGhpYXMgRMO8bXBlbG1hbm4=?=) Date: Fri, 24 Jun 2016 06:58:15 +0000 Subject: [FieldTrip] Seizure localization problems In-Reply-To: References: <67d7de139b0440bfad130b5479155478@UKL-EX02.ad.uniklinik-freiburg.de> Message-ID: Dear Az, I defined now two intervals, one showing rhythmic seizure activity and one baseline interval prior to the seizure as you can see on the screenshot. Now it localizes as expected in the right temporal lobe. I only wonder about the very small “activation” volume. Thank you, Matthias Von: fieldtrip-bounces at science.ru.nl [mailto:fieldtrip-bounces at science.ru.nl] Im Auftrag von Azeez Adebimpe Gesendet: Thursday, June 23, 2016 3:57 PM An: FieldTrip discussion list Betreff: Re: [FieldTrip] Seizure localization problems Hi Mathias, DICS and LCMV can also give reasonable result but require some normalization. Try to estimate to neural activity index as explained in this tutorial. http://www.fieldtriptoolbox.org/tutorial/beamformer Best, Az On Thu, Jun 23, 2016 at 2:51 PM, Dr.-Ing. Matthias Dümpelmann > wrote: Dear Azeez, thank you for your suggestion. Just exchanging cfg.method = 'dics'; to cfg.method = 'eloreta'; resulted in a reasonable solution (see attachment). I also get useful results using MUIC or sLORETA in the frequency domain as the methods are implemented in ASA. This makes me even more suspicious, what is going wrong with the DICS algorithm. Best regards, Matthias Von: fieldtrip-bounces at science.ru.nl [mailto:fieldtrip-bounces at science.ru.nl] Im Auftrag von Azeez Adebimpe Gesendet: Thursday, June 23, 2016 11:08 AM An: FieldTrip discussion list Cc: Nino Epitashvili Betreff: Re: [FieldTrip] Seizure localization problems Hi Mathias, I will suggest you try other method like eLORETA or MNE first and compare the result. Best, AZ On Thu, Jun 23, 2016 at 9:34 AM, Dr.-Ing. Matthias Dümpelmann > wrote: Dear colleagues, we are trying to evaluate systematically the localization of rhythmic activity at the onset of epileptic seizures in patients, who are subsequently evaluated with intracranial recordings. We are trying to use DICS but quite often receive results, which are obviously wrong. In the attached screenshots you can see the peace of EEG, which is evaluated and the localization result with a maximum in the cerebellum. This a typical localization for the cases with obvious miss localizations. A further seizure with a similar EEG pattern was localized in the right temporal lobe, which matches the EEG pattern and also the intracranial findings. Head model is generated with ASA, also the electrodes file is in the ASA format. The geometrical match of source points, head model and electrodes is checked using ft_plot_.... methods. Here is the code sniplet relevant for the localization algorithm: % Analysis frequency SourceFrequency = 4.0 % read eeg, electrodes and volume conductor model %[dat] = ft_read_data(filename); hdr = ft_read_header(filename); elec = ft_read_sens(elecfile, 'fileformat','asa_elc'); headmodel = ft_read_vol(volumefilename,'fileformat','asa_vol'); mri = ft_read_mri(mrifilename, 'fileformat','asa_mri'); % eeg data preprocessing cfgeeg.dataset = filename; cfgeeg.continuous = 'yes' cfg.covariance = 'yes'; cfg.covariancewindow = 'all'; cfg.demean = 'yes' [data] = ft_preprocessing(cfgeeg); % Freqanalysis for beamformer cfg = []; cfg.channel = {'*'}; cfg.method = 'mtmfft'; cfg.foilim = [1 100]; cfg.tapsmofrq = 4; cfg.taper = 'hanning'; cfg.output = 'powandcsd'; % for common filter over conditions powcsd_all = ft_freqanalysis(cfg, data); % Create leadfield grid cfg = []; cfg.channel = elec.label; cfg.elec = elec; cfg.headmodel = headmodel; cfg.dics.reducerank = 3; % default for MEG is 2, for EEG is 3 cfg.grid.resolution = 0.5; % use a 3-D grid with a 0.5 cm resolution cfg.grid.unit = 'cm'; cfg.grid.tight = 'yes'; [grid] = ft_prepare_leadfield(cfg); % source analysis cfg = []; cfg.channel = elec.label; cfg.method = 'dics'; cfg.frequency = SourceFrequency; cfg.grid = grid; cfg.headmodel = headmodel; cfg.elec = elec; cfg.senstype = 'EEG'; cfg.dics.keepfilter = 'yes'; % We wish to use the calculated filter later on cfg.dics.projectnoise = 'yes'; cfg.dics.lambda = '0.3%'; source_raw = ft_sourceanalysis(cfg, powcsd_all); I played with a couple of parameters like cfg.dics.lambda, but without success. Do you have ideas how to improve our localization results ? Thank you, Matthias UNIVERSITÄTSKLINIKUM FREIBURG Epileptologie Breisacher Str. 64 · 79106 Freiburg Telefon: +49 761 270-52410 matthias.duempelmann at uniklinik-freiburg.de www.uniklinik-freiburg.de _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl https://mailman.science.ru.nl/mailman/listinfo/fieldtrip _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl https://mailman.science.ru.nl/mailman/listinfo/fieldtrip -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: DICS_wbasline.png Type: image/png Size: 565026 bytes Desc: DICS_wbasline.png URL: From joseluisblues at gmail.com Fri Jun 24 11:23:07 2016 From: joseluisblues at gmail.com (Jose) Date: Fri, 24 Jun 2016 11:23:07 +0200 Subject: [FieldTrip] running FT scripts in a supercomputing cluster In-Reply-To: References: Message-ID: Hello, So, finally it works, If never is useful for other persons in the future this is the detail of what I did: 1. copy the fieldtrip folder + data in my_cluster_directory 2. do scripts: -do my main matlab script (FT_0.m) this script do not contain neither the "addpath" nor "ft_defaults" command lines pay attention to use cd(getenv('PWD')) for moving through the temporary folders in the cluster -do a matlab script to compile my main script (compilation_script.m) ### addpath('my_cluster_directory/fieldtrip-20160317'); ft_defaults % define default functions addpath('my_cluster_directory/fieldtrip-20160317/external/ctf') % for CTF MEG data mcc('-mv', '-N', '-p', 'stats', '-p', 'images', '-p', 'signal', ... '-R', '-nodisplay', '-R', '-singleCompThread', ... 'FT_0.m'); ### -do bash script to run the compilation ### #!/bin/bash module load MATLAB/2013b matlab < compilation_script.m exit ### -run it ./run_compilation.sh 3. Once the compiled script is done, two files are generated FT_0 and run_FT_0.sh Next, I need to customize my job bash script as usual ### #!/bin/bash #PBS -N FT_JOSE_1 #PBS -o FT_JOSE_1.log #PBS -e FT_JOSE_1.err #PBS -q default #PBS -l walltime=2:00:00 #PBS -l nodes=1:ppn=1 #PBS -l vmem=10gb #PBS -m ae # Name of Mat file matFileName=FT_0 # directory where the execuatble and script can be found # PBS_O_WORKDIR variable points to the directory you are submitting from ORIGDIR=$PBS_O_WORKDIR WORKDIR=$VSC_SCRATCH_NODE/$PBS_JOBID DATADIR=/user/data/gent/gvo000/gvo00022/vsc41880/ echo Hostname: $(hostname) echo ORIGDIR: $ORIGDIR echo WORKDIR: $WORKDIR mkdir -p $WORKDIR cp -ar $ORIGDIR/run_FT_0.sh $WORKDIR/ cp -ar $ORIGDIR/FT_0 $WORKDIR/ cp -ar $ORIGDIR/1_data $WORKDIR/ cp -ar $ORIGDIR/2_processed_data $WORKDIR/ # version of MATLAB version=2013b # load modules module load cluster module load MATLAB/${version} # check the working directory if [ ! -d $WORKDIR ] then echo "Directory $dir is not a directory" exit 1 fi # enter the working directory cd $WORKDIR echo $WORKDIR # check the Mat file if [ ! -x $matFileName ] then echo "No executable $matFileName found." exit 2 fi # define the sh file script=run_${matFileName}.sh # check the sh file if [ ! -x $script ] then echo "No run script $script found" exit 3 fi # make cache dir # TMPDIR is set and created by torque. 1 unique dir per job cdir=$TMPDIR/mcrcache # check cache dir mkdir -p $cdir if [ ! -d $cdir ] then echo "No tempdir $cdir found." exit 1 fi # define dir export MCR_CACHE_ROOT=$cdir # 1GB cache (more then large enough) export MCR_CACHE_SIZE=$((1024*1024*1024)) # real running ./$script $EBROOTMATLAB cd $WORKDIR cp -r 2_processed_data $ORIGDIR/ cd rm -rf $WORKDIR # END ### 4. Next I run it: sub FT_0_bash.sh Many thanks to Anne! Jose On 16 June 2016 at 10:43, Anne Urai wrote: > Hi Jose, > > When calling mcc from Matlab, a dependency analysis is first carried out > (at least in more recent versions of Matlab) - basically, Matlab goes > through the script you're compiling and finds all the functions that are > called (which must be on the path). These are all added to the executable. > In principle, if all the folders you need are on the path (which should be > okay when you call ft_default), the executable can run. > > Now, only in the case when the dependency analysis doesn't recognize > certain functions (because they are, for example, generated through > str2func) you should add them manually. I found this out through trial and > error - I'd first try to compile using the bare bones > > mcc('-mv', '-N', '-R', '-nodisplay', '-R', '-singleCompThread', 'FT_0.m'); > > when you then run the executable, you'll get an error message if a > function or a toolbox is missing (and then you can add only those that you > need and compile again). > > In your FT_0.sh, you should indeed load the MCR - otherwise, the > executable can't run. For this, I'd recommend contacting the admin of the > supercomputer cluster, since the way I do it on the cluster here is > specific to the setup. You'll probably have to activate this in your > FT_0.sh yourself and add the path to the cache of each node (something > like export MCR_CACHE_ROOT=$TMPDIR). > > Good luck! > > — > Anne E. Urai, MSc > PhD student | Institut für Neurophysiologie und Pathophysiologie > Universitätsklinikum Hamburg-Eppendorf | Martinistrasse 52, 20246 | > Hamburg, Germany > www.anneurai.net / @AnneEUrai > > From: Jose > Reply: Jose > Date: 15 June 2016 at 19:14:43 > To: Anne Urai > Subject: Re: [FieldTrip] running FT scripts in a supercomputing cluster > > Hi Anne, > > Thanks for the detailed response, > I have a couple questions if I may, > > So, if I understand well I need to know a priori which functions I want to > use?. That's a bit strange, no? Because I don't know if any given function > depend of another one which I might not notice if don't inspect all the > scripts, > > The other thing is that I was trying to compile in the cluster, not > locally, but anyway I tried locally with something like this: > > % these paths will be added at compilation > addpath('/home/joseluis/Documents/Software/fieldtrip-20160317'); > ft_defaults, > addpath('/home/joseluis/Documents/Software/fieldtrip-20160317/qsub'); > addpath('/home/joseluis/Documents/Software/fieldtrip-20160317/fileio'); > > addpath('/home/joseluis/Documents/Software/fieldtrip-20160317/fileio/private'); > > % options: compile verbose, only use the toolboxes we really need > % !!! runtime options should be preceded by - to work! > % dont need to activate the -nojvm flag, can still plot from executable > > mcc('-mv', '-N', '-p', 'stats', '-p', 'images', '-p', 'signal', ... > '-R', '-nodisplay', '-R', '-singleCompThread', ... > '-a', > '/home/joseluis/Documents/Software/fieldtrip-20160317/fileio/ft_read_event.m', > ... > '-a', > '/home/joseluis/Documents/Software/fieldtrip-20160317/fileio/private/read_ctf_cls.m', > ... > '-a', > '/home/joseluis/Documents/Software/fieldtrip-20160317/ft_preprocessing', ... > 'FT_0.m'); > > However when I copy FT_0 and run_FT_0.sh and run the job I get: > > ./FT_0: error while loading shared libraries: libmwmclmcrrt.so.8.1: cannot > open shared object file: No such file or directory > > Which looking in Internet seems to be associated to the fact I need to run > a mrc installer in the cluster? > > thanks > > Jose > > On 15 June 2016 at 11:03, Anne Urai wrote: > >> Hi Jose, >> >> I ran into similar dependencies issues when compiling fieldtrip, and >> converged on the following: >> >> >> >> % these paths will be added at compilation >> >> addpath(genpath('~/code/Tools')); >> >> addpath('~/Documents/fieldtrip'); >> >> ft_defaults; % add everything to path that we need >> >> >> >> addpath('~/Documents/fieldtrip/qsub'); >> >> addpath(genpath('~/Documents/fieldtrip/template/')); % neighbouring >> matfile >> >> >> >> if strcmp(fname, 'B3a_clusterStatsERF.m') || strcmp(fname, >> 'B3b_clusterStatsTFR.m'), >> >> addpath('~/Documents/fieldtrip/statfun/'); % need the >> combineClusters mex file >> >> addpath('~/Documents/fieldtrip/external/spm8/'); % for neighbour >> definition >> >> % >> http://mailman.science.ru.nl/pipermail/fieldtrip/2014-July/008238.html >> >> end >> >> >> >> % options: compile verbose, only use the toolboxes we really need >> >> % !!! runtime options should be preceded by - to work! >> >> % dont need to activate the -nojvm flag, can still plot from executable >> >> if strcmp(fname, 'B3a_clusterStatsERF.m') || strcmp(fname, >> 'B3b_clusterStatsTFR.m'), >> >> >> >> % statfun is called with a weird eval construction, so not recognized >> >> % by the dependency analysis of mcc >> >> mcc('-mv', '-N', '-p', 'stats', '-p', 'images', '-p', 'signal', ... >> >> '-R', '-nodisplay', '-R', '-singleCompThread', ... >> >> '-a', '~/Documents/fieldtrip/ft_statistics_montecarlo.m', ... >> >> '-a', '~/Documents/fieldtrip/statfun/ft_statfun_depsamplesT.m', >> ... >> >> fname); >> >> else >> >> % no need to specify additional files >> >> mcc('-mv', '-N', '-p', 'stats', '-p', 'images', '-p', 'signal', ... >> >> '-R', '-nodisplay', '-R', '-singleCompThread', ... >> >> fname); >> >> end >> >> >> So, the trick is to add everything to your path before comping, and then >> use the -N option and define specific folders and possible functions using >> -a. Make sure to only include additional subfolders from Fieldtrip (such as >> the templates folder) only if you need them, for including them will >> increase the size of the executable considerably. Also, some functions like >> the ft_statistics ones are not directly called but instead evaluated using statmethod >> = str2func(['ft_statistics_' cfg.method]) - this causes the dependency >> analysis of the compiler to skip those functions, so you'll have to add >> them manually. >> >> >> PS a similar setup should work directly from the command line mcc, but I >> found it easier to run ft_defaults from Matlab and then compile from within >> a Matlab script. >> >> >> Hope this helps! >> >> >> — >> Anne E. Urai, MSc >> PhD student | Institut für Neurophysiologie und Pathophysiologie >> Universitätsklinikum Hamburg-Eppendorf | Martinistrasse 52, 20246 | >> Hamburg, Germany >> www.anneurai.net / @AnneEUrai >> >> On 10 June 2016 at 10:42, Jose wrote: >> >>> dear list, >>> >>> I'm trying to analyse CTF MEG data through the Flemish Supercomputer >>> Centre, >>> I did a matlab script to run the foremost FT functions in my pipeline >>> (ft_read_event, read_ctf_cls, and ft_preprocessing). This script works well >>> when I run it locally. To compile my function in the supercomputing cluster >>> I initially used addpath to include FT and ft_defaults to set the >>> configuration inside my script, but this wasn't working. I tried using a >>> startup.m script but this doesn't work neither. Maybe I'm missing >>> something? My bash script to compile looks like this: >>> >>> #!/bin/bash >>> module load MATLAB/2013b >>> FTDIR=$VSC_DATA_VO_USER/fieldtrip-20160317 >>> mcc -mv FT_0.m >>> >>> I also tried mcc -mv FT_0.m -I $FTDIR >>> I run my compilation in the same folder where I have the FT folder. >>> When I run my bash job I get always the same error: Undefined function >>> 'ft_read_event' for input arguments of type 'char'. >>> >>> I've been looking elsewhere but still I haven't find a solution, >>> >>> Any hints about this would really appreciated, >>> best, >>> Jose >>> >>> _______________________________________________ >>> fieldtrip mailing list >>> fieldtrip at donders.ru.nl >>> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip >>> >> >> > > > -- > José Luis ULLOA FULGERI > +32 (0)4 77 42 90 07 > +32 (0)4 92 64 64 77 > > -- José Luis ULLOA FULGERI +32 (0)4 77 42 90 07 +32 (0)4 92 64 64 77 -------------- next part -------------- An HTML attachment was scrubbed... URL: From azeez.adebimpe5 at gmail.com Fri Jun 24 11:35:36 2016 From: azeez.adebimpe5 at gmail.com (Azeez Adebimpe) Date: Fri, 24 Jun 2016 11:35:36 +0200 Subject: [FieldTrip] Seizure localization problems In-Reply-To: References: <67d7de139b0440bfad130b5479155478@UKL-EX02.ad.uniklinik-freiburg.de> Message-ID: Hi Mathias, You can adjust the regularization parameter, "lamda", I think the default is zero. Best, Azeez On Fri, Jun 24, 2016 at 8:58 AM, Dr.-Ing. Matthias Dümpelmann < matthias.duempelmann at uniklinik-freiburg.de> wrote: > Dear Az, > > > > > > I defined now two intervals, one showing rhythmic seizure activity and one > baseline interval prior to the seizure as you can see on the screenshot. > > > > Now it localizes as expected in the right temporal lobe. > > > > I only wonder about the very small “activation” volume. > > > > Thank you, > > > > Matthias > > > > *Von:* fieldtrip-bounces at science.ru.nl [mailto: > fieldtrip-bounces at science.ru.nl] *Im Auftrag von *Azeez Adebimpe > *Gesendet:* Thursday, June 23, 2016 3:57 PM > *An:* FieldTrip discussion list > *Betreff:* Re: [FieldTrip] Seizure localization problems > > > > Hi Mathias, > > > > DICS and LCMV can also give reasonable result but require some > normalization. > > Try to estimate to neural activity index as explained in this tutorial. > > > > http://www.fieldtriptoolbox.org/tutorial/beamformer > > Best, > > > > Az > > > > On Thu, Jun 23, 2016 at 2:51 PM, Dr.-Ing. Matthias Dümpelmann < > matthias.duempelmann at uniklinik-freiburg.de> wrote: > > Dear Azeez, > > > > thank you for your suggestion. > > > > Just exchanging > > > > cfg.method = 'dics'; > > > > to > > > > cfg.method = 'eloreta'; > > > > resulted in a reasonable solution (see attachment). > > > > I also get useful results using MUIC or sLORETA in the frequency domain as > the methods are implemented in ASA. > > > > This makes me even more suspicious, what is going wrong with the DICS > algorithm. > > > > Best regards, > > > > Matthias > > > > > > > > *Von:* fieldtrip-bounces at science.ru.nl [mailto: > fieldtrip-bounces at science.ru.nl] *Im Auftrag von *Azeez Adebimpe > *Gesendet:* Thursday, June 23, 2016 11:08 AM > *An:* FieldTrip discussion list > *Cc:* Nino Epitashvili > *Betreff:* Re: [FieldTrip] Seizure localization problems > > > > Hi Mathias, > > I will suggest you try other method like eLORETA or MNE first and compare > the result. > > > > Best, > > > > AZ > > > > On Thu, Jun 23, 2016 at 9:34 AM, Dr.-Ing. Matthias Dümpelmann < > matthias.duempelmann at uniklinik-freiburg.de> wrote: > > Dear colleagues, > > we are trying to evaluate systematically the localization of rhythmic > activity at the onset of epileptic seizures in patients, who are > subsequently evaluated with intracranial recordings. > > We are trying to use DICS but quite often receive results, which are > obviously wrong. In the attached screenshots you can see the peace of EEG, > which is evaluated and the localization result with a maximum in the > cerebellum. > > This a typical localization for the cases with obvious miss localizations. > A further seizure with a similar EEG pattern was localized in the right > temporal lobe, which matches the EEG pattern and also the intracranial > findings. > > Head model is generated with ASA, also the electrodes file is in the ASA > format. The geometrical match of source points, head model and electrodes > is checked using ft_plot_.... methods. > > Here is the code sniplet relevant for the localization algorithm: > > % Analysis frequency > SourceFrequency = 4.0 > > % read eeg, electrodes and volume conductor model > %[dat] = ft_read_data(filename); > hdr = ft_read_header(filename); > elec = ft_read_sens(elecfile, 'fileformat','asa_elc'); > headmodel = ft_read_vol(volumefilename,'fileformat','asa_vol'); > mri = ft_read_mri(mrifilename, 'fileformat','asa_mri'); > > % eeg data preprocessing > cfgeeg.dataset = filename; > cfgeeg.continuous = 'yes' > cfg.covariance = 'yes'; > cfg.covariancewindow = 'all'; > cfg.demean = 'yes' > > [data] = ft_preprocessing(cfgeeg); > > % Freqanalysis for beamformer > cfg = []; > cfg.channel = {'*'}; > cfg.method = 'mtmfft'; > cfg.foilim = [1 100]; > cfg.tapsmofrq = 4; > cfg.taper = 'hanning'; > cfg.output = 'powandcsd'; > > > % for common filter over conditions > powcsd_all = ft_freqanalysis(cfg, data); > > % Create leadfield grid > cfg = []; > cfg.channel = elec.label; > cfg.elec = elec; > cfg.headmodel = headmodel; > cfg.dics.reducerank = 3; % default for MEG is 2, for EEG is 3 > cfg.grid.resolution = 0.5; % use a 3-D grid with a 0.5 cm resolution > cfg.grid.unit = 'cm'; > cfg.grid.tight = 'yes'; > [grid] = ft_prepare_leadfield(cfg); > > % source analysis > cfg = []; > cfg.channel = elec.label; > cfg.method = 'dics'; > cfg.frequency = SourceFrequency; > cfg.grid = grid; > cfg.headmodel = headmodel; > cfg.elec = elec; > cfg.senstype = 'EEG'; > cfg.dics.keepfilter = 'yes'; % We wish to use the calculated filter > later on > cfg.dics.projectnoise = 'yes'; > cfg.dics.lambda = '0.3%'; > source_raw = ft_sourceanalysis(cfg, powcsd_all); > > > I played with a couple of parameters like cfg.dics.lambda, but without > success. > > Do you have ideas how to improve our localization results ? > > Thank you, > > Matthias > > > > UNIVERSITÄTSKLINIKUM FREIBURG > Epileptologie > Breisacher Str. 64 · 79106 Freiburg > Telefon: +49 761 270-52410 > matthias.duempelmann at uniklinik-freiburg.de > > www.uniklinik-freiburg.de > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > https://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > https://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > https://mailman.science.ru.nl/mailman/listinfo/fieldtrip > -------------- next part -------------- An HTML attachment was scrubbed... URL: From matthias.duempelmann at uniklinik-freiburg.de Fri Jun 24 12:02:46 2016 From: matthias.duempelmann at uniklinik-freiburg.de (=?utf-8?B?RHIuLUluZy4gTWF0dGhpYXMgRMO8bXBlbG1hbm4=?=) Date: Fri, 24 Jun 2016 10:02:46 +0000 Subject: [FieldTrip] Seizure localization problems In-Reply-To: References: <67d7de139b0440bfad130b5479155478@UKL-EX02.ad.uniklinik-freiburg.de> Message-ID: Hi Az, now I used the normalization (neural activity index) as you indicated and the results look like in the screenshot. Probably we can use now two options: Baseline or Neural Activity Index. Thank you and have a nice weekend ! Matthias Von: fieldtrip-bounces at science.ru.nl [mailto:fieldtrip-bounces at science.ru.nl] Im Auftrag von Azeez Adebimpe Gesendet: Thursday, June 23, 2016 3:57 PM An: FieldTrip discussion list Betreff: Re: [FieldTrip] Seizure localization problems Hi Mathias, DICS and LCMV can also give reasonable result but require some normalization. Try to estimate to neural activity index as explained in this tutorial. http://www.fieldtriptoolbox.org/tutorial/beamformer Best, Az On Thu, Jun 23, 2016 at 2:51 PM, Dr.-Ing. Matthias Dümpelmann > wrote: Dear Azeez, thank you for your suggestion. Just exchanging cfg.method = 'dics'; to cfg.method = 'eloreta'; resulted in a reasonable solution (see attachment). I also get useful results using MUIC or sLORETA in the frequency domain as the methods are implemented in ASA. This makes me even more suspicious, what is going wrong with the DICS algorithm. Best regards, Matthias Von: fieldtrip-bounces at science.ru.nl [mailto:fieldtrip-bounces at science.ru.nl] Im Auftrag von Azeez Adebimpe Gesendet: Thursday, June 23, 2016 11:08 AM An: FieldTrip discussion list Cc: Nino Epitashvili Betreff: Re: [FieldTrip] Seizure localization problems Hi Mathias, I will suggest you try other method like eLORETA or MNE first and compare the result. Best, AZ On Thu, Jun 23, 2016 at 9:34 AM, Dr.-Ing. Matthias Dümpelmann > wrote: Dear colleagues, we are trying to evaluate systematically the localization of rhythmic activity at the onset of epileptic seizures in patients, who are subsequently evaluated with intracranial recordings. We are trying to use DICS but quite often receive results, which are obviously wrong. In the attached screenshots you can see the peace of EEG, which is evaluated and the localization result with a maximum in the cerebellum. This a typical localization for the cases with obvious miss localizations. A further seizure with a similar EEG pattern was localized in the right temporal lobe, which matches the EEG pattern and also the intracranial findings. Head model is generated with ASA, also the electrodes file is in the ASA format. The geometrical match of source points, head model and electrodes is checked using ft_plot_.... methods. Here is the code sniplet relevant for the localization algorithm: % Analysis frequency SourceFrequency = 4.0 % read eeg, electrodes and volume conductor model %[dat] = ft_read_data(filename); hdr = ft_read_header(filename); elec = ft_read_sens(elecfile, 'fileformat','asa_elc'); headmodel = ft_read_vol(volumefilename,'fileformat','asa_vol'); mri = ft_read_mri(mrifilename, 'fileformat','asa_mri'); % eeg data preprocessing cfgeeg.dataset = filename; cfgeeg.continuous = 'yes' cfg.covariance = 'yes'; cfg.covariancewindow = 'all'; cfg.demean = 'yes' [data] = ft_preprocessing(cfgeeg); % Freqanalysis for beamformer cfg = []; cfg.channel = {'*'}; cfg.method = 'mtmfft'; cfg.foilim = [1 100]; cfg.tapsmofrq = 4; cfg.taper = 'hanning'; cfg.output = 'powandcsd'; % for common filter over conditions powcsd_all = ft_freqanalysis(cfg, data); % Create leadfield grid cfg = []; cfg.channel = elec.label; cfg.elec = elec; cfg.headmodel = headmodel; cfg.dics.reducerank = 3; % default for MEG is 2, for EEG is 3 cfg.grid.resolution = 0.5; % use a 3-D grid with a 0.5 cm resolution cfg.grid.unit = 'cm'; cfg.grid.tight = 'yes'; [grid] = ft_prepare_leadfield(cfg); % source analysis cfg = []; cfg.channel = elec.label; cfg.method = 'dics'; cfg.frequency = SourceFrequency; cfg.grid = grid; cfg.headmodel = headmodel; cfg.elec = elec; cfg.senstype = 'EEG'; cfg.dics.keepfilter = 'yes'; % We wish to use the calculated filter later on cfg.dics.projectnoise = 'yes'; cfg.dics.lambda = '0.3%'; source_raw = ft_sourceanalysis(cfg, powcsd_all); I played with a couple of parameters like cfg.dics.lambda, but without success. Do you have ideas how to improve our localization results ? Thank you, Matthias UNIVERSITÄTSKLINIKUM FREIBURG Epileptologie Breisacher Str. 64 · 79106 Freiburg Telefon: +49 761 270-52410 matthias.duempelmann at uniklinik-freiburg.de www.uniklinik-freiburg.de _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl https://mailman.science.ru.nl/mailman/listinfo/fieldtrip _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl https://mailman.science.ru.nl/mailman/listinfo/fieldtrip -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: seizure_neuralactivityindex.png Type: image/png Size: 653013 bytes Desc: seizure_neuralactivityindex.png URL: From dr.nivethida at gmail.com Fri Jun 24 13:39:46 2016 From: dr.nivethida at gmail.com (nivethida t) Date: Fri, 24 Jun 2016 07:39:46 -0400 Subject: [FieldTrip] ft_definetrial for .mat file Message-ID: Dear all, I am trying to use the ft_definetrial for a dataset saved as .mat file. I figured out how to run the ft_preprocessing on these data from this forum, but the ft_definetrial still gives me an error (something like headerfile not recognized). Any help is appreciated. Thanks, Nivethida -- Dr.Nivethida Thirugnanasambandam, Postdoctoral Visiting Fellow, Human Motor Control Section, National Institute of Neurological Disorders and Stroke, National Institutes of Health, Building 10, 7D42, 10 Center Drive, MSC 1428 Bethesda, MD 20892 - 1428 Ph: +1-301-402-6231 -------------- next part -------------- An HTML attachment was scrubbed... URL: From julian.keil at gmail.com Fri Jun 24 13:50:44 2016 From: julian.keil at gmail.com (Julian Keil) Date: Fri, 24 Jun 2016 13:50:44 +0200 Subject: [FieldTrip] ft_definetrial for .mat file In-Reply-To: References: Message-ID: <60B83AE4-344A-43DE-BA72-78B708BA9F43@gmail.com> Dear Nivethida, have you tried ft_redefinetrial? This function can be used to define trials in already preprocessed data. Good luck, Julian ******************** Dr. Julian Keil AG Multisensorische Integration Psychiatrische Universitätsklinik der Charité im St. Hedwig-Krankenhaus Große Hamburger Straße 5-11 10115 Berlin Telefon: +49-30-2311-1879 Fax: +49-30-2311-2209 http://psy-ccm.charite.de/forschung/bildgebung/ag_multisensorische_integration Am 24.06.2016 um 13:39 schrieb nivethida t: > Dear all, > I am trying to use the ft_definetrial for a dataset saved as .mat file. I figured out how to run the ft_preprocessing on these data from this forum, but the ft_definetrial still gives me an error (something like headerfile not recognized). Any help is appreciated. > > Thanks, > Nivethida > > -- > Dr.Nivethida Thirugnanasambandam, > Postdoctoral Visiting Fellow, > Human Motor Control Section, > National Institute of Neurological Disorders and Stroke, > National Institutes of Health, > Building 10, 7D42, > 10 Center Drive, MSC 1428 > Bethesda, MD 20892 - 1428 > Ph: +1-301-402-6231 > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > https://mailman.science.ru.nl/mailman/listinfo/fieldtrip -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 495 bytes Desc: Message signed with OpenPGP using GPGMail URL: From laxmi.shaw22 at gmail.com Fri Jun 24 17:33:31 2016 From: laxmi.shaw22 at gmail.com (Laxmi Shaw) Date: Fri, 24 Jun 2016 21:03:31 +0530 Subject: [FieldTrip] Query regarding source localisation Message-ID: Dear Field trip users, I am facing a serious issue with the source localisation using fieldtrip. I have the dataset of EEG.Could you please provide me any example of source localisation using fieldtrip. Your help is always appreciable. Thanks and Regards -- Laxmi Shaw Research Scholar(PhD) IIT Kharagpur West Bengal Ph no-08388837821 -------------- next part -------------- An HTML attachment was scrubbed... URL: From dr.nivethida at gmail.com Fri Jun 24 17:34:45 2016 From: dr.nivethida at gmail.com (nivethida t) Date: Fri, 24 Jun 2016 11:34:45 -0400 Subject: [FieldTrip] ft_definetrial for .mat file In-Reply-To: <60B83AE4-344A-43DE-BA72-78B708BA9F43@gmail.com> References: <60B83AE4-344A-43DE-BA72-78B708BA9F43@gmail.com> Message-ID: Yes Julian, I did try that - it works but it does not generate the trial definitions (cfg.trl) which I need. Thanks, Nivethida On Fri, Jun 24, 2016 at 7:50 AM, Julian Keil wrote: > Dear Nivethida, > > have you tried ft_redefinetrial? > This function can be used to define trials in already preprocessed data. > > Good luck, > > Julian > > ******************** > *Dr. Julian Keil* > > AG Multisensorische Integration > Psychiatrische Universitätsklinik > der Charité im St. Hedwig-Krankenhaus > Große Hamburger Straße 5-11 > 10115 Berlin > > Telefon: +49-30-2311-1879 > Fax: +49-30-2311-2209 > > http://psy-ccm.charite.de/forschung/bildgebung/ag_multisensorische_integration > > Am 24.06.2016 um 13:39 schrieb nivethida t: > > Dear all, > I am trying to use the ft_definetrial for a dataset saved as .mat file. I > figured out how to run the ft_preprocessing on these data from this forum, > but the ft_definetrial still gives me an error (something like headerfile > not recognized). Any help is appreciated. > > Thanks, > Nivethida > > -- > Dr.Nivethida Thirugnanasambandam, > Postdoctoral Visiting Fellow, > Human Motor Control Section, > National Institute of Neurological Disorders and Stroke, > National Institutes of Health, > Building 10, 7D42, > 10 Center Drive, MSC 1428 > Bethesda, MD 20892 - 1428 > Ph: +1-301-402-6231 > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > https://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > https://mailman.science.ru.nl/mailman/listinfo/fieldtrip > -- Dr.Nivethida Thirugnanasambandam, Postdoctoral Visiting Fellow, Human Motor Control Section, National Institute of Neurological Disorders and Stroke, National Institutes of Health, Building 10, 7D42, 10 Center Drive, MSC 1428 Bethesda, MD 20892 - 1428 Ph: +1-301-402-6231 -------------- next part -------------- An HTML attachment was scrubbed... URL: From azeez.adebimpe5 at gmail.com Fri Jun 24 19:05:41 2016 From: azeez.adebimpe5 at gmail.com (Azeez Adebimpe) Date: Fri, 24 Jun 2016 19:05:41 +0200 Subject: [FieldTrip] Query regarding source localisation In-Reply-To: References: Message-ID: <20160624170541.5382228.13036.4303@gmail.com> An HTML attachment was scrubbed... URL: From ghumana at upmc.edu Sun Jun 26 00:12:39 2016 From: ghumana at upmc.edu (Ghuman, Avniel) Date: Sat, 25 Jun 2016 22:12:39 +0000 Subject: [FieldTrip] Postdoc Position in Intracranial EEG and eye tracking in visual neuroscience Message-ID: <20385F716E75B746A7F52BBB3C46A1302F171958@MSXMBXNSPRD15.acct.upmchs.net> Applications are invited for an NIH funded postdoctoral position combining eye tracking and intracranial EEG recordings in humans to study the neural basis of face recognition, object recognition, and social and affective perception, at the University of Pittsburgh, USA. The research will focus on understanding the dynamic neural code that underlies the recognition of faces, bodies, objects, facial expressions, and other social and affective stimuli and how this information guides, and is guided by, eye movements. Of particular interest is how this information is coded in interactive neural circuits at the level of large-scale brain networks. The neural data will primarily be local field potentials/ event related potential from intracranial surface electrodes (electrocorticography, ECoG), cortical depth electrodes, and subcortical depth electrodes in humans in conjunction with eye tracking. There is also the potential for studies involving direct cortical stimulation to assess how neural modulation alters visual perception. The ideal applicant would hold a Ph.D. in Neuroscience, Psychology, Computer Science, Mathematics, Statistics, Engineering or a related field. Strong technical, computational, and statistical skills are required. Experience with combining eye tracking and electrophysiological data is required (for example, scalp EEG or MEG and eye tracking). Applicants should have a strong track record of publication. Pittsburgh is consistently ranked the most livable city in America and the neuroscientific community here, particularly at the University of Pittsburgh and Carnegie Mellon University, is both very strong and collaborative. Interested applicants should send a letter of interest, a CV, and the names and contact information for 3 researchers who can provide a recommendation. For further information or to submit an application, please contact Avniel Ghuman, Ph.D. at ghumana at upmc.edu and see our lab webpage at www.lcnd.pitt.edu . From mailtome.2113 at gmail.com Mon Jun 27 09:18:34 2016 From: mailtome.2113 at gmail.com (Arti Abhishek) Date: Mon, 27 Jun 2016 17:18:34 +1000 Subject: [FieldTrip] No trialinfo after epoching Message-ID: Dear list, I am trying to analyse EEG data recorded in EGI system. When I used the following code to epochs the data, the trialinfo information is missing that prevents me to average each trigger seperately. Could anyone suggest a fix? cfg = []; cfg.dataset = 'LL1101_20160622_022943.raw'; cfg.trialdef.prestim = 0.1; cfg.trialdef.poststim = 0.5; cfg.trialdef.eventtype = 'trigger'; cfg.trialdef.eventvalue = {'DI14', 'DI16', 'DI18', 'DI22', 'DI24', 'DIN4','DIN6', 'DIN8'}; data = ft_definetrial(cfg); LL01_epochs = ft_redefinetrial(data, LL01_cont); Thanks, Arti -------------- next part -------------- An HTML attachment was scrubbed... URL: From emilj at drcmr.dk Mon Jun 27 10:53:25 2016 From: emilj at drcmr.dk (=?utf-8?Q?Emil_=C3=98sterg=C3=A5rd_Johansen?=) Date: Mon, 27 Jun 2016 10:53:25 +0200 Subject: [FieldTrip] Baseline correction when epoching after filtering Message-ID: <6021A776-2BF4-4FE7-A7FB-96DA2DAF28F2@drcmr.dk> Dear all, I cannot figure out how to subtract a baseline window in each trial, say [-2.0 0] when using ft_redefinetrial to epoch my data. As far as I can see baseline correction is only an option for ft_preprocessing. My pipeline is as follows: 1) Run ICA on data which is preprocessed in a manner specifically for ICA 2) Apply ICA weights to raw data (after this my data is in .mat format) 3) Reref and filter using ft_preprocessing 4) Epoch data using ft_definetrial and ft_redefinetrial The code for epoching is as follows and works fine: cfg.dataset = [cfg.subjectdir cfg.subjectstr '.bdf’]; % Raw data for defining trials cfg_cond = ft_definetrial(cfg); cfg_cond.inputfile = [cfg.subjectdir cfg.subjectstr '_ICApruned_filtered.mat’]; data = ft_redefinetrial(cfg_cond); I want to subtract the baseline window when epoching (and epoching should be done after filtering to minimize filter artifacts). I tried using ft_preprocessing again to both subtract baseline and epoch the data (instead of ft_redefinetrial): cfg.dataset = [cfg.subjectdir cfg.subjectstr '.bdf’]; % Raw data for defining trials cfg_cond = ft_definetrial(cfg); cfg_cond.inputfile = [cfg.subjectdir cfg.subjectstr '_ICApruned_filtered.mat’]; cfg_cond.demean = 'yes'; cfg_cond.baselinewindow = [-2.0 0]; data = ft_preprocessing(cfg_cond); but got: "Warning: The field cfg.trl is forbidden, it will be removed from your configuration” and no trials were created. You might suggest that I include the cfg.demean in step 3 when filtering, but then I am unsure if it will simply demean the entire dataset using the same value since the data is continuous at that point. If it is of importance I have my own trial function Thank you for your time, Emil Johansen Hvidovre University Hospital Denmark From tineke.snijders at donders.ru.nl Mon Jun 27 11:13:47 2016 From: tineke.snijders at donders.ru.nl (Snijders, T.M. (Tineke)) Date: Mon, 27 Jun 2016 09:13:47 +0000 Subject: [FieldTrip] Baseline correction when epoching after filtering In-Reply-To: <6021A776-2BF4-4FE7-A7FB-96DA2DAF28F2@drcmr.dk> References: <6021A776-2BF4-4FE7-A7FB-96DA2DAF28F2@drcmr.dk> Message-ID: <815A9820E75FBC4F96B7CD3A8089D11C378EC6FB@exprd04.hosting.ru.nl> Hi Emil, You can just use ft_preprocessing on the redefined data, to do baseline-correction only. So after: data = ft_redefinetrial(cfg_cond); you do: cfg=[]; cfg.demean='yes'; cfg.baselinewindow=[-2 0]; dataBL=ft_preprocessing(cfg,data); Cheers, Tineke ________________________________________ From: fieldtrip-bounces at science.ru.nl [fieldtrip-bounces at science.ru.nl] on behalf of Emil Østergård Johansen [emilj at drcmr.dk] Sent: Monday, June 27, 2016 10:53 AM To: fieldtrip at science.ru.nl Subject: [FieldTrip] Baseline correction when epoching after filtering Dear all, I cannot figure out how to subtract a baseline window in each trial, say [-2.0 0] when using ft_redefinetrial to epoch my data. As far as I can see baseline correction is only an option for ft_preprocessing. My pipeline is as follows: 1) Run ICA on data which is preprocessed in a manner specifically for ICA 2) Apply ICA weights to raw data (after this my data is in .mat format) 3) Reref and filter using ft_preprocessing 4) Epoch data using ft_definetrial and ft_redefinetrial The code for epoching is as follows and works fine: cfg.dataset = [cfg.subjectdir cfg.subjectstr '.bdf’]; % Raw data for defining trials cfg_cond = ft_definetrial(cfg); cfg_cond.inputfile = [cfg.subjectdir cfg.subjectstr '_ICApruned_filtered.mat’]; data = ft_redefinetrial(cfg_cond); I want to subtract the baseline window when epoching (and epoching should be done after filtering to minimize filter artifacts). I tried using ft_preprocessing again to both subtract baseline and epoch the data (instead of ft_redefinetrial): cfg.dataset = [cfg.subjectdir cfg.subjectstr '.bdf’]; % Raw data for defining trials cfg_cond = ft_definetrial(cfg); cfg_cond.inputfile = [cfg.subjectdir cfg.subjectstr '_ICApruned_filtered.mat’]; cfg_cond.demean = 'yes'; cfg_cond.baselinewindow = [-2.0 0]; data = ft_preprocessing(cfg_cond); but got: "Warning: The field cfg.trl is forbidden, it will be removed from your configuration” and no trials were created. You might suggest that I include the cfg.demean in step 3 when filtering, but then I am unsure if it will simply demean the entire dataset using the same value since the data is continuous at that point. If it is of importance I have my own trial function Thank you for your time, Emil Johansen Hvidovre University Hospital Denmark _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl https://mailman.science.ru.nl/mailman/listinfo/fieldtrip From christophe.grova at mcgill.ca Mon Jun 27 16:23:56 2016 From: christophe.grova at mcgill.ca (Christophe Grova) Date: Mon, 27 Jun 2016 14:23:56 +0000 Subject: [FieldTrip] Postdoctoral position for a neurologist/epileptologist available in the Multimodal Functional Imaging Lab, Montreal (MNI McGill and PERFORM Concordia) In-Reply-To: <1467035945505.32385@concordia.ca> References: <1467035369587.215@concordia.ca>, <1467035659679.70310@concordia.ca>, <1467035945505.32385@concordia.ca> Message-ID: Dear community, Please see below the opportunity for a postdoctoral position in my lab. I am currently attending HBM conference in Geneva, so I will be happy to start meeting possible candidates if you are around. The candidate will join a multidisciplinary team composed of neurologists and methodologists within the Multimodal Functional Imaging Laboratory, directed by Pr. Christophe Grova. The laboratory is actually based on two sites: (i) Physics Dpt at Concordia University and PERFORM center, (ii) Biomedical Engineering Dpt and epilepsy group of the Montreal Neurological Institute, McGill University. Both environments offer unique platforms with access to several modalities (simultaneous high-density EEG/fMRI, MEG, simultaneous EEG/NIRS, TMS). The candidate will notably have access to the brand new multimodal imaging platform of PERFORM center, dedicated to neuroscience studies over large cohort of subjects (effect of age, exercising, ...), whereas clinical applications during the presurgical investigation of patients with epilepsy will be primarly based at the Montreal Neurological Institute. The main expertise of the team is the development and the validation of source localization methods dedicated for EEG, MEG and NIRS as well as multimodal characterization of resting state brain activity. Project: Multimodal investigation of epileptic activity using simultaneous EEG/MEG and EEG/NIRS acquisitions. The proposed project aims at localizing and characterizing the generators of epileptic activity using simultaneous acquisitions of ElectroEncephaloGraphy (EEG) with Magneto-EncephaloGraphy (MEG), as well as simultaneous acquisitions of EEG with Near Infra-Red Spectroscopy (NIRS). While methodological developments in the lab will consist in 3D reconstructions of the generators of EEG, MEG and NIRS signals and assessing multimodal concordances between bioelectrical neuronal signals and hemodynamic processes, the purpose of this Postdoctoral project will be to assess the integrity of neurovascular coupling processes at the time of epileptic discharges, using a unique multimodal environment involving EEG/MEG, EEG/NIRS and also EEG/fMRI recordings. Close collaborations with the epilepsy group of the Montreal Neurological Institute, involving notably Dr E. Kobayashi MD-PhD, Dr F. Dubeau MD-PhD and Dr. J. Gotman PhD, will provide access to patient populations and additional clinical expertise for this project. Requirements: The candidate should be an MD (neurologist) with previous training in epileptology and neurophysiology (EEG). Expertise in analyzing MEG or NIRS signals and/or computational skills including neuroimaging softwares are appreciated additional qualification. The candidate should be fluent in English (and if possible French) due to the patient population studied. Supervisor: Christophe Grova Ph.D. Assistant Professor, Physics Dpt and PERFORM, Concordia Univ. Chair of PERFORM Applied Bio-Imaging Committee Adjunct Professor, Biomedical Engineering and Neurology & Neurosurgery dpts, McGill Univ. Member Epilepsy Group, Montreal Neurological Institute Director of the Multimodal Functional Imaging Laboratory Email: christophe.grova at concordia.ca christophe.grova at mcgill.ca Please send your CV and motivation letter before July. 20th 2016 to christophe.grova at concordia.ca *************************** Christophe Grova, PhD Assistant Professor, Physics Dpt, Concordia University PERFORM centre, Concordia University Chair of PERFORM Applied Bio-Imaging Committee (ABC) Adjunct Prof in Biomedical Engineering, and Neurology and Neurosurgery Dpt, McGill University Multimodal Functional Imaging Lab (Multi FunkIm) Montreal Neurological Institute - epilepsy group Centre de Recherches en Mathématiques Physics Dpt Concordia University - Loyola Campus - Office SP 365.12 7141 Sherbrooke Street West, Montreal, QC H4B 1R6 Phone: (514) 848-2424 ext.4221 email : christophe.grova at concordia.ca , christophe.grova at mcgill.ca Explore Concordia: http://explore.concordia.ca/christophe-grova Physics, Concordia University: http://www.concordia.ca/artsci/physics/faculty.html?fpid=christophe-grova McGill University: http://www.bic.mni.mcgill.ca/ResearchLabsMFIL/PeopleChristophe MultiFunkIm Lab: http://www.bic.mni.mcgill.ca/ResearchLabsMFIL/HomePage *************************** [X] -------------- next part -------------- An HTML attachment was scrubbed... URL: From mailtome.2113 at gmail.com Tue Jun 28 04:01:16 2016 From: mailtome.2113 at gmail.com (Arti Abhishek) Date: Tue, 28 Jun 2016 12:01:16 +1000 Subject: [FieldTrip] No trialinfo after epoching In-Reply-To: References: Message-ID: Dear list, I am following up on my previous question on mussing trial info after I epoch the data. The fourth column in the data.cfg.trial is present when the triggers are neumeric. But when the triggers are in string format (as in EGI system eg. "DIN8"), the fourth column is not present with the following code. I would really appreciate if someone could suggest a fix. cfg = []; cfg.dataset = 'LL1101_20160622_022943.raw'; cfg.trialdef.prestim = 0.1; cfg.trialdef.poststim = 0.5; cfg.trialdef.eventtype = 'trigger'; cfg.trialdef.eventvalue = {'DI14', 'DI16', 'DI18', 'DI22', 'DI24', 'DIN4','DIN6', 'DIN8'}; data = ft_definetrial(cfg); LL01_epochs = ft_redefinetrial(data, LL01_cont); Thanks, Arti On Mon, Jun 27, 2016 at 5:18 PM, Arti Abhishek wrote: > Dear list, > > I am trying to analyse EEG data recorded in EGI system. When I used the > following code to epochs the data, the trialinfo information is missing > that prevents me to average each trigger seperately. Could anyone suggest a > fix? > > cfg = []; > cfg.dataset = 'LL1101_20160622_022943.raw'; > cfg.trialdef.prestim = 0.1; > cfg.trialdef.poststim = 0.5; > cfg.trialdef.eventtype = 'trigger'; > cfg.trialdef.eventvalue = {'DI14', 'DI16', 'DI18', 'DI22', 'DI24', > 'DIN4','DIN6', 'DIN8'}; > data = ft_definetrial(cfg); > LL01_epochs = ft_redefinetrial(data, LL01_cont); > > Thanks, > Arti > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From lindseyrtate at ou.edu Tue Jun 28 10:05:52 2016 From: lindseyrtate at ou.edu (Tate, Lindsey R.) Date: Tue, 28 Jun 2016 08:05:52 +0000 Subject: [FieldTrip] Tate, Lindsey R. wants to share the file dataFIC4.mat with you Message-ID: To view dataFIC4.mat, sign in or create an account. -------------- next part -------------- An HTML attachment was scrubbed... URL: From lindseyrtate at ou.edu Tue Jun 28 10:05:47 2016 From: lindseyrtate at ou.edu (Tate, Lindsey R.) Date: Tue, 28 Jun 2016 08:05:47 +0000 Subject: [FieldTrip] Beamforming, "Inf" during source estimation by subject Message-ID: Tate, Lindsey R. has shared a?OneDrive for Business?file with you. To view it, click the link below. [https://r1.res.office365.com/owa/prem/images/dc-generic_20.png] dataFIC4.mat Hello Fieldtrip Community, I've been working on beamforming the MEG data collected from 16 subjects during a saccade task. This is my first time beamforming so I've been heavily relying on the tutorial. When I collapse trials across subjects and do beamforming, I can get the ft_sourceplot commands to produce something that makes some sense. However, I need to be able to have the data separated by subject for ft_sourcestatistics. I've created structures that should work for this purpose and that look correct. However, the ".pow" from the Neural Activity Index calculation step ends up mostly "NaN" and partly "Inf" when I run the beamforming divided by subject. Is this related to the number of trials per subject somehow (e.g., do I have too few? is there some kind of setting I need to change?)? Why is the ".pow" coming back "Inf" instead of a real number? Does anyone have suggestions for fixing this problem so that I don't get "Inf" anymore? My code and raw data structure are attached. Thank you, Lindsey Tate University of Oklahoma -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: BF_trial4.m URL: From emilj at drcmr.dk Tue Jun 28 14:33:41 2016 From: emilj at drcmr.dk (=?utf-8?Q?Emil_=C3=98sterg=C3=A5rd_Johansen?=) Date: Tue, 28 Jun 2016 14:33:41 +0200 Subject: [FieldTrip] Baseline correction when epoching after filtering Message-ID: <8CB0822C-27C7-48F5-9A30-E883906C65AC@drcmr.dk> Dear Dr. Snijders, Thank you for your swift response and suggestion. I tried your solution, but since my epochs are not completely adjacent in the data (there is a pause of 4 seconds between epochs), when following your suggestion there is no data available previous to the stimulus because the data in between has been removed when epoching using ft_redefinetrial. So when using a window of [-2 0], Fieldtrip simply reverts to subtracting the first sample value such that all signals start at 0, which is of course not desirable. I have solved it now and will describe it briefly here if others face the same problem: I included data prior to the stimulus onset in the epoch. As an example, say my epoch is 1 second long and I want to use [-0.5 0] as baseline. Then I define my epoch as [-0.5 1] and use ft_redefinetrial to epoch the data. Afterwards I use a cfg.baselinewindow = [0 0.5] and baseline correct the data the way you described. When plotting the ERP’s I then plot the true epoch which is [0.5 1.5] in my “dummy” epoch. Thank you again for your help, Emil From jan.schoffelen at donders.ru.nl Tue Jun 28 14:58:27 2016 From: jan.schoffelen at donders.ru.nl (Schoffelen, J.M. (Jan Mathijs)) Date: Tue, 28 Jun 2016 12:58:27 +0000 Subject: [FieldTrip] No trialinfo after epoching In-Reply-To: References: Message-ID: Hi Arti, I think that this can be easily fixed. Notably, if you have a look at ft_trialfun_general, there’s a specific string-to-number conversion for eventtypes that start with ’S’, or ‘R’. This happens on line 210/211. It might be possible to come up with a generic solution, but this will result in a more or less arbitrary string-to-number mapping. The ’S’ and ‘R’ eventvalues pertain to a particular acquisition system that codes stimuli and responses as ‘Sx’, and ‘Rx’ respectively, where the ‘x’ is a user-specified value. If you come up with a sensible generic solution I’d be more than happy to build it into the code, or you can do so yourself, and submit this to our github repository as a pull request. Best wishes, Jan-Mathijs On 28 Jun 2016, at 04:01, Arti Abhishek > wrote: Dear list, I am following up on my previous question on mussing trial info after I epoch the data. The fourth column in the data.cfg.trial is present when the triggers are neumeric. But when the triggers are in string format (as in EGI system eg. "DIN8"), the fourth column is not present with the following code. I would really appreciate if someone could suggest a fix. cfg = []; cfg.dataset = 'LL1101_20160622_022943.raw'; cfg.trialdef.prestim = 0.1; cfg.trialdef.poststim = 0.5; cfg.trialdef.eventtype = 'trigger'; cfg.trialdef.eventvalue = {'DI14', 'DI16', 'DI18', 'DI22', 'DI24', 'DIN4','DIN6', 'DIN8'}; data = ft_definetrial(cfg); LL01_epochs = ft_redefinetrial(data, LL01_cont); Thanks, Arti On Mon, Jun 27, 2016 at 5:18 PM, Arti Abhishek > wrote: Dear list, I am trying to analyse EEG data recorded in EGI system. When I used the following code to epochs the data, the trialinfo information is missing that prevents me to average each trigger seperately. Could anyone suggest a fix? cfg = []; cfg.dataset = 'LL1101_20160622_022943.raw'; cfg.trialdef.prestim = 0.1; cfg.trialdef.poststim = 0.5; cfg.trialdef.eventtype = 'trigger'; cfg.trialdef.eventvalue = {'DI14', 'DI16', 'DI18', 'DI22', 'DI24', 'DIN4','DIN6', 'DIN8'}; data = ft_definetrial(cfg); LL01_epochs = ft_redefinetrial(data, LL01_cont); Thanks, Arti _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl https://mailman.science.ru.nl/mailman/listinfo/fieldtrip -------------- next part -------------- An HTML attachment was scrubbed... URL: From tineke.snijders at donders.ru.nl Tue Jun 28 16:07:18 2016 From: tineke.snijders at donders.ru.nl (Snijders, T.M. (Tineke)) Date: Tue, 28 Jun 2016 14:07:18 +0000 Subject: [FieldTrip] Baseline correction when epoching after filtering In-Reply-To: <8CB0822C-27C7-48F5-9A30-E883906C65AC@drcmr.dk> References: <8CB0822C-27C7-48F5-9A30-E883906C65AC@drcmr.dk> Message-ID: <815A9820E75FBC4F96B7CD3A8089D11C378EC8CF@exprd04.hosting.ru.nl> Dear Emil, Yes, indeed you should have the prestimulus data available to baseline-correct for it. But note that fieldtrip shifts the timing info in relation with the trigger onset. So if you use cfg.trialdef.prestim = 0.5; cfg.trialdef.poststim = 1; when you define your trials, then your timing information is relative to the trigger, so it will actually go from [-0.5 1.0], and you can use the 'correct' times (with regard to trigger onset) then. So you can just use [-0.5 0] as baselinewindow, and then you don't need to plot [0.5 1.5] when what you actually want to plot is [0 1.0]. If you have done the epoching in some other way, just alter data.time so it gives the 'correct' times. Best, Tineke ________________________________________ From: fieldtrip-bounces at science.ru.nl [fieldtrip-bounces at science.ru.nl] on behalf of Emil Østergård Johansen [emilj at drcmr.dk] Sent: Tuesday, June 28, 2016 2:33 PM To: fieldtrip at science.ru.nl Subject: Re: [FieldTrip] Baseline correction when epoching after filtering Dear Dr. Snijders, Thank you for your swift response and suggestion. I tried your solution, but since my epochs are not completely adjacent in the data (there is a pause of 4 seconds between epochs), when following your suggestion there is no data available previous to the stimulus because the data in between has been removed when epoching using ft_redefinetrial. So when using a window of [-2 0], Fieldtrip simply reverts to subtracting the first sample value such that all signals start at 0, which is of course not desirable. I have solved it now and will describe it briefly here if others face the same problem: I included data prior to the stimulus onset in the epoch. As an example, say my epoch is 1 second long and I want to use [-0.5 0] as baseline. Then I define my epoch as [-0.5 1] and use ft_redefinetrial to epoch the data. Afterwards I use a cfg.baselinewindow = [0 0.5] and baseline correct the data the way you described. When plotting the ERP’s I then plot the true epoch which is [0.5 1.5] in my “dummy” epoch. Thank you again for your help, Emil _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl https://mailman.science.ru.nl/mailman/listinfo/fieldtrip From zhangk28 at mcmaster.ca Tue Jun 28 18:30:45 2016 From: zhangk28 at mcmaster.ca (KAIJIE ZHANG) Date: Tue, 28 Jun 2016 12:30:45 -0400 Subject: [FieldTrip] topoplotTFR Message-ID: Hi Community, I've been using topoplotTFR for plotting NIRS signals, and it has been going pretty well. Just a small thing: I have been plotting topographic maps for several pieces of data, but each plot has a different scaling, thus giving the value of colour a lot of ambiguity. I was wondering if there is any way to keep constant values corresponding to a constant colour with topoplotTFR? Thank you very much for any input! Best Regards, Kaijie Zhang -- Kaijie Zhang Electrical & Biomedical Engineering, Level III McMaster University -------------- next part -------------- An HTML attachment was scrubbed... URL: From p.taesler at uke.uni-hamburg.de Tue Jun 28 19:13:17 2016 From: p.taesler at uke.uni-hamburg.de (Philipp Taesler) Date: Tue, 28 Jun 2016 19:13:17 +0200 Subject: [FieldTrip] topoplotTFR In-Reply-To: <5dd276f263ae4caeb0e909b53c36c538@EXCCAHT-1.mail.uke.ads> References: <5dd276f263ae4caeb0e909b53c36c538@EXCCAHT-1.mail.uke.ads> Message-ID: <5772B02D.50203@uke.uni-hamburg.de> Hello Kaijie, you can use the caxis([min max]) command to set the scaling programmatically for the current axes. You can also pass an axes handle to the command to set it for individual plots if you have multiple figures open. Cheers, Phil Am 28.06.16 um 18:30 schrieb KAIJIE ZHANG: > Hi Community, > > I've been using topoplotTFR for plotting NIRS signals, and it has been > going pretty well. Just a small thing: I have been plotting topographic > maps for several pieces of data, but each plot has a different scaling, > thus giving the value of colour a lot of ambiguity. I was wondering if > there is any way to keep constant values corresponding to a constant > colour with topoplotTFR? Thank you very much for any input! > > Best Regards, > Kaijie Zhang > > -- > Kaijie Zhang > Electrical & Biomedical Engineering, Level III > McMaster University > -- _____________________________________________________________________ Universitätsklinikum Hamburg-Eppendorf; Körperschaft des öffentlichen Rechts; Gerichtsstand: Hamburg | www.uke.de Vorstandsmitglieder: Prof. Dr. Burkhard Göke (Vorsitzender), Prof. Dr. Dr. Uwe Koch-Gromus, Joachim Prölß, Rainer Schoppik _____________________________________________________________________ SAVE PAPER - THINK BEFORE PRINTING From XDu at mprc.umaryland.edu Tue Jun 28 20:04:37 2016 From: XDu at mprc.umaryland.edu (Xiaoming Du) Date: Tue, 28 Jun 2016 14:04:37 -0400 Subject: [FieldTrip] Methold reference for Connectivity analysis Message-ID: <577283F5020000DC0001BB4B@MPRC.UMARYLAND.EDU> Dear all, One of the method for FT_CONNECTIVITYANALYSIS is 'amplcorr'. The description in the help document is " 'amplcorr', amplitude correlation, support for freq and source data". I can not find any further explanation for this method from "Methold reference" page either. http://www.fieldtriptoolbox.org/references_to_implemented_methods Does anyone know which published paper(s) used this method? Thanks. Xiaoming -------------- next part -------------- An HTML attachment was scrubbed... URL: From michelic72 at gmail.com Tue Jun 28 22:45:42 2016 From: michelic72 at gmail.com (Cristiano Micheli) Date: Tue, 28 Jun 2016 22:45:42 +0200 Subject: [FieldTrip] Methold reference for Connectivity analysis In-Reply-To: <577283F5020000DC0001BB4B@MPRC.UMARYLAND.EDU> References: <577283F5020000DC0001BB4B@MPRC.UMARYLAND.EDU> Message-ID: Dear Xiaming, amplcorr implements a set of metrics related to correlation/cross-spectral density. See the reference for the function ft_connectivity_corr.m here: http://www.fieldtriptoolbox.org/reference/ft_connectivity_corr The function help contains a list of references too. IHTH Cris On Tue, Jun 28, 2016 at 8:04 PM, Xiaoming Du wrote: > Dear all, > > One of the method for FT_CONNECTIVITYANALYSIS is *'amplcorr'*. > > The description in the help document is " 'amplcorr', amplitude > correlation, support for freq and source data". > > I can not find any further explanation for this method from "Methold > reference" page either. > http://www.fieldtriptoolbox.org/references_to_implemented_methods > > Does anyone know which published paper(s) used this method? > > Thanks. > > Xiaoming > > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > https://mailman.science.ru.nl/mailman/listinfo/fieldtrip > -------------- next part -------------- An HTML attachment was scrubbed... URL: From anne.urai at gmail.com Wed Jun 29 13:21:01 2016 From: anne.urai at gmail.com (Anne Urai) Date: Wed, 29 Jun 2016 04:21:01 -0700 Subject: [FieldTrip] topoplotTFR Message-ID: Dear Kaijie, see this option from the ft_topoplottfr help, which you can use to pre-specify numerical values cfg.zlim = plotting limits for color dimension, 'maxmin', 'maxabs', 'zeromax', 'minzero', or [zmin zmax] (default = 'maxmin') — Anne E. Urai, MSc PhD student | Institut für Neurophysiologie und Pathophysiologie Universitätsklinikum Hamburg-Eppendorf | Martinistrasse 52, 20246 | Hamburg, Germany www.anneurai.net / @AnneEUrai On 28 June 2016 at 18:30, KAIJIE ZHANG wrote: > Hi Community, > > I've been using topoplotTFR for plotting NIRS signals, and it has been > going pretty well. Just a small thing: I have been plotting topographic > maps for several pieces of data, but each plot has a different scaling, > thus giving the value of colour a lot of ambiguity. I was wondering if > there is any way to keep constant values corresponding to a constant colour > with topoplotTFR? Thank you very much for any input! > > Best Regards, > Kaijie Zhang > > -- > Kaijie Zhang > Electrical & Biomedical Engineering, Level III > McMaster University > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > https://mailman.science.ru.nl/mailman/listinfo/fieldtrip > -------------- next part -------------- An HTML attachment was scrubbed... URL: From XDu at mprc.umaryland.edu Wed Jun 29 15:50:56 2016 From: XDu at mprc.umaryland.edu (Xiaoming Du) Date: Wed, 29 Jun 2016 09:50:56 -0400 Subject: [FieldTrip] Methold reference for Connectivity analysis In-Reply-To: References: <577283F5020000DC0001BB4B@MPRC.UMARYLAND.EDU> Message-ID: <57739A00020000DC0001BBCE@MPRC.UMARYLAND.EDU> Thanks Cris! Very helpful info! >>> Cristiano Micheli 6/28/2016 4:45 PM >>> Dear Xiaming, amplcorr implements a set of metrics related to correlation/cross-spectral density. See the reference for the function ft_connectivity_corr.m here: http://www.fieldtriptoolbox.org/reference/ft_connectivity_corr The function help contains a list of references too. IHTH Cris On Tue, Jun 28, 2016 at 8:04 PM, Xiaoming Du wrote: Dear all, One of the method for FT_CONNECTIVITYANALYSIS is 'amplcorr'. The description in the help document is " 'amplcorr', amplitude correlation, support for freq and source data". I can not find any further explanation for this method from "Methold reference" page either. http://www.fieldtriptoolbox.org/references_to_implemented_methods Does anyone know which published paper(s) used this method? Thanks. Xiaoming _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl https://mailman.science.ru.nl/mailman/listinfo/fieldtrip -------------- next part -------------- An HTML attachment was scrubbed... URL: From pmetzak at gmail.com Wed Jun 29 23:01:02 2016 From: pmetzak at gmail.com (Paul Metzak) Date: Wed, 29 Jun 2016 14:01:02 -0700 Subject: [FieldTrip] issues compiling matlab code that calls spm and runs a beamformer analysis Message-ID: Hi, I solved my own problem so I thought I would reply in case someone else runs into this issue. The problem is that when SPM (or SPM functions) are compiled, they search for a file called Contents.txt in the compiled spm directory; however, this file is not created when only some of the SPM functions are compiled through FieldTrip. Contents.txt is a copy of the Contents.m file found in SPM directories, so the solution was to copy Contents.m, rename it Contents.txt and to place this file in the compiled SPM directory. Note that for me at least, the compiled directories do not appear until the compiled code is run for the first time. I hope that saves someone some time one day! Paul -------------- next part -------------- An HTML attachment was scrubbed... URL: From pmetzak at gmail.com Thu Jun 30 00:01:26 2016 From: pmetzak at gmail.com (Paul Metzak) Date: Wed, 29 Jun 2016 15:01:26 -0700 Subject: [FieldTrip] unexpected image dimensions following ft_volumenormalise Message-ID: Hello, I am in the process of setting up a compiled beamformer script to run on my university's supercomputer. One issue that I have run into is that the dimensions of my beamformed image. I have my beamformed image that I have source interpolated (using ft_sourceinterpolate) with the participant's structural MRI. sourceDIFF_int = > inside: [256x256x256 logical] > pow: [256x256x256 double] > dim: [256 256 256] > transform: [4x4 double] > anatomy: [256x256x256 double] > coordsys: 'ctf' > unit: 'mm' > cfg: [1x1 struct] When I run the volume normalise function on sourceDIFF_int (see below), which lists a template file as input (as required to run when compiled), the output dimensions do not match the dimensions of the template file. I am curious where these mysterious dimensions are coming from, and why the template file is not being used? This happens both in the compiled and MATLAB-based executions of this code. cfg = []; > cfg.nonlinear = 'no'; > cfg.template = 'T1.nii'; > cfg.spmversion = 'spm8'; > sourceDIFF_int_norm = ft_volumenormalise(cfg, sourceDIFF_int); As you can see from the variable information for the normalised data, and the T1 template (see below), the dimensions are different. sourceDIFF_int_norm = > anatomy: [157x189x136 double] > pow: [157x189x136 double] > inside: [157x189x136 logical] > transform: [4x4 double] > dim: [157 189 136] > params: [1x1 struct] > initial: [4x4 double] > coordsys: 'spm' > cfg: [1x1 struct] > > templ_T1 = > dim: [91 109 91] > anatomy: [91x109x91 double] > hdr: [1x1 struct] > transform: [4x4 double] > unit: 'mm' Thank you for any light you can shed on this issue. Please let me know if more information would be helpful in resolving this. Paul -------------- next part -------------- An HTML attachment was scrubbed... URL: From lindseyrtate at ou.edu Thu Jun 30 08:22:41 2016 From: lindseyrtate at ou.edu (Tate, Lindsey R.) Date: Thu, 30 Jun 2016 06:22:41 +0000 Subject: [FieldTrip] Beamforming, "Inf" during source estimation by subject In-Reply-To: References: Message-ID: Tate, Lindsey R. has shared a?OneDrive for Business?file with you. To view it, click the link below. [https://r1.res.office365.com/owa/prem/images/dc-generic_20.png] dataFIC4.mat Hello Fieldtrip Community, On Tuesday 6/28, I sent out the original message forwarded below. I received some response but have been unable to resolve my problem. [Attempted to allow lambda to be estimated/not specified, but this didn't eliminate the "Inf" in the pow matrices.] I've been working on beamforming the MEG data collected from 16 subjects during a saccade task. There are 4 conditions, with a maximum of 30 trials each per subject (some trials eliminated due to loss of focus). This is my first time beamforming so I've been heavily relying on the tutorial. I'm having what appears to be two issues: 1) Number of trials per subject may be too low. When I collapse across all subjects or even collapse across two random subjects so as to artificially increase the number of trials per "artificial subject," real numbers are produced by ft_sourceinterpolate in the pow matrix. When I run each subject individually, the pow matrix from ft_sourceinterpolate "Inf" where numbers were for the other runs. Is there a way to resolve this issue, such as a default setting to override? Or do I have too few trials per condition? 2) The pow matrix from ft_sourceinterpolate produces primarily "NaN," with about 90% of the rows being "NaN." This seems problematic. Also, it seems like it may be causing problems with ft_sourcestatistics as the stat.prob and stat.mask matrices always come back empty, even when ft_sourceinterpolate produces pow matrices with real numbers divided by "artificial subjects." Could this prevalence of "NaN" be an indication that the beamforming isn't happening correctly? Could the prevalence be causing the ft_sourcestatistics to produce blank stat.prob and stat.mask matrices? Code and raw dataset attached. Thank you for any assistance or guidance you may offer! Lindsey University of Oklahoma ________________________________ From: Tate, Lindsey R. Sent: Tuesday, June 28, 2016 3:05 AM To: fieldtrip at science.ru.nl Subject: Beamforming, "Inf" during source estimation by subject Hello Fieldtrip Community, I've been working on beamforming the MEG data collected from 16 subjects during a saccade task. This is my first time beamforming so I've been heavily relying on the tutorial. When I collapse trials across subjects and do beamforming, I can get the ft_sourceplot commands to produce something that makes some sense. However, I need to be able to have the data separated by subject for ft_sourcestatistics. I've created structures that should work for this purpose and that look correct. However, the ".pow" from the Neural Activity Index calculation step ends up mostly "NaN" and partly "Inf" when I run the beamforming divided by subject. Is this related to the number of trials per subject somehow (e.g., do I have too few? is there some kind of setting I need to change?)? Why is the ".pow" coming back "Inf" instead of a real number? Does anyone have suggestions for fixing this problem so that I don't get "Inf" anymore? My code and raw data structure are attached. Thank you, Lindsey Tate University of Oklahoma -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: BF_trial4.m URL: From lindseyrtate at ou.edu Thu Jun 30 08:22:46 2016 From: lindseyrtate at ou.edu (Tate, Lindsey R.) Date: Thu, 30 Jun 2016 06:22:46 +0000 Subject: [FieldTrip] Tate, Lindsey R. wants to share the file dataFIC4.mat with you Message-ID: To view dataFIC4.mat, sign in or create an account. -------------- next part -------------- An HTML attachment was scrubbed... URL: From B.Haendel at gmx.net Thu Jun 30 12:03:01 2016 From: B.Haendel at gmx.net (Barbara Haendel) Date: Thu, 30 Jun 2016 12:03:01 +0200 Subject: [FieldTrip] Postdoc/PhD positions: cognitive Neuroscience - University of Wuerzburg (Germany) Message-ID: An HTML attachment was scrubbed... URL: From alexandre.gramfort at telecom-paristech.fr Thu Jun 30 18:50:32 2016 From: alexandre.gramfort at telecom-paristech.fr (Alexandre Gramfort) Date: Thu, 30 Jun 2016 18:50:32 +0200 Subject: [FieldTrip] [JOB] Post Doc Machine Learning for neuroscience time series Message-ID: *Post-Doc/Research position in:* *Supervised learning on neuroscience time-series with application to epilepsy* Place: TELECOM ParisTech, 75013 Paris, France Duration: 1 year (extension possible) Start: Any date from September 1st, 2016 Salary: according to background and experience *Keywords:* machine learning, time-series, optimization, conditional random fields (CRF), representation learning, electroencephalography (EEG) *Position description* The objective of the project is to develop machine learning tools that can facilitate the review, the visualization, the processing and the annotation of clinical intracranial EEG data in the context of epilepsy. Epilepsy is a pathology that leads to prototypical patterns in the recorded time series (spikes, high frequency oscillations, seizures). The objective of the project is to build algorithms that automatically pinpoint such events in raw intracranial EEG data. The approach envisioned is based on state-of-the-art machine learning techniques (representation learning, conditional random fields). The position is funded by a joint grant between Alexandre Gramfort and Slim Essid at the Signal and Image Processing department at Telecom ParisTech, the companies Dataiku and Bioserenity as well as the ICM Institute at the Salpétrière hospital. *Work Environment* TELECOM ParisTech is the leading graduate School of Institut TELECOM with more than 160 research professors and over 250 Engineering degrees, 50 PhD and 150 specialized masters (post graduates) awarded per year. The signal and image processing (TSI) department conducts leading research in the field of statistics, machine learning and signal processing with regular publications in leading conferences (NIPS, ICML, ICCASP, etc.) and journals (JMLR, IEEE Trans. Med. Imaging, IEEE Trans. Signal Processing, etc.). The candidate will be integrated to a team formed by 6 PIs, more than 10 PhD students, 4 engineers and 3 post-docs, among which are 6 persons dedicated to the statistical analysis of electrophysiological signals. The local expertise is unique with both significant experience in signal processing, machine learning, statistics and in applied neuroscience data munging. *Candidate Profile* As minimum requirements, the candidate will have: a PhD in computer science, statistics / machine learning, signal processing strong programming skills (Experience with Python is a definite plus) strong communication skills in English. The ideal candidate would also have: - Prior experience with EEG data analysis and/or electrophysiology signals - Ability to work in a multi-partner collaborative environment. - Basic knowledge of French (not required). *Contacts *Interested applicants can contact Alexandre Gramfort or Slim Essid for more information or directly email a candidacy letter including a Curriculum Vitae, a list of publications and a statement of research interests. - Alexandre Gramfort (alexandre.gramfort at telecom-paristech.fr) - Slim Essid (slim.essid at telecom-paristech.fr) -------------- next part -------------- An HTML attachment was scrubbed... URL: From s.chettouf at vu.nl Wed Jun 1 14:04:20 2016 From: s.chettouf at vu.nl (Chettouf, S.) Date: Wed, 1 Jun 2016 12:04:20 +0000 Subject: [FieldTrip] Layout label ordering Message-ID: Dear field trip community, I want to make a layout for my EEG data measured with a 61-chan Easycap to make a plot with ft_multiplotTRF. My layout looks a lot like EasyCapM11.mat, only the order of channels differers completely. Do I have to correct for this order? Or is there some ‘label detection’? Kind regards, Sabrina Chettouf -------------- next part -------------- An HTML attachment was scrubbed... URL: From j.herring at donders.ru.nl Wed Jun 1 14:28:03 2016 From: j.herring at donders.ru.nl (Herring, J.D. (Jim)) Date: Wed, 1 Jun 2016 12:28:03 +0000 Subject: [FieldTrip] Layout label ordering In-Reply-To: References: Message-ID: <3D00B7615FB58D46A0B49B9AD67A33EB3DA02252@exprd01.hosting.ru.nl> Dear Sabrina, The ordering is not important as long as the labels in your data correspond to labels in the layout file. Best, Jim From: fieldtrip-bounces at science.ru.nl [mailto:fieldtrip-bounces at science.ru.nl] On Behalf Of Chettouf, S. Sent: Wednesday, June 01, 2016 2:04 PM To: fieldtrip at science.ru.nl Subject: [FieldTrip] Layout label ordering Dear field trip community, I want to make a layout for my EEG data measured with a 61-chan Easycap to make a plot with ft_multiplotTRF. My layout looks a lot like EasyCapM11.mat, only the order of channels differers completely. Do I have to correct for this order? Or is there some 'label detection'? Kind regards, Sabrina Chettouf -------------- next part -------------- An HTML attachment was scrubbed... URL: From jan.schoffelen at donders.ru.nl Wed Jun 1 14:56:18 2016 From: jan.schoffelen at donders.ru.nl (Schoffelen, J.M. (Jan Mathijs)) Date: Wed, 1 Jun 2016 12:56:18 +0000 Subject: [FieldTrip] Average referencing and demeaning prior to beamformer In-Reply-To: References: Message-ID: Hi Maris, > Question 1: after I combine the the two cut-out time windows to calculate the common filter, do I need to average reference the combined data set prior to calculating the beamformer filter? The referencing procedure operates across channels, not time points. Thus once the data has been average referenced (and as long as you don’t throw away channels in the mean time, or do something funky that affects the channel mixing, e.g. remove certain topographical patterns based on an ICA), the data does not need to be re-referenced anymore. > Question 2: Do I need to separately average reference each of the two cut-out windows prior to applying the beamformer on each of the cut-out data segments? See above, the rereferencing is independent of time. > Question 3 on demeaning: do the cut-out combined/separate time windows should also be demeaned or demeaning doesn't make any difference for beamformer source reconstruction? The LCMV beamformer requires a covariance matrix. This is generally constructed by the user with ft_timelockanalysis. Unless you specify otherwise, the data will be demeaned by default prior to the covariance computation. Best, Jan-Mathijs > > Thanks! > > Maris > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip From jim.f.cav at gmail.com Wed Jun 1 23:43:46 2016 From: jim.f.cav at gmail.com (Jim Cavanagh) Date: Wed, 1 Jun 2016 15:43:46 -0600 Subject: [FieldTrip] LCMV time window Message-ID: I get radically different outputs depending on the time window used for LCMV (primarily MEG, but also a bit with EEG). My data are sampled at 250 Hz, filtered .5 to 20 Hz, calculated as the percent change (sourcediff = (source A - source B) / source A). With 3 samples (12 ms), LCMV outcomes are uninterpretable (i.e. values of 100,000 % change). Increasing samples yield increasingly realistic values, especially at about 25 samples (100 ms). I presume this has to do with the covariance, especially since there doesn't appear to be much noise in the data. This is unfortunate since some of the ERF events that I'd like to capture are short-lived. 1) Does anyone have an explanation for this issue so I can account for it? 2) Or, barring that, feedback on an optimal way to determine temporal window size for LCMV? -- Jim Cavanagh Assistant Professor University of New Mexico https://sites.google.com/site/jcavanaghunm/home -------------- next part -------------- An HTML attachment was scrubbed... URL: From sarang at cfin.au.dk Thu Jun 2 12:05:56 2016 From: sarang at cfin.au.dk (Sarang S. Dalal) Date: Thu, 2 Jun 2016 10:05:56 +0000 Subject: [FieldTrip] LCMV time window In-Reply-To: References: Message-ID: <675C0D1B-3501-431E-B8F6-5AA54CAC915A@cfin.au.dk> Dear Jim, Indeed, 3 samples is much too few for constructing the beamformer filter —as you guessed, this results in a poor covariance estimate that is furthermore low-rank and therefore difficult to reliably invert. But, it is no matter, as you can construct the filter with your complete trial (perhaps 100ms as a minimum length), but examine the resulting time series (source.avg.mom) for whichever shorter intervals you are interested in. If you are not contrasting conditions, you may consider applying: cfg.lcmv.weightnorm = 'nai’; For reference, our group typically uses the following additional options for such data: cfg.lcmv.reducerank = 'no'; cfg.lcmv.fixedori = 'yes’; cfg.lcmv.projectnoise = 'yes'; It is so far undocumented, but our plotting tools in fieldtrip/contrib/nutmegtrip could help navigating the resulting source time series (in your path you’ll need: a full copy of SPM8, fieldtrip/contrib/nutmegtrip , and fieldtrip/template/atlas/aal ) cfg=[]; cfg.mripath = ‘yourmri.nii’; % or template MRI if voxel grid is in MNI space cfg.funparameter = 'avg.mom'; cfg.atlas = ft_read_atlas('ROI_MNI_V4.nii'); % AAL atlas (optional) nmt_sourceplot_spm8(cfg,ft_convert_units(source,'mm')); Cheers, Sarang On 01 Jun 2016, at 23:43, Jim Cavanagh > wrote: I get radically different outputs depending on the time window used for LCMV (primarily MEG, but also a bit with EEG). My data are sampled at 250 Hz, filtered .5 to 20 Hz, calculated as the percent change (sourcediff = (source A - source B) / source A). With 3 samples (12 ms), LCMV outcomes are uninterpretable (i.e. values of 100,000 % change). Increasing samples yield increasingly realistic values, especially at about 25 samples (100 ms). I presume this has to do with the covariance, especially since there doesn't appear to be much noise in the data. This is unfortunate since some of the ERF events that I'd like to capture are short-lived. 1) Does anyone have an explanation for this issue so I can account for it? 2) Or, barring that, feedback on an optimal way to determine temporal window size for LCMV? -- Jim Cavanagh Assistant Professor University of New Mexico https://sites.google.com/site/jcavanaghunm/home _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -------------- next part -------------- An HTML attachment was scrubbed... URL: From gmichael_ at hotmail.com Thu Jun 2 23:15:20 2016 From: gmichael_ at hotmail.com (george michael) Date: Thu, 2 Jun 2016 21:15:20 +0000 Subject: [FieldTrip] Morphing the single-subject minimum norm estimates into a common standard template mesh with FieldTrip Message-ID: Dear Fieldtrip Community, We are analysing the ERF with NeuromakElekta data and our goal is to do group-analysis on the minimum norm estimates corresponding to the ERF data. We have combined the use of freesurfer and MNE to segment the individual MRI-images, etc, and create the cortical meshes (subj-oct-6-src.fif). Coregistration of MRI-MEG data was also done with those tools. We have used FieldTrip to process the functional data and estimate the minimum norm estimates in the individual subject space. Does somebody have a suggestion for how to morph the single-subject minimum norm estimates into a common standard template using FieldTrip? (i.e. cortex_8196.surf.gii) The goal would be to do group analysis in the common space. Thanks in advance. Best Regards, Giorgos Michail Research Assistant Department of Neurology Charite Medical University, Berlin -------------- next part -------------- An HTML attachment was scrubbed... URL: From jan.schoffelen at donders.ru.nl Fri Jun 3 09:26:58 2016 From: jan.schoffelen at donders.ru.nl (Schoffelen, J.M. (Jan Mathijs)) Date: Fri, 3 Jun 2016 07:26:58 +0000 Subject: [FieldTrip] Morphing the single-subject minimum norm estimates into a common standard template mesh with FieldTrip In-Reply-To: References: Message-ID: <22E6347B-83AD-4295-87D8-9AB67F575522@donders.ru.nl> Dear Giorgos, I’d recommend using hcp-workbench or Caret. Caret is the predecessor of hcp-workbench and not actively maintained anymore, but the procedure should still work. It’s documented here: http://brainvis.wustl.edu/wiki/index.php/Caret:Operations/Freesurfer_to_fs_LR Better still would be to adopt the state of the art, and use hcp-workbench in combination with the appropriate parts of the following script: https://github.com/Washington-University/Pipelines/blob/master/PostFreeSurfer/scripts/FreeSurfer2CaretConvertAndRegisterNonlinear.sh This latter option is probably a bit more tricky to adapt to your situation. Best, Jan-Mathijs On 02 Jun 2016, at 23:15, george michael > wrote: Dear Fieldtrip Community, We are analysing the ERF with NeuromakElekta data and our goal is to do group-analysis on the minimum norm estimates corresponding to the ERF data. We have combined the use of freesurfer and MNE to segment the individual MRI-images, etc, and create the cortical meshes (subj-oct-6-src.fif). Coregistration of MRI-MEG data was also done with those tools. We have used FieldTrip to process the functional data and estimate the minimum norm estimates in the individual subject space. Does somebody have a suggestion for how to morph the single-subject minimum norm estimates into a common standard template using FieldTrip? (i.e. cortex_8196.surf.gii) The goal would be to do group analysis in the common space. Thanks in advance. Best Regards, Giorgos Michail Research Assistant Department of Neurology Charite Medical University, Berlin _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -------------- next part -------------- An HTML attachment was scrubbed... URL: From Markus.Butz at uni-duesseldorf.de Fri Jun 3 14:31:06 2016 From: Markus.Butz at uni-duesseldorf.de (Markus Butz) Date: Fri, 03 Jun 2016 14:31:06 +0200 Subject: [FieldTrip] =?utf-8?q?PostDoc_and_PhD_position_in_D=C3=BCsseldorf?= In-Reply-To: <22E6347B-83AD-4295-87D8-9AB67F575522@donders.ru.nl> References: <22E6347B-83AD-4295-87D8-9AB67F575522@donders.ru.nl> Message-ID: Dear Fieldtrip community, please find attached a job offer for 1 PostDoc and 1 PhD positon in Düsseldorf, Germany available from 1st of July 2016 or until filled. The initial appointment is for 2-3 years (postdoc) or 3 years (PhD student). Both are within the project "Spontaneous brain activity in healthy subjects and Parkinson's disease” and supervised by Prof. Esther Florin. For mor information, please contact Esther directly: esther.florin at med.uni-duesseldorf.de Best wishes, Markus -------------- next part -------------- A non-text attachment was scrubbed... Name: position_duesseldorf.pdf Type: application/pdf Size: 95269 bytes Desc: not available URL: From carine.signoret at liu.se Fri Jun 3 15:36:20 2016 From: carine.signoret at liu.se (Carine Signoret) Date: Fri, 3 Jun 2016 15:36:20 +0200 Subject: [FieldTrip] trigger info Message-ID: <1033a0e9-1eb8-9fc4-469a-86abca565412@liu.se> Dear all, I would like to know if the fact to dowmsample the data before running ICA would imply that I will loose the trigger information? Thank you for your help, -- Carine. -------------------------------------------------- Carine Signoret, Ph.D. Linnaeus Centre HEAD Swedish Institute for Disability Research Department of Behavioral Sciences and Learning Linköping University Campus Valla, I-huset:114 581 83 Linköping Sweden Phone: +46(0)13 28 21 88 Email: carine.signoret at liu.se -------------------------------------------------- -------------- next part -------------- An HTML attachment was scrubbed... URL: From alexander_nakhnikian at hms.harvard.edu Sat Jun 4 00:03:56 2016 From: alexander_nakhnikian at hms.harvard.edu (Alexander Nakhnikian) Date: Fri, 3 Jun 2016 18:03:56 -0400 Subject: [FieldTrip] Strange DICS Results Message-ID: <06b736d6-17ea-9f68-3c97-c0c8fb4fbb39@hms.harvard.edu> Hello all, I'm hitting a wall in my analysis trying to source-localize EEG data in a visual task. I'm trying to localize the 8 to 15 Hz power. Unfortunately, I don't have individual electrode coordinates or sMRIs so I've had to create an electrode coordinate file and manually align it with the scalp in FT's template head. I'm using the standard BEM as the head model and the standard MRI instead of individual structural scans. I'm able to get reasonable results from ft_freqanalysis; importantly, they match the scalp topography we see using other programs, such as IDL. The problem is that when I try to localize these data with DICS, I get absurd results. The source localized power exceeds 3000 at some locations and the maxima are in strange places, such as behind the eye socket and near the base of the skull. When I run ft_sourceinterpolate I get the following warning: Warning: could not reshape freq to the expected dimensions > In ft_datatype_volume (line 136) In ft_checkdata (line 329) In ft_sourceinterpolate (line 163) Otherwise, no errors or warning messages come up. I'm not sure what's causing the odd results. Am I not using the template files correctly? I've included analysis setup below. Thanks in advance, Alexander cfg = []; cfg.method = 'mtmfft'; cfg.output = 'powandcsd'; cfg.tapsmofrq = 4; cfg.foilim = [12 12]; freqData = ft_freqanalysis(cfg,data); cfg = []; cfg.grid.xgrid = 'auto'; cfg.grid.ygrid = 'auto';cfg.grid.zgrid = 'auto'; cfg.resolution = 5; %units are mm cfg.method = 'dics'; cfg.dics.normalize = 'yes'; cfg.headmodel = vol; %from loading 'standard_bem.mat' cfg.elec = elec_aligned; %electrode coordinates (MNI) aligned to template head sources = ft_sourceanalysis(cfg,freqData); cfg = []; cfg.downsample = 2; cfg.parameter = 'pow'; sourcesInt = ft_sourceinterpolate(cfg,sources,mri); %mri from 'standard_mri.mat' in FT's templates cfg = []; cfg.method = 'slice'; cfg.parameter = 'pow; ft_sourceplot(cfg,sourcesInt) -- Alexander Nakhnikian, Ph.D. Postdoctoral Fellow Clinical Research Training Program VA Boston Healthcare System Harvard Medical School From litvak.vladimir at gmail.com Mon Jun 6 12:10:48 2016 From: litvak.vladimir at gmail.com (Vladimir Litvak) Date: Mon, 6 Jun 2016 11:10:48 +0100 Subject: [FieldTrip] New MEG Analysis/Large Data Postdoc job at CUBRIC Message-ID: ---------- Forwarded message ---------- From: Krish Singh Date: Mon, Jun 6, 2016 at 10:57 AM Subject: [megcommunity] New MEG Analysis/Large Data Postdoc job at CUBRIC To: MEGCOMMUNITY at jiscmail.ac.uk Dear All, re: Research Associate in Multi-site MEG Data Cohort Management & Analysis Closing date: 18th June 2016 We are seeking a Research Associate, experienced in Neuroimaging/Electrophysiological cohort data, for a 2-year position supporting the establishment of a multi-site database of normative Magnetoencephalographic (MEG) data, collected across all UK MEG laboratories, and the development of common analysis and management pipelines for mining this resource. The data is already collected and will represent one of the largest and most valuable electrophysiological data cohorts to be freely available to the international community. The post will be based at the Cardiff University Brain Research Imaging Centre (CUBRIC), part of the School of Psychology at Cardiff University, but will involve tight integration with the eight Universities within an MRC-funded MEG Partnership grant. For full details and how to apply: http://www.jobs.ac.uk/job/ANV075/research-associate-in-multi-site-meg-data-cohort-management-and-analysis/ Best Wishes, Krish -- Prof. Krish Singh CUBRIC School of Psychology / Ysgol Seicoleg Cardiff University / Prifysgol Caerdydd Maindy Road / Cardiff / Caerdydd CF24 4HQ, UK Tel / Ffôn: 02920 874690 / 870365 Fax / Ffacs: 02920 870339 Email / Ebost : singhkd at cardiff.ac.uk From seymourr at aston.ac.uk Tue Jun 7 18:54:11 2016 From: seymourr at aston.ac.uk (Seymour, Robert (Research Student)) Date: Tue, 7 Jun 2016 16:54:11 +0000 Subject: [FieldTrip] trigger info Message-ID: Hi Cai -------------- next part -------------- An HTML attachment was scrubbed... URL: From amickan1990 at gmail.com Tue Jun 7 19:24:25 2016 From: amickan1990 at gmail.com (Anne Mickan) Date: Tue, 7 Jun 2016 19:24:25 +0200 Subject: [FieldTrip] Error using ft_prepare_neighbours Message-ID: Dear all, I'm doing permutation tests, for which I wrote a script a while ago, which worked nicely back then, but now gives me the following error when I run the ft_prepare_neighbours function: Error: Undefined function or variable 'hasdata'. I'm assuming that this means that the function does not properly access the data structure that I give it. I just don't know why and how to fix it, given that the very same script worked about half a year ago. I have updated my version to Matlab 2016a in the meantime, but all other things stayed the same. To give you a better idea, here is what my data looks like for one participant: Data{1} avg: [34x600 double] time: [1x600 double] fsample: '500' label: {34x1 cell} dimord: 'chan_time' dof: [34x600 double] var: [34x600 double] I have data for 21 participants. Here is the part of the script up until the prepare neighbours function, Correct and Incorrect being the respective datasets for my two conditions: cfg = []; cfg.channel = 'all'; cfg.latency = 'all'; cfg.parameter = 'avg'; % prepare neighbouring channels cfg_neighb = []; cfg_neighb.method = 'triangulation'; cfg_neighb.channel = 'all'; cfg_neighb.feedback = 'yes'; cfg_neighb.layout = 'easycapCustomMSC.mat'; cfg_neighb.neighbourdist = 0.2; neighbours = ft_prepare_neighbours(cfg_neighb, Correct{1}); I hope this is enough information to help me out. Thanks in advance, Anne -------------- next part -------------- An HTML attachment was scrubbed... URL: From jan.schoffelen at donders.ru.nl Tue Jun 7 20:12:53 2016 From: jan.schoffelen at donders.ru.nl (Schoffelen, J.M. (Jan Mathijs)) Date: Tue, 7 Jun 2016 18:12:53 +0000 Subject: [FieldTrip] Error using ft_prepare_neighbours In-Reply-To: References: Message-ID: <034DFF5E-1EEE-4F7D-BB74-7D745E5467BA@donders.ru.nl> Hi Anne, I believe that this issue has been fixed a while ago. If I check the latest version of the code on https://github.com/fieldtrip/fieldtrip/blob/master/ft_prepare_neighbours.m it looks fine to me. In particular, in line 94 the variable hasdata is explicitly defined. Could you please upgrade to the most recent version of Fieldtrip and try again? Best wishes, Jan-Mathijs On 07 Jun 2016, at 19:24, Anne Mickan > wrote: Dear all, I'm doing permutation tests, for which I wrote a script a while ago, which worked nicely back then, but now gives me the following error when I run the ft_prepare_neighbours function: Error: Undefined function or variable 'hasdata'. I'm assuming that this means that the function does not properly access the data structure that I give it. I just don't know why and how to fix it, given that the very same script worked about half a year ago. I have updated my version to Matlab 2016a in the meantime, but all other things stayed the same. To give you a better idea, here is what my data looks like for one participant: Data{1} avg: [34x600 double] time: [1x600 double] fsample: '500' label: {34x1 cell} dimord: 'chan_time' dof: [34x600 double] var: [34x600 double] I have data for 21 participants. Here is the part of the script up until the prepare neighbours function, Correct and Incorrect being the respective datasets for my two conditions: cfg = []; cfg.channel = 'all'; cfg.latency = 'all'; cfg.parameter = 'avg'; % prepare neighbouring channels cfg_neighb = []; cfg_neighb.method = 'triangulation'; cfg_neighb.channel = 'all'; cfg_neighb.feedback = 'yes'; cfg_neighb.layout = 'easycapCustomMSC.mat'; cfg_neighb.neighbourdist = 0.2; neighbours = ft_prepare_neighbours(cfg_neighb, Correct{1}); I hope this is enough information to help me out. Thanks in advance, Anne _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -------------- next part -------------- An HTML attachment was scrubbed... URL: From h.cecotti at ulster.ac.uk Wed Jun 8 18:32:26 2016 From: h.cecotti at ulster.ac.uk (Cecotti, Hubert) Date: Wed, 8 Jun 2016 16:32:26 +0000 Subject: [FieldTrip] realtime buffer problem Message-ID: Hello, I am trying to use the realtime buffer on windows 7 (64 bits). I get the following message: Invalid MEX-file 'E:\fieldtrip-20160607\realtime\src\buffer\matlab\buffer.mexw64': The specified module could not be found. (the file seems to work when it is accessed directly through the fieldtrip functions (e.g. ft_read..., but alone it doesn't work) Trying to recompile the file, I get: mex buffer.c Building with 'Microsoft Visual C++ 2015 Professional (C)'. Error using mex buffer.c E:\fieldtrip-20160607\realtime\src\buffer\matlab\buffer.c(12): fatal error C1083: Cannot open include file: 'buffer.h': No such file or directory buffer.h is however in : E:\fieldtrip-20160607\realtime\src\buffer\src , so I don't know how the files are mixed, and how to proceed. Please advise. Regards, Hubert ________________________________ This email and any attachments are confidential and intended solely for the use of the addressee and may contain information which is covered by legal, professional or other privilege. If you have received this email in error please notify the system manager at postmaster at ulster.ac.uk and delete this email immediately. Any views or opinions expressed are solely those of the author and do not necessarily represent those of Ulster University. The University's computer systems may be monitored and communications carried out on them may be recorded to secure the effective operation of the system and for other lawful purposes. Ulster University does not guarantee that this email or any attachments are free from viruses or 100% secure. Unless expressly stated in the body of a separate attachment, the text of email is not intended to form a binding contract. Correspondence to and from the University may be subject to requests for disclosure by 3rd parties under relevant legislation. The University of Ulster was founded by Royal Charter in 1984 and is registered with company number RC000726 and VAT registered number GB672390524.The primary contact address for Ulster University in Northern Ireland is Cromore Road, Coleraine, Co. Londonderry BT52 1SA -------------- next part -------------- An HTML attachment was scrubbed... URL: From r.thomas at nin.knaw.nl Wed Jun 8 23:41:27 2016 From: r.thomas at nin.knaw.nl (Rajat Thomas) Date: Wed, 8 Jun 2016 21:41:27 +0000 Subject: [FieldTrip] Transformation from MNI to Native: OF POINTS? Message-ID: <1465422086827.19947@nin.knaw.nl> Dear Fieldtrippers, I have the forward and the inverse deformation field after a segmentation. Now I have some points in MNI coordinates (x,y,z positions). How can find its analog in native space? Thanks in advance. Rajat Rajat Mani Thomas Social Brain Lab Netherlands Institute for Neuroscience Amsterdam -------------- next part -------------- An HTML attachment was scrubbed... URL: From alexander_nakhnikian at hms.harvard.edu Thu Jun 9 00:12:46 2016 From: alexander_nakhnikian at hms.harvard.edu (Alexander Nakhnikian) Date: Wed, 8 Jun 2016 18:12:46 -0400 Subject: [FieldTrip] Transformation from MNI to Native: OF POINTS? In-Reply-To: <1465422086827.19947@nin.knaw.nl> References: <1465422086827.19947@nin.knaw.nl> Message-ID: <1e144453-1f56-8ece-e7c8-2f0d547b28e6@hms.harvard.edu> Dear Rajat, This function might be what you're looking for: http://www.fieldtriptoolbox.org/reference/ft_convert_coordsys Best, Alexander On 6/8/16 5:41 PM, Rajat Thomas wrote: > > Dear Fieldtrippers, > > > I have the forward and the inverse deformation field after a > segmentation. > > > Now I have some points in MNI coordinates (x,y,z positions). How can > find its analog in native space? > > > Thanks in advance. > > Rajat > > > > > Rajat Mani Thomas > Social Brain Lab > Netherlands Institute for Neuroscience > Amsterdam > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -- Alexander Nakhnikian, Ph.D. Postdoctoral Fellow Clinical Research Training Program VA Boston Healthcare System Harvard Medical School -------------- next part -------------- An HTML attachment was scrubbed... URL: From dr.nivethida at gmail.com Thu Jun 9 01:15:46 2016 From: dr.nivethida at gmail.com (nivethida t) Date: Wed, 8 Jun 2016 19:15:46 -0400 Subject: [FieldTrip] statistics for imaginary coherence Message-ID: Hi all, I am trying to do statistical testing for the difference in imaginary coherence between 2 subject groups. Following the tutorial, I was able to perform the ft_freqstatistics for the power spectrum using the output from freqgrandaverage. If I have to run similar statistics for imaginary coherence data, what should be my input for ft_freqstatistics since freqgrandaverage does not work for cohspctrm? Or is there a different statistics function for coherence? Thanks, Nivethida -- Dr.Nivethida Thirugnanasambandam, Postdoctoral Visiting Fellow, Human Motor Control Section, National Institute of Neurological Disorders and Stroke, National Institutes of Health, Building 10, 7D42, 10 Center Drive, MSC 1428 Bethesda, MD 20892 - 1428 Ph: +1-301-402-6231 -------------- next part -------------- An HTML attachment was scrubbed... URL: From dr.nivethida at gmail.com Thu Jun 9 03:23:30 2016 From: dr.nivethida at gmail.com (nivethida t) Date: Wed, 8 Jun 2016 21:23:30 -0400 Subject: [FieldTrip] design matrix Message-ID: Hi all, My study has 2 subject groups (n=15/group) with each performing 4 different tasks. What would be my design matrix to perform statistics on TFA data? Thanks, Nivethida -- Dr.Nivethida Thirugnanasambandam, Postdoctoral Visiting Fellow, Human Motor Control Section, National Institute of Neurological Disorders and Stroke, National Institutes of Health, Building 10, 7D42, 10 Center Drive, MSC 1428 Bethesda, MD 20892 - 1428 Ph: +1-301-402-6231 -------------- next part -------------- An HTML attachment was scrubbed... URL: From jan.schoffelen at donders.ru.nl Thu Jun 9 09:27:09 2016 From: jan.schoffelen at donders.ru.nl (Schoffelen, J.M. (Jan Mathijs)) Date: Thu, 9 Jun 2016 07:27:09 +0000 Subject: [FieldTrip] statistics for imaginary coherence In-Reply-To: References: Message-ID: <50D7AC75-7AA2-47B0-B1FC-6803B8A99DFC@donders.ru.nl> Hi Nivethida, You can circumvent the use of ft_freqgrandaverage using cell-arrays (each data structure a single cell represents a subject). (+ cfg.parameter=‘cohspctrm’) e.g. ft_freqstatistics(cfg, data1{:}, data2{:}); Best, Jan-Mathijs > On 09 Jun 2016, at 01:15, nivethida t wrote: > > Hi all, > I am trying to do statistical testing for the difference in imaginary coherence between 2 subject groups. Following the tutorial, I was able to perform the ft_freqstatistics for the power spectrum using the output from freqgrandaverage. > If I have to run similar statistics for imaginary coherence data, what should be my input for ft_freqstatistics since freqgrandaverage does not work for cohspctrm? Or is there a different statistics function for coherence? > > Thanks, > Nivethida > > > > -- > Dr.Nivethida Thirugnanasambandam, > Postdoctoral Visiting Fellow, > Human Motor Control Section, > National Institute of Neurological Disorders and Stroke, > National Institutes of Health, > Building 10, 7D42, > 10 Center Drive, MSC 1428 > Bethesda, MD 20892 - 1428 > Ph: +1-301-402-6231 > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip From jan.schoffelen at donders.ru.nl Thu Jun 9 09:27:41 2016 From: jan.schoffelen at donders.ru.nl (Schoffelen, J.M. (Jan Mathijs)) Date: Thu, 9 Jun 2016 07:27:41 +0000 Subject: [FieldTrip] design matrix In-Reply-To: References: Message-ID: I guess that this depends on your null hypothesis… Best, Jan-Mathijs > On 09 Jun 2016, at 03:23, nivethida t wrote: > > Hi all, > My study has 2 subject groups (n=15/group) with each performing 4 different tasks. What would be my design matrix to perform statistics on TFA data? > > Thanks, > Nivethida > > -- > Dr.Nivethida Thirugnanasambandam, > Postdoctoral Visiting Fellow, > Human Motor Control Section, > National Institute of Neurological Disorders and Stroke, > National Institutes of Health, > Building 10, 7D42, > 10 Center Drive, MSC 1428 > Bethesda, MD 20892 - 1428 > Ph: +1-301-402-6231 > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip From kramerrobin92 at gmail.com Thu Jun 9 11:03:15 2016 From: kramerrobin92 at gmail.com (Robin Kramer) Date: Thu, 9 Jun 2016 11:03:15 +0200 Subject: [FieldTrip] Importing B-Alert X10 data Message-ID: ​ 000222000.010616.103900.Events.edf ​​ 000222000.010616.103900.Signals.Raw.edf ​Hello, Recently we started a research with a new wearable EEG system called the B-Alert X-10 from Advanced Brain Monitoring. ABM does deliver their own analyzing software and it is compatible with EEGLab but not with Fieldtrip. Has anyone attempted to analyze the B-Alert data via FieldTrip already? The way data is stored is rather odd actually. The data is epoched in every second, with 256 samples (Fs = 256) in each epoch for each channel. In other words, there are as much separate trials as there are seconds. After preprocessing, and some manual labour I could rearrange the epochs and make the data continuous, but then I encountered two challenges. First, the event markers are stored in a different EDF file. Therefore, I have to define my own trial function, but the event-marker data is also stored rather oddly. Second, it seems that fieldtrip cannot segment any data after preprocessing with ft_definetrials(). Sadly, before preprocessing the B-Alert data is in the strange format. Is there a workaround? I have send a link with the two EDF files, in case one would like to inspect them themselves. Thank you so much. Best regards, Robin Kramer Student MSc Human-Machine Communication University of Groningen, the Netherlands -------------- next part -------------- An HTML attachment was scrubbed... URL: From azeez.adebimpe5 at gmail.com Thu Jun 9 11:28:37 2016 From: azeez.adebimpe5 at gmail.com (Azeez Adebimpe) Date: Thu, 9 Jun 2016 11:28:37 +0200 Subject: [FieldTrip] Importing B-Alert X10 data In-Reply-To: References: Message-ID: if it is compatible with EEGLAB, you can use *eeglab2fieldtrip *to convert the data to fieldtrip format if you are interested in doing analysis with fieldtrip. *Az* On Thu, Jun 9, 2016 at 11:03 AM, Robin Kramer wrote: > ​ > 000222000.010616.103900.Events.edf > > ​​ > 000222000.010616.103900.Signals.Raw.edf > > ​Hello, > > Recently we started a research with a new wearable EEG system called the > B-Alert X-10 from Advanced Brain Monitoring. ABM does deliver their own > analyzing software and it is compatible with EEGLab but not with Fieldtrip. > Has anyone attempted to analyze the B-Alert data via FieldTrip already? > > The way data is stored is rather odd actually. The data is epoched in > every second, with 256 samples (Fs = 256) in each epoch for each channel. > In other words, there are as much separate trials as there are seconds. > After preprocessing, and some manual labour I could rearrange the epochs > and make the data continuous, but then I encountered two challenges. > > First, the event markers are stored in a different EDF file. Therefore, I > have to define my own trial function, but the event-marker data is also > stored rather oddly. > Second, it seems that fieldtrip cannot segment any data after > preprocessing with ft_definetrials(). Sadly, before preprocessing the > B-Alert data is in the strange format. Is there a workaround? I have send a > link with the two EDF files, in case one would like to inspect them > themselves. > > Thank you so much. > > Best regards, > > Robin Kramer > Student MSc Human-Machine Communication > University of Groningen, the Netherlands > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > -------------- next part -------------- An HTML attachment was scrubbed... URL: From r.oostenveld at donders.ru.nl Thu Jun 9 13:08:25 2016 From: r.oostenveld at donders.ru.nl (Robert Oostenveld) Date: Thu, 9 Jun 2016 13:08:25 +0200 Subject: [FieldTrip] Importing B-Alert X10 data In-Reply-To: References: Message-ID: <99FA4D49-15F4-4BB9-BD30-C24853A486B0@donders.ru.nl> Hi Robin In terms of segmenting data after it having been read into memory, the following procedure works: 1) ft_preprocessing, without specifying cfg.trl or trialfun -> this reads the data as a single segment (i.e. one very long trial) 2) ft_definetrial, with cfg.trialfun, which could get events from another file -> this results in cfg.trl 3) ft_redefinetrial which takes the trl from step 2 and the continuous data from step 1. With regards to the data format: the files are plain EDF and as such supported by FieldTrip out the box. E.g. >> cfg = [] >> cfg.dataset = '000222000.010616.103900.Events.edf' >> ft_databrowser(cfg) >> hdr = ft_read_header(cfg.dataset) hdr = Fs: 1000 nChans: 1 label: {'EDF Annotations'} nSamples: 13000 nSamplesPre: 0 nTrials: 1 orig: [1x1 struct] chantype: {'unknown'} chanunit: {'unknown'} and >> cfg = [] >> cfg.dataset = '000222000.010616.103900.Signals.Raw.edf' >> ft_databrowser(cfg) >> hdr = ft_read_header(cfg.dataset) Warning: channels with different sampling rate not supported, using a subselection of 10 channels at 256.000000 Hz > In read_edf (line 330) In ft_read_header (line 678) hdr = Fs: 256 nChans: 10 label: {10x1 cell} nSamples: 1145600 nSamplesPre: 0 nTrials: 1 orig: [1x1 struct] chantype: {10x1 cell} chanunit: {10x1 cell} However, non-standard is to have the events in a separate file. Furthermore, the data file has channels with variable sampling rate, which is also not (by default) supported. See http://www.fieldtriptoolbox.org/getting_started/edf and http://www.fieldtriptoolbox.org/reference/edf2fieldtrip. Looking at the Events channel, I do think that you’ll need a separate trialfun anyway. From the Signals.Raw I see >> hdr.orig.Label ans = ECG POz Fz Cz C3 C4 F3 F4 P3 P4 ESUTimestamp SystemTimestamp Tilt X Tilt Y Tilt Z EDF Annotations which means that the annotations also seem to be present in the data file itself and the separate Event file might not be needed. With >> data = edf2fieldtrip('000222000.010616.103900.Signals.Raw.edf') Warning: channels with different sampling rate not supported, using a subselection of 10 channels at 256.000000 Hz > In read_edf (line 330) In ft_read_header (line 678) In edf2fieldtrip (line 36) reading 1 channels with 8 Hz sampling rate reading 3 channels with 128 Hz sampling rate reading 10 channels with 256 Hz sampling rate reading 1 channels with 512 Hz sampling rate reading 1 channels with 1024 Hz sampling rate upsampling 1 channels from 8 to 1024 Hz the input is raw data with 1 channels and 1 trials the call to "ft_selectdata" took 0 seconds and required the additional allocation of an estimated 3 MB resampling data resampling data in trial 1 from 1 original sampling rate = 8 Hz new sampling rate = 1024 Hz the call to "ft_resampledata" took 1 seconds and required the additional allocation of an estimated 146 MB upsampling 3 channels from 128 to 1024 Hz the input is raw data with 3 channels and 1 trials the call to "ft_selectdata" took 0 seconds and required the additional allocation of an estimated 1 MB resampling data resampling data in trial 1 from 1 original sampling rate = 128 Hz new sampling rate = 1024 Hz the call to "ft_resampledata" took 1 seconds and required the additional allocation of an estimated 165 MB upsampling 10 channels from 256 to 1024 Hz the input is raw data with 10 channels and 1 trials the call to "ft_selectdata" took 0 seconds and required the additional allocation of an estimated 1 MB resampling data resampling data in trial 1 from 1 original sampling rate = 256 Hz new sampling rate = 1024 Hz the call to "ft_resampledata" took 2 seconds and required the additional allocation of an estimated 507 MB upsampling 1 channels from 512 to 1024 Hz the input is raw data with 1 channels and 1 trials the call to "ft_selectdata" took 0 seconds and required the additional allocation of an estimated 2 MB resampling data resampling data in trial 1 from 1 original sampling rate = 512 Hz new sampling rate = 1024 Hz the call to "ft_resampledata" took 0 seconds and required the additional allocation of an estimated 105 MB input dataset 1, 1 channels, 1 trials input dataset 2, 3 channels, 1 trials input dataset 3, 10 channels, 1 trials input dataset 4, 1 channels, 1 trials input dataset 5, 1 channels, 1 trials concatenating the channels within each trial the call to "ft_appenddata" took 1 seconds and required the additional allocation of an estimated 560 MB adding the comment: reordered the channels to the original order in the EDF file the call to "ft_annotate" took 0 seconds and required the additional allocation of an estimated 463 MB data = label: {16x1 cell} trial: {[16x4582400 double]} time: {[1x4582400 double]} fsample: 1024 cfg: [1x1 struct] But then >> cfg = []; >> cfg.viewmode = 'vertical'; >> ft_databrowser(cfg, data) shows that the EDF Annotations channel (after upsampling) has been slightly messed up (due to filters). Perhaps it can still be of use. Otherwise I also would not directly know how to link the two files to each other, as the sampling rates are very incompatible (1000 in one, and powers of 2 in the other). Perhaps you can learn something from the EEGLAB code. Good luck with the data Robert > On 09 Jun 2016, at 11:03, Robin Kramer wrote: > > ​ >  000222000.010616.103900.Events.edf ​​ >  000222000.010616.103900.Signals.Raw.edf ​Hello, > > Recently we started a research with a new wearable EEG system called the B-Alert X-10 from Advanced Brain Monitoring. ABM does deliver their own analyzing software and it is compatible with EEGLab but not with Fieldtrip. Has anyone attempted to analyze the B-Alert data via FieldTrip already? > > The way data is stored is rather odd actually. The data is epoched in every second, with 256 samples (Fs = 256) in each epoch for each channel. In other words, there are as much separate trials as there are seconds. After preprocessing, and some manual labour I could rearrange the epochs and make the data continuous, but then I encountered two challenges. > > First, the event markers are stored in a different EDF file. Therefore, I have to define my own trial function, but the event-marker data is also stored rather oddly. > Second, it seems that fieldtrip cannot segment any data after preprocessing with ft_definetrials(). Sadly, before preprocessing the B-Alert data is in the strange format. Is there a workaround? I have send a link with the two EDF files, in case one would like to inspect them themselves. > > Thank you so much. > > Best regards, > > Robin Kramer > Student MSc Human-Machine Communication > University of Groningen, the Netherlands > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -------------- next part -------------- An HTML attachment was scrubbed... URL: From joseluisblues at gmail.com Fri Jun 10 10:42:39 2016 From: joseluisblues at gmail.com (Jose) Date: Fri, 10 Jun 2016 10:42:39 +0200 Subject: [FieldTrip] running FT scripts in a supercomputing cluster Message-ID: dear list, I'm trying to analyse CTF MEG data through the Flemish Supercomputer Centre, I did a matlab script to run the foremost FT functions in my pipeline (ft_read_event, read_ctf_cls, and ft_preprocessing). This script works well when I run it locally. To compile my function in the supercomputing cluster I initially used addpath to include FT and ft_defaults to set the configuration inside my script, but this wasn't working. I tried using a startup.m script but this doesn't work neither. Maybe I'm missing something? My bash script to compile looks like this: #!/bin/bash module load MATLAB/2013b FTDIR=$VSC_DATA_VO_USER/fieldtrip-20160317 mcc -mv FT_0.m I also tried mcc -mv FT_0.m -I $FTDIR I run my compilation in the same folder where I have the FT folder. When I run my bash job I get always the same error: Undefined function 'ft_read_event' for input arguments of type 'char'. I've been looking elsewhere but still I haven't find a solution, Any hints about this would really appreciated, best, Jose -------------- next part -------------- An HTML attachment was scrubbed... URL: From jan.schoffelen at donders.ru.nl Fri Jun 10 11:11:30 2016 From: jan.schoffelen at donders.ru.nl (Schoffelen, J.M. (Jan Mathijs)) Date: Fri, 10 Jun 2016 09:11:30 +0000 Subject: [FieldTrip] running FT scripts in a supercomputing cluster In-Reply-To: References: Message-ID: Hi Jose, Have you tried to explicitly add all required (sub)directories with the -a option? Something like mcc …. -a $FTDIR/fileio -a $FTDIR/… -a $FTDIR/etc It’s been a while that I have tried to compile some stuff myself, but I remember that back then I remember that I needed to instruct mcc with a list of directories explicitly Best, Jan-Mathijs > On 10 Jun 2016, at 10:42, Jose wrote: > > dear list, > > I'm trying to analyse CTF MEG data through the Flemish Supercomputer Centre, > I did a matlab script to run the foremost FT functions in my pipeline (ft_read_event, read_ctf_cls, and ft_preprocessing). This script works well when I run it locally. To compile my function in the supercomputing cluster I initially used addpath to include FT and ft_defaults to set the configuration inside my script, but this wasn't working. I tried using a startup.m script but this doesn't work neither. Maybe I'm missing something? My bash script to compile looks like this: > > #!/bin/bash > module load MATLAB/2013b > FTDIR=$VSC_DATA_VO_USER/fieldtrip-20160317 > mcc -mv FT_0.m > > I also tried mcc -mv FT_0.m -I $FTDIR > I run my compilation in the same folder where I have the FT folder. > When I run my bash job I get always the same error: Undefined function 'ft_read_event' for input arguments of type 'char'. > > I've been looking elsewhere but still I haven't find a solution, > > Any hints about this would really appreciated, > best, > Jose > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip From s.chettouf at vu.nl Fri Jun 10 11:19:49 2016 From: s.chettouf at vu.nl (Chettouf, S.) Date: Fri, 10 Jun 2016 09:19:49 +0000 Subject: [FieldTrip] Layout label ordering Message-ID: Dear Jim, Thanks for the answer. Could you please also tell me what the function of ‘SCALE’ is using the function ft_multiplotTRF? Plotting a colorbar seems more logic to me, but it’s not possible to delete this ’SCALE’ function. So probably it is handy for something? All the best, Sabrina From: > on behalf of "Herring, J.D. (Jim)" > Reply-To: FieldTrip discussion list > Date: Wednesday 1 June 2016 at 14:28 To: FieldTrip discussion list > Subject: Re: [FieldTrip] Layout label ordering Dear Sabrina, The ordering is not important as long as the labels in your data correspond to labels in the layout file. Best, Jim From: fieldtrip-bounces at science.ru.nl [mailto:fieldtrip-bounces at science.ru.nl] On Behalf Of Chettouf, S. Sent: Wednesday, June 01, 2016 2:04 PM To: fieldtrip at science.ru.nl Subject: [FieldTrip] Layout label ordering Dear field trip community, I want to make a layout for my EEG data measured with a 61-chan Easycap to make a plot with ft_multiplotTRF. My layout looks a lot like EasyCapM11.mat, only the order of channels differers completely. Do I have to correct for this order? Or is there some ‘label detection’? Kind regards, Sabrina Chettouf -------------- next part -------------- An HTML attachment was scrubbed... URL: From jan.schoffelen at donders.ru.nl Fri Jun 10 11:27:22 2016 From: jan.schoffelen at donders.ru.nl (Schoffelen, J.M. (Jan Mathijs)) Date: Fri, 10 Jun 2016 09:27:22 +0000 Subject: [FieldTrip] Strange DICS Results In-Reply-To: <06b736d6-17ea-9f68-3c97-c0c8fb4fbb39@hms.harvard.edu> References: <06b736d6-17ea-9f68-3c97-c0c8fb4fbb39@hms.harvard.edu> Message-ID: <0E3F135B-285F-4E9A-ADAE-0800879FCC51@donders.ru.nl> Hi Alex, >From what you describe I think that your results are suffering from numerical issues in the forward model. Once a source location (grid point) is close to the innermost boundary of the BEM, funky things may happen with respect to the computed leadfield, which obviously has large consequences for the shape of the beamformer spatial filter at that location. Best thing would be verify that indeed your ‘absurd’ voxels are near the edges, and mask them out. As a side note, typically volumetric DICS results in isolation (i.e using a single condition) are hard to interpret (even when using normalization). Best, Jan-Mathijs > On 04 Jun 2016, at 00:03, Alexander Nakhnikian wrote: > > Hello all, > > I'm hitting a wall in my analysis trying to source-localize EEG data in a visual task. I'm trying to localize the 8 to 15 Hz power. > > Unfortunately, I don't have individual electrode coordinates or sMRIs so I've had to create an electrode coordinate file and manually align it with the scalp in FT's template head. I'm using the standard BEM as the head model and the standard MRI instead of individual structural scans. > > I'm able to get reasonable results from ft_freqanalysis; importantly, they match the scalp topography we see using other programs, such as IDL. > > The problem is that when I try to localize these data with DICS, I get absurd results. The source localized power exceeds 3000 at some locations and the maxima are in strange places, such as behind the eye socket and near the base of the skull. > > When I run ft_sourceinterpolate I get the following warning: > > Warning: could not reshape freq to the expected dimensions > > In ft_datatype_volume (line 136) > In ft_checkdata (line 329) > In ft_sourceinterpolate (line 163) > > Otherwise, no errors or warning messages come up. I'm not sure what's causing the odd results. Am I not using the template files correctly? I've included analysis setup below. > > Thanks in advance, > > Alexander > > > > cfg = []; > cfg.method = 'mtmfft'; > cfg.output = 'powandcsd'; > cfg.tapsmofrq = 4; > cfg.foilim = [12 12]; > freqData = ft_freqanalysis(cfg,data); > > cfg = []; > cfg.grid.xgrid = 'auto'; cfg.grid.ygrid = 'auto';cfg.grid.zgrid = 'auto'; > cfg.resolution = 5; %units are mm > cfg.method = 'dics'; > cfg.dics.normalize = 'yes'; > cfg.headmodel = vol; %from loading 'standard_bem.mat' > cfg.elec = elec_aligned; %electrode coordinates (MNI) aligned to template head > sources = ft_sourceanalysis(cfg,freqData); > > cfg = []; > cfg.downsample = 2; > cfg.parameter = 'pow'; > sourcesInt = ft_sourceinterpolate(cfg,sources,mri); %mri from 'standard_mri.mat' in FT's templates > > cfg = []; > cfg.method = 'slice'; > cfg.parameter = 'pow; > ft_sourceplot(cfg,sourcesInt) > > > > > > -- > Alexander Nakhnikian, Ph.D. > Postdoctoral Fellow > Clinical Research Training Program > VA Boston Healthcare System > Harvard Medical School > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip From ha438 at georgetown.edu Fri Jun 10 14:57:19 2016 From: ha438 at georgetown.edu (Hassan Aleem) Date: Fri, 10 Jun 2016 08:57:19 -0400 Subject: [FieldTrip] simulated/sample data set for beamforming Message-ID: Hi all, I have a pipeline for beamforming but I am getting unexpected results from my own data, for the sake of sanity I wanted to run some simulated data to see what I get. I am looking to do a timelockanalysis with the LCMV method, so can't use the tutorial data. Would appreciate any help! Best, Hassan -------------- next part -------------- An HTML attachment was scrubbed... URL: From ariel.chang at yale.edu Fri Jun 10 19:57:24 2016 From: ariel.chang at yale.edu (Chang, Ariel) Date: Fri, 10 Jun 2016 17:57:24 +0000 Subject: [FieldTrip] Equating power spectral density Message-ID: <238AE44B-36EF-405D-89C8-4DA67FD1FAD6@yale.edu> Hi all, I don’t quite understand the effects of tapering for power estimates. I have resting data segmented into 2 second epochs. With the following parameters, could someone explain how to equate the data’s power spectral density back to it’s original spectral density (in the for loop)? cfg.method = 'mtmfft'; cfg.taper = 'dpss' cfg.polyremoval = 1; cfg.tapsmofrq = 1; cfg.foilim = [2 80]; cfg.pad= 100; data2 = eeglab2fieldtrip(EEG, 'preprocessing'); sizedat = size(EEG.data); for i = 1:sizedat(3) data2.trial{i} = data2.trial{i}*10; End [freq2] = ft_freqanalysis(cfg, data2); Thanks in advance! Best, Ariel -------------- next part -------------- An HTML attachment was scrubbed... URL: From alexander_nakhnikian at hms.harvard.edu Sat Jun 11 00:44:18 2016 From: alexander_nakhnikian at hms.harvard.edu (Alexander Nakhnikian) Date: Fri, 10 Jun 2016 18:44:18 -0400 Subject: [FieldTrip] Strange DICS Results In-Reply-To: <0E3F135B-285F-4E9A-ADAE-0800879FCC51@donders.ru.nl> References: <06b736d6-17ea-9f68-3c97-c0c8fb4fbb39@hms.harvard.edu> <0E3F135B-285F-4E9A-ADAE-0800879FCC51@donders.ru.nl> Message-ID: <49c2d60d-00f4-3d82-0d6d-ea2e1640fac0@hms.harvard.edu> Hi Jan-Mathijs, Thank you for your reply. Since I posted my original question on the forum, I tried applying eLORETA to the same data set and the sensor-level power localizes to the locations we expect given the scalp topography. Would the issues you discuss have the same effect on both localization methods or would beamformers be more susceptible to errors in the forward model? Best, Alexander On 6/10/16 5:27 AM, Schoffelen, J.M. (Jan Mathijs) wrote: > Hi Alex, > > From what you describe I think that your results are suffering from numerical issues in the forward model. Once a source location (grid point) is close to the innermost boundary of the BEM, funky things may happen with respect to the computed leadfield, which obviously has large consequences for the shape of the beamformer spatial filter at that location. Best thing would be verify that indeed your ‘absurd’ voxels are near the edges, and mask them out. > As a side note, typically volumetric DICS results in isolation (i.e using a single condition) are hard to interpret (even when using normalization). > > Best, > Jan-Mathijs > >> On 04 Jun 2016, at 00:03, Alexander Nakhnikian wrote: >> >> Hello all, >> >> I'm hitting a wall in my analysis trying to source-localize EEG data in a visual task. I'm trying to localize the 8 to 15 Hz power. >> >> Unfortunately, I don't have individual electrode coordinates or sMRIs so I've had to create an electrode coordinate file and manually align it with the scalp in FT's template head. I'm using the standard BEM as the head model and the standard MRI instead of individual structural scans. >> >> I'm able to get reasonable results from ft_freqanalysis; importantly, they match the scalp topography we see using other programs, such as IDL. >> >> The problem is that when I try to localize these data with DICS, I get absurd results. The source localized power exceeds 3000 at some locations and the maxima are in strange places, such as behind the eye socket and near the base of the skull. >> >> When I run ft_sourceinterpolate I get the following warning: >> >> Warning: could not reshape freq to the expected dimensions >>> In ft_datatype_volume (line 136) >> In ft_checkdata (line 329) >> In ft_sourceinterpolate (line 163) >> >> Otherwise, no errors or warning messages come up. I'm not sure what's causing the odd results. Am I not using the template files correctly? I've included analysis setup below. >> >> Thanks in advance, >> >> Alexander >> >> >> >> cfg = []; >> cfg.method = 'mtmfft'; >> cfg.output = 'powandcsd'; >> cfg.tapsmofrq = 4; >> cfg.foilim = [12 12]; >> freqData = ft_freqanalysis(cfg,data); >> >> cfg = []; >> cfg.grid.xgrid = 'auto'; cfg.grid.ygrid = 'auto';cfg.grid.zgrid = 'auto'; >> cfg.resolution = 5; %units are mm >> cfg.method = 'dics'; >> cfg.dics.normalize = 'yes'; >> cfg.headmodel = vol; %from loading 'standard_bem.mat' >> cfg.elec = elec_aligned; %electrode coordinates (MNI) aligned to template head >> sources = ft_sourceanalysis(cfg,freqData); >> >> cfg = []; >> cfg.downsample = 2; >> cfg.parameter = 'pow'; >> sourcesInt = ft_sourceinterpolate(cfg,sources,mri); %mri from 'standard_mri.mat' in FT's templates >> >> cfg = []; >> cfg.method = 'slice'; >> cfg.parameter = 'pow; >> ft_sourceplot(cfg,sourcesInt) >> >> >> >> >> >> -- >> Alexander Nakhnikian, Ph.D. >> Postdoctoral Fellow >> Clinical Research Training Program >> VA Boston Healthcare System >> Harvard Medical School >> >> _______________________________________________ >> fieldtrip mailing list >> fieldtrip at donders.ru.nl >> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -- Alexander Nakhnikian, Ph.D. Postdoctoral Fellow Clinical Research Training Program VA Boston Healthcare System Harvard Medical School From alexander_nakhnikian at hms.harvard.edu Sat Jun 11 19:38:32 2016 From: alexander_nakhnikian at hms.harvard.edu (Alexander Nakhnikian) Date: Sat, 11 Jun 2016 13:38:32 -0400 Subject: [FieldTrip] simulated/sample data set for beamforming In-Reply-To: References: Message-ID: <41ec6c01-246a-9b8a-3679-05e7f0e114ec@hms.harvard.edu> Hi Hassan, I also got some strange results from beamforming, although I was using DICS, not LCMV. I'm working with EEG data so I don't know if we're using the same recording setup. Jan-Mathijs suggested that there might be problems with the forward model that are influencing the shape of the beamformer. You can look at our exchange if it's still in your inbox. Regarding modeling, I think fieldtrip has programs to simulated sensors given a particular dipole distribution but I haven't used them. Another approach would be to save the leadfields and apply them to a simulated matrix of source-level oscillators. Set most of the "sources" to random noise and place sinusoids with a known frequency and high SNR at only a few locations (don't use identical oscillators for each source since beamformers lose spatial resolution for strongly correlated sources). I haven't tried this in fieldtrip, but I was able to do it with brainstorm and the "dipoles" showed up at the correct locations when I applied an inverse model to the simulated sensor data. Best, Alexander On 6/10/16 8:57 AM, Hassan Aleem wrote: > Hi all, > > I have a pipeline for beamforming but I am getting unexpected results > from my own data, for the sake of sanity I wanted to run some > simulated data to see what I get. I am looking to do a > timelockanalysis with the LCMV method, so can't use the tutorial data. > Would appreciate any help! > > Best, > > Hassan > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -- Alexander Nakhnikian, Ph.D. Postdoctoral Fellow Clinical Research Training Program VA Boston Healthcare System Harvard Medical School -------------- next part -------------- An HTML attachment was scrubbed... URL: From v.piai.research at gmail.com Sat Jun 11 20:50:32 2016 From: v.piai.research at gmail.com (=?UTF-8?Q?Vit=c3=b3ria_Piai?=) Date: Sat, 11 Jun 2016 20:50:32 +0200 Subject: [FieldTrip] help diagnosing issues with source analysis (pathological brain) Message-ID: <575C5D78.7030807@gmail.com> Hi everyone, I was hoping someone could help me figure out where my source analysis is going wrong. I have data on brain tumour patients (MRIs are from prior to tumour resection). From the hospital (using CTF), I receive .mri files that already have fiducial points saved as far as I was told. I then reslice and segment the .mri file, after reading it with ft_read_mri mri_reslice = ft_volumereslice([], mri); segmentedmri = ft_volumesegment([], mri_reslice); This seems to be working: Plotting headmodel and sensors, it looks like they are aligned: If I compute the source model with MNI-warping (non-linear transformation), I get something that doesn't seem right. I don't know if this is because these are not normal brains to start with: With linear transformation, things look better: One of my questions is what the consequences are of using linear transformation for the MNI warping given the pathological nature of these brains. Then, the next issue is this result when projecting the source to the surface: This happens regardless of whether I use the MNI-warped grid interpolated to the MNI template, or the patient's individual grid skipping the MNI normalisation step, interpolated to the patient's own T1. But if I plot with 'ortho' method, then I see that the MNI-warped and interpolated source data is misaligned, but the patient-native space one isn't. I can't make sense of this anymore; I've been trying all kinds of things that don't work, so I was wondering whether anyone has an idea of what could be going on by looking at these figures. Is it an error already at the level of alignment of the fiducials? Or is it due to the MNI-warping? Or a combination of issues? Thanks very much for any kind of help! Vitoria -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: bfejiccb.png Type: image/png Size: 75399 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: jidhfdhd.png Type: image/png Size: 4722 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: ebfighdf.png Type: image/png Size: 9956 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: ehffjdea.png Type: image/png Size: 10561 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: dffeehgc.png Type: image/png Size: 274137 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: dcigdbdi.png Type: image/png Size: 150070 bytes Desc: not available URL: From michelic72 at gmail.com Sun Jun 12 13:55:42 2016 From: michelic72 at gmail.com (Cristiano Micheli) Date: Sun, 12 Jun 2016 13:55:42 +0200 Subject: [FieldTrip] help diagnosing issues with source analysis (pathological brain) In-Reply-To: <575C5D78.7030807@gmail.com> References: <575C5D78.7030807@gmail.com> Message-ID: Dear Vitoria I had the same problem when I tried to coregister functional and anatomical data without transitioning through a head-referenced coordinates system. I solved the problem by using ft_volumerealign and selecting comparable anatomical fiducials for different subjects (nasion, left, right,..) BEFORE volume normalization. Maybe a hint towards the solution? Cheers Cris On Sat, Jun 11, 2016 at 8:50 PM, Vitória Piai wrote: > Hi everyone, > > I was hoping someone could help me figure out where my source analysis is > going wrong. > I have data on brain tumour patients (MRIs are from prior to tumour > resection). From the hospital (using CTF), I receive .mri files that > already have fiducial points saved as far as I was told. I then reslice and > segment the .mri file, after reading it with ft_read_mri > mri_reslice = ft_volumereslice([], mri); > segmentedmri = ft_volumesegment([], mri_reslice); > This seems to be working: > > > Plotting headmodel and sensors, it looks like they are aligned: > > If I compute the source model with MNI-warping (non-linear > transformation), I get something that doesn't seem right. I don't know if > this is because these are not normal brains to start with: > > With linear transformation, things look better: > > One of my questions is what the consequences are of using linear > transformation for the MNI warping given the pathological nature of these > brains. > > Then, the next issue is this result when projecting the source to the > surface: > > This happens regardless of whether I use the MNI-warped grid interpolated > to the MNI template, or the patient's individual grid skipping the MNI > normalisation step, interpolated to the patient's own T1. > But if I plot with 'ortho' method, then I see that the MNI-warped and > interpolated source data is misaligned, but the patient-native space one > isn't. > > > I can't make sense of this anymore; I've been trying all kinds of things > that don't work, so I was wondering whether anyone has an idea of what > could be going on by looking at these figures. Is it an error already at > the level of alignment of the fiducials? Or is it due to the MNI-warping? > Or a combination of issues? > > Thanks very much for any kind of help! > Vitoria > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: dcigdbdi.png Type: image/png Size: 150070 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: ehffjdea.png Type: image/png Size: 10561 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: dffeehgc.png Type: image/png Size: 274137 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: jidhfdhd.png Type: image/png Size: 4722 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: ebfighdf.png Type: image/png Size: 9956 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: bfejiccb.png Type: image/png Size: 75399 bytes Desc: not available URL: From sauer.mpih at googlemail.com Sun Jun 12 20:24:17 2016 From: sauer.mpih at googlemail.com (Andreas Sauer) Date: Sun, 12 Jun 2016 20:24:17 +0200 Subject: [FieldTrip] Coordsys issue ft_sourceplot Message-ID: Dear all, after having calculated the sources of a MMN paradigm (4D-system), I’d like to plot the results on one of the anatomy template files in the fieldtrip directory (single_subj_T1_1mm.nii) or alternatively on a MNI T1 template file (mni_icbm152_t1_tal_nlin_sym_09a.nii). Unfortunately, this is not working well… As you can see on the attached picture, the functional data is rotated by 90 degrees. I guess that something gets mixed because of the different coordsystems of functional and anatomical data. The functional data is 4D, which means ALS orientation. The anatomical is MNI, so RAS orientation. The plotting works fine, if I use a mri file which was converted in field trip (V2.mri) and therefore is also in ALS orientation. However, the anatomy doesn’t look very pretty… Is there any way that I can transform the functional data to RAS orientation or the anatomical data to ALS orientation, respectively? I tried with ft_volumerealign. However, since the template file has no fiducials, it is hard to really precisely do this. Any input on how to plot the sources on one of these nice anatomical files is highly appreciated! Thanks and best regards, Andreas -- Dipl.-Psych. Andreas Sauer Max Planck Institute for Brain Research Deutschordenstraße 46 60528 Frankfurt am Main Germany T: +49 69 96769 278 F: +49 69 96769 327 Email: sauer.mpih at gmail.com www.brain.mpg.de -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: Rotated_Source.png Type: image/png Size: 498781 bytes Desc: not available URL: From v.piai.research at gmail.com Mon Jun 13 11:02:11 2016 From: v.piai.research at gmail.com (Vitoria Piai) Date: Mon, 13 Jun 2016 11:02:11 +0200 Subject: [FieldTrip] help diagnosing issues with source analysis (pathological brain) In-Reply-To: References: <575C5D78.7030807@gmail.com> Message-ID: Hi Cris, that makes sense, except that the .mri file I'm getting from the hospital should already contain the right fiducial coordinates (or so I was told by the MEG technician). Maybe the issue is that FieldTrip is not getting these coordinates right from the .mri file if I don't run it through ft_volumerealign first. Any thoughts anyone? Thanks again On 12 June 2016 at 13:55, Cristiano Micheli wrote: > Dear Vitoria > > I had the same problem when I tried to coregister functional and > anatomical data without transitioning through a head-referenced coordinates > system. > I solved the problem by using ft_volumerealign and selecting comparable > anatomical fiducials for different subjects (nasion, left, right,..) BEFORE > volume normalization. > > Maybe a hint towards the solution? > > Cheers > Cris > > > On Sat, Jun 11, 2016 at 8:50 PM, Vitória Piai > wrote: > >> Hi everyone, >> >> I was hoping someone could help me figure out where my source analysis is >> going wrong. >> I have data on brain tumour patients (MRIs are from prior to tumour >> resection). From the hospital (using CTF), I receive .mri files that >> already have fiducial points saved as far as I was told. I then reslice and >> segment the .mri file, after reading it with ft_read_mri >> mri_reslice = ft_volumereslice([], mri); >> segmentedmri = ft_volumesegment([], mri_reslice); >> This seems to be working: >> >> >> Plotting headmodel and sensors, it looks like they are aligned: >> >> If I compute the source model with MNI-warping (non-linear >> transformation), I get something that doesn't seem right. I don't know if >> this is because these are not normal brains to start with: >> >> With linear transformation, things look better: >> >> One of my questions is what the consequences are of using linear >> transformation for the MNI warping given the pathological nature of these >> brains. >> >> Then, the next issue is this result when projecting the source to the >> surface: >> >> This happens regardless of whether I use the MNI-warped grid interpolated >> to the MNI template, or the patient's individual grid skipping the MNI >> normalisation step, interpolated to the patient's own T1. >> But if I plot with 'ortho' method, then I see that the MNI-warped and >> interpolated source data is misaligned, but the patient-native space one >> isn't. >> >> >> I can't make sense of this anymore; I've been trying all kinds of things >> that don't work, so I was wondering whether anyone has an idea of what >> could be going on by looking at these figures. Is it an error already at >> the level of alignment of the fiducials? Or is it due to the MNI-warping? >> Or a combination of issues? >> >> Thanks very much for any kind of help! >> Vitoria >> >> _______________________________________________ >> fieldtrip mailing list >> fieldtrip at donders.ru.nl >> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip >> > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: jidhfdhd.png Type: image/png Size: 4722 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: ebfighdf.png Type: image/png Size: 9956 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: bfejiccb.png Type: image/png Size: 75399 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: dffeehgc.png Type: image/png Size: 274137 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: dcigdbdi.png Type: image/png Size: 150070 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: ehffjdea.png Type: image/png Size: 10561 bytes Desc: not available URL: From hibafouani123 at hotmail.com Mon Jun 13 18:32:06 2016 From: hibafouani123 at hotmail.com (hiba fouani) Date: Mon, 13 Jun 2016 16:32:06 +0000 Subject: [FieldTrip] ROC CURVE In-Reply-To: References: Message-ID: Dear fieldtriper, How can I plot the ROC curve if I want to compare different inverse problems? if dipole is active or not. what should be the threshold? I have the simulated and estimated data on the mesh as an input thank you > From: fieldtrip-request at science.ru.nl > Subject: fieldtrip Digest, Vol 67, Issue 12 > To: fieldtrip at science.ru.nl > Date: Mon, 13 Jun 2016 11:10:44 +0200 > > Send fieldtrip mailing list submissions to > fieldtrip at science.ru.nl > > To subscribe or unsubscribe via the World Wide Web, visit > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > or, via email, send a message with subject or body 'help' to > fieldtrip-request at science.ru.nl > > You can reach the person managing the list at > fieldtrip-owner at science.ru.nl > > When replying, please edit your Subject line so it is more specific > than "Re: Contents of fieldtrip digest..." > > > Today's Topics: > > 1. Re: help diagnosing issues with source analysis (pathological > brain) (Vitoria Piai) > > > ---------------------------------------------------------------------- > > Message: 1 > Date: Mon, 13 Jun 2016 11:02:11 +0200 > From: Vitoria Piai > To: FieldTrip discussion list > Subject: Re: [FieldTrip] help diagnosing issues with source analysis > (pathological brain) > Message-ID: > > Content-Type: text/plain; charset="utf-8" > > Hi Cris, > > that makes sense, except that the .mri file I'm getting from the hospital > should already contain the right fiducial coordinates (or so I was told by > the MEG technician). Maybe the issue is that FieldTrip is not getting these > coordinates right from the .mri file if I don't run it through > ft_volumerealign first. > Any thoughts anyone? > > Thanks again > > On 12 June 2016 at 13:55, Cristiano Micheli wrote: > > > Dear Vitoria > > > > I had the same problem when I tried to coregister functional and > > anatomical data without transitioning through a head-referenced coordinates > > system. > > I solved the problem by using ft_volumerealign and selecting comparable > > anatomical fiducials for different subjects (nasion, left, right,..) BEFORE > > volume normalization. > > > > Maybe a hint towards the solution? > > > > Cheers > > Cris > > > > > > On Sat, Jun 11, 2016 at 8:50 PM, Vit?ria Piai > > wrote: > > > >> Hi everyone, > >> > >> I was hoping someone could help me figure out where my source analysis is > >> going wrong. > >> I have data on brain tumour patients (MRIs are from prior to tumour > >> resection). From the hospital (using CTF), I receive .mri files that > >> already have fiducial points saved as far as I was told. I then reslice and > >> segment the .mri file, after reading it with ft_read_mri > >> mri_reslice = ft_volumereslice([], mri); > >> segmentedmri = ft_volumesegment([], mri_reslice); > >> This seems to be working: > >> > >> > >> Plotting headmodel and sensors, it looks like they are aligned: > >> > >> If I compute the source model with MNI-warping (non-linear > >> transformation), I get something that doesn't seem right. I don't know if > >> this is because these are not normal brains to start with: > >> > >> With linear transformation, things look better: > >> > >> One of my questions is what the consequences are of using linear > >> transformation for the MNI warping given the pathological nature of these > >> brains. > >> > >> Then, the next issue is this result when projecting the source to the > >> surface: > >> > >> This happens regardless of whether I use the MNI-warped grid interpolated > >> to the MNI template, or the patient's individual grid skipping the MNI > >> normalisation step, interpolated to the patient's own T1. > >> But if I plot with 'ortho' method, then I see that the MNI-warped and > >> interpolated source data is misaligned, but the patient-native space one > >> isn't. > >> > >> > >> I can't make sense of this anymore; I've been trying all kinds of things > >> that don't work, so I was wondering whether anyone has an idea of what > >> could be going on by looking at these figures. Is it an error already at > >> the level of alignment of the fiducials? Or is it due to the MNI-warping? > >> Or a combination of issues? > >> > >> Thanks very much for any kind of help! > >> Vitoria > >> > >> _______________________________________________ > >> fieldtrip mailing list > >> fieldtrip at donders.ru.nl > >> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > >> > > > > > > _______________________________________________ > > fieldtrip mailing list > > fieldtrip at donders.ru.nl > > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > > -------------- next part -------------- > An HTML attachment was scrubbed... > URL: > -------------- next part -------------- > A non-text attachment was scrubbed... > Name: jidhfdhd.png > Type: image/png > Size: 4722 bytes > Desc: not available > URL: > -------------- next part -------------- > A non-text attachment was scrubbed... > Name: ebfighdf.png > Type: image/png > Size: 9956 bytes > Desc: not available > URL: > -------------- next part -------------- > A non-text attachment was scrubbed... > Name: bfejiccb.png > Type: image/png > Size: 75399 bytes > Desc: not available > URL: > -------------- next part -------------- > A non-text attachment was scrubbed... > Name: dffeehgc.png > Type: image/png > Size: 274137 bytes > Desc: not available > URL: > -------------- next part -------------- > A non-text attachment was scrubbed... > Name: dcigdbdi.png > Type: image/png > Size: 150070 bytes > Desc: not available > URL: > -------------- next part -------------- > A non-text attachment was scrubbed... > Name: ehffjdea.png > Type: image/png > Size: 10561 bytes > Desc: not available > URL: > > ------------------------------ > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > End of fieldtrip Digest, Vol 67, Issue 12 > ***************************************** -------------- next part -------------- An HTML attachment was scrubbed... URL: From rgilley at deakin.edu.au Tue Jun 14 06:13:30 2016 From: rgilley at deakin.edu.au (RYAN GILLEY) Date: Tue, 14 Jun 2016 04:13:30 +0000 Subject: [FieldTrip] SEP Recording Message-ID: Hi Everyone, This is not a straight forward question for Fieldtrip but with the experience in the group I figured it would be good to ask. Currently I am using a Neuroscan 64 channel EEG system to acquire sensory evoked potential (SEP) data. I am administering TTL pulses from an external system (Digitimer DS7a) run through Powerlab 26T using Labchart's event manager to generate the stimulations. My goal is to attempt to localize a couple of the Somatosensory peaks. My problem at the moment is that on my recording the marker (spike 1) and the stimulus artifact show up as displayed below. I have found that the time interval is inconsistent and because of this I am having trouble aligning the stimulus artifact to average. Is there another way of configuring this so that it works more efficiently or if anyone has used these tools (digitimer and powerlab) with the neuroscan system before, is there any advice anyone can give. Thanks in advance, Ryan [cid:image001.png at 01D1C62E.10DD7840] -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image001.png Type: image/png Size: 70148 bytes Desc: image001.png URL: From jan.schoffelen at donders.ru.nl Tue Jun 14 09:31:34 2016 From: jan.schoffelen at donders.ru.nl (Schoffelen, J.M. (Jan Mathijs)) Date: Tue, 14 Jun 2016 07:31:34 +0000 Subject: [FieldTrip] help diagnosing issues with source analysis (pathological brain) In-Reply-To: References: <575C5D78.7030807@gmail.com> Message-ID: <5F2CACF1-340B-4514-8B1B-8F477EC8FA9C@donders.ru.nl> Hi Vitória, To me it looks as if most of the stuff you describe works as expected, i.e. it works well or it gives funny results, apart from the non-linear normalisation. The extremely distorted warped grid points may be due to the patient’s anatomical being pathological, causing the normalisation to converge to a very strange solution. Now, with respect to the plotting/interpolation: if the coordinate systems of the objects you are overlaying don’t match, you get funny results. This is the case for the sourceplot with the surface method (where the default cortical surface is in MNI-RAS), and your functional image is in CTF’s ALS, as well as for the sourceplot with the ortho method, using the blurry template from SPM (which is also in MNI-RAS). If you want these to match up, you could replace the source positions in your functional image with the ones from the standard grid, because you assume topological equivalence as per the inverse warping strategy applied in the creation of the beamformer grid. So, long story short: it seems that your source analysis just went fine, but you are confused by the different coordinate systems. Best, JM On 13 Jun 2016, at 11:02, Vitoria Piai > wrote: Hi Cris, that makes sense, except that the .mri file I'm getting from the hospital should already contain the right fiducial coordinates (or so I was told by the MEG technician). Maybe the issue is that FieldTrip is not getting these coordinates right from the .mri file if I don't run it through ft_volumerealign first. Any thoughts anyone? Thanks again On 12 June 2016 at 13:55, Cristiano Micheli > wrote: Dear Vitoria I had the same problem when I tried to coregister functional and anatomical data without transitioning through a head-referenced coordinates system. I solved the problem by using ft_volumerealign and selecting comparable anatomical fiducials for different subjects (nasion, left, right,..) BEFORE volume normalization. Maybe a hint towards the solution? Cheers Cris On Sat, Jun 11, 2016 at 8:50 PM, Vitória Piai > wrote: Hi everyone, I was hoping someone could help me figure out where my source analysis is going wrong. I have data on brain tumour patients (MRIs are from prior to tumour resection). From the hospital (using CTF), I receive .mri files that already have fiducial points saved as far as I was told. I then reslice and segment the .mri file, after reading it with ft_read_mri mri_reslice = ft_volumereslice([], mri); segmentedmri = ft_volumesegment([], mri_reslice); This seems to be working: Plotting headmodel and sensors, it looks like they are aligned: If I compute the source model with MNI-warping (non-linear transformation), I get something that doesn't seem right. I don't know if this is because these are not normal brains to start with: With linear transformation, things look better: One of my questions is what the consequences are of using linear transformation for the MNI warping given the pathological nature of these brains. Then, the next issue is this result when projecting the source to the surface: This happens regardless of whether I use the MNI-warped grid interpolated to the MNI template, or the patient's individual grid skipping the MNI normalisation step, interpolated to the patient's own T1. But if I plot with 'ortho' method, then I see that the MNI-warped and interpolated source data is misaligned, but the patient-native space one isn't. I can't make sense of this anymore; I've been trying all kinds of things that don't work, so I was wondering whether anyone has an idea of what could be going on by looking at these figures. Is it an error already at the level of alignment of the fiducials? Or is it due to the MNI-warping? Or a combination of issues? Thanks very much for any kind of help! Vitoria _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -------------- next part -------------- An HTML attachment was scrubbed... URL: From jan.schoffelen at donders.ru.nl Tue Jun 14 09:41:21 2016 From: jan.schoffelen at donders.ru.nl (Schoffelen, J.M. (Jan Mathijs)) Date: Tue, 14 Jun 2016 07:41:21 +0000 Subject: [FieldTrip] Coordsys issue ft_sourceplot In-Reply-To: References: Message-ID: <21D48954-7881-45FF-B596-9F03F618A839@donders.ru.nl> Dear Andreas, after having calculated the sources of a MMN paradigm (4D-system), I’d like to plot the results on one of the anatomy template files in the fieldtrip directory (single_subj_T1_1mm.nii) or alternatively on a MNI T1 template file (mni_icbm152_t1_tal_nlin_sym_09a.nii). Unfortunately, this is not working well… As you can see on the attached picture, the functional data is rotated by 90 degrees. I guess that something gets mixed because of the different coordsystems of functional and anatomical data. The functional data is 4D, which means ALS orientation. The anatomical is MNI, so RAS orientation. The plotting works fine, if I use a mri file which was converted in field trip (V2.mri) and therefore is also in ALS orientation. However, the anatomy doesn’t look very pretty… Is there any way that I can transform the functional data to RAS orientation or the anatomical data to ALS orientation, respectively? I tried with ft_volumerealign. However, since the template file has no fiducials, it is hard to really precisely do this. Fair point. I would however do it the other way around, using the V2 to get the transformation from voxel space to MNI-RAS, and then use the inverse of the transformation on the functional data: in this case you could use ft_volumenormalise, with cfg.nonlinear = ‘no’. Alternatively, if you are using this procedure: http://www.fieldtriptoolbox.org/tutorial/sourcemodel#subject-specific_grids_that_are_equivalent_across_subjects_in_normalized_space, you could directly replace the source.pos of your functional data with the template.pos and then do the interpolation. To summarize: either: mri = ft_read_mri(‘V2.mri’); mri.coordsys = ‘bti’; cfg = []; cfg.nonlinear=’no’; mrin = ft_volumenormalise(cfg, mri); transform_vox2bti = mri.transform; transform_vox2spm = mrin.transform; transform_bti2spm = transform_vox2spm/transform_vox2bti source = ft_transform_geometry(transform_bti2spm, source); source_int = ft_sourceinterpolate(somecfg, source, niceanatomical); or: source.pos = templat.pos; source_int = ft_sourceinterpolate(somecfg, source, niceanatomical); Best, JM Any input on how to plot the sources on one of these nice anatomical files is highly appreciated! Thanks and best regards, Andreas -- Dipl.-Psych. Andreas Sauer Max Planck Institute for Brain Research Deutschordenstraße 46 60528 Frankfurt am Main Germany T: +49 69 96769 278 F: +49 69 96769 327 Email: sauer.mpih at gmail.com www.brain.mpg.de _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -------------- next part -------------- An HTML attachment was scrubbed... URL: From rikkert.hindriks at upf.edu Tue Jun 14 11:44:55 2016 From: rikkert.hindriks at upf.edu (HINDRIKS, RIKKERT) Date: Tue, 14 Jun 2016 11:44:55 +0200 Subject: [FieldTrip] Noise normalization of MNE Message-ID: Dear all, I'm having trouble interpreting the statistical parametric maps obtained from MNE source reconstructions using the method described in (Dale, 2000) . The issue is the following: For each source location (assume the dipole orientations fixed) the noise normalized activity estimate at that location is (approximately) standard normally distributed under the null hypothesis of no activity at all locations. However, I would like to test for activity at a specific location, but under the hypothesis of activity at a specific location, the normalized estimate at that location is only standard normally distributed if the corresponding row of the resolution matrix contains a single non-zero entry. In other words: it seems to me that the statistical parametric map can only be used to test for activity at individual locations if the source reconstruction is unbiased (or equivalently: if the resolution matrix equals the identity matrix) which is not the case in general. It would be very helpful if someone could help me clarifying this. Kind regards, Rikkert -------------- next part -------------- An HTML attachment was scrubbed... URL: From pgoodin at swin.edu.au Tue Jun 14 13:30:00 2016 From: pgoodin at swin.edu.au (Peter Goodin) Date: Tue, 14 Jun 2016 11:30:00 +0000 Subject: [FieldTrip] Why use LCMV + Hilbert envelope vs. DICS? Message-ID: Hi Fieldtrip list, Please excuse a possibly silly question, but I'm hoping someone can explain what difference occurs using DICS vs. LCMV + narrow band filter + hilbert envelope + mean amplitude over time (eg. Brookes et al., 2011)? I notice the latter is the preferred method for functional connectivity using MEG, but as far as I understand it, wouldn't the two produce a comparable result? Are there occasions where one is better than the other? Thanks, Peter _______________________ Dr Peter Goodin, Brain and Psychological Sciences Research Centre (BPsyC) Swinburne University, Hawthorn, Vic, 3122 From pgoodin at swin.edu.au Tue Jun 14 13:30:07 2016 From: pgoodin at swin.edu.au (Peter Goodin) Date: Tue, 14 Jun 2016 11:30:07 +0000 Subject: [FieldTrip] Why use LCMV + Hilbert envelope vs. DICS? Message-ID: Hi Fieldtrip list, Please excuse a possibly silly question, but I'm hoping someone can explain what difference occurs using DICS vs. LCMV + narrow band filter + hilbert envelope + mean amplitude over time (eg. Brookes et al., 2011)? I notice the latter is the preferred method for functional connectivity using MEG, but as far as I understand it, wouldn't the two produce a comparable result? Are there occasions where one is better than the other? Thanks, Peter _______________________ Dr Peter Goodin, Brain and Psychological Sciences Research Centre (BPsyC) Swinburne University, Hawthorn, Vic, 3122 From Claudio.Georgii at stud.sbg.ac.at Tue Jun 14 14:14:47 2016 From: Claudio.Georgii at stud.sbg.ac.at (Claudio Georgii) Date: Tue, 14 Jun 2016 14:14:47 +0200 Subject: [FieldTrip] Memory saving in ft_frequanalysis Message-ID: Hi fieldtrip list, we recently ran into some memory issues using the cfg.output = 'powandcsd' option in ft_frequanalysis. We solved the issue by: (1) changing the following line of code (ft_freqanalysis; line 573-574: if csdflg, crsspctrm = complex(nan(ntrials,nchancmb,nfoi,ntoi,cfg.precision),nan(ntrials,nchancmb,nfoi,ntoi,cfg.precision)); end into if csdflg, crsspctrm = nan+nan(ntrials,nchancmb,nfoi,ntoi,cfg.precision)*1i; end and accordingly, if fftflg, fourierspctrm = complex(nan(ntrials,nchan,nfoi,ntoi,cfg.precision),nan(ntrials,nchan,nfoi,ntoi,cfg.precision)); end into if fftflg, fourierspctrm = nan+nan(ntrials,nchan,nfoi,ntoi,cfg.precision)*1i; end (2) defining cfg.precision as 'single' This two procedures saves a huge amount of memory (~ the order of 4). Now, we wanted to ask, whether these changes/adaptions are okay and do not lead to spurious results? Is there a reason on performing wavelet convolution on double instead of single precision? Thank you in advance. Best, Claudio Georgii -- Claudio Georgii, MSc. Phd student University of Salzburg - Department of Psychology Eating Behavior Laboratory Hellbrunnerstraße 34 5020 Salzburg - Austria Phone: 0043- (0)662 8044 5164 E-Mail: claudio.georgii at sbg.ac.at -------------- next part -------------- An HTML attachment was scrubbed... URL: From nicholas.balderston at nih.gov Tue Jun 14 17:14:11 2016 From: nicholas.balderston at nih.gov (Balderston, Nicholas (NIH/NIMH) [F]) Date: Tue, 14 Jun 2016 15:14:11 +0000 Subject: [FieldTrip] SEP Recording In-Reply-To: References: Message-ID: Hey Ryan, I am not sure that I understand your problem completely, so this solution might not be that helpful. That being said, the DS7A has a BNC out port on the back of the unit, which sends its own TTL pulses whenever it delivers a stimulation. If you can add this as a channel in your recordings, it may give you more accurate timing information. -nick ________________________________ From: RYAN GILLEY [rgilley at deakin.edu.au] Sent: Tuesday, June 14, 2016 12:13 AM To: fieldtrip at tortel.science.ru.nl Subject: [FieldTrip] SEP Recording Hi Everyone, This is not a straight forward question for Fieldtrip but with the experience in the group I figured it would be good to ask. Currently I am using a Neuroscan 64 channel EEG system to acquire sensory evoked potential (SEP) data. I am administering TTL pulses from an external system (Digitimer DS7a) run through Powerlab 26T using Labchart’s event manager to generate the stimulations. My goal is to attempt to localize a couple of the Somatosensory peaks. My problem at the moment is that on my recording the marker (spike 1) and the stimulus artifact show up as displayed below. I have found that the time interval is inconsistent and because of this I am having trouble aligning the stimulus artifact to average. Is there another way of configuring this so that it works more efficiently or if anyone has used these tools (digitimer and powerlab) with the neuroscan system before, is there any advice anyone can give. Thanks in advance, Ryan [cid:image001.png at 01D1C62E.10DD7840] -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image001.png Type: image/png Size: 70148 bytes Desc: image001.png URL: From joerg.hipp at googlemail.com Tue Jun 14 20:39:23 2016 From: joerg.hipp at googlemail.com (Joerg Hipp) Date: Tue, 14 Jun 2016 20:39:23 +0200 Subject: [FieldTrip] 9-month internship developing EEG biomarker at Roche, Basel Message-ID: Dear all, we are offering a 9-month internship in our biomarker group at Roche, Basel. Our group supports preclinical and clinical neuroscience projects within Roche with various biomarker techniques including EEG/MEG, PET, MRI, and neuropsychology. We are looking for a highly motivated person to help develop EEG biomarkers of syndromic forms of autism spectrum disorder. The internship additionally offers a unique opportunity to gain insights into research in the pharmaceutical industry setting. The PhD salary and living expenses will be compensated. Application criteria: - PhD student / medical student interested in exploring the electrophysiological substrate of neurodevelopmental disorders (the candidate should be enrolled in either a natural science PhD or medical program at the time of the application) - Experienced in the analysis of EEG and/or MEG data - Strong statistical and programming skills (preferably MATLAB) Details on the project and application – click here Details on the RiSE program (Roche Internships for Scientific Exchange) – click here Overview of Roche neuroscience activities – click here The project will be supervised by Pilar Garces and myself . Best wishes, Joerg -- Joerg Hipp, PhD Biomarker and Experimental Medicine Leader F. Hoffmann-La Roche Ltd. Grenzacherstrasse 124 4070 Basel, Switzerland Email: joerg.hipp at roche.com -------------- next part -------------- An HTML attachment was scrubbed... URL: From anne.urai at gmail.com Wed Jun 15 11:03:04 2016 From: anne.urai at gmail.com (Anne Urai) Date: Wed, 15 Jun 2016 11:03:04 +0200 Subject: [FieldTrip] running FT scripts in a supercomputing cluster In-Reply-To: References: Message-ID: Hi Jose, I ran into similar dependencies issues when compiling fieldtrip, and converged on the following: % these paths will be added at compilation addpath(genpath('~/code/Tools')); addpath('~/Documents/fieldtrip'); ft_defaults; % add everything to path that we need addpath('~/Documents/fieldtrip/qsub'); addpath(genpath('~/Documents/fieldtrip/template/')); % neighbouring matfile if strcmp(fname, 'B3a_clusterStatsERF.m') || strcmp(fname, 'B3b_clusterStatsTFR.m'), addpath('~/Documents/fieldtrip/statfun/'); % need the combineClusters mex file addpath('~/Documents/fieldtrip/external/spm8/'); % for neighbour definition % http://mailman.science.ru.nl/pipermail/fieldtrip/2014-July/008238.html end % options: compile verbose, only use the toolboxes we really need % !!! runtime options should be preceded by - to work! % dont need to activate the -nojvm flag, can still plot from executable if strcmp(fname, 'B3a_clusterStatsERF.m') || strcmp(fname, 'B3b_clusterStatsTFR.m'), % statfun is called with a weird eval construction, so not recognized % by the dependency analysis of mcc mcc('-mv', '-N', '-p', 'stats', '-p', 'images', '-p', 'signal', ... '-R', '-nodisplay', '-R', '-singleCompThread', ... '-a', '~/Documents/fieldtrip/ft_statistics_montecarlo.m', ... '-a', '~/Documents/fieldtrip/statfun/ft_statfun_depsamplesT.m', ... fname); else % no need to specify additional files mcc('-mv', '-N', '-p', 'stats', '-p', 'images', '-p', 'signal', ... '-R', '-nodisplay', '-R', '-singleCompThread', ... fname); end So, the trick is to add everything to your path before comping, and then use the -N option and define specific folders and possible functions using -a. Make sure to only include additional subfolders from Fieldtrip (such as the templates folder) only if you need them, for including them will increase the size of the executable considerably. Also, some functions like the ft_statistics ones are not directly called but instead evaluated using statmethod = str2func(['ft_statistics_' cfg.method]) - this causes the dependency analysis of the compiler to skip those functions, so you'll have to add them manually. PS a similar setup should work directly from the command line mcc, but I found it easier to run ft_defaults from Matlab and then compile from within a Matlab script. Hope this helps! — Anne E. Urai, MSc PhD student | Institut für Neurophysiologie und Pathophysiologie Universitätsklinikum Hamburg-Eppendorf | Martinistrasse 52, 20246 | Hamburg, Germany www.anneurai.net / @AnneEUrai On 10 June 2016 at 10:42, Jose wrote: > dear list, > > I'm trying to analyse CTF MEG data through the Flemish Supercomputer > Centre, > I did a matlab script to run the foremost FT functions in my pipeline > (ft_read_event, read_ctf_cls, and ft_preprocessing). This script works well > when I run it locally. To compile my function in the supercomputing cluster > I initially used addpath to include FT and ft_defaults to set the > configuration inside my script, but this wasn't working. I tried using a > startup.m script but this doesn't work neither. Maybe I'm missing > something? My bash script to compile looks like this: > > #!/bin/bash > module load MATLAB/2013b > FTDIR=$VSC_DATA_VO_USER/fieldtrip-20160317 > mcc -mv FT_0.m > > I also tried mcc -mv FT_0.m -I $FTDIR > I run my compilation in the same folder where I have the FT folder. > When I run my bash job I get always the same error: Undefined function > 'ft_read_event' for input arguments of type 'char'. > > I've been looking elsewhere but still I haven't find a solution, > > Any hints about this would really appreciated, > best, > Jose > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > -------------- next part -------------- An HTML attachment was scrubbed... URL: From sauer.mpih at googlemail.com Wed Jun 15 14:31:49 2016 From: sauer.mpih at googlemail.com (Andreas Sauer) Date: Wed, 15 Jun 2016 14:31:49 +0200 Subject: [FieldTrip] Coordsys issue ft_sourceplot In-Reply-To: <21D48954-7881-45FF-B596-9F03F618A839@donders.ru.nl> References: <21D48954-7881-45FF-B596-9F03F618A839@donders.ru.nl> Message-ID: Dear Jan, thank you for your email and the example code! I tried both ways to convert the coord systems, but unfortunately it still doesn't work. Since I used the tutorial procedure to create my sourcemodel ( http://www.fieldtriptoolbox.org/tutorial/sourcemodel#subject-specific_grids_that_are_equivalent_across_subjects_in_normalized_space) I tried first with the easy way of only replacing the .pos field. But the plots don't change, the sources are still rotated by 90 degrees. Actually, the .pos fields are already the same before replacing it (see pic). Is there some error in my code? *% Step1: Load mri file* *mri = ft_read_mri('/data/home1/asauer/Projects/RPScZ/Analysis/Beamforming/MRI/HSM12_V2.mri');* *% Step 2: Segment the template brain and construct a volume conduction* *% model (i.e. head model): this is needed for the inside/outside detection of voxels* *cfg = [];* *cfg.output = 'brain';* *segmentedmri = ft_volumesegment(cfg,anatomy);* *cfg = [];* *cfg.method = 'singleshell';* *vol = ft_prepare_headmodel(cfg,segmentedmri);* *vol = ft_convert_units(vol,'m');* *figure; ft_plot_sens(sens,'style','*b'); hold on; ft_plot_vol(vol)* *% Step 3: Load sourcemodel * *load(fullfile(ft_path,'template/sourcemodel/standard_sourcemodel3d5mm'));* *template_grid = sourcemodel;* *clear sourcemodel* *% Step 4: Make sourcemodel* *cfg = [];* *cfg.grid.warpmni = 'yes';* *cfg.grid.template = template_grid;* *cfg.grid.nonlinear = 'yes';* *cfg.mri = mri;* *cfg.grid.unit = 'm';* *grid = ft_prepare_sourcemodel(cfg);* *figure; hold on;* *ft_plot_vol(vol,'facecolor','cortex','edgecolor','none'); alpha 0.5; camlight;* *ft_plot_mesh(grid.pos(grid.inside,:));* The only thing that is different from the tutorial is the unit conversion... After that I tried the transformation. All worked well until the source interpolation. ft_sourceinterpolation throws this error: *Attempted to access sel(1); index out of bounds because numel(sel)=0.* *Error in ft_sourceinterpolate>my_interpn (line 508)* * ft_progress(sel(1)/num, 'interpolating %.1f%%\n', 100*sel(1)/num);* *Error in ft_sourceinterpolate (line 393)* * interp.inside( sel) = my_interpn(double(functional.inside), ax(sel), ay(sel), az(sel), 'nearest', cfg.feedback);* which, to be honest, I don't really understand. Sorry... Best wishes, Andreas 2016-06-14 9:41 GMT+02:00 Schoffelen, J.M. (Jan Mathijs) < jan.schoffelen at donders.ru.nl>: > Dear Andreas, > > after having calculated the sources of a MMN paradigm (4D-system), I’d > like to plot the results on one of the anatomy template files in the > fieldtrip directory (single_subj_T1_1mm.nii) or alternatively on a MNI T1 > template file (mni_icbm152_t1_tal_nlin_sym_09a.nii). Unfortunately, this is > not working well… As you can see on the attached picture, the functional > data is rotated by 90 degrees. > > I guess that something gets mixed because of the different coordsystems of > functional and anatomical data. The functional data is 4D, which means ALS > orientation. The anatomical is MNI, so RAS orientation. The plotting works > fine, if I use a mri file which was converted in field trip (V2.mri) and > therefore is also in ALS orientation. However, the anatomy doesn’t look > very pretty… > > > Is there any way that I can transform the functional data to RAS > orientation or the anatomical data to ALS orientation, respectively? > > > I tried with ft_volumerealign. However, since the template file has no > fiducials, it is hard to really precisely do this. > > > Fair point. I would however do it the other way around, using the V2 to > get the transformation from voxel space to MNI-RAS, and then use the > inverse of the transformation on the functional data: in this case you > could use ft_volumenormalise, with cfg.nonlinear = ‘no’. Alternatively, if > you are using this procedure: > http://www.fieldtriptoolbox.org/tutorial/sourcemodel#subject-specific_grids_that_are_equivalent_across_subjects_in_normalized_space, > you could directly replace the source.pos of your functional data with the > template.pos and then do the interpolation. > > To summarize: > > either: > > mri = ft_read_mri(‘V2.mri’); > mri.coordsys = ‘bti’; > > cfg = []; > cfg.nonlinear=’no’; > mrin = ft_volumenormalise(cfg, mri); > > transform_vox2bti = mri.transform; > transform_vox2spm = mrin.transform; > transform_bti2spm = transform_vox2spm/transform_vox2bti > source = ft_transform_geometry(transform_bti2spm, source); > > source_int = ft_sourceinterpolate(somecfg, source, niceanatomical); > > or: > > source.pos = templat.pos; > source_int = ft_sourceinterpolate(somecfg, source, niceanatomical); > > Best, > JM > > > > Any input on how to plot the sources on one of these nice anatomical files > is highly appreciated! > > Thanks and best regards, > > Andreas > > > -- > Dipl.-Psych. Andreas Sauer > Max Planck Institute for Brain Research > Deutschordenstraße 46 > 60528 Frankfurt am Main > Germany > > T: +49 69 96769 278 > F: +49 69 96769 327 > Email: sauer.mpih at gmail.com > www.brain.mpg.de > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > https://mailman.science.ru.nl/mailman/listinfo/fieldtrip > -- Dipl.-Psych. Andreas Sauer Max Planck Institute for Brain Research Deutschordenstraße 46 60528 Frankfurt am Main Germany T: +49 69 96769 278 F: +49 69 96769 327 Email: sauer.mpih at gmail.com www.brain.mpg.de -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: pos_fields.png Type: image/png Size: 81877 bytes Desc: not available URL: From jan.schoffelen at donders.ru.nl Wed Jun 15 15:06:57 2016 From: jan.schoffelen at donders.ru.nl (Schoffelen, J.M. (Jan Mathijs)) Date: Wed, 15 Jun 2016 13:06:57 +0000 Subject: [FieldTrip] Fwd: Coordsys issue ft_sourceplot References: <08B10307-13ED-40F0-9F87-B50EEDAF25CC@gmail.com> Message-ID: <8EF9FF29-549B-4E5C-9ED3-055147E8DFD0@donders.ru.nl> Are you sure that you use the pos-field from the template, i.e. from the standard_sourcemodel3d5mm? Best, Jan-Mathijs On 15 Jun 2016, at 14:31, Andreas Sauer > wrote: Dear Jan, thank you for your email and the example code! I tried both ways to convert the coord systems, but unfortunately it still doesn't work. Since I used the tutorial procedure to create my sourcemodel (http://www.fieldtriptoolbox.org/tutorial/sourcemodel#subject-specific_grids_that_are_equivalent_across_subjects_in_normalized_space) I tried first with the easy way of only replacing the .pos field. But the plots don't change, the sources are still rotated by 90 degrees. Actually, the .pos fields are already the same before replacing it (see pic). Is there some error in my code? % Step1: Load mri file mri = ft_read_mri('/data/home1/asauer/Projects/RPScZ/Analysis/Beamforming/MRI/HSM12_V2.mri'); % Step 2: Segment the template brain and construct a volume conduction % model (i.e. head model): this is needed for the inside/outside detection of voxels cfg = []; cfg.output = 'brain'; segmentedmri = ft_volumesegment(cfg,anatomy); cfg = []; cfg.method = 'singleshell'; vol = ft_prepare_headmodel(cfg,segmentedmri); vol = ft_convert_units(vol,'m'); figure; ft_plot_sens(sens,'style','*b'); hold on; ft_plot_vol(vol) % Step 3: Load sourcemodel load(fullfile(ft_path,'template/sourcemodel/standard_sourcemodel3d5mm')); template_grid = sourcemodel; clear sourcemodel % Step 4: Make sourcemodel cfg = []; cfg.grid.warpmni = 'yes'; cfg.grid.template = template_grid; cfg.grid.nonlinear = 'yes'; cfg.mri = mri; cfg.grid.unit = 'm'; grid = ft_prepare_sourcemodel(cfg); figure; hold on; ft_plot_vol(vol,'facecolor','cortex','edgecolor','none'); alpha 0.5; camlight; ft_plot_mesh(grid.pos(grid.inside,:)); The only thing that is different from the tutorial is the unit conversion... After that I tried the transformation. All worked well until the source interpolation. ft_sourceinterpolation throws this error: Attempted to access sel(1); index out of bounds because numel(sel)=0. Error in ft_sourceinterpolate>my_interpn (line 508) ft_progress(sel(1)/num, 'interpolating %.1f%%\n', 100*sel(1)/num); Error in ft_sourceinterpolate (line 393) interp.inside( sel) = my_interpn(double(functional.inside), ax(sel), ay(sel), az(sel), 'nearest', cfg.feedback); which, to be honest, I don't really understand. Sorry... Best wishes, Andreas 2016-06-14 9:41 GMT+02:00 Schoffelen, J.M. (Jan Mathijs) >: Dear Andreas, after having calculated the sources of a MMN paradigm (4D-system), I’d like to plot the results on one of the anatomy template files in the fieldtrip directory (single_subj_T1_1mm.nii) or alternatively on a MNI T1 template file (mni_icbm152_t1_tal_nlin_sym_09a.nii). Unfortunately, this is not working well… As you can see on the attached picture, the functional data is rotated by 90 degrees. I guess that something gets mixed because of the different coordsystems of functional and anatomical data. The functional data is 4D, which means ALS orientation. The anatomical is MNI, so RAS orientation. The plotting works fine, if I use a mri file which was converted in field trip (V2.mri) and therefore is also in ALS orientation. However, the anatomy doesn’t look very pretty… Is there any way that I can transform the functional data to RAS orientation or the anatomical data to ALS orientation, respectively? I tried with ft_volumerealign. However, since the template file has no fiducials, it is hard to really precisely do this. Fair point. I would however do it the other way around, using the V2 to get the transformation from voxel space to MNI-RAS, and then use the inverse of the transformation on the functional data: in this case you could use ft_volumenormalise, with cfg.nonlinear = ‘no’. Alternatively, if you are using this procedure: http://www.fieldtriptoolbox.org/tutorial/sourcemodel#subject-specific_grids_that_are_equivalent_across_subjects_in_normalized_space, you could directly replace the source.pos of your functional data with the template.pos and then do the interpolation. To summarize: either: mri = ft_read_mri(‘V2.mri’); mri.coordsys = ‘bti’; cfg = []; cfg.nonlinear=’no’; mrin = ft_volumenormalise(cfg, mri); transform_vox2bti = mri.transform; transform_vox2spm = mrin.transform; transform_bti2spm = transform_vox2spm/transform_vox2bti source = ft_transform_geometry(transform_bti2spm, source); source_int = ft_sourceinterpolate(somecfg, source, niceanatomical); or: source.pos = templat.pos; source_int = ft_sourceinterpolate(somecfg, source, niceanatomical); Best, JM Any input on how to plot the sources on one of these nice anatomical files is highly appreciated! Thanks and best regards, Andreas -- Dipl.-Psych. Andreas Sauer Max Planck Institute for Brain Research Deutschordenstraße 46 60528 Frankfurt am Main Germany T: +49 69 96769 278 F: +49 69 96769 327 Email: sauer.mpih at gmail.com www.brain.mpg.de _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl https://mailman.science.ru.nl/mailman/listinfo/fieldtrip -- Dipl.-Psych. Andreas Sauer Max Planck Institute for Brain Research Deutschordenstraße 46 60528 Frankfurt am Main Germany T: +49 69 96769 278 F: +49 69 96769 327 Email: sauer.mpih at gmail.com www.brain.mpg.de _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl https://mailman.science.ru.nl/mailman/listinfo/fieldtrip -------------- next part -------------- An HTML attachment was scrubbed... URL: From pgoodin at swin.edu.au Wed Jun 15 15:32:06 2016 From: pgoodin at swin.edu.au (Peter Goodin) Date: Wed, 15 Jun 2016 13:32:06 +0000 Subject: [FieldTrip] LCMV returns no time series? Message-ID: Hi FieldTrip list, I'm using LCMV on averaged data (covariancewindow='all') but find the returned source estimates only have a single point. Is there a way to specify the analysis returns the time series for each grid point? Thanks, Peter -------------- next part -------------- An HTML attachment was scrubbed... URL: From joramvandriel at gmail.com Wed Jun 15 15:51:22 2016 From: joramvandriel at gmail.com (Joram van Driel) Date: Wed, 15 Jun 2016 15:51:22 +0200 Subject: [FieldTrip] LCMV returns no time series? In-Reply-To: References: Message-ID: Hi Peter, This is described here: http://www.fieldtriptoolbox.org/tutorial/shared/virtual_sensors You need to keep the weights or filter of the lcmv output, and just apply them on your channel data using matrix algebra; this will transform your channel data time series from x sensors into y voxels. Good luck, Joram On Wed, Jun 15, 2016 at 3:32 PM, Peter Goodin wrote: > Hi FieldTrip list, > > I'm using LCMV on averaged data (covariancewindow='all') but find the > returned source estimates only have a single point. Is there a way to > specify the analysis returns the time series for each grid point? > > Thanks, > > Peter > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > https://mailman.science.ru.nl/mailman/listinfo/fieldtrip > -- *Joram van Driel*, PhD Postdoc @ Vrije Universiteit Amsterdam Cognitive Psychology *E-mail hours:* *Monday/Tuesday: 9-12 | Thursday/Friday: 14-17* -------------- next part -------------- An HTML attachment was scrubbed... URL: From sarang at cfin.au.dk Wed Jun 15 16:10:57 2016 From: sarang at cfin.au.dk (Sarang S. Dalal) Date: Wed, 15 Jun 2016 14:10:57 +0000 Subject: [FieldTrip] LCMV returns no time series? In-Reply-To: References: Message-ID: <1465999857376.33093@cfin.au.dk> Hi Peter, If you've used the 'lcmv' method for ft_sourceanalysis, you ought to have the time series already contained in source.avg.mom. I've been working a lot lately on improving the LCMV functionality, but unfortunately haven't had a chance to document much yet. Especially if you are not contrasting different conditions, you might want to try these parameters: cfg.lcmv.weightnorm = 'nai'; % this is a new option :-) cfg.lcmv.fixedori = 'yes'; I also prefer to turn off reducerank, but YMMV: cfg.lcmv.reducerank = 'no'; Finally I've also contributed a viewer that will greatly help visualizing your virtual time series together with the MRI. You can find it in the latest distributions of FieldTrip under fieldtrip/contrib/nutmegtrip. You'll also need a full version of SPM8 in your path (the external in FieldTrip doesn't have all the necessary functions). You?? can use it like this: cfg = []; cfg.mripath = '/path/to/mri/nii' % must be in nifti (nii) format cfg.funparameter = 'avg.mom' % cfg.atlas = ft_read_atlas('ROI_MNI_V4.nii'); % [optional] you can get atlas labels, if your MRI and grid points are based on the MNI grid nmt_sourceplot_spm8(cfg,ft_convert_units(source,'mm')); Cheers, Sarang ________________________________ From: fieldtrip-bounces at science.ru.nl on behalf of Peter Goodin Sent: Wednesday, June 15, 2016 3:32 PM To: FieldTrip discussion list Subject: [FieldTrip] LCMV returns no time series? Hi FieldTrip list, I'm using LCMV on averaged data (covariancewindow='all') but find the returned source estimates only have a single point. Is there a way to specify the analysis returns the time series for each grid point? Thanks, Peter -------------- next part -------------- An HTML attachment was scrubbed... URL: From ha438 at georgetown.edu Wed Jun 15 22:28:14 2016 From: ha438 at georgetown.edu (Hassan Aleem) Date: Wed, 15 Jun 2016 16:28:14 -0400 Subject: [FieldTrip] compute forward simulated data Message-ID: Hi, Can anyone direct me, or help create a tutorial similar to http://www.fieldtriptoolbox.org/example/compute_forward_simulated_data_and_apply_a_beamformer_scan but for EEG simulated data? Best, Hassan -------------- next part -------------- An HTML attachment was scrubbed... URL: From pgoodin at swin.edu.au Wed Jun 15 23:55:44 2016 From: pgoodin at swin.edu.au (Peter Goodin) Date: Wed, 15 Jun 2016 21:55:44 +0000 Subject: [FieldTrip] LCMV returns no time series? Message-ID: <3804c3f8-b092-4b06-80d6-57f71f68faf9@email.android.com> Hi Joram and Sarang, Thanks very much for the advice and to you Sarang for the new functionality and viewer! Peter On 16 Jun 2016 00:59, "Sarang S. Dalal" wrote: Hi Peter, If you've used the 'lcmv' method for ft_sourceanalysis, you ought to have the time series already contained in source.avg.mom. I've been working a lot lately on improving the LCMV functionality, but unfortunately haven't had a chance to document much yet. Especially if you are not contrasting different conditions, you might want to try these parameters: cfg.lcmv.weightnorm = 'nai'; % this is a new option :-) cfg.lcmv.fixedori = 'yes'; I also prefer to turn off reducerank, but YMMV: cfg.lcmv.reducerank = 'no'; Finally I've also contributed a viewer that will greatly help visualizing your virtual time series together with the MRI. You can find it in the latest distributions of FieldTrip under fieldtrip/contrib/nutmegtrip. You'll also need a full version of SPM8 in your path (the external in FieldTrip doesn't have all the necessary functions). You​​ can use it like this: cfg = []; cfg.mripath = '/path/to/mri/nii' % must be in nifti (nii) format cfg.funparameter = 'avg.mom' % cfg.atlas = ft_read_atlas('ROI_MNI_V4.nii'); % [optional] you can get atlas labels, if your MRI and grid points are based on the MNI grid nmt_sourceplot_spm8(cfg,ft_convert_units(source,'mm')); Cheers, Sarang ________________________________ From: fieldtrip-bounces at science.ru.nl on behalf of Peter Goodin Sent: Wednesday, June 15, 2016 3:32 PM To: FieldTrip discussion list Subject: [FieldTrip] LCMV returns no time series? Hi FieldTrip list, I'm using LCMV on averaged data (covariancewindow='all') but find the returned source estimates only have a single point. Is there a way to specify the analysis returns the time series for each grid point? Thanks, Peter -------------- next part -------------- An HTML attachment was scrubbed... URL: From anne.urai at gmail.com Thu Jun 16 10:43:19 2016 From: anne.urai at gmail.com (Anne Urai) Date: Thu, 16 Jun 2016 04:43:19 -0400 Subject: [FieldTrip] running FT scripts in a supercomputing cluster In-Reply-To: References: Message-ID: Hi Jose, When calling mcc from Matlab, a dependency analysis is first carried out (at least in more recent versions of Matlab) - basically, Matlab goes through the script you're compiling and finds all the functions that are called (which must be on the path). These are all added to the executable. In principle, if all the folders you need are on the path (which should be okay when you call ft_default), the executable can run. Now, only in the case when the dependency analysis doesn't recognize certain functions (because they are, for example, generated through str2func) you should add them manually. I found this out through trial and error - I'd first try to compile using the bare bones mcc('-mv', '-N', '-R', '-nodisplay', '-R', '-singleCompThread', 'FT_0.m'); when you then run the executable, you'll get an error message if a function or a toolbox is missing (and then you can add only those that you need and compile again). In your FT_0.sh, you should indeed load the MCR - otherwise, the executable can't run. For this, I'd recommend contacting the admin of the supercomputer cluster, since the way I do it on the cluster here is specific to the setup. You'll probably have to activate this in your FT_0.sh yourself and add the path to the cache of each node (something like export MCR_CACHE_ROOT=$TMPDIR). Good luck! — Anne E. Urai, MSc PhD student | Institut für Neurophysiologie und Pathophysiologie Universitätsklinikum Hamburg-Eppendorf | Martinistrasse 52, 20246 | Hamburg, Germany www.anneurai.net / @AnneEUrai From: Jose Reply: Jose Date: 15 June 2016 at 19:14:43 To: Anne Urai Subject: Re: [FieldTrip] running FT scripts in a supercomputing cluster Hi Anne, Thanks for the detailed response, I have a couple questions if I may, So, if I understand well I need to know a priori which functions I want to use?. That's a bit strange, no? Because I don't know if any given function depend of another one which I might not notice if don't inspect all the scripts, The other thing is that I was trying to compile in the cluster, not locally, but anyway I tried locally with something like this: % these paths will be added at compilation addpath('/home/joseluis/Documents/Software/fieldtrip-20160317'); ft_defaults, addpath('/home/joseluis/Documents/Software/fieldtrip-20160317/qsub'); addpath('/home/joseluis/Documents/Software/fieldtrip-20160317/fileio'); addpath('/home/joseluis/Documents/Software/fieldtrip-20160317/fileio/private'); % options: compile verbose, only use the toolboxes we really need % !!! runtime options should be preceded by - to work! % dont need to activate the -nojvm flag, can still plot from executable mcc('-mv', '-N', '-p', 'stats', '-p', 'images', '-p', 'signal', ... '-R', '-nodisplay', '-R', '-singleCompThread', ... '-a', '/home/joseluis/Documents/Software/fieldtrip-20160317/fileio/ft_read_event.m', ... '-a', '/home/joseluis/Documents/Software/fieldtrip-20160317/fileio/private/read_ctf_cls.m', ... '-a', '/home/joseluis/Documents/Software/fieldtrip-20160317/ft_preprocessing', ... 'FT_0.m'); However when I copy FT_0 and run_FT_0.sh and run the job I get: ./FT_0: error while loading shared libraries: libmwmclmcrrt.so.8.1: cannot open shared object file: No such file or directory Which looking in Internet seems to be associated to the fact I need to run a mrc installer in the cluster? thanks Jose On 15 June 2016 at 11:03, Anne Urai wrote: > Hi Jose, > > I ran into similar dependencies issues when compiling fieldtrip, and > converged on the following: > > > > % these paths will be added at compilation > > addpath(genpath('~/code/Tools')); > > addpath('~/Documents/fieldtrip'); > > ft_defaults; % add everything to path that we need > > > > addpath('~/Documents/fieldtrip/qsub'); > > addpath(genpath('~/Documents/fieldtrip/template/')); % neighbouring > matfile > > > > if strcmp(fname, 'B3a_clusterStatsERF.m') || strcmp(fname, > 'B3b_clusterStatsTFR.m'), > > addpath('~/Documents/fieldtrip/statfun/'); % need the combineClusters > mex file > > addpath('~/Documents/fieldtrip/external/spm8/'); % for neighbour > definition > > % > http://mailman.science.ru.nl/pipermail/fieldtrip/2014-July/008238.html > > end > > > > % options: compile verbose, only use the toolboxes we really need > > % !!! runtime options should be preceded by - to work! > > % dont need to activate the -nojvm flag, can still plot from executable > > if strcmp(fname, 'B3a_clusterStatsERF.m') || strcmp(fname, > 'B3b_clusterStatsTFR.m'), > > > > % statfun is called with a weird eval construction, so not recognized > > % by the dependency analysis of mcc > > mcc('-mv', '-N', '-p', 'stats', '-p', 'images', '-p', 'signal', ... > > '-R', '-nodisplay', '-R', '-singleCompThread', ... > > '-a', '~/Documents/fieldtrip/ft_statistics_montecarlo.m', ... > > '-a', '~/Documents/fieldtrip/statfun/ft_statfun_depsamplesT.m', > ... > > fname); > > else > > % no need to specify additional files > > mcc('-mv', '-N', '-p', 'stats', '-p', 'images', '-p', 'signal', ... > > '-R', '-nodisplay', '-R', '-singleCompThread', ... > > fname); > > end > > > So, the trick is to add everything to your path before comping, and then > use the -N option and define specific folders and possible functions using > -a. Make sure to only include additional subfolders from Fieldtrip (such as > the templates folder) only if you need them, for including them will > increase the size of the executable considerably. Also, some functions like > the ft_statistics ones are not directly called but instead evaluated using statmethod > = str2func(['ft_statistics_' cfg.method]) - this causes the dependency > analysis of the compiler to skip those functions, so you'll have to add > them manually. > > > PS a similar setup should work directly from the command line mcc, but I > found it easier to run ft_defaults from Matlab and then compile from within > a Matlab script. > > > Hope this helps! > > > — > Anne E. Urai, MSc > PhD student | Institut für Neurophysiologie und Pathophysiologie > Universitätsklinikum Hamburg-Eppendorf | Martinistrasse 52, 20246 | > Hamburg, Germany > www.anneurai.net / @AnneEUrai > > On 10 June 2016 at 10:42, Jose wrote: > >> dear list, >> >> I'm trying to analyse CTF MEG data through the Flemish Supercomputer >> Centre, >> I did a matlab script to run the foremost FT functions in my pipeline >> (ft_read_event, read_ctf_cls, and ft_preprocessing). This script works well >> when I run it locally. To compile my function in the supercomputing cluster >> I initially used addpath to include FT and ft_defaults to set the >> configuration inside my script, but this wasn't working. I tried using a >> startup.m script but this doesn't work neither. Maybe I'm missing >> something? My bash script to compile looks like this: >> >> #!/bin/bash >> module load MATLAB/2013b >> FTDIR=$VSC_DATA_VO_USER/fieldtrip-20160317 >> mcc -mv FT_0.m >> >> I also tried mcc -mv FT_0.m -I $FTDIR >> I run my compilation in the same folder where I have the FT folder. >> When I run my bash job I get always the same error: Undefined function >> 'ft_read_event' for input arguments of type 'char'. >> >> I've been looking elsewhere but still I haven't find a solution, >> >> Any hints about this would really appreciated, >> best, >> Jose >> >> _______________________________________________ >> fieldtrip mailing list >> fieldtrip at donders.ru.nl >> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip >> > > -- José Luis ULLOA FULGERI +32 (0)4 77 42 90 07 +32 (0)4 92 64 64 77 -------------- next part -------------- An HTML attachment was scrubbed... URL: From sauer.mpih at googlemail.com Thu Jun 16 10:57:48 2016 From: sauer.mpih at googlemail.com (Andreas Sauer) Date: Thu, 16 Jun 2016 10:57:48 +0200 Subject: [FieldTrip] Coordsys issue ft_sourceplot In-Reply-To: <8EF9FF29-549B-4E5C-9ED3-055147E8DFD0@donders.ru.nl> References: <08B10307-13ED-40F0-9F87-B50EEDAF25CC@gmail.com> <8EF9FF29-549B-4E5C-9ED3-055147E8DFD0@donders.ru.nl> Message-ID: Dear Jan-Mathijs, oh, sorry! Thanks for the hint. Now it works fine ;-). Best, Andreas Am Mittwoch, 15. Juni 2016 schrieb Schoffelen, J.M. (Jan Mathijs) : > Are you sure that you use the pos-field from the template, i.e. from the > standard_sourcemodel3d5mm? > > Best, > Jan-Mathijs > > On 15 Jun 2016, at 14:31, Andreas Sauer > wrote: > > Dear Jan, > > thank you for your email and the example code! > > I tried both ways to convert the coord systems, but unfortunately it still > doesn't work. > > Since I used the tutorial procedure to create my sourcemodel ( > http://www.fieldtriptoolbox.org/tutorial/sourcemodel#subject-specific_grids_that_are_equivalent_across_subjects_in_normalized_space) > I tried first with the easy way of only replacing the .pos field. But the > plots don't change, the sources are still rotated by 90 degrees. Actually, > the .pos fields are already the same before replacing it (see pic). Is > there some error in my code? > > > *% Step1: Load mri file* > *mri = > ft_read_mri('/data/home1/asauer/Projects/RPScZ/Analysis/Beamforming/MRI/HSM12_V2.mri');* > > *% Step 2: Segment the template brain and construct a volume conduction* > *% model (i.e. head model): this is needed for the inside/outside > detection of voxels* > *cfg = [];* > *cfg.output = 'brain';* > *segmentedmri = ft_volumesegment(cfg,anatomy);* > > *cfg = [];* > *cfg.method = 'singleshell';* > *vol = ft_prepare_headmodel(cfg,segmentedmri);* > *vol = ft_convert_units(vol,'m');* > *figure; ft_plot_sens(sens,'style','*b'); hold on; ft_plot_vol(vol)* > > *% Step 3: Load sourcemodel * > *load(fullfile(ft_path,'template/sourcemodel/standard_sourcemodel3d5mm'));* > *template_grid = sourcemodel;* > *clear sourcemodel* > > *% Step 4: Make sourcemodel* > *cfg = [];* > *cfg.grid.warpmni = 'yes';* > *cfg.grid.template = template_grid;* > *cfg.grid.nonlinear = 'yes';* > *cfg.mri = mri;* > *cfg.grid.unit = 'm';* > *grid = ft_prepare_sourcemodel(cfg);* > *figure; hold on;* > *ft_plot_vol(vol,'facecolor','cortex','edgecolor','none'); alpha 0.5; > camlight;* > *ft_plot_mesh(grid.pos(grid.inside,:));* > > > The only thing that is different from the tutorial is the unit > conversion... > > After that I tried the transformation. All worked well until the source > interpolation. ft_sourceinterpolation throws this error: > > *Attempted to access sel(1); index out of bounds because numel(sel)=0.* > > *Error in ft_sourceinterpolate>my_interpn (line 508)* > * ft_progress(sel(1)/num, 'interpolating %.1f%%\n', 100*sel(1)/num);* > > *Error in ft_sourceinterpolate (line 393)* > * interp.inside( sel) = my_interpn(double(functional.inside), ax(sel), > ay(sel), az(sel), 'nearest', cfg.feedback);* > > > which, to be honest, I don't really understand. Sorry... > > Best wishes, > > Andreas > > > 2016-06-14 9:41 GMT+02:00 Schoffelen, J.M. (Jan Mathijs) < > jan.schoffelen at donders.ru.nl > >: > >> Dear Andreas, >> >> after having calculated the sources of a MMN paradigm (4D-system), I’d >> like to plot the results on one of the anatomy template files in the >> fieldtrip directory (single_subj_T1_1mm.nii) or alternatively on a MNI T1 >> template file (mni_icbm152_t1_tal_nlin_sym_09a.nii). Unfortunately, this is >> not working well… As you can see on the attached picture, the functional >> data is rotated by 90 degrees. >> >> I guess that something gets mixed because of the different coordsystems >> of functional and anatomical data. The functional data is 4D, which means >> ALS orientation. The anatomical is MNI, so RAS orientation. The plotting >> works fine, if I use a mri file which was converted in field trip (V2.mri) >> and therefore is also in ALS orientation. However, the anatomy doesn’t look >> very pretty… >> >> >> Is there any way that I can transform the functional data to RAS >> orientation or the anatomical data to ALS orientation, respectively? >> >> >> I tried with ft_volumerealign. However, since the template file has no >> fiducials, it is hard to really precisely do this. >> >> >> Fair point. I would however do it the other way around, using the V2 to >> get the transformation from voxel space to MNI-RAS, and then use the >> inverse of the transformation on the functional data: in this case you >> could use ft_volumenormalise, with cfg.nonlinear = ‘no’. Alternatively, if >> you are using this procedure: >> http://www.fieldtriptoolbox.org/tutorial/sourcemodel#subject-specific_grids_that_are_equivalent_across_subjects_in_normalized_space, >> you could directly replace the source.pos of your functional data with the >> template.pos and then do the interpolation. >> >> To summarize: >> >> either: >> >> mri = ft_read_mri(‘V2.mri’); >> mri.coordsys = ‘bti’; >> >> cfg = []; >> cfg.nonlinear=’no’; >> mrin = ft_volumenormalise(cfg, mri); >> >> transform_vox2bti = mri.transform; >> transform_vox2spm = mrin.transform; >> transform_bti2spm = transform_vox2spm/transform_vox2bti >> source = ft_transform_geometry(transform_bti2spm, source); >> >> source_int = ft_sourceinterpolate(somecfg, source, niceanatomical); >> >> or: >> >> source.pos = templat.pos; >> source_int = ft_sourceinterpolate(somecfg, source, niceanatomical); >> >> Best, >> JM >> >> >> >> Any input on how to plot the sources on one of these nice anatomical >> files is highly appreciated! >> >> Thanks and best regards, >> >> Andreas >> >> >> -- >> Dipl.-Psych. Andreas Sauer >> Max Planck Institute for Brain Research >> Deutschordenstraße 46 >> 60528 Frankfurt am Main >> Germany >> >> T: +49 69 96769 278 >> F: +49 69 96769 327 >> Email: sauer.mpih at gmail.com >> >> www.brain.mpg.de >> _______________________________________________ >> fieldtrip mailing list >> fieldtrip at donders.ru.nl >> >> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip >> >> >> >> _______________________________________________ >> fieldtrip mailing list >> fieldtrip at donders.ru.nl >> >> https://mailman.science.ru.nl/mailman/listinfo/fieldtrip >> > > > > -- > Dipl.-Psych. Andreas Sauer > Max Planck Institute for Brain Research > Deutschordenstraße 46 > 60528 Frankfurt am Main > Germany > > T: +49 69 96769 278 > F: +49 69 96769 327 > Email: sauer.mpih at gmail.com > > www.brain.mpg.de > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > > https://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > > > -- Dipl.-Psych. Andreas Sauer Max Planck Institute for Brain Research Deutschordenstraße 46 60528 Frankfurt am Main Germany T: +49 69 96769 278 F: +49 69 96769 327 Email: sauer.mpih at gmail.com www.brain.mpg.de -------------- next part -------------- An HTML attachment was scrubbed... URL: From laxmi.shaw22 at gmail.com Thu Jun 16 15:47:48 2016 From: laxmi.shaw22 at gmail.com (Laxmi Shaw) Date: Thu, 16 Jun 2016 19:17:48 +0530 Subject: [FieldTrip] Queries related to 1D topo plots Message-ID: Dear fieldtrip, I am trying to plot the topo plot for my 2D and 1D data using the ft_plot_topo function. In the fieldtrip tutorial website there are examples provided for ft_topoplotER with input data taking a 3D matrix. Kindly provide me with a working example for ft_plot_topo taking an input example of a 2D and 1D input matrix. Thanks and Regards in advance -- Laxmi Shaw Research Scholar(PhD) IIT Kharagpur West Bengal Ph no-08388837821 -------------- next part -------------- An HTML attachment was scrubbed... URL: From s.borbaruah at student.utwente.nl Thu Jun 16 16:19:12 2016 From: s.borbaruah at student.utwente.nl (Soujata Borbaruah) Date: Thu, 16 Jun 2016 14:19:12 +0000 Subject: [FieldTrip] What is the data present in the covariance matrix after using ft_timelockanalysis Message-ID: Hello, I want to calculate the covariance of the data I provide. In the function ft_timelockanalysis there is a portion where the covariance is being normalised over all trials by the total number of samples in all trials. % normalize the covariance over all trials by the total number of samples in all trials if strcmp(cfg.covariance, 'yes') if strcmp(cfg.keeptrials,'yes') for i=1:ntrial if strcmp(cfg.removemean, 'yes') covsig(i,:,:) = covsig(i,:,:) / (numcovsigsamples(i)-1); else covsig(i,:,:) = covsig(i,:,:) / numcovsigsamples(i); end end else if strcmp(cfg.removemean, 'yes') covsig = squeeze(nansum(covsig, 1)) / (sum(numcovsigsamples)-ntrial); else covsig = squeeze(nansum(covsig, 1)) / sum(numcovsigsamples); end end end Please note that the cfg.removemean was selected as yes. Can someone please explain what is the final data present in my covariance matrix? Sent with MailTrack -------------- next part -------------- An HTML attachment was scrubbed... URL: From Alexander_Nakhnikian at hms.harvard.edu Thu Jun 16 17:00:02 2016 From: Alexander_Nakhnikian at hms.harvard.edu (Nakhnikian, Alexander) Date: Thu, 16 Jun 2016 15:00:02 +0000 Subject: [FieldTrip] What is the data present in the covariance matrix after using ft_timelockanalysis In-Reply-To: References: Message-ID: Hi Soujatta, I hope I understand your question. For demeaned data, the covariance is the expected value of sum(xy). For data with finite mean, we have to get the expected value of sum(x-mu(x))*sum(y-mu(y)). Removing the mean and trend doesn't have any impact on the denominators used to compute the unbiased estimate of E{sum(xy)}. The unbiased covariance estimated between x and y for a given trial is sum(xy)/(N_times-1), where N _times is the number of time points in an epoch. When averaging covariance matrices over multiple trials the denominator becomes N_trs-1. I hope that helps. Best, Alexander ________________________________ From: fieldtrip-bounces at science.ru.nl on behalf of Soujata Borbaruah Sent: Thursday, June 16, 2016 10:19:12 AM To: fieldtrip, donders Subject: [FieldTrip] What is the data present in the covariance matrix after using ft_timelockanalysis Hello, I want to calculate the covariance of the data I provide. In the function ft_timelockanalysis there is a portion where the covariance is being normalised over all trials by the total number of samples in all trials. % normalize the covariance over all trials by the total number of samples in all trials if strcmp(cfg.covariance, 'yes') if strcmp(cfg.keeptrials,'yes') for i=1:ntrial if strcmp(cfg.removemean, 'yes') covsig(i,:,:) = covsig(i,:,:) / (numcovsigsamples(i)-1); else covsig(i,:,:) = covsig(i,:,:) / numcovsigsamples(i); end end else if strcmp(cfg.removemean, 'yes') covsig = squeeze(nansum(covsig, 1)) / (sum(numcovsigsamples)-ntrial); else covsig = squeeze(nansum(covsig, 1)) / sum(numcovsigsamples); end end end Please note that the cfg.removemean was selected as yes. Can someone please explain what is the final data present in my covariance matrix? Sent with MailTrack -------------- next part -------------- An HTML attachment was scrubbed... URL: From E.Kinney-Lang at sms.ed.ac.uk Thu Jun 16 17:19:19 2016 From: E.Kinney-Lang at sms.ed.ac.uk (Eli Kinney-lang) Date: Thu, 16 Jun 2016 16:19:19 +0100 Subject: [FieldTrip] Possible Bug using ft_rejectvisual followed by ft_rejectartifact Message-ID: <20160616161919.1085638x99w53ocg@www.staffmail.ed.ac.uk> Hello all, This is my first post, so I apologize if I am not detailed enough/don't give enough correct information for my question. My name is Eli, and I am a researcher at the University of Edinburgh studying non-invasive brain-computer interfaces. Background and summary: In a side project, I am looking at using EEG to determine if there are cognitive difficulties in infants with epilepsy. In this project I am processing the EEG data from 20 channels recorded by a local hospital group. I have set up a fieldtrip processing pipeline in order to investigate this problem. Within the processing pipeline I have a two-step artifact removal chain. First, I visually remove obvious artifacts using the ft_rejectvisual and the cfg.method ='summary'. I then use automatic rejection based on z-value to remove any additional trials which contain muscle, jump or EOG artifacts. However, when I run the automatic rejection, if I have removed a single trial using the visual method, I the automatic rejection method calculates a z-value of '0' for all trials, failing to reject anything. If I do NOT reject anything from ft_rejectvisual (but still call the function) then the automatic rejection works properly. This is inconsistent, and does not happen for each subject, but does occur for some subjects. Other subjects have both functioning properly. Any suggestions as to what may be causing this would be appreciated. Expanded details: -Given a preprocessed EEG data I run ft_rejectvisual using cfg.method = 'summary' as the only cfg. -cfg for automatic rejection: cfg.trl = dat.cfg.trl; cfg.continuous = 'yes'; cfg.artfctdef.zvalue.channel = 'all'; cfg.artfctdef.zvalue.cutoff = 2; cfg.artfctdef.zvalue.trlpadding = 0; cfg.artfctdef.zvalue.artpadding = 0.1; cfg.artfctdef.zvalue.fltpadding = 0.2; cfg.artfctdef.zvalue.bpfilter = 'yes'; cfg.artfctdef.zvalue.bpfreq = [110 140]; cfg.artfctdef.zvalue.bpfiltord = 8; cfg.artfctdef.zvalue.bpfilttype = 'but'; cfg.artfctdef.zvalue.hilbert = 'yes'; cfg.artfctdef.zvalue.boxcar = 0.2; [~, artifact_muscle] = ft_artifact_zvalue(cfg,dat); cfg = []; -data structure: dat = hdr: [1x1 struct] label: {20x1 cell} fsample: 511 trial: {1x94 cell} time: {1x94 cell} sampleinfo: [94x2 double] cfg: [1x1 struct] I cannot upload the data due to confidentiality, but am glad to clarify any questions/provide more information where needed. Is this user error, or is it possibly a bug? Any recommendations are welcome. Thank you. Cheers, Eli Kinney-Lang -- The University of Edinburgh is a charitable body, registered in Scotland, with registration number SC005336. From carine.signoret at liu.se Thu Jun 16 23:15:35 2016 From: carine.signoret at liu.se (Carine Signoret) Date: Thu, 16 Jun 2016 23:15:35 +0200 Subject: [FieldTrip] ft_definetrial header format problem Message-ID: Dear list, I am sorry to ask a so naive question, but I would like to know why it is not possible to read a .mat file when using the function ft_definetrial? Are we only allowed to read a .fif file for defining the trial or is there something that I am missing? Thank you for your help, Carine From stephen.whitmarsh at gmail.com Thu Jun 16 23:24:08 2016 From: stephen.whitmarsh at gmail.com (Stephen Whitmarsh) Date: Thu, 16 Jun 2016 23:24:08 +0200 Subject: [FieldTrip] ft_definetrial header format problem In-Reply-To: References: Message-ID: Hi Carine, Maybe what you are looking for is to enter your data as a second argument in ft_redefinetrial, as in: newdata = ft_redefinetrial(cfg,olddata). You can read that data from a matlab file before that, as in: olddata = load(filename). Cheers, Stephen On 16 June 2016 at 23:15, Carine Signoret wrote: > Dear list, > > I am sorry to ask a so naive question, but I would like to know why it is > not possible to read a .mat file when using the function ft_definetrial? > Are we only allowed to read a .fif file for defining the trial or is there > something that I am missing? > > Thank you for your help, > > Carine > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > https://mailman.science.ru.nl/mailman/listinfo/fieldtrip > -------------- next part -------------- An HTML attachment was scrubbed... URL: From pgoodin at swin.edu.au Fri Jun 17 03:19:28 2016 From: pgoodin at swin.edu.au (Peter Goodin) Date: Fri, 17 Jun 2016 01:19:28 +0000 Subject: [FieldTrip] LCMV returns no time series? In-Reply-To: <1465999857376.33093@cfin.au.dk> References: , <1465999857376.33093@cfin.au.dk> Message-ID: Hi Sarang, Regarding your point on that I should have the time series in source.avg.mom, the function only returns an n x 1 matrix. I've checked the averaged data and it does contain the channel x time series in av.avg, so I'm not really sure what's going on. Peter _______________________ Dr Peter Goodin, Brain and Psychological Sciences Research Centre (BPsyC) Swinburne University, Hawthorn, Vic, 3122 ________________________________________ From: fieldtrip-bounces at science.ru.nl [fieldtrip-bounces at science.ru.nl] on behalf of Sarang S. Dalal [sarang at cfin.au.dk] Sent: Thursday, 16 June 2016 12:10 AM To: FieldTrip discussion list Subject: Re: [FieldTrip] LCMV returns no time series? Hi Peter, If you've used the 'lcmv' method for ft_sourceanalysis, you ought to have the time series already contained in source.avg.mom. I've been working a lot lately on improving the LCMV functionality, but unfortunately haven't had a chance to document much yet. Especially if you are not contrasting different conditions, you might want to try these parameters: cfg.lcmv.weightnorm = 'nai'; % this is a new option :-) cfg.lcmv.fixedori = 'yes'; I also prefer to turn off reducerank, but YMMV: cfg.lcmv.reducerank = 'no'; Finally I've also contributed a viewer that will greatly help visualizing your virtual time series together with the MRI. You can find it in the latest distributions of FieldTrip under fieldtrip/contrib/nutmegtrip. You'll also need a full version of SPM8 in your path (the external in FieldTrip doesn't have all the necessary functions). You​​ can use it like this: cfg = []; cfg.mripath = '/path/to/mri/nii' % must be in nifti (nii) format cfg.funparameter = 'avg.mom' % cfg.atlas = ft_read_atlas('ROI_MNI_V4.nii'); % [optional] you can get atlas labels, if your MRI and grid points are based on the MNI grid nmt_sourceplot_spm8(cfg,ft_convert_units(source,'mm')); Cheers, Sarang ________________________________ From: fieldtrip-bounces at science.ru.nl on behalf of Peter Goodin Sent: Wednesday, June 15, 2016 3:32 PM To: FieldTrip discussion list Subject: [FieldTrip] LCMV returns no time series? Hi FieldTrip list, I'm using LCMV on averaged data (covariancewindow='all') but find the returned source estimates only have a single point. Is there a way to specify the analysis returns the time series for each grid point? Thanks, Peter From rgilley at deakin.edu.au Fri Jun 17 07:36:37 2016 From: rgilley at deakin.edu.au (RYAN GILLEY) Date: Fri, 17 Jun 2016 05:36:37 +0000 Subject: [FieldTrip] SEP Recording In-Reply-To: References: Message-ID: Hey Nick, Thank you for the help! I actually managed to configure it using that port after I read this. I have figured out my issue lies within my unit. Much appreciated again! Regards, Ryan From: fieldtrip-bounces at science.ru.nl [mailto:fieldtrip-bounces at science.ru.nl] On Behalf Of Balderston, Nicholas (NIH/NIMH) [F] Sent: June 15, 2016 1:14 AM To: FieldTrip discussion list Subject: Re: [FieldTrip] SEP Recording Hey Ryan, I am not sure that I understand your problem completely, so this solution might not be that helpful. That being said, the DS7A has a BNC out port on the back of the unit, which sends its own TTL pulses whenever it delivers a stimulation. If you can add this as a channel in your recordings, it may give you more accurate timing information. -nick ________________________________ From: RYAN GILLEY [rgilley at deakin.edu.au] Sent: Tuesday, June 14, 2016 12:13 AM To: fieldtrip at tortel.science.ru.nl Subject: [FieldTrip] SEP Recording Hi Everyone, This is not a straight forward question for Fieldtrip but with the experience in the group I figured it would be good to ask. Currently I am using a Neuroscan 64 channel EEG system to acquire sensory evoked potential (SEP) data. I am administering TTL pulses from an external system (Digitimer DS7a) run through Powerlab 26T using Labchart's event manager to generate the stimulations. My goal is to attempt to localize a couple of the Somatosensory peaks. My problem at the moment is that on my recording the marker (spike 1) and the stimulus artifact show up as displayed below. I have found that the time interval is inconsistent and because of this I am having trouble aligning the stimulus artifact to average. Is there another way of configuring this so that it works more efficiently or if anyone has used these tools (digitimer and powerlab) with the neuroscan system before, is there any advice anyone can give. Thanks in advance, Ryan [cid:image001.png at 01D1C8AE.0B51CCF0] -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image001.png Type: image/png Size: 70148 bytes Desc: image001.png URL: From zsoltturi at gmail.com Fri Jun 17 09:31:58 2016 From: zsoltturi at gmail.com (Zsolt Turi) Date: Fri, 17 Jun 2016 09:31:58 +0200 Subject: [FieldTrip] Difference in trial number per condition Message-ID: Hi, I was wondering if FieldTrip has an optimized solution for such situations when the amount of trials in one condition markedly differs from the number of trials in the other (e.g., the ratio is 1:3 or 1:4). On the website I have found that this issue was already discussed, however, it is not clear to me whether this was indeed addressed by a FieldTrip function. Below is the link about the question I was referring to: http://www.fieldtriptoolbox.org/faq/how_does_a_difference_in_trial_numbers_per_condition_affect_my_statistical_test In case there is no such a function, could someone provide me a rough procedure that is methodologically acceptable in the scientific community to compensate for this issue? I am interested both in conceptual and implementational aspects. I would like to compare TFR or WPLI measures between two conditions and use non-parametric cluster-based permutation test for statistical analysis. My data is characterized by a within-subjects design, in case this is relevant information. Thanks for your input in advance, Zsolt -------------- next part -------------- An HTML attachment was scrubbed... URL: From s.borbaruah at student.utwente.nl Fri Jun 17 10:11:15 2016 From: s.borbaruah at student.utwente.nl (Soujata Borbaruah) Date: Fri, 17 Jun 2016 10:11:15 +0200 Subject: [FieldTrip] What is the data present in the covariance matrix after using ft_timelockanalysis In-Reply-To: References: Message-ID: Hello Alexander, Thank you for your feedback. So is it safe to say that the final data present in the covariance matrix (MxM where M is the number of channels) is the average of the covariance matrices over multiple trials? Regards, Soujata. Sent with MailTrack On Thu, Jun 16, 2016 at 5:00 PM, Nakhnikian, Alexander < Alexander_Nakhnikian at hms.harvard.edu> wrote: > Hi Soujatta, > > > I hope I understand your question. > > > For demeaned data, the covariance is the expected value of sum(xy). For > data with finite mean, we have to get the expected value of > sum(x-mu(x))*sum(y-mu(y)). Removing the mean and trend doesn't have any > impact on the denominators used to compute the unbiased estimate of > E{sum(xy)}. The unbiased covariance estimated between x and y for a given > trial is sum(xy)/(N_times-1), where N _times is the number of time points > in an epoch. When averaging covariance matrices over multiple trials the > denominator becomes N_trs-1. I hope that helps. > > > Best, > > > Alexander > ------------------------------ > *From:* fieldtrip-bounces at science.ru.nl > on behalf of Soujata Borbaruah > *Sent:* Thursday, June 16, 2016 10:19:12 AM > *To:* fieldtrip, donders > *Subject:* [FieldTrip] What is the data present in the covariance matrix > after using ft_timelockanalysis > > Hello, > > I want to calculate the covariance of the data I provide. In the function > ft_timelockanalysis there is a portion where the covariance is being > normalised over all trials by the total number of samples in all trials. > > > % normalize the covariance over all trials by the total number of samples > in all trials > if strcmp(cfg.covariance, 'yes') > if strcmp(cfg.keeptrials,'yes') > for i=1:ntrial > if strcmp(cfg.removemean, 'yes') > covsig(i,:,:) = covsig(i,:,:) / (numcovsigsamples(i)-1); > else > covsig(i,:,:) = covsig(i,:,:) / numcovsigsamples(i); > end > end > else > if strcmp(cfg.removemean, 'yes') > covsig = squeeze(nansum(covsig, 1)) / (sum(numcovsigsamples)-ntrial); > else > covsig = squeeze(nansum(covsig, 1)) / sum(numcovsigsamples); > > end > end > end > > Please note that the cfg.removemean was selected as yes. > > Can someone please explain what is the final data present in my covariance > matrix? > > > > Sent with MailTrack > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > https://mailman.science.ru.nl/mailman/listinfo/fieldtrip > -------------- next part -------------- An HTML attachment was scrubbed... URL: From stan.vanpelt at donders.ru.nl Fri Jun 17 10:51:12 2016 From: stan.vanpelt at donders.ru.nl (Pelt, S. van (Stan)) Date: Fri, 17 Jun 2016 08:51:12 +0000 Subject: [FieldTrip] Difference in trial number per condition In-Reply-To: References: Message-ID: <7CCA2706D7A4DA45931A892DF3C2894C3F956C3C@exprd03.hosting.ru.nl> Hi Zsolt, The amount to which this may be a concern will depend on the measures you want to compare. Also, the risk of drawing incorrect (qualitative) conclusions will of course mainly be large around your statistical threshold value (e.g. p=0.05). Power differences might become biased if groups have unequal size, power begin a squared value. See for a suggested numerical correction method for this, when comparing power spectra or e.g. Bokil et al., 2007 (http://www.ncbi.nlm.nih.gov/pubmed/16945422), but I assume there are also other solutions going around. Best, Stan From: fieldtrip-bounces at science.ru.nl [mailto:fieldtrip-bounces at science.ru.nl] On Behalf Of Zsolt Turi Sent: vrijdag 17 juni 2016 9:32 To: FieldTrip discussion list Subject: [FieldTrip] Difference in trial number per condition Hi, I was wondering if FieldTrip has an optimized solution for such situations when the amount of trials in one condition markedly differs from the number of trials in the other (e.g., the ratio is 1:3 or 1:4). On the website I have found that this issue was already discussed, however, it is not clear to me whether this was indeed addressed by a FieldTrip function. Below is the link about the question I was referring to: http://www.fieldtriptoolbox.org/faq/how_does_a_difference_in_trial_numbers_per_condition_affect_my_statistical_test In case there is no such a function, could someone provide me a rough procedure that is methodologically acceptable in the scientific community to compensate for this issue? I am interested both in conceptual and implementational aspects. I would like to compare TFR or WPLI measures between two conditions and use non-parametric cluster-based permutation test for statistical analysis. My data is characterized by a within-subjects design, in case this is relevant information. Thanks for your input in advance, Zsolt -------------- next part -------------- An HTML attachment was scrubbed... URL: From dlozanosoldevilla at gmail.com Fri Jun 17 11:02:00 2016 From: dlozanosoldevilla at gmail.com (Diego Lozano-Soldevilla) Date: Fri, 17 Jun 2016 11:02:00 +0200 Subject: [FieldTrip] Difference in trial number per condition In-Reply-To: <7CCA2706D7A4DA45931A892DF3C2894C3F956C3C@exprd03.hosting.ru.nl> References: <7CCA2706D7A4DA45931A892DF3C2894C3F956C3C@exprd03.hosting.ru.nl> Message-ID: Hi Zsolt, To complement Stan's suggestions, in case of power differences between conditions, you could use ft_stratify: http://www.fieldtriptoolbox.org/example/stratify best, Diego On 17 June 2016 at 10:51, Pelt, S. van (Stan) wrote: > Hi Zsolt, > > > > The amount to which this may be a concern will depend on the measures you > want to compare. Also, the risk of drawing incorrect (qualitative) > conclusions will of course mainly be large around your statistical > threshold value (e.g. p=0.05). Power differences might become biased if > groups have unequal size, power begin a squared value. See for a suggested > numerical correction method for this, when comparing power spectra or e.g. > Bokil et al., 2007 (http://www.ncbi.nlm.nih.gov/pubmed/16945422), but I > assume there are also other solutions going around. > > > > Best, > > Stan > > > > *From:* fieldtrip-bounces at science.ru.nl [mailto: > fieldtrip-bounces at science.ru.nl] *On Behalf Of *Zsolt Turi > *Sent:* vrijdag 17 juni 2016 9:32 > *To:* FieldTrip discussion list > *Subject:* [FieldTrip] Difference in trial number per condition > > > > Hi, > > > > I was wondering if FieldTrip has an optimized solution for such situations > when the amount of trials in one condition markedly differs from the number > of trials in the other (e.g., the ratio is 1:3 or 1:4). > > > > On the website I have found that this issue was already discussed, > however, it is not clear to me whether this was indeed addressed by a > FieldTrip function. Below is the link about the question I was referring > to: > > > > > http://www.fieldtriptoolbox.org/faq/how_does_a_difference_in_trial_numbers_per_condition_affect_my_statistical_test > > > > In case there is no such a function, could someone provide me a rough > procedure that is methodologically acceptable in the scientific community > to compensate for this issue? > > > > I am interested both in conceptual and implementational aspects. I would > like to compare TFR or WPLI measures between two conditions and use > non-parametric cluster-based permutation test for statistical analysis. My > data is characterized by a within-subjects design, in case this is relevant > information. > > > > Thanks for your input in advance, > > Zsolt > > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > https://mailman.science.ru.nl/mailman/listinfo/fieldtrip > -------------- next part -------------- An HTML attachment was scrubbed... URL: From zsoltturi at gmail.com Fri Jun 17 13:53:17 2016 From: zsoltturi at gmail.com (Zsolt Turi) Date: Fri, 17 Jun 2016 13:53:17 +0200 Subject: [FieldTrip] Difference in trial number per condition In-Reply-To: References: <7CCA2706D7A4DA45931A892DF3C2894C3F956C3C@exprd03.hosting.ru.nl> Message-ID: Hi Stan and Diego, thank you for the input(s), I will try out these procedures. Cheers, Zsolt 2016-06-17 11:02 GMT+02:00 Diego Lozano-Soldevilla < dlozanosoldevilla at gmail.com>: > Hi Zsolt, > To complement Stan's suggestions, in case of power differences between > conditions, you could use ft_stratify: > http://www.fieldtriptoolbox.org/example/stratify > best, > Diego > > > > On 17 June 2016 at 10:51, Pelt, S. van (Stan) > wrote: > >> Hi Zsolt, >> >> >> >> The amount to which this may be a concern will depend on the measures you >> want to compare. Also, the risk of drawing incorrect (qualitative) >> conclusions will of course mainly be large around your statistical >> threshold value (e.g. p=0.05). Power differences might become biased if >> groups have unequal size, power begin a squared value. See for a suggested >> numerical correction method for this, when comparing power spectra or e.g. >> Bokil et al., 2007 (http://www.ncbi.nlm.nih.gov/pubmed/16945422), but I >> assume there are also other solutions going around. >> >> >> >> Best, >> >> Stan >> >> >> >> *From:* fieldtrip-bounces at science.ru.nl [mailto: >> fieldtrip-bounces at science.ru.nl] *On Behalf Of *Zsolt Turi >> *Sent:* vrijdag 17 juni 2016 9:32 >> *To:* FieldTrip discussion list >> *Subject:* [FieldTrip] Difference in trial number per condition >> >> >> >> Hi, >> >> >> >> I was wondering if FieldTrip has an optimized solution for such >> situations when the amount of trials in one condition markedly differs from >> the number of trials in the other (e.g., the ratio is 1:3 or 1:4). >> >> >> >> On the website I have found that this issue was already discussed, >> however, it is not clear to me whether this was indeed addressed by a >> FieldTrip function. Below is the link about the question I was referring >> to: >> >> >> >> >> http://www.fieldtriptoolbox.org/faq/how_does_a_difference_in_trial_numbers_per_condition_affect_my_statistical_test >> >> >> >> In case there is no such a function, could someone provide me a rough >> procedure that is methodologically acceptable in the scientific community >> to compensate for this issue? >> >> >> >> I am interested both in conceptual and implementational aspects. I would >> like to compare TFR or WPLI measures between two conditions and use >> non-parametric cluster-based permutation test for statistical analysis. My >> data is characterized by a within-subjects design, in case this is relevant >> information. >> >> >> >> Thanks for your input in advance, >> >> Zsolt >> >> >> >> _______________________________________________ >> fieldtrip mailing list >> fieldtrip at donders.ru.nl >> https://mailman.science.ru.nl/mailman/listinfo/fieldtrip >> > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > https://mailman.science.ru.nl/mailman/listinfo/fieldtrip > -- Post-doctoral Research Fellow Department of Clinical Neurophysiology Georg-August University, Göttingen Robert-Koch-Str. 40 37075 Goettingen -------------- next part -------------- An HTML attachment was scrubbed... URL: From radiotek at gmail.com Fri Jun 17 16:53:19 2016 From: radiotek at gmail.com (teki) Date: Fri, 17 Jun 2016 15:53:19 +0100 Subject: [FieldTrip] Announcing the Timing Research Forum Message-ID: Dear all, We are pleased to announce the establishment of the Timing Research Forum (TRF), an open community for promoting multidisciplinary research and collaborative work on temporal processing and time perception - http://timingforum.org/. We hope that TRF will serve as a common platform for brain research on all relevant aspects of timing in both health and disease using a combination of methodologies including human psychophysics, cognitive measurement techniques including fMRI, M/EEG, TMS etc., as well as neurophysiological and imaging work in a variety of animal models. We invite you to become members of TRF and participate in advancing the state of timing research through discussions, collaborations, and sharing of resources including code, protocols, data etc. There are no membership fees and the only requirement is to actively pursue research on timing. As a member of TRF, you will have a profile on the website, all your publications will be featured on the publications page, receive members-only newsletters and regular updates on the latest news from the field of timing, and be part of a vibrant research community. To join us, please visit this page - http://timingforum.org/membership/ TRF will also organize annual conferences starting from 2017 that aim to bring together all researchers on timing for highly interactive and open discussions on the latest research in the field - http://timingforum.org/conferences/ Please feel free to follow TRF on Twitter and Facebook for regular updates from the field of timing, and share information about TRF with your colleagues. We look forward to welcoming you to TRF and hope that you will find it a useful platform and contribute actively to the community. With best wishes, Sundeep Teki --- Sundeep Teki PhD Sir Henry Wellcome Fellow Auditory Neuroscience Group Department of Physiology, Anatomy & Genetics University of Oxford South Parks Road, Oxford OX1 3QX Email | Web | Twitter & Argiro Vatakis --- Argiro Vatakis PhD Cognitive Systems Research Institute http://csri.gr/researchers/argiro-vatakis http://www.argirovatakis.com -------------- next part -------------- An HTML attachment was scrubbed... URL: From sarang at cfin.au.dk Fri Jun 17 18:38:53 2016 From: sarang at cfin.au.dk (Sarang S. Dalal) Date: Fri, 17 Jun 2016 16:38:53 +0000 Subject: [FieldTrip] help diagnosing issues with source analysis (pathological brain) In-Reply-To: <5F2CACF1-340B-4514-8B1B-8F477EC8FA9C@donders.ru.nl> References: <575C5D78.7030807@gmail.com> , <5F2CACF1-340B-4514-8B1B-8F477EC8FA9C@donders.ru.nl> Message-ID: <1466181533308.98968@cfin.au.dk> Hi Vitória, I would just add that there is a provision in SPM's normalization procedure to weight or mask areas of your patient's MRI, which you can take advantage of to get much better results. (FieldTrip calls SPM functions behind-the-scenes to implement normalization.) First, you might want to see how 'strange' the default normalization looks. Right before running 'ft_volumenormalise', just run: spm_figure('Create','Graphics'); Then, after ft_volumenormalise finishes, you should see the normalization results compared against the MNI template image. Probably, you will see that they don't match very well. I'm not sure yet how to implement this in your FieldTrip workflow, but you can get started by working with SPM8 directly. Several years ago, we managed to successfully normalize MRIs of patients with brain tumors. We did this by 'painting' the pathological areas with MRIcro to create a mask, saving this mask into its own (binary) MRI file. This masked MRI can then be used by SPM as a 'weight' during the normalization process. You'll want normal brain to have a weight of 1 and the tumor zone to have a weight of 0. Probably this can be converted into command-line functions, but if you use the SPM8 GUI, you would go to "Normalise (Estimate and Write)", select your patient's MRI as the 'Source Image' and 'Images to Write', and the tumor mask as 'Source Weighting Image'. You probably have a T1 MRI, so under 'Template Image' you would select T1.nii. Again, it'll show you the normalized result compared with the template at the end of the process, and hopefully it will have gone better this time. :-) Note that SPM will want to work with Analyze (hdr/img) or Nifti (nii) files, so you'll have to convert them as appropriate. Maybe somebody else can fill you in on the best way to import the resulting normalized MRI back into your FieldTrip pipeline. Cheers Sarang ________________________________ From: fieldtrip-bounces at science.ru.nl on behalf of Schoffelen, J.M. (Jan Mathijs) Sent: Tuesday, June 14, 2016 9:31 AM To: FieldTrip discussion list Subject: Re: [FieldTrip] help diagnosing issues with source analysis (pathological brain) Hi Vitória, To me it looks as if most of the stuff you describe works as expected, i.e. it works well or it gives funny results, apart from the non-linear normalisation. The extremely distorted warped grid points may be due to the patient’s anatomical being pathological, causing the normalisation to converge to a very strange solution. Now, with respect to the plotting/interpolation: if the coordinate systems of the objects you are overlaying don’t match, you get funny results. This is the case for the sourceplot with the surface method (where the default cortical surface is in MNI-RAS), and your functional image is in CTF’s ALS, as well as for the sourceplot with the ortho method, using the blurry template from SPM (which is also in MNI-RAS). If you want these to match up, you could replace the source positions in your functional image with the ones from the standard grid, because you assume topological equivalence as per the inverse warping strategy applied in the creation of the beamformer grid. So, long story short: it seems that your source analysis just went fine, but you are confused by the different coordinate systems. Best, JM On 13 Jun 2016, at 11:02, Vitoria Piai > wrote: Hi Cris, that makes sense, except that the .mri file I'm getting from the hospital should already contain the right fiducial coordinates (or so I was told by the MEG technician). Maybe the issue is that FieldTrip is not getting these coordinates right from the .mri file if I don't run it through ft_volumerealign first. Any thoughts anyone? Thanks again On 12 June 2016 at 13:55, Cristiano Micheli > wrote: Dear Vitoria I had the same problem when I tried to coregister functional and anatomical data without transitioning through a head-referenced coordinates system. I solved the problem by using ft_volumerealign and selecting comparable anatomical fiducials for different subjects (nasion, left, right,..) BEFORE volume normalization. Maybe a hint towards the solution? Cheers Cris On Sat, Jun 11, 2016 at 8:50 PM, Vitória Piai > wrote: Hi everyone, I was hoping someone could help me figure out where my source analysis is going wrong. I have data on brain tumour patients (MRIs are from prior to tumour resection). From the hospital (using CTF), I receive .mri files that already have fiducial points saved as far as I was told. I then reslice and segment the .mri file, after reading it with ft_read_mri mri_reslice = ft_volumereslice([], mri); segmentedmri = ft_volumesegment([], mri_reslice); This seems to be working: Plotting headmodel and sensors, it looks like they are aligned: If I compute the source model with MNI-warping (non-linear transformation), I get something that doesn't seem right. I don't know if this is because these are not normal brains to start with: With linear transformation, things look better: One of my questions is what the consequences are of using linear transformation for the MNI warping given the pathological nature of these brains. Then, the next issue is this result when projecting the source to the surface: This happens regardless of whether I use the MNI-warped grid interpolated to the MNI template, or the patient's individual grid skipping the MNI normalisation step, interpolated to the patient's own T1. But if I plot with 'ortho' method, then I see that the MNI-warped and interpolated source data is misaligned, but the patient-native space one isn't. I can't make sense of this anymore; I've been trying all kinds of things that don't work, so I was wondering whether anyone has an idea of what could be going on by looking at these figures. Is it an error already at the level of alignment of the fiducials? Or is it due to the MNI-warping? Or a combination of issues? Thanks very much for any kind of help! Vitoria _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -------------- next part -------------- An HTML attachment was scrubbed... URL: From amickan1990 at gmail.com Fri Jun 17 18:43:40 2016 From: amickan1990 at gmail.com (Anne Mickan) Date: Fri, 17 Jun 2016 18:43:40 +0200 Subject: [FieldTrip] Theoretical question about cluster-based permutation tests Message-ID: Dear all, I have a theoretical question about cluster-based permutation tests. I've been reading through the website and through Maris & Oostenveld (2007) and I watched the video, all of which left me with the feeling I have a good understanding of *what* the permutation tests is doing (I've also implemented it successfully for my own data). However, I don't yet entirely understand how this test statistic avoids the multiple comparison problem. Particularly I'm wondering how it is that all the tests done initially on a sample-by-sample-basis (step 1 as described in Maris & Oostenveld, p. 180) and the threshold that is used to select samples for clustering (step 2) does not affect the FA. It is referred to a later section, which, however, does not clear it up for me. So I was hoping to get another explanation to fully understand this issue. Thanks a lot in advance. Best, Anne -------------- next part -------------- An HTML attachment was scrubbed... URL: From sarang at cfin.au.dk Fri Jun 17 18:54:04 2016 From: sarang at cfin.au.dk (Sarang S. Dalal) Date: Fri, 17 Jun 2016 16:54:04 +0000 Subject: [FieldTrip] LCMV returns no time series? In-Reply-To: References: , <1465999857376.33093@cfin.au.dk>, Message-ID: <1466182444559.4487@cfin.au.dk> Hi Peter, You likely have an Nvoxels x 1 cell array, which is as expected. Cells corresponding to voxels outside the brain will be empty, while the cells corresponding to voxels inside the brain should each contain an array of size 1xNsamples. (So effectively, you have Nvoxels x Nsamples, just repackaged into a cell array.) Nutmegtrip is designed to visualize and navigate this entire output on your subject's MRI, or you can pull out some voxels of interest and plot the time series with ft_databrowser or with matlab's built-in plot function. Cheers Sarang ________________________________________ From: fieldtrip-bounces at science.ru.nl on behalf of Peter Goodin Sent: Friday, June 17, 2016 3:19 AM To: FieldTrip discussion list Subject: Re: [FieldTrip] LCMV returns no time series? Hi Sarang, Regarding your point on that I should have the time series in source.avg.mom, the function only returns an n x 1 matrix. I've checked the averaged data and it does contain the channel x time series in av.avg, so I'm not really sure what's going on. Peter _______________________ Dr Peter Goodin, Brain and Psychological Sciences Research Centre (BPsyC) Swinburne University, Hawthorn, Vic, 3122 ________________________________________ From: fieldtrip-bounces at science.ru.nl [fieldtrip-bounces at science.ru.nl] on behalf of Sarang S. Dalal [sarang at cfin.au.dk] Sent: Thursday, 16 June 2016 12:10 AM To: FieldTrip discussion list Subject: Re: [FieldTrip] LCMV returns no time series? Hi Peter, If you've used the 'lcmv' method for ft_sourceanalysis, you ought to have the time series already contained in source.avg.mom. I've been working a lot lately on improving the LCMV functionality, but unfortunately haven't had a chance to document much yet. Especially if you are not contrasting different conditions, you might want to try these parameters: cfg.lcmv.weightnorm = 'nai'; % this is a new option :-) cfg.lcmv.fixedori = 'yes'; I also prefer to turn off reducerank, but YMMV: cfg.lcmv.reducerank = 'no'; Finally I've also contributed a viewer that will greatly help visualizing your virtual time series together with the MRI. You can find it in the latest distributions of FieldTrip under fieldtrip/contrib/nutmegtrip. You'll also need a full version of SPM8 in your path (the external in FieldTrip doesn't have all the necessary functions). You​​ can use it like this: cfg = []; cfg.mripath = '/path/to/mri/nii' % must be in nifti (nii) format cfg.funparameter = 'avg.mom' % cfg.atlas = ft_read_atlas('ROI_MNI_V4.nii'); % [optional] you can get atlas labels, if your MRI and grid points are based on the MNI grid nmt_sourceplot_spm8(cfg,ft_convert_units(source,'mm')); Cheers, Sarang ________________________________ From: fieldtrip-bounces at science.ru.nl on behalf of Peter Goodin Sent: Wednesday, June 15, 2016 3:32 PM To: FieldTrip discussion list Subject: [FieldTrip] LCMV returns no time series? Hi FieldTrip list, I'm using LCMV on averaged data (covariancewindow='all') but find the returned source estimates only have a single point. Is there a way to specify the analysis returns the time series for each grid point? Thanks, Peter _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl https://mailman.science.ru.nl/mailman/listinfo/fieldtrip From neuro at aewald.net Sun Jun 19 23:21:11 2016 From: neuro at aewald.net (Arne Ewald) Date: Sun, 19 Jun 2016 23:21:11 +0200 Subject: [FieldTrip] Biomag 2016 Brain Connectivity Analysis Competition Message-ID: Dear colleagues, [apologies for cross-postings] we have just launched a data analysis competition on brain connectivity analysis using EEG and MEG. Detailed information on the challenge and the data to be analyzed can be found at http://bbci.de/supplementary/EEGconnectivity/BBCB.html . At this website, we also offer a basic Matlab-based software framework for generating EEG/MEG data in a realistic head model, plotting results, etc. You and your colleagues are warmly invited to participate in the challenge. Please feel free to pass on this link to anyone else who might be interested. Besides active participation we would also be very happy to just hear your general opinion on the design of the challenge, and about any suggestions for extension (in the future). Our challenge is on of three official data analysis competitions of this year's BIOMAG conference. The invitation to participate in all three challenges is pasted below for your convenience. With best wishes, Arne Ewald and Stefan Haufe -------- Forwarded Message -------- Subject: [megcommunity] Biomag 2016 Data Analysis Competition Date: Mon, 30 May 2016 16:56:31 +0200 From: Ole Jensen Reply-To: Ole Jensen To: MEGCOMMUNITY at JISCMAIL.AC.UK Dear all, We are happy to announce three challenges for the 'Data Analysis Competition' at Biomag 2016. Please see details at http://www.biomag2016.org/data_analysis_competition.php The aim of the competitions is to promote the development and application of new analysis techniques. The challenges will help to elucidate pros and cons of different techniques and attract experts from outside the MEG field. The winners of the competition will be given the opportunity to present their proposal at the Biomag meeting in Seoul (Oct 1-6) in order to spark discussions on analysis. Please encourage colleagues to participate! Best regards, Ole Jensen -- Prof. dr. Ole Jensen http://www.neuosc.com -------------- next part -------------- An HTML attachment was scrubbed... URL: From pooneh.baniasad at gmail.com Mon Jun 20 09:03:51 2016 From: pooneh.baniasad at gmail.com (pooneh baniasad) Date: Mon, 20 Jun 2016 11:33:51 +0430 Subject: [FieldTrip] Generating EEG Message-ID: Dear community, My name is Pouneh Baniasad and I am working on my master thesis in Tehran University of Medical Sciences. I'm trying to generate EEG signal without using any raw data. Actually I want to completely simulating EEG. My question is can Fieldtrip simulate EEG signal? If the answer is yes, what's the procedure? Is it using dipole model or anything e -- Bests Pouneh Baniasad -------------- next part -------------- An HTML attachment was scrubbed... URL: From pgoodin at swin.edu.au Mon Jun 20 11:59:09 2016 From: pgoodin at swin.edu.au (Peter Goodin) Date: Mon, 20 Jun 2016 09:59:09 +0000 Subject: [FieldTrip] LCMV returns no time series? In-Reply-To: <1466182444559.4487@cfin.au.dk> References: , <1465999857376.33093@cfin.au.dk>, , <1466182444559.4487@cfin.au.dk> Message-ID: Hi Sarang, Not sure how I missed that! Thank you for outlining it so succinctly, greatly appreciated! Peter _______________________ Dr Peter Goodin, Brain and Psychological Sciences Research Centre (BPsyC) Swinburne University, Hawthorn, Vic, 3122 ________________________________________ From: fieldtrip-bounces at science.ru.nl [fieldtrip-bounces at science.ru.nl] on behalf of Sarang S. Dalal [sarang at cfin.au.dk] Sent: Saturday, 18 June 2016 2:54 AM To: FieldTrip discussion list Subject: Re: [FieldTrip] LCMV returns no time series? Hi Peter, You likely have an Nvoxels x 1 cell array, which is as expected. Cells corresponding to voxels outside the brain will be empty, while the cells corresponding to voxels inside the brain should each contain an array of size 1xNsamples. (So effectively, you have Nvoxels x Nsamples, just repackaged into a cell array.) Nutmegtrip is designed to visualize and navigate this entire output on your subject's MRI, or you can pull out some voxels of interest and plot the time series with ft_databrowser or with matlab's built-in plot function. Cheers Sarang ________________________________________ From: fieldtrip-bounces at science.ru.nl on behalf of Peter Goodin Sent: Friday, June 17, 2016 3:19 AM To: FieldTrip discussion list Subject: Re: [FieldTrip] LCMV returns no time series? Hi Sarang, Regarding your point on that I should have the time series in source.avg.mom, the function only returns an n x 1 matrix. I've checked the averaged data and it does contain the channel x time series in av.avg, so I'm not really sure what's going on. Peter _______________________ Dr Peter Goodin, Brain and Psychological Sciences Research Centre (BPsyC) Swinburne University, Hawthorn, Vic, 3122 ________________________________________ From: fieldtrip-bounces at science.ru.nl [fieldtrip-bounces at science.ru.nl] on behalf of Sarang S. Dalal [sarang at cfin.au.dk] Sent: Thursday, 16 June 2016 12:10 AM To: FieldTrip discussion list Subject: Re: [FieldTrip] LCMV returns no time series? Hi Peter, If you've used the 'lcmv' method for ft_sourceanalysis, you ought to have the time series already contained in source.avg.mom. I've been working a lot lately on improving the LCMV functionality, but unfortunately haven't had a chance to document much yet. Especially if you are not contrasting different conditions, you might want to try these parameters: cfg.lcmv.weightnorm = 'nai'; % this is a new option :-) cfg.lcmv.fixedori = 'yes'; I also prefer to turn off reducerank, but YMMV: cfg.lcmv.reducerank = 'no'; Finally I've also contributed a viewer that will greatly help visualizing your virtual time series together with the MRI. You can find it in the latest distributions of FieldTrip under fieldtrip/contrib/nutmegtrip. You'll also need a full version of SPM8 in your path (the external in FieldTrip doesn't have all the necessary functions). You​​ can use it like this: cfg = []; cfg.mripath = '/path/to/mri/nii' % must be in nifti (nii) format cfg.funparameter = 'avg.mom' % cfg.atlas = ft_read_atlas('ROI_MNI_V4.nii'); % [optional] you can get atlas labels, if your MRI and grid points are based on the MNI grid nmt_sourceplot_spm8(cfg,ft_convert_units(source,'mm')); Cheers, Sarang ________________________________ From: fieldtrip-bounces at science.ru.nl on behalf of Peter Goodin Sent: Wednesday, June 15, 2016 3:32 PM To: FieldTrip discussion list Subject: [FieldTrip] LCMV returns no time series? Hi FieldTrip list, I'm using LCMV on averaged data (covariancewindow='all') but find the returned source estimates only have a single point. Is there a way to specify the analysis returns the time series for each grid point? Thanks, Peter _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl https://mailman.science.ru.nl/mailman/listinfo/fieldtrip _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl https://mailman.science.ru.nl/mailman/listinfo/fieldtrip From quentin_moreau6 at orange.fr Mon Jun 20 12:50:54 2016 From: quentin_moreau6 at orange.fr (Quentin Moreau) Date: Mon, 20 Jun 2016 12:50:54 +0200 Subject: [FieldTrip] Evoked Power Message-ID: Dear Fieldtrip users, I am new in the EEG analysis, and in Fieldtrip coding. Anyway, for my analysis in the frequency domain, I would like to only have the Evoked Power. After reading a few previous discussions, I realize that the matter isn’t clear for everyone.. My question is this one: would that be a good idea to extract the power from previously computed ERPs, to be sure to only get the Evoked Power ? Thank you for your answers, Quentin Moreau Ph.D. student in Cognitive Social and Affective Neuroscience Department of Psychology AgliotiLab, "Sapienza" University of Rome IRCCS Fondazione Santa Lucia, Rome, Italy email: quentin_moreau6 at orange.fr -------------- next part -------------- An HTML attachment was scrubbed... URL: From ph442 at cam.ac.uk Mon Jun 20 12:53:46 2016 From: ph442 at cam.ac.uk (parham hashemzadeh) Date: Mon, 20 Jun 2016 11:53:46 +0100 Subject: [FieldTrip] Generating EEG In-Reply-To: References: Message-ID: <18671af9961ed227b7f9057f368bd763@cam.ac.uk> Hi Pooneh No it can not generate synthetic data. You will have to define either a set of dipoles or simply define a source function. You will then need to compute the forward problem (BEM) for the defined sources and the given head model. That will then become your raw Syhthetic data. After that, you will need to reconstruct using your generated data. Please note that in order to not commit the inverse error (also known as inverse crime), make sure that you reconstruct on a different mesh. best of luck parham hashemzadeh Senior Research Associate at the University of Cambridge, UK. On 2016-06-20 08:03, pooneh baniasad wrote: > Dear community, > > My name is Pouneh Baniasad and I am working on my master thesis in > Tehran University of Medical Sciences. I'm trying to generate EEG > signal without using any raw data. Actually I want to completely > simulating EEG. My question is can Fieldtrip simulate EEG signal? If > the answer is yes, what's the procedure? Is it using dipole model or > anything e-- > > Bests > > Pouneh Baniasad > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > https://mailman.science.ru.nl/mailman/listinfo/fieldtrip -- best regards Parham Hashemzadeh Research Associate Department of Applied Mathematics and Theoretical Physics University of Cambridge, UK. email: hashemzadeh at damtp.cam.ac.uk From dlozanosoldevilla at gmail.com Mon Jun 20 13:43:02 2016 From: dlozanosoldevilla at gmail.com (Diego Lozano-Soldevilla) Date: Mon, 20 Jun 2016 13:43:02 +0200 Subject: [FieldTrip] Generating EEG In-Reply-To: <18671af9961ed227b7f9057f368bd763@cam.ac.uk> References: <18671af9961ed227b7f9057f368bd763@cam.ac.uk> Message-ID: Hi Pouneh, Please find below some useful example scripts that you can adapt to your needs: http://www.fieldtriptoolbox.org/example/compute_forward_simulated_data_and_apply_a_dipole_fit http://www.fieldtriptoolbox.org/example/compute_forward_simulated_data_and_apply_a_beamformer_scan http://www.fieldtriptoolbox.org/example/combineplanar_pipelineorder best, Diego On 20 June 2016 at 12:53, parham hashemzadeh wrote: > Hi Pooneh > No it can not generate synthetic data. You will have to define either a > set of dipoles or simply define a source function. You will then need to > compute the forward problem (BEM) for the defined sources and the given > head model. That will then become your raw Syhthetic data. > After that, you will need to reconstruct using your generated data. Please > note that in order to not commit the inverse error (also known as inverse > crime), make sure that you reconstruct on a different mesh. > best of luck > parham hashemzadeh > Senior Research Associate at the University of Cambridge, UK. > > On 2016-06-20 08:03, pooneh baniasad wrote: > >> Dear community, >> >> My name is Pouneh Baniasad and I am working on my master thesis in >> Tehran University of Medical Sciences. I'm trying to generate EEG >> signal without using any raw data. Actually I want to completely >> simulating EEG. My question is can Fieldtrip simulate EEG signal? If >> the answer is yes, what's the procedure? Is it using dipole model or >> anything e-- >> >> Bests >> >> Pouneh Baniasad >> _______________________________________________ >> fieldtrip mailing list >> fieldtrip at donders.ru.nl >> https://mailman.science.ru.nl/mailman/listinfo/fieldtrip >> > > -- > best regards > Parham Hashemzadeh > Research Associate > Department of Applied Mathematics and Theoretical Physics > University of Cambridge, UK. > email: hashemzadeh at damtp.cam.ac.uk > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > https://mailman.science.ru.nl/mailman/listinfo/fieldtrip > -------------- next part -------------- An HTML attachment was scrubbed... URL: From hamzaf at sabanciuniv.edu Mon Jun 20 16:29:02 2016 From: hamzaf at sabanciuniv.edu (Hamza Fawzi Altakroury (Alumni)) Date: Mon, 20 Jun 2016 16:29:02 +0200 Subject: [FieldTrip] Interactive alignment for spherical head model Message-ID: Hello, To do an interactive alignment for electrodes with a spherical head model, what should I put in the variable cfg.headshape ? Thank you -- Hamza Fawzi Altakroury Graduate student - MA Faculty of Engineering and Natural Sciences Sabancı University -------------- next part -------------- An HTML attachment was scrubbed... URL: From sauer.mpih at googlemail.com Mon Jun 20 21:22:10 2016 From: sauer.mpih at googlemail.com (Andreas Sauer) Date: Mon, 20 Jun 2016 21:22:10 +0200 Subject: [FieldTrip] Fwd: Coordsys issue ft_sourceplot In-Reply-To: <8EF9FF29-549B-4E5C-9ED3-055147E8DFD0@donders.ru.nl> References: <08B10307-13ED-40F0-9F87-B50EEDAF25CC@gmail.com> <8EF9FF29-549B-4E5C-9ED3-055147E8DFD0@donders.ru.nl> Message-ID: Dear Jan-Mathijs, sorry that I bring up that post again, but I am still having problems with the different coordinate systems in my data. After replacing the .pos field in the source files with the one from the "standard_sourcemodel3d5mm" ft_sourceplot works fine, i.e. the functional data is not rotated anymore. However, the option cfg.atlas doesn't work since I always get the error message "mismatch between the coord sys in the atlas and the coord sys in the data...". I checked the atlas, the functional data (stat) and the anatomy I use for interpolation with ft_determine_coordsys. All three files have RAS orientation. If I change the anatomical label of the axes of the functional data, ft says "neuromag". Unfortunately, the function atlas_lookup works only with "mni", "tal" or "spm". So I see where the error messages comes from... The difference between MNI and neuromas is the unit (mm resp. m), so I thought to use ft_convert_units, but that doesn't work for functional data. Is there any way that I can change the functional data to "MNI" (I thought I did this already)? Sorry if this is a straight forward thing, but I don't see where I make the mistake... Thanks a lot and best wishes, Andreas 2016-06-15 15:06 GMT+02:00 Schoffelen, J.M. (Jan Mathijs) < jan.schoffelen at donders.ru.nl>: > Are you sure that you use the pos-field from the template, i.e. from the > standard_sourcemodel3d5mm? > > Best, > Jan-Mathijs > > On 15 Jun 2016, at 14:31, Andreas Sauer wrote: > > Dear Jan, > > thank you for your email and the example code! > > I tried both ways to convert the coord systems, but unfortunately it still > doesn't work. > > Since I used the tutorial procedure to create my sourcemodel ( > http://www.fieldtriptoolbox.org/tutorial/sourcemodel#subject-specific_grids_that_are_equivalent_across_subjects_in_normalized_space) > I tried first with the easy way of only replacing the .pos field. But the > plots don't change, the sources are still rotated by 90 degrees. Actually, > the .pos fields are already the same before replacing it (see pic). Is > there some error in my code? > > > *% Step1: Load mri file* > *mri = > ft_read_mri('/data/home1/asauer/Projects/RPScZ/Analysis/Beamforming/MRI/HSM12_V2.mri');* > > *% Step 2: Segment the template brain and construct a volume conduction* > *% model (i.e. head model): this is needed for the inside/outside > detection of voxels* > *cfg = [];* > *cfg.output = 'brain';* > *segmentedmri = ft_volumesegment(cfg,anatomy);* > > *cfg = [];* > *cfg.method = 'singleshell';* > *vol = ft_prepare_headmodel(cfg,segmentedmri);* > *vol = ft_convert_units(vol,'m');* > *figure; ft_plot_sens(sens,'style','*b'); hold on; ft_plot_vol(vol)* > > *% Step 3: Load sourcemodel * > *load(fullfile(ft_path,'template/sourcemodel/standard_sourcemodel3d5mm'));* > *template_grid = sourcemodel;* > *clear sourcemodel* > > *% Step 4: Make sourcemodel* > *cfg = [];* > *cfg.grid.warpmni = 'yes';* > *cfg.grid.template = template_grid;* > *cfg.grid.nonlinear = 'yes';* > *cfg.mri = mri;* > *cfg.grid.unit = 'm';* > *grid = ft_prepare_sourcemodel(cfg);* > *figure; hold on;* > *ft_plot_vol(vol,'facecolor','cortex','edgecolor','none'); alpha 0.5; > camlight;* > *ft_plot_mesh(grid.pos(grid.inside,:));* > > > The only thing that is different from the tutorial is the unit > conversion... > > After that I tried the transformation. All worked well until the source > interpolation. ft_sourceinterpolation throws this error: > > *Attempted to access sel(1); index out of bounds because numel(sel)=0.* > > *Error in ft_sourceinterpolate>my_interpn (line 508)* > * ft_progress(sel(1)/num, 'interpolating %.1f%%\n', 100*sel(1)/num);* > > *Error in ft_sourceinterpolate (line 393)* > * interp.inside( sel) = my_interpn(double(functional.inside), ax(sel), > ay(sel), az(sel), 'nearest', cfg.feedback);* > > > which, to be honest, I don't really understand. Sorry... > > Best wishes, > > Andreas > > > 2016-06-14 9:41 GMT+02:00 Schoffelen, J.M. (Jan Mathijs) < > jan.schoffelen at donders.ru.nl>: > >> Dear Andreas, >> >> after having calculated the sources of a MMN paradigm (4D-system), I’d >> like to plot the results on one of the anatomy template files in the >> fieldtrip directory (single_subj_T1_1mm.nii) or alternatively on a MNI T1 >> template file (mni_icbm152_t1_tal_nlin_sym_09a.nii). Unfortunately, this is >> not working well… As you can see on the attached picture, the functional >> data is rotated by 90 degrees. >> >> I guess that something gets mixed because of the different coordsystems >> of functional and anatomical data. The functional data is 4D, which means >> ALS orientation. The anatomical is MNI, so RAS orientation. The plotting >> works fine, if I use a mri file which was converted in field trip (V2.mri) >> and therefore is also in ALS orientation. However, the anatomy doesn’t look >> very pretty… >> >> >> Is there any way that I can transform the functional data to RAS >> orientation or the anatomical data to ALS orientation, respectively? >> >> >> I tried with ft_volumerealign. However, since the template file has no >> fiducials, it is hard to really precisely do this. >> >> >> Fair point. I would however do it the other way around, using the V2 to >> get the transformation from voxel space to MNI-RAS, and then use the >> inverse of the transformation on the functional data: in this case you >> could use ft_volumenormalise, with cfg.nonlinear = ‘no’. Alternatively, if >> you are using this procedure: >> http://www.fieldtriptoolbox.org/tutorial/sourcemodel#subject-specific_grids_that_are_equivalent_across_subjects_in_normalized_space, >> you could directly replace the source.pos of your functional data with the >> template.pos and then do the interpolation. >> >> To summarize: >> >> either: >> >> mri = ft_read_mri(‘V2.mri’); >> mri.coordsys = ‘bti’; >> >> cfg = []; >> cfg.nonlinear=’no’; >> mrin = ft_volumenormalise(cfg, mri); >> >> transform_vox2bti = mri.transform; >> transform_vox2spm = mrin.transform; >> transform_bti2spm = transform_vox2spm/transform_vox2bti >> source = ft_transform_geometry(transform_bti2spm, source); >> >> source_int = ft_sourceinterpolate(somecfg, source, niceanatomical); >> >> or: >> >> source.pos = templat.pos; >> source_int = ft_sourceinterpolate(somecfg, source, niceanatomical); >> >> Best, >> JM >> >> >> >> Any input on how to plot the sources on one of these nice anatomical >> files is highly appreciated! >> >> Thanks and best regards, >> >> Andreas >> >> >> -- >> Dipl.-Psych. Andreas Sauer >> Max Planck Institute for Brain Research >> Deutschordenstraße 46 >> 60528 Frankfurt am Main >> Germany >> >> T: +49 69 96769 278 >> F: +49 69 96769 327 >> Email: sauer.mpih at gmail.com >> www.brain.mpg.de >> _______________________________________________ >> fieldtrip mailing list >> fieldtrip at donders.ru.nl >> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip >> >> >> >> _______________________________________________ >> fieldtrip mailing list >> fieldtrip at donders.ru.nl >> https://mailman.science.ru.nl/mailman/listinfo/fieldtrip >> > > > > -- > Dipl.-Psych. Andreas Sauer > Max Planck Institute for Brain Research > Deutschordenstraße 46 > 60528 Frankfurt am Main > Germany > > T: +49 69 96769 278 > F: +49 69 96769 327 > Email: sauer.mpih at gmail.com > www.brain.mpg.de > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > https://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > https://mailman.science.ru.nl/mailman/listinfo/fieldtrip > -- Dipl.-Psych. Andreas Sauer Max Planck Institute for Brain Research Deutschordenstraße 46 60528 Frankfurt am Main Germany T: +49 69 96769 278 F: +49 69 96769 327 Email: sauer.mpih at gmail.com www.brain.mpg.de -------------- next part -------------- An HTML attachment was scrubbed... URL: From pmetzak at gmail.com Tue Jun 21 02:08:46 2016 From: pmetzak at gmail.com (Paul Metzak) Date: Mon, 20 Jun 2016 17:08:46 -0700 Subject: [FieldTrip] issues compiling matlab code that calls spm and runs a beamformer analysis Message-ID: Hello, I have been attempting to use the MATLAB compile to compile my code and run it on my university's supercomputer. However, I am running into an issue when trying to volume normalise the beamformed images I have created. >From the error messages (see below), the issue arises from an inability to obtain SPM Revision information. I am using SPM8 and it is on my MATLAB path so I am unclear how to avoid this error, or whether it relates to: 1) an issue with my code, 2) what I have on/the order of my MATLAB path, or with the interface between MATLAB/SPM/FieldTrip. If anyone could suggest a workaround, or something that may help me to avoid this error I would be most appreciative. Note: I read that SPM uses a Contents.m file to indicate Revision number and that this file becomes Contents.txt when SPM is compiled to a standalone version but including this file on my MATLAB path both .,m and .txt versions) did not resolve the error. I am very new to compiling so it is possible that I did not do this correctly (if this matters at all). Thanks for any help you can offer, and let me know if any further information would be helpful to diagnose the problem. Paul Converting the coordinate system from ctf to spm > Error using spm>spm_version (line 1269) > Can't obtain SPM Revision information. > Error in spm (line 875) > > > Error in align_ctf2spm (line 121) > > > Error in ft_convert_coordsys (line 95) > > > Error in ft_volumenormalise (line 121) > > > Error in mmcc_beamform_param_twenty3_c2 (line 269) -------------- next part -------------- An HTML attachment was scrubbed... URL: From recasensmarc at gmail.com Tue Jun 21 10:32:31 2016 From: recasensmarc at gmail.com (Marc Recasens) Date: Tue, 21 Jun 2016 09:32:31 +0100 Subject: [FieldTrip] Fwd: Coordsys issue ft_sourceplot In-Reply-To: References: <08B10307-13ED-40F0-9F87-B50EEDAF25CC@gmail.com> <8EF9FF29-549B-4E5C-9ED3-055147E8DFD0@donders.ru.nl> Message-ID: Dear Andreas, I managed to get the AAL atlas labels on ortho-plots by adding the same "coordsys" subfield in both atlas and data files (plus cfg.atlas). I use coordsys = 'spm' even though everything is "mni", I reckon doesn't matter as long as both files share the same "coordsys". Maybe there's a more elegant way to do it but that worked fine for me. atlas = ft_read_atlas(paths_to_AAL_atlas); % read aal atlas atlas.coordsys = 'spm'; interpolated_data.coordsys = 'spm'; cfg_plot = []; cfg_plot.method = 'ortho'; cfg_plot.funparameter = 'pow'; cfg_plot.atlas = atlas; ft_sourceplot(cfg_plot,interpolated_data); Hope it helps Marc On Mon, Jun 20, 2016 at 8:22 PM, Andreas Sauer wrote: > Dear Jan-Mathijs, > > sorry that I bring up that post again, but I am still having problems with > the different coordinate systems in my data. > > After replacing the .pos field in the source files with the one from the > "standard_sourcemodel3d5mm" ft_sourceplot works fine, i.e. the functional > data is not rotated anymore. However, the option cfg.atlas doesn't work > since I always get the error message "mismatch between the coord sys in the > atlas and the coord sys in the data...". > > I checked the atlas, the functional data (stat) and the anatomy I use for > interpolation with ft_determine_coordsys. All three files have RAS > orientation. If I change the anatomical label of the axes of the functional > data, ft says "neuromag". Unfortunately, the function atlas_lookup works > only with "mni", "tal" or "spm". So I see where the error messages comes > from... The difference between MNI and neuromas is the unit (mm resp. m), > so I thought to use ft_convert_units, but that doesn't work for functional > data. > > Is there any way that I can change the functional data to "MNI" (I thought > I did this already)? Sorry if this is a straight forward thing, but I don't > see where I make the mistake... > > Thanks a lot and best wishes, > > Andreas > > 2016-06-15 15:06 GMT+02:00 Schoffelen, J.M. (Jan Mathijs) < > jan.schoffelen at donders.ru.nl>: > >> Are you sure that you use the pos-field from the template, i.e. from the >> standard_sourcemodel3d5mm? >> >> Best, >> Jan-Mathijs >> >> On 15 Jun 2016, at 14:31, Andreas Sauer >> wrote: >> >> Dear Jan, >> >> thank you for your email and the example code! >> >> I tried both ways to convert the coord systems, but unfortunately it >> still doesn't work. >> >> Since I used the tutorial procedure to create my sourcemodel ( >> http://www.fieldtriptoolbox.org/tutorial/sourcemodel#subject-specific_grids_that_are_equivalent_across_subjects_in_normalized_space) >> I tried first with the easy way of only replacing the .pos field. But the >> plots don't change, the sources are still rotated by 90 degrees. Actually, >> the .pos fields are already the same before replacing it (see pic). Is >> there some error in my code? >> >> >> *% Step1: Load mri file* >> *mri = >> ft_read_mri('/data/home1/asauer/Projects/RPScZ/Analysis/Beamforming/MRI/HSM12_V2.mri');* >> >> *% Step 2: Segment the template brain and construct a volume conduction* >> *% model (i.e. head model): this is needed for the inside/outside >> detection of voxels* >> *cfg = [];* >> *cfg.output = 'brain';* >> *segmentedmri = ft_volumesegment(cfg,anatomy);* >> >> *cfg = [];* >> *cfg.method = 'singleshell';* >> *vol = ft_prepare_headmodel(cfg,segmentedmri);* >> *vol = ft_convert_units(vol,'m');* >> *figure; ft_plot_sens(sens,'style','*b'); hold on; ft_plot_vol(vol)* >> >> *% Step 3: Load sourcemodel * >> >> *load(fullfile(ft_path,'template/sourcemodel/standard_sourcemodel3d5mm'));* >> *template_grid = sourcemodel;* >> *clear sourcemodel* >> >> *% Step 4: Make sourcemodel* >> *cfg = [];* >> *cfg.grid.warpmni = 'yes';* >> *cfg.grid.template = template_grid;* >> *cfg.grid.nonlinear = 'yes';* >> *cfg.mri = mri;* >> *cfg.grid.unit = 'm';* >> *grid = ft_prepare_sourcemodel(cfg);* >> *figure; hold on;* >> *ft_plot_vol(vol,'facecolor','cortex','edgecolor','none'); alpha 0.5; >> camlight;* >> *ft_plot_mesh(grid.pos(grid.inside,:));* >> >> >> The only thing that is different from the tutorial is the unit >> conversion... >> >> After that I tried the transformation. All worked well until the source >> interpolation. ft_sourceinterpolation throws this error: >> >> *Attempted to access sel(1); index out of bounds because numel(sel)=0.* >> >> *Error in ft_sourceinterpolate>my_interpn (line 508)* >> * ft_progress(sel(1)/num, 'interpolating %.1f%%\n', 100*sel(1)/num);* >> >> *Error in ft_sourceinterpolate (line 393)* >> * interp.inside( sel) = my_interpn(double(functional.inside), ax(sel), >> ay(sel), az(sel), 'nearest', cfg.feedback);* >> >> >> which, to be honest, I don't really understand. Sorry... >> >> Best wishes, >> >> Andreas >> >> >> 2016-06-14 9:41 GMT+02:00 Schoffelen, J.M. (Jan Mathijs) < >> jan.schoffelen at donders.ru.nl>: >> >>> Dear Andreas, >>> >>> after having calculated the sources of a MMN paradigm (4D-system), I’d >>> like to plot the results on one of the anatomy template files in the >>> fieldtrip directory (single_subj_T1_1mm.nii) or alternatively on a MNI T1 >>> template file (mni_icbm152_t1_tal_nlin_sym_09a.nii). Unfortunately, this is >>> not working well… As you can see on the attached picture, the functional >>> data is rotated by 90 degrees. >>> >>> I guess that something gets mixed because of the different coordsystems >>> of functional and anatomical data. The functional data is 4D, which means >>> ALS orientation. The anatomical is MNI, so RAS orientation. The plotting >>> works fine, if I use a mri file which was converted in field trip (V2.mri) >>> and therefore is also in ALS orientation. However, the anatomy doesn’t look >>> very pretty… >>> >>> >>> Is there any way that I can transform the functional data to RAS >>> orientation or the anatomical data to ALS orientation, respectively? >>> >>> >>> I tried with ft_volumerealign. However, since the template file has no >>> fiducials, it is hard to really precisely do this. >>> >>> >>> Fair point. I would however do it the other way around, using the V2 to >>> get the transformation from voxel space to MNI-RAS, and then use the >>> inverse of the transformation on the functional data: in this case you >>> could use ft_volumenormalise, with cfg.nonlinear = ‘no’. Alternatively, if >>> you are using this procedure: >>> http://www.fieldtriptoolbox.org/tutorial/sourcemodel#subject-specific_grids_that_are_equivalent_across_subjects_in_normalized_space, >>> you could directly replace the source.pos of your functional data with the >>> template.pos and then do the interpolation. >>> >>> To summarize: >>> >>> either: >>> >>> mri = ft_read_mri(‘V2.mri’); >>> mri.coordsys = ‘bti’; >>> >>> cfg = []; >>> cfg.nonlinear=’no’; >>> mrin = ft_volumenormalise(cfg, mri); >>> >>> transform_vox2bti = mri.transform; >>> transform_vox2spm = mrin.transform; >>> transform_bti2spm = transform_vox2spm/transform_vox2bti >>> source = ft_transform_geometry(transform_bti2spm, source); >>> >>> source_int = ft_sourceinterpolate(somecfg, source, niceanatomical); >>> >>> or: >>> >>> source.pos = templat.pos; >>> source_int = ft_sourceinterpolate(somecfg, source, niceanatomical); >>> >>> Best, >>> JM >>> >>> >>> >>> Any input on how to plot the sources on one of these nice anatomical >>> files is highly appreciated! >>> >>> Thanks and best regards, >>> >>> Andreas >>> >>> >>> -- >>> Dipl.-Psych. Andreas Sauer >>> Max Planck Institute for Brain Research >>> Deutschordenstraße 46 >>> 60528 Frankfurt am Main >>> Germany >>> >>> T: +49 69 96769 278 >>> F: +49 69 96769 327 >>> Email: sauer.mpih at gmail.com >>> www.brain.mpg.de >>> _______________________________________________ >>> fieldtrip mailing list >>> fieldtrip at donders.ru.nl >>> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip >>> >>> >>> >>> _______________________________________________ >>> fieldtrip mailing list >>> fieldtrip at donders.ru.nl >>> https://mailman.science.ru.nl/mailman/listinfo/fieldtrip >>> >> >> >> >> -- >> Dipl.-Psych. Andreas Sauer >> Max Planck Institute for Brain Research >> Deutschordenstraße 46 >> 60528 Frankfurt am Main >> Germany >> >> T: +49 69 96769 278 >> F: +49 69 96769 327 >> Email: sauer.mpih at gmail.com >> www.brain.mpg.de >> _______________________________________________ >> fieldtrip mailing list >> fieldtrip at donders.ru.nl >> https://mailman.science.ru.nl/mailman/listinfo/fieldtrip >> >> >> >> >> _______________________________________________ >> fieldtrip mailing list >> fieldtrip at donders.ru.nl >> https://mailman.science.ru.nl/mailman/listinfo/fieldtrip >> > > > > -- > Dipl.-Psych. Andreas Sauer > Max Planck Institute for Brain Research > Deutschordenstraße 46 > 60528 Frankfurt am Main > Germany > > T: +49 69 96769 278 > F: +49 69 96769 327 > Email: sauer.mpih at gmail.com > www.brain.mpg.de > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > https://mailman.science.ru.nl/mailman/listinfo/fieldtrip > -- Marc Recasens Tel.: +44 7845810006 Tel.: +34 639241598 -------------- next part -------------- An HTML attachment was scrubbed... URL: From tineke.snijders at donders.ru.nl Tue Jun 21 11:09:12 2016 From: tineke.snijders at donders.ru.nl (Snijders, T.M. (Tineke)) Date: Tue, 21 Jun 2016 09:09:12 +0000 Subject: [FieldTrip] Theoretical question about cluster-based permutation tests In-Reply-To: References: Message-ID: <815A9820E75FBC4F96B7CD3A8089D11C378EA2A6@exprd04.hosting.ru.nl> Hi Anne, All the tests you do initially and the threshold that is used to select samples for clustering do not affect the FA because they only determine whether a sample-point will be included in a cluster, they do not determine significance. In the end you are only doing ONE test to determine significance, and that is to test whether such a large cluster could have occurred by chance. And you do that by the permutation test, by permuting the data and looking at how large the clusters get when the data would have been random. Then you compare your cluster-statistic to the random distribution of cluster-statistics, and if that large a cluster only happens in <5% of the cases you call it significant. So that's only one test. Note that also in the random data there will be clusters formed of which the sample-points survive the initial thresholds, and if you use e.g. a lower threshold for selecting samples for clustering, this means you will get larger clusters. But, then also your 'real' cluster should be larger to survive the 'significance' question: "how probable is it to see such a large cluster in random data (using these settings)?" Hope this helps, Cheers, Tineke ________________________________ From: fieldtrip-bounces at science.ru.nl [fieldtrip-bounces at science.ru.nl] on behalf of Anne Mickan [amickan1990 at gmail.com] Sent: Friday, June 17, 2016 6:43 PM To: fieldtrip at science.ru.nl Subject: [FieldTrip] Theoretical question about cluster-based permutation tests Dear all, I have a theoretical question about cluster-based permutation tests. I've been reading through the website and through Maris & Oostenveld (2007) and I watched the video, all of which left me with the feeling I have a good understanding of what the permutation tests is doing (I've also implemented it successfully for my own data). However, I don't yet entirely understand how this test statistic avoids the multiple comparison problem. Particularly I'm wondering how it is that all the tests done initially on a sample-by-sample-basis (step 1 as described in Maris & Oostenveld, p. 180) and the threshold that is used to select samples for clustering (step 2) does not affect the FA. It is referred to a later section, which, however, does not clear it up for me. So I was hoping to get another explanation to fully understand this issue. Thanks a lot in advance. Best, Anne -------------- next part -------------- An HTML attachment was scrubbed... URL: From frsantos at fpce.up.pt Tue Jun 21 16:17:46 2016 From: frsantos at fpce.up.pt (Fernando Ferreira-Santos) Date: Tue, 21 Jun 2016 14:17:46 +0000 Subject: [FieldTrip] 2016 Porto EEG/ERP Summer School Message-ID: <2BAB036A9BAEA44984A131DFCE44610801B5468106@SRVMBX01.fpceup.psi.up.pt> Dear colleagues, The Laboratory of Neuropsychopsysiology of the University of Porto (http://www.fpce.up.pt/labpsi/) is pleased to announce the 5th edition of the International Cognitive and Affective Neurophysiology Summer School: Acquisition, processing, and analysis of EEG signal. This summer school is focused on the application of Electroencephalography (EEG) and Event Related Potential (ERP) techniques to the study of cognitive and affective processes. This 36h course will be fully taught in English and is aimed at an introductory level, so no previous experience with EEG or ERP is required. This event will take place from 5-9 of September 2016 in the lovely city of Porto. In last year's edition the course was fully booked and, as such, we recommend early registration (course places are attributed by order of registration). The registration deadline is July 31st. For additional details and instructions on how to register, please consult our website (http://www.fpce.up.pt/labpsi/summerschool/). Please feel free to pass this information along to students or researchers that may be potentially interested. Thanks you and best wishes, -- Fernando Ferreira-Santos, PhD Lecturer Laboratory of Neuropsychophysiology Faculty of Psychology and Education Sciences University of Porto Rua Alfredo Allen, 4200-135 Porto (Portugal) Tel.: +351 226079700 (ext. 409) E-mail: frsantos at fpce.up.pt http://www.fpce.up.pt/labpsi/ -------------- next part -------------- An HTML attachment was scrubbed... URL: From zhangk28 at mcmaster.ca Tue Jun 21 20:55:54 2016 From: zhangk28 at mcmaster.ca (KAIJIE ZHANG) Date: Tue, 21 Jun 2016 14:55:54 -0400 Subject: [FieldTrip] topoplotTFR 2 Channels Not Showing Message-ID: Hi Community, My name is Kaijie Zhang, and I am working with near infrared spectroscopy to analyze functional connectivity in the brain. Everything related to this issue is in a dropbox .zip file via the link here: https://www.dropbox.com/s/umhd6k9uzhieg69/topoplotTFR%20Channels%20Issue.zip?dl=0 First, layoutFieldTrip (self-written script) was used to set up the layout for topoplotTFR. I have successfully used ft_freqanalysis to calculate the coherence for my data. This was done in the function magnitudeSquaredCoherence (self-written). topoplotTFR was then invoked in the last segment of magnitudeSquaredCoherence. The image produced is shown in the .jpeg file named "topoplotTFR Channel Issue", in the zip file. Everything seems to be correct, except for the fact that two channels are missing, in particular channels 23 and 24 in the left posterior side (all 46 channels should produce a symmetrical figure). I am not sure for the cause of this because no errors are produced, and I have labeled everything correctly in layout, as well as their positions. The cfg and data I used for topoplotTFR are displayed as follows: cfg = layout: [1x1 struct] refchannel: 'Ch1' baseline: 'no' xlim: 'maxmin' zlim: 'maxmin' ylim: 'maxmin' marker: 'labels' style: 'both' shading: 'interp' comment: 'no' colorbar: 'EastOutside' directionality: 'outflow' data = label: {46x1 cell} dimord: 'rpt_chan_freq' freq: [1x19 double] powspctrm: [5x46x19 double] labelcmb: {2116x2 cell} crsspctrm: [5x2116x19 double] cumsumcnt: [304 301 303 301 3002] cumtapcnt: [5x1 double] cfg: [1x1 struct] My raw data and self-written MATLAB codes are also attached in the zip file. They can be run after extracting. (Make sure to cd to the correct folder containing all the extracted files!). Thank you very much for any input! Best Regards, Kaijie Zhang -- Kaijie Zhang Electrical & Biomedical Engineering, Level III McMaster University -------------- next part -------------- An HTML attachment was scrubbed... URL: From sauer.mpih at googlemail.com Tue Jun 21 22:14:25 2016 From: sauer.mpih at googlemail.com (Andreas Sauer) Date: Tue, 21 Jun 2016 22:14:25 +0200 Subject: [FieldTrip] Fwd: Coordsys issue ft_sourceplot In-Reply-To: References: <08B10307-13ED-40F0-9F87-B50EEDAF25CC@gmail.com> <8EF9FF29-549B-4E5C-9ED3-055147E8DFD0@donders.ru.nl> Message-ID: Dear Marc, thanks for your comment! It works fine. Best, Andreas 2016-06-21 10:32 GMT+02:00 Marc Recasens : > Dear Andreas, > > I managed to get the AAL atlas labels on ortho-plots by adding the same > "coordsys" subfield in both atlas and data files (plus cfg.atlas). I use > coordsys = 'spm' even though everything is "mni", I reckon doesn't matter > as long as both files share the same "coordsys". Maybe there's a more > elegant way to do it but that worked fine for me. > > atlas = ft_read_atlas(paths_to_AAL_atlas); > % read aal atlas > atlas.coordsys = 'spm'; > interpolated_data.coordsys = 'spm'; > cfg_plot = []; > cfg_plot.method = 'ortho'; > cfg_plot.funparameter = 'pow'; > cfg_plot.atlas = atlas; > ft_sourceplot(cfg_plot,interpolated_data); > > Hope it helps > Marc > > > On Mon, Jun 20, 2016 at 8:22 PM, Andreas Sauer > wrote: > >> Dear Jan-Mathijs, >> >> sorry that I bring up that post again, but I am still having problems >> with the different coordinate systems in my data. >> >> After replacing the .pos field in the source files with the one from the >> "standard_sourcemodel3d5mm" ft_sourceplot works fine, i.e. the functional >> data is not rotated anymore. However, the option cfg.atlas doesn't work >> since I always get the error message "mismatch between the coord sys in the >> atlas and the coord sys in the data...". >> >> I checked the atlas, the functional data (stat) and the anatomy I use for >> interpolation with ft_determine_coordsys. All three files have RAS >> orientation. If I change the anatomical label of the axes of the functional >> data, ft says "neuromag". Unfortunately, the function atlas_lookup works >> only with "mni", "tal" or "spm". So I see where the error messages comes >> from... The difference between MNI and neuromas is the unit (mm resp. m), >> so I thought to use ft_convert_units, but that doesn't work for functional >> data. >> >> Is there any way that I can change the functional data to "MNI" (I >> thought I did this already)? Sorry if this is a straight forward thing, but >> I don't see where I make the mistake... >> >> Thanks a lot and best wishes, >> >> Andreas >> >> 2016-06-15 15:06 GMT+02:00 Schoffelen, J.M. (Jan Mathijs) < >> jan.schoffelen at donders.ru.nl>: >> >>> Are you sure that you use the pos-field from the template, i.e. from the >>> standard_sourcemodel3d5mm? >>> >>> Best, >>> Jan-Mathijs >>> >>> On 15 Jun 2016, at 14:31, Andreas Sauer >>> wrote: >>> >>> Dear Jan, >>> >>> thank you for your email and the example code! >>> >>> I tried both ways to convert the coord systems, but unfortunately it >>> still doesn't work. >>> >>> Since I used the tutorial procedure to create my sourcemodel ( >>> http://www.fieldtriptoolbox.org/tutorial/sourcemodel#subject-specific_grids_that_are_equivalent_across_subjects_in_normalized_space) >>> I tried first with the easy way of only replacing the .pos field. But the >>> plots don't change, the sources are still rotated by 90 degrees. Actually, >>> the .pos fields are already the same before replacing it (see pic). Is >>> there some error in my code? >>> >>> >>> *% Step1: Load mri file* >>> *mri = >>> ft_read_mri('/data/home1/asauer/Projects/RPScZ/Analysis/Beamforming/MRI/HSM12_V2.mri');* >>> >>> *% Step 2: Segment the template brain and construct a volume conduction* >>> *% model (i.e. head model): this is needed for the inside/outside >>> detection of voxels* >>> *cfg = [];* >>> *cfg.output = 'brain';* >>> *segmentedmri = ft_volumesegment(cfg,anatomy);* >>> >>> *cfg = [];* >>> *cfg.method = 'singleshell';* >>> *vol = ft_prepare_headmodel(cfg,segmentedmri);* >>> *vol = ft_convert_units(vol,'m');* >>> *figure; ft_plot_sens(sens,'style','*b'); hold on; ft_plot_vol(vol)* >>> >>> *% Step 3: Load sourcemodel * >>> >>> *load(fullfile(ft_path,'template/sourcemodel/standard_sourcemodel3d5mm'));* >>> *template_grid = sourcemodel;* >>> *clear sourcemodel* >>> >>> *% Step 4: Make sourcemodel* >>> *cfg = [];* >>> *cfg.grid.warpmni = 'yes';* >>> *cfg.grid.template = template_grid;* >>> *cfg.grid.nonlinear = 'yes';* >>> *cfg.mri = mri;* >>> *cfg.grid.unit = 'm';* >>> *grid = ft_prepare_sourcemodel(cfg);* >>> *figure; hold on;* >>> *ft_plot_vol(vol,'facecolor','cortex','edgecolor','none'); alpha 0.5; >>> camlight;* >>> *ft_plot_mesh(grid.pos(grid.inside,:));* >>> >>> >>> The only thing that is different from the tutorial is the unit >>> conversion... >>> >>> After that I tried the transformation. All worked well until the source >>> interpolation. ft_sourceinterpolation throws this error: >>> >>> *Attempted to access sel(1); index out of bounds because numel(sel)=0.* >>> >>> *Error in ft_sourceinterpolate>my_interpn (line 508)* >>> * ft_progress(sel(1)/num, 'interpolating %.1f%%\n', 100*sel(1)/num);* >>> >>> *Error in ft_sourceinterpolate (line 393)* >>> * interp.inside( sel) = my_interpn(double(functional.inside), >>> ax(sel), ay(sel), az(sel), 'nearest', cfg.feedback);* >>> >>> >>> which, to be honest, I don't really understand. Sorry... >>> >>> Best wishes, >>> >>> Andreas >>> >>> >>> 2016-06-14 9:41 GMT+02:00 Schoffelen, J.M. (Jan Mathijs) < >>> jan.schoffelen at donders.ru.nl>: >>> >>>> Dear Andreas, >>>> >>>> after having calculated the sources of a MMN paradigm (4D-system), I’d >>>> like to plot the results on one of the anatomy template files in the >>>> fieldtrip directory (single_subj_T1_1mm.nii) or alternatively on a MNI T1 >>>> template file (mni_icbm152_t1_tal_nlin_sym_09a.nii). Unfortunately, this is >>>> not working well… As you can see on the attached picture, the functional >>>> data is rotated by 90 degrees. >>>> >>>> I guess that something gets mixed because of the different coordsystems >>>> of functional and anatomical data. The functional data is 4D, which means >>>> ALS orientation. The anatomical is MNI, so RAS orientation. The plotting >>>> works fine, if I use a mri file which was converted in field trip (V2.mri) >>>> and therefore is also in ALS orientation. However, the anatomy doesn’t look >>>> very pretty… >>>> >>>> >>>> Is there any way that I can transform the functional data to RAS >>>> orientation or the anatomical data to ALS orientation, respectively? >>>> >>>> >>>> I tried with ft_volumerealign. However, since the template file has no >>>> fiducials, it is hard to really precisely do this. >>>> >>>> >>>> Fair point. I would however do it the other way around, using the V2 to >>>> get the transformation from voxel space to MNI-RAS, and then use the >>>> inverse of the transformation on the functional data: in this case you >>>> could use ft_volumenormalise, with cfg.nonlinear = ‘no’. Alternatively, if >>>> you are using this procedure: >>>> http://www.fieldtriptoolbox.org/tutorial/sourcemodel#subject-specific_grids_that_are_equivalent_across_subjects_in_normalized_space, >>>> you could directly replace the source.pos of your functional data with the >>>> template.pos and then do the interpolation. >>>> >>>> To summarize: >>>> >>>> either: >>>> >>>> mri = ft_read_mri(‘V2.mri’); >>>> mri.coordsys = ‘bti’; >>>> >>>> cfg = []; >>>> cfg.nonlinear=’no’; >>>> mrin = ft_volumenormalise(cfg, mri); >>>> >>>> transform_vox2bti = mri.transform; >>>> transform_vox2spm = mrin.transform; >>>> transform_bti2spm = transform_vox2spm/transform_vox2bti >>>> source = ft_transform_geometry(transform_bti2spm, source); >>>> >>>> source_int = ft_sourceinterpolate(somecfg, source, niceanatomical); >>>> >>>> or: >>>> >>>> source.pos = templat.pos; >>>> source_int = ft_sourceinterpolate(somecfg, source, niceanatomical); >>>> >>>> Best, >>>> JM >>>> >>>> >>>> >>>> Any input on how to plot the sources on one of these nice anatomical >>>> files is highly appreciated! >>>> >>>> Thanks and best regards, >>>> >>>> Andreas >>>> >>>> >>>> -- >>>> Dipl.-Psych. Andreas Sauer >>>> Max Planck Institute for Brain Research >>>> Deutschordenstraße 46 >>>> 60528 Frankfurt am Main >>>> Germany >>>> >>>> T: +49 69 96769 278 >>>> F: +49 69 96769 327 >>>> Email: sauer.mpih at gmail.com >>>> www.brain.mpg.de >>>> _______________________________________________ >>>> fieldtrip mailing list >>>> fieldtrip at donders.ru.nl >>>> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip >>>> >>>> >>>> >>>> _______________________________________________ >>>> fieldtrip mailing list >>>> fieldtrip at donders.ru.nl >>>> https://mailman.science.ru.nl/mailman/listinfo/fieldtrip >>>> >>> >>> >>> >>> -- >>> Dipl.-Psych. Andreas Sauer >>> Max Planck Institute for Brain Research >>> Deutschordenstraße 46 >>> 60528 Frankfurt am Main >>> Germany >>> >>> T: +49 69 96769 278 >>> F: +49 69 96769 327 >>> Email: sauer.mpih at gmail.com >>> www.brain.mpg.de >>> _______________________________________________ >>> fieldtrip mailing list >>> fieldtrip at donders.ru.nl >>> https://mailman.science.ru.nl/mailman/listinfo/fieldtrip >>> >>> >>> >>> >>> _______________________________________________ >>> fieldtrip mailing list >>> fieldtrip at donders.ru.nl >>> https://mailman.science.ru.nl/mailman/listinfo/fieldtrip >>> >> >> >> >> -- >> Dipl.-Psych. Andreas Sauer >> Max Planck Institute for Brain Research >> Deutschordenstraße 46 >> 60528 Frankfurt am Main >> Germany >> >> T: +49 69 96769 278 >> F: +49 69 96769 327 >> Email: sauer.mpih at gmail.com >> www.brain.mpg.de >> >> _______________________________________________ >> fieldtrip mailing list >> fieldtrip at donders.ru.nl >> https://mailman.science.ru.nl/mailman/listinfo/fieldtrip >> > > > > -- > Marc Recasens > > Tel.: +44 7845810006 > Tel.: +34 639241598 > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > https://mailman.science.ru.nl/mailman/listinfo/fieldtrip > -- Dipl.-Psych. Andreas Sauer Max Planck Institute for Brain Research Deutschordenstraße 46 60528 Frankfurt am Main Germany T: +49 69 96769 278 F: +49 69 96769 327 Email: sauer.mpih at gmail.com www.brain.mpg.de -------------- next part -------------- An HTML attachment was scrubbed... URL: From pgoodin at swin.edu.au Tue Jun 21 23:44:08 2016 From: pgoodin at swin.edu.au (Peter Goodin) Date: Tue, 21 Jun 2016 21:44:08 +0000 Subject: [FieldTrip] Compensation for maxfilter in source analysis? Message-ID: Hi list, Just wondering if there's a best practice for source analysis of neuromag maxfiltered data using fieldtrip? Does the lead field need to be normalised to compensate for the mags / grads? If yes, zscore? Smallest eigenvalues? Something else? Does the rank of the source analysis need to be reduced because of the lowered dimensionality of the data? As I used tsss and if it needs to be reduced, should I reduce based on individual eigenvalues (eg diagonal S from SVD) or a fixed value (~60)? Thanks and sorry for the barrage of questions. Peter -------------- next part -------------- An HTML attachment was scrubbed... URL: From pooneh.baniasad at gmail.com Wed Jun 22 08:02:43 2016 From: pooneh.baniasad at gmail.com (pooneh baniasad) Date: Wed, 22 Jun 2016 10:32:43 +0430 Subject: [FieldTrip] Generating EEG In-Reply-To: References: <18671af9961ed227b7f9057f368bd763@cam.ac.uk> Message-ID: ​Dear Pa​rham & Diego Thanks for your suggestions. 😊 On Mon, Jun 20, 2016 at 4:13 PM, Diego Lozano-Soldevilla < dlozanosoldevilla at gmail.com> wrote: > Hi Pouneh, > > Please find below some useful example scripts that you can adapt to your > needs: > > > http://www.fieldtriptoolbox.org/example/compute_forward_simulated_data_and_apply_a_dipole_fit > > http://www.fieldtriptoolbox.org/example/compute_forward_simulated_data_and_apply_a_beamformer_scan > http://www.fieldtriptoolbox.org/example/combineplanar_pipelineorder > > best, > > Diego > > > > On 20 June 2016 at 12:53, parham hashemzadeh wrote: > >> Hi Pooneh >> No it can not generate synthetic data. You will have to define either a >> set of dipoles or simply define a source function. You will then need to >> compute the forward problem (BEM) for the defined sources and the given >> head model. That will then become your raw Syhthetic data. >> After that, you will need to reconstruct using your generated data. >> Please note that in order to not commit the inverse error (also known as >> inverse crime), make sure that you reconstruct on a different mesh. >> best of luck >> parham hashemzadeh >> Senior Research Associate at the University of Cambridge, UK. >> >> On 2016-06-20 08:03, pooneh baniasad wrote: >> >>> Dear community, >>> >>> My name is Pouneh Baniasad and I am working on my master thesis in >>> Tehran University of Medical Sciences. I'm trying to generate EEG >>> signal without using any raw data. Actually I want to completely >>> simulating EEG. My question is can Fieldtrip simulate EEG signal? If >>> the answer is yes, what's the procedure? Is it using dipole model or >>> anything e-- >>> >>> Bests >>> >>> Pouneh Baniasad >>> _______________________________________________ >>> fieldtrip mailing list >>> fieldtrip at donders.ru.nl >>> https://mailman.science.ru.nl/mailman/listinfo/fieldtrip >>> >> >> -- >> best regards >> Parham Hashemzadeh >> Research Associate >> Department of Applied Mathematics and Theoretical Physics >> University of Cambridge, UK. >> email: hashemzadeh at damtp.cam.ac.uk >> _______________________________________________ >> fieldtrip mailing list >> fieldtrip at donders.ru.nl >> https://mailman.science.ru.nl/mailman/listinfo/fieldtrip >> > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > https://mailman.science.ru.nl/mailman/listinfo/fieldtrip > -- Bests Pouneh Baniasad -------------- next part -------------- An HTML attachment was scrubbed... URL: From carsten.wolters at uni-muenster.de Wed Jun 22 08:29:45 2016 From: carsten.wolters at uni-muenster.de (Carsten Wolters) Date: Wed, 22 Jun 2016 08:29:45 +0200 Subject: [FieldTrip] Early Stage Researcher position available in EU-ITN project ChildBrain In-Reply-To: <79D7BF5F-97B6-436B-AA7C-1801AF32F7A1@donders.ru.nl> References: <79D7BF5F-97B6-436B-AA7C-1801AF32F7A1@donders.ru.nl> Message-ID: <331808D9-7527-485B-A8EF-91A9218B1AAC@uni-muenster.de> Early Stage Researcher (ESR) / Doctoral Student Neuroscientist with focus on the EEG/MEG inverse problem (project ESR14) The medical faculty of the University of Münster, Germany, invites applications for an Early Stage Researcher (ESR) / Doctoral Student Ref. 11298 Start is 01.07.2016 for a full-time fixed-term position beginning as soon as possible with funding for 26 months with a possible extension to work on the Electroencephalography (EEG) and Magnetoencephalography (MEG) inverse problem in realistic children head volume conductor models within the ChildBrain consortium (“Advancing brain research in children’s developmental neurocognitive disorders”). ChildBrain is part of the Marie Skłodowska-Curie Actions (MSCA) Innovative Training Networks (ITN). More detailed informations about the ChildBrain project, the ChildBrain consortium and especially more informations for this position, namely the ESR14 project, can be found on www.childbrain.eu . The ESR is expected to pursue a PhD degree at WWU Münster, either the Dr.rer.nat. at the Faculty of Mathematics and Computer Science or the Dr.rer.medic. (see http://campus.uni-muenster.de/395.html?&L=1 ) at the Faculty of Medicine. Therefore, prerequisite for the candidate is a Master’s degree in a relevant academic area such as applied mathematics, computer science, physics, biomedical or electrical engineering or similar disciplines. Good programming expertise in Matlab and/or C++ and experience with the Linux operating system is expected, because large software toolboxes are used and further developed. The working language is English. The applicant’s merits are assessed on the basis of the quality of Master’s level studies and thesis, previous experience with numerical mathematics, inverse problems, software development, motivation and research interests. The location for this research will mainly be the workgroups “SIM-NEURO: Stimulation, Imaging and Modeling of NEUROnal networks” of PD Dr. Wolters at the Institute for Biomagnetism and Biosignalanalysis (IBB) and “Imaging” of Prof. Dr. Martin Burger at the Institute for Computational and Applied Mathematics, both at the University of Münster in Germany. Expected close collaborations and visits are to the partnering institutes, namely Aston University in England, the KU Leuven and Icometrix in Leuven, Belgium. The salary, based on the Marie Curie Program regulations, is competitive and consists of living and mobility allowance and a possible family allowance. Note that we can only hire ESR’s, who are in the first four years of his/her research career and do not have a doctoral degree. Furthermore, they should not have resided in Germany for more than 12 months in the 3 years immediately prior to the recruitment date and not have carried out their main activity (work, studies, etc.) in Germany. Appointee is subject to a six-months trial period. The application should include a statement of research interests and reasons for applying to the ESR14 project, a curriculum vitae (max. 5 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 until 29.6.2016, please send the above documents as pdfs to PD Dr.rer.nat. Carsten Wolters, Institute for Biomagnetism and Biosignalanalysis, University of Münster, Malmedyweg 15, 48149 Münster, Germany, or by Email to carstenDOTwoltersATuni-muensterDOTde. For additional information please see the ChildBrain website (www.childbrain.eu ) or contact PD Dr. Carsten Wolters (Email: carstenDOTwoltersATuni-muensterDOTde, Phone: +49 (0)251 / 83-56904). Applications of women are specifically invited. In the case of similar qualifications, competence, and specific achievements, women will be considered on preferential terms within the framework of the legal possibilities. Handicapped candidates with equivalent qualifications will be given preference. Official link of the position: http://klinikum.uni-muenster.de/index.php?id=3290&tx_ttnews%5Btt_news%5D=6277&cHash=cc9fda89011a31171278368cedc4ec4c -------------- next part -------------- An HTML attachment was scrubbed... URL: From seymourr at aston.ac.uk Wed Jun 22 12:06:17 2016 From: seymourr at aston.ac.uk (Seymour, Robert (Research Student)) Date: Wed, 22 Jun 2016 10:06:17 +0000 Subject: [FieldTrip] trigger info Message-ID: Hi Carine, During my pipeline I downsample before ICA, however the trigger information is left intact. Maybe if you attach your ICA code we could help... Robert Seymour (PhD Student, Aston Brain Centre) -------------- next part -------------- An HTML attachment was scrubbed... URL: From carine.signoret at liu.se Wed Jun 22 12:39:29 2016 From: carine.signoret at liu.se (Carine Signoret) Date: Wed, 22 Jun 2016 12:39:29 +0200 Subject: [FieldTrip] trigger info In-Reply-To: References: Message-ID: Hi Robert, Thank you so much for your reply! In my preprocessing steps, I select the MEG electrodes only, so I loose the trigger information (that is the STI101 channel). So it is not due to downsample but to the fact that I suppressed the channel myself (I still have the info for the triggers I have selected during the preprocessing step -trialinfo-, BUT NOT for the other following triggers that should appear in the segments)... However, if I keep all channels, I wonder that since the trigger channel send a pulse signal at 250Hz, if I downsample below this value (e.g. 150Hz), will I loose the pulse signal? That was my question. What do you think? Best regards, Carine Le 2016-06-22 à 12:06, Seymour, Robert (Research Student) a écrit : > > Hi Carine, > > During my pipeline I downsample before ICA, however the trigger > information is left intact. Maybe if you attach your ICA code we could > help… > > Robert Seymour (PhD Student, Aston Brain Centre) > > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > https://mailman.science.ru.nl/mailman/listinfo/fieldtrip -------------- next part -------------- An HTML attachment was scrubbed... URL: From tiany20032003 at 163.com Wed Jun 22 20:23:52 2016 From: tiany20032003 at 163.com (ty) Date: Thu, 23 Jun 2016 02:23:52 +0800 (CST) Subject: [FieldTrip] Through a Glass, Darkly: the Influence of the EEG Reference on Inference about Brain Function and Disorders Message-ID: <2d4bc578.157.155795aaa74.Coremail.tiany20032003@163.com> Dear all, Since its discovery, the human electroencephalogram (EEG) has proven itself an indispensable tool for brain research. Despite this success story, there is a fundamental technical issue that has yet to be resolved: the selection of the correct EEG reference. Ideally one would like to measure neural activity restricted to certain brain regions. Since EEG amplifiers measure potential difference between the activities recorded by two electrodes, in addition to the active electrode, one must employ a reference electrode which should ideally be at zero. In theory, this might be achieved by placing the reference at a point infinitely far away. Yet the “infinite reference”, in practice, is an antenna for ambient noise which would preempt brain measurements—for example cephalic references that minimize unwanted signal pickup. Examples of such references are the unilateral-mastoid, ear, linked mastoids or ears, vertex, the tip of the nose, neck ring, etc. Unfortunately all such references are doomed to fail since there is no point on the scalp or body surface where the potential is actually zero or a constant. This has serious consequences since the non-neutral reference may itself reflect physiological dynamic processes that will be inevitably embedded into all EEG recordings. Without solving the reference issue we are looking at brain activity, as it were, “through a glass, darkly”. Recent attempts to make this “glass” more transparent have been based on mathematically constructing a reference based on physical principles and subtracting it from all EEG recordings. The best known example is the average reference (AVE). Originally proposed with an analog implementation, it was heuristically espoused by Lehman (1971) and later theoretically justified since the average of a dipole potential over a spherical surface is zero. Consequently, the AVE might be a good choice when a dense and whole brain coverage of an EEG montage is available, which explains why it is widely accepted. Nevertheless, AVE has poor performance with a lower number of electrodes. An alternative is the Reference Electrode Standardization Technique (REST) which used a re-referencing method to reconstruct the desired zero or neutral reference, based on the fact that the underlying neural sources are the same no matter what a reference is actually adopted. This Research Topic will encourage the objective comparison of the effect that various EEG references may have on inference about brain function and disorders—with respect to both physical and computational issues. The crucial point is to determine the reference that best identifies neural activity and therefore be the basis of improved estimates of various linear and non-linear EEG features. These include spectra, amplitude, latency, coherence/correlation, network, symmetry/asymmetry, fractal dimension, complexity, covariance and related statistical tests. If a single reference can be finally recognized universally as the optimal one for general use, we will have indeed rendered the “glass less opaque” and thus “know in part” more about brain function. To contribute to this end, we welcome our colleagues to submit paper with theoretical work, simulation studies, practical experimental data analysis as well as critical reviews. Important Note: All submissions/contributions to this Research Topic must be in line with the scope of the journal and section they are submitted to. While authors are encouraged to draw from other disciplines to enrich their papers where relevant, they must ensure papers fall within the section, as expressed in its Scope. Keywords: EEG, reference, ERPs Detailed information can be found at: http://journal.frontiersin.org/researchtopic/4932/ With best wishes, --------------- Yin Tian, PhD Associate Professor Biomedical engineering department ChongQing University of Posts and Telecommunications, China, 400065 -------------- next part -------------- An HTML attachment was scrubbed... URL: From Elana.Harris at cchmc.org Thu Jun 23 06:19:15 2016 From: Elana.Harris at cchmc.org (Harris, Elana) Date: Thu, 23 Jun 2016 04:19:15 +0000 Subject: [FieldTrip] Through a Glass, Darkly: the Influence of the EEG Reference on Inference about Brain Function and Disorders In-Reply-To: <2d4bc578.157.155795aaa74.Coremail.tiany20032003@163.com> References: <2d4bc578.157.155795aaa74.Coremail.tiany20032003@163.com> Message-ID: Thank you for sharing this Dr. Tian. What would be considered a "lower number of electrodes" that would make the average reference perform poorly? ________________________________ From: fieldtrip-bounces at science.ru.nl [fieldtrip-bounces at science.ru.nl] on behalf of ty [tiany20032003 at 163.com] Sent: Wednesday, June 22, 2016 2:23 PM To: fieldtrip at science.ru.nl Subject: [FieldTrip] Through a Glass, Darkly: the Influence of the EEG Reference on Inference about Brain Function and Disorders Dear all, Since its discovery, the human electroencephalogram (EEG) has proven itself an indispensable tool for brain research. Despite this success story, there is a fundamental technical issue that has yet to be resolved: the selection of the correct EEG reference. Ideally one would like to measure neural activity restricted to certain brain regions. Since EEG amplifiers measure potential difference between the activities recorded by two electrodes, in addition to the active electrode, one must employ a reference electrode which should ideally be at zero. In theory, this might be achieved by placing the reference at a point infinitely far away. Yet the “infinite reference”, in practice, is an antenna for ambient noise which would preempt brain measurements—for example cephalic references that minimize unwanted signal pickup. Examples of such references are the unilateral-mastoid, ear, linked mastoids or ears, vertex, the tip of the nose, neck ring, etc. Unfortunately all such references are doomed to fail since there is no point on the scalp or body surface where the potential is actually zero or a constant. This has serious consequences since the non-neutral reference may itself reflect physiological dynamic processes that will be inevitably embedded into all EEG recordings. Without solving the reference issue we are looking at brain activity, as it were, “through a glass, darkly”. Recent attempts to make this “glass” more transparent have been based on mathematically constructing a reference based on physical principles and subtracting it from all EEG recordings. The best known example is the average reference (AVE). Originally proposed with an analog implementation, it was heuristically espoused by Lehman (1971) and later theoretically justified since the average of a dipole potential over a spherical surface is zero. Consequently, the AVE might be a good choice when a dense and whole brain coverage of an EEG montage is available, which explains why it is widely accepted. Nevertheless, AVE has poor performance with a lower number of electrodes. An alternative is the Reference Electrode Standardization Technique (REST) which used a re-referencing method to reconstruct the desired zero or neutral reference, based on the fact that the underlying neural sources are the same no matter what a reference is actually adopted. This Research Topic will encourage the objective comparison of the effect that various EEG references may have on inference about brain function and disorders—with respect to both physical and computational issues. The crucial point is to determine the reference that best identifies neural activity and therefore be the basis of improved estimates of various linear and non-linear EEG features. These include spectra, amplitude, latency, coherence/correlation, network, symmetry/asymmetry, fractal dimension, complexity, covariance and related statistical tests. If a single reference can be finally recognized universally as the optimal one for general use, we will have indeed rendered the “glass less opaque” and thus “know in part” more about brain function. To contribute to this end, we welcome our colleagues to submit paper with theoretical work, simulation studies, practical experimental data analysis as well as critical reviews. Important Note: All submissions/contributions to this Research Topic must be in line with the scope of the journal and section they are submitted to. While authors are encouraged to draw from other disciplines to enrich their papers where relevant, they must ensure papers fall within the section, as expressed in its Scope. Keywords: EEG, reference, ERPs Detailed information can be found at: http://journal.frontiersin.org/researchtopic/4932/ With best wishes, --------------- Yin Tian, PhD Associate Professor Biomedical engineering department ChongQing University of Posts and Telecommunications, China, 400065 -------------- next part -------------- An HTML attachment was scrubbed... URL: From matthias.duempelmann at uniklinik-freiburg.de Thu Jun 23 09:34:02 2016 From: matthias.duempelmann at uniklinik-freiburg.de (=?iso-8859-1?Q?Dr=2E-Ing=2E_Matthias_D=FCmpelmann?=) Date: Thu, 23 Jun 2016 07:34:02 +0000 Subject: [FieldTrip] Seizure localization problems Message-ID: Dear colleagues, we are trying to evaluate systematically the localization of rhythmic activity at the onset of epileptic seizures in patients, who are subsequently evaluated with intracranial recordings. We are trying to use DICS but quite often receive results, which are obviously wrong. In the attached screenshots you can see the peace of EEG, which is evaluated and the localization result with a maximum in the cerebellum. This a typical localization for the cases with obvious miss localizations. A further seizure with a similar EEG pattern was localized in the right temporal lobe, which matches the EEG pattern and also the intracranial findings. Head model is generated with ASA, also the electrodes file is in the ASA format. The geometrical match of source points, head model and electrodes is checked using ft_plot_.... methods. Here is the code sniplet relevant for the localization algorithm: % Analysis frequency SourceFrequency = 4.0 % read eeg, electrodes and volume conductor model %[dat] = ft_read_data(filename); hdr = ft_read_header(filename); elec = ft_read_sens(elecfile, 'fileformat','asa_elc'); headmodel = ft_read_vol(volumefilename,'fileformat','asa_vol'); mri = ft_read_mri(mrifilename, 'fileformat','asa_mri'); % eeg data preprocessing cfgeeg.dataset = filename; cfgeeg.continuous = 'yes' cfg.covariance = 'yes'; cfg.covariancewindow = 'all'; cfg.demean = 'yes' [data] = ft_preprocessing(cfgeeg); % Freqanalysis for beamformer cfg = []; cfg.channel = {'*'}; cfg.method = 'mtmfft'; cfg.foilim = [1 100]; cfg.tapsmofrq = 4; cfg.taper = 'hanning'; cfg.output = 'powandcsd'; % for common filter over conditions powcsd_all = ft_freqanalysis(cfg, data); % Create leadfield grid cfg = []; cfg.channel = elec.label; cfg.elec = elec; cfg.headmodel = headmodel; cfg.dics.reducerank = 3; % default for MEG is 2, for EEG is 3 cfg.grid.resolution = 0.5; % use a 3-D grid with a 0.5 cm resolution cfg.grid.unit = 'cm'; cfg.grid.tight = 'yes'; [grid] = ft_prepare_leadfield(cfg); % source analysis cfg = []; cfg.channel = elec.label; cfg.method = 'dics'; cfg.frequency = SourceFrequency; cfg.grid = grid; cfg.headmodel = headmodel; cfg.elec = elec; cfg.senstype = 'EEG'; cfg.dics.keepfilter = 'yes'; % We wish to use the calculated filter later on cfg.dics.projectnoise = 'yes'; cfg.dics.lambda = '0.3%'; source_raw = ft_sourceanalysis(cfg, powcsd_all); I played with a couple of parameters like cfg.dics.lambda, but without success. Do you have ideas how to improve our localization results ? Thank you, Matthias UNIVERSITÄTSKLINIKUM FREIBURG Epileptologie Breisacher Str. 64 · 79106 Freiburg Telefon: +49 761 270-52410 matthias.duempelmann at uniklinik-freiburg.de www.uniklinik-freiburg.de -------------- next part -------------- A non-text attachment was scrubbed... Name: analysisinterval_Seizure2.png Type: image/png Size: 110002 bytes Desc: analysisinterval_Seizure2.png URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: localizationresults.png Type: image/png Size: 589001 bytes Desc: localizationresults.png URL: From azeez.adebimpe5 at gmail.com Thu Jun 23 11:07:36 2016 From: azeez.adebimpe5 at gmail.com (Azeez Adebimpe) Date: Thu, 23 Jun 2016 11:07:36 +0200 Subject: [FieldTrip] Seizure localization problems In-Reply-To: References: Message-ID: Hi Mathias, I will suggest you try other method like eLORETA or MNE first and compare the result. Best, AZ On Thu, Jun 23, 2016 at 9:34 AM, Dr.-Ing. Matthias Dümpelmann < matthias.duempelmann at uniklinik-freiburg.de> wrote: > Dear colleagues, > > we are trying to evaluate systematically the localization of rhythmic > activity at the onset of epileptic seizures in patients, who are > subsequently evaluated with intracranial recordings. > > We are trying to use DICS but quite often receive results, which are > obviously wrong. In the attached screenshots you can see the peace of EEG, > which is evaluated and the localization result with a maximum in the > cerebellum. > > This a typical localization for the cases with obvious miss localizations. > A further seizure with a similar EEG pattern was localized in the right > temporal lobe, which matches the EEG pattern and also the intracranial > findings. > > Head model is generated with ASA, also the electrodes file is in the ASA > format. The geometrical match of source points, head model and electrodes > is checked using ft_plot_.... methods. > > Here is the code sniplet relevant for the localization algorithm: > > % Analysis frequency > SourceFrequency = 4.0 > > % read eeg, electrodes and volume conductor model > %[dat] = ft_read_data(filename); > hdr = ft_read_header(filename); > elec = ft_read_sens(elecfile, 'fileformat','asa_elc'); > headmodel = ft_read_vol(volumefilename,'fileformat','asa_vol'); > mri = ft_read_mri(mrifilename, 'fileformat','asa_mri'); > > % eeg data preprocessing > cfgeeg.dataset = filename; > cfgeeg.continuous = 'yes' > cfg.covariance = 'yes'; > cfg.covariancewindow = 'all'; > cfg.demean = 'yes' > > [data] = ft_preprocessing(cfgeeg); > > % Freqanalysis for beamformer > cfg = []; > cfg.channel = {'*'}; > cfg.method = 'mtmfft'; > cfg.foilim = [1 100]; > cfg.tapsmofrq = 4; > cfg.taper = 'hanning'; > cfg.output = 'powandcsd'; > > > % for common filter over conditions > powcsd_all = ft_freqanalysis(cfg, data); > > % Create leadfield grid > cfg = []; > cfg.channel = elec.label; > cfg.elec = elec; > cfg.headmodel = headmodel; > cfg.dics.reducerank = 3; % default for MEG is 2, for EEG is 3 > cfg.grid.resolution = 0.5; % use a 3-D grid with a 0.5 cm resolution > cfg.grid.unit = 'cm'; > cfg.grid.tight = 'yes'; > [grid] = ft_prepare_leadfield(cfg); > > % source analysis > cfg = []; > cfg.channel = elec.label; > cfg.method = 'dics'; > cfg.frequency = SourceFrequency; > cfg.grid = grid; > cfg.headmodel = headmodel; > cfg.elec = elec; > cfg.senstype = 'EEG'; > cfg.dics.keepfilter = 'yes'; % We wish to use the calculated filter > later on > cfg.dics.projectnoise = 'yes'; > cfg.dics.lambda = '0.3%'; > source_raw = ft_sourceanalysis(cfg, powcsd_all); > > > I played with a couple of parameters like cfg.dics.lambda, but without > success. > > Do you have ideas how to improve our localization results ? > > Thank you, > > Matthias > > > > UNIVERSITÄTSKLINIKUM FREIBURG > Epileptologie > Breisacher Str. 64 · 79106 Freiburg > Telefon: +49 761 270-52410 > matthias.duempelmann at uniklinik-freiburg.de > > www.uniklinik-freiburg.de > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > https://mailman.science.ru.nl/mailman/listinfo/fieldtrip > -------------- next part -------------- An HTML attachment was scrubbed... URL: From matthias.duempelmann at uniklinik-freiburg.de Thu Jun 23 14:51:56 2016 From: matthias.duempelmann at uniklinik-freiburg.de (=?utf-8?B?RHIuLUluZy4gTWF0dGhpYXMgRMO8bXBlbG1hbm4=?=) Date: Thu, 23 Jun 2016 12:51:56 +0000 Subject: [FieldTrip] Seizure localization problems In-Reply-To: References: Message-ID: <67d7de139b0440bfad130b5479155478@UKL-EX02.ad.uniklinik-freiburg.de> Dear Azeez, thank you for your suggestion. Just exchanging cfg.method = 'dics'; to cfg.method = 'eloreta'; resulted in a reasonable solution (see attachment). I also get useful results using MUIC or sLORETA in the frequency domain as the methods are implemented in ASA. This makes me even more suspicious, what is going wrong with the DICS algorithm. Best regards, Matthias Von: fieldtrip-bounces at science.ru.nl [mailto:fieldtrip-bounces at science.ru.nl] Im Auftrag von Azeez Adebimpe Gesendet: Thursday, June 23, 2016 11:08 AM An: FieldTrip discussion list Cc: Nino Epitashvili Betreff: Re: [FieldTrip] Seizure localization problems Hi Mathias, I will suggest you try other method like eLORETA or MNE first and compare the result. Best, AZ On Thu, Jun 23, 2016 at 9:34 AM, Dr.-Ing. Matthias Dümpelmann > wrote: Dear colleagues, we are trying to evaluate systematically the localization of rhythmic activity at the onset of epileptic seizures in patients, who are subsequently evaluated with intracranial recordings. We are trying to use DICS but quite often receive results, which are obviously wrong. In the attached screenshots you can see the peace of EEG, which is evaluated and the localization result with a maximum in the cerebellum. This a typical localization for the cases with obvious miss localizations. A further seizure with a similar EEG pattern was localized in the right temporal lobe, which matches the EEG pattern and also the intracranial findings. Head model is generated with ASA, also the electrodes file is in the ASA format. The geometrical match of source points, head model and electrodes is checked using ft_plot_.... methods. Here is the code sniplet relevant for the localization algorithm: % Analysis frequency SourceFrequency = 4.0 % read eeg, electrodes and volume conductor model %[dat] = ft_read_data(filename); hdr = ft_read_header(filename); elec = ft_read_sens(elecfile, 'fileformat','asa_elc'); headmodel = ft_read_vol(volumefilename,'fileformat','asa_vol'); mri = ft_read_mri(mrifilename, 'fileformat','asa_mri'); % eeg data preprocessing cfgeeg.dataset = filename; cfgeeg.continuous = 'yes' cfg.covariance = 'yes'; cfg.covariancewindow = 'all'; cfg.demean = 'yes' [data] = ft_preprocessing(cfgeeg); % Freqanalysis for beamformer cfg = []; cfg.channel = {'*'}; cfg.method = 'mtmfft'; cfg.foilim = [1 100]; cfg.tapsmofrq = 4; cfg.taper = 'hanning'; cfg.output = 'powandcsd'; % for common filter over conditions powcsd_all = ft_freqanalysis(cfg, data); % Create leadfield grid cfg = []; cfg.channel = elec.label; cfg.elec = elec; cfg.headmodel = headmodel; cfg.dics.reducerank = 3; % default for MEG is 2, for EEG is 3 cfg.grid.resolution = 0.5; % use a 3-D grid with a 0.5 cm resolution cfg.grid.unit = 'cm'; cfg.grid.tight = 'yes'; [grid] = ft_prepare_leadfield(cfg); % source analysis cfg = []; cfg.channel = elec.label; cfg.method = 'dics'; cfg.frequency = SourceFrequency; cfg.grid = grid; cfg.headmodel = headmodel; cfg.elec = elec; cfg.senstype = 'EEG'; cfg.dics.keepfilter = 'yes'; % We wish to use the calculated filter later on cfg.dics.projectnoise = 'yes'; cfg.dics.lambda = '0.3%'; source_raw = ft_sourceanalysis(cfg, powcsd_all); I played with a couple of parameters like cfg.dics.lambda, but without success. Do you have ideas how to improve our localization results ? Thank you, Matthias UNIVERSITÄTSKLINIKUM FREIBURG Epileptologie Breisacher Str. 64 · 79106 Freiburg Telefon: +49 761 270-52410 matthias.duempelmann at uniklinik-freiburg.de www.uniklinik-freiburg.de _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl https://mailman.science.ru.nl/mailman/listinfo/fieldtrip -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: eloreta.png Type: image/png Size: 193038 bytes Desc: eloreta.png URL: From azeez.adebimpe5 at gmail.com Thu Jun 23 15:57:15 2016 From: azeez.adebimpe5 at gmail.com (Azeez Adebimpe) Date: Thu, 23 Jun 2016 15:57:15 +0200 Subject: [FieldTrip] Seizure localization problems In-Reply-To: <67d7de139b0440bfad130b5479155478@UKL-EX02.ad.uniklinik-freiburg.de> References: <67d7de139b0440bfad130b5479155478@UKL-EX02.ad.uniklinik-freiburg.de> Message-ID: Hi Mathias, DICS and LCMV can also give reasonable result but require some normalization. Try to estimate to neural activity index as explained in this tutorial. http://www.fieldtriptoolbox.org/tutorial/beamformer Best, Az On Thu, Jun 23, 2016 at 2:51 PM, Dr.-Ing. Matthias Dümpelmann < matthias.duempelmann at uniklinik-freiburg.de> wrote: > Dear Azeez, > > > > thank you for your suggestion. > > > > Just exchanging > > > > cfg.method = 'dics'; > > > > to > > > > cfg.method = 'eloreta'; > > > > resulted in a reasonable solution (see attachment). > > > > I also get useful results using MUIC or sLORETA in the frequency domain as > the methods are implemented in ASA. > > > > This makes me even more suspicious, what is going wrong with the DICS > algorithm. > > > > Best regards, > > > > Matthias > > > > > > > > *Von:* fieldtrip-bounces at science.ru.nl [mailto: > fieldtrip-bounces at science.ru.nl] *Im Auftrag von *Azeez Adebimpe > *Gesendet:* Thursday, June 23, 2016 11:08 AM > *An:* FieldTrip discussion list > *Cc:* Nino Epitashvili > *Betreff:* Re: [FieldTrip] Seizure localization problems > > > > Hi Mathias, > > I will suggest you try other method like eLORETA or MNE first and compare > the result. > > > > Best, > > > > AZ > > > > On Thu, Jun 23, 2016 at 9:34 AM, Dr.-Ing. Matthias Dümpelmann < > matthias.duempelmann at uniklinik-freiburg.de> wrote: > > Dear colleagues, > > we are trying to evaluate systematically the localization of rhythmic > activity at the onset of epileptic seizures in patients, who are > subsequently evaluated with intracranial recordings. > > We are trying to use DICS but quite often receive results, which are > obviously wrong. In the attached screenshots you can see the peace of EEG, > which is evaluated and the localization result with a maximum in the > cerebellum. > > This a typical localization for the cases with obvious miss localizations. > A further seizure with a similar EEG pattern was localized in the right > temporal lobe, which matches the EEG pattern and also the intracranial > findings. > > Head model is generated with ASA, also the electrodes file is in the ASA > format. The geometrical match of source points, head model and electrodes > is checked using ft_plot_.... methods. > > Here is the code sniplet relevant for the localization algorithm: > > % Analysis frequency > SourceFrequency = 4.0 > > % read eeg, electrodes and volume conductor model > %[dat] = ft_read_data(filename); > hdr = ft_read_header(filename); > elec = ft_read_sens(elecfile, 'fileformat','asa_elc'); > headmodel = ft_read_vol(volumefilename,'fileformat','asa_vol'); > mri = ft_read_mri(mrifilename, 'fileformat','asa_mri'); > > % eeg data preprocessing > cfgeeg.dataset = filename; > cfgeeg.continuous = 'yes' > cfg.covariance = 'yes'; > cfg.covariancewindow = 'all'; > cfg.demean = 'yes' > > [data] = ft_preprocessing(cfgeeg); > > % Freqanalysis for beamformer > cfg = []; > cfg.channel = {'*'}; > cfg.method = 'mtmfft'; > cfg.foilim = [1 100]; > cfg.tapsmofrq = 4; > cfg.taper = 'hanning'; > cfg.output = 'powandcsd'; > > > % for common filter over conditions > powcsd_all = ft_freqanalysis(cfg, data); > > % Create leadfield grid > cfg = []; > cfg.channel = elec.label; > cfg.elec = elec; > cfg.headmodel = headmodel; > cfg.dics.reducerank = 3; % default for MEG is 2, for EEG is 3 > cfg.grid.resolution = 0.5; % use a 3-D grid with a 0.5 cm resolution > cfg.grid.unit = 'cm'; > cfg.grid.tight = 'yes'; > [grid] = ft_prepare_leadfield(cfg); > > % source analysis > cfg = []; > cfg.channel = elec.label; > cfg.method = 'dics'; > cfg.frequency = SourceFrequency; > cfg.grid = grid; > cfg.headmodel = headmodel; > cfg.elec = elec; > cfg.senstype = 'EEG'; > cfg.dics.keepfilter = 'yes'; % We wish to use the calculated filter > later on > cfg.dics.projectnoise = 'yes'; > cfg.dics.lambda = '0.3%'; > source_raw = ft_sourceanalysis(cfg, powcsd_all); > > > I played with a couple of parameters like cfg.dics.lambda, but without > success. > > Do you have ideas how to improve our localization results ? > > Thank you, > > Matthias > > > > UNIVERSITÄTSKLINIKUM FREIBURG > Epileptologie > Breisacher Str. 64 · 79106 Freiburg > Telefon: +49 761 270-52410 > matthias.duempelmann at uniklinik-freiburg.de > > www.uniklinik-freiburg.de > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > https://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > https://mailman.science.ru.nl/mailman/listinfo/fieldtrip > -------------- next part -------------- An HTML attachment was scrubbed... URL: From rene.scheeringa at donders.ru.nl Thu Jun 23 17:21:54 2016 From: rene.scheeringa at donders.ru.nl (=?iso-8859-1?B?U2NoZWVyaW5nYSwgUi4gKFJlbukp?=) Date: Thu, 23 Jun 2016 15:21:54 +0000 Subject: [FieldTrip] error in ft_mvaranalysis Message-ID: <0317032ABCAD99429A3D6296AD31B42037CF174E@exprd04.hosting.ru.nl> Dear fellow FieldTrippers, I am planning to do granger causality analysis on human ECoG data. For this I need to first run ft_mvaranalysis (http://www.fieldtriptoolbox.org/tutorial/connectivity). However when I do this I get an error message that the variable 'dof' variable or function is missing, so it seems like for some reason the degrees of freedom are not calculated. I wonder if there is something I am doing wrong inusing thsi function or if this is a potential bug. The data I am trying to analyse is human ECoG of a simple visual stimulation task in which I in first instance want to compare granger-causality in stimulation versus baseline periods. Visual stimulation takes place is 1 second long starting and t=0. Below I have included the the error message and the cconfiguration settings I used. The problem occurs with the latest version of Fieldtrip (June 22nd 2016), and does not depend on whether I specify the 'biosig' or 'bsmart' toolbox. The error occurs after FieldTrip indicates it is cumputing the AR-model and is starting the Best wishes, René Scheeringa Error message: Undefined function or variable 'dof'. Error in ft_mvaranalysis (line 515) mvardata.dof = dof; Configuration structure: cfg=[]; cfg.toolbox = 'biosig'; %bsmart'; cfg.mvarmethod = 2; cfg.order = 10; cfg.channelcmb = cell(3,2); cfg.channelcmb{1,1}='OcL05';cfg.channelcmb{1,2}='OcL07'; cfg.channelcmb{2,1}='OcL05';cfg.channelcmb{2,2}='OcL13'; cfg.channelcmb{3,1}='OcL07';cfg.channelcmb{3,2}='OcL13'; cfg.keeptrials = 'no'; %'yes'; cfg.jackknife = 'no'; % (default) or 'yes' cfg.zscore = 'yes'; %'no' (default) cfg.demean = 'yes'; %'yes' (default) or 'no' cfg.ems = 'no'; %no' (default) or 'yes' explicit removal ensemble mean cfg.t_ftimwin = 0.8; %the width of the sliding window on which the coefficients are estimated cfg.toi = [-0.4 0.6]; %[t1 t2 ... tx] the time points at which the windows are centered mvardata = ft_mvaranalysis(cfg, data_in); -------------- next part -------------- An HTML attachment was scrubbed... URL: From matthias.duempelmann at uniklinik-freiburg.de Fri Jun 24 08:58:15 2016 From: matthias.duempelmann at uniklinik-freiburg.de (=?utf-8?B?RHIuLUluZy4gTWF0dGhpYXMgRMO8bXBlbG1hbm4=?=) Date: Fri, 24 Jun 2016 06:58:15 +0000 Subject: [FieldTrip] Seizure localization problems In-Reply-To: References: <67d7de139b0440bfad130b5479155478@UKL-EX02.ad.uniklinik-freiburg.de> Message-ID: Dear Az, I defined now two intervals, one showing rhythmic seizure activity and one baseline interval prior to the seizure as you can see on the screenshot. Now it localizes as expected in the right temporal lobe. I only wonder about the very small “activation” volume. Thank you, Matthias Von: fieldtrip-bounces at science.ru.nl [mailto:fieldtrip-bounces at science.ru.nl] Im Auftrag von Azeez Adebimpe Gesendet: Thursday, June 23, 2016 3:57 PM An: FieldTrip discussion list Betreff: Re: [FieldTrip] Seizure localization problems Hi Mathias, DICS and LCMV can also give reasonable result but require some normalization. Try to estimate to neural activity index as explained in this tutorial. http://www.fieldtriptoolbox.org/tutorial/beamformer Best, Az On Thu, Jun 23, 2016 at 2:51 PM, Dr.-Ing. Matthias Dümpelmann > wrote: Dear Azeez, thank you for your suggestion. Just exchanging cfg.method = 'dics'; to cfg.method = 'eloreta'; resulted in a reasonable solution (see attachment). I also get useful results using MUIC or sLORETA in the frequency domain as the methods are implemented in ASA. This makes me even more suspicious, what is going wrong with the DICS algorithm. Best regards, Matthias Von: fieldtrip-bounces at science.ru.nl [mailto:fieldtrip-bounces at science.ru.nl] Im Auftrag von Azeez Adebimpe Gesendet: Thursday, June 23, 2016 11:08 AM An: FieldTrip discussion list Cc: Nino Epitashvili Betreff: Re: [FieldTrip] Seizure localization problems Hi Mathias, I will suggest you try other method like eLORETA or MNE first and compare the result. Best, AZ On Thu, Jun 23, 2016 at 9:34 AM, Dr.-Ing. Matthias Dümpelmann > wrote: Dear colleagues, we are trying to evaluate systematically the localization of rhythmic activity at the onset of epileptic seizures in patients, who are subsequently evaluated with intracranial recordings. We are trying to use DICS but quite often receive results, which are obviously wrong. In the attached screenshots you can see the peace of EEG, which is evaluated and the localization result with a maximum in the cerebellum. This a typical localization for the cases with obvious miss localizations. A further seizure with a similar EEG pattern was localized in the right temporal lobe, which matches the EEG pattern and also the intracranial findings. Head model is generated with ASA, also the electrodes file is in the ASA format. The geometrical match of source points, head model and electrodes is checked using ft_plot_.... methods. Here is the code sniplet relevant for the localization algorithm: % Analysis frequency SourceFrequency = 4.0 % read eeg, electrodes and volume conductor model %[dat] = ft_read_data(filename); hdr = ft_read_header(filename); elec = ft_read_sens(elecfile, 'fileformat','asa_elc'); headmodel = ft_read_vol(volumefilename,'fileformat','asa_vol'); mri = ft_read_mri(mrifilename, 'fileformat','asa_mri'); % eeg data preprocessing cfgeeg.dataset = filename; cfgeeg.continuous = 'yes' cfg.covariance = 'yes'; cfg.covariancewindow = 'all'; cfg.demean = 'yes' [data] = ft_preprocessing(cfgeeg); % Freqanalysis for beamformer cfg = []; cfg.channel = {'*'}; cfg.method = 'mtmfft'; cfg.foilim = [1 100]; cfg.tapsmofrq = 4; cfg.taper = 'hanning'; cfg.output = 'powandcsd'; % for common filter over conditions powcsd_all = ft_freqanalysis(cfg, data); % Create leadfield grid cfg = []; cfg.channel = elec.label; cfg.elec = elec; cfg.headmodel = headmodel; cfg.dics.reducerank = 3; % default for MEG is 2, for EEG is 3 cfg.grid.resolution = 0.5; % use a 3-D grid with a 0.5 cm resolution cfg.grid.unit = 'cm'; cfg.grid.tight = 'yes'; [grid] = ft_prepare_leadfield(cfg); % source analysis cfg = []; cfg.channel = elec.label; cfg.method = 'dics'; cfg.frequency = SourceFrequency; cfg.grid = grid; cfg.headmodel = headmodel; cfg.elec = elec; cfg.senstype = 'EEG'; cfg.dics.keepfilter = 'yes'; % We wish to use the calculated filter later on cfg.dics.projectnoise = 'yes'; cfg.dics.lambda = '0.3%'; source_raw = ft_sourceanalysis(cfg, powcsd_all); I played with a couple of parameters like cfg.dics.lambda, but without success. Do you have ideas how to improve our localization results ? Thank you, Matthias UNIVERSITÄTSKLINIKUM FREIBURG Epileptologie Breisacher Str. 64 · 79106 Freiburg Telefon: +49 761 270-52410 matthias.duempelmann at uniklinik-freiburg.de www.uniklinik-freiburg.de _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl https://mailman.science.ru.nl/mailman/listinfo/fieldtrip _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl https://mailman.science.ru.nl/mailman/listinfo/fieldtrip -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: DICS_wbasline.png Type: image/png Size: 565026 bytes Desc: DICS_wbasline.png URL: From joseluisblues at gmail.com Fri Jun 24 11:23:07 2016 From: joseluisblues at gmail.com (Jose) Date: Fri, 24 Jun 2016 11:23:07 +0200 Subject: [FieldTrip] running FT scripts in a supercomputing cluster In-Reply-To: References: Message-ID: Hello, So, finally it works, If never is useful for other persons in the future this is the detail of what I did: 1. copy the fieldtrip folder + data in my_cluster_directory 2. do scripts: -do my main matlab script (FT_0.m) this script do not contain neither the "addpath" nor "ft_defaults" command lines pay attention to use cd(getenv('PWD')) for moving through the temporary folders in the cluster -do a matlab script to compile my main script (compilation_script.m) ### addpath('my_cluster_directory/fieldtrip-20160317'); ft_defaults % define default functions addpath('my_cluster_directory/fieldtrip-20160317/external/ctf') % for CTF MEG data mcc('-mv', '-N', '-p', 'stats', '-p', 'images', '-p', 'signal', ... '-R', '-nodisplay', '-R', '-singleCompThread', ... 'FT_0.m'); ### -do bash script to run the compilation ### #!/bin/bash module load MATLAB/2013b matlab < compilation_script.m exit ### -run it ./run_compilation.sh 3. Once the compiled script is done, two files are generated FT_0 and run_FT_0.sh Next, I need to customize my job bash script as usual ### #!/bin/bash #PBS -N FT_JOSE_1 #PBS -o FT_JOSE_1.log #PBS -e FT_JOSE_1.err #PBS -q default #PBS -l walltime=2:00:00 #PBS -l nodes=1:ppn=1 #PBS -l vmem=10gb #PBS -m ae # Name of Mat file matFileName=FT_0 # directory where the execuatble and script can be found # PBS_O_WORKDIR variable points to the directory you are submitting from ORIGDIR=$PBS_O_WORKDIR WORKDIR=$VSC_SCRATCH_NODE/$PBS_JOBID DATADIR=/user/data/gent/gvo000/gvo00022/vsc41880/ echo Hostname: $(hostname) echo ORIGDIR: $ORIGDIR echo WORKDIR: $WORKDIR mkdir -p $WORKDIR cp -ar $ORIGDIR/run_FT_0.sh $WORKDIR/ cp -ar $ORIGDIR/FT_0 $WORKDIR/ cp -ar $ORIGDIR/1_data $WORKDIR/ cp -ar $ORIGDIR/2_processed_data $WORKDIR/ # version of MATLAB version=2013b # load modules module load cluster module load MATLAB/${version} # check the working directory if [ ! -d $WORKDIR ] then echo "Directory $dir is not a directory" exit 1 fi # enter the working directory cd $WORKDIR echo $WORKDIR # check the Mat file if [ ! -x $matFileName ] then echo "No executable $matFileName found." exit 2 fi # define the sh file script=run_${matFileName}.sh # check the sh file if [ ! -x $script ] then echo "No run script $script found" exit 3 fi # make cache dir # TMPDIR is set and created by torque. 1 unique dir per job cdir=$TMPDIR/mcrcache # check cache dir mkdir -p $cdir if [ ! -d $cdir ] then echo "No tempdir $cdir found." exit 1 fi # define dir export MCR_CACHE_ROOT=$cdir # 1GB cache (more then large enough) export MCR_CACHE_SIZE=$((1024*1024*1024)) # real running ./$script $EBROOTMATLAB cd $WORKDIR cp -r 2_processed_data $ORIGDIR/ cd rm -rf $WORKDIR # END ### 4. Next I run it: sub FT_0_bash.sh Many thanks to Anne! Jose On 16 June 2016 at 10:43, Anne Urai wrote: > Hi Jose, > > When calling mcc from Matlab, a dependency analysis is first carried out > (at least in more recent versions of Matlab) - basically, Matlab goes > through the script you're compiling and finds all the functions that are > called (which must be on the path). These are all added to the executable. > In principle, if all the folders you need are on the path (which should be > okay when you call ft_default), the executable can run. > > Now, only in the case when the dependency analysis doesn't recognize > certain functions (because they are, for example, generated through > str2func) you should add them manually. I found this out through trial and > error - I'd first try to compile using the bare bones > > mcc('-mv', '-N', '-R', '-nodisplay', '-R', '-singleCompThread', 'FT_0.m'); > > when you then run the executable, you'll get an error message if a > function or a toolbox is missing (and then you can add only those that you > need and compile again). > > In your FT_0.sh, you should indeed load the MCR - otherwise, the > executable can't run. For this, I'd recommend contacting the admin of the > supercomputer cluster, since the way I do it on the cluster here is > specific to the setup. You'll probably have to activate this in your > FT_0.sh yourself and add the path to the cache of each node (something > like export MCR_CACHE_ROOT=$TMPDIR). > > Good luck! > > — > Anne E. Urai, MSc > PhD student | Institut für Neurophysiologie und Pathophysiologie > Universitätsklinikum Hamburg-Eppendorf | Martinistrasse 52, 20246 | > Hamburg, Germany > www.anneurai.net / @AnneEUrai > > From: Jose > Reply: Jose > Date: 15 June 2016 at 19:14:43 > To: Anne Urai > Subject: Re: [FieldTrip] running FT scripts in a supercomputing cluster > > Hi Anne, > > Thanks for the detailed response, > I have a couple questions if I may, > > So, if I understand well I need to know a priori which functions I want to > use?. That's a bit strange, no? Because I don't know if any given function > depend of another one which I might not notice if don't inspect all the > scripts, > > The other thing is that I was trying to compile in the cluster, not > locally, but anyway I tried locally with something like this: > > % these paths will be added at compilation > addpath('/home/joseluis/Documents/Software/fieldtrip-20160317'); > ft_defaults, > addpath('/home/joseluis/Documents/Software/fieldtrip-20160317/qsub'); > addpath('/home/joseluis/Documents/Software/fieldtrip-20160317/fileio'); > > addpath('/home/joseluis/Documents/Software/fieldtrip-20160317/fileio/private'); > > % options: compile verbose, only use the toolboxes we really need > % !!! runtime options should be preceded by - to work! > % dont need to activate the -nojvm flag, can still plot from executable > > mcc('-mv', '-N', '-p', 'stats', '-p', 'images', '-p', 'signal', ... > '-R', '-nodisplay', '-R', '-singleCompThread', ... > '-a', > '/home/joseluis/Documents/Software/fieldtrip-20160317/fileio/ft_read_event.m', > ... > '-a', > '/home/joseluis/Documents/Software/fieldtrip-20160317/fileio/private/read_ctf_cls.m', > ... > '-a', > '/home/joseluis/Documents/Software/fieldtrip-20160317/ft_preprocessing', ... > 'FT_0.m'); > > However when I copy FT_0 and run_FT_0.sh and run the job I get: > > ./FT_0: error while loading shared libraries: libmwmclmcrrt.so.8.1: cannot > open shared object file: No such file or directory > > Which looking in Internet seems to be associated to the fact I need to run > a mrc installer in the cluster? > > thanks > > Jose > > On 15 June 2016 at 11:03, Anne Urai wrote: > >> Hi Jose, >> >> I ran into similar dependencies issues when compiling fieldtrip, and >> converged on the following: >> >> >> >> % these paths will be added at compilation >> >> addpath(genpath('~/code/Tools')); >> >> addpath('~/Documents/fieldtrip'); >> >> ft_defaults; % add everything to path that we need >> >> >> >> addpath('~/Documents/fieldtrip/qsub'); >> >> addpath(genpath('~/Documents/fieldtrip/template/')); % neighbouring >> matfile >> >> >> >> if strcmp(fname, 'B3a_clusterStatsERF.m') || strcmp(fname, >> 'B3b_clusterStatsTFR.m'), >> >> addpath('~/Documents/fieldtrip/statfun/'); % need the >> combineClusters mex file >> >> addpath('~/Documents/fieldtrip/external/spm8/'); % for neighbour >> definition >> >> % >> http://mailman.science.ru.nl/pipermail/fieldtrip/2014-July/008238.html >> >> end >> >> >> >> % options: compile verbose, only use the toolboxes we really need >> >> % !!! runtime options should be preceded by - to work! >> >> % dont need to activate the -nojvm flag, can still plot from executable >> >> if strcmp(fname, 'B3a_clusterStatsERF.m') || strcmp(fname, >> 'B3b_clusterStatsTFR.m'), >> >> >> >> % statfun is called with a weird eval construction, so not recognized >> >> % by the dependency analysis of mcc >> >> mcc('-mv', '-N', '-p', 'stats', '-p', 'images', '-p', 'signal', ... >> >> '-R', '-nodisplay', '-R', '-singleCompThread', ... >> >> '-a', '~/Documents/fieldtrip/ft_statistics_montecarlo.m', ... >> >> '-a', '~/Documents/fieldtrip/statfun/ft_statfun_depsamplesT.m', >> ... >> >> fname); >> >> else >> >> % no need to specify additional files >> >> mcc('-mv', '-N', '-p', 'stats', '-p', 'images', '-p', 'signal', ... >> >> '-R', '-nodisplay', '-R', '-singleCompThread', ... >> >> fname); >> >> end >> >> >> So, the trick is to add everything to your path before comping, and then >> use the -N option and define specific folders and possible functions using >> -a. Make sure to only include additional subfolders from Fieldtrip (such as >> the templates folder) only if you need them, for including them will >> increase the size of the executable considerably. Also, some functions like >> the ft_statistics ones are not directly called but instead evaluated using statmethod >> = str2func(['ft_statistics_' cfg.method]) - this causes the dependency >> analysis of the compiler to skip those functions, so you'll have to add >> them manually. >> >> >> PS a similar setup should work directly from the command line mcc, but I >> found it easier to run ft_defaults from Matlab and then compile from within >> a Matlab script. >> >> >> Hope this helps! >> >> >> — >> Anne E. Urai, MSc >> PhD student | Institut für Neurophysiologie und Pathophysiologie >> Universitätsklinikum Hamburg-Eppendorf | Martinistrasse 52, 20246 | >> Hamburg, Germany >> www.anneurai.net / @AnneEUrai >> >> On 10 June 2016 at 10:42, Jose wrote: >> >>> dear list, >>> >>> I'm trying to analyse CTF MEG data through the Flemish Supercomputer >>> Centre, >>> I did a matlab script to run the foremost FT functions in my pipeline >>> (ft_read_event, read_ctf_cls, and ft_preprocessing). This script works well >>> when I run it locally. To compile my function in the supercomputing cluster >>> I initially used addpath to include FT and ft_defaults to set the >>> configuration inside my script, but this wasn't working. I tried using a >>> startup.m script but this doesn't work neither. Maybe I'm missing >>> something? My bash script to compile looks like this: >>> >>> #!/bin/bash >>> module load MATLAB/2013b >>> FTDIR=$VSC_DATA_VO_USER/fieldtrip-20160317 >>> mcc -mv FT_0.m >>> >>> I also tried mcc -mv FT_0.m -I $FTDIR >>> I run my compilation in the same folder where I have the FT folder. >>> When I run my bash job I get always the same error: Undefined function >>> 'ft_read_event' for input arguments of type 'char'. >>> >>> I've been looking elsewhere but still I haven't find a solution, >>> >>> Any hints about this would really appreciated, >>> best, >>> Jose >>> >>> _______________________________________________ >>> fieldtrip mailing list >>> fieldtrip at donders.ru.nl >>> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip >>> >> >> > > > -- > José Luis ULLOA FULGERI > +32 (0)4 77 42 90 07 > +32 (0)4 92 64 64 77 > > -- José Luis ULLOA FULGERI +32 (0)4 77 42 90 07 +32 (0)4 92 64 64 77 -------------- next part -------------- An HTML attachment was scrubbed... URL: From azeez.adebimpe5 at gmail.com Fri Jun 24 11:35:36 2016 From: azeez.adebimpe5 at gmail.com (Azeez Adebimpe) Date: Fri, 24 Jun 2016 11:35:36 +0200 Subject: [FieldTrip] Seizure localization problems In-Reply-To: References: <67d7de139b0440bfad130b5479155478@UKL-EX02.ad.uniklinik-freiburg.de> Message-ID: Hi Mathias, You can adjust the regularization parameter, "lamda", I think the default is zero. Best, Azeez On Fri, Jun 24, 2016 at 8:58 AM, Dr.-Ing. Matthias Dümpelmann < matthias.duempelmann at uniklinik-freiburg.de> wrote: > Dear Az, > > > > > > I defined now two intervals, one showing rhythmic seizure activity and one > baseline interval prior to the seizure as you can see on the screenshot. > > > > Now it localizes as expected in the right temporal lobe. > > > > I only wonder about the very small “activation” volume. > > > > Thank you, > > > > Matthias > > > > *Von:* fieldtrip-bounces at science.ru.nl [mailto: > fieldtrip-bounces at science.ru.nl] *Im Auftrag von *Azeez Adebimpe > *Gesendet:* Thursday, June 23, 2016 3:57 PM > *An:* FieldTrip discussion list > *Betreff:* Re: [FieldTrip] Seizure localization problems > > > > Hi Mathias, > > > > DICS and LCMV can also give reasonable result but require some > normalization. > > Try to estimate to neural activity index as explained in this tutorial. > > > > http://www.fieldtriptoolbox.org/tutorial/beamformer > > Best, > > > > Az > > > > On Thu, Jun 23, 2016 at 2:51 PM, Dr.-Ing. Matthias Dümpelmann < > matthias.duempelmann at uniklinik-freiburg.de> wrote: > > Dear Azeez, > > > > thank you for your suggestion. > > > > Just exchanging > > > > cfg.method = 'dics'; > > > > to > > > > cfg.method = 'eloreta'; > > > > resulted in a reasonable solution (see attachment). > > > > I also get useful results using MUIC or sLORETA in the frequency domain as > the methods are implemented in ASA. > > > > This makes me even more suspicious, what is going wrong with the DICS > algorithm. > > > > Best regards, > > > > Matthias > > > > > > > > *Von:* fieldtrip-bounces at science.ru.nl [mailto: > fieldtrip-bounces at science.ru.nl] *Im Auftrag von *Azeez Adebimpe > *Gesendet:* Thursday, June 23, 2016 11:08 AM > *An:* FieldTrip discussion list > *Cc:* Nino Epitashvili > *Betreff:* Re: [FieldTrip] Seizure localization problems > > > > Hi Mathias, > > I will suggest you try other method like eLORETA or MNE first and compare > the result. > > > > Best, > > > > AZ > > > > On Thu, Jun 23, 2016 at 9:34 AM, Dr.-Ing. Matthias Dümpelmann < > matthias.duempelmann at uniklinik-freiburg.de> wrote: > > Dear colleagues, > > we are trying to evaluate systematically the localization of rhythmic > activity at the onset of epileptic seizures in patients, who are > subsequently evaluated with intracranial recordings. > > We are trying to use DICS but quite often receive results, which are > obviously wrong. In the attached screenshots you can see the peace of EEG, > which is evaluated and the localization result with a maximum in the > cerebellum. > > This a typical localization for the cases with obvious miss localizations. > A further seizure with a similar EEG pattern was localized in the right > temporal lobe, which matches the EEG pattern and also the intracranial > findings. > > Head model is generated with ASA, also the electrodes file is in the ASA > format. The geometrical match of source points, head model and electrodes > is checked using ft_plot_.... methods. > > Here is the code sniplet relevant for the localization algorithm: > > % Analysis frequency > SourceFrequency = 4.0 > > % read eeg, electrodes and volume conductor model > %[dat] = ft_read_data(filename); > hdr = ft_read_header(filename); > elec = ft_read_sens(elecfile, 'fileformat','asa_elc'); > headmodel = ft_read_vol(volumefilename,'fileformat','asa_vol'); > mri = ft_read_mri(mrifilename, 'fileformat','asa_mri'); > > % eeg data preprocessing > cfgeeg.dataset = filename; > cfgeeg.continuous = 'yes' > cfg.covariance = 'yes'; > cfg.covariancewindow = 'all'; > cfg.demean = 'yes' > > [data] = ft_preprocessing(cfgeeg); > > % Freqanalysis for beamformer > cfg = []; > cfg.channel = {'*'}; > cfg.method = 'mtmfft'; > cfg.foilim = [1 100]; > cfg.tapsmofrq = 4; > cfg.taper = 'hanning'; > cfg.output = 'powandcsd'; > > > % for common filter over conditions > powcsd_all = ft_freqanalysis(cfg, data); > > % Create leadfield grid > cfg = []; > cfg.channel = elec.label; > cfg.elec = elec; > cfg.headmodel = headmodel; > cfg.dics.reducerank = 3; % default for MEG is 2, for EEG is 3 > cfg.grid.resolution = 0.5; % use a 3-D grid with a 0.5 cm resolution > cfg.grid.unit = 'cm'; > cfg.grid.tight = 'yes'; > [grid] = ft_prepare_leadfield(cfg); > > % source analysis > cfg = []; > cfg.channel = elec.label; > cfg.method = 'dics'; > cfg.frequency = SourceFrequency; > cfg.grid = grid; > cfg.headmodel = headmodel; > cfg.elec = elec; > cfg.senstype = 'EEG'; > cfg.dics.keepfilter = 'yes'; % We wish to use the calculated filter > later on > cfg.dics.projectnoise = 'yes'; > cfg.dics.lambda = '0.3%'; > source_raw = ft_sourceanalysis(cfg, powcsd_all); > > > I played with a couple of parameters like cfg.dics.lambda, but without > success. > > Do you have ideas how to improve our localization results ? > > Thank you, > > Matthias > > > > UNIVERSITÄTSKLINIKUM FREIBURG > Epileptologie > Breisacher Str. 64 · 79106 Freiburg > Telefon: +49 761 270-52410 > matthias.duempelmann at uniklinik-freiburg.de > > www.uniklinik-freiburg.de > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > https://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > https://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > https://mailman.science.ru.nl/mailman/listinfo/fieldtrip > -------------- next part -------------- An HTML attachment was scrubbed... URL: From matthias.duempelmann at uniklinik-freiburg.de Fri Jun 24 12:02:46 2016 From: matthias.duempelmann at uniklinik-freiburg.de (=?utf-8?B?RHIuLUluZy4gTWF0dGhpYXMgRMO8bXBlbG1hbm4=?=) Date: Fri, 24 Jun 2016 10:02:46 +0000 Subject: [FieldTrip] Seizure localization problems In-Reply-To: References: <67d7de139b0440bfad130b5479155478@UKL-EX02.ad.uniklinik-freiburg.de> Message-ID: Hi Az, now I used the normalization (neural activity index) as you indicated and the results look like in the screenshot. Probably we can use now two options: Baseline or Neural Activity Index. Thank you and have a nice weekend ! Matthias Von: fieldtrip-bounces at science.ru.nl [mailto:fieldtrip-bounces at science.ru.nl] Im Auftrag von Azeez Adebimpe Gesendet: Thursday, June 23, 2016 3:57 PM An: FieldTrip discussion list Betreff: Re: [FieldTrip] Seizure localization problems Hi Mathias, DICS and LCMV can also give reasonable result but require some normalization. Try to estimate to neural activity index as explained in this tutorial. http://www.fieldtriptoolbox.org/tutorial/beamformer Best, Az On Thu, Jun 23, 2016 at 2:51 PM, Dr.-Ing. Matthias Dümpelmann > wrote: Dear Azeez, thank you for your suggestion. Just exchanging cfg.method = 'dics'; to cfg.method = 'eloreta'; resulted in a reasonable solution (see attachment). I also get useful results using MUIC or sLORETA in the frequency domain as the methods are implemented in ASA. This makes me even more suspicious, what is going wrong with the DICS algorithm. Best regards, Matthias Von: fieldtrip-bounces at science.ru.nl [mailto:fieldtrip-bounces at science.ru.nl] Im Auftrag von Azeez Adebimpe Gesendet: Thursday, June 23, 2016 11:08 AM An: FieldTrip discussion list Cc: Nino Epitashvili Betreff: Re: [FieldTrip] Seizure localization problems Hi Mathias, I will suggest you try other method like eLORETA or MNE first and compare the result. Best, AZ On Thu, Jun 23, 2016 at 9:34 AM, Dr.-Ing. Matthias Dümpelmann > wrote: Dear colleagues, we are trying to evaluate systematically the localization of rhythmic activity at the onset of epileptic seizures in patients, who are subsequently evaluated with intracranial recordings. We are trying to use DICS but quite often receive results, which are obviously wrong. In the attached screenshots you can see the peace of EEG, which is evaluated and the localization result with a maximum in the cerebellum. This a typical localization for the cases with obvious miss localizations. A further seizure with a similar EEG pattern was localized in the right temporal lobe, which matches the EEG pattern and also the intracranial findings. Head model is generated with ASA, also the electrodes file is in the ASA format. The geometrical match of source points, head model and electrodes is checked using ft_plot_.... methods. Here is the code sniplet relevant for the localization algorithm: % Analysis frequency SourceFrequency = 4.0 % read eeg, electrodes and volume conductor model %[dat] = ft_read_data(filename); hdr = ft_read_header(filename); elec = ft_read_sens(elecfile, 'fileformat','asa_elc'); headmodel = ft_read_vol(volumefilename,'fileformat','asa_vol'); mri = ft_read_mri(mrifilename, 'fileformat','asa_mri'); % eeg data preprocessing cfgeeg.dataset = filename; cfgeeg.continuous = 'yes' cfg.covariance = 'yes'; cfg.covariancewindow = 'all'; cfg.demean = 'yes' [data] = ft_preprocessing(cfgeeg); % Freqanalysis for beamformer cfg = []; cfg.channel = {'*'}; cfg.method = 'mtmfft'; cfg.foilim = [1 100]; cfg.tapsmofrq = 4; cfg.taper = 'hanning'; cfg.output = 'powandcsd'; % for common filter over conditions powcsd_all = ft_freqanalysis(cfg, data); % Create leadfield grid cfg = []; cfg.channel = elec.label; cfg.elec = elec; cfg.headmodel = headmodel; cfg.dics.reducerank = 3; % default for MEG is 2, for EEG is 3 cfg.grid.resolution = 0.5; % use a 3-D grid with a 0.5 cm resolution cfg.grid.unit = 'cm'; cfg.grid.tight = 'yes'; [grid] = ft_prepare_leadfield(cfg); % source analysis cfg = []; cfg.channel = elec.label; cfg.method = 'dics'; cfg.frequency = SourceFrequency; cfg.grid = grid; cfg.headmodel = headmodel; cfg.elec = elec; cfg.senstype = 'EEG'; cfg.dics.keepfilter = 'yes'; % We wish to use the calculated filter later on cfg.dics.projectnoise = 'yes'; cfg.dics.lambda = '0.3%'; source_raw = ft_sourceanalysis(cfg, powcsd_all); I played with a couple of parameters like cfg.dics.lambda, but without success. Do you have ideas how to improve our localization results ? Thank you, Matthias UNIVERSITÄTSKLINIKUM FREIBURG Epileptologie Breisacher Str. 64 · 79106 Freiburg Telefon: +49 761 270-52410 matthias.duempelmann at uniklinik-freiburg.de www.uniklinik-freiburg.de _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl https://mailman.science.ru.nl/mailman/listinfo/fieldtrip _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl https://mailman.science.ru.nl/mailman/listinfo/fieldtrip -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: seizure_neuralactivityindex.png Type: image/png Size: 653013 bytes Desc: seizure_neuralactivityindex.png URL: From dr.nivethida at gmail.com Fri Jun 24 13:39:46 2016 From: dr.nivethida at gmail.com (nivethida t) Date: Fri, 24 Jun 2016 07:39:46 -0400 Subject: [FieldTrip] ft_definetrial for .mat file Message-ID: Dear all, I am trying to use the ft_definetrial for a dataset saved as .mat file. I figured out how to run the ft_preprocessing on these data from this forum, but the ft_definetrial still gives me an error (something like headerfile not recognized). Any help is appreciated. Thanks, Nivethida -- Dr.Nivethida Thirugnanasambandam, Postdoctoral Visiting Fellow, Human Motor Control Section, National Institute of Neurological Disorders and Stroke, National Institutes of Health, Building 10, 7D42, 10 Center Drive, MSC 1428 Bethesda, MD 20892 - 1428 Ph: +1-301-402-6231 -------------- next part -------------- An HTML attachment was scrubbed... URL: From julian.keil at gmail.com Fri Jun 24 13:50:44 2016 From: julian.keil at gmail.com (Julian Keil) Date: Fri, 24 Jun 2016 13:50:44 +0200 Subject: [FieldTrip] ft_definetrial for .mat file In-Reply-To: References: Message-ID: <60B83AE4-344A-43DE-BA72-78B708BA9F43@gmail.com> Dear Nivethida, have you tried ft_redefinetrial? This function can be used to define trials in already preprocessed data. Good luck, Julian ******************** Dr. Julian Keil AG Multisensorische Integration Psychiatrische Universitätsklinik der Charité im St. Hedwig-Krankenhaus Große Hamburger Straße 5-11 10115 Berlin Telefon: +49-30-2311-1879 Fax: +49-30-2311-2209 http://psy-ccm.charite.de/forschung/bildgebung/ag_multisensorische_integration Am 24.06.2016 um 13:39 schrieb nivethida t: > Dear all, > I am trying to use the ft_definetrial for a dataset saved as .mat file. I figured out how to run the ft_preprocessing on these data from this forum, but the ft_definetrial still gives me an error (something like headerfile not recognized). Any help is appreciated. > > Thanks, > Nivethida > > -- > Dr.Nivethida Thirugnanasambandam, > Postdoctoral Visiting Fellow, > Human Motor Control Section, > National Institute of Neurological Disorders and Stroke, > National Institutes of Health, > Building 10, 7D42, > 10 Center Drive, MSC 1428 > Bethesda, MD 20892 - 1428 > Ph: +1-301-402-6231 > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > https://mailman.science.ru.nl/mailman/listinfo/fieldtrip -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 495 bytes Desc: Message signed with OpenPGP using GPGMail URL: From laxmi.shaw22 at gmail.com Fri Jun 24 17:33:31 2016 From: laxmi.shaw22 at gmail.com (Laxmi Shaw) Date: Fri, 24 Jun 2016 21:03:31 +0530 Subject: [FieldTrip] Query regarding source localisation Message-ID: Dear Field trip users, I am facing a serious issue with the source localisation using fieldtrip. I have the dataset of EEG.Could you please provide me any example of source localisation using fieldtrip. Your help is always appreciable. Thanks and Regards -- Laxmi Shaw Research Scholar(PhD) IIT Kharagpur West Bengal Ph no-08388837821 -------------- next part -------------- An HTML attachment was scrubbed... URL: From dr.nivethida at gmail.com Fri Jun 24 17:34:45 2016 From: dr.nivethida at gmail.com (nivethida t) Date: Fri, 24 Jun 2016 11:34:45 -0400 Subject: [FieldTrip] ft_definetrial for .mat file In-Reply-To: <60B83AE4-344A-43DE-BA72-78B708BA9F43@gmail.com> References: <60B83AE4-344A-43DE-BA72-78B708BA9F43@gmail.com> Message-ID: Yes Julian, I did try that - it works but it does not generate the trial definitions (cfg.trl) which I need. Thanks, Nivethida On Fri, Jun 24, 2016 at 7:50 AM, Julian Keil wrote: > Dear Nivethida, > > have you tried ft_redefinetrial? > This function can be used to define trials in already preprocessed data. > > Good luck, > > Julian > > ******************** > *Dr. Julian Keil* > > AG Multisensorische Integration > Psychiatrische Universitätsklinik > der Charité im St. Hedwig-Krankenhaus > Große Hamburger Straße 5-11 > 10115 Berlin > > Telefon: +49-30-2311-1879 > Fax: +49-30-2311-2209 > > http://psy-ccm.charite.de/forschung/bildgebung/ag_multisensorische_integration > > Am 24.06.2016 um 13:39 schrieb nivethida t: > > Dear all, > I am trying to use the ft_definetrial for a dataset saved as .mat file. I > figured out how to run the ft_preprocessing on these data from this forum, > but the ft_definetrial still gives me an error (something like headerfile > not recognized). Any help is appreciated. > > Thanks, > Nivethida > > -- > Dr.Nivethida Thirugnanasambandam, > Postdoctoral Visiting Fellow, > Human Motor Control Section, > National Institute of Neurological Disorders and Stroke, > National Institutes of Health, > Building 10, 7D42, > 10 Center Drive, MSC 1428 > Bethesda, MD 20892 - 1428 > Ph: +1-301-402-6231 > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > https://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > https://mailman.science.ru.nl/mailman/listinfo/fieldtrip > -- Dr.Nivethida Thirugnanasambandam, Postdoctoral Visiting Fellow, Human Motor Control Section, National Institute of Neurological Disorders and Stroke, National Institutes of Health, Building 10, 7D42, 10 Center Drive, MSC 1428 Bethesda, MD 20892 - 1428 Ph: +1-301-402-6231 -------------- next part -------------- An HTML attachment was scrubbed... URL: From azeez.adebimpe5 at gmail.com Fri Jun 24 19:05:41 2016 From: azeez.adebimpe5 at gmail.com (Azeez Adebimpe) Date: Fri, 24 Jun 2016 19:05:41 +0200 Subject: [FieldTrip] Query regarding source localisation In-Reply-To: References: Message-ID: <20160624170541.5382228.13036.4303@gmail.com> An HTML attachment was scrubbed... URL: From ghumana at upmc.edu Sun Jun 26 00:12:39 2016 From: ghumana at upmc.edu (Ghuman, Avniel) Date: Sat, 25 Jun 2016 22:12:39 +0000 Subject: [FieldTrip] Postdoc Position in Intracranial EEG and eye tracking in visual neuroscience Message-ID: <20385F716E75B746A7F52BBB3C46A1302F171958@MSXMBXNSPRD15.acct.upmchs.net> Applications are invited for an NIH funded postdoctoral position combining eye tracking and intracranial EEG recordings in humans to study the neural basis of face recognition, object recognition, and social and affective perception, at the University of Pittsburgh, USA. The research will focus on understanding the dynamic neural code that underlies the recognition of faces, bodies, objects, facial expressions, and other social and affective stimuli and how this information guides, and is guided by, eye movements. Of particular interest is how this information is coded in interactive neural circuits at the level of large-scale brain networks. The neural data will primarily be local field potentials/ event related potential from intracranial surface electrodes (electrocorticography, ECoG), cortical depth electrodes, and subcortical depth electrodes in humans in conjunction with eye tracking. There is also the potential for studies involving direct cortical stimulation to assess how neural modulation alters visual perception. The ideal applicant would hold a Ph.D. in Neuroscience, Psychology, Computer Science, Mathematics, Statistics, Engineering or a related field. Strong technical, computational, and statistical skills are required. Experience with combining eye tracking and electrophysiological data is required (for example, scalp EEG or MEG and eye tracking). Applicants should have a strong track record of publication. Pittsburgh is consistently ranked the most livable city in America and the neuroscientific community here, particularly at the University of Pittsburgh and Carnegie Mellon University, is both very strong and collaborative. Interested applicants should send a letter of interest, a CV, and the names and contact information for 3 researchers who can provide a recommendation. For further information or to submit an application, please contact Avniel Ghuman, Ph.D. at ghumana at upmc.edu and see our lab webpage at www.lcnd.pitt.edu . From mailtome.2113 at gmail.com Mon Jun 27 09:18:34 2016 From: mailtome.2113 at gmail.com (Arti Abhishek) Date: Mon, 27 Jun 2016 17:18:34 +1000 Subject: [FieldTrip] No trialinfo after epoching Message-ID: Dear list, I am trying to analyse EEG data recorded in EGI system. When I used the following code to epochs the data, the trialinfo information is missing that prevents me to average each trigger seperately. Could anyone suggest a fix? cfg = []; cfg.dataset = 'LL1101_20160622_022943.raw'; cfg.trialdef.prestim = 0.1; cfg.trialdef.poststim = 0.5; cfg.trialdef.eventtype = 'trigger'; cfg.trialdef.eventvalue = {'DI14', 'DI16', 'DI18', 'DI22', 'DI24', 'DIN4','DIN6', 'DIN8'}; data = ft_definetrial(cfg); LL01_epochs = ft_redefinetrial(data, LL01_cont); Thanks, Arti -------------- next part -------------- An HTML attachment was scrubbed... URL: From emilj at drcmr.dk Mon Jun 27 10:53:25 2016 From: emilj at drcmr.dk (=?utf-8?Q?Emil_=C3=98sterg=C3=A5rd_Johansen?=) Date: Mon, 27 Jun 2016 10:53:25 +0200 Subject: [FieldTrip] Baseline correction when epoching after filtering Message-ID: <6021A776-2BF4-4FE7-A7FB-96DA2DAF28F2@drcmr.dk> Dear all, I cannot figure out how to subtract a baseline window in each trial, say [-2.0 0] when using ft_redefinetrial to epoch my data. As far as I can see baseline correction is only an option for ft_preprocessing. My pipeline is as follows: 1) Run ICA on data which is preprocessed in a manner specifically for ICA 2) Apply ICA weights to raw data (after this my data is in .mat format) 3) Reref and filter using ft_preprocessing 4) Epoch data using ft_definetrial and ft_redefinetrial The code for epoching is as follows and works fine: cfg.dataset = [cfg.subjectdir cfg.subjectstr '.bdf’]; % Raw data for defining trials cfg_cond = ft_definetrial(cfg); cfg_cond.inputfile = [cfg.subjectdir cfg.subjectstr '_ICApruned_filtered.mat’]; data = ft_redefinetrial(cfg_cond); I want to subtract the baseline window when epoching (and epoching should be done after filtering to minimize filter artifacts). I tried using ft_preprocessing again to both subtract baseline and epoch the data (instead of ft_redefinetrial): cfg.dataset = [cfg.subjectdir cfg.subjectstr '.bdf’]; % Raw data for defining trials cfg_cond = ft_definetrial(cfg); cfg_cond.inputfile = [cfg.subjectdir cfg.subjectstr '_ICApruned_filtered.mat’]; cfg_cond.demean = 'yes'; cfg_cond.baselinewindow = [-2.0 0]; data = ft_preprocessing(cfg_cond); but got: "Warning: The field cfg.trl is forbidden, it will be removed from your configuration” and no trials were created. You might suggest that I include the cfg.demean in step 3 when filtering, but then I am unsure if it will simply demean the entire dataset using the same value since the data is continuous at that point. If it is of importance I have my own trial function Thank you for your time, Emil Johansen Hvidovre University Hospital Denmark From tineke.snijders at donders.ru.nl Mon Jun 27 11:13:47 2016 From: tineke.snijders at donders.ru.nl (Snijders, T.M. (Tineke)) Date: Mon, 27 Jun 2016 09:13:47 +0000 Subject: [FieldTrip] Baseline correction when epoching after filtering In-Reply-To: <6021A776-2BF4-4FE7-A7FB-96DA2DAF28F2@drcmr.dk> References: <6021A776-2BF4-4FE7-A7FB-96DA2DAF28F2@drcmr.dk> Message-ID: <815A9820E75FBC4F96B7CD3A8089D11C378EC6FB@exprd04.hosting.ru.nl> Hi Emil, You can just use ft_preprocessing on the redefined data, to do baseline-correction only. So after: data = ft_redefinetrial(cfg_cond); you do: cfg=[]; cfg.demean='yes'; cfg.baselinewindow=[-2 0]; dataBL=ft_preprocessing(cfg,data); Cheers, Tineke ________________________________________ From: fieldtrip-bounces at science.ru.nl [fieldtrip-bounces at science.ru.nl] on behalf of Emil Østergård Johansen [emilj at drcmr.dk] Sent: Monday, June 27, 2016 10:53 AM To: fieldtrip at science.ru.nl Subject: [FieldTrip] Baseline correction when epoching after filtering Dear all, I cannot figure out how to subtract a baseline window in each trial, say [-2.0 0] when using ft_redefinetrial to epoch my data. As far as I can see baseline correction is only an option for ft_preprocessing. My pipeline is as follows: 1) Run ICA on data which is preprocessed in a manner specifically for ICA 2) Apply ICA weights to raw data (after this my data is in .mat format) 3) Reref and filter using ft_preprocessing 4) Epoch data using ft_definetrial and ft_redefinetrial The code for epoching is as follows and works fine: cfg.dataset = [cfg.subjectdir cfg.subjectstr '.bdf’]; % Raw data for defining trials cfg_cond = ft_definetrial(cfg); cfg_cond.inputfile = [cfg.subjectdir cfg.subjectstr '_ICApruned_filtered.mat’]; data = ft_redefinetrial(cfg_cond); I want to subtract the baseline window when epoching (and epoching should be done after filtering to minimize filter artifacts). I tried using ft_preprocessing again to both subtract baseline and epoch the data (instead of ft_redefinetrial): cfg.dataset = [cfg.subjectdir cfg.subjectstr '.bdf’]; % Raw data for defining trials cfg_cond = ft_definetrial(cfg); cfg_cond.inputfile = [cfg.subjectdir cfg.subjectstr '_ICApruned_filtered.mat’]; cfg_cond.demean = 'yes'; cfg_cond.baselinewindow = [-2.0 0]; data = ft_preprocessing(cfg_cond); but got: "Warning: The field cfg.trl is forbidden, it will be removed from your configuration” and no trials were created. You might suggest that I include the cfg.demean in step 3 when filtering, but then I am unsure if it will simply demean the entire dataset using the same value since the data is continuous at that point. If it is of importance I have my own trial function Thank you for your time, Emil Johansen Hvidovre University Hospital Denmark _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl https://mailman.science.ru.nl/mailman/listinfo/fieldtrip From christophe.grova at mcgill.ca Mon Jun 27 16:23:56 2016 From: christophe.grova at mcgill.ca (Christophe Grova) Date: Mon, 27 Jun 2016 14:23:56 +0000 Subject: [FieldTrip] Postdoctoral position for a neurologist/epileptologist available in the Multimodal Functional Imaging Lab, Montreal (MNI McGill and PERFORM Concordia) In-Reply-To: <1467035945505.32385@concordia.ca> References: <1467035369587.215@concordia.ca>, <1467035659679.70310@concordia.ca>, <1467035945505.32385@concordia.ca> Message-ID: Dear community, Please see below the opportunity for a postdoctoral position in my lab. I am currently attending HBM conference in Geneva, so I will be happy to start meeting possible candidates if you are around. The candidate will join a multidisciplinary team composed of neurologists and methodologists within the Multimodal Functional Imaging Laboratory, directed by Pr. Christophe Grova. The laboratory is actually based on two sites: (i) Physics Dpt at Concordia University and PERFORM center, (ii) Biomedical Engineering Dpt and epilepsy group of the Montreal Neurological Institute, McGill University. Both environments offer unique platforms with access to several modalities (simultaneous high-density EEG/fMRI, MEG, simultaneous EEG/NIRS, TMS). The candidate will notably have access to the brand new multimodal imaging platform of PERFORM center, dedicated to neuroscience studies over large cohort of subjects (effect of age, exercising, ...), whereas clinical applications during the presurgical investigation of patients with epilepsy will be primarly based at the Montreal Neurological Institute. The main expertise of the team is the development and the validation of source localization methods dedicated for EEG, MEG and NIRS as well as multimodal characterization of resting state brain activity. Project: Multimodal investigation of epileptic activity using simultaneous EEG/MEG and EEG/NIRS acquisitions. The proposed project aims at localizing and characterizing the generators of epileptic activity using simultaneous acquisitions of ElectroEncephaloGraphy (EEG) with Magneto-EncephaloGraphy (MEG), as well as simultaneous acquisitions of EEG with Near Infra-Red Spectroscopy (NIRS). While methodological developments in the lab will consist in 3D reconstructions of the generators of EEG, MEG and NIRS signals and assessing multimodal concordances between bioelectrical neuronal signals and hemodynamic processes, the purpose of this Postdoctoral project will be to assess the integrity of neurovascular coupling processes at the time of epileptic discharges, using a unique multimodal environment involving EEG/MEG, EEG/NIRS and also EEG/fMRI recordings. Close collaborations with the epilepsy group of the Montreal Neurological Institute, involving notably Dr E. Kobayashi MD-PhD, Dr F. Dubeau MD-PhD and Dr. J. Gotman PhD, will provide access to patient populations and additional clinical expertise for this project. Requirements: The candidate should be an MD (neurologist) with previous training in epileptology and neurophysiology (EEG). Expertise in analyzing MEG or NIRS signals and/or computational skills including neuroimaging softwares are appreciated additional qualification. The candidate should be fluent in English (and if possible French) due to the patient population studied. Supervisor: Christophe Grova Ph.D. Assistant Professor, Physics Dpt and PERFORM, Concordia Univ. Chair of PERFORM Applied Bio-Imaging Committee Adjunct Professor, Biomedical Engineering and Neurology & Neurosurgery dpts, McGill Univ. Member Epilepsy Group, Montreal Neurological Institute Director of the Multimodal Functional Imaging Laboratory Email: christophe.grova at concordia.ca christophe.grova at mcgill.ca Please send your CV and motivation letter before July. 20th 2016 to christophe.grova at concordia.ca *************************** Christophe Grova, PhD Assistant Professor, Physics Dpt, Concordia University PERFORM centre, Concordia University Chair of PERFORM Applied Bio-Imaging Committee (ABC) Adjunct Prof in Biomedical Engineering, and Neurology and Neurosurgery Dpt, McGill University Multimodal Functional Imaging Lab (Multi FunkIm) Montreal Neurological Institute - epilepsy group Centre de Recherches en Mathématiques Physics Dpt Concordia University - Loyola Campus - Office SP 365.12 7141 Sherbrooke Street West, Montreal, QC H4B 1R6 Phone: (514) 848-2424 ext.4221 email : christophe.grova at concordia.ca , christophe.grova at mcgill.ca Explore Concordia: http://explore.concordia.ca/christophe-grova Physics, Concordia University: http://www.concordia.ca/artsci/physics/faculty.html?fpid=christophe-grova McGill University: http://www.bic.mni.mcgill.ca/ResearchLabsMFIL/PeopleChristophe MultiFunkIm Lab: http://www.bic.mni.mcgill.ca/ResearchLabsMFIL/HomePage *************************** [X] -------------- next part -------------- An HTML attachment was scrubbed... URL: From mailtome.2113 at gmail.com Tue Jun 28 04:01:16 2016 From: mailtome.2113 at gmail.com (Arti Abhishek) Date: Tue, 28 Jun 2016 12:01:16 +1000 Subject: [FieldTrip] No trialinfo after epoching In-Reply-To: References: Message-ID: Dear list, I am following up on my previous question on mussing trial info after I epoch the data. The fourth column in the data.cfg.trial is present when the triggers are neumeric. But when the triggers are in string format (as in EGI system eg. "DIN8"), the fourth column is not present with the following code. I would really appreciate if someone could suggest a fix. cfg = []; cfg.dataset = 'LL1101_20160622_022943.raw'; cfg.trialdef.prestim = 0.1; cfg.trialdef.poststim = 0.5; cfg.trialdef.eventtype = 'trigger'; cfg.trialdef.eventvalue = {'DI14', 'DI16', 'DI18', 'DI22', 'DI24', 'DIN4','DIN6', 'DIN8'}; data = ft_definetrial(cfg); LL01_epochs = ft_redefinetrial(data, LL01_cont); Thanks, Arti On Mon, Jun 27, 2016 at 5:18 PM, Arti Abhishek wrote: > Dear list, > > I am trying to analyse EEG data recorded in EGI system. When I used the > following code to epochs the data, the trialinfo information is missing > that prevents me to average each trigger seperately. Could anyone suggest a > fix? > > cfg = []; > cfg.dataset = 'LL1101_20160622_022943.raw'; > cfg.trialdef.prestim = 0.1; > cfg.trialdef.poststim = 0.5; > cfg.trialdef.eventtype = 'trigger'; > cfg.trialdef.eventvalue = {'DI14', 'DI16', 'DI18', 'DI22', 'DI24', > 'DIN4','DIN6', 'DIN8'}; > data = ft_definetrial(cfg); > LL01_epochs = ft_redefinetrial(data, LL01_cont); > > Thanks, > Arti > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From lindseyrtate at ou.edu Tue Jun 28 10:05:52 2016 From: lindseyrtate at ou.edu (Tate, Lindsey R.) Date: Tue, 28 Jun 2016 08:05:52 +0000 Subject: [FieldTrip] Tate, Lindsey R. wants to share the file dataFIC4.mat with you Message-ID: To view dataFIC4.mat, sign in or create an account. -------------- next part -------------- An HTML attachment was scrubbed... URL: From lindseyrtate at ou.edu Tue Jun 28 10:05:47 2016 From: lindseyrtate at ou.edu (Tate, Lindsey R.) Date: Tue, 28 Jun 2016 08:05:47 +0000 Subject: [FieldTrip] Beamforming, "Inf" during source estimation by subject Message-ID: Tate, Lindsey R. has shared a?OneDrive for Business?file with you. To view it, click the link below. [https://r1.res.office365.com/owa/prem/images/dc-generic_20.png] dataFIC4.mat Hello Fieldtrip Community, I've been working on beamforming the MEG data collected from 16 subjects during a saccade task. This is my first time beamforming so I've been heavily relying on the tutorial. When I collapse trials across subjects and do beamforming, I can get the ft_sourceplot commands to produce something that makes some sense. However, I need to be able to have the data separated by subject for ft_sourcestatistics. I've created structures that should work for this purpose and that look correct. However, the ".pow" from the Neural Activity Index calculation step ends up mostly "NaN" and partly "Inf" when I run the beamforming divided by subject. Is this related to the number of trials per subject somehow (e.g., do I have too few? is there some kind of setting I need to change?)? Why is the ".pow" coming back "Inf" instead of a real number? Does anyone have suggestions for fixing this problem so that I don't get "Inf" anymore? My code and raw data structure are attached. Thank you, Lindsey Tate University of Oklahoma -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: BF_trial4.m URL: From emilj at drcmr.dk Tue Jun 28 14:33:41 2016 From: emilj at drcmr.dk (=?utf-8?Q?Emil_=C3=98sterg=C3=A5rd_Johansen?=) Date: Tue, 28 Jun 2016 14:33:41 +0200 Subject: [FieldTrip] Baseline correction when epoching after filtering Message-ID: <8CB0822C-27C7-48F5-9A30-E883906C65AC@drcmr.dk> Dear Dr. Snijders, Thank you for your swift response and suggestion. I tried your solution, but since my epochs are not completely adjacent in the data (there is a pause of 4 seconds between epochs), when following your suggestion there is no data available previous to the stimulus because the data in between has been removed when epoching using ft_redefinetrial. So when using a window of [-2 0], Fieldtrip simply reverts to subtracting the first sample value such that all signals start at 0, which is of course not desirable. I have solved it now and will describe it briefly here if others face the same problem: I included data prior to the stimulus onset in the epoch. As an example, say my epoch is 1 second long and I want to use [-0.5 0] as baseline. Then I define my epoch as [-0.5 1] and use ft_redefinetrial to epoch the data. Afterwards I use a cfg.baselinewindow = [0 0.5] and baseline correct the data the way you described. When plotting the ERP’s I then plot the true epoch which is [0.5 1.5] in my “dummy” epoch. Thank you again for your help, Emil From jan.schoffelen at donders.ru.nl Tue Jun 28 14:58:27 2016 From: jan.schoffelen at donders.ru.nl (Schoffelen, J.M. (Jan Mathijs)) Date: Tue, 28 Jun 2016 12:58:27 +0000 Subject: [FieldTrip] No trialinfo after epoching In-Reply-To: References: Message-ID: Hi Arti, I think that this can be easily fixed. Notably, if you have a look at ft_trialfun_general, there’s a specific string-to-number conversion for eventtypes that start with ’S’, or ‘R’. This happens on line 210/211. It might be possible to come up with a generic solution, but this will result in a more or less arbitrary string-to-number mapping. The ’S’ and ‘R’ eventvalues pertain to a particular acquisition system that codes stimuli and responses as ‘Sx’, and ‘Rx’ respectively, where the ‘x’ is a user-specified value. If you come up with a sensible generic solution I’d be more than happy to build it into the code, or you can do so yourself, and submit this to our github repository as a pull request. Best wishes, Jan-Mathijs On 28 Jun 2016, at 04:01, Arti Abhishek > wrote: Dear list, I am following up on my previous question on mussing trial info after I epoch the data. The fourth column in the data.cfg.trial is present when the triggers are neumeric. But when the triggers are in string format (as in EGI system eg. "DIN8"), the fourth column is not present with the following code. I would really appreciate if someone could suggest a fix. cfg = []; cfg.dataset = 'LL1101_20160622_022943.raw'; cfg.trialdef.prestim = 0.1; cfg.trialdef.poststim = 0.5; cfg.trialdef.eventtype = 'trigger'; cfg.trialdef.eventvalue = {'DI14', 'DI16', 'DI18', 'DI22', 'DI24', 'DIN4','DIN6', 'DIN8'}; data = ft_definetrial(cfg); LL01_epochs = ft_redefinetrial(data, LL01_cont); Thanks, Arti On Mon, Jun 27, 2016 at 5:18 PM, Arti Abhishek > wrote: Dear list, I am trying to analyse EEG data recorded in EGI system. When I used the following code to epochs the data, the trialinfo information is missing that prevents me to average each trigger seperately. Could anyone suggest a fix? cfg = []; cfg.dataset = 'LL1101_20160622_022943.raw'; cfg.trialdef.prestim = 0.1; cfg.trialdef.poststim = 0.5; cfg.trialdef.eventtype = 'trigger'; cfg.trialdef.eventvalue = {'DI14', 'DI16', 'DI18', 'DI22', 'DI24', 'DIN4','DIN6', 'DIN8'}; data = ft_definetrial(cfg); LL01_epochs = ft_redefinetrial(data, LL01_cont); Thanks, Arti _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl https://mailman.science.ru.nl/mailman/listinfo/fieldtrip -------------- next part -------------- An HTML attachment was scrubbed... URL: From tineke.snijders at donders.ru.nl Tue Jun 28 16:07:18 2016 From: tineke.snijders at donders.ru.nl (Snijders, T.M. (Tineke)) Date: Tue, 28 Jun 2016 14:07:18 +0000 Subject: [FieldTrip] Baseline correction when epoching after filtering In-Reply-To: <8CB0822C-27C7-48F5-9A30-E883906C65AC@drcmr.dk> References: <8CB0822C-27C7-48F5-9A30-E883906C65AC@drcmr.dk> Message-ID: <815A9820E75FBC4F96B7CD3A8089D11C378EC8CF@exprd04.hosting.ru.nl> Dear Emil, Yes, indeed you should have the prestimulus data available to baseline-correct for it. But note that fieldtrip shifts the timing info in relation with the trigger onset. So if you use cfg.trialdef.prestim = 0.5; cfg.trialdef.poststim = 1; when you define your trials, then your timing information is relative to the trigger, so it will actually go from [-0.5 1.0], and you can use the 'correct' times (with regard to trigger onset) then. So you can just use [-0.5 0] as baselinewindow, and then you don't need to plot [0.5 1.5] when what you actually want to plot is [0 1.0]. If you have done the epoching in some other way, just alter data.time so it gives the 'correct' times. Best, Tineke ________________________________________ From: fieldtrip-bounces at science.ru.nl [fieldtrip-bounces at science.ru.nl] on behalf of Emil Østergård Johansen [emilj at drcmr.dk] Sent: Tuesday, June 28, 2016 2:33 PM To: fieldtrip at science.ru.nl Subject: Re: [FieldTrip] Baseline correction when epoching after filtering Dear Dr. Snijders, Thank you for your swift response and suggestion. I tried your solution, but since my epochs are not completely adjacent in the data (there is a pause of 4 seconds between epochs), when following your suggestion there is no data available previous to the stimulus because the data in between has been removed when epoching using ft_redefinetrial. So when using a window of [-2 0], Fieldtrip simply reverts to subtracting the first sample value such that all signals start at 0, which is of course not desirable. I have solved it now and will describe it briefly here if others face the same problem: I included data prior to the stimulus onset in the epoch. As an example, say my epoch is 1 second long and I want to use [-0.5 0] as baseline. Then I define my epoch as [-0.5 1] and use ft_redefinetrial to epoch the data. Afterwards I use a cfg.baselinewindow = [0 0.5] and baseline correct the data the way you described. When plotting the ERP’s I then plot the true epoch which is [0.5 1.5] in my “dummy” epoch. Thank you again for your help, Emil _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl https://mailman.science.ru.nl/mailman/listinfo/fieldtrip From zhangk28 at mcmaster.ca Tue Jun 28 18:30:45 2016 From: zhangk28 at mcmaster.ca (KAIJIE ZHANG) Date: Tue, 28 Jun 2016 12:30:45 -0400 Subject: [FieldTrip] topoplotTFR Message-ID: Hi Community, I've been using topoplotTFR for plotting NIRS signals, and it has been going pretty well. Just a small thing: I have been plotting topographic maps for several pieces of data, but each plot has a different scaling, thus giving the value of colour a lot of ambiguity. I was wondering if there is any way to keep constant values corresponding to a constant colour with topoplotTFR? Thank you very much for any input! Best Regards, Kaijie Zhang -- Kaijie Zhang Electrical & Biomedical Engineering, Level III McMaster University -------------- next part -------------- An HTML attachment was scrubbed... URL: From p.taesler at uke.uni-hamburg.de Tue Jun 28 19:13:17 2016 From: p.taesler at uke.uni-hamburg.de (Philipp Taesler) Date: Tue, 28 Jun 2016 19:13:17 +0200 Subject: [FieldTrip] topoplotTFR In-Reply-To: <5dd276f263ae4caeb0e909b53c36c538@EXCCAHT-1.mail.uke.ads> References: <5dd276f263ae4caeb0e909b53c36c538@EXCCAHT-1.mail.uke.ads> Message-ID: <5772B02D.50203@uke.uni-hamburg.de> Hello Kaijie, you can use the caxis([min max]) command to set the scaling programmatically for the current axes. You can also pass an axes handle to the command to set it for individual plots if you have multiple figures open. Cheers, Phil Am 28.06.16 um 18:30 schrieb KAIJIE ZHANG: > Hi Community, > > I've been using topoplotTFR for plotting NIRS signals, and it has been > going pretty well. Just a small thing: I have been plotting topographic > maps for several pieces of data, but each plot has a different scaling, > thus giving the value of colour a lot of ambiguity. I was wondering if > there is any way to keep constant values corresponding to a constant > colour with topoplotTFR? Thank you very much for any input! > > Best Regards, > Kaijie Zhang > > -- > Kaijie Zhang > Electrical & Biomedical Engineering, Level III > McMaster University > -- _____________________________________________________________________ Universitätsklinikum Hamburg-Eppendorf; Körperschaft des öffentlichen Rechts; Gerichtsstand: Hamburg | www.uke.de Vorstandsmitglieder: Prof. Dr. Burkhard Göke (Vorsitzender), Prof. Dr. Dr. Uwe Koch-Gromus, Joachim Prölß, Rainer Schoppik _____________________________________________________________________ SAVE PAPER - THINK BEFORE PRINTING From XDu at mprc.umaryland.edu Tue Jun 28 20:04:37 2016 From: XDu at mprc.umaryland.edu (Xiaoming Du) Date: Tue, 28 Jun 2016 14:04:37 -0400 Subject: [FieldTrip] Methold reference for Connectivity analysis Message-ID: <577283F5020000DC0001BB4B@MPRC.UMARYLAND.EDU> Dear all, One of the method for FT_CONNECTIVITYANALYSIS is 'amplcorr'. The description in the help document is " 'amplcorr', amplitude correlation, support for freq and source data". I can not find any further explanation for this method from "Methold reference" page either. http://www.fieldtriptoolbox.org/references_to_implemented_methods Does anyone know which published paper(s) used this method? Thanks. Xiaoming -------------- next part -------------- An HTML attachment was scrubbed... URL: From michelic72 at gmail.com Tue Jun 28 22:45:42 2016 From: michelic72 at gmail.com (Cristiano Micheli) Date: Tue, 28 Jun 2016 22:45:42 +0200 Subject: [FieldTrip] Methold reference for Connectivity analysis In-Reply-To: <577283F5020000DC0001BB4B@MPRC.UMARYLAND.EDU> References: <577283F5020000DC0001BB4B@MPRC.UMARYLAND.EDU> Message-ID: Dear Xiaming, amplcorr implements a set of metrics related to correlation/cross-spectral density. See the reference for the function ft_connectivity_corr.m here: http://www.fieldtriptoolbox.org/reference/ft_connectivity_corr The function help contains a list of references too. IHTH Cris On Tue, Jun 28, 2016 at 8:04 PM, Xiaoming Du wrote: > Dear all, > > One of the method for FT_CONNECTIVITYANALYSIS is *'amplcorr'*. > > The description in the help document is " 'amplcorr', amplitude > correlation, support for freq and source data". > > I can not find any further explanation for this method from "Methold > reference" page either. > http://www.fieldtriptoolbox.org/references_to_implemented_methods > > Does anyone know which published paper(s) used this method? > > Thanks. > > Xiaoming > > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > https://mailman.science.ru.nl/mailman/listinfo/fieldtrip > -------------- next part -------------- An HTML attachment was scrubbed... URL: From anne.urai at gmail.com Wed Jun 29 13:21:01 2016 From: anne.urai at gmail.com (Anne Urai) Date: Wed, 29 Jun 2016 04:21:01 -0700 Subject: [FieldTrip] topoplotTFR Message-ID: Dear Kaijie, see this option from the ft_topoplottfr help, which you can use to pre-specify numerical values cfg.zlim = plotting limits for color dimension, 'maxmin', 'maxabs', 'zeromax', 'minzero', or [zmin zmax] (default = 'maxmin') — Anne E. Urai, MSc PhD student | Institut für Neurophysiologie und Pathophysiologie Universitätsklinikum Hamburg-Eppendorf | Martinistrasse 52, 20246 | Hamburg, Germany www.anneurai.net / @AnneEUrai On 28 June 2016 at 18:30, KAIJIE ZHANG wrote: > Hi Community, > > I've been using topoplotTFR for plotting NIRS signals, and it has been > going pretty well. Just a small thing: I have been plotting topographic > maps for several pieces of data, but each plot has a different scaling, > thus giving the value of colour a lot of ambiguity. I was wondering if > there is any way to keep constant values corresponding to a constant colour > with topoplotTFR? Thank you very much for any input! > > Best Regards, > Kaijie Zhang > > -- > Kaijie Zhang > Electrical & Biomedical Engineering, Level III > McMaster University > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > https://mailman.science.ru.nl/mailman/listinfo/fieldtrip > -------------- next part -------------- An HTML attachment was scrubbed... URL: From XDu at mprc.umaryland.edu Wed Jun 29 15:50:56 2016 From: XDu at mprc.umaryland.edu (Xiaoming Du) Date: Wed, 29 Jun 2016 09:50:56 -0400 Subject: [FieldTrip] Methold reference for Connectivity analysis In-Reply-To: References: <577283F5020000DC0001BB4B@MPRC.UMARYLAND.EDU> Message-ID: <57739A00020000DC0001BBCE@MPRC.UMARYLAND.EDU> Thanks Cris! Very helpful info! >>> Cristiano Micheli 6/28/2016 4:45 PM >>> Dear Xiaming, amplcorr implements a set of metrics related to correlation/cross-spectral density. See the reference for the function ft_connectivity_corr.m here: http://www.fieldtriptoolbox.org/reference/ft_connectivity_corr The function help contains a list of references too. IHTH Cris On Tue, Jun 28, 2016 at 8:04 PM, Xiaoming Du wrote: Dear all, One of the method for FT_CONNECTIVITYANALYSIS is 'amplcorr'. The description in the help document is " 'amplcorr', amplitude correlation, support for freq and source data". I can not find any further explanation for this method from "Methold reference" page either. http://www.fieldtriptoolbox.org/references_to_implemented_methods Does anyone know which published paper(s) used this method? Thanks. Xiaoming _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl https://mailman.science.ru.nl/mailman/listinfo/fieldtrip -------------- next part -------------- An HTML attachment was scrubbed... URL: From pmetzak at gmail.com Wed Jun 29 23:01:02 2016 From: pmetzak at gmail.com (Paul Metzak) Date: Wed, 29 Jun 2016 14:01:02 -0700 Subject: [FieldTrip] issues compiling matlab code that calls spm and runs a beamformer analysis Message-ID: Hi, I solved my own problem so I thought I would reply in case someone else runs into this issue. The problem is that when SPM (or SPM functions) are compiled, they search for a file called Contents.txt in the compiled spm directory; however, this file is not created when only some of the SPM functions are compiled through FieldTrip. Contents.txt is a copy of the Contents.m file found in SPM directories, so the solution was to copy Contents.m, rename it Contents.txt and to place this file in the compiled SPM directory. Note that for me at least, the compiled directories do not appear until the compiled code is run for the first time. I hope that saves someone some time one day! Paul -------------- next part -------------- An HTML attachment was scrubbed... URL: From pmetzak at gmail.com Thu Jun 30 00:01:26 2016 From: pmetzak at gmail.com (Paul Metzak) Date: Wed, 29 Jun 2016 15:01:26 -0700 Subject: [FieldTrip] unexpected image dimensions following ft_volumenormalise Message-ID: Hello, I am in the process of setting up a compiled beamformer script to run on my university's supercomputer. One issue that I have run into is that the dimensions of my beamformed image. I have my beamformed image that I have source interpolated (using ft_sourceinterpolate) with the participant's structural MRI. sourceDIFF_int = > inside: [256x256x256 logical] > pow: [256x256x256 double] > dim: [256 256 256] > transform: [4x4 double] > anatomy: [256x256x256 double] > coordsys: 'ctf' > unit: 'mm' > cfg: [1x1 struct] When I run the volume normalise function on sourceDIFF_int (see below), which lists a template file as input (as required to run when compiled), the output dimensions do not match the dimensions of the template file. I am curious where these mysterious dimensions are coming from, and why the template file is not being used? This happens both in the compiled and MATLAB-based executions of this code. cfg = []; > cfg.nonlinear = 'no'; > cfg.template = 'T1.nii'; > cfg.spmversion = 'spm8'; > sourceDIFF_int_norm = ft_volumenormalise(cfg, sourceDIFF_int); As you can see from the variable information for the normalised data, and the T1 template (see below), the dimensions are different. sourceDIFF_int_norm = > anatomy: [157x189x136 double] > pow: [157x189x136 double] > inside: [157x189x136 logical] > transform: [4x4 double] > dim: [157 189 136] > params: [1x1 struct] > initial: [4x4 double] > coordsys: 'spm' > cfg: [1x1 struct] > > templ_T1 = > dim: [91 109 91] > anatomy: [91x109x91 double] > hdr: [1x1 struct] > transform: [4x4 double] > unit: 'mm' Thank you for any light you can shed on this issue. Please let me know if more information would be helpful in resolving this. Paul -------------- next part -------------- An HTML attachment was scrubbed... URL: From lindseyrtate at ou.edu Thu Jun 30 08:22:41 2016 From: lindseyrtate at ou.edu (Tate, Lindsey R.) Date: Thu, 30 Jun 2016 06:22:41 +0000 Subject: [FieldTrip] Beamforming, "Inf" during source estimation by subject In-Reply-To: References: Message-ID: Tate, Lindsey R. has shared a?OneDrive for Business?file with you. To view it, click the link below. [https://r1.res.office365.com/owa/prem/images/dc-generic_20.png] dataFIC4.mat Hello Fieldtrip Community, On Tuesday 6/28, I sent out the original message forwarded below. I received some response but have been unable to resolve my problem. [Attempted to allow lambda to be estimated/not specified, but this didn't eliminate the "Inf" in the pow matrices.] I've been working on beamforming the MEG data collected from 16 subjects during a saccade task. There are 4 conditions, with a maximum of 30 trials each per subject (some trials eliminated due to loss of focus). This is my first time beamforming so I've been heavily relying on the tutorial. I'm having what appears to be two issues: 1) Number of trials per subject may be too low. When I collapse across all subjects or even collapse across two random subjects so as to artificially increase the number of trials per "artificial subject," real numbers are produced by ft_sourceinterpolate in the pow matrix. When I run each subject individually, the pow matrix from ft_sourceinterpolate "Inf" where numbers were for the other runs. Is there a way to resolve this issue, such as a default setting to override? Or do I have too few trials per condition? 2) The pow matrix from ft_sourceinterpolate produces primarily "NaN," with about 90% of the rows being "NaN." This seems problematic. Also, it seems like it may be causing problems with ft_sourcestatistics as the stat.prob and stat.mask matrices always come back empty, even when ft_sourceinterpolate produces pow matrices with real numbers divided by "artificial subjects." Could this prevalence of "NaN" be an indication that the beamforming isn't happening correctly? Could the prevalence be causing the ft_sourcestatistics to produce blank stat.prob and stat.mask matrices? Code and raw dataset attached. Thank you for any assistance or guidance you may offer! Lindsey University of Oklahoma ________________________________ From: Tate, Lindsey R. Sent: Tuesday, June 28, 2016 3:05 AM To: fieldtrip at science.ru.nl Subject: Beamforming, "Inf" during source estimation by subject Hello Fieldtrip Community, I've been working on beamforming the MEG data collected from 16 subjects during a saccade task. This is my first time beamforming so I've been heavily relying on the tutorial. When I collapse trials across subjects and do beamforming, I can get the ft_sourceplot commands to produce something that makes some sense. However, I need to be able to have the data separated by subject for ft_sourcestatistics. I've created structures that should work for this purpose and that look correct. However, the ".pow" from the Neural Activity Index calculation step ends up mostly "NaN" and partly "Inf" when I run the beamforming divided by subject. Is this related to the number of trials per subject somehow (e.g., do I have too few? is there some kind of setting I need to change?)? Why is the ".pow" coming back "Inf" instead of a real number? Does anyone have suggestions for fixing this problem so that I don't get "Inf" anymore? My code and raw data structure are attached. Thank you, Lindsey Tate University of Oklahoma -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: BF_trial4.m URL: From lindseyrtate at ou.edu Thu Jun 30 08:22:46 2016 From: lindseyrtate at ou.edu (Tate, Lindsey R.) Date: Thu, 30 Jun 2016 06:22:46 +0000 Subject: [FieldTrip] Tate, Lindsey R. wants to share the file dataFIC4.mat with you Message-ID: To view dataFIC4.mat, sign in or create an account. -------------- next part -------------- An HTML attachment was scrubbed... URL: From B.Haendel at gmx.net Thu Jun 30 12:03:01 2016 From: B.Haendel at gmx.net (Barbara Haendel) Date: Thu, 30 Jun 2016 12:03:01 +0200 Subject: [FieldTrip] Postdoc/PhD positions: cognitive Neuroscience - University of Wuerzburg (Germany) Message-ID: An HTML attachment was scrubbed... URL: From alexandre.gramfort at telecom-paristech.fr Thu Jun 30 18:50:32 2016 From: alexandre.gramfort at telecom-paristech.fr (Alexandre Gramfort) Date: Thu, 30 Jun 2016 18:50:32 +0200 Subject: [FieldTrip] [JOB] Post Doc Machine Learning for neuroscience time series Message-ID: *Post-Doc/Research position in:* *Supervised learning on neuroscience time-series with application to epilepsy* Place: TELECOM ParisTech, 75013 Paris, France Duration: 1 year (extension possible) Start: Any date from September 1st, 2016 Salary: according to background and experience *Keywords:* machine learning, time-series, optimization, conditional random fields (CRF), representation learning, electroencephalography (EEG) *Position description* The objective of the project is to develop machine learning tools that can facilitate the review, the visualization, the processing and the annotation of clinical intracranial EEG data in the context of epilepsy. Epilepsy is a pathology that leads to prototypical patterns in the recorded time series (spikes, high frequency oscillations, seizures). The objective of the project is to build algorithms that automatically pinpoint such events in raw intracranial EEG data. The approach envisioned is based on state-of-the-art machine learning techniques (representation learning, conditional random fields). The position is funded by a joint grant between Alexandre Gramfort and Slim Essid at the Signal and Image Processing department at Telecom ParisTech, the companies Dataiku and Bioserenity as well as the ICM Institute at the Salpétrière hospital. *Work Environment* TELECOM ParisTech is the leading graduate School of Institut TELECOM with more than 160 research professors and over 250 Engineering degrees, 50 PhD and 150 specialized masters (post graduates) awarded per year. The signal and image processing (TSI) department conducts leading research in the field of statistics, machine learning and signal processing with regular publications in leading conferences (NIPS, ICML, ICCASP, etc.) and journals (JMLR, IEEE Trans. Med. Imaging, IEEE Trans. Signal Processing, etc.). The candidate will be integrated to a team formed by 6 PIs, more than 10 PhD students, 4 engineers and 3 post-docs, among which are 6 persons dedicated to the statistical analysis of electrophysiological signals. The local expertise is unique with both significant experience in signal processing, machine learning, statistics and in applied neuroscience data munging. *Candidate Profile* As minimum requirements, the candidate will have: a PhD in computer science, statistics / machine learning, signal processing strong programming skills (Experience with Python is a definite plus) strong communication skills in English. The ideal candidate would also have: - Prior experience with EEG data analysis and/or electrophysiology signals - Ability to work in a multi-partner collaborative environment. - Basic knowledge of French (not required). *Contacts *Interested applicants can contact Alexandre Gramfort or Slim Essid for more information or directly email a candidacy letter including a Curriculum Vitae, a list of publications and a statement of research interests. - Alexandre Gramfort (alexandre.gramfort at telecom-paristech.fr) - Slim Essid (slim.essid at telecom-paristech.fr) -------------- next part -------------- An HTML attachment was scrubbed... URL: