From jan.schnupp at dpag.ox.ac.uk Mon Feb 1 11:24:47 2016 From: jan.schnupp at dpag.ox.ac.uk (Jan Schnupp) Date: Mon, 1 Feb 2016 10:24:47 +0000 Subject: [FieldTrip] Postdoc and PhD opportunities in Auditory Neuroscience in Hong Kong Message-ID: One postdoctoral position and two PhD graduate studentships in auditory neuroscience are available from June 2016 in a new research group set up by Prof. Jan Schnupp at the City University of Hong Kong. Our lab will use electrophysiological and psychoacoustic techniques to study neural mechanisms of auditory perception in humans and rats. Experiments studying plastic changes in the central auditory pathway following cochlear implant stimulation are also planned. Hong Kong is an exceptionally vibrant and exciting place to live and work. Key techniques in our research include the digital processing of electrophysiological and acoustic signals, as well as automating the behavioral psychoacoustic testing of experimental animals. We are therefore particularly interested in candidates with a background, or at least an interest, in computer programming, computational and or statistical modelling, and perhaps a little electronics. Experience in animal handling, small animal surgery and electrophysiological recordings would also be desirable. Interested parties please contact jan_hk at schnupp.net -- Prof Jan Schnupp University of Oxford Dept. of Physiology, Anatomy and Genetics Sherrington Building - Parks Road Oxford OX1 3PT - UK +44-1865-282012 http://jan.schnupp.net -------------- next part -------------- An HTML attachment was scrubbed... URL: From johannes.tuennerhoff at hotmail.com Mon Feb 1 11:33:26 2016 From: johannes.tuennerhoff at hotmail.com (Johannes Tuennerhoff) Date: Mon, 1 Feb 2016 11:33:26 +0100 Subject: [FieldTrip] between group statistics of coherence Message-ID: Dear Eric, dear other experts, We conduct a study that involves corticomuscular coherence analyses and I am still a bit new to the field. Even though I read several papers and searched the fieldtrip mailing list, I am still not sure how to do the statistical testing correctly. I read your message "coherence and group analysis" from April 21 2015 with great interest and I was hoping you could maybe give me some advice. There are two groups and each group has the same condition (a motor movement task). I have the coherence spectra for the range 5-55Hz (binned at 0.3Hz) of an EEG signal x and an EMG signal y in 24 healthy controls and 19 patients and I would like to test if there is a significant difference between the two groups. The coherence of the individual subjects was computed from around 120 segments of each 3s. Specifically I have the following questions: 1. Can I use the fieldtrip function ft_freqstatistics to calculate Monte-Carlo estimates of the significance probabilities and setting cfg.statistic = 'indepsamplesT' using the coherence spectra as data? Or would I need to do a manual z-transformation like z1=atanh(Coh)-1/(dof1-2) beforehand? If I understood it right cant use cfg.statistic = 'indepsamplesZcoh' because it is just meant for within subject designs. Would I need to take tapers and segments into account for the degrees of freedom? 2. Would I need to correct for multiple comparisons when I use a Monte-Carlo aproach? If I would like to, could I just use the cfg.correctm='bonferroni' or 'fdr' option in fieldtrip? 3. I think I saw other groups just using a parametric chi-square test, would you consider this aproach correct too? 4. Would it be valid to conduct a repeated measures ANOVA first with GROUP as between-subject effect and frequency bins as within-subject effect? 5. Could I use the parametric tests (3. and 4.) after a z-transformation? I will be very happy about any suggestions and opinions. Thank you very much. Best regards Johannes -------------- next part -------------- An HTML attachment was scrubbed... URL: From david.syloni at gmail.com Mon Feb 1 13:40:38 2016 From: david.syloni at gmail.com (David Syloni) Date: Mon, 1 Feb 2016 14:40:38 +0200 Subject: [FieldTrip] Circular Correlation coefficient Message-ID: Dear Fieldtripers, I'm trying to apply connectivity analysis with continuous EEG data. I'm using: cfg = []; cfg.method = 'mtmfft'; cfg.taper = 'dpss'; cfg.output = 'fourier'; cfg.tapsmofrq = 4; cfg.width=2; cfg.foilim = [0 250]; cfg.keeptrials = 'yes'; freq = ft_freqanalysis(cfg, data_no_artifacts); cfg = []; cfg.method = 'plv'; 'mtmfft' cfg.foilim = [8 12]; cfg.bandwidth=5; cfg.tapsmofrq = 4; cfg.keeptrials = 'yes'; cfg.output = 'powandcsd'; cfg.channelcmb = c; coh = ft_connectivityanalysis(cfg, freq); Right now I should calculate Circular Correlation and I'm stuck with it. I would very appreciate your help! Thanks in advance, David -------------- next part -------------- An HTML attachment was scrubbed... URL: From harold.cav89 at gmail.com Mon Feb 1 13:41:59 2016 From: harold.cav89 at gmail.com (Harold Cavendish) Date: Mon, 1 Feb 2016 13:41:59 +0100 Subject: [FieldTrip] ft_topoplotER(): reference to non-existent field 'topo' Message-ID: Dear FieldTrip users, I've been trying to use my manually created data structure containing averaged ERP from 28 subjects and 61 channels, each lasting 1075 time points as per these instructions: http://www.fieldtriptoolbox.org/faq/how_can_i_import_my_own_dataformat *data.mat:* label: {61x1 cell} fsample: 250 trial: {1x28 cell} columns: [61x1075 double] time: {1x28 cell} elec: [1x1 struct] chanpos: [61x3 double] elecpos: [61x3 double] label: {61x1 cell} unit: 'cm' avg: [61x1075 double] to construct ERP topoplots using ft_topoplotER() and whatever else will be needed for a timelocked analysis (I've already used the same data structure to do a permutation test with success). To do that, I've been following this tutorial: http://www.fieldtriptoolbox.org/tutorial/plotting#topoplot_functions > cfg = []; > cfg.xlim = [450 500] % arbitrary time interval > cfg.layout = 'M10.lay' % custom layout; the provided easycapM10.mat has different labels > ft_topoplotER(cfg, data) This, however, produced the following error: *Reference to non-existent field 'topo'.* *Error in ft_datatype_comp (line 92)* * if size(comp.topo,1)==size(comp.topo,2)* *Error in ft_checkdata (line 358)* * data = ft_datatype_comp(data);* *Error in topoplot_common (line 74)* *data = ft_checkdata(data, 'datatype', {'comp', 'timelock', 'freq'});* *Error in ft_topoplotER (line 192)* *cfg = topoplot_common(cfg, varargin{:});* Using common sense, I ‘fixed’ topoplot_common.m by changing the order of cell parameters at line 74 so that 'timelock' was before 'comp' and it worked – I can see no errors and the topoplots look okay. Could you please help me understand what's the issue? Although it works now, I would like to future-proof my data and make it all reproducible. I think it's trying to figure out whether my data is timelocked, in the frequency domain, or perhaps a composite, but it seems that the detection algorithm is either faulty (I haven't seen this ‘topo’ field in any example so far) or my data structure is missing something (I couldn't find another topoplot-ready EEG data among the tutorial files to compare them, unfortunately, and MEG files appear to be considerably different). Thank you! Best wishes, Harold -------------- next part -------------- An HTML attachment was scrubbed... URL: From andreas.wutz-1 at unitn.it Mon Feb 1 23:36:22 2016 From: andreas.wutz-1 at unitn.it (Andreas Gerhard Wutz) Date: Mon, 1 Feb 2016 17:36:22 -0500 Subject: [FieldTrip] importing data from blackrock Message-ID: Dear Fieldtrip community, I am trying to read in LFP data from a blackrock system. I started out with the sample code provided here: http://www.fieldtriptoolbox.org/getting_started/blackrock I use Windows 7 (64-bit), Matlab 2011b (32-bit), downloaded and installed the latest version of Fieldtrip (20160128) and of the NPMK toolbox. Unfortunately, I didn't come very far. Here is my code: filename = 'my_data.ns2'; data = ft_read_data(filename, 'headerformat', 'neuroshare'); Immediately exits with the following error message: "Invalid MEX-file" pointing to "fieldtrip/external/neuroshare/mexprog.dll": The specified procedure could not be found. Error in ns_SetLibrary (line 39) Error in read_neuroshare (line 82) Error in ft_read_header (line 2056) Error in ft_read_data (line 197) What options do I have to get this going? Thank you very much for your help. Best, Andreas -- Andreas Wutz, PhD Post-doctoral researcher Center for Mind/Brain Sciences (CiMeC) University of Trento Rovereto, Italy -------------- next part -------------- An HTML attachment was scrubbed... URL: From jan.schoffelen at donders.ru.nl Tue Feb 2 07:55:51 2016 From: jan.schoffelen at donders.ru.nl (Schoffelen, J.M. (Jan Mathijs)) Date: Tue, 2 Feb 2016 06:55:51 +0000 Subject: [FieldTrip] importing data from blackrock In-Reply-To: References: Message-ID: Hi Andreas, At this moment the code that uses the NPMK toolbox for fileio is not yet functional. I have started working on this a bit, but did not have time (and urgency) to complete this yet. The neuroshare code is based on very outdated (windows support only) mex-code, and it does not surprise me that it does not work for you. If you specify ‘headerformat’ and ‘dataformat’ to be ‘blackrock_nsx’ the code should take the correct turn, and end up at a portion of the m-file that is calling the NPMK functions. However, you will hit a keyboard statement right away, so you would need to provide some additional code, that is reformatting the output of the lower-level NPMK function into the shape that FieldTrip can work with. I think you could get some inspiration from the documentation about the support for different data formats as well as some examples from the various dataformats as implemented in ft_read_data. If you can provide me with some functional code, I will be happy to plug it into the release version of FieldTrip. I also suggest you to create an account on our bugzilla server: bugzilla.fieldtriptoolbox.org, and assign yourself to the CC-list of bug 2964. Any progress you make, code suggestions, as well as questions regarding to the implementation of this dataformat can be posted here. Since I don’t have dedicated time to work on this right now, the easiest way forward would be if you investigate a bit more yourself and come up with good suggestions. This will expedite the process greatly. Thanks, and best wishes, Jan-Mathijs On Feb 1, 2016, at 11:36 PM, Andreas Gerhard Wutz > wrote: Dear Fieldtrip community, I am trying to read in LFP data from a blackrock system. I started out with the sample code provided here: http://www.fieldtriptoolbox.org/getting_started/blackrock I use Windows 7 (64-bit), Matlab 2011b (32-bit), downloaded and installed the latest version of Fieldtrip (20160128) and of the NPMK toolbox. Unfortunately, I didn't come very far. Here is my code: filename = 'my_data.ns2'; data = ft_read_data(filename, 'headerformat', 'neuroshare'); Immediately exits with the following error message: "Invalid MEX-file" pointing to "fieldtrip/external/neuroshare/mexprog.dll": The specified procedure could not be found. Error in ns_SetLibrary (line 39) Error in read_neuroshare (line 82) Error in ft_read_header (line 2056) Error in ft_read_data (line 197) What options do I have to get this going? Thank you very much for your help. Best, Andreas -- Andreas Wutz, PhD Post-doctoral researcher Center for Mind/Brain Sciences (CiMeC) University of Trento Rovereto, Italy _______________________________________________ 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 julian.keil at gmail.com Tue Feb 2 08:57:10 2016 From: julian.keil at gmail.com (Julian Keil) Date: Tue, 2 Feb 2016 08:57:10 +0100 Subject: [FieldTrip] Circular Correlation coefficient In-Reply-To: References: Message-ID: Hi David, to compute circular statistics (e.g. phase correlations) you need to leave fieldtrip a bit. Here's the toolbox I usually use: http://www.mathworks.com/matlabcentral/fileexchange/10676-circular-statistics-toolbox--directional-statistics- As you don't describe why you need circular statistics, it's a bit hard to give a more helpful answer. Good luck, Julian Am 01.02.2016 um 13:40 schrieb David Syloni: > Dear Fieldtripers, > > I'm trying to apply connectivity analysis with continuous EEG data. > > I'm using: > > > > cfg = []; > cfg.method = 'mtmfft'; > cfg.taper = 'dpss'; > cfg.output = 'fourier'; > cfg.tapsmofrq = 4; > cfg.width=2; > cfg.foilim = [0 250]; > cfg.keeptrials = 'yes'; > freq = ft_freqanalysis(cfg, data_no_artifacts); > > > > > cfg = []; > cfg.method = 'plv'; > 'mtmfft' > cfg.foilim = [8 12]; > cfg.bandwidth=5; > cfg.tapsmofrq = 4; > cfg.keeptrials = 'yes'; > cfg.output = 'powandcsd'; > cfg.channelcmb = c; > coh = ft_connectivityanalysis(cfg, freq); > > Right now I should calculate Circular Correlation and I'm stuck with it. > > I would very appreciate your help! > > Thanks in advance, > > David > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -------------- 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 david.syloni at gmail.com Tue Feb 2 09:14:30 2016 From: david.syloni at gmail.com (David Syloni) Date: Tue, 2 Feb 2016 10:14:30 +0200 Subject: [FieldTrip] Circular Correlation coefficient In-Reply-To: References: Message-ID: Dear Julian, Thank you for the answer. I was asked by reviewers to calculate circular correlation instead of PLV. Sorry for too general description. Actually, I found the toolbox , but I don't understand how to compute " sample of angles in radians" (the input for the circ_corrcc function ). I would very appreciate a help to transform my fieldtrip data to the input format , required by circ_corrcc. Thanks! David On Tue, Feb 2, 2016 at 9:57 AM, Julian Keil wrote: > Hi David, > > to compute circular statistics (e.g. phase correlations) you need to leave > fieldtrip a bit. > Here's the toolbox I usually use: > http://www.mathworks.com/matlabcentral/fileexchange/10676-circular-statistics-toolbox--directional-statistics- > > As you don't describe why you need circular statistics, it's a bit hard to > give a more helpful answer. > > Good luck, > > Julian > > Am 01.02.2016 um 13:40 schrieb David Syloni: > > > Dear Fieldtripers, > > > > I'm trying to apply connectivity analysis with continuous EEG data. > > > > I'm using: > > > > > > > > cfg = []; > > cfg.method = 'mtmfft'; > > cfg.taper = 'dpss'; > > cfg.output = 'fourier'; > > cfg.tapsmofrq = 4; > > cfg.width=2; > > cfg.foilim = [0 250]; > > cfg.keeptrials = 'yes'; > > freq = ft_freqanalysis(cfg, data_no_artifacts); > > > > > > > > > > cfg = []; > > cfg.method = 'plv'; > > 'mtmfft' > > cfg.foilim = [8 12]; > > cfg.bandwidth=5; > > cfg.tapsmofrq = 4; > > cfg.keeptrials = 'yes'; > > cfg.output = 'powandcsd'; > > cfg.channelcmb = c; > > coh = ft_connectivityanalysis(cfg, freq); > > > > Right now I should calculate Circular Correlation and I'm stuck with it. > > > > I would very appreciate your help! > > > > Thanks in advance, > > > > David > > _______________________________________________ > > 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 julian.keil at gmail.com Tue Feb 2 12:51:37 2016 From: julian.keil at gmail.com (Julian Keil) Date: Tue, 2 Feb 2016 12:51:37 +0100 Subject: [FieldTrip] Circular Correlation coefficient In-Reply-To: References: Message-ID: Dear David, I won't discuss whether this is a sensible comment by the reviewer, but here are some basic steps that you could take. To compute the circular correlation between two signals, you obviously need to obtain the phase angles first. One option to do this is to use a Hilbert transform on band-pass filtered data (on a single-trial level) As soon as you have your single trial phase angles, you can compute the correlation between two signals within each subject. Once you have done this, you could see whether there is a consistent pattern over subjects. You can find similar approaches in the following papers: van Elswijk, G., Maij, F., Schoffelen, J.-M., Overeem, S., Stegeman, D. F., & Fries, P. (2010). Corticospinal Beta-Band Synchronization Entails Rhythmic Gain Modulation. Journal of Neuroscience, 30(12), 4481–4488. http://doi.org/10.1523/JNEUROSCI.2794-09.2010 Keil, J., Timm, J., SanMiguel, I., Schulz, H., Obleser, J., & Schonwiesner, M. (2014). Cortical brain states and corticospinal synchronization influence TMS-evoked motor potentials. Journal of Neurophysiology, 111(3), 513–519. http://doi.org/10.1152/jn.00387.2013 Good luck, Julian Am 02.02.2016 um 09:14 schrieb David Syloni: > Dear Julian, > > Thank you for the answer. I was asked by reviewers to calculate circular correlation instead of PLV. Sorry for too general description. > Actually, I found the toolbox , but I don't understand how to compute " sample of angles in radians" (the input for the circ_corrcc function ). > I would very appreciate a help to transform my fieldtrip data to the input format , required by circ_corrcc. > > Thanks! > > > David > > On Tue, Feb 2, 2016 at 9:57 AM, Julian Keil wrote: > Hi David, > > to compute circular statistics (e.g. phase correlations) you need to leave fieldtrip a bit. > Here's the toolbox I usually use: http://www.mathworks.com/matlabcentral/fileexchange/10676-circular-statistics-toolbox--directional-statistics- > > As you don't describe why you need circular statistics, it's a bit hard to give a more helpful answer. > > Good luck, > > Julian > > Am 01.02.2016 um 13:40 schrieb David Syloni: > > > Dear Fieldtripers, > > > > I'm trying to apply connectivity analysis with continuous EEG data. > > > > I'm using: > > > > > > > > cfg = []; > > cfg.method = 'mtmfft'; > > cfg.taper = 'dpss'; > > cfg.output = 'fourier'; > > cfg.tapsmofrq = 4; > > cfg.width=2; > > cfg.foilim = [0 250]; > > cfg.keeptrials = 'yes'; > > freq = ft_freqanalysis(cfg, data_no_artifacts); > > > > > > > > > > cfg = []; > > cfg.method = 'plv'; > > 'mtmfft' > > cfg.foilim = [8 12]; > > cfg.bandwidth=5; > > cfg.tapsmofrq = 4; > > cfg.keeptrials = 'yes'; > > cfg.output = 'powandcsd'; > > cfg.channelcmb = c; > > coh = ft_connectivityanalysis(cfg, freq); > > > > Right now I should calculate Circular Correlation and I'm stuck with it. > > > > I would very appreciate your help! > > > > Thanks in advance, > > > > David > > _______________________________________________ > > 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: -------------- 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 alik.widge at gmail.com Tue Feb 2 15:59:56 2016 From: alik.widge at gmail.com (Alik Widge) Date: Tue, 2 Feb 2016 09:59:56 -0500 Subject: [FieldTrip] Power calculations for cluster-corrected stats? In-Reply-To: References: Message-ID: Dear all, We're working on a plan for a new study in which we plan to be analyzing EEG in sensor space, taking the Maris/Oostenveld cluster correction approach since we do not have a clear sense of where our spectral perturbations will be. Here's the question: has anyone seen a paper talking about how to do a priori power analysis for this approach? The only thing I can think to do is guess at an effect size based on similar studies, then simulate out various sample sizes and trial counts by adding a simulated signal to some existing EEG dataset. The problem I'm seeing is that exploring the (nsubject,ntrials) space in that stimulation approach is going to take quite a while, since it's multiple instances of an at least 200+ permutation at every possible sample size combination. More so if I want to explore the consequences of bad assumptions about effect size. Anyone know of a more elegant approach? Our literature searches have not been fruitful. -------------- next part -------------- An HTML attachment was scrubbed... URL: From son.ta.dinh at tum.de Tue Feb 2 16:51:17 2016 From: son.ta.dinh at tum.de (Ta Dinh, Son) Date: Tue, 2 Feb 2016 15:51:17 +0000 Subject: [FieldTrip] Axes shift using ft_multiplotER Message-ID: <6ddf332554784a02a77315c36fcd66f5@BADWLRZ-SW13MB3.ads.mwn.de> Dear FieldTrip community, My name is Son Ta Dinh and I am working in the Painlab group of Markus Ploner in Munich on EEG resting state in chronic pain conditions. I have recently started using FieldTrip and am currently trying to use ft_multiplotER to create an overview of the power spectra of all the electrodes in specific frequency bands. In principle, this works without a problem. However, I have noticed that the axes of the plot are shifted so that the origin is always included in the plot, even when my data does not include the low frequencies around 0. This creates weird overlaps as can be seen in the attached figure or the picture below. Is this intended or am I missing some setting to get the right plots? My cfg consists only of the path to the layout-file, cfg.showlabels = 'yes' and cfg.showoutline = 'yes' My data looks like this: Data.label: {65x1 cell} Data.dimord: 'chan_freq' Data.freq: [1x61 double] Data.powspctrm: [65x61 double] Data.cfg: [1x1 struct] Unexpectedly, when I change the hlim to e.g. [40 60] instead of the [40 100] that is shown in the figure below, the shift becomes even more pronounced. When using ft_singleplotER though, the axes are shown correctly, without any shifts in x- nor y-direction. As a workaround, I have tried setting cfg.axes = 'no' and cfg.box = 'yes', which fits the plots into a box and works better, though not optimally as the labels are partially covered. I would be grateful if anybody could point out any mistakes in my usage of ft_multiplotER or offer better alternatives/workarounds. Best regards, Son Son Ta Dinh, M.Sc. PhD student in Human Pain Research Klinikum rechts der Isar Technische Universität München Munich, Germany Phone: +49 89 4140 7664 http://www.painlabmunich.de/ [cid:image002.jpg at 01D15DD9.EC4E83F0] -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image002.jpg Type: image/jpeg Size: 41698 bytes Desc: image002.jpg URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: testplot_multiplotER.png Type: image/png Size: 74873 bytes Desc: testplot_multiplotER.png URL: From david.syloni at gmail.com Tue Feb 2 17:04:52 2016 From: david.syloni at gmail.com (David Syloni) Date: Tue, 2 Feb 2016 18:04:52 +0200 Subject: [FieldTrip] Circular Correlation coefficient In-Reply-To: References: Message-ID: Dear Julian, Thank you for the answer. I will try to apply it as you described. However, it's important to note, that my data doesn't contain real trials, this is a EEG during one continuous stimulus (110 sec). Can your approach work also for this case? Thanks, David On Tue, Feb 2, 2016 at 1:51 PM, Julian Keil wrote: > Dear David, > > I won't discuss whether this is a sensible comment by the reviewer, but > here are some basic steps that you could take. > > To compute the circular correlation between two signals, you obviously > need to obtain the phase angles first. > One option to do this is to use a Hilbert transform on band-pass filtered > data (on a single-trial level) > As soon as you have your single trial phase angles, you can compute the > correlation between two signals within each subject. > Once you have done this, you could see whether there is a consistent > pattern over subjects. > > You can find similar approaches in the following papers: > > van Elswijk, G., Maij, F., Schoffelen, J.-M., Overeem, S., Stegeman, D. > F., & Fries, P. (2010). Corticospinal Beta-Band Synchronization Entails > Rhythmic Gain Modulation. Journal of Neuroscience, 30(12), 4481–4488. > http://doi.org/10.1523/JNEUROSCI.2794-09.2010 > > Keil, J., Timm, J., SanMiguel, I., Schulz, H., Obleser, J., & > Schonwiesner, M. (2014). Cortical brain states and corticospinal > synchronization influence TMS-evoked motor potentials. Journal of > Neurophysiology, 111(3), 513–519. http://doi.org/10.1152/jn.00387.2013 > > Good luck, > > Julian > > Am 02.02.2016 um 09:14 schrieb David Syloni: > > Dear Julian, > > Thank you for the answer. I was asked by reviewers to calculate circular > correlation instead of PLV. Sorry for too general description. > Actually, I found the toolbox , but I don't understand how to compute > " sample of angles in radians" (the input for the circ_corrcc function ). > I would very appreciate a help to transform my fieldtrip data to the input > format , required by circ_corrcc. > > Thanks! > > > David > > On Tue, Feb 2, 2016 at 9:57 AM, Julian Keil wrote: > >> Hi David, >> >> to compute circular statistics (e.g. phase correlations) you need to >> leave fieldtrip a bit. >> Here's the toolbox I usually use: >> http://www.mathworks.com/matlabcentral/fileexchange/10676-circular-statistics-toolbox--directional-statistics- >> >> As you don't describe why you need circular statistics, it's a bit hard >> to give a more helpful answer. >> >> Good luck, >> >> Julian >> >> Am 01.02.2016 um 13:40 schrieb David Syloni: >> >> > Dear Fieldtripers, >> > >> > I'm trying to apply connectivity analysis with continuous EEG data. >> > >> > I'm using: >> > >> > >> > >> > cfg = []; >> > cfg.method = 'mtmfft'; >> > cfg.taper = 'dpss'; >> > cfg.output = 'fourier'; >> > cfg.tapsmofrq = 4; >> > cfg.width=2; >> > cfg.foilim = [0 250]; >> > cfg.keeptrials = 'yes'; >> > freq = ft_freqanalysis(cfg, data_no_artifacts); >> > >> > >> > >> > >> > cfg = []; >> > cfg.method = 'plv'; >> > 'mtmfft' >> > cfg.foilim = [8 12]; >> > cfg.bandwidth=5; >> > cfg.tapsmofrq = 4; >> > cfg.keeptrials = 'yes'; >> > cfg.output = 'powandcsd'; >> > cfg.channelcmb = c; >> > coh = ft_connectivityanalysis(cfg, freq); >> > >> > Right now I should calculate Circular Correlation and I'm stuck with >> it. >> > >> > I would very appreciate your help! >> > >> > Thanks in advance, >> > >> > David >> > _______________________________________________ >> > 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 > > > > _______________________________________________ > 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 andrembastos at gmail.com Tue Feb 2 18:17:58 2016 From: andrembastos at gmail.com (=?UTF-8?Q?Andr=C3=A9_Bastos?=) Date: Tue, 2 Feb 2016 12:17:58 -0500 Subject: [FieldTrip] importing data from blackrock In-Reply-To: References: Message-ID: Hey JM, I just handed Andreas some code to read in the data to MATLAB using the openNSx.m (for importing continuous raw data) and openNEV (for spikes and event codes), and then a Fieldtrip data structure can be created by hand relative to events of interest or for the whole length of the session. I know this is probably not the ideal solution from a FT development point of view, but it's working for us which means also limited urgency to change. I would be able to eventually work towards a more aesthetically pleasing solution, especially if Andreas can help! Cheers, Andre On Tue, Feb 2, 2016 at 1:55 AM, Schoffelen, J.M. (Jan Mathijs) < jan.schoffelen at donders.ru.nl> wrote: > Hi Andreas, > > At this moment the code that uses the NPMK toolbox for fileio is not yet > functional. I have started working on this a bit, but did not have time > (and urgency) to complete this yet. > The neuroshare code is based on very outdated (windows support only) > mex-code, and it does not surprise me that it does not work for you. > > If you specify ‘headerformat’ and ‘dataformat’ to be ‘blackrock_nsx’ the > code should take the correct turn, and end up at a portion of the m-file > that is calling the NPMK functions. > However, you will hit a keyboard statement right away, so you would need > to provide some additional code, that is reformatting the output of the > lower-level NPMK function into the shape that FieldTrip can work with. I > think you could get some inspiration from the documentation about the > support for different data formats as well as some examples from the > various dataformats as implemented in ft_read_data. If you can provide me > with some functional code, I will be happy to plug it into the release > version of FieldTrip. I also suggest you to create an account on our > bugzilla server: bugzilla.fieldtriptoolbox.org, and assign yourself to > the CC-list of bug 2964. Any progress you make, code suggestions, as well > as questions regarding to the implementation of this dataformat can be > posted here. > > Since I don’t have dedicated time to work on this right now, the easiest > way forward would be if you investigate a bit more yourself and come up > with good suggestions. This will expedite the process greatly. > > Thanks, and best wishes, > > Jan-Mathijs > > > > On Feb 1, 2016, at 11:36 PM, Andreas Gerhard Wutz > wrote: > > Dear Fieldtrip community, > > I am trying to read in LFP data from a blackrock system. I started out > with the sample code provided here: > http://www.fieldtriptoolbox.org/getting_started/blackrock > > I use Windows 7 (64-bit), Matlab 2011b (32-bit), downloaded and installed > the latest version of Fieldtrip (20160128) and of the NPMK toolbox. > > Unfortunately, I didn't come very far. > Here is my code: > > filename = 'my_data.ns2'; > data = ft_read_data(filename, 'headerformat', 'neuroshare'); > > Immediately exits with the following error message: > "Invalid MEX-file" pointing to > "fieldtrip/external/neuroshare/mexprog.dll": The specified procedure could > not be found. > > Error in ns_SetLibrary (line 39) > Error in read_neuroshare (line 82) > Error in ft_read_header (line 2056) > Error in ft_read_data (line 197) > > What options do I have to get this going? > Thank you very much for your help. > Best, > Andreas > > > > > > > > -- > Andreas Wutz, PhD > Post-doctoral researcher > Center for Mind/Brain Sciences (CiMeC) > University of Trento > Rovereto, Italy > _______________________________________________ > 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 Wed Feb 3 08:57:46 2016 From: jan.schoffelen at donders.ru.nl (Schoffelen, J.M. (Jan Mathijs)) Date: Wed, 3 Feb 2016 07:57:46 +0000 Subject: [FieldTrip] importing data from blackrock In-Reply-To: References: Message-ID: Hi Andre, Thanks for thinking along and this contribution. I am aware of these functions, and these are essentially already built into fieldtrip, although not fully functional yet. Have a look at ft_read_data and ft_read_header, and search for ‘blackrock’. It’s just the internal data bookkeeping that needs to be sorted out, as well as some potential data scaling issues. If you have some insights in this regard, please do sign up for bug 2964 and chime in. Cheers, JM On Feb 2, 2016, at 6:17 PM, André Bastos > wrote: Hey JM, I just handed Andreas some code to read in the data to MATLAB using the openNSx.m (for importing continuous raw data) and openNEV (for spikes and event codes), and then a Fieldtrip data structure can be created by hand relative to events of interest or for the whole length of the session. I know this is probably not the ideal solution from a FT development point of view, but it's working for us which means also limited urgency to change. I would be able to eventually work towards a more aesthetically pleasing solution, especially if Andreas can help! Cheers, Andre On Tue, Feb 2, 2016 at 1:55 AM, Schoffelen, J.M. (Jan Mathijs) > wrote: Hi Andreas, At this moment the code that uses the NPMK toolbox for fileio is not yet functional. I have started working on this a bit, but did not have time (and urgency) to complete this yet. The neuroshare code is based on very outdated (windows support only) mex-code, and it does not surprise me that it does not work for you. If you specify ‘headerformat’ and ‘dataformat’ to be ‘blackrock_nsx’ the code should take the correct turn, and end up at a portion of the m-file that is calling the NPMK functions. However, you will hit a keyboard statement right away, so you would need to provide some additional code, that is reformatting the output of the lower-level NPMK function into the shape that FieldTrip can work with. I think you could get some inspiration from the documentation about the support for different data formats as well as some examples from the various dataformats as implemented in ft_read_data. If you can provide me with some functional code, I will be happy to plug it into the release version of FieldTrip. I also suggest you to create an account on our bugzilla server: bugzilla.fieldtriptoolbox.org, and assign yourself to the CC-list of bug 2964. Any progress you make, code suggestions, as well as questions regarding to the implementation of this dataformat can be posted here. Since I don’t have dedicated time to work on this right now, the easiest way forward would be if you investigate a bit more yourself and come up with good suggestions. This will expedite the process greatly. Thanks, and best wishes, Jan-Mathijs On Feb 1, 2016, at 11:36 PM, Andreas Gerhard Wutz > wrote: Dear Fieldtrip community, I am trying to read in LFP data from a blackrock system. I started out with the sample code provided here: http://www.fieldtriptoolbox.org/getting_started/blackrock I use Windows 7 (64-bit), Matlab 2011b (32-bit), downloaded and installed the latest version of Fieldtrip (20160128) and of the NPMK toolbox. Unfortunately, I didn't come very far. Here is my code: filename = 'my_data.ns2'; data = ft_read_data(filename, 'headerformat', 'neuroshare'); Immediately exits with the following error message: "Invalid MEX-file" pointing to "fieldtrip/external/neuroshare/mexprog.dll": The specified procedure could not be found. Error in ns_SetLibrary (line 39) Error in read_neuroshare (line 82) Error in ft_read_header (line 2056) Error in ft_read_data (line 197) What options do I have to get this going? Thank you very much for your help. Best, Andreas -- Andreas Wutz, PhD Post-doctoral researcher Center for Mind/Brain Sciences (CiMeC) University of Trento Rovereto, Italy _______________________________________________ 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 Harald.Bornfleth at besa.de Wed Feb 3 11:21:21 2016 From: Harald.Bornfleth at besa.de (Harald Bornfleth) Date: Wed, 3 Feb 2016 11:21:21 +0100 Subject: [FieldTrip] Comparing ICA methods between toolboxes (BESA vs. Fieldtrip) In-Reply-To: References: <1f8be01d14f99$8f379470$ada6bd50$@besa.de> Message-ID: <008c01d15e6c$a0ac4b60$e204e220$@besa.de> Hi Andrew, We discussed this dataset, and we believe that the component which you selected (ICA #22) is most likely a muscle artifact. The ICA components are sorted according to their variance, so the component #22 is one with very little variance. The question is whether you actually need to correct for this artifact. You may find it on only one or few electrodes – may be worth checking. If that is the case, you might consider setting the electrode to bad. The extended Infomax ICA method is not optimized for correcting muscle artifacts. It lends itself more to the correction of eye movements or cardiac artifacts. In the ICA decomposition that you sent, component #1 looks like an eye movement. Components #17 and #19 look like they have mains frequency on them. You can get rid of this by using the notch filter. Hope this helps. Best regards, Harald From: c.andrew123 at gmail.com [mailto:c.andrew123 at gmail.com] On Behalf Of Andrew Chang Sent: 29 January 2016 04:26 To: Harald.Bornfleth at besa.de Cc: FieldTrip discussion list ; Ille Nicole Subject: Re: [FieldTrip] Comparing ICA methods between toolboxes (BESA vs. Fieldtrip) Hi Harald, I did the ICA based on the continuos recorded block (~7 minutes), including 100 trials, with PCA option on. The attached file is the ICA topography and waveform (ICA 22). The spectrum showed that the peak power was at ~11Hz. I suspected it is a neck movement artifact, because the generator seems to be in the front of the neck. Also, I got another similar ICA component from another subject, and the topography seems to be centered at the back of the neck, would it be considered as neck movement too. Thank you very much once again! Best, Andrew On Mon, Jan 18, 2016 at 7:49 AM, Harald Bornfleth > wrote: Dear Andrew, A couple of questions popped up. 1) The neck movement artifact, is this something with low frequency, or is it a muscle artifact? 2) Did you calculate the ICA on one data screen (e.g. 10 seconds or 20 seconds), or over the whole data set? If you could send us screen shots showing the ICA wave forms and the accompanying topographies, then we could comment on the classification. (In BESA, you right-click on the label of a component and select “Map topography” to show the topography map of that component.) I include my colleague and ICA expert Nicole Ille on CC. Best regards, Harald From: c.andrew123 at gmail.com [mailto:c.andrew123 at gmail.com ] On Behalf Of Andrew Chang Sent: 17 January 2016 19:57 To: Harald.Bornfleth at besa.de ; FieldTrip discussion list > Subject: Re: [FieldTrip] Comparing ICA methods between toolboxes (BESA vs. Fieldtrip) Hi Dr. Bornfleth, Thanks for your reply very much. I would like to use ICA to remove eye blinks and eye movements, neck movements, as well as cardiac and powerline artifacts. The segment I have is a continuous EEG recording for 10 minutes, which is one block of my experiment including many trials. Before ICA, the segment have been high-pass (0.3 Hz) and low-pass (100 Hz). The components showing activities around the eyes, the back of the neck, and 60 Hz were removed. As for the cardiac artifact, I it is based on visual inspection on the waveform to see whether it looks like an EKG. Any further comments are appreciated! Best, Andrew On Fri, Jan 15, 2016 at 8:35 AM, Harald Bornfleth > wrote: Dear Andrew, Thanks for bringing this up. I can try to shed some light on the ICA method used in BESA Research; however, I can not comment on the implementation in FieldTrip. The method behind ICA analysis in BESA Research is the extended infomax ICA algorithm (Lee TW et al.: Independent component analysis using an extended infomax algorithm for mixed sub-Gaussian and super-Gaussian sources. Neural Computation 11(2), 1999, 409-433). This algorithm is very well suited to remove cardiac and powerline artifacts. Depending on the data, it may also be used to remove ocular (blink) and electrode artifacts. To assess whether your artifact removal is trustworthy more information about your processing steps are needed. What types of artifacts are you trying to correct? What segments are you using to determine the artifact topographies and what segments are you finally correcting? Best regards, Harald Dr. Harald Bornfleth Product Manager BESA Research BESA GmbH Freihamer Strasse 18 82166 Graefelfing/Germany http://www.besa.de E: Harald.Bornfleth at besa.de T: +49 89 8980 9968 HRB Munich 109956 CEO: Dr. Tobias Scherg, CFO: Theodor Scherg Director of Research: Dr. Michael Scherg From: fieldtrip-bounces at science.ru.nl [mailto:fieldtrip-bounces at science.ru.nl] On Behalf Of Andrew Chang Sent: Sonntag, 10. Januar 2016 21:18 To: fieldtrip at science.ru.nl Subject: [FieldTrip] Comparing ICA methods between toolboxes (BESA vs. Fieldtrip) Dear Fieldtrip users, I am wondering whether anyone has compared the performances of the ICA methods among M/EEG toolboxes. Especially, how is the performance of ICA in BESA Research 6.0, compared to Fieldtrip? I have an EEG data set which has been processed in BESA, including removing artifact using ICA. I am wondering whether I can trust it, or I should reprocess it in Fieldtrip. Any comments will be appreciated! Happy new year! Best, Andrew -- Andrew Chang Ph.D. Candidate Auditory Development Lab Department of Psychology, Neuroscience & Behaviour McMaster University http://changa5.wordpress.com/ _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -- Andrew Chang Ph.D. Candidate Auditory Development Lab Department of Psychology, Neuroscience & Behaviour McMaster University http://changa5.wordpress.com/ -- Andrew Chang Ph.D. Candidate Auditory Development Lab Department of Psychology, Neuroscience & Behaviour McMaster University http://changa5.wordpress.com/ -------------- next part -------------- An HTML attachment was scrubbed... URL: From K.Kalogianni at tudelft.nl Wed Feb 3 15:00:33 2016 From: K.Kalogianni at tudelft.nl (Konstantina Kalogianni) Date: Wed, 3 Feb 2016 14:00:33 +0000 Subject: [FieldTrip] MUSIC small bug and fail in retrieving simulation data location Message-ID: <4DF682D3A10EAC46B462A46E16F0B0493F90BF10@SRV364.tudelft.net> Dear fieldtrippers, I am doing a sanity check on the implementation of the MUSIC algorithm in fieldtrip, before applying it in real data. So after creating simulation data with sinusoids at a specific location and adding relative noise of 1.5, I am doing a music scan with the number of components as 1. The code for that is below (I used filedtrip version fieldtrip-20160101): %% leadfield should be generated for specific EEG signal addpath([ft_path,'fileio\']); addpath ([ft_path,'template\electrode\']); addpath ([ft_path,'template\headmodel\']); %% LOAD VOL ELEC MRI % load electrode locations elec=ft_read_sens('standard_1020.elc'); % load mri & vol (template) load('standard_mri.mat'); %units in mm load('standard_bem'); %% adjust electrode locations for 62 channels eeg elec.label=upper(elec.label); load([gendir 'label_62.mat'], 'label_62'); EEG.label=label_62; label_signal=upper(EEG.label); EEG.label=upper(EEG.label); elec2find=zeros(length(label_signal),1); for i=1:length(label_signal); elec2find(i,1)=find(strcmp(label_signal(i),elec.label)); end % elec with 62 locations based on SEP signal elec.chanpos=elec.chanpos((elec2find), :); elec.elecpos=elec.elecpos((elec2find), :); elec.label=elec.label((elec2find)); elec.label=upper(elec.label); % align elecs on vol if needed cfg = []; cfg.method = 'interactive'; cfg.elec = elec; cfg.headshape = vol.bnd(1); elec_aligned = ft_electroderealign(cfg); %% compute leadfield cfg = []; cfg.elec =elec_aligned; cfg.channel = EEG.label;% or common_channels_; cfg.reducerank = 3; cfg.headmodel = vol; % volume conduction headmodel cfg.normalize = 'yes'; cfg.grid.unit = 'mm'; cfg.grid.resolution = 5; leadfield = ft_prepare_leadfield(cfg, EEG); %% simulate EEG data, dipole in specific location loc1=[-30, -11, 65 ]; cfg = []; cfg.headmodel = vol ; cfg.elec = elec_aligned; cfg.fsample = 1024; % Hz cfg.dip.amplitude=[1]; cfg.dip.phase=[1]; cfg.dip.pos(1,:) = loc1; cfg.dip.mom(:,1) = [1 0 0]'; cfg.ntrials=500; cfg.triallength= 0.250; cfg.fsample=1024; cfg.relnoise = 1.5; epoch = ft_dipolesimulation(cfg); %% compute averaged dataset with covariance matrix cfg=[]; % cfg.covariance='yes'; avg = ft_timelockanalysis(cfg, epoch); %% cfg = []; cfg.method = 'music'; cfg.grid = load([gendir 'leadfield_templ.mat']); % leadfield, which has the grid information cfg.headmodel = load([gendir 'vol_temp.mat']);% volume conduction model (headmodel) cfg.elec = load([gendir 'elec_temp.mat']); cfg.channel = avg.label; cfg.music.numcomponent= 1; source_music = ft_sourceanalysis(cfg, avg); %% pos_max = zeros(1,3); [~,k]=max(source.avg.jr); [~,l]=min(source.avg.jr); music_max = source.pos(k, :); music_min = source.pos(l, :); First of all the code in music.m will only work if you change line 77 and 78 with the following lines: % select only the dipole positions inside the brain for scanning dip.inside = find(dip.inside==1); dip.pos = dip.pos(dip.inside,:); and line 103 with this lf = dip.leadfield{dip.inside(i)}; Otherwise it was not possible since the lf contained both the points inside and outside the brain But even after changing those lines both the minimum and the maximum of the music metric are not the original location. Original location was [-30, -11, 65 ] and minimum music metric gives [-55, -15, 58] while maximum music metric gives [50, -20, 8]. The same location repeats with both using the covariance matrix as an input in music or not and also by changing the relative noise to 0.5 instead of 1.5. Does someone run into the same type of problems with music? Thanks in advance for your help. K. (Nadia) Kalogianni PhD candidate TU Delft /Department of Biomechanical Engneering Neuromuscular Control Laboratory Mekelweg 2 2628 CD Delft Room: F-1-320 T +31 15-27 84230 E k.kalogianni at tudelft.nl -------------- next part -------------- An HTML attachment was scrubbed... URL: From david.syloni at gmail.com Wed Feb 3 17:25:21 2016 From: david.syloni at gmail.com (David Syloni) Date: Wed, 3 Feb 2016 18:25:21 +0200 Subject: [FieldTrip] Circular Correlation coefficient In-Reply-To: References: Message-ID: Dear Julian, To calculate Hilbert transform I created 0.5 sec "trials" from the data. and used hibert_t1 = ft_preproc_hilbert( cell2mat(data_no_artifacts.trial(1)), 'angle') Is it right? Thanks, David On Tue, Feb 2, 2016 at 6:04 PM, David Syloni wrote: > Dear Julian, > > Thank you for the answer. I will try to apply it as you described. > However, it's important to note, that my data doesn't contain real trials, > this is a EEG during one continuous stimulus (110 sec). > Can your approach work also for this case? > > > Thanks, > > > David > > On Tue, Feb 2, 2016 at 1:51 PM, Julian Keil wrote: > >> Dear David, >> >> I won't discuss whether this is a sensible comment by the reviewer, but >> here are some basic steps that you could take. >> >> To compute the circular correlation between two signals, you obviously >> need to obtain the phase angles first. >> One option to do this is to use a Hilbert transform on band-pass filtered >> data (on a single-trial level) >> As soon as you have your single trial phase angles, you can compute the >> correlation between two signals within each subject. >> Once you have done this, you could see whether there is a consistent >> pattern over subjects. >> >> You can find similar approaches in the following papers: >> >> van Elswijk, G., Maij, F., Schoffelen, J.-M., Overeem, S., Stegeman, D. >> F., & Fries, P. (2010). Corticospinal Beta-Band Synchronization Entails >> Rhythmic Gain Modulation. Journal of Neuroscience, 30(12), 4481–4488. >> http://doi.org/10.1523/JNEUROSCI.2794-09.2010 >> >> Keil, J., Timm, J., SanMiguel, I., Schulz, H., Obleser, J., & >> Schonwiesner, M. (2014). Cortical brain states and corticospinal >> synchronization influence TMS-evoked motor potentials. Journal of >> Neurophysiology, 111(3), 513–519. http://doi.org/10.1152/jn.00387.2013 >> >> Good luck, >> >> Julian >> >> Am 02.02.2016 um 09:14 schrieb David Syloni: >> >> Dear Julian, >> >> Thank you for the answer. I was asked by reviewers to calculate circular >> correlation instead of PLV. Sorry for too general description. >> Actually, I found the toolbox , but I don't understand how to compute >> " sample of angles in radians" (the input for the circ_corrcc function >> ). >> I would very appreciate a help to transform my fieldtrip data to the >> input format , required by circ_corrcc. >> >> Thanks! >> >> >> David >> >> On Tue, Feb 2, 2016 at 9:57 AM, Julian Keil >> wrote: >> >>> Hi David, >>> >>> to compute circular statistics (e.g. phase correlations) you need to >>> leave fieldtrip a bit. >>> Here's the toolbox I usually use: >>> http://www.mathworks.com/matlabcentral/fileexchange/10676-circular-statistics-toolbox--directional-statistics- >>> >>> As you don't describe why you need circular statistics, it's a bit hard >>> to give a more helpful answer. >>> >>> Good luck, >>> >>> Julian >>> >>> Am 01.02.2016 um 13:40 schrieb David Syloni: >>> >>> > Dear Fieldtripers, >>> > >>> > I'm trying to apply connectivity analysis with continuous EEG data. >>> > >>> > I'm using: >>> > >>> > >>> > >>> > cfg = []; >>> > cfg.method = 'mtmfft'; >>> > cfg.taper = 'dpss'; >>> > cfg.output = 'fourier'; >>> > cfg.tapsmofrq = 4; >>> > cfg.width=2; >>> > cfg.foilim = [0 250]; >>> > cfg.keeptrials = 'yes'; >>> > freq = ft_freqanalysis(cfg, data_no_artifacts); >>> > >>> > >>> > >>> > >>> > cfg = []; >>> > cfg.method = 'plv'; >>> > 'mtmfft' >>> > cfg.foilim = [8 12]; >>> > cfg.bandwidth=5; >>> > cfg.tapsmofrq = 4; >>> > cfg.keeptrials = 'yes'; >>> > cfg.output = 'powandcsd'; >>> > cfg.channelcmb = c; >>> > coh = ft_connectivityanalysis(cfg, freq); >>> > >>> > Right now I should calculate Circular Correlation and I'm stuck with >>> it. >>> > >>> > I would very appreciate your help! >>> > >>> > Thanks in advance, >>> > >>> > David >>> > _______________________________________________ >>> > 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 >> >> >> >> _______________________________________________ >> 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 singhkd at cardiff.ac.uk Wed Feb 3 17:36:09 2016 From: singhkd at cardiff.ac.uk (Krish Singh) Date: Wed, 3 Feb 2016 16:36:09 +0000 Subject: [FieldTrip] MEG and DCM/Graph theory Postdoc-Job Opportunities at CUBRIC, School of Psychology, Cardiff University, UK Message-ID: Dear All, As part of the expansion of the CUBRIC (http://sites.cardiff.ac.uk/cubric/) brain imaging facility at Cardiff University, UK, we are hiring postdoctoral researchers at either Associate or Fellow level and two of the posts would suit people working in the MEG and/or network analysis related field. All of the available posts are listed here: http://sites.cardiff.ac.uk/cubric/work-with-us/research-associatefellowship-posts/ ​The MEG and DCM/GRAPH theory posts are part of a large Wellcome Trust Strategic Award. Full details of the posts and how to apply are here: http://krb-sjobs.brassring.com/TGWEbHost/jobdetails.aspx?partnerid=30011&siteid=5460&AReq=4342BR http://krb-sjobs.brassring.com/TGWEbHost/jobdetails.aspx?partnerid=30011&siteid=5460&AReq=4343BR For informal enquiries, please get in touch with me if you are interested in the above two posts. Note that we’re looking for people with a significant track-record, evidenced by good relevant peer-reviewed publications. The two posts must start before July 2016, are for 5-years and may be appointed up to senior UK Grade 7 level. Many thanks, Krish -- Prof. Krish Singh CUBRIC School of Psychology / Ysgol Seicoleg Cardiff University / Prifysgol Caerdydd Park Place / Plas y Parc Cardiff / Caerdydd CF10 3AT, UK Tel / Ffôn: 02920 874690 / 870365 Fax / Ffacs: 02920 870339 Email / Ebost : singhkd at cardiff.ac.uk -------------- next part -------------- An HTML attachment was scrubbed... URL: From hibafouani123 at hotmail.com Wed Feb 3 23:44:33 2016 From: hibafouani123 at hotmail.com (hiba fouani) Date: Wed, 3 Feb 2016 22:44:33 +0000 Subject: [FieldTrip] =?cp1256?q?Few_Dipoles=FE?= Message-ID: Dear all, I have a question about the method that deal with few number of dipoles like dipole fitting for example , what the meaning of few in this case? can I work with 200 dipoles? Another question I have about the signal resulted from the forward problem when I multiply the leadfield with simulated electrical potential (with dimension M X N where M is the number of points and N is the number of sample time) does this signal of electrode required normalization or any type of treatment before I put it in the function of inverse problem? All the best Hiba -------------- next part -------------- An HTML attachment was scrubbed... URL: From tigoum at naver.com Thu Feb 4 03:20:40 2016 From: tigoum at naver.com (=?UTF-8?B?7JWI66+87Z2s?=) Date: Thu, 4 Feb 2016 11:20:40 +0900 (KST) Subject: [FieldTrip] =?utf-8?q?importing_method_for_ft=5Fcrossfrequency=28?= =?utf-8?q?=29_using_our_customized_data_format?= In-Reply-To: <3271eadad0ee1c551231243cb4f0e5@cweb14.nm.nhnsystem.com> References: <3271eadad0ee1c551231243cb4f0e5@cweb14.nm.nhnsystem.com> Message-ID: <7e6fbf1ad2395f79d996b25a72f7c2f@cweb10.nm.nhnsystem.com> Dear community, My name is Ahn Min-Hee and I am working in the mindbrain lab in korea university, south koera on invasive BMI. Currently I am analyzing EEG data of our lab project, where we processed using our time-frequency analysis method on matlab. It's sourcing from Brain Vision Recorder. I tried using ft_crossfrequency() to assess time-frequency aspects of our data. First, I tried importing our own data that formed 3D type by frequency x time x channel, but I don't know how it convert the fieldtrip style data structure. Specially, about converting epoch dimension & constructing trial struct... So, I tried additional work as initiation. I import raw data such as *.eeg from Brain Vision Recorder. I work following: >> cfg = [] ; >> cfg.dataset='SSVEP_NEW_su0001.eeg'; >> cfg.trialdef.eventtype='?'; >> [cfg] = ft_definetrial(cfg); Warning: no trialfun was specified, using ft_trialfun_general > In ft_definetrial (line 135) evaluating trialfunction 'ft_trialfun_general' reading the events from 'SSVEP_NEW_su0001.vhdr' the following events were found in the datafile event type: 'Comment' with event values: 'actiCAP Data On' event type: 'New Segment' with event values: event type: 'Stimulus' with event values: 'S 11' 'S 12' 'S 13' 'S 14' 'S 15' 'S 16' 'S 21' 'S 22' 'S 23' 'S 24' 'S 25' 'S 26' 'S 28' 'S111' 'S112' 'S113' 'S114' 'S115' 'S116' 'S121' 'S122' 'S123' 'S124' 'S125' 'S126' 'S127' no trials have been defined yet, see FT_DEFINETRIAL for further help found 943 events created 0 trials the call to "ft_definetrial" took 0 seconds and required the additional allocation of an estimated 0 MB Then... I don't know that its result is correct or not... also, how treat warning & why resulting trial to 0. ----- So, I summarize my question: 1. How convert/construct our own data format(freq x time x channel) to fieldtrip type data struct ? 2. What or where detailed example for ft_crossfrequency() function ?3. How import *.eeg(brain vision raw data) ? Especially treat a trial information ? I uploaded our data formed file o a filehoster such as fieldtriptoolbox ftp site as it exceeds the critical file size of 1 MB. Here is the link:ftp://ftp.fieldtriptoolbox.org/pub/incoming/TiGoum_USIL.FREQxTIMExCHANNEL.mat Can someone tell me above questions. Any help world be appreciated.Thank you very much. Best, Ahn Min-Hee. -------------- next part -------------- An HTML attachment was scrubbed... URL: From joseluisblues at gmail.com Thu Feb 4 13:21:59 2016 From: joseluisblues at gmail.com (Jose) Date: Thu, 4 Feb 2016 13:21:59 +0100 Subject: [FieldTrip] databrowser crashes, windows 8, matlab 2014b Message-ID: Dear fieldtrippers, I have been having some troubles with the plot functions in Fieldtrip, I've tried to solve it following this tread from the Fieldtrip webpage, but I was unable to solve the problem. I was wondering if there would any update or if someone has run in the same problem, I'm using a Intel Core 3.00GHz RAM 8.00 GB computer, Windows 8, 64-bit Operating System, and Matlab 2014b, Thanks for any hint, Jose -- -------------- next part -------------- An HTML attachment was scrubbed... URL: From caspervanheck at gmail.com Thu Feb 4 15:15:11 2016 From: caspervanheck at gmail.com (Casper van Heck) Date: Thu, 4 Feb 2016 15:15:11 +0100 Subject: [FieldTrip] importing method for ft_crossfrequency() using our customized data format In-Reply-To: <7e6fbf1ad2395f79d996b25a72f7c2f@cweb10.nm.nhnsystem.com> References: <3271eadad0ee1c551231243cb4f0e5@cweb14.nm.nhnsystem.com> <7e6fbf1ad2395f79d996b25a72f7c2f@cweb10.nm.nhnsystem.com> Message-ID: Dear Ahn, As background: 1. Constructing your own format is easy, and is explained on the page "How can I import my own dataformat? " 2. I'm assuming you're using the function 'ft_crossfrequencyanalysis', which doesn't seem to be embedded in a tutorial or anything similar. I do know that it wants the output of ft_freqanalysis, but if you want to know how it works, you're going to have to dive into the code. 3. Working with Brainvision Recorder, you don't import the raw data directly; you direct Fieldtrip to the header file, and use ft_preprocessing to read all the data and the markers. If this goes awry, you can use the separate functions ft_read_header, ft_read_data, and ft_read_event to load those elements into memor (more info here ). I seem to remember Brainvision events need to be read using ft_read_event anyway. Importing data works best either through ft_preprocessing, or through ft_read_data. You're trying to define a trial structure, but don't provide a method to do that. Read the tutorial on preprocessing , and simply copy the code used there, making a few changes to fit your data. Good luck! On 4 February 2016 at 03:20, 안민희 wrote: >  > > Dear community, > > > My name is Ahn Min-Hee and I am working in the mindbrain lab in korea > university, south koera > > on invasive BMI. > > Currently I am analyzing EEG data of our lab project, where we processed > using our time-frequency > > analysis method on matlab. It's sourcing from Brain Vision Recorder. > > > > I tried using ft_crossfrequency() to assess time-frequency aspects of our > data. > > First, I tried importing our own data that formed 3D type by frequency x > time x channel, > > but I don't know how it convert the fieldtrip style data structure. > > Specially, about converting epoch dimension & constructing trial struct... > > > > So, I tried additional work as initiation. I import raw data such as > *.eeg from Brain Vision Recorder. > > I work following: > > > > >> cfg = [] ; > > >> cfg.dataset='SSVEP_NEW_su0001.eeg'; > > >> cfg.trialdef.eventtype='?'; > > >> [cfg] = ft_definetrial(cfg); > > > > Warning: no trialfun was specified, using ft_trialfun_general > > > In ft_definetrial (line 135) > > evaluating trialfunction 'ft_trialfun_general' > > reading the events from 'SSVEP_NEW_su0001.vhdr' > > the following events were found in the datafile > > event type: 'Comment' with event values: 'actiCAP Data On' > > event type: 'New Segment' with event values: > > event type: 'Stimulus' with event values: 'S 11' 'S 12' 'S 13' 'S 14' 'S > 15' 'S 16' 'S 21' 'S 22' 'S 23' 'S 24' 'S 25' 'S 26' 'S 28' 'S111' 'S112' > 'S113' 'S114' 'S115' 'S116' 'S121' 'S122' 'S123' 'S124' 'S125' 'S126' > 'S127' > > no trials have been defined yet, see FT_DEFINETRIAL for further help > > found 943 events > > created 0 trials > > the call to "ft_definetrial" took 0 seconds and required the additional > allocation of an estimated 0 MB > > Then... I don't know that its result is correct or not... also, how treat > warning & why resulting trial to 0. > > ----- > > So, I summarize my question: > > 1. How convert/construct our own data format(freq x time x channel) to > fieldtrip type data struct ? > 2. What or where detailed example for ft_crossfrequency() function ? > 3. How import *.eeg(brain vision raw data) ? Especially treat a trial > information ? > > I uploaded our data formed file o a filehoster such as fieldtriptoolbox > ftp site as it exceeds the > critical file size of 1 MB. Here is the link: > > ftp://ftp.fieldtriptoolbox.org/pub/incoming/TiGoum_USIL.FREQxTIMExCHANNEL.mat > > > Can someone tell me above questions. Any help world be appreciated. > Thank you very much. > > Best, > > Ahn Min-Hee. > > > _______________________________________________ > 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 giuseppespinelli88 at gmail.com Thu Feb 4 17:13:33 2016 From: giuseppespinelli88 at gmail.com (Giuseppe Spinelli) Date: Thu, 4 Feb 2016 17:13:33 +0100 Subject: [FieldTrip] segmenting after ICA on continuous data Message-ID: Dear Fieldtrippers I am analyzing a .cnt EEG dataset from a Neuroscan amplifier with an hardware bandpass filter of 0.05-200 Hz. I am having some troubles with segmentation after performing ICA on continuous the continuous EEG trace. Here you find the pipeline I used: %% reading the dataset: subj = 'C:\data\S01.cnt'; cfg = []; cfg.headerfile = subj; cfg.datafile = subj; cfg.continuous = 'yes'; data_cont = ft_preprocessing(cfg); %% running ICA and cleaning data cfg = []; cfg.method = 'runica'; comp = componentanalysis(cfg, data_cont); cfg = []; cfg.component = [1:62]; cfg.layout = 'C:\data\mylayout1010.lay'; cfg.comment = 'no'; ft_topoplotIC(cfg, comp); cfg = []; cfg.channel = [1 3 8]; cfg.viewmode = 'component'; cfg.layout = 'C:\data\mylayout1010.lay'; ft_databrowser(cfg, comp); cfg = []; cfg.component = [1 3]; data_clean = ft_rejectcomponent(cfg, comp, data_cont); Now, in order to segment data I did: cfg = []; cfg.continuous = 'no'; cfg.trailfun = 'ft_trialfun_general'; cfg.trialdef.eventtype = 'stimtype'; cfg.trialdef.eventvalue = 8 cfg.trialdef.prestim = 1; cfg.trialdef.poststim = 4; cfg = ft_definetrial(data_clean); segmented = ft_preprocessing(cfg, data_clean); but, the Command Window retured me with the following error: Reference to non-existent field 'headerfile'. Error in ft_trialfun_general (line 78) hdr = ft_read_header(cfg.headerfile, 'headerformat', cfg.headerformat); Error in ft_definetrial (line 174) [trl, event] = feval(cfg.trialfun, cfg); I cannot get why both the headerfile and the dataset file are needed to be specified again. Could someone help me to figure it out? Many thanks in advance, Giuseppe Spinelli Ph.D. student in Cognitive Social and Affective Neuroscience Department of Psychology, Sapienza University of Rome via dei Marsi 78, 00185 - Rome Phone/Fax: +39 06-49917635 IRCCS Fondazione Santa Lucia via Ardeatina 306, 00179 - Rome Phone: +39 06 5150 1108 @: giuseppe.spinelli at uniroma1.it http://agliotilab.org/ -------------- next part -------------- An HTML attachment was scrubbed... URL: From julian.keil at gmail.com Thu Feb 4 17:32:28 2016 From: julian.keil at gmail.com (Julian Keil) Date: Thu, 4 Feb 2016 17:32:28 +0100 Subject: [FieldTrip] segmenting after ICA on continuous data In-Reply-To: References: Message-ID: <51FA52E0-082A-434A-8955-A422455A9509@gmail.com> Dear Giuseppe, in your trial-definition step you state: cfg = []; cfg.continuous = 'no'; cfg.trailfun = 'ft_trialfun_general'; cfg.trialdef.eventtype = 'stimtype'; cfg.trialdef.eventvalue = 8 cfg.trialdef.prestim = 1; cfg.trialdef.poststim = 4; cfg = ft_definetrial(data_clean); segmented = ft_preprocessing(cfg, data_clean); So, in your call to ft_definetrial, you are not using your cfg-structure. Instead, you overwrite your cfg-structure with the output of the (incorrectly called) ft_definetrial. Here's what you could do instead: Use your cfg from above with cfg.dataset = subj; in your call to ft_definetrial (e.g. cfg = ft_definetrial(cfg)). This gives you the cfg.trl-field with your trial definition. In the next step, you could use ft_redefinetrial to actually split up your (already cleaned) data. Check this tutorial for more info: http://www.fieldtriptoolbox.org/tutorial/continuous Good luck, Julian ******************** Dr. Julian Keil AG Multisensorische Integration Psychiatrische Universitätsklinik der Charité im St. Hedwig-Krankenhaus Große Hamburger Straße 5-11, Raum A007 10115 Berlin Telefon: +49-30-2311-1879 Fax: +49-30-2311-2209 http://psy-ccm.charite.de/forschung/bildgebung/ag_multisensorische_integration Am 04.02.2016 um 17:13 schrieb Giuseppe Spinelli: > Dear Fieldtrippers > > I am analyzing a .cnt EEG dataset from a Neuroscan amplifier with an hardware bandpass filter of 0.05-200 Hz. > I am having some troubles with segmentation after performing ICA on continuous the continuous EEG trace. > > Here you find the pipeline I used: > > %% reading the dataset: > subj = 'C:\data\S01.cnt'; > cfg = []; > cfg.headerfile = subj; > cfg.datafile = subj; > cfg.continuous = 'yes'; > data_cont = ft_preprocessing(cfg); > > %% running ICA and cleaning data > cfg = []; > cfg.method = 'runica'; > comp = componentanalysis(cfg, data_cont); > > cfg = []; > cfg.component = [1:62]; > cfg.layout = 'C:\data\mylayout1010.lay'; > cfg.comment = 'no'; > ft_topoplotIC(cfg, comp); > > cfg = []; > cfg.channel = [1 3 8]; > cfg.viewmode = 'component'; > cfg.layout = 'C:\data\mylayout1010.lay'; > ft_databrowser(cfg, comp); > > cfg = []; > cfg.component = [1 3]; > data_clean = ft_rejectcomponent(cfg, comp, data_cont); > > Now, in order to segment data I did: > > cfg = []; > cfg.continuous = 'no'; > cfg.trailfun = 'ft_trialfun_general'; > cfg.trialdef.eventtype = 'stimtype'; > cfg.trialdef.eventvalue = 8 > cfg.trialdef.prestim = 1; > cfg.trialdef.poststim = 4; > cfg = ft_definetrial(data_clean); > segmented = ft_preprocessing(cfg, data_clean); > > but, the Command Window retured me with the following error: > > Reference to non-existent field 'headerfile'. > > Error in ft_trialfun_general (line 78) > hdr = ft_read_header(cfg.headerfile, 'headerformat', cfg.headerformat); > > Error in ft_definetrial (line 174) > [trl, event] = feval(cfg.trialfun, cfg); > > > I cannot get why both the headerfile and the dataset file are needed to be specified again. > Could someone help me to figure it out? > > Many thanks in advance, > > Giuseppe Spinelli > > Ph.D. student in Cognitive Social and Affective Neuroscience > > Department of Psychology, Sapienza University of Rome > via dei Marsi 78, 00185 - Rome > Phone/Fax: +39 06-49917635 > > IRCCS Fondazione Santa Lucia > via Ardeatina 306, 00179 - Rome > Phone: +39 06 5150 1108 > > @: giuseppe.spinelli at uniroma1.it > http://agliotilab.org/ > _______________________________________________ > 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: signature.asc Type: application/pgp-signature Size: 495 bytes Desc: Message signed with OpenPGP using GPGMail URL: From fah at med.umich.edu Thu Feb 4 19:17:23 2016 From: fah at med.umich.edu (Ahmed, Farah) Date: Thu, 4 Feb 2016 18:17:23 +0000 Subject: [FieldTrip] Define Trial Error with Tutorial Data Message-ID: Hi Everyone, I am student new to FieldTrip and have been going through the tutorials. I am trying to run the ft_definetrial function on the sample data Subject01 from this tutorial page http://www.fieldtriptoolbox.org/tutorial/preprocessing This is the script I'm using (same as the one on the tutorial page) cfg = []; cfg.dataset = 'Subject01.ds'; cfg.trialfun = 'ft_trialfun_general'; % this is the default cfg.trialdef.eventtype = 'backpanel trigger'; cfg.trialdef.eventvalue = 3; % the value of the stimulus trigger for fully incongruent (FIC). cfg.trialdef.prestim = 1; % in seconds cfg.trialdef.poststim = 2; % in seconds cfg = ft_definetrial(cfg); After running that I get these errors: evaluating trialfunction 'ft_trialfun_general' Error using ft_read_header (line 2102) unsupported header format (unknown) Error in ft_trialfun_general (line 78) hdr = ft_read_header(cfg.headerfile, 'headerformat', cfg.headerformat); Error in ft_definetrial (line 174) [trl, event] = feval(cfg.trialfun, cfg); Could someone help guide me as to what I'm doing wrong or missing? Any assistance on solving this is appreciated! Thanks! Best, Farah Ahmed University of Michigan ********************************************************** Electronic Mail is not secure, may not be read every day, and should not be used for urgent or sensitive issues -------------- next part -------------- An HTML attachment was scrubbed... URL: From giovannipellegrino at gmail.com Thu Feb 4 23:24:10 2016 From: giovannipellegrino at gmail.com (Giovanni Pellegrino) Date: Thu, 4 Feb 2016 18:24:10 -0400 Subject: [FieldTrip] PhD and Postdoc positions @ Campus Bio-Medico University, Rome, Italy Message-ID: - Apologies for cross-postings - In the context of the European Research Council Grant “RESHAPE: REstoring the Self with embodiable HAnd ProsthesEs”, we are seeking two outstanding *Post-Doc scientists* and two highly-motivated *PhD students* to join us in developing new tools and methods to improve the embodiment of robotic hand prostheses and study the related brain processes. Activities will be carried out in a multidisciplinary research environment (Clinical Neurophysiology and Neuroengineering) @ Campus Bio-Medico University, Rome Italy (www.unicampus.it). Post-Doc ideal candidates should · - have relevant publications in international journals and experience in fund raising · - be English mother tongue or have almost comparable fluency · - *own at least two of the following expertise*: 1. Programming for development/customization of interactive Virtual/Augmented Reality environment 2. EEG/MRI signal processing 3. Body ownership, embodiment, cognitive neuroscience. PhD Student ideal candidates should · - be English mother tongue or have good fluency · - have a master degree (or equivalent) in o biomedical robotics, biomedical engineering, computer science or other related fields o medicine, neuroscience, neurophysiology or other related fields Suitable candidates can introduce themselves by contacting Giovanni Di Pino (g.dipino at unicampus.it) and Domenico Formica (d.formica at unicampus.it). -- Giovanni Pellegrino, MD Multimodal Functional Imaging Laboratory Montreal Neurological Institute, McGill University Address: 332 Duff Medical Building, 3775 rue University, Montreal, QC, H3A 2B4, Canada Phone: (514) 398–1678 Fax: (514) 398–7461 Email: giovannipellegrino at gmail.com, giovanni.pellegrino2 at mcgill.ca Homepage: http://www.bic.mni.mcgill.ca/ResearchLabsMFIL/PeopleGiovanni -------------- next part -------------- An HTML attachment was scrubbed... URL: From v.piai.research at gmail.com Fri Feb 5 02:32:03 2016 From: v.piai.research at gmail.com (Vitoria Piai) Date: Thu, 4 Feb 2016 17:32:03 -0800 Subject: [FieldTrip] reference for weighted pairwise phase-consistency Message-ID: <56B3FB93.9030008@gmail.com> Hi all, I'm looking for a reference for the *weighted *ppc measure, but can't find any. I know Martin's PPC paper, but I'm trying to figure out what the weighting in the name refers to really, which doesn't seem to be the same reference. Thanks, Vitoria -------------- next part -------------- An HTML attachment was scrubbed... URL: From r.oostenveld at donders.ru.nl Fri Feb 5 09:51:57 2016 From: r.oostenveld at donders.ru.nl (Robert Oostenveld) Date: Fri, 5 Feb 2016 09:51:57 +0100 Subject: [FieldTrip] development now on github, contributions welcome Message-ID: <0CE25B37-29D4-4F53-B972-53D046DAC316@donders.ru.nl> Dear FieldTrip community The toolbox development has completely moved over to http://github.com/fieldtrip. This makes it much simpler for us to incorporate external suggestions and for you to directly contribute to the code. We have a tutorial that explains how you can use git and github at http://www.fieldtriptoolbox.org/development/git. We will continue with our http://www.fieldtriptoolbox.org/bugzilla tracker, but you can also file issues on github, preferably in the form of pull requests that immediately solve the issue in the code. By making the development more open and by using more flexible tools we hope that you will contribute to make FieldTrip even better and to advance the field of MEG and EEG analysis. thanks for taking part in endeavor, the FIeldTrip team From david.pedrosa at ndcn.ox.ac.uk Fri Feb 5 14:47:50 2016 From: david.pedrosa at ndcn.ox.ac.uk (David Pedrosa) Date: Fri, 5 Feb 2016 13:47:50 +0000 Subject: [FieldTrip] ft_sourceanalysis, reshape error Message-ID: Dear list, after installing the newest version of Fieldtrip today, I have encountered a rather strange error . I am tying to compute corticomuscular coherence for an EEG/EMG dataset and it worked well so far. With the new version however, I get a reshape error I find fard to understand. This is the code: cfg = []; cfg.frequency = 20;; cfg.grid = leadfield; cfg.method = 'dics'; cfg.refchan = 'ExtR1'; cfg.channel = {'EEG' 'ExtR1'}; cfg.vol = hdm; cfg.dics.projectnoise = 'no'; cfg.dics.lambda = '1%'; cfg.dics.keepfilter = 'yes'; cfg.dics.keeptrials = 'yes'; cfg.dics.realfilter = 'yes'; sourceAll = ft_sourceanalysis(cfg, freqAll); but this hasn't changed. The error pops up at lines 619/620 of ft_sourceanalysis (Cf = reshape(sum(Cf, 1) / Ntrials, [Nchans Nchans]);), where it supposedly just averages the CSD matrix over trials. And it makes kind of sense as the line says to reshape the CSDs from a 1xNchans matrix into a [Nchans Nchans] one. But why is it poppin up now as nothing has changed in my analyses? I have checked the updates of the last months and I couldn't find anything related to this. So has any one an idea why the analysis crashes at this point. Thanks in advance Best, David ________________________________ Dr. David Pedrosa Clinical Research Fellow Medical Research Council Brain Network Dynamics Unit at the University of Oxford Nuffield Department of Clinical Neurosciences University of Oxford Level 6, West Wing John Radcliffe Hospital, OX3 9DU Tel: +44 (0)1865 572490 E-Mail: david.pedrosa at ndcn.ox.ac.uk http://www.mrcbndu.ox.ac.uk/ -------------- next part -------------- An HTML attachment was scrubbed... URL: From azeez.adebimpe5 at gmail.com Fri Feb 5 14:56:15 2016 From: azeez.adebimpe5 at gmail.com (Azeez Adebimpe) Date: Fri, 5 Feb 2016 08:56:15 -0500 Subject: [FieldTrip] ft_sourceanalysis, reshape error In-Reply-To: References: Message-ID: Hi David, Probably the channels' labels in leadfield and data are not the same. check it and try again. Azeez On Fri, Feb 5, 2016 at 8:47 AM, David Pedrosa wrote: > Dear list, > > after installing the newest version of Fieldtrip today, I have encountered > a rather strange error . I am tying to compute corticomuscular coherence > for an EEG/EMG dataset and it worked well so far. With the new version > however, I get a reshape error I find fard to understand. This is the code: > > cfg = []; > cfg.frequency = 20;; > cfg.grid = leadfield; > cfg.method = 'dics'; > cfg.refchan = 'ExtR1'; > cfg.channel = {'EEG' 'ExtR1'}; > cfg.vol = hdm; > cfg.dics.projectnoise = 'no'; > cfg.dics.lambda = '1%'; > cfg.dics.keepfilter = 'yes'; > cfg.dics.keeptrials = 'yes'; > cfg.dics.realfilter = 'yes'; > sourceAll = ft_sourceanalysis(cfg, freqAll); > > but this hasn't changed. The error pops up at lines 619/620 of > ft_sourceanalysis (Cf = reshape(sum(Cf, 1) / Ntrials, [Nchans Nchans]);), > where it supposedly just averages the CSD matrix over trials. And it makes > kind of sense as the line says to reshape the CSDs from a 1xNchans matrix > into a [Nchans Nchans] one. But why is it poppin up now as nothing has > changed in my analyses? I have checked the updates of the last months and I > couldn't find anything related to this. So has any one an idea why the > analysis crashes at this point. > > Thanks in advance > Best, > David > > ------------------------------ > Dr. David Pedrosa > > Clinical Research Fellow > Medical Research Council Brain Network Dynamics Unit at the University of > Oxford > Nuffield Department of Clinical Neurosciences > University of Oxford > Level 6, West Wing > John Radcliffe Hospital, OX3 9DU > *Tel:* +44 (0)1865 572490 > *E-Mail:* david.pedrosa at ndcn.ox.ac.uk > > http://www.mrcbndu.ox.ac.uk/ > > > _______________________________________________ > 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 david.pedrosa at ndcn.ox.ac.uk Fri Feb 5 15:51:33 2016 From: david.pedrosa at ndcn.ox.ac.uk (David Pedrosa) Date: Fri, 5 Feb 2016 14:51:33 +0000 Subject: [FieldTrip] ft_sourceanalysis, reshape error In-Reply-To: References: , Message-ID: Hi Azeez, thank you for the fast reply! I hadn't considered that but I have checked and I use the same labels for both leadfield and data. I mean it makes kind of sense that the reshape doesn't work as it is now, but I don't know where the problem is before. Can you think of anything else? Best, David ________________________________ Dr. David Pedrosa Clinical Research Fellow Medical Research Council Brain Network Dynamics Unit at the University of Oxford Nuffield Department of Clinical Neurosciences University of Oxford Level 6, West Wing John Radcliffe Hospital, OX3 9DU Tel: +44 (0)1865 572490 E-Mail: david.pedrosa at ndcn.ox.ac.uk http://www.mrcbndu.ox.ac.uk/ ________________________________ Von: fieldtrip-bounces at science.ru.nl [fieldtrip-bounces at science.ru.nl]" im Auftrag von "Azeez Adebimpe [azeez.adebimpe5 at gmail.com] Gesendet: Freitag, 5. Februar 2016 13:56 An: FieldTrip discussion list Betreff: Re: [FieldTrip] ft_sourceanalysis, reshape error Hi David, Probably the channels' labels in leadfield and data are not the same. check it and try again. Azeez On Fri, Feb 5, 2016 at 8:47 AM, David Pedrosa > wrote: Dear list, after installing the newest version of Fieldtrip today, I have encountered a rather strange error . I am tying to compute corticomuscular coherence for an EEG/EMG dataset and it worked well so far. With the new version however, I get a reshape error I find fard to understand. This is the code: cfg = []; cfg.frequency = 20;; cfg.grid = leadfield; cfg.method = 'dics'; cfg.refchan = 'ExtR1'; cfg.channel = {'EEG' 'ExtR1'}; cfg.vol = hdm; cfg.dics.projectnoise = 'no'; cfg.dics.lambda = '1%'; cfg.dics.keepfilter = 'yes'; cfg.dics.keeptrials = 'yes'; cfg.dics.realfilter = 'yes'; sourceAll = ft_sourceanalysis(cfg, freqAll); but this hasn't changed. The error pops up at lines 619/620 of ft_sourceanalysis (Cf = reshape(sum(Cf, 1) / Ntrials, [Nchans Nchans]);), where it supposedly just averages the CSD matrix over trials. And it makes kind of sense as the line says to reshape the CSDs from a 1xNchans matrix into a [Nchans Nchans] one. But why is it poppin up now as nothing has changed in my analyses? I have checked the updates of the last months and I couldn't find anything related to this. So has any one an idea why the analysis crashes at this point. Thanks in advance Best, David ________________________________ Dr. David Pedrosa Clinical Research Fellow Medical Research Council Brain Network Dynamics Unit at the University of Oxford Nuffield Department of Clinical Neurosciences University of Oxford Level 6, West Wing John Radcliffe Hospital, OX3 9DU Tel: +44 (0)1865 572490 E-Mail: david.pedrosa at ndcn.ox.ac.uk http://www.mrcbndu.ox.ac.uk/ _______________________________________________ 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 azeez.adebimpe5 at gmail.com Fri Feb 5 23:44:12 2016 From: azeez.adebimpe5 at gmail.com (Azeez Adebimpe) Date: Fri, 5 Feb 2016 17:44:12 -0500 Subject: [FieldTrip] ft_sourceanalysis, reshape error In-Reply-To: References: Message-ID: Hi David, Sorry for late reply, I was on the journey. The same issue happened to me before when the labels in the leadfield and data were not the same. if you have 'Fp1' in leadfield and 'FP1' in data, it will view as different channels. Azeez On Fri, Feb 5, 2016 at 9:51 AM, David Pedrosa wrote: > Hi Azeez, > > thank you for the fast reply! > I hadn't considered that but I have checked and I use the same labels for > both leadfield and data. > > I mean it makes kind of sense that the reshape doesn't work as it is now, > but I don't know where the problem is before. > > Can you think of anything else? > > Best, > David > > ------------------------------ > Dr. David Pedrosa > > Clinical Research Fellow > Medical Research Council Brain Network Dynamics Unit at the University of > Oxford > Nuffield Department of Clinical Neurosciences > University of Oxford > Level 6, West Wing > John Radcliffe Hospital, OX3 9DU > *Tel:* +44 (0)1865 572490 > *E-Mail:* david.pedrosa at ndcn.ox.ac.uk > > http://www.mrcbndu.ox.ac.uk/ > > ------------------------------ > *Von:* fieldtrip-bounces at science.ru.nl [fieldtrip-bounces at science.ru.nl]" > im Auftrag von "Azeez Adebimpe [azeez.adebimpe5 at gmail.com] > *Gesendet:* Freitag, 5. Februar 2016 13:56 > *An:* FieldTrip discussion list > *Betreff:* Re: [FieldTrip] ft_sourceanalysis, reshape error > > Hi David, > > Probably the channels' labels in leadfield and data are not the same. > > check it and try again. > > Azeez > > On Fri, Feb 5, 2016 at 8:47 AM, David Pedrosa > wrote: > >> Dear list, >> >> after installing the newest version of Fieldtrip today, I have >> encountered a rather strange error . I am tying to compute corticomuscular >> coherence for an EEG/EMG dataset and it worked well so far. With the new >> version however, I get a reshape error I find fard to understand. This is >> the code: >> >> cfg = []; >> cfg.frequency = 20;; >> cfg.grid = leadfield; >> cfg.method = 'dics'; >> cfg.refchan = 'ExtR1'; >> cfg.channel = {'EEG' 'ExtR1'}; >> cfg.vol = hdm; >> cfg.dics.projectnoise = 'no'; >> cfg.dics.lambda = '1%'; >> cfg.dics.keepfilter = 'yes'; >> cfg.dics.keeptrials = 'yes'; >> cfg.dics.realfilter = 'yes'; >> sourceAll = ft_sourceanalysis(cfg, freqAll); >> >> but this hasn't changed. The error pops up at lines 619/620 of >> ft_sourceanalysis (Cf = reshape(sum(Cf, 1) / Ntrials, [Nchans Nchans]);), >> where it supposedly just averages the CSD matrix over trials. And it makes >> kind of sense as the line says to reshape the CSDs from a 1xNchans matrix >> into a [Nchans Nchans] one. But why is it poppin up now as nothing has >> changed in my analyses? I have checked the updates of the last months and I >> couldn't find anything related to this. So has any one an idea why the >> analysis crashes at this point. >> >> Thanks in advance >> Best, >> David >> >> ------------------------------ >> Dr. David Pedrosa >> >> Clinical Research Fellow >> Medical Research Council Brain Network Dynamics Unit at the University of >> Oxford >> Nuffield Department of Clinical Neurosciences >> University of Oxford >> Level 6, West Wing >> John Radcliffe Hospital, OX3 9DU >> *Tel:* +44 (0)1865 572490 >> *E-Mail:* david.pedrosa at ndcn.ox.ac.uk >> >> http://www.mrcbndu.ox.ac.uk/ >> >> >> _______________________________________________ >> 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 giuseppespinelli88 at gmail.com Sat Feb 6 00:38:43 2016 From: giuseppespinelli88 at gmail.com (Giuseppe Spinelli) Date: Sat, 6 Feb 2016 00:38:43 +0100 Subject: [FieldTrip] segmenting after ICA on continuous data In-Reply-To: <51FA52E0-082A-434A-8955-A422455A9509@gmail.com> References: <51FA52E0-082A-434A-8955-A422455A9509@gmail.com> Message-ID: Hi Julian, got the point! Now it works. thanks for the fast reply, Giuseppe 2016-02-04 17:32 GMT+01:00 Julian Keil : > Dear Giuseppe, > > in your trial-definition step you state: > > cfg = []; > cfg.continuous = 'no'; > cfg.trailfun = 'ft_trialfun_general'; > cfg.trialdef.eventtype = 'stimtype'; > cfg.trialdef.eventvalue = 8 > cfg.trialdef.prestim = 1; > cfg.trialdef.poststim = 4; > cfg = ft_definetrial(data_clean); > segmented = ft_preprocessing(cfg, data_clean); > > So, in your call to ft_definetrial, you are not using your cfg-structure. > Instead, you overwrite your cfg-structure with the output of the > (incorrectly called) ft_definetrial. > > Here's what you could do instead: > Use your cfg from above with cfg.dataset = subj; in your call to > ft_definetrial (e.g. cfg = ft_definetrial(cfg)). > This gives you the cfg.trl-field with your trial definition. > In the next step, you could use ft_redefinetrial to actually split up your > (already cleaned) data. > > Check this tutorial for more info: > http://www.fieldtriptoolbox.org/tutorial/continuous > > Good luck, > > Julian > > > ******************** > *Dr. Julian Keil* > > AG Multisensorische Integration > Psychiatrische Universitätsklinik > der Charité im St. Hedwig-Krankenhaus > Große Hamburger Straße 5-11, Raum A007 > 10115 Berlin > > Telefon: +49-30-2311-1879 > Fax: +49-30-2311-2209 > > http://psy-ccm.charite.de/forschung/bildgebung/ag_multisensorische_integration > > Am 04.02.2016 um 17:13 schrieb Giuseppe Spinelli: > > Dear Fieldtrippers > > I am analyzing a .cnt EEG dataset from a Neuroscan amplifier with an > hardware bandpass filter of 0.05-200 Hz. > I am having some troubles with segmentation after performing ICA on > continuous the continuous EEG trace. > > Here you find the pipeline I used: > > %% reading the dataset: > subj = 'C:\data\S01.cnt'; > cfg = []; > cfg.headerfile = subj; > cfg.datafile = subj; > cfg.continuous = 'yes'; > data_cont = ft_preprocessing(cfg); > > %% running ICA and cleaning data > cfg = []; > cfg.method = 'runica'; > comp = componentanalysis(cfg, data_cont); > > cfg = []; > cfg.component = [1:62]; > cfg.layout = 'C:\data\mylayout1010.lay'; > cfg.comment = 'no'; > ft_topoplotIC(cfg, comp); > > cfg = []; > cfg.channel = [1 3 8]; > cfg.viewmode = 'component'; > cfg.layout = 'C:\data\mylayout1010.lay'; > ft_databrowser(cfg, comp); > > cfg = []; > cfg.component = [1 3]; > data_clean = ft_rejectcomponent(cfg, comp, data_cont); > > Now, in order to segment data I did: > > cfg = []; > cfg.continuous = 'no'; > cfg.trailfun = 'ft_trialfun_general'; > cfg.trialdef.eventtype = 'stimtype'; > cfg.trialdef.eventvalue = 8 > cfg.trialdef.prestim = 1; > cfg.trialdef.poststim = 4; > cfg = ft_definetrial(data_clean); > segmented = ft_preprocessing(cfg, data_clean); > > but, the Command Window retured me with the following error: > > Reference to non-existent field 'headerfile'. > > Error in ft_trialfun_general (line 78) > hdr = ft_read_header(cfg.headerfile, 'headerformat', cfg.headerformat); > > Error in ft_definetrial (line 174) > [trl, event] = feval(cfg.trialfun, cfg); > > > I cannot get why both the headerfile and the dataset file are needed to be > specified again. > Could someone help me to figure it out? > > Many thanks in advance, > > Giuseppe Spinelli > > Ph.D. student in Cognitive Social and Affective Neuroscience > > Department of Psychology, Sapienza University of Rome > via dei Marsi 78, 00185 - Rome > Phone/Fax: +39 06-49917635 > > IRCCS Fondazione Santa Lucia > via Ardeatina 306, 00179 - Rome > Phone: +39 06 5150 1108 > > @: giuseppe.spinelli at uniroma1.it > http://agliotilab.org/ > _______________________________________________ > 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 > -- Giuseppe Spinelli Ph.D. student in Cognitive Social and Affective Neuroscience Department of Psychology, Sapienza University of Rome via dei Marsi 78, 00185 - Rome Phone/Fax: +39 06-49917635 IRCCS Fondazione Santa Lucia via Ardeatina 306, 00179 - Rome Phone: +39 06 5150 1108 @: giuseppe.spinelli at uniroma1.it http://agliotilab.org/ -------------- next part -------------- An HTML attachment was scrubbed... URL: From brian.roach at ncire.org Sat Feb 6 19:38:29 2016 From: brian.roach at ncire.org (brian.roach at ncire.org) Date: Sat, 6 Feb 2016 10:38:29 -0800 (PST) Subject: [FieldTrip] EEG/fMRI Data Analyst Job Opportunity in San Francisco Message-ID: <1454783909.281318299@mail.ncire.org> Dear List Members, I am writing to share a data analyst job opportunity in a schizophrenia brain imaging research lab located in San Francisco, CA: [ https://rew21.ultipro.com/NOR1032/jobboard/JobDetails.aspx?__ID=*0C72706CFB87418F ]( https://rew21.ultipro.com/NOR1032/jobboard/JobDetails.aspx?__ID=*0C72706CFB87418F ) Please share this link with anyone you believe would be qualified and interested. Thank you, Brian Roach -------------- next part -------------- An HTML attachment was scrubbed... URL: From leilayou_54 at yahoo.com Mon Feb 8 12:51:05 2016 From: leilayou_54 at yahoo.com (Leila Ayoubian) Date: Mon, 8 Feb 2016 11:51:05 +0000 (UTC) Subject: [FieldTrip] importing large edf data In-Reply-To: References: Message-ID: <1195829915.655104.1454932265573.JavaMail.yahoo@mail.yahoo.com> Hi Stephen:I just happen to realize that when I load the data as you mentioned below, I can not get hold of the real time of the EEG file. (e.g.18:32:43 ).Could you please point out as how I could retrieve the real time of the EEG file after loading. Thanks a lot.Kind regards __________________________________________________ Leila Ayoubian, PhD. Institute of Psychiatry, Psychology and Neuroscience King's College London From: Stephen Politzer-Ahles To: fieldtrip at science.ru.nl Sent: Friday, December 18, 2015 12:37 PM Subject: Re: [FieldTrip] importing large edf data Hello Leila, I think there are a few possible options for you. If you're not interested in analyzing high frequencies, then you could import the data one sample at a time, downsampling each channel, and then concatenate the channels into one structure, as described in http://www.fieldtriptoolbox.org/faq/how_can_i_preprocess_a_dataset_that_is_too_large_to_fit_into_memory. I don't know what your sampling rate was, but if your sampling rate was extremely high then this can save you a lot of space. For example, if you're only interested in frequencies up to high gamma (around 90-100 Hz), then your data only need to be sampled at around 250 Hz (per the Nyquist theorem, plus a little extra wiggle room), so if you sampled at e.g. 2500 Hz (which our EDF system does by default) or 5000 Hz then you have way more samples than necessary; downsampling like this will greatly reduce your array size. If that is not an option, then you can read in a segment of data as a 'trial'. ft_preprocessing understands trial start and end times from cfg.trl, which minimally is an Nx3 matrix (N is the number of trials to read, and the columns are the start sample for each trial, the end sample for each trial, and the trigger value associated with the trial; you could just put 0 if there's no trigger). So let's say you want to read the first through thousandth sample of the recording, then you would set up your cfg as normal, then add: cfg.trl = [1 1000 0]; and then use ft_preprocessing. By way of example, here is code that reads in raw data as a series of 1-second "trials": cfg = []; cfg.dataset = 'C:\Users\Steve\Desktop\subj2.vhdr'; cfg.trialdef.triallength = 1; % see documentation for ft_definetrial for an explanation of these parameters cfg.trialdef.ntrials = Inf; cfg = ft_definetrial( cfg ); cfg.continuous = 'yes'; data = ft_preprocessing(cfg); After doing whatever you need to these trials, you could concatenate them back into continuous data (see http://mailman.science.ru.nl/pipermail/fieldtrip/2011-June/003971.html for details). Best, Steve --- Stephen Politzer-Ahles University of Oxford Language and Brain Lab Faculty of Linguistics, Phonetics & Philology http://users.ox.ac.uk/~cpgl0080/ On Fri, Dec 18, 2015 at 11:00 AM, wrote: Send fieldtrip mailing list submissions to         fieldtrip at science.ru.nl To subscribe or unsubscribe via the World Wide Web, visit         http://mailman.science.ru.nl/mailman/listinfo/fieldtrip or, via email, send a message with subject or body 'help' to         fieldtrip-request at science.ru.nl You can reach the person managing the list at         fieldtrip-owner at science.ru.nl When replying, please edit your Subject line so it is more specific than "Re: Contents of fieldtrip digest..." Today's Topics:    1. importing large edf data (Leila Ayoubian) ---------------------------------------------------------------------- Message: 1 Date: Fri, 18 Dec 2015 09:43:43 +0000 (UTC) From: Leila Ayoubian To: "fieldtrip at science.ru.nl" Subject: [FieldTrip] importing large edf data Message-ID:         <807603762.476165.1450431823359.JavaMail.yahoo at mail.yahoo.com> Content-Type: text/plain; charset="utf-8" Hi:Thanks for providing us with this amazing toolbox. I am new to fieldtrip. I am trying to import EEG data in the format of *.edf for the purpose of seizure detection for epileptic patients. I can't break up the data as you understand the detection has to have continuous data. However I could load section of the data at a time and clear what is already used and reload again.? So trying to load the data like this: cfg.dataset= ('mydata.edf'); rawdata=ft_preprocessing(cfg); This is the error message I get : %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% Error using zeros Requested 51x51927040 (19.7GB) array exceeds maximum array size preference. Creation of arrays greater than this limit may take a long time and cause MATLAB to become unresponsive. See array size limit or preference panel for more information. Error in read_edf (line 403) ? dat = zeros(length(chanindx),nepochs*epochlength); Error in ft_read_data (line 622) ??? dat = read_edf(filename, hdr, begsample, endsample, chanindx); Error in ft_preprocessing (line 566) ????? dat = ft_read_data(cfg.datafile, 'header', hdr, 'begsample', begsample, 'endsample', endsample, 'chanindx', rawindx, 'checkboundary', ????? strcmp(cfg.continuous, 'no'), 'dataformat', cfg.dataformat); Error in ReadFedfiles (line 8) rawdata=ft_preprocessing(cfg);%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% I tried the ft_redefinetrial, but since the input to this file is the output from ft-PREPROCESSING it gives me the same error. I also tried to use ft_read_data to choose the samples I want to load :?filename???? = 'mydata.edf' ?hdr?? = ft_read_header(filename); ?sample.start=1 ?sample.end=100 dat = ft_read_data(filename,'sample.start','1','sample.end','100') and here is again the error message: Error using zeros Requested 51x51927040 (19.7GB) array exceeds maximum array size preference. Creation of arrays greater than this limit may take a long time and cause MATLAB to become unresponsive. See array size limit or preference panel for more information. Error in read_edf (line 403) ? dat = zeros(length(chanindx),nepochs*epochlength); Error in ft_read_data (line 622) ??? dat = read_edf(filename, hdr, begsample, endsample, chanindx); Error in ReadFedfiles (line 31) dat = ft_read_data(filename,'sample.start','1','sample.end','100') ? >> Could you please direct me as to which functions and in which order I should be using the functions to load data in smaller samples.Some examples would be useful. Thanks again for your support and assistance. We appreciate your effort. Kind regards ___________________________________________________ Dr. Leila Ayoubian -------------- next part -------------- An HTML attachment was scrubbed... URL: ------------------------------ _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip End of fieldtrip Digest, Vol 61, Issue 14 ***************************************** _______________________________________________ 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 sreenivasan.r.nadar at gmail.com Mon Feb 8 19:50:58 2016 From: sreenivasan.r.nadar at gmail.com (Sreenivasan R. Nadar, Ph.D.) Date: Mon, 8 Feb 2016 13:50:58 -0500 Subject: [FieldTrip] Neuromag/ Elekta 306 layout file Message-ID: Fieldtripers, Anybody has a layout file for Elekta/Neuromag system? I downloaded the file from the following discussion list: http://mailman.science.ru.nl/pipermail/fieldtrip/2007-March/001019.html. However, this layout file give errors (i.e., Attempt to reference field of non-structure array) when I use it for ft_topoplotIC(cfg,components). Am I missing something? I used the following commands: %~~~~~~~~~~~~~~~ clear all cfg = []; cfg.dataset = 'C071_resting_150608.fif'; cfg.hpfilter = 'yes' cfg.hpfreq = 1; cfg.channel = {'MEG', '-STI001', '-STI002','-STI003','-STI004', '-STI005',..., '-STI006','-STI007','-STI008','-STI101','-STI201','-STI301'}; data_continuous = ft_preprocessing(cfg); %resample the data to 100Hz cfg = []; cfg.resamplefs = 100; [data] = ft_resampledata(cfg, data_continuous) %% running ICA and cleaning data cfg = []; cfg.method = 'runica'; comp = ft_componentanalysis(cfg, data); cfg = []; cfg.component = [1:50]; cfg.layout = 'NM306all.mat'; cfg.comment = 'no'; ft_topoplotIC(cfg, comp); %~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Thank you Sreenivasan -------------- next part -------------- An HTML attachment was scrubbed... URL: From pgoodin at swin.edu.au Mon Feb 8 20:44:39 2016 From: pgoodin at swin.edu.au (Peter Goodin) Date: Mon, 8 Feb 2016 19:44:39 +0000 Subject: [FieldTrip] Neuromag/ Elekta 306 layout file Message-ID: <620434cf-fd54-4ba5-b262-62e6170cba1c@email.android.com> Hi Sreenivasan, Try using the neuromag306all.lay and neuromag306cmb.lay layout files. Peter On 9 Feb 2016 6:10 AM, "Sreenivasan R. Nadar, Ph.D." wrote: Fieldtripers, Anybody has a layout file for Elekta/Neuromag system? I downloaded the file from the following discussion list: http://mailman.science.ru.nl/pipermail/fieldtrip/2007-March/001019.html. However, this layout file give errors (i.e., Attempt to reference field of non-structure array) when I use it for ft_topoplotIC(cfg,components). Am I missing something? I used the following commands: %~~~~~~~~~~~~~~~ clear all cfg = []; cfg.dataset = 'C071_resting_150608.fif'; cfg.hpfilter = 'yes' cfg.hpfreq = 1; cfg.channel = {'MEG', '-STI001', '-STI002','-STI003','-STI004', '-STI005',..., '-STI006','-STI007','-STI008','-STI101','-STI201','-STI301'}; data_continuous = ft_preprocessing(cfg); %resample the data to 100Hz cfg = []; cfg.resamplefs = 100; [data] = ft_resampledata(cfg, data_continuous) %% running ICA and cleaning data cfg = []; cfg.method = 'runica'; comp = ft_componentanalysis(cfg, data); cfg = []; cfg.component = [1:50]; cfg.layout = 'NM306all.mat'; cfg.comment = 'no'; ft_topoplotIC(cfg, comp); %~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Thank you Sreenivasan -------------- next part -------------- An HTML attachment was scrubbed... URL: From sreenivasan.r.nadar at gmail.com Mon Feb 8 20:51:46 2016 From: sreenivasan.r.nadar at gmail.com (Sreenivasan R. Nadar, Ph.D.) Date: Mon, 8 Feb 2016 14:51:46 -0500 Subject: [FieldTrip] Neuromag/ Elekta 306 layout file In-Reply-To: <620434cf-fd54-4ba5-b262-62e6170cba1c@email.android.com> References: <620434cf-fd54-4ba5-b262-62e6170cba1c@email.android.com> Message-ID: Hi Peter, Thanks. Yes, I also tried the ascii format neuromag306all.lay and neuromag306cmb.lay but no luck!! -Sreenivasan On Mon, Feb 8, 2016 at 2:44 PM, Peter Goodin wrote: > Hi Sreenivasan, > > Try using the neuromag306all.lay and neuromag306cmb.lay layout files. > > Peter > On 9 Feb 2016 6:10 AM, "Sreenivasan R. Nadar, Ph.D." < > sreenivasan.r.nadar at gmail.com> wrote: > > Fieldtripers, > > Anybody has a layout file for Elekta/Neuromag system? I downloaded the > file from the following discussion list: > http://mailman.science.ru.nl/pipermail/fieldtrip/2007-March/001019.html. > However, this layout file give errors (i.e., Attempt to reference field of > non-structure array) when I use it for ft_topoplotIC(cfg,components). Am I > missing something? I used the following commands: > > %~~~~~~~~~~~~~~~ > clear all > > cfg = []; > cfg.dataset = 'C071_resting_150608.fif'; > cfg.hpfilter = 'yes' > cfg.hpfreq = 1; > cfg.channel = {'MEG', '-STI001', '-STI002','-STI003','-STI004', > '-STI005',..., > '-STI006','-STI007','-STI008','-STI101','-STI201','-STI301'}; > > data_continuous = ft_preprocessing(cfg); > > %resample the data to 100Hz > cfg = []; > cfg.resamplefs = 100; > [data] = ft_resampledata(cfg, data_continuous) > > %% running ICA and cleaning data > cfg = []; > cfg.method = 'runica'; > comp = ft_componentanalysis(cfg, data); > > cfg = []; > cfg.component = [1:50]; > cfg.layout = 'NM306all.mat'; > cfg.comment = 'no'; > ft_topoplotIC(cfg, comp); > > %~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ > Thank you > > Sreenivasan > > > > _______________________________________________ > 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 stephen.politzer-ahles at ling-phil.ox.ac.uk Tue Feb 9 12:19:12 2016 From: stephen.politzer-ahles at ling-phil.ox.ac.uk (Stephen Politzer-Ahles) Date: Tue, 9 Feb 2016 11:19:12 +0000 Subject: [FieldTrip] importing large edf data Message-ID: Hi Leila, I'm sorry but I'm afraid I have not quite understood your issue. Can you give some more detail about what the problem is? In general, the fieldtrip structure output by ft_preprocessing() should have a .time field (indicating what timepoint during the epoch each sample corresponds to) and an .fsample field indicating the sampling rate (which you would also be able to use to figure out the time of each sample). Best, Steve --- Stephen Politzer-Ahles University of Oxford Language and Brain Lab Faculty of Linguistics, Phonetics & Philology http://users.ox.ac.uk/~cpgl0080/ > Message: 1 > Date: Mon, 8 Feb 2016 11:51:05 +0000 (UTC) > From: Leila Ayoubian > To: FieldTrip discussion list > Subject: Re: [FieldTrip] importing large edf data > Message-ID: > <1195829915.655104.1454932265573.JavaMail.yahoo at mail.yahoo.com> > Content-Type: text/plain; charset="utf-8" > > Hi Stephen:I just happen to realize that when I load the data as you > mentioned below, I can not get hold of the real time of the EEG file. > (e.g.18:32:43 ).Could you please point out as how I could retrieve the real > time of the EEG file after loading. > Thanks a lot.Kind regards > __________________________________________________ Leila Ayoubian, PhD. > Institute of Psychiatry, Psychology and Neuroscience > King's College London > > > > > From: Stephen Politzer-Ahles < > stephen.politzer-ahles at ling-phil.ox.ac.uk> > To: fieldtrip at science.ru.nl > Sent: Friday, December 18, 2015 12:37 PM > Subject: Re: [FieldTrip] importing large edf data > > Hello Leila, > > I think there are a few possible options for you. If you're not interested > in analyzing high frequencies, then you could import the data one sample at > a time, downsampling each channel, and then concatenate the channels into > one structure, as described in > http://www.fieldtriptoolbox.org/faq/how_can_i_preprocess_a_dataset_that_is_too_large_to_fit_into_memory. > I don't know what your sampling rate was, but if your sampling rate was > extremely high then this can save you a lot of space. For example, if > you're only interested in frequencies up to high gamma (around 90-100 Hz), > then your data only need to be sampled at around 250 Hz (per the Nyquist > theorem, plus a little extra wiggle room), so if you sampled at e.g. 2500 > Hz (which our EDF system does by default) or 5000 Hz then you have way more > samples than necessary; downsampling like this will greatly reduce your > array size. > > > > If that is not an option, then you can read in a segment of data as a > 'trial'. ft_preprocessing understands trial start and end times from > cfg.trl, which minimally is an Nx3 matrix (N is the number of trials to > read, and the columns are the start sample for each trial, the end sample > for each trial, and the trigger value associated with the trial; you could > just put 0 if there's no trigger). So let's say you want to read the first > through thousandth sample of the recording, then you would set up your cfg > as normal, then add: > > cfg.trl = [1 1000 0]; > > and then use ft_preprocessing. > > By way of example, here is code that reads in raw data as a series of > 1-second "trials": > > cfg = []; > cfg.dataset = 'C:\Users\Steve\Desktop\subj2.vhdr'; > cfg.trialdef.triallength = 1; % see documentation for ft_definetrial for > an explanation of these parameters > cfg.trialdef.ntrials = Inf; > cfg = ft_definetrial( cfg ); > > cfg.continuous = 'yes'; > data = ft_preprocessing(cfg); > > After doing whatever you need to these trials, you could concatenate them > back into continuous data (see > http://mailman.science.ru.nl/pipermail/fieldtrip/2011-June/003971.html > for details). > > Best, > Steve > > --- > Stephen Politzer-Ahles > University of Oxford > Language and Brain Lab > Faculty of Linguistics, Phonetics & Philology > http://users.ox.ac.uk/~cpgl0080/ > On Fri, Dec 18, 2015 at 11:00 AM, wrote: > > Send fieldtrip mailing list submissions to > ? ? ? ? fieldtrip at science.ru.nl > > To subscribe or unsubscribe via the World Wide Web, visit > ? ? ? ? http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > or, via email, send a message with subject or body 'help' to > ? ? ? ? fieldtrip-request at science.ru.nl > > You can reach the person managing the list at > ? ? ? ? fieldtrip-owner at science.ru.nl > > When replying, please edit your Subject line so it is more specific > than "Re: Contents of fieldtrip digest..." > > > Today's Topics: > > ? ?1. importing large edf data (Leila Ayoubian) > > > ---------------------------------------------------------------------- > > Message: 1 > Date: Fri, 18 Dec 2015 09:43:43 +0000 (UTC) > From: Leila Ayoubian > To: "fieldtrip at science.ru.nl" > Subject: [FieldTrip] importing large edf data > Message-ID: > ? ? ? ? <807603762.476165.1450431823359.JavaMail.yahoo at mail.yahoo.com> > Content-Type: text/plain; charset="utf-8" > > Hi:Thanks for providing us with this amazing toolbox. > I am new to fieldtrip. I am trying to import EEG data in the format of > *.edf for the purpose of seizure detection for epileptic patients. I can't > break up the data as you understand the detection has to have continuous > data. However I could load section of the data at a time and clear what is > already used and reload again.? > So trying to load the data like this: > cfg.dataset= ('mydata.edf'); > rawdata=ft_preprocessing(cfg); > This is the error message I get : > %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% > Error using zeros > Requested 51x51927040 (19.7GB) array exceeds maximum array size > preference. Creation of arrays greater than this limit may take a long time > and cause MATLAB to become unresponsive. See array size limit or > preference panel for more information. > > Error in read_edf (line 403) > ? dat = zeros(length(chanindx),nepochs*epochlength); > > Error in ft_read_data (line 622) > ??? dat = read_edf(filename, hdr, begsample, endsample, chanindx); > > Error in ft_preprocessing (line 566) > ????? dat = ft_read_data(cfg.datafile, 'header', hdr, 'begsample', > begsample, 'endsample', endsample, 'chanindx', rawindx, 'checkboundary', > ????? strcmp(cfg.continuous, 'no'), 'dataformat', cfg.dataformat); > > Error in ReadFedfiles (line 8) > > rawdata=ft_preprocessing(cfg);%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% > I tried the ft_redefinetrial, but since the input to this file is the > output from ft-PREPROCESSING it gives me the same error. > > > I also tried to use ft_read_data to choose the samples I want to load > :?filename???? = 'mydata.edf' > ?hdr?? = ft_read_header(filename); > ?sample.start=1 > ?sample.end=100 > dat = ft_read_data(filename,'sample.start','1','sample.end','100') > and here is again the error message: > Error using zeros > Requested 51x51927040 (19.7GB) array exceeds maximum array size > preference. Creation of arrays greater than this limit may take a > long time and cause MATLAB to become unresponsive. See array size limit or > preference panel for more information. > > Error in read_edf (line 403) > ? dat = zeros(length(chanindx),nepochs*epochlength); > > Error in ft_read_data (line 622) > ??? dat = read_edf(filename, hdr, begsample, endsample, chanindx); > > Error in ReadFedfiles (line 31) > dat = ft_read_data(filename,'sample.start','1','sample.end','100') > ? > >> > > Could you please direct me as to which functions and in which order I > should be using the functions to load data in smaller samples.Some examples > would be useful. > Thanks again for your support and assistance. > We appreciate your effort. > Kind regards > > ___________________________________________________ Dr. Leila Ayoubian > -------------- next part -------------- > An HTML attachment was scrubbed... > URL: < > http://mailman.science.ru.nl/pipermail/fieldtrip/attachments/20151218/6dfa7ce1/attachment-0001.html > > > > ------------------------------ > > _____________ > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From a.stolk8 at gmail.com Tue Feb 9 16:32:20 2016 From: a.stolk8 at gmail.com (Arjen Stolk) Date: Tue, 9 Feb 2016 07:32:20 -0800 Subject: [FieldTrip] importing large edf data In-Reply-To: References: Message-ID: <0817816F-2E1F-4CA9-8AA3-FABFE63A47DD@gmail.com> Hi both, There might be information on the date and time of recording in the orig field of the header, if that's what you're looking for. Don't know the name of the subfield from the top of my head. Arjen > On Feb 9, 2016, at 3:19 AM, Stephen Politzer-Ahles wrote: > > Hi Leila, > > I'm sorry but I'm afraid I have not quite understood your issue. Can you give some more detail about what the problem is? > > In general, the fieldtrip structure output by ft_preprocessing() should have a .time field (indicating what timepoint during the epoch each sample corresponds to) and an .fsample field indicating the sampling rate (which you would also be able to use to figure out the time of each sample). > > Best, > Steve > > > > --- > Stephen Politzer-Ahles > University of Oxford > Language and Brain Lab > Faculty of Linguistics, Phonetics & Philology > http://users.ox.ac.uk/~cpgl0080/ > >> Message: 1 >> Date: Mon, 8 Feb 2016 11:51:05 +0000 (UTC) >> From: Leila Ayoubian >> To: FieldTrip discussion list >> Subject: Re: [FieldTrip] importing large edf data >> Message-ID: >> <1195829915.655104.1454932265573.JavaMail.yahoo at mail.yahoo.com> >> Content-Type: text/plain; charset="utf-8" >> >> Hi Stephen:I just happen to realize that when I load the data as you mentioned below, I can not get hold of the real time of the EEG file. (e.g.18:32:43 ).Could you please point out as how I could retrieve the real time of the EEG file after loading. >> Thanks a lot.Kind regards >> __________________________________________________ Leila Ayoubian, PhD. >> Institute of Psychiatry, Psychology and Neuroscience >> King's College London >> >> >> >> >> From: Stephen Politzer-Ahles >> To: fieldtrip at science.ru.nl >> Sent: Friday, December 18, 2015 12:37 PM >> Subject: Re: [FieldTrip] importing large edf data >> >> Hello Leila, >> >> I think there are a few possible options for you. If you're not interested in analyzing high frequencies, then you could import the data one sample at a time, downsampling each channel, and then concatenate the channels into one structure, as described in http://www.fieldtriptoolbox.org/faq/how_can_i_preprocess_a_dataset_that_is_too_large_to_fit_into_memory. I don't know what your sampling rate was, but if your sampling rate was extremely high then this can save you a lot of space. For example, if you're only interested in frequencies up to high gamma (around 90-100 Hz), then your data only need to be sampled at around 250 Hz (per the Nyquist theorem, plus a little extra wiggle room), so if you sampled at e.g. 2500 Hz (which our EDF system does by default) or 5000 Hz then you have way more samples than necessary; downsampling like this will greatly reduce your array size. >> >> >> >> If that is not an option, then you can read in a segment of data as a 'trial'. ft_preprocessing understands trial start and end times from cfg.trl, which minimally is an Nx3 matrix (N is the number of trials to read, and the columns are the start sample for each trial, the end sample for each trial, and the trigger value associated with the trial; you could just put 0 if there's no trigger). So let's say you want to read the first through thousandth sample of the recording, then you would set up your cfg as normal, then add: >> >> cfg.trl = [1 1000 0]; >> >> and then use ft_preprocessing. >> >> By way of example, here is code that reads in raw data as a series of 1-second "trials": >> >> cfg = []; >> cfg.dataset = 'C:\Users\Steve\Desktop\subj2.vhdr'; >> cfg.trialdef.triallength = 1; % see documentation for ft_definetrial for an explanation of these parameters >> cfg.trialdef.ntrials = Inf; >> cfg = ft_definetrial( cfg ); >> >> cfg.continuous = 'yes'; >> data = ft_preprocessing(cfg); >> >> After doing whatever you need to these trials, you could concatenate them back into continuous data (see http://mailman.science.ru.nl/pipermail/fieldtrip/2011-June/003971.html for details). >> >> Best, >> Steve >> >> --- >> Stephen Politzer-Ahles >> University of Oxford >> Language and Brain Lab >> Faculty of Linguistics, Phonetics & Philology >> http://users.ox.ac.uk/~cpgl0080/ >> On Fri, Dec 18, 2015 at 11:00 AM, wrote: >> >> Send fieldtrip mailing list submissions to >> ? ? ? ? fieldtrip at science.ru.nl >> >> To subscribe or unsubscribe via the World Wide Web, visit >> ? ? ? ? http://mailman.science.ru.nl/mailman/listinfo/fieldtrip >> or, via email, send a message with subject or body 'help' to >> ? ? ? ? fieldtrip-request at science.ru.nl >> >> You can reach the person managing the list at >> ? ? ? ? fieldtrip-owner at science.ru.nl >> >> When replying, please edit your Subject line so it is more specific >> than "Re: Contents of fieldtrip digest..." >> >> >> Today's Topics: >> >> ? ?1. importing large edf data (Leila Ayoubian) >> >> >> ---------------------------------------------------------------------- >> >> Message: 1 >> Date: Fri, 18 Dec 2015 09:43:43 +0000 (UTC) >> From: Leila Ayoubian >> To: "fieldtrip at science.ru.nl" >> Subject: [FieldTrip] importing large edf data >> Message-ID: >> ? ? ? ? <807603762.476165.1450431823359.JavaMail.yahoo at mail.yahoo.com> >> Content-Type: text/plain; charset="utf-8" >> >> Hi:Thanks for providing us with this amazing toolbox. >> I am new to fieldtrip. I am trying to import EEG data in the format of *.edf for the purpose of seizure detection for epileptic patients. I can't break up the data as you understand the detection has to have continuous data. However I could load section of the data at a time and clear what is already used and reload again.? >> So trying to load the data like this: >> cfg.dataset= ('mydata.edf'); >> rawdata=ft_preprocessing(cfg); >> This is the error message I get : >> %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% >> Error using zeros >> Requested 51x51927040 (19.7GB) array exceeds maximum array size preference. Creation of arrays greater than this limit may take a long time >> and cause MATLAB to become unresponsive. See array size limit or preference panel for more information. >> >> Error in read_edf (line 403) >> ? dat = zeros(length(chanindx),nepochs*epochlength); >> >> Error in ft_read_data (line 622) >> ??? dat = read_edf(filename, hdr, begsample, endsample, chanindx); >> >> Error in ft_preprocessing (line 566) >> ????? dat = ft_read_data(cfg.datafile, 'header', hdr, 'begsample', begsample, 'endsample', endsample, 'chanindx', rawindx, 'checkboundary', >> ????? strcmp(cfg.continuous, 'no'), 'dataformat', cfg.dataformat); >> >> Error in ReadFedfiles (line 8) >> rawdata=ft_preprocessing(cfg);%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% >> I tried the ft_redefinetrial, but since the input to this file is the output from ft-PREPROCESSING it gives me the same error. >> >> >> I also tried to use ft_read_data to choose the samples I want to load :?filename???? = 'mydata.edf' >> ?hdr?? = ft_read_header(filename); >> ?sample.start=1 >> ?sample.end=100 >> dat = ft_read_data(filename,'sample.start','1','sample.end','100') >> and here is again the error message: >> Error using zeros >> Requested 51x51927040 (19.7GB) array exceeds maximum array size preference. Creation of arrays greater than this limit may take a >> long time and cause MATLAB to become unresponsive. See array size limit or preference panel for more information. >> >> Error in read_edf (line 403) >> ? dat = zeros(length(chanindx),nepochs*epochlength); >> >> Error in ft_read_data (line 622) >> ??? dat = read_edf(filename, hdr, begsample, endsample, chanindx); >> >> Error in ReadFedfiles (line 31) >> dat = ft_read_data(filename,'sample.start','1','sample.end','100') >> ? >> >> >> >> Could you please direct me as to which functions and in which order I should be using the functions to load data in smaller samples.Some examples would be useful. >> Thanks again for your support and assistance. >> We appreciate your effort. >> Kind regards >> >> ___________________________________________________ Dr. Leila Ayoubian >> -------------- next part -------------- >> An HTML attachment was scrubbed... >> URL: >> >> ------------------------------ >> >> _____________ > > _______________________________________________ > 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 leilayou_54 at yahoo.com Tue Feb 9 16:40:35 2016 From: leilayou_54 at yahoo.com (Leila Ayoubian) Date: Tue, 9 Feb 2016 15:40:35 +0000 (UTC) Subject: [FieldTrip] importing large edf data In-Reply-To: <0817816F-2E1F-4CA9-8AA3-FABFE63A47DD@gmail.com> References: <0817816F-2E1F-4CA9-8AA3-FABFE63A47DD@gmail.com> Message-ID: <1722640118.1244946.1455032435939.JavaMail.yahoo@mail.yahoo.com> Thanks.I need to retrieve the time when the recordings occure and I don't see it. I get the Fs but no more.I am using this code : cfg = [];cfg.trl = [1 1000000 0];%cfg.trl = [100001 2000000 0];%cfg.trialdef.triallength = 5;cfg.dataset =fileName; %'For leila.edf';cfg= ft_definetrial( cfg );cfg.continuous = 'yes'; datastr = ft_preprocessing(cfg);data=datastr.trial{1,1};chanls=datastr.label;Fs=datastr.fsample; and getting this datastr =             hdr: [1x1 struct]         label: {65x1 cell}          time: {[1x1000000 double]}         trial: {[65x1000000 double]}       fsample: 1024    sampleinfo: [1 1000000]           cfg: [1x1 struct] cfg =                    trl: [1 1000000 0]              dataset: 'Event13_Seizure_triggered_by_cortical_stim_Segment_1.edf'          trackconfig: 'off'          checkconfig: 'loose'            checksize: 100000         showcallinfo: 'yes'                debug: 'no'    outputfilepresent: 'overwrite'        trackcallinfo: 'yes'        trackdatainfo: 'no'             callinfo: [1x1 struct]              version: [1x1 struct]             datafile: 'Event13_Seizure_triggered_by_cortical_stim_Segment_1.edf'           headerfile: 'Event13_Seizure_triggered_by_cortical_stim_Segment_1.edf'           dataformat: 'edf'         headerformat: 'edf'                event: []           continuous: 'yes'  __________________________________________________ Leila Ayoubian, PhD. Institute of Psychiatry, Psychology and Neuroscience King's College London From: Arjen Stolk To: FieldTrip discussion list Sent: Tuesday, February 9, 2016 3:32 PM Subject: Re: [FieldTrip] importing large edf data Hi both,There might be information on the date and time of recording in the orig field of the header, if that's what you're looking for. Don't know the name of the subfield from the top of my head.Arjen On Feb 9, 2016, at 3:19 AM, Stephen Politzer-Ahles wrote: Hi Leila, I'm sorry but I'm afraid I have not quite understood your issue. Can you give some more detail about what the problem is? In general, the fieldtrip structure output by ft_preprocessing() should have a .time field (indicating what timepoint during the epoch each sample corresponds to) and an .fsample field indicating the sampling rate (which you would also be able to use to figure out the time of each sample). Best, Steve --- Stephen Politzer-Ahles University of Oxford Language and Brain Lab Faculty of Linguistics, Phonetics & Philology http://users.ox.ac.uk/~cpgl0080/  Message: 1 Date: Mon, 8 Feb 2016 11:51:05 +0000 (UTC) From: Leila Ayoubian To: FieldTrip discussion list Subject: Re: [FieldTrip] importing large edf data Message-ID:         <1195829915.655104.1454932265573.JavaMail.yahoo at mail.yahoo.com> Content-Type: text/plain; charset="utf-8" Hi Stephen:I just happen to realize that when I load the data as you mentioned below, I can not get hold of the real time of the EEG file. (e.g.18:32:43 ).Could you please point out as how I could retrieve the real time of the EEG file after loading. Thanks a lot.Kind regards __________________________________________________ Leila Ayoubian, PhD. Institute of Psychiatry, Psychology and Neuroscience King's College London       From: Stephen Politzer-Ahles  To: fieldtrip at science.ru.nl  Sent: Friday, December 18, 2015 12:37 PM  Subject: Re: [FieldTrip] importing large edf data Hello Leila, I think there are a few possible options for you. If you're not interested in analyzing high frequencies, then you could import the data one sample at a time, downsampling each channel, and then concatenate the channels into one structure, as described in http://www.fieldtriptoolbox.org/faq/how_can_i_preprocess_a_dataset_that_is_too_large_to_fit_into_memory. I don't know what your sampling rate was, but if your sampling rate was extremely high then this can save you a lot of space. For example, if you're only interested in frequencies up to high gamma (around 90-100 Hz), then your data only need to be sampled at around 250 Hz (per the Nyquist theorem, plus a little extra wiggle room), so if you sampled at e.g. 2500 Hz (which our EDF system does by default) or 5000 Hz then you have way more samples than necessary; downsampling like this will greatly reduce your array size. If that is not an option, then you can read in a segment of data as a 'trial'. ft_preprocessing understands trial start and end times from cfg.trl, which minimally is an Nx3 matrix (N is the number of trials to read, and the columns are the start sample for each trial, the end sample for each trial, and the trigger value associated with the trial; you could just put 0 if there's no trigger). So let's say you want to read the first through thousandth sample of the recording, then you would set up your cfg as normal, then add: cfg.trl = [1 1000 0]; and then use ft_preprocessing. By way of example, here is code that reads in raw data as a series of 1-second "trials": cfg = []; cfg.dataset = 'C:\Users\Steve\Desktop\subj2.vhdr'; cfg.trialdef.triallength = 1; % see documentation for ft_definetrial for an explanation of these parameters cfg.trialdef.ntrials = Inf; cfg = ft_definetrial( cfg ); cfg.continuous = 'yes'; data = ft_preprocessing(cfg); After doing whatever you need to these trials, you could concatenate them back into continuous data (see http://mailman.science.ru.nl/pipermail/fieldtrip/2011-June/003971.html for details). Best, Steve --- Stephen Politzer-Ahles University of Oxford Language and Brain Lab Faculty of Linguistics, Phonetics & Philology http://users.ox.ac.uk/~cpgl0080/ On Fri, Dec 18, 2015 at 11:00 AM, wrote: Send fieldtrip mailing list submissions to ? ? ? ? fieldtrip at science.ru.nl To subscribe or unsubscribe via the World Wide Web, visit ? ? ? ? http://mailman.science.ru.nl/mailman/listinfo/fieldtrip or, via email, send a message with subject or body 'help' to ? ? ? ? fieldtrip-request at science.ru.nl You can reach the person managing the list at ? ? ? ? fieldtrip-owner at science.ru.nl When replying, please edit your Subject line so it is more specific than "Re: Contents of fieldtrip digest..." Today's Topics: ? ?1. importing large edf data (Leila Ayoubian) ---------------------------------------------------------------------- Message: 1 Date: Fri, 18 Dec 2015 09:43:43 +0000 (UTC) From: Leila Ayoubian To: "fieldtrip at science.ru.nl" Subject: [FieldTrip] importing large edf data Message-ID: ? ? ? ? <807603762.476165.1450431823359.JavaMail.yahoo at mail.yahoo.com> Content-Type: text/plain; charset="utf-8" Hi:Thanks for providing us with this amazing toolbox. I am new to fieldtrip. I am trying to import EEG data in the format of *.edf for the purpose of seizure detection for epileptic patients. I can't break up the data as you understand the detection has to have continuous data. However I could load section of the data at a time and clear what is already used and reload again.? So trying to load the data like this: cfg.dataset= ('mydata.edf'); rawdata=ft_preprocessing(cfg); This is the error message I get : %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% Error using zeros Requested 51x51927040 (19.7GB) array exceeds maximum array size preference. Creation of arrays greater than this limit may take a long time and cause MATLAB to become unresponsive. See array size limit or preference panel for more information. Error in read_edf (line 403) ? dat = zeros(length(chanindx),nepochs*epochlength); Error in ft_read_data (line 622) ??? dat = read_edf(filename, hdr, begsample, endsample, chanindx); Error in ft_preprocessing (line 566) ????? dat = ft_read_data(cfg.datafile, 'header', hdr, 'begsample', begsample, 'endsample', endsample, 'chanindx', rawindx, 'checkboundary', ????? strcmp(cfg.continuous, 'no'), 'dataformat', cfg.dataformat); Error in ReadFedfiles (line 8) rawdata=ft_preprocessing(cfg);%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% I tried the ft_redefinetrial, but since the input to this file is the output from ft-PREPROCESSING it gives me the same error. I also tried to use ft_read_data to choose the samples I want to load :?filename???? = 'mydata.edf' ?hdr?? = ft_read_header(filename); ?sample.start=1 ?sample.end=100 dat = ft_read_data(filename,'sample.start','1','sample.end','100') and here is again the error message: Error using zeros Requested 51x51927040 (19.7GB) array exceeds maximum array size preference. Creation of arrays greater than this limit may take a long time and cause MATLAB to become unresponsive. See array size limit or preference panel for more information. Error in read_edf (line 403) ? dat = zeros(length(chanindx),nepochs*epochlength); Error in ft_read_data (line 622) ??? dat = read_edf(filename, hdr, begsample, endsample, chanindx); Error in ReadFedfiles (line 31) dat = ft_read_data(filename,'sample.start','1','sample.end','100') ? >> Could you please direct me as to which functions and in which order I should be using the functions to load data in smaller samples.Some examples would be useful. Thanks again for your support and assistance. We appreciate your effort. Kind regards ___________________________________________________ Dr. Leila Ayoubian -------------- next part -------------- An HTML attachment was scrubbed... URL: ------------------------------ _____________ _______________________________________________ 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 m.boyd at newcastle.ac.uk Tue Feb 9 17:52:22 2016 From: m.boyd at newcastle.ac.uk (Michael Boyd (PGR)) Date: Tue, 9 Feb 2016 16:52:22 +0000 Subject: [FieldTrip] Granger causality results out of range Message-ID: Hi, We are currently using the granger causality function of the toolbox as described in the connectivity tutorial. When we put LFP data through this, the results seem stable (or at least produce results between 0 and 1). However when we locally rereference the LFP data (e.g. to each channel's adjacent channel or current source density) the results are no longer in range (i.e. large negative numbers for granger causality). Our attempts to solve this so far have been in vain, so could anyone suggest where we might look to try to track down this instability? Script taken from connectivity tutorial: cfg = []; cfg.order = modelOrder; cfg.toolbox = 'bsmart'; mdata = ft_mvaranalysis(cfg, data); cfg = []; cfg.method = 'mvar'; mfreq = ft_freqanalysis(cfg, mdata); cfg = []; cfg.method = 'granger'; granger = ft_connectivityanalysis(cfg, mfreq); Thanks, Michael From leilayou_54 at yahoo.com Wed Feb 10 11:57:23 2016 From: leilayou_54 at yahoo.com (Leila Ayoubian) Date: Wed, 10 Feb 2016 10:57:23 +0000 (UTC) Subject: [FieldTrip] importing large edf data In-Reply-To: <0817816F-2E1F-4CA9-8AA3-FABFE63A47DD@gmail.com> References: <0817816F-2E1F-4CA9-8AA3-FABFE63A47DD@gmail.com> Message-ID: <844284323.1594104.1455101843736.JavaMail.yahoo@mail.yahoo.com> Hi;Thanks. I have found the timing of the beginning of the file under data.hdr.orig.T0 However the time has the format of hh:mm:ssIf I would like to load the timing of my file with milli-second precision what should I do? Kind regards From: Arjen Stolk To: FieldTrip discussion list Sent: Tuesday, February 9, 2016 3:32 PM Subject: Re: [FieldTrip] importing large edf data Hi both,There might be information on the date and time of recording in the orig field of the header, if that's what you're looking for. Don't know the name of the subfield from the top of my head.Arjen On Feb 9, 2016, at 3:19 AM, Stephen Politzer-Ahles wrote: Hi Leila, I'm sorry but I'm afraid I have not quite understood your issue. Can you give some more detail about what the problem is? In general, the fieldtrip structure output by ft_preprocessing() should have a .time field (indicating what timepoint during the epoch each sample corresponds to) and an .fsample field indicating the sampling rate (which you would also be able to use to figure out the time of each sample). Best, Steve --- Stephen Politzer-Ahles University of Oxford Language and Brain Lab Faculty of Linguistics, Phonetics & Philology http://users.ox.ac.uk/~cpgl0080/  Message: 1 Date: Mon, 8 Feb 2016 11:51:05 +0000 (UTC) From: Leila Ayoubian To: FieldTrip discussion list Subject: Re: [FieldTrip] importing large edf data Message-ID:         <1195829915.655104.1454932265573.JavaMail.yahoo at mail.yahoo.com> Content-Type: text/plain; charset="utf-8" Hi Stephen:I just happen to realize that when I load the data as you mentioned below, I can not get hold of the real time of the EEG file. (e.g.18:32:43 ).Could you please point out as how I could retrieve the real time of the EEG file after loading. Thanks a lot.Kind regards __________________________________________________ Leila Ayoubian, PhD. Institute of Psychiatry, Psychology and Neuroscience King's College London       From: Stephen Politzer-Ahles  To: fieldtrip at science.ru.nl  Sent: Friday, December 18, 2015 12:37 PM  Subject: Re: [FieldTrip] importing large edf data Hello Leila, I think there are a few possible options for you. If you're not interested in analyzing high frequencies, then you could import the data one sample at a time, downsampling each channel, and then concatenate the channels into one structure, as described in http://www.fieldtriptoolbox.org/faq/how_can_i_preprocess_a_dataset_that_is_too_large_to_fit_into_memory. I don't know what your sampling rate was, but if your sampling rate was extremely high then this can save you a lot of space. For example, if you're only interested in frequencies up to high gamma (around 90-100 Hz), then your data only need to be sampled at around 250 Hz (per the Nyquist theorem, plus a little extra wiggle room), so if you sampled at e.g. 2500 Hz (which our EDF system does by default) or 5000 Hz then you have way more samples than necessary; downsampling like this will greatly reduce your array size. If that is not an option, then you can read in a segment of data as a 'trial'. ft_preprocessing understands trial start and end times from cfg.trl, which minimally is an Nx3 matrix (N is the number of trials to read, and the columns are the start sample for each trial, the end sample for each trial, and the trigger value associated with the trial; you could just put 0 if there's no trigger). So let's say you want to read the first through thousandth sample of the recording, then you would set up your cfg as normal, then add: cfg.trl = [1 1000 0]; and then use ft_preprocessing. By way of example, here is code that reads in raw data as a series of 1-second "trials": cfg = []; cfg.dataset = 'C:\Users\Steve\Desktop\subj2.vhdr'; cfg.trialdef.triallength = 1; % see documentation for ft_definetrial for an explanation of these parameters cfg.trialdef.ntrials = Inf; cfg = ft_definetrial( cfg ); cfg.continuous = 'yes'; data = ft_preprocessing(cfg); After doing whatever you need to these trials, you could concatenate them back into continuous data (see http://mailman.science.ru.nl/pipermail/fieldtrip/2011-June/003971.html for details). Best, Steve --- Stephen Politzer-Ahles University of Oxford Language and Brain Lab Faculty of Linguistics, Phonetics & Philology http://users.ox.ac.uk/~cpgl0080/ On Fri, Dec 18, 2015 at 11:00 AM, wrote: Send fieldtrip mailing list submissions to ? ? ? ? fieldtrip at science.ru.nl To subscribe or unsubscribe via the World Wide Web, visit ? ? ? ? http://mailman.science.ru.nl/mailman/listinfo/fieldtrip or, via email, send a message with subject or body 'help' to ? ? ? ? fieldtrip-request at science.ru.nl You can reach the person managing the list at ? ? ? ? fieldtrip-owner at science.ru.nl When replying, please edit your Subject line so it is more specific than "Re: Contents of fieldtrip digest..." Today's Topics: ? ?1. importing large edf data (Leila Ayoubian) ---------------------------------------------------------------------- Message: 1 Date: Fri, 18 Dec 2015 09:43:43 +0000 (UTC) From: Leila Ayoubian To: "fieldtrip at science.ru.nl" Subject: [FieldTrip] importing large edf data Message-ID: ? ? ? ? <807603762.476165.1450431823359.JavaMail.yahoo at mail.yahoo.com> Content-Type: text/plain; charset="utf-8" Hi:Thanks for providing us with this amazing toolbox. I am new to fieldtrip. I am trying to import EEG data in the format of *.edf for the purpose of seizure detection for epileptic patients. I can't break up the data as you understand the detection has to have continuous data. However I could load section of the data at a time and clear what is already used and reload again.? So trying to load the data like this: cfg.dataset= ('mydata.edf'); rawdata=ft_preprocessing(cfg); This is the error message I get : %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% Error using zeros Requested 51x51927040 (19.7GB) array exceeds maximum array size preference. Creation of arrays greater than this limit may take a long time and cause MATLAB to become unresponsive. See array size limit or preference panel for more information. Error in read_edf (line 403) ? dat = zeros(length(chanindx),nepochs*epochlength); Error in ft_read_data (line 622) ??? dat = read_edf(filename, hdr, begsample, endsample, chanindx); Error in ft_preprocessing (line 566) ????? dat = ft_read_data(cfg.datafile, 'header', hdr, 'begsample', begsample, 'endsample', endsample, 'chanindx', rawindx, 'checkboundary', ????? strcmp(cfg.continuous, 'no'), 'dataformat', cfg.dataformat); Error in ReadFedfiles (line 8) rawdata=ft_preprocessing(cfg);%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% I tried the ft_redefinetrial, but since the input to this file is the output from ft-PREPROCESSING it gives me the same error. I also tried to use ft_read_data to choose the samples I want to load :?filename???? = 'mydata.edf' ?hdr?? = ft_read_header(filename); ?sample.start=1 ?sample.end=100 dat = ft_read_data(filename,'sample.start','1','sample.end','100') and here is again the error message: Error using zeros Requested 51x51927040 (19.7GB) array exceeds maximum array size preference. Creation of arrays greater than this limit may take a long time and cause MATLAB to become unresponsive. See array size limit or preference panel for more information. Error in read_edf (line 403) ? dat = zeros(length(chanindx),nepochs*epochlength); Error in ft_read_data (line 622) ??? dat = read_edf(filename, hdr, begsample, endsample, chanindx); Error in ReadFedfiles (line 31) dat = ft_read_data(filename,'sample.start','1','sample.end','100') ? >> Could you please direct me as to which functions and in which order I should be using the functions to load data in smaller samples.Some examples would be useful. Thanks again for your support and assistance. We appreciate your effort. Kind regards ___________________________________________________ Dr. Leila Ayoubian -------------- next part -------------- An HTML attachment was scrubbed... URL: ------------------------------ _____________ _______________________________________________ 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 stephen.politzer-ahles at ling-phil.ox.ac.uk Wed Feb 10 12:20:05 2016 From: stephen.politzer-ahles at ling-phil.ox.ac.uk (Stephen Politzer-Ahles) Date: Wed, 10 Feb 2016 11:20:05 +0000 Subject: [FieldTrip] importing large edf data Message-ID: Hi Leila (and Arjen): I just tried this out with a sample file, it looks like you can get this information if you use ft_read_header() rather than ft_preprocessing. The cfg structure I got from ft_preprocessing didn't contain the time-of-day information, but the structure returned from ft_read_header did: >> hdr = ft_read_header( cfg.dataset ); hdr.orig.T0 ans = 2005 9 15 10 18 42 I assume that's showing year, month, day, hour, minute (presumably based on the clock of the computer that made the recording). Best, Steve --- Stephen Politzer-Ahles University of Oxford Language and Brain Lab Faculty of Linguistics, Phonetics & Philology http://users.ox.ac.uk/~cpgl0080/ > > Message: 3 > Date: Tue, 9 Feb 2016 15:40:35 +0000 (UTC) > From: Leila Ayoubian > To: FieldTrip discussion list > Subject: Re: [FieldTrip] importing large edf data > Message-ID: > <1722640118.1244946.1455032435939.JavaMail.yahoo at mail.yahoo.com> > Content-Type: text/plain; charset="utf-8" > > Thanks.I need to retrieve the time when the recordings occure and I don't > see it. I get the Fs but no more.I am using this code : > cfg = [];cfg.trl = [1 1000000 0];%cfg.trl = [100001 2000000 > 0];%cfg.trialdef.triallength = 5;cfg.dataset =fileName; %'For > leila.edf';cfg= ft_definetrial( cfg );cfg.continuous = 'yes'; > datastr = > ft_preprocessing(cfg);data=datastr.trial{1,1};chanls=datastr.label;Fs=datastr.fsample; > and getting this?datastr =? > ? ? ? ? ? ?hdr: [1x1 struct]? ? ? ? ?label: {65x1 cell}? ? ? ? ? time: > {[1x1000000 double]}? ? ? ? ?trial: {[65x1000000 double]}? ? ? ?fsample: > 1024? ? sampleinfo: [1 1000000]? ? ? ? ? ?cfg: [1x1 struct] > > cfg =? > ? ? ? ? ? ? ? ? ? trl: [1 1000000 0]? ? ? ? ? ? ? dataset: > 'Event13_Seizure_triggered_by_cortical_stim_Segment_1.edf'? ? ? ? ? > trackconfig: 'off'? ? ? ? ? checkconfig: 'loose'? ? ? ? ? ? checksize: > 100000? ? ? ? ?showcallinfo: 'yes'? ? ? ? ? ? ? ? debug: 'no'? ? > outputfilepresent: 'overwrite'? ? ? ? trackcallinfo: 'yes'? ? ? ? > trackdatainfo: 'no'? ? ? ? ? ? ?callinfo: [1x1 struct]? ? ? ? ? ? ? > version: [1x1 struct]? ? ? ? ? ? ?datafile: > 'Event13_Seizure_triggered_by_cortical_stim_Segment_1.edf'? ? ? ? ? > ?headerfile: 'Event13_Seizure_triggered_by_cortical_stim_Segment_1.edf'? ? > ? ? ? ?dataformat: 'edf'? ? ? ? ?headerformat: 'edf'? ? ? ? ? ? ? ? event: > []? ? ? ? ? ?continuous: 'yes' > > ?__________________________________________________ Leila Ayoubian, PhD. > Institute of Psychiatry, Psychology and Neuroscience > King's College London > > > > > From: Arjen Stolk > To: FieldTrip discussion list > Sent: Tuesday, February 9, 2016 3:32 PM > Subject: Re: [FieldTrip] importing large edf data > > Hi both,There might be information on the date and time of recording in > the orig field of the header, if that's what you're looking for. Don't know > the name of the subfield from the top of my head.Arjen > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From leilayou_54 at yahoo.com Wed Feb 10 12:25:21 2016 From: leilayou_54 at yahoo.com (Leila Ayoubian) Date: Wed, 10 Feb 2016 11:25:21 +0000 (UTC) Subject: [FieldTrip] importing large edf data In-Reply-To: References: Message-ID: <2028618627.1587191.1455103521388.JavaMail.yahoo@mail.yahoo.com> Thanks Steve:Thanks. You are absolutely right. However what I need to get is one more information added to this          2005           9          15          10          18          42 Which is milli second. so I need to have an output of let's say (which 222 is in milli second)         2005           9          15          10          18          42        222 Do you know how I could do that? Thanks again __________________________________________________ Leila Ayoubian, PhD. Institute of Psychiatry, Psychology and Neuroscience King's College London From: Stephen Politzer-Ahles To: fieldtrip at science.ru.nl Sent: Wednesday, February 10, 2016 11:20 AM Subject: Re: [FieldTrip] importing large edf data Hi Leila (and Arjen): I just tried this out with a sample file, it looks like you can get this information if you use ft_read_header() rather than ft_preprocessing. The cfg structure I got from ft_preprocessing didn't contain the time-of-day information, but the structure returned from ft_read_header did: >> hdr = ft_read_header( cfg.dataset ); hdr.orig.T0 ans =         2005           9          15          10          18          42 I assume that's showing year, month, day, hour, minute (presumably based on the clock of the computer that made the recording). Best, Steve --- Stephen Politzer-Ahles University of Oxford Language and Brain Lab Faculty of Linguistics, Phonetics & Philology http://users.ox.ac.uk/~cpgl0080/  Message: 3 Date: Tue, 9 Feb 2016 15:40:35 +0000 (UTC) From: Leila Ayoubian To: FieldTrip discussion list Subject: Re: [FieldTrip] importing large edf data Message-ID:         <1722640118.1244946.1455032435939.JavaMail.yahoo at mail.yahoo.com> Content-Type: text/plain; charset="utf-8" Thanks.I need to retrieve the time when the recordings occure and I don't see it. I get the Fs but no more.I am using this code : cfg = [];cfg.trl = [1 1000000 0];%cfg.trl = [100001 2000000 0];%cfg.trialdef.triallength = 5;cfg.dataset =fileName; %'For leila.edf';cfg= ft_definetrial( cfg );cfg.continuous = 'yes'; datastr = ft_preprocessing(cfg);data=datastr.trial{1,1};chanls=datastr.label;Fs=datastr.fsample; and getting this?datastr =? ? ? ? ? ? ?hdr: [1x1 struct]? ? ? ? ?label: {65x1 cell}? ? ? ? ? time: {[1x1000000 double]}? ? ? ? ?trial: {[65x1000000 double]}? ? ? ?fsample: 1024? ? sampleinfo: [1 1000000]? ? ? ? ? ?cfg: [1x1 struct] cfg =? ? ? ? ? ? ? ? ? ? trl: [1 1000000 0]? ? ? ? ? ? ? dataset: 'Event13_Seizure_triggered_by_cortical_stim_Segment_1.edf'? ? ? ? ? trackconfig: 'off'? ? ? ? ? checkconfig: 'loose'? ? ? ? ? ? checksize: 100000? ? ? ? ?showcallinfo: 'yes'? ? ? ? ? ? ? ? debug: 'no'? ? outputfilepresent: 'overwrite'? ? ? ? trackcallinfo: 'yes'? ? ? ? trackdatainfo: 'no'? ? ? ? ? ? ?callinfo: [1x1 struct]? ? ? ? ? ? ? version: [1x1 struct]? ? ? ? ? ? ?datafile: 'Event13_Seizure_triggered_by_cortical_stim_Segment_1.edf'? ? ? ? ? ?headerfile: 'Event13_Seizure_triggered_by_cortical_stim_Segment_1.edf'? ? ? ? ? ?dataformat: 'edf'? ? ? ? ?headerformat: 'edf'? ? ? ? ? ? ? ? event: []? ? ? ? ? ?continuous: 'yes' ?__________________________________________________ Leila Ayoubian, PhD. Institute of Psychiatry, Psychology and Neuroscience King's College London       From: Arjen Stolk  To: FieldTrip discussion list  Sent: Tuesday, February 9, 2016 3:32 PM  Subject: Re: [FieldTrip] importing large edf data Hi both,There might be information on the date and time of recording in the orig field of the header, if that's what you're looking for. Don't know the name of the subfield from the top of my head.Arjen _______________________________________________ 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 david.pedrosa at ndcn.ox.ac.uk Wed Feb 10 15:54:24 2016 From: david.pedrosa at ndcn.ox.ac.uk (David Pedrosa) Date: Wed, 10 Feb 2016 14:54:24 +0000 Subject: [FieldTrip] ft_sourceanalysis, reshape error In-Reply-To: References: , Message-ID: Hi Azeez, I have been checking leadfields and data labels and they are actually the same. But the order is slightly different. Do you think this may cause the problems? Thanks for your help. Best, David ________________________________ Dr. David Pedrosa Clinical Research Fellow Medical Research Council Brain Network Dynamics Unit at the University of Oxford Nuffield Department of Clinical Neurosciences University of Oxford Level 6, West Wing John Radcliffe Hospital, OX3 9DU Tel: +44 (0)1865 572490 E-Mail: david.pedrosa at ndcn.ox.ac.uk http://www.mrcbndu.ox.ac.uk/ ________________________________ Von: fieldtrip-bounces at science.ru.nl [fieldtrip-bounces at science.ru.nl]" im Auftrag von "Azeez Adebimpe [azeez.adebimpe5 at gmail.com] Gesendet: Freitag, 5. Februar 2016 22:44 An: FieldTrip discussion list Betreff: Re: [FieldTrip] ft_sourceanalysis, reshape error Hi David, Sorry for late reply, I was on the journey. The same issue happened to me before when the labels in the leadfield and data were not the same. if you have 'Fp1' in leadfield and 'FP1' in data, it will view as different channels. Azeez On Fri, Feb 5, 2016 at 9:51 AM, David Pedrosa > wrote: Hi Azeez, thank you for the fast reply! I hadn't considered that but I have checked and I use the same labels for both leadfield and data. I mean it makes kind of sense that the reshape doesn't work as it is now, but I don't know where the problem is before. Can you think of anything else? Best, David ________________________________ Dr. David Pedrosa Clinical Research Fellow Medical Research Council Brain Network Dynamics Unit at the University of Oxford Nuffield Department of Clinical Neurosciences University of Oxford Level 6, West Wing John Radcliffe Hospital, OX3 9DU Tel: +44 (0)1865 572490 E-Mail: david.pedrosa at ndcn.ox.ac.uk http://www.mrcbndu.ox.ac.uk/ ________________________________ Von: fieldtrip-bounces at science.ru.nl [fieldtrip-bounces at science.ru.nl]" im Auftrag von "Azeez Adebimpe [azeez.adebimpe5 at gmail.com] Gesendet: Freitag, 5. Februar 2016 13:56 An: FieldTrip discussion list Betreff: Re: [FieldTrip] ft_sourceanalysis, reshape error Hi David, Probably the channels' labels in leadfield and data are not the same. check it and try again. Azeez On Fri, Feb 5, 2016 at 8:47 AM, David Pedrosa > wrote: Dear list, after installing the newest version of Fieldtrip today, I have encountered a rather strange error . I am tying to compute corticomuscular coherence for an EEG/EMG dataset and it worked well so far. With the new version however, I get a reshape error I find fard to understand. This is the code: cfg = []; cfg.frequency = 20;; cfg.grid = leadfield; cfg.method = 'dics'; cfg.refchan = 'ExtR1'; cfg.channel = {'EEG' 'ExtR1'}; cfg.vol = hdm; cfg.dics.projectnoise = 'no'; cfg.dics.lambda = '1%'; cfg.dics.keepfilter = 'yes'; cfg.dics.keeptrials = 'yes'; cfg.dics.realfilter = 'yes'; sourceAll = ft_sourceanalysis(cfg, freqAll); but this hasn't changed. The error pops up at lines 619/620 of ft_sourceanalysis (Cf = reshape(sum(Cf, 1) / Ntrials, [Nchans Nchans]);), where it supposedly just averages the CSD matrix over trials. And it makes kind of sense as the line says to reshape the CSDs from a 1xNchans matrix into a [Nchans Nchans] one. But why is it poppin up now as nothing has changed in my analyses? I have checked the updates of the last months and I couldn't find anything related to this. So has any one an idea why the analysis crashes at this point. Thanks in advance Best, David ________________________________ Dr. David Pedrosa Clinical Research Fellow Medical Research Council Brain Network Dynamics Unit at the University of Oxford Nuffield Department of Clinical Neurosciences University of Oxford Level 6, West Wing John Radcliffe Hospital, OX3 9DU Tel: +44 (0)1865 572490 E-Mail: david.pedrosa at ndcn.ox.ac.uk http://www.mrcbndu.ox.ac.uk/ _______________________________________________ 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 azeez.adebimpe5 at gmail.com Wed Feb 10 16:01:09 2016 From: azeez.adebimpe5 at gmail.com (Azeez Adebimpe) Date: Wed, 10 Feb 2016 16:01:09 +0100 Subject: [FieldTrip] ft_sourceanalysis, reshape error In-Reply-To: References: Message-ID: Hi David, I think it can cause it. I hope you can compute the leadfield again with the order in the data or you can rearrange it. Best, Azeez On Wed, Feb 10, 2016 at 3:54 PM, David Pedrosa wrote: > Hi Azeez, > > I have been checking leadfields and data labels and they are actually the > same. But the order is slightly different. Do you think this may cause the > problems? > > Thanks for your help. > > Best, > David > > ------------------------------ > Dr. David Pedrosa > > Clinical Research Fellow > Medical Research Council Brain Network Dynamics Unit at the University of > Oxford > Nuffield Department of Clinical Neurosciences > University of Oxford > Level 6, West Wing > John Radcliffe Hospital, OX3 9DU > *Tel:* +44 (0)1865 572490 > *E-Mail:* david.pedrosa at ndcn.ox.ac.uk > > http://www.mrcbndu.ox.ac.uk/ > > ------------------------------ > *Von:* fieldtrip-bounces at science.ru.nl [fieldtrip-bounces at science.ru.nl]" > im Auftrag von "Azeez Adebimpe [azeez.adebimpe5 at gmail.com] > *Gesendet:* Freitag, 5. Februar 2016 22:44 > *An:* FieldTrip discussion list > *Betreff:* Re: [FieldTrip] ft_sourceanalysis, reshape error > > Hi David, > > Sorry for late reply, I was on the journey. > The same issue happened to me before when the labels in the leadfield and > data were not the same. > if you have 'Fp1' in leadfield and 'FP1' in data, it will view as > different channels. > > > Azeez > > > > > On Fri, Feb 5, 2016 at 9:51 AM, David Pedrosa > wrote: > >> Hi Azeez, >> >> thank you for the fast reply! >> I hadn't considered that but I have checked and I use the same labels for >> both leadfield and data. >> >> I mean it makes kind of sense that the reshape doesn't work as it is now, >> but I don't know where the problem is before. >> >> Can you think of anything else? >> >> Best, >> David >> >> ------------------------------ >> Dr. David Pedrosa >> >> Clinical Research Fellow >> Medical Research Council Brain Network Dynamics Unit at the University of >> Oxford >> Nuffield Department of Clinical Neurosciences >> University of Oxford >> Level 6, West Wing >> John Radcliffe Hospital, OX3 9DU >> *Tel:* +44 (0)1865 572490 >> *E-Mail:* david.pedrosa at ndcn.ox.ac.uk >> >> http://www.mrcbndu.ox.ac.uk/ >> >> ------------------------------ >> *Von:* fieldtrip-bounces at science.ru.nl [fieldtrip-bounces at science.ru.nl]" >> im Auftrag von "Azeez Adebimpe [azeez.adebimpe5 at gmail.com] >> *Gesendet:* Freitag, 5. Februar 2016 13:56 >> *An:* FieldTrip discussion list >> *Betreff:* Re: [FieldTrip] ft_sourceanalysis, reshape error >> >> Hi David, >> >> Probably the channels' labels in leadfield and data are not the same. >> >> check it and try again. >> >> Azeez >> >> On Fri, Feb 5, 2016 at 8:47 AM, David Pedrosa < >> david.pedrosa at ndcn.ox.ac.uk> wrote: >> >>> Dear list, >>> >>> after installing the newest version of Fieldtrip today, I have >>> encountered a rather strange error . I am tying to compute corticomuscular >>> coherence for an EEG/EMG dataset and it worked well so far. With the new >>> version however, I get a reshape error I find fard to understand. This is >>> the code: >>> >>> cfg = []; >>> cfg.frequency = 20;; >>> cfg.grid = leadfield; >>> cfg.method = 'dics'; >>> cfg.refchan = 'ExtR1'; >>> cfg.channel = {'EEG' 'ExtR1'}; >>> cfg.vol = hdm; >>> cfg.dics.projectnoise = 'no'; >>> cfg.dics.lambda = '1%'; >>> cfg.dics.keepfilter = 'yes'; >>> cfg.dics.keeptrials = 'yes'; >>> cfg.dics.realfilter = 'yes'; >>> sourceAll = ft_sourceanalysis(cfg, freqAll); >>> >>> but this hasn't changed. The error pops up at lines 619/620 of >>> ft_sourceanalysis (Cf = reshape(sum(Cf, 1) / Ntrials, [Nchans Nchans]);), >>> where it supposedly just averages the CSD matrix over trials. And it makes >>> kind of sense as the line says to reshape the CSDs from a 1xNchans matrix >>> into a [Nchans Nchans] one. But why is it poppin up now as nothing has >>> changed in my analyses? I have checked the updates of the last months and I >>> couldn't find anything related to this. So has any one an idea why the >>> analysis crashes at this point. >>> >>> Thanks in advance >>> Best, >>> David >>> >>> ------------------------------ >>> Dr. David Pedrosa >>> >>> Clinical Research Fellow >>> Medical Research Council Brain Network Dynamics Unit at the University >>> of Oxford >>> Nuffield Department of Clinical Neurosciences >>> University of Oxford >>> Level 6, West Wing >>> John Radcliffe Hospital, OX3 9DU >>> *Tel:* +44 (0)1865 572490 >>> *E-Mail:* david.pedrosa at ndcn.ox.ac.uk >>> >>> http://www.mrcbndu.ox.ac.uk/ >>> >>> >>> _______________________________________________ >>> 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 Wed Feb 10 16:30:59 2016 From: jan.schoffelen at donders.ru.nl (Schoffelen, J.M. (Jan Mathijs)) Date: Wed, 10 Feb 2016 15:30:59 +0000 Subject: [FieldTrip] ft_sourceanalysis, reshape error In-Reply-To: References: , Message-ID: <60FD4C45-84AB-4304-9620-F79109898282@fcdonders.ru.nl> Hi David, Yes, I think that could cause the problem, although if that were true, your specific issue seems to be a convoluted manifestation of it. Bottom line with respect to channel order: when using pre-computed leadfields, the underlying assumption is more or less that the order of the channels, as represented in the leadfields, is the same as the order of the channels in the data. In principle, this can be accommodated with proper data bookkeeping, i.e. checking the labels that are associated with the data structure containing the forward model (i.e. the leadfield) against the channels in the data. We have started to move in this direction by inclusion of a label-field in data structures containing leadfields. Yet, the explicit check about channels and orderings of channels so far only throws an error if there’s a mismatch in the number of channels. Your reported error with a reshape issue could also reflect a problem with the data handling as such. Some more information would be appreciated in this regard. What does your freqAll contain in terms of spectral data? Fourier coefficients or cross-spectra? In case it’s cross-spectra, does it include multiple trials or not? If not, would it make sense to switch off the cfg.keeptrials flag in your cfg to ft_sourceanalysis. Best, Jan-Mathijs On Feb 10, 2016, at 3:54 PM, David Pedrosa > wrote: Hi Azeez, I have been checking leadfields and data labels and they are actually the same. But the order is slightly different. Do you think this may cause the problems? Thanks for your help. Best, David ________________________________ Dr. David Pedrosa Clinical Research Fellow Medical Research Council Brain Network Dynamics Unit at the University of Oxford Nuffield Department of Clinical Neurosciences University of Oxford Level 6, West Wing John Radcliffe Hospital, OX3 9DU Tel: +44 (0)1865 572490 E-Mail: david.pedrosa at ndcn.ox.ac.uk http://www.mrcbndu.ox.ac.uk/ ________________________________ Von: fieldtrip-bounces at science.ru.nl [fieldtrip-bounces at science.ru.nl]" im Auftrag von "Azeez Adebimpe [azeez.adebimpe5 at gmail.com] Gesendet: Freitag, 5. Februar 2016 22:44 An: FieldTrip discussion list Betreff: Re: [FieldTrip] ft_sourceanalysis, reshape error Hi David, Sorry for late reply, I was on the journey. The same issue happened to me before when the labels in the leadfield and data were not the same. if you have 'Fp1' in leadfield and 'FP1' in data, it will view as different channels. Azeez On Fri, Feb 5, 2016 at 9:51 AM, David Pedrosa > wrote: Hi Azeez, thank you for the fast reply! I hadn't considered that but I have checked and I use the same labels for both leadfield and data. I mean it makes kind of sense that the reshape doesn't work as it is now, but I don't know where the problem is before. Can you think of anything else? Best, David ________________________________ Dr. David Pedrosa Clinical Research Fellow Medical Research Council Brain Network Dynamics Unit at the University of Oxford Nuffield Department of Clinical Neurosciences University of Oxford Level 6, West Wing John Radcliffe Hospital, OX3 9DU Tel: +44 (0)1865 572490 E-Mail: david.pedrosa at ndcn.ox.ac.uk http://www.mrcbndu.ox.ac.uk/ ________________________________ Von: fieldtrip-bounces at science.ru.nl [fieldtrip-bounces at science.ru.nl]" im Auftrag von "Azeez Adebimpe [azeez.adebimpe5 at gmail.com] Gesendet: Freitag, 5. Februar 2016 13:56 An: FieldTrip discussion list Betreff: Re: [FieldTrip] ft_sourceanalysis, reshape error Hi David, Probably the channels' labels in leadfield and data are not the same. check it and try again. Azeez On Fri, Feb 5, 2016 at 8:47 AM, David Pedrosa > wrote: Dear list, after installing the newest version of Fieldtrip today, I have encountered a rather strange error . I am tying to compute corticomuscular coherence for an EEG/EMG dataset and it worked well so far. With the new version however, I get a reshape error I find fard to understand. This is the code: cfg = []; cfg.frequency = 20;; cfg.grid = leadfield; cfg.method = 'dics'; cfg.refchan = 'ExtR1'; cfg.channel = {'EEG' 'ExtR1'}; cfg.vol = hdm; cfg.dics.projectnoise = 'no'; cfg.dics.lambda = '1%'; cfg.dics.keepfilter = 'yes'; cfg.dics.keeptrials = 'yes'; cfg.dics.realfilter = 'yes'; sourceAll = ft_sourceanalysis(cfg, freqAll); but this hasn't changed. The error pops up at lines 619/620 of ft_sourceanalysis (Cf = reshape(sum(Cf, 1) / Ntrials, [Nchans Nchans]);), where it supposedly just averages the CSD matrix over trials. And it makes kind of sense as the line says to reshape the CSDs from a 1xNchans matrix into a [Nchans Nchans] one. But why is it poppin up now as nothing has changed in my analyses? I have checked the updates of the last months and I couldn't find anything related to this. So has any one an idea why the analysis crashes at this point. Thanks in advance Best, David ________________________________ Dr. David Pedrosa Clinical Research Fellow Medical Research Council Brain Network Dynamics Unit at the University of Oxford Nuffield Department of Clinical Neurosciences University of Oxford Level 6, West Wing John Radcliffe Hospital, OX3 9DU Tel: +44 (0)1865 572490 E-Mail: david.pedrosa at ndcn.ox.ac.uk http://www.mrcbndu.ox.ac.uk/ _______________________________________________ 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 robert.reinhart at vanderbilt.edu Wed Feb 10 16:57:27 2016 From: robert.reinhart at vanderbilt.edu (Rob Reinhart) Date: Wed, 10 Feb 2016 10:57:27 -0500 Subject: [FieldTrip] source analysis question Message-ID: Dear FieldTrip Forum, I have a naive question. When carrying out this source analysis ( http://www.fieldtriptoolbox.org/tutorial/networkanalysis), I believe there are data from ~275 sensors translated to data occupying ~372 nodes (or voxels) in source space. If this is true (i.e., larger number of source points derived from smaller number of sensors), does this create a margin of error in the source data? And if so, is this error quantifiable? Any advice on understanding this would be greatly appreciated. Thank you so much, Rob Reinhart -------------- next part -------------- An HTML attachment was scrubbed... URL: From david.pedrosa at ndcn.ox.ac.uk Wed Feb 10 17:04:01 2016 From: david.pedrosa at ndcn.ox.ac.uk (David Pedrosa) Date: Wed, 10 Feb 2016 16:04:01 +0000 Subject: [FieldTrip] ft_sourceanalysis, reshape error In-Reply-To: <60FD4C45-84AB-4304-9620-F79109898282@fcdonders.ru.nl> References: , , <60FD4C45-84AB-4304-9620-F79109898282@fcdonders.ru.nl> Message-ID: Hi Jan-Mathijs, thanks for your reply. I have explicitly made sure the order of both is identical (except for the EMG channel which is only present in the frequency analysis but not in the leadfield) and the problem still pops up, which makes me wonder if it could be something else as you suggested. Sorry for not being more precise. So the freqAll contains the fourier spectra for all channels and I have used many trials so I chose 'keeptrials'. Do you have any other suggestions what I could check or which settings might be causing this problem? Thanks Best, David ________________________________ Dr. David Pedrosa Clinical Research Fellow Medical Research Council Brain Network Dynamics Unit at the University of Oxford Nuffield Department of Clinical Neurosciences University of Oxford Level 6, West Wing John Radcliffe Hospital, OX3 9DU Tel: +44 (0)1865 572490 E-Mail: david.pedrosa at ndcn.ox.ac.uk http://www.mrcbndu.ox.ac.uk/ ________________________________ Von: fieldtrip-bounces at science.ru.nl [fieldtrip-bounces at science.ru.nl]" im Auftrag von "Schoffelen, J.M. (Jan Mathijs) [jan.schoffelen at donders.ru.nl] Gesendet: Mittwoch, 10. Februar 2016 15:30 An: FieldTrip discussion list Betreff: Re: [FieldTrip] ft_sourceanalysis, reshape error Hi David, Yes, I think that could cause the problem, although if that were true, your specific issue seems to be a convoluted manifestation of it. Bottom line with respect to channel order: when using pre-computed leadfields, the underlying assumption is more or less that the order of the channels, as represented in the leadfields, is the same as the order of the channels in the data. In principle, this can be accommodated with proper data bookkeeping, i.e. checking the labels that are associated with the data structure containing the forward model (i.e. the leadfield) against the channels in the data. We have started to move in this direction by inclusion of a label-field in data structures containing leadfields. Yet, the explicit check about channels and orderings of channels so far only throws an error if there’s a mismatch in the number of channels. Your reported error with a reshape issue could also reflect a problem with the data handling as such. Some more information would be appreciated in this regard. What does your freqAll contain in terms of spectral data? Fourier coefficients or cross-spectra? In case it’s cross-spectra, does it include multiple trials or not? If not, would it make sense to switch off the cfg.keeptrials flag in your cfg to ft_sourceanalysis. Best, Jan-Mathijs On Feb 10, 2016, at 3:54 PM, David Pedrosa > wrote: Hi Azeez, I have been checking leadfields and data labels and they are actually the same. But the order is slightly different. Do you think this may cause the problems? Thanks for your help. Best, David ________________________________ Dr. David Pedrosa Clinical Research Fellow Medical Research Council Brain Network Dynamics Unit at the University of Oxford Nuffield Department of Clinical Neurosciences University of Oxford Level 6, West Wing John Radcliffe Hospital, OX3 9DU Tel: +44 (0)1865 572490 E-Mail: david.pedrosa at ndcn.ox.ac.uk http://www.mrcbndu.ox.ac.uk/ ________________________________ Von: fieldtrip-bounces at science.ru.nl [fieldtrip-bounces at science.ru.nl]" im Auftrag von "Azeez Adebimpe [azeez.adebimpe5 at gmail.com] Gesendet: Freitag, 5. Februar 2016 22:44 An: FieldTrip discussion list Betreff: Re: [FieldTrip] ft_sourceanalysis, reshape error Hi David, Sorry for late reply, I was on the journey. The same issue happened to me before when the labels in the leadfield and data were not the same. if you have 'Fp1' in leadfield and 'FP1' in data, it will view as different channels. Azeez On Fri, Feb 5, 2016 at 9:51 AM, David Pedrosa > wrote: Hi Azeez, thank you for the fast reply! I hadn't considered that but I have checked and I use the same labels for both leadfield and data. I mean it makes kind of sense that the reshape doesn't work as it is now, but I don't know where the problem is before. Can you think of anything else? Best, David ________________________________ Dr. David Pedrosa Clinical Research Fellow Medical Research Council Brain Network Dynamics Unit at the University of Oxford Nuffield Department of Clinical Neurosciences University of Oxford Level 6, West Wing John Radcliffe Hospital, OX3 9DU Tel: +44 (0)1865 572490 E-Mail: david.pedrosa at ndcn.ox.ac.uk http://www.mrcbndu.ox.ac.uk/ ________________________________ Von: fieldtrip-bounces at science.ru.nl [fieldtrip-bounces at science.ru.nl]" im Auftrag von "Azeez Adebimpe [azeez.adebimpe5 at gmail.com] Gesendet: Freitag, 5. Februar 2016 13:56 An: FieldTrip discussion list Betreff: Re: [FieldTrip] ft_sourceanalysis, reshape error Hi David, Probably the channels' labels in leadfield and data are not the same. check it and try again. Azeez On Fri, Feb 5, 2016 at 8:47 AM, David Pedrosa > wrote: Dear list, after installing the newest version of Fieldtrip today, I have encountered a rather strange error . I am tying to compute corticomuscular coherence for an EEG/EMG dataset and it worked well so far. With the new version however, I get a reshape error I find fard to understand. This is the code: cfg = []; cfg.frequency = 20;; cfg.grid = leadfield; cfg.method = 'dics'; cfg.refchan = 'ExtR1'; cfg.channel = {'EEG' 'ExtR1'}; cfg.vol = hdm; cfg.dics.projectnoise = 'no'; cfg.dics.lambda = '1%'; cfg.dics.keepfilter = 'yes'; cfg.dics.keeptrials = 'yes'; cfg.dics.realfilter = 'yes'; sourceAll = ft_sourceanalysis(cfg, freqAll); but this hasn't changed. The error pops up at lines 619/620 of ft_sourceanalysis (Cf = reshape(sum(Cf, 1) / Ntrials, [Nchans Nchans]);), where it supposedly just averages the CSD matrix over trials. And it makes kind of sense as the line says to reshape the CSDs from a 1xNchans matrix into a [Nchans Nchans] one. But why is it poppin up now as nothing has changed in my analyses? I have checked the updates of the last months and I couldn't find anything related to this. So has any one an idea why the analysis crashes at this point. Thanks in advance Best, David ________________________________ Dr. David Pedrosa Clinical Research Fellow Medical Research Council Brain Network Dynamics Unit at the University of Oxford Nuffield Department of Clinical Neurosciences University of Oxford Level 6, West Wing John Radcliffe Hospital, OX3 9DU Tel: +44 (0)1865 572490 E-Mail: david.pedrosa at ndcn.ox.ac.uk http://www.mrcbndu.ox.ac.uk/ _______________________________________________ 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 Wed Feb 10 17:19:40 2016 From: jan.schoffelen at donders.ru.nl (Schoffelen, J.M. (Jan Mathijs)) Date: Wed, 10 Feb 2016 16:19:40 +0000 Subject: [FieldTrip] ft_sourceanalysis, reshape error In-Reply-To: References: , , <60FD4C45-84AB-4304-9620-F79109898282@fcdonders.ru.nl> Message-ID: <2442A09A-3D29-4D79-8391-1FC9485C08D7@fcdonders.ru.nl> Hi David, Could you first try and upgrade to the most recent version of Fieldtrip? Currently it seems that the reshaping that you mention on line 619/620 of ft_sourceanalysis, corresponds to lines 615/616 in my (i.e. the current) version. It could be that something goes wrong with the data handling, but I want to be sure that you’re not running into the problem with a buggy version of the code that may have been fixed in the meantime. Best Jan-Mathijs On Feb 10, 2016, at 5:04 PM, David Pedrosa > wrote: Hi Jan-Mathijs, thanks for your reply. I have explicitly made sure the order of both is identical (except for the EMG channel which is only present in the frequency analysis but not in the leadfield) and the problem still pops up, which makes me wonder if it could be something else as you suggested. Sorry for not being more precise. So the freqAll contains the fourier spectra for all channels and I have used many trials so I chose 'keeptrials'. Do you have any other suggestions what I could check or which settings might be causing this problem? Thanks Best, David ________________________________ Dr. David Pedrosa Clinical Research Fellow Medical Research Council Brain Network Dynamics Unit at the University of Oxford Nuffield Department of Clinical Neurosciences University of Oxford Level 6, West Wing John Radcliffe Hospital, OX3 9DU Tel: +44 (0)1865 572490 E-Mail: david.pedrosa at ndcn.ox.ac.uk http://www.mrcbndu.ox.ac.uk/ ________________________________ Von: fieldtrip-bounces at science.ru.nl [fieldtrip-bounces at science.ru.nl]" im Auftrag von "Schoffelen, J.M. (Jan Mathijs) [jan.schoffelen at donders.ru.nl] Gesendet: Mittwoch, 10. Februar 2016 15:30 An: FieldTrip discussion list Betreff: Re: [FieldTrip] ft_sourceanalysis, reshape error Hi David, Yes, I think that could cause the problem, although if that were true, your specific issue seems to be a convoluted manifestation of it. Bottom line with respect to channel order: when using pre-computed leadfields, the underlying assumption is more or less that the order of the channels, as represented in the leadfields, is the same as the order of the channels in the data. In principle, this can be accommodated with proper data bookkeeping, i.e. checking the labels that are associated with the data structure containing the forward model (i.e. the leadfield) against the channels in the data. We have started to move in this direction by inclusion of a label-field in data structures containing leadfields. Yet, the explicit check about channels and orderings of channels so far only throws an error if there’s a mismatch in the number of channels. Your reported error with a reshape issue could also reflect a problem with the data handling as such. Some more information would be appreciated in this regard. What does your freqAll contain in terms of spectral data? Fourier coefficients or cross-spectra? In case it’s cross-spectra, does it include multiple trials or not? If not, would it make sense to switch off the cfg.keeptrials flag in your cfg to ft_sourceanalysis. Best, Jan-Mathijs On Feb 10, 2016, at 3:54 PM, David Pedrosa > wrote: Hi Azeez, I have been checking leadfields and data labels and they are actually the same. But the order is slightly different. Do you think this may cause the problems? Thanks for your help. Best, David ________________________________ Dr. David Pedrosa Clinical Research Fellow Medical Research Council Brain Network Dynamics Unit at the University of Oxford Nuffield Department of Clinical Neurosciences University of Oxford Level 6, West Wing John Radcliffe Hospital, OX3 9DU Tel: +44 (0)1865 572490 E-Mail: david.pedrosa at ndcn.ox.ac.uk http://www.mrcbndu.ox.ac.uk/ ________________________________ Von: fieldtrip-bounces at science.ru.nl [fieldtrip-bounces at science.ru.nl]" im Auftrag von "Azeez Adebimpe [azeez.adebimpe5 at gmail.com] Gesendet: Freitag, 5. Februar 2016 22:44 An: FieldTrip discussion list Betreff: Re: [FieldTrip] ft_sourceanalysis, reshape error Hi David, Sorry for late reply, I was on the journey. The same issue happened to me before when the labels in the leadfield and data were not the same. if you have 'Fp1' in leadfield and 'FP1' in data, it will view as different channels. Azeez On Fri, Feb 5, 2016 at 9:51 AM, David Pedrosa > wrote: Hi Azeez, thank you for the fast reply! I hadn't considered that but I have checked and I use the same labels for both leadfield and data. I mean it makes kind of sense that the reshape doesn't work as it is now, but I don't know where the problem is before. Can you think of anything else? Best, David ________________________________ Dr. David Pedrosa Clinical Research Fellow Medical Research Council Brain Network Dynamics Unit at the University of Oxford Nuffield Department of Clinical Neurosciences University of Oxford Level 6, West Wing John Radcliffe Hospital, OX3 9DU Tel: +44 (0)1865 572490 E-Mail: david.pedrosa at ndcn.ox.ac.uk http://www.mrcbndu.ox.ac.uk/ ________________________________ Von: fieldtrip-bounces at science.ru.nl [fieldtrip-bounces at science.ru.nl]" im Auftrag von "Azeez Adebimpe [azeez.adebimpe5 at gmail.com] Gesendet: Freitag, 5. Februar 2016 13:56 An: FieldTrip discussion list Betreff: Re: [FieldTrip] ft_sourceanalysis, reshape error Hi David, Probably the channels' labels in leadfield and data are not the same. check it and try again. Azeez On Fri, Feb 5, 2016 at 8:47 AM, David Pedrosa > wrote: Dear list, after installing the newest version of Fieldtrip today, I have encountered a rather strange error . I am tying to compute corticomuscular coherence for an EEG/EMG dataset and it worked well so far. With the new version however, I get a reshape error I find fard to understand. This is the code: cfg = []; cfg.frequency = 20;; cfg.grid = leadfield; cfg.method = 'dics'; cfg.refchan = 'ExtR1'; cfg.channel = {'EEG' 'ExtR1'}; cfg.vol = hdm; cfg.dics.projectnoise = 'no'; cfg.dics.lambda = '1%'; cfg.dics.keepfilter = 'yes'; cfg.dics.keeptrials = 'yes'; cfg.dics.realfilter = 'yes'; sourceAll = ft_sourceanalysis(cfg, freqAll); but this hasn't changed. The error pops up at lines 619/620 of ft_sourceanalysis (Cf = reshape(sum(Cf, 1) / Ntrials, [Nchans Nchans]);), where it supposedly just averages the CSD matrix over trials. And it makes kind of sense as the line says to reshape the CSDs from a 1xNchans matrix into a [Nchans Nchans] one. But why is it poppin up now as nothing has changed in my analyses? I have checked the updates of the last months and I couldn't find anything related to this. So has any one an idea why the analysis crashes at this point. Thanks in advance Best, David ________________________________ Dr. David Pedrosa Clinical Research Fellow Medical Research Council Brain Network Dynamics Unit at the University of Oxford Nuffield Department of Clinical Neurosciences University of Oxford Level 6, West Wing John Radcliffe Hospital, OX3 9DU Tel: +44 (0)1865 572490 E-Mail: david.pedrosa at ndcn.ox.ac.uk http://www.mrcbndu.ox.ac.uk/ _______________________________________________ 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 _______________________________________________ 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 stephen.politzer-ahles at ling-phil.ox.ac.uk Wed Feb 10 17:30:24 2016 From: stephen.politzer-ahles at ling-phil.ox.ac.uk (Stephen Politzer-Ahles) Date: Wed, 10 Feb 2016 16:30:24 +0000 Subject: [FieldTrip] importing large edf data Message-ID: Hi Leila, I doubt that the file's creation time is stored with that level of precision. Depending on the filesystem of your computer, you might be able to find that information from the operating system's shell; see e.g. http://superuser.com/questions/937380/get-creation-time-of-file-in-milliseconds . I can't imagine what you would need this information for, though, anyway? Normally one would send some trigger events into the data file itself (e.g. on a trigger channel or something like that) so that all the information needed for event processing is within the file. Best, Steve --- Stephen Politzer-Ahles University of Oxford Language and Brain Lab Faculty of Linguistics, Phonetics & Philology http://users.ox.ac.uk/~cpgl0080/ > Message: 1 > Date: Wed, 10 Feb 2016 10:57:23 +0000 (UTC) > From: Leila Ayoubian > To: FieldTrip discussion list > Subject: Re: [FieldTrip] importing large edf data > Message-ID: > <844284323.1594104.1455101843736.JavaMail.yahoo at mail.yahoo.com> > Content-Type: text/plain; charset="utf-8" > > Hi;Thanks. > I have found the timing of the beginning of the file under > data.hdr.orig.T0 > However the time has the format of hh:mm:ssIf I would like to load the > timing of my file with milli-second precision what should I do? > Kind regards > > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From sreenivasan.r.nadar at gmail.com Wed Feb 10 17:33:06 2016 From: sreenivasan.r.nadar at gmail.com (Sreenivasan R. Nadar, Ph.D.) Date: Wed, 10 Feb 2016 11:33:06 -0500 Subject: [FieldTrip] Neuromag/ Elekta 306 layout file In-Reply-To: <620434cf-fd54-4ba5-b262-62e6170cba1c@email.android.com> References: <620434cf-fd54-4ba5-b262-62e6170cba1c@email.android.com> Message-ID: Hi Peter, I used the the 306 layout information from the Neuromag datafile using the following commands and it worked. cfg = []; cfg.component = [1:20]; cfg.comment = 'no'; cfg.skipscale = 'yes'; cfg.skipcomnt = 'no'; cfg.grad = data.grad; ft_topoplotIC(cfg, comp); -Sreenivasan On Mon, Feb 8, 2016 at 2:44 PM, Peter Goodin wrote: > Hi Sreenivasan, > > Try using the neuromag306all.lay and neuromag306cmb.lay layout files. > > Peter > On 9 Feb 2016 6:10 AM, "Sreenivasan R. Nadar, Ph.D." < > sreenivasan.r.nadar at gmail.com> wrote: > > Fieldtripers, > > Anybody has a layout file for Elekta/Neuromag system? I downloaded the > file from the following discussion list: > http://mailman.science.ru.nl/pipermail/fieldtrip/2007-March/001019.html. > However, this layout file give errors (i.e., Attempt to reference field of > non-structure array) when I use it for ft_topoplotIC(cfg,components). Am I > missing something? I used the following commands: > > %~~~~~~~~~~~~~~~ > clear all > > cfg = []; > cfg.dataset = 'C071_resting_150608.fif'; > cfg.hpfilter = 'yes' > cfg.hpfreq = 1; > cfg.channel = {'MEG', '-STI001', '-STI002','-STI003','-STI004', > '-STI005',..., > '-STI006','-STI007','-STI008','-STI101','-STI201','-STI301'}; > > data_continuous = ft_preprocessing(cfg); > > %resample the data to 100Hz > cfg = []; > cfg.resamplefs = 100; > [data] = ft_resampledata(cfg, data_continuous) > > %% running ICA and cleaning data > cfg = []; > cfg.method = 'runica'; > comp = ft_componentanalysis(cfg, data); > > cfg = []; > cfg.component = [1:50]; > cfg.layout = 'NM306all.mat'; > cfg.comment = 'no'; > ft_topoplotIC(cfg, comp); > > %~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ > Thank you > > Sreenivasan > > > > _______________________________________________ > 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 laxmi.shaw22 at gmail.com Wed Feb 10 18:00:01 2016 From: laxmi.shaw22 at gmail.com (Laxmi Shaw) Date: Wed, 10 Feb 2016 22:30:01 +0530 Subject: [FieldTrip] related to topoplot Message-ID: Hello Fieldtrip users, I am new to this tool.I want to use topoplot to plot any parametric quantification of EEG study.Can anybody help me in this regards Regards -- Laxmi Shaw Research Scholar(PhD) IIT Kharagpur West Bengal Ph no-08388837821 -------------- next part -------------- An HTML attachment was scrubbed... URL: From david.pedrosa at ndcn.ox.ac.uk Wed Feb 10 18:31:22 2016 From: david.pedrosa at ndcn.ox.ac.uk (David Pedrosa) Date: Wed, 10 Feb 2016 17:31:22 +0000 Subject: [FieldTrip] ft_sourceanalysis, reshape error In-Reply-To: <60FD4C45-84AB-4304-9620-F79109898282@fcdonders.ru.nl> References: , , <60FD4C45-84AB-4304-9620-F79109898282@fcdonders.ru.nl> Message-ID: Hi Jan-Mathijs, good point! I now have the most recent version but the error is still there, now at lines 615/616. Best, David ________________________________ Von: fieldtrip-bounces at science.ru.nl [fieldtrip-bounces at science.ru.nl]" im Auftrag von "Schoffelen, J.M. (Jan Mathijs) [jan.schoffelen at donders.ru.nl] Gesendet: Mittwoch, 10. Februar 2016 17:19 An: FieldTrip discussion list Betreff: Re: [FieldTrip] ft_sourceanalysis, reshape error Hi David, Could you first try and upgrade to the most recent version of Fieldtrip? Currently it seems that the reshaping that you mention on line 619/620 of ft_sourceanalysis, corresponds to lines 615/616 in my (i.e. the current) version. It could be that something goes wrong with the data handling, but I want to be sure that you’re not running into the problem with a buggy version of the code that may have been fixed in the meantime. Best Jan-Mathijs On Feb 10, 2016, at 5:04 PM, David Pedrosa > wrote: Hi Jan-Mathijs, thanks for your reply. I have explicitly made sure the order of both is identical (except for the EMG channel which is only present in the frequency analysis but not in the leadfield) and the problem still pops up, which makes me wonder if it could be something else as you suggested. Sorry for not being more precise. So the freqAll contains the fourier spectra for all channels and I have used many trials so I chose 'keeptrials'. Do you have any other suggestions what I could check or which settings might be causing this problem? Thanks Best, David ________________________________ Dr. David Pedrosa Clinical Research Fellow Medical Research Council Brain Network Dynamics Unit at the University of Oxford Nuffield Department of Clinical Neurosciences University of Oxford Level 6, West Wing John Radcliffe Hospital, OX3 9DU Tel: +44 (0)1865 572490 E-Mail: david.pedrosa at ndcn.ox.ac.uk http://www.mrcbndu.ox.ac.uk/ ________________________________ Von: fieldtrip-bounces at science.ru.nl [fieldtrip-bounces at science.ru.nl]" im Auftrag von "Schoffelen, J.M. (Jan Mathijs) [jan.schoffelen at donders.ru.nl] Gesendet: Mittwoch, 10. Februar 2016 15:30 An: FieldTrip discussion list Betreff: Re: [FieldTrip] ft_sourceanalysis, reshape error Hi David, Yes, I think that could cause the problem, although if that were true, your specific issue seems to be a convoluted manifestation of it. Bottom line with respect to channel order: when using pre-computed leadfields, the underlying assumption is more or less that the order of the channels, as represented in the leadfields, is the same as the order of the channels in the data. In principle, this can be accommodated with proper data bookkeeping, i.e. checking the labels that are associated with the data structure containing the forward model (i.e. the leadfield) against the channels in the data. We have started to move in this direction by inclusion of a label-field in data structures containing leadfields. Yet, the explicit check about channels and orderings of channels so far only throws an error if there’s a mismatch in the number of channels. Your reported error with a reshape issue could also reflect a problem with the data handling as such. Some more information would be appreciated in this regard. What does your freqAll contain in terms of spectral data? Fourier coefficients or cross-spectra? In case it’s cross-spectra, does it include multiple trials or not? If not, would it make sense to switch off the cfg.keeptrials flag in your cfg to ft_sourceanalysis. Best, Jan-Mathijs On Feb 10, 2016, at 3:54 PM, David Pedrosa > wrote: Hi Azeez, I have been checking leadfields and data labels and they are actually the same. But the order is slightly different. Do you think this may cause the problems? Thanks for your help. Best, David ________________________________ Dr. David Pedrosa Clinical Research Fellow Medical Research Council Brain Network Dynamics Unit at the University of Oxford Nuffield Department of Clinical Neurosciences University of Oxford Level 6, West Wing John Radcliffe Hospital, OX3 9DU Tel: +44 (0)1865 572490 E-Mail: david.pedrosa at ndcn.ox.ac.uk http://www.mrcbndu.ox.ac.uk/ ________________________________ Von: fieldtrip-bounces at science.ru.nl [fieldtrip-bounces at science.ru.nl]" im Auftrag von "Azeez Adebimpe [azeez.adebimpe5 at gmail.com] Gesendet: Freitag, 5. Februar 2016 22:44 An: FieldTrip discussion list Betreff: Re: [FieldTrip] ft_sourceanalysis, reshape error Hi David, Sorry for late reply, I was on the journey. The same issue happened to me before when the labels in the leadfield and data were not the same. if you have 'Fp1' in leadfield and 'FP1' in data, it will view as different channels. Azeez On Fri, Feb 5, 2016 at 9:51 AM, David Pedrosa > wrote: Hi Azeez, thank you for the fast reply! I hadn't considered that but I have checked and I use the same labels for both leadfield and data. I mean it makes kind of sense that the reshape doesn't work as it is now, but I don't know where the problem is before. Can you think of anything else? Best, David ________________________________ Dr. David Pedrosa Clinical Research Fellow Medical Research Council Brain Network Dynamics Unit at the University of Oxford Nuffield Department of Clinical Neurosciences University of Oxford Level 6, West Wing John Radcliffe Hospital, OX3 9DU Tel: +44 (0)1865 572490 E-Mail: david.pedrosa at ndcn.ox.ac.uk http://www.mrcbndu.ox.ac.uk/ ________________________________ Von: fieldtrip-bounces at science.ru.nl [fieldtrip-bounces at science.ru.nl]" im Auftrag von "Azeez Adebimpe [azeez.adebimpe5 at gmail.com] Gesendet: Freitag, 5. Februar 2016 13:56 An: FieldTrip discussion list Betreff: Re: [FieldTrip] ft_sourceanalysis, reshape error Hi David, Probably the channels' labels in leadfield and data are not the same. check it and try again. Azeez On Fri, Feb 5, 2016 at 8:47 AM, David Pedrosa > wrote: Dear list, after installing the newest version of Fieldtrip today, I have encountered a rather strange error . I am tying to compute corticomuscular coherence for an EEG/EMG dataset and it worked well so far. With the new version however, I get a reshape error I find fard to understand. This is the code: cfg = []; cfg.frequency = 20;; cfg.grid = leadfield; cfg.method = 'dics'; cfg.refchan = 'ExtR1'; cfg.channel = {'EEG' 'ExtR1'}; cfg.vol = hdm; cfg.dics.projectnoise = 'no'; cfg.dics.lambda = '1%'; cfg.dics.keepfilter = 'yes'; cfg.dics.keeptrials = 'yes'; cfg.dics.realfilter = 'yes'; sourceAll = ft_sourceanalysis(cfg, freqAll); but this hasn't changed. The error pops up at lines 619/620 of ft_sourceanalysis (Cf = reshape(sum(Cf, 1) / Ntrials, [Nchans Nchans]);), where it supposedly just averages the CSD matrix over trials. And it makes kind of sense as the line says to reshape the CSDs from a 1xNchans matrix into a [Nchans Nchans] one. But why is it poppin up now as nothing has changed in my analyses? I have checked the updates of the last months and I couldn't find anything related to this. So has any one an idea why the analysis crashes at this point. Thanks in advance Best, David ________________________________ Dr. David Pedrosa Clinical Research Fellow Medical Research Council Brain Network Dynamics Unit at the University of Oxford Nuffield Department of Clinical Neurosciences University of Oxford Level 6, West Wing John Radcliffe Hospital, OX3 9DU Tel: +44 (0)1865 572490 E-Mail: david.pedrosa at ndcn.ox.ac.uk http://www.mrcbndu.ox.ac.uk/ _______________________________________________ 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 _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip ________________________________ Dr. David Pedrosa Clinical Research Fellow Medical Research Council Brain Network Dynamics Unit at the University of Oxford Nuffield Department of Clinical Neurosciences University of Oxford Level 6, West Wing John Radcliffe Hospital, OX3 9DU Tel: +44 (0)1865 572490 E-Mail: david.pedrosa at ndcn.ox.ac.uk http://www.mrcbndu.ox.ac.uk/ ________________________________ Von: fieldtrip-bounces at science.ru.nl [fieldtrip-bounces at science.ru.nl]" im Auftrag von "Schoffelen, J.M. (Jan Mathijs) [jan.schoffelen at donders.ru.nl] Gesendet: Mittwoch, 10. Februar 2016 15:30 An: FieldTrip discussion list Betreff: Re: [FieldTrip] ft_sourceanalysis, reshape error Hi David, Yes, I think that could cause the problem, although if that were true, your specific issue seems to be a convoluted manifestation of it. Bottom line with respect to channel order: when using pre-computed leadfields, the underlying assumption is more or less that the order of the channels, as represented in the leadfields, is the same as the order of the channels in the data. In principle, this can be accommodated with proper data bookkeeping, i.e. checking the labels that are associated with the data structure containing the forward model (i.e. the leadfield) against the channels in the data. We have started to move in this direction by inclusion of a label-field in data structures containing leadfields. Yet, the explicit check about channels and orderings of channels so far only throws an error if there’s a mismatch in the number of channels. Your reported error with a reshape issue could also reflect a problem with the data handling as such. Some more information would be appreciated in this regard. What does your freqAll contain in terms of spectral data? Fourier coefficients or cross-spectra? In case it’s cross-spectra, does it include multiple trials or not? If not, would it make sense to switch off the cfg.keeptrials flag in your cfg to ft_sourceanalysis. Best, Jan-Mathijs On Feb 10, 2016, at 3:54 PM, David Pedrosa > wrote: Hi Azeez, I have been checking leadfields and data labels and they are actually the same. But the order is slightly different. Do you think this may cause the problems? Thanks for your help. Best, David ________________________________ Dr. David Pedrosa Clinical Research Fellow Medical Research Council Brain Network Dynamics Unit at the University of Oxford Nuffield Department of Clinical Neurosciences University of Oxford Level 6, West Wing John Radcliffe Hospital, OX3 9DU Tel: +44 (0)1865 572490 E-Mail: david.pedrosa at ndcn.ox.ac.uk http://www.mrcbndu.ox.ac.uk/ ________________________________ Von: fieldtrip-bounces at science.ru.nl [fieldtrip-bounces at science.ru.nl]" im Auftrag von "Azeez Adebimpe [azeez.adebimpe5 at gmail.com] Gesendet: Freitag, 5. Februar 2016 22:44 An: FieldTrip discussion list Betreff: Re: [FieldTrip] ft_sourceanalysis, reshape error Hi David, Sorry for late reply, I was on the journey. The same issue happened to me before when the labels in the leadfield and data were not the same. if you have 'Fp1' in leadfield and 'FP1' in data, it will view as different channels. Azeez On Fri, Feb 5, 2016 at 9:51 AM, David Pedrosa > wrote: Hi Azeez, thank you for the fast reply! I hadn't considered that but I have checked and I use the same labels for both leadfield and data. I mean it makes kind of sense that the reshape doesn't work as it is now, but I don't know where the problem is before. Can you think of anything else? Best, David ________________________________ Dr. David Pedrosa Clinical Research Fellow Medical Research Council Brain Network Dynamics Unit at the University of Oxford Nuffield Department of Clinical Neurosciences University of Oxford Level 6, West Wing John Radcliffe Hospital, OX3 9DU Tel: +44 (0)1865 572490 E-Mail: david.pedrosa at ndcn.ox.ac.uk http://www.mrcbndu.ox.ac.uk/ ________________________________ Von: fieldtrip-bounces at science.ru.nl [fieldtrip-bounces at science.ru.nl]" im Auftrag von "Azeez Adebimpe [azeez.adebimpe5 at gmail.com] Gesendet: Freitag, 5. Februar 2016 13:56 An: FieldTrip discussion list Betreff: Re: [FieldTrip] ft_sourceanalysis, reshape error Hi David, Probably the channels' labels in leadfield and data are not the same. check it and try again. Azeez On Fri, Feb 5, 2016 at 8:47 AM, David Pedrosa > wrote: Dear list, after installing the newest version of Fieldtrip today, I have encountered a rather strange error . I am tying to compute corticomuscular coherence for an EEG/EMG dataset and it worked well so far. With the new version however, I get a reshape error I find fard to understand. This is the code: cfg = []; cfg.frequency = 20;; cfg.grid = leadfield; cfg.method = 'dics'; cfg.refchan = 'ExtR1'; cfg.channel = {'EEG' 'ExtR1'}; cfg.vol = hdm; cfg.dics.projectnoise = 'no'; cfg.dics.lambda = '1%'; cfg.dics.keepfilter = 'yes'; cfg.dics.keeptrials = 'yes'; cfg.dics.realfilter = 'yes'; sourceAll = ft_sourceanalysis(cfg, freqAll); but this hasn't changed. The error pops up at lines 619/620 of ft_sourceanalysis (Cf = reshape(sum(Cf, 1) / Ntrials, [Nchans Nchans]);), where it supposedly just averages the CSD matrix over trials. And it makes kind of sense as the line says to reshape the CSDs from a 1xNchans matrix into a [Nchans Nchans] one. But why is it poppin up now as nothing has changed in my analyses? I have checked the updates of the last months and I couldn't find anything related to this. So has any one an idea why the analysis crashes at this point. Thanks in advance Best, David ________________________________ Dr. David Pedrosa Clinical Research Fellow Medical Research Council Brain Network Dynamics Unit at the University of Oxford Nuffield Department of Clinical Neurosciences University of Oxford Level 6, West Wing John Radcliffe Hospital, OX3 9DU Tel: +44 (0)1865 572490 E-Mail: david.pedrosa at ndcn.ox.ac.uk http://www.mrcbndu.ox.ac.uk/ _______________________________________________ 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 Max.Cantor at Colorado.EDU Thu Feb 11 01:03:36 2016 From: Max.Cantor at Colorado.EDU (Max Cantor) Date: Wed, 10 Feb 2016 17:03:36 -0700 Subject: [FieldTrip] define trials from multiple datasets Message-ID: Hi fieldtrip community, I'm trying to use ft_definetrial to create a trial definition from 8 datasets, recorded back-to-back from a subject, and then use ft_redefinetrial with that trial definition and raw data that was concatenated in eeglab and converted to a fieldtrip structure using eeglab2fieldtrip. Is this feasible in a relatively straightforward way, or would I be better off doing the epoching in eeglab as well before converting back to fieldtrip? On a side note, I chose to concatenate the data in eeglab because I could not figure out a convenient way to do so in fieldtrip. I know there is ft_appenddata, but as best as I can tell this is meant to be used after epoching, and the sample information was not being concatenated (or at least not properly), which was creating problems down the line with artifact rejection in my pipeline. Maybe there was some other way to do this properly in fieldtrip that I had not considered in the first place. Best, Max -- Max Cantor Graduate Student Cognitive Neuroscience of Language Lab University of Colorado Boulder -------------- next part -------------- An HTML attachment was scrubbed... URL: From a.stolk8 at gmail.com Thu Feb 11 01:15:55 2016 From: a.stolk8 at gmail.com (Arjen Stolk) Date: Wed, 10 Feb 2016 16:15:55 -0800 Subject: [FieldTrip] define trials from multiple datasets In-Reply-To: References: Message-ID: Hi Max, See these pages and judge for yourself: http://www.fieldtriptoolbox.org/example/getting_started_with_reading_raw_eeg_or_meg_data http://www.fieldtriptoolbox.org/example/making_your_own_trialfun_for_conditional_trial_definition If your trials are defined as x1 time before a certain trigger until x2 time after, it's very easy. If it's slightly more complicated, then check that second page. In short, the idea there is to make ft_definetrial call a tailormade trial function (cfg.trialfun). The good news is that if the triggers and trials are the same for each subject, you only have to make one function. Hope that gets you started, Arjen 2016-02-10 16:03 GMT-08:00 Max Cantor : > Hi fieldtrip community, > > I'm trying to use ft_definetrial to create a trial definition from 8 > datasets, recorded back-to-back from a subject, and then use > ft_redefinetrial with that trial definition and raw data that was > concatenated in eeglab and converted to a fieldtrip structure using > eeglab2fieldtrip. Is this feasible in a relatively straightforward way, or > would I be better off doing the epoching in eeglab as well before > converting back to fieldtrip? > > On a side note, I chose to concatenate the data in eeglab because I could > not figure out a convenient way to do so in fieldtrip. I know there is > ft_appenddata, but as best as I can tell this is meant to be used after > epoching, and the sample information was not being concatenated (or at > least not properly), which was creating problems down the line with > artifact rejection in my pipeline. Maybe there was some other way to do > this properly in fieldtrip that I had not considered in the first place. > > Best, > > Max > > -- > Max Cantor > Graduate Student > Cognitive Neuroscience of Language Lab > University of Colorado Boulder > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > -------------- next part -------------- An HTML attachment was scrubbed... URL: From a.stolk8 at gmail.com Thu Feb 11 01:18:40 2016 From: a.stolk8 at gmail.com (Arjen Stolk) Date: Wed, 10 Feb 2016 16:18:40 -0800 Subject: [FieldTrip] define trials from multiple datasets In-Reply-To: References: Message-ID: I see now you wrote 8 sessions with the same subject. You could make a loop that conceptually looks like this: for s = 1:numsessions cfg = ft_definetrial(cfg); data{s} = ft_preprocessing(cfg); end data_all = ft_appenddata([], data{:}); 2016-02-10 16:15 GMT-08:00 Arjen Stolk : > Hi Max, > > See these pages and judge for yourself: > > http://www.fieldtriptoolbox.org/example/getting_started_with_reading_raw_eeg_or_meg_data > > http://www.fieldtriptoolbox.org/example/making_your_own_trialfun_for_conditional_trial_definition > > If your trials are defined as x1 time before a certain trigger until x2 > time after, it's very easy. If it's slightly more complicated, then check > that second page. In short, the idea there is to make ft_definetrial call a > tailormade trial function (cfg.trialfun). The good news is that if the > triggers and trials are the same for each subject, you only have to make > one function. > > Hope that gets you started, > Arjen > > 2016-02-10 16:03 GMT-08:00 Max Cantor : > >> Hi fieldtrip community, >> >> I'm trying to use ft_definetrial to create a trial definition from 8 >> datasets, recorded back-to-back from a subject, and then use >> ft_redefinetrial with that trial definition and raw data that was >> concatenated in eeglab and converted to a fieldtrip structure using >> eeglab2fieldtrip. Is this feasible in a relatively straightforward way, or >> would I be better off doing the epoching in eeglab as well before >> converting back to fieldtrip? >> >> On a side note, I chose to concatenate the data in eeglab because I could >> not figure out a convenient way to do so in fieldtrip. I know there is >> ft_appenddata, but as best as I can tell this is meant to be used after >> epoching, and the sample information was not being concatenated (or at >> least not properly), which was creating problems down the line with >> artifact rejection in my pipeline. Maybe there was some other way to do >> this properly in fieldtrip that I had not considered in the first place. >> >> Best, >> >> Max >> >> -- >> Max Cantor >> Graduate Student >> Cognitive Neuroscience of Language Lab >> University of Colorado Boulder >> >> _______________________________________________ >> 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 Max.Cantor at Colorado.EDU Thu Feb 11 01:52:30 2016 From: Max.Cantor at Colorado.EDU (Max Cantor) Date: Wed, 10 Feb 2016 17:52:30 -0700 Subject: [FieldTrip] define trials from multiple datasets In-Reply-To: References: Message-ID: Hi Arjen, I had a feeling it would involve creating my own trial function, which is something I've never done but have looked over in the past, so I'll give that a shot, thanks! As for your suggested loop... I had tried something almost like that, except preprocessing the data first and then using ft_redefinetrial, and then concatenating them all with ft_appenddata. However, What I ended up realizing was that the .trl array was only being retained from one of the 8 sessions, which was creating problems with artifact rejection since the artifact rejection functions use the sample points from .trl. Are you suggesting that if I had used ft_definetrial and then that configuration in ft_preprocessing, rather than what I did, that it would have concatenated .trl for all sessions? If this is not the case, and either way should work, maybe I did something else wrong, or misdiagnosed the problem altogether... On Wed, Feb 10, 2016 at 5:18 PM, Arjen Stolk wrote: > I see now you wrote 8 sessions with the same subject. You could make a > loop that conceptually looks like this: > > for s = 1:numsessions > > cfg = ft_definetrial(cfg); > data{s} = ft_preprocessing(cfg); > > end > data_all = ft_appenddata([], data{:}); > > 2016-02-10 16:15 GMT-08:00 Arjen Stolk : > >> Hi Max, >> >> See these pages and judge for yourself: >> >> http://www.fieldtriptoolbox.org/example/getting_started_with_reading_raw_eeg_or_meg_data >> >> http://www.fieldtriptoolbox.org/example/making_your_own_trialfun_for_conditional_trial_definition >> >> If your trials are defined as x1 time before a certain trigger until x2 >> time after, it's very easy. If it's slightly more complicated, then check >> that second page. In short, the idea there is to make ft_definetrial call a >> tailormade trial function (cfg.trialfun). The good news is that if the >> triggers and trials are the same for each subject, you only have to make >> one function. >> >> Hope that gets you started, >> Arjen >> >> 2016-02-10 16:03 GMT-08:00 Max Cantor : >> >>> Hi fieldtrip community, >>> >>> I'm trying to use ft_definetrial to create a trial definition from 8 >>> datasets, recorded back-to-back from a subject, and then use >>> ft_redefinetrial with that trial definition and raw data that was >>> concatenated in eeglab and converted to a fieldtrip structure using >>> eeglab2fieldtrip. Is this feasible in a relatively straightforward way, or >>> would I be better off doing the epoching in eeglab as well before >>> converting back to fieldtrip? >>> >>> On a side note, I chose to concatenate the data in eeglab because I >>> could not figure out a convenient way to do so in fieldtrip. I know there >>> is ft_appenddata, but as best as I can tell this is meant to be used after >>> epoching, and the sample information was not being concatenated (or at >>> least not properly), which was creating problems down the line with >>> artifact rejection in my pipeline. Maybe there was some other way to do >>> this properly in fieldtrip that I had not considered in the first place. >>> >>> Best, >>> >>> Max >>> >>> -- >>> Max Cantor >>> Graduate Student >>> Cognitive Neuroscience of Language Lab >>> University of Colorado Boulder >>> >>> _______________________________________________ >>> fieldtrip mailing list >>> fieldtrip at donders.ru.nl >>> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip >>> >> >> > -- Max Cantor Graduate Student Cognitive Neuroscience of Language Lab University of Colorado Boulder -------------- next part -------------- An HTML attachment was scrubbed... URL: From jan.schoffelen at donders.ru.nl Thu Feb 11 09:00:29 2016 From: jan.schoffelen at donders.ru.nl (Schoffelen, J.M. (Jan Mathijs)) Date: Thu, 11 Feb 2016 08:00:29 +0000 Subject: [FieldTrip] ft_sourceanalysis, reshape error In-Reply-To: References: , , <60FD4C45-84AB-4304-9620-F79109898282@fcdonders.ru.nl> Message-ID: <0DBD24DC-AF86-423B-8903-7795EF34C696@fcdonders.ru.nl> Hi David, I realized that the issue you raised is related to something that has already been flagged in our bugzilla issue tracker system (on bugzilla.fieldtriptoolbox.org, look for bug #3029). As a matter of fact, I filed this one myself, so I should have recognized it earlier. Although your problem is slightly different, it’s indeed related to the altered data handling that also causes trouble in the bug mentioned. I suggest that you sign up on bugzilla and add yourself to the CC list of this bug (this suggestion of course also holds for the person who followed up on this thread in an e-mail sent to my personal e-mail account :o) ). In this way you can keep an eye on our progress fixing it, and provide feedback/input. Best wishes, Jan-Mathijs On Feb 10, 2016, at 6:31 PM, David Pedrosa > wrote: Hi Jan-Mathijs, good point! I now have the most recent version but the error is still there, now at lines 615/616. Best, David ________________________________ Von: fieldtrip-bounces at science.ru.nl [fieldtrip-bounces at science.ru.nl]" im Auftrag von "Schoffelen, J.M. (Jan Mathijs) [jan.schoffelen at donders.ru.nl] Gesendet: Mittwoch, 10. Februar 2016 17:19 An: FieldTrip discussion list Betreff: Re: [FieldTrip] ft_sourceanalysis, reshape error Hi David, Could you first try and upgrade to the most recent version of Fieldtrip? Currently it seems that the reshaping that you mention on line 619/620 of ft_sourceanalysis, corresponds to lines 615/616 in my (i.e. the current) version. It could be that something goes wrong with the data handling, but I want to be sure that you’re not running into the problem with a buggy version of the code that may have been fixed in the meantime. Best Jan-Mathijs On Feb 10, 2016, at 5:04 PM, David Pedrosa > wrote: Hi Jan-Mathijs, thanks for your reply. I have explicitly made sure the order of both is identical (except for the EMG channel which is only present in the frequency analysis but not in the leadfield) and the problem still pops up, which makes me wonder if it could be something else as you suggested. Sorry for not being more precise. So the freqAll contains the fourier spectra for all channels and I have used many trials so I chose 'keeptrials'. Do you have any other suggestions what I could check or which settings might be causing this problem? Thanks Best, David ________________________________ Dr. David Pedrosa Clinical Research Fellow Medical Research Council Brain Network Dynamics Unit at the University of Oxford Nuffield Department of Clinical Neurosciences University of Oxford Level 6, West Wing John Radcliffe Hospital, OX3 9DU Tel: +44 (0)1865 572490 E-Mail: david.pedrosa at ndcn.ox.ac.uk http://www.mrcbndu.ox.ac.uk/ ________________________________ Von: fieldtrip-bounces at science.ru.nl [fieldtrip-bounces at science.ru.nl]" im Auftrag von "Schoffelen, J.M. (Jan Mathijs) [jan.schoffelen at donders.ru.nl] Gesendet: Mittwoch, 10. Februar 2016 15:30 An: FieldTrip discussion list Betreff: Re: [FieldTrip] ft_sourceanalysis, reshape error Hi David, Yes, I think that could cause the problem, although if that were true, your specific issue seems to be a convoluted manifestation of it. Bottom line with respect to channel order: when using pre-computed leadfields, the underlying assumption is more or less that the order of the channels, as represented in the leadfields, is the same as the order of the channels in the data. In principle, this can be accommodated with proper data bookkeeping, i.e. checking the labels that are associated with the data structure containing the forward model (i.e. the leadfield) against the channels in the data. We have started to move in this direction by inclusion of a label-field in data structures containing leadfields. Yet, the explicit check about channels and orderings of channels so far only throws an error if there’s a mismatch in the number of channels. Your reported error with a reshape issue could also reflect a problem with the data handling as such. Some more information would be appreciated in this regard. What does your freqAll contain in terms of spectral data? Fourier coefficients or cross-spectra? In case it’s cross-spectra, does it include multiple trials or not? If not, would it make sense to switch off the cfg.keeptrials flag in your cfg to ft_sourceanalysis. Best, Jan-Mathijs On Feb 10, 2016, at 3:54 PM, David Pedrosa > wrote: Hi Azeez, I have been checking leadfields and data labels and they are actually the same. But the order is slightly different. Do you think this may cause the problems? Thanks for your help. Best, David ________________________________ Dr. David Pedrosa Clinical Research Fellow Medical Research Council Brain Network Dynamics Unit at the University of Oxford Nuffield Department of Clinical Neurosciences University of Oxford Level 6, West Wing John Radcliffe Hospital, OX3 9DU Tel: +44 (0)1865 572490 E-Mail: david.pedrosa at ndcn.ox.ac.uk http://www.mrcbndu.ox.ac.uk/ ________________________________ Von: fieldtrip-bounces at science.ru.nl [fieldtrip-bounces at science.ru.nl]" im Auftrag von "Azeez Adebimpe [azeez.adebimpe5 at gmail.com] Gesendet: Freitag, 5. Februar 2016 22:44 An: FieldTrip discussion list Betreff: Re: [FieldTrip] ft_sourceanalysis, reshape error Hi David, Sorry for late reply, I was on the journey. The same issue happened to me before when the labels in the leadfield and data were not the same. if you have 'Fp1' in leadfield and 'FP1' in data, it will view as different channels. Azeez On Fri, Feb 5, 2016 at 9:51 AM, David Pedrosa > wrote: Hi Azeez, thank you for the fast reply! I hadn't considered that but I have checked and I use the same labels for both leadfield and data. I mean it makes kind of sense that the reshape doesn't work as it is now, but I don't know where the problem is before. Can you think of anything else? Best, David ________________________________ Dr. David Pedrosa Clinical Research Fellow Medical Research Council Brain Network Dynamics Unit at the University of Oxford Nuffield Department of Clinical Neurosciences University of Oxford Level 6, West Wing John Radcliffe Hospital, OX3 9DU Tel: +44 (0)1865 572490 E-Mail: david.pedrosa at ndcn.ox.ac.uk http://www.mrcbndu.ox.ac.uk/ ________________________________ Von: fieldtrip-bounces at science.ru.nl [fieldtrip-bounces at science.ru.nl]" im Auftrag von "Azeez Adebimpe [azeez.adebimpe5 at gmail.com] Gesendet: Freitag, 5. Februar 2016 13:56 An: FieldTrip discussion list Betreff: Re: [FieldTrip] ft_sourceanalysis, reshape error Hi David, Probably the channels' labels in leadfield and data are not the same. check it and try again. Azeez On Fri, Feb 5, 2016 at 8:47 AM, David Pedrosa > wrote: Dear list, after installing the newest version of Fieldtrip today, I have encountered a rather strange error . I am tying to compute corticomuscular coherence for an EEG/EMG dataset and it worked well so far. With the new version however, I get a reshape error I find fard to understand. This is the code: cfg = []; cfg.frequency = 20;; cfg.grid = leadfield; cfg.method = 'dics'; cfg.refchan = 'ExtR1'; cfg.channel = {'EEG' 'ExtR1'}; cfg.vol = hdm; cfg.dics.projectnoise = 'no'; cfg.dics.lambda = '1%'; cfg.dics.keepfilter = 'yes'; cfg.dics.keeptrials = 'yes'; cfg.dics.realfilter = 'yes'; sourceAll = ft_sourceanalysis(cfg, freqAll); but this hasn't changed. The error pops up at lines 619/620 of ft_sourceanalysis (Cf = reshape(sum(Cf, 1) / Ntrials, [Nchans Nchans]);), where it supposedly just averages the CSD matrix over trials. And it makes kind of sense as the line says to reshape the CSDs from a 1xNchans matrix into a [Nchans Nchans] one. But why is it poppin up now as nothing has changed in my analyses? I have checked the updates of the last months and I couldn't find anything related to this. So has any one an idea why the analysis crashes at this point. Thanks in advance Best, David ________________________________ Dr. David Pedrosa Clinical Research Fellow Medical Research Council Brain Network Dynamics Unit at the University of Oxford Nuffield Department of Clinical Neurosciences University of Oxford Level 6, West Wing John Radcliffe Hospital, OX3 9DU Tel: +44 (0)1865 572490 E-Mail: david.pedrosa at ndcn.ox.ac.uk http://www.mrcbndu.ox.ac.uk/ _______________________________________________ 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 _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip ________________________________ Dr. David Pedrosa Clinical Research Fellow Medical Research Council Brain Network Dynamics Unit at the University of Oxford Nuffield Department of Clinical Neurosciences University of Oxford Level 6, West Wing John Radcliffe Hospital, OX3 9DU Tel: +44 (0)1865 572490 E-Mail: david.pedrosa at ndcn.ox.ac.uk http://www.mrcbndu.ox.ac.uk/ ________________________________ Von: fieldtrip-bounces at science.ru.nl [fieldtrip-bounces at science.ru.nl]" im Auftrag von "Schoffelen, J.M. (Jan Mathijs) [jan.schoffelen at donders.ru.nl] Gesendet: Mittwoch, 10. Februar 2016 15:30 An: FieldTrip discussion list Betreff: Re: [FieldTrip] ft_sourceanalysis, reshape error Hi David, Yes, I think that could cause the problem, although if that were true, your specific issue seems to be a convoluted manifestation of it. Bottom line with respect to channel order: when using pre-computed leadfields, the underlying assumption is more or less that the order of the channels, as represented in the leadfields, is the same as the order of the channels in the data. In principle, this can be accommodated with proper data bookkeeping, i.e. checking the labels that are associated with the data structure containing the forward model (i.e. the leadfield) against the channels in the data. We have started to move in this direction by inclusion of a label-field in data structures containing leadfields. Yet, the explicit check about channels and orderings of channels so far only throws an error if there’s a mismatch in the number of channels. Your reported error with a reshape issue could also reflect a problem with the data handling as such. Some more information would be appreciated in this regard. What does your freqAll contain in terms of spectral data? Fourier coefficients or cross-spectra? In case it’s cross-spectra, does it include multiple trials or not? If not, would it make sense to switch off the cfg.keeptrials flag in your cfg to ft_sourceanalysis. Best, Jan-Mathijs On Feb 10, 2016, at 3:54 PM, David Pedrosa > wrote: Hi Azeez, I have been checking leadfields and data labels and they are actually the same. But the order is slightly different. Do you think this may cause the problems? Thanks for your help. Best, David ________________________________ Dr. David Pedrosa Clinical Research Fellow Medical Research Council Brain Network Dynamics Unit at the University of Oxford Nuffield Department of Clinical Neurosciences University of Oxford Level 6, West Wing John Radcliffe Hospital, OX3 9DU Tel: +44 (0)1865 572490 E-Mail: david.pedrosa at ndcn.ox.ac.uk http://www.mrcbndu.ox.ac.uk/ ________________________________ Von: fieldtrip-bounces at science.ru.nl [fieldtrip-bounces at science.ru.nl]" im Auftrag von "Azeez Adebimpe [azeez.adebimpe5 at gmail.com] Gesendet: Freitag, 5. Februar 2016 22:44 An: FieldTrip discussion list Betreff: Re: [FieldTrip] ft_sourceanalysis, reshape error Hi David, Sorry for late reply, I was on the journey. The same issue happened to me before when the labels in the leadfield and data were not the same. if you have 'Fp1' in leadfield and 'FP1' in data, it will view as different channels. Azeez On Fri, Feb 5, 2016 at 9:51 AM, David Pedrosa > wrote: Hi Azeez, thank you for the fast reply! I hadn't considered that but I have checked and I use the same labels for both leadfield and data. I mean it makes kind of sense that the reshape doesn't work as it is now, but I don't know where the problem is before. Can you think of anything else? Best, David ________________________________ Dr. David Pedrosa Clinical Research Fellow Medical Research Council Brain Network Dynamics Unit at the University of Oxford Nuffield Department of Clinical Neurosciences University of Oxford Level 6, West Wing John Radcliffe Hospital, OX3 9DU Tel: +44 (0)1865 572490 E-Mail: david.pedrosa at ndcn.ox.ac.uk http://www.mrcbndu.ox.ac.uk/ ________________________________ Von: fieldtrip-bounces at science.ru.nl [fieldtrip-bounces at science.ru.nl]" im Auftrag von "Azeez Adebimpe [azeez.adebimpe5 at gmail.com] Gesendet: Freitag, 5. Februar 2016 13:56 An: FieldTrip discussion list Betreff: Re: [FieldTrip] ft_sourceanalysis, reshape error Hi David, Probably the channels' labels in leadfield and data are not the same. check it and try again. Azeez On Fri, Feb 5, 2016 at 8:47 AM, David Pedrosa > wrote: Dear list, after installing the newest version of Fieldtrip today, I have encountered a rather strange error . I am tying to compute corticomuscular coherence for an EEG/EMG dataset and it worked well so far. With the new version however, I get a reshape error I find fard to understand. This is the code: cfg = []; cfg.frequency = 20;; cfg.grid = leadfield; cfg.method = 'dics'; cfg.refchan = 'ExtR1'; cfg.channel = {'EEG' 'ExtR1'}; cfg.vol = hdm; cfg.dics.projectnoise = 'no'; cfg.dics.lambda = '1%'; cfg.dics.keepfilter = 'yes'; cfg.dics.keeptrials = 'yes'; cfg.dics.realfilter = 'yes'; sourceAll = ft_sourceanalysis(cfg, freqAll); but this hasn't changed. The error pops up at lines 619/620 of ft_sourceanalysis (Cf = reshape(sum(Cf, 1) / Ntrials, [Nchans Nchans]);), where it supposedly just averages the CSD matrix over trials. And it makes kind of sense as the line says to reshape the CSDs from a 1xNchans matrix into a [Nchans Nchans] one. But why is it poppin up now as nothing has changed in my analyses? I have checked the updates of the last months and I couldn't find anything related to this. So has any one an idea why the analysis crashes at this point. Thanks in advance Best, David ________________________________ Dr. David Pedrosa Clinical Research Fellow Medical Research Council Brain Network Dynamics Unit at the University of Oxford Nuffield Department of Clinical Neurosciences University of Oxford Level 6, West Wing John Radcliffe Hospital, OX3 9DU Tel: +44 (0)1865 572490 E-Mail: david.pedrosa at ndcn.ox.ac.uk http://www.mrcbndu.ox.ac.uk/ _______________________________________________ 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 _______________________________________________ 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 tzvetan.popov at uni-konstanz.de Thu Feb 11 09:45:48 2016 From: tzvetan.popov at uni-konstanz.de (Tzvetan Popov) Date: Thu, 11 Feb 2016 09:45:48 +0100 Subject: [FieldTrip] source analysis question In-Reply-To: References: Message-ID: Hi Rob, your observation is correct. In the particular method applied, i.e. spatial filtering, one considers always one node at the time. On the basis of the data covariance and the lead field the goal is to compute a set of weights that essentially allow for reconstructing the time course of activity at a given location independent from all others. The entire discretized brain volume is “scanned” eventually resulting in distributed source map. The observation you made becomes relevant when you estimate the activity at all locations at once, e.g. minimum-norm distributed source modeling. best tzvetan > Dear FieldTrip Forum, > > I have a naive question. When carrying out this source analysis (http://www.fieldtriptoolbox.org/tutorial/networkanalysis), I believe there are data from ~275 sensors translated to data occupying ~372 nodes (or voxels) in source space. If this is true (i.e., larger number of source points derived from smaller number of sensors), does this create a margin of error in the source data? And if so, is this error quantifiable? > > Any advice on understanding this would be greatly appreciated. > > Thank you so much, > > Rob Reinhart > _______________________________________________ > 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 Mary-Jo.Diepeveen at mpi.nl Thu Feb 11 11:23:17 2016 From: Mary-Jo.Diepeveen at mpi.nl (Diepeveen, Mary-Jo) Date: Thu, 11 Feb 2016 10:23:17 +0000 Subject: [FieldTrip] Repair missing channel Message-ID: <9AEBC8200222F443B6E297F0D479F1311C4865D0@UM-EXCDAG-A03.um.gwdg.de> Hello, During artifact rejection (in summary mode), I had to remove the F7 channel for some of my subjects. I'm now trying to replace these missing channels but I'm having some difficulties. Since I only have 28 channels (excl. eye and reference) and F7 is all the way on the front left, I thought using the average method would be the best. After some trial and errors, I now have this: cfg = []; cfg.method = 'template'; cfg.template = 'custom_easycap32.mat'; cfg.channel = {'F7'}; neighbours = ft_prepare_neighbours(cfg, data_nat_clean) cfg = []; cfg.method = 'average'; cfg.layout = 'custom_easycap32.mat'; cfg.missingchannel = ft_channelselection('F7', data_nat_clean.label); cfg.neighbours = neighbours; data_nat_chan = ft_channelrepair(cfg, data_nat_clean) If I run this code, I get the following which I think is due to an error in the first part: Trying to load sensor neighbours from a template Successfully loaded neighbour structure from custom_easycap32.mat Improper index matrix reference. Error in ft_prepare_neighbours (line 219) neighb_chans = {neighbours(:).label}; What does this error mean and how can I fix this? I have also tried some things without the first part, but then either it said that everything worked at the resulting data still had 27 channels (so without the F7) or I got an error saying there is a reference to non-existing field 'neighbours' . I hope someone can help me out! Thanks, Mary-Jo -------------- next part -------------- An HTML attachment was scrubbed... URL: From niels.haumann at dac.au.dk Thu Feb 11 13:42:37 2016 From: niels.haumann at dac.au.dk (Niels Trusbak Haumann) Date: Thu, 11 Feb 2016 12:42:37 +0000 Subject: [FieldTrip] related to topoplot In-Reply-To: References: Message-ID: <9DC7C16686EE6344B54A9D39046541939977DC8B@SRVUNIMBX05.uni.au.dk> Hello Laxmi. You will find a tutorial here, which explains how to make topoplots: http://www.fieldtriptoolbox.org/tutorial/plotting You will need to define a time window for the topoplot in seconds with the cfg.xlim variable. Optionally you can also define a lower and upper limit for the mean values within this time window with the cfg.zlim variable. Depending on which type of EEG system you are applying, you will also need to define a layout template for the topoplot. Different layout templates are included with FieldTrip and described here: http://www.fieldtriptoolbox.org/template/layout Best Niels Center for Music In the Brain Dept. Clinical Medicine, Aarhus University Hospital, Denmark ________________________________ Fra: fieldtrip-bounces at science.ru.nl [fieldtrip-bounces at science.ru.nl] på vegne af Laxmi Shaw [laxmi.shaw22 at gmail.com] Sendt: 10. februar 2016 18:00 Til: fieldtrip at science.ru.nl Emne: [FieldTrip] related to topoplot Hello Fieldtrip users, I am new to this tool.I want to use topoplot to plot any parametric quantification of EEG study.Can anybody help me in this regards Regards -- Laxmi Shaw Research Scholar(PhD) IIT Kharagpur West Bengal Ph no-08388837821 -------------- next part -------------- An HTML attachment was scrubbed... URL: From robert.reinhart at vanderbilt.edu Thu Feb 11 17:54:45 2016 From: robert.reinhart at vanderbilt.edu (Rob Reinhart) Date: Thu, 11 Feb 2016 10:54:45 -0600 Subject: [FieldTrip] source analysis question In-Reply-To: References: Message-ID: That's clear now. Thank you so much! Rob On Thursday, February 11, 2016, Tzvetan Popov wrote: > > Hi Rob, > your observation is correct. In the particular method applied, i.e. > spatial filtering, one considers always one node at the time. On the basis > of the data covariance and the lead field the goal is to compute a set of > weights that essentially allow for reconstructing the time course of > activity at a given location independent from all others. The entire > discretized brain volume is “scanned” eventually resulting in distributed > source map. The observation you made becomes relevant when you estimate the > activity at all locations at once, e.g. minimum-norm distributed source > modeling. > > best > tzvetan > > Dear FieldTrip Forum, > > I have a naive question. When carrying out this source analysis ( > http://www.fieldtriptoolbox.org/tutorial/networkanalysis), I believe > there are data from ~275 sensors translated to data occupying ~372 nodes > (or voxels) in source space. If this is true (i.e., larger number of source > points derived from smaller number of sensors), does this create a margin > of error in the source data? And if so, is this error quantifiable? > > Any advice on understanding this would be greatly appreciated. > > Thank you so much, > > Rob Reinhart > _______________________________________________ > 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 wbatschi1976 at gmail.com Fri Feb 12 01:30:39 2016 From: wbatschi1976 at gmail.com (Werner Batschi) Date: Fri, 12 Feb 2016 00:30:39 +0000 Subject: [FieldTrip] Bipolar EMG Message-ID: Dear all, I'm starting right now with EEG analyses using fieldtrip and I have a question which I have not been able to figure out in the list or in the examples so far. In case of recording a bipolar EMG with the BrainAmp System we use, I get a pair of electrodes to work with. Suppose I want to preprocess this data for doing e.g. coherence analyses later, how do you manage both channels? It's not so much a technical question of rectifying and/or filtering that bothers me but rather the question if you would "rereference" or put the EMG channels into relation or something else. Or am I missing something obvious here Thank you, Werner -------------- next part -------------- An HTML attachment was scrubbed... URL: From lev.tankelevitch at some.ox.ac.uk Fri Feb 12 11:18:28 2016 From: lev.tankelevitch at some.ox.ac.uk (Lev Tankelevitch) Date: Fri, 12 Feb 2016 10:18:28 +0000 Subject: [FieldTrip] Neuromag306 planar neighbourhood structure Message-ID: Hi all, I'd like to use ft_channelrepair to interpolate some bad gradiometers in my data that Maxfilter has not fixed very well. However, the neuromag306planar_neighb.mat structure includes both latitude and longitude grads as neighbours for each grad, whereas I'd like to use only e.g., latitude grads for interpolation of other latitude grads, and not mix them together. I wanted to create separate neighbor structures for each grad type, but Elekta has (for whatever reason!) inconsistently named each grad type with a 2 or 3 (e.g., a grad ending in 2 can be either latitude or longitude depending on its location), so there's no easy way to discriminate them. I was wondering whether anyone has already created these separate grad neighbour structures so I don't have to manually check each channel to see which grad is latitude and longitude? Or is there a list of which grads are which? Also, are there any reasons why I shouldn't be doing this kind of interpolation on the grads at all? Thanks for your help, Lev -------------- next part -------------- An HTML attachment was scrubbed... URL: From jorn at artinis.com Fri Feb 12 16:36:00 2016 From: jorn at artinis.com (=?iso-8859-1?Q?J=F6rn_M._Horschig?=) Date: Fri, 12 Feb 2016 16:36:00 +0100 Subject: [FieldTrip] Job opening: Application Specialist (NIRS) Message-ID: <005701d165ab$15c6fb30$4154f190$@artinis.com> Dear all, (please excuse the marginally relevant message) We are looking for an application specialist with strong knowledge in biomedical engineering. We at Artinis are mainly creating NIRS devices, but moving more and more towards multimodal imaging applications (i.e. NIRS/EEG, NIRS/tDCS, NIRS/TMS, etc). The job as an application specialist would mainly involve international customer contact and support with setting up NIRS equipment and recording and analyzing NIRS data, a strong involvement in product development according to the customer needs and market prospects, and project work in collaboration with other R&D companies and academic institutes. For more information, please check out our webpage www.artinis.com and the attached pdf for a more complete job description. With best regards, Jörn -- Jörn M. Horschig, PhD Software Engineer A Einsteinweg 17 6662PW Elst The Netherlands T +31 481 350 980 F +31 84 210 5702 I www.artinis.com The information in this e-mail is confidential and intended solely for the person to whom it is addressed. If this message is not addressed to you, please be aware that you have no authorization to read this e-mail, to copy it, to furnish it to any person other than the addressee, or to use or misuse its content in any way whatsoever. Should you have received this e-mail by mistake, please bring this to the attention of the sender, after which you are kindly requested to destroy the original message. -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image001.png Type: image/png Size: 9919 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: 160107 Advertentie - Application Specialist.pdf Type: application/pdf Size: 39205 bytes Desc: not available URL: From murphyk5 at aston.ac.uk Fri Feb 12 20:51:50 2016 From: murphyk5 at aston.ac.uk (Murphy, Kelly (Research Student)) Date: Fri, 12 Feb 2016 19:51:50 +0000 Subject: [FieldTrip] Custom timing files Message-ID: Hello Fieldtrippers I am trying to epoch my Neuromag MEG using timestamps with ft_definetrial. For all my trials I have a 600x2 matrix ('trl') containing start and stop times (each epoch = 1000ms); and a corresponding <600x5 char> array with condition labels ('labels'). I can combine 'labels' and 'trl' into a structure but I am confused as to what functions to proceed with in order to segment my data. Any help would be greatly appreciated (I hope this problem is relatively simple) Many thanks Kelly PhD Student Cognitive & Affective Neurosciences RG Aston Brain Centre Aston University Birmingham United Kingdom B4 7ET Office no: ++44 1212044250 -------------- next part -------------- An HTML attachment was scrubbed... URL: From K.Muller at psych.ru.nl Sat Feb 13 12:39:27 2016 From: K.Muller at psych.ru.nl (=?iso-8859-1?B?TfxsbGVyLCBLLiAoS2F0amEp?=) Date: Sat, 13 Feb 2016 11:39:27 +0000 Subject: [FieldTrip] ft_sourceplot ortho missing projections Message-ID: <5CF3C648-8BC4-4D99-9743-819343D8804C@psych.ru.nl> Hi, I am plotting statistical data on the orthogonal slices using ft_sourceplot(). In all plots, at least one view (usual axial), sometimes all views are missing: [cid:21371F16-8202-4E39-9726-C8B758D0DBB3] Sometimes one of them appears when I am manually changing the cursor position, but I never get all to work by this. The script I am using had been working flawlessly at the end of last year. I am not sure after which nightly build the problems started to occur. The difference I can see is that the default colormap has been replaced with the better parula now, and according to github there has been some other work on ft_sourceplot(). Best regards, Katja -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: layer6_time_300ms.png Type: image/png Size: 51610 bytes Desc: layer6_time_300ms.png URL: From santagravity at gmail.com Mon Feb 15 03:57:51 2016 From: santagravity at gmail.com (Sanghyun Lim) Date: Mon, 15 Feb 2016 11:57:51 +0900 Subject: [FieldTrip] about leadfield correction following ICA component rejection Message-ID: Dear fieldtripers, I recently read a hipp's 2015 paper which asserts that do not modify leadfields after ICA artifact rejection since it could decrease the estimated source SNR. http://journals.plos.org/plosone/article?id=10.1371/journal.pone.0121048 But by seeing ft_rejectcomponent, fieldtrip recommends modifying leadfields after ICA. Is there a specific reason to do this? thanks in advance Sanghyun. ᐧ -------------- next part -------------- An HTML attachment was scrubbed... URL: From ronny.ibrahim at mq.edu.au Mon Feb 15 07:58:09 2016 From: ronny.ibrahim at mq.edu.au (Ronny Ibrahim) Date: Mon, 15 Feb 2016 06:58:09 +0000 Subject: [FieldTrip] Help on ft_statfun_correlationT Message-ID: Dear Fellow fieldtrip users, I hope that you don't mind me emailing you directly enquiring about the procedures of using ft_statfun_correlationT. I have been reading the fieldtrip forum but seems to still don't quite understand fully on how to get the function to run properly. I currently have power spectrum values (2047 frequency points) from 15 electrode channels (which will give a powspctrm size of 15x2047) and I would like to see whether any of the frequency bands (alpha, delta, beta, gamma values) do correlate to behavioral measures such as distress, etc. As it had suggested in the forum http://mailman.science.ru.nl/pipermail/fieldtrip/2015-February/008950.html I should create a dummy variable with equal size to powspctrm and fill them with my behavioural value (eg 'distress' lets call it D which is essentially D*ones(15,2047)). I have created a design matrix as follow : cfg.design = [1*ones(1,36) 2*ones(1,36); 1:36 1:36]; as I have 36 replications Here is the script that I have put together. %% Conditions %C1 - actual powerspectrum values of 15 electrodes %C2 - distress values C_1 = {TIN1{2} TIN1{4} TIN1{5} TIN1{6} TIN1{7} TIN1{8} TIN1{9} TIN1{10} TIN1{11} TIN2{2} TIN2{4} TIN2{5} TIN2{6} TIN2{7} TIN2{8} TIN2{9} TIN2{10} TIN2{11} TIN3{2} TIN3{4} TIN3{5} TIN3{6} TIN3{7} TIN3{8} TIN3{9} TIN3{10} TIN3{11} TIN4{2} TIN4{4} TIN4{5} TIN4{6} TIN4{7} TIN4{8} TIN4{9} TIN4{10} TIN4{11}}; C_2 = {TFI1{1} TFI1{2} TFI1{3} TFI1{4} TFI1{5} TFI1{6} TFI1{7} TFI1{8} TFI1{9} TFI2{1} TFI2{2} TFI2{3} TFI2{4} TFI2{5} TFI2{6} TFI2{7} TFI2{8} TFI2{9} TFI3{1} TFI3{2} TFI1{3} TFI3{4} TFI3{5} TFI3{6} TFI3{7} TFI3{8} TFI3{9} TFI4{1} TFI4{2} TFI4{3} TFI4{4} TFI4{5} TFI4{6} TFI4{7} TFI4{8} TFI4{9}}; cfg = []; cfg.layout = 'MEG.lay'; lay = ft_prepare_layout(cfg); %% Performing cluster statistics cfg = []; cfg.frequency = [8 12]; cfg.channel = 'all'; cfg.avgovertime = 'no'; cfg.avgoverfreq = 'yes'; cfg.avgoverchan = 'no'; cfg.statistic = 'ft_statfun_correlationT'; cfg.numrandomization = 1000; cfg.correctm = 'cluster'; cfg.method = 'montecarlo'; cfg.clusteralpha = 0.05; cfg.clusterstatistic = 'maxsum'; cfg.minnbchan = 1; cfg.tail = 0; cfg.clustertail = 0; cfg.alpha = 0.05; cfg_neighb.layout = lay; cfg_neighb.method = 'triangulation'; cfg.neighbours = ft_prepare_neighbours(cfg_neighb); cfg.uvar = 1; cfg.ivar = 1; cfg.computecritval = 'yes'; cfg.design = [1*ones(1,36) 2*ones(1,36); 1:36 1:36]; stat = ft_freqstatistics(cfg, C_1{:}, C_2{:}); %% Plotting significant clusters cfg = []; cfg.alpha = 0.05; cfg.parameter = 'stat'; cfg.layout =lay; ft_clusterplot(cfg, stat); I would like to thank you guys for your kind help and assistance. Kind Regards, Ronny -------------- next part -------------- An HTML attachment was scrubbed... URL: From anne.urai at gmail.com Mon Feb 15 13:21:54 2016 From: anne.urai at gmail.com (Anne Urai) Date: Mon, 15 Feb 2016 13:21:54 +0100 Subject: [FieldTrip] Custom timing files In-Reply-To: References: Message-ID: Dear Kelly, it sounds like you want to write your own custom trialfun based on the triggers in your data. See here for a tutorial on how to get started with this: http://www.fieldtriptoolbox.org/example/making_your_own_trialfun_for_conditional_trial_definition 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: Murphy, Kelly (Research Student) Reply: FieldTrip discussion list Date: 12 February 2016 at 20:51:50 To: fieldtrip at science.ru.nl Subject:  [FieldTrip] Custom timing files Hello Fieldtrippers   I am trying to epoch my Neuromag MEG using timestamps with ft_definetrial.    For all my trials I have a 600x2 matrix (‘trl’) containing start and stop times (each epoch = 1000ms); and a corresponding <600x5 char> array with condition labels (‘labels’).  I can combine ‘labels’ and ‘trl’ into a structure but I am confused as to what functions to proceed with in order to segment my data.   Any help would be greatly appreciated (I hope this problem is relatively simple)   Many thanks   Kelly   PhD Student Cognitive & Affective Neurosciences RG Aston Brain Centre Aston University Birmingham United Kingdom B4 7ET Office no: ++44 1212044250   _______________________________________________ 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 helen.wieffering at gmail.com Mon Feb 15 16:00:53 2016 From: helen.wieffering at gmail.com (Helen Wieffering) Date: Mon, 15 Feb 2016 10:00:53 -0500 Subject: [FieldTrip] Connectivity Statistics Message-ID: Hello, Does anyone know of built-in FieldTrip functions for computing statistics or grand averages of connectivity data? I have been searching around and am aware of ft_freqstatistics and ft_freqgrandaverage, but these do not seem to work with granger spectrum data. If anyone has experience with this, I'd love to hear! Thanks, Helen Wieffering Erika Nyhus, P.h.D. Bowdoin College Dept of Neuroscience -------------- next part -------------- An HTML attachment was scrubbed... URL: From a.stolk8 at gmail.com Mon Feb 15 19:57:51 2016 From: a.stolk8 at gmail.com (Arjen Stolk) Date: Mon, 15 Feb 2016 10:57:51 -0800 Subject: [FieldTrip] Help on ft_statfun_correlationT In-Reply-To: <6c160f0705b6476e899163b731441451@EXPRD02.hosting.ru.nl> References: <6c160f0705b6476e899163b731441451@EXPRD02.hosting.ru.nl> Message-ID: Hi Ronny, Can you check whether this page answers your question? It provides a theoretical background, and a couple of examples: http://www.fieldtriptoolbox.org/faq/how_can_i_test_for_correlations_between_neuronal_data_and_quantitative_stimulus_and_behavioural_variables Best, Arjen 2016-02-14 22:58 GMT-08:00 Ronny Ibrahim : > Dear Fellow fieldtrip users, > I hope that you don't mind me emailing you directly enquiring about the > procedures of using ft_statfun_correlationT. I have been reading the > fieldtrip forum but seems to still don't quite understand fully on how to > get the function to run properly. I currently have power spectrum values > (2047 frequency points) from 15 electrode channels (which will give a > powspctrm size of 15x2047) and I would like to see whether any of the > frequency bands (alpha, delta, beta, gamma values) do correlate to > behavioral measures such as distress, etc. As it had suggested in the forum > http://mailman.science.ru.nl/pipermail/fieldtrip/2015-February/008950.html > I should create a dummy variable with equal size to powspctrm and fill > them with my behavioural value (eg 'distress' lets call it D which is > essentially D*ones(15,2047)). > I have created a design matrix as follow : > cfg.design = [1*ones(1,36) 2*ones(1,36); 1:36 1:36]; > > as I have 36 replications > > Here is the script that I have put together. > %% Conditions > %C1 - actual powerspectrum values of 15 electrodes > %C2 - distress values > C_1 = {TIN1{2} TIN1{4} TIN1{5} TIN1{6} TIN1{7} TIN1{8} TIN1{9} TIN1{10} > TIN1{11} TIN2{2} TIN2{4} TIN2{5} TIN2{6} TIN2{7} TIN2{8} TIN2{9} TIN2{10} > TIN2{11} TIN3{2} TIN3{4} TIN3{5} TIN3{6} TIN3{7} TIN3{8} TIN3{9} TIN3{10} > TIN3{11} TIN4{2} TIN4{4} TIN4{5} TIN4{6} TIN4{7} TIN4{8} TIN4{9} TIN4{10} > TIN4{11}}; > C_2 = {TFI1{1} TFI1{2} TFI1{3} TFI1{4} TFI1{5} TFI1{6} TFI1{7} TFI1{8} > TFI1{9} TFI2{1} TFI2{2} TFI2{3} TFI2{4} TFI2{5} TFI2{6} TFI2{7} TFI2{8} > TFI2{9} TFI3{1} TFI3{2} TFI1{3} TFI3{4} TFI3{5} TFI3{6} TFI3{7} TFI3{8} > TFI3{9} TFI4{1} TFI4{2} TFI4{3} TFI4{4} TFI4{5} TFI4{6} TFI4{7} TFI4{8} > TFI4{9}}; > > cfg = []; > cfg.layout = 'MEG.lay'; > lay = ft_prepare_layout(cfg); > > > %% Performing cluster statistics > cfg = []; > cfg.frequency = [8 12]; > cfg.channel = 'all'; > cfg.avgovertime = 'no'; > cfg.avgoverfreq = 'yes'; > cfg.avgoverchan = 'no'; > cfg.statistic = 'ft_statfun_correlationT'; > cfg.numrandomization = 1000; > cfg.correctm = 'cluster'; > cfg.method = 'montecarlo'; > cfg.clusteralpha = 0.05; > cfg.clusterstatistic = 'maxsum'; > cfg.minnbchan = 1; > cfg.tail = 0; > cfg.clustertail = 0; > cfg.alpha = 0.05; > cfg_neighb.layout = lay; > cfg_neighb.method = 'triangulation'; > cfg.neighbours = ft_prepare_neighbours(cfg_neighb); > cfg.uvar = 1; > cfg.ivar = 1; > cfg.computecritval = 'yes'; > cfg.design = [1*ones(1,36) 2*ones(1,36); 1:36 1:36]; > stat = ft_freqstatistics(cfg, C_1{:}, C_2{:}); > %% Plotting significant clusters > cfg = []; > cfg.alpha = 0.05; > cfg.parameter = 'stat'; > cfg.layout =lay; > ft_clusterplot(cfg, stat); > I would like to thank you guys for your kind help and assistance. > > Kind Regards, > > Ronny > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From b.staresina at bham.ac.uk Mon Feb 15 20:31:38 2016 From: b.staresina at bham.ac.uk (Bernhard Staresina) Date: Mon, 15 Feb 2016 19:31:38 +0000 Subject: [FieldTrip] [PostDoc position] Episodic Memory during Offline Periods Message-ID: <6B490D5D5F5F714C88D0C2CE8ED886B6F7EB0DD6@EX13.adf.bham.ac.uk> Applications are invited for a 3-year full-time post-doctoral position investigating memory-related brain processes during post-learning sleep. The project will use EEG, fMRI and transcranial electrical stimulation (tES) together with state-of-the-art multivariate analysis methods to capture and experimentally manipulate consolidation mechanisms in the sleeping human brain. The successful candidate will work in the Episodic Memory Laboratory at the University of Birmingham (UK) and will be supervised by Dr Bernhard Staresina. We work in close collaboration with a vibrant memory research community (http://www.memorybham.com/) and have access to multimodal neuroimaging facilities including 7T MRI, MEG, TMS and intracranial EEG. Applicants must have a PhD in a relevant area (e.g., Psychology, Neuroscience, Computer Science), have demonstrable expertise in sleep research, EEG, fMRI and/or tES and have advanced programming and analysis skills (using MATLAB or equivalent). Publications in peer-reviewed journals and conference presentations at international meetings are required. A background in memory research is highly desirable. The proposed start date is September 2016. If you are interested and wish to find out more, please contact Dr Bernhard Staresina (b.staresina at bham.ac.uk) with your CV and a brief statement of interest. _/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/ Bernhard Staresina, PhD Sir Henry Dale Fellow School of Psychology University of Birmingham www.memorybham.com/bernhard-staresina -------------- next part -------------- An HTML attachment was scrubbed... URL: From seymourr at aston.ac.uk Tue Feb 16 13:51:43 2016 From: seymourr at aston.ac.uk (Seymour, Robert (Research Student)) Date: Tue, 16 Feb 2016 12:51:43 +0000 Subject: [FieldTrip] Eletkta Neuromag data in Fieldtrip Message-ID: Dear all, I am working with Elekta Neuromag data and want to load the raw .fif file into Fieldtrip; i.e. having not undergone Maxfilter cleaning. I have turned off Internal Active Sheilding (IAS) during recording. Loading in motion-corrected data is fine and produces reasonable results. However using the same code with un-Maxfiltered data produces some very strange plots - please see some pictures I have uploaded online.. http://imgur.com/a/b0Mrl . It is not an issue with the data themselves because it looks sensible in Graph (the Elekta data visualisation program). My preprocessing code can be loaded here: http://notepad.cc/peebluki61 . If anyone has any idea what is going on I would be very grateful! Many thanks, Robert Seymour (PhD student, Aston Brain Centre) -------------- next part -------------- An HTML attachment was scrubbed... URL: From gianpaolo.demarchi at unitn.it Tue Feb 16 16:18:04 2016 From: gianpaolo.demarchi at unitn.it (Gianpaolo Demarchi) Date: Tue, 16 Feb 2016 16:18:04 +0100 Subject: [FieldTrip] Eletkta Neuromag data in Fieldtrip In-Reply-To: References: Message-ID: <250797E7-A844-4A39-9919-14FC4FBC4D81@unitn.it> Hi, just a couple of comments, since nobody chimes in :-) > Il giorno 16 feb 2016, alle ore 13:51, Seymour, Robert (Research Student) ha scritto: > > Dear all, > > I am working with Elekta Neuromag data and want to load the raw .fif file into Fieldtrip; i.e. having not undergone Maxfilter cleaning. I have turned off Internal Active Sheilding (IAS) during recording. > > Loading in motion-corrected data is fine and produces reasonable results. However using the same code with un-Maxfiltered data produces some very strange plots - please see some pictures I have uploaded online.. http://imgur.com/a/b0Mrl . It is not an issue with the data themselves because it looks sensible in Graph (the Elekta data visualisation program). They look reasonable ... what you see is the effect of the (bp?) filter on your data and the x seconds rectangular window that you’re using for watching at them. The first pic should be grads, and the second mags, if I’m not mistaken, and in the second one you can clearly see 50 Hz mains noise (you’ve 50Hz over there, isn’t :-) ?!) If you just want to take a look at the data and scroll trough the time, don’t apply “hardcoded” filters with ft_preprocessing, but fully exploit the power of ft_databrowser, and change filters on the fly there with the button on the right, using a cfg.preproc.xxx syntax. For a quick look at e.g. magnetometers, you can use: cfg = []; cfg.dataset= rawfile; %in your case cfg.layout = 'neuromag306mag.lay'; cfg.channel = 'MEGMAG'; ft_databrowser(cfg) check the help of ft_databrowser to see which option does what, but in this case the important part is cfg.dataset, that ft_databrowser uses to read directly the file from the disk. The additional stuff is for topoplotting on right click, e.g. to identify eye blinks … The code above is not applying any filtering, so expect some mess, but then from the data browser click on the grey button on the right and try e.g.: cfg.preproc.lpfilter = 'yes' ; % you don't want to see 50 Hz now cfg.preproc.lpfreq = 45 ; cfg.preproc.hpfilter = 'yes' ; cfg.preproc.hpfreq = 1 ; % try out different value, to suit your needs then change a bit the values and see how this looks like. Then you can chop the data in epochs as you did (btw, there is no need of both cfg.headerfile and cfg.datafile, the latter should suffice), but then again don’t apply any “hardcoded” filter values at this stage, if the idea is still to take a general look at the data. You can filter in plotting later … or just put the hardcoded filter values in your final (data in -> Nature paper out) script. Hope this helps … Best, G. > > My preprocessing code can be loaded here: http://notepad.cc/peebluki61 . If anyone has any idea what is going on I would be very grateful! > > Many thanks, > > Robert Seymour (PhD student, Aston Brain Centre) > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip Dr. Gianpaolo Demarchi FB Psychologie - Universität Salzburg Hellbrunnerstr, 34 5020 Salzburg (A) Tel: +43 (0) 662 / 8044 - 5135 gianpaolo.demarchi at sbg.ac.at -------------- next part -------------- An HTML attachment was scrubbed... URL: From iris.steinmann at med.uni-goettingen.de Tue Feb 16 18:07:49 2016 From: iris.steinmann at med.uni-goettingen.de (Steinmann, Iris) Date: Tue, 16 Feb 2016 17:07:49 +0000 Subject: [FieldTrip] Align electrods to headmodel with method 'interactiv' Message-ID: Hi FieldTripper, I want to do source reconstruction with my EEG data and try to align my electrodes to the headmodel (calculated with my own MR data) (following this description: http://www.fieldtriptoolbox.org/example/align_eeg_electrode_positions_to_bem_headmodel) I run the ft_electroderealign function with the following options: cfg = []; cfg.method = 'interactive'; cfg.elec = elec; cfg.headshape = vol.bnd(1); elec_new = ft_electroderealign(cfg); But all I get is a figure showing a coordinate system with my electrodepositions. The scull saved in vol.bnd(1) is not plotted. (I attached a jpg of the figure). The MATLAB panel asked me: "Do you want to change the anatomical labels for the axes [Y, n]? " If I say 'no', I get the following error: Undefined function or variable 'template'. Error in ft_electroderealign (line 244) for j=1:length(template) I tried the ft_electroderealign function with the cfg.method = 'fiducials', but ended up with the same figure and the same question in the MATLAB panel. Would be great if someone could help me to figure out what's going wrong here and how I can align my electrodes to the headmodel. Thanks! -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: coordinateSystemElectrodePositions.jpg Type: image/jpeg Size: 22433 bytes Desc: coordinateSystemElectrodePositions.jpg URL: From joseluisblues at gmail.com Tue Feb 16 18:43:01 2016 From: joseluisblues at gmail.com (Jose) Date: Tue, 16 Feb 2016 18:43:01 +0100 Subject: [FieldTrip] CTF data, marker and class files Message-ID: dear list, I'm trying to analyse CTF MEG data, but I'm running into problems when getting my triggers. ft_read_event recognize well the triggers in my MarkerFile.mrk, but for some reason do not look at the ClassFile.cls file, so I'm missing the BAD triggers in my events, Someone has run on the same problem?, thanks Jose -------------- next part -------------- An HTML attachment was scrubbed... URL: From seymourr at aston.ac.uk Tue Feb 16 19:04:40 2016 From: seymourr at aston.ac.uk (Seymour, Robert (Research Student)) Date: Tue, 16 Feb 2016 18:04:40 +0000 Subject: [FieldTrip] Eletkta Neuromag data in Fieldtrip Message-ID: Thanks for the detailed reply - yes it looks like it has something to do with powerline noise, but I'm still getting weird plots (and TF plots) even if I low-pass filter at 40Hz.. Trying out Fieldtrip's DFT filter doesn't seem to work either. It's also strange that motion correction seems to sort out the data .. mmm :/ Robert -------------- next part -------------- An HTML attachment was scrubbed... URL: From niels.haumann at dac.au.dk Tue Feb 16 22:47:33 2016 From: niels.haumann at dac.au.dk (Niels Trusbak Haumann) Date: Tue, 16 Feb 2016 21:47:33 +0000 Subject: [FieldTrip] Eletkta Neuromag data in Fieldtrip In-Reply-To: <250797E7-A844-4A39-9919-14FC4FBC4D81@unitn.it> References: , <250797E7-A844-4A39-9919-14FC4FBC4D81@unitn.it> Message-ID: <9DC7C16686EE6344B54A9D39046541939977DE9F@SRVUNIMBX05.uni.au.dk> Hi Robert. If you have applied motion-correction, which are derived from HPI signals, there should also be HPI signals recorded in the raw data. These signals would be seen if MaxFilter was not applied. It might be such signals from the HPI coils, which are usually emitted as high frequency sinus waves - in the standard setting at 290–330 Hz. It's possible to remove these signals with MaxFilter without doing further processing. Have you tried this? I think the MaxFilter command line option is -nosss. Best Niels Center for Music In the Brain Dept. of Clinical Medicine Aarhus University Hospital Denmark ________________________________ Fra: fieldtrip-bounces at science.ru.nl [fieldtrip-bounces at science.ru.nl] på vegne af Gianpaolo Demarchi [gianpaolo.demarchi at unitn.it] Sendt: 16. februar 2016 16:18 Til: FieldTrip discussion list Emne: Re: [FieldTrip] Eletkta Neuromag data in Fieldtrip Hi, just a couple of comments, since nobody chimes in :-) Il giorno 16 feb 2016, alle ore 13:51, Seymour, Robert (Research Student) > ha scritto: Dear all, I am working with Elekta Neuromag data and want to load the raw .fif file into Fieldtrip; i.e. having not undergone Maxfilter cleaning. I have turned off Internal Active Sheilding (IAS) during recording. Loading in motion-corrected data is fine and produces reasonable results. However using the same code with un-Maxfiltered data produces some very strange plots - please see some pictures I have uploaded online.. http://imgur.com/a/b0Mrl . It is not an issue with the data themselves because it looks sensible in Graph (the Elekta data visualisation program). They look reasonable ... what you see is the effect of the (bp?) filter on your data and the x seconds rectangular window that you’re using for watching at them. The first pic should be grads, and the second mags, if I’m not mistaken, and in the second one you can clearly see 50 Hz mains noise (you’ve 50Hz over there, isn’t :-) ?!) If you just want to take a look at the data and scroll trough the time, don’t apply “hardcoded” filters with ft_preprocessing, but fully exploit the power of ft_databrowser, and change filters on the fly there with the button on the right, using a cfg.preproc.xxx syntax. For a quick look at e.g. magnetometers, you can use: cfg = []; cfg.dataset= rawfile; %in your case cfg.layout = 'neuromag306mag.lay'; cfg.channel = 'MEGMAG'; ft_databrowser(cfg) check the help of ft_databrowser to see which option does what, but in this case the important part is cfg.dataset, that ft_databrowser uses to read directly the file from the disk. The additional stuff is for topoplotting on right click, e.g. to identify eye blinks … The code above is not applying any filtering, so expect some mess, but then from the data browser click on the grey button on the right and try e.g.: cfg.preproc.lpfilter = 'yes' ; % you don't want to see 50 Hz now cfg.preproc.lpfreq = 45 ; cfg.preproc.hpfilter = 'yes' ; cfg.preproc.hpfreq = 1 ; % try out different value, to suit your needs then change a bit the values and see how this looks like. Then you can chop the data in epochs as you did (btw, there is no need of both cfg.headerfile and cfg.datafile, the latter should suffice), but then again don’t apply any “hardcoded” filter values at this stage, if the idea is still to take a general look at the data. You can filter in plotting later … or just put the hardcoded filter values in your final (data in -> Nature paper out) script. Hope this helps … Best, G. My preprocessing code can be loaded here: http://notepad.cc/peebluki61 . If anyone has any idea what is going on I would be very grateful! Many thanks, Robert Seymour (PhD student, Aston Brain Centre) _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip Dr. Gianpaolo Demarchi FB Psychologie - Universität Salzburg Hellbrunnerstr, 34 5020 Salzburg (A) Tel: +43 (0) 662 / 8044 - 5135 gianpaolo.demarchi at sbg.ac.at -------------- next part -------------- An HTML attachment was scrubbed... URL: From jan.schoffelen at donders.ru.nl Wed Feb 17 09:02:31 2016 From: jan.schoffelen at donders.ru.nl (Schoffelen, J.M. (Jan Mathijs)) Date: Wed, 17 Feb 2016 08:02:31 +0000 Subject: [FieldTrip] about leadfield correction following ICA component rejection In-Reply-To: References: Message-ID: <0FD8BF96-8017-4732-A504-7BC56FDDEF9B@fcdonders.ru.nl> Hi Sanghyun, Although the ‘perceived SNR’ may change when applying the leadfield correction, it is simply biophyisically incorrect, if you DON’T do it. The reason is the following: If you remove a component from your channel data, what happens is that each of the resulting EEG/MEG channels reflect the potential difference/magnetic field strength as measured by a referenced electrode or a magnetic field pickup coil at a specific location in space, minus a weighted combination of potential differences/magnetic field strengths measured at all other locations (where the weighting is given by the spatial topography of the component). In other words, you apply an intricate re-referencing scheme/create a complicated synthetic gradiometer sensor. When building your forward model (a.k.a. leadfield), the purpose is to build an accurate model of the spatial distribution of potential differences/magnetic field strengths given what your channel leveld data represents. Since it now represents this re-rereferenced data/synthetic gradients, it needs to be accounted for in the model. Best, Jan-Mathijs On Feb 15, 2016, at 3:57 AM, Sanghyun Lim > wrote: Dear fieldtripers, I recently read a hipp's 2015 paper which asserts that do not modify leadfields after ICA artifact rejection since it could decrease the estimated source SNR. http://journals.plos.org/plosone/article?id=10.1371/journal.pone.0121048 But by seeing ft_rejectcomponent, fieldtrip recommends modifying leadfields after ICA. Is there a specific reason to do this? thanks in advance Sanghyun. [https://mailfoogae.appspot.com/t?sender=ac2FudGFncmF2aXR5QGdtYWlsLmNvbQ%3D%3D&type=zerocontent&guid=8d602c05-59e3-43c4-876d-df591e738182]ᐧ _______________________________________________ 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 gianpaolo.demarchi at unitn.it Wed Feb 17 10:02:36 2016 From: gianpaolo.demarchi at unitn.it (Gianpaolo Demarchi) Date: Wed, 17 Feb 2016 10:02:36 +0100 Subject: [FieldTrip] Eletkta Neuromag data in Fieldtrip In-Reply-To: <9DC7C16686EE6344B54A9D39046541939977DE9F@SRVUNIMBX05.uni.au.dk> References: <250797E7-A844-4A39-9919-14FC4FBC4D81@unitn.it> <9DC7C16686EE6344B54A9D39046541939977DE9F@SRVUNIMBX05.uni.au.dk> Message-ID: <999CA7C6-881E-40FA-9997-D7C82C108247@unitn.it> Dear Robert, > Thanks for the detailed reply – yes it looks like it has something to do with powerline noise, but I’m still getting weird plots (and TF plots) even if I low-pass filter at 40Hz.. It depends on what you define as weird. As Niels correctly pointed out, if you don’t filter at all, and you use the HPI, you’ll see a mess @around 300 Hz, plus the mains frequencies and harmonics, plus whatever happened during your experiment (e.g. a car passing by, elevators, etc). Though, if you lp filter at 40 Hz you still should get rid of both HPI(1) and x*50 Hz noise, so I expect that your source of “weirdness” is not there … One thing that comes to my mind is that you mentioned that you usually use IAS, which I imagine in turns means that the raw data per se are not too nice (therefore for need of IAS), but without further info/pics a "differential diagnosis” of the weirdness is hard, e.g. if you see big “strips” in TF plots at 50 Hz, wo filtering, baseline-ing and/or contrasting, I would just call this normal behavior …. > Trying out Fieldtrip’s DFT filter doesn’t seem to work either. Removing power line noise it’s not an easy task, but if you still see “weirdness” filtering @40Hz, then this is not your enemy: if it’s really “power noise like”, take a chunk of a 100ms, count the peaks, and if they are 5 (50Hz) then probably for some reason your filter didn’t do the job (cfg.xxx.lpxxx = ‘yes’ is needed to turn on the filter). If the peaks are less,/more then you have some other problems (although i cannot imagine anything that looks like power line, not at 50, 100, etc (2)) > > It’s also strange that motion correction seems to sort out the data .. mmm :/ This is right. If you use maxfilter -movecomp, you get the “SSS” cleaning “for free”, which usually takes care of many noise sources … I tried in the past also with the ‘-nosss’ switch, but still you get some “beatifying” of the data wrt to the “raw” raw, but maybe it’s just SSP projection, that you don’t get for free in fieldtrip … I didn’t investigate much further …. Try to dig deeper, and feel free to post pics/snip to the list … Best luck, G. (1) although sometimes I had some HPI coils “beatings” @7Hz in few frontal grads, still to understand fully why … (2) caveat: we see obviously big sinusoidal artifacts, at lower frequencies, when we do MEG+tACS, but since you don’t mention it I don’t expect this to be your case :-) Dr. Gianpaolo Demarchi FB Psychologie - Universität Salzburg Hellbrunnerstr, 34 5020 Salzburg (A) Tel: +43 (0) 662 / 8044 - 5135 gianpaolo.demarchi at sbg.ac.at > > Fra: fieldtrip-bounces at science.ru.nl [fieldtrip-bounces at science.ru.nl] på vegne af Gianpaolo Demarchi [gianpaolo.demarchi at unitn.it] > Sendt: 16. februar 2016 16:18 > Til: FieldTrip discussion list > Emne: Re: [FieldTrip] Eletkta Neuromag data in Fieldtrip > > Hi, > just a couple of comments, since nobody chimes in :-) > >> Il giorno 16 feb 2016, alle ore 13:51, Seymour, Robert (Research Student) > ha scritto: >> >> Dear all, >> >> I am working with Elekta Neuromag data and want to load the raw .fif file into Fieldtrip; i.e. having not undergone Maxfilter cleaning. I have turned off Internal Active Sheilding (IAS) during recording. >> >> Loading in motion-corrected data is fine and produces reasonable results. However using the same code with un-Maxfiltered data produces some very strange plots - please see some pictures I have uploaded online.. http://imgur.com/a/b0Mrl . It is not an issue with the data themselves because it looks sensible in Graph (the Elekta data visualisation program). > > They look reasonable ... what you see is the effect of the (bp?) filter on your data and the x seconds rectangular window that you’re using for watching at them. > The first pic should be grads, and the second mags, if I’m not mistaken, and in the second one you can clearly see 50 Hz mains noise (you’ve 50Hz over there, isn’t :-) ?!) > If you just want to take a look at the data and scroll trough the time, don’t apply “hardcoded” filters with ft_preprocessing, but fully exploit the power of ft_databrowser, and change filters on the fly there with the button on the right, using a cfg.preproc.xxx syntax. > > For a quick look at e.g. magnetometers, you can use: > > cfg = []; > cfg.dataset= rawfile; %in your case > cfg.layout = 'neuromag306mag.lay'; > cfg.channel = 'MEGMAG'; > ft_databrowser(cfg) > > check the help of ft_databrowser to see which option does what, but in this case the important part is cfg.dataset, that ft_databrowser uses to read directly the file from the disk. The additional stuff is for topoplotting on right click, e.g. to identify eye blinks … > The code above is not applying any filtering, so expect some mess, but then from the data browser click on the grey button on the right and try e.g.: > > cfg.preproc.lpfilter = 'yes' ; % you don't want to see 50 Hz now > cfg.preproc.lpfreq = 45 ; > cfg.preproc.hpfilter = 'yes' ; > cfg.preproc.hpfreq = 1 ; % try out different value, to suit your needs > > > then change a bit the values and see how this looks like. Then you can chop the data in epochs as you did (btw, there is no need of both cfg.headerfile and > cfg.datafile, the latter should suffice), but then again don’t apply any “hardcoded” filter values at this stage, if the idea is still to take a general look at the data. You can filter in plotting later … or just put the hardcoded filter values in your final (data in -> Nature paper out) script. > Hope this helps … > Best, > G. > > >> >> My preprocessing code can be loaded here: http://notepad.cc/peebluki61 . If anyone has any idea what is going on I would be very grateful! >> >> Many thanks, >> >> Robert Seymour (PhD student, Aston Brain Centre) >> >> _______________________________________________ >> fieldtrip mailing list >> fieldtrip at donders.ru.nl >> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > Dr. Gianpaolo Demarchi > FB Psychologie - Universität Salzburg > Hellbrunnerstr, 34 5020 Salzburg (A) > Tel: +43 (0) 662 / 8044 - 5135 > gianpaolo.demarchi at sbg.ac.at > > > _______________________________________________ > 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 deb.desideri at gmail.com Wed Feb 17 11:19:38 2016 From: deb.desideri at gmail.com (Debora Desideri) Date: Wed, 17 Feb 2016 11:19:38 +0100 Subject: [FieldTrip] Align electrods to headmodel with method 'interactiv' In-Reply-To: References: Message-ID: Dear Iris, you should press Y and specify the coordinate system following the questions that will appear on the command window (you will be asked to specify whether your coordinate sytsem is ras or lps and so on and where the origin of the coordinate system is located). afterwards, the GUI will display the electrodes and the head of the subject as well. You should then be able to align the electrode by simply applying translation/rotation or whatever you need make the electrode fit on the head surface. In case you want to use the methiod 'fiducials', you should have recorded together with the elctrode positions some anatomical landmarks that you can easily find in the MRI of the subject. If you did not record such landmarks during the acquisition of the electrode positions, than I guess your only option is to use the method 'interactive' Hope this helps! Best, Debora On Tue, Feb 16, 2016 at 6:07 PM, Steinmann, Iris < iris.steinmann at med.uni-goettingen.de> wrote: > Hi FieldTripper, > > > > I want to do source reconstruction with my EEG data and try to align my > electrodes to the headmodel (calculated with my own MR data) > > (following this description: > http://www.fieldtriptoolbox.org/example/align_eeg_electrode_positions_to_bem_headmodel) > > > > > I run the ft_electroderealign function with the following options: > > > > cfg = []; > > cfg.method = 'interactive'; > > cfg.elec = elec; > > cfg.headshape = vol.bnd(1); > > elec_new = ft_electroderealign(cfg); > > > > But all I get is a figure showing a coordinate system with my > electrodepositions. The scull saved in vol.bnd(1) is not plotted. > > (I attached a jpg of the figure). > > The MATLAB panel asked me: "Do you want to change the anatomical labels > for the axes [Y, n]? " > > If I say 'no', I get the following error: > > > > Undefined function or variable 'template'. > > Error in ft_electroderealign (line 244) > > for j=1:length(template) > > > > I tried the ft_electroderealign function with the cfg.method = > 'fiducials', but ended up with the same figure and the same question in > > the MATLAB panel. > > > > Would be great if someone could help me to figure out what's going wrong > here and how I can align my electrodes to the headmodel. > > > > Thanks! > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > -- Debora Desideri, PhD Student BNP Lab - Neurology Department University Hospital Tübingen Eberhard Karls University Tübingen Hoppe-Seyler Str. 3 D-72076 Tübingen Tel: +49 7071/29 80478 -------------- next part -------------- An HTML attachment was scrubbed... URL: From stephen.politzer-ahles at ling-phil.ox.ac.uk Wed Feb 17 12:09:55 2016 From: stephen.politzer-ahles at ling-phil.ox.ac.uk (Stephen Politzer-Ahles) Date: Wed, 17 Feb 2016 11:09:55 +0000 Subject: [FieldTrip] CTF data, marker and class files Message-ID: Hello Jose, Does it work differently if you use ft_definetrial and ft_preprocessing? ft_read_event is a low-level function, it should be possible to read your data without using it, and just using ft_definetrial plus ft_preprocessing. I don't remember off the top of my head whether ft_definetrial was able to find the BAD events in the classfile. If you don't find a better way to deal with this issue, another way around would be to just read all your events with ft_definetrial, and write some MATLAB code to read the classfile directly, identify the indices of the bad trials, and remove those rows from the trial definition (or remove them at some later time, e.g., to keep them in the trial definition so they do get read, but then not include those trials in your timelockanalysis later on). best, Steve --- Stephen Politzer-Ahles University of Oxford Language and Brain Lab Faculty of Linguistics, Phonetics & Philology http://users.ox.ac.uk/~cpgl0080/ > > Message: 4 > Date: Tue, 16 Feb 2016 18:43:01 +0100 > From: Jose > To: fieldtrip at science.ru.nl > Subject: [FieldTrip] CTF data, marker and class files > Message-ID: > < > CAH3cVdA_VxHQDcXX3uxoqTFva+4UsMSWP+iccgZ4zZKH51PJ8A at mail.gmail.com> > Content-Type: text/plain; charset="utf-8" > > dear list, > > I'm trying to analyse CTF MEG data, but I'm running into problems when > getting my triggers. ft_read_event recognize well the triggers in my > MarkerFile.mrk, but for some reason do not look at the ClassFile.cls file, > so I'm missing the BAD triggers in my events, > > Someone has run on the same problem?, > > thanks > Jose > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From K.Muller at psych.ru.nl Wed Feb 17 12:18:49 2016 From: K.Muller at psych.ru.nl (=?utf-8?B?TcO8bGxlciwgSy4gKEthdGphKQ==?=) Date: Wed, 17 Feb 2016 11:18:49 +0000 Subject: [FieldTrip] ft_sourceplot ortho missing projections In-Reply-To: <5CF3C648-8BC4-4D99-9743-819343D8804C@psych.ru.nl> References: <5CF3C648-8BC4-4D99-9743-819343D8804C@psych.ru.nl> Message-ID: Hi, (I should have mentioned it) The link to the inline image attachment (example of the problem) is at the end of my e-mail below: > Name: layer6_time_300ms.png > Type: image/png > Size: 51610 bytes > Desc: layer6_time_300ms.png > http://mailman.science.ru.nl/pipermail/fieldtrip/attachments/20160213/3c89a132/attachment.png Best, Katja > Am 13.02.28 Heisei um 12:39 schrieb Müller, K. (Katja) : > > Hi, > > I am plotting statistical data on the orthogonal slices using ft_sourceplot(). In all plots, at least one view (usual axial), sometimes all views are missing: > > > > Sometimes one of them appears when I am manually changing the cursor position, but I never get all to work by this. > > The script I am using had been working flawlessly at the end of last year. I am not sure after which nightly build the problems started to occur. The difference I can see is that the default colormap has been replaced with the better parula now, and according to github there has been some other work on ft_sourceplot(). > > > Best regards, > Katja From antonietta.sorriso at uniparthenope.it Wed Feb 17 12:21:08 2016 From: antonietta.sorriso at uniparthenope.it (Antonietta Sorriso) Date: Wed, 17 Feb 2016 12:21:08 +0100 Subject: [FieldTrip] Input data MEG convention Message-ID: <20160217122108.Horde.u-p-Ld9uxwAzGUae03Ov8A2@webmail.uniparthenope.it> Hi, How can I understand if my input data MEG are left-handed or right-handed? thank you for helping me. Best regards, -- Antonietta Sorriso ​Ph.D. Student ​Dipartimento di Ingegneria ​Laboratorio di TLC ed Elaborazione Segnali ed Immagini ​Centro Direzionale di Napoli, Isola C4, Stanze 326-327, lato Sud, piano 3 ​80143, Napoli, Italia e-mail: antonietta.sorriso at uniparthenope.it From jan.schoffelen at donders.ru.nl Wed Feb 17 12:47:47 2016 From: jan.schoffelen at donders.ru.nl (Schoffelen, J.M. (Jan Mathijs)) Date: Wed, 17 Feb 2016 11:47:47 +0000 Subject: [FieldTrip] Input data MEG convention In-Reply-To: <20160217122108.Horde.u-p-Ld9uxwAzGUae03Ov8A2@webmail.uniparthenope.it> References: <20160217122108.Horde.u-p-Ld9uxwAzGUae03Ov8A2@webmail.uniparthenope.it> Message-ID: <7285B71F-6B07-4B24-85BD-D1C60B22F69F@fcdonders.ru.nl> Hi Antonietta, I would assume that you refer to ‘handedness’ in the context of a coordinate system. You can find out its handedness by making a x/y/z axis system with you thumb/index finger/middle finger, and then check whether the ‘meaning’ of those axes correspond to what you see when using your right hand or your left hand. Example: if you know that your x/y/z axes mean ‘right’,’anterior’,’superior’, you’ll notice that this is a right handed coordinate system, because when your right thumb is pointing to the right and your right index finger is pointing forward, the middle finger is pointing upward (pun not intended). when your x/y/z axes mean ‘left’,’posterior’,’inferior’, you’ll notice that you need your left hand to describe it correctly, hence it’s a left-handed coordinate system. Best, Jan-Mathijs On Feb 17, 2016, at 12:21 PM, Antonietta Sorriso wrote: > > Hi, > > How can I understand if my input data MEG are left-handed or right-handed? > > thank you for helping me. > > Best regards, > -- > Antonietta Sorriso > > ​Ph.D. Student > ​Dipartimento di Ingegneria > ​Laboratorio di TLC ed Elaborazione Segnali ed Immagini > ​Centro Direzionale di Napoli, Isola C4, Stanze 326-327, lato Sud, piano 3 > ​80143, Napoli, Italia > e-mail: antonietta.sorriso at uniparthenope.it > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip From lorenzomagazzini at gmail.com Wed Feb 17 12:59:11 2016 From: lorenzomagazzini at gmail.com (Lorenzo Magazzini) Date: Wed, 17 Feb 2016 11:59:11 +0000 Subject: [FieldTrip] CTF data, marker and class files In-Reply-To: References: Message-ID: Hi Jose, Following on from what Steve said, you could try to use the i/o function read_ctf_cls('ClassFile.cls'). This will return an array of values indexing the trials marked as BAD, which you can use later on to exclude BAD trials from the analysis. Probably this is not the ideal solution but is roughly what I do to read the ClassFile. Best, Lorenzo On 17 February 2016 at 11:09, Stephen Politzer-Ahles < stephen.politzer-ahles at ling-phil.ox.ac.uk> wrote: > Hello Jose, > > Does it work differently if you use ft_definetrial and ft_preprocessing? > ft_read_event is a low-level function, it should be possible to read your > data without using it, and just using ft_definetrial plus ft_preprocessing. > > I don't remember off the top of my head whether ft_definetrial was able to > find the BAD events in the classfile. If you don't find a better way to > deal with this issue, another way around would be to just read all your > events with ft_definetrial, and write some MATLAB code to read the > classfile directly, identify the indices of the bad trials, and remove > those rows from the trial definition (or remove them at some later time, > e.g., to keep them in the trial definition so they do get read, but then > not include those trials in your timelockanalysis later on). > > best, > Steve > > > > --- > Stephen Politzer-Ahles > University of Oxford > Language and Brain Lab > Faculty of Linguistics, Phonetics & Philology > http://users.ox.ac.uk/~cpgl0080/ > > >> >> Message: 4 >> Date: Tue, 16 Feb 2016 18:43:01 +0100 >> From: Jose >> To: fieldtrip at science.ru.nl >> Subject: [FieldTrip] CTF data, marker and class files >> Message-ID: >> < >> CAH3cVdA_VxHQDcXX3uxoqTFva+4UsMSWP+iccgZ4zZKH51PJ8A at mail.gmail.com> >> Content-Type: text/plain; charset="utf-8" >> >> >> dear list, >> >> I'm trying to analyse CTF MEG data, but I'm running into problems when >> getting my triggers. ft_read_event recognize well the triggers in my >> MarkerFile.mrk, but for some reason do not look at the ClassFile.cls file, >> so I'm missing the BAD triggers in my events, >> >> Someone has run on the same problem?, >> >> thanks >> 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 jan.schoffelen at donders.ru.nl Wed Feb 17 13:36:54 2016 From: jan.schoffelen at donders.ru.nl (Schoffelen, J.M. (Jan Mathijs)) Date: Wed, 17 Feb 2016 12:36:54 +0000 Subject: [FieldTrip] ft_sourceplot ortho missing projections In-Reply-To: References: <5CF3C648-8BC4-4D99-9743-819343D8804C@psych.ru.nl> Message-ID: Hi Katja, You may have noticed that this seems an interaction between the matlab version and the crosshair option. The issue you report occurs with matlab 2014b (possibly also with more recent versions), but only if cfg.crosshair = ‘yes’. I suspect something goes wrong with the stacking order of the graphics objects that are to be displayed in each of the figure’s subplots. Thanks, Jan-Mathijs On Feb 17, 2016, at 12:18 PM, Müller, K. (Katja) wrote: > Hi, > > (I should have mentioned it) The link to the inline image attachment (example of the problem) is at the end of my e-mail below: > >> Name: layer6_time_300ms.png >> Type: image/png >> Size: 51610 bytes >> Desc: layer6_time_300ms.png >> http://mailman.science.ru.nl/pipermail/fieldtrip/attachments/20160213/3c89a132/attachment.png > > > Best, > Katja > > > >> Am 13.02.28 Heisei um 12:39 schrieb Müller, K. (Katja) : >> >> Hi, >> >> I am plotting statistical data on the orthogonal slices using ft_sourceplot(). In all plots, at least one view (usual axial), sometimes all views are missing: >> >> >> >> Sometimes one of them appears when I am manually changing the cursor position, but I never get all to work by this. >> >> The script I am using had been working flawlessly at the end of last year. I am not sure after which nightly build the problems started to occur. The difference I can see is that the default colormap has been replaced with the better parula now, and according to github there has been some other work on ft_sourceplot(). >> >> >> Best regards, >> Katja > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip From iris.steinmann at med.uni-goettingen.de Wed Feb 17 15:58:39 2016 From: iris.steinmann at med.uni-goettingen.de (Steinmann, Iris) Date: Wed, 17 Feb 2016 14:58:39 +0000 Subject: [FieldTrip] Align electrods to headmodel with method 'interactiv' In-Reply-To: References: Message-ID: Hi Debora, I tried to do so before, but I ended up with the following error: Do you want to change the anatomical labels for the axes [Y, n]? Y What is the anatomical label for the positive X-axis [r, l, a, p, s, i]? r What is the anatomical label for the positive Y-axis [r, l, a, p, s, i]? a What is the anatomical label for the positive Z-axis [r, l, a, p, s, i]? s Is the origin of the coordinate system at the a(nterior commissure), i(nterauricular), n(ot a landmark)? n Undefined function or variable 'template'. Error in ft_electroderealign (line 244) for j=1:length(template) Error in eeg_beamforming (line 107) elec_aligned = ft_electroderealign(cfg); I prepared now a template following this instruction: http://www.fieldtriptoolbox.org/example/align_eeg_electrode_positions_to_bem_headmodel In this example the template is only used for the cfg.method = ‘fiducial’ but not for the ‘interactiv’ option. Anyhow I additionally specified the template together with the ‘interactiv’ method like this: cfg = []; cfg.method = 'interactive'; cfg.elec = elec; cfg.headshape = vol.bnd(1); cfg.template = elec_mni; elec_new = ft_electroderealign(cfg); now it works! Thanks! Iris From: fieldtrip-bounces at science.ru.nl [mailto:fieldtrip-bounces at science.ru.nl] On Behalf Of Debora Desideri Sent: Mittwoch, 17. Februar 2016 11:20 To: FieldTrip discussion list Subject: Re: [FieldTrip] Align electrods to headmodel with method 'interactiv' Dear Iris, you should press Y and specify the coordinate system following the questions that will appear on the command window (you will be asked to specify whether your coordinate sytsem is ras or lps and so on and where the origin of the coordinate system is located). afterwards, the GUI will display the electrodes and the head of the subject as well. You should then be able to align the electrode by simply applying translation/rotation or whatever you need make the electrode fit on the head surface. In case you want to use the methiod 'fiducials', you should have recorded together with the elctrode positions some anatomical landmarks that you can easily find in the MRI of the subject. If you did not record such landmarks during the acquisition of the electrode positions, than I guess your only option is to use the method 'interactive' Hope this helps! Best, Debora On Tue, Feb 16, 2016 at 6:07 PM, Steinmann, Iris > wrote: Hi FieldTripper, I want to do source reconstruction with my EEG data and try to align my electrodes to the headmodel (calculated with my own MR data) (following this description: http://www.fieldtriptoolbox.org/example/align_eeg_electrode_positions_to_bem_headmodel) I run the ft_electroderealign function with the following options: cfg = []; cfg.method = 'interactive'; cfg.elec = elec; cfg.headshape = vol.bnd(1); elec_new = ft_electroderealign(cfg); But all I get is a figure showing a coordinate system with my electrodepositions. The scull saved in vol.bnd(1) is not plotted. (I attached a jpg of the figure). The MATLAB panel asked me: "Do you want to change the anatomical labels for the axes [Y, n]? " If I say 'no', I get the following error: Undefined function or variable 'template'. Error in ft_electroderealign (line 244) for j=1:length(template) I tried the ft_electroderealign function with the cfg.method = 'fiducials', but ended up with the same figure and the same question in the MATLAB panel. Would be great if someone could help me to figure out what's going wrong here and how I can align my electrodes to the headmodel. Thanks! _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -- Debora Desideri, PhD Student BNP Lab - Neurology Department University Hospital Tübingen Eberhard Karls University Tübingen Hoppe-Seyler Str. 3 D-72076 Tübingen Tel: +49 7071/29 80478 -------------- next part -------------- An HTML attachment was scrubbed... URL: From mi_mayer at gmx.de Wed Feb 17 16:32:34 2016 From: mi_mayer at gmx.de (Irene Sophia Mayer) Date: Wed, 17 Feb 2016 16:32:34 +0100 Subject: [FieldTrip] Epoching/trialdefinition Message-ID: An HTML attachment was scrubbed... URL: From julian.keil at gmail.com Wed Feb 17 17:07:26 2016 From: julian.keil at gmail.com (Julian Keil) Date: Wed, 17 Feb 2016 17:07:26 +0100 Subject: [FieldTrip] Epoching/trialdefinition In-Reply-To: References: Message-ID: <427FA825-7553-49C4-9294-843E909E75B3@gmail.com> Dear Irene, ft_redefinetrial is your friend. Check the Mailinglist archive for a conversation from 2013 in which Jörn Horschig explained some pitfalls here. The mail should be called "ft_preprocessing high-pass filtering question" Good luck, Julian Am 17.02.2016 um 16:32 schrieb Irene Sophia Mayer: > Dear fieldtrippers, > > I am currently analysing data where I wanna look at different time frames around specific triggers. To do so, I was planning on doing all my preprocessing on continuous data and then afterwards epoching it. > > However, when trying to use the following code on my preprocessed data, I get an error message: > > cfg = []; > cfg.datafile = 'data.mat'; > cfg.trialdef.eventtype = 'Stimulus'; > cfg.trialdef.eventvalue = trialmarks; > cfg.trialdef.prestim = .1; % baseline > cfg.trialdef.poststim = .5; % post-baseline trial length > cfg = ft_definetrial(cfg); > > Error using ft_read_header (line 2158) > unsupported header format (matlab) > Error in ft_trialfun_general (line 78) > hdr = ft_read_header(cfg.headerfile, 'headerformat', cfg.headerformat); > Error in ft_definetrial (line 174) > [trl, event] = feval(cfg.trialfun, cfg); > Error in prepro_03_epoching (line 19) > e_data = ft_definetrial(cfg); > > The same code works if applied before ft_preprocessing. > > Is there a way to epoch data after preprocessing it? > > Cheers, > Irene > _______________________________________________ > 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: signature.asc Type: application/pgp-signature Size: 495 bytes Desc: Message signed with OpenPGP using GPGMail URL: From paolo.belardinelli at gmail.com Wed Feb 17 20:20:35 2016 From: paolo.belardinelli at gmail.com (Paolo Belardinelli) Date: Wed, 17 Feb 2016 20:20:35 +0100 Subject: [FieldTrip] Problem with Template Model for Source Reconstruction Message-ID: Dear Fieldtrippers, we are encountering a problem with a template model for source reconstruction. In particular, we are warping (non linearly) a template grid to the individual subject's MRI. Doing that, it appears that the very top of the brain is not fully covered by dipole locations. We found that this issue has been already reported: http://www.fieldtriptoolbox.org/template/sourcemodel Apparently, since March 7th 2013, this issue has been fixed. However we are using August 28th 2015 Fieldtrip version and we are still dealing with the same issue. Any suggestions? Here are our code lines: cfg = []; cfg.grid.warpmni = 'yes'; cfg.resolution = 6; % resolution of the template grid in mm cfg.grid.nonlinear = 'yes'; % use non linear normalization cfg.mri = mri_spm; % use subject's mri in mni coordinates cfg.grid.unit = 'mm'; sourcemodel = ft_prepare_sourcemodel(cfg); Thank you in advance. Paolo -- -- Paolo Belardinelli, PhD Neurology Department University Hospital Tuebingen Eberhard Karls University Tuebingen Hoppe-Seyler Str. 3 D-72076 Tuebingen Tel: +49 7071 / 29 80478 -------------- next part -------------- An HTML attachment was scrubbed... URL: From britta.westner at uni-konstanz.de Thu Feb 18 10:10:18 2016 From: britta.westner at uni-konstanz.de (Britta Westner) Date: Thu, 18 Feb 2016 10:10:18 +0100 Subject: [FieldTrip] Problem with Template Model for Source Reconstruction In-Reply-To: References: Message-ID: <56C58A7A.9000207@uni-konstanz.de> Dear Paolo, I experienced similar problems and found that correcting the field bias in the participant's MRI (e.g. doing a "bias correction" with SPM) can help. My explanation would be that the field bias either leads to small inaccuracies in the segmentation and volume which then "get visible" when warping the grid based on the non-segmented MRI, or that the warping algorithm itself is affected by this bias. Maybe you can give that a try! Hope this helps, Britta Am 17.02.2016 um 20:20 schrieb Paolo Belardinelli: > Dear Fieldtrippers, > we are encountering a problem with a template model for source > reconstruction. In particular, we are warping (non linearly) a > template grid to the individual subject's MRI. > Doing that, it appears that the very top of the brain is not fully > covered by dipole locations. > We found that this issue has been already reported: > > http://www.fieldtriptoolbox.org/template/sourcemodel > > Apparently, since March 7th 2013, this issue has been fixed. > However we are using August 28th 2015 Fieldtrip version and we are > still dealing with the same issue. > Any suggestions? > Here are our code lines: > > cfg = []; > cfg.grid.warpmni = 'yes'; > cfg.resolution = 6; % resolution of the template grid in mm > cfg.grid.nonlinear = 'yes'; % use non linear normalization > cfg.mri = mri_spm; % use subject's mri in mni coordinates > cfg.grid.unit = 'mm'; > sourcemodel = ft_prepare_sourcemodel(cfg); > > Thank you in advance. > > Paolo > > > > > -- > -- > Paolo Belardinelli, PhD > Neurology Department > University Hospital Tuebingen > Eberhard Karls University Tuebingen > Hoppe-Seyler Str. 3 > D-72076 Tuebingen > Tel: +49 7071 / 29 80478 > > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -- Britta Westner, M.Sc. Neuroelectromagnetic Oscillations Laboratory Fachbereich Psychologie Universität Konstanz Postfach 905 78457 Konstanz Telefon: +49-(0)7531-88-5703 Fax: +49-(0)7531-88-5709 www.psychologie.uni-konstanz.de/nemo-lab -------------- next part -------------- An HTML attachment was scrubbed... URL: From singhkd at cardiff.ac.uk Fri Feb 19 00:52:43 2016 From: singhkd at cardiff.ac.uk (Krish Singh) Date: Thu, 18 Feb 2016 23:52:43 +0000 Subject: [FieldTrip] New postdoctoral position supporting a multi-site MEG data cohort Message-ID: Dear All, re: Research Associate in Multi-site MEG Data Cohort Management & Analysis We have just advertised an additional 2-year Research Associate post supporting the establishment of a multi-site database of normative Magnetoencephalographic (MEG) data, collected across all UK MEG laboratories, and the development of common management and analysis pipelines for mining this resource. 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://krb-sjobs.brassring.com/TGWEbHost/jobdetails.aspx?partnerid=30011&siteid=5460&AReq=4394BR ​ ​Best Wishes, Krish ​ -- Prof. Krish Singh CUBRIC School of Psychology / Ysgol Seicoleg Cardiff University / Prifysgol Caerdydd Park Place / Plas y Parc Cardiff / Caerdydd CF10 3AT, UK Tel / Ffôn: 02920 874690 / 870365 Fax / Ffacs: 02920 870339 Email / Ebost : singhkd at cardiff.ac.uk -------------- next part -------------- An HTML attachment was scrubbed... URL: From francois.tadel at mcgill.ca Fri Feb 19 01:20:25 2016 From: francois.tadel at mcgill.ca (=?UTF-8?Q?Fran=c3=a7ois_Tadel?=) Date: Thu, 18 Feb 2016 19:20:25 -0500 Subject: [FieldTrip] ft_dipolefitting and CTF 3rd order gradient compensation Message-ID: <56C65FC9.9010309@mcgill.ca> Hello, When estimating dipoles with ft_dipolefitting: How should I proceed if I want to pass the information about the 3rd order gradient compensation to the computation of the forward model ? Is there a field I should fill either in the data or the cfg structure? We are trying to compare the goodness of fit obtained with Brainstorm, MNE and FieldTrip (simple CTF electric phantom recordings). They are calling the FieldTrip function from the Brainstorm environment and asked me to check what was the situation with the CTF compensation matrix. I was expecting to find something like the line below in the code, but couldn't find it: Gain(iMeg,:) = Gain(iMeg,:) - MegRefCoef * Gain(iRef,:) % iMeg = indices of the MEG channels %iRef = indices of the CTF MEG reference channels % Gain = leadfield matrix [Nchannels x Nsources] % MegRefCoef= 3rd order compensation matrix [Nchannels_meg x Nchannels_ref] Can someone help me with this? Thanks, Francois From jan.schoffelen at donders.ru.nl Fri Feb 19 09:07:46 2016 From: jan.schoffelen at donders.ru.nl (Schoffelen, J.M. (Jan Mathijs)) Date: Fri, 19 Feb 2016 08:07:46 +0000 Subject: [FieldTrip] ft_dipolefitting and CTF 3rd order gradient compensation In-Reply-To: <56C65FC9.9010309@mcgill.ca> References: <56C65FC9.9010309@mcgill.ca> Message-ID: See line 187 in ft_compute_leadfield. More information can be found in ctf2grad and ft_denoise_synthetic. Best, Jan-Mathijs On Feb 19, 2016, at 1:20 AM, François Tadel wrote: > Hello, > > When estimating dipoles with ft_dipolefitting: > How should I proceed if I want to pass the information about the 3rd order gradient compensation to the computation of the forward model ? > Is there a field I should fill either in the data or the cfg structure? > > We are trying to compare the goodness of fit obtained with Brainstorm, MNE and FieldTrip (simple CTF electric phantom recordings). They are calling the FieldTrip function from the Brainstorm environment and asked me to check what was the situation with the CTF compensation matrix. I was expecting to find something like the line below in the code, but couldn't find it: > > Gain(iMeg,:) = Gain(iMeg,:) - MegRefCoef * Gain(iRef,:) > > % iMeg = indices of the MEG channels > %iRef = indices of the CTF MEG reference channels > % Gain = leadfield matrix [Nchannels x Nsources] > % MegRefCoef= 3rd order compensation matrix [Nchannels_meg x Nchannels_ref] > > Can someone help me with this? > > Thanks, > Francois > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip From prasandhya.a.yusuf at gmail.com Fri Feb 19 15:04:25 2016 From: prasandhya.a.yusuf at gmail.com (Prasandhya Astagiri Yusuf) Date: Fri, 19 Feb 2016 15:04:25 +0100 Subject: [FieldTrip] Clarification on plotting WPLI In-Reply-To: References: Message-ID: Hi Peter, sorry for the (very) late response, I guess you have already figured the answer by now. Anyhow, in case someone has similar problem, I try to share my experience here in the forum. I recently computed the debiased WPLI and experienced the same problem. I also found this negative value of debiased WPLI quite frequently asked in this mailing list, even Mr. Martin Vinck himself has already responded to it on June 2011. So as stated in the paper (Vinck et al. 2011), PLI and WPLI result has the range from 0 to 1. But the debiased WPLI could yields negative values as a consequence of debiasing method. One of his latest paper (Phillips, 2014), they mentioned in the Materials and Methods that "the debiased WPLI estimator (Vinck et al. 2011), ranging from zero (*negative values can incidentally occur because of limited sampling*) to one (maximum coherence)". So in my opinion, we can neglect this negative values and convert them to zeros. But surely, we should not take the absolute value from it. Best, Sandhy Prasandhya A. Yusuf *Medizinische Hochschule Hannover* Experimentelle Otologie / OE 8891 / VIANNA / M13 Feodor-Lynen-Str. 35 D-30625 Hannover On Mon, Dec 21, 2015 at 8:39 PM, Peter Lyons wrote: > Hello Everyone, > > I have a question regarding the interpretation of negative values in the > debiased wPLI. Although the reference page on the debiased wPLI notes that > estimates are computed by squaring the wPLI values, I and others have > noticed that some of the values in the debiased wPLI spectrum are negative. > How should these negative values be interpreted in reference to 0? > > To view the results of the debiased wPLI connectivity analysis > (ft_connectivity analysis with cfg.method = 'wpli_debiased'), I've been > using the ft_topoplotER function. However, I'm concerned that the default > scaling (zlim = 'maxmin') of the plot does not seem to register the > negative values in the debiased wPLI spectrum. That is, the negative values > are not being plotted. It is curious, however, that the ft_topoplotER > does register the negative values in the *non-debiased *wPLI spectrum. > > Is there a reason why the ft_topoplotER function is treating the negative > values from the debiased vs. non-debiased wPLI spectrums differently? Is > there perhaps a more appropriate plotting function I should be using to > view the debiased wPLI output? > > I would greatly appreciate any guidance in this. > > Thank you! > > Peter > > _______________________________________________ > 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 michelic72 at gmail.com Fri Feb 19 16:11:57 2016 From: michelic72 at gmail.com (Cristiano Micheli) Date: Fri, 19 Feb 2016 16:11:57 +0100 Subject: [FieldTrip] Clarification on plotting WPLI In-Reply-To: References: Message-ID: Dear Yusuf and Peter, My experience is also that negative squared wPLI values should not be considered, as they constitute a side-effect of the debiasing technique. I would rather clip them to zero, or, better, assign them a NaN (since the result is undetermined). I hope this helped. Cris On Fri, Feb 19, 2016 at 3:04 PM, Prasandhya Astagiri Yusuf < prasandhya.a.yusuf at gmail.com> wrote: > Hi Peter, > sorry for the (very) late response, I guess you have already figured the > answer by now. Anyhow, in case someone has similar problem, I try to share > my experience here in the forum. > > I recently computed the debiased WPLI and experienced the same problem. I > also found this negative value of debiased WPLI quite frequently asked in > this mailing list, even Mr. Martin Vinck himself has already responded to > it on June 2011. > So as stated in the paper (Vinck et al. 2011), PLI and WPLI result has the > range from 0 to 1. But the debiased WPLI could yields negative values as a > consequence of debiasing method. One of his latest paper (Phillips, 2014), > they mentioned in the Materials and Methods that "the debiased WPLI > estimator (Vinck et al. 2011), ranging from zero (*negative values can > incidentally occur because of limited sampling*) to one (maximum > coherence)". > So in my opinion, we can neglect this negative values and convert them to > zeros. But surely, we should not take the absolute value from it. > > Best, > Sandhy > > > Prasandhya A. Yusuf > > *Medizinische Hochschule Hannover* > > Experimentelle Otologie / OE 8891 / > > VIANNA / M13 > > Feodor-Lynen-Str. 35 > > D-30625 Hannover > > > > On Mon, Dec 21, 2015 at 8:39 PM, Peter Lyons wrote: > >> Hello Everyone, >> >> I have a question regarding the interpretation of negative values in the >> debiased wPLI. Although the reference page on the debiased wPLI notes that >> estimates are computed by squaring the wPLI values, I and others have >> noticed that some of the values in the debiased wPLI spectrum are negative. >> How should these negative values be interpreted in reference to 0? >> >> To view the results of the debiased wPLI connectivity analysis >> (ft_connectivity analysis with cfg.method = 'wpli_debiased'), I've been >> using the ft_topoplotER function. However, I'm concerned that the default >> scaling (zlim = 'maxmin') of the plot does not seem to register the >> negative values in the debiased wPLI spectrum. That is, the negative values >> are not being plotted. It is curious, however, that the ft_topoplotER >> does register the negative values in the *non-debiased *wPLI spectrum. >> >> Is there a reason why the ft_topoplotER function is treating the negative >> values from the debiased vs. non-debiased wPLI spectrums differently? Is >> there perhaps a more appropriate plotting function I should be using to >> view the debiased wPLI output? >> >> I would greatly appreciate any guidance in this. >> >> Thank you! >> >> Peter >> >> _______________________________________________ >> 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 valentina.mione at uniroma1.it Fri Feb 19 18:17:50 2016 From: valentina.mione at uniroma1.it (Valentina Mione) Date: Fri, 19 Feb 2016 18:17:50 +0100 Subject: [FieldTrip] error with Computing cross-correlations between spike trains tutorial Message-ID: Hi everyone, I am Valentina and I am a fresh new FieldTrip user. I was following the tutorial http://www.fieldtriptoolbox.org/tutorial/spike, in particular the cross correlation part with the example data ftp://ftp.fieldtriptoolbox.org/pub/fieldtrip/tutorial/spike/p029_sort_final_01.nex, but I'm stuck with a MatLab error. I loaded the data exactly how it's explained and I defined the channels and the trials (just copying the matlab instructions) and all worked fine. Then I followed this part of the tutorial: *and then compute the cross-correlogram (and the shift-predictor cross-correlogram) by* cfg = []; cfg.maxlag = 0.2; % maximum 200 ms cfg.binsize = 0.001; % bins of 1 ms cfg.outputunit = 'proportion'; % make unit area cfg.latency = [-2.5 0]; cfg.vartriallen = 'no'; % do not allow variable trial lengths cfg.method = 'xcorr'; % compute the normal cross-correlogram Xc = ft_spike_xcorr(cfg,spikeTrials); But after processing all the 600 trials the ft_spike_xcorr function interrupts working with the error: "*??? Subscript indices must either be real positive integers or logicals.* *Error in ==> ft_spike_xcorr at 350* *stat.label = spike.label(chansel);*" Trying to understand the error I set I breakpoint on the 350 line of the script and I got another error in ft_checkconfig.m "*??? Error using ==> ft_checkconfig at 208* *The field cfg.progress is not allowed* *Error in ==> ft_spike_xcorr at 126* *cfg = ft_checkconfig(cfg, 'allowed', {'latency', 'trials',* *'keeptrials', 'method', 'channelcmb', 'vartriallen', 'debias',* *'maxlag', 'binsize', 'outputunit'});*" I hope someone can help me because I really can't understand what's wrong (I feel there is a problem with the selection of the channels maybe) and I just followed the instructions. Best, Valentina -------------- next part -------------- An HTML attachment was scrubbed... URL: From joseangel.pineda at ctb.upm.es Sat Feb 20 12:32:02 2016 From: joseangel.pineda at ctb.upm.es (=?UTF-8?Q?Jos=C3=A9_=C3=81ngel_Pineda?=) Date: Sat, 20 Feb 2016 12:32:02 +0100 Subject: [FieldTrip] Job Offer in Madrid Message-ID: We are pleased to offer a 2-year post-doctoral position at the Reina Sofia Foundation Alzheimer's Disease Centre in Madrid, Spain. The successful applicant will be involved in neuroimaging analyses of a 5-year longitudinal study (currently in year 4) of 1200 healthy elderly individuals (aged 70-85) to determine neuronal markers in the healthy state which predict subsequent development of mild cognitive impairment and dementia. In addition, the Reina Sofia Alzheimer's Centre offers: - A research-dedicated MRI facility attached to a 140-bed residence for patients with Alzheimer’s disease. - A brain-bank providing post-mortem histopathological confirmation of dementia diagnosis for patients scanned pre-mortem. - Ex-vivo MRI scanning. A strong background in neuroimaging techniques is required. Applicants must have a PhD in neuroscience, cognitive neuroscience, biomedical engineering, neuropsychology or related field. Experience in dementia research is a plus. Spanish language skills are NOT required. Competitive annual salary depending on experience. SUBMISSION Interested candidates should send CV and a cover letter (including contact details of 2 referees), to the following email address: bryan.strange at upm.es DEADLINE FOR SUBMISSION OF APPLICATIONS March 4, 2016 Any questions, please feel free to contact me. -------------- next part -------------- An HTML attachment was scrubbed... URL: From jan.schoffelen at donders.ru.nl Sat Feb 20 12:49:35 2016 From: jan.schoffelen at donders.ru.nl (Schoffelen, J.M. (Jan Mathijs)) Date: Sat, 20 Feb 2016 11:49:35 +0000 Subject: [FieldTrip] error with Computing cross-correlations between spike trains tutorial In-Reply-To: References: Message-ID: Hi Valentina, Danial Arabali (in BCC) has also encountered this, and filed a bug on bugzilla.fieldtriptoolbox.org, as bug 3058. Perhaps you could create yourself an account, add yourself on the CC-list of this bug, and team up with Danial to do some extra detective work. You seem to be on the right track, with respect to your debugging attempt. I suspect it’s probably relatively easy to solve. Note that the error relating to the issue in ft_checkconfig has been fixed in the current version of the code, that can be easily obtained from github.com/fieldtrip The ft_checkconfig bug is referenced here: http://bugzilla.fieldtriptoolbox.org/show_bug.cgi?id=3062 The current issue is referenced here: http://bugzilla.fieldtriptoolbox.org/show_bug.cgi?id=3058 Best, Jan-Mathijs On Feb 19, 2016, at 6:17 PM, Valentina Mione > wrote: Hi everyone, I am Valentina and I am a fresh new FieldTrip user. I was following the tutorial http://www.fieldtriptoolbox.org/tutorial/spike, in particular the cross correlation part with the example data ftp://ftp.fieldtriptoolbox.org/pub/fieldtrip/tutorial/spike/p029_sort_final_01.nex, but I'm stuck with a MatLab error. I loaded the data exactly how it's explained and I defined the channels and the trials (just copying the matlab instructions) and all worked fine. Then I followed this part of the tutorial: and then compute the cross-correlogram (and the shift-predictor cross-correlogram) by cfg = []; cfg.maxlag = 0.2; % maximum 200 ms cfg.binsize = 0.001; % bins of 1 ms cfg.outputunit = 'proportion'; % make unit area cfg.latency = [-2.5 0]; cfg.vartriallen = 'no'; % do not allow variable trial lengths cfg.method = 'xcorr'; % compute the normal cross-correlogram Xc = ft_spike_xcorr(cfg,spikeTrials); But after processing all the 600 trials the ft_spike_xcorr function interrupts working with the error: "??? Subscript indices must either be real positive integers or logicals. Error in ==> ft_spike_xcorr at 350 stat.label = spike.label(chansel);" Trying to understand the error I set I breakpoint on the 350 line of the script and I got another error in ft_checkconfig.m "??? Error using ==> ft_checkconfig at 208 The field cfg.progress is not allowed Error in ==> ft_spike_xcorr at 126 cfg = ft_checkconfig(cfg, 'allowed', {'latency', 'trials', 'keeptrials', 'method', 'channelcmb', 'vartriallen', 'debias', 'maxlag', 'binsize', 'outputunit'});" I hope someone can help me because I really can't understand what's wrong (I feel there is a problem with the selection of the channels maybe) and I just followed the instructions. Best, Valentina _______________________________________________ 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 ha438 at georgetown.edu Sun Feb 21 00:23:01 2016 From: ha438 at georgetown.edu (Hassan Aleem) Date: Sat, 20 Feb 2016 18:23:01 -0500 Subject: [FieldTrip] Fixing headmodel vertices Message-ID: Hi Everyone, New to fieldtrip. My headmodel looks pretty good except for a couple vertices that are poking in. Is there any way to address them specifically? The code I used is similar to one provided by someone who was successful. As follows mri.coordsys ='SPM' cfg = []; cfg.brainthreshold = 0.15; cfg.scalpthreshold = 0.3; cfg.downsample = 1; %no downsampling cfg.output = {'brain' 'scalp' 'skull'}; segment = ft_volumesegment(cfg, mri); cfg = []; cfg.method = 'projectmesh'; cfg.numvertices = 10000; bnd = ft_prepare_mesh( cfg, seg); % fix mesh [ bnd( 1).pnt, bnd( 1).tri] = meshresample( bnd( 1).pnt, bnd( 1).tri, 1000/size( bnd( 1).pnt, 1)); [ bnd( 2).pnt, bnd( 2).tri] = meshresample( bnd( 2).pnt, bnd( 2).tri, 2000/size( bnd( 2).pnt, 1)); [ bnd( 3).pnt, bnd( 3).tri] = meshresample( bnd( 3).pnt, bnd( 3).tri, 3000/size( bnd( 3).pnt, 1)); for ii = 1:size( bnd), [ bnd( ii).pnt, bnd( ii).tri] = meshcheckrepair( bnd( ii).pnt, bnd( ii).tri, 'dup'); [ bnd( ii).pnt, bnd( ii).tri] = meshcheckrepair( bnd( ii).pnt, bnd( ii).tri, 'isolated'); [ bnd( ii).pnt, bnd( ii).tri] = meshcheckrepair( bnd( ii).pnt, bnd( ii).tri, 'deep'); [ bnd( ii).pnt, bnd( ii).tri] = meshcheckrepair( bnd( ii).pnt, bnd( ii).tri, 'meshfix'); end % calculate headmodel % reordered to brain skull scalp cfg = []; cfg.method = 'bemcp'; %openmeeg doesnt work with multiple output from ft_volumesegment vol = ft_prepare_headmodel(cfg, bnd); clear bnd Thanks! -------------- next part -------------- An HTML attachment was scrubbed... URL: From mi_mayer at gmx.de Sun Feb 21 13:15:26 2016 From: mi_mayer at gmx.de (Irene Sophia Mayer) Date: Sun, 21 Feb 2016 13:15:26 +0100 Subject: [FieldTrip] Global field power Message-ID: An HTML attachment was scrubbed... URL: From valentina.mione at uniroma1.it Mon Feb 22 12:43:55 2016 From: valentina.mione at uniroma1.it (Valentina Mione) Date: Mon, 22 Feb 2016 12:43:55 +0100 Subject: [FieldTrip] error with Computing cross-correlations between spike trains tutorial In-Reply-To: References: Message-ID: Hi everyone, I posted a comment on the error 3058 http://bugzilla.fieldtriptoolbox.org/show_bug.cgi?id=3058 about the cross correlation tutorial on spike data But I copy and paste what I did also here, maybe someone could be intrested as well (In reply to Danial Arabali from comment #0) Hi Danial, I'm stuck exactly at your point with the same error. Today I tried to do some detective work because I think the first error is at the line 138: *chansel = unique(cmbindx(:)); % get the unique channels* because it takes also the value 0 as index for channels. So i corrected like: *chansel = unique(cmbindx(:)); % get the unique channels* *chansel = chansel(chansel~=0); % remove zeros* and the script works fine to the end, but the output is different: infact I don't get the instruction at line 133 *for k=1:size(cfg.channelcmb,1)* * cmbindx(k,1) = strmatch(cfg.channelcmb(k,1), spike.label, 'exact');* * cmbindx(k,2) = strmatch(cfg.channelcmb(k,2), spike.label, 'exact');* *end* Why does it is set to search for only two channels if we specified 4 channels? (*cfg.spikechannel = {'sig001U_wf', 'sig002U_wf', 'sig003U_wf', 'sig004U_wf'}; % select only the MUA*) Maybe the instruction at this point should be something like this *for k=1:size(cfg.channelcmb,1)* * for c=1:length(spike.label)* * cmbindx(k,c) = strmatch(cfg.channelcmb(k,c), spike.label, 'exact');* * end* *end* Anyway, I tried this solution and the output is of the right size now (xcorr: [4x4x400 double] instead of xcorr: [2x2x400 double]), but I don't think the content is right. The last test I did was to select only the channels 3 and 4 *cfg.spikechannel = { 'sig003U_wf', 'sig004U_wf'}; % select only the MUA* and run the original script with only the first modified instruction *chansel = unique(cmbindx(:)); % get the unique channels* *chansel = chansel(chansel~=0); % remove zeros* Then I followed the second part of the tutorial *% compute the shuffled correlogram* *cfg.method = 'shiftpredictor'; % compute the shift predictor* *Xshuff = ft_spike_xcorr(cfg,spikeTrials);* *iCmb = 3;* *jCmb = 4;* *figure* *xcSmoothed = conv(squeeze(Xc.xcorr(iCmb,jCmb,:)),ones(1,5)./5,'same'); % do some smoothing* *hd = plot(Xc.time(3:end-2),xcSmoothed(3:end-2),'k'); % leave out borders (because of smoothing)* *hold on* *xcSmoothed = conv(squeeze(Xshuff.shiftpredictor(iCmb,jCmb,:)),ones(1,5)./5,'same'); * *plot(Xc.time(3:end-2),xcSmoothed(3:end-2),'r')* *hold on* *xlabel('delay')* *ylabel('proportion of coincidences') * *title([Xc.label{iCmb} Xc.label{jCmb}])* *axis tight* And I just changed *iCmb = 3;* *jCmb = 4;* in *iCmb = 1;* *jCmb = 2;* And I got exactly the same figure output of the tutorial. I hope this can be a little help for the work Valentina 2016-02-20 12:49 GMT+01:00 Schoffelen, J.M. (Jan Mathijs) < jan.schoffelen at donders.ru.nl>: > Hi Valentina, > > Danial Arabali (in BCC) has also encountered this, and filed a bug on > bugzilla.fieldtriptoolbox.org, as bug 3058. Perhaps you could create > yourself an account, add yourself on the CC-list of this bug, and team up > with Danial to do some extra detective work. You seem to be on the right > track, with respect to your debugging attempt. I suspect it’s probably > relatively easy to solve. Note that the error relating to the issue in > ft_checkconfig has been fixed in the current version of the code, that can > be easily obtained from github.com/fieldtrip > > The ft_checkconfig bug is referenced here: > > http://bugzilla.fieldtriptoolbox.org/show_bug.cgi?id=3062 > > The current issue is referenced here: > > http://bugzilla.fieldtriptoolbox.org/show_bug.cgi?id=3058 > > Best, > Jan-Mathijs > > > > > On Feb 19, 2016, at 6:17 PM, Valentina Mione > wrote: > > Hi everyone, > > I am Valentina and I am a fresh new FieldTrip user. > > I was following the tutorial > http://www.fieldtriptoolbox.org/tutorial/spike, in particular the cross > correlation part with the example data > ftp://ftp.fieldtriptoolbox.org/pub/fieldtrip/tutorial/spike/p029_sort_final_01.nex, > but I'm stuck with a MatLab error. > > I loaded the data exactly how it's explained and I defined the channels > and the trials (just copying the matlab instructions) and all worked fine. > > Then I followed this part of the tutorial: > > *and then compute the cross-correlogram (and the shift-predictor > cross-correlogram) by* > > cfg = []; > cfg.maxlag = 0.2; % maximum 200 ms > cfg.binsize = 0.001; % bins of 1 ms > cfg.outputunit = 'proportion'; % make unit area > cfg.latency = [-2.5 0]; > cfg.vartriallen = 'no'; % do not allow variable trial lengths > cfg.method = 'xcorr'; % compute the normal cross-correlogram > Xc = ft_spike_xcorr(cfg,spikeTrials); > > But after processing all the 600 trials the ft_spike_xcorr function > interrupts working with the error: > > "*??? Subscript indices must either be real positive integers > or logicals.* > > > *Error in ==> ft_spike_xcorr at 350 * > > *stat.label = spike.label(chansel);*" > > Trying to understand the error I set I breakpoint on the 350 line of the > script and I got another error in ft_checkconfig.m > > "*??? Error using ==> ft_checkconfig at 208* > > *The field cfg.progress is not allowed* > > *Error in ==> ft_spike_xcorr at 126* > > *cfg = ft_checkconfig(cfg, 'allowed', {'latency', 'trials',* > > *'keeptrials', 'method', 'channelcmb', 'vartriallen', 'debias',* > > *'maxlag', 'binsize', 'outputunit'});*" > > > I hope someone can help me because I really can't understand what's wrong > (I feel there is a problem with the selection of the channels maybe) and I > just followed the instructions. > > > Best, > > > Valentina > _______________________________________________ > 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 seymourr at aston.ac.uk Mon Feb 22 19:49:25 2016 From: seymourr at aston.ac.uk (Seymour, Robert (Research Student)) Date: Mon, 22 Feb 2016 18:49:25 +0000 Subject: [FieldTrip] Maxfilter SSS and TF-Plots Message-ID: Dear all, I've been trying out various cleaning parameters on Neuromag data and importing this into Fieldtrip. I've found that applying SSS to my data results in time-frequency plots with bands of activity at very specific frequencies. Image : http://i.imgur.com/QGma6qm.png. I do not believe it is anything to do with plotting because the lines disappear when I use tSSS with a .9 correlation. Has anybody else experienced this or hypothesise as to the cause of these artefacts? Many thanks, Robert Seymour (Aston Brain Centre) -------------- next part -------------- An HTML attachment was scrubbed... URL: From f.roux at bcbl.eu Mon Feb 22 20:03:50 2016 From: f.roux at bcbl.eu (=?utf-8?B?RnLDqWTDqXJpYw==?= Roux) Date: Mon, 22 Feb 2016 20:03:50 +0100 (CET) Subject: [FieldTrip] Maxfilter SSS and TF-Plots In-Reply-To: References: Message-ID: <1398179640.1569002.1456167830690.JavaMail.zimbra@bcbl.eu> Hi Robert, in your preprocessing, did you use: cfg.demean = 'yes'; If no then I suggest you take a look at this link: http://www.fieldtriptoolbox.org/faq/why_does_my_tfr_look_strange The stripe pattern could result from the DC-offset which gets removed when doing demeaning with the cfg-option. Try something like this before feeding data into ft_freqanalysis. cfg = []; cfg.detrending = 'yes'; cfg.demean = 'yes'; [data] = ft_preprocessing(cfg,data); Then use data with ft_freqanalysis. HTH Fred -- FR Legal disclaimer/Aviso legal/Lege-oharra: www.bcbl.eu/legal-disclaimer --------------------------------------------------------------------------- From: "Seymour, Robert (Research Student)" To: "fieldtrip_mailinglist" Sent: Monday, February 22, 2016 7:49:25 PM Subject: [FieldTrip] Maxfilter SSS and TF-Plots Dear all, I've been trying out various cleaning parameters on Neuromag data and importing this into Fieldtrip. I've found that applying SSS to my data results in time-frequency plots with bands of activity at very specific frequencies. Image : http://i.imgur.com/QGma6qm.png . I do not believe it is anything to do with plotting because the lines disappear when I use tSSS with a .9 correlation. Has anybody else experienced this or hypothesise as to the cause of these artefacts? Many thanks, Robert Seymour (Aston Brain Centre) _______________________________________________ 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 seymourr at aston.ac.uk Tue Feb 23 15:37:25 2016 From: seymourr at aston.ac.uk (Seymour, Robert (Research Student)) Date: Tue, 23 Feb 2016 14:37:25 +0000 Subject: [FieldTrip] Eletkta Neuromag data in Fieldtrip Message-ID: Thank you both so much - I definitely think that there are sources of (unknown) noise in my data, especially at lower frequencies, which Maxfilter is magically cleaning up (or "beautifying" might be a better term). I shall do some further investigations and report back! Robert -------------- next part -------------- An HTML attachment was scrubbed... URL: From seymourr at aston.ac.uk Tue Feb 23 15:45:45 2016 From: seymourr at aston.ac.uk (Seymour, Robert (Research Student)) Date: Tue, 23 Feb 2016 14:45:45 +0000 Subject: [FieldTrip] Maxfilter SSS and TF-Plots Message-ID: Thanks for the reply. I do generally have detrending and demeaning switched on during ft_preprocessing. I also tried ft_freqanalysis it with cfg.polyremoval = 1, but there were still horizontal stripes in my TF plots... :/ Robert -------------- next part -------------- An HTML attachment was scrubbed... URL: From j.herring at donders.ru.nl Wed Feb 24 10:32:17 2016 From: j.herring at donders.ru.nl (Herring, J.D. (Jim)) Date: Wed, 24 Feb 2016 09:32:17 +0000 Subject: [FieldTrip] Global field power In-Reply-To: References: Message-ID: <3D00B7615FB58D46A0B49B9AD67A33EB2AB20F0B@exprd01.hosting.ru.nl> Dear Irene, If your research question is whether there is a difference in global mean field power between conditions I would approach this in the same way as if you would want to investigate a difference in ERF/ERPs between conditions. You would therefore first calculate the time-locked averages for both conditions for each participant separately, as you did. The you would calculate the global mean field power using ft_globalmeanfield for both conditions, for each participant. If I’m not mistaken you can calculate the group average using ft_timelockgrandaverage. You could test the difference between conditions using dependent samples t-tests (perhaps cluster corrected over time) using ft_timelockstatistics. Best, Jim From: fieldtrip-bounces at science.ru.nl [mailto:fieldtrip-bounces at science.ru.nl] On Behalf Of Irene Sophia Mayer Sent: Sunday, February 21, 2016 1:15 PM To: fieldtrip at science.ru.nl Subject: [FieldTrip] Global field power Dear fieldtrippers, I want to compare the global field power in two different conditions over several participants. I have computed time-locked averages for both conditions for each participant separately. My first question now is, should I first compute a grand average over all participants and use ft_globalmeanfield on this or should I first compute global mean field for every participant and then average over them? Additionally, which functions should I use for those kinds of averaging? The second question would be, has anyone any recommendations for a statistical test I could use to see whether the conditions differ in global mean field power? Cheers, Irene -------------- next part -------------- An HTML attachment was scrubbed... URL: From Mary-Jo.Diepeveen at mpi.nl Wed Feb 24 11:01:04 2016 From: Mary-Jo.Diepeveen at mpi.nl (Diepeveen, Mary-Jo) Date: Wed, 24 Feb 2016 10:01:04 +0000 Subject: [FieldTrip] ft_timelockgrandaverage with trials Message-ID: <9AEBC8200222F443B6E297F0D479F1311C486C5A@UM-EXCDAG-A03.um.gwdg.de> Hello all, I have done an EEG study in which I have four conditions per subjects and two different subject groups. I would now like to compare the same condition between the two subject groups. To do this, I first tried ft_timelockanalysis with cfg.keeptrials=' yes' after which I tried to do ft_timelockgrandaverage. I get the following message: Warning depreciating trial field using the avg to compute the grand average (bug2372). After some googling I found an old post saying that ft_timelockgrandaverage does not support input data with "trial" field, meaning then that what I am trying to do is not possible. Trying to do the statistics after anyways also did not work because I need the .trial field. The post I found is however, from 2014 so I was wondering if this problem is fixed now. I have thought of my own way around this, but I was wondering if you maybe have any ideas too. Thanks! Mary-Jo -------------- next part -------------- An HTML attachment was scrubbed... URL: From stephen.politzer-ahles at ling-phil.ox.ac.uk Wed Feb 24 12:17:40 2016 From: stephen.politzer-ahles at ling-phil.ox.ac.uk (Stephen Politzer-Ahles) Date: Wed, 24 Feb 2016 11:17:40 +0000 Subject: [FieldTrip] fieldtrip Digest, Vol 63, Issue 26 In-Reply-To: References: Message-ID: Hi Mary-Jo, Are you sure you need individual trials? Normally, for a group-level comparison of means, the unit of observation would be the subject-wise averages, rather than all the trials; as far as I can think of, the only time you would want individual trials for timelock statistics would be if you are doing analysis on a single participants (like in the example at http://www.fieldtriptoolbox.org/tutorial/cluster_permutation_timelock#between-trials_experiments) or if you are computing event-related regression coefficients rather than event-related averages. Can you give more detail about what you're trying to do, what code you used to try running your statistics, and what error you got? Best, Steve --- Stephen Politzer-Ahles University of Oxford Language and Brain Lab Faculty of Linguistics, Phonetics & Philology http://users.ox.ac.uk/~cpgl0080/ > > Message: 4 > Date: Wed, 24 Feb 2016 10:01:04 +0000 > From: "Diepeveen, Mary-Jo" > To: "fieldtrip at science.ru.nl" > Subject: [FieldTrip] ft_timelockgrandaverage with trials > Message-ID: > <9AEBC8200222F443B6E297F0D479F1311C486C5A at UM-EXCDAG-A03.um.gwdg.de > > > Content-Type: text/plain; charset="us-ascii" > > Hello all, > > I have done an EEG study in which I have four conditions per subjects and > two different subject groups. I would now like to compare the same > condition between the two subject groups. To do this, I first tried > ft_timelockanalysis with cfg.keeptrials=' yes' after which I tried to do > ft_timelockgrandaverage. I get the following message: Warning depreciating > trial field using the avg to compute the grand average (bug2372). After > some googling I found an old post saying that ft_timelockgrandaverage does > not support input data with "trial" field, meaning then that what I am > trying to do is not possible. Trying to do the statistics after anyways > also did not work because I need the .trial field. The post I found is > however, from 2014 so I was wondering if this problem is fixed now. I have > thought of my own way around this, but I was wondering if you maybe have > any ideas too. > > Thanks! > > Mary-Jo > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From stephen.politzer-ahles at ling-phil.ox.ac.uk Wed Feb 24 12:18:57 2016 From: stephen.politzer-ahles at ling-phil.ox.ac.uk (Stephen Politzer-Ahles) Date: Wed, 24 Feb 2016 11:18:57 +0000 Subject: [FieldTrip] ft_timelockgrandaverage with trials Message-ID: Hi Mary-Jo, Are you sure you need individual trials? Normally, for a group-level comparison of means, the unit of observation would be the subject-wise averages, rather than all the trials; as far as I can think of, the only time you would want individual trials for timelock statistics would be if you are doing analysis on a single participants (like in the example at http://www.fieldtriptoolbox.org/tutorial/cluster_permutation_timelock#between-trials_experiments) or if you are computing event-related regression coefficients rather than event-related averages. Can you give more detail about what you're trying to do, what code you used to try running your statistics, and what error you got? Best, Steve --- Stephen Politzer-Ahles University of Oxford Language and Brain Lab Faculty of Linguistics, Phonetics & Philology http://users.ox.ac.uk/~cpgl0080/ > Message: 4 > Date: Wed, 24 Feb 2016 10:01:04 +0000 > From: "Diepeveen, Mary-Jo" > To: "fieldtrip at science.ru.nl" > Subject: [FieldTrip] ft_timelockgrandaverage with trials > Message-ID: > <9AEBC8200222F443B6E297F0D479F1311C486C5A at UM-EXCDAG-A03.um.gwdg.de > > > Content-Type: text/plain; charset="us-ascii" > > Hello all, > > I have done an EEG study in which I have four conditions per subjects and > two different subject groups. I would now like to compare the same > condition between the two subject groups. To do this, I first tried > ft_timelockanalysis with cfg.keeptrials=' yes' after which I tried to do > ft_timelockgrandaverage. I get the following message: Warning depreciating > trial field using the avg to compute the grand average (bug2372). After > some googling I found an old post saying that ft_timelockgrandaverage does > not support input data with "trial" field, meaning then that what I am > trying to do is not possible. Trying to do the statistics after anyways > also did not work because I need the .trial field. The post I found is > however, from 2014 so I was wondering if this problem is fixed now. I have > thought of my own way around this, but I was wondering if you maybe have > any ideas too. > > Thanks! > > Mary-Jo > -------------- next part -------------- An HTML attachment was scrubbed... URL: From david.meng at mq.edu.au Thu Feb 25 03:02:53 2016 From: david.meng at mq.edu.au (David Meng) Date: Thu, 25 Feb 2016 02:02:53 +0000 Subject: [FieldTrip] coherence estimation with "FT_FREQANALYSIS_MTMWELCH" Message-ID: Dear fieldtrippers, I just found a description page of the function "ft_freqanalysis_mtmwelch"(http://www.fieldtriptoolbox.org/reference/ft_freqanalysis_mtmwelch). Seems this function has been taken out of the package but as it is described on the webpage above, this Welch's overlapped averaged periodogram method can be implemented as: [freq] = ft_freqanalysis(cfg, data) by specifying 'cfg.method = mtmconvol' and use the options of this function to specify the length of the time windows, the amount of overlap, and the amount of spectral smoothing (in case of dpss tapers) per window. I have tried to implement this method as suggested, however in the field of the output "freq", the power spectrum and cross spectrum has a dimension as 'chan_freq_time' which means it didn't calculate the average value over all time windows. Would anyone suggest a way to enable the averaging? I have tried to average them manually but the topoplot from following 'ft_connectivityanalysis' could not be shown corrected. Best regards David -------------- next part -------------- An HTML attachment was scrubbed... URL: From lethuymy at live.com Thu Feb 25 15:43:47 2016 From: lethuymy at live.com (Thuy-My Le) Date: Thu, 25 Feb 2016 09:43:47 -0500 Subject: [FieldTrip] Out of Memory Issue Message-ID: Hello, I am new to fieldtrip. I was trying to go through the tutorial for preprocessing of continuous data into memory and am trying to run the following first few lines of code: >> cfg = []; cfg.dataset = 'subj2.vhdr'; data_org = ft_preprocessing(cfg) However I keep receiving this error: Error using fread Out of memory. Type HELP MEMORY for your options. Is this a version issue? I feel that my computer should have enough memory/RAM. I have downloaded fieldtrip-20160214. I also have MATLAB R2015a. Thank you for you help. Best, Thuy-My Le -------------- next part -------------- An HTML attachment was scrubbed... URL: From guiraudh at gmail.com Thu Feb 25 16:30:08 2016 From: guiraudh at gmail.com (=?UTF-8?B?SMOpbMOobmUgR3VpcmF1ZA==?=) Date: Thu, 25 Feb 2016 10:30:08 -0500 Subject: [FieldTrip] Brain Atlas for ROI in children. Message-ID: Dear community, I'm working on speech rhythm perception in children using MEG and I'd like to realize a ROI analysis. I use the template for children from the McConnell Brain Imagery Centre for my source analysis. I'd like to know if there is an atlas of different cortical regions in children that I could use? Thank you. Helene Guiraud -------------- next part -------------- An HTML attachment was scrubbed... URL: From azeez.adebimpe5 at gmail.com Thu Feb 25 16:35:47 2016 From: azeez.adebimpe5 at gmail.com (Azeez Adebimpe) Date: Thu, 25 Feb 2016 16:35:47 +0100 Subject: [FieldTrip] Brain Atlas for ROI in children. In-Reply-To: References: Message-ID: HI Helene, You can check this link for list of atlases from infant to adult https://sites.google.com/site/chuanglab/atlas Best, Azeez On Thu, Feb 25, 2016 at 4:30 PM, Hélène Guiraud wrote: > Dear community, > > I'm working on speech rhythm perception in children using MEG and I'd like > to realize a ROI analysis. > I use the template for children from the McConnell Brain Imagery Centre > for my source analysis. > I'd like to know if there is an atlas of different cortical regions in > children that I could use? > > Thank you. > > Helene Guiraud > > _______________________________________________ > 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 guiraudh at gmail.com Thu Feb 25 18:11:33 2016 From: guiraudh at gmail.com (=?UTF-8?B?SMOpbMOobmUgR3VpcmF1ZA==?=) Date: Thu, 25 Feb 2016 12:11:33 -0500 Subject: [FieldTrip] Brain Atlas for ROI in children. In-Reply-To: References: Message-ID: Hi Azeez, Thank you for your answer! Best, Hélène 2016-02-25 10:35 GMT-05:00 Azeez Adebimpe : > HI Helene, > > You can check this link for list of atlases from infant to adult > > https://sites.google.com/site/chuanglab/atlas > > Best, > > Azeez > > On Thu, Feb 25, 2016 at 4:30 PM, Hélène Guiraud > wrote: > >> Dear community, >> >> I'm working on speech rhythm perception in children using MEG and I'd >> like to realize a ROI analysis. >> I use the template for children from the McConnell Brain Imagery Centre >> for my source analysis. >> I'd like to know if there is an atlas of different cortical regions in >> children that I could use? >> >> Thank you. >> >> Helene Guiraud >> >> _______________________________________________ >> 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 vanwijk.bernadette at gmail.com Thu Feb 25 19:30:25 2016 From: vanwijk.bernadette at gmail.com (Bernadette van Wijk) Date: Thu, 25 Feb 2016 18:30:25 +0000 Subject: [FieldTrip] SPM course for MEG/EEG in London: May 16-18 Message-ID: Dear all, We are pleased to announce that our annual *SPM course for MEG/EEG* will take place this year from *Monday May 16 to Wednesday May 18 2016*. Hosted by University College London, the course will be held at Queen Square, a very central location in London (UK). The course will present instruction on the analysis of MEG and EEG data. The first two days will combine theoretical presentations with practical demonstrations of the different data analysis methods implemented in SPM. On the last day participants will have the opportunity to work on SPM tutorial data sets under the supervision of the course faculty. We also invite students to bring their own data for analysis. The course is suitable for both beginners and more advanced users. The topics that will be covered range from pre-processing and statistical analysis to source localization and dynamic causal modelling. The program is listed below. Registration is now open. We offer a reduced rate when attending both the MEG/EEG course and the fMRI course during the second half of the week. For full details of both courses see http://www.fil.ion.ucl.ac.uk/spm/course/london/ where you can also register. Available places are limited so please register as early as possible if you would like to attend! *Monday May 16th* 9.00 - 9.30 Registration 9.30 - 9.45 SPM introduction and resources *Vladimir Litvak * 9.45 - 10.30 What are we measuring with M/EEG? *Saskia Helbling* 10.30 - 11.15 Data pre-processing *Holly Rossiter* *Coffee* 11.45 - 12.30 Data pre-processing - demo *Deborah Talmi * 12.30 - 13.15 General linear model and classical inference *Sven Bestmann* *Lunch* 14.15 - 15.00 Multiple comparisons problem and solutions *Gareth Barnes* 15.00 - 15.45 Bayesian inference *Jean Daunizeau* *Coffee* 16.15 - 17.45 Group M/EEG dataset analysis - demo *Vladimir Litvak / Jason Taylor* 17.45 - 18.30 Advanced applications of the GLM *Bernhard Spitzer* *Tuesday May 17th* 9.30 - 10.15 M/EEG source analysis *Jérémie Mattout* 10.15 - 11.15 M/EEG source analysis - demo *Jose Lopez / Sofie Meyer* *Coffee* 11.45 - 12.30 Principles of dynamic causal modelling *Bernadette van Wijk* 12.30 - 13.15 DCM for evoked responses *Ryszard Auksztulewicz* *Lunch* 14.15 - 15.00 DCM for steady state responses *Rosalyn Moran* 15.00 - 15.45 DCM - demo *Martin Dietz / Andre Marreiros* *Coffee* 16.15 - 17.00 Bayesian model selection and averaging *Peter Zeidman* 17.00 - 18.30 Clinic - questions & answers *Karl Friston* 19.00 - ... Social Event *Wednesday May 18th* 9.30 - 17.00 Practical hands-on session in UCL computer class rooms. Participants can either work on SPM tutorial datasets or on their own data with the help of the faculty. There will also be an opportunity to ask questions in small tutorial groups for further discussions on the topics of the lectures. -------------- next part -------------- An HTML attachment was scrubbed... URL: From jbtrimper at gmail.com Thu Feb 25 23:12:26 2016 From: jbtrimper at gmail.com (John Trimper) Date: Thu, 25 Feb 2016 17:12:26 -0500 Subject: [FieldTrip] Can I declare directional dependencies amongst variables before calculating MVAR model? Message-ID: Hello, My name is John and I am a graduate student currently using a multivariate auto-regressive (MVAR) approach to analyze in vivo electrophysiological data which I recorded simultaneously from four subregions of a larger brain system. The goal of this set of analyses is to ask which of the subregions might be Granger-causing oscillations in specific frequency bands in the other subregions. In short, my question is: With fieldtrip specifically, and the MVAR approach in general, is it possible to declare the dependencies in my data before constructing the MVAR model, and have that information constrain the coefficient calculation? To elaborate, imagine the four brain regions I recorded from (A, B, C, & D) are connected unidirectionally, such that A projects to B projects to C projects to D (A->B->C->D). Using MVAR as I have been, my model will find coefficients for each of the four variables regressed on each of the other four variables. Is it possible for me to declare the dependencies before hand, such that when I build a model for B, I exclude C and D, only calculating coefficients for A and B, but when I build a model for D, I calculate coefficients for A, B, C, & D? Perhaps I have no choice but to calculate the models separately, but moreover, is it possible to declare that the brain regions are in series (unidirectionally projecting)? Thank you for everyone's time. I apologize if I violated any rules of the community forum or if this is a variant of a previous question. I couldn't find any question similar to this one, and this question is my first to the forum. Much obliged, John __________________________________________ This e-mail message (including any attachments) is for the sole use of the intended recipient(s) and may contain confidential and privileged information. If the reader of this message is not the intended recipient, you are hereby notified that any dissemination, distribution or copying of this message (including any attachments) is strictly prohibited. If you have received this message in error, please contact the sender by reply e-mail message and destroy all copies of the original message (including attachments). -------------- next part -------------- An HTML attachment was scrubbed... URL: From stephen.politzer-ahles at ling-phil.ox.ac.uk Fri Feb 26 12:16:41 2016 From: stephen.politzer-ahles at ling-phil.ox.ac.uk (Stephen Politzer-Ahles) Date: Fri, 26 Feb 2016 11:16:41 +0000 Subject: [FieldTrip] Out of Memory Issue Message-ID: Hello Thuy-My, The dataset loads fine for me with fieldtrip-20150113 in MATLAB 2015a on 64-bit Windows 7 with 8GB RAM. I suspect that the out of memory error is more likely to be related to your computer's power than to the fieldtrip version (these errors are quite common in MATLAB) but you can try running an older version of fieldtrip and/or try this analysis on a different computer to try to diagnose the problem. Best, Steve --- Stephen Politzer-Ahles University of Oxford Language and Brain Lab Faculty of Linguistics, Phonetics & Philology http://users.ox.ac.uk/~cpgl0080/ ---------------------------------------------------------------------- > > Message: 1 > Date: Thu, 25 Feb 2016 09:43:47 -0500 > From: Thuy-My Le > To: "fieldtrip at science.ru.nl" > Subject: [FieldTrip] Out of Memory Issue > Message-ID: > Content-Type: text/plain; charset="iso-8859-1" > > Hello, > > I am new to fieldtrip. I was trying to go through the tutorial for > preprocessing of continuous data into memory and am trying to run the > following first few lines of code: > > >> cfg = []; > cfg.dataset = 'subj2.vhdr'; > data_org = ft_preprocessing(cfg) > > However I keep receiving this error: > > Error using fread > Out of memory. Type HELP MEMORY for your options. > > Is this a version issue? I feel that my computer should have enough > memory/RAM. I have downloaded fieldtrip-20160214. I also have MATLAB R2015a. > > Thank you for you help. > > Best, > Thuy-My Le > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From lethuymy at live.com Fri Feb 26 13:44:54 2016 From: lethuymy at live.com (Thuy-My Le) Date: Fri, 26 Feb 2016 07:44:54 -0500 Subject: [FieldTrip] Out of Memory Issue Message-ID: Great thanks. Sent from my Verizon Wireless 4G LTE smartphone -------- Original message -------- From: Stephen Politzer-Ahles Date: 2016/02/26 06:23 (GMT-05:00) To: fieldtrip at science.ru.nl Subject: Re: [FieldTrip] Out of Memory Issue Hello Thuy-My, The dataset loads fine for me with fieldtrip-20150113 in MATLAB 2015a on 64-bit Windows 7 with 8GB RAM. I suspect that the out of memory error is more likely to be related to your computer's power than to the fieldtrip version (these errors are quite common in MATLAB) but you can try running an older version of fieldtrip and/or try this analysis on a different computer to try to diagnose the problem. Best, Steve --- Stephen Politzer-Ahles University of Oxford Language and Brain Lab Faculty of Linguistics, Phonetics & Philology http://users.ox.ac.uk/~cpgl0080/ ---------------------------------------------------------------------- > > Message: 1 > Date: Thu, 25 Feb 2016 09:43:47 -0500 > From: Thuy-My Le > To: "fieldtrip at science.ru.nl" > Subject: [FieldTrip] Out of Memory Issue > Message-ID: > Content-Type: text/plain; charset="iso-8859-1" > > Hello, > > I am new to fieldtrip. I was trying to go through the tutorial for > preprocessing of continuous data into memory and am trying to run the > following first few lines of code: > > >> cfg = []; > cfg.dataset = 'subj2.vhdr'; > data_org = ft_preprocessing(cfg) > > However I keep receiving this error: > > Error using fread > Out of memory. Type HELP MEMORY for your options. > > Is this a version issue? I feel that my computer should have enough > memory/RAM. I have downloaded fieldtrip-20160214. I also have MATLAB R2015a. > > Thank you for you help. > > Best, > Thuy-My Le > > -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip From helen.wieffering at gmail.com Mon Feb 29 01:26:25 2016 From: helen.wieffering at gmail.com (Helen Wieffering) Date: Sun, 28 Feb 2016 19:26:25 -0500 Subject: [FieldTrip] Granger Causality statistics and group analysis Message-ID: Dear Jörn, I recently re-read your 2015 paper on Directed Communication between Nucleus Accumbens and Neocortex in Humans. I am taking a similar approach with my data, looking at non-parametric Granger Causality as computed through FieldTrip. I believe you pointed me to this paper in a response to one of my FieldTrip e-mails a few months back, and it has proven very helpful! If it's not too much trouble, I now wonder if you could provide any further detail on how you computed p-value statistics from each subject's Granger spectrum. As far as I can tell, Fieldtrip's statistical packages are very limited / nonexistent when it comes to connectivity data. In your paper you mentioned obtaining one Granger estimate for each direction - could you explain how you did this, and whether you performed this statistical analysis in Fieldtrip? Any advice is much appreciated! Thank you, Helen -------------- next part -------------- An HTML attachment was scrubbed... URL: From runna90 at 126.com Mon Feb 29 10:15:59 2016 From: runna90 at 126.com (CRN) Date: Mon, 29 Feb 2016 17:15:59 +0800 Subject: [FieldTrip] How to use ft_megrealign before grand average Message-ID: Dear all, My name is Runnan Cao and I am pursuing PhD degree in ShengHe lab in Beijing on vision and cognition science. Currently I am analyzing the MEG data of my project, which were acquired by CTF-275 system. I tried to compute average ERF across several subjects but I had trouble in using ft_megrealign before using ft_timelockgrandaverage. The configuration, cfg.template is required when you apply ft_megrealign function. But I am not clear about how to get that template and what kind of information should be contained in it. If I want to constructed the template by averaging the gradiometer positions over multiple datasets, which function should be applied? If it is not too trouble, could anyone provide an example script showing the detail of applying the ft_megrealign function. Thank you very much and I looking forward to your help any minute. Best wishes, Runnan runna90 at 126.com Institute of Biophysics, Chinese Academy of Science, Beijing, China -------------- next part -------------- An HTML attachment was scrubbed... URL: From antonietta.sorriso at uniparthenope.it Mon Feb 29 10:31:36 2016 From: antonietta.sorriso at uniparthenope.it (Antonietta Sorriso) Date: Mon, 29 Feb 2016 10:31:36 +0100 Subject: [FieldTrip] Time series of sources activation by using LCMV Beamformer Message-ID: <20160229103136.Horde.2LfnDxUE5kiNT7pipIE8hQ3@webmail.uniparthenope.it> Hello, I am using fieltrip in order to obtain source reconstruction from MEG data. I succesfully implemented a code that exploit the function ft_sourceanalysis for performing beamformer. Unfortunately I was not able to obtain the output I need, i.e. the time series of sources activation. In particular I only was able to achieve the mean activation value for each source, divided for frequency bands or not, but I found no way for computing the activation intensity of each source for each time sample. Is it possible to achieve such goal via fieldtrip? If yes, which function and which input parameters should I exploit? Thanks and best regards -- Antonietta Sorriso ​Ph.D. Student ​Dipartimento di Ingegneria ​Laboratorio di TLC ed Elaborazione Segnali ed Immagini ​Centro Direzionale di Napoli, Isola C4, Stanze 326-327, lato Sud, piano 3 ​80143, Napoli, Italia e-mail: antonietta.sorriso at uniparthenope.it From jorn at artinis.com Mon Feb 29 13:21:10 2016 From: jorn at artinis.com (=?UTF-8?Q?J=C3=B6rn_M._Horschig?=) Date: Mon, 29 Feb 2016 13:21:10 +0100 Subject: [FieldTrip] Granger Causality statistics and group analysis In-Reply-To: References: Message-ID: <003a01d172eb$acfeb630$06fc2290$@artinis.com> Dear Helen, Great to hear that you liked the paper! When computing Granger causality you get by default two values, x->y and y->x. I am not sure what more to say to answer your question, so here’s a slightly more detailed response on what we did to the data ;) We did statistics in a two step procedure. First, identifying regions of interest using a surrogate distribution and a permutation test on the z-transformed coherence metric. Second, computing the Granger causality metric and performing an ANOVA (after log-transforming the Granger values to make them satisfy the normality requirement). For both steps, I used FieldTrip functions only for computing the connectivity metric (ordinary coherence, and Granger causality, respectively). Everything else is something I am afraid you will have to do manually (but you can grab some bits and pieces of existing FT functions). I do not have access to my old drive at the Donders Institute anymore, so I cannot send you the code, but I am confident that you can manage to re-code this :) If you get stuck, however, feel free to let me know and I can give you a hand. With best regards, Jörn -- Jörn M. Horschig, PhD, Software Engineer Artinis Medical Systems | +31 481 350 980 From: Helen Wieffering [mailto:helen.wieffering at gmail.com] Sent: Monday, February 29, 2016 1:26 To: FieldTrip discussion list ; jorn at artinis.com Subject: Granger Causality statistics and group analysis Dear Jörn, I recently re-read your 2015 paper on Directed Communication between Nucleus Accumbens and Neocortex in Humans. I am taking a similar approach with my data, looking at non-parametric Granger Causality as computed through FieldTrip. I believe you pointed me to this paper in a response to one of my FieldTrip e-mails a few months back, and it has proven very helpful! If it's not too much trouble, I now wonder if you could provide any further detail on how you computed p-value statistics from each subject's Granger spectrum. As far as I can tell, Fieldtrip's statistical packages are very limited / nonexistent when it comes to connectivity data. In your paper you mentioned obtaining one Granger estimate for each direction - could you explain how you did this, and whether you performed this statistical analysis in Fieldtrip? Any advice is much appreciated! Thank you, Helen -------------- next part -------------- An HTML attachment was scrubbed... URL: From sreenivasan.r.nadar at gmail.com Mon Feb 29 13:57:14 2016 From: sreenivasan.r.nadar at gmail.com (Sreenivasan R. Nadar, Ph.D.) Date: Mon, 29 Feb 2016 07:57:14 -0500 Subject: [FieldTrip] Time series of sources activation by using LCMV Beamformer In-Reply-To: <20160229103136.Horde.2LfnDxUE5kiNT7pipIE8hQ3@webmail.uniparthenope.it> References: <20160229103136.Horde.2LfnDxUE5kiNT7pipIE8hQ3@webmail.uniparthenope.it> Message-ID: Hello Antonietta, Please find the following link for extracting source time series: http://www.fieldtriptoolbox.org/tutorial/connectivity Vasan On Mon, Feb 29, 2016 at 4:31 AM, Antonietta Sorriso < antonietta.sorriso at uniparthenope.it> wrote: > > Hello, > I am using fieltrip in order to obtain source reconstruction from MEG data. > I succesfully implemented a code that exploit the function > ft_sourceanalysis > for performing beamformer. Unfortunately I was not able to obtain the > output > I need, i.e. the time series of sources activation. In particular I only > was > able to achieve the mean activation value for each source, divided for > frequency bands or not, but I found no way for computing the activation > intensity of each source for each time sample. Is it possible to achieve > such goal via fieldtrip? If yes, which function and which input parameters > should I exploit? > > Thanks and best regards > -- > Antonietta Sorriso > > ​Ph.D. Student > ​Dipartimento di Ingegneria > ​Laboratorio di TLC ed Elaborazione Segnali ed Immagini > ​Centro Direzionale di Napoli, Isola C4, Stanze 326-327, lato Sud, piano 3 > ​80143, Napoli, Italia > e-mail: antonietta.sorriso at uniparthenope.it > > _______________________________________________ > 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 stan.vanpelt at donders.ru.nl Mon Feb 29 14:47:24 2016 From: stan.vanpelt at donders.ru.nl (Pelt, S. van (Stan)) Date: Mon, 29 Feb 2016 13:47:24 +0000 Subject: [FieldTrip] Time series of sources activation by using LCMV Beamformer In-Reply-To: References: <20160229103136.Horde.2LfnDxUE5kiNT7pipIE8hQ3@webmail.uniparthenope.it> Message-ID: <7CCA2706D7A4DA45931A892DF3C2894C2D375D2F@exprd03.hosting.ru.nl> Dear Antonietta, In addition to the tutorial Vasan is referring to (where you can find the relevant information under the paragraph “Connectivity between MEG virtual channel and EMG”), there is also a dedicated tutorial for your question: http://www.fieldtriptoolbox.org/tutorial/shared/virtual_sensors Best, Stan -- Stan van Pelt, PhD Donders Institute for Brain, Cognition and Behaviour Radboud University Montessorilaan 3, B.01.34 6525 HR Nijmegen, the Netherlands tel: +31 24 3616288 From: fieldtrip-bounces at science.ru.nl [mailto:fieldtrip-bounces at science.ru.nl] On Behalf Of Sreenivasan R. Nadar, Ph.D. Sent: maandag 29 februari 2016 13:57 To: FieldTrip discussion list Subject: Re: [FieldTrip] Time series of sources activation by using LCMV Beamformer Hello Antonietta, Please find the following link for extracting source time series: http://www.fieldtriptoolbox.org/tutorial/connectivity Vasan On Mon, Feb 29, 2016 at 4:31 AM, Antonietta Sorriso > wrote: Hello, I am using fieltrip in order to obtain source reconstruction from MEG data. I succesfully implemented a code that exploit the function ft_sourceanalysis for performing beamformer. Unfortunately I was not able to obtain the output I need, i.e. the time series of sources activation. In particular I only was able to achieve the mean activation value for each source, divided for frequency bands or not, but I found no way for computing the activation intensity of each source for each time sample. Is it possible to achieve such goal via fieldtrip? If yes, which function and which input parameters should I exploit? Thanks and best regards -- Antonietta Sorriso ​Ph.D. Student ​Dipartimento di Ingegneria ​Laboratorio di TLC ed Elaborazione Segnali ed Immagini ​Centro Direzionale di Napoli, Isola C4, Stanze 326-327, lato Sud, piano 3 ​80143, Napoli, Italia e-mail: antonietta.sorriso at uniparthenope.it _______________________________________________ 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 nwolpert at uni-osnabrueck.de Mon Feb 29 16:18:25 2016 From: nwolpert at uni-osnabrueck.de (nwolpert at uni-osnabrueck.de) Date: Mon, 29 Feb 2016 16:18:25 +0100 (CET) Subject: [FieldTrip] ft_sourceplot on surface Message-ID: <49679.82.226.247.249.1456759105.squirrel@myuos.uni-osnabrueck.de> Dear fieldtrip users, I have an issue when visualizing beamformed data: When using 'ft_sourceplot' to show the interpolated data on slices in the three planes (cfg.method = 'ortho'), reasonable results are produced. However, when doing surface plots by calling cfg.method = 'surface', the power is projected only to a subset of the brain, with very abrupt borders and zero power everywhere else. It gives the impression that there is some kind of scaling problem (i.e. the surface template used has the wrong scale), but I can't figure out the cause for this problem. I would be glad if anyone has a possible explanation. I attach the code below that produced the figures. Best, Nicolai Wolpert cfg = []; cfg.method = 'dics'; cfg.grid = grid; cfg.headmodel = headmodel; cfg.dics.projectnoise = 'yes'; cfg.dics.lambda = 0; sourceAlpha_dics = ft_sourceanalysis(cfg, freq_alpha); % remove center of head bias by using the neural activity index (NAI) sourceAlpha_dics.avg.pow = sourceAlpha_dics.avg.pow ./ sourceAlpha_dics.avg.noise; % reslice mri mri_real_resliced = ft_volumereslice([], mri_real); % Interpolation: Project computed sources on aligned template MRI brain cfg = []; cfg.downsample = 2; cfg.parameter = 'avg.pow'; sourceAlpha_dics_intp = ft_sourceinterpolate(cfg, sourceAlpha_dics , mri_real_resliced); % visualize the result cfg = []; cfg.method = 'surface'; cfg.funparameter = 'avg.pow'; ft_sourceplot(cfg, sourceAlpha_dics_intp); From azeez.adebimpe5 at gmail.com Mon Feb 29 16:28:09 2016 From: azeez.adebimpe5 at gmail.com (Azeez Adebimpe) Date: Mon, 29 Feb 2016 16:28:09 +0100 Subject: [FieldTrip] ft_sourceplot on surface In-Reply-To: <49679.82.226.247.249.1456759105.squirrel@myuos.uni-osnabrueck.de> References: <49679.82.226.247.249.1456759105.squirrel@myuos.uni-osnabrueck.de> Message-ID: it would be nice if you can post the pics that would give much much info On Mon, Feb 29, 2016 at 4:18 PM, wrote: > Dear fieldtrip users, > > I have an issue when visualizing beamformed data: When using > 'ft_sourceplot' to show the interpolated data on slices in the three > planes (cfg.method = 'ortho'), reasonable results are produced. However, > when doing surface plots by calling cfg.method = 'surface', the power is > projected only to a subset of the brain, with very abrupt borders and zero > power everywhere else. It gives the impression that there is some kind of > scaling problem (i.e. the surface template used has the wrong scale), but > I can't figure out the cause for this problem. > > I would be glad if anyone has a possible explanation. I attach the code > below that produced the figures. > > Best, > Nicolai Wolpert > > cfg = []; > cfg.method = 'dics'; > cfg.grid = grid; > cfg.headmodel = headmodel; > cfg.dics.projectnoise = 'yes'; > cfg.dics.lambda = 0; > sourceAlpha_dics = ft_sourceanalysis(cfg, freq_alpha); > > % remove center of head bias by using the neural activity index (NAI) > sourceAlpha_dics.avg.pow = sourceAlpha_dics.avg.pow ./ > sourceAlpha_dics.avg.noise; > > % reslice mri > mri_real_resliced = ft_volumereslice([], mri_real); > > % Interpolation: Project computed sources on aligned template MRI brain > cfg = []; > cfg.downsample = 2; > cfg.parameter = 'avg.pow'; > sourceAlpha_dics_intp = ft_sourceinterpolate(cfg, sourceAlpha_dics , > mri_real_resliced); > > % visualize the result > cfg = []; > cfg.method = 'surface'; > cfg.funparameter = 'avg.pow'; > ft_sourceplot(cfg, sourceAlpha_dics_intp); > > > _______________________________________________ > 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 nicholas.balderston at nih.gov Mon Feb 29 16:48:29 2016 From: nicholas.balderston at nih.gov (Balderston, Nicholas (NIH/NIMH) [F]) Date: Mon, 29 Feb 2016 15:48:29 +0000 Subject: [FieldTrip] Time series of sources activation by using LCMV Beamformer In-Reply-To: <7CCA2706D7A4DA45931A892DF3C2894C2D375D2F@exprd03.hosting.ru.nl> References: <20160229103136.Horde.2LfnDxUE5kiNT7pipIE8hQ3@webmail.uniparthenope.it> , <7CCA2706D7A4DA45931A892DF3C2894C2D375D2F@exprd03.hosting.ru.nl> Message-ID: Hi Antonietta, I'm pretty new to fieldtrip, but I was able to do something similar by doing the following: 1) conducting the timelocked analysis 2) computing the lcmv for all trials 3) extracting the common filter 4) multiplying the common filter by the sensor timecourses I haven't really figured out how to plot these timecourses just yet, but it's a work in progress. Here's the code I used, hope it helps. % 1) conducting the timelocked analysis disp('################################timelocked') cfg = []; cfg.vartrllength = 2; cfg.covariance = 'yes'; cfg.covariancewindow = 'prestim'; cfg.keeptrials = 'yes'; cfg.channel = 'MEG'; cfg.inputfile = strcat(subject, '.alltrials.clean.mat'); cfg.outputfile = strcat(subject, '.alltrials.clean.timelocked.mat'); timelocked = ft_timelockanalysis(cfg); % 2) computing the lcmv for all trials disp('################################create lcmv filter') cfg = []; cfg.method = 'lcmv'; cfg.grid = leadfield_ctf; cfg.vol = vol_ctf; cfg.grad = grad; cfg.channel = 'MEG'; cfg.lambda = '5%'; cfg.lcmv.fixedori = 'yes'; cfg.keepfilter = 'yes'; cfg.outputfile = strcat(subject, '.alltrials.clean.beamformer.filter.mat'); beamformer_avg = ft_sourceanalysis(cfg, timelocked); % 3) extracting the common filter disp('################################create extract common filter') commonfilter = cell2mat(beamformer_avg.avg.filter); beamformer_virt = []; beamformer_virt.fsample = data.fsample; beamformer_virt.trial = []; beamformer_virt.time = time; beamformer_virt.trialinfo = timelocked.trialinfo; beamformer_virt.dimord = timelocked.dimord; % 4) multiplying the common filter by the sensor timecourses disp('################################create source timecourse') for i=1:size(timelocked.trial,1) disp(strcat('################################computing timecourse for trial: ', int2str(i))); beamformer_virt.trial{i} = commonfilter*squeeze(timelocked.trial(i,:,:)); end -nick ________________________________ From: Pelt, S. van (Stan) [stan.vanpelt at donders.ru.nl] Sent: Monday, February 29, 2016 8:47 AM To: FieldTrip discussion list Subject: Re: [FieldTrip] Time series of sources activation by using LCMV Beamformer Dear Antonietta, In addition to the tutorial Vasan is referring to (where you can find the relevant information under the paragraph “Connectivity between MEG virtual channel and EMG”), there is also a dedicated tutorial for your question: http://www.fieldtriptoolbox.org/tutorial/shared/virtual_sensors Best, Stan -- Stan van Pelt, PhD Donders Institute for Brain, Cognition and Behaviour Radboud University Montessorilaan 3, B.01.34 6525 HR Nijmegen, the Netherlands tel: +31 24 3616288 From: fieldtrip-bounces at science.ru.nl [mailto:fieldtrip-bounces at science.ru.nl] On Behalf Of Sreenivasan R. Nadar, Ph.D. Sent: maandag 29 februari 2016 13:57 To: FieldTrip discussion list Subject: Re: [FieldTrip] Time series of sources activation by using LCMV Beamformer Hello Antonietta, Please find the following link for extracting source time series: http://www.fieldtriptoolbox.org/tutorial/connectivity Vasan On Mon, Feb 29, 2016 at 4:31 AM, Antonietta Sorriso > wrote: Hello, I am using fieltrip in order to obtain source reconstruction from MEG data. I succesfully implemented a code that exploit the function ft_sourceanalysis for performing beamformer. Unfortunately I was not able to obtain the output I need, i.e. the time series of sources activation. In particular I only was able to achieve the mean activation value for each source, divided for frequency bands or not, but I found no way for computing the activation intensity of each source for each time sample. Is it possible to achieve such goal via fieldtrip? If yes, which function and which input parameters should I exploit? Thanks and best regards -- Antonietta Sorriso ​Ph.D. Student ​Dipartimento di Ingegneria ​Laboratorio di TLC ed Elaborazione Segnali ed Immagini ​Centro Direzionale di Napoli, Isola C4, Stanze 326-327, lato Sud, piano 3 ​80143, Napoli, Italia e-mail: antonietta.sorriso at uniparthenope.it _______________________________________________ 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 kajal5888 at yahoo.co.in Mon Feb 29 21:11:58 2016 From: kajal5888 at yahoo.co.in (D I L J I T) Date: Mon, 29 Feb 2016 20:11:58 +0000 (UTC) Subject: [FieldTrip] How to plot sourcedata at the cortical surface References: <347287188.845797.1456776718141.JavaMail.yahoo.ref@mail.yahoo.com> Message-ID: <347287188.845797.1456776718141.JavaMail.yahoo@mail.yahoo.com> Hi All, We have done the MEG source analysis using fieltrip. We want to plot the the source data at the surface. We want to have the individual surface. Can anyone please guide us how to prepare them(i.e. surface_white_both.mat etc).Thanks alot in advance,Warm RegardsDJ  Diljit Singh Kajal ------------------------------------ Ph.D Research Scholar, International Max Planck Research School, Graduate Training Centre for Neuroscience, Institute for Medical Psychology & Behavioural Neurobiology, MEG Centre, Room number 202, Otfried-Müller-Str. 47, University of Tübingen, Tübingen-72076, Germany. +49-176-88262138(M), +49-7071-2981196(O) -------------- next part -------------- An HTML attachment was scrubbed... URL: From Elana.Harris at cchmc.org Mon Feb 29 21:20:17 2016 From: Elana.Harris at cchmc.org (Harris, Elana) Date: Mon, 29 Feb 2016 20:20:17 +0000 Subject: [FieldTrip] MEG sensors statistics Message-ID: Dear All, I have the minimum, maximum and mean alpha power for each MEG sensor (found using MEGProcessor developed by Jing Xiang, MD, PhD) for 16 subjects, 8 of whom have a psychiatric condition and 8 are healthy comparison subjects. We find statistical significance when comparing the set all of the MLF or MRO sensors, for instance, between the groups (healthy and pathological), however, I am wondering if this is false statistical power as all of the sensors likely represent once source generator and not truly, multiple, separate, non-independent recordings. Would it be best to summarize each subject’s data with one number to represent the maximum alpha power for the group of MLF sensors and then compare the two groups of subjects? I welcome your advice. Thank you. Elana Elana Harris, MD, PhD Assistant Professor Division of Child & Adolescent Psychiatry Cincinnati Children’s Hospital Medical Center -------------- next part -------------- An HTML attachment was scrubbed... URL: From jan.schnupp at dpag.ox.ac.uk Mon Feb 1 11:24:47 2016 From: jan.schnupp at dpag.ox.ac.uk (Jan Schnupp) Date: Mon, 1 Feb 2016 10:24:47 +0000 Subject: [FieldTrip] Postdoc and PhD opportunities in Auditory Neuroscience in Hong Kong Message-ID: One postdoctoral position and two PhD graduate studentships in auditory neuroscience are available from June 2016 in a new research group set up by Prof. Jan Schnupp at the City University of Hong Kong. Our lab will use electrophysiological and psychoacoustic techniques to study neural mechanisms of auditory perception in humans and rats. Experiments studying plastic changes in the central auditory pathway following cochlear implant stimulation are also planned. Hong Kong is an exceptionally vibrant and exciting place to live and work. Key techniques in our research include the digital processing of electrophysiological and acoustic signals, as well as automating the behavioral psychoacoustic testing of experimental animals. We are therefore particularly interested in candidates with a background, or at least an interest, in computer programming, computational and or statistical modelling, and perhaps a little electronics. Experience in animal handling, small animal surgery and electrophysiological recordings would also be desirable. Interested parties please contact jan_hk at schnupp.net -- Prof Jan Schnupp University of Oxford Dept. of Physiology, Anatomy and Genetics Sherrington Building - Parks Road Oxford OX1 3PT - UK +44-1865-282012 http://jan.schnupp.net -------------- next part -------------- An HTML attachment was scrubbed... URL: From johannes.tuennerhoff at hotmail.com Mon Feb 1 11:33:26 2016 From: johannes.tuennerhoff at hotmail.com (Johannes Tuennerhoff) Date: Mon, 1 Feb 2016 11:33:26 +0100 Subject: [FieldTrip] between group statistics of coherence Message-ID: Dear Eric, dear other experts, We conduct a study that involves corticomuscular coherence analyses and I am still a bit new to the field. Even though I read several papers and searched the fieldtrip mailing list, I am still not sure how to do the statistical testing correctly. I read your message "coherence and group analysis" from April 21 2015 with great interest and I was hoping you could maybe give me some advice. There are two groups and each group has the same condition (a motor movement task). I have the coherence spectra for the range 5-55Hz (binned at 0.3Hz) of an EEG signal x and an EMG signal y in 24 healthy controls and 19 patients and I would like to test if there is a significant difference between the two groups. The coherence of the individual subjects was computed from around 120 segments of each 3s. Specifically I have the following questions: 1. Can I use the fieldtrip function ft_freqstatistics to calculate Monte-Carlo estimates of the significance probabilities and setting cfg.statistic = 'indepsamplesT' using the coherence spectra as data? Or would I need to do a manual z-transformation like z1=atanh(Coh)-1/(dof1-2) beforehand? If I understood it right cant use cfg.statistic = 'indepsamplesZcoh' because it is just meant for within subject designs. Would I need to take tapers and segments into account for the degrees of freedom? 2. Would I need to correct for multiple comparisons when I use a Monte-Carlo aproach? If I would like to, could I just use the cfg.correctm='bonferroni' or 'fdr' option in fieldtrip? 3. I think I saw other groups just using a parametric chi-square test, would you consider this aproach correct too? 4. Would it be valid to conduct a repeated measures ANOVA first with GROUP as between-subject effect and frequency bins as within-subject effect? 5. Could I use the parametric tests (3. and 4.) after a z-transformation? I will be very happy about any suggestions and opinions. Thank you very much. Best regards Johannes -------------- next part -------------- An HTML attachment was scrubbed... URL: From david.syloni at gmail.com Mon Feb 1 13:40:38 2016 From: david.syloni at gmail.com (David Syloni) Date: Mon, 1 Feb 2016 14:40:38 +0200 Subject: [FieldTrip] Circular Correlation coefficient Message-ID: Dear Fieldtripers, I'm trying to apply connectivity analysis with continuous EEG data. I'm using: cfg = []; cfg.method = 'mtmfft'; cfg.taper = 'dpss'; cfg.output = 'fourier'; cfg.tapsmofrq = 4; cfg.width=2; cfg.foilim = [0 250]; cfg.keeptrials = 'yes'; freq = ft_freqanalysis(cfg, data_no_artifacts); cfg = []; cfg.method = 'plv'; 'mtmfft' cfg.foilim = [8 12]; cfg.bandwidth=5; cfg.tapsmofrq = 4; cfg.keeptrials = 'yes'; cfg.output = 'powandcsd'; cfg.channelcmb = c; coh = ft_connectivityanalysis(cfg, freq); Right now I should calculate Circular Correlation and I'm stuck with it. I would very appreciate your help! Thanks in advance, David -------------- next part -------------- An HTML attachment was scrubbed... URL: From harold.cav89 at gmail.com Mon Feb 1 13:41:59 2016 From: harold.cav89 at gmail.com (Harold Cavendish) Date: Mon, 1 Feb 2016 13:41:59 +0100 Subject: [FieldTrip] ft_topoplotER(): reference to non-existent field 'topo' Message-ID: Dear FieldTrip users, I've been trying to use my manually created data structure containing averaged ERP from 28 subjects and 61 channels, each lasting 1075 time points as per these instructions: http://www.fieldtriptoolbox.org/faq/how_can_i_import_my_own_dataformat *data.mat:* label: {61x1 cell} fsample: 250 trial: {1x28 cell} columns: [61x1075 double] time: {1x28 cell} elec: [1x1 struct] chanpos: [61x3 double] elecpos: [61x3 double] label: {61x1 cell} unit: 'cm' avg: [61x1075 double] to construct ERP topoplots using ft_topoplotER() and whatever else will be needed for a timelocked analysis (I've already used the same data structure to do a permutation test with success). To do that, I've been following this tutorial: http://www.fieldtriptoolbox.org/tutorial/plotting#topoplot_functions > cfg = []; > cfg.xlim = [450 500] % arbitrary time interval > cfg.layout = 'M10.lay' % custom layout; the provided easycapM10.mat has different labels > ft_topoplotER(cfg, data) This, however, produced the following error: *Reference to non-existent field 'topo'.* *Error in ft_datatype_comp (line 92)* * if size(comp.topo,1)==size(comp.topo,2)* *Error in ft_checkdata (line 358)* * data = ft_datatype_comp(data);* *Error in topoplot_common (line 74)* *data = ft_checkdata(data, 'datatype', {'comp', 'timelock', 'freq'});* *Error in ft_topoplotER (line 192)* *cfg = topoplot_common(cfg, varargin{:});* Using common sense, I ‘fixed’ topoplot_common.m by changing the order of cell parameters at line 74 so that 'timelock' was before 'comp' and it worked – I can see no errors and the topoplots look okay. Could you please help me understand what's the issue? Although it works now, I would like to future-proof my data and make it all reproducible. I think it's trying to figure out whether my data is timelocked, in the frequency domain, or perhaps a composite, but it seems that the detection algorithm is either faulty (I haven't seen this ‘topo’ field in any example so far) or my data structure is missing something (I couldn't find another topoplot-ready EEG data among the tutorial files to compare them, unfortunately, and MEG files appear to be considerably different). Thank you! Best wishes, Harold -------------- next part -------------- An HTML attachment was scrubbed... URL: From andreas.wutz-1 at unitn.it Mon Feb 1 23:36:22 2016 From: andreas.wutz-1 at unitn.it (Andreas Gerhard Wutz) Date: Mon, 1 Feb 2016 17:36:22 -0500 Subject: [FieldTrip] importing data from blackrock Message-ID: Dear Fieldtrip community, I am trying to read in LFP data from a blackrock system. I started out with the sample code provided here: http://www.fieldtriptoolbox.org/getting_started/blackrock I use Windows 7 (64-bit), Matlab 2011b (32-bit), downloaded and installed the latest version of Fieldtrip (20160128) and of the NPMK toolbox. Unfortunately, I didn't come very far. Here is my code: filename = 'my_data.ns2'; data = ft_read_data(filename, 'headerformat', 'neuroshare'); Immediately exits with the following error message: "Invalid MEX-file" pointing to "fieldtrip/external/neuroshare/mexprog.dll": The specified procedure could not be found. Error in ns_SetLibrary (line 39) Error in read_neuroshare (line 82) Error in ft_read_header (line 2056) Error in ft_read_data (line 197) What options do I have to get this going? Thank you very much for your help. Best, Andreas -- Andreas Wutz, PhD Post-doctoral researcher Center for Mind/Brain Sciences (CiMeC) University of Trento Rovereto, Italy -------------- next part -------------- An HTML attachment was scrubbed... URL: From jan.schoffelen at donders.ru.nl Tue Feb 2 07:55:51 2016 From: jan.schoffelen at donders.ru.nl (Schoffelen, J.M. (Jan Mathijs)) Date: Tue, 2 Feb 2016 06:55:51 +0000 Subject: [FieldTrip] importing data from blackrock In-Reply-To: References: Message-ID: Hi Andreas, At this moment the code that uses the NPMK toolbox for fileio is not yet functional. I have started working on this a bit, but did not have time (and urgency) to complete this yet. The neuroshare code is based on very outdated (windows support only) mex-code, and it does not surprise me that it does not work for you. If you specify ‘headerformat’ and ‘dataformat’ to be ‘blackrock_nsx’ the code should take the correct turn, and end up at a portion of the m-file that is calling the NPMK functions. However, you will hit a keyboard statement right away, so you would need to provide some additional code, that is reformatting the output of the lower-level NPMK function into the shape that FieldTrip can work with. I think you could get some inspiration from the documentation about the support for different data formats as well as some examples from the various dataformats as implemented in ft_read_data. If you can provide me with some functional code, I will be happy to plug it into the release version of FieldTrip. I also suggest you to create an account on our bugzilla server: bugzilla.fieldtriptoolbox.org, and assign yourself to the CC-list of bug 2964. Any progress you make, code suggestions, as well as questions regarding to the implementation of this dataformat can be posted here. Since I don’t have dedicated time to work on this right now, the easiest way forward would be if you investigate a bit more yourself and come up with good suggestions. This will expedite the process greatly. Thanks, and best wishes, Jan-Mathijs On Feb 1, 2016, at 11:36 PM, Andreas Gerhard Wutz > wrote: Dear Fieldtrip community, I am trying to read in LFP data from a blackrock system. I started out with the sample code provided here: http://www.fieldtriptoolbox.org/getting_started/blackrock I use Windows 7 (64-bit), Matlab 2011b (32-bit), downloaded and installed the latest version of Fieldtrip (20160128) and of the NPMK toolbox. Unfortunately, I didn't come very far. Here is my code: filename = 'my_data.ns2'; data = ft_read_data(filename, 'headerformat', 'neuroshare'); Immediately exits with the following error message: "Invalid MEX-file" pointing to "fieldtrip/external/neuroshare/mexprog.dll": The specified procedure could not be found. Error in ns_SetLibrary (line 39) Error in read_neuroshare (line 82) Error in ft_read_header (line 2056) Error in ft_read_data (line 197) What options do I have to get this going? Thank you very much for your help. Best, Andreas -- Andreas Wutz, PhD Post-doctoral researcher Center for Mind/Brain Sciences (CiMeC) University of Trento Rovereto, Italy _______________________________________________ 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 julian.keil at gmail.com Tue Feb 2 08:57:10 2016 From: julian.keil at gmail.com (Julian Keil) Date: Tue, 2 Feb 2016 08:57:10 +0100 Subject: [FieldTrip] Circular Correlation coefficient In-Reply-To: References: Message-ID: Hi David, to compute circular statistics (e.g. phase correlations) you need to leave fieldtrip a bit. Here's the toolbox I usually use: http://www.mathworks.com/matlabcentral/fileexchange/10676-circular-statistics-toolbox--directional-statistics- As you don't describe why you need circular statistics, it's a bit hard to give a more helpful answer. Good luck, Julian Am 01.02.2016 um 13:40 schrieb David Syloni: > Dear Fieldtripers, > > I'm trying to apply connectivity analysis with continuous EEG data. > > I'm using: > > > > cfg = []; > cfg.method = 'mtmfft'; > cfg.taper = 'dpss'; > cfg.output = 'fourier'; > cfg.tapsmofrq = 4; > cfg.width=2; > cfg.foilim = [0 250]; > cfg.keeptrials = 'yes'; > freq = ft_freqanalysis(cfg, data_no_artifacts); > > > > > cfg = []; > cfg.method = 'plv'; > 'mtmfft' > cfg.foilim = [8 12]; > cfg.bandwidth=5; > cfg.tapsmofrq = 4; > cfg.keeptrials = 'yes'; > cfg.output = 'powandcsd'; > cfg.channelcmb = c; > coh = ft_connectivityanalysis(cfg, freq); > > Right now I should calculate Circular Correlation and I'm stuck with it. > > I would very appreciate your help! > > Thanks in advance, > > David > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -------------- 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 david.syloni at gmail.com Tue Feb 2 09:14:30 2016 From: david.syloni at gmail.com (David Syloni) Date: Tue, 2 Feb 2016 10:14:30 +0200 Subject: [FieldTrip] Circular Correlation coefficient In-Reply-To: References: Message-ID: Dear Julian, Thank you for the answer. I was asked by reviewers to calculate circular correlation instead of PLV. Sorry for too general description. Actually, I found the toolbox , but I don't understand how to compute " sample of angles in radians" (the input for the circ_corrcc function ). I would very appreciate a help to transform my fieldtrip data to the input format , required by circ_corrcc. Thanks! David On Tue, Feb 2, 2016 at 9:57 AM, Julian Keil wrote: > Hi David, > > to compute circular statistics (e.g. phase correlations) you need to leave > fieldtrip a bit. > Here's the toolbox I usually use: > http://www.mathworks.com/matlabcentral/fileexchange/10676-circular-statistics-toolbox--directional-statistics- > > As you don't describe why you need circular statistics, it's a bit hard to > give a more helpful answer. > > Good luck, > > Julian > > Am 01.02.2016 um 13:40 schrieb David Syloni: > > > Dear Fieldtripers, > > > > I'm trying to apply connectivity analysis with continuous EEG data. > > > > I'm using: > > > > > > > > cfg = []; > > cfg.method = 'mtmfft'; > > cfg.taper = 'dpss'; > > cfg.output = 'fourier'; > > cfg.tapsmofrq = 4; > > cfg.width=2; > > cfg.foilim = [0 250]; > > cfg.keeptrials = 'yes'; > > freq = ft_freqanalysis(cfg, data_no_artifacts); > > > > > > > > > > cfg = []; > > cfg.method = 'plv'; > > 'mtmfft' > > cfg.foilim = [8 12]; > > cfg.bandwidth=5; > > cfg.tapsmofrq = 4; > > cfg.keeptrials = 'yes'; > > cfg.output = 'powandcsd'; > > cfg.channelcmb = c; > > coh = ft_connectivityanalysis(cfg, freq); > > > > Right now I should calculate Circular Correlation and I'm stuck with it. > > > > I would very appreciate your help! > > > > Thanks in advance, > > > > David > > _______________________________________________ > > 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 julian.keil at gmail.com Tue Feb 2 12:51:37 2016 From: julian.keil at gmail.com (Julian Keil) Date: Tue, 2 Feb 2016 12:51:37 +0100 Subject: [FieldTrip] Circular Correlation coefficient In-Reply-To: References: Message-ID: Dear David, I won't discuss whether this is a sensible comment by the reviewer, but here are some basic steps that you could take. To compute the circular correlation between two signals, you obviously need to obtain the phase angles first. One option to do this is to use a Hilbert transform on band-pass filtered data (on a single-trial level) As soon as you have your single trial phase angles, you can compute the correlation between two signals within each subject. Once you have done this, you could see whether there is a consistent pattern over subjects. You can find similar approaches in the following papers: van Elswijk, G., Maij, F., Schoffelen, J.-M., Overeem, S., Stegeman, D. F., & Fries, P. (2010). Corticospinal Beta-Band Synchronization Entails Rhythmic Gain Modulation. Journal of Neuroscience, 30(12), 4481–4488. http://doi.org/10.1523/JNEUROSCI.2794-09.2010 Keil, J., Timm, J., SanMiguel, I., Schulz, H., Obleser, J., & Schonwiesner, M. (2014). Cortical brain states and corticospinal synchronization influence TMS-evoked motor potentials. Journal of Neurophysiology, 111(3), 513–519. http://doi.org/10.1152/jn.00387.2013 Good luck, Julian Am 02.02.2016 um 09:14 schrieb David Syloni: > Dear Julian, > > Thank you for the answer. I was asked by reviewers to calculate circular correlation instead of PLV. Sorry for too general description. > Actually, I found the toolbox , but I don't understand how to compute " sample of angles in radians" (the input for the circ_corrcc function ). > I would very appreciate a help to transform my fieldtrip data to the input format , required by circ_corrcc. > > Thanks! > > > David > > On Tue, Feb 2, 2016 at 9:57 AM, Julian Keil wrote: > Hi David, > > to compute circular statistics (e.g. phase correlations) you need to leave fieldtrip a bit. > Here's the toolbox I usually use: http://www.mathworks.com/matlabcentral/fileexchange/10676-circular-statistics-toolbox--directional-statistics- > > As you don't describe why you need circular statistics, it's a bit hard to give a more helpful answer. > > Good luck, > > Julian > > Am 01.02.2016 um 13:40 schrieb David Syloni: > > > Dear Fieldtripers, > > > > I'm trying to apply connectivity analysis with continuous EEG data. > > > > I'm using: > > > > > > > > cfg = []; > > cfg.method = 'mtmfft'; > > cfg.taper = 'dpss'; > > cfg.output = 'fourier'; > > cfg.tapsmofrq = 4; > > cfg.width=2; > > cfg.foilim = [0 250]; > > cfg.keeptrials = 'yes'; > > freq = ft_freqanalysis(cfg, data_no_artifacts); > > > > > > > > > > cfg = []; > > cfg.method = 'plv'; > > 'mtmfft' > > cfg.foilim = [8 12]; > > cfg.bandwidth=5; > > cfg.tapsmofrq = 4; > > cfg.keeptrials = 'yes'; > > cfg.output = 'powandcsd'; > > cfg.channelcmb = c; > > coh = ft_connectivityanalysis(cfg, freq); > > > > Right now I should calculate Circular Correlation and I'm stuck with it. > > > > I would very appreciate your help! > > > > Thanks in advance, > > > > David > > _______________________________________________ > > 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: -------------- 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 alik.widge at gmail.com Tue Feb 2 15:59:56 2016 From: alik.widge at gmail.com (Alik Widge) Date: Tue, 2 Feb 2016 09:59:56 -0500 Subject: [FieldTrip] Power calculations for cluster-corrected stats? In-Reply-To: References: Message-ID: Dear all, We're working on a plan for a new study in which we plan to be analyzing EEG in sensor space, taking the Maris/Oostenveld cluster correction approach since we do not have a clear sense of where our spectral perturbations will be. Here's the question: has anyone seen a paper talking about how to do a priori power analysis for this approach? The only thing I can think to do is guess at an effect size based on similar studies, then simulate out various sample sizes and trial counts by adding a simulated signal to some existing EEG dataset. The problem I'm seeing is that exploring the (nsubject,ntrials) space in that stimulation approach is going to take quite a while, since it's multiple instances of an at least 200+ permutation at every possible sample size combination. More so if I want to explore the consequences of bad assumptions about effect size. Anyone know of a more elegant approach? Our literature searches have not been fruitful. -------------- next part -------------- An HTML attachment was scrubbed... URL: From son.ta.dinh at tum.de Tue Feb 2 16:51:17 2016 From: son.ta.dinh at tum.de (Ta Dinh, Son) Date: Tue, 2 Feb 2016 15:51:17 +0000 Subject: [FieldTrip] Axes shift using ft_multiplotER Message-ID: <6ddf332554784a02a77315c36fcd66f5@BADWLRZ-SW13MB3.ads.mwn.de> Dear FieldTrip community, My name is Son Ta Dinh and I am working in the Painlab group of Markus Ploner in Munich on EEG resting state in chronic pain conditions. I have recently started using FieldTrip and am currently trying to use ft_multiplotER to create an overview of the power spectra of all the electrodes in specific frequency bands. In principle, this works without a problem. However, I have noticed that the axes of the plot are shifted so that the origin is always included in the plot, even when my data does not include the low frequencies around 0. This creates weird overlaps as can be seen in the attached figure or the picture below. Is this intended or am I missing some setting to get the right plots? My cfg consists only of the path to the layout-file, cfg.showlabels = 'yes' and cfg.showoutline = 'yes' My data looks like this: Data.label: {65x1 cell} Data.dimord: 'chan_freq' Data.freq: [1x61 double] Data.powspctrm: [65x61 double] Data.cfg: [1x1 struct] Unexpectedly, when I change the hlim to e.g. [40 60] instead of the [40 100] that is shown in the figure below, the shift becomes even more pronounced. When using ft_singleplotER though, the axes are shown correctly, without any shifts in x- nor y-direction. As a workaround, I have tried setting cfg.axes = 'no' and cfg.box = 'yes', which fits the plots into a box and works better, though not optimally as the labels are partially covered. I would be grateful if anybody could point out any mistakes in my usage of ft_multiplotER or offer better alternatives/workarounds. Best regards, Son Son Ta Dinh, M.Sc. PhD student in Human Pain Research Klinikum rechts der Isar Technische Universität München Munich, Germany Phone: +49 89 4140 7664 http://www.painlabmunich.de/ [cid:image002.jpg at 01D15DD9.EC4E83F0] -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image002.jpg Type: image/jpeg Size: 41698 bytes Desc: image002.jpg URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: testplot_multiplotER.png Type: image/png Size: 74873 bytes Desc: testplot_multiplotER.png URL: From david.syloni at gmail.com Tue Feb 2 17:04:52 2016 From: david.syloni at gmail.com (David Syloni) Date: Tue, 2 Feb 2016 18:04:52 +0200 Subject: [FieldTrip] Circular Correlation coefficient In-Reply-To: References: Message-ID: Dear Julian, Thank you for the answer. I will try to apply it as you described. However, it's important to note, that my data doesn't contain real trials, this is a EEG during one continuous stimulus (110 sec). Can your approach work also for this case? Thanks, David On Tue, Feb 2, 2016 at 1:51 PM, Julian Keil wrote: > Dear David, > > I won't discuss whether this is a sensible comment by the reviewer, but > here are some basic steps that you could take. > > To compute the circular correlation between two signals, you obviously > need to obtain the phase angles first. > One option to do this is to use a Hilbert transform on band-pass filtered > data (on a single-trial level) > As soon as you have your single trial phase angles, you can compute the > correlation between two signals within each subject. > Once you have done this, you could see whether there is a consistent > pattern over subjects. > > You can find similar approaches in the following papers: > > van Elswijk, G., Maij, F., Schoffelen, J.-M., Overeem, S., Stegeman, D. > F., & Fries, P. (2010). Corticospinal Beta-Band Synchronization Entails > Rhythmic Gain Modulation. Journal of Neuroscience, 30(12), 4481–4488. > http://doi.org/10.1523/JNEUROSCI.2794-09.2010 > > Keil, J., Timm, J., SanMiguel, I., Schulz, H., Obleser, J., & > Schonwiesner, M. (2014). Cortical brain states and corticospinal > synchronization influence TMS-evoked motor potentials. Journal of > Neurophysiology, 111(3), 513–519. http://doi.org/10.1152/jn.00387.2013 > > Good luck, > > Julian > > Am 02.02.2016 um 09:14 schrieb David Syloni: > > Dear Julian, > > Thank you for the answer. I was asked by reviewers to calculate circular > correlation instead of PLV. Sorry for too general description. > Actually, I found the toolbox , but I don't understand how to compute > " sample of angles in radians" (the input for the circ_corrcc function ). > I would very appreciate a help to transform my fieldtrip data to the input > format , required by circ_corrcc. > > Thanks! > > > David > > On Tue, Feb 2, 2016 at 9:57 AM, Julian Keil wrote: > >> Hi David, >> >> to compute circular statistics (e.g. phase correlations) you need to >> leave fieldtrip a bit. >> Here's the toolbox I usually use: >> http://www.mathworks.com/matlabcentral/fileexchange/10676-circular-statistics-toolbox--directional-statistics- >> >> As you don't describe why you need circular statistics, it's a bit hard >> to give a more helpful answer. >> >> Good luck, >> >> Julian >> >> Am 01.02.2016 um 13:40 schrieb David Syloni: >> >> > Dear Fieldtripers, >> > >> > I'm trying to apply connectivity analysis with continuous EEG data. >> > >> > I'm using: >> > >> > >> > >> > cfg = []; >> > cfg.method = 'mtmfft'; >> > cfg.taper = 'dpss'; >> > cfg.output = 'fourier'; >> > cfg.tapsmofrq = 4; >> > cfg.width=2; >> > cfg.foilim = [0 250]; >> > cfg.keeptrials = 'yes'; >> > freq = ft_freqanalysis(cfg, data_no_artifacts); >> > >> > >> > >> > >> > cfg = []; >> > cfg.method = 'plv'; >> > 'mtmfft' >> > cfg.foilim = [8 12]; >> > cfg.bandwidth=5; >> > cfg.tapsmofrq = 4; >> > cfg.keeptrials = 'yes'; >> > cfg.output = 'powandcsd'; >> > cfg.channelcmb = c; >> > coh = ft_connectivityanalysis(cfg, freq); >> > >> > Right now I should calculate Circular Correlation and I'm stuck with >> it. >> > >> > I would very appreciate your help! >> > >> > Thanks in advance, >> > >> > David >> > _______________________________________________ >> > 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 > > > > _______________________________________________ > 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 andrembastos at gmail.com Tue Feb 2 18:17:58 2016 From: andrembastos at gmail.com (=?UTF-8?Q?Andr=C3=A9_Bastos?=) Date: Tue, 2 Feb 2016 12:17:58 -0500 Subject: [FieldTrip] importing data from blackrock In-Reply-To: References: Message-ID: Hey JM, I just handed Andreas some code to read in the data to MATLAB using the openNSx.m (for importing continuous raw data) and openNEV (for spikes and event codes), and then a Fieldtrip data structure can be created by hand relative to events of interest or for the whole length of the session. I know this is probably not the ideal solution from a FT development point of view, but it's working for us which means also limited urgency to change. I would be able to eventually work towards a more aesthetically pleasing solution, especially if Andreas can help! Cheers, Andre On Tue, Feb 2, 2016 at 1:55 AM, Schoffelen, J.M. (Jan Mathijs) < jan.schoffelen at donders.ru.nl> wrote: > Hi Andreas, > > At this moment the code that uses the NPMK toolbox for fileio is not yet > functional. I have started working on this a bit, but did not have time > (and urgency) to complete this yet. > The neuroshare code is based on very outdated (windows support only) > mex-code, and it does not surprise me that it does not work for you. > > If you specify ‘headerformat’ and ‘dataformat’ to be ‘blackrock_nsx’ the > code should take the correct turn, and end up at a portion of the m-file > that is calling the NPMK functions. > However, you will hit a keyboard statement right away, so you would need > to provide some additional code, that is reformatting the output of the > lower-level NPMK function into the shape that FieldTrip can work with. I > think you could get some inspiration from the documentation about the > support for different data formats as well as some examples from the > various dataformats as implemented in ft_read_data. If you can provide me > with some functional code, I will be happy to plug it into the release > version of FieldTrip. I also suggest you to create an account on our > bugzilla server: bugzilla.fieldtriptoolbox.org, and assign yourself to > the CC-list of bug 2964. Any progress you make, code suggestions, as well > as questions regarding to the implementation of this dataformat can be > posted here. > > Since I don’t have dedicated time to work on this right now, the easiest > way forward would be if you investigate a bit more yourself and come up > with good suggestions. This will expedite the process greatly. > > Thanks, and best wishes, > > Jan-Mathijs > > > > On Feb 1, 2016, at 11:36 PM, Andreas Gerhard Wutz > wrote: > > Dear Fieldtrip community, > > I am trying to read in LFP data from a blackrock system. I started out > with the sample code provided here: > http://www.fieldtriptoolbox.org/getting_started/blackrock > > I use Windows 7 (64-bit), Matlab 2011b (32-bit), downloaded and installed > the latest version of Fieldtrip (20160128) and of the NPMK toolbox. > > Unfortunately, I didn't come very far. > Here is my code: > > filename = 'my_data.ns2'; > data = ft_read_data(filename, 'headerformat', 'neuroshare'); > > Immediately exits with the following error message: > "Invalid MEX-file" pointing to > "fieldtrip/external/neuroshare/mexprog.dll": The specified procedure could > not be found. > > Error in ns_SetLibrary (line 39) > Error in read_neuroshare (line 82) > Error in ft_read_header (line 2056) > Error in ft_read_data (line 197) > > What options do I have to get this going? > Thank you very much for your help. > Best, > Andreas > > > > > > > > -- > Andreas Wutz, PhD > Post-doctoral researcher > Center for Mind/Brain Sciences (CiMeC) > University of Trento > Rovereto, Italy > _______________________________________________ > 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 Wed Feb 3 08:57:46 2016 From: jan.schoffelen at donders.ru.nl (Schoffelen, J.M. (Jan Mathijs)) Date: Wed, 3 Feb 2016 07:57:46 +0000 Subject: [FieldTrip] importing data from blackrock In-Reply-To: References: Message-ID: Hi Andre, Thanks for thinking along and this contribution. I am aware of these functions, and these are essentially already built into fieldtrip, although not fully functional yet. Have a look at ft_read_data and ft_read_header, and search for ‘blackrock’. It’s just the internal data bookkeeping that needs to be sorted out, as well as some potential data scaling issues. If you have some insights in this regard, please do sign up for bug 2964 and chime in. Cheers, JM On Feb 2, 2016, at 6:17 PM, André Bastos > wrote: Hey JM, I just handed Andreas some code to read in the data to MATLAB using the openNSx.m (for importing continuous raw data) and openNEV (for spikes and event codes), and then a Fieldtrip data structure can be created by hand relative to events of interest or for the whole length of the session. I know this is probably not the ideal solution from a FT development point of view, but it's working for us which means also limited urgency to change. I would be able to eventually work towards a more aesthetically pleasing solution, especially if Andreas can help! Cheers, Andre On Tue, Feb 2, 2016 at 1:55 AM, Schoffelen, J.M. (Jan Mathijs) > wrote: Hi Andreas, At this moment the code that uses the NPMK toolbox for fileio is not yet functional. I have started working on this a bit, but did not have time (and urgency) to complete this yet. The neuroshare code is based on very outdated (windows support only) mex-code, and it does not surprise me that it does not work for you. If you specify ‘headerformat’ and ‘dataformat’ to be ‘blackrock_nsx’ the code should take the correct turn, and end up at a portion of the m-file that is calling the NPMK functions. However, you will hit a keyboard statement right away, so you would need to provide some additional code, that is reformatting the output of the lower-level NPMK function into the shape that FieldTrip can work with. I think you could get some inspiration from the documentation about the support for different data formats as well as some examples from the various dataformats as implemented in ft_read_data. If you can provide me with some functional code, I will be happy to plug it into the release version of FieldTrip. I also suggest you to create an account on our bugzilla server: bugzilla.fieldtriptoolbox.org, and assign yourself to the CC-list of bug 2964. Any progress you make, code suggestions, as well as questions regarding to the implementation of this dataformat can be posted here. Since I don’t have dedicated time to work on this right now, the easiest way forward would be if you investigate a bit more yourself and come up with good suggestions. This will expedite the process greatly. Thanks, and best wishes, Jan-Mathijs On Feb 1, 2016, at 11:36 PM, Andreas Gerhard Wutz > wrote: Dear Fieldtrip community, I am trying to read in LFP data from a blackrock system. I started out with the sample code provided here: http://www.fieldtriptoolbox.org/getting_started/blackrock I use Windows 7 (64-bit), Matlab 2011b (32-bit), downloaded and installed the latest version of Fieldtrip (20160128) and of the NPMK toolbox. Unfortunately, I didn't come very far. Here is my code: filename = 'my_data.ns2'; data = ft_read_data(filename, 'headerformat', 'neuroshare'); Immediately exits with the following error message: "Invalid MEX-file" pointing to "fieldtrip/external/neuroshare/mexprog.dll": The specified procedure could not be found. Error in ns_SetLibrary (line 39) Error in read_neuroshare (line 82) Error in ft_read_header (line 2056) Error in ft_read_data (line 197) What options do I have to get this going? Thank you very much for your help. Best, Andreas -- Andreas Wutz, PhD Post-doctoral researcher Center for Mind/Brain Sciences (CiMeC) University of Trento Rovereto, Italy _______________________________________________ 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 Harald.Bornfleth at besa.de Wed Feb 3 11:21:21 2016 From: Harald.Bornfleth at besa.de (Harald Bornfleth) Date: Wed, 3 Feb 2016 11:21:21 +0100 Subject: [FieldTrip] Comparing ICA methods between toolboxes (BESA vs. Fieldtrip) In-Reply-To: References: <1f8be01d14f99$8f379470$ada6bd50$@besa.de> Message-ID: <008c01d15e6c$a0ac4b60$e204e220$@besa.de> Hi Andrew, We discussed this dataset, and we believe that the component which you selected (ICA #22) is most likely a muscle artifact. The ICA components are sorted according to their variance, so the component #22 is one with very little variance. The question is whether you actually need to correct for this artifact. You may find it on only one or few electrodes – may be worth checking. If that is the case, you might consider setting the electrode to bad. The extended Infomax ICA method is not optimized for correcting muscle artifacts. It lends itself more to the correction of eye movements or cardiac artifacts. In the ICA decomposition that you sent, component #1 looks like an eye movement. Components #17 and #19 look like they have mains frequency on them. You can get rid of this by using the notch filter. Hope this helps. Best regards, Harald From: c.andrew123 at gmail.com [mailto:c.andrew123 at gmail.com] On Behalf Of Andrew Chang Sent: 29 January 2016 04:26 To: Harald.Bornfleth at besa.de Cc: FieldTrip discussion list ; Ille Nicole Subject: Re: [FieldTrip] Comparing ICA methods between toolboxes (BESA vs. Fieldtrip) Hi Harald, I did the ICA based on the continuos recorded block (~7 minutes), including 100 trials, with PCA option on. The attached file is the ICA topography and waveform (ICA 22). The spectrum showed that the peak power was at ~11Hz. I suspected it is a neck movement artifact, because the generator seems to be in the front of the neck. Also, I got another similar ICA component from another subject, and the topography seems to be centered at the back of the neck, would it be considered as neck movement too. Thank you very much once again! Best, Andrew On Mon, Jan 18, 2016 at 7:49 AM, Harald Bornfleth > wrote: Dear Andrew, A couple of questions popped up. 1) The neck movement artifact, is this something with low frequency, or is it a muscle artifact? 2) Did you calculate the ICA on one data screen (e.g. 10 seconds or 20 seconds), or over the whole data set? If you could send us screen shots showing the ICA wave forms and the accompanying topographies, then we could comment on the classification. (In BESA, you right-click on the label of a component and select “Map topography” to show the topography map of that component.) I include my colleague and ICA expert Nicole Ille on CC. Best regards, Harald From: c.andrew123 at gmail.com [mailto:c.andrew123 at gmail.com ] On Behalf Of Andrew Chang Sent: 17 January 2016 19:57 To: Harald.Bornfleth at besa.de ; FieldTrip discussion list > Subject: Re: [FieldTrip] Comparing ICA methods between toolboxes (BESA vs. Fieldtrip) Hi Dr. Bornfleth, Thanks for your reply very much. I would like to use ICA to remove eye blinks and eye movements, neck movements, as well as cardiac and powerline artifacts. The segment I have is a continuous EEG recording for 10 minutes, which is one block of my experiment including many trials. Before ICA, the segment have been high-pass (0.3 Hz) and low-pass (100 Hz). The components showing activities around the eyes, the back of the neck, and 60 Hz were removed. As for the cardiac artifact, I it is based on visual inspection on the waveform to see whether it looks like an EKG. Any further comments are appreciated! Best, Andrew On Fri, Jan 15, 2016 at 8:35 AM, Harald Bornfleth > wrote: Dear Andrew, Thanks for bringing this up. I can try to shed some light on the ICA method used in BESA Research; however, I can not comment on the implementation in FieldTrip. The method behind ICA analysis in BESA Research is the extended infomax ICA algorithm (Lee TW et al.: Independent component analysis using an extended infomax algorithm for mixed sub-Gaussian and super-Gaussian sources. Neural Computation 11(2), 1999, 409-433). This algorithm is very well suited to remove cardiac and powerline artifacts. Depending on the data, it may also be used to remove ocular (blink) and electrode artifacts. To assess whether your artifact removal is trustworthy more information about your processing steps are needed. What types of artifacts are you trying to correct? What segments are you using to determine the artifact topographies and what segments are you finally correcting? Best regards, Harald Dr. Harald Bornfleth Product Manager BESA Research BESA GmbH Freihamer Strasse 18 82166 Graefelfing/Germany http://www.besa.de E: Harald.Bornfleth at besa.de T: +49 89 8980 9968 HRB Munich 109956 CEO: Dr. Tobias Scherg, CFO: Theodor Scherg Director of Research: Dr. Michael Scherg From: fieldtrip-bounces at science.ru.nl [mailto:fieldtrip-bounces at science.ru.nl] On Behalf Of Andrew Chang Sent: Sonntag, 10. Januar 2016 21:18 To: fieldtrip at science.ru.nl Subject: [FieldTrip] Comparing ICA methods between toolboxes (BESA vs. Fieldtrip) Dear Fieldtrip users, I am wondering whether anyone has compared the performances of the ICA methods among M/EEG toolboxes. Especially, how is the performance of ICA in BESA Research 6.0, compared to Fieldtrip? I have an EEG data set which has been processed in BESA, including removing artifact using ICA. I am wondering whether I can trust it, or I should reprocess it in Fieldtrip. Any comments will be appreciated! Happy new year! Best, Andrew -- Andrew Chang Ph.D. Candidate Auditory Development Lab Department of Psychology, Neuroscience & Behaviour McMaster University http://changa5.wordpress.com/ _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -- Andrew Chang Ph.D. Candidate Auditory Development Lab Department of Psychology, Neuroscience & Behaviour McMaster University http://changa5.wordpress.com/ -- Andrew Chang Ph.D. Candidate Auditory Development Lab Department of Psychology, Neuroscience & Behaviour McMaster University http://changa5.wordpress.com/ -------------- next part -------------- An HTML attachment was scrubbed... URL: From K.Kalogianni at tudelft.nl Wed Feb 3 15:00:33 2016 From: K.Kalogianni at tudelft.nl (Konstantina Kalogianni) Date: Wed, 3 Feb 2016 14:00:33 +0000 Subject: [FieldTrip] MUSIC small bug and fail in retrieving simulation data location Message-ID: <4DF682D3A10EAC46B462A46E16F0B0493F90BF10@SRV364.tudelft.net> Dear fieldtrippers, I am doing a sanity check on the implementation of the MUSIC algorithm in fieldtrip, before applying it in real data. So after creating simulation data with sinusoids at a specific location and adding relative noise of 1.5, I am doing a music scan with the number of components as 1. The code for that is below (I used filedtrip version fieldtrip-20160101): %% leadfield should be generated for specific EEG signal addpath([ft_path,'fileio\']); addpath ([ft_path,'template\electrode\']); addpath ([ft_path,'template\headmodel\']); %% LOAD VOL ELEC MRI % load electrode locations elec=ft_read_sens('standard_1020.elc'); % load mri & vol (template) load('standard_mri.mat'); %units in mm load('standard_bem'); %% adjust electrode locations for 62 channels eeg elec.label=upper(elec.label); load([gendir 'label_62.mat'], 'label_62'); EEG.label=label_62; label_signal=upper(EEG.label); EEG.label=upper(EEG.label); elec2find=zeros(length(label_signal),1); for i=1:length(label_signal); elec2find(i,1)=find(strcmp(label_signal(i),elec.label)); end % elec with 62 locations based on SEP signal elec.chanpos=elec.chanpos((elec2find), :); elec.elecpos=elec.elecpos((elec2find), :); elec.label=elec.label((elec2find)); elec.label=upper(elec.label); % align elecs on vol if needed cfg = []; cfg.method = 'interactive'; cfg.elec = elec; cfg.headshape = vol.bnd(1); elec_aligned = ft_electroderealign(cfg); %% compute leadfield cfg = []; cfg.elec =elec_aligned; cfg.channel = EEG.label;% or common_channels_; cfg.reducerank = 3; cfg.headmodel = vol; % volume conduction headmodel cfg.normalize = 'yes'; cfg.grid.unit = 'mm'; cfg.grid.resolution = 5; leadfield = ft_prepare_leadfield(cfg, EEG); %% simulate EEG data, dipole in specific location loc1=[-30, -11, 65 ]; cfg = []; cfg.headmodel = vol ; cfg.elec = elec_aligned; cfg.fsample = 1024; % Hz cfg.dip.amplitude=[1]; cfg.dip.phase=[1]; cfg.dip.pos(1,:) = loc1; cfg.dip.mom(:,1) = [1 0 0]'; cfg.ntrials=500; cfg.triallength= 0.250; cfg.fsample=1024; cfg.relnoise = 1.5; epoch = ft_dipolesimulation(cfg); %% compute averaged dataset with covariance matrix cfg=[]; % cfg.covariance='yes'; avg = ft_timelockanalysis(cfg, epoch); %% cfg = []; cfg.method = 'music'; cfg.grid = load([gendir 'leadfield_templ.mat']); % leadfield, which has the grid information cfg.headmodel = load([gendir 'vol_temp.mat']);% volume conduction model (headmodel) cfg.elec = load([gendir 'elec_temp.mat']); cfg.channel = avg.label; cfg.music.numcomponent= 1; source_music = ft_sourceanalysis(cfg, avg); %% pos_max = zeros(1,3); [~,k]=max(source.avg.jr); [~,l]=min(source.avg.jr); music_max = source.pos(k, :); music_min = source.pos(l, :); First of all the code in music.m will only work if you change line 77 and 78 with the following lines: % select only the dipole positions inside the brain for scanning dip.inside = find(dip.inside==1); dip.pos = dip.pos(dip.inside,:); and line 103 with this lf = dip.leadfield{dip.inside(i)}; Otherwise it was not possible since the lf contained both the points inside and outside the brain But even after changing those lines both the minimum and the maximum of the music metric are not the original location. Original location was [-30, -11, 65 ] and minimum music metric gives [-55, -15, 58] while maximum music metric gives [50, -20, 8]. The same location repeats with both using the covariance matrix as an input in music or not and also by changing the relative noise to 0.5 instead of 1.5. Does someone run into the same type of problems with music? Thanks in advance for your help. K. (Nadia) Kalogianni PhD candidate TU Delft /Department of Biomechanical Engneering Neuromuscular Control Laboratory Mekelweg 2 2628 CD Delft Room: F-1-320 T +31 15-27 84230 E k.kalogianni at tudelft.nl -------------- next part -------------- An HTML attachment was scrubbed... URL: From david.syloni at gmail.com Wed Feb 3 17:25:21 2016 From: david.syloni at gmail.com (David Syloni) Date: Wed, 3 Feb 2016 18:25:21 +0200 Subject: [FieldTrip] Circular Correlation coefficient In-Reply-To: References: Message-ID: Dear Julian, To calculate Hilbert transform I created 0.5 sec "trials" from the data. and used hibert_t1 = ft_preproc_hilbert( cell2mat(data_no_artifacts.trial(1)), 'angle') Is it right? Thanks, David On Tue, Feb 2, 2016 at 6:04 PM, David Syloni wrote: > Dear Julian, > > Thank you for the answer. I will try to apply it as you described. > However, it's important to note, that my data doesn't contain real trials, > this is a EEG during one continuous stimulus (110 sec). > Can your approach work also for this case? > > > Thanks, > > > David > > On Tue, Feb 2, 2016 at 1:51 PM, Julian Keil wrote: > >> Dear David, >> >> I won't discuss whether this is a sensible comment by the reviewer, but >> here are some basic steps that you could take. >> >> To compute the circular correlation between two signals, you obviously >> need to obtain the phase angles first. >> One option to do this is to use a Hilbert transform on band-pass filtered >> data (on a single-trial level) >> As soon as you have your single trial phase angles, you can compute the >> correlation between two signals within each subject. >> Once you have done this, you could see whether there is a consistent >> pattern over subjects. >> >> You can find similar approaches in the following papers: >> >> van Elswijk, G., Maij, F., Schoffelen, J.-M., Overeem, S., Stegeman, D. >> F., & Fries, P. (2010). Corticospinal Beta-Band Synchronization Entails >> Rhythmic Gain Modulation. Journal of Neuroscience, 30(12), 4481–4488. >> http://doi.org/10.1523/JNEUROSCI.2794-09.2010 >> >> Keil, J., Timm, J., SanMiguel, I., Schulz, H., Obleser, J., & >> Schonwiesner, M. (2014). Cortical brain states and corticospinal >> synchronization influence TMS-evoked motor potentials. Journal of >> Neurophysiology, 111(3), 513–519. http://doi.org/10.1152/jn.00387.2013 >> >> Good luck, >> >> Julian >> >> Am 02.02.2016 um 09:14 schrieb David Syloni: >> >> Dear Julian, >> >> Thank you for the answer. I was asked by reviewers to calculate circular >> correlation instead of PLV. Sorry for too general description. >> Actually, I found the toolbox , but I don't understand how to compute >> " sample of angles in radians" (the input for the circ_corrcc function >> ). >> I would very appreciate a help to transform my fieldtrip data to the >> input format , required by circ_corrcc. >> >> Thanks! >> >> >> David >> >> On Tue, Feb 2, 2016 at 9:57 AM, Julian Keil >> wrote: >> >>> Hi David, >>> >>> to compute circular statistics (e.g. phase correlations) you need to >>> leave fieldtrip a bit. >>> Here's the toolbox I usually use: >>> http://www.mathworks.com/matlabcentral/fileexchange/10676-circular-statistics-toolbox--directional-statistics- >>> >>> As you don't describe why you need circular statistics, it's a bit hard >>> to give a more helpful answer. >>> >>> Good luck, >>> >>> Julian >>> >>> Am 01.02.2016 um 13:40 schrieb David Syloni: >>> >>> > Dear Fieldtripers, >>> > >>> > I'm trying to apply connectivity analysis with continuous EEG data. >>> > >>> > I'm using: >>> > >>> > >>> > >>> > cfg = []; >>> > cfg.method = 'mtmfft'; >>> > cfg.taper = 'dpss'; >>> > cfg.output = 'fourier'; >>> > cfg.tapsmofrq = 4; >>> > cfg.width=2; >>> > cfg.foilim = [0 250]; >>> > cfg.keeptrials = 'yes'; >>> > freq = ft_freqanalysis(cfg, data_no_artifacts); >>> > >>> > >>> > >>> > >>> > cfg = []; >>> > cfg.method = 'plv'; >>> > 'mtmfft' >>> > cfg.foilim = [8 12]; >>> > cfg.bandwidth=5; >>> > cfg.tapsmofrq = 4; >>> > cfg.keeptrials = 'yes'; >>> > cfg.output = 'powandcsd'; >>> > cfg.channelcmb = c; >>> > coh = ft_connectivityanalysis(cfg, freq); >>> > >>> > Right now I should calculate Circular Correlation and I'm stuck with >>> it. >>> > >>> > I would very appreciate your help! >>> > >>> > Thanks in advance, >>> > >>> > David >>> > _______________________________________________ >>> > 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 >> >> >> >> _______________________________________________ >> 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 singhkd at cardiff.ac.uk Wed Feb 3 17:36:09 2016 From: singhkd at cardiff.ac.uk (Krish Singh) Date: Wed, 3 Feb 2016 16:36:09 +0000 Subject: [FieldTrip] MEG and DCM/Graph theory Postdoc-Job Opportunities at CUBRIC, School of Psychology, Cardiff University, UK Message-ID: Dear All, As part of the expansion of the CUBRIC (http://sites.cardiff.ac.uk/cubric/) brain imaging facility at Cardiff University, UK, we are hiring postdoctoral researchers at either Associate or Fellow level and two of the posts would suit people working in the MEG and/or network analysis related field. All of the available posts are listed here: http://sites.cardiff.ac.uk/cubric/work-with-us/research-associatefellowship-posts/ ​The MEG and DCM/GRAPH theory posts are part of a large Wellcome Trust Strategic Award. Full details of the posts and how to apply are here: http://krb-sjobs.brassring.com/TGWEbHost/jobdetails.aspx?partnerid=30011&siteid=5460&AReq=4342BR http://krb-sjobs.brassring.com/TGWEbHost/jobdetails.aspx?partnerid=30011&siteid=5460&AReq=4343BR For informal enquiries, please get in touch with me if you are interested in the above two posts. Note that we’re looking for people with a significant track-record, evidenced by good relevant peer-reviewed publications. The two posts must start before July 2016, are for 5-years and may be appointed up to senior UK Grade 7 level. Many thanks, Krish -- Prof. Krish Singh CUBRIC School of Psychology / Ysgol Seicoleg Cardiff University / Prifysgol Caerdydd Park Place / Plas y Parc Cardiff / Caerdydd CF10 3AT, UK Tel / Ffôn: 02920 874690 / 870365 Fax / Ffacs: 02920 870339 Email / Ebost : singhkd at cardiff.ac.uk -------------- next part -------------- An HTML attachment was scrubbed... URL: From hibafouani123 at hotmail.com Wed Feb 3 23:44:33 2016 From: hibafouani123 at hotmail.com (hiba fouani) Date: Wed, 3 Feb 2016 22:44:33 +0000 Subject: [FieldTrip] =?cp1256?q?Few_Dipoles=FE?= Message-ID: Dear all, I have a question about the method that deal with few number of dipoles like dipole fitting for example , what the meaning of few in this case? can I work with 200 dipoles? Another question I have about the signal resulted from the forward problem when I multiply the leadfield with simulated electrical potential (with dimension M X N where M is the number of points and N is the number of sample time) does this signal of electrode required normalization or any type of treatment before I put it in the function of inverse problem? All the best Hiba -------------- next part -------------- An HTML attachment was scrubbed... URL: From tigoum at naver.com Thu Feb 4 03:20:40 2016 From: tigoum at naver.com (=?UTF-8?B?7JWI66+87Z2s?=) Date: Thu, 4 Feb 2016 11:20:40 +0900 (KST) Subject: [FieldTrip] =?utf-8?q?importing_method_for_ft=5Fcrossfrequency=28?= =?utf-8?q?=29_using_our_customized_data_format?= In-Reply-To: <3271eadad0ee1c551231243cb4f0e5@cweb14.nm.nhnsystem.com> References: <3271eadad0ee1c551231243cb4f0e5@cweb14.nm.nhnsystem.com> Message-ID: <7e6fbf1ad2395f79d996b25a72f7c2f@cweb10.nm.nhnsystem.com> Dear community, My name is Ahn Min-Hee and I am working in the mindbrain lab in korea university, south koera on invasive BMI. Currently I am analyzing EEG data of our lab project, where we processed using our time-frequency analysis method on matlab. It's sourcing from Brain Vision Recorder. I tried using ft_crossfrequency() to assess time-frequency aspects of our data. First, I tried importing our own data that formed 3D type by frequency x time x channel, but I don't know how it convert the fieldtrip style data structure. Specially, about converting epoch dimension & constructing trial struct... So, I tried additional work as initiation. I import raw data such as *.eeg from Brain Vision Recorder. I work following: >> cfg = [] ; >> cfg.dataset='SSVEP_NEW_su0001.eeg'; >> cfg.trialdef.eventtype='?'; >> [cfg] = ft_definetrial(cfg); Warning: no trialfun was specified, using ft_trialfun_general > In ft_definetrial (line 135) evaluating trialfunction 'ft_trialfun_general' reading the events from 'SSVEP_NEW_su0001.vhdr' the following events were found in the datafile event type: 'Comment' with event values: 'actiCAP Data On' event type: 'New Segment' with event values: event type: 'Stimulus' with event values: 'S 11' 'S 12' 'S 13' 'S 14' 'S 15' 'S 16' 'S 21' 'S 22' 'S 23' 'S 24' 'S 25' 'S 26' 'S 28' 'S111' 'S112' 'S113' 'S114' 'S115' 'S116' 'S121' 'S122' 'S123' 'S124' 'S125' 'S126' 'S127' no trials have been defined yet, see FT_DEFINETRIAL for further help found 943 events created 0 trials the call to "ft_definetrial" took 0 seconds and required the additional allocation of an estimated 0 MB Then... I don't know that its result is correct or not... also, how treat warning & why resulting trial to 0. ----- So, I summarize my question: 1. How convert/construct our own data format(freq x time x channel) to fieldtrip type data struct ? 2. What or where detailed example for ft_crossfrequency() function ?3. How import *.eeg(brain vision raw data) ? Especially treat a trial information ? I uploaded our data formed file o a filehoster such as fieldtriptoolbox ftp site as it exceeds the critical file size of 1 MB. Here is the link:ftp://ftp.fieldtriptoolbox.org/pub/incoming/TiGoum_USIL.FREQxTIMExCHANNEL.mat Can someone tell me above questions. Any help world be appreciated.Thank you very much. Best, Ahn Min-Hee. -------------- next part -------------- An HTML attachment was scrubbed... URL: From joseluisblues at gmail.com Thu Feb 4 13:21:59 2016 From: joseluisblues at gmail.com (Jose) Date: Thu, 4 Feb 2016 13:21:59 +0100 Subject: [FieldTrip] databrowser crashes, windows 8, matlab 2014b Message-ID: Dear fieldtrippers, I have been having some troubles with the plot functions in Fieldtrip, I've tried to solve it following this tread from the Fieldtrip webpage, but I was unable to solve the problem. I was wondering if there would any update or if someone has run in the same problem, I'm using a Intel Core 3.00GHz RAM 8.00 GB computer, Windows 8, 64-bit Operating System, and Matlab 2014b, Thanks for any hint, Jose -- -------------- next part -------------- An HTML attachment was scrubbed... URL: From caspervanheck at gmail.com Thu Feb 4 15:15:11 2016 From: caspervanheck at gmail.com (Casper van Heck) Date: Thu, 4 Feb 2016 15:15:11 +0100 Subject: [FieldTrip] importing method for ft_crossfrequency() using our customized data format In-Reply-To: <7e6fbf1ad2395f79d996b25a72f7c2f@cweb10.nm.nhnsystem.com> References: <3271eadad0ee1c551231243cb4f0e5@cweb14.nm.nhnsystem.com> <7e6fbf1ad2395f79d996b25a72f7c2f@cweb10.nm.nhnsystem.com> Message-ID: Dear Ahn, As background: 1. Constructing your own format is easy, and is explained on the page "How can I import my own dataformat? " 2. I'm assuming you're using the function 'ft_crossfrequencyanalysis', which doesn't seem to be embedded in a tutorial or anything similar. I do know that it wants the output of ft_freqanalysis, but if you want to know how it works, you're going to have to dive into the code. 3. Working with Brainvision Recorder, you don't import the raw data directly; you direct Fieldtrip to the header file, and use ft_preprocessing to read all the data and the markers. If this goes awry, you can use the separate functions ft_read_header, ft_read_data, and ft_read_event to load those elements into memor (more info here ). I seem to remember Brainvision events need to be read using ft_read_event anyway. Importing data works best either through ft_preprocessing, or through ft_read_data. You're trying to define a trial structure, but don't provide a method to do that. Read the tutorial on preprocessing , and simply copy the code used there, making a few changes to fit your data. Good luck! On 4 February 2016 at 03:20, 안민희 wrote: >  > > Dear community, > > > My name is Ahn Min-Hee and I am working in the mindbrain lab in korea > university, south koera > > on invasive BMI. > > Currently I am analyzing EEG data of our lab project, where we processed > using our time-frequency > > analysis method on matlab. It's sourcing from Brain Vision Recorder. > > > > I tried using ft_crossfrequency() to assess time-frequency aspects of our > data. > > First, I tried importing our own data that formed 3D type by frequency x > time x channel, > > but I don't know how it convert the fieldtrip style data structure. > > Specially, about converting epoch dimension & constructing trial struct... > > > > So, I tried additional work as initiation. I import raw data such as > *.eeg from Brain Vision Recorder. > > I work following: > > > > >> cfg = [] ; > > >> cfg.dataset='SSVEP_NEW_su0001.eeg'; > > >> cfg.trialdef.eventtype='?'; > > >> [cfg] = ft_definetrial(cfg); > > > > Warning: no trialfun was specified, using ft_trialfun_general > > > In ft_definetrial (line 135) > > evaluating trialfunction 'ft_trialfun_general' > > reading the events from 'SSVEP_NEW_su0001.vhdr' > > the following events were found in the datafile > > event type: 'Comment' with event values: 'actiCAP Data On' > > event type: 'New Segment' with event values: > > event type: 'Stimulus' with event values: 'S 11' 'S 12' 'S 13' 'S 14' 'S > 15' 'S 16' 'S 21' 'S 22' 'S 23' 'S 24' 'S 25' 'S 26' 'S 28' 'S111' 'S112' > 'S113' 'S114' 'S115' 'S116' 'S121' 'S122' 'S123' 'S124' 'S125' 'S126' > 'S127' > > no trials have been defined yet, see FT_DEFINETRIAL for further help > > found 943 events > > created 0 trials > > the call to "ft_definetrial" took 0 seconds and required the additional > allocation of an estimated 0 MB > > Then... I don't know that its result is correct or not... also, how treat > warning & why resulting trial to 0. > > ----- > > So, I summarize my question: > > 1. How convert/construct our own data format(freq x time x channel) to > fieldtrip type data struct ? > 2. What or where detailed example for ft_crossfrequency() function ? > 3. How import *.eeg(brain vision raw data) ? Especially treat a trial > information ? > > I uploaded our data formed file o a filehoster such as fieldtriptoolbox > ftp site as it exceeds the > critical file size of 1 MB. Here is the link: > > ftp://ftp.fieldtriptoolbox.org/pub/incoming/TiGoum_USIL.FREQxTIMExCHANNEL.mat > > > Can someone tell me above questions. Any help world be appreciated. > Thank you very much. > > Best, > > Ahn Min-Hee. > > > _______________________________________________ > 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 giuseppespinelli88 at gmail.com Thu Feb 4 17:13:33 2016 From: giuseppespinelli88 at gmail.com (Giuseppe Spinelli) Date: Thu, 4 Feb 2016 17:13:33 +0100 Subject: [FieldTrip] segmenting after ICA on continuous data Message-ID: Dear Fieldtrippers I am analyzing a .cnt EEG dataset from a Neuroscan amplifier with an hardware bandpass filter of 0.05-200 Hz. I am having some troubles with segmentation after performing ICA on continuous the continuous EEG trace. Here you find the pipeline I used: %% reading the dataset: subj = 'C:\data\S01.cnt'; cfg = []; cfg.headerfile = subj; cfg.datafile = subj; cfg.continuous = 'yes'; data_cont = ft_preprocessing(cfg); %% running ICA and cleaning data cfg = []; cfg.method = 'runica'; comp = componentanalysis(cfg, data_cont); cfg = []; cfg.component = [1:62]; cfg.layout = 'C:\data\mylayout1010.lay'; cfg.comment = 'no'; ft_topoplotIC(cfg, comp); cfg = []; cfg.channel = [1 3 8]; cfg.viewmode = 'component'; cfg.layout = 'C:\data\mylayout1010.lay'; ft_databrowser(cfg, comp); cfg = []; cfg.component = [1 3]; data_clean = ft_rejectcomponent(cfg, comp, data_cont); Now, in order to segment data I did: cfg = []; cfg.continuous = 'no'; cfg.trailfun = 'ft_trialfun_general'; cfg.trialdef.eventtype = 'stimtype'; cfg.trialdef.eventvalue = 8 cfg.trialdef.prestim = 1; cfg.trialdef.poststim = 4; cfg = ft_definetrial(data_clean); segmented = ft_preprocessing(cfg, data_clean); but, the Command Window retured me with the following error: Reference to non-existent field 'headerfile'. Error in ft_trialfun_general (line 78) hdr = ft_read_header(cfg.headerfile, 'headerformat', cfg.headerformat); Error in ft_definetrial (line 174) [trl, event] = feval(cfg.trialfun, cfg); I cannot get why both the headerfile and the dataset file are needed to be specified again. Could someone help me to figure it out? Many thanks in advance, Giuseppe Spinelli Ph.D. student in Cognitive Social and Affective Neuroscience Department of Psychology, Sapienza University of Rome via dei Marsi 78, 00185 - Rome Phone/Fax: +39 06-49917635 IRCCS Fondazione Santa Lucia via Ardeatina 306, 00179 - Rome Phone: +39 06 5150 1108 @: giuseppe.spinelli at uniroma1.it http://agliotilab.org/ -------------- next part -------------- An HTML attachment was scrubbed... URL: From julian.keil at gmail.com Thu Feb 4 17:32:28 2016 From: julian.keil at gmail.com (Julian Keil) Date: Thu, 4 Feb 2016 17:32:28 +0100 Subject: [FieldTrip] segmenting after ICA on continuous data In-Reply-To: References: Message-ID: <51FA52E0-082A-434A-8955-A422455A9509@gmail.com> Dear Giuseppe, in your trial-definition step you state: cfg = []; cfg.continuous = 'no'; cfg.trailfun = 'ft_trialfun_general'; cfg.trialdef.eventtype = 'stimtype'; cfg.trialdef.eventvalue = 8 cfg.trialdef.prestim = 1; cfg.trialdef.poststim = 4; cfg = ft_definetrial(data_clean); segmented = ft_preprocessing(cfg, data_clean); So, in your call to ft_definetrial, you are not using your cfg-structure. Instead, you overwrite your cfg-structure with the output of the (incorrectly called) ft_definetrial. Here's what you could do instead: Use your cfg from above with cfg.dataset = subj; in your call to ft_definetrial (e.g. cfg = ft_definetrial(cfg)). This gives you the cfg.trl-field with your trial definition. In the next step, you could use ft_redefinetrial to actually split up your (already cleaned) data. Check this tutorial for more info: http://www.fieldtriptoolbox.org/tutorial/continuous Good luck, Julian ******************** Dr. Julian Keil AG Multisensorische Integration Psychiatrische Universitätsklinik der Charité im St. Hedwig-Krankenhaus Große Hamburger Straße 5-11, Raum A007 10115 Berlin Telefon: +49-30-2311-1879 Fax: +49-30-2311-2209 http://psy-ccm.charite.de/forschung/bildgebung/ag_multisensorische_integration Am 04.02.2016 um 17:13 schrieb Giuseppe Spinelli: > Dear Fieldtrippers > > I am analyzing a .cnt EEG dataset from a Neuroscan amplifier with an hardware bandpass filter of 0.05-200 Hz. > I am having some troubles with segmentation after performing ICA on continuous the continuous EEG trace. > > Here you find the pipeline I used: > > %% reading the dataset: > subj = 'C:\data\S01.cnt'; > cfg = []; > cfg.headerfile = subj; > cfg.datafile = subj; > cfg.continuous = 'yes'; > data_cont = ft_preprocessing(cfg); > > %% running ICA and cleaning data > cfg = []; > cfg.method = 'runica'; > comp = componentanalysis(cfg, data_cont); > > cfg = []; > cfg.component = [1:62]; > cfg.layout = 'C:\data\mylayout1010.lay'; > cfg.comment = 'no'; > ft_topoplotIC(cfg, comp); > > cfg = []; > cfg.channel = [1 3 8]; > cfg.viewmode = 'component'; > cfg.layout = 'C:\data\mylayout1010.lay'; > ft_databrowser(cfg, comp); > > cfg = []; > cfg.component = [1 3]; > data_clean = ft_rejectcomponent(cfg, comp, data_cont); > > Now, in order to segment data I did: > > cfg = []; > cfg.continuous = 'no'; > cfg.trailfun = 'ft_trialfun_general'; > cfg.trialdef.eventtype = 'stimtype'; > cfg.trialdef.eventvalue = 8 > cfg.trialdef.prestim = 1; > cfg.trialdef.poststim = 4; > cfg = ft_definetrial(data_clean); > segmented = ft_preprocessing(cfg, data_clean); > > but, the Command Window retured me with the following error: > > Reference to non-existent field 'headerfile'. > > Error in ft_trialfun_general (line 78) > hdr = ft_read_header(cfg.headerfile, 'headerformat', cfg.headerformat); > > Error in ft_definetrial (line 174) > [trl, event] = feval(cfg.trialfun, cfg); > > > I cannot get why both the headerfile and the dataset file are needed to be specified again. > Could someone help me to figure it out? > > Many thanks in advance, > > Giuseppe Spinelli > > Ph.D. student in Cognitive Social and Affective Neuroscience > > Department of Psychology, Sapienza University of Rome > via dei Marsi 78, 00185 - Rome > Phone/Fax: +39 06-49917635 > > IRCCS Fondazione Santa Lucia > via Ardeatina 306, 00179 - Rome > Phone: +39 06 5150 1108 > > @: giuseppe.spinelli at uniroma1.it > http://agliotilab.org/ > _______________________________________________ > 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: signature.asc Type: application/pgp-signature Size: 495 bytes Desc: Message signed with OpenPGP using GPGMail URL: From fah at med.umich.edu Thu Feb 4 19:17:23 2016 From: fah at med.umich.edu (Ahmed, Farah) Date: Thu, 4 Feb 2016 18:17:23 +0000 Subject: [FieldTrip] Define Trial Error with Tutorial Data Message-ID: Hi Everyone, I am student new to FieldTrip and have been going through the tutorials. I am trying to run the ft_definetrial function on the sample data Subject01 from this tutorial page http://www.fieldtriptoolbox.org/tutorial/preprocessing This is the script I'm using (same as the one on the tutorial page) cfg = []; cfg.dataset = 'Subject01.ds'; cfg.trialfun = 'ft_trialfun_general'; % this is the default cfg.trialdef.eventtype = 'backpanel trigger'; cfg.trialdef.eventvalue = 3; % the value of the stimulus trigger for fully incongruent (FIC). cfg.trialdef.prestim = 1; % in seconds cfg.trialdef.poststim = 2; % in seconds cfg = ft_definetrial(cfg); After running that I get these errors: evaluating trialfunction 'ft_trialfun_general' Error using ft_read_header (line 2102) unsupported header format (unknown) Error in ft_trialfun_general (line 78) hdr = ft_read_header(cfg.headerfile, 'headerformat', cfg.headerformat); Error in ft_definetrial (line 174) [trl, event] = feval(cfg.trialfun, cfg); Could someone help guide me as to what I'm doing wrong or missing? Any assistance on solving this is appreciated! Thanks! Best, Farah Ahmed University of Michigan ********************************************************** Electronic Mail is not secure, may not be read every day, and should not be used for urgent or sensitive issues -------------- next part -------------- An HTML attachment was scrubbed... URL: From giovannipellegrino at gmail.com Thu Feb 4 23:24:10 2016 From: giovannipellegrino at gmail.com (Giovanni Pellegrino) Date: Thu, 4 Feb 2016 18:24:10 -0400 Subject: [FieldTrip] PhD and Postdoc positions @ Campus Bio-Medico University, Rome, Italy Message-ID: - Apologies for cross-postings - In the context of the European Research Council Grant “RESHAPE: REstoring the Self with embodiable HAnd ProsthesEs”, we are seeking two outstanding *Post-Doc scientists* and two highly-motivated *PhD students* to join us in developing new tools and methods to improve the embodiment of robotic hand prostheses and study the related brain processes. Activities will be carried out in a multidisciplinary research environment (Clinical Neurophysiology and Neuroengineering) @ Campus Bio-Medico University, Rome Italy (www.unicampus.it). Post-Doc ideal candidates should · - have relevant publications in international journals and experience in fund raising · - be English mother tongue or have almost comparable fluency · - *own at least two of the following expertise*: 1. Programming for development/customization of interactive Virtual/Augmented Reality environment 2. EEG/MRI signal processing 3. Body ownership, embodiment, cognitive neuroscience. PhD Student ideal candidates should · - be English mother tongue or have good fluency · - have a master degree (or equivalent) in o biomedical robotics, biomedical engineering, computer science or other related fields o medicine, neuroscience, neurophysiology or other related fields Suitable candidates can introduce themselves by contacting Giovanni Di Pino (g.dipino at unicampus.it) and Domenico Formica (d.formica at unicampus.it). -- Giovanni Pellegrino, MD Multimodal Functional Imaging Laboratory Montreal Neurological Institute, McGill University Address: 332 Duff Medical Building, 3775 rue University, Montreal, QC, H3A 2B4, Canada Phone: (514) 398–1678 Fax: (514) 398–7461 Email: giovannipellegrino at gmail.com, giovanni.pellegrino2 at mcgill.ca Homepage: http://www.bic.mni.mcgill.ca/ResearchLabsMFIL/PeopleGiovanni -------------- next part -------------- An HTML attachment was scrubbed... URL: From v.piai.research at gmail.com Fri Feb 5 02:32:03 2016 From: v.piai.research at gmail.com (Vitoria Piai) Date: Thu, 4 Feb 2016 17:32:03 -0800 Subject: [FieldTrip] reference for weighted pairwise phase-consistency Message-ID: <56B3FB93.9030008@gmail.com> Hi all, I'm looking for a reference for the *weighted *ppc measure, but can't find any. I know Martin's PPC paper, but I'm trying to figure out what the weighting in the name refers to really, which doesn't seem to be the same reference. Thanks, Vitoria -------------- next part -------------- An HTML attachment was scrubbed... URL: From r.oostenveld at donders.ru.nl Fri Feb 5 09:51:57 2016 From: r.oostenveld at donders.ru.nl (Robert Oostenveld) Date: Fri, 5 Feb 2016 09:51:57 +0100 Subject: [FieldTrip] development now on github, contributions welcome Message-ID: <0CE25B37-29D4-4F53-B972-53D046DAC316@donders.ru.nl> Dear FieldTrip community The toolbox development has completely moved over to http://github.com/fieldtrip. This makes it much simpler for us to incorporate external suggestions and for you to directly contribute to the code. We have a tutorial that explains how you can use git and github at http://www.fieldtriptoolbox.org/development/git. We will continue with our http://www.fieldtriptoolbox.org/bugzilla tracker, but you can also file issues on github, preferably in the form of pull requests that immediately solve the issue in the code. By making the development more open and by using more flexible tools we hope that you will contribute to make FieldTrip even better and to advance the field of MEG and EEG analysis. thanks for taking part in endeavor, the FIeldTrip team From david.pedrosa at ndcn.ox.ac.uk Fri Feb 5 14:47:50 2016 From: david.pedrosa at ndcn.ox.ac.uk (David Pedrosa) Date: Fri, 5 Feb 2016 13:47:50 +0000 Subject: [FieldTrip] ft_sourceanalysis, reshape error Message-ID: Dear list, after installing the newest version of Fieldtrip today, I have encountered a rather strange error . I am tying to compute corticomuscular coherence for an EEG/EMG dataset and it worked well so far. With the new version however, I get a reshape error I find fard to understand. This is the code: cfg = []; cfg.frequency = 20;; cfg.grid = leadfield; cfg.method = 'dics'; cfg.refchan = 'ExtR1'; cfg.channel = {'EEG' 'ExtR1'}; cfg.vol = hdm; cfg.dics.projectnoise = 'no'; cfg.dics.lambda = '1%'; cfg.dics.keepfilter = 'yes'; cfg.dics.keeptrials = 'yes'; cfg.dics.realfilter = 'yes'; sourceAll = ft_sourceanalysis(cfg, freqAll); but this hasn't changed. The error pops up at lines 619/620 of ft_sourceanalysis (Cf = reshape(sum(Cf, 1) / Ntrials, [Nchans Nchans]);), where it supposedly just averages the CSD matrix over trials. And it makes kind of sense as the line says to reshape the CSDs from a 1xNchans matrix into a [Nchans Nchans] one. But why is it poppin up now as nothing has changed in my analyses? I have checked the updates of the last months and I couldn't find anything related to this. So has any one an idea why the analysis crashes at this point. Thanks in advance Best, David ________________________________ Dr. David Pedrosa Clinical Research Fellow Medical Research Council Brain Network Dynamics Unit at the University of Oxford Nuffield Department of Clinical Neurosciences University of Oxford Level 6, West Wing John Radcliffe Hospital, OX3 9DU Tel: +44 (0)1865 572490 E-Mail: david.pedrosa at ndcn.ox.ac.uk http://www.mrcbndu.ox.ac.uk/ -------------- next part -------------- An HTML attachment was scrubbed... URL: From azeez.adebimpe5 at gmail.com Fri Feb 5 14:56:15 2016 From: azeez.adebimpe5 at gmail.com (Azeez Adebimpe) Date: Fri, 5 Feb 2016 08:56:15 -0500 Subject: [FieldTrip] ft_sourceanalysis, reshape error In-Reply-To: References: Message-ID: Hi David, Probably the channels' labels in leadfield and data are not the same. check it and try again. Azeez On Fri, Feb 5, 2016 at 8:47 AM, David Pedrosa wrote: > Dear list, > > after installing the newest version of Fieldtrip today, I have encountered > a rather strange error . I am tying to compute corticomuscular coherence > for an EEG/EMG dataset and it worked well so far. With the new version > however, I get a reshape error I find fard to understand. This is the code: > > cfg = []; > cfg.frequency = 20;; > cfg.grid = leadfield; > cfg.method = 'dics'; > cfg.refchan = 'ExtR1'; > cfg.channel = {'EEG' 'ExtR1'}; > cfg.vol = hdm; > cfg.dics.projectnoise = 'no'; > cfg.dics.lambda = '1%'; > cfg.dics.keepfilter = 'yes'; > cfg.dics.keeptrials = 'yes'; > cfg.dics.realfilter = 'yes'; > sourceAll = ft_sourceanalysis(cfg, freqAll); > > but this hasn't changed. The error pops up at lines 619/620 of > ft_sourceanalysis (Cf = reshape(sum(Cf, 1) / Ntrials, [Nchans Nchans]);), > where it supposedly just averages the CSD matrix over trials. And it makes > kind of sense as the line says to reshape the CSDs from a 1xNchans matrix > into a [Nchans Nchans] one. But why is it poppin up now as nothing has > changed in my analyses? I have checked the updates of the last months and I > couldn't find anything related to this. So has any one an idea why the > analysis crashes at this point. > > Thanks in advance > Best, > David > > ------------------------------ > Dr. David Pedrosa > > Clinical Research Fellow > Medical Research Council Brain Network Dynamics Unit at the University of > Oxford > Nuffield Department of Clinical Neurosciences > University of Oxford > Level 6, West Wing > John Radcliffe Hospital, OX3 9DU > *Tel:* +44 (0)1865 572490 > *E-Mail:* david.pedrosa at ndcn.ox.ac.uk > > http://www.mrcbndu.ox.ac.uk/ > > > _______________________________________________ > 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 david.pedrosa at ndcn.ox.ac.uk Fri Feb 5 15:51:33 2016 From: david.pedrosa at ndcn.ox.ac.uk (David Pedrosa) Date: Fri, 5 Feb 2016 14:51:33 +0000 Subject: [FieldTrip] ft_sourceanalysis, reshape error In-Reply-To: References: , Message-ID: Hi Azeez, thank you for the fast reply! I hadn't considered that but I have checked and I use the same labels for both leadfield and data. I mean it makes kind of sense that the reshape doesn't work as it is now, but I don't know where the problem is before. Can you think of anything else? Best, David ________________________________ Dr. David Pedrosa Clinical Research Fellow Medical Research Council Brain Network Dynamics Unit at the University of Oxford Nuffield Department of Clinical Neurosciences University of Oxford Level 6, West Wing John Radcliffe Hospital, OX3 9DU Tel: +44 (0)1865 572490 E-Mail: david.pedrosa at ndcn.ox.ac.uk http://www.mrcbndu.ox.ac.uk/ ________________________________ Von: fieldtrip-bounces at science.ru.nl [fieldtrip-bounces at science.ru.nl]" im Auftrag von "Azeez Adebimpe [azeez.adebimpe5 at gmail.com] Gesendet: Freitag, 5. Februar 2016 13:56 An: FieldTrip discussion list Betreff: Re: [FieldTrip] ft_sourceanalysis, reshape error Hi David, Probably the channels' labels in leadfield and data are not the same. check it and try again. Azeez On Fri, Feb 5, 2016 at 8:47 AM, David Pedrosa > wrote: Dear list, after installing the newest version of Fieldtrip today, I have encountered a rather strange error . I am tying to compute corticomuscular coherence for an EEG/EMG dataset and it worked well so far. With the new version however, I get a reshape error I find fard to understand. This is the code: cfg = []; cfg.frequency = 20;; cfg.grid = leadfield; cfg.method = 'dics'; cfg.refchan = 'ExtR1'; cfg.channel = {'EEG' 'ExtR1'}; cfg.vol = hdm; cfg.dics.projectnoise = 'no'; cfg.dics.lambda = '1%'; cfg.dics.keepfilter = 'yes'; cfg.dics.keeptrials = 'yes'; cfg.dics.realfilter = 'yes'; sourceAll = ft_sourceanalysis(cfg, freqAll); but this hasn't changed. The error pops up at lines 619/620 of ft_sourceanalysis (Cf = reshape(sum(Cf, 1) / Ntrials, [Nchans Nchans]);), where it supposedly just averages the CSD matrix over trials. And it makes kind of sense as the line says to reshape the CSDs from a 1xNchans matrix into a [Nchans Nchans] one. But why is it poppin up now as nothing has changed in my analyses? I have checked the updates of the last months and I couldn't find anything related to this. So has any one an idea why the analysis crashes at this point. Thanks in advance Best, David ________________________________ Dr. David Pedrosa Clinical Research Fellow Medical Research Council Brain Network Dynamics Unit at the University of Oxford Nuffield Department of Clinical Neurosciences University of Oxford Level 6, West Wing John Radcliffe Hospital, OX3 9DU Tel: +44 (0)1865 572490 E-Mail: david.pedrosa at ndcn.ox.ac.uk http://www.mrcbndu.ox.ac.uk/ _______________________________________________ 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 azeez.adebimpe5 at gmail.com Fri Feb 5 23:44:12 2016 From: azeez.adebimpe5 at gmail.com (Azeez Adebimpe) Date: Fri, 5 Feb 2016 17:44:12 -0500 Subject: [FieldTrip] ft_sourceanalysis, reshape error In-Reply-To: References: Message-ID: Hi David, Sorry for late reply, I was on the journey. The same issue happened to me before when the labels in the leadfield and data were not the same. if you have 'Fp1' in leadfield and 'FP1' in data, it will view as different channels. Azeez On Fri, Feb 5, 2016 at 9:51 AM, David Pedrosa wrote: > Hi Azeez, > > thank you for the fast reply! > I hadn't considered that but I have checked and I use the same labels for > both leadfield and data. > > I mean it makes kind of sense that the reshape doesn't work as it is now, > but I don't know where the problem is before. > > Can you think of anything else? > > Best, > David > > ------------------------------ > Dr. David Pedrosa > > Clinical Research Fellow > Medical Research Council Brain Network Dynamics Unit at the University of > Oxford > Nuffield Department of Clinical Neurosciences > University of Oxford > Level 6, West Wing > John Radcliffe Hospital, OX3 9DU > *Tel:* +44 (0)1865 572490 > *E-Mail:* david.pedrosa at ndcn.ox.ac.uk > > http://www.mrcbndu.ox.ac.uk/ > > ------------------------------ > *Von:* fieldtrip-bounces at science.ru.nl [fieldtrip-bounces at science.ru.nl]" > im Auftrag von "Azeez Adebimpe [azeez.adebimpe5 at gmail.com] > *Gesendet:* Freitag, 5. Februar 2016 13:56 > *An:* FieldTrip discussion list > *Betreff:* Re: [FieldTrip] ft_sourceanalysis, reshape error > > Hi David, > > Probably the channels' labels in leadfield and data are not the same. > > check it and try again. > > Azeez > > On Fri, Feb 5, 2016 at 8:47 AM, David Pedrosa > wrote: > >> Dear list, >> >> after installing the newest version of Fieldtrip today, I have >> encountered a rather strange error . I am tying to compute corticomuscular >> coherence for an EEG/EMG dataset and it worked well so far. With the new >> version however, I get a reshape error I find fard to understand. This is >> the code: >> >> cfg = []; >> cfg.frequency = 20;; >> cfg.grid = leadfield; >> cfg.method = 'dics'; >> cfg.refchan = 'ExtR1'; >> cfg.channel = {'EEG' 'ExtR1'}; >> cfg.vol = hdm; >> cfg.dics.projectnoise = 'no'; >> cfg.dics.lambda = '1%'; >> cfg.dics.keepfilter = 'yes'; >> cfg.dics.keeptrials = 'yes'; >> cfg.dics.realfilter = 'yes'; >> sourceAll = ft_sourceanalysis(cfg, freqAll); >> >> but this hasn't changed. The error pops up at lines 619/620 of >> ft_sourceanalysis (Cf = reshape(sum(Cf, 1) / Ntrials, [Nchans Nchans]);), >> where it supposedly just averages the CSD matrix over trials. And it makes >> kind of sense as the line says to reshape the CSDs from a 1xNchans matrix >> into a [Nchans Nchans] one. But why is it poppin up now as nothing has >> changed in my analyses? I have checked the updates of the last months and I >> couldn't find anything related to this. So has any one an idea why the >> analysis crashes at this point. >> >> Thanks in advance >> Best, >> David >> >> ------------------------------ >> Dr. David Pedrosa >> >> Clinical Research Fellow >> Medical Research Council Brain Network Dynamics Unit at the University of >> Oxford >> Nuffield Department of Clinical Neurosciences >> University of Oxford >> Level 6, West Wing >> John Radcliffe Hospital, OX3 9DU >> *Tel:* +44 (0)1865 572490 >> *E-Mail:* david.pedrosa at ndcn.ox.ac.uk >> >> http://www.mrcbndu.ox.ac.uk/ >> >> >> _______________________________________________ >> 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 giuseppespinelli88 at gmail.com Sat Feb 6 00:38:43 2016 From: giuseppespinelli88 at gmail.com (Giuseppe Spinelli) Date: Sat, 6 Feb 2016 00:38:43 +0100 Subject: [FieldTrip] segmenting after ICA on continuous data In-Reply-To: <51FA52E0-082A-434A-8955-A422455A9509@gmail.com> References: <51FA52E0-082A-434A-8955-A422455A9509@gmail.com> Message-ID: Hi Julian, got the point! Now it works. thanks for the fast reply, Giuseppe 2016-02-04 17:32 GMT+01:00 Julian Keil : > Dear Giuseppe, > > in your trial-definition step you state: > > cfg = []; > cfg.continuous = 'no'; > cfg.trailfun = 'ft_trialfun_general'; > cfg.trialdef.eventtype = 'stimtype'; > cfg.trialdef.eventvalue = 8 > cfg.trialdef.prestim = 1; > cfg.trialdef.poststim = 4; > cfg = ft_definetrial(data_clean); > segmented = ft_preprocessing(cfg, data_clean); > > So, in your call to ft_definetrial, you are not using your cfg-structure. > Instead, you overwrite your cfg-structure with the output of the > (incorrectly called) ft_definetrial. > > Here's what you could do instead: > Use your cfg from above with cfg.dataset = subj; in your call to > ft_definetrial (e.g. cfg = ft_definetrial(cfg)). > This gives you the cfg.trl-field with your trial definition. > In the next step, you could use ft_redefinetrial to actually split up your > (already cleaned) data. > > Check this tutorial for more info: > http://www.fieldtriptoolbox.org/tutorial/continuous > > Good luck, > > Julian > > > ******************** > *Dr. Julian Keil* > > AG Multisensorische Integration > Psychiatrische Universitätsklinik > der Charité im St. Hedwig-Krankenhaus > Große Hamburger Straße 5-11, Raum A007 > 10115 Berlin > > Telefon: +49-30-2311-1879 > Fax: +49-30-2311-2209 > > http://psy-ccm.charite.de/forschung/bildgebung/ag_multisensorische_integration > > Am 04.02.2016 um 17:13 schrieb Giuseppe Spinelli: > > Dear Fieldtrippers > > I am analyzing a .cnt EEG dataset from a Neuroscan amplifier with an > hardware bandpass filter of 0.05-200 Hz. > I am having some troubles with segmentation after performing ICA on > continuous the continuous EEG trace. > > Here you find the pipeline I used: > > %% reading the dataset: > subj = 'C:\data\S01.cnt'; > cfg = []; > cfg.headerfile = subj; > cfg.datafile = subj; > cfg.continuous = 'yes'; > data_cont = ft_preprocessing(cfg); > > %% running ICA and cleaning data > cfg = []; > cfg.method = 'runica'; > comp = componentanalysis(cfg, data_cont); > > cfg = []; > cfg.component = [1:62]; > cfg.layout = 'C:\data\mylayout1010.lay'; > cfg.comment = 'no'; > ft_topoplotIC(cfg, comp); > > cfg = []; > cfg.channel = [1 3 8]; > cfg.viewmode = 'component'; > cfg.layout = 'C:\data\mylayout1010.lay'; > ft_databrowser(cfg, comp); > > cfg = []; > cfg.component = [1 3]; > data_clean = ft_rejectcomponent(cfg, comp, data_cont); > > Now, in order to segment data I did: > > cfg = []; > cfg.continuous = 'no'; > cfg.trailfun = 'ft_trialfun_general'; > cfg.trialdef.eventtype = 'stimtype'; > cfg.trialdef.eventvalue = 8 > cfg.trialdef.prestim = 1; > cfg.trialdef.poststim = 4; > cfg = ft_definetrial(data_clean); > segmented = ft_preprocessing(cfg, data_clean); > > but, the Command Window retured me with the following error: > > Reference to non-existent field 'headerfile'. > > Error in ft_trialfun_general (line 78) > hdr = ft_read_header(cfg.headerfile, 'headerformat', cfg.headerformat); > > Error in ft_definetrial (line 174) > [trl, event] = feval(cfg.trialfun, cfg); > > > I cannot get why both the headerfile and the dataset file are needed to be > specified again. > Could someone help me to figure it out? > > Many thanks in advance, > > Giuseppe Spinelli > > Ph.D. student in Cognitive Social and Affective Neuroscience > > Department of Psychology, Sapienza University of Rome > via dei Marsi 78, 00185 - Rome > Phone/Fax: +39 06-49917635 > > IRCCS Fondazione Santa Lucia > via Ardeatina 306, 00179 - Rome > Phone: +39 06 5150 1108 > > @: giuseppe.spinelli at uniroma1.it > http://agliotilab.org/ > _______________________________________________ > 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 > -- Giuseppe Spinelli Ph.D. student in Cognitive Social and Affective Neuroscience Department of Psychology, Sapienza University of Rome via dei Marsi 78, 00185 - Rome Phone/Fax: +39 06-49917635 IRCCS Fondazione Santa Lucia via Ardeatina 306, 00179 - Rome Phone: +39 06 5150 1108 @: giuseppe.spinelli at uniroma1.it http://agliotilab.org/ -------------- next part -------------- An HTML attachment was scrubbed... URL: From brian.roach at ncire.org Sat Feb 6 19:38:29 2016 From: brian.roach at ncire.org (brian.roach at ncire.org) Date: Sat, 6 Feb 2016 10:38:29 -0800 (PST) Subject: [FieldTrip] EEG/fMRI Data Analyst Job Opportunity in San Francisco Message-ID: <1454783909.281318299@mail.ncire.org> Dear List Members, I am writing to share a data analyst job opportunity in a schizophrenia brain imaging research lab located in San Francisco, CA: [ https://rew21.ultipro.com/NOR1032/jobboard/JobDetails.aspx?__ID=*0C72706CFB87418F ]( https://rew21.ultipro.com/NOR1032/jobboard/JobDetails.aspx?__ID=*0C72706CFB87418F ) Please share this link with anyone you believe would be qualified and interested. Thank you, Brian Roach -------------- next part -------------- An HTML attachment was scrubbed... URL: From leilayou_54 at yahoo.com Mon Feb 8 12:51:05 2016 From: leilayou_54 at yahoo.com (Leila Ayoubian) Date: Mon, 8 Feb 2016 11:51:05 +0000 (UTC) Subject: [FieldTrip] importing large edf data In-Reply-To: References: Message-ID: <1195829915.655104.1454932265573.JavaMail.yahoo@mail.yahoo.com> Hi Stephen:I just happen to realize that when I load the data as you mentioned below, I can not get hold of the real time of the EEG file. (e.g.18:32:43 ).Could you please point out as how I could retrieve the real time of the EEG file after loading. Thanks a lot.Kind regards __________________________________________________ Leila Ayoubian, PhD. Institute of Psychiatry, Psychology and Neuroscience King's College London From: Stephen Politzer-Ahles To: fieldtrip at science.ru.nl Sent: Friday, December 18, 2015 12:37 PM Subject: Re: [FieldTrip] importing large edf data Hello Leila, I think there are a few possible options for you. If you're not interested in analyzing high frequencies, then you could import the data one sample at a time, downsampling each channel, and then concatenate the channels into one structure, as described in http://www.fieldtriptoolbox.org/faq/how_can_i_preprocess_a_dataset_that_is_too_large_to_fit_into_memory. I don't know what your sampling rate was, but if your sampling rate was extremely high then this can save you a lot of space. For example, if you're only interested in frequencies up to high gamma (around 90-100 Hz), then your data only need to be sampled at around 250 Hz (per the Nyquist theorem, plus a little extra wiggle room), so if you sampled at e.g. 2500 Hz (which our EDF system does by default) or 5000 Hz then you have way more samples than necessary; downsampling like this will greatly reduce your array size. If that is not an option, then you can read in a segment of data as a 'trial'. ft_preprocessing understands trial start and end times from cfg.trl, which minimally is an Nx3 matrix (N is the number of trials to read, and the columns are the start sample for each trial, the end sample for each trial, and the trigger value associated with the trial; you could just put 0 if there's no trigger). So let's say you want to read the first through thousandth sample of the recording, then you would set up your cfg as normal, then add: cfg.trl = [1 1000 0]; and then use ft_preprocessing. By way of example, here is code that reads in raw data as a series of 1-second "trials": cfg = []; cfg.dataset = 'C:\Users\Steve\Desktop\subj2.vhdr'; cfg.trialdef.triallength = 1; % see documentation for ft_definetrial for an explanation of these parameters cfg.trialdef.ntrials = Inf; cfg = ft_definetrial( cfg ); cfg.continuous = 'yes'; data = ft_preprocessing(cfg); After doing whatever you need to these trials, you could concatenate them back into continuous data (see http://mailman.science.ru.nl/pipermail/fieldtrip/2011-June/003971.html for details). Best, Steve --- Stephen Politzer-Ahles University of Oxford Language and Brain Lab Faculty of Linguistics, Phonetics & Philology http://users.ox.ac.uk/~cpgl0080/ On Fri, Dec 18, 2015 at 11:00 AM, wrote: Send fieldtrip mailing list submissions to         fieldtrip at science.ru.nl To subscribe or unsubscribe via the World Wide Web, visit         http://mailman.science.ru.nl/mailman/listinfo/fieldtrip or, via email, send a message with subject or body 'help' to         fieldtrip-request at science.ru.nl You can reach the person managing the list at         fieldtrip-owner at science.ru.nl When replying, please edit your Subject line so it is more specific than "Re: Contents of fieldtrip digest..." Today's Topics:    1. importing large edf data (Leila Ayoubian) ---------------------------------------------------------------------- Message: 1 Date: Fri, 18 Dec 2015 09:43:43 +0000 (UTC) From: Leila Ayoubian To: "fieldtrip at science.ru.nl" Subject: [FieldTrip] importing large edf data Message-ID:         <807603762.476165.1450431823359.JavaMail.yahoo at mail.yahoo.com> Content-Type: text/plain; charset="utf-8" Hi:Thanks for providing us with this amazing toolbox. I am new to fieldtrip. I am trying to import EEG data in the format of *.edf for the purpose of seizure detection for epileptic patients. I can't break up the data as you understand the detection has to have continuous data. However I could load section of the data at a time and clear what is already used and reload again.? So trying to load the data like this: cfg.dataset= ('mydata.edf'); rawdata=ft_preprocessing(cfg); This is the error message I get : %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% Error using zeros Requested 51x51927040 (19.7GB) array exceeds maximum array size preference. Creation of arrays greater than this limit may take a long time and cause MATLAB to become unresponsive. See array size limit or preference panel for more information. Error in read_edf (line 403) ? dat = zeros(length(chanindx),nepochs*epochlength); Error in ft_read_data (line 622) ??? dat = read_edf(filename, hdr, begsample, endsample, chanindx); Error in ft_preprocessing (line 566) ????? dat = ft_read_data(cfg.datafile, 'header', hdr, 'begsample', begsample, 'endsample', endsample, 'chanindx', rawindx, 'checkboundary', ????? strcmp(cfg.continuous, 'no'), 'dataformat', cfg.dataformat); Error in ReadFedfiles (line 8) rawdata=ft_preprocessing(cfg);%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% I tried the ft_redefinetrial, but since the input to this file is the output from ft-PREPROCESSING it gives me the same error. I also tried to use ft_read_data to choose the samples I want to load :?filename???? = 'mydata.edf' ?hdr?? = ft_read_header(filename); ?sample.start=1 ?sample.end=100 dat = ft_read_data(filename,'sample.start','1','sample.end','100') and here is again the error message: Error using zeros Requested 51x51927040 (19.7GB) array exceeds maximum array size preference. Creation of arrays greater than this limit may take a long time and cause MATLAB to become unresponsive. See array size limit or preference panel for more information. Error in read_edf (line 403) ? dat = zeros(length(chanindx),nepochs*epochlength); Error in ft_read_data (line 622) ??? dat = read_edf(filename, hdr, begsample, endsample, chanindx); Error in ReadFedfiles (line 31) dat = ft_read_data(filename,'sample.start','1','sample.end','100') ? >> Could you please direct me as to which functions and in which order I should be using the functions to load data in smaller samples.Some examples would be useful. Thanks again for your support and assistance. We appreciate your effort. Kind regards ___________________________________________________ Dr. Leila Ayoubian -------------- next part -------------- An HTML attachment was scrubbed... URL: ------------------------------ _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip End of fieldtrip Digest, Vol 61, Issue 14 ***************************************** _______________________________________________ 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 sreenivasan.r.nadar at gmail.com Mon Feb 8 19:50:58 2016 From: sreenivasan.r.nadar at gmail.com (Sreenivasan R. Nadar, Ph.D.) Date: Mon, 8 Feb 2016 13:50:58 -0500 Subject: [FieldTrip] Neuromag/ Elekta 306 layout file Message-ID: Fieldtripers, Anybody has a layout file for Elekta/Neuromag system? I downloaded the file from the following discussion list: http://mailman.science.ru.nl/pipermail/fieldtrip/2007-March/001019.html. However, this layout file give errors (i.e., Attempt to reference field of non-structure array) when I use it for ft_topoplotIC(cfg,components). Am I missing something? I used the following commands: %~~~~~~~~~~~~~~~ clear all cfg = []; cfg.dataset = 'C071_resting_150608.fif'; cfg.hpfilter = 'yes' cfg.hpfreq = 1; cfg.channel = {'MEG', '-STI001', '-STI002','-STI003','-STI004', '-STI005',..., '-STI006','-STI007','-STI008','-STI101','-STI201','-STI301'}; data_continuous = ft_preprocessing(cfg); %resample the data to 100Hz cfg = []; cfg.resamplefs = 100; [data] = ft_resampledata(cfg, data_continuous) %% running ICA and cleaning data cfg = []; cfg.method = 'runica'; comp = ft_componentanalysis(cfg, data); cfg = []; cfg.component = [1:50]; cfg.layout = 'NM306all.mat'; cfg.comment = 'no'; ft_topoplotIC(cfg, comp); %~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Thank you Sreenivasan -------------- next part -------------- An HTML attachment was scrubbed... URL: From pgoodin at swin.edu.au Mon Feb 8 20:44:39 2016 From: pgoodin at swin.edu.au (Peter Goodin) Date: Mon, 8 Feb 2016 19:44:39 +0000 Subject: [FieldTrip] Neuromag/ Elekta 306 layout file Message-ID: <620434cf-fd54-4ba5-b262-62e6170cba1c@email.android.com> Hi Sreenivasan, Try using the neuromag306all.lay and neuromag306cmb.lay layout files. Peter On 9 Feb 2016 6:10 AM, "Sreenivasan R. Nadar, Ph.D." wrote: Fieldtripers, Anybody has a layout file for Elekta/Neuromag system? I downloaded the file from the following discussion list: http://mailman.science.ru.nl/pipermail/fieldtrip/2007-March/001019.html. However, this layout file give errors (i.e., Attempt to reference field of non-structure array) when I use it for ft_topoplotIC(cfg,components). Am I missing something? I used the following commands: %~~~~~~~~~~~~~~~ clear all cfg = []; cfg.dataset = 'C071_resting_150608.fif'; cfg.hpfilter = 'yes' cfg.hpfreq = 1; cfg.channel = {'MEG', '-STI001', '-STI002','-STI003','-STI004', '-STI005',..., '-STI006','-STI007','-STI008','-STI101','-STI201','-STI301'}; data_continuous = ft_preprocessing(cfg); %resample the data to 100Hz cfg = []; cfg.resamplefs = 100; [data] = ft_resampledata(cfg, data_continuous) %% running ICA and cleaning data cfg = []; cfg.method = 'runica'; comp = ft_componentanalysis(cfg, data); cfg = []; cfg.component = [1:50]; cfg.layout = 'NM306all.mat'; cfg.comment = 'no'; ft_topoplotIC(cfg, comp); %~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Thank you Sreenivasan -------------- next part -------------- An HTML attachment was scrubbed... URL: From sreenivasan.r.nadar at gmail.com Mon Feb 8 20:51:46 2016 From: sreenivasan.r.nadar at gmail.com (Sreenivasan R. Nadar, Ph.D.) Date: Mon, 8 Feb 2016 14:51:46 -0500 Subject: [FieldTrip] Neuromag/ Elekta 306 layout file In-Reply-To: <620434cf-fd54-4ba5-b262-62e6170cba1c@email.android.com> References: <620434cf-fd54-4ba5-b262-62e6170cba1c@email.android.com> Message-ID: Hi Peter, Thanks. Yes, I also tried the ascii format neuromag306all.lay and neuromag306cmb.lay but no luck!! -Sreenivasan On Mon, Feb 8, 2016 at 2:44 PM, Peter Goodin wrote: > Hi Sreenivasan, > > Try using the neuromag306all.lay and neuromag306cmb.lay layout files. > > Peter > On 9 Feb 2016 6:10 AM, "Sreenivasan R. Nadar, Ph.D." < > sreenivasan.r.nadar at gmail.com> wrote: > > Fieldtripers, > > Anybody has a layout file for Elekta/Neuromag system? I downloaded the > file from the following discussion list: > http://mailman.science.ru.nl/pipermail/fieldtrip/2007-March/001019.html. > However, this layout file give errors (i.e., Attempt to reference field of > non-structure array) when I use it for ft_topoplotIC(cfg,components). Am I > missing something? I used the following commands: > > %~~~~~~~~~~~~~~~ > clear all > > cfg = []; > cfg.dataset = 'C071_resting_150608.fif'; > cfg.hpfilter = 'yes' > cfg.hpfreq = 1; > cfg.channel = {'MEG', '-STI001', '-STI002','-STI003','-STI004', > '-STI005',..., > '-STI006','-STI007','-STI008','-STI101','-STI201','-STI301'}; > > data_continuous = ft_preprocessing(cfg); > > %resample the data to 100Hz > cfg = []; > cfg.resamplefs = 100; > [data] = ft_resampledata(cfg, data_continuous) > > %% running ICA and cleaning data > cfg = []; > cfg.method = 'runica'; > comp = ft_componentanalysis(cfg, data); > > cfg = []; > cfg.component = [1:50]; > cfg.layout = 'NM306all.mat'; > cfg.comment = 'no'; > ft_topoplotIC(cfg, comp); > > %~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ > Thank you > > Sreenivasan > > > > _______________________________________________ > 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 stephen.politzer-ahles at ling-phil.ox.ac.uk Tue Feb 9 12:19:12 2016 From: stephen.politzer-ahles at ling-phil.ox.ac.uk (Stephen Politzer-Ahles) Date: Tue, 9 Feb 2016 11:19:12 +0000 Subject: [FieldTrip] importing large edf data Message-ID: Hi Leila, I'm sorry but I'm afraid I have not quite understood your issue. Can you give some more detail about what the problem is? In general, the fieldtrip structure output by ft_preprocessing() should have a .time field (indicating what timepoint during the epoch each sample corresponds to) and an .fsample field indicating the sampling rate (which you would also be able to use to figure out the time of each sample). Best, Steve --- Stephen Politzer-Ahles University of Oxford Language and Brain Lab Faculty of Linguistics, Phonetics & Philology http://users.ox.ac.uk/~cpgl0080/ > Message: 1 > Date: Mon, 8 Feb 2016 11:51:05 +0000 (UTC) > From: Leila Ayoubian > To: FieldTrip discussion list > Subject: Re: [FieldTrip] importing large edf data > Message-ID: > <1195829915.655104.1454932265573.JavaMail.yahoo at mail.yahoo.com> > Content-Type: text/plain; charset="utf-8" > > Hi Stephen:I just happen to realize that when I load the data as you > mentioned below, I can not get hold of the real time of the EEG file. > (e.g.18:32:43 ).Could you please point out as how I could retrieve the real > time of the EEG file after loading. > Thanks a lot.Kind regards > __________________________________________________ Leila Ayoubian, PhD. > Institute of Psychiatry, Psychology and Neuroscience > King's College London > > > > > From: Stephen Politzer-Ahles < > stephen.politzer-ahles at ling-phil.ox.ac.uk> > To: fieldtrip at science.ru.nl > Sent: Friday, December 18, 2015 12:37 PM > Subject: Re: [FieldTrip] importing large edf data > > Hello Leila, > > I think there are a few possible options for you. If you're not interested > in analyzing high frequencies, then you could import the data one sample at > a time, downsampling each channel, and then concatenate the channels into > one structure, as described in > http://www.fieldtriptoolbox.org/faq/how_can_i_preprocess_a_dataset_that_is_too_large_to_fit_into_memory. > I don't know what your sampling rate was, but if your sampling rate was > extremely high then this can save you a lot of space. For example, if > you're only interested in frequencies up to high gamma (around 90-100 Hz), > then your data only need to be sampled at around 250 Hz (per the Nyquist > theorem, plus a little extra wiggle room), so if you sampled at e.g. 2500 > Hz (which our EDF system does by default) or 5000 Hz then you have way more > samples than necessary; downsampling like this will greatly reduce your > array size. > > > > If that is not an option, then you can read in a segment of data as a > 'trial'. ft_preprocessing understands trial start and end times from > cfg.trl, which minimally is an Nx3 matrix (N is the number of trials to > read, and the columns are the start sample for each trial, the end sample > for each trial, and the trigger value associated with the trial; you could > just put 0 if there's no trigger). So let's say you want to read the first > through thousandth sample of the recording, then you would set up your cfg > as normal, then add: > > cfg.trl = [1 1000 0]; > > and then use ft_preprocessing. > > By way of example, here is code that reads in raw data as a series of > 1-second "trials": > > cfg = []; > cfg.dataset = 'C:\Users\Steve\Desktop\subj2.vhdr'; > cfg.trialdef.triallength = 1; % see documentation for ft_definetrial for > an explanation of these parameters > cfg.trialdef.ntrials = Inf; > cfg = ft_definetrial( cfg ); > > cfg.continuous = 'yes'; > data = ft_preprocessing(cfg); > > After doing whatever you need to these trials, you could concatenate them > back into continuous data (see > http://mailman.science.ru.nl/pipermail/fieldtrip/2011-June/003971.html > for details). > > Best, > Steve > > --- > Stephen Politzer-Ahles > University of Oxford > Language and Brain Lab > Faculty of Linguistics, Phonetics & Philology > http://users.ox.ac.uk/~cpgl0080/ > On Fri, Dec 18, 2015 at 11:00 AM, wrote: > > Send fieldtrip mailing list submissions to > ? ? ? ? fieldtrip at science.ru.nl > > To subscribe or unsubscribe via the World Wide Web, visit > ? ? ? ? http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > or, via email, send a message with subject or body 'help' to > ? ? ? ? fieldtrip-request at science.ru.nl > > You can reach the person managing the list at > ? ? ? ? fieldtrip-owner at science.ru.nl > > When replying, please edit your Subject line so it is more specific > than "Re: Contents of fieldtrip digest..." > > > Today's Topics: > > ? ?1. importing large edf data (Leila Ayoubian) > > > ---------------------------------------------------------------------- > > Message: 1 > Date: Fri, 18 Dec 2015 09:43:43 +0000 (UTC) > From: Leila Ayoubian > To: "fieldtrip at science.ru.nl" > Subject: [FieldTrip] importing large edf data > Message-ID: > ? ? ? ? <807603762.476165.1450431823359.JavaMail.yahoo at mail.yahoo.com> > Content-Type: text/plain; charset="utf-8" > > Hi:Thanks for providing us with this amazing toolbox. > I am new to fieldtrip. I am trying to import EEG data in the format of > *.edf for the purpose of seizure detection for epileptic patients. I can't > break up the data as you understand the detection has to have continuous > data. However I could load section of the data at a time and clear what is > already used and reload again.? > So trying to load the data like this: > cfg.dataset= ('mydata.edf'); > rawdata=ft_preprocessing(cfg); > This is the error message I get : > %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% > Error using zeros > Requested 51x51927040 (19.7GB) array exceeds maximum array size > preference. Creation of arrays greater than this limit may take a long time > and cause MATLAB to become unresponsive. See array size limit or > preference panel for more information. > > Error in read_edf (line 403) > ? dat = zeros(length(chanindx),nepochs*epochlength); > > Error in ft_read_data (line 622) > ??? dat = read_edf(filename, hdr, begsample, endsample, chanindx); > > Error in ft_preprocessing (line 566) > ????? dat = ft_read_data(cfg.datafile, 'header', hdr, 'begsample', > begsample, 'endsample', endsample, 'chanindx', rawindx, 'checkboundary', > ????? strcmp(cfg.continuous, 'no'), 'dataformat', cfg.dataformat); > > Error in ReadFedfiles (line 8) > > rawdata=ft_preprocessing(cfg);%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% > I tried the ft_redefinetrial, but since the input to this file is the > output from ft-PREPROCESSING it gives me the same error. > > > I also tried to use ft_read_data to choose the samples I want to load > :?filename???? = 'mydata.edf' > ?hdr?? = ft_read_header(filename); > ?sample.start=1 > ?sample.end=100 > dat = ft_read_data(filename,'sample.start','1','sample.end','100') > and here is again the error message: > Error using zeros > Requested 51x51927040 (19.7GB) array exceeds maximum array size > preference. Creation of arrays greater than this limit may take a > long time and cause MATLAB to become unresponsive. See array size limit or > preference panel for more information. > > Error in read_edf (line 403) > ? dat = zeros(length(chanindx),nepochs*epochlength); > > Error in ft_read_data (line 622) > ??? dat = read_edf(filename, hdr, begsample, endsample, chanindx); > > Error in ReadFedfiles (line 31) > dat = ft_read_data(filename,'sample.start','1','sample.end','100') > ? > >> > > Could you please direct me as to which functions and in which order I > should be using the functions to load data in smaller samples.Some examples > would be useful. > Thanks again for your support and assistance. > We appreciate your effort. > Kind regards > > ___________________________________________________ Dr. Leila Ayoubian > -------------- next part -------------- > An HTML attachment was scrubbed... > URL: < > http://mailman.science.ru.nl/pipermail/fieldtrip/attachments/20151218/6dfa7ce1/attachment-0001.html > > > > ------------------------------ > > _____________ > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From a.stolk8 at gmail.com Tue Feb 9 16:32:20 2016 From: a.stolk8 at gmail.com (Arjen Stolk) Date: Tue, 9 Feb 2016 07:32:20 -0800 Subject: [FieldTrip] importing large edf data In-Reply-To: References: Message-ID: <0817816F-2E1F-4CA9-8AA3-FABFE63A47DD@gmail.com> Hi both, There might be information on the date and time of recording in the orig field of the header, if that's what you're looking for. Don't know the name of the subfield from the top of my head. Arjen > On Feb 9, 2016, at 3:19 AM, Stephen Politzer-Ahles wrote: > > Hi Leila, > > I'm sorry but I'm afraid I have not quite understood your issue. Can you give some more detail about what the problem is? > > In general, the fieldtrip structure output by ft_preprocessing() should have a .time field (indicating what timepoint during the epoch each sample corresponds to) and an .fsample field indicating the sampling rate (which you would also be able to use to figure out the time of each sample). > > Best, > Steve > > > > --- > Stephen Politzer-Ahles > University of Oxford > Language and Brain Lab > Faculty of Linguistics, Phonetics & Philology > http://users.ox.ac.uk/~cpgl0080/ > >> Message: 1 >> Date: Mon, 8 Feb 2016 11:51:05 +0000 (UTC) >> From: Leila Ayoubian >> To: FieldTrip discussion list >> Subject: Re: [FieldTrip] importing large edf data >> Message-ID: >> <1195829915.655104.1454932265573.JavaMail.yahoo at mail.yahoo.com> >> Content-Type: text/plain; charset="utf-8" >> >> Hi Stephen:I just happen to realize that when I load the data as you mentioned below, I can not get hold of the real time of the EEG file. (e.g.18:32:43 ).Could you please point out as how I could retrieve the real time of the EEG file after loading. >> Thanks a lot.Kind regards >> __________________________________________________ Leila Ayoubian, PhD. >> Institute of Psychiatry, Psychology and Neuroscience >> King's College London >> >> >> >> >> From: Stephen Politzer-Ahles >> To: fieldtrip at science.ru.nl >> Sent: Friday, December 18, 2015 12:37 PM >> Subject: Re: [FieldTrip] importing large edf data >> >> Hello Leila, >> >> I think there are a few possible options for you. If you're not interested in analyzing high frequencies, then you could import the data one sample at a time, downsampling each channel, and then concatenate the channels into one structure, as described in http://www.fieldtriptoolbox.org/faq/how_can_i_preprocess_a_dataset_that_is_too_large_to_fit_into_memory. I don't know what your sampling rate was, but if your sampling rate was extremely high then this can save you a lot of space. For example, if you're only interested in frequencies up to high gamma (around 90-100 Hz), then your data only need to be sampled at around 250 Hz (per the Nyquist theorem, plus a little extra wiggle room), so if you sampled at e.g. 2500 Hz (which our EDF system does by default) or 5000 Hz then you have way more samples than necessary; downsampling like this will greatly reduce your array size. >> >> >> >> If that is not an option, then you can read in a segment of data as a 'trial'. ft_preprocessing understands trial start and end times from cfg.trl, which minimally is an Nx3 matrix (N is the number of trials to read, and the columns are the start sample for each trial, the end sample for each trial, and the trigger value associated with the trial; you could just put 0 if there's no trigger). So let's say you want to read the first through thousandth sample of the recording, then you would set up your cfg as normal, then add: >> >> cfg.trl = [1 1000 0]; >> >> and then use ft_preprocessing. >> >> By way of example, here is code that reads in raw data as a series of 1-second "trials": >> >> cfg = []; >> cfg.dataset = 'C:\Users\Steve\Desktop\subj2.vhdr'; >> cfg.trialdef.triallength = 1; % see documentation for ft_definetrial for an explanation of these parameters >> cfg.trialdef.ntrials = Inf; >> cfg = ft_definetrial( cfg ); >> >> cfg.continuous = 'yes'; >> data = ft_preprocessing(cfg); >> >> After doing whatever you need to these trials, you could concatenate them back into continuous data (see http://mailman.science.ru.nl/pipermail/fieldtrip/2011-June/003971.html for details). >> >> Best, >> Steve >> >> --- >> Stephen Politzer-Ahles >> University of Oxford >> Language and Brain Lab >> Faculty of Linguistics, Phonetics & Philology >> http://users.ox.ac.uk/~cpgl0080/ >> On Fri, Dec 18, 2015 at 11:00 AM, wrote: >> >> Send fieldtrip mailing list submissions to >> ? ? ? ? fieldtrip at science.ru.nl >> >> To subscribe or unsubscribe via the World Wide Web, visit >> ? ? ? ? http://mailman.science.ru.nl/mailman/listinfo/fieldtrip >> or, via email, send a message with subject or body 'help' to >> ? ? ? ? fieldtrip-request at science.ru.nl >> >> You can reach the person managing the list at >> ? ? ? ? fieldtrip-owner at science.ru.nl >> >> When replying, please edit your Subject line so it is more specific >> than "Re: Contents of fieldtrip digest..." >> >> >> Today's Topics: >> >> ? ?1. importing large edf data (Leila Ayoubian) >> >> >> ---------------------------------------------------------------------- >> >> Message: 1 >> Date: Fri, 18 Dec 2015 09:43:43 +0000 (UTC) >> From: Leila Ayoubian >> To: "fieldtrip at science.ru.nl" >> Subject: [FieldTrip] importing large edf data >> Message-ID: >> ? ? ? ? <807603762.476165.1450431823359.JavaMail.yahoo at mail.yahoo.com> >> Content-Type: text/plain; charset="utf-8" >> >> Hi:Thanks for providing us with this amazing toolbox. >> I am new to fieldtrip. I am trying to import EEG data in the format of *.edf for the purpose of seizure detection for epileptic patients. I can't break up the data as you understand the detection has to have continuous data. However I could load section of the data at a time and clear what is already used and reload again.? >> So trying to load the data like this: >> cfg.dataset= ('mydata.edf'); >> rawdata=ft_preprocessing(cfg); >> This is the error message I get : >> %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% >> Error using zeros >> Requested 51x51927040 (19.7GB) array exceeds maximum array size preference. Creation of arrays greater than this limit may take a long time >> and cause MATLAB to become unresponsive. See array size limit or preference panel for more information. >> >> Error in read_edf (line 403) >> ? dat = zeros(length(chanindx),nepochs*epochlength); >> >> Error in ft_read_data (line 622) >> ??? dat = read_edf(filename, hdr, begsample, endsample, chanindx); >> >> Error in ft_preprocessing (line 566) >> ????? dat = ft_read_data(cfg.datafile, 'header', hdr, 'begsample', begsample, 'endsample', endsample, 'chanindx', rawindx, 'checkboundary', >> ????? strcmp(cfg.continuous, 'no'), 'dataformat', cfg.dataformat); >> >> Error in ReadFedfiles (line 8) >> rawdata=ft_preprocessing(cfg);%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% >> I tried the ft_redefinetrial, but since the input to this file is the output from ft-PREPROCESSING it gives me the same error. >> >> >> I also tried to use ft_read_data to choose the samples I want to load :?filename???? = 'mydata.edf' >> ?hdr?? = ft_read_header(filename); >> ?sample.start=1 >> ?sample.end=100 >> dat = ft_read_data(filename,'sample.start','1','sample.end','100') >> and here is again the error message: >> Error using zeros >> Requested 51x51927040 (19.7GB) array exceeds maximum array size preference. Creation of arrays greater than this limit may take a >> long time and cause MATLAB to become unresponsive. See array size limit or preference panel for more information. >> >> Error in read_edf (line 403) >> ? dat = zeros(length(chanindx),nepochs*epochlength); >> >> Error in ft_read_data (line 622) >> ??? dat = read_edf(filename, hdr, begsample, endsample, chanindx); >> >> Error in ReadFedfiles (line 31) >> dat = ft_read_data(filename,'sample.start','1','sample.end','100') >> ? >> >> >> >> Could you please direct me as to which functions and in which order I should be using the functions to load data in smaller samples.Some examples would be useful. >> Thanks again for your support and assistance. >> We appreciate your effort. >> Kind regards >> >> ___________________________________________________ Dr. Leila Ayoubian >> -------------- next part -------------- >> An HTML attachment was scrubbed... >> URL: >> >> ------------------------------ >> >> _____________ > > _______________________________________________ > 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 leilayou_54 at yahoo.com Tue Feb 9 16:40:35 2016 From: leilayou_54 at yahoo.com (Leila Ayoubian) Date: Tue, 9 Feb 2016 15:40:35 +0000 (UTC) Subject: [FieldTrip] importing large edf data In-Reply-To: <0817816F-2E1F-4CA9-8AA3-FABFE63A47DD@gmail.com> References: <0817816F-2E1F-4CA9-8AA3-FABFE63A47DD@gmail.com> Message-ID: <1722640118.1244946.1455032435939.JavaMail.yahoo@mail.yahoo.com> Thanks.I need to retrieve the time when the recordings occure and I don't see it. I get the Fs but no more.I am using this code : cfg = [];cfg.trl = [1 1000000 0];%cfg.trl = [100001 2000000 0];%cfg.trialdef.triallength = 5;cfg.dataset =fileName; %'For leila.edf';cfg= ft_definetrial( cfg );cfg.continuous = 'yes'; datastr = ft_preprocessing(cfg);data=datastr.trial{1,1};chanls=datastr.label;Fs=datastr.fsample; and getting this datastr =             hdr: [1x1 struct]         label: {65x1 cell}          time: {[1x1000000 double]}         trial: {[65x1000000 double]}       fsample: 1024    sampleinfo: [1 1000000]           cfg: [1x1 struct] cfg =                    trl: [1 1000000 0]              dataset: 'Event13_Seizure_triggered_by_cortical_stim_Segment_1.edf'          trackconfig: 'off'          checkconfig: 'loose'            checksize: 100000         showcallinfo: 'yes'                debug: 'no'    outputfilepresent: 'overwrite'        trackcallinfo: 'yes'        trackdatainfo: 'no'             callinfo: [1x1 struct]              version: [1x1 struct]             datafile: 'Event13_Seizure_triggered_by_cortical_stim_Segment_1.edf'           headerfile: 'Event13_Seizure_triggered_by_cortical_stim_Segment_1.edf'           dataformat: 'edf'         headerformat: 'edf'                event: []           continuous: 'yes'  __________________________________________________ Leila Ayoubian, PhD. Institute of Psychiatry, Psychology and Neuroscience King's College London From: Arjen Stolk To: FieldTrip discussion list Sent: Tuesday, February 9, 2016 3:32 PM Subject: Re: [FieldTrip] importing large edf data Hi both,There might be information on the date and time of recording in the orig field of the header, if that's what you're looking for. Don't know the name of the subfield from the top of my head.Arjen On Feb 9, 2016, at 3:19 AM, Stephen Politzer-Ahles wrote: Hi Leila, I'm sorry but I'm afraid I have not quite understood your issue. Can you give some more detail about what the problem is? In general, the fieldtrip structure output by ft_preprocessing() should have a .time field (indicating what timepoint during the epoch each sample corresponds to) and an .fsample field indicating the sampling rate (which you would also be able to use to figure out the time of each sample). Best, Steve --- Stephen Politzer-Ahles University of Oxford Language and Brain Lab Faculty of Linguistics, Phonetics & Philology http://users.ox.ac.uk/~cpgl0080/  Message: 1 Date: Mon, 8 Feb 2016 11:51:05 +0000 (UTC) From: Leila Ayoubian To: FieldTrip discussion list Subject: Re: [FieldTrip] importing large edf data Message-ID:         <1195829915.655104.1454932265573.JavaMail.yahoo at mail.yahoo.com> Content-Type: text/plain; charset="utf-8" Hi Stephen:I just happen to realize that when I load the data as you mentioned below, I can not get hold of the real time of the EEG file. (e.g.18:32:43 ).Could you please point out as how I could retrieve the real time of the EEG file after loading. Thanks a lot.Kind regards __________________________________________________ Leila Ayoubian, PhD. Institute of Psychiatry, Psychology and Neuroscience King's College London       From: Stephen Politzer-Ahles  To: fieldtrip at science.ru.nl  Sent: Friday, December 18, 2015 12:37 PM  Subject: Re: [FieldTrip] importing large edf data Hello Leila, I think there are a few possible options for you. If you're not interested in analyzing high frequencies, then you could import the data one sample at a time, downsampling each channel, and then concatenate the channels into one structure, as described in http://www.fieldtriptoolbox.org/faq/how_can_i_preprocess_a_dataset_that_is_too_large_to_fit_into_memory. I don't know what your sampling rate was, but if your sampling rate was extremely high then this can save you a lot of space. For example, if you're only interested in frequencies up to high gamma (around 90-100 Hz), then your data only need to be sampled at around 250 Hz (per the Nyquist theorem, plus a little extra wiggle room), so if you sampled at e.g. 2500 Hz (which our EDF system does by default) or 5000 Hz then you have way more samples than necessary; downsampling like this will greatly reduce your array size. If that is not an option, then you can read in a segment of data as a 'trial'. ft_preprocessing understands trial start and end times from cfg.trl, which minimally is an Nx3 matrix (N is the number of trials to read, and the columns are the start sample for each trial, the end sample for each trial, and the trigger value associated with the trial; you could just put 0 if there's no trigger). So let's say you want to read the first through thousandth sample of the recording, then you would set up your cfg as normal, then add: cfg.trl = [1 1000 0]; and then use ft_preprocessing. By way of example, here is code that reads in raw data as a series of 1-second "trials": cfg = []; cfg.dataset = 'C:\Users\Steve\Desktop\subj2.vhdr'; cfg.trialdef.triallength = 1; % see documentation for ft_definetrial for an explanation of these parameters cfg.trialdef.ntrials = Inf; cfg = ft_definetrial( cfg ); cfg.continuous = 'yes'; data = ft_preprocessing(cfg); After doing whatever you need to these trials, you could concatenate them back into continuous data (see http://mailman.science.ru.nl/pipermail/fieldtrip/2011-June/003971.html for details). Best, Steve --- Stephen Politzer-Ahles University of Oxford Language and Brain Lab Faculty of Linguistics, Phonetics & Philology http://users.ox.ac.uk/~cpgl0080/ On Fri, Dec 18, 2015 at 11:00 AM, wrote: Send fieldtrip mailing list submissions to ? ? ? ? fieldtrip at science.ru.nl To subscribe or unsubscribe via the World Wide Web, visit ? ? ? ? http://mailman.science.ru.nl/mailman/listinfo/fieldtrip or, via email, send a message with subject or body 'help' to ? ? ? ? fieldtrip-request at science.ru.nl You can reach the person managing the list at ? ? ? ? fieldtrip-owner at science.ru.nl When replying, please edit your Subject line so it is more specific than "Re: Contents of fieldtrip digest..." Today's Topics: ? ?1. importing large edf data (Leila Ayoubian) ---------------------------------------------------------------------- Message: 1 Date: Fri, 18 Dec 2015 09:43:43 +0000 (UTC) From: Leila Ayoubian To: "fieldtrip at science.ru.nl" Subject: [FieldTrip] importing large edf data Message-ID: ? ? ? ? <807603762.476165.1450431823359.JavaMail.yahoo at mail.yahoo.com> Content-Type: text/plain; charset="utf-8" Hi:Thanks for providing us with this amazing toolbox. I am new to fieldtrip. I am trying to import EEG data in the format of *.edf for the purpose of seizure detection for epileptic patients. I can't break up the data as you understand the detection has to have continuous data. However I could load section of the data at a time and clear what is already used and reload again.? So trying to load the data like this: cfg.dataset= ('mydata.edf'); rawdata=ft_preprocessing(cfg); This is the error message I get : %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% Error using zeros Requested 51x51927040 (19.7GB) array exceeds maximum array size preference. Creation of arrays greater than this limit may take a long time and cause MATLAB to become unresponsive. See array size limit or preference panel for more information. Error in read_edf (line 403) ? dat = zeros(length(chanindx),nepochs*epochlength); Error in ft_read_data (line 622) ??? dat = read_edf(filename, hdr, begsample, endsample, chanindx); Error in ft_preprocessing (line 566) ????? dat = ft_read_data(cfg.datafile, 'header', hdr, 'begsample', begsample, 'endsample', endsample, 'chanindx', rawindx, 'checkboundary', ????? strcmp(cfg.continuous, 'no'), 'dataformat', cfg.dataformat); Error in ReadFedfiles (line 8) rawdata=ft_preprocessing(cfg);%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% I tried the ft_redefinetrial, but since the input to this file is the output from ft-PREPROCESSING it gives me the same error. I also tried to use ft_read_data to choose the samples I want to load :?filename???? = 'mydata.edf' ?hdr?? = ft_read_header(filename); ?sample.start=1 ?sample.end=100 dat = ft_read_data(filename,'sample.start','1','sample.end','100') and here is again the error message: Error using zeros Requested 51x51927040 (19.7GB) array exceeds maximum array size preference. Creation of arrays greater than this limit may take a long time and cause MATLAB to become unresponsive. See array size limit or preference panel for more information. Error in read_edf (line 403) ? dat = zeros(length(chanindx),nepochs*epochlength); Error in ft_read_data (line 622) ??? dat = read_edf(filename, hdr, begsample, endsample, chanindx); Error in ReadFedfiles (line 31) dat = ft_read_data(filename,'sample.start','1','sample.end','100') ? >> Could you please direct me as to which functions and in which order I should be using the functions to load data in smaller samples.Some examples would be useful. Thanks again for your support and assistance. We appreciate your effort. Kind regards ___________________________________________________ Dr. Leila Ayoubian -------------- next part -------------- An HTML attachment was scrubbed... URL: ------------------------------ _____________ _______________________________________________ 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 m.boyd at newcastle.ac.uk Tue Feb 9 17:52:22 2016 From: m.boyd at newcastle.ac.uk (Michael Boyd (PGR)) Date: Tue, 9 Feb 2016 16:52:22 +0000 Subject: [FieldTrip] Granger causality results out of range Message-ID: Hi, We are currently using the granger causality function of the toolbox as described in the connectivity tutorial. When we put LFP data through this, the results seem stable (or at least produce results between 0 and 1). However when we locally rereference the LFP data (e.g. to each channel's adjacent channel or current source density) the results are no longer in range (i.e. large negative numbers for granger causality). Our attempts to solve this so far have been in vain, so could anyone suggest where we might look to try to track down this instability? Script taken from connectivity tutorial: cfg = []; cfg.order = modelOrder; cfg.toolbox = 'bsmart'; mdata = ft_mvaranalysis(cfg, data); cfg = []; cfg.method = 'mvar'; mfreq = ft_freqanalysis(cfg, mdata); cfg = []; cfg.method = 'granger'; granger = ft_connectivityanalysis(cfg, mfreq); Thanks, Michael From leilayou_54 at yahoo.com Wed Feb 10 11:57:23 2016 From: leilayou_54 at yahoo.com (Leila Ayoubian) Date: Wed, 10 Feb 2016 10:57:23 +0000 (UTC) Subject: [FieldTrip] importing large edf data In-Reply-To: <0817816F-2E1F-4CA9-8AA3-FABFE63A47DD@gmail.com> References: <0817816F-2E1F-4CA9-8AA3-FABFE63A47DD@gmail.com> Message-ID: <844284323.1594104.1455101843736.JavaMail.yahoo@mail.yahoo.com> Hi;Thanks. I have found the timing of the beginning of the file under data.hdr.orig.T0 However the time has the format of hh:mm:ssIf I would like to load the timing of my file with milli-second precision what should I do? Kind regards From: Arjen Stolk To: FieldTrip discussion list Sent: Tuesday, February 9, 2016 3:32 PM Subject: Re: [FieldTrip] importing large edf data Hi both,There might be information on the date and time of recording in the orig field of the header, if that's what you're looking for. Don't know the name of the subfield from the top of my head.Arjen On Feb 9, 2016, at 3:19 AM, Stephen Politzer-Ahles wrote: Hi Leila, I'm sorry but I'm afraid I have not quite understood your issue. Can you give some more detail about what the problem is? In general, the fieldtrip structure output by ft_preprocessing() should have a .time field (indicating what timepoint during the epoch each sample corresponds to) and an .fsample field indicating the sampling rate (which you would also be able to use to figure out the time of each sample). Best, Steve --- Stephen Politzer-Ahles University of Oxford Language and Brain Lab Faculty of Linguistics, Phonetics & Philology http://users.ox.ac.uk/~cpgl0080/  Message: 1 Date: Mon, 8 Feb 2016 11:51:05 +0000 (UTC) From: Leila Ayoubian To: FieldTrip discussion list Subject: Re: [FieldTrip] importing large edf data Message-ID:         <1195829915.655104.1454932265573.JavaMail.yahoo at mail.yahoo.com> Content-Type: text/plain; charset="utf-8" Hi Stephen:I just happen to realize that when I load the data as you mentioned below, I can not get hold of the real time of the EEG file. (e.g.18:32:43 ).Could you please point out as how I could retrieve the real time of the EEG file after loading. Thanks a lot.Kind regards __________________________________________________ Leila Ayoubian, PhD. Institute of Psychiatry, Psychology and Neuroscience King's College London       From: Stephen Politzer-Ahles  To: fieldtrip at science.ru.nl  Sent: Friday, December 18, 2015 12:37 PM  Subject: Re: [FieldTrip] importing large edf data Hello Leila, I think there are a few possible options for you. If you're not interested in analyzing high frequencies, then you could import the data one sample at a time, downsampling each channel, and then concatenate the channels into one structure, as described in http://www.fieldtriptoolbox.org/faq/how_can_i_preprocess_a_dataset_that_is_too_large_to_fit_into_memory. I don't know what your sampling rate was, but if your sampling rate was extremely high then this can save you a lot of space. For example, if you're only interested in frequencies up to high gamma (around 90-100 Hz), then your data only need to be sampled at around 250 Hz (per the Nyquist theorem, plus a little extra wiggle room), so if you sampled at e.g. 2500 Hz (which our EDF system does by default) or 5000 Hz then you have way more samples than necessary; downsampling like this will greatly reduce your array size. If that is not an option, then you can read in a segment of data as a 'trial'. ft_preprocessing understands trial start and end times from cfg.trl, which minimally is an Nx3 matrix (N is the number of trials to read, and the columns are the start sample for each trial, the end sample for each trial, and the trigger value associated with the trial; you could just put 0 if there's no trigger). So let's say you want to read the first through thousandth sample of the recording, then you would set up your cfg as normal, then add: cfg.trl = [1 1000 0]; and then use ft_preprocessing. By way of example, here is code that reads in raw data as a series of 1-second "trials": cfg = []; cfg.dataset = 'C:\Users\Steve\Desktop\subj2.vhdr'; cfg.trialdef.triallength = 1; % see documentation for ft_definetrial for an explanation of these parameters cfg.trialdef.ntrials = Inf; cfg = ft_definetrial( cfg ); cfg.continuous = 'yes'; data = ft_preprocessing(cfg); After doing whatever you need to these trials, you could concatenate them back into continuous data (see http://mailman.science.ru.nl/pipermail/fieldtrip/2011-June/003971.html for details). Best, Steve --- Stephen Politzer-Ahles University of Oxford Language and Brain Lab Faculty of Linguistics, Phonetics & Philology http://users.ox.ac.uk/~cpgl0080/ On Fri, Dec 18, 2015 at 11:00 AM, wrote: Send fieldtrip mailing list submissions to ? ? ? ? fieldtrip at science.ru.nl To subscribe or unsubscribe via the World Wide Web, visit ? ? ? ? http://mailman.science.ru.nl/mailman/listinfo/fieldtrip or, via email, send a message with subject or body 'help' to ? ? ? ? fieldtrip-request at science.ru.nl You can reach the person managing the list at ? ? ? ? fieldtrip-owner at science.ru.nl When replying, please edit your Subject line so it is more specific than "Re: Contents of fieldtrip digest..." Today's Topics: ? ?1. importing large edf data (Leila Ayoubian) ---------------------------------------------------------------------- Message: 1 Date: Fri, 18 Dec 2015 09:43:43 +0000 (UTC) From: Leila Ayoubian To: "fieldtrip at science.ru.nl" Subject: [FieldTrip] importing large edf data Message-ID: ? ? ? ? <807603762.476165.1450431823359.JavaMail.yahoo at mail.yahoo.com> Content-Type: text/plain; charset="utf-8" Hi:Thanks for providing us with this amazing toolbox. I am new to fieldtrip. I am trying to import EEG data in the format of *.edf for the purpose of seizure detection for epileptic patients. I can't break up the data as you understand the detection has to have continuous data. However I could load section of the data at a time and clear what is already used and reload again.? So trying to load the data like this: cfg.dataset= ('mydata.edf'); rawdata=ft_preprocessing(cfg); This is the error message I get : %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% Error using zeros Requested 51x51927040 (19.7GB) array exceeds maximum array size preference. Creation of arrays greater than this limit may take a long time and cause MATLAB to become unresponsive. See array size limit or preference panel for more information. Error in read_edf (line 403) ? dat = zeros(length(chanindx),nepochs*epochlength); Error in ft_read_data (line 622) ??? dat = read_edf(filename, hdr, begsample, endsample, chanindx); Error in ft_preprocessing (line 566) ????? dat = ft_read_data(cfg.datafile, 'header', hdr, 'begsample', begsample, 'endsample', endsample, 'chanindx', rawindx, 'checkboundary', ????? strcmp(cfg.continuous, 'no'), 'dataformat', cfg.dataformat); Error in ReadFedfiles (line 8) rawdata=ft_preprocessing(cfg);%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% I tried the ft_redefinetrial, but since the input to this file is the output from ft-PREPROCESSING it gives me the same error. I also tried to use ft_read_data to choose the samples I want to load :?filename???? = 'mydata.edf' ?hdr?? = ft_read_header(filename); ?sample.start=1 ?sample.end=100 dat = ft_read_data(filename,'sample.start','1','sample.end','100') and here is again the error message: Error using zeros Requested 51x51927040 (19.7GB) array exceeds maximum array size preference. Creation of arrays greater than this limit may take a long time and cause MATLAB to become unresponsive. See array size limit or preference panel for more information. Error in read_edf (line 403) ? dat = zeros(length(chanindx),nepochs*epochlength); Error in ft_read_data (line 622) ??? dat = read_edf(filename, hdr, begsample, endsample, chanindx); Error in ReadFedfiles (line 31) dat = ft_read_data(filename,'sample.start','1','sample.end','100') ? >> Could you please direct me as to which functions and in which order I should be using the functions to load data in smaller samples.Some examples would be useful. Thanks again for your support and assistance. We appreciate your effort. Kind regards ___________________________________________________ Dr. Leila Ayoubian -------------- next part -------------- An HTML attachment was scrubbed... URL: ------------------------------ _____________ _______________________________________________ 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 stephen.politzer-ahles at ling-phil.ox.ac.uk Wed Feb 10 12:20:05 2016 From: stephen.politzer-ahles at ling-phil.ox.ac.uk (Stephen Politzer-Ahles) Date: Wed, 10 Feb 2016 11:20:05 +0000 Subject: [FieldTrip] importing large edf data Message-ID: Hi Leila (and Arjen): I just tried this out with a sample file, it looks like you can get this information if you use ft_read_header() rather than ft_preprocessing. The cfg structure I got from ft_preprocessing didn't contain the time-of-day information, but the structure returned from ft_read_header did: >> hdr = ft_read_header( cfg.dataset ); hdr.orig.T0 ans = 2005 9 15 10 18 42 I assume that's showing year, month, day, hour, minute (presumably based on the clock of the computer that made the recording). Best, Steve --- Stephen Politzer-Ahles University of Oxford Language and Brain Lab Faculty of Linguistics, Phonetics & Philology http://users.ox.ac.uk/~cpgl0080/ > > Message: 3 > Date: Tue, 9 Feb 2016 15:40:35 +0000 (UTC) > From: Leila Ayoubian > To: FieldTrip discussion list > Subject: Re: [FieldTrip] importing large edf data > Message-ID: > <1722640118.1244946.1455032435939.JavaMail.yahoo at mail.yahoo.com> > Content-Type: text/plain; charset="utf-8" > > Thanks.I need to retrieve the time when the recordings occure and I don't > see it. I get the Fs but no more.I am using this code : > cfg = [];cfg.trl = [1 1000000 0];%cfg.trl = [100001 2000000 > 0];%cfg.trialdef.triallength = 5;cfg.dataset =fileName; %'For > leila.edf';cfg= ft_definetrial( cfg );cfg.continuous = 'yes'; > datastr = > ft_preprocessing(cfg);data=datastr.trial{1,1};chanls=datastr.label;Fs=datastr.fsample; > and getting this?datastr =? > ? ? ? ? ? ?hdr: [1x1 struct]? ? ? ? ?label: {65x1 cell}? ? ? ? ? time: > {[1x1000000 double]}? ? ? ? ?trial: {[65x1000000 double]}? ? ? ?fsample: > 1024? ? sampleinfo: [1 1000000]? ? ? ? ? ?cfg: [1x1 struct] > > cfg =? > ? ? ? ? ? ? ? ? ? trl: [1 1000000 0]? ? ? ? ? ? ? dataset: > 'Event13_Seizure_triggered_by_cortical_stim_Segment_1.edf'? ? ? ? ? > trackconfig: 'off'? ? ? ? ? checkconfig: 'loose'? ? ? ? ? ? checksize: > 100000? ? ? ? ?showcallinfo: 'yes'? ? ? ? ? ? ? ? debug: 'no'? ? > outputfilepresent: 'overwrite'? ? ? ? trackcallinfo: 'yes'? ? ? ? > trackdatainfo: 'no'? ? ? ? ? ? ?callinfo: [1x1 struct]? ? ? ? ? ? ? > version: [1x1 struct]? ? ? ? ? ? ?datafile: > 'Event13_Seizure_triggered_by_cortical_stim_Segment_1.edf'? ? ? ? ? > ?headerfile: 'Event13_Seizure_triggered_by_cortical_stim_Segment_1.edf'? ? > ? ? ? ?dataformat: 'edf'? ? ? ? ?headerformat: 'edf'? ? ? ? ? ? ? ? event: > []? ? ? ? ? ?continuous: 'yes' > > ?__________________________________________________ Leila Ayoubian, PhD. > Institute of Psychiatry, Psychology and Neuroscience > King's College London > > > > > From: Arjen Stolk > To: FieldTrip discussion list > Sent: Tuesday, February 9, 2016 3:32 PM > Subject: Re: [FieldTrip] importing large edf data > > Hi both,There might be information on the date and time of recording in > the orig field of the header, if that's what you're looking for. Don't know > the name of the subfield from the top of my head.Arjen > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From leilayou_54 at yahoo.com Wed Feb 10 12:25:21 2016 From: leilayou_54 at yahoo.com (Leila Ayoubian) Date: Wed, 10 Feb 2016 11:25:21 +0000 (UTC) Subject: [FieldTrip] importing large edf data In-Reply-To: References: Message-ID: <2028618627.1587191.1455103521388.JavaMail.yahoo@mail.yahoo.com> Thanks Steve:Thanks. You are absolutely right. However what I need to get is one more information added to this          2005           9          15          10          18          42 Which is milli second. so I need to have an output of let's say (which 222 is in milli second)         2005           9          15          10          18          42        222 Do you know how I could do that? Thanks again __________________________________________________ Leila Ayoubian, PhD. Institute of Psychiatry, Psychology and Neuroscience King's College London From: Stephen Politzer-Ahles To: fieldtrip at science.ru.nl Sent: Wednesday, February 10, 2016 11:20 AM Subject: Re: [FieldTrip] importing large edf data Hi Leila (and Arjen): I just tried this out with a sample file, it looks like you can get this information if you use ft_read_header() rather than ft_preprocessing. The cfg structure I got from ft_preprocessing didn't contain the time-of-day information, but the structure returned from ft_read_header did: >> hdr = ft_read_header( cfg.dataset ); hdr.orig.T0 ans =         2005           9          15          10          18          42 I assume that's showing year, month, day, hour, minute (presumably based on the clock of the computer that made the recording). Best, Steve --- Stephen Politzer-Ahles University of Oxford Language and Brain Lab Faculty of Linguistics, Phonetics & Philology http://users.ox.ac.uk/~cpgl0080/  Message: 3 Date: Tue, 9 Feb 2016 15:40:35 +0000 (UTC) From: Leila Ayoubian To: FieldTrip discussion list Subject: Re: [FieldTrip] importing large edf data Message-ID:         <1722640118.1244946.1455032435939.JavaMail.yahoo at mail.yahoo.com> Content-Type: text/plain; charset="utf-8" Thanks.I need to retrieve the time when the recordings occure and I don't see it. I get the Fs but no more.I am using this code : cfg = [];cfg.trl = [1 1000000 0];%cfg.trl = [100001 2000000 0];%cfg.trialdef.triallength = 5;cfg.dataset =fileName; %'For leila.edf';cfg= ft_definetrial( cfg );cfg.continuous = 'yes'; datastr = ft_preprocessing(cfg);data=datastr.trial{1,1};chanls=datastr.label;Fs=datastr.fsample; and getting this?datastr =? ? ? ? ? ? ?hdr: [1x1 struct]? ? ? ? ?label: {65x1 cell}? ? ? ? ? time: {[1x1000000 double]}? ? ? ? ?trial: {[65x1000000 double]}? ? ? ?fsample: 1024? ? sampleinfo: [1 1000000]? ? ? ? ? ?cfg: [1x1 struct] cfg =? ? ? ? ? ? ? ? ? ? trl: [1 1000000 0]? ? ? ? ? ? ? dataset: 'Event13_Seizure_triggered_by_cortical_stim_Segment_1.edf'? ? ? ? ? trackconfig: 'off'? ? ? ? ? checkconfig: 'loose'? ? ? ? ? ? checksize: 100000? ? ? ? ?showcallinfo: 'yes'? ? ? ? ? ? ? ? debug: 'no'? ? outputfilepresent: 'overwrite'? ? ? ? trackcallinfo: 'yes'? ? ? ? trackdatainfo: 'no'? ? ? ? ? ? ?callinfo: [1x1 struct]? ? ? ? ? ? ? version: [1x1 struct]? ? ? ? ? ? ?datafile: 'Event13_Seizure_triggered_by_cortical_stim_Segment_1.edf'? ? ? ? ? ?headerfile: 'Event13_Seizure_triggered_by_cortical_stim_Segment_1.edf'? ? ? ? ? ?dataformat: 'edf'? ? ? ? ?headerformat: 'edf'? ? ? ? ? ? ? ? event: []? ? ? ? ? ?continuous: 'yes' ?__________________________________________________ Leila Ayoubian, PhD. Institute of Psychiatry, Psychology and Neuroscience King's College London       From: Arjen Stolk  To: FieldTrip discussion list  Sent: Tuesday, February 9, 2016 3:32 PM  Subject: Re: [FieldTrip] importing large edf data Hi both,There might be information on the date and time of recording in the orig field of the header, if that's what you're looking for. Don't know the name of the subfield from the top of my head.Arjen _______________________________________________ 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 david.pedrosa at ndcn.ox.ac.uk Wed Feb 10 15:54:24 2016 From: david.pedrosa at ndcn.ox.ac.uk (David Pedrosa) Date: Wed, 10 Feb 2016 14:54:24 +0000 Subject: [FieldTrip] ft_sourceanalysis, reshape error In-Reply-To: References: , Message-ID: Hi Azeez, I have been checking leadfields and data labels and they are actually the same. But the order is slightly different. Do you think this may cause the problems? Thanks for your help. Best, David ________________________________ Dr. David Pedrosa Clinical Research Fellow Medical Research Council Brain Network Dynamics Unit at the University of Oxford Nuffield Department of Clinical Neurosciences University of Oxford Level 6, West Wing John Radcliffe Hospital, OX3 9DU Tel: +44 (0)1865 572490 E-Mail: david.pedrosa at ndcn.ox.ac.uk http://www.mrcbndu.ox.ac.uk/ ________________________________ Von: fieldtrip-bounces at science.ru.nl [fieldtrip-bounces at science.ru.nl]" im Auftrag von "Azeez Adebimpe [azeez.adebimpe5 at gmail.com] Gesendet: Freitag, 5. Februar 2016 22:44 An: FieldTrip discussion list Betreff: Re: [FieldTrip] ft_sourceanalysis, reshape error Hi David, Sorry for late reply, I was on the journey. The same issue happened to me before when the labels in the leadfield and data were not the same. if you have 'Fp1' in leadfield and 'FP1' in data, it will view as different channels. Azeez On Fri, Feb 5, 2016 at 9:51 AM, David Pedrosa > wrote: Hi Azeez, thank you for the fast reply! I hadn't considered that but I have checked and I use the same labels for both leadfield and data. I mean it makes kind of sense that the reshape doesn't work as it is now, but I don't know where the problem is before. Can you think of anything else? Best, David ________________________________ Dr. David Pedrosa Clinical Research Fellow Medical Research Council Brain Network Dynamics Unit at the University of Oxford Nuffield Department of Clinical Neurosciences University of Oxford Level 6, West Wing John Radcliffe Hospital, OX3 9DU Tel: +44 (0)1865 572490 E-Mail: david.pedrosa at ndcn.ox.ac.uk http://www.mrcbndu.ox.ac.uk/ ________________________________ Von: fieldtrip-bounces at science.ru.nl [fieldtrip-bounces at science.ru.nl]" im Auftrag von "Azeez Adebimpe [azeez.adebimpe5 at gmail.com] Gesendet: Freitag, 5. Februar 2016 13:56 An: FieldTrip discussion list Betreff: Re: [FieldTrip] ft_sourceanalysis, reshape error Hi David, Probably the channels' labels in leadfield and data are not the same. check it and try again. Azeez On Fri, Feb 5, 2016 at 8:47 AM, David Pedrosa > wrote: Dear list, after installing the newest version of Fieldtrip today, I have encountered a rather strange error . I am tying to compute corticomuscular coherence for an EEG/EMG dataset and it worked well so far. With the new version however, I get a reshape error I find fard to understand. This is the code: cfg = []; cfg.frequency = 20;; cfg.grid = leadfield; cfg.method = 'dics'; cfg.refchan = 'ExtR1'; cfg.channel = {'EEG' 'ExtR1'}; cfg.vol = hdm; cfg.dics.projectnoise = 'no'; cfg.dics.lambda = '1%'; cfg.dics.keepfilter = 'yes'; cfg.dics.keeptrials = 'yes'; cfg.dics.realfilter = 'yes'; sourceAll = ft_sourceanalysis(cfg, freqAll); but this hasn't changed. The error pops up at lines 619/620 of ft_sourceanalysis (Cf = reshape(sum(Cf, 1) / Ntrials, [Nchans Nchans]);), where it supposedly just averages the CSD matrix over trials. And it makes kind of sense as the line says to reshape the CSDs from a 1xNchans matrix into a [Nchans Nchans] one. But why is it poppin up now as nothing has changed in my analyses? I have checked the updates of the last months and I couldn't find anything related to this. So has any one an idea why the analysis crashes at this point. Thanks in advance Best, David ________________________________ Dr. David Pedrosa Clinical Research Fellow Medical Research Council Brain Network Dynamics Unit at the University of Oxford Nuffield Department of Clinical Neurosciences University of Oxford Level 6, West Wing John Radcliffe Hospital, OX3 9DU Tel: +44 (0)1865 572490 E-Mail: david.pedrosa at ndcn.ox.ac.uk http://www.mrcbndu.ox.ac.uk/ _______________________________________________ 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 azeez.adebimpe5 at gmail.com Wed Feb 10 16:01:09 2016 From: azeez.adebimpe5 at gmail.com (Azeez Adebimpe) Date: Wed, 10 Feb 2016 16:01:09 +0100 Subject: [FieldTrip] ft_sourceanalysis, reshape error In-Reply-To: References: Message-ID: Hi David, I think it can cause it. I hope you can compute the leadfield again with the order in the data or you can rearrange it. Best, Azeez On Wed, Feb 10, 2016 at 3:54 PM, David Pedrosa wrote: > Hi Azeez, > > I have been checking leadfields and data labels and they are actually the > same. But the order is slightly different. Do you think this may cause the > problems? > > Thanks for your help. > > Best, > David > > ------------------------------ > Dr. David Pedrosa > > Clinical Research Fellow > Medical Research Council Brain Network Dynamics Unit at the University of > Oxford > Nuffield Department of Clinical Neurosciences > University of Oxford > Level 6, West Wing > John Radcliffe Hospital, OX3 9DU > *Tel:* +44 (0)1865 572490 > *E-Mail:* david.pedrosa at ndcn.ox.ac.uk > > http://www.mrcbndu.ox.ac.uk/ > > ------------------------------ > *Von:* fieldtrip-bounces at science.ru.nl [fieldtrip-bounces at science.ru.nl]" > im Auftrag von "Azeez Adebimpe [azeez.adebimpe5 at gmail.com] > *Gesendet:* Freitag, 5. Februar 2016 22:44 > *An:* FieldTrip discussion list > *Betreff:* Re: [FieldTrip] ft_sourceanalysis, reshape error > > Hi David, > > Sorry for late reply, I was on the journey. > The same issue happened to me before when the labels in the leadfield and > data were not the same. > if you have 'Fp1' in leadfield and 'FP1' in data, it will view as > different channels. > > > Azeez > > > > > On Fri, Feb 5, 2016 at 9:51 AM, David Pedrosa > wrote: > >> Hi Azeez, >> >> thank you for the fast reply! >> I hadn't considered that but I have checked and I use the same labels for >> both leadfield and data. >> >> I mean it makes kind of sense that the reshape doesn't work as it is now, >> but I don't know where the problem is before. >> >> Can you think of anything else? >> >> Best, >> David >> >> ------------------------------ >> Dr. David Pedrosa >> >> Clinical Research Fellow >> Medical Research Council Brain Network Dynamics Unit at the University of >> Oxford >> Nuffield Department of Clinical Neurosciences >> University of Oxford >> Level 6, West Wing >> John Radcliffe Hospital, OX3 9DU >> *Tel:* +44 (0)1865 572490 >> *E-Mail:* david.pedrosa at ndcn.ox.ac.uk >> >> http://www.mrcbndu.ox.ac.uk/ >> >> ------------------------------ >> *Von:* fieldtrip-bounces at science.ru.nl [fieldtrip-bounces at science.ru.nl]" >> im Auftrag von "Azeez Adebimpe [azeez.adebimpe5 at gmail.com] >> *Gesendet:* Freitag, 5. Februar 2016 13:56 >> *An:* FieldTrip discussion list >> *Betreff:* Re: [FieldTrip] ft_sourceanalysis, reshape error >> >> Hi David, >> >> Probably the channels' labels in leadfield and data are not the same. >> >> check it and try again. >> >> Azeez >> >> On Fri, Feb 5, 2016 at 8:47 AM, David Pedrosa < >> david.pedrosa at ndcn.ox.ac.uk> wrote: >> >>> Dear list, >>> >>> after installing the newest version of Fieldtrip today, I have >>> encountered a rather strange error . I am tying to compute corticomuscular >>> coherence for an EEG/EMG dataset and it worked well so far. With the new >>> version however, I get a reshape error I find fard to understand. This is >>> the code: >>> >>> cfg = []; >>> cfg.frequency = 20;; >>> cfg.grid = leadfield; >>> cfg.method = 'dics'; >>> cfg.refchan = 'ExtR1'; >>> cfg.channel = {'EEG' 'ExtR1'}; >>> cfg.vol = hdm; >>> cfg.dics.projectnoise = 'no'; >>> cfg.dics.lambda = '1%'; >>> cfg.dics.keepfilter = 'yes'; >>> cfg.dics.keeptrials = 'yes'; >>> cfg.dics.realfilter = 'yes'; >>> sourceAll = ft_sourceanalysis(cfg, freqAll); >>> >>> but this hasn't changed. The error pops up at lines 619/620 of >>> ft_sourceanalysis (Cf = reshape(sum(Cf, 1) / Ntrials, [Nchans Nchans]);), >>> where it supposedly just averages the CSD matrix over trials. And it makes >>> kind of sense as the line says to reshape the CSDs from a 1xNchans matrix >>> into a [Nchans Nchans] one. But why is it poppin up now as nothing has >>> changed in my analyses? I have checked the updates of the last months and I >>> couldn't find anything related to this. So has any one an idea why the >>> analysis crashes at this point. >>> >>> Thanks in advance >>> Best, >>> David >>> >>> ------------------------------ >>> Dr. David Pedrosa >>> >>> Clinical Research Fellow >>> Medical Research Council Brain Network Dynamics Unit at the University >>> of Oxford >>> Nuffield Department of Clinical Neurosciences >>> University of Oxford >>> Level 6, West Wing >>> John Radcliffe Hospital, OX3 9DU >>> *Tel:* +44 (0)1865 572490 >>> *E-Mail:* david.pedrosa at ndcn.ox.ac.uk >>> >>> http://www.mrcbndu.ox.ac.uk/ >>> >>> >>> _______________________________________________ >>> 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 Wed Feb 10 16:30:59 2016 From: jan.schoffelen at donders.ru.nl (Schoffelen, J.M. (Jan Mathijs)) Date: Wed, 10 Feb 2016 15:30:59 +0000 Subject: [FieldTrip] ft_sourceanalysis, reshape error In-Reply-To: References: , Message-ID: <60FD4C45-84AB-4304-9620-F79109898282@fcdonders.ru.nl> Hi David, Yes, I think that could cause the problem, although if that were true, your specific issue seems to be a convoluted manifestation of it. Bottom line with respect to channel order: when using pre-computed leadfields, the underlying assumption is more or less that the order of the channels, as represented in the leadfields, is the same as the order of the channels in the data. In principle, this can be accommodated with proper data bookkeeping, i.e. checking the labels that are associated with the data structure containing the forward model (i.e. the leadfield) against the channels in the data. We have started to move in this direction by inclusion of a label-field in data structures containing leadfields. Yet, the explicit check about channels and orderings of channels so far only throws an error if there’s a mismatch in the number of channels. Your reported error with a reshape issue could also reflect a problem with the data handling as such. Some more information would be appreciated in this regard. What does your freqAll contain in terms of spectral data? Fourier coefficients or cross-spectra? In case it’s cross-spectra, does it include multiple trials or not? If not, would it make sense to switch off the cfg.keeptrials flag in your cfg to ft_sourceanalysis. Best, Jan-Mathijs On Feb 10, 2016, at 3:54 PM, David Pedrosa > wrote: Hi Azeez, I have been checking leadfields and data labels and they are actually the same. But the order is slightly different. Do you think this may cause the problems? Thanks for your help. Best, David ________________________________ Dr. David Pedrosa Clinical Research Fellow Medical Research Council Brain Network Dynamics Unit at the University of Oxford Nuffield Department of Clinical Neurosciences University of Oxford Level 6, West Wing John Radcliffe Hospital, OX3 9DU Tel: +44 (0)1865 572490 E-Mail: david.pedrosa at ndcn.ox.ac.uk http://www.mrcbndu.ox.ac.uk/ ________________________________ Von: fieldtrip-bounces at science.ru.nl [fieldtrip-bounces at science.ru.nl]" im Auftrag von "Azeez Adebimpe [azeez.adebimpe5 at gmail.com] Gesendet: Freitag, 5. Februar 2016 22:44 An: FieldTrip discussion list Betreff: Re: [FieldTrip] ft_sourceanalysis, reshape error Hi David, Sorry for late reply, I was on the journey. The same issue happened to me before when the labels in the leadfield and data were not the same. if you have 'Fp1' in leadfield and 'FP1' in data, it will view as different channels. Azeez On Fri, Feb 5, 2016 at 9:51 AM, David Pedrosa > wrote: Hi Azeez, thank you for the fast reply! I hadn't considered that but I have checked and I use the same labels for both leadfield and data. I mean it makes kind of sense that the reshape doesn't work as it is now, but I don't know where the problem is before. Can you think of anything else? Best, David ________________________________ Dr. David Pedrosa Clinical Research Fellow Medical Research Council Brain Network Dynamics Unit at the University of Oxford Nuffield Department of Clinical Neurosciences University of Oxford Level 6, West Wing John Radcliffe Hospital, OX3 9DU Tel: +44 (0)1865 572490 E-Mail: david.pedrosa at ndcn.ox.ac.uk http://www.mrcbndu.ox.ac.uk/ ________________________________ Von: fieldtrip-bounces at science.ru.nl [fieldtrip-bounces at science.ru.nl]" im Auftrag von "Azeez Adebimpe [azeez.adebimpe5 at gmail.com] Gesendet: Freitag, 5. Februar 2016 13:56 An: FieldTrip discussion list Betreff: Re: [FieldTrip] ft_sourceanalysis, reshape error Hi David, Probably the channels' labels in leadfield and data are not the same. check it and try again. Azeez On Fri, Feb 5, 2016 at 8:47 AM, David Pedrosa > wrote: Dear list, after installing the newest version of Fieldtrip today, I have encountered a rather strange error . I am tying to compute corticomuscular coherence for an EEG/EMG dataset and it worked well so far. With the new version however, I get a reshape error I find fard to understand. This is the code: cfg = []; cfg.frequency = 20;; cfg.grid = leadfield; cfg.method = 'dics'; cfg.refchan = 'ExtR1'; cfg.channel = {'EEG' 'ExtR1'}; cfg.vol = hdm; cfg.dics.projectnoise = 'no'; cfg.dics.lambda = '1%'; cfg.dics.keepfilter = 'yes'; cfg.dics.keeptrials = 'yes'; cfg.dics.realfilter = 'yes'; sourceAll = ft_sourceanalysis(cfg, freqAll); but this hasn't changed. The error pops up at lines 619/620 of ft_sourceanalysis (Cf = reshape(sum(Cf, 1) / Ntrials, [Nchans Nchans]);), where it supposedly just averages the CSD matrix over trials. And it makes kind of sense as the line says to reshape the CSDs from a 1xNchans matrix into a [Nchans Nchans] one. But why is it poppin up now as nothing has changed in my analyses? I have checked the updates of the last months and I couldn't find anything related to this. So has any one an idea why the analysis crashes at this point. Thanks in advance Best, David ________________________________ Dr. David Pedrosa Clinical Research Fellow Medical Research Council Brain Network Dynamics Unit at the University of Oxford Nuffield Department of Clinical Neurosciences University of Oxford Level 6, West Wing John Radcliffe Hospital, OX3 9DU Tel: +44 (0)1865 572490 E-Mail: david.pedrosa at ndcn.ox.ac.uk http://www.mrcbndu.ox.ac.uk/ _______________________________________________ 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 robert.reinhart at vanderbilt.edu Wed Feb 10 16:57:27 2016 From: robert.reinhart at vanderbilt.edu (Rob Reinhart) Date: Wed, 10 Feb 2016 10:57:27 -0500 Subject: [FieldTrip] source analysis question Message-ID: Dear FieldTrip Forum, I have a naive question. When carrying out this source analysis ( http://www.fieldtriptoolbox.org/tutorial/networkanalysis), I believe there are data from ~275 sensors translated to data occupying ~372 nodes (or voxels) in source space. If this is true (i.e., larger number of source points derived from smaller number of sensors), does this create a margin of error in the source data? And if so, is this error quantifiable? Any advice on understanding this would be greatly appreciated. Thank you so much, Rob Reinhart -------------- next part -------------- An HTML attachment was scrubbed... URL: From david.pedrosa at ndcn.ox.ac.uk Wed Feb 10 17:04:01 2016 From: david.pedrosa at ndcn.ox.ac.uk (David Pedrosa) Date: Wed, 10 Feb 2016 16:04:01 +0000 Subject: [FieldTrip] ft_sourceanalysis, reshape error In-Reply-To: <60FD4C45-84AB-4304-9620-F79109898282@fcdonders.ru.nl> References: , , <60FD4C45-84AB-4304-9620-F79109898282@fcdonders.ru.nl> Message-ID: Hi Jan-Mathijs, thanks for your reply. I have explicitly made sure the order of both is identical (except for the EMG channel which is only present in the frequency analysis but not in the leadfield) and the problem still pops up, which makes me wonder if it could be something else as you suggested. Sorry for not being more precise. So the freqAll contains the fourier spectra for all channels and I have used many trials so I chose 'keeptrials'. Do you have any other suggestions what I could check or which settings might be causing this problem? Thanks Best, David ________________________________ Dr. David Pedrosa Clinical Research Fellow Medical Research Council Brain Network Dynamics Unit at the University of Oxford Nuffield Department of Clinical Neurosciences University of Oxford Level 6, West Wing John Radcliffe Hospital, OX3 9DU Tel: +44 (0)1865 572490 E-Mail: david.pedrosa at ndcn.ox.ac.uk http://www.mrcbndu.ox.ac.uk/ ________________________________ Von: fieldtrip-bounces at science.ru.nl [fieldtrip-bounces at science.ru.nl]" im Auftrag von "Schoffelen, J.M. (Jan Mathijs) [jan.schoffelen at donders.ru.nl] Gesendet: Mittwoch, 10. Februar 2016 15:30 An: FieldTrip discussion list Betreff: Re: [FieldTrip] ft_sourceanalysis, reshape error Hi David, Yes, I think that could cause the problem, although if that were true, your specific issue seems to be a convoluted manifestation of it. Bottom line with respect to channel order: when using pre-computed leadfields, the underlying assumption is more or less that the order of the channels, as represented in the leadfields, is the same as the order of the channels in the data. In principle, this can be accommodated with proper data bookkeeping, i.e. checking the labels that are associated with the data structure containing the forward model (i.e. the leadfield) against the channels in the data. We have started to move in this direction by inclusion of a label-field in data structures containing leadfields. Yet, the explicit check about channels and orderings of channels so far only throws an error if there’s a mismatch in the number of channels. Your reported error with a reshape issue could also reflect a problem with the data handling as such. Some more information would be appreciated in this regard. What does your freqAll contain in terms of spectral data? Fourier coefficients or cross-spectra? In case it’s cross-spectra, does it include multiple trials or not? If not, would it make sense to switch off the cfg.keeptrials flag in your cfg to ft_sourceanalysis. Best, Jan-Mathijs On Feb 10, 2016, at 3:54 PM, David Pedrosa > wrote: Hi Azeez, I have been checking leadfields and data labels and they are actually the same. But the order is slightly different. Do you think this may cause the problems? Thanks for your help. Best, David ________________________________ Dr. David Pedrosa Clinical Research Fellow Medical Research Council Brain Network Dynamics Unit at the University of Oxford Nuffield Department of Clinical Neurosciences University of Oxford Level 6, West Wing John Radcliffe Hospital, OX3 9DU Tel: +44 (0)1865 572490 E-Mail: david.pedrosa at ndcn.ox.ac.uk http://www.mrcbndu.ox.ac.uk/ ________________________________ Von: fieldtrip-bounces at science.ru.nl [fieldtrip-bounces at science.ru.nl]" im Auftrag von "Azeez Adebimpe [azeez.adebimpe5 at gmail.com] Gesendet: Freitag, 5. Februar 2016 22:44 An: FieldTrip discussion list Betreff: Re: [FieldTrip] ft_sourceanalysis, reshape error Hi David, Sorry for late reply, I was on the journey. The same issue happened to me before when the labels in the leadfield and data were not the same. if you have 'Fp1' in leadfield and 'FP1' in data, it will view as different channels. Azeez On Fri, Feb 5, 2016 at 9:51 AM, David Pedrosa > wrote: Hi Azeez, thank you for the fast reply! I hadn't considered that but I have checked and I use the same labels for both leadfield and data. I mean it makes kind of sense that the reshape doesn't work as it is now, but I don't know where the problem is before. Can you think of anything else? Best, David ________________________________ Dr. David Pedrosa Clinical Research Fellow Medical Research Council Brain Network Dynamics Unit at the University of Oxford Nuffield Department of Clinical Neurosciences University of Oxford Level 6, West Wing John Radcliffe Hospital, OX3 9DU Tel: +44 (0)1865 572490 E-Mail: david.pedrosa at ndcn.ox.ac.uk http://www.mrcbndu.ox.ac.uk/ ________________________________ Von: fieldtrip-bounces at science.ru.nl [fieldtrip-bounces at science.ru.nl]" im Auftrag von "Azeez Adebimpe [azeez.adebimpe5 at gmail.com] Gesendet: Freitag, 5. Februar 2016 13:56 An: FieldTrip discussion list Betreff: Re: [FieldTrip] ft_sourceanalysis, reshape error Hi David, Probably the channels' labels in leadfield and data are not the same. check it and try again. Azeez On Fri, Feb 5, 2016 at 8:47 AM, David Pedrosa > wrote: Dear list, after installing the newest version of Fieldtrip today, I have encountered a rather strange error . I am tying to compute corticomuscular coherence for an EEG/EMG dataset and it worked well so far. With the new version however, I get a reshape error I find fard to understand. This is the code: cfg = []; cfg.frequency = 20;; cfg.grid = leadfield; cfg.method = 'dics'; cfg.refchan = 'ExtR1'; cfg.channel = {'EEG' 'ExtR1'}; cfg.vol = hdm; cfg.dics.projectnoise = 'no'; cfg.dics.lambda = '1%'; cfg.dics.keepfilter = 'yes'; cfg.dics.keeptrials = 'yes'; cfg.dics.realfilter = 'yes'; sourceAll = ft_sourceanalysis(cfg, freqAll); but this hasn't changed. The error pops up at lines 619/620 of ft_sourceanalysis (Cf = reshape(sum(Cf, 1) / Ntrials, [Nchans Nchans]);), where it supposedly just averages the CSD matrix over trials. And it makes kind of sense as the line says to reshape the CSDs from a 1xNchans matrix into a [Nchans Nchans] one. But why is it poppin up now as nothing has changed in my analyses? I have checked the updates of the last months and I couldn't find anything related to this. So has any one an idea why the analysis crashes at this point. Thanks in advance Best, David ________________________________ Dr. David Pedrosa Clinical Research Fellow Medical Research Council Brain Network Dynamics Unit at the University of Oxford Nuffield Department of Clinical Neurosciences University of Oxford Level 6, West Wing John Radcliffe Hospital, OX3 9DU Tel: +44 (0)1865 572490 E-Mail: david.pedrosa at ndcn.ox.ac.uk http://www.mrcbndu.ox.ac.uk/ _______________________________________________ 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 Wed Feb 10 17:19:40 2016 From: jan.schoffelen at donders.ru.nl (Schoffelen, J.M. (Jan Mathijs)) Date: Wed, 10 Feb 2016 16:19:40 +0000 Subject: [FieldTrip] ft_sourceanalysis, reshape error In-Reply-To: References: , , <60FD4C45-84AB-4304-9620-F79109898282@fcdonders.ru.nl> Message-ID: <2442A09A-3D29-4D79-8391-1FC9485C08D7@fcdonders.ru.nl> Hi David, Could you first try and upgrade to the most recent version of Fieldtrip? Currently it seems that the reshaping that you mention on line 619/620 of ft_sourceanalysis, corresponds to lines 615/616 in my (i.e. the current) version. It could be that something goes wrong with the data handling, but I want to be sure that you’re not running into the problem with a buggy version of the code that may have been fixed in the meantime. Best Jan-Mathijs On Feb 10, 2016, at 5:04 PM, David Pedrosa > wrote: Hi Jan-Mathijs, thanks for your reply. I have explicitly made sure the order of both is identical (except for the EMG channel which is only present in the frequency analysis but not in the leadfield) and the problem still pops up, which makes me wonder if it could be something else as you suggested. Sorry for not being more precise. So the freqAll contains the fourier spectra for all channels and I have used many trials so I chose 'keeptrials'. Do you have any other suggestions what I could check or which settings might be causing this problem? Thanks Best, David ________________________________ Dr. David Pedrosa Clinical Research Fellow Medical Research Council Brain Network Dynamics Unit at the University of Oxford Nuffield Department of Clinical Neurosciences University of Oxford Level 6, West Wing John Radcliffe Hospital, OX3 9DU Tel: +44 (0)1865 572490 E-Mail: david.pedrosa at ndcn.ox.ac.uk http://www.mrcbndu.ox.ac.uk/ ________________________________ Von: fieldtrip-bounces at science.ru.nl [fieldtrip-bounces at science.ru.nl]" im Auftrag von "Schoffelen, J.M. (Jan Mathijs) [jan.schoffelen at donders.ru.nl] Gesendet: Mittwoch, 10. Februar 2016 15:30 An: FieldTrip discussion list Betreff: Re: [FieldTrip] ft_sourceanalysis, reshape error Hi David, Yes, I think that could cause the problem, although if that were true, your specific issue seems to be a convoluted manifestation of it. Bottom line with respect to channel order: when using pre-computed leadfields, the underlying assumption is more or less that the order of the channels, as represented in the leadfields, is the same as the order of the channels in the data. In principle, this can be accommodated with proper data bookkeeping, i.e. checking the labels that are associated with the data structure containing the forward model (i.e. the leadfield) against the channels in the data. We have started to move in this direction by inclusion of a label-field in data structures containing leadfields. Yet, the explicit check about channels and orderings of channels so far only throws an error if there’s a mismatch in the number of channels. Your reported error with a reshape issue could also reflect a problem with the data handling as such. Some more information would be appreciated in this regard. What does your freqAll contain in terms of spectral data? Fourier coefficients or cross-spectra? In case it’s cross-spectra, does it include multiple trials or not? If not, would it make sense to switch off the cfg.keeptrials flag in your cfg to ft_sourceanalysis. Best, Jan-Mathijs On Feb 10, 2016, at 3:54 PM, David Pedrosa > wrote: Hi Azeez, I have been checking leadfields and data labels and they are actually the same. But the order is slightly different. Do you think this may cause the problems? Thanks for your help. Best, David ________________________________ Dr. David Pedrosa Clinical Research Fellow Medical Research Council Brain Network Dynamics Unit at the University of Oxford Nuffield Department of Clinical Neurosciences University of Oxford Level 6, West Wing John Radcliffe Hospital, OX3 9DU Tel: +44 (0)1865 572490 E-Mail: david.pedrosa at ndcn.ox.ac.uk http://www.mrcbndu.ox.ac.uk/ ________________________________ Von: fieldtrip-bounces at science.ru.nl [fieldtrip-bounces at science.ru.nl]" im Auftrag von "Azeez Adebimpe [azeez.adebimpe5 at gmail.com] Gesendet: Freitag, 5. Februar 2016 22:44 An: FieldTrip discussion list Betreff: Re: [FieldTrip] ft_sourceanalysis, reshape error Hi David, Sorry for late reply, I was on the journey. The same issue happened to me before when the labels in the leadfield and data were not the same. if you have 'Fp1' in leadfield and 'FP1' in data, it will view as different channels. Azeez On Fri, Feb 5, 2016 at 9:51 AM, David Pedrosa > wrote: Hi Azeez, thank you for the fast reply! I hadn't considered that but I have checked and I use the same labels for both leadfield and data. I mean it makes kind of sense that the reshape doesn't work as it is now, but I don't know where the problem is before. Can you think of anything else? Best, David ________________________________ Dr. David Pedrosa Clinical Research Fellow Medical Research Council Brain Network Dynamics Unit at the University of Oxford Nuffield Department of Clinical Neurosciences University of Oxford Level 6, West Wing John Radcliffe Hospital, OX3 9DU Tel: +44 (0)1865 572490 E-Mail: david.pedrosa at ndcn.ox.ac.uk http://www.mrcbndu.ox.ac.uk/ ________________________________ Von: fieldtrip-bounces at science.ru.nl [fieldtrip-bounces at science.ru.nl]" im Auftrag von "Azeez Adebimpe [azeez.adebimpe5 at gmail.com] Gesendet: Freitag, 5. Februar 2016 13:56 An: FieldTrip discussion list Betreff: Re: [FieldTrip] ft_sourceanalysis, reshape error Hi David, Probably the channels' labels in leadfield and data are not the same. check it and try again. Azeez On Fri, Feb 5, 2016 at 8:47 AM, David Pedrosa > wrote: Dear list, after installing the newest version of Fieldtrip today, I have encountered a rather strange error . I am tying to compute corticomuscular coherence for an EEG/EMG dataset and it worked well so far. With the new version however, I get a reshape error I find fard to understand. This is the code: cfg = []; cfg.frequency = 20;; cfg.grid = leadfield; cfg.method = 'dics'; cfg.refchan = 'ExtR1'; cfg.channel = {'EEG' 'ExtR1'}; cfg.vol = hdm; cfg.dics.projectnoise = 'no'; cfg.dics.lambda = '1%'; cfg.dics.keepfilter = 'yes'; cfg.dics.keeptrials = 'yes'; cfg.dics.realfilter = 'yes'; sourceAll = ft_sourceanalysis(cfg, freqAll); but this hasn't changed. The error pops up at lines 619/620 of ft_sourceanalysis (Cf = reshape(sum(Cf, 1) / Ntrials, [Nchans Nchans]);), where it supposedly just averages the CSD matrix over trials. And it makes kind of sense as the line says to reshape the CSDs from a 1xNchans matrix into a [Nchans Nchans] one. But why is it poppin up now as nothing has changed in my analyses? I have checked the updates of the last months and I couldn't find anything related to this. So has any one an idea why the analysis crashes at this point. Thanks in advance Best, David ________________________________ Dr. David Pedrosa Clinical Research Fellow Medical Research Council Brain Network Dynamics Unit at the University of Oxford Nuffield Department of Clinical Neurosciences University of Oxford Level 6, West Wing John Radcliffe Hospital, OX3 9DU Tel: +44 (0)1865 572490 E-Mail: david.pedrosa at ndcn.ox.ac.uk http://www.mrcbndu.ox.ac.uk/ _______________________________________________ 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 _______________________________________________ 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 stephen.politzer-ahles at ling-phil.ox.ac.uk Wed Feb 10 17:30:24 2016 From: stephen.politzer-ahles at ling-phil.ox.ac.uk (Stephen Politzer-Ahles) Date: Wed, 10 Feb 2016 16:30:24 +0000 Subject: [FieldTrip] importing large edf data Message-ID: Hi Leila, I doubt that the file's creation time is stored with that level of precision. Depending on the filesystem of your computer, you might be able to find that information from the operating system's shell; see e.g. http://superuser.com/questions/937380/get-creation-time-of-file-in-milliseconds . I can't imagine what you would need this information for, though, anyway? Normally one would send some trigger events into the data file itself (e.g. on a trigger channel or something like that) so that all the information needed for event processing is within the file. Best, Steve --- Stephen Politzer-Ahles University of Oxford Language and Brain Lab Faculty of Linguistics, Phonetics & Philology http://users.ox.ac.uk/~cpgl0080/ > Message: 1 > Date: Wed, 10 Feb 2016 10:57:23 +0000 (UTC) > From: Leila Ayoubian > To: FieldTrip discussion list > Subject: Re: [FieldTrip] importing large edf data > Message-ID: > <844284323.1594104.1455101843736.JavaMail.yahoo at mail.yahoo.com> > Content-Type: text/plain; charset="utf-8" > > Hi;Thanks. > I have found the timing of the beginning of the file under > data.hdr.orig.T0 > However the time has the format of hh:mm:ssIf I would like to load the > timing of my file with milli-second precision what should I do? > Kind regards > > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From sreenivasan.r.nadar at gmail.com Wed Feb 10 17:33:06 2016 From: sreenivasan.r.nadar at gmail.com (Sreenivasan R. Nadar, Ph.D.) Date: Wed, 10 Feb 2016 11:33:06 -0500 Subject: [FieldTrip] Neuromag/ Elekta 306 layout file In-Reply-To: <620434cf-fd54-4ba5-b262-62e6170cba1c@email.android.com> References: <620434cf-fd54-4ba5-b262-62e6170cba1c@email.android.com> Message-ID: Hi Peter, I used the the 306 layout information from the Neuromag datafile using the following commands and it worked. cfg = []; cfg.component = [1:20]; cfg.comment = 'no'; cfg.skipscale = 'yes'; cfg.skipcomnt = 'no'; cfg.grad = data.grad; ft_topoplotIC(cfg, comp); -Sreenivasan On Mon, Feb 8, 2016 at 2:44 PM, Peter Goodin wrote: > Hi Sreenivasan, > > Try using the neuromag306all.lay and neuromag306cmb.lay layout files. > > Peter > On 9 Feb 2016 6:10 AM, "Sreenivasan R. Nadar, Ph.D." < > sreenivasan.r.nadar at gmail.com> wrote: > > Fieldtripers, > > Anybody has a layout file for Elekta/Neuromag system? I downloaded the > file from the following discussion list: > http://mailman.science.ru.nl/pipermail/fieldtrip/2007-March/001019.html. > However, this layout file give errors (i.e., Attempt to reference field of > non-structure array) when I use it for ft_topoplotIC(cfg,components). Am I > missing something? I used the following commands: > > %~~~~~~~~~~~~~~~ > clear all > > cfg = []; > cfg.dataset = 'C071_resting_150608.fif'; > cfg.hpfilter = 'yes' > cfg.hpfreq = 1; > cfg.channel = {'MEG', '-STI001', '-STI002','-STI003','-STI004', > '-STI005',..., > '-STI006','-STI007','-STI008','-STI101','-STI201','-STI301'}; > > data_continuous = ft_preprocessing(cfg); > > %resample the data to 100Hz > cfg = []; > cfg.resamplefs = 100; > [data] = ft_resampledata(cfg, data_continuous) > > %% running ICA and cleaning data > cfg = []; > cfg.method = 'runica'; > comp = ft_componentanalysis(cfg, data); > > cfg = []; > cfg.component = [1:50]; > cfg.layout = 'NM306all.mat'; > cfg.comment = 'no'; > ft_topoplotIC(cfg, comp); > > %~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ > Thank you > > Sreenivasan > > > > _______________________________________________ > 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 laxmi.shaw22 at gmail.com Wed Feb 10 18:00:01 2016 From: laxmi.shaw22 at gmail.com (Laxmi Shaw) Date: Wed, 10 Feb 2016 22:30:01 +0530 Subject: [FieldTrip] related to topoplot Message-ID: Hello Fieldtrip users, I am new to this tool.I want to use topoplot to plot any parametric quantification of EEG study.Can anybody help me in this regards Regards -- Laxmi Shaw Research Scholar(PhD) IIT Kharagpur West Bengal Ph no-08388837821 -------------- next part -------------- An HTML attachment was scrubbed... URL: From david.pedrosa at ndcn.ox.ac.uk Wed Feb 10 18:31:22 2016 From: david.pedrosa at ndcn.ox.ac.uk (David Pedrosa) Date: Wed, 10 Feb 2016 17:31:22 +0000 Subject: [FieldTrip] ft_sourceanalysis, reshape error In-Reply-To: <60FD4C45-84AB-4304-9620-F79109898282@fcdonders.ru.nl> References: , , <60FD4C45-84AB-4304-9620-F79109898282@fcdonders.ru.nl> Message-ID: Hi Jan-Mathijs, good point! I now have the most recent version but the error is still there, now at lines 615/616. Best, David ________________________________ Von: fieldtrip-bounces at science.ru.nl [fieldtrip-bounces at science.ru.nl]" im Auftrag von "Schoffelen, J.M. (Jan Mathijs) [jan.schoffelen at donders.ru.nl] Gesendet: Mittwoch, 10. Februar 2016 17:19 An: FieldTrip discussion list Betreff: Re: [FieldTrip] ft_sourceanalysis, reshape error Hi David, Could you first try and upgrade to the most recent version of Fieldtrip? Currently it seems that the reshaping that you mention on line 619/620 of ft_sourceanalysis, corresponds to lines 615/616 in my (i.e. the current) version. It could be that something goes wrong with the data handling, but I want to be sure that you’re not running into the problem with a buggy version of the code that may have been fixed in the meantime. Best Jan-Mathijs On Feb 10, 2016, at 5:04 PM, David Pedrosa > wrote: Hi Jan-Mathijs, thanks for your reply. I have explicitly made sure the order of both is identical (except for the EMG channel which is only present in the frequency analysis but not in the leadfield) and the problem still pops up, which makes me wonder if it could be something else as you suggested. Sorry for not being more precise. So the freqAll contains the fourier spectra for all channels and I have used many trials so I chose 'keeptrials'. Do you have any other suggestions what I could check or which settings might be causing this problem? Thanks Best, David ________________________________ Dr. David Pedrosa Clinical Research Fellow Medical Research Council Brain Network Dynamics Unit at the University of Oxford Nuffield Department of Clinical Neurosciences University of Oxford Level 6, West Wing John Radcliffe Hospital, OX3 9DU Tel: +44 (0)1865 572490 E-Mail: david.pedrosa at ndcn.ox.ac.uk http://www.mrcbndu.ox.ac.uk/ ________________________________ Von: fieldtrip-bounces at science.ru.nl [fieldtrip-bounces at science.ru.nl]" im Auftrag von "Schoffelen, J.M. (Jan Mathijs) [jan.schoffelen at donders.ru.nl] Gesendet: Mittwoch, 10. Februar 2016 15:30 An: FieldTrip discussion list Betreff: Re: [FieldTrip] ft_sourceanalysis, reshape error Hi David, Yes, I think that could cause the problem, although if that were true, your specific issue seems to be a convoluted manifestation of it. Bottom line with respect to channel order: when using pre-computed leadfields, the underlying assumption is more or less that the order of the channels, as represented in the leadfields, is the same as the order of the channels in the data. In principle, this can be accommodated with proper data bookkeeping, i.e. checking the labels that are associated with the data structure containing the forward model (i.e. the leadfield) against the channels in the data. We have started to move in this direction by inclusion of a label-field in data structures containing leadfields. Yet, the explicit check about channels and orderings of channels so far only throws an error if there’s a mismatch in the number of channels. Your reported error with a reshape issue could also reflect a problem with the data handling as such. Some more information would be appreciated in this regard. What does your freqAll contain in terms of spectral data? Fourier coefficients or cross-spectra? In case it’s cross-spectra, does it include multiple trials or not? If not, would it make sense to switch off the cfg.keeptrials flag in your cfg to ft_sourceanalysis. Best, Jan-Mathijs On Feb 10, 2016, at 3:54 PM, David Pedrosa > wrote: Hi Azeez, I have been checking leadfields and data labels and they are actually the same. But the order is slightly different. Do you think this may cause the problems? Thanks for your help. Best, David ________________________________ Dr. David Pedrosa Clinical Research Fellow Medical Research Council Brain Network Dynamics Unit at the University of Oxford Nuffield Department of Clinical Neurosciences University of Oxford Level 6, West Wing John Radcliffe Hospital, OX3 9DU Tel: +44 (0)1865 572490 E-Mail: david.pedrosa at ndcn.ox.ac.uk http://www.mrcbndu.ox.ac.uk/ ________________________________ Von: fieldtrip-bounces at science.ru.nl [fieldtrip-bounces at science.ru.nl]" im Auftrag von "Azeez Adebimpe [azeez.adebimpe5 at gmail.com] Gesendet: Freitag, 5. Februar 2016 22:44 An: FieldTrip discussion list Betreff: Re: [FieldTrip] ft_sourceanalysis, reshape error Hi David, Sorry for late reply, I was on the journey. The same issue happened to me before when the labels in the leadfield and data were not the same. if you have 'Fp1' in leadfield and 'FP1' in data, it will view as different channels. Azeez On Fri, Feb 5, 2016 at 9:51 AM, David Pedrosa > wrote: Hi Azeez, thank you for the fast reply! I hadn't considered that but I have checked and I use the same labels for both leadfield and data. I mean it makes kind of sense that the reshape doesn't work as it is now, but I don't know where the problem is before. Can you think of anything else? Best, David ________________________________ Dr. David Pedrosa Clinical Research Fellow Medical Research Council Brain Network Dynamics Unit at the University of Oxford Nuffield Department of Clinical Neurosciences University of Oxford Level 6, West Wing John Radcliffe Hospital, OX3 9DU Tel: +44 (0)1865 572490 E-Mail: david.pedrosa at ndcn.ox.ac.uk http://www.mrcbndu.ox.ac.uk/ ________________________________ Von: fieldtrip-bounces at science.ru.nl [fieldtrip-bounces at science.ru.nl]" im Auftrag von "Azeez Adebimpe [azeez.adebimpe5 at gmail.com] Gesendet: Freitag, 5. Februar 2016 13:56 An: FieldTrip discussion list Betreff: Re: [FieldTrip] ft_sourceanalysis, reshape error Hi David, Probably the channels' labels in leadfield and data are not the same. check it and try again. Azeez On Fri, Feb 5, 2016 at 8:47 AM, David Pedrosa > wrote: Dear list, after installing the newest version of Fieldtrip today, I have encountered a rather strange error . I am tying to compute corticomuscular coherence for an EEG/EMG dataset and it worked well so far. With the new version however, I get a reshape error I find fard to understand. This is the code: cfg = []; cfg.frequency = 20;; cfg.grid = leadfield; cfg.method = 'dics'; cfg.refchan = 'ExtR1'; cfg.channel = {'EEG' 'ExtR1'}; cfg.vol = hdm; cfg.dics.projectnoise = 'no'; cfg.dics.lambda = '1%'; cfg.dics.keepfilter = 'yes'; cfg.dics.keeptrials = 'yes'; cfg.dics.realfilter = 'yes'; sourceAll = ft_sourceanalysis(cfg, freqAll); but this hasn't changed. The error pops up at lines 619/620 of ft_sourceanalysis (Cf = reshape(sum(Cf, 1) / Ntrials, [Nchans Nchans]);), where it supposedly just averages the CSD matrix over trials. And it makes kind of sense as the line says to reshape the CSDs from a 1xNchans matrix into a [Nchans Nchans] one. But why is it poppin up now as nothing has changed in my analyses? I have checked the updates of the last months and I couldn't find anything related to this. So has any one an idea why the analysis crashes at this point. Thanks in advance Best, David ________________________________ Dr. David Pedrosa Clinical Research Fellow Medical Research Council Brain Network Dynamics Unit at the University of Oxford Nuffield Department of Clinical Neurosciences University of Oxford Level 6, West Wing John Radcliffe Hospital, OX3 9DU Tel: +44 (0)1865 572490 E-Mail: david.pedrosa at ndcn.ox.ac.uk http://www.mrcbndu.ox.ac.uk/ _______________________________________________ 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 _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip ________________________________ Dr. David Pedrosa Clinical Research Fellow Medical Research Council Brain Network Dynamics Unit at the University of Oxford Nuffield Department of Clinical Neurosciences University of Oxford Level 6, West Wing John Radcliffe Hospital, OX3 9DU Tel: +44 (0)1865 572490 E-Mail: david.pedrosa at ndcn.ox.ac.uk http://www.mrcbndu.ox.ac.uk/ ________________________________ Von: fieldtrip-bounces at science.ru.nl [fieldtrip-bounces at science.ru.nl]" im Auftrag von "Schoffelen, J.M. (Jan Mathijs) [jan.schoffelen at donders.ru.nl] Gesendet: Mittwoch, 10. Februar 2016 15:30 An: FieldTrip discussion list Betreff: Re: [FieldTrip] ft_sourceanalysis, reshape error Hi David, Yes, I think that could cause the problem, although if that were true, your specific issue seems to be a convoluted manifestation of it. Bottom line with respect to channel order: when using pre-computed leadfields, the underlying assumption is more or less that the order of the channels, as represented in the leadfields, is the same as the order of the channels in the data. In principle, this can be accommodated with proper data bookkeeping, i.e. checking the labels that are associated with the data structure containing the forward model (i.e. the leadfield) against the channels in the data. We have started to move in this direction by inclusion of a label-field in data structures containing leadfields. Yet, the explicit check about channels and orderings of channels so far only throws an error if there’s a mismatch in the number of channels. Your reported error with a reshape issue could also reflect a problem with the data handling as such. Some more information would be appreciated in this regard. What does your freqAll contain in terms of spectral data? Fourier coefficients or cross-spectra? In case it’s cross-spectra, does it include multiple trials or not? If not, would it make sense to switch off the cfg.keeptrials flag in your cfg to ft_sourceanalysis. Best, Jan-Mathijs On Feb 10, 2016, at 3:54 PM, David Pedrosa > wrote: Hi Azeez, I have been checking leadfields and data labels and they are actually the same. But the order is slightly different. Do you think this may cause the problems? Thanks for your help. Best, David ________________________________ Dr. David Pedrosa Clinical Research Fellow Medical Research Council Brain Network Dynamics Unit at the University of Oxford Nuffield Department of Clinical Neurosciences University of Oxford Level 6, West Wing John Radcliffe Hospital, OX3 9DU Tel: +44 (0)1865 572490 E-Mail: david.pedrosa at ndcn.ox.ac.uk http://www.mrcbndu.ox.ac.uk/ ________________________________ Von: fieldtrip-bounces at science.ru.nl [fieldtrip-bounces at science.ru.nl]" im Auftrag von "Azeez Adebimpe [azeez.adebimpe5 at gmail.com] Gesendet: Freitag, 5. Februar 2016 22:44 An: FieldTrip discussion list Betreff: Re: [FieldTrip] ft_sourceanalysis, reshape error Hi David, Sorry for late reply, I was on the journey. The same issue happened to me before when the labels in the leadfield and data were not the same. if you have 'Fp1' in leadfield and 'FP1' in data, it will view as different channels. Azeez On Fri, Feb 5, 2016 at 9:51 AM, David Pedrosa > wrote: Hi Azeez, thank you for the fast reply! I hadn't considered that but I have checked and I use the same labels for both leadfield and data. I mean it makes kind of sense that the reshape doesn't work as it is now, but I don't know where the problem is before. Can you think of anything else? Best, David ________________________________ Dr. David Pedrosa Clinical Research Fellow Medical Research Council Brain Network Dynamics Unit at the University of Oxford Nuffield Department of Clinical Neurosciences University of Oxford Level 6, West Wing John Radcliffe Hospital, OX3 9DU Tel: +44 (0)1865 572490 E-Mail: david.pedrosa at ndcn.ox.ac.uk http://www.mrcbndu.ox.ac.uk/ ________________________________ Von: fieldtrip-bounces at science.ru.nl [fieldtrip-bounces at science.ru.nl]" im Auftrag von "Azeez Adebimpe [azeez.adebimpe5 at gmail.com] Gesendet: Freitag, 5. Februar 2016 13:56 An: FieldTrip discussion list Betreff: Re: [FieldTrip] ft_sourceanalysis, reshape error Hi David, Probably the channels' labels in leadfield and data are not the same. check it and try again. Azeez On Fri, Feb 5, 2016 at 8:47 AM, David Pedrosa > wrote: Dear list, after installing the newest version of Fieldtrip today, I have encountered a rather strange error . I am tying to compute corticomuscular coherence for an EEG/EMG dataset and it worked well so far. With the new version however, I get a reshape error I find fard to understand. This is the code: cfg = []; cfg.frequency = 20;; cfg.grid = leadfield; cfg.method = 'dics'; cfg.refchan = 'ExtR1'; cfg.channel = {'EEG' 'ExtR1'}; cfg.vol = hdm; cfg.dics.projectnoise = 'no'; cfg.dics.lambda = '1%'; cfg.dics.keepfilter = 'yes'; cfg.dics.keeptrials = 'yes'; cfg.dics.realfilter = 'yes'; sourceAll = ft_sourceanalysis(cfg, freqAll); but this hasn't changed. The error pops up at lines 619/620 of ft_sourceanalysis (Cf = reshape(sum(Cf, 1) / Ntrials, [Nchans Nchans]);), where it supposedly just averages the CSD matrix over trials. And it makes kind of sense as the line says to reshape the CSDs from a 1xNchans matrix into a [Nchans Nchans] one. But why is it poppin up now as nothing has changed in my analyses? I have checked the updates of the last months and I couldn't find anything related to this. So has any one an idea why the analysis crashes at this point. Thanks in advance Best, David ________________________________ Dr. David Pedrosa Clinical Research Fellow Medical Research Council Brain Network Dynamics Unit at the University of Oxford Nuffield Department of Clinical Neurosciences University of Oxford Level 6, West Wing John Radcliffe Hospital, OX3 9DU Tel: +44 (0)1865 572490 E-Mail: david.pedrosa at ndcn.ox.ac.uk http://www.mrcbndu.ox.ac.uk/ _______________________________________________ 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 Max.Cantor at Colorado.EDU Thu Feb 11 01:03:36 2016 From: Max.Cantor at Colorado.EDU (Max Cantor) Date: Wed, 10 Feb 2016 17:03:36 -0700 Subject: [FieldTrip] define trials from multiple datasets Message-ID: Hi fieldtrip community, I'm trying to use ft_definetrial to create a trial definition from 8 datasets, recorded back-to-back from a subject, and then use ft_redefinetrial with that trial definition and raw data that was concatenated in eeglab and converted to a fieldtrip structure using eeglab2fieldtrip. Is this feasible in a relatively straightforward way, or would I be better off doing the epoching in eeglab as well before converting back to fieldtrip? On a side note, I chose to concatenate the data in eeglab because I could not figure out a convenient way to do so in fieldtrip. I know there is ft_appenddata, but as best as I can tell this is meant to be used after epoching, and the sample information was not being concatenated (or at least not properly), which was creating problems down the line with artifact rejection in my pipeline. Maybe there was some other way to do this properly in fieldtrip that I had not considered in the first place. Best, Max -- Max Cantor Graduate Student Cognitive Neuroscience of Language Lab University of Colorado Boulder -------------- next part -------------- An HTML attachment was scrubbed... URL: From a.stolk8 at gmail.com Thu Feb 11 01:15:55 2016 From: a.stolk8 at gmail.com (Arjen Stolk) Date: Wed, 10 Feb 2016 16:15:55 -0800 Subject: [FieldTrip] define trials from multiple datasets In-Reply-To: References: Message-ID: Hi Max, See these pages and judge for yourself: http://www.fieldtriptoolbox.org/example/getting_started_with_reading_raw_eeg_or_meg_data http://www.fieldtriptoolbox.org/example/making_your_own_trialfun_for_conditional_trial_definition If your trials are defined as x1 time before a certain trigger until x2 time after, it's very easy. If it's slightly more complicated, then check that second page. In short, the idea there is to make ft_definetrial call a tailormade trial function (cfg.trialfun). The good news is that if the triggers and trials are the same for each subject, you only have to make one function. Hope that gets you started, Arjen 2016-02-10 16:03 GMT-08:00 Max Cantor : > Hi fieldtrip community, > > I'm trying to use ft_definetrial to create a trial definition from 8 > datasets, recorded back-to-back from a subject, and then use > ft_redefinetrial with that trial definition and raw data that was > concatenated in eeglab and converted to a fieldtrip structure using > eeglab2fieldtrip. Is this feasible in a relatively straightforward way, or > would I be better off doing the epoching in eeglab as well before > converting back to fieldtrip? > > On a side note, I chose to concatenate the data in eeglab because I could > not figure out a convenient way to do so in fieldtrip. I know there is > ft_appenddata, but as best as I can tell this is meant to be used after > epoching, and the sample information was not being concatenated (or at > least not properly), which was creating problems down the line with > artifact rejection in my pipeline. Maybe there was some other way to do > this properly in fieldtrip that I had not considered in the first place. > > Best, > > Max > > -- > Max Cantor > Graduate Student > Cognitive Neuroscience of Language Lab > University of Colorado Boulder > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > -------------- next part -------------- An HTML attachment was scrubbed... URL: From a.stolk8 at gmail.com Thu Feb 11 01:18:40 2016 From: a.stolk8 at gmail.com (Arjen Stolk) Date: Wed, 10 Feb 2016 16:18:40 -0800 Subject: [FieldTrip] define trials from multiple datasets In-Reply-To: References: Message-ID: I see now you wrote 8 sessions with the same subject. You could make a loop that conceptually looks like this: for s = 1:numsessions cfg = ft_definetrial(cfg); data{s} = ft_preprocessing(cfg); end data_all = ft_appenddata([], data{:}); 2016-02-10 16:15 GMT-08:00 Arjen Stolk : > Hi Max, > > See these pages and judge for yourself: > > http://www.fieldtriptoolbox.org/example/getting_started_with_reading_raw_eeg_or_meg_data > > http://www.fieldtriptoolbox.org/example/making_your_own_trialfun_for_conditional_trial_definition > > If your trials are defined as x1 time before a certain trigger until x2 > time after, it's very easy. If it's slightly more complicated, then check > that second page. In short, the idea there is to make ft_definetrial call a > tailormade trial function (cfg.trialfun). The good news is that if the > triggers and trials are the same for each subject, you only have to make > one function. > > Hope that gets you started, > Arjen > > 2016-02-10 16:03 GMT-08:00 Max Cantor : > >> Hi fieldtrip community, >> >> I'm trying to use ft_definetrial to create a trial definition from 8 >> datasets, recorded back-to-back from a subject, and then use >> ft_redefinetrial with that trial definition and raw data that was >> concatenated in eeglab and converted to a fieldtrip structure using >> eeglab2fieldtrip. Is this feasible in a relatively straightforward way, or >> would I be better off doing the epoching in eeglab as well before >> converting back to fieldtrip? >> >> On a side note, I chose to concatenate the data in eeglab because I could >> not figure out a convenient way to do so in fieldtrip. I know there is >> ft_appenddata, but as best as I can tell this is meant to be used after >> epoching, and the sample information was not being concatenated (or at >> least not properly), which was creating problems down the line with >> artifact rejection in my pipeline. Maybe there was some other way to do >> this properly in fieldtrip that I had not considered in the first place. >> >> Best, >> >> Max >> >> -- >> Max Cantor >> Graduate Student >> Cognitive Neuroscience of Language Lab >> University of Colorado Boulder >> >> _______________________________________________ >> 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 Max.Cantor at Colorado.EDU Thu Feb 11 01:52:30 2016 From: Max.Cantor at Colorado.EDU (Max Cantor) Date: Wed, 10 Feb 2016 17:52:30 -0700 Subject: [FieldTrip] define trials from multiple datasets In-Reply-To: References: Message-ID: Hi Arjen, I had a feeling it would involve creating my own trial function, which is something I've never done but have looked over in the past, so I'll give that a shot, thanks! As for your suggested loop... I had tried something almost like that, except preprocessing the data first and then using ft_redefinetrial, and then concatenating them all with ft_appenddata. However, What I ended up realizing was that the .trl array was only being retained from one of the 8 sessions, which was creating problems with artifact rejection since the artifact rejection functions use the sample points from .trl. Are you suggesting that if I had used ft_definetrial and then that configuration in ft_preprocessing, rather than what I did, that it would have concatenated .trl for all sessions? If this is not the case, and either way should work, maybe I did something else wrong, or misdiagnosed the problem altogether... On Wed, Feb 10, 2016 at 5:18 PM, Arjen Stolk wrote: > I see now you wrote 8 sessions with the same subject. You could make a > loop that conceptually looks like this: > > for s = 1:numsessions > > cfg = ft_definetrial(cfg); > data{s} = ft_preprocessing(cfg); > > end > data_all = ft_appenddata([], data{:}); > > 2016-02-10 16:15 GMT-08:00 Arjen Stolk : > >> Hi Max, >> >> See these pages and judge for yourself: >> >> http://www.fieldtriptoolbox.org/example/getting_started_with_reading_raw_eeg_or_meg_data >> >> http://www.fieldtriptoolbox.org/example/making_your_own_trialfun_for_conditional_trial_definition >> >> If your trials are defined as x1 time before a certain trigger until x2 >> time after, it's very easy. If it's slightly more complicated, then check >> that second page. In short, the idea there is to make ft_definetrial call a >> tailormade trial function (cfg.trialfun). The good news is that if the >> triggers and trials are the same for each subject, you only have to make >> one function. >> >> Hope that gets you started, >> Arjen >> >> 2016-02-10 16:03 GMT-08:00 Max Cantor : >> >>> Hi fieldtrip community, >>> >>> I'm trying to use ft_definetrial to create a trial definition from 8 >>> datasets, recorded back-to-back from a subject, and then use >>> ft_redefinetrial with that trial definition and raw data that was >>> concatenated in eeglab and converted to a fieldtrip structure using >>> eeglab2fieldtrip. Is this feasible in a relatively straightforward way, or >>> would I be better off doing the epoching in eeglab as well before >>> converting back to fieldtrip? >>> >>> On a side note, I chose to concatenate the data in eeglab because I >>> could not figure out a convenient way to do so in fieldtrip. I know there >>> is ft_appenddata, but as best as I can tell this is meant to be used after >>> epoching, and the sample information was not being concatenated (or at >>> least not properly), which was creating problems down the line with >>> artifact rejection in my pipeline. Maybe there was some other way to do >>> this properly in fieldtrip that I had not considered in the first place. >>> >>> Best, >>> >>> Max >>> >>> -- >>> Max Cantor >>> Graduate Student >>> Cognitive Neuroscience of Language Lab >>> University of Colorado Boulder >>> >>> _______________________________________________ >>> fieldtrip mailing list >>> fieldtrip at donders.ru.nl >>> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip >>> >> >> > -- Max Cantor Graduate Student Cognitive Neuroscience of Language Lab University of Colorado Boulder -------------- next part -------------- An HTML attachment was scrubbed... URL: From jan.schoffelen at donders.ru.nl Thu Feb 11 09:00:29 2016 From: jan.schoffelen at donders.ru.nl (Schoffelen, J.M. (Jan Mathijs)) Date: Thu, 11 Feb 2016 08:00:29 +0000 Subject: [FieldTrip] ft_sourceanalysis, reshape error In-Reply-To: References: , , <60FD4C45-84AB-4304-9620-F79109898282@fcdonders.ru.nl> Message-ID: <0DBD24DC-AF86-423B-8903-7795EF34C696@fcdonders.ru.nl> Hi David, I realized that the issue you raised is related to something that has already been flagged in our bugzilla issue tracker system (on bugzilla.fieldtriptoolbox.org, look for bug #3029). As a matter of fact, I filed this one myself, so I should have recognized it earlier. Although your problem is slightly different, it’s indeed related to the altered data handling that also causes trouble in the bug mentioned. I suggest that you sign up on bugzilla and add yourself to the CC list of this bug (this suggestion of course also holds for the person who followed up on this thread in an e-mail sent to my personal e-mail account :o) ). In this way you can keep an eye on our progress fixing it, and provide feedback/input. Best wishes, Jan-Mathijs On Feb 10, 2016, at 6:31 PM, David Pedrosa > wrote: Hi Jan-Mathijs, good point! I now have the most recent version but the error is still there, now at lines 615/616. Best, David ________________________________ Von: fieldtrip-bounces at science.ru.nl [fieldtrip-bounces at science.ru.nl]" im Auftrag von "Schoffelen, J.M. (Jan Mathijs) [jan.schoffelen at donders.ru.nl] Gesendet: Mittwoch, 10. Februar 2016 17:19 An: FieldTrip discussion list Betreff: Re: [FieldTrip] ft_sourceanalysis, reshape error Hi David, Could you first try and upgrade to the most recent version of Fieldtrip? Currently it seems that the reshaping that you mention on line 619/620 of ft_sourceanalysis, corresponds to lines 615/616 in my (i.e. the current) version. It could be that something goes wrong with the data handling, but I want to be sure that you’re not running into the problem with a buggy version of the code that may have been fixed in the meantime. Best Jan-Mathijs On Feb 10, 2016, at 5:04 PM, David Pedrosa > wrote: Hi Jan-Mathijs, thanks for your reply. I have explicitly made sure the order of both is identical (except for the EMG channel which is only present in the frequency analysis but not in the leadfield) and the problem still pops up, which makes me wonder if it could be something else as you suggested. Sorry for not being more precise. So the freqAll contains the fourier spectra for all channels and I have used many trials so I chose 'keeptrials'. Do you have any other suggestions what I could check or which settings might be causing this problem? Thanks Best, David ________________________________ Dr. David Pedrosa Clinical Research Fellow Medical Research Council Brain Network Dynamics Unit at the University of Oxford Nuffield Department of Clinical Neurosciences University of Oxford Level 6, West Wing John Radcliffe Hospital, OX3 9DU Tel: +44 (0)1865 572490 E-Mail: david.pedrosa at ndcn.ox.ac.uk http://www.mrcbndu.ox.ac.uk/ ________________________________ Von: fieldtrip-bounces at science.ru.nl [fieldtrip-bounces at science.ru.nl]" im Auftrag von "Schoffelen, J.M. (Jan Mathijs) [jan.schoffelen at donders.ru.nl] Gesendet: Mittwoch, 10. Februar 2016 15:30 An: FieldTrip discussion list Betreff: Re: [FieldTrip] ft_sourceanalysis, reshape error Hi David, Yes, I think that could cause the problem, although if that were true, your specific issue seems to be a convoluted manifestation of it. Bottom line with respect to channel order: when using pre-computed leadfields, the underlying assumption is more or less that the order of the channels, as represented in the leadfields, is the same as the order of the channels in the data. In principle, this can be accommodated with proper data bookkeeping, i.e. checking the labels that are associated with the data structure containing the forward model (i.e. the leadfield) against the channels in the data. We have started to move in this direction by inclusion of a label-field in data structures containing leadfields. Yet, the explicit check about channels and orderings of channels so far only throws an error if there’s a mismatch in the number of channels. Your reported error with a reshape issue could also reflect a problem with the data handling as such. Some more information would be appreciated in this regard. What does your freqAll contain in terms of spectral data? Fourier coefficients or cross-spectra? In case it’s cross-spectra, does it include multiple trials or not? If not, would it make sense to switch off the cfg.keeptrials flag in your cfg to ft_sourceanalysis. Best, Jan-Mathijs On Feb 10, 2016, at 3:54 PM, David Pedrosa > wrote: Hi Azeez, I have been checking leadfields and data labels and they are actually the same. But the order is slightly different. Do you think this may cause the problems? Thanks for your help. Best, David ________________________________ Dr. David Pedrosa Clinical Research Fellow Medical Research Council Brain Network Dynamics Unit at the University of Oxford Nuffield Department of Clinical Neurosciences University of Oxford Level 6, West Wing John Radcliffe Hospital, OX3 9DU Tel: +44 (0)1865 572490 E-Mail: david.pedrosa at ndcn.ox.ac.uk http://www.mrcbndu.ox.ac.uk/ ________________________________ Von: fieldtrip-bounces at science.ru.nl [fieldtrip-bounces at science.ru.nl]" im Auftrag von "Azeez Adebimpe [azeez.adebimpe5 at gmail.com] Gesendet: Freitag, 5. Februar 2016 22:44 An: FieldTrip discussion list Betreff: Re: [FieldTrip] ft_sourceanalysis, reshape error Hi David, Sorry for late reply, I was on the journey. The same issue happened to me before when the labels in the leadfield and data were not the same. if you have 'Fp1' in leadfield and 'FP1' in data, it will view as different channels. Azeez On Fri, Feb 5, 2016 at 9:51 AM, David Pedrosa > wrote: Hi Azeez, thank you for the fast reply! I hadn't considered that but I have checked and I use the same labels for both leadfield and data. I mean it makes kind of sense that the reshape doesn't work as it is now, but I don't know where the problem is before. Can you think of anything else? Best, David ________________________________ Dr. David Pedrosa Clinical Research Fellow Medical Research Council Brain Network Dynamics Unit at the University of Oxford Nuffield Department of Clinical Neurosciences University of Oxford Level 6, West Wing John Radcliffe Hospital, OX3 9DU Tel: +44 (0)1865 572490 E-Mail: david.pedrosa at ndcn.ox.ac.uk http://www.mrcbndu.ox.ac.uk/ ________________________________ Von: fieldtrip-bounces at science.ru.nl [fieldtrip-bounces at science.ru.nl]" im Auftrag von "Azeez Adebimpe [azeez.adebimpe5 at gmail.com] Gesendet: Freitag, 5. Februar 2016 13:56 An: FieldTrip discussion list Betreff: Re: [FieldTrip] ft_sourceanalysis, reshape error Hi David, Probably the channels' labels in leadfield and data are not the same. check it and try again. Azeez On Fri, Feb 5, 2016 at 8:47 AM, David Pedrosa > wrote: Dear list, after installing the newest version of Fieldtrip today, I have encountered a rather strange error . I am tying to compute corticomuscular coherence for an EEG/EMG dataset and it worked well so far. With the new version however, I get a reshape error I find fard to understand. This is the code: cfg = []; cfg.frequency = 20;; cfg.grid = leadfield; cfg.method = 'dics'; cfg.refchan = 'ExtR1'; cfg.channel = {'EEG' 'ExtR1'}; cfg.vol = hdm; cfg.dics.projectnoise = 'no'; cfg.dics.lambda = '1%'; cfg.dics.keepfilter = 'yes'; cfg.dics.keeptrials = 'yes'; cfg.dics.realfilter = 'yes'; sourceAll = ft_sourceanalysis(cfg, freqAll); but this hasn't changed. The error pops up at lines 619/620 of ft_sourceanalysis (Cf = reshape(sum(Cf, 1) / Ntrials, [Nchans Nchans]);), where it supposedly just averages the CSD matrix over trials. And it makes kind of sense as the line says to reshape the CSDs from a 1xNchans matrix into a [Nchans Nchans] one. But why is it poppin up now as nothing has changed in my analyses? I have checked the updates of the last months and I couldn't find anything related to this. So has any one an idea why the analysis crashes at this point. Thanks in advance Best, David ________________________________ Dr. David Pedrosa Clinical Research Fellow Medical Research Council Brain Network Dynamics Unit at the University of Oxford Nuffield Department of Clinical Neurosciences University of Oxford Level 6, West Wing John Radcliffe Hospital, OX3 9DU Tel: +44 (0)1865 572490 E-Mail: david.pedrosa at ndcn.ox.ac.uk http://www.mrcbndu.ox.ac.uk/ _______________________________________________ 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 _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip ________________________________ Dr. David Pedrosa Clinical Research Fellow Medical Research Council Brain Network Dynamics Unit at the University of Oxford Nuffield Department of Clinical Neurosciences University of Oxford Level 6, West Wing John Radcliffe Hospital, OX3 9DU Tel: +44 (0)1865 572490 E-Mail: david.pedrosa at ndcn.ox.ac.uk http://www.mrcbndu.ox.ac.uk/ ________________________________ Von: fieldtrip-bounces at science.ru.nl [fieldtrip-bounces at science.ru.nl]" im Auftrag von "Schoffelen, J.M. (Jan Mathijs) [jan.schoffelen at donders.ru.nl] Gesendet: Mittwoch, 10. Februar 2016 15:30 An: FieldTrip discussion list Betreff: Re: [FieldTrip] ft_sourceanalysis, reshape error Hi David, Yes, I think that could cause the problem, although if that were true, your specific issue seems to be a convoluted manifestation of it. Bottom line with respect to channel order: when using pre-computed leadfields, the underlying assumption is more or less that the order of the channels, as represented in the leadfields, is the same as the order of the channels in the data. In principle, this can be accommodated with proper data bookkeeping, i.e. checking the labels that are associated with the data structure containing the forward model (i.e. the leadfield) against the channels in the data. We have started to move in this direction by inclusion of a label-field in data structures containing leadfields. Yet, the explicit check about channels and orderings of channels so far only throws an error if there’s a mismatch in the number of channels. Your reported error with a reshape issue could also reflect a problem with the data handling as such. Some more information would be appreciated in this regard. What does your freqAll contain in terms of spectral data? Fourier coefficients or cross-spectra? In case it’s cross-spectra, does it include multiple trials or not? If not, would it make sense to switch off the cfg.keeptrials flag in your cfg to ft_sourceanalysis. Best, Jan-Mathijs On Feb 10, 2016, at 3:54 PM, David Pedrosa > wrote: Hi Azeez, I have been checking leadfields and data labels and they are actually the same. But the order is slightly different. Do you think this may cause the problems? Thanks for your help. Best, David ________________________________ Dr. David Pedrosa Clinical Research Fellow Medical Research Council Brain Network Dynamics Unit at the University of Oxford Nuffield Department of Clinical Neurosciences University of Oxford Level 6, West Wing John Radcliffe Hospital, OX3 9DU Tel: +44 (0)1865 572490 E-Mail: david.pedrosa at ndcn.ox.ac.uk http://www.mrcbndu.ox.ac.uk/ ________________________________ Von: fieldtrip-bounces at science.ru.nl [fieldtrip-bounces at science.ru.nl]" im Auftrag von "Azeez Adebimpe [azeez.adebimpe5 at gmail.com] Gesendet: Freitag, 5. Februar 2016 22:44 An: FieldTrip discussion list Betreff: Re: [FieldTrip] ft_sourceanalysis, reshape error Hi David, Sorry for late reply, I was on the journey. The same issue happened to me before when the labels in the leadfield and data were not the same. if you have 'Fp1' in leadfield and 'FP1' in data, it will view as different channels. Azeez On Fri, Feb 5, 2016 at 9:51 AM, David Pedrosa > wrote: Hi Azeez, thank you for the fast reply! I hadn't considered that but I have checked and I use the same labels for both leadfield and data. I mean it makes kind of sense that the reshape doesn't work as it is now, but I don't know where the problem is before. Can you think of anything else? Best, David ________________________________ Dr. David Pedrosa Clinical Research Fellow Medical Research Council Brain Network Dynamics Unit at the University of Oxford Nuffield Department of Clinical Neurosciences University of Oxford Level 6, West Wing John Radcliffe Hospital, OX3 9DU Tel: +44 (0)1865 572490 E-Mail: david.pedrosa at ndcn.ox.ac.uk http://www.mrcbndu.ox.ac.uk/ ________________________________ Von: fieldtrip-bounces at science.ru.nl [fieldtrip-bounces at science.ru.nl]" im Auftrag von "Azeez Adebimpe [azeez.adebimpe5 at gmail.com] Gesendet: Freitag, 5. Februar 2016 13:56 An: FieldTrip discussion list Betreff: Re: [FieldTrip] ft_sourceanalysis, reshape error Hi David, Probably the channels' labels in leadfield and data are not the same. check it and try again. Azeez On Fri, Feb 5, 2016 at 8:47 AM, David Pedrosa > wrote: Dear list, after installing the newest version of Fieldtrip today, I have encountered a rather strange error . I am tying to compute corticomuscular coherence for an EEG/EMG dataset and it worked well so far. With the new version however, I get a reshape error I find fard to understand. This is the code: cfg = []; cfg.frequency = 20;; cfg.grid = leadfield; cfg.method = 'dics'; cfg.refchan = 'ExtR1'; cfg.channel = {'EEG' 'ExtR1'}; cfg.vol = hdm; cfg.dics.projectnoise = 'no'; cfg.dics.lambda = '1%'; cfg.dics.keepfilter = 'yes'; cfg.dics.keeptrials = 'yes'; cfg.dics.realfilter = 'yes'; sourceAll = ft_sourceanalysis(cfg, freqAll); but this hasn't changed. The error pops up at lines 619/620 of ft_sourceanalysis (Cf = reshape(sum(Cf, 1) / Ntrials, [Nchans Nchans]);), where it supposedly just averages the CSD matrix over trials. And it makes kind of sense as the line says to reshape the CSDs from a 1xNchans matrix into a [Nchans Nchans] one. But why is it poppin up now as nothing has changed in my analyses? I have checked the updates of the last months and I couldn't find anything related to this. So has any one an idea why the analysis crashes at this point. Thanks in advance Best, David ________________________________ Dr. David Pedrosa Clinical Research Fellow Medical Research Council Brain Network Dynamics Unit at the University of Oxford Nuffield Department of Clinical Neurosciences University of Oxford Level 6, West Wing John Radcliffe Hospital, OX3 9DU Tel: +44 (0)1865 572490 E-Mail: david.pedrosa at ndcn.ox.ac.uk http://www.mrcbndu.ox.ac.uk/ _______________________________________________ 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 _______________________________________________ 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 tzvetan.popov at uni-konstanz.de Thu Feb 11 09:45:48 2016 From: tzvetan.popov at uni-konstanz.de (Tzvetan Popov) Date: Thu, 11 Feb 2016 09:45:48 +0100 Subject: [FieldTrip] source analysis question In-Reply-To: References: Message-ID: Hi Rob, your observation is correct. In the particular method applied, i.e. spatial filtering, one considers always one node at the time. On the basis of the data covariance and the lead field the goal is to compute a set of weights that essentially allow for reconstructing the time course of activity at a given location independent from all others. The entire discretized brain volume is “scanned” eventually resulting in distributed source map. The observation you made becomes relevant when you estimate the activity at all locations at once, e.g. minimum-norm distributed source modeling. best tzvetan > Dear FieldTrip Forum, > > I have a naive question. When carrying out this source analysis (http://www.fieldtriptoolbox.org/tutorial/networkanalysis), I believe there are data from ~275 sensors translated to data occupying ~372 nodes (or voxels) in source space. If this is true (i.e., larger number of source points derived from smaller number of sensors), does this create a margin of error in the source data? And if so, is this error quantifiable? > > Any advice on understanding this would be greatly appreciated. > > Thank you so much, > > Rob Reinhart > _______________________________________________ > 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 Mary-Jo.Diepeveen at mpi.nl Thu Feb 11 11:23:17 2016 From: Mary-Jo.Diepeveen at mpi.nl (Diepeveen, Mary-Jo) Date: Thu, 11 Feb 2016 10:23:17 +0000 Subject: [FieldTrip] Repair missing channel Message-ID: <9AEBC8200222F443B6E297F0D479F1311C4865D0@UM-EXCDAG-A03.um.gwdg.de> Hello, During artifact rejection (in summary mode), I had to remove the F7 channel for some of my subjects. I'm now trying to replace these missing channels but I'm having some difficulties. Since I only have 28 channels (excl. eye and reference) and F7 is all the way on the front left, I thought using the average method would be the best. After some trial and errors, I now have this: cfg = []; cfg.method = 'template'; cfg.template = 'custom_easycap32.mat'; cfg.channel = {'F7'}; neighbours = ft_prepare_neighbours(cfg, data_nat_clean) cfg = []; cfg.method = 'average'; cfg.layout = 'custom_easycap32.mat'; cfg.missingchannel = ft_channelselection('F7', data_nat_clean.label); cfg.neighbours = neighbours; data_nat_chan = ft_channelrepair(cfg, data_nat_clean) If I run this code, I get the following which I think is due to an error in the first part: Trying to load sensor neighbours from a template Successfully loaded neighbour structure from custom_easycap32.mat Improper index matrix reference. Error in ft_prepare_neighbours (line 219) neighb_chans = {neighbours(:).label}; What does this error mean and how can I fix this? I have also tried some things without the first part, but then either it said that everything worked at the resulting data still had 27 channels (so without the F7) or I got an error saying there is a reference to non-existing field 'neighbours' . I hope someone can help me out! Thanks, Mary-Jo -------------- next part -------------- An HTML attachment was scrubbed... URL: From niels.haumann at dac.au.dk Thu Feb 11 13:42:37 2016 From: niels.haumann at dac.au.dk (Niels Trusbak Haumann) Date: Thu, 11 Feb 2016 12:42:37 +0000 Subject: [FieldTrip] related to topoplot In-Reply-To: References: Message-ID: <9DC7C16686EE6344B54A9D39046541939977DC8B@SRVUNIMBX05.uni.au.dk> Hello Laxmi. You will find a tutorial here, which explains how to make topoplots: http://www.fieldtriptoolbox.org/tutorial/plotting You will need to define a time window for the topoplot in seconds with the cfg.xlim variable. Optionally you can also define a lower and upper limit for the mean values within this time window with the cfg.zlim variable. Depending on which type of EEG system you are applying, you will also need to define a layout template for the topoplot. Different layout templates are included with FieldTrip and described here: http://www.fieldtriptoolbox.org/template/layout Best Niels Center for Music In the Brain Dept. Clinical Medicine, Aarhus University Hospital, Denmark ________________________________ Fra: fieldtrip-bounces at science.ru.nl [fieldtrip-bounces at science.ru.nl] på vegne af Laxmi Shaw [laxmi.shaw22 at gmail.com] Sendt: 10. februar 2016 18:00 Til: fieldtrip at science.ru.nl Emne: [FieldTrip] related to topoplot Hello Fieldtrip users, I am new to this tool.I want to use topoplot to plot any parametric quantification of EEG study.Can anybody help me in this regards Regards -- Laxmi Shaw Research Scholar(PhD) IIT Kharagpur West Bengal Ph no-08388837821 -------------- next part -------------- An HTML attachment was scrubbed... URL: From robert.reinhart at vanderbilt.edu Thu Feb 11 17:54:45 2016 From: robert.reinhart at vanderbilt.edu (Rob Reinhart) Date: Thu, 11 Feb 2016 10:54:45 -0600 Subject: [FieldTrip] source analysis question In-Reply-To: References: Message-ID: That's clear now. Thank you so much! Rob On Thursday, February 11, 2016, Tzvetan Popov wrote: > > Hi Rob, > your observation is correct. In the particular method applied, i.e. > spatial filtering, one considers always one node at the time. On the basis > of the data covariance and the lead field the goal is to compute a set of > weights that essentially allow for reconstructing the time course of > activity at a given location independent from all others. The entire > discretized brain volume is “scanned” eventually resulting in distributed > source map. The observation you made becomes relevant when you estimate the > activity at all locations at once, e.g. minimum-norm distributed source > modeling. > > best > tzvetan > > Dear FieldTrip Forum, > > I have a naive question. When carrying out this source analysis ( > http://www.fieldtriptoolbox.org/tutorial/networkanalysis), I believe > there are data from ~275 sensors translated to data occupying ~372 nodes > (or voxels) in source space. If this is true (i.e., larger number of source > points derived from smaller number of sensors), does this create a margin > of error in the source data? And if so, is this error quantifiable? > > Any advice on understanding this would be greatly appreciated. > > Thank you so much, > > Rob Reinhart > _______________________________________________ > 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 wbatschi1976 at gmail.com Fri Feb 12 01:30:39 2016 From: wbatschi1976 at gmail.com (Werner Batschi) Date: Fri, 12 Feb 2016 00:30:39 +0000 Subject: [FieldTrip] Bipolar EMG Message-ID: Dear all, I'm starting right now with EEG analyses using fieldtrip and I have a question which I have not been able to figure out in the list or in the examples so far. In case of recording a bipolar EMG with the BrainAmp System we use, I get a pair of electrodes to work with. Suppose I want to preprocess this data for doing e.g. coherence analyses later, how do you manage both channels? It's not so much a technical question of rectifying and/or filtering that bothers me but rather the question if you would "rereference" or put the EMG channels into relation or something else. Or am I missing something obvious here Thank you, Werner -------------- next part -------------- An HTML attachment was scrubbed... URL: From lev.tankelevitch at some.ox.ac.uk Fri Feb 12 11:18:28 2016 From: lev.tankelevitch at some.ox.ac.uk (Lev Tankelevitch) Date: Fri, 12 Feb 2016 10:18:28 +0000 Subject: [FieldTrip] Neuromag306 planar neighbourhood structure Message-ID: Hi all, I'd like to use ft_channelrepair to interpolate some bad gradiometers in my data that Maxfilter has not fixed very well. However, the neuromag306planar_neighb.mat structure includes both latitude and longitude grads as neighbours for each grad, whereas I'd like to use only e.g., latitude grads for interpolation of other latitude grads, and not mix them together. I wanted to create separate neighbor structures for each grad type, but Elekta has (for whatever reason!) inconsistently named each grad type with a 2 or 3 (e.g., a grad ending in 2 can be either latitude or longitude depending on its location), so there's no easy way to discriminate them. I was wondering whether anyone has already created these separate grad neighbour structures so I don't have to manually check each channel to see which grad is latitude and longitude? Or is there a list of which grads are which? Also, are there any reasons why I shouldn't be doing this kind of interpolation on the grads at all? Thanks for your help, Lev -------------- next part -------------- An HTML attachment was scrubbed... URL: From jorn at artinis.com Fri Feb 12 16:36:00 2016 From: jorn at artinis.com (=?iso-8859-1?Q?J=F6rn_M._Horschig?=) Date: Fri, 12 Feb 2016 16:36:00 +0100 Subject: [FieldTrip] Job opening: Application Specialist (NIRS) Message-ID: <005701d165ab$15c6fb30$4154f190$@artinis.com> Dear all, (please excuse the marginally relevant message) We are looking for an application specialist with strong knowledge in biomedical engineering. We at Artinis are mainly creating NIRS devices, but moving more and more towards multimodal imaging applications (i.e. NIRS/EEG, NIRS/tDCS, NIRS/TMS, etc). The job as an application specialist would mainly involve international customer contact and support with setting up NIRS equipment and recording and analyzing NIRS data, a strong involvement in product development according to the customer needs and market prospects, and project work in collaboration with other R&D companies and academic institutes. For more information, please check out our webpage www.artinis.com and the attached pdf for a more complete job description. With best regards, Jörn -- Jörn M. Horschig, PhD Software Engineer A Einsteinweg 17 6662PW Elst The Netherlands T +31 481 350 980 F +31 84 210 5702 I www.artinis.com The information in this e-mail is confidential and intended solely for the person to whom it is addressed. If this message is not addressed to you, please be aware that you have no authorization to read this e-mail, to copy it, to furnish it to any person other than the addressee, or to use or misuse its content in any way whatsoever. Should you have received this e-mail by mistake, please bring this to the attention of the sender, after which you are kindly requested to destroy the original message. -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image001.png Type: image/png Size: 9919 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: 160107 Advertentie - Application Specialist.pdf Type: application/pdf Size: 39205 bytes Desc: not available URL: From murphyk5 at aston.ac.uk Fri Feb 12 20:51:50 2016 From: murphyk5 at aston.ac.uk (Murphy, Kelly (Research Student)) Date: Fri, 12 Feb 2016 19:51:50 +0000 Subject: [FieldTrip] Custom timing files Message-ID: Hello Fieldtrippers I am trying to epoch my Neuromag MEG using timestamps with ft_definetrial. For all my trials I have a 600x2 matrix ('trl') containing start and stop times (each epoch = 1000ms); and a corresponding <600x5 char> array with condition labels ('labels'). I can combine 'labels' and 'trl' into a structure but I am confused as to what functions to proceed with in order to segment my data. Any help would be greatly appreciated (I hope this problem is relatively simple) Many thanks Kelly PhD Student Cognitive & Affective Neurosciences RG Aston Brain Centre Aston University Birmingham United Kingdom B4 7ET Office no: ++44 1212044250 -------------- next part -------------- An HTML attachment was scrubbed... URL: From K.Muller at psych.ru.nl Sat Feb 13 12:39:27 2016 From: K.Muller at psych.ru.nl (=?iso-8859-1?B?TfxsbGVyLCBLLiAoS2F0amEp?=) Date: Sat, 13 Feb 2016 11:39:27 +0000 Subject: [FieldTrip] ft_sourceplot ortho missing projections Message-ID: <5CF3C648-8BC4-4D99-9743-819343D8804C@psych.ru.nl> Hi, I am plotting statistical data on the orthogonal slices using ft_sourceplot(). In all plots, at least one view (usual axial), sometimes all views are missing: [cid:21371F16-8202-4E39-9726-C8B758D0DBB3] Sometimes one of them appears when I am manually changing the cursor position, but I never get all to work by this. The script I am using had been working flawlessly at the end of last year. I am not sure after which nightly build the problems started to occur. The difference I can see is that the default colormap has been replaced with the better parula now, and according to github there has been some other work on ft_sourceplot(). Best regards, Katja -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: layer6_time_300ms.png Type: image/png Size: 51610 bytes Desc: layer6_time_300ms.png URL: From santagravity at gmail.com Mon Feb 15 03:57:51 2016 From: santagravity at gmail.com (Sanghyun Lim) Date: Mon, 15 Feb 2016 11:57:51 +0900 Subject: [FieldTrip] about leadfield correction following ICA component rejection Message-ID: Dear fieldtripers, I recently read a hipp's 2015 paper which asserts that do not modify leadfields after ICA artifact rejection since it could decrease the estimated source SNR. http://journals.plos.org/plosone/article?id=10.1371/journal.pone.0121048 But by seeing ft_rejectcomponent, fieldtrip recommends modifying leadfields after ICA. Is there a specific reason to do this? thanks in advance Sanghyun. ᐧ -------------- next part -------------- An HTML attachment was scrubbed... URL: From ronny.ibrahim at mq.edu.au Mon Feb 15 07:58:09 2016 From: ronny.ibrahim at mq.edu.au (Ronny Ibrahim) Date: Mon, 15 Feb 2016 06:58:09 +0000 Subject: [FieldTrip] Help on ft_statfun_correlationT Message-ID: Dear Fellow fieldtrip users, I hope that you don't mind me emailing you directly enquiring about the procedures of using ft_statfun_correlationT. I have been reading the fieldtrip forum but seems to still don't quite understand fully on how to get the function to run properly. I currently have power spectrum values (2047 frequency points) from 15 electrode channels (which will give a powspctrm size of 15x2047) and I would like to see whether any of the frequency bands (alpha, delta, beta, gamma values) do correlate to behavioral measures such as distress, etc. As it had suggested in the forum http://mailman.science.ru.nl/pipermail/fieldtrip/2015-February/008950.html I should create a dummy variable with equal size to powspctrm and fill them with my behavioural value (eg 'distress' lets call it D which is essentially D*ones(15,2047)). I have created a design matrix as follow : cfg.design = [1*ones(1,36) 2*ones(1,36); 1:36 1:36]; as I have 36 replications Here is the script that I have put together. %% Conditions %C1 - actual powerspectrum values of 15 electrodes %C2 - distress values C_1 = {TIN1{2} TIN1{4} TIN1{5} TIN1{6} TIN1{7} TIN1{8} TIN1{9} TIN1{10} TIN1{11} TIN2{2} TIN2{4} TIN2{5} TIN2{6} TIN2{7} TIN2{8} TIN2{9} TIN2{10} TIN2{11} TIN3{2} TIN3{4} TIN3{5} TIN3{6} TIN3{7} TIN3{8} TIN3{9} TIN3{10} TIN3{11} TIN4{2} TIN4{4} TIN4{5} TIN4{6} TIN4{7} TIN4{8} TIN4{9} TIN4{10} TIN4{11}}; C_2 = {TFI1{1} TFI1{2} TFI1{3} TFI1{4} TFI1{5} TFI1{6} TFI1{7} TFI1{8} TFI1{9} TFI2{1} TFI2{2} TFI2{3} TFI2{4} TFI2{5} TFI2{6} TFI2{7} TFI2{8} TFI2{9} TFI3{1} TFI3{2} TFI1{3} TFI3{4} TFI3{5} TFI3{6} TFI3{7} TFI3{8} TFI3{9} TFI4{1} TFI4{2} TFI4{3} TFI4{4} TFI4{5} TFI4{6} TFI4{7} TFI4{8} TFI4{9}}; cfg = []; cfg.layout = 'MEG.lay'; lay = ft_prepare_layout(cfg); %% Performing cluster statistics cfg = []; cfg.frequency = [8 12]; cfg.channel = 'all'; cfg.avgovertime = 'no'; cfg.avgoverfreq = 'yes'; cfg.avgoverchan = 'no'; cfg.statistic = 'ft_statfun_correlationT'; cfg.numrandomization = 1000; cfg.correctm = 'cluster'; cfg.method = 'montecarlo'; cfg.clusteralpha = 0.05; cfg.clusterstatistic = 'maxsum'; cfg.minnbchan = 1; cfg.tail = 0; cfg.clustertail = 0; cfg.alpha = 0.05; cfg_neighb.layout = lay; cfg_neighb.method = 'triangulation'; cfg.neighbours = ft_prepare_neighbours(cfg_neighb); cfg.uvar = 1; cfg.ivar = 1; cfg.computecritval = 'yes'; cfg.design = [1*ones(1,36) 2*ones(1,36); 1:36 1:36]; stat = ft_freqstatistics(cfg, C_1{:}, C_2{:}); %% Plotting significant clusters cfg = []; cfg.alpha = 0.05; cfg.parameter = 'stat'; cfg.layout =lay; ft_clusterplot(cfg, stat); I would like to thank you guys for your kind help and assistance. Kind Regards, Ronny -------------- next part -------------- An HTML attachment was scrubbed... URL: From anne.urai at gmail.com Mon Feb 15 13:21:54 2016 From: anne.urai at gmail.com (Anne Urai) Date: Mon, 15 Feb 2016 13:21:54 +0100 Subject: [FieldTrip] Custom timing files In-Reply-To: References: Message-ID: Dear Kelly, it sounds like you want to write your own custom trialfun based on the triggers in your data. See here for a tutorial on how to get started with this: http://www.fieldtriptoolbox.org/example/making_your_own_trialfun_for_conditional_trial_definition 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: Murphy, Kelly (Research Student) Reply: FieldTrip discussion list Date: 12 February 2016 at 20:51:50 To: fieldtrip at science.ru.nl Subject:  [FieldTrip] Custom timing files Hello Fieldtrippers   I am trying to epoch my Neuromag MEG using timestamps with ft_definetrial.    For all my trials I have a 600x2 matrix (‘trl’) containing start and stop times (each epoch = 1000ms); and a corresponding <600x5 char> array with condition labels (‘labels’).  I can combine ‘labels’ and ‘trl’ into a structure but I am confused as to what functions to proceed with in order to segment my data.   Any help would be greatly appreciated (I hope this problem is relatively simple)   Many thanks   Kelly   PhD Student Cognitive & Affective Neurosciences RG Aston Brain Centre Aston University Birmingham United Kingdom B4 7ET Office no: ++44 1212044250   _______________________________________________ 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 helen.wieffering at gmail.com Mon Feb 15 16:00:53 2016 From: helen.wieffering at gmail.com (Helen Wieffering) Date: Mon, 15 Feb 2016 10:00:53 -0500 Subject: [FieldTrip] Connectivity Statistics Message-ID: Hello, Does anyone know of built-in FieldTrip functions for computing statistics or grand averages of connectivity data? I have been searching around and am aware of ft_freqstatistics and ft_freqgrandaverage, but these do not seem to work with granger spectrum data. If anyone has experience with this, I'd love to hear! Thanks, Helen Wieffering Erika Nyhus, P.h.D. Bowdoin College Dept of Neuroscience -------------- next part -------------- An HTML attachment was scrubbed... URL: From a.stolk8 at gmail.com Mon Feb 15 19:57:51 2016 From: a.stolk8 at gmail.com (Arjen Stolk) Date: Mon, 15 Feb 2016 10:57:51 -0800 Subject: [FieldTrip] Help on ft_statfun_correlationT In-Reply-To: <6c160f0705b6476e899163b731441451@EXPRD02.hosting.ru.nl> References: <6c160f0705b6476e899163b731441451@EXPRD02.hosting.ru.nl> Message-ID: Hi Ronny, Can you check whether this page answers your question? It provides a theoretical background, and a couple of examples: http://www.fieldtriptoolbox.org/faq/how_can_i_test_for_correlations_between_neuronal_data_and_quantitative_stimulus_and_behavioural_variables Best, Arjen 2016-02-14 22:58 GMT-08:00 Ronny Ibrahim : > Dear Fellow fieldtrip users, > I hope that you don't mind me emailing you directly enquiring about the > procedures of using ft_statfun_correlationT. I have been reading the > fieldtrip forum but seems to still don't quite understand fully on how to > get the function to run properly. I currently have power spectrum values > (2047 frequency points) from 15 electrode channels (which will give a > powspctrm size of 15x2047) and I would like to see whether any of the > frequency bands (alpha, delta, beta, gamma values) do correlate to > behavioral measures such as distress, etc. As it had suggested in the forum > http://mailman.science.ru.nl/pipermail/fieldtrip/2015-February/008950.html > I should create a dummy variable with equal size to powspctrm and fill > them with my behavioural value (eg 'distress' lets call it D which is > essentially D*ones(15,2047)). > I have created a design matrix as follow : > cfg.design = [1*ones(1,36) 2*ones(1,36); 1:36 1:36]; > > as I have 36 replications > > Here is the script that I have put together. > %% Conditions > %C1 - actual powerspectrum values of 15 electrodes > %C2 - distress values > C_1 = {TIN1{2} TIN1{4} TIN1{5} TIN1{6} TIN1{7} TIN1{8} TIN1{9} TIN1{10} > TIN1{11} TIN2{2} TIN2{4} TIN2{5} TIN2{6} TIN2{7} TIN2{8} TIN2{9} TIN2{10} > TIN2{11} TIN3{2} TIN3{4} TIN3{5} TIN3{6} TIN3{7} TIN3{8} TIN3{9} TIN3{10} > TIN3{11} TIN4{2} TIN4{4} TIN4{5} TIN4{6} TIN4{7} TIN4{8} TIN4{9} TIN4{10} > TIN4{11}}; > C_2 = {TFI1{1} TFI1{2} TFI1{3} TFI1{4} TFI1{5} TFI1{6} TFI1{7} TFI1{8} > TFI1{9} TFI2{1} TFI2{2} TFI2{3} TFI2{4} TFI2{5} TFI2{6} TFI2{7} TFI2{8} > TFI2{9} TFI3{1} TFI3{2} TFI1{3} TFI3{4} TFI3{5} TFI3{6} TFI3{7} TFI3{8} > TFI3{9} TFI4{1} TFI4{2} TFI4{3} TFI4{4} TFI4{5} TFI4{6} TFI4{7} TFI4{8} > TFI4{9}}; > > cfg = []; > cfg.layout = 'MEG.lay'; > lay = ft_prepare_layout(cfg); > > > %% Performing cluster statistics > cfg = []; > cfg.frequency = [8 12]; > cfg.channel = 'all'; > cfg.avgovertime = 'no'; > cfg.avgoverfreq = 'yes'; > cfg.avgoverchan = 'no'; > cfg.statistic = 'ft_statfun_correlationT'; > cfg.numrandomization = 1000; > cfg.correctm = 'cluster'; > cfg.method = 'montecarlo'; > cfg.clusteralpha = 0.05; > cfg.clusterstatistic = 'maxsum'; > cfg.minnbchan = 1; > cfg.tail = 0; > cfg.clustertail = 0; > cfg.alpha = 0.05; > cfg_neighb.layout = lay; > cfg_neighb.method = 'triangulation'; > cfg.neighbours = ft_prepare_neighbours(cfg_neighb); > cfg.uvar = 1; > cfg.ivar = 1; > cfg.computecritval = 'yes'; > cfg.design = [1*ones(1,36) 2*ones(1,36); 1:36 1:36]; > stat = ft_freqstatistics(cfg, C_1{:}, C_2{:}); > %% Plotting significant clusters > cfg = []; > cfg.alpha = 0.05; > cfg.parameter = 'stat'; > cfg.layout =lay; > ft_clusterplot(cfg, stat); > I would like to thank you guys for your kind help and assistance. > > Kind Regards, > > Ronny > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From b.staresina at bham.ac.uk Mon Feb 15 20:31:38 2016 From: b.staresina at bham.ac.uk (Bernhard Staresina) Date: Mon, 15 Feb 2016 19:31:38 +0000 Subject: [FieldTrip] [PostDoc position] Episodic Memory during Offline Periods Message-ID: <6B490D5D5F5F714C88D0C2CE8ED886B6F7EB0DD6@EX13.adf.bham.ac.uk> Applications are invited for a 3-year full-time post-doctoral position investigating memory-related brain processes during post-learning sleep. The project will use EEG, fMRI and transcranial electrical stimulation (tES) together with state-of-the-art multivariate analysis methods to capture and experimentally manipulate consolidation mechanisms in the sleeping human brain. The successful candidate will work in the Episodic Memory Laboratory at the University of Birmingham (UK) and will be supervised by Dr Bernhard Staresina. We work in close collaboration with a vibrant memory research community (http://www.memorybham.com/) and have access to multimodal neuroimaging facilities including 7T MRI, MEG, TMS and intracranial EEG. Applicants must have a PhD in a relevant area (e.g., Psychology, Neuroscience, Computer Science), have demonstrable expertise in sleep research, EEG, fMRI and/or tES and have advanced programming and analysis skills (using MATLAB or equivalent). Publications in peer-reviewed journals and conference presentations at international meetings are required. A background in memory research is highly desirable. The proposed start date is September 2016. If you are interested and wish to find out more, please contact Dr Bernhard Staresina (b.staresina at bham.ac.uk) with your CV and a brief statement of interest. _/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/ Bernhard Staresina, PhD Sir Henry Dale Fellow School of Psychology University of Birmingham www.memorybham.com/bernhard-staresina -------------- next part -------------- An HTML attachment was scrubbed... URL: From seymourr at aston.ac.uk Tue Feb 16 13:51:43 2016 From: seymourr at aston.ac.uk (Seymour, Robert (Research Student)) Date: Tue, 16 Feb 2016 12:51:43 +0000 Subject: [FieldTrip] Eletkta Neuromag data in Fieldtrip Message-ID: Dear all, I am working with Elekta Neuromag data and want to load the raw .fif file into Fieldtrip; i.e. having not undergone Maxfilter cleaning. I have turned off Internal Active Sheilding (IAS) during recording. Loading in motion-corrected data is fine and produces reasonable results. However using the same code with un-Maxfiltered data produces some very strange plots - please see some pictures I have uploaded online.. http://imgur.com/a/b0Mrl . It is not an issue with the data themselves because it looks sensible in Graph (the Elekta data visualisation program). My preprocessing code can be loaded here: http://notepad.cc/peebluki61 . If anyone has any idea what is going on I would be very grateful! Many thanks, Robert Seymour (PhD student, Aston Brain Centre) -------------- next part -------------- An HTML attachment was scrubbed... URL: From gianpaolo.demarchi at unitn.it Tue Feb 16 16:18:04 2016 From: gianpaolo.demarchi at unitn.it (Gianpaolo Demarchi) Date: Tue, 16 Feb 2016 16:18:04 +0100 Subject: [FieldTrip] Eletkta Neuromag data in Fieldtrip In-Reply-To: References: Message-ID: <250797E7-A844-4A39-9919-14FC4FBC4D81@unitn.it> Hi, just a couple of comments, since nobody chimes in :-) > Il giorno 16 feb 2016, alle ore 13:51, Seymour, Robert (Research Student) ha scritto: > > Dear all, > > I am working with Elekta Neuromag data and want to load the raw .fif file into Fieldtrip; i.e. having not undergone Maxfilter cleaning. I have turned off Internal Active Sheilding (IAS) during recording. > > Loading in motion-corrected data is fine and produces reasonable results. However using the same code with un-Maxfiltered data produces some very strange plots - please see some pictures I have uploaded online.. http://imgur.com/a/b0Mrl . It is not an issue with the data themselves because it looks sensible in Graph (the Elekta data visualisation program). They look reasonable ... what you see is the effect of the (bp?) filter on your data and the x seconds rectangular window that you’re using for watching at them. The first pic should be grads, and the second mags, if I’m not mistaken, and in the second one you can clearly see 50 Hz mains noise (you’ve 50Hz over there, isn’t :-) ?!) If you just want to take a look at the data and scroll trough the time, don’t apply “hardcoded” filters with ft_preprocessing, but fully exploit the power of ft_databrowser, and change filters on the fly there with the button on the right, using a cfg.preproc.xxx syntax. For a quick look at e.g. magnetometers, you can use: cfg = []; cfg.dataset= rawfile; %in your case cfg.layout = 'neuromag306mag.lay'; cfg.channel = 'MEGMAG'; ft_databrowser(cfg) check the help of ft_databrowser to see which option does what, but in this case the important part is cfg.dataset, that ft_databrowser uses to read directly the file from the disk. The additional stuff is for topoplotting on right click, e.g. to identify eye blinks … The code above is not applying any filtering, so expect some mess, but then from the data browser click on the grey button on the right and try e.g.: cfg.preproc.lpfilter = 'yes' ; % you don't want to see 50 Hz now cfg.preproc.lpfreq = 45 ; cfg.preproc.hpfilter = 'yes' ; cfg.preproc.hpfreq = 1 ; % try out different value, to suit your needs then change a bit the values and see how this looks like. Then you can chop the data in epochs as you did (btw, there is no need of both cfg.headerfile and cfg.datafile, the latter should suffice), but then again don’t apply any “hardcoded” filter values at this stage, if the idea is still to take a general look at the data. You can filter in plotting later … or just put the hardcoded filter values in your final (data in -> Nature paper out) script. Hope this helps … Best, G. > > My preprocessing code can be loaded here: http://notepad.cc/peebluki61 . If anyone has any idea what is going on I would be very grateful! > > Many thanks, > > Robert Seymour (PhD student, Aston Brain Centre) > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip Dr. Gianpaolo Demarchi FB Psychologie - Universität Salzburg Hellbrunnerstr, 34 5020 Salzburg (A) Tel: +43 (0) 662 / 8044 - 5135 gianpaolo.demarchi at sbg.ac.at -------------- next part -------------- An HTML attachment was scrubbed... URL: From iris.steinmann at med.uni-goettingen.de Tue Feb 16 18:07:49 2016 From: iris.steinmann at med.uni-goettingen.de (Steinmann, Iris) Date: Tue, 16 Feb 2016 17:07:49 +0000 Subject: [FieldTrip] Align electrods to headmodel with method 'interactiv' Message-ID: Hi FieldTripper, I want to do source reconstruction with my EEG data and try to align my electrodes to the headmodel (calculated with my own MR data) (following this description: http://www.fieldtriptoolbox.org/example/align_eeg_electrode_positions_to_bem_headmodel) I run the ft_electroderealign function with the following options: cfg = []; cfg.method = 'interactive'; cfg.elec = elec; cfg.headshape = vol.bnd(1); elec_new = ft_electroderealign(cfg); But all I get is a figure showing a coordinate system with my electrodepositions. The scull saved in vol.bnd(1) is not plotted. (I attached a jpg of the figure). The MATLAB panel asked me: "Do you want to change the anatomical labels for the axes [Y, n]? " If I say 'no', I get the following error: Undefined function or variable 'template'. Error in ft_electroderealign (line 244) for j=1:length(template) I tried the ft_electroderealign function with the cfg.method = 'fiducials', but ended up with the same figure and the same question in the MATLAB panel. Would be great if someone could help me to figure out what's going wrong here and how I can align my electrodes to the headmodel. Thanks! -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: coordinateSystemElectrodePositions.jpg Type: image/jpeg Size: 22433 bytes Desc: coordinateSystemElectrodePositions.jpg URL: From joseluisblues at gmail.com Tue Feb 16 18:43:01 2016 From: joseluisblues at gmail.com (Jose) Date: Tue, 16 Feb 2016 18:43:01 +0100 Subject: [FieldTrip] CTF data, marker and class files Message-ID: dear list, I'm trying to analyse CTF MEG data, but I'm running into problems when getting my triggers. ft_read_event recognize well the triggers in my MarkerFile.mrk, but for some reason do not look at the ClassFile.cls file, so I'm missing the BAD triggers in my events, Someone has run on the same problem?, thanks Jose -------------- next part -------------- An HTML attachment was scrubbed... URL: From seymourr at aston.ac.uk Tue Feb 16 19:04:40 2016 From: seymourr at aston.ac.uk (Seymour, Robert (Research Student)) Date: Tue, 16 Feb 2016 18:04:40 +0000 Subject: [FieldTrip] Eletkta Neuromag data in Fieldtrip Message-ID: Thanks for the detailed reply - yes it looks like it has something to do with powerline noise, but I'm still getting weird plots (and TF plots) even if I low-pass filter at 40Hz.. Trying out Fieldtrip's DFT filter doesn't seem to work either. It's also strange that motion correction seems to sort out the data .. mmm :/ Robert -------------- next part -------------- An HTML attachment was scrubbed... URL: From niels.haumann at dac.au.dk Tue Feb 16 22:47:33 2016 From: niels.haumann at dac.au.dk (Niels Trusbak Haumann) Date: Tue, 16 Feb 2016 21:47:33 +0000 Subject: [FieldTrip] Eletkta Neuromag data in Fieldtrip In-Reply-To: <250797E7-A844-4A39-9919-14FC4FBC4D81@unitn.it> References: , <250797E7-A844-4A39-9919-14FC4FBC4D81@unitn.it> Message-ID: <9DC7C16686EE6344B54A9D39046541939977DE9F@SRVUNIMBX05.uni.au.dk> Hi Robert. If you have applied motion-correction, which are derived from HPI signals, there should also be HPI signals recorded in the raw data. These signals would be seen if MaxFilter was not applied. It might be such signals from the HPI coils, which are usually emitted as high frequency sinus waves - in the standard setting at 290–330 Hz. It's possible to remove these signals with MaxFilter without doing further processing. Have you tried this? I think the MaxFilter command line option is -nosss. Best Niels Center for Music In the Brain Dept. of Clinical Medicine Aarhus University Hospital Denmark ________________________________ Fra: fieldtrip-bounces at science.ru.nl [fieldtrip-bounces at science.ru.nl] på vegne af Gianpaolo Demarchi [gianpaolo.demarchi at unitn.it] Sendt: 16. februar 2016 16:18 Til: FieldTrip discussion list Emne: Re: [FieldTrip] Eletkta Neuromag data in Fieldtrip Hi, just a couple of comments, since nobody chimes in :-) Il giorno 16 feb 2016, alle ore 13:51, Seymour, Robert (Research Student) > ha scritto: Dear all, I am working with Elekta Neuromag data and want to load the raw .fif file into Fieldtrip; i.e. having not undergone Maxfilter cleaning. I have turned off Internal Active Sheilding (IAS) during recording. Loading in motion-corrected data is fine and produces reasonable results. However using the same code with un-Maxfiltered data produces some very strange plots - please see some pictures I have uploaded online.. http://imgur.com/a/b0Mrl . It is not an issue with the data themselves because it looks sensible in Graph (the Elekta data visualisation program). They look reasonable ... what you see is the effect of the (bp?) filter on your data and the x seconds rectangular window that you’re using for watching at them. The first pic should be grads, and the second mags, if I’m not mistaken, and in the second one you can clearly see 50 Hz mains noise (you’ve 50Hz over there, isn’t :-) ?!) If you just want to take a look at the data and scroll trough the time, don’t apply “hardcoded” filters with ft_preprocessing, but fully exploit the power of ft_databrowser, and change filters on the fly there with the button on the right, using a cfg.preproc.xxx syntax. For a quick look at e.g. magnetometers, you can use: cfg = []; cfg.dataset= rawfile; %in your case cfg.layout = 'neuromag306mag.lay'; cfg.channel = 'MEGMAG'; ft_databrowser(cfg) check the help of ft_databrowser to see which option does what, but in this case the important part is cfg.dataset, that ft_databrowser uses to read directly the file from the disk. The additional stuff is for topoplotting on right click, e.g. to identify eye blinks … The code above is not applying any filtering, so expect some mess, but then from the data browser click on the grey button on the right and try e.g.: cfg.preproc.lpfilter = 'yes' ; % you don't want to see 50 Hz now cfg.preproc.lpfreq = 45 ; cfg.preproc.hpfilter = 'yes' ; cfg.preproc.hpfreq = 1 ; % try out different value, to suit your needs then change a bit the values and see how this looks like. Then you can chop the data in epochs as you did (btw, there is no need of both cfg.headerfile and cfg.datafile, the latter should suffice), but then again don’t apply any “hardcoded” filter values at this stage, if the idea is still to take a general look at the data. You can filter in plotting later … or just put the hardcoded filter values in your final (data in -> Nature paper out) script. Hope this helps … Best, G. My preprocessing code can be loaded here: http://notepad.cc/peebluki61 . If anyone has any idea what is going on I would be very grateful! Many thanks, Robert Seymour (PhD student, Aston Brain Centre) _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip Dr. Gianpaolo Demarchi FB Psychologie - Universität Salzburg Hellbrunnerstr, 34 5020 Salzburg (A) Tel: +43 (0) 662 / 8044 - 5135 gianpaolo.demarchi at sbg.ac.at -------------- next part -------------- An HTML attachment was scrubbed... URL: From jan.schoffelen at donders.ru.nl Wed Feb 17 09:02:31 2016 From: jan.schoffelen at donders.ru.nl (Schoffelen, J.M. (Jan Mathijs)) Date: Wed, 17 Feb 2016 08:02:31 +0000 Subject: [FieldTrip] about leadfield correction following ICA component rejection In-Reply-To: References: Message-ID: <0FD8BF96-8017-4732-A504-7BC56FDDEF9B@fcdonders.ru.nl> Hi Sanghyun, Although the ‘perceived SNR’ may change when applying the leadfield correction, it is simply biophyisically incorrect, if you DON’T do it. The reason is the following: If you remove a component from your channel data, what happens is that each of the resulting EEG/MEG channels reflect the potential difference/magnetic field strength as measured by a referenced electrode or a magnetic field pickup coil at a specific location in space, minus a weighted combination of potential differences/magnetic field strengths measured at all other locations (where the weighting is given by the spatial topography of the component). In other words, you apply an intricate re-referencing scheme/create a complicated synthetic gradiometer sensor. When building your forward model (a.k.a. leadfield), the purpose is to build an accurate model of the spatial distribution of potential differences/magnetic field strengths given what your channel leveld data represents. Since it now represents this re-rereferenced data/synthetic gradients, it needs to be accounted for in the model. Best, Jan-Mathijs On Feb 15, 2016, at 3:57 AM, Sanghyun Lim > wrote: Dear fieldtripers, I recently read a hipp's 2015 paper which asserts that do not modify leadfields after ICA artifact rejection since it could decrease the estimated source SNR. http://journals.plos.org/plosone/article?id=10.1371/journal.pone.0121048 But by seeing ft_rejectcomponent, fieldtrip recommends modifying leadfields after ICA. Is there a specific reason to do this? thanks in advance Sanghyun. [https://mailfoogae.appspot.com/t?sender=ac2FudGFncmF2aXR5QGdtYWlsLmNvbQ%3D%3D&type=zerocontent&guid=8d602c05-59e3-43c4-876d-df591e738182]ᐧ _______________________________________________ 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 gianpaolo.demarchi at unitn.it Wed Feb 17 10:02:36 2016 From: gianpaolo.demarchi at unitn.it (Gianpaolo Demarchi) Date: Wed, 17 Feb 2016 10:02:36 +0100 Subject: [FieldTrip] Eletkta Neuromag data in Fieldtrip In-Reply-To: <9DC7C16686EE6344B54A9D39046541939977DE9F@SRVUNIMBX05.uni.au.dk> References: <250797E7-A844-4A39-9919-14FC4FBC4D81@unitn.it> <9DC7C16686EE6344B54A9D39046541939977DE9F@SRVUNIMBX05.uni.au.dk> Message-ID: <999CA7C6-881E-40FA-9997-D7C82C108247@unitn.it> Dear Robert, > Thanks for the detailed reply – yes it looks like it has something to do with powerline noise, but I’m still getting weird plots (and TF plots) even if I low-pass filter at 40Hz.. It depends on what you define as weird. As Niels correctly pointed out, if you don’t filter at all, and you use the HPI, you’ll see a mess @around 300 Hz, plus the mains frequencies and harmonics, plus whatever happened during your experiment (e.g. a car passing by, elevators, etc). Though, if you lp filter at 40 Hz you still should get rid of both HPI(1) and x*50 Hz noise, so I expect that your source of “weirdness” is not there … One thing that comes to my mind is that you mentioned that you usually use IAS, which I imagine in turns means that the raw data per se are not too nice (therefore for need of IAS), but without further info/pics a "differential diagnosis” of the weirdness is hard, e.g. if you see big “strips” in TF plots at 50 Hz, wo filtering, baseline-ing and/or contrasting, I would just call this normal behavior …. > Trying out Fieldtrip’s DFT filter doesn’t seem to work either. Removing power line noise it’s not an easy task, but if you still see “weirdness” filtering @40Hz, then this is not your enemy: if it’s really “power noise like”, take a chunk of a 100ms, count the peaks, and if they are 5 (50Hz) then probably for some reason your filter didn’t do the job (cfg.xxx.lpxxx = ‘yes’ is needed to turn on the filter). If the peaks are less,/more then you have some other problems (although i cannot imagine anything that looks like power line, not at 50, 100, etc (2)) > > It’s also strange that motion correction seems to sort out the data .. mmm :/ This is right. If you use maxfilter -movecomp, you get the “SSS” cleaning “for free”, which usually takes care of many noise sources … I tried in the past also with the ‘-nosss’ switch, but still you get some “beatifying” of the data wrt to the “raw” raw, but maybe it’s just SSP projection, that you don’t get for free in fieldtrip … I didn’t investigate much further …. Try to dig deeper, and feel free to post pics/snip to the list … Best luck, G. (1) although sometimes I had some HPI coils “beatings” @7Hz in few frontal grads, still to understand fully why … (2) caveat: we see obviously big sinusoidal artifacts, at lower frequencies, when we do MEG+tACS, but since you don’t mention it I don’t expect this to be your case :-) Dr. Gianpaolo Demarchi FB Psychologie - Universität Salzburg Hellbrunnerstr, 34 5020 Salzburg (A) Tel: +43 (0) 662 / 8044 - 5135 gianpaolo.demarchi at sbg.ac.at > > Fra: fieldtrip-bounces at science.ru.nl [fieldtrip-bounces at science.ru.nl] på vegne af Gianpaolo Demarchi [gianpaolo.demarchi at unitn.it] > Sendt: 16. februar 2016 16:18 > Til: FieldTrip discussion list > Emne: Re: [FieldTrip] Eletkta Neuromag data in Fieldtrip > > Hi, > just a couple of comments, since nobody chimes in :-) > >> Il giorno 16 feb 2016, alle ore 13:51, Seymour, Robert (Research Student) > ha scritto: >> >> Dear all, >> >> I am working with Elekta Neuromag data and want to load the raw .fif file into Fieldtrip; i.e. having not undergone Maxfilter cleaning. I have turned off Internal Active Sheilding (IAS) during recording. >> >> Loading in motion-corrected data is fine and produces reasonable results. However using the same code with un-Maxfiltered data produces some very strange plots - please see some pictures I have uploaded online.. http://imgur.com/a/b0Mrl . It is not an issue with the data themselves because it looks sensible in Graph (the Elekta data visualisation program). > > They look reasonable ... what you see is the effect of the (bp?) filter on your data and the x seconds rectangular window that you’re using for watching at them. > The first pic should be grads, and the second mags, if I’m not mistaken, and in the second one you can clearly see 50 Hz mains noise (you’ve 50Hz over there, isn’t :-) ?!) > If you just want to take a look at the data and scroll trough the time, don’t apply “hardcoded” filters with ft_preprocessing, but fully exploit the power of ft_databrowser, and change filters on the fly there with the button on the right, using a cfg.preproc.xxx syntax. > > For a quick look at e.g. magnetometers, you can use: > > cfg = []; > cfg.dataset= rawfile; %in your case > cfg.layout = 'neuromag306mag.lay'; > cfg.channel = 'MEGMAG'; > ft_databrowser(cfg) > > check the help of ft_databrowser to see which option does what, but in this case the important part is cfg.dataset, that ft_databrowser uses to read directly the file from the disk. The additional stuff is for topoplotting on right click, e.g. to identify eye blinks … > The code above is not applying any filtering, so expect some mess, but then from the data browser click on the grey button on the right and try e.g.: > > cfg.preproc.lpfilter = 'yes' ; % you don't want to see 50 Hz now > cfg.preproc.lpfreq = 45 ; > cfg.preproc.hpfilter = 'yes' ; > cfg.preproc.hpfreq = 1 ; % try out different value, to suit your needs > > > then change a bit the values and see how this looks like. Then you can chop the data in epochs as you did (btw, there is no need of both cfg.headerfile and > cfg.datafile, the latter should suffice), but then again don’t apply any “hardcoded” filter values at this stage, if the idea is still to take a general look at the data. You can filter in plotting later … or just put the hardcoded filter values in your final (data in -> Nature paper out) script. > Hope this helps … > Best, > G. > > >> >> My preprocessing code can be loaded here: http://notepad.cc/peebluki61 . If anyone has any idea what is going on I would be very grateful! >> >> Many thanks, >> >> Robert Seymour (PhD student, Aston Brain Centre) >> >> _______________________________________________ >> fieldtrip mailing list >> fieldtrip at donders.ru.nl >> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > Dr. Gianpaolo Demarchi > FB Psychologie - Universität Salzburg > Hellbrunnerstr, 34 5020 Salzburg (A) > Tel: +43 (0) 662 / 8044 - 5135 > gianpaolo.demarchi at sbg.ac.at > > > _______________________________________________ > 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 deb.desideri at gmail.com Wed Feb 17 11:19:38 2016 From: deb.desideri at gmail.com (Debora Desideri) Date: Wed, 17 Feb 2016 11:19:38 +0100 Subject: [FieldTrip] Align electrods to headmodel with method 'interactiv' In-Reply-To: References: Message-ID: Dear Iris, you should press Y and specify the coordinate system following the questions that will appear on the command window (you will be asked to specify whether your coordinate sytsem is ras or lps and so on and where the origin of the coordinate system is located). afterwards, the GUI will display the electrodes and the head of the subject as well. You should then be able to align the electrode by simply applying translation/rotation or whatever you need make the electrode fit on the head surface. In case you want to use the methiod 'fiducials', you should have recorded together with the elctrode positions some anatomical landmarks that you can easily find in the MRI of the subject. If you did not record such landmarks during the acquisition of the electrode positions, than I guess your only option is to use the method 'interactive' Hope this helps! Best, Debora On Tue, Feb 16, 2016 at 6:07 PM, Steinmann, Iris < iris.steinmann at med.uni-goettingen.de> wrote: > Hi FieldTripper, > > > > I want to do source reconstruction with my EEG data and try to align my > electrodes to the headmodel (calculated with my own MR data) > > (following this description: > http://www.fieldtriptoolbox.org/example/align_eeg_electrode_positions_to_bem_headmodel) > > > > > I run the ft_electroderealign function with the following options: > > > > cfg = []; > > cfg.method = 'interactive'; > > cfg.elec = elec; > > cfg.headshape = vol.bnd(1); > > elec_new = ft_electroderealign(cfg); > > > > But all I get is a figure showing a coordinate system with my > electrodepositions. The scull saved in vol.bnd(1) is not plotted. > > (I attached a jpg of the figure). > > The MATLAB panel asked me: "Do you want to change the anatomical labels > for the axes [Y, n]? " > > If I say 'no', I get the following error: > > > > Undefined function or variable 'template'. > > Error in ft_electroderealign (line 244) > > for j=1:length(template) > > > > I tried the ft_electroderealign function with the cfg.method = > 'fiducials', but ended up with the same figure and the same question in > > the MATLAB panel. > > > > Would be great if someone could help me to figure out what's going wrong > here and how I can align my electrodes to the headmodel. > > > > Thanks! > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > -- Debora Desideri, PhD Student BNP Lab - Neurology Department University Hospital Tübingen Eberhard Karls University Tübingen Hoppe-Seyler Str. 3 D-72076 Tübingen Tel: +49 7071/29 80478 -------------- next part -------------- An HTML attachment was scrubbed... URL: From stephen.politzer-ahles at ling-phil.ox.ac.uk Wed Feb 17 12:09:55 2016 From: stephen.politzer-ahles at ling-phil.ox.ac.uk (Stephen Politzer-Ahles) Date: Wed, 17 Feb 2016 11:09:55 +0000 Subject: [FieldTrip] CTF data, marker and class files Message-ID: Hello Jose, Does it work differently if you use ft_definetrial and ft_preprocessing? ft_read_event is a low-level function, it should be possible to read your data without using it, and just using ft_definetrial plus ft_preprocessing. I don't remember off the top of my head whether ft_definetrial was able to find the BAD events in the classfile. If you don't find a better way to deal with this issue, another way around would be to just read all your events with ft_definetrial, and write some MATLAB code to read the classfile directly, identify the indices of the bad trials, and remove those rows from the trial definition (or remove them at some later time, e.g., to keep them in the trial definition so they do get read, but then not include those trials in your timelockanalysis later on). best, Steve --- Stephen Politzer-Ahles University of Oxford Language and Brain Lab Faculty of Linguistics, Phonetics & Philology http://users.ox.ac.uk/~cpgl0080/ > > Message: 4 > Date: Tue, 16 Feb 2016 18:43:01 +0100 > From: Jose > To: fieldtrip at science.ru.nl > Subject: [FieldTrip] CTF data, marker and class files > Message-ID: > < > CAH3cVdA_VxHQDcXX3uxoqTFva+4UsMSWP+iccgZ4zZKH51PJ8A at mail.gmail.com> > Content-Type: text/plain; charset="utf-8" > > dear list, > > I'm trying to analyse CTF MEG data, but I'm running into problems when > getting my triggers. ft_read_event recognize well the triggers in my > MarkerFile.mrk, but for some reason do not look at the ClassFile.cls file, > so I'm missing the BAD triggers in my events, > > Someone has run on the same problem?, > > thanks > Jose > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From K.Muller at psych.ru.nl Wed Feb 17 12:18:49 2016 From: K.Muller at psych.ru.nl (=?utf-8?B?TcO8bGxlciwgSy4gKEthdGphKQ==?=) Date: Wed, 17 Feb 2016 11:18:49 +0000 Subject: [FieldTrip] ft_sourceplot ortho missing projections In-Reply-To: <5CF3C648-8BC4-4D99-9743-819343D8804C@psych.ru.nl> References: <5CF3C648-8BC4-4D99-9743-819343D8804C@psych.ru.nl> Message-ID: Hi, (I should have mentioned it) The link to the inline image attachment (example of the problem) is at the end of my e-mail below: > Name: layer6_time_300ms.png > Type: image/png > Size: 51610 bytes > Desc: layer6_time_300ms.png > http://mailman.science.ru.nl/pipermail/fieldtrip/attachments/20160213/3c89a132/attachment.png Best, Katja > Am 13.02.28 Heisei um 12:39 schrieb Müller, K. (Katja) : > > Hi, > > I am plotting statistical data on the orthogonal slices using ft_sourceplot(). In all plots, at least one view (usual axial), sometimes all views are missing: > > > > Sometimes one of them appears when I am manually changing the cursor position, but I never get all to work by this. > > The script I am using had been working flawlessly at the end of last year. I am not sure after which nightly build the problems started to occur. The difference I can see is that the default colormap has been replaced with the better parula now, and according to github there has been some other work on ft_sourceplot(). > > > Best regards, > Katja From antonietta.sorriso at uniparthenope.it Wed Feb 17 12:21:08 2016 From: antonietta.sorriso at uniparthenope.it (Antonietta Sorriso) Date: Wed, 17 Feb 2016 12:21:08 +0100 Subject: [FieldTrip] Input data MEG convention Message-ID: <20160217122108.Horde.u-p-Ld9uxwAzGUae03Ov8A2@webmail.uniparthenope.it> Hi, How can I understand if my input data MEG are left-handed or right-handed? thank you for helping me. Best regards, -- Antonietta Sorriso ​Ph.D. Student ​Dipartimento di Ingegneria ​Laboratorio di TLC ed Elaborazione Segnali ed Immagini ​Centro Direzionale di Napoli, Isola C4, Stanze 326-327, lato Sud, piano 3 ​80143, Napoli, Italia e-mail: antonietta.sorriso at uniparthenope.it From jan.schoffelen at donders.ru.nl Wed Feb 17 12:47:47 2016 From: jan.schoffelen at donders.ru.nl (Schoffelen, J.M. (Jan Mathijs)) Date: Wed, 17 Feb 2016 11:47:47 +0000 Subject: [FieldTrip] Input data MEG convention In-Reply-To: <20160217122108.Horde.u-p-Ld9uxwAzGUae03Ov8A2@webmail.uniparthenope.it> References: <20160217122108.Horde.u-p-Ld9uxwAzGUae03Ov8A2@webmail.uniparthenope.it> Message-ID: <7285B71F-6B07-4B24-85BD-D1C60B22F69F@fcdonders.ru.nl> Hi Antonietta, I would assume that you refer to ‘handedness’ in the context of a coordinate system. You can find out its handedness by making a x/y/z axis system with you thumb/index finger/middle finger, and then check whether the ‘meaning’ of those axes correspond to what you see when using your right hand or your left hand. Example: if you know that your x/y/z axes mean ‘right’,’anterior’,’superior’, you’ll notice that this is a right handed coordinate system, because when your right thumb is pointing to the right and your right index finger is pointing forward, the middle finger is pointing upward (pun not intended). when your x/y/z axes mean ‘left’,’posterior’,’inferior’, you’ll notice that you need your left hand to describe it correctly, hence it’s a left-handed coordinate system. Best, Jan-Mathijs On Feb 17, 2016, at 12:21 PM, Antonietta Sorriso wrote: > > Hi, > > How can I understand if my input data MEG are left-handed or right-handed? > > thank you for helping me. > > Best regards, > -- > Antonietta Sorriso > > ​Ph.D. Student > ​Dipartimento di Ingegneria > ​Laboratorio di TLC ed Elaborazione Segnali ed Immagini > ​Centro Direzionale di Napoli, Isola C4, Stanze 326-327, lato Sud, piano 3 > ​80143, Napoli, Italia > e-mail: antonietta.sorriso at uniparthenope.it > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip From lorenzomagazzini at gmail.com Wed Feb 17 12:59:11 2016 From: lorenzomagazzini at gmail.com (Lorenzo Magazzini) Date: Wed, 17 Feb 2016 11:59:11 +0000 Subject: [FieldTrip] CTF data, marker and class files In-Reply-To: References: Message-ID: Hi Jose, Following on from what Steve said, you could try to use the i/o function read_ctf_cls('ClassFile.cls'). This will return an array of values indexing the trials marked as BAD, which you can use later on to exclude BAD trials from the analysis. Probably this is not the ideal solution but is roughly what I do to read the ClassFile. Best, Lorenzo On 17 February 2016 at 11:09, Stephen Politzer-Ahles < stephen.politzer-ahles at ling-phil.ox.ac.uk> wrote: > Hello Jose, > > Does it work differently if you use ft_definetrial and ft_preprocessing? > ft_read_event is a low-level function, it should be possible to read your > data without using it, and just using ft_definetrial plus ft_preprocessing. > > I don't remember off the top of my head whether ft_definetrial was able to > find the BAD events in the classfile. If you don't find a better way to > deal with this issue, another way around would be to just read all your > events with ft_definetrial, and write some MATLAB code to read the > classfile directly, identify the indices of the bad trials, and remove > those rows from the trial definition (or remove them at some later time, > e.g., to keep them in the trial definition so they do get read, but then > not include those trials in your timelockanalysis later on). > > best, > Steve > > > > --- > Stephen Politzer-Ahles > University of Oxford > Language and Brain Lab > Faculty of Linguistics, Phonetics & Philology > http://users.ox.ac.uk/~cpgl0080/ > > >> >> Message: 4 >> Date: Tue, 16 Feb 2016 18:43:01 +0100 >> From: Jose >> To: fieldtrip at science.ru.nl >> Subject: [FieldTrip] CTF data, marker and class files >> Message-ID: >> < >> CAH3cVdA_VxHQDcXX3uxoqTFva+4UsMSWP+iccgZ4zZKH51PJ8A at mail.gmail.com> >> Content-Type: text/plain; charset="utf-8" >> >> >> dear list, >> >> I'm trying to analyse CTF MEG data, but I'm running into problems when >> getting my triggers. ft_read_event recognize well the triggers in my >> MarkerFile.mrk, but for some reason do not look at the ClassFile.cls file, >> so I'm missing the BAD triggers in my events, >> >> Someone has run on the same problem?, >> >> thanks >> 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 jan.schoffelen at donders.ru.nl Wed Feb 17 13:36:54 2016 From: jan.schoffelen at donders.ru.nl (Schoffelen, J.M. (Jan Mathijs)) Date: Wed, 17 Feb 2016 12:36:54 +0000 Subject: [FieldTrip] ft_sourceplot ortho missing projections In-Reply-To: References: <5CF3C648-8BC4-4D99-9743-819343D8804C@psych.ru.nl> Message-ID: Hi Katja, You may have noticed that this seems an interaction between the matlab version and the crosshair option. The issue you report occurs with matlab 2014b (possibly also with more recent versions), but only if cfg.crosshair = ‘yes’. I suspect something goes wrong with the stacking order of the graphics objects that are to be displayed in each of the figure’s subplots. Thanks, Jan-Mathijs On Feb 17, 2016, at 12:18 PM, Müller, K. (Katja) wrote: > Hi, > > (I should have mentioned it) The link to the inline image attachment (example of the problem) is at the end of my e-mail below: > >> Name: layer6_time_300ms.png >> Type: image/png >> Size: 51610 bytes >> Desc: layer6_time_300ms.png >> http://mailman.science.ru.nl/pipermail/fieldtrip/attachments/20160213/3c89a132/attachment.png > > > Best, > Katja > > > >> Am 13.02.28 Heisei um 12:39 schrieb Müller, K. (Katja) : >> >> Hi, >> >> I am plotting statistical data on the orthogonal slices using ft_sourceplot(). In all plots, at least one view (usual axial), sometimes all views are missing: >> >> >> >> Sometimes one of them appears when I am manually changing the cursor position, but I never get all to work by this. >> >> The script I am using had been working flawlessly at the end of last year. I am not sure after which nightly build the problems started to occur. The difference I can see is that the default colormap has been replaced with the better parula now, and according to github there has been some other work on ft_sourceplot(). >> >> >> Best regards, >> Katja > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip From iris.steinmann at med.uni-goettingen.de Wed Feb 17 15:58:39 2016 From: iris.steinmann at med.uni-goettingen.de (Steinmann, Iris) Date: Wed, 17 Feb 2016 14:58:39 +0000 Subject: [FieldTrip] Align electrods to headmodel with method 'interactiv' In-Reply-To: References: Message-ID: Hi Debora, I tried to do so before, but I ended up with the following error: Do you want to change the anatomical labels for the axes [Y, n]? Y What is the anatomical label for the positive X-axis [r, l, a, p, s, i]? r What is the anatomical label for the positive Y-axis [r, l, a, p, s, i]? a What is the anatomical label for the positive Z-axis [r, l, a, p, s, i]? s Is the origin of the coordinate system at the a(nterior commissure), i(nterauricular), n(ot a landmark)? n Undefined function or variable 'template'. Error in ft_electroderealign (line 244) for j=1:length(template) Error in eeg_beamforming (line 107) elec_aligned = ft_electroderealign(cfg); I prepared now a template following this instruction: http://www.fieldtriptoolbox.org/example/align_eeg_electrode_positions_to_bem_headmodel In this example the template is only used for the cfg.method = ‘fiducial’ but not for the ‘interactiv’ option. Anyhow I additionally specified the template together with the ‘interactiv’ method like this: cfg = []; cfg.method = 'interactive'; cfg.elec = elec; cfg.headshape = vol.bnd(1); cfg.template = elec_mni; elec_new = ft_electroderealign(cfg); now it works! Thanks! Iris From: fieldtrip-bounces at science.ru.nl [mailto:fieldtrip-bounces at science.ru.nl] On Behalf Of Debora Desideri Sent: Mittwoch, 17. Februar 2016 11:20 To: FieldTrip discussion list Subject: Re: [FieldTrip] Align electrods to headmodel with method 'interactiv' Dear Iris, you should press Y and specify the coordinate system following the questions that will appear on the command window (you will be asked to specify whether your coordinate sytsem is ras or lps and so on and where the origin of the coordinate system is located). afterwards, the GUI will display the electrodes and the head of the subject as well. You should then be able to align the electrode by simply applying translation/rotation or whatever you need make the electrode fit on the head surface. In case you want to use the methiod 'fiducials', you should have recorded together with the elctrode positions some anatomical landmarks that you can easily find in the MRI of the subject. If you did not record such landmarks during the acquisition of the electrode positions, than I guess your only option is to use the method 'interactive' Hope this helps! Best, Debora On Tue, Feb 16, 2016 at 6:07 PM, Steinmann, Iris > wrote: Hi FieldTripper, I want to do source reconstruction with my EEG data and try to align my electrodes to the headmodel (calculated with my own MR data) (following this description: http://www.fieldtriptoolbox.org/example/align_eeg_electrode_positions_to_bem_headmodel) I run the ft_electroderealign function with the following options: cfg = []; cfg.method = 'interactive'; cfg.elec = elec; cfg.headshape = vol.bnd(1); elec_new = ft_electroderealign(cfg); But all I get is a figure showing a coordinate system with my electrodepositions. The scull saved in vol.bnd(1) is not plotted. (I attached a jpg of the figure). The MATLAB panel asked me: "Do you want to change the anatomical labels for the axes [Y, n]? " If I say 'no', I get the following error: Undefined function or variable 'template'. Error in ft_electroderealign (line 244) for j=1:length(template) I tried the ft_electroderealign function with the cfg.method = 'fiducials', but ended up with the same figure and the same question in the MATLAB panel. Would be great if someone could help me to figure out what's going wrong here and how I can align my electrodes to the headmodel. Thanks! _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -- Debora Desideri, PhD Student BNP Lab - Neurology Department University Hospital Tübingen Eberhard Karls University Tübingen Hoppe-Seyler Str. 3 D-72076 Tübingen Tel: +49 7071/29 80478 -------------- next part -------------- An HTML attachment was scrubbed... URL: From mi_mayer at gmx.de Wed Feb 17 16:32:34 2016 From: mi_mayer at gmx.de (Irene Sophia Mayer) Date: Wed, 17 Feb 2016 16:32:34 +0100 Subject: [FieldTrip] Epoching/trialdefinition Message-ID: An HTML attachment was scrubbed... URL: From julian.keil at gmail.com Wed Feb 17 17:07:26 2016 From: julian.keil at gmail.com (Julian Keil) Date: Wed, 17 Feb 2016 17:07:26 +0100 Subject: [FieldTrip] Epoching/trialdefinition In-Reply-To: References: Message-ID: <427FA825-7553-49C4-9294-843E909E75B3@gmail.com> Dear Irene, ft_redefinetrial is your friend. Check the Mailinglist archive for a conversation from 2013 in which Jörn Horschig explained some pitfalls here. The mail should be called "ft_preprocessing high-pass filtering question" Good luck, Julian Am 17.02.2016 um 16:32 schrieb Irene Sophia Mayer: > Dear fieldtrippers, > > I am currently analysing data where I wanna look at different time frames around specific triggers. To do so, I was planning on doing all my preprocessing on continuous data and then afterwards epoching it. > > However, when trying to use the following code on my preprocessed data, I get an error message: > > cfg = []; > cfg.datafile = 'data.mat'; > cfg.trialdef.eventtype = 'Stimulus'; > cfg.trialdef.eventvalue = trialmarks; > cfg.trialdef.prestim = .1; % baseline > cfg.trialdef.poststim = .5; % post-baseline trial length > cfg = ft_definetrial(cfg); > > Error using ft_read_header (line 2158) > unsupported header format (matlab) > Error in ft_trialfun_general (line 78) > hdr = ft_read_header(cfg.headerfile, 'headerformat', cfg.headerformat); > Error in ft_definetrial (line 174) > [trl, event] = feval(cfg.trialfun, cfg); > Error in prepro_03_epoching (line 19) > e_data = ft_definetrial(cfg); > > The same code works if applied before ft_preprocessing. > > Is there a way to epoch data after preprocessing it? > > Cheers, > Irene > _______________________________________________ > 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: signature.asc Type: application/pgp-signature Size: 495 bytes Desc: Message signed with OpenPGP using GPGMail URL: From paolo.belardinelli at gmail.com Wed Feb 17 20:20:35 2016 From: paolo.belardinelli at gmail.com (Paolo Belardinelli) Date: Wed, 17 Feb 2016 20:20:35 +0100 Subject: [FieldTrip] Problem with Template Model for Source Reconstruction Message-ID: Dear Fieldtrippers, we are encountering a problem with a template model for source reconstruction. In particular, we are warping (non linearly) a template grid to the individual subject's MRI. Doing that, it appears that the very top of the brain is not fully covered by dipole locations. We found that this issue has been already reported: http://www.fieldtriptoolbox.org/template/sourcemodel Apparently, since March 7th 2013, this issue has been fixed. However we are using August 28th 2015 Fieldtrip version and we are still dealing with the same issue. Any suggestions? Here are our code lines: cfg = []; cfg.grid.warpmni = 'yes'; cfg.resolution = 6; % resolution of the template grid in mm cfg.grid.nonlinear = 'yes'; % use non linear normalization cfg.mri = mri_spm; % use subject's mri in mni coordinates cfg.grid.unit = 'mm'; sourcemodel = ft_prepare_sourcemodel(cfg); Thank you in advance. Paolo -- -- Paolo Belardinelli, PhD Neurology Department University Hospital Tuebingen Eberhard Karls University Tuebingen Hoppe-Seyler Str. 3 D-72076 Tuebingen Tel: +49 7071 / 29 80478 -------------- next part -------------- An HTML attachment was scrubbed... URL: From britta.westner at uni-konstanz.de Thu Feb 18 10:10:18 2016 From: britta.westner at uni-konstanz.de (Britta Westner) Date: Thu, 18 Feb 2016 10:10:18 +0100 Subject: [FieldTrip] Problem with Template Model for Source Reconstruction In-Reply-To: References: Message-ID: <56C58A7A.9000207@uni-konstanz.de> Dear Paolo, I experienced similar problems and found that correcting the field bias in the participant's MRI (e.g. doing a "bias correction" with SPM) can help. My explanation would be that the field bias either leads to small inaccuracies in the segmentation and volume which then "get visible" when warping the grid based on the non-segmented MRI, or that the warping algorithm itself is affected by this bias. Maybe you can give that a try! Hope this helps, Britta Am 17.02.2016 um 20:20 schrieb Paolo Belardinelli: > Dear Fieldtrippers, > we are encountering a problem with a template model for source > reconstruction. In particular, we are warping (non linearly) a > template grid to the individual subject's MRI. > Doing that, it appears that the very top of the brain is not fully > covered by dipole locations. > We found that this issue has been already reported: > > http://www.fieldtriptoolbox.org/template/sourcemodel > > Apparently, since March 7th 2013, this issue has been fixed. > However we are using August 28th 2015 Fieldtrip version and we are > still dealing with the same issue. > Any suggestions? > Here are our code lines: > > cfg = []; > cfg.grid.warpmni = 'yes'; > cfg.resolution = 6; % resolution of the template grid in mm > cfg.grid.nonlinear = 'yes'; % use non linear normalization > cfg.mri = mri_spm; % use subject's mri in mni coordinates > cfg.grid.unit = 'mm'; > sourcemodel = ft_prepare_sourcemodel(cfg); > > Thank you in advance. > > Paolo > > > > > -- > -- > Paolo Belardinelli, PhD > Neurology Department > University Hospital Tuebingen > Eberhard Karls University Tuebingen > Hoppe-Seyler Str. 3 > D-72076 Tuebingen > Tel: +49 7071 / 29 80478 > > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -- Britta Westner, M.Sc. Neuroelectromagnetic Oscillations Laboratory Fachbereich Psychologie Universität Konstanz Postfach 905 78457 Konstanz Telefon: +49-(0)7531-88-5703 Fax: +49-(0)7531-88-5709 www.psychologie.uni-konstanz.de/nemo-lab -------------- next part -------------- An HTML attachment was scrubbed... URL: From singhkd at cardiff.ac.uk Fri Feb 19 00:52:43 2016 From: singhkd at cardiff.ac.uk (Krish Singh) Date: Thu, 18 Feb 2016 23:52:43 +0000 Subject: [FieldTrip] New postdoctoral position supporting a multi-site MEG data cohort Message-ID: Dear All, re: Research Associate in Multi-site MEG Data Cohort Management & Analysis We have just advertised an additional 2-year Research Associate post supporting the establishment of a multi-site database of normative Magnetoencephalographic (MEG) data, collected across all UK MEG laboratories, and the development of common management and analysis pipelines for mining this resource. 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://krb-sjobs.brassring.com/TGWEbHost/jobdetails.aspx?partnerid=30011&siteid=5460&AReq=4394BR ​ ​Best Wishes, Krish ​ -- Prof. Krish Singh CUBRIC School of Psychology / Ysgol Seicoleg Cardiff University / Prifysgol Caerdydd Park Place / Plas y Parc Cardiff / Caerdydd CF10 3AT, UK Tel / Ffôn: 02920 874690 / 870365 Fax / Ffacs: 02920 870339 Email / Ebost : singhkd at cardiff.ac.uk -------------- next part -------------- An HTML attachment was scrubbed... URL: From francois.tadel at mcgill.ca Fri Feb 19 01:20:25 2016 From: francois.tadel at mcgill.ca (=?UTF-8?Q?Fran=c3=a7ois_Tadel?=) Date: Thu, 18 Feb 2016 19:20:25 -0500 Subject: [FieldTrip] ft_dipolefitting and CTF 3rd order gradient compensation Message-ID: <56C65FC9.9010309@mcgill.ca> Hello, When estimating dipoles with ft_dipolefitting: How should I proceed if I want to pass the information about the 3rd order gradient compensation to the computation of the forward model ? Is there a field I should fill either in the data or the cfg structure? We are trying to compare the goodness of fit obtained with Brainstorm, MNE and FieldTrip (simple CTF electric phantom recordings). They are calling the FieldTrip function from the Brainstorm environment and asked me to check what was the situation with the CTF compensation matrix. I was expecting to find something like the line below in the code, but couldn't find it: Gain(iMeg,:) = Gain(iMeg,:) - MegRefCoef * Gain(iRef,:) % iMeg = indices of the MEG channels %iRef = indices of the CTF MEG reference channels % Gain = leadfield matrix [Nchannels x Nsources] % MegRefCoef= 3rd order compensation matrix [Nchannels_meg x Nchannels_ref] Can someone help me with this? Thanks, Francois From jan.schoffelen at donders.ru.nl Fri Feb 19 09:07:46 2016 From: jan.schoffelen at donders.ru.nl (Schoffelen, J.M. (Jan Mathijs)) Date: Fri, 19 Feb 2016 08:07:46 +0000 Subject: [FieldTrip] ft_dipolefitting and CTF 3rd order gradient compensation In-Reply-To: <56C65FC9.9010309@mcgill.ca> References: <56C65FC9.9010309@mcgill.ca> Message-ID: See line 187 in ft_compute_leadfield. More information can be found in ctf2grad and ft_denoise_synthetic. Best, Jan-Mathijs On Feb 19, 2016, at 1:20 AM, François Tadel wrote: > Hello, > > When estimating dipoles with ft_dipolefitting: > How should I proceed if I want to pass the information about the 3rd order gradient compensation to the computation of the forward model ? > Is there a field I should fill either in the data or the cfg structure? > > We are trying to compare the goodness of fit obtained with Brainstorm, MNE and FieldTrip (simple CTF electric phantom recordings). They are calling the FieldTrip function from the Brainstorm environment and asked me to check what was the situation with the CTF compensation matrix. I was expecting to find something like the line below in the code, but couldn't find it: > > Gain(iMeg,:) = Gain(iMeg,:) - MegRefCoef * Gain(iRef,:) > > % iMeg = indices of the MEG channels > %iRef = indices of the CTF MEG reference channels > % Gain = leadfield matrix [Nchannels x Nsources] > % MegRefCoef= 3rd order compensation matrix [Nchannels_meg x Nchannels_ref] > > Can someone help me with this? > > Thanks, > Francois > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip From prasandhya.a.yusuf at gmail.com Fri Feb 19 15:04:25 2016 From: prasandhya.a.yusuf at gmail.com (Prasandhya Astagiri Yusuf) Date: Fri, 19 Feb 2016 15:04:25 +0100 Subject: [FieldTrip] Clarification on plotting WPLI In-Reply-To: References: Message-ID: Hi Peter, sorry for the (very) late response, I guess you have already figured the answer by now. Anyhow, in case someone has similar problem, I try to share my experience here in the forum. I recently computed the debiased WPLI and experienced the same problem. I also found this negative value of debiased WPLI quite frequently asked in this mailing list, even Mr. Martin Vinck himself has already responded to it on June 2011. So as stated in the paper (Vinck et al. 2011), PLI and WPLI result has the range from 0 to 1. But the debiased WPLI could yields negative values as a consequence of debiasing method. One of his latest paper (Phillips, 2014), they mentioned in the Materials and Methods that "the debiased WPLI estimator (Vinck et al. 2011), ranging from zero (*negative values can incidentally occur because of limited sampling*) to one (maximum coherence)". So in my opinion, we can neglect this negative values and convert them to zeros. But surely, we should not take the absolute value from it. Best, Sandhy Prasandhya A. Yusuf *Medizinische Hochschule Hannover* Experimentelle Otologie / OE 8891 / VIANNA / M13 Feodor-Lynen-Str. 35 D-30625 Hannover On Mon, Dec 21, 2015 at 8:39 PM, Peter Lyons wrote: > Hello Everyone, > > I have a question regarding the interpretation of negative values in the > debiased wPLI. Although the reference page on the debiased wPLI notes that > estimates are computed by squaring the wPLI values, I and others have > noticed that some of the values in the debiased wPLI spectrum are negative. > How should these negative values be interpreted in reference to 0? > > To view the results of the debiased wPLI connectivity analysis > (ft_connectivity analysis with cfg.method = 'wpli_debiased'), I've been > using the ft_topoplotER function. However, I'm concerned that the default > scaling (zlim = 'maxmin') of the plot does not seem to register the > negative values in the debiased wPLI spectrum. That is, the negative values > are not being plotted. It is curious, however, that the ft_topoplotER > does register the negative values in the *non-debiased *wPLI spectrum. > > Is there a reason why the ft_topoplotER function is treating the negative > values from the debiased vs. non-debiased wPLI spectrums differently? Is > there perhaps a more appropriate plotting function I should be using to > view the debiased wPLI output? > > I would greatly appreciate any guidance in this. > > Thank you! > > Peter > > _______________________________________________ > 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 michelic72 at gmail.com Fri Feb 19 16:11:57 2016 From: michelic72 at gmail.com (Cristiano Micheli) Date: Fri, 19 Feb 2016 16:11:57 +0100 Subject: [FieldTrip] Clarification on plotting WPLI In-Reply-To: References: Message-ID: Dear Yusuf and Peter, My experience is also that negative squared wPLI values should not be considered, as they constitute a side-effect of the debiasing technique. I would rather clip them to zero, or, better, assign them a NaN (since the result is undetermined). I hope this helped. Cris On Fri, Feb 19, 2016 at 3:04 PM, Prasandhya Astagiri Yusuf < prasandhya.a.yusuf at gmail.com> wrote: > Hi Peter, > sorry for the (very) late response, I guess you have already figured the > answer by now. Anyhow, in case someone has similar problem, I try to share > my experience here in the forum. > > I recently computed the debiased WPLI and experienced the same problem. I > also found this negative value of debiased WPLI quite frequently asked in > this mailing list, even Mr. Martin Vinck himself has already responded to > it on June 2011. > So as stated in the paper (Vinck et al. 2011), PLI and WPLI result has the > range from 0 to 1. But the debiased WPLI could yields negative values as a > consequence of debiasing method. One of his latest paper (Phillips, 2014), > they mentioned in the Materials and Methods that "the debiased WPLI > estimator (Vinck et al. 2011), ranging from zero (*negative values can > incidentally occur because of limited sampling*) to one (maximum > coherence)". > So in my opinion, we can neglect this negative values and convert them to > zeros. But surely, we should not take the absolute value from it. > > Best, > Sandhy > > > Prasandhya A. Yusuf > > *Medizinische Hochschule Hannover* > > Experimentelle Otologie / OE 8891 / > > VIANNA / M13 > > Feodor-Lynen-Str. 35 > > D-30625 Hannover > > > > On Mon, Dec 21, 2015 at 8:39 PM, Peter Lyons wrote: > >> Hello Everyone, >> >> I have a question regarding the interpretation of negative values in the >> debiased wPLI. Although the reference page on the debiased wPLI notes that >> estimates are computed by squaring the wPLI values, I and others have >> noticed that some of the values in the debiased wPLI spectrum are negative. >> How should these negative values be interpreted in reference to 0? >> >> To view the results of the debiased wPLI connectivity analysis >> (ft_connectivity analysis with cfg.method = 'wpli_debiased'), I've been >> using the ft_topoplotER function. However, I'm concerned that the default >> scaling (zlim = 'maxmin') of the plot does not seem to register the >> negative values in the debiased wPLI spectrum. That is, the negative values >> are not being plotted. It is curious, however, that the ft_topoplotER >> does register the negative values in the *non-debiased *wPLI spectrum. >> >> Is there a reason why the ft_topoplotER function is treating the negative >> values from the debiased vs. non-debiased wPLI spectrums differently? Is >> there perhaps a more appropriate plotting function I should be using to >> view the debiased wPLI output? >> >> I would greatly appreciate any guidance in this. >> >> Thank you! >> >> Peter >> >> _______________________________________________ >> 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 valentina.mione at uniroma1.it Fri Feb 19 18:17:50 2016 From: valentina.mione at uniroma1.it (Valentina Mione) Date: Fri, 19 Feb 2016 18:17:50 +0100 Subject: [FieldTrip] error with Computing cross-correlations between spike trains tutorial Message-ID: Hi everyone, I am Valentina and I am a fresh new FieldTrip user. I was following the tutorial http://www.fieldtriptoolbox.org/tutorial/spike, in particular the cross correlation part with the example data ftp://ftp.fieldtriptoolbox.org/pub/fieldtrip/tutorial/spike/p029_sort_final_01.nex, but I'm stuck with a MatLab error. I loaded the data exactly how it's explained and I defined the channels and the trials (just copying the matlab instructions) and all worked fine. Then I followed this part of the tutorial: *and then compute the cross-correlogram (and the shift-predictor cross-correlogram) by* cfg = []; cfg.maxlag = 0.2; % maximum 200 ms cfg.binsize = 0.001; % bins of 1 ms cfg.outputunit = 'proportion'; % make unit area cfg.latency = [-2.5 0]; cfg.vartriallen = 'no'; % do not allow variable trial lengths cfg.method = 'xcorr'; % compute the normal cross-correlogram Xc = ft_spike_xcorr(cfg,spikeTrials); But after processing all the 600 trials the ft_spike_xcorr function interrupts working with the error: "*??? Subscript indices must either be real positive integers or logicals.* *Error in ==> ft_spike_xcorr at 350* *stat.label = spike.label(chansel);*" Trying to understand the error I set I breakpoint on the 350 line of the script and I got another error in ft_checkconfig.m "*??? Error using ==> ft_checkconfig at 208* *The field cfg.progress is not allowed* *Error in ==> ft_spike_xcorr at 126* *cfg = ft_checkconfig(cfg, 'allowed', {'latency', 'trials',* *'keeptrials', 'method', 'channelcmb', 'vartriallen', 'debias',* *'maxlag', 'binsize', 'outputunit'});*" I hope someone can help me because I really can't understand what's wrong (I feel there is a problem with the selection of the channels maybe) and I just followed the instructions. Best, Valentina -------------- next part -------------- An HTML attachment was scrubbed... URL: From joseangel.pineda at ctb.upm.es Sat Feb 20 12:32:02 2016 From: joseangel.pineda at ctb.upm.es (=?UTF-8?Q?Jos=C3=A9_=C3=81ngel_Pineda?=) Date: Sat, 20 Feb 2016 12:32:02 +0100 Subject: [FieldTrip] Job Offer in Madrid Message-ID: We are pleased to offer a 2-year post-doctoral position at the Reina Sofia Foundation Alzheimer's Disease Centre in Madrid, Spain. The successful applicant will be involved in neuroimaging analyses of a 5-year longitudinal study (currently in year 4) of 1200 healthy elderly individuals (aged 70-85) to determine neuronal markers in the healthy state which predict subsequent development of mild cognitive impairment and dementia. In addition, the Reina Sofia Alzheimer's Centre offers: - A research-dedicated MRI facility attached to a 140-bed residence for patients with Alzheimer’s disease. - A brain-bank providing post-mortem histopathological confirmation of dementia diagnosis for patients scanned pre-mortem. - Ex-vivo MRI scanning. A strong background in neuroimaging techniques is required. Applicants must have a PhD in neuroscience, cognitive neuroscience, biomedical engineering, neuropsychology or related field. Experience in dementia research is a plus. Spanish language skills are NOT required. Competitive annual salary depending on experience. SUBMISSION Interested candidates should send CV and a cover letter (including contact details of 2 referees), to the following email address: bryan.strange at upm.es DEADLINE FOR SUBMISSION OF APPLICATIONS March 4, 2016 Any questions, please feel free to contact me. -------------- next part -------------- An HTML attachment was scrubbed... URL: From jan.schoffelen at donders.ru.nl Sat Feb 20 12:49:35 2016 From: jan.schoffelen at donders.ru.nl (Schoffelen, J.M. (Jan Mathijs)) Date: Sat, 20 Feb 2016 11:49:35 +0000 Subject: [FieldTrip] error with Computing cross-correlations between spike trains tutorial In-Reply-To: References: Message-ID: Hi Valentina, Danial Arabali (in BCC) has also encountered this, and filed a bug on bugzilla.fieldtriptoolbox.org, as bug 3058. Perhaps you could create yourself an account, add yourself on the CC-list of this bug, and team up with Danial to do some extra detective work. You seem to be on the right track, with respect to your debugging attempt. I suspect it’s probably relatively easy to solve. Note that the error relating to the issue in ft_checkconfig has been fixed in the current version of the code, that can be easily obtained from github.com/fieldtrip The ft_checkconfig bug is referenced here: http://bugzilla.fieldtriptoolbox.org/show_bug.cgi?id=3062 The current issue is referenced here: http://bugzilla.fieldtriptoolbox.org/show_bug.cgi?id=3058 Best, Jan-Mathijs On Feb 19, 2016, at 6:17 PM, Valentina Mione > wrote: Hi everyone, I am Valentina and I am a fresh new FieldTrip user. I was following the tutorial http://www.fieldtriptoolbox.org/tutorial/spike, in particular the cross correlation part with the example data ftp://ftp.fieldtriptoolbox.org/pub/fieldtrip/tutorial/spike/p029_sort_final_01.nex, but I'm stuck with a MatLab error. I loaded the data exactly how it's explained and I defined the channels and the trials (just copying the matlab instructions) and all worked fine. Then I followed this part of the tutorial: and then compute the cross-correlogram (and the shift-predictor cross-correlogram) by cfg = []; cfg.maxlag = 0.2; % maximum 200 ms cfg.binsize = 0.001; % bins of 1 ms cfg.outputunit = 'proportion'; % make unit area cfg.latency = [-2.5 0]; cfg.vartriallen = 'no'; % do not allow variable trial lengths cfg.method = 'xcorr'; % compute the normal cross-correlogram Xc = ft_spike_xcorr(cfg,spikeTrials); But after processing all the 600 trials the ft_spike_xcorr function interrupts working with the error: "??? Subscript indices must either be real positive integers or logicals. Error in ==> ft_spike_xcorr at 350 stat.label = spike.label(chansel);" Trying to understand the error I set I breakpoint on the 350 line of the script and I got another error in ft_checkconfig.m "??? Error using ==> ft_checkconfig at 208 The field cfg.progress is not allowed Error in ==> ft_spike_xcorr at 126 cfg = ft_checkconfig(cfg, 'allowed', {'latency', 'trials', 'keeptrials', 'method', 'channelcmb', 'vartriallen', 'debias', 'maxlag', 'binsize', 'outputunit'});" I hope someone can help me because I really can't understand what's wrong (I feel there is a problem with the selection of the channels maybe) and I just followed the instructions. Best, Valentina _______________________________________________ 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 ha438 at georgetown.edu Sun Feb 21 00:23:01 2016 From: ha438 at georgetown.edu (Hassan Aleem) Date: Sat, 20 Feb 2016 18:23:01 -0500 Subject: [FieldTrip] Fixing headmodel vertices Message-ID: Hi Everyone, New to fieldtrip. My headmodel looks pretty good except for a couple vertices that are poking in. Is there any way to address them specifically? The code I used is similar to one provided by someone who was successful. As follows mri.coordsys ='SPM' cfg = []; cfg.brainthreshold = 0.15; cfg.scalpthreshold = 0.3; cfg.downsample = 1; %no downsampling cfg.output = {'brain' 'scalp' 'skull'}; segment = ft_volumesegment(cfg, mri); cfg = []; cfg.method = 'projectmesh'; cfg.numvertices = 10000; bnd = ft_prepare_mesh( cfg, seg); % fix mesh [ bnd( 1).pnt, bnd( 1).tri] = meshresample( bnd( 1).pnt, bnd( 1).tri, 1000/size( bnd( 1).pnt, 1)); [ bnd( 2).pnt, bnd( 2).tri] = meshresample( bnd( 2).pnt, bnd( 2).tri, 2000/size( bnd( 2).pnt, 1)); [ bnd( 3).pnt, bnd( 3).tri] = meshresample( bnd( 3).pnt, bnd( 3).tri, 3000/size( bnd( 3).pnt, 1)); for ii = 1:size( bnd), [ bnd( ii).pnt, bnd( ii).tri] = meshcheckrepair( bnd( ii).pnt, bnd( ii).tri, 'dup'); [ bnd( ii).pnt, bnd( ii).tri] = meshcheckrepair( bnd( ii).pnt, bnd( ii).tri, 'isolated'); [ bnd( ii).pnt, bnd( ii).tri] = meshcheckrepair( bnd( ii).pnt, bnd( ii).tri, 'deep'); [ bnd( ii).pnt, bnd( ii).tri] = meshcheckrepair( bnd( ii).pnt, bnd( ii).tri, 'meshfix'); end % calculate headmodel % reordered to brain skull scalp cfg = []; cfg.method = 'bemcp'; %openmeeg doesnt work with multiple output from ft_volumesegment vol = ft_prepare_headmodel(cfg, bnd); clear bnd Thanks! -------------- next part -------------- An HTML attachment was scrubbed... URL: From mi_mayer at gmx.de Sun Feb 21 13:15:26 2016 From: mi_mayer at gmx.de (Irene Sophia Mayer) Date: Sun, 21 Feb 2016 13:15:26 +0100 Subject: [FieldTrip] Global field power Message-ID: An HTML attachment was scrubbed... URL: From valentina.mione at uniroma1.it Mon Feb 22 12:43:55 2016 From: valentina.mione at uniroma1.it (Valentina Mione) Date: Mon, 22 Feb 2016 12:43:55 +0100 Subject: [FieldTrip] error with Computing cross-correlations between spike trains tutorial In-Reply-To: References: Message-ID: Hi everyone, I posted a comment on the error 3058 http://bugzilla.fieldtriptoolbox.org/show_bug.cgi?id=3058 about the cross correlation tutorial on spike data But I copy and paste what I did also here, maybe someone could be intrested as well (In reply to Danial Arabali from comment #0) Hi Danial, I'm stuck exactly at your point with the same error. Today I tried to do some detective work because I think the first error is at the line 138: *chansel = unique(cmbindx(:)); % get the unique channels* because it takes also the value 0 as index for channels. So i corrected like: *chansel = unique(cmbindx(:)); % get the unique channels* *chansel = chansel(chansel~=0); % remove zeros* and the script works fine to the end, but the output is different: infact I don't get the instruction at line 133 *for k=1:size(cfg.channelcmb,1)* * cmbindx(k,1) = strmatch(cfg.channelcmb(k,1), spike.label, 'exact');* * cmbindx(k,2) = strmatch(cfg.channelcmb(k,2), spike.label, 'exact');* *end* Why does it is set to search for only two channels if we specified 4 channels? (*cfg.spikechannel = {'sig001U_wf', 'sig002U_wf', 'sig003U_wf', 'sig004U_wf'}; % select only the MUA*) Maybe the instruction at this point should be something like this *for k=1:size(cfg.channelcmb,1)* * for c=1:length(spike.label)* * cmbindx(k,c) = strmatch(cfg.channelcmb(k,c), spike.label, 'exact');* * end* *end* Anyway, I tried this solution and the output is of the right size now (xcorr: [4x4x400 double] instead of xcorr: [2x2x400 double]), but I don't think the content is right. The last test I did was to select only the channels 3 and 4 *cfg.spikechannel = { 'sig003U_wf', 'sig004U_wf'}; % select only the MUA* and run the original script with only the first modified instruction *chansel = unique(cmbindx(:)); % get the unique channels* *chansel = chansel(chansel~=0); % remove zeros* Then I followed the second part of the tutorial *% compute the shuffled correlogram* *cfg.method = 'shiftpredictor'; % compute the shift predictor* *Xshuff = ft_spike_xcorr(cfg,spikeTrials);* *iCmb = 3;* *jCmb = 4;* *figure* *xcSmoothed = conv(squeeze(Xc.xcorr(iCmb,jCmb,:)),ones(1,5)./5,'same'); % do some smoothing* *hd = plot(Xc.time(3:end-2),xcSmoothed(3:end-2),'k'); % leave out borders (because of smoothing)* *hold on* *xcSmoothed = conv(squeeze(Xshuff.shiftpredictor(iCmb,jCmb,:)),ones(1,5)./5,'same'); * *plot(Xc.time(3:end-2),xcSmoothed(3:end-2),'r')* *hold on* *xlabel('delay')* *ylabel('proportion of coincidences') * *title([Xc.label{iCmb} Xc.label{jCmb}])* *axis tight* And I just changed *iCmb = 3;* *jCmb = 4;* in *iCmb = 1;* *jCmb = 2;* And I got exactly the same figure output of the tutorial. I hope this can be a little help for the work Valentina 2016-02-20 12:49 GMT+01:00 Schoffelen, J.M. (Jan Mathijs) < jan.schoffelen at donders.ru.nl>: > Hi Valentina, > > Danial Arabali (in BCC) has also encountered this, and filed a bug on > bugzilla.fieldtriptoolbox.org, as bug 3058. Perhaps you could create > yourself an account, add yourself on the CC-list of this bug, and team up > with Danial to do some extra detective work. You seem to be on the right > track, with respect to your debugging attempt. I suspect it’s probably > relatively easy to solve. Note that the error relating to the issue in > ft_checkconfig has been fixed in the current version of the code, that can > be easily obtained from github.com/fieldtrip > > The ft_checkconfig bug is referenced here: > > http://bugzilla.fieldtriptoolbox.org/show_bug.cgi?id=3062 > > The current issue is referenced here: > > http://bugzilla.fieldtriptoolbox.org/show_bug.cgi?id=3058 > > Best, > Jan-Mathijs > > > > > On Feb 19, 2016, at 6:17 PM, Valentina Mione > wrote: > > Hi everyone, > > I am Valentina and I am a fresh new FieldTrip user. > > I was following the tutorial > http://www.fieldtriptoolbox.org/tutorial/spike, in particular the cross > correlation part with the example data > ftp://ftp.fieldtriptoolbox.org/pub/fieldtrip/tutorial/spike/p029_sort_final_01.nex, > but I'm stuck with a MatLab error. > > I loaded the data exactly how it's explained and I defined the channels > and the trials (just copying the matlab instructions) and all worked fine. > > Then I followed this part of the tutorial: > > *and then compute the cross-correlogram (and the shift-predictor > cross-correlogram) by* > > cfg = []; > cfg.maxlag = 0.2; % maximum 200 ms > cfg.binsize = 0.001; % bins of 1 ms > cfg.outputunit = 'proportion'; % make unit area > cfg.latency = [-2.5 0]; > cfg.vartriallen = 'no'; % do not allow variable trial lengths > cfg.method = 'xcorr'; % compute the normal cross-correlogram > Xc = ft_spike_xcorr(cfg,spikeTrials); > > But after processing all the 600 trials the ft_spike_xcorr function > interrupts working with the error: > > "*??? Subscript indices must either be real positive integers > or logicals.* > > > *Error in ==> ft_spike_xcorr at 350 * > > *stat.label = spike.label(chansel);*" > > Trying to understand the error I set I breakpoint on the 350 line of the > script and I got another error in ft_checkconfig.m > > "*??? Error using ==> ft_checkconfig at 208* > > *The field cfg.progress is not allowed* > > *Error in ==> ft_spike_xcorr at 126* > > *cfg = ft_checkconfig(cfg, 'allowed', {'latency', 'trials',* > > *'keeptrials', 'method', 'channelcmb', 'vartriallen', 'debias',* > > *'maxlag', 'binsize', 'outputunit'});*" > > > I hope someone can help me because I really can't understand what's wrong > (I feel there is a problem with the selection of the channels maybe) and I > just followed the instructions. > > > Best, > > > Valentina > _______________________________________________ > 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 seymourr at aston.ac.uk Mon Feb 22 19:49:25 2016 From: seymourr at aston.ac.uk (Seymour, Robert (Research Student)) Date: Mon, 22 Feb 2016 18:49:25 +0000 Subject: [FieldTrip] Maxfilter SSS and TF-Plots Message-ID: Dear all, I've been trying out various cleaning parameters on Neuromag data and importing this into Fieldtrip. I've found that applying SSS to my data results in time-frequency plots with bands of activity at very specific frequencies. Image : http://i.imgur.com/QGma6qm.png. I do not believe it is anything to do with plotting because the lines disappear when I use tSSS with a .9 correlation. Has anybody else experienced this or hypothesise as to the cause of these artefacts? Many thanks, Robert Seymour (Aston Brain Centre) -------------- next part -------------- An HTML attachment was scrubbed... URL: From f.roux at bcbl.eu Mon Feb 22 20:03:50 2016 From: f.roux at bcbl.eu (=?utf-8?B?RnLDqWTDqXJpYw==?= Roux) Date: Mon, 22 Feb 2016 20:03:50 +0100 (CET) Subject: [FieldTrip] Maxfilter SSS and TF-Plots In-Reply-To: References: Message-ID: <1398179640.1569002.1456167830690.JavaMail.zimbra@bcbl.eu> Hi Robert, in your preprocessing, did you use: cfg.demean = 'yes'; If no then I suggest you take a look at this link: http://www.fieldtriptoolbox.org/faq/why_does_my_tfr_look_strange The stripe pattern could result from the DC-offset which gets removed when doing demeaning with the cfg-option. Try something like this before feeding data into ft_freqanalysis. cfg = []; cfg.detrending = 'yes'; cfg.demean = 'yes'; [data] = ft_preprocessing(cfg,data); Then use data with ft_freqanalysis. HTH Fred -- FR Legal disclaimer/Aviso legal/Lege-oharra: www.bcbl.eu/legal-disclaimer --------------------------------------------------------------------------- From: "Seymour, Robert (Research Student)" To: "fieldtrip_mailinglist" Sent: Monday, February 22, 2016 7:49:25 PM Subject: [FieldTrip] Maxfilter SSS and TF-Plots Dear all, I've been trying out various cleaning parameters on Neuromag data and importing this into Fieldtrip. I've found that applying SSS to my data results in time-frequency plots with bands of activity at very specific frequencies. Image : http://i.imgur.com/QGma6qm.png . I do not believe it is anything to do with plotting because the lines disappear when I use tSSS with a .9 correlation. Has anybody else experienced this or hypothesise as to the cause of these artefacts? Many thanks, Robert Seymour (Aston Brain Centre) _______________________________________________ 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 seymourr at aston.ac.uk Tue Feb 23 15:37:25 2016 From: seymourr at aston.ac.uk (Seymour, Robert (Research Student)) Date: Tue, 23 Feb 2016 14:37:25 +0000 Subject: [FieldTrip] Eletkta Neuromag data in Fieldtrip Message-ID: Thank you both so much - I definitely think that there are sources of (unknown) noise in my data, especially at lower frequencies, which Maxfilter is magically cleaning up (or "beautifying" might be a better term). I shall do some further investigations and report back! Robert -------------- next part -------------- An HTML attachment was scrubbed... URL: From seymourr at aston.ac.uk Tue Feb 23 15:45:45 2016 From: seymourr at aston.ac.uk (Seymour, Robert (Research Student)) Date: Tue, 23 Feb 2016 14:45:45 +0000 Subject: [FieldTrip] Maxfilter SSS and TF-Plots Message-ID: Thanks for the reply. I do generally have detrending and demeaning switched on during ft_preprocessing. I also tried ft_freqanalysis it with cfg.polyremoval = 1, but there were still horizontal stripes in my TF plots... :/ Robert -------------- next part -------------- An HTML attachment was scrubbed... URL: From j.herring at donders.ru.nl Wed Feb 24 10:32:17 2016 From: j.herring at donders.ru.nl (Herring, J.D. (Jim)) Date: Wed, 24 Feb 2016 09:32:17 +0000 Subject: [FieldTrip] Global field power In-Reply-To: References: Message-ID: <3D00B7615FB58D46A0B49B9AD67A33EB2AB20F0B@exprd01.hosting.ru.nl> Dear Irene, If your research question is whether there is a difference in global mean field power between conditions I would approach this in the same way as if you would want to investigate a difference in ERF/ERPs between conditions. You would therefore first calculate the time-locked averages for both conditions for each participant separately, as you did. The you would calculate the global mean field power using ft_globalmeanfield for both conditions, for each participant. If I’m not mistaken you can calculate the group average using ft_timelockgrandaverage. You could test the difference between conditions using dependent samples t-tests (perhaps cluster corrected over time) using ft_timelockstatistics. Best, Jim From: fieldtrip-bounces at science.ru.nl [mailto:fieldtrip-bounces at science.ru.nl] On Behalf Of Irene Sophia Mayer Sent: Sunday, February 21, 2016 1:15 PM To: fieldtrip at science.ru.nl Subject: [FieldTrip] Global field power Dear fieldtrippers, I want to compare the global field power in two different conditions over several participants. I have computed time-locked averages for both conditions for each participant separately. My first question now is, should I first compute a grand average over all participants and use ft_globalmeanfield on this or should I first compute global mean field for every participant and then average over them? Additionally, which functions should I use for those kinds of averaging? The second question would be, has anyone any recommendations for a statistical test I could use to see whether the conditions differ in global mean field power? Cheers, Irene -------------- next part -------------- An HTML attachment was scrubbed... URL: From Mary-Jo.Diepeveen at mpi.nl Wed Feb 24 11:01:04 2016 From: Mary-Jo.Diepeveen at mpi.nl (Diepeveen, Mary-Jo) Date: Wed, 24 Feb 2016 10:01:04 +0000 Subject: [FieldTrip] ft_timelockgrandaverage with trials Message-ID: <9AEBC8200222F443B6E297F0D479F1311C486C5A@UM-EXCDAG-A03.um.gwdg.de> Hello all, I have done an EEG study in which I have four conditions per subjects and two different subject groups. I would now like to compare the same condition between the two subject groups. To do this, I first tried ft_timelockanalysis with cfg.keeptrials=' yes' after which I tried to do ft_timelockgrandaverage. I get the following message: Warning depreciating trial field using the avg to compute the grand average (bug2372). After some googling I found an old post saying that ft_timelockgrandaverage does not support input data with "trial" field, meaning then that what I am trying to do is not possible. Trying to do the statistics after anyways also did not work because I need the .trial field. The post I found is however, from 2014 so I was wondering if this problem is fixed now. I have thought of my own way around this, but I was wondering if you maybe have any ideas too. Thanks! Mary-Jo -------------- next part -------------- An HTML attachment was scrubbed... URL: From stephen.politzer-ahles at ling-phil.ox.ac.uk Wed Feb 24 12:17:40 2016 From: stephen.politzer-ahles at ling-phil.ox.ac.uk (Stephen Politzer-Ahles) Date: Wed, 24 Feb 2016 11:17:40 +0000 Subject: [FieldTrip] fieldtrip Digest, Vol 63, Issue 26 In-Reply-To: References: Message-ID: Hi Mary-Jo, Are you sure you need individual trials? Normally, for a group-level comparison of means, the unit of observation would be the subject-wise averages, rather than all the trials; as far as I can think of, the only time you would want individual trials for timelock statistics would be if you are doing analysis on a single participants (like in the example at http://www.fieldtriptoolbox.org/tutorial/cluster_permutation_timelock#between-trials_experiments) or if you are computing event-related regression coefficients rather than event-related averages. Can you give more detail about what you're trying to do, what code you used to try running your statistics, and what error you got? Best, Steve --- Stephen Politzer-Ahles University of Oxford Language and Brain Lab Faculty of Linguistics, Phonetics & Philology http://users.ox.ac.uk/~cpgl0080/ > > Message: 4 > Date: Wed, 24 Feb 2016 10:01:04 +0000 > From: "Diepeveen, Mary-Jo" > To: "fieldtrip at science.ru.nl" > Subject: [FieldTrip] ft_timelockgrandaverage with trials > Message-ID: > <9AEBC8200222F443B6E297F0D479F1311C486C5A at UM-EXCDAG-A03.um.gwdg.de > > > Content-Type: text/plain; charset="us-ascii" > > Hello all, > > I have done an EEG study in which I have four conditions per subjects and > two different subject groups. I would now like to compare the same > condition between the two subject groups. To do this, I first tried > ft_timelockanalysis with cfg.keeptrials=' yes' after which I tried to do > ft_timelockgrandaverage. I get the following message: Warning depreciating > trial field using the avg to compute the grand average (bug2372). After > some googling I found an old post saying that ft_timelockgrandaverage does > not support input data with "trial" field, meaning then that what I am > trying to do is not possible. Trying to do the statistics after anyways > also did not work because I need the .trial field. The post I found is > however, from 2014 so I was wondering if this problem is fixed now. I have > thought of my own way around this, but I was wondering if you maybe have > any ideas too. > > Thanks! > > Mary-Jo > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From stephen.politzer-ahles at ling-phil.ox.ac.uk Wed Feb 24 12:18:57 2016 From: stephen.politzer-ahles at ling-phil.ox.ac.uk (Stephen Politzer-Ahles) Date: Wed, 24 Feb 2016 11:18:57 +0000 Subject: [FieldTrip] ft_timelockgrandaverage with trials Message-ID: Hi Mary-Jo, Are you sure you need individual trials? Normally, for a group-level comparison of means, the unit of observation would be the subject-wise averages, rather than all the trials; as far as I can think of, the only time you would want individual trials for timelock statistics would be if you are doing analysis on a single participants (like in the example at http://www.fieldtriptoolbox.org/tutorial/cluster_permutation_timelock#between-trials_experiments) or if you are computing event-related regression coefficients rather than event-related averages. Can you give more detail about what you're trying to do, what code you used to try running your statistics, and what error you got? Best, Steve --- Stephen Politzer-Ahles University of Oxford Language and Brain Lab Faculty of Linguistics, Phonetics & Philology http://users.ox.ac.uk/~cpgl0080/ > Message: 4 > Date: Wed, 24 Feb 2016 10:01:04 +0000 > From: "Diepeveen, Mary-Jo" > To: "fieldtrip at science.ru.nl" > Subject: [FieldTrip] ft_timelockgrandaverage with trials > Message-ID: > <9AEBC8200222F443B6E297F0D479F1311C486C5A at UM-EXCDAG-A03.um.gwdg.de > > > Content-Type: text/plain; charset="us-ascii" > > Hello all, > > I have done an EEG study in which I have four conditions per subjects and > two different subject groups. I would now like to compare the same > condition between the two subject groups. To do this, I first tried > ft_timelockanalysis with cfg.keeptrials=' yes' after which I tried to do > ft_timelockgrandaverage. I get the following message: Warning depreciating > trial field using the avg to compute the grand average (bug2372). After > some googling I found an old post saying that ft_timelockgrandaverage does > not support input data with "trial" field, meaning then that what I am > trying to do is not possible. Trying to do the statistics after anyways > also did not work because I need the .trial field. The post I found is > however, from 2014 so I was wondering if this problem is fixed now. I have > thought of my own way around this, but I was wondering if you maybe have > any ideas too. > > Thanks! > > Mary-Jo > -------------- next part -------------- An HTML attachment was scrubbed... URL: From david.meng at mq.edu.au Thu Feb 25 03:02:53 2016 From: david.meng at mq.edu.au (David Meng) Date: Thu, 25 Feb 2016 02:02:53 +0000 Subject: [FieldTrip] coherence estimation with "FT_FREQANALYSIS_MTMWELCH" Message-ID: Dear fieldtrippers, I just found a description page of the function "ft_freqanalysis_mtmwelch"(http://www.fieldtriptoolbox.org/reference/ft_freqanalysis_mtmwelch). Seems this function has been taken out of the package but as it is described on the webpage above, this Welch's overlapped averaged periodogram method can be implemented as: [freq] = ft_freqanalysis(cfg, data) by specifying 'cfg.method = mtmconvol' and use the options of this function to specify the length of the time windows, the amount of overlap, and the amount of spectral smoothing (in case of dpss tapers) per window. I have tried to implement this method as suggested, however in the field of the output "freq", the power spectrum and cross spectrum has a dimension as 'chan_freq_time' which means it didn't calculate the average value over all time windows. Would anyone suggest a way to enable the averaging? I have tried to average them manually but the topoplot from following 'ft_connectivityanalysis' could not be shown corrected. Best regards David -------------- next part -------------- An HTML attachment was scrubbed... URL: From lethuymy at live.com Thu Feb 25 15:43:47 2016 From: lethuymy at live.com (Thuy-My Le) Date: Thu, 25 Feb 2016 09:43:47 -0500 Subject: [FieldTrip] Out of Memory Issue Message-ID: Hello, I am new to fieldtrip. I was trying to go through the tutorial for preprocessing of continuous data into memory and am trying to run the following first few lines of code: >> cfg = []; cfg.dataset = 'subj2.vhdr'; data_org = ft_preprocessing(cfg) However I keep receiving this error: Error using fread Out of memory. Type HELP MEMORY for your options. Is this a version issue? I feel that my computer should have enough memory/RAM. I have downloaded fieldtrip-20160214. I also have MATLAB R2015a. Thank you for you help. Best, Thuy-My Le -------------- next part -------------- An HTML attachment was scrubbed... URL: From guiraudh at gmail.com Thu Feb 25 16:30:08 2016 From: guiraudh at gmail.com (=?UTF-8?B?SMOpbMOobmUgR3VpcmF1ZA==?=) Date: Thu, 25 Feb 2016 10:30:08 -0500 Subject: [FieldTrip] Brain Atlas for ROI in children. Message-ID: Dear community, I'm working on speech rhythm perception in children using MEG and I'd like to realize a ROI analysis. I use the template for children from the McConnell Brain Imagery Centre for my source analysis. I'd like to know if there is an atlas of different cortical regions in children that I could use? Thank you. Helene Guiraud -------------- next part -------------- An HTML attachment was scrubbed... URL: From azeez.adebimpe5 at gmail.com Thu Feb 25 16:35:47 2016 From: azeez.adebimpe5 at gmail.com (Azeez Adebimpe) Date: Thu, 25 Feb 2016 16:35:47 +0100 Subject: [FieldTrip] Brain Atlas for ROI in children. In-Reply-To: References: Message-ID: HI Helene, You can check this link for list of atlases from infant to adult https://sites.google.com/site/chuanglab/atlas Best, Azeez On Thu, Feb 25, 2016 at 4:30 PM, Hélène Guiraud wrote: > Dear community, > > I'm working on speech rhythm perception in children using MEG and I'd like > to realize a ROI analysis. > I use the template for children from the McConnell Brain Imagery Centre > for my source analysis. > I'd like to know if there is an atlas of different cortical regions in > children that I could use? > > Thank you. > > Helene Guiraud > > _______________________________________________ > 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 guiraudh at gmail.com Thu Feb 25 18:11:33 2016 From: guiraudh at gmail.com (=?UTF-8?B?SMOpbMOobmUgR3VpcmF1ZA==?=) Date: Thu, 25 Feb 2016 12:11:33 -0500 Subject: [FieldTrip] Brain Atlas for ROI in children. In-Reply-To: References: Message-ID: Hi Azeez, Thank you for your answer! Best, Hélène 2016-02-25 10:35 GMT-05:00 Azeez Adebimpe : > HI Helene, > > You can check this link for list of atlases from infant to adult > > https://sites.google.com/site/chuanglab/atlas > > Best, > > Azeez > > On Thu, Feb 25, 2016 at 4:30 PM, Hélène Guiraud > wrote: > >> Dear community, >> >> I'm working on speech rhythm perception in children using MEG and I'd >> like to realize a ROI analysis. >> I use the template for children from the McConnell Brain Imagery Centre >> for my source analysis. >> I'd like to know if there is an atlas of different cortical regions in >> children that I could use? >> >> Thank you. >> >> Helene Guiraud >> >> _______________________________________________ >> 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 vanwijk.bernadette at gmail.com Thu Feb 25 19:30:25 2016 From: vanwijk.bernadette at gmail.com (Bernadette van Wijk) Date: Thu, 25 Feb 2016 18:30:25 +0000 Subject: [FieldTrip] SPM course for MEG/EEG in London: May 16-18 Message-ID: Dear all, We are pleased to announce that our annual *SPM course for MEG/EEG* will take place this year from *Monday May 16 to Wednesday May 18 2016*. Hosted by University College London, the course will be held at Queen Square, a very central location in London (UK). The course will present instruction on the analysis of MEG and EEG data. The first two days will combine theoretical presentations with practical demonstrations of the different data analysis methods implemented in SPM. On the last day participants will have the opportunity to work on SPM tutorial data sets under the supervision of the course faculty. We also invite students to bring their own data for analysis. The course is suitable for both beginners and more advanced users. The topics that will be covered range from pre-processing and statistical analysis to source localization and dynamic causal modelling. The program is listed below. Registration is now open. We offer a reduced rate when attending both the MEG/EEG course and the fMRI course during the second half of the week. For full details of both courses see http://www.fil.ion.ucl.ac.uk/spm/course/london/ where you can also register. Available places are limited so please register as early as possible if you would like to attend! *Monday May 16th* 9.00 - 9.30 Registration 9.30 - 9.45 SPM introduction and resources *Vladimir Litvak * 9.45 - 10.30 What are we measuring with M/EEG? *Saskia Helbling* 10.30 - 11.15 Data pre-processing *Holly Rossiter* *Coffee* 11.45 - 12.30 Data pre-processing - demo *Deborah Talmi * 12.30 - 13.15 General linear model and classical inference *Sven Bestmann* *Lunch* 14.15 - 15.00 Multiple comparisons problem and solutions *Gareth Barnes* 15.00 - 15.45 Bayesian inference *Jean Daunizeau* *Coffee* 16.15 - 17.45 Group M/EEG dataset analysis - demo *Vladimir Litvak / Jason Taylor* 17.45 - 18.30 Advanced applications of the GLM *Bernhard Spitzer* *Tuesday May 17th* 9.30 - 10.15 M/EEG source analysis *Jérémie Mattout* 10.15 - 11.15 M/EEG source analysis - demo *Jose Lopez / Sofie Meyer* *Coffee* 11.45 - 12.30 Principles of dynamic causal modelling *Bernadette van Wijk* 12.30 - 13.15 DCM for evoked responses *Ryszard Auksztulewicz* *Lunch* 14.15 - 15.00 DCM for steady state responses *Rosalyn Moran* 15.00 - 15.45 DCM - demo *Martin Dietz / Andre Marreiros* *Coffee* 16.15 - 17.00 Bayesian model selection and averaging *Peter Zeidman* 17.00 - 18.30 Clinic - questions & answers *Karl Friston* 19.00 - ... Social Event *Wednesday May 18th* 9.30 - 17.00 Practical hands-on session in UCL computer class rooms. Participants can either work on SPM tutorial datasets or on their own data with the help of the faculty. There will also be an opportunity to ask questions in small tutorial groups for further discussions on the topics of the lectures. -------------- next part -------------- An HTML attachment was scrubbed... URL: From jbtrimper at gmail.com Thu Feb 25 23:12:26 2016 From: jbtrimper at gmail.com (John Trimper) Date: Thu, 25 Feb 2016 17:12:26 -0500 Subject: [FieldTrip] Can I declare directional dependencies amongst variables before calculating MVAR model? Message-ID: Hello, My name is John and I am a graduate student currently using a multivariate auto-regressive (MVAR) approach to analyze in vivo electrophysiological data which I recorded simultaneously from four subregions of a larger brain system. The goal of this set of analyses is to ask which of the subregions might be Granger-causing oscillations in specific frequency bands in the other subregions. In short, my question is: With fieldtrip specifically, and the MVAR approach in general, is it possible to declare the dependencies in my data before constructing the MVAR model, and have that information constrain the coefficient calculation? To elaborate, imagine the four brain regions I recorded from (A, B, C, & D) are connected unidirectionally, such that A projects to B projects to C projects to D (A->B->C->D). Using MVAR as I have been, my model will find coefficients for each of the four variables regressed on each of the other four variables. Is it possible for me to declare the dependencies before hand, such that when I build a model for B, I exclude C and D, only calculating coefficients for A and B, but when I build a model for D, I calculate coefficients for A, B, C, & D? Perhaps I have no choice but to calculate the models separately, but moreover, is it possible to declare that the brain regions are in series (unidirectionally projecting)? Thank you for everyone's time. I apologize if I violated any rules of the community forum or if this is a variant of a previous question. I couldn't find any question similar to this one, and this question is my first to the forum. Much obliged, John __________________________________________ This e-mail message (including any attachments) is for the sole use of the intended recipient(s) and may contain confidential and privileged information. If the reader of this message is not the intended recipient, you are hereby notified that any dissemination, distribution or copying of this message (including any attachments) is strictly prohibited. If you have received this message in error, please contact the sender by reply e-mail message and destroy all copies of the original message (including attachments). -------------- next part -------------- An HTML attachment was scrubbed... URL: From stephen.politzer-ahles at ling-phil.ox.ac.uk Fri Feb 26 12:16:41 2016 From: stephen.politzer-ahles at ling-phil.ox.ac.uk (Stephen Politzer-Ahles) Date: Fri, 26 Feb 2016 11:16:41 +0000 Subject: [FieldTrip] Out of Memory Issue Message-ID: Hello Thuy-My, The dataset loads fine for me with fieldtrip-20150113 in MATLAB 2015a on 64-bit Windows 7 with 8GB RAM. I suspect that the out of memory error is more likely to be related to your computer's power than to the fieldtrip version (these errors are quite common in MATLAB) but you can try running an older version of fieldtrip and/or try this analysis on a different computer to try to diagnose the problem. Best, Steve --- Stephen Politzer-Ahles University of Oxford Language and Brain Lab Faculty of Linguistics, Phonetics & Philology http://users.ox.ac.uk/~cpgl0080/ ---------------------------------------------------------------------- > > Message: 1 > Date: Thu, 25 Feb 2016 09:43:47 -0500 > From: Thuy-My Le > To: "fieldtrip at science.ru.nl" > Subject: [FieldTrip] Out of Memory Issue > Message-ID: > Content-Type: text/plain; charset="iso-8859-1" > > Hello, > > I am new to fieldtrip. I was trying to go through the tutorial for > preprocessing of continuous data into memory and am trying to run the > following first few lines of code: > > >> cfg = []; > cfg.dataset = 'subj2.vhdr'; > data_org = ft_preprocessing(cfg) > > However I keep receiving this error: > > Error using fread > Out of memory. Type HELP MEMORY for your options. > > Is this a version issue? I feel that my computer should have enough > memory/RAM. I have downloaded fieldtrip-20160214. I also have MATLAB R2015a. > > Thank you for you help. > > Best, > Thuy-My Le > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From lethuymy at live.com Fri Feb 26 13:44:54 2016 From: lethuymy at live.com (Thuy-My Le) Date: Fri, 26 Feb 2016 07:44:54 -0500 Subject: [FieldTrip] Out of Memory Issue Message-ID: Great thanks. Sent from my Verizon Wireless 4G LTE smartphone -------- Original message -------- From: Stephen Politzer-Ahles Date: 2016/02/26 06:23 (GMT-05:00) To: fieldtrip at science.ru.nl Subject: Re: [FieldTrip] Out of Memory Issue Hello Thuy-My, The dataset loads fine for me with fieldtrip-20150113 in MATLAB 2015a on 64-bit Windows 7 with 8GB RAM. I suspect that the out of memory error is more likely to be related to your computer's power than to the fieldtrip version (these errors are quite common in MATLAB) but you can try running an older version of fieldtrip and/or try this analysis on a different computer to try to diagnose the problem. Best, Steve --- Stephen Politzer-Ahles University of Oxford Language and Brain Lab Faculty of Linguistics, Phonetics & Philology http://users.ox.ac.uk/~cpgl0080/ ---------------------------------------------------------------------- > > Message: 1 > Date: Thu, 25 Feb 2016 09:43:47 -0500 > From: Thuy-My Le > To: "fieldtrip at science.ru.nl" > Subject: [FieldTrip] Out of Memory Issue > Message-ID: > Content-Type: text/plain; charset="iso-8859-1" > > Hello, > > I am new to fieldtrip. I was trying to go through the tutorial for > preprocessing of continuous data into memory and am trying to run the > following first few lines of code: > > >> cfg = []; > cfg.dataset = 'subj2.vhdr'; > data_org = ft_preprocessing(cfg) > > However I keep receiving this error: > > Error using fread > Out of memory. Type HELP MEMORY for your options. > > Is this a version issue? I feel that my computer should have enough > memory/RAM. I have downloaded fieldtrip-20160214. I also have MATLAB R2015a. > > Thank you for you help. > > Best, > Thuy-My Le > > -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip From helen.wieffering at gmail.com Mon Feb 29 01:26:25 2016 From: helen.wieffering at gmail.com (Helen Wieffering) Date: Sun, 28 Feb 2016 19:26:25 -0500 Subject: [FieldTrip] Granger Causality statistics and group analysis Message-ID: Dear Jörn, I recently re-read your 2015 paper on Directed Communication between Nucleus Accumbens and Neocortex in Humans. I am taking a similar approach with my data, looking at non-parametric Granger Causality as computed through FieldTrip. I believe you pointed me to this paper in a response to one of my FieldTrip e-mails a few months back, and it has proven very helpful! If it's not too much trouble, I now wonder if you could provide any further detail on how you computed p-value statistics from each subject's Granger spectrum. As far as I can tell, Fieldtrip's statistical packages are very limited / nonexistent when it comes to connectivity data. In your paper you mentioned obtaining one Granger estimate for each direction - could you explain how you did this, and whether you performed this statistical analysis in Fieldtrip? Any advice is much appreciated! Thank you, Helen -------------- next part -------------- An HTML attachment was scrubbed... URL: From runna90 at 126.com Mon Feb 29 10:15:59 2016 From: runna90 at 126.com (CRN) Date: Mon, 29 Feb 2016 17:15:59 +0800 Subject: [FieldTrip] How to use ft_megrealign before grand average Message-ID: Dear all, My name is Runnan Cao and I am pursuing PhD degree in ShengHe lab in Beijing on vision and cognition science. Currently I am analyzing the MEG data of my project, which were acquired by CTF-275 system. I tried to compute average ERF across several subjects but I had trouble in using ft_megrealign before using ft_timelockgrandaverage. The configuration, cfg.template is required when you apply ft_megrealign function. But I am not clear about how to get that template and what kind of information should be contained in it. If I want to constructed the template by averaging the gradiometer positions over multiple datasets, which function should be applied? If it is not too trouble, could anyone provide an example script showing the detail of applying the ft_megrealign function. Thank you very much and I looking forward to your help any minute. Best wishes, Runnan runna90 at 126.com Institute of Biophysics, Chinese Academy of Science, Beijing, China -------------- next part -------------- An HTML attachment was scrubbed... URL: From antonietta.sorriso at uniparthenope.it Mon Feb 29 10:31:36 2016 From: antonietta.sorriso at uniparthenope.it (Antonietta Sorriso) Date: Mon, 29 Feb 2016 10:31:36 +0100 Subject: [FieldTrip] Time series of sources activation by using LCMV Beamformer Message-ID: <20160229103136.Horde.2LfnDxUE5kiNT7pipIE8hQ3@webmail.uniparthenope.it> Hello, I am using fieltrip in order to obtain source reconstruction from MEG data. I succesfully implemented a code that exploit the function ft_sourceanalysis for performing beamformer. Unfortunately I was not able to obtain the output I need, i.e. the time series of sources activation. In particular I only was able to achieve the mean activation value for each source, divided for frequency bands or not, but I found no way for computing the activation intensity of each source for each time sample. Is it possible to achieve such goal via fieldtrip? If yes, which function and which input parameters should I exploit? Thanks and best regards -- Antonietta Sorriso ​Ph.D. Student ​Dipartimento di Ingegneria ​Laboratorio di TLC ed Elaborazione Segnali ed Immagini ​Centro Direzionale di Napoli, Isola C4, Stanze 326-327, lato Sud, piano 3 ​80143, Napoli, Italia e-mail: antonietta.sorriso at uniparthenope.it From jorn at artinis.com Mon Feb 29 13:21:10 2016 From: jorn at artinis.com (=?UTF-8?Q?J=C3=B6rn_M._Horschig?=) Date: Mon, 29 Feb 2016 13:21:10 +0100 Subject: [FieldTrip] Granger Causality statistics and group analysis In-Reply-To: References: Message-ID: <003a01d172eb$acfeb630$06fc2290$@artinis.com> Dear Helen, Great to hear that you liked the paper! When computing Granger causality you get by default two values, x->y and y->x. I am not sure what more to say to answer your question, so here’s a slightly more detailed response on what we did to the data ;) We did statistics in a two step procedure. First, identifying regions of interest using a surrogate distribution and a permutation test on the z-transformed coherence metric. Second, computing the Granger causality metric and performing an ANOVA (after log-transforming the Granger values to make them satisfy the normality requirement). For both steps, I used FieldTrip functions only for computing the connectivity metric (ordinary coherence, and Granger causality, respectively). Everything else is something I am afraid you will have to do manually (but you can grab some bits and pieces of existing FT functions). I do not have access to my old drive at the Donders Institute anymore, so I cannot send you the code, but I am confident that you can manage to re-code this :) If you get stuck, however, feel free to let me know and I can give you a hand. With best regards, Jörn -- Jörn M. Horschig, PhD, Software Engineer Artinis Medical Systems | +31 481 350 980 From: Helen Wieffering [mailto:helen.wieffering at gmail.com] Sent: Monday, February 29, 2016 1:26 To: FieldTrip discussion list ; jorn at artinis.com Subject: Granger Causality statistics and group analysis Dear Jörn, I recently re-read your 2015 paper on Directed Communication between Nucleus Accumbens and Neocortex in Humans. I am taking a similar approach with my data, looking at non-parametric Granger Causality as computed through FieldTrip. I believe you pointed me to this paper in a response to one of my FieldTrip e-mails a few months back, and it has proven very helpful! If it's not too much trouble, I now wonder if you could provide any further detail on how you computed p-value statistics from each subject's Granger spectrum. As far as I can tell, Fieldtrip's statistical packages are very limited / nonexistent when it comes to connectivity data. In your paper you mentioned obtaining one Granger estimate for each direction - could you explain how you did this, and whether you performed this statistical analysis in Fieldtrip? Any advice is much appreciated! Thank you, Helen -------------- next part -------------- An HTML attachment was scrubbed... URL: From sreenivasan.r.nadar at gmail.com Mon Feb 29 13:57:14 2016 From: sreenivasan.r.nadar at gmail.com (Sreenivasan R. Nadar, Ph.D.) Date: Mon, 29 Feb 2016 07:57:14 -0500 Subject: [FieldTrip] Time series of sources activation by using LCMV Beamformer In-Reply-To: <20160229103136.Horde.2LfnDxUE5kiNT7pipIE8hQ3@webmail.uniparthenope.it> References: <20160229103136.Horde.2LfnDxUE5kiNT7pipIE8hQ3@webmail.uniparthenope.it> Message-ID: Hello Antonietta, Please find the following link for extracting source time series: http://www.fieldtriptoolbox.org/tutorial/connectivity Vasan On Mon, Feb 29, 2016 at 4:31 AM, Antonietta Sorriso < antonietta.sorriso at uniparthenope.it> wrote: > > Hello, > I am using fieltrip in order to obtain source reconstruction from MEG data. > I succesfully implemented a code that exploit the function > ft_sourceanalysis > for performing beamformer. Unfortunately I was not able to obtain the > output > I need, i.e. the time series of sources activation. In particular I only > was > able to achieve the mean activation value for each source, divided for > frequency bands or not, but I found no way for computing the activation > intensity of each source for each time sample. Is it possible to achieve > such goal via fieldtrip? If yes, which function and which input parameters > should I exploit? > > Thanks and best regards > -- > Antonietta Sorriso > > ​Ph.D. Student > ​Dipartimento di Ingegneria > ​Laboratorio di TLC ed Elaborazione Segnali ed Immagini > ​Centro Direzionale di Napoli, Isola C4, Stanze 326-327, lato Sud, piano 3 > ​80143, Napoli, Italia > e-mail: antonietta.sorriso at uniparthenope.it > > _______________________________________________ > 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 stan.vanpelt at donders.ru.nl Mon Feb 29 14:47:24 2016 From: stan.vanpelt at donders.ru.nl (Pelt, S. van (Stan)) Date: Mon, 29 Feb 2016 13:47:24 +0000 Subject: [FieldTrip] Time series of sources activation by using LCMV Beamformer In-Reply-To: References: <20160229103136.Horde.2LfnDxUE5kiNT7pipIE8hQ3@webmail.uniparthenope.it> Message-ID: <7CCA2706D7A4DA45931A892DF3C2894C2D375D2F@exprd03.hosting.ru.nl> Dear Antonietta, In addition to the tutorial Vasan is referring to (where you can find the relevant information under the paragraph “Connectivity between MEG virtual channel and EMG”), there is also a dedicated tutorial for your question: http://www.fieldtriptoolbox.org/tutorial/shared/virtual_sensors Best, Stan -- Stan van Pelt, PhD Donders Institute for Brain, Cognition and Behaviour Radboud University Montessorilaan 3, B.01.34 6525 HR Nijmegen, the Netherlands tel: +31 24 3616288 From: fieldtrip-bounces at science.ru.nl [mailto:fieldtrip-bounces at science.ru.nl] On Behalf Of Sreenivasan R. Nadar, Ph.D. Sent: maandag 29 februari 2016 13:57 To: FieldTrip discussion list Subject: Re: [FieldTrip] Time series of sources activation by using LCMV Beamformer Hello Antonietta, Please find the following link for extracting source time series: http://www.fieldtriptoolbox.org/tutorial/connectivity Vasan On Mon, Feb 29, 2016 at 4:31 AM, Antonietta Sorriso > wrote: Hello, I am using fieltrip in order to obtain source reconstruction from MEG data. I succesfully implemented a code that exploit the function ft_sourceanalysis for performing beamformer. Unfortunately I was not able to obtain the output I need, i.e. the time series of sources activation. In particular I only was able to achieve the mean activation value for each source, divided for frequency bands or not, but I found no way for computing the activation intensity of each source for each time sample. Is it possible to achieve such goal via fieldtrip? If yes, which function and which input parameters should I exploit? Thanks and best regards -- Antonietta Sorriso ​Ph.D. Student ​Dipartimento di Ingegneria ​Laboratorio di TLC ed Elaborazione Segnali ed Immagini ​Centro Direzionale di Napoli, Isola C4, Stanze 326-327, lato Sud, piano 3 ​80143, Napoli, Italia e-mail: antonietta.sorriso at uniparthenope.it _______________________________________________ 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 nwolpert at uni-osnabrueck.de Mon Feb 29 16:18:25 2016 From: nwolpert at uni-osnabrueck.de (nwolpert at uni-osnabrueck.de) Date: Mon, 29 Feb 2016 16:18:25 +0100 (CET) Subject: [FieldTrip] ft_sourceplot on surface Message-ID: <49679.82.226.247.249.1456759105.squirrel@myuos.uni-osnabrueck.de> Dear fieldtrip users, I have an issue when visualizing beamformed data: When using 'ft_sourceplot' to show the interpolated data on slices in the three planes (cfg.method = 'ortho'), reasonable results are produced. However, when doing surface plots by calling cfg.method = 'surface', the power is projected only to a subset of the brain, with very abrupt borders and zero power everywhere else. It gives the impression that there is some kind of scaling problem (i.e. the surface template used has the wrong scale), but I can't figure out the cause for this problem. I would be glad if anyone has a possible explanation. I attach the code below that produced the figures. Best, Nicolai Wolpert cfg = []; cfg.method = 'dics'; cfg.grid = grid; cfg.headmodel = headmodel; cfg.dics.projectnoise = 'yes'; cfg.dics.lambda = 0; sourceAlpha_dics = ft_sourceanalysis(cfg, freq_alpha); % remove center of head bias by using the neural activity index (NAI) sourceAlpha_dics.avg.pow = sourceAlpha_dics.avg.pow ./ sourceAlpha_dics.avg.noise; % reslice mri mri_real_resliced = ft_volumereslice([], mri_real); % Interpolation: Project computed sources on aligned template MRI brain cfg = []; cfg.downsample = 2; cfg.parameter = 'avg.pow'; sourceAlpha_dics_intp = ft_sourceinterpolate(cfg, sourceAlpha_dics , mri_real_resliced); % visualize the result cfg = []; cfg.method = 'surface'; cfg.funparameter = 'avg.pow'; ft_sourceplot(cfg, sourceAlpha_dics_intp); From azeez.adebimpe5 at gmail.com Mon Feb 29 16:28:09 2016 From: azeez.adebimpe5 at gmail.com (Azeez Adebimpe) Date: Mon, 29 Feb 2016 16:28:09 +0100 Subject: [FieldTrip] ft_sourceplot on surface In-Reply-To: <49679.82.226.247.249.1456759105.squirrel@myuos.uni-osnabrueck.de> References: <49679.82.226.247.249.1456759105.squirrel@myuos.uni-osnabrueck.de> Message-ID: it would be nice if you can post the pics that would give much much info On Mon, Feb 29, 2016 at 4:18 PM, wrote: > Dear fieldtrip users, > > I have an issue when visualizing beamformed data: When using > 'ft_sourceplot' to show the interpolated data on slices in the three > planes (cfg.method = 'ortho'), reasonable results are produced. However, > when doing surface plots by calling cfg.method = 'surface', the power is > projected only to a subset of the brain, with very abrupt borders and zero > power everywhere else. It gives the impression that there is some kind of > scaling problem (i.e. the surface template used has the wrong scale), but > I can't figure out the cause for this problem. > > I would be glad if anyone has a possible explanation. I attach the code > below that produced the figures. > > Best, > Nicolai Wolpert > > cfg = []; > cfg.method = 'dics'; > cfg.grid = grid; > cfg.headmodel = headmodel; > cfg.dics.projectnoise = 'yes'; > cfg.dics.lambda = 0; > sourceAlpha_dics = ft_sourceanalysis(cfg, freq_alpha); > > % remove center of head bias by using the neural activity index (NAI) > sourceAlpha_dics.avg.pow = sourceAlpha_dics.avg.pow ./ > sourceAlpha_dics.avg.noise; > > % reslice mri > mri_real_resliced = ft_volumereslice([], mri_real); > > % Interpolation: Project computed sources on aligned template MRI brain > cfg = []; > cfg.downsample = 2; > cfg.parameter = 'avg.pow'; > sourceAlpha_dics_intp = ft_sourceinterpolate(cfg, sourceAlpha_dics , > mri_real_resliced); > > % visualize the result > cfg = []; > cfg.method = 'surface'; > cfg.funparameter = 'avg.pow'; > ft_sourceplot(cfg, sourceAlpha_dics_intp); > > > _______________________________________________ > 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 nicholas.balderston at nih.gov Mon Feb 29 16:48:29 2016 From: nicholas.balderston at nih.gov (Balderston, Nicholas (NIH/NIMH) [F]) Date: Mon, 29 Feb 2016 15:48:29 +0000 Subject: [FieldTrip] Time series of sources activation by using LCMV Beamformer In-Reply-To: <7CCA2706D7A4DA45931A892DF3C2894C2D375D2F@exprd03.hosting.ru.nl> References: <20160229103136.Horde.2LfnDxUE5kiNT7pipIE8hQ3@webmail.uniparthenope.it> , <7CCA2706D7A4DA45931A892DF3C2894C2D375D2F@exprd03.hosting.ru.nl> Message-ID: Hi Antonietta, I'm pretty new to fieldtrip, but I was able to do something similar by doing the following: 1) conducting the timelocked analysis 2) computing the lcmv for all trials 3) extracting the common filter 4) multiplying the common filter by the sensor timecourses I haven't really figured out how to plot these timecourses just yet, but it's a work in progress. Here's the code I used, hope it helps. % 1) conducting the timelocked analysis disp('################################timelocked') cfg = []; cfg.vartrllength = 2; cfg.covariance = 'yes'; cfg.covariancewindow = 'prestim'; cfg.keeptrials = 'yes'; cfg.channel = 'MEG'; cfg.inputfile = strcat(subject, '.alltrials.clean.mat'); cfg.outputfile = strcat(subject, '.alltrials.clean.timelocked.mat'); timelocked = ft_timelockanalysis(cfg); % 2) computing the lcmv for all trials disp('################################create lcmv filter') cfg = []; cfg.method = 'lcmv'; cfg.grid = leadfield_ctf; cfg.vol = vol_ctf; cfg.grad = grad; cfg.channel = 'MEG'; cfg.lambda = '5%'; cfg.lcmv.fixedori = 'yes'; cfg.keepfilter = 'yes'; cfg.outputfile = strcat(subject, '.alltrials.clean.beamformer.filter.mat'); beamformer_avg = ft_sourceanalysis(cfg, timelocked); % 3) extracting the common filter disp('################################create extract common filter') commonfilter = cell2mat(beamformer_avg.avg.filter); beamformer_virt = []; beamformer_virt.fsample = data.fsample; beamformer_virt.trial = []; beamformer_virt.time = time; beamformer_virt.trialinfo = timelocked.trialinfo; beamformer_virt.dimord = timelocked.dimord; % 4) multiplying the common filter by the sensor timecourses disp('################################create source timecourse') for i=1:size(timelocked.trial,1) disp(strcat('################################computing timecourse for trial: ', int2str(i))); beamformer_virt.trial{i} = commonfilter*squeeze(timelocked.trial(i,:,:)); end -nick ________________________________ From: Pelt, S. van (Stan) [stan.vanpelt at donders.ru.nl] Sent: Monday, February 29, 2016 8:47 AM To: FieldTrip discussion list Subject: Re: [FieldTrip] Time series of sources activation by using LCMV Beamformer Dear Antonietta, In addition to the tutorial Vasan is referring to (where you can find the relevant information under the paragraph “Connectivity between MEG virtual channel and EMG”), there is also a dedicated tutorial for your question: http://www.fieldtriptoolbox.org/tutorial/shared/virtual_sensors Best, Stan -- Stan van Pelt, PhD Donders Institute for Brain, Cognition and Behaviour Radboud University Montessorilaan 3, B.01.34 6525 HR Nijmegen, the Netherlands tel: +31 24 3616288 From: fieldtrip-bounces at science.ru.nl [mailto:fieldtrip-bounces at science.ru.nl] On Behalf Of Sreenivasan R. Nadar, Ph.D. Sent: maandag 29 februari 2016 13:57 To: FieldTrip discussion list Subject: Re: [FieldTrip] Time series of sources activation by using LCMV Beamformer Hello Antonietta, Please find the following link for extracting source time series: http://www.fieldtriptoolbox.org/tutorial/connectivity Vasan On Mon, Feb 29, 2016 at 4:31 AM, Antonietta Sorriso > wrote: Hello, I am using fieltrip in order to obtain source reconstruction from MEG data. I succesfully implemented a code that exploit the function ft_sourceanalysis for performing beamformer. Unfortunately I was not able to obtain the output I need, i.e. the time series of sources activation. In particular I only was able to achieve the mean activation value for each source, divided for frequency bands or not, but I found no way for computing the activation intensity of each source for each time sample. Is it possible to achieve such goal via fieldtrip? If yes, which function and which input parameters should I exploit? Thanks and best regards -- Antonietta Sorriso ​Ph.D. Student ​Dipartimento di Ingegneria ​Laboratorio di TLC ed Elaborazione Segnali ed Immagini ​Centro Direzionale di Napoli, Isola C4, Stanze 326-327, lato Sud, piano 3 ​80143, Napoli, Italia e-mail: antonietta.sorriso at uniparthenope.it _______________________________________________ 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 kajal5888 at yahoo.co.in Mon Feb 29 21:11:58 2016 From: kajal5888 at yahoo.co.in (D I L J I T) Date: Mon, 29 Feb 2016 20:11:58 +0000 (UTC) Subject: [FieldTrip] How to plot sourcedata at the cortical surface References: <347287188.845797.1456776718141.JavaMail.yahoo.ref@mail.yahoo.com> Message-ID: <347287188.845797.1456776718141.JavaMail.yahoo@mail.yahoo.com> Hi All, We have done the MEG source analysis using fieltrip. We want to plot the the source data at the surface. We want to have the individual surface. Can anyone please guide us how to prepare them(i.e. surface_white_both.mat etc).Thanks alot in advance,Warm RegardsDJ  Diljit Singh Kajal ------------------------------------ Ph.D Research Scholar, International Max Planck Research School, Graduate Training Centre for Neuroscience, Institute for Medical Psychology & Behavioural Neurobiology, MEG Centre, Room number 202, Otfried-Müller-Str. 47, University of Tübingen, Tübingen-72076, Germany. +49-176-88262138(M), +49-7071-2981196(O) -------------- next part -------------- An HTML attachment was scrubbed... URL: From Elana.Harris at cchmc.org Mon Feb 29 21:20:17 2016 From: Elana.Harris at cchmc.org (Harris, Elana) Date: Mon, 29 Feb 2016 20:20:17 +0000 Subject: [FieldTrip] MEG sensors statistics Message-ID: Dear All, I have the minimum, maximum and mean alpha power for each MEG sensor (found using MEGProcessor developed by Jing Xiang, MD, PhD) for 16 subjects, 8 of whom have a psychiatric condition and 8 are healthy comparison subjects. We find statistical significance when comparing the set all of the MLF or MRO sensors, for instance, between the groups (healthy and pathological), however, I am wondering if this is false statistical power as all of the sensors likely represent once source generator and not truly, multiple, separate, non-independent recordings. Would it be best to summarize each subject’s data with one number to represent the maximum alpha power for the group of MLF sensors and then compare the two groups of subjects? I welcome your advice. Thank you. Elana Elana Harris, MD, PhD Assistant Professor Division of Child & Adolescent Psychiatry Cincinnati Children’s Hospital Medical Center -------------- next part -------------- An HTML attachment was scrubbed... URL: From jan.schnupp at dpag.ox.ac.uk Mon Feb 1 11:24:47 2016 From: jan.schnupp at dpag.ox.ac.uk (Jan Schnupp) Date: Mon, 1 Feb 2016 10:24:47 +0000 Subject: [FieldTrip] Postdoc and PhD opportunities in Auditory Neuroscience in Hong Kong Message-ID: One postdoctoral position and two PhD graduate studentships in auditory neuroscience are available from June 2016 in a new research group set up by Prof. Jan Schnupp at the City University of Hong Kong. Our lab will use electrophysiological and psychoacoustic techniques to study neural mechanisms of auditory perception in humans and rats. Experiments studying plastic changes in the central auditory pathway following cochlear implant stimulation are also planned. Hong Kong is an exceptionally vibrant and exciting place to live and work. Key techniques in our research include the digital processing of electrophysiological and acoustic signals, as well as automating the behavioral psychoacoustic testing of experimental animals. We are therefore particularly interested in candidates with a background, or at least an interest, in computer programming, computational and or statistical modelling, and perhaps a little electronics. Experience in animal handling, small animal surgery and electrophysiological recordings would also be desirable. Interested parties please contact jan_hk at schnupp.net -- Prof Jan Schnupp University of Oxford Dept. of Physiology, Anatomy and Genetics Sherrington Building - Parks Road Oxford OX1 3PT - UK +44-1865-282012 http://jan.schnupp.net -------------- next part -------------- An HTML attachment was scrubbed... URL: From johannes.tuennerhoff at hotmail.com Mon Feb 1 11:33:26 2016 From: johannes.tuennerhoff at hotmail.com (Johannes Tuennerhoff) Date: Mon, 1 Feb 2016 11:33:26 +0100 Subject: [FieldTrip] between group statistics of coherence Message-ID: Dear Eric, dear other experts, We conduct a study that involves corticomuscular coherence analyses and I am still a bit new to the field. Even though I read several papers and searched the fieldtrip mailing list, I am still not sure how to do the statistical testing correctly. I read your message "coherence and group analysis" from April 21 2015 with great interest and I was hoping you could maybe give me some advice. There are two groups and each group has the same condition (a motor movement task). I have the coherence spectra for the range 5-55Hz (binned at 0.3Hz) of an EEG signal x and an EMG signal y in 24 healthy controls and 19 patients and I would like to test if there is a significant difference between the two groups. The coherence of the individual subjects was computed from around 120 segments of each 3s. Specifically I have the following questions: 1. Can I use the fieldtrip function ft_freqstatistics to calculate Monte-Carlo estimates of the significance probabilities and setting cfg.statistic = 'indepsamplesT' using the coherence spectra as data? Or would I need to do a manual z-transformation like z1=atanh(Coh)-1/(dof1-2) beforehand? If I understood it right cant use cfg.statistic = 'indepsamplesZcoh' because it is just meant for within subject designs. Would I need to take tapers and segments into account for the degrees of freedom? 2. Would I need to correct for multiple comparisons when I use a Monte-Carlo aproach? If I would like to, could I just use the cfg.correctm='bonferroni' or 'fdr' option in fieldtrip? 3. I think I saw other groups just using a parametric chi-square test, would you consider this aproach correct too? 4. Would it be valid to conduct a repeated measures ANOVA first with GROUP as between-subject effect and frequency bins as within-subject effect? 5. Could I use the parametric tests (3. and 4.) after a z-transformation? I will be very happy about any suggestions and opinions. Thank you very much. Best regards Johannes -------------- next part -------------- An HTML attachment was scrubbed... URL: From david.syloni at gmail.com Mon Feb 1 13:40:38 2016 From: david.syloni at gmail.com (David Syloni) Date: Mon, 1 Feb 2016 14:40:38 +0200 Subject: [FieldTrip] Circular Correlation coefficient Message-ID: Dear Fieldtripers, I'm trying to apply connectivity analysis with continuous EEG data. I'm using: cfg = []; cfg.method = 'mtmfft'; cfg.taper = 'dpss'; cfg.output = 'fourier'; cfg.tapsmofrq = 4; cfg.width=2; cfg.foilim = [0 250]; cfg.keeptrials = 'yes'; freq = ft_freqanalysis(cfg, data_no_artifacts); cfg = []; cfg.method = 'plv'; 'mtmfft' cfg.foilim = [8 12]; cfg.bandwidth=5; cfg.tapsmofrq = 4; cfg.keeptrials = 'yes'; cfg.output = 'powandcsd'; cfg.channelcmb = c; coh = ft_connectivityanalysis(cfg, freq); Right now I should calculate Circular Correlation and I'm stuck with it. I would very appreciate your help! Thanks in advance, David -------------- next part -------------- An HTML attachment was scrubbed... URL: From harold.cav89 at gmail.com Mon Feb 1 13:41:59 2016 From: harold.cav89 at gmail.com (Harold Cavendish) Date: Mon, 1 Feb 2016 13:41:59 +0100 Subject: [FieldTrip] ft_topoplotER(): reference to non-existent field 'topo' Message-ID: Dear FieldTrip users, I've been trying to use my manually created data structure containing averaged ERP from 28 subjects and 61 channels, each lasting 1075 time points as per these instructions: http://www.fieldtriptoolbox.org/faq/how_can_i_import_my_own_dataformat *data.mat:* label: {61x1 cell} fsample: 250 trial: {1x28 cell} columns: [61x1075 double] time: {1x28 cell} elec: [1x1 struct] chanpos: [61x3 double] elecpos: [61x3 double] label: {61x1 cell} unit: 'cm' avg: [61x1075 double] to construct ERP topoplots using ft_topoplotER() and whatever else will be needed for a timelocked analysis (I've already used the same data structure to do a permutation test with success). To do that, I've been following this tutorial: http://www.fieldtriptoolbox.org/tutorial/plotting#topoplot_functions > cfg = []; > cfg.xlim = [450 500] % arbitrary time interval > cfg.layout = 'M10.lay' % custom layout; the provided easycapM10.mat has different labels > ft_topoplotER(cfg, data) This, however, produced the following error: *Reference to non-existent field 'topo'.* *Error in ft_datatype_comp (line 92)* * if size(comp.topo,1)==size(comp.topo,2)* *Error in ft_checkdata (line 358)* * data = ft_datatype_comp(data);* *Error in topoplot_common (line 74)* *data = ft_checkdata(data, 'datatype', {'comp', 'timelock', 'freq'});* *Error in ft_topoplotER (line 192)* *cfg = topoplot_common(cfg, varargin{:});* Using common sense, I ‘fixed’ topoplot_common.m by changing the order of cell parameters at line 74 so that 'timelock' was before 'comp' and it worked – I can see no errors and the topoplots look okay. Could you please help me understand what's the issue? Although it works now, I would like to future-proof my data and make it all reproducible. I think it's trying to figure out whether my data is timelocked, in the frequency domain, or perhaps a composite, but it seems that the detection algorithm is either faulty (I haven't seen this ‘topo’ field in any example so far) or my data structure is missing something (I couldn't find another topoplot-ready EEG data among the tutorial files to compare them, unfortunately, and MEG files appear to be considerably different). Thank you! Best wishes, Harold -------------- next part -------------- An HTML attachment was scrubbed... URL: From andreas.wutz-1 at unitn.it Mon Feb 1 23:36:22 2016 From: andreas.wutz-1 at unitn.it (Andreas Gerhard Wutz) Date: Mon, 1 Feb 2016 17:36:22 -0500 Subject: [FieldTrip] importing data from blackrock Message-ID: Dear Fieldtrip community, I am trying to read in LFP data from a blackrock system. I started out with the sample code provided here: http://www.fieldtriptoolbox.org/getting_started/blackrock I use Windows 7 (64-bit), Matlab 2011b (32-bit), downloaded and installed the latest version of Fieldtrip (20160128) and of the NPMK toolbox. Unfortunately, I didn't come very far. Here is my code: filename = 'my_data.ns2'; data = ft_read_data(filename, 'headerformat', 'neuroshare'); Immediately exits with the following error message: "Invalid MEX-file" pointing to "fieldtrip/external/neuroshare/mexprog.dll": The specified procedure could not be found. Error in ns_SetLibrary (line 39) Error in read_neuroshare (line 82) Error in ft_read_header (line 2056) Error in ft_read_data (line 197) What options do I have to get this going? Thank you very much for your help. Best, Andreas -- Andreas Wutz, PhD Post-doctoral researcher Center for Mind/Brain Sciences (CiMeC) University of Trento Rovereto, Italy -------------- next part -------------- An HTML attachment was scrubbed... URL: From jan.schoffelen at donders.ru.nl Tue Feb 2 07:55:51 2016 From: jan.schoffelen at donders.ru.nl (Schoffelen, J.M. (Jan Mathijs)) Date: Tue, 2 Feb 2016 06:55:51 +0000 Subject: [FieldTrip] importing data from blackrock In-Reply-To: References: Message-ID: Hi Andreas, At this moment the code that uses the NPMK toolbox for fileio is not yet functional. I have started working on this a bit, but did not have time (and urgency) to complete this yet. The neuroshare code is based on very outdated (windows support only) mex-code, and it does not surprise me that it does not work for you. If you specify ‘headerformat’ and ‘dataformat’ to be ‘blackrock_nsx’ the code should take the correct turn, and end up at a portion of the m-file that is calling the NPMK functions. However, you will hit a keyboard statement right away, so you would need to provide some additional code, that is reformatting the output of the lower-level NPMK function into the shape that FieldTrip can work with. I think you could get some inspiration from the documentation about the support for different data formats as well as some examples from the various dataformats as implemented in ft_read_data. If you can provide me with some functional code, I will be happy to plug it into the release version of FieldTrip. I also suggest you to create an account on our bugzilla server: bugzilla.fieldtriptoolbox.org, and assign yourself to the CC-list of bug 2964. Any progress you make, code suggestions, as well as questions regarding to the implementation of this dataformat can be posted here. Since I don’t have dedicated time to work on this right now, the easiest way forward would be if you investigate a bit more yourself and come up with good suggestions. This will expedite the process greatly. Thanks, and best wishes, Jan-Mathijs On Feb 1, 2016, at 11:36 PM, Andreas Gerhard Wutz > wrote: Dear Fieldtrip community, I am trying to read in LFP data from a blackrock system. I started out with the sample code provided here: http://www.fieldtriptoolbox.org/getting_started/blackrock I use Windows 7 (64-bit), Matlab 2011b (32-bit), downloaded and installed the latest version of Fieldtrip (20160128) and of the NPMK toolbox. Unfortunately, I didn't come very far. Here is my code: filename = 'my_data.ns2'; data = ft_read_data(filename, 'headerformat', 'neuroshare'); Immediately exits with the following error message: "Invalid MEX-file" pointing to "fieldtrip/external/neuroshare/mexprog.dll": The specified procedure could not be found. Error in ns_SetLibrary (line 39) Error in read_neuroshare (line 82) Error in ft_read_header (line 2056) Error in ft_read_data (line 197) What options do I have to get this going? Thank you very much for your help. Best, Andreas -- Andreas Wutz, PhD Post-doctoral researcher Center for Mind/Brain Sciences (CiMeC) University of Trento Rovereto, Italy _______________________________________________ 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 julian.keil at gmail.com Tue Feb 2 08:57:10 2016 From: julian.keil at gmail.com (Julian Keil) Date: Tue, 2 Feb 2016 08:57:10 +0100 Subject: [FieldTrip] Circular Correlation coefficient In-Reply-To: References: Message-ID: Hi David, to compute circular statistics (e.g. phase correlations) you need to leave fieldtrip a bit. Here's the toolbox I usually use: http://www.mathworks.com/matlabcentral/fileexchange/10676-circular-statistics-toolbox--directional-statistics- As you don't describe why you need circular statistics, it's a bit hard to give a more helpful answer. Good luck, Julian Am 01.02.2016 um 13:40 schrieb David Syloni: > Dear Fieldtripers, > > I'm trying to apply connectivity analysis with continuous EEG data. > > I'm using: > > > > cfg = []; > cfg.method = 'mtmfft'; > cfg.taper = 'dpss'; > cfg.output = 'fourier'; > cfg.tapsmofrq = 4; > cfg.width=2; > cfg.foilim = [0 250]; > cfg.keeptrials = 'yes'; > freq = ft_freqanalysis(cfg, data_no_artifacts); > > > > > cfg = []; > cfg.method = 'plv'; > 'mtmfft' > cfg.foilim = [8 12]; > cfg.bandwidth=5; > cfg.tapsmofrq = 4; > cfg.keeptrials = 'yes'; > cfg.output = 'powandcsd'; > cfg.channelcmb = c; > coh = ft_connectivityanalysis(cfg, freq); > > Right now I should calculate Circular Correlation and I'm stuck with it. > > I would very appreciate your help! > > Thanks in advance, > > David > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -------------- 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 david.syloni at gmail.com Tue Feb 2 09:14:30 2016 From: david.syloni at gmail.com (David Syloni) Date: Tue, 2 Feb 2016 10:14:30 +0200 Subject: [FieldTrip] Circular Correlation coefficient In-Reply-To: References: Message-ID: Dear Julian, Thank you for the answer. I was asked by reviewers to calculate circular correlation instead of PLV. Sorry for too general description. Actually, I found the toolbox , but I don't understand how to compute " sample of angles in radians" (the input for the circ_corrcc function ). I would very appreciate a help to transform my fieldtrip data to the input format , required by circ_corrcc. Thanks! David On Tue, Feb 2, 2016 at 9:57 AM, Julian Keil wrote: > Hi David, > > to compute circular statistics (e.g. phase correlations) you need to leave > fieldtrip a bit. > Here's the toolbox I usually use: > http://www.mathworks.com/matlabcentral/fileexchange/10676-circular-statistics-toolbox--directional-statistics- > > As you don't describe why you need circular statistics, it's a bit hard to > give a more helpful answer. > > Good luck, > > Julian > > Am 01.02.2016 um 13:40 schrieb David Syloni: > > > Dear Fieldtripers, > > > > I'm trying to apply connectivity analysis with continuous EEG data. > > > > I'm using: > > > > > > > > cfg = []; > > cfg.method = 'mtmfft'; > > cfg.taper = 'dpss'; > > cfg.output = 'fourier'; > > cfg.tapsmofrq = 4; > > cfg.width=2; > > cfg.foilim = [0 250]; > > cfg.keeptrials = 'yes'; > > freq = ft_freqanalysis(cfg, data_no_artifacts); > > > > > > > > > > cfg = []; > > cfg.method = 'plv'; > > 'mtmfft' > > cfg.foilim = [8 12]; > > cfg.bandwidth=5; > > cfg.tapsmofrq = 4; > > cfg.keeptrials = 'yes'; > > cfg.output = 'powandcsd'; > > cfg.channelcmb = c; > > coh = ft_connectivityanalysis(cfg, freq); > > > > Right now I should calculate Circular Correlation and I'm stuck with it. > > > > I would very appreciate your help! > > > > Thanks in advance, > > > > David > > _______________________________________________ > > 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 julian.keil at gmail.com Tue Feb 2 12:51:37 2016 From: julian.keil at gmail.com (Julian Keil) Date: Tue, 2 Feb 2016 12:51:37 +0100 Subject: [FieldTrip] Circular Correlation coefficient In-Reply-To: References: Message-ID: Dear David, I won't discuss whether this is a sensible comment by the reviewer, but here are some basic steps that you could take. To compute the circular correlation between two signals, you obviously need to obtain the phase angles first. One option to do this is to use a Hilbert transform on band-pass filtered data (on a single-trial level) As soon as you have your single trial phase angles, you can compute the correlation between two signals within each subject. Once you have done this, you could see whether there is a consistent pattern over subjects. You can find similar approaches in the following papers: van Elswijk, G., Maij, F., Schoffelen, J.-M., Overeem, S., Stegeman, D. F., & Fries, P. (2010). Corticospinal Beta-Band Synchronization Entails Rhythmic Gain Modulation. Journal of Neuroscience, 30(12), 4481–4488. http://doi.org/10.1523/JNEUROSCI.2794-09.2010 Keil, J., Timm, J., SanMiguel, I., Schulz, H., Obleser, J., & Schonwiesner, M. (2014). Cortical brain states and corticospinal synchronization influence TMS-evoked motor potentials. Journal of Neurophysiology, 111(3), 513–519. http://doi.org/10.1152/jn.00387.2013 Good luck, Julian Am 02.02.2016 um 09:14 schrieb David Syloni: > Dear Julian, > > Thank you for the answer. I was asked by reviewers to calculate circular correlation instead of PLV. Sorry for too general description. > Actually, I found the toolbox , but I don't understand how to compute " sample of angles in radians" (the input for the circ_corrcc function ). > I would very appreciate a help to transform my fieldtrip data to the input format , required by circ_corrcc. > > Thanks! > > > David > > On Tue, Feb 2, 2016 at 9:57 AM, Julian Keil wrote: > Hi David, > > to compute circular statistics (e.g. phase correlations) you need to leave fieldtrip a bit. > Here's the toolbox I usually use: http://www.mathworks.com/matlabcentral/fileexchange/10676-circular-statistics-toolbox--directional-statistics- > > As you don't describe why you need circular statistics, it's a bit hard to give a more helpful answer. > > Good luck, > > Julian > > Am 01.02.2016 um 13:40 schrieb David Syloni: > > > Dear Fieldtripers, > > > > I'm trying to apply connectivity analysis with continuous EEG data. > > > > I'm using: > > > > > > > > cfg = []; > > cfg.method = 'mtmfft'; > > cfg.taper = 'dpss'; > > cfg.output = 'fourier'; > > cfg.tapsmofrq = 4; > > cfg.width=2; > > cfg.foilim = [0 250]; > > cfg.keeptrials = 'yes'; > > freq = ft_freqanalysis(cfg, data_no_artifacts); > > > > > > > > > > cfg = []; > > cfg.method = 'plv'; > > 'mtmfft' > > cfg.foilim = [8 12]; > > cfg.bandwidth=5; > > cfg.tapsmofrq = 4; > > cfg.keeptrials = 'yes'; > > cfg.output = 'powandcsd'; > > cfg.channelcmb = c; > > coh = ft_connectivityanalysis(cfg, freq); > > > > Right now I should calculate Circular Correlation and I'm stuck with it. > > > > I would very appreciate your help! > > > > Thanks in advance, > > > > David > > _______________________________________________ > > 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: -------------- 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 alik.widge at gmail.com Tue Feb 2 15:59:56 2016 From: alik.widge at gmail.com (Alik Widge) Date: Tue, 2 Feb 2016 09:59:56 -0500 Subject: [FieldTrip] Power calculations for cluster-corrected stats? In-Reply-To: References: Message-ID: Dear all, We're working on a plan for a new study in which we plan to be analyzing EEG in sensor space, taking the Maris/Oostenveld cluster correction approach since we do not have a clear sense of where our spectral perturbations will be. Here's the question: has anyone seen a paper talking about how to do a priori power analysis for this approach? The only thing I can think to do is guess at an effect size based on similar studies, then simulate out various sample sizes and trial counts by adding a simulated signal to some existing EEG dataset. The problem I'm seeing is that exploring the (nsubject,ntrials) space in that stimulation approach is going to take quite a while, since it's multiple instances of an at least 200+ permutation at every possible sample size combination. More so if I want to explore the consequences of bad assumptions about effect size. Anyone know of a more elegant approach? Our literature searches have not been fruitful. -------------- next part -------------- An HTML attachment was scrubbed... URL: From son.ta.dinh at tum.de Tue Feb 2 16:51:17 2016 From: son.ta.dinh at tum.de (Ta Dinh, Son) Date: Tue, 2 Feb 2016 15:51:17 +0000 Subject: [FieldTrip] Axes shift using ft_multiplotER Message-ID: <6ddf332554784a02a77315c36fcd66f5@BADWLRZ-SW13MB3.ads.mwn.de> Dear FieldTrip community, My name is Son Ta Dinh and I am working in the Painlab group of Markus Ploner in Munich on EEG resting state in chronic pain conditions. I have recently started using FieldTrip and am currently trying to use ft_multiplotER to create an overview of the power spectra of all the electrodes in specific frequency bands. In principle, this works without a problem. However, I have noticed that the axes of the plot are shifted so that the origin is always included in the plot, even when my data does not include the low frequencies around 0. This creates weird overlaps as can be seen in the attached figure or the picture below. Is this intended or am I missing some setting to get the right plots? My cfg consists only of the path to the layout-file, cfg.showlabels = 'yes' and cfg.showoutline = 'yes' My data looks like this: Data.label: {65x1 cell} Data.dimord: 'chan_freq' Data.freq: [1x61 double] Data.powspctrm: [65x61 double] Data.cfg: [1x1 struct] Unexpectedly, when I change the hlim to e.g. [40 60] instead of the [40 100] that is shown in the figure below, the shift becomes even more pronounced. When using ft_singleplotER though, the axes are shown correctly, without any shifts in x- nor y-direction. As a workaround, I have tried setting cfg.axes = 'no' and cfg.box = 'yes', which fits the plots into a box and works better, though not optimally as the labels are partially covered. I would be grateful if anybody could point out any mistakes in my usage of ft_multiplotER or offer better alternatives/workarounds. Best regards, Son Son Ta Dinh, M.Sc. PhD student in Human Pain Research Klinikum rechts der Isar Technische Universität München Munich, Germany Phone: +49 89 4140 7664 http://www.painlabmunich.de/ [cid:image002.jpg at 01D15DD9.EC4E83F0] -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image002.jpg Type: image/jpeg Size: 41698 bytes Desc: image002.jpg URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: testplot_multiplotER.png Type: image/png Size: 74873 bytes Desc: testplot_multiplotER.png URL: From david.syloni at gmail.com Tue Feb 2 17:04:52 2016 From: david.syloni at gmail.com (David Syloni) Date: Tue, 2 Feb 2016 18:04:52 +0200 Subject: [FieldTrip] Circular Correlation coefficient In-Reply-To: References: Message-ID: Dear Julian, Thank you for the answer. I will try to apply it as you described. However, it's important to note, that my data doesn't contain real trials, this is a EEG during one continuous stimulus (110 sec). Can your approach work also for this case? Thanks, David On Tue, Feb 2, 2016 at 1:51 PM, Julian Keil wrote: > Dear David, > > I won't discuss whether this is a sensible comment by the reviewer, but > here are some basic steps that you could take. > > To compute the circular correlation between two signals, you obviously > need to obtain the phase angles first. > One option to do this is to use a Hilbert transform on band-pass filtered > data (on a single-trial level) > As soon as you have your single trial phase angles, you can compute the > correlation between two signals within each subject. > Once you have done this, you could see whether there is a consistent > pattern over subjects. > > You can find similar approaches in the following papers: > > van Elswijk, G., Maij, F., Schoffelen, J.-M., Overeem, S., Stegeman, D. > F., & Fries, P. (2010). Corticospinal Beta-Band Synchronization Entails > Rhythmic Gain Modulation. Journal of Neuroscience, 30(12), 4481–4488. > http://doi.org/10.1523/JNEUROSCI.2794-09.2010 > > Keil, J., Timm, J., SanMiguel, I., Schulz, H., Obleser, J., & > Schonwiesner, M. (2014). Cortical brain states and corticospinal > synchronization influence TMS-evoked motor potentials. Journal of > Neurophysiology, 111(3), 513–519. http://doi.org/10.1152/jn.00387.2013 > > Good luck, > > Julian > > Am 02.02.2016 um 09:14 schrieb David Syloni: > > Dear Julian, > > Thank you for the answer. I was asked by reviewers to calculate circular > correlation instead of PLV. Sorry for too general description. > Actually, I found the toolbox , but I don't understand how to compute > " sample of angles in radians" (the input for the circ_corrcc function ). > I would very appreciate a help to transform my fieldtrip data to the input > format , required by circ_corrcc. > > Thanks! > > > David > > On Tue, Feb 2, 2016 at 9:57 AM, Julian Keil wrote: > >> Hi David, >> >> to compute circular statistics (e.g. phase correlations) you need to >> leave fieldtrip a bit. >> Here's the toolbox I usually use: >> http://www.mathworks.com/matlabcentral/fileexchange/10676-circular-statistics-toolbox--directional-statistics- >> >> As you don't describe why you need circular statistics, it's a bit hard >> to give a more helpful answer. >> >> Good luck, >> >> Julian >> >> Am 01.02.2016 um 13:40 schrieb David Syloni: >> >> > Dear Fieldtripers, >> > >> > I'm trying to apply connectivity analysis with continuous EEG data. >> > >> > I'm using: >> > >> > >> > >> > cfg = []; >> > cfg.method = 'mtmfft'; >> > cfg.taper = 'dpss'; >> > cfg.output = 'fourier'; >> > cfg.tapsmofrq = 4; >> > cfg.width=2; >> > cfg.foilim = [0 250]; >> > cfg.keeptrials = 'yes'; >> > freq = ft_freqanalysis(cfg, data_no_artifacts); >> > >> > >> > >> > >> > cfg = []; >> > cfg.method = 'plv'; >> > 'mtmfft' >> > cfg.foilim = [8 12]; >> > cfg.bandwidth=5; >> > cfg.tapsmofrq = 4; >> > cfg.keeptrials = 'yes'; >> > cfg.output = 'powandcsd'; >> > cfg.channelcmb = c; >> > coh = ft_connectivityanalysis(cfg, freq); >> > >> > Right now I should calculate Circular Correlation and I'm stuck with >> it. >> > >> > I would very appreciate your help! >> > >> > Thanks in advance, >> > >> > David >> > _______________________________________________ >> > 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 > > > > _______________________________________________ > 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 andrembastos at gmail.com Tue Feb 2 18:17:58 2016 From: andrembastos at gmail.com (=?UTF-8?Q?Andr=C3=A9_Bastos?=) Date: Tue, 2 Feb 2016 12:17:58 -0500 Subject: [FieldTrip] importing data from blackrock In-Reply-To: References: Message-ID: Hey JM, I just handed Andreas some code to read in the data to MATLAB using the openNSx.m (for importing continuous raw data) and openNEV (for spikes and event codes), and then a Fieldtrip data structure can be created by hand relative to events of interest or for the whole length of the session. I know this is probably not the ideal solution from a FT development point of view, but it's working for us which means also limited urgency to change. I would be able to eventually work towards a more aesthetically pleasing solution, especially if Andreas can help! Cheers, Andre On Tue, Feb 2, 2016 at 1:55 AM, Schoffelen, J.M. (Jan Mathijs) < jan.schoffelen at donders.ru.nl> wrote: > Hi Andreas, > > At this moment the code that uses the NPMK toolbox for fileio is not yet > functional. I have started working on this a bit, but did not have time > (and urgency) to complete this yet. > The neuroshare code is based on very outdated (windows support only) > mex-code, and it does not surprise me that it does not work for you. > > If you specify ‘headerformat’ and ‘dataformat’ to be ‘blackrock_nsx’ the > code should take the correct turn, and end up at a portion of the m-file > that is calling the NPMK functions. > However, you will hit a keyboard statement right away, so you would need > to provide some additional code, that is reformatting the output of the > lower-level NPMK function into the shape that FieldTrip can work with. I > think you could get some inspiration from the documentation about the > support for different data formats as well as some examples from the > various dataformats as implemented in ft_read_data. If you can provide me > with some functional code, I will be happy to plug it into the release > version of FieldTrip. I also suggest you to create an account on our > bugzilla server: bugzilla.fieldtriptoolbox.org, and assign yourself to > the CC-list of bug 2964. Any progress you make, code suggestions, as well > as questions regarding to the implementation of this dataformat can be > posted here. > > Since I don’t have dedicated time to work on this right now, the easiest > way forward would be if you investigate a bit more yourself and come up > with good suggestions. This will expedite the process greatly. > > Thanks, and best wishes, > > Jan-Mathijs > > > > On Feb 1, 2016, at 11:36 PM, Andreas Gerhard Wutz > wrote: > > Dear Fieldtrip community, > > I am trying to read in LFP data from a blackrock system. I started out > with the sample code provided here: > http://www.fieldtriptoolbox.org/getting_started/blackrock > > I use Windows 7 (64-bit), Matlab 2011b (32-bit), downloaded and installed > the latest version of Fieldtrip (20160128) and of the NPMK toolbox. > > Unfortunately, I didn't come very far. > Here is my code: > > filename = 'my_data.ns2'; > data = ft_read_data(filename, 'headerformat', 'neuroshare'); > > Immediately exits with the following error message: > "Invalid MEX-file" pointing to > "fieldtrip/external/neuroshare/mexprog.dll": The specified procedure could > not be found. > > Error in ns_SetLibrary (line 39) > Error in read_neuroshare (line 82) > Error in ft_read_header (line 2056) > Error in ft_read_data (line 197) > > What options do I have to get this going? > Thank you very much for your help. > Best, > Andreas > > > > > > > > -- > Andreas Wutz, PhD > Post-doctoral researcher > Center for Mind/Brain Sciences (CiMeC) > University of Trento > Rovereto, Italy > _______________________________________________ > 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 Wed Feb 3 08:57:46 2016 From: jan.schoffelen at donders.ru.nl (Schoffelen, J.M. (Jan Mathijs)) Date: Wed, 3 Feb 2016 07:57:46 +0000 Subject: [FieldTrip] importing data from blackrock In-Reply-To: References: Message-ID: Hi Andre, Thanks for thinking along and this contribution. I am aware of these functions, and these are essentially already built into fieldtrip, although not fully functional yet. Have a look at ft_read_data and ft_read_header, and search for ‘blackrock’. It’s just the internal data bookkeeping that needs to be sorted out, as well as some potential data scaling issues. If you have some insights in this regard, please do sign up for bug 2964 and chime in. Cheers, JM On Feb 2, 2016, at 6:17 PM, André Bastos > wrote: Hey JM, I just handed Andreas some code to read in the data to MATLAB using the openNSx.m (for importing continuous raw data) and openNEV (for spikes and event codes), and then a Fieldtrip data structure can be created by hand relative to events of interest or for the whole length of the session. I know this is probably not the ideal solution from a FT development point of view, but it's working for us which means also limited urgency to change. I would be able to eventually work towards a more aesthetically pleasing solution, especially if Andreas can help! Cheers, Andre On Tue, Feb 2, 2016 at 1:55 AM, Schoffelen, J.M. (Jan Mathijs) > wrote: Hi Andreas, At this moment the code that uses the NPMK toolbox for fileio is not yet functional. I have started working on this a bit, but did not have time (and urgency) to complete this yet. The neuroshare code is based on very outdated (windows support only) mex-code, and it does not surprise me that it does not work for you. If you specify ‘headerformat’ and ‘dataformat’ to be ‘blackrock_nsx’ the code should take the correct turn, and end up at a portion of the m-file that is calling the NPMK functions. However, you will hit a keyboard statement right away, so you would need to provide some additional code, that is reformatting the output of the lower-level NPMK function into the shape that FieldTrip can work with. I think you could get some inspiration from the documentation about the support for different data formats as well as some examples from the various dataformats as implemented in ft_read_data. If you can provide me with some functional code, I will be happy to plug it into the release version of FieldTrip. I also suggest you to create an account on our bugzilla server: bugzilla.fieldtriptoolbox.org, and assign yourself to the CC-list of bug 2964. Any progress you make, code suggestions, as well as questions regarding to the implementation of this dataformat can be posted here. Since I don’t have dedicated time to work on this right now, the easiest way forward would be if you investigate a bit more yourself and come up with good suggestions. This will expedite the process greatly. Thanks, and best wishes, Jan-Mathijs On Feb 1, 2016, at 11:36 PM, Andreas Gerhard Wutz > wrote: Dear Fieldtrip community, I am trying to read in LFP data from a blackrock system. I started out with the sample code provided here: http://www.fieldtriptoolbox.org/getting_started/blackrock I use Windows 7 (64-bit), Matlab 2011b (32-bit), downloaded and installed the latest version of Fieldtrip (20160128) and of the NPMK toolbox. Unfortunately, I didn't come very far. Here is my code: filename = 'my_data.ns2'; data = ft_read_data(filename, 'headerformat', 'neuroshare'); Immediately exits with the following error message: "Invalid MEX-file" pointing to "fieldtrip/external/neuroshare/mexprog.dll": The specified procedure could not be found. Error in ns_SetLibrary (line 39) Error in read_neuroshare (line 82) Error in ft_read_header (line 2056) Error in ft_read_data (line 197) What options do I have to get this going? Thank you very much for your help. Best, Andreas -- Andreas Wutz, PhD Post-doctoral researcher Center for Mind/Brain Sciences (CiMeC) University of Trento Rovereto, Italy _______________________________________________ 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 Harald.Bornfleth at besa.de Wed Feb 3 11:21:21 2016 From: Harald.Bornfleth at besa.de (Harald Bornfleth) Date: Wed, 3 Feb 2016 11:21:21 +0100 Subject: [FieldTrip] Comparing ICA methods between toolboxes (BESA vs. Fieldtrip) In-Reply-To: References: <1f8be01d14f99$8f379470$ada6bd50$@besa.de> Message-ID: <008c01d15e6c$a0ac4b60$e204e220$@besa.de> Hi Andrew, We discussed this dataset, and we believe that the component which you selected (ICA #22) is most likely a muscle artifact. The ICA components are sorted according to their variance, so the component #22 is one with very little variance. The question is whether you actually need to correct for this artifact. You may find it on only one or few electrodes – may be worth checking. If that is the case, you might consider setting the electrode to bad. The extended Infomax ICA method is not optimized for correcting muscle artifacts. It lends itself more to the correction of eye movements or cardiac artifacts. In the ICA decomposition that you sent, component #1 looks like an eye movement. Components #17 and #19 look like they have mains frequency on them. You can get rid of this by using the notch filter. Hope this helps. Best regards, Harald From: c.andrew123 at gmail.com [mailto:c.andrew123 at gmail.com] On Behalf Of Andrew Chang Sent: 29 January 2016 04:26 To: Harald.Bornfleth at besa.de Cc: FieldTrip discussion list ; Ille Nicole Subject: Re: [FieldTrip] Comparing ICA methods between toolboxes (BESA vs. Fieldtrip) Hi Harald, I did the ICA based on the continuos recorded block (~7 minutes), including 100 trials, with PCA option on. The attached file is the ICA topography and waveform (ICA 22). The spectrum showed that the peak power was at ~11Hz. I suspected it is a neck movement artifact, because the generator seems to be in the front of the neck. Also, I got another similar ICA component from another subject, and the topography seems to be centered at the back of the neck, would it be considered as neck movement too. Thank you very much once again! Best, Andrew On Mon, Jan 18, 2016 at 7:49 AM, Harald Bornfleth > wrote: Dear Andrew, A couple of questions popped up. 1) The neck movement artifact, is this something with low frequency, or is it a muscle artifact? 2) Did you calculate the ICA on one data screen (e.g. 10 seconds or 20 seconds), or over the whole data set? If you could send us screen shots showing the ICA wave forms and the accompanying topographies, then we could comment on the classification. (In BESA, you right-click on the label of a component and select “Map topography” to show the topography map of that component.) I include my colleague and ICA expert Nicole Ille on CC. Best regards, Harald From: c.andrew123 at gmail.com [mailto:c.andrew123 at gmail.com ] On Behalf Of Andrew Chang Sent: 17 January 2016 19:57 To: Harald.Bornfleth at besa.de ; FieldTrip discussion list > Subject: Re: [FieldTrip] Comparing ICA methods between toolboxes (BESA vs. Fieldtrip) Hi Dr. Bornfleth, Thanks for your reply very much. I would like to use ICA to remove eye blinks and eye movements, neck movements, as well as cardiac and powerline artifacts. The segment I have is a continuous EEG recording for 10 minutes, which is one block of my experiment including many trials. Before ICA, the segment have been high-pass (0.3 Hz) and low-pass (100 Hz). The components showing activities around the eyes, the back of the neck, and 60 Hz were removed. As for the cardiac artifact, I it is based on visual inspection on the waveform to see whether it looks like an EKG. Any further comments are appreciated! Best, Andrew On Fri, Jan 15, 2016 at 8:35 AM, Harald Bornfleth > wrote: Dear Andrew, Thanks for bringing this up. I can try to shed some light on the ICA method used in BESA Research; however, I can not comment on the implementation in FieldTrip. The method behind ICA analysis in BESA Research is the extended infomax ICA algorithm (Lee TW et al.: Independent component analysis using an extended infomax algorithm for mixed sub-Gaussian and super-Gaussian sources. Neural Computation 11(2), 1999, 409-433). This algorithm is very well suited to remove cardiac and powerline artifacts. Depending on the data, it may also be used to remove ocular (blink) and electrode artifacts. To assess whether your artifact removal is trustworthy more information about your processing steps are needed. What types of artifacts are you trying to correct? What segments are you using to determine the artifact topographies and what segments are you finally correcting? Best regards, Harald Dr. Harald Bornfleth Product Manager BESA Research BESA GmbH Freihamer Strasse 18 82166 Graefelfing/Germany http://www.besa.de E: Harald.Bornfleth at besa.de T: +49 89 8980 9968 HRB Munich 109956 CEO: Dr. Tobias Scherg, CFO: Theodor Scherg Director of Research: Dr. Michael Scherg From: fieldtrip-bounces at science.ru.nl [mailto:fieldtrip-bounces at science.ru.nl] On Behalf Of Andrew Chang Sent: Sonntag, 10. Januar 2016 21:18 To: fieldtrip at science.ru.nl Subject: [FieldTrip] Comparing ICA methods between toolboxes (BESA vs. Fieldtrip) Dear Fieldtrip users, I am wondering whether anyone has compared the performances of the ICA methods among M/EEG toolboxes. Especially, how is the performance of ICA in BESA Research 6.0, compared to Fieldtrip? I have an EEG data set which has been processed in BESA, including removing artifact using ICA. I am wondering whether I can trust it, or I should reprocess it in Fieldtrip. Any comments will be appreciated! Happy new year! Best, Andrew -- Andrew Chang Ph.D. Candidate Auditory Development Lab Department of Psychology, Neuroscience & Behaviour McMaster University http://changa5.wordpress.com/ _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -- Andrew Chang Ph.D. Candidate Auditory Development Lab Department of Psychology, Neuroscience & Behaviour McMaster University http://changa5.wordpress.com/ -- Andrew Chang Ph.D. Candidate Auditory Development Lab Department of Psychology, Neuroscience & Behaviour McMaster University http://changa5.wordpress.com/ -------------- next part -------------- An HTML attachment was scrubbed... URL: From K.Kalogianni at tudelft.nl Wed Feb 3 15:00:33 2016 From: K.Kalogianni at tudelft.nl (Konstantina Kalogianni) Date: Wed, 3 Feb 2016 14:00:33 +0000 Subject: [FieldTrip] MUSIC small bug and fail in retrieving simulation data location Message-ID: <4DF682D3A10EAC46B462A46E16F0B0493F90BF10@SRV364.tudelft.net> Dear fieldtrippers, I am doing a sanity check on the implementation of the MUSIC algorithm in fieldtrip, before applying it in real data. So after creating simulation data with sinusoids at a specific location and adding relative noise of 1.5, I am doing a music scan with the number of components as 1. The code for that is below (I used filedtrip version fieldtrip-20160101): %% leadfield should be generated for specific EEG signal addpath([ft_path,'fileio\']); addpath ([ft_path,'template\electrode\']); addpath ([ft_path,'template\headmodel\']); %% LOAD VOL ELEC MRI % load electrode locations elec=ft_read_sens('standard_1020.elc'); % load mri & vol (template) load('standard_mri.mat'); %units in mm load('standard_bem'); %% adjust electrode locations for 62 channels eeg elec.label=upper(elec.label); load([gendir 'label_62.mat'], 'label_62'); EEG.label=label_62; label_signal=upper(EEG.label); EEG.label=upper(EEG.label); elec2find=zeros(length(label_signal),1); for i=1:length(label_signal); elec2find(i,1)=find(strcmp(label_signal(i),elec.label)); end % elec with 62 locations based on SEP signal elec.chanpos=elec.chanpos((elec2find), :); elec.elecpos=elec.elecpos((elec2find), :); elec.label=elec.label((elec2find)); elec.label=upper(elec.label); % align elecs on vol if needed cfg = []; cfg.method = 'interactive'; cfg.elec = elec; cfg.headshape = vol.bnd(1); elec_aligned = ft_electroderealign(cfg); %% compute leadfield cfg = []; cfg.elec =elec_aligned; cfg.channel = EEG.label;% or common_channels_; cfg.reducerank = 3; cfg.headmodel = vol; % volume conduction headmodel cfg.normalize = 'yes'; cfg.grid.unit = 'mm'; cfg.grid.resolution = 5; leadfield = ft_prepare_leadfield(cfg, EEG); %% simulate EEG data, dipole in specific location loc1=[-30, -11, 65 ]; cfg = []; cfg.headmodel = vol ; cfg.elec = elec_aligned; cfg.fsample = 1024; % Hz cfg.dip.amplitude=[1]; cfg.dip.phase=[1]; cfg.dip.pos(1,:) = loc1; cfg.dip.mom(:,1) = [1 0 0]'; cfg.ntrials=500; cfg.triallength= 0.250; cfg.fsample=1024; cfg.relnoise = 1.5; epoch = ft_dipolesimulation(cfg); %% compute averaged dataset with covariance matrix cfg=[]; % cfg.covariance='yes'; avg = ft_timelockanalysis(cfg, epoch); %% cfg = []; cfg.method = 'music'; cfg.grid = load([gendir 'leadfield_templ.mat']); % leadfield, which has the grid information cfg.headmodel = load([gendir 'vol_temp.mat']);% volume conduction model (headmodel) cfg.elec = load([gendir 'elec_temp.mat']); cfg.channel = avg.label; cfg.music.numcomponent= 1; source_music = ft_sourceanalysis(cfg, avg); %% pos_max = zeros(1,3); [~,k]=max(source.avg.jr); [~,l]=min(source.avg.jr); music_max = source.pos(k, :); music_min = source.pos(l, :); First of all the code in music.m will only work if you change line 77 and 78 with the following lines: % select only the dipole positions inside the brain for scanning dip.inside = find(dip.inside==1); dip.pos = dip.pos(dip.inside,:); and line 103 with this lf = dip.leadfield{dip.inside(i)}; Otherwise it was not possible since the lf contained both the points inside and outside the brain But even after changing those lines both the minimum and the maximum of the music metric are not the original location. Original location was [-30, -11, 65 ] and minimum music metric gives [-55, -15, 58] while maximum music metric gives [50, -20, 8]. The same location repeats with both using the covariance matrix as an input in music or not and also by changing the relative noise to 0.5 instead of 1.5. Does someone run into the same type of problems with music? Thanks in advance for your help. K. (Nadia) Kalogianni PhD candidate TU Delft /Department of Biomechanical Engneering Neuromuscular Control Laboratory Mekelweg 2 2628 CD Delft Room: F-1-320 T +31 15-27 84230 E k.kalogianni at tudelft.nl -------------- next part -------------- An HTML attachment was scrubbed... URL: From david.syloni at gmail.com Wed Feb 3 17:25:21 2016 From: david.syloni at gmail.com (David Syloni) Date: Wed, 3 Feb 2016 18:25:21 +0200 Subject: [FieldTrip] Circular Correlation coefficient In-Reply-To: References: Message-ID: Dear Julian, To calculate Hilbert transform I created 0.5 sec "trials" from the data. and used hibert_t1 = ft_preproc_hilbert( cell2mat(data_no_artifacts.trial(1)), 'angle') Is it right? Thanks, David On Tue, Feb 2, 2016 at 6:04 PM, David Syloni wrote: > Dear Julian, > > Thank you for the answer. I will try to apply it as you described. > However, it's important to note, that my data doesn't contain real trials, > this is a EEG during one continuous stimulus (110 sec). > Can your approach work also for this case? > > > Thanks, > > > David > > On Tue, Feb 2, 2016 at 1:51 PM, Julian Keil wrote: > >> Dear David, >> >> I won't discuss whether this is a sensible comment by the reviewer, but >> here are some basic steps that you could take. >> >> To compute the circular correlation between two signals, you obviously >> need to obtain the phase angles first. >> One option to do this is to use a Hilbert transform on band-pass filtered >> data (on a single-trial level) >> As soon as you have your single trial phase angles, you can compute the >> correlation between two signals within each subject. >> Once you have done this, you could see whether there is a consistent >> pattern over subjects. >> >> You can find similar approaches in the following papers: >> >> van Elswijk, G., Maij, F., Schoffelen, J.-M., Overeem, S., Stegeman, D. >> F., & Fries, P. (2010). Corticospinal Beta-Band Synchronization Entails >> Rhythmic Gain Modulation. Journal of Neuroscience, 30(12), 4481–4488. >> http://doi.org/10.1523/JNEUROSCI.2794-09.2010 >> >> Keil, J., Timm, J., SanMiguel, I., Schulz, H., Obleser, J., & >> Schonwiesner, M. (2014). Cortical brain states and corticospinal >> synchronization influence TMS-evoked motor potentials. Journal of >> Neurophysiology, 111(3), 513–519. http://doi.org/10.1152/jn.00387.2013 >> >> Good luck, >> >> Julian >> >> Am 02.02.2016 um 09:14 schrieb David Syloni: >> >> Dear Julian, >> >> Thank you for the answer. I was asked by reviewers to calculate circular >> correlation instead of PLV. Sorry for too general description. >> Actually, I found the toolbox , but I don't understand how to compute >> " sample of angles in radians" (the input for the circ_corrcc function >> ). >> I would very appreciate a help to transform my fieldtrip data to the >> input format , required by circ_corrcc. >> >> Thanks! >> >> >> David >> >> On Tue, Feb 2, 2016 at 9:57 AM, Julian Keil >> wrote: >> >>> Hi David, >>> >>> to compute circular statistics (e.g. phase correlations) you need to >>> leave fieldtrip a bit. >>> Here's the toolbox I usually use: >>> http://www.mathworks.com/matlabcentral/fileexchange/10676-circular-statistics-toolbox--directional-statistics- >>> >>> As you don't describe why you need circular statistics, it's a bit hard >>> to give a more helpful answer. >>> >>> Good luck, >>> >>> Julian >>> >>> Am 01.02.2016 um 13:40 schrieb David Syloni: >>> >>> > Dear Fieldtripers, >>> > >>> > I'm trying to apply connectivity analysis with continuous EEG data. >>> > >>> > I'm using: >>> > >>> > >>> > >>> > cfg = []; >>> > cfg.method = 'mtmfft'; >>> > cfg.taper = 'dpss'; >>> > cfg.output = 'fourier'; >>> > cfg.tapsmofrq = 4; >>> > cfg.width=2; >>> > cfg.foilim = [0 250]; >>> > cfg.keeptrials = 'yes'; >>> > freq = ft_freqanalysis(cfg, data_no_artifacts); >>> > >>> > >>> > >>> > >>> > cfg = []; >>> > cfg.method = 'plv'; >>> > 'mtmfft' >>> > cfg.foilim = [8 12]; >>> > cfg.bandwidth=5; >>> > cfg.tapsmofrq = 4; >>> > cfg.keeptrials = 'yes'; >>> > cfg.output = 'powandcsd'; >>> > cfg.channelcmb = c; >>> > coh = ft_connectivityanalysis(cfg, freq); >>> > >>> > Right now I should calculate Circular Correlation and I'm stuck with >>> it. >>> > >>> > I would very appreciate your help! >>> > >>> > Thanks in advance, >>> > >>> > David >>> > _______________________________________________ >>> > 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 >> >> >> >> _______________________________________________ >> 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 singhkd at cardiff.ac.uk Wed Feb 3 17:36:09 2016 From: singhkd at cardiff.ac.uk (Krish Singh) Date: Wed, 3 Feb 2016 16:36:09 +0000 Subject: [FieldTrip] MEG and DCM/Graph theory Postdoc-Job Opportunities at CUBRIC, School of Psychology, Cardiff University, UK Message-ID: Dear All, As part of the expansion of the CUBRIC (http://sites.cardiff.ac.uk/cubric/) brain imaging facility at Cardiff University, UK, we are hiring postdoctoral researchers at either Associate or Fellow level and two of the posts would suit people working in the MEG and/or network analysis related field. All of the available posts are listed here: http://sites.cardiff.ac.uk/cubric/work-with-us/research-associatefellowship-posts/ ​The MEG and DCM/GRAPH theory posts are part of a large Wellcome Trust Strategic Award. Full details of the posts and how to apply are here: http://krb-sjobs.brassring.com/TGWEbHost/jobdetails.aspx?partnerid=30011&siteid=5460&AReq=4342BR http://krb-sjobs.brassring.com/TGWEbHost/jobdetails.aspx?partnerid=30011&siteid=5460&AReq=4343BR For informal enquiries, please get in touch with me if you are interested in the above two posts. Note that we’re looking for people with a significant track-record, evidenced by good relevant peer-reviewed publications. The two posts must start before July 2016, are for 5-years and may be appointed up to senior UK Grade 7 level. Many thanks, Krish -- Prof. Krish Singh CUBRIC School of Psychology / Ysgol Seicoleg Cardiff University / Prifysgol Caerdydd Park Place / Plas y Parc Cardiff / Caerdydd CF10 3AT, UK Tel / Ffôn: 02920 874690 / 870365 Fax / Ffacs: 02920 870339 Email / Ebost : singhkd at cardiff.ac.uk -------------- next part -------------- An HTML attachment was scrubbed... URL: From hibafouani123 at hotmail.com Wed Feb 3 23:44:33 2016 From: hibafouani123 at hotmail.com (hiba fouani) Date: Wed, 3 Feb 2016 22:44:33 +0000 Subject: [FieldTrip] =?cp1256?q?Few_Dipoles=FE?= Message-ID: Dear all, I have a question about the method that deal with few number of dipoles like dipole fitting for example , what the meaning of few in this case? can I work with 200 dipoles? Another question I have about the signal resulted from the forward problem when I multiply the leadfield with simulated electrical potential (with dimension M X N where M is the number of points and N is the number of sample time) does this signal of electrode required normalization or any type of treatment before I put it in the function of inverse problem? All the best Hiba -------------- next part -------------- An HTML attachment was scrubbed... URL: From tigoum at naver.com Thu Feb 4 03:20:40 2016 From: tigoum at naver.com (=?UTF-8?B?7JWI66+87Z2s?=) Date: Thu, 4 Feb 2016 11:20:40 +0900 (KST) Subject: [FieldTrip] =?utf-8?q?importing_method_for_ft=5Fcrossfrequency=28?= =?utf-8?q?=29_using_our_customized_data_format?= In-Reply-To: <3271eadad0ee1c551231243cb4f0e5@cweb14.nm.nhnsystem.com> References: <3271eadad0ee1c551231243cb4f0e5@cweb14.nm.nhnsystem.com> Message-ID: <7e6fbf1ad2395f79d996b25a72f7c2f@cweb10.nm.nhnsystem.com> Dear community, My name is Ahn Min-Hee and I am working in the mindbrain lab in korea university, south koera on invasive BMI. Currently I am analyzing EEG data of our lab project, where we processed using our time-frequency analysis method on matlab. It's sourcing from Brain Vision Recorder. I tried using ft_crossfrequency() to assess time-frequency aspects of our data. First, I tried importing our own data that formed 3D type by frequency x time x channel, but I don't know how it convert the fieldtrip style data structure. Specially, about converting epoch dimension & constructing trial struct... So, I tried additional work as initiation. I import raw data such as *.eeg from Brain Vision Recorder. I work following: >> cfg = [] ; >> cfg.dataset='SSVEP_NEW_su0001.eeg'; >> cfg.trialdef.eventtype='?'; >> [cfg] = ft_definetrial(cfg); Warning: no trialfun was specified, using ft_trialfun_general > In ft_definetrial (line 135) evaluating trialfunction 'ft_trialfun_general' reading the events from 'SSVEP_NEW_su0001.vhdr' the following events were found in the datafile event type: 'Comment' with event values: 'actiCAP Data On' event type: 'New Segment' with event values: event type: 'Stimulus' with event values: 'S 11' 'S 12' 'S 13' 'S 14' 'S 15' 'S 16' 'S 21' 'S 22' 'S 23' 'S 24' 'S 25' 'S 26' 'S 28' 'S111' 'S112' 'S113' 'S114' 'S115' 'S116' 'S121' 'S122' 'S123' 'S124' 'S125' 'S126' 'S127' no trials have been defined yet, see FT_DEFINETRIAL for further help found 943 events created 0 trials the call to "ft_definetrial" took 0 seconds and required the additional allocation of an estimated 0 MB Then... I don't know that its result is correct or not... also, how treat warning & why resulting trial to 0. ----- So, I summarize my question: 1. How convert/construct our own data format(freq x time x channel) to fieldtrip type data struct ? 2. What or where detailed example for ft_crossfrequency() function ?3. How import *.eeg(brain vision raw data) ? Especially treat a trial information ? I uploaded our data formed file o a filehoster such as fieldtriptoolbox ftp site as it exceeds the critical file size of 1 MB. Here is the link:ftp://ftp.fieldtriptoolbox.org/pub/incoming/TiGoum_USIL.FREQxTIMExCHANNEL.mat Can someone tell me above questions. Any help world be appreciated.Thank you very much. Best, Ahn Min-Hee. -------------- next part -------------- An HTML attachment was scrubbed... URL: From joseluisblues at gmail.com Thu Feb 4 13:21:59 2016 From: joseluisblues at gmail.com (Jose) Date: Thu, 4 Feb 2016 13:21:59 +0100 Subject: [FieldTrip] databrowser crashes, windows 8, matlab 2014b Message-ID: Dear fieldtrippers, I have been having some troubles with the plot functions in Fieldtrip, I've tried to solve it following this tread from the Fieldtrip webpage, but I was unable to solve the problem. I was wondering if there would any update or if someone has run in the same problem, I'm using a Intel Core 3.00GHz RAM 8.00 GB computer, Windows 8, 64-bit Operating System, and Matlab 2014b, Thanks for any hint, Jose -- -------------- next part -------------- An HTML attachment was scrubbed... URL: From caspervanheck at gmail.com Thu Feb 4 15:15:11 2016 From: caspervanheck at gmail.com (Casper van Heck) Date: Thu, 4 Feb 2016 15:15:11 +0100 Subject: [FieldTrip] importing method for ft_crossfrequency() using our customized data format In-Reply-To: <7e6fbf1ad2395f79d996b25a72f7c2f@cweb10.nm.nhnsystem.com> References: <3271eadad0ee1c551231243cb4f0e5@cweb14.nm.nhnsystem.com> <7e6fbf1ad2395f79d996b25a72f7c2f@cweb10.nm.nhnsystem.com> Message-ID: Dear Ahn, As background: 1. Constructing your own format is easy, and is explained on the page "How can I import my own dataformat? " 2. I'm assuming you're using the function 'ft_crossfrequencyanalysis', which doesn't seem to be embedded in a tutorial or anything similar. I do know that it wants the output of ft_freqanalysis, but if you want to know how it works, you're going to have to dive into the code. 3. Working with Brainvision Recorder, you don't import the raw data directly; you direct Fieldtrip to the header file, and use ft_preprocessing to read all the data and the markers. If this goes awry, you can use the separate functions ft_read_header, ft_read_data, and ft_read_event to load those elements into memor (more info here ). I seem to remember Brainvision events need to be read using ft_read_event anyway. Importing data works best either through ft_preprocessing, or through ft_read_data. You're trying to define a trial structure, but don't provide a method to do that. Read the tutorial on preprocessing , and simply copy the code used there, making a few changes to fit your data. Good luck! On 4 February 2016 at 03:20, 안민희 wrote: >  > > Dear community, > > > My name is Ahn Min-Hee and I am working in the mindbrain lab in korea > university, south koera > > on invasive BMI. > > Currently I am analyzing EEG data of our lab project, where we processed > using our time-frequency > > analysis method on matlab. It's sourcing from Brain Vision Recorder. > > > > I tried using ft_crossfrequency() to assess time-frequency aspects of our > data. > > First, I tried importing our own data that formed 3D type by frequency x > time x channel, > > but I don't know how it convert the fieldtrip style data structure. > > Specially, about converting epoch dimension & constructing trial struct... > > > > So, I tried additional work as initiation. I import raw data such as > *.eeg from Brain Vision Recorder. > > I work following: > > > > >> cfg = [] ; > > >> cfg.dataset='SSVEP_NEW_su0001.eeg'; > > >> cfg.trialdef.eventtype='?'; > > >> [cfg] = ft_definetrial(cfg); > > > > Warning: no trialfun was specified, using ft_trialfun_general > > > In ft_definetrial (line 135) > > evaluating trialfunction 'ft_trialfun_general' > > reading the events from 'SSVEP_NEW_su0001.vhdr' > > the following events were found in the datafile > > event type: 'Comment' with event values: 'actiCAP Data On' > > event type: 'New Segment' with event values: > > event type: 'Stimulus' with event values: 'S 11' 'S 12' 'S 13' 'S 14' 'S > 15' 'S 16' 'S 21' 'S 22' 'S 23' 'S 24' 'S 25' 'S 26' 'S 28' 'S111' 'S112' > 'S113' 'S114' 'S115' 'S116' 'S121' 'S122' 'S123' 'S124' 'S125' 'S126' > 'S127' > > no trials have been defined yet, see FT_DEFINETRIAL for further help > > found 943 events > > created 0 trials > > the call to "ft_definetrial" took 0 seconds and required the additional > allocation of an estimated 0 MB > > Then... I don't know that its result is correct or not... also, how treat > warning & why resulting trial to 0. > > ----- > > So, I summarize my question: > > 1. How convert/construct our own data format(freq x time x channel) to > fieldtrip type data struct ? > 2. What or where detailed example for ft_crossfrequency() function ? > 3. How import *.eeg(brain vision raw data) ? Especially treat a trial > information ? > > I uploaded our data formed file o a filehoster such as fieldtriptoolbox > ftp site as it exceeds the > critical file size of 1 MB. Here is the link: > > ftp://ftp.fieldtriptoolbox.org/pub/incoming/TiGoum_USIL.FREQxTIMExCHANNEL.mat > > > Can someone tell me above questions. Any help world be appreciated. > Thank you very much. > > Best, > > Ahn Min-Hee. > > > _______________________________________________ > 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 giuseppespinelli88 at gmail.com Thu Feb 4 17:13:33 2016 From: giuseppespinelli88 at gmail.com (Giuseppe Spinelli) Date: Thu, 4 Feb 2016 17:13:33 +0100 Subject: [FieldTrip] segmenting after ICA on continuous data Message-ID: Dear Fieldtrippers I am analyzing a .cnt EEG dataset from a Neuroscan amplifier with an hardware bandpass filter of 0.05-200 Hz. I am having some troubles with segmentation after performing ICA on continuous the continuous EEG trace. Here you find the pipeline I used: %% reading the dataset: subj = 'C:\data\S01.cnt'; cfg = []; cfg.headerfile = subj; cfg.datafile = subj; cfg.continuous = 'yes'; data_cont = ft_preprocessing(cfg); %% running ICA and cleaning data cfg = []; cfg.method = 'runica'; comp = componentanalysis(cfg, data_cont); cfg = []; cfg.component = [1:62]; cfg.layout = 'C:\data\mylayout1010.lay'; cfg.comment = 'no'; ft_topoplotIC(cfg, comp); cfg = []; cfg.channel = [1 3 8]; cfg.viewmode = 'component'; cfg.layout = 'C:\data\mylayout1010.lay'; ft_databrowser(cfg, comp); cfg = []; cfg.component = [1 3]; data_clean = ft_rejectcomponent(cfg, comp, data_cont); Now, in order to segment data I did: cfg = []; cfg.continuous = 'no'; cfg.trailfun = 'ft_trialfun_general'; cfg.trialdef.eventtype = 'stimtype'; cfg.trialdef.eventvalue = 8 cfg.trialdef.prestim = 1; cfg.trialdef.poststim = 4; cfg = ft_definetrial(data_clean); segmented = ft_preprocessing(cfg, data_clean); but, the Command Window retured me with the following error: Reference to non-existent field 'headerfile'. Error in ft_trialfun_general (line 78) hdr = ft_read_header(cfg.headerfile, 'headerformat', cfg.headerformat); Error in ft_definetrial (line 174) [trl, event] = feval(cfg.trialfun, cfg); I cannot get why both the headerfile and the dataset file are needed to be specified again. Could someone help me to figure it out? Many thanks in advance, Giuseppe Spinelli Ph.D. student in Cognitive Social and Affective Neuroscience Department of Psychology, Sapienza University of Rome via dei Marsi 78, 00185 - Rome Phone/Fax: +39 06-49917635 IRCCS Fondazione Santa Lucia via Ardeatina 306, 00179 - Rome Phone: +39 06 5150 1108 @: giuseppe.spinelli at uniroma1.it http://agliotilab.org/ -------------- next part -------------- An HTML attachment was scrubbed... URL: From julian.keil at gmail.com Thu Feb 4 17:32:28 2016 From: julian.keil at gmail.com (Julian Keil) Date: Thu, 4 Feb 2016 17:32:28 +0100 Subject: [FieldTrip] segmenting after ICA on continuous data In-Reply-To: References: Message-ID: <51FA52E0-082A-434A-8955-A422455A9509@gmail.com> Dear Giuseppe, in your trial-definition step you state: cfg = []; cfg.continuous = 'no'; cfg.trailfun = 'ft_trialfun_general'; cfg.trialdef.eventtype = 'stimtype'; cfg.trialdef.eventvalue = 8 cfg.trialdef.prestim = 1; cfg.trialdef.poststim = 4; cfg = ft_definetrial(data_clean); segmented = ft_preprocessing(cfg, data_clean); So, in your call to ft_definetrial, you are not using your cfg-structure. Instead, you overwrite your cfg-structure with the output of the (incorrectly called) ft_definetrial. Here's what you could do instead: Use your cfg from above with cfg.dataset = subj; in your call to ft_definetrial (e.g. cfg = ft_definetrial(cfg)). This gives you the cfg.trl-field with your trial definition. In the next step, you could use ft_redefinetrial to actually split up your (already cleaned) data. Check this tutorial for more info: http://www.fieldtriptoolbox.org/tutorial/continuous Good luck, Julian ******************** Dr. Julian Keil AG Multisensorische Integration Psychiatrische Universitätsklinik der Charité im St. Hedwig-Krankenhaus Große Hamburger Straße 5-11, Raum A007 10115 Berlin Telefon: +49-30-2311-1879 Fax: +49-30-2311-2209 http://psy-ccm.charite.de/forschung/bildgebung/ag_multisensorische_integration Am 04.02.2016 um 17:13 schrieb Giuseppe Spinelli: > Dear Fieldtrippers > > I am analyzing a .cnt EEG dataset from a Neuroscan amplifier with an hardware bandpass filter of 0.05-200 Hz. > I am having some troubles with segmentation after performing ICA on continuous the continuous EEG trace. > > Here you find the pipeline I used: > > %% reading the dataset: > subj = 'C:\data\S01.cnt'; > cfg = []; > cfg.headerfile = subj; > cfg.datafile = subj; > cfg.continuous = 'yes'; > data_cont = ft_preprocessing(cfg); > > %% running ICA and cleaning data > cfg = []; > cfg.method = 'runica'; > comp = componentanalysis(cfg, data_cont); > > cfg = []; > cfg.component = [1:62]; > cfg.layout = 'C:\data\mylayout1010.lay'; > cfg.comment = 'no'; > ft_topoplotIC(cfg, comp); > > cfg = []; > cfg.channel = [1 3 8]; > cfg.viewmode = 'component'; > cfg.layout = 'C:\data\mylayout1010.lay'; > ft_databrowser(cfg, comp); > > cfg = []; > cfg.component = [1 3]; > data_clean = ft_rejectcomponent(cfg, comp, data_cont); > > Now, in order to segment data I did: > > cfg = []; > cfg.continuous = 'no'; > cfg.trailfun = 'ft_trialfun_general'; > cfg.trialdef.eventtype = 'stimtype'; > cfg.trialdef.eventvalue = 8 > cfg.trialdef.prestim = 1; > cfg.trialdef.poststim = 4; > cfg = ft_definetrial(data_clean); > segmented = ft_preprocessing(cfg, data_clean); > > but, the Command Window retured me with the following error: > > Reference to non-existent field 'headerfile'. > > Error in ft_trialfun_general (line 78) > hdr = ft_read_header(cfg.headerfile, 'headerformat', cfg.headerformat); > > Error in ft_definetrial (line 174) > [trl, event] = feval(cfg.trialfun, cfg); > > > I cannot get why both the headerfile and the dataset file are needed to be specified again. > Could someone help me to figure it out? > > Many thanks in advance, > > Giuseppe Spinelli > > Ph.D. student in Cognitive Social and Affective Neuroscience > > Department of Psychology, Sapienza University of Rome > via dei Marsi 78, 00185 - Rome > Phone/Fax: +39 06-49917635 > > IRCCS Fondazione Santa Lucia > via Ardeatina 306, 00179 - Rome > Phone: +39 06 5150 1108 > > @: giuseppe.spinelli at uniroma1.it > http://agliotilab.org/ > _______________________________________________ > 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: signature.asc Type: application/pgp-signature Size: 495 bytes Desc: Message signed with OpenPGP using GPGMail URL: From fah at med.umich.edu Thu Feb 4 19:17:23 2016 From: fah at med.umich.edu (Ahmed, Farah) Date: Thu, 4 Feb 2016 18:17:23 +0000 Subject: [FieldTrip] Define Trial Error with Tutorial Data Message-ID: Hi Everyone, I am student new to FieldTrip and have been going through the tutorials. I am trying to run the ft_definetrial function on the sample data Subject01 from this tutorial page http://www.fieldtriptoolbox.org/tutorial/preprocessing This is the script I'm using (same as the one on the tutorial page) cfg = []; cfg.dataset = 'Subject01.ds'; cfg.trialfun = 'ft_trialfun_general'; % this is the default cfg.trialdef.eventtype = 'backpanel trigger'; cfg.trialdef.eventvalue = 3; % the value of the stimulus trigger for fully incongruent (FIC). cfg.trialdef.prestim = 1; % in seconds cfg.trialdef.poststim = 2; % in seconds cfg = ft_definetrial(cfg); After running that I get these errors: evaluating trialfunction 'ft_trialfun_general' Error using ft_read_header (line 2102) unsupported header format (unknown) Error in ft_trialfun_general (line 78) hdr = ft_read_header(cfg.headerfile, 'headerformat', cfg.headerformat); Error in ft_definetrial (line 174) [trl, event] = feval(cfg.trialfun, cfg); Could someone help guide me as to what I'm doing wrong or missing? Any assistance on solving this is appreciated! Thanks! Best, Farah Ahmed University of Michigan ********************************************************** Electronic Mail is not secure, may not be read every day, and should not be used for urgent or sensitive issues -------------- next part -------------- An HTML attachment was scrubbed... URL: From giovannipellegrino at gmail.com Thu Feb 4 23:24:10 2016 From: giovannipellegrino at gmail.com (Giovanni Pellegrino) Date: Thu, 4 Feb 2016 18:24:10 -0400 Subject: [FieldTrip] PhD and Postdoc positions @ Campus Bio-Medico University, Rome, Italy Message-ID: - Apologies for cross-postings - In the context of the European Research Council Grant “RESHAPE: REstoring the Self with embodiable HAnd ProsthesEs”, we are seeking two outstanding *Post-Doc scientists* and two highly-motivated *PhD students* to join us in developing new tools and methods to improve the embodiment of robotic hand prostheses and study the related brain processes. Activities will be carried out in a multidisciplinary research environment (Clinical Neurophysiology and Neuroengineering) @ Campus Bio-Medico University, Rome Italy (www.unicampus.it). Post-Doc ideal candidates should · - have relevant publications in international journals and experience in fund raising · - be English mother tongue or have almost comparable fluency · - *own at least two of the following expertise*: 1. Programming for development/customization of interactive Virtual/Augmented Reality environment 2. EEG/MRI signal processing 3. Body ownership, embodiment, cognitive neuroscience. PhD Student ideal candidates should · - be English mother tongue or have good fluency · - have a master degree (or equivalent) in o biomedical robotics, biomedical engineering, computer science or other related fields o medicine, neuroscience, neurophysiology or other related fields Suitable candidates can introduce themselves by contacting Giovanni Di Pino (g.dipino at unicampus.it) and Domenico Formica (d.formica at unicampus.it). -- Giovanni Pellegrino, MD Multimodal Functional Imaging Laboratory Montreal Neurological Institute, McGill University Address: 332 Duff Medical Building, 3775 rue University, Montreal, QC, H3A 2B4, Canada Phone: (514) 398–1678 Fax: (514) 398–7461 Email: giovannipellegrino at gmail.com, giovanni.pellegrino2 at mcgill.ca Homepage: http://www.bic.mni.mcgill.ca/ResearchLabsMFIL/PeopleGiovanni -------------- next part -------------- An HTML attachment was scrubbed... URL: From v.piai.research at gmail.com Fri Feb 5 02:32:03 2016 From: v.piai.research at gmail.com (Vitoria Piai) Date: Thu, 4 Feb 2016 17:32:03 -0800 Subject: [FieldTrip] reference for weighted pairwise phase-consistency Message-ID: <56B3FB93.9030008@gmail.com> Hi all, I'm looking for a reference for the *weighted *ppc measure, but can't find any. I know Martin's PPC paper, but I'm trying to figure out what the weighting in the name refers to really, which doesn't seem to be the same reference. Thanks, Vitoria -------------- next part -------------- An HTML attachment was scrubbed... URL: From r.oostenveld at donders.ru.nl Fri Feb 5 09:51:57 2016 From: r.oostenveld at donders.ru.nl (Robert Oostenveld) Date: Fri, 5 Feb 2016 09:51:57 +0100 Subject: [FieldTrip] development now on github, contributions welcome Message-ID: <0CE25B37-29D4-4F53-B972-53D046DAC316@donders.ru.nl> Dear FieldTrip community The toolbox development has completely moved over to http://github.com/fieldtrip. This makes it much simpler for us to incorporate external suggestions and for you to directly contribute to the code. We have a tutorial that explains how you can use git and github at http://www.fieldtriptoolbox.org/development/git. We will continue with our http://www.fieldtriptoolbox.org/bugzilla tracker, but you can also file issues on github, preferably in the form of pull requests that immediately solve the issue in the code. By making the development more open and by using more flexible tools we hope that you will contribute to make FieldTrip even better and to advance the field of MEG and EEG analysis. thanks for taking part in endeavor, the FIeldTrip team From david.pedrosa at ndcn.ox.ac.uk Fri Feb 5 14:47:50 2016 From: david.pedrosa at ndcn.ox.ac.uk (David Pedrosa) Date: Fri, 5 Feb 2016 13:47:50 +0000 Subject: [FieldTrip] ft_sourceanalysis, reshape error Message-ID: Dear list, after installing the newest version of Fieldtrip today, I have encountered a rather strange error . I am tying to compute corticomuscular coherence for an EEG/EMG dataset and it worked well so far. With the new version however, I get a reshape error I find fard to understand. This is the code: cfg = []; cfg.frequency = 20;; cfg.grid = leadfield; cfg.method = 'dics'; cfg.refchan = 'ExtR1'; cfg.channel = {'EEG' 'ExtR1'}; cfg.vol = hdm; cfg.dics.projectnoise = 'no'; cfg.dics.lambda = '1%'; cfg.dics.keepfilter = 'yes'; cfg.dics.keeptrials = 'yes'; cfg.dics.realfilter = 'yes'; sourceAll = ft_sourceanalysis(cfg, freqAll); but this hasn't changed. The error pops up at lines 619/620 of ft_sourceanalysis (Cf = reshape(sum(Cf, 1) / Ntrials, [Nchans Nchans]);), where it supposedly just averages the CSD matrix over trials. And it makes kind of sense as the line says to reshape the CSDs from a 1xNchans matrix into a [Nchans Nchans] one. But why is it poppin up now as nothing has changed in my analyses? I have checked the updates of the last months and I couldn't find anything related to this. So has any one an idea why the analysis crashes at this point. Thanks in advance Best, David ________________________________ Dr. David Pedrosa Clinical Research Fellow Medical Research Council Brain Network Dynamics Unit at the University of Oxford Nuffield Department of Clinical Neurosciences University of Oxford Level 6, West Wing John Radcliffe Hospital, OX3 9DU Tel: +44 (0)1865 572490 E-Mail: david.pedrosa at ndcn.ox.ac.uk http://www.mrcbndu.ox.ac.uk/ -------------- next part -------------- An HTML attachment was scrubbed... URL: From azeez.adebimpe5 at gmail.com Fri Feb 5 14:56:15 2016 From: azeez.adebimpe5 at gmail.com (Azeez Adebimpe) Date: Fri, 5 Feb 2016 08:56:15 -0500 Subject: [FieldTrip] ft_sourceanalysis, reshape error In-Reply-To: References: Message-ID: Hi David, Probably the channels' labels in leadfield and data are not the same. check it and try again. Azeez On Fri, Feb 5, 2016 at 8:47 AM, David Pedrosa wrote: > Dear list, > > after installing the newest version of Fieldtrip today, I have encountered > a rather strange error . I am tying to compute corticomuscular coherence > for an EEG/EMG dataset and it worked well so far. With the new version > however, I get a reshape error I find fard to understand. This is the code: > > cfg = []; > cfg.frequency = 20;; > cfg.grid = leadfield; > cfg.method = 'dics'; > cfg.refchan = 'ExtR1'; > cfg.channel = {'EEG' 'ExtR1'}; > cfg.vol = hdm; > cfg.dics.projectnoise = 'no'; > cfg.dics.lambda = '1%'; > cfg.dics.keepfilter = 'yes'; > cfg.dics.keeptrials = 'yes'; > cfg.dics.realfilter = 'yes'; > sourceAll = ft_sourceanalysis(cfg, freqAll); > > but this hasn't changed. The error pops up at lines 619/620 of > ft_sourceanalysis (Cf = reshape(sum(Cf, 1) / Ntrials, [Nchans Nchans]);), > where it supposedly just averages the CSD matrix over trials. And it makes > kind of sense as the line says to reshape the CSDs from a 1xNchans matrix > into a [Nchans Nchans] one. But why is it poppin up now as nothing has > changed in my analyses? I have checked the updates of the last months and I > couldn't find anything related to this. So has any one an idea why the > analysis crashes at this point. > > Thanks in advance > Best, > David > > ------------------------------ > Dr. David Pedrosa > > Clinical Research Fellow > Medical Research Council Brain Network Dynamics Unit at the University of > Oxford > Nuffield Department of Clinical Neurosciences > University of Oxford > Level 6, West Wing > John Radcliffe Hospital, OX3 9DU > *Tel:* +44 (0)1865 572490 > *E-Mail:* david.pedrosa at ndcn.ox.ac.uk > > http://www.mrcbndu.ox.ac.uk/ > > > _______________________________________________ > 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 david.pedrosa at ndcn.ox.ac.uk Fri Feb 5 15:51:33 2016 From: david.pedrosa at ndcn.ox.ac.uk (David Pedrosa) Date: Fri, 5 Feb 2016 14:51:33 +0000 Subject: [FieldTrip] ft_sourceanalysis, reshape error In-Reply-To: References: , Message-ID: Hi Azeez, thank you for the fast reply! I hadn't considered that but I have checked and I use the same labels for both leadfield and data. I mean it makes kind of sense that the reshape doesn't work as it is now, but I don't know where the problem is before. Can you think of anything else? Best, David ________________________________ Dr. David Pedrosa Clinical Research Fellow Medical Research Council Brain Network Dynamics Unit at the University of Oxford Nuffield Department of Clinical Neurosciences University of Oxford Level 6, West Wing John Radcliffe Hospital, OX3 9DU Tel: +44 (0)1865 572490 E-Mail: david.pedrosa at ndcn.ox.ac.uk http://www.mrcbndu.ox.ac.uk/ ________________________________ Von: fieldtrip-bounces at science.ru.nl [fieldtrip-bounces at science.ru.nl]" im Auftrag von "Azeez Adebimpe [azeez.adebimpe5 at gmail.com] Gesendet: Freitag, 5. Februar 2016 13:56 An: FieldTrip discussion list Betreff: Re: [FieldTrip] ft_sourceanalysis, reshape error Hi David, Probably the channels' labels in leadfield and data are not the same. check it and try again. Azeez On Fri, Feb 5, 2016 at 8:47 AM, David Pedrosa > wrote: Dear list, after installing the newest version of Fieldtrip today, I have encountered a rather strange error . I am tying to compute corticomuscular coherence for an EEG/EMG dataset and it worked well so far. With the new version however, I get a reshape error I find fard to understand. This is the code: cfg = []; cfg.frequency = 20;; cfg.grid = leadfield; cfg.method = 'dics'; cfg.refchan = 'ExtR1'; cfg.channel = {'EEG' 'ExtR1'}; cfg.vol = hdm; cfg.dics.projectnoise = 'no'; cfg.dics.lambda = '1%'; cfg.dics.keepfilter = 'yes'; cfg.dics.keeptrials = 'yes'; cfg.dics.realfilter = 'yes'; sourceAll = ft_sourceanalysis(cfg, freqAll); but this hasn't changed. The error pops up at lines 619/620 of ft_sourceanalysis (Cf = reshape(sum(Cf, 1) / Ntrials, [Nchans Nchans]);), where it supposedly just averages the CSD matrix over trials. And it makes kind of sense as the line says to reshape the CSDs from a 1xNchans matrix into a [Nchans Nchans] one. But why is it poppin up now as nothing has changed in my analyses? I have checked the updates of the last months and I couldn't find anything related to this. So has any one an idea why the analysis crashes at this point. Thanks in advance Best, David ________________________________ Dr. David Pedrosa Clinical Research Fellow Medical Research Council Brain Network Dynamics Unit at the University of Oxford Nuffield Department of Clinical Neurosciences University of Oxford Level 6, West Wing John Radcliffe Hospital, OX3 9DU Tel: +44 (0)1865 572490 E-Mail: david.pedrosa at ndcn.ox.ac.uk http://www.mrcbndu.ox.ac.uk/ _______________________________________________ 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 azeez.adebimpe5 at gmail.com Fri Feb 5 23:44:12 2016 From: azeez.adebimpe5 at gmail.com (Azeez Adebimpe) Date: Fri, 5 Feb 2016 17:44:12 -0500 Subject: [FieldTrip] ft_sourceanalysis, reshape error In-Reply-To: References: Message-ID: Hi David, Sorry for late reply, I was on the journey. The same issue happened to me before when the labels in the leadfield and data were not the same. if you have 'Fp1' in leadfield and 'FP1' in data, it will view as different channels. Azeez On Fri, Feb 5, 2016 at 9:51 AM, David Pedrosa wrote: > Hi Azeez, > > thank you for the fast reply! > I hadn't considered that but I have checked and I use the same labels for > both leadfield and data. > > I mean it makes kind of sense that the reshape doesn't work as it is now, > but I don't know where the problem is before. > > Can you think of anything else? > > Best, > David > > ------------------------------ > Dr. David Pedrosa > > Clinical Research Fellow > Medical Research Council Brain Network Dynamics Unit at the University of > Oxford > Nuffield Department of Clinical Neurosciences > University of Oxford > Level 6, West Wing > John Radcliffe Hospital, OX3 9DU > *Tel:* +44 (0)1865 572490 > *E-Mail:* david.pedrosa at ndcn.ox.ac.uk > > http://www.mrcbndu.ox.ac.uk/ > > ------------------------------ > *Von:* fieldtrip-bounces at science.ru.nl [fieldtrip-bounces at science.ru.nl]" > im Auftrag von "Azeez Adebimpe [azeez.adebimpe5 at gmail.com] > *Gesendet:* Freitag, 5. Februar 2016 13:56 > *An:* FieldTrip discussion list > *Betreff:* Re: [FieldTrip] ft_sourceanalysis, reshape error > > Hi David, > > Probably the channels' labels in leadfield and data are not the same. > > check it and try again. > > Azeez > > On Fri, Feb 5, 2016 at 8:47 AM, David Pedrosa > wrote: > >> Dear list, >> >> after installing the newest version of Fieldtrip today, I have >> encountered a rather strange error . I am tying to compute corticomuscular >> coherence for an EEG/EMG dataset and it worked well so far. With the new >> version however, I get a reshape error I find fard to understand. This is >> the code: >> >> cfg = []; >> cfg.frequency = 20;; >> cfg.grid = leadfield; >> cfg.method = 'dics'; >> cfg.refchan = 'ExtR1'; >> cfg.channel = {'EEG' 'ExtR1'}; >> cfg.vol = hdm; >> cfg.dics.projectnoise = 'no'; >> cfg.dics.lambda = '1%'; >> cfg.dics.keepfilter = 'yes'; >> cfg.dics.keeptrials = 'yes'; >> cfg.dics.realfilter = 'yes'; >> sourceAll = ft_sourceanalysis(cfg, freqAll); >> >> but this hasn't changed. The error pops up at lines 619/620 of >> ft_sourceanalysis (Cf = reshape(sum(Cf, 1) / Ntrials, [Nchans Nchans]);), >> where it supposedly just averages the CSD matrix over trials. And it makes >> kind of sense as the line says to reshape the CSDs from a 1xNchans matrix >> into a [Nchans Nchans] one. But why is it poppin up now as nothing has >> changed in my analyses? I have checked the updates of the last months and I >> couldn't find anything related to this. So has any one an idea why the >> analysis crashes at this point. >> >> Thanks in advance >> Best, >> David >> >> ------------------------------ >> Dr. David Pedrosa >> >> Clinical Research Fellow >> Medical Research Council Brain Network Dynamics Unit at the University of >> Oxford >> Nuffield Department of Clinical Neurosciences >> University of Oxford >> Level 6, West Wing >> John Radcliffe Hospital, OX3 9DU >> *Tel:* +44 (0)1865 572490 >> *E-Mail:* david.pedrosa at ndcn.ox.ac.uk >> >> http://www.mrcbndu.ox.ac.uk/ >> >> >> _______________________________________________ >> 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 giuseppespinelli88 at gmail.com Sat Feb 6 00:38:43 2016 From: giuseppespinelli88 at gmail.com (Giuseppe Spinelli) Date: Sat, 6 Feb 2016 00:38:43 +0100 Subject: [FieldTrip] segmenting after ICA on continuous data In-Reply-To: <51FA52E0-082A-434A-8955-A422455A9509@gmail.com> References: <51FA52E0-082A-434A-8955-A422455A9509@gmail.com> Message-ID: Hi Julian, got the point! Now it works. thanks for the fast reply, Giuseppe 2016-02-04 17:32 GMT+01:00 Julian Keil : > Dear Giuseppe, > > in your trial-definition step you state: > > cfg = []; > cfg.continuous = 'no'; > cfg.trailfun = 'ft_trialfun_general'; > cfg.trialdef.eventtype = 'stimtype'; > cfg.trialdef.eventvalue = 8 > cfg.trialdef.prestim = 1; > cfg.trialdef.poststim = 4; > cfg = ft_definetrial(data_clean); > segmented = ft_preprocessing(cfg, data_clean); > > So, in your call to ft_definetrial, you are not using your cfg-structure. > Instead, you overwrite your cfg-structure with the output of the > (incorrectly called) ft_definetrial. > > Here's what you could do instead: > Use your cfg from above with cfg.dataset = subj; in your call to > ft_definetrial (e.g. cfg = ft_definetrial(cfg)). > This gives you the cfg.trl-field with your trial definition. > In the next step, you could use ft_redefinetrial to actually split up your > (already cleaned) data. > > Check this tutorial for more info: > http://www.fieldtriptoolbox.org/tutorial/continuous > > Good luck, > > Julian > > > ******************** > *Dr. Julian Keil* > > AG Multisensorische Integration > Psychiatrische Universitätsklinik > der Charité im St. Hedwig-Krankenhaus > Große Hamburger Straße 5-11, Raum A007 > 10115 Berlin > > Telefon: +49-30-2311-1879 > Fax: +49-30-2311-2209 > > http://psy-ccm.charite.de/forschung/bildgebung/ag_multisensorische_integration > > Am 04.02.2016 um 17:13 schrieb Giuseppe Spinelli: > > Dear Fieldtrippers > > I am analyzing a .cnt EEG dataset from a Neuroscan amplifier with an > hardware bandpass filter of 0.05-200 Hz. > I am having some troubles with segmentation after performing ICA on > continuous the continuous EEG trace. > > Here you find the pipeline I used: > > %% reading the dataset: > subj = 'C:\data\S01.cnt'; > cfg = []; > cfg.headerfile = subj; > cfg.datafile = subj; > cfg.continuous = 'yes'; > data_cont = ft_preprocessing(cfg); > > %% running ICA and cleaning data > cfg = []; > cfg.method = 'runica'; > comp = componentanalysis(cfg, data_cont); > > cfg = []; > cfg.component = [1:62]; > cfg.layout = 'C:\data\mylayout1010.lay'; > cfg.comment = 'no'; > ft_topoplotIC(cfg, comp); > > cfg = []; > cfg.channel = [1 3 8]; > cfg.viewmode = 'component'; > cfg.layout = 'C:\data\mylayout1010.lay'; > ft_databrowser(cfg, comp); > > cfg = []; > cfg.component = [1 3]; > data_clean = ft_rejectcomponent(cfg, comp, data_cont); > > Now, in order to segment data I did: > > cfg = []; > cfg.continuous = 'no'; > cfg.trailfun = 'ft_trialfun_general'; > cfg.trialdef.eventtype = 'stimtype'; > cfg.trialdef.eventvalue = 8 > cfg.trialdef.prestim = 1; > cfg.trialdef.poststim = 4; > cfg = ft_definetrial(data_clean); > segmented = ft_preprocessing(cfg, data_clean); > > but, the Command Window retured me with the following error: > > Reference to non-existent field 'headerfile'. > > Error in ft_trialfun_general (line 78) > hdr = ft_read_header(cfg.headerfile, 'headerformat', cfg.headerformat); > > Error in ft_definetrial (line 174) > [trl, event] = feval(cfg.trialfun, cfg); > > > I cannot get why both the headerfile and the dataset file are needed to be > specified again. > Could someone help me to figure it out? > > Many thanks in advance, > > Giuseppe Spinelli > > Ph.D. student in Cognitive Social and Affective Neuroscience > > Department of Psychology, Sapienza University of Rome > via dei Marsi 78, 00185 - Rome > Phone/Fax: +39 06-49917635 > > IRCCS Fondazione Santa Lucia > via Ardeatina 306, 00179 - Rome > Phone: +39 06 5150 1108 > > @: giuseppe.spinelli at uniroma1.it > http://agliotilab.org/ > _______________________________________________ > 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 > -- Giuseppe Spinelli Ph.D. student in Cognitive Social and Affective Neuroscience Department of Psychology, Sapienza University of Rome via dei Marsi 78, 00185 - Rome Phone/Fax: +39 06-49917635 IRCCS Fondazione Santa Lucia via Ardeatina 306, 00179 - Rome Phone: +39 06 5150 1108 @: giuseppe.spinelli at uniroma1.it http://agliotilab.org/ -------------- next part -------------- An HTML attachment was scrubbed... URL: From brian.roach at ncire.org Sat Feb 6 19:38:29 2016 From: brian.roach at ncire.org (brian.roach at ncire.org) Date: Sat, 6 Feb 2016 10:38:29 -0800 (PST) Subject: [FieldTrip] EEG/fMRI Data Analyst Job Opportunity in San Francisco Message-ID: <1454783909.281318299@mail.ncire.org> Dear List Members, I am writing to share a data analyst job opportunity in a schizophrenia brain imaging research lab located in San Francisco, CA: [ https://rew21.ultipro.com/NOR1032/jobboard/JobDetails.aspx?__ID=*0C72706CFB87418F ]( https://rew21.ultipro.com/NOR1032/jobboard/JobDetails.aspx?__ID=*0C72706CFB87418F ) Please share this link with anyone you believe would be qualified and interested. Thank you, Brian Roach -------------- next part -------------- An HTML attachment was scrubbed... URL: From leilayou_54 at yahoo.com Mon Feb 8 12:51:05 2016 From: leilayou_54 at yahoo.com (Leila Ayoubian) Date: Mon, 8 Feb 2016 11:51:05 +0000 (UTC) Subject: [FieldTrip] importing large edf data In-Reply-To: References: Message-ID: <1195829915.655104.1454932265573.JavaMail.yahoo@mail.yahoo.com> Hi Stephen:I just happen to realize that when I load the data as you mentioned below, I can not get hold of the real time of the EEG file. (e.g.18:32:43 ).Could you please point out as how I could retrieve the real time of the EEG file after loading. Thanks a lot.Kind regards __________________________________________________ Leila Ayoubian, PhD. Institute of Psychiatry, Psychology and Neuroscience King's College London From: Stephen Politzer-Ahles To: fieldtrip at science.ru.nl Sent: Friday, December 18, 2015 12:37 PM Subject: Re: [FieldTrip] importing large edf data Hello Leila, I think there are a few possible options for you. If you're not interested in analyzing high frequencies, then you could import the data one sample at a time, downsampling each channel, and then concatenate the channels into one structure, as described in http://www.fieldtriptoolbox.org/faq/how_can_i_preprocess_a_dataset_that_is_too_large_to_fit_into_memory. I don't know what your sampling rate was, but if your sampling rate was extremely high then this can save you a lot of space. For example, if you're only interested in frequencies up to high gamma (around 90-100 Hz), then your data only need to be sampled at around 250 Hz (per the Nyquist theorem, plus a little extra wiggle room), so if you sampled at e.g. 2500 Hz (which our EDF system does by default) or 5000 Hz then you have way more samples than necessary; downsampling like this will greatly reduce your array size. If that is not an option, then you can read in a segment of data as a 'trial'. ft_preprocessing understands trial start and end times from cfg.trl, which minimally is an Nx3 matrix (N is the number of trials to read, and the columns are the start sample for each trial, the end sample for each trial, and the trigger value associated with the trial; you could just put 0 if there's no trigger). So let's say you want to read the first through thousandth sample of the recording, then you would set up your cfg as normal, then add: cfg.trl = [1 1000 0]; and then use ft_preprocessing. By way of example, here is code that reads in raw data as a series of 1-second "trials": cfg = []; cfg.dataset = 'C:\Users\Steve\Desktop\subj2.vhdr'; cfg.trialdef.triallength = 1; % see documentation for ft_definetrial for an explanation of these parameters cfg.trialdef.ntrials = Inf; cfg = ft_definetrial( cfg ); cfg.continuous = 'yes'; data = ft_preprocessing(cfg); After doing whatever you need to these trials, you could concatenate them back into continuous data (see http://mailman.science.ru.nl/pipermail/fieldtrip/2011-June/003971.html for details). Best, Steve --- Stephen Politzer-Ahles University of Oxford Language and Brain Lab Faculty of Linguistics, Phonetics & Philology http://users.ox.ac.uk/~cpgl0080/ On Fri, Dec 18, 2015 at 11:00 AM, wrote: Send fieldtrip mailing list submissions to         fieldtrip at science.ru.nl To subscribe or unsubscribe via the World Wide Web, visit         http://mailman.science.ru.nl/mailman/listinfo/fieldtrip or, via email, send a message with subject or body 'help' to         fieldtrip-request at science.ru.nl You can reach the person managing the list at         fieldtrip-owner at science.ru.nl When replying, please edit your Subject line so it is more specific than "Re: Contents of fieldtrip digest..." Today's Topics:    1. importing large edf data (Leila Ayoubian) ---------------------------------------------------------------------- Message: 1 Date: Fri, 18 Dec 2015 09:43:43 +0000 (UTC) From: Leila Ayoubian To: "fieldtrip at science.ru.nl" Subject: [FieldTrip] importing large edf data Message-ID:         <807603762.476165.1450431823359.JavaMail.yahoo at mail.yahoo.com> Content-Type: text/plain; charset="utf-8" Hi:Thanks for providing us with this amazing toolbox. I am new to fieldtrip. I am trying to import EEG data in the format of *.edf for the purpose of seizure detection for epileptic patients. I can't break up the data as you understand the detection has to have continuous data. However I could load section of the data at a time and clear what is already used and reload again.? So trying to load the data like this: cfg.dataset= ('mydata.edf'); rawdata=ft_preprocessing(cfg); This is the error message I get : %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% Error using zeros Requested 51x51927040 (19.7GB) array exceeds maximum array size preference. Creation of arrays greater than this limit may take a long time and cause MATLAB to become unresponsive. See array size limit or preference panel for more information. Error in read_edf (line 403) ? dat = zeros(length(chanindx),nepochs*epochlength); Error in ft_read_data (line 622) ??? dat = read_edf(filename, hdr, begsample, endsample, chanindx); Error in ft_preprocessing (line 566) ????? dat = ft_read_data(cfg.datafile, 'header', hdr, 'begsample', begsample, 'endsample', endsample, 'chanindx', rawindx, 'checkboundary', ????? strcmp(cfg.continuous, 'no'), 'dataformat', cfg.dataformat); Error in ReadFedfiles (line 8) rawdata=ft_preprocessing(cfg);%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% I tried the ft_redefinetrial, but since the input to this file is the output from ft-PREPROCESSING it gives me the same error. I also tried to use ft_read_data to choose the samples I want to load :?filename???? = 'mydata.edf' ?hdr?? = ft_read_header(filename); ?sample.start=1 ?sample.end=100 dat = ft_read_data(filename,'sample.start','1','sample.end','100') and here is again the error message: Error using zeros Requested 51x51927040 (19.7GB) array exceeds maximum array size preference. Creation of arrays greater than this limit may take a long time and cause MATLAB to become unresponsive. See array size limit or preference panel for more information. Error in read_edf (line 403) ? dat = zeros(length(chanindx),nepochs*epochlength); Error in ft_read_data (line 622) ??? dat = read_edf(filename, hdr, begsample, endsample, chanindx); Error in ReadFedfiles (line 31) dat = ft_read_data(filename,'sample.start','1','sample.end','100') ? >> Could you please direct me as to which functions and in which order I should be using the functions to load data in smaller samples.Some examples would be useful. Thanks again for your support and assistance. We appreciate your effort. Kind regards ___________________________________________________ Dr. Leila Ayoubian -------------- next part -------------- An HTML attachment was scrubbed... URL: ------------------------------ _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip End of fieldtrip Digest, Vol 61, Issue 14 ***************************************** _______________________________________________ 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 sreenivasan.r.nadar at gmail.com Mon Feb 8 19:50:58 2016 From: sreenivasan.r.nadar at gmail.com (Sreenivasan R. Nadar, Ph.D.) Date: Mon, 8 Feb 2016 13:50:58 -0500 Subject: [FieldTrip] Neuromag/ Elekta 306 layout file Message-ID: Fieldtripers, Anybody has a layout file for Elekta/Neuromag system? I downloaded the file from the following discussion list: http://mailman.science.ru.nl/pipermail/fieldtrip/2007-March/001019.html. However, this layout file give errors (i.e., Attempt to reference field of non-structure array) when I use it for ft_topoplotIC(cfg,components). Am I missing something? I used the following commands: %~~~~~~~~~~~~~~~ clear all cfg = []; cfg.dataset = 'C071_resting_150608.fif'; cfg.hpfilter = 'yes' cfg.hpfreq = 1; cfg.channel = {'MEG', '-STI001', '-STI002','-STI003','-STI004', '-STI005',..., '-STI006','-STI007','-STI008','-STI101','-STI201','-STI301'}; data_continuous = ft_preprocessing(cfg); %resample the data to 100Hz cfg = []; cfg.resamplefs = 100; [data] = ft_resampledata(cfg, data_continuous) %% running ICA and cleaning data cfg = []; cfg.method = 'runica'; comp = ft_componentanalysis(cfg, data); cfg = []; cfg.component = [1:50]; cfg.layout = 'NM306all.mat'; cfg.comment = 'no'; ft_topoplotIC(cfg, comp); %~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Thank you Sreenivasan -------------- next part -------------- An HTML attachment was scrubbed... URL: From pgoodin at swin.edu.au Mon Feb 8 20:44:39 2016 From: pgoodin at swin.edu.au (Peter Goodin) Date: Mon, 8 Feb 2016 19:44:39 +0000 Subject: [FieldTrip] Neuromag/ Elekta 306 layout file Message-ID: <620434cf-fd54-4ba5-b262-62e6170cba1c@email.android.com> Hi Sreenivasan, Try using the neuromag306all.lay and neuromag306cmb.lay layout files. Peter On 9 Feb 2016 6:10 AM, "Sreenivasan R. Nadar, Ph.D." wrote: Fieldtripers, Anybody has a layout file for Elekta/Neuromag system? I downloaded the file from the following discussion list: http://mailman.science.ru.nl/pipermail/fieldtrip/2007-March/001019.html. However, this layout file give errors (i.e., Attempt to reference field of non-structure array) when I use it for ft_topoplotIC(cfg,components). Am I missing something? I used the following commands: %~~~~~~~~~~~~~~~ clear all cfg = []; cfg.dataset = 'C071_resting_150608.fif'; cfg.hpfilter = 'yes' cfg.hpfreq = 1; cfg.channel = {'MEG', '-STI001', '-STI002','-STI003','-STI004', '-STI005',..., '-STI006','-STI007','-STI008','-STI101','-STI201','-STI301'}; data_continuous = ft_preprocessing(cfg); %resample the data to 100Hz cfg = []; cfg.resamplefs = 100; [data] = ft_resampledata(cfg, data_continuous) %% running ICA and cleaning data cfg = []; cfg.method = 'runica'; comp = ft_componentanalysis(cfg, data); cfg = []; cfg.component = [1:50]; cfg.layout = 'NM306all.mat'; cfg.comment = 'no'; ft_topoplotIC(cfg, comp); %~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Thank you Sreenivasan -------------- next part -------------- An HTML attachment was scrubbed... URL: From sreenivasan.r.nadar at gmail.com Mon Feb 8 20:51:46 2016 From: sreenivasan.r.nadar at gmail.com (Sreenivasan R. Nadar, Ph.D.) Date: Mon, 8 Feb 2016 14:51:46 -0500 Subject: [FieldTrip] Neuromag/ Elekta 306 layout file In-Reply-To: <620434cf-fd54-4ba5-b262-62e6170cba1c@email.android.com> References: <620434cf-fd54-4ba5-b262-62e6170cba1c@email.android.com> Message-ID: Hi Peter, Thanks. Yes, I also tried the ascii format neuromag306all.lay and neuromag306cmb.lay but no luck!! -Sreenivasan On Mon, Feb 8, 2016 at 2:44 PM, Peter Goodin wrote: > Hi Sreenivasan, > > Try using the neuromag306all.lay and neuromag306cmb.lay layout files. > > Peter > On 9 Feb 2016 6:10 AM, "Sreenivasan R. Nadar, Ph.D." < > sreenivasan.r.nadar at gmail.com> wrote: > > Fieldtripers, > > Anybody has a layout file for Elekta/Neuromag system? I downloaded the > file from the following discussion list: > http://mailman.science.ru.nl/pipermail/fieldtrip/2007-March/001019.html. > However, this layout file give errors (i.e., Attempt to reference field of > non-structure array) when I use it for ft_topoplotIC(cfg,components). Am I > missing something? I used the following commands: > > %~~~~~~~~~~~~~~~ > clear all > > cfg = []; > cfg.dataset = 'C071_resting_150608.fif'; > cfg.hpfilter = 'yes' > cfg.hpfreq = 1; > cfg.channel = {'MEG', '-STI001', '-STI002','-STI003','-STI004', > '-STI005',..., > '-STI006','-STI007','-STI008','-STI101','-STI201','-STI301'}; > > data_continuous = ft_preprocessing(cfg); > > %resample the data to 100Hz > cfg = []; > cfg.resamplefs = 100; > [data] = ft_resampledata(cfg, data_continuous) > > %% running ICA and cleaning data > cfg = []; > cfg.method = 'runica'; > comp = ft_componentanalysis(cfg, data); > > cfg = []; > cfg.component = [1:50]; > cfg.layout = 'NM306all.mat'; > cfg.comment = 'no'; > ft_topoplotIC(cfg, comp); > > %~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ > Thank you > > Sreenivasan > > > > _______________________________________________ > 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 stephen.politzer-ahles at ling-phil.ox.ac.uk Tue Feb 9 12:19:12 2016 From: stephen.politzer-ahles at ling-phil.ox.ac.uk (Stephen Politzer-Ahles) Date: Tue, 9 Feb 2016 11:19:12 +0000 Subject: [FieldTrip] importing large edf data Message-ID: Hi Leila, I'm sorry but I'm afraid I have not quite understood your issue. Can you give some more detail about what the problem is? In general, the fieldtrip structure output by ft_preprocessing() should have a .time field (indicating what timepoint during the epoch each sample corresponds to) and an .fsample field indicating the sampling rate (which you would also be able to use to figure out the time of each sample). Best, Steve --- Stephen Politzer-Ahles University of Oxford Language and Brain Lab Faculty of Linguistics, Phonetics & Philology http://users.ox.ac.uk/~cpgl0080/ > Message: 1 > Date: Mon, 8 Feb 2016 11:51:05 +0000 (UTC) > From: Leila Ayoubian > To: FieldTrip discussion list > Subject: Re: [FieldTrip] importing large edf data > Message-ID: > <1195829915.655104.1454932265573.JavaMail.yahoo at mail.yahoo.com> > Content-Type: text/plain; charset="utf-8" > > Hi Stephen:I just happen to realize that when I load the data as you > mentioned below, I can not get hold of the real time of the EEG file. > (e.g.18:32:43 ).Could you please point out as how I could retrieve the real > time of the EEG file after loading. > Thanks a lot.Kind regards > __________________________________________________ Leila Ayoubian, PhD. > Institute of Psychiatry, Psychology and Neuroscience > King's College London > > > > > From: Stephen Politzer-Ahles < > stephen.politzer-ahles at ling-phil.ox.ac.uk> > To: fieldtrip at science.ru.nl > Sent: Friday, December 18, 2015 12:37 PM > Subject: Re: [FieldTrip] importing large edf data > > Hello Leila, > > I think there are a few possible options for you. If you're not interested > in analyzing high frequencies, then you could import the data one sample at > a time, downsampling each channel, and then concatenate the channels into > one structure, as described in > http://www.fieldtriptoolbox.org/faq/how_can_i_preprocess_a_dataset_that_is_too_large_to_fit_into_memory. > I don't know what your sampling rate was, but if your sampling rate was > extremely high then this can save you a lot of space. For example, if > you're only interested in frequencies up to high gamma (around 90-100 Hz), > then your data only need to be sampled at around 250 Hz (per the Nyquist > theorem, plus a little extra wiggle room), so if you sampled at e.g. 2500 > Hz (which our EDF system does by default) or 5000 Hz then you have way more > samples than necessary; downsampling like this will greatly reduce your > array size. > > > > If that is not an option, then you can read in a segment of data as a > 'trial'. ft_preprocessing understands trial start and end times from > cfg.trl, which minimally is an Nx3 matrix (N is the number of trials to > read, and the columns are the start sample for each trial, the end sample > for each trial, and the trigger value associated with the trial; you could > just put 0 if there's no trigger). So let's say you want to read the first > through thousandth sample of the recording, then you would set up your cfg > as normal, then add: > > cfg.trl = [1 1000 0]; > > and then use ft_preprocessing. > > By way of example, here is code that reads in raw data as a series of > 1-second "trials": > > cfg = []; > cfg.dataset = 'C:\Users\Steve\Desktop\subj2.vhdr'; > cfg.trialdef.triallength = 1; % see documentation for ft_definetrial for > an explanation of these parameters > cfg.trialdef.ntrials = Inf; > cfg = ft_definetrial( cfg ); > > cfg.continuous = 'yes'; > data = ft_preprocessing(cfg); > > After doing whatever you need to these trials, you could concatenate them > back into continuous data (see > http://mailman.science.ru.nl/pipermail/fieldtrip/2011-June/003971.html > for details). > > Best, > Steve > > --- > Stephen Politzer-Ahles > University of Oxford > Language and Brain Lab > Faculty of Linguistics, Phonetics & Philology > http://users.ox.ac.uk/~cpgl0080/ > On Fri, Dec 18, 2015 at 11:00 AM, wrote: > > Send fieldtrip mailing list submissions to > ? ? ? ? fieldtrip at science.ru.nl > > To subscribe or unsubscribe via the World Wide Web, visit > ? ? ? ? http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > or, via email, send a message with subject or body 'help' to > ? ? ? ? fieldtrip-request at science.ru.nl > > You can reach the person managing the list at > ? ? ? ? fieldtrip-owner at science.ru.nl > > When replying, please edit your Subject line so it is more specific > than "Re: Contents of fieldtrip digest..." > > > Today's Topics: > > ? ?1. importing large edf data (Leila Ayoubian) > > > ---------------------------------------------------------------------- > > Message: 1 > Date: Fri, 18 Dec 2015 09:43:43 +0000 (UTC) > From: Leila Ayoubian > To: "fieldtrip at science.ru.nl" > Subject: [FieldTrip] importing large edf data > Message-ID: > ? ? ? ? <807603762.476165.1450431823359.JavaMail.yahoo at mail.yahoo.com> > Content-Type: text/plain; charset="utf-8" > > Hi:Thanks for providing us with this amazing toolbox. > I am new to fieldtrip. I am trying to import EEG data in the format of > *.edf for the purpose of seizure detection for epileptic patients. I can't > break up the data as you understand the detection has to have continuous > data. However I could load section of the data at a time and clear what is > already used and reload again.? > So trying to load the data like this: > cfg.dataset= ('mydata.edf'); > rawdata=ft_preprocessing(cfg); > This is the error message I get : > %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% > Error using zeros > Requested 51x51927040 (19.7GB) array exceeds maximum array size > preference. Creation of arrays greater than this limit may take a long time > and cause MATLAB to become unresponsive. See array size limit or > preference panel for more information. > > Error in read_edf (line 403) > ? dat = zeros(length(chanindx),nepochs*epochlength); > > Error in ft_read_data (line 622) > ??? dat = read_edf(filename, hdr, begsample, endsample, chanindx); > > Error in ft_preprocessing (line 566) > ????? dat = ft_read_data(cfg.datafile, 'header', hdr, 'begsample', > begsample, 'endsample', endsample, 'chanindx', rawindx, 'checkboundary', > ????? strcmp(cfg.continuous, 'no'), 'dataformat', cfg.dataformat); > > Error in ReadFedfiles (line 8) > > rawdata=ft_preprocessing(cfg);%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% > I tried the ft_redefinetrial, but since the input to this file is the > output from ft-PREPROCESSING it gives me the same error. > > > I also tried to use ft_read_data to choose the samples I want to load > :?filename???? = 'mydata.edf' > ?hdr?? = ft_read_header(filename); > ?sample.start=1 > ?sample.end=100 > dat = ft_read_data(filename,'sample.start','1','sample.end','100') > and here is again the error message: > Error using zeros > Requested 51x51927040 (19.7GB) array exceeds maximum array size > preference. Creation of arrays greater than this limit may take a > long time and cause MATLAB to become unresponsive. See array size limit or > preference panel for more information. > > Error in read_edf (line 403) > ? dat = zeros(length(chanindx),nepochs*epochlength); > > Error in ft_read_data (line 622) > ??? dat = read_edf(filename, hdr, begsample, endsample, chanindx); > > Error in ReadFedfiles (line 31) > dat = ft_read_data(filename,'sample.start','1','sample.end','100') > ? > >> > > Could you please direct me as to which functions and in which order I > should be using the functions to load data in smaller samples.Some examples > would be useful. > Thanks again for your support and assistance. > We appreciate your effort. > Kind regards > > ___________________________________________________ Dr. Leila Ayoubian > -------------- next part -------------- > An HTML attachment was scrubbed... > URL: < > http://mailman.science.ru.nl/pipermail/fieldtrip/attachments/20151218/6dfa7ce1/attachment-0001.html > > > > ------------------------------ > > _____________ > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From a.stolk8 at gmail.com Tue Feb 9 16:32:20 2016 From: a.stolk8 at gmail.com (Arjen Stolk) Date: Tue, 9 Feb 2016 07:32:20 -0800 Subject: [FieldTrip] importing large edf data In-Reply-To: References: Message-ID: <0817816F-2E1F-4CA9-8AA3-FABFE63A47DD@gmail.com> Hi both, There might be information on the date and time of recording in the orig field of the header, if that's what you're looking for. Don't know the name of the subfield from the top of my head. Arjen > On Feb 9, 2016, at 3:19 AM, Stephen Politzer-Ahles wrote: > > Hi Leila, > > I'm sorry but I'm afraid I have not quite understood your issue. Can you give some more detail about what the problem is? > > In general, the fieldtrip structure output by ft_preprocessing() should have a .time field (indicating what timepoint during the epoch each sample corresponds to) and an .fsample field indicating the sampling rate (which you would also be able to use to figure out the time of each sample). > > Best, > Steve > > > > --- > Stephen Politzer-Ahles > University of Oxford > Language and Brain Lab > Faculty of Linguistics, Phonetics & Philology > http://users.ox.ac.uk/~cpgl0080/ > >> Message: 1 >> Date: Mon, 8 Feb 2016 11:51:05 +0000 (UTC) >> From: Leila Ayoubian >> To: FieldTrip discussion list >> Subject: Re: [FieldTrip] importing large edf data >> Message-ID: >> <1195829915.655104.1454932265573.JavaMail.yahoo at mail.yahoo.com> >> Content-Type: text/plain; charset="utf-8" >> >> Hi Stephen:I just happen to realize that when I load the data as you mentioned below, I can not get hold of the real time of the EEG file. (e.g.18:32:43 ).Could you please point out as how I could retrieve the real time of the EEG file after loading. >> Thanks a lot.Kind regards >> __________________________________________________ Leila Ayoubian, PhD. >> Institute of Psychiatry, Psychology and Neuroscience >> King's College London >> >> >> >> >> From: Stephen Politzer-Ahles >> To: fieldtrip at science.ru.nl >> Sent: Friday, December 18, 2015 12:37 PM >> Subject: Re: [FieldTrip] importing large edf data >> >> Hello Leila, >> >> I think there are a few possible options for you. If you're not interested in analyzing high frequencies, then you could import the data one sample at a time, downsampling each channel, and then concatenate the channels into one structure, as described in http://www.fieldtriptoolbox.org/faq/how_can_i_preprocess_a_dataset_that_is_too_large_to_fit_into_memory. I don't know what your sampling rate was, but if your sampling rate was extremely high then this can save you a lot of space. For example, if you're only interested in frequencies up to high gamma (around 90-100 Hz), then your data only need to be sampled at around 250 Hz (per the Nyquist theorem, plus a little extra wiggle room), so if you sampled at e.g. 2500 Hz (which our EDF system does by default) or 5000 Hz then you have way more samples than necessary; downsampling like this will greatly reduce your array size. >> >> >> >> If that is not an option, then you can read in a segment of data as a 'trial'. ft_preprocessing understands trial start and end times from cfg.trl, which minimally is an Nx3 matrix (N is the number of trials to read, and the columns are the start sample for each trial, the end sample for each trial, and the trigger value associated with the trial; you could just put 0 if there's no trigger). So let's say you want to read the first through thousandth sample of the recording, then you would set up your cfg as normal, then add: >> >> cfg.trl = [1 1000 0]; >> >> and then use ft_preprocessing. >> >> By way of example, here is code that reads in raw data as a series of 1-second "trials": >> >> cfg = []; >> cfg.dataset = 'C:\Users\Steve\Desktop\subj2.vhdr'; >> cfg.trialdef.triallength = 1; % see documentation for ft_definetrial for an explanation of these parameters >> cfg.trialdef.ntrials = Inf; >> cfg = ft_definetrial( cfg ); >> >> cfg.continuous = 'yes'; >> data = ft_preprocessing(cfg); >> >> After doing whatever you need to these trials, you could concatenate them back into continuous data (see http://mailman.science.ru.nl/pipermail/fieldtrip/2011-June/003971.html for details). >> >> Best, >> Steve >> >> --- >> Stephen Politzer-Ahles >> University of Oxford >> Language and Brain Lab >> Faculty of Linguistics, Phonetics & Philology >> http://users.ox.ac.uk/~cpgl0080/ >> On Fri, Dec 18, 2015 at 11:00 AM, wrote: >> >> Send fieldtrip mailing list submissions to >> ? ? ? ? fieldtrip at science.ru.nl >> >> To subscribe or unsubscribe via the World Wide Web, visit >> ? ? ? ? http://mailman.science.ru.nl/mailman/listinfo/fieldtrip >> or, via email, send a message with subject or body 'help' to >> ? ? ? ? fieldtrip-request at science.ru.nl >> >> You can reach the person managing the list at >> ? ? ? ? fieldtrip-owner at science.ru.nl >> >> When replying, please edit your Subject line so it is more specific >> than "Re: Contents of fieldtrip digest..." >> >> >> Today's Topics: >> >> ? ?1. importing large edf data (Leila Ayoubian) >> >> >> ---------------------------------------------------------------------- >> >> Message: 1 >> Date: Fri, 18 Dec 2015 09:43:43 +0000 (UTC) >> From: Leila Ayoubian >> To: "fieldtrip at science.ru.nl" >> Subject: [FieldTrip] importing large edf data >> Message-ID: >> ? ? ? ? <807603762.476165.1450431823359.JavaMail.yahoo at mail.yahoo.com> >> Content-Type: text/plain; charset="utf-8" >> >> Hi:Thanks for providing us with this amazing toolbox. >> I am new to fieldtrip. I am trying to import EEG data in the format of *.edf for the purpose of seizure detection for epileptic patients. I can't break up the data as you understand the detection has to have continuous data. However I could load section of the data at a time and clear what is already used and reload again.? >> So trying to load the data like this: >> cfg.dataset= ('mydata.edf'); >> rawdata=ft_preprocessing(cfg); >> This is the error message I get : >> %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% >> Error using zeros >> Requested 51x51927040 (19.7GB) array exceeds maximum array size preference. Creation of arrays greater than this limit may take a long time >> and cause MATLAB to become unresponsive. See array size limit or preference panel for more information. >> >> Error in read_edf (line 403) >> ? dat = zeros(length(chanindx),nepochs*epochlength); >> >> Error in ft_read_data (line 622) >> ??? dat = read_edf(filename, hdr, begsample, endsample, chanindx); >> >> Error in ft_preprocessing (line 566) >> ????? dat = ft_read_data(cfg.datafile, 'header', hdr, 'begsample', begsample, 'endsample', endsample, 'chanindx', rawindx, 'checkboundary', >> ????? strcmp(cfg.continuous, 'no'), 'dataformat', cfg.dataformat); >> >> Error in ReadFedfiles (line 8) >> rawdata=ft_preprocessing(cfg);%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% >> I tried the ft_redefinetrial, but since the input to this file is the output from ft-PREPROCESSING it gives me the same error. >> >> >> I also tried to use ft_read_data to choose the samples I want to load :?filename???? = 'mydata.edf' >> ?hdr?? = ft_read_header(filename); >> ?sample.start=1 >> ?sample.end=100 >> dat = ft_read_data(filename,'sample.start','1','sample.end','100') >> and here is again the error message: >> Error using zeros >> Requested 51x51927040 (19.7GB) array exceeds maximum array size preference. Creation of arrays greater than this limit may take a >> long time and cause MATLAB to become unresponsive. See array size limit or preference panel for more information. >> >> Error in read_edf (line 403) >> ? dat = zeros(length(chanindx),nepochs*epochlength); >> >> Error in ft_read_data (line 622) >> ??? dat = read_edf(filename, hdr, begsample, endsample, chanindx); >> >> Error in ReadFedfiles (line 31) >> dat = ft_read_data(filename,'sample.start','1','sample.end','100') >> ? >> >> >> >> Could you please direct me as to which functions and in which order I should be using the functions to load data in smaller samples.Some examples would be useful. >> Thanks again for your support and assistance. >> We appreciate your effort. >> Kind regards >> >> ___________________________________________________ Dr. Leila Ayoubian >> -------------- next part -------------- >> An HTML attachment was scrubbed... >> URL: >> >> ------------------------------ >> >> _____________ > > _______________________________________________ > 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 leilayou_54 at yahoo.com Tue Feb 9 16:40:35 2016 From: leilayou_54 at yahoo.com (Leila Ayoubian) Date: Tue, 9 Feb 2016 15:40:35 +0000 (UTC) Subject: [FieldTrip] importing large edf data In-Reply-To: <0817816F-2E1F-4CA9-8AA3-FABFE63A47DD@gmail.com> References: <0817816F-2E1F-4CA9-8AA3-FABFE63A47DD@gmail.com> Message-ID: <1722640118.1244946.1455032435939.JavaMail.yahoo@mail.yahoo.com> Thanks.I need to retrieve the time when the recordings occure and I don't see it. I get the Fs but no more.I am using this code : cfg = [];cfg.trl = [1 1000000 0];%cfg.trl = [100001 2000000 0];%cfg.trialdef.triallength = 5;cfg.dataset =fileName; %'For leila.edf';cfg= ft_definetrial( cfg );cfg.continuous = 'yes'; datastr = ft_preprocessing(cfg);data=datastr.trial{1,1};chanls=datastr.label;Fs=datastr.fsample; and getting this datastr =             hdr: [1x1 struct]         label: {65x1 cell}          time: {[1x1000000 double]}         trial: {[65x1000000 double]}       fsample: 1024    sampleinfo: [1 1000000]           cfg: [1x1 struct] cfg =                    trl: [1 1000000 0]              dataset: 'Event13_Seizure_triggered_by_cortical_stim_Segment_1.edf'          trackconfig: 'off'          checkconfig: 'loose'            checksize: 100000         showcallinfo: 'yes'                debug: 'no'    outputfilepresent: 'overwrite'        trackcallinfo: 'yes'        trackdatainfo: 'no'             callinfo: [1x1 struct]              version: [1x1 struct]             datafile: 'Event13_Seizure_triggered_by_cortical_stim_Segment_1.edf'           headerfile: 'Event13_Seizure_triggered_by_cortical_stim_Segment_1.edf'           dataformat: 'edf'         headerformat: 'edf'                event: []           continuous: 'yes'  __________________________________________________ Leila Ayoubian, PhD. Institute of Psychiatry, Psychology and Neuroscience King's College London From: Arjen Stolk To: FieldTrip discussion list Sent: Tuesday, February 9, 2016 3:32 PM Subject: Re: [FieldTrip] importing large edf data Hi both,There might be information on the date and time of recording in the orig field of the header, if that's what you're looking for. Don't know the name of the subfield from the top of my head.Arjen On Feb 9, 2016, at 3:19 AM, Stephen Politzer-Ahles wrote: Hi Leila, I'm sorry but I'm afraid I have not quite understood your issue. Can you give some more detail about what the problem is? In general, the fieldtrip structure output by ft_preprocessing() should have a .time field (indicating what timepoint during the epoch each sample corresponds to) and an .fsample field indicating the sampling rate (which you would also be able to use to figure out the time of each sample). Best, Steve --- Stephen Politzer-Ahles University of Oxford Language and Brain Lab Faculty of Linguistics, Phonetics & Philology http://users.ox.ac.uk/~cpgl0080/  Message: 1 Date: Mon, 8 Feb 2016 11:51:05 +0000 (UTC) From: Leila Ayoubian To: FieldTrip discussion list Subject: Re: [FieldTrip] importing large edf data Message-ID:         <1195829915.655104.1454932265573.JavaMail.yahoo at mail.yahoo.com> Content-Type: text/plain; charset="utf-8" Hi Stephen:I just happen to realize that when I load the data as you mentioned below, I can not get hold of the real time of the EEG file. (e.g.18:32:43 ).Could you please point out as how I could retrieve the real time of the EEG file after loading. Thanks a lot.Kind regards __________________________________________________ Leila Ayoubian, PhD. Institute of Psychiatry, Psychology and Neuroscience King's College London       From: Stephen Politzer-Ahles  To: fieldtrip at science.ru.nl  Sent: Friday, December 18, 2015 12:37 PM  Subject: Re: [FieldTrip] importing large edf data Hello Leila, I think there are a few possible options for you. If you're not interested in analyzing high frequencies, then you could import the data one sample at a time, downsampling each channel, and then concatenate the channels into one structure, as described in http://www.fieldtriptoolbox.org/faq/how_can_i_preprocess_a_dataset_that_is_too_large_to_fit_into_memory. I don't know what your sampling rate was, but if your sampling rate was extremely high then this can save you a lot of space. For example, if you're only interested in frequencies up to high gamma (around 90-100 Hz), then your data only need to be sampled at around 250 Hz (per the Nyquist theorem, plus a little extra wiggle room), so if you sampled at e.g. 2500 Hz (which our EDF system does by default) or 5000 Hz then you have way more samples than necessary; downsampling like this will greatly reduce your array size. If that is not an option, then you can read in a segment of data as a 'trial'. ft_preprocessing understands trial start and end times from cfg.trl, which minimally is an Nx3 matrix (N is the number of trials to read, and the columns are the start sample for each trial, the end sample for each trial, and the trigger value associated with the trial; you could just put 0 if there's no trigger). So let's say you want to read the first through thousandth sample of the recording, then you would set up your cfg as normal, then add: cfg.trl = [1 1000 0]; and then use ft_preprocessing. By way of example, here is code that reads in raw data as a series of 1-second "trials": cfg = []; cfg.dataset = 'C:\Users\Steve\Desktop\subj2.vhdr'; cfg.trialdef.triallength = 1; % see documentation for ft_definetrial for an explanation of these parameters cfg.trialdef.ntrials = Inf; cfg = ft_definetrial( cfg ); cfg.continuous = 'yes'; data = ft_preprocessing(cfg); After doing whatever you need to these trials, you could concatenate them back into continuous data (see http://mailman.science.ru.nl/pipermail/fieldtrip/2011-June/003971.html for details). Best, Steve --- Stephen Politzer-Ahles University of Oxford Language and Brain Lab Faculty of Linguistics, Phonetics & Philology http://users.ox.ac.uk/~cpgl0080/ On Fri, Dec 18, 2015 at 11:00 AM, wrote: Send fieldtrip mailing list submissions to ? ? ? ? fieldtrip at science.ru.nl To subscribe or unsubscribe via the World Wide Web, visit ? ? ? ? http://mailman.science.ru.nl/mailman/listinfo/fieldtrip or, via email, send a message with subject or body 'help' to ? ? ? ? fieldtrip-request at science.ru.nl You can reach the person managing the list at ? ? ? ? fieldtrip-owner at science.ru.nl When replying, please edit your Subject line so it is more specific than "Re: Contents of fieldtrip digest..." Today's Topics: ? ?1. importing large edf data (Leila Ayoubian) ---------------------------------------------------------------------- Message: 1 Date: Fri, 18 Dec 2015 09:43:43 +0000 (UTC) From: Leila Ayoubian To: "fieldtrip at science.ru.nl" Subject: [FieldTrip] importing large edf data Message-ID: ? ? ? ? <807603762.476165.1450431823359.JavaMail.yahoo at mail.yahoo.com> Content-Type: text/plain; charset="utf-8" Hi:Thanks for providing us with this amazing toolbox. I am new to fieldtrip. I am trying to import EEG data in the format of *.edf for the purpose of seizure detection for epileptic patients. I can't break up the data as you understand the detection has to have continuous data. However I could load section of the data at a time and clear what is already used and reload again.? So trying to load the data like this: cfg.dataset= ('mydata.edf'); rawdata=ft_preprocessing(cfg); This is the error message I get : %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% Error using zeros Requested 51x51927040 (19.7GB) array exceeds maximum array size preference. Creation of arrays greater than this limit may take a long time and cause MATLAB to become unresponsive. See array size limit or preference panel for more information. Error in read_edf (line 403) ? dat = zeros(length(chanindx),nepochs*epochlength); Error in ft_read_data (line 622) ??? dat = read_edf(filename, hdr, begsample, endsample, chanindx); Error in ft_preprocessing (line 566) ????? dat = ft_read_data(cfg.datafile, 'header', hdr, 'begsample', begsample, 'endsample', endsample, 'chanindx', rawindx, 'checkboundary', ????? strcmp(cfg.continuous, 'no'), 'dataformat', cfg.dataformat); Error in ReadFedfiles (line 8) rawdata=ft_preprocessing(cfg);%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% I tried the ft_redefinetrial, but since the input to this file is the output from ft-PREPROCESSING it gives me the same error. I also tried to use ft_read_data to choose the samples I want to load :?filename???? = 'mydata.edf' ?hdr?? = ft_read_header(filename); ?sample.start=1 ?sample.end=100 dat = ft_read_data(filename,'sample.start','1','sample.end','100') and here is again the error message: Error using zeros Requested 51x51927040 (19.7GB) array exceeds maximum array size preference. Creation of arrays greater than this limit may take a long time and cause MATLAB to become unresponsive. See array size limit or preference panel for more information. Error in read_edf (line 403) ? dat = zeros(length(chanindx),nepochs*epochlength); Error in ft_read_data (line 622) ??? dat = read_edf(filename, hdr, begsample, endsample, chanindx); Error in ReadFedfiles (line 31) dat = ft_read_data(filename,'sample.start','1','sample.end','100') ? >> Could you please direct me as to which functions and in which order I should be using the functions to load data in smaller samples.Some examples would be useful. Thanks again for your support and assistance. We appreciate your effort. Kind regards ___________________________________________________ Dr. Leila Ayoubian -------------- next part -------------- An HTML attachment was scrubbed... URL: ------------------------------ _____________ _______________________________________________ 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 m.boyd at newcastle.ac.uk Tue Feb 9 17:52:22 2016 From: m.boyd at newcastle.ac.uk (Michael Boyd (PGR)) Date: Tue, 9 Feb 2016 16:52:22 +0000 Subject: [FieldTrip] Granger causality results out of range Message-ID: Hi, We are currently using the granger causality function of the toolbox as described in the connectivity tutorial. When we put LFP data through this, the results seem stable (or at least produce results between 0 and 1). However when we locally rereference the LFP data (e.g. to each channel's adjacent channel or current source density) the results are no longer in range (i.e. large negative numbers for granger causality). Our attempts to solve this so far have been in vain, so could anyone suggest where we might look to try to track down this instability? Script taken from connectivity tutorial: cfg = []; cfg.order = modelOrder; cfg.toolbox = 'bsmart'; mdata = ft_mvaranalysis(cfg, data); cfg = []; cfg.method = 'mvar'; mfreq = ft_freqanalysis(cfg, mdata); cfg = []; cfg.method = 'granger'; granger = ft_connectivityanalysis(cfg, mfreq); Thanks, Michael From leilayou_54 at yahoo.com Wed Feb 10 11:57:23 2016 From: leilayou_54 at yahoo.com (Leila Ayoubian) Date: Wed, 10 Feb 2016 10:57:23 +0000 (UTC) Subject: [FieldTrip] importing large edf data In-Reply-To: <0817816F-2E1F-4CA9-8AA3-FABFE63A47DD@gmail.com> References: <0817816F-2E1F-4CA9-8AA3-FABFE63A47DD@gmail.com> Message-ID: <844284323.1594104.1455101843736.JavaMail.yahoo@mail.yahoo.com> Hi;Thanks. I have found the timing of the beginning of the file under data.hdr.orig.T0 However the time has the format of hh:mm:ssIf I would like to load the timing of my file with milli-second precision what should I do? Kind regards From: Arjen Stolk To: FieldTrip discussion list Sent: Tuesday, February 9, 2016 3:32 PM Subject: Re: [FieldTrip] importing large edf data Hi both,There might be information on the date and time of recording in the orig field of the header, if that's what you're looking for. Don't know the name of the subfield from the top of my head.Arjen On Feb 9, 2016, at 3:19 AM, Stephen Politzer-Ahles wrote: Hi Leila, I'm sorry but I'm afraid I have not quite understood your issue. Can you give some more detail about what the problem is? In general, the fieldtrip structure output by ft_preprocessing() should have a .time field (indicating what timepoint during the epoch each sample corresponds to) and an .fsample field indicating the sampling rate (which you would also be able to use to figure out the time of each sample). Best, Steve --- Stephen Politzer-Ahles University of Oxford Language and Brain Lab Faculty of Linguistics, Phonetics & Philology http://users.ox.ac.uk/~cpgl0080/  Message: 1 Date: Mon, 8 Feb 2016 11:51:05 +0000 (UTC) From: Leila Ayoubian To: FieldTrip discussion list Subject: Re: [FieldTrip] importing large edf data Message-ID:         <1195829915.655104.1454932265573.JavaMail.yahoo at mail.yahoo.com> Content-Type: text/plain; charset="utf-8" Hi Stephen:I just happen to realize that when I load the data as you mentioned below, I can not get hold of the real time of the EEG file. (e.g.18:32:43 ).Could you please point out as how I could retrieve the real time of the EEG file after loading. Thanks a lot.Kind regards __________________________________________________ Leila Ayoubian, PhD. Institute of Psychiatry, Psychology and Neuroscience King's College London       From: Stephen Politzer-Ahles  To: fieldtrip at science.ru.nl  Sent: Friday, December 18, 2015 12:37 PM  Subject: Re: [FieldTrip] importing large edf data Hello Leila, I think there are a few possible options for you. If you're not interested in analyzing high frequencies, then you could import the data one sample at a time, downsampling each channel, and then concatenate the channels into one structure, as described in http://www.fieldtriptoolbox.org/faq/how_can_i_preprocess_a_dataset_that_is_too_large_to_fit_into_memory. I don't know what your sampling rate was, but if your sampling rate was extremely high then this can save you a lot of space. For example, if you're only interested in frequencies up to high gamma (around 90-100 Hz), then your data only need to be sampled at around 250 Hz (per the Nyquist theorem, plus a little extra wiggle room), so if you sampled at e.g. 2500 Hz (which our EDF system does by default) or 5000 Hz then you have way more samples than necessary; downsampling like this will greatly reduce your array size. If that is not an option, then you can read in a segment of data as a 'trial'. ft_preprocessing understands trial start and end times from cfg.trl, which minimally is an Nx3 matrix (N is the number of trials to read, and the columns are the start sample for each trial, the end sample for each trial, and the trigger value associated with the trial; you could just put 0 if there's no trigger). So let's say you want to read the first through thousandth sample of the recording, then you would set up your cfg as normal, then add: cfg.trl = [1 1000 0]; and then use ft_preprocessing. By way of example, here is code that reads in raw data as a series of 1-second "trials": cfg = []; cfg.dataset = 'C:\Users\Steve\Desktop\subj2.vhdr'; cfg.trialdef.triallength = 1; % see documentation for ft_definetrial for an explanation of these parameters cfg.trialdef.ntrials = Inf; cfg = ft_definetrial( cfg ); cfg.continuous = 'yes'; data = ft_preprocessing(cfg); After doing whatever you need to these trials, you could concatenate them back into continuous data (see http://mailman.science.ru.nl/pipermail/fieldtrip/2011-June/003971.html for details). Best, Steve --- Stephen Politzer-Ahles University of Oxford Language and Brain Lab Faculty of Linguistics, Phonetics & Philology http://users.ox.ac.uk/~cpgl0080/ On Fri, Dec 18, 2015 at 11:00 AM, wrote: Send fieldtrip mailing list submissions to ? ? ? ? fieldtrip at science.ru.nl To subscribe or unsubscribe via the World Wide Web, visit ? ? ? ? http://mailman.science.ru.nl/mailman/listinfo/fieldtrip or, via email, send a message with subject or body 'help' to ? ? ? ? fieldtrip-request at science.ru.nl You can reach the person managing the list at ? ? ? ? fieldtrip-owner at science.ru.nl When replying, please edit your Subject line so it is more specific than "Re: Contents of fieldtrip digest..." Today's Topics: ? ?1. importing large edf data (Leila Ayoubian) ---------------------------------------------------------------------- Message: 1 Date: Fri, 18 Dec 2015 09:43:43 +0000 (UTC) From: Leila Ayoubian To: "fieldtrip at science.ru.nl" Subject: [FieldTrip] importing large edf data Message-ID: ? ? ? ? <807603762.476165.1450431823359.JavaMail.yahoo at mail.yahoo.com> Content-Type: text/plain; charset="utf-8" Hi:Thanks for providing us with this amazing toolbox. I am new to fieldtrip. I am trying to import EEG data in the format of *.edf for the purpose of seizure detection for epileptic patients. I can't break up the data as you understand the detection has to have continuous data. However I could load section of the data at a time and clear what is already used and reload again.? So trying to load the data like this: cfg.dataset= ('mydata.edf'); rawdata=ft_preprocessing(cfg); This is the error message I get : %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% Error using zeros Requested 51x51927040 (19.7GB) array exceeds maximum array size preference. Creation of arrays greater than this limit may take a long time and cause MATLAB to become unresponsive. See array size limit or preference panel for more information. Error in read_edf (line 403) ? dat = zeros(length(chanindx),nepochs*epochlength); Error in ft_read_data (line 622) ??? dat = read_edf(filename, hdr, begsample, endsample, chanindx); Error in ft_preprocessing (line 566) ????? dat = ft_read_data(cfg.datafile, 'header', hdr, 'begsample', begsample, 'endsample', endsample, 'chanindx', rawindx, 'checkboundary', ????? strcmp(cfg.continuous, 'no'), 'dataformat', cfg.dataformat); Error in ReadFedfiles (line 8) rawdata=ft_preprocessing(cfg);%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% I tried the ft_redefinetrial, but since the input to this file is the output from ft-PREPROCESSING it gives me the same error. I also tried to use ft_read_data to choose the samples I want to load :?filename???? = 'mydata.edf' ?hdr?? = ft_read_header(filename); ?sample.start=1 ?sample.end=100 dat = ft_read_data(filename,'sample.start','1','sample.end','100') and here is again the error message: Error using zeros Requested 51x51927040 (19.7GB) array exceeds maximum array size preference. Creation of arrays greater than this limit may take a long time and cause MATLAB to become unresponsive. See array size limit or preference panel for more information. Error in read_edf (line 403) ? dat = zeros(length(chanindx),nepochs*epochlength); Error in ft_read_data (line 622) ??? dat = read_edf(filename, hdr, begsample, endsample, chanindx); Error in ReadFedfiles (line 31) dat = ft_read_data(filename,'sample.start','1','sample.end','100') ? >> Could you please direct me as to which functions and in which order I should be using the functions to load data in smaller samples.Some examples would be useful. Thanks again for your support and assistance. We appreciate your effort. Kind regards ___________________________________________________ Dr. Leila Ayoubian -------------- next part -------------- An HTML attachment was scrubbed... URL: ------------------------------ _____________ _______________________________________________ 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 stephen.politzer-ahles at ling-phil.ox.ac.uk Wed Feb 10 12:20:05 2016 From: stephen.politzer-ahles at ling-phil.ox.ac.uk (Stephen Politzer-Ahles) Date: Wed, 10 Feb 2016 11:20:05 +0000 Subject: [FieldTrip] importing large edf data Message-ID: Hi Leila (and Arjen): I just tried this out with a sample file, it looks like you can get this information if you use ft_read_header() rather than ft_preprocessing. The cfg structure I got from ft_preprocessing didn't contain the time-of-day information, but the structure returned from ft_read_header did: >> hdr = ft_read_header( cfg.dataset ); hdr.orig.T0 ans = 2005 9 15 10 18 42 I assume that's showing year, month, day, hour, minute (presumably based on the clock of the computer that made the recording). Best, Steve --- Stephen Politzer-Ahles University of Oxford Language and Brain Lab Faculty of Linguistics, Phonetics & Philology http://users.ox.ac.uk/~cpgl0080/ > > Message: 3 > Date: Tue, 9 Feb 2016 15:40:35 +0000 (UTC) > From: Leila Ayoubian > To: FieldTrip discussion list > Subject: Re: [FieldTrip] importing large edf data > Message-ID: > <1722640118.1244946.1455032435939.JavaMail.yahoo at mail.yahoo.com> > Content-Type: text/plain; charset="utf-8" > > Thanks.I need to retrieve the time when the recordings occure and I don't > see it. I get the Fs but no more.I am using this code : > cfg = [];cfg.trl = [1 1000000 0];%cfg.trl = [100001 2000000 > 0];%cfg.trialdef.triallength = 5;cfg.dataset =fileName; %'For > leila.edf';cfg= ft_definetrial( cfg );cfg.continuous = 'yes'; > datastr = > ft_preprocessing(cfg);data=datastr.trial{1,1};chanls=datastr.label;Fs=datastr.fsample; > and getting this?datastr =? > ? ? ? ? ? ?hdr: [1x1 struct]? ? ? ? ?label: {65x1 cell}? ? ? ? ? time: > {[1x1000000 double]}? ? ? ? ?trial: {[65x1000000 double]}? ? ? ?fsample: > 1024? ? sampleinfo: [1 1000000]? ? ? ? ? ?cfg: [1x1 struct] > > cfg =? > ? ? ? ? ? ? ? ? ? trl: [1 1000000 0]? ? ? ? ? ? ? dataset: > 'Event13_Seizure_triggered_by_cortical_stim_Segment_1.edf'? ? ? ? ? > trackconfig: 'off'? ? ? ? ? checkconfig: 'loose'? ? ? ? ? ? checksize: > 100000? ? ? ? ?showcallinfo: 'yes'? ? ? ? ? ? ? ? debug: 'no'? ? > outputfilepresent: 'overwrite'? ? ? ? trackcallinfo: 'yes'? ? ? ? > trackdatainfo: 'no'? ? ? ? ? ? ?callinfo: [1x1 struct]? ? ? ? ? ? ? > version: [1x1 struct]? ? ? ? ? ? ?datafile: > 'Event13_Seizure_triggered_by_cortical_stim_Segment_1.edf'? ? ? ? ? > ?headerfile: 'Event13_Seizure_triggered_by_cortical_stim_Segment_1.edf'? ? > ? ? ? ?dataformat: 'edf'? ? ? ? ?headerformat: 'edf'? ? ? ? ? ? ? ? event: > []? ? ? ? ? ?continuous: 'yes' > > ?__________________________________________________ Leila Ayoubian, PhD. > Institute of Psychiatry, Psychology and Neuroscience > King's College London > > > > > From: Arjen Stolk > To: FieldTrip discussion list > Sent: Tuesday, February 9, 2016 3:32 PM > Subject: Re: [FieldTrip] importing large edf data > > Hi both,There might be information on the date and time of recording in > the orig field of the header, if that's what you're looking for. Don't know > the name of the subfield from the top of my head.Arjen > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From leilayou_54 at yahoo.com Wed Feb 10 12:25:21 2016 From: leilayou_54 at yahoo.com (Leila Ayoubian) Date: Wed, 10 Feb 2016 11:25:21 +0000 (UTC) Subject: [FieldTrip] importing large edf data In-Reply-To: References: Message-ID: <2028618627.1587191.1455103521388.JavaMail.yahoo@mail.yahoo.com> Thanks Steve:Thanks. You are absolutely right. However what I need to get is one more information added to this          2005           9          15          10          18          42 Which is milli second. so I need to have an output of let's say (which 222 is in milli second)         2005           9          15          10          18          42        222 Do you know how I could do that? Thanks again __________________________________________________ Leila Ayoubian, PhD. Institute of Psychiatry, Psychology and Neuroscience King's College London From: Stephen Politzer-Ahles To: fieldtrip at science.ru.nl Sent: Wednesday, February 10, 2016 11:20 AM Subject: Re: [FieldTrip] importing large edf data Hi Leila (and Arjen): I just tried this out with a sample file, it looks like you can get this information if you use ft_read_header() rather than ft_preprocessing. The cfg structure I got from ft_preprocessing didn't contain the time-of-day information, but the structure returned from ft_read_header did: >> hdr = ft_read_header( cfg.dataset ); hdr.orig.T0 ans =         2005           9          15          10          18          42 I assume that's showing year, month, day, hour, minute (presumably based on the clock of the computer that made the recording). Best, Steve --- Stephen Politzer-Ahles University of Oxford Language and Brain Lab Faculty of Linguistics, Phonetics & Philology http://users.ox.ac.uk/~cpgl0080/  Message: 3 Date: Tue, 9 Feb 2016 15:40:35 +0000 (UTC) From: Leila Ayoubian To: FieldTrip discussion list Subject: Re: [FieldTrip] importing large edf data Message-ID:         <1722640118.1244946.1455032435939.JavaMail.yahoo at mail.yahoo.com> Content-Type: text/plain; charset="utf-8" Thanks.I need to retrieve the time when the recordings occure and I don't see it. I get the Fs but no more.I am using this code : cfg = [];cfg.trl = [1 1000000 0];%cfg.trl = [100001 2000000 0];%cfg.trialdef.triallength = 5;cfg.dataset =fileName; %'For leila.edf';cfg= ft_definetrial( cfg );cfg.continuous = 'yes'; datastr = ft_preprocessing(cfg);data=datastr.trial{1,1};chanls=datastr.label;Fs=datastr.fsample; and getting this?datastr =? ? ? ? ? ? ?hdr: [1x1 struct]? ? ? ? ?label: {65x1 cell}? ? ? ? ? time: {[1x1000000 double]}? ? ? ? ?trial: {[65x1000000 double]}? ? ? ?fsample: 1024? ? sampleinfo: [1 1000000]? ? ? ? ? ?cfg: [1x1 struct] cfg =? ? ? ? ? ? ? ? ? ? trl: [1 1000000 0]? ? ? ? ? ? ? dataset: 'Event13_Seizure_triggered_by_cortical_stim_Segment_1.edf'? ? ? ? ? trackconfig: 'off'? ? ? ? ? checkconfig: 'loose'? ? ? ? ? ? checksize: 100000? ? ? ? ?showcallinfo: 'yes'? ? ? ? ? ? ? ? debug: 'no'? ? outputfilepresent: 'overwrite'? ? ? ? trackcallinfo: 'yes'? ? ? ? trackdatainfo: 'no'? ? ? ? ? ? ?callinfo: [1x1 struct]? ? ? ? ? ? ? version: [1x1 struct]? ? ? ? ? ? ?datafile: 'Event13_Seizure_triggered_by_cortical_stim_Segment_1.edf'? ? ? ? ? ?headerfile: 'Event13_Seizure_triggered_by_cortical_stim_Segment_1.edf'? ? ? ? ? ?dataformat: 'edf'? ? ? ? ?headerformat: 'edf'? ? ? ? ? ? ? ? event: []? ? ? ? ? ?continuous: 'yes' ?__________________________________________________ Leila Ayoubian, PhD. Institute of Psychiatry, Psychology and Neuroscience King's College London       From: Arjen Stolk  To: FieldTrip discussion list  Sent: Tuesday, February 9, 2016 3:32 PM  Subject: Re: [FieldTrip] importing large edf data Hi both,There might be information on the date and time of recording in the orig field of the header, if that's what you're looking for. Don't know the name of the subfield from the top of my head.Arjen _______________________________________________ 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 david.pedrosa at ndcn.ox.ac.uk Wed Feb 10 15:54:24 2016 From: david.pedrosa at ndcn.ox.ac.uk (David Pedrosa) Date: Wed, 10 Feb 2016 14:54:24 +0000 Subject: [FieldTrip] ft_sourceanalysis, reshape error In-Reply-To: References: , Message-ID: Hi Azeez, I have been checking leadfields and data labels and they are actually the same. But the order is slightly different. Do you think this may cause the problems? Thanks for your help. Best, David ________________________________ Dr. David Pedrosa Clinical Research Fellow Medical Research Council Brain Network Dynamics Unit at the University of Oxford Nuffield Department of Clinical Neurosciences University of Oxford Level 6, West Wing John Radcliffe Hospital, OX3 9DU Tel: +44 (0)1865 572490 E-Mail: david.pedrosa at ndcn.ox.ac.uk http://www.mrcbndu.ox.ac.uk/ ________________________________ Von: fieldtrip-bounces at science.ru.nl [fieldtrip-bounces at science.ru.nl]" im Auftrag von "Azeez Adebimpe [azeez.adebimpe5 at gmail.com] Gesendet: Freitag, 5. Februar 2016 22:44 An: FieldTrip discussion list Betreff: Re: [FieldTrip] ft_sourceanalysis, reshape error Hi David, Sorry for late reply, I was on the journey. The same issue happened to me before when the labels in the leadfield and data were not the same. if you have 'Fp1' in leadfield and 'FP1' in data, it will view as different channels. Azeez On Fri, Feb 5, 2016 at 9:51 AM, David Pedrosa > wrote: Hi Azeez, thank you for the fast reply! I hadn't considered that but I have checked and I use the same labels for both leadfield and data. I mean it makes kind of sense that the reshape doesn't work as it is now, but I don't know where the problem is before. Can you think of anything else? Best, David ________________________________ Dr. David Pedrosa Clinical Research Fellow Medical Research Council Brain Network Dynamics Unit at the University of Oxford Nuffield Department of Clinical Neurosciences University of Oxford Level 6, West Wing John Radcliffe Hospital, OX3 9DU Tel: +44 (0)1865 572490 E-Mail: david.pedrosa at ndcn.ox.ac.uk http://www.mrcbndu.ox.ac.uk/ ________________________________ Von: fieldtrip-bounces at science.ru.nl [fieldtrip-bounces at science.ru.nl]" im Auftrag von "Azeez Adebimpe [azeez.adebimpe5 at gmail.com] Gesendet: Freitag, 5. Februar 2016 13:56 An: FieldTrip discussion list Betreff: Re: [FieldTrip] ft_sourceanalysis, reshape error Hi David, Probably the channels' labels in leadfield and data are not the same. check it and try again. Azeez On Fri, Feb 5, 2016 at 8:47 AM, David Pedrosa > wrote: Dear list, after installing the newest version of Fieldtrip today, I have encountered a rather strange error . I am tying to compute corticomuscular coherence for an EEG/EMG dataset and it worked well so far. With the new version however, I get a reshape error I find fard to understand. This is the code: cfg = []; cfg.frequency = 20;; cfg.grid = leadfield; cfg.method = 'dics'; cfg.refchan = 'ExtR1'; cfg.channel = {'EEG' 'ExtR1'}; cfg.vol = hdm; cfg.dics.projectnoise = 'no'; cfg.dics.lambda = '1%'; cfg.dics.keepfilter = 'yes'; cfg.dics.keeptrials = 'yes'; cfg.dics.realfilter = 'yes'; sourceAll = ft_sourceanalysis(cfg, freqAll); but this hasn't changed. The error pops up at lines 619/620 of ft_sourceanalysis (Cf = reshape(sum(Cf, 1) / Ntrials, [Nchans Nchans]);), where it supposedly just averages the CSD matrix over trials. And it makes kind of sense as the line says to reshape the CSDs from a 1xNchans matrix into a [Nchans Nchans] one. But why is it poppin up now as nothing has changed in my analyses? I have checked the updates of the last months and I couldn't find anything related to this. So has any one an idea why the analysis crashes at this point. Thanks in advance Best, David ________________________________ Dr. David Pedrosa Clinical Research Fellow Medical Research Council Brain Network Dynamics Unit at the University of Oxford Nuffield Department of Clinical Neurosciences University of Oxford Level 6, West Wing John Radcliffe Hospital, OX3 9DU Tel: +44 (0)1865 572490 E-Mail: david.pedrosa at ndcn.ox.ac.uk http://www.mrcbndu.ox.ac.uk/ _______________________________________________ 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 azeez.adebimpe5 at gmail.com Wed Feb 10 16:01:09 2016 From: azeez.adebimpe5 at gmail.com (Azeez Adebimpe) Date: Wed, 10 Feb 2016 16:01:09 +0100 Subject: [FieldTrip] ft_sourceanalysis, reshape error In-Reply-To: References: Message-ID: Hi David, I think it can cause it. I hope you can compute the leadfield again with the order in the data or you can rearrange it. Best, Azeez On Wed, Feb 10, 2016 at 3:54 PM, David Pedrosa wrote: > Hi Azeez, > > I have been checking leadfields and data labels and they are actually the > same. But the order is slightly different. Do you think this may cause the > problems? > > Thanks for your help. > > Best, > David > > ------------------------------ > Dr. David Pedrosa > > Clinical Research Fellow > Medical Research Council Brain Network Dynamics Unit at the University of > Oxford > Nuffield Department of Clinical Neurosciences > University of Oxford > Level 6, West Wing > John Radcliffe Hospital, OX3 9DU > *Tel:* +44 (0)1865 572490 > *E-Mail:* david.pedrosa at ndcn.ox.ac.uk > > http://www.mrcbndu.ox.ac.uk/ > > ------------------------------ > *Von:* fieldtrip-bounces at science.ru.nl [fieldtrip-bounces at science.ru.nl]" > im Auftrag von "Azeez Adebimpe [azeez.adebimpe5 at gmail.com] > *Gesendet:* Freitag, 5. Februar 2016 22:44 > *An:* FieldTrip discussion list > *Betreff:* Re: [FieldTrip] ft_sourceanalysis, reshape error > > Hi David, > > Sorry for late reply, I was on the journey. > The same issue happened to me before when the labels in the leadfield and > data were not the same. > if you have 'Fp1' in leadfield and 'FP1' in data, it will view as > different channels. > > > Azeez > > > > > On Fri, Feb 5, 2016 at 9:51 AM, David Pedrosa > wrote: > >> Hi Azeez, >> >> thank you for the fast reply! >> I hadn't considered that but I have checked and I use the same labels for >> both leadfield and data. >> >> I mean it makes kind of sense that the reshape doesn't work as it is now, >> but I don't know where the problem is before. >> >> Can you think of anything else? >> >> Best, >> David >> >> ------------------------------ >> Dr. David Pedrosa >> >> Clinical Research Fellow >> Medical Research Council Brain Network Dynamics Unit at the University of >> Oxford >> Nuffield Department of Clinical Neurosciences >> University of Oxford >> Level 6, West Wing >> John Radcliffe Hospital, OX3 9DU >> *Tel:* +44 (0)1865 572490 >> *E-Mail:* david.pedrosa at ndcn.ox.ac.uk >> >> http://www.mrcbndu.ox.ac.uk/ >> >> ------------------------------ >> *Von:* fieldtrip-bounces at science.ru.nl [fieldtrip-bounces at science.ru.nl]" >> im Auftrag von "Azeez Adebimpe [azeez.adebimpe5 at gmail.com] >> *Gesendet:* Freitag, 5. Februar 2016 13:56 >> *An:* FieldTrip discussion list >> *Betreff:* Re: [FieldTrip] ft_sourceanalysis, reshape error >> >> Hi David, >> >> Probably the channels' labels in leadfield and data are not the same. >> >> check it and try again. >> >> Azeez >> >> On Fri, Feb 5, 2016 at 8:47 AM, David Pedrosa < >> david.pedrosa at ndcn.ox.ac.uk> wrote: >> >>> Dear list, >>> >>> after installing the newest version of Fieldtrip today, I have >>> encountered a rather strange error . I am tying to compute corticomuscular >>> coherence for an EEG/EMG dataset and it worked well so far. With the new >>> version however, I get a reshape error I find fard to understand. This is >>> the code: >>> >>> cfg = []; >>> cfg.frequency = 20;; >>> cfg.grid = leadfield; >>> cfg.method = 'dics'; >>> cfg.refchan = 'ExtR1'; >>> cfg.channel = {'EEG' 'ExtR1'}; >>> cfg.vol = hdm; >>> cfg.dics.projectnoise = 'no'; >>> cfg.dics.lambda = '1%'; >>> cfg.dics.keepfilter = 'yes'; >>> cfg.dics.keeptrials = 'yes'; >>> cfg.dics.realfilter = 'yes'; >>> sourceAll = ft_sourceanalysis(cfg, freqAll); >>> >>> but this hasn't changed. The error pops up at lines 619/620 of >>> ft_sourceanalysis (Cf = reshape(sum(Cf, 1) / Ntrials, [Nchans Nchans]);), >>> where it supposedly just averages the CSD matrix over trials. And it makes >>> kind of sense as the line says to reshape the CSDs from a 1xNchans matrix >>> into a [Nchans Nchans] one. But why is it poppin up now as nothing has >>> changed in my analyses? I have checked the updates of the last months and I >>> couldn't find anything related to this. So has any one an idea why the >>> analysis crashes at this point. >>> >>> Thanks in advance >>> Best, >>> David >>> >>> ------------------------------ >>> Dr. David Pedrosa >>> >>> Clinical Research Fellow >>> Medical Research Council Brain Network Dynamics Unit at the University >>> of Oxford >>> Nuffield Department of Clinical Neurosciences >>> University of Oxford >>> Level 6, West Wing >>> John Radcliffe Hospital, OX3 9DU >>> *Tel:* +44 (0)1865 572490 >>> *E-Mail:* david.pedrosa at ndcn.ox.ac.uk >>> >>> http://www.mrcbndu.ox.ac.uk/ >>> >>> >>> _______________________________________________ >>> 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 Wed Feb 10 16:30:59 2016 From: jan.schoffelen at donders.ru.nl (Schoffelen, J.M. (Jan Mathijs)) Date: Wed, 10 Feb 2016 15:30:59 +0000 Subject: [FieldTrip] ft_sourceanalysis, reshape error In-Reply-To: References: , Message-ID: <60FD4C45-84AB-4304-9620-F79109898282@fcdonders.ru.nl> Hi David, Yes, I think that could cause the problem, although if that were true, your specific issue seems to be a convoluted manifestation of it. Bottom line with respect to channel order: when using pre-computed leadfields, the underlying assumption is more or less that the order of the channels, as represented in the leadfields, is the same as the order of the channels in the data. In principle, this can be accommodated with proper data bookkeeping, i.e. checking the labels that are associated with the data structure containing the forward model (i.e. the leadfield) against the channels in the data. We have started to move in this direction by inclusion of a label-field in data structures containing leadfields. Yet, the explicit check about channels and orderings of channels so far only throws an error if there’s a mismatch in the number of channels. Your reported error with a reshape issue could also reflect a problem with the data handling as such. Some more information would be appreciated in this regard. What does your freqAll contain in terms of spectral data? Fourier coefficients or cross-spectra? In case it’s cross-spectra, does it include multiple trials or not? If not, would it make sense to switch off the cfg.keeptrials flag in your cfg to ft_sourceanalysis. Best, Jan-Mathijs On Feb 10, 2016, at 3:54 PM, David Pedrosa > wrote: Hi Azeez, I have been checking leadfields and data labels and they are actually the same. But the order is slightly different. Do you think this may cause the problems? Thanks for your help. Best, David ________________________________ Dr. David Pedrosa Clinical Research Fellow Medical Research Council Brain Network Dynamics Unit at the University of Oxford Nuffield Department of Clinical Neurosciences University of Oxford Level 6, West Wing John Radcliffe Hospital, OX3 9DU Tel: +44 (0)1865 572490 E-Mail: david.pedrosa at ndcn.ox.ac.uk http://www.mrcbndu.ox.ac.uk/ ________________________________ Von: fieldtrip-bounces at science.ru.nl [fieldtrip-bounces at science.ru.nl]" im Auftrag von "Azeez Adebimpe [azeez.adebimpe5 at gmail.com] Gesendet: Freitag, 5. Februar 2016 22:44 An: FieldTrip discussion list Betreff: Re: [FieldTrip] ft_sourceanalysis, reshape error Hi David, Sorry for late reply, I was on the journey. The same issue happened to me before when the labels in the leadfield and data were not the same. if you have 'Fp1' in leadfield and 'FP1' in data, it will view as different channels. Azeez On Fri, Feb 5, 2016 at 9:51 AM, David Pedrosa > wrote: Hi Azeez, thank you for the fast reply! I hadn't considered that but I have checked and I use the same labels for both leadfield and data. I mean it makes kind of sense that the reshape doesn't work as it is now, but I don't know where the problem is before. Can you think of anything else? Best, David ________________________________ Dr. David Pedrosa Clinical Research Fellow Medical Research Council Brain Network Dynamics Unit at the University of Oxford Nuffield Department of Clinical Neurosciences University of Oxford Level 6, West Wing John Radcliffe Hospital, OX3 9DU Tel: +44 (0)1865 572490 E-Mail: david.pedrosa at ndcn.ox.ac.uk http://www.mrcbndu.ox.ac.uk/ ________________________________ Von: fieldtrip-bounces at science.ru.nl [fieldtrip-bounces at science.ru.nl]" im Auftrag von "Azeez Adebimpe [azeez.adebimpe5 at gmail.com] Gesendet: Freitag, 5. Februar 2016 13:56 An: FieldTrip discussion list Betreff: Re: [FieldTrip] ft_sourceanalysis, reshape error Hi David, Probably the channels' labels in leadfield and data are not the same. check it and try again. Azeez On Fri, Feb 5, 2016 at 8:47 AM, David Pedrosa > wrote: Dear list, after installing the newest version of Fieldtrip today, I have encountered a rather strange error . I am tying to compute corticomuscular coherence for an EEG/EMG dataset and it worked well so far. With the new version however, I get a reshape error I find fard to understand. This is the code: cfg = []; cfg.frequency = 20;; cfg.grid = leadfield; cfg.method = 'dics'; cfg.refchan = 'ExtR1'; cfg.channel = {'EEG' 'ExtR1'}; cfg.vol = hdm; cfg.dics.projectnoise = 'no'; cfg.dics.lambda = '1%'; cfg.dics.keepfilter = 'yes'; cfg.dics.keeptrials = 'yes'; cfg.dics.realfilter = 'yes'; sourceAll = ft_sourceanalysis(cfg, freqAll); but this hasn't changed. The error pops up at lines 619/620 of ft_sourceanalysis (Cf = reshape(sum(Cf, 1) / Ntrials, [Nchans Nchans]);), where it supposedly just averages the CSD matrix over trials. And it makes kind of sense as the line says to reshape the CSDs from a 1xNchans matrix into a [Nchans Nchans] one. But why is it poppin up now as nothing has changed in my analyses? I have checked the updates of the last months and I couldn't find anything related to this. So has any one an idea why the analysis crashes at this point. Thanks in advance Best, David ________________________________ Dr. David Pedrosa Clinical Research Fellow Medical Research Council Brain Network Dynamics Unit at the University of Oxford Nuffield Department of Clinical Neurosciences University of Oxford Level 6, West Wing John Radcliffe Hospital, OX3 9DU Tel: +44 (0)1865 572490 E-Mail: david.pedrosa at ndcn.ox.ac.uk http://www.mrcbndu.ox.ac.uk/ _______________________________________________ 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 robert.reinhart at vanderbilt.edu Wed Feb 10 16:57:27 2016 From: robert.reinhart at vanderbilt.edu (Rob Reinhart) Date: Wed, 10 Feb 2016 10:57:27 -0500 Subject: [FieldTrip] source analysis question Message-ID: Dear FieldTrip Forum, I have a naive question. When carrying out this source analysis ( http://www.fieldtriptoolbox.org/tutorial/networkanalysis), I believe there are data from ~275 sensors translated to data occupying ~372 nodes (or voxels) in source space. If this is true (i.e., larger number of source points derived from smaller number of sensors), does this create a margin of error in the source data? And if so, is this error quantifiable? Any advice on understanding this would be greatly appreciated. Thank you so much, Rob Reinhart -------------- next part -------------- An HTML attachment was scrubbed... URL: From david.pedrosa at ndcn.ox.ac.uk Wed Feb 10 17:04:01 2016 From: david.pedrosa at ndcn.ox.ac.uk (David Pedrosa) Date: Wed, 10 Feb 2016 16:04:01 +0000 Subject: [FieldTrip] ft_sourceanalysis, reshape error In-Reply-To: <60FD4C45-84AB-4304-9620-F79109898282@fcdonders.ru.nl> References: , , <60FD4C45-84AB-4304-9620-F79109898282@fcdonders.ru.nl> Message-ID: Hi Jan-Mathijs, thanks for your reply. I have explicitly made sure the order of both is identical (except for the EMG channel which is only present in the frequency analysis but not in the leadfield) and the problem still pops up, which makes me wonder if it could be something else as you suggested. Sorry for not being more precise. So the freqAll contains the fourier spectra for all channels and I have used many trials so I chose 'keeptrials'. Do you have any other suggestions what I could check or which settings might be causing this problem? Thanks Best, David ________________________________ Dr. David Pedrosa Clinical Research Fellow Medical Research Council Brain Network Dynamics Unit at the University of Oxford Nuffield Department of Clinical Neurosciences University of Oxford Level 6, West Wing John Radcliffe Hospital, OX3 9DU Tel: +44 (0)1865 572490 E-Mail: david.pedrosa at ndcn.ox.ac.uk http://www.mrcbndu.ox.ac.uk/ ________________________________ Von: fieldtrip-bounces at science.ru.nl [fieldtrip-bounces at science.ru.nl]" im Auftrag von "Schoffelen, J.M. (Jan Mathijs) [jan.schoffelen at donders.ru.nl] Gesendet: Mittwoch, 10. Februar 2016 15:30 An: FieldTrip discussion list Betreff: Re: [FieldTrip] ft_sourceanalysis, reshape error Hi David, Yes, I think that could cause the problem, although if that were true, your specific issue seems to be a convoluted manifestation of it. Bottom line with respect to channel order: when using pre-computed leadfields, the underlying assumption is more or less that the order of the channels, as represented in the leadfields, is the same as the order of the channels in the data. In principle, this can be accommodated with proper data bookkeeping, i.e. checking the labels that are associated with the data structure containing the forward model (i.e. the leadfield) against the channels in the data. We have started to move in this direction by inclusion of a label-field in data structures containing leadfields. Yet, the explicit check about channels and orderings of channels so far only throws an error if there’s a mismatch in the number of channels. Your reported error with a reshape issue could also reflect a problem with the data handling as such. Some more information would be appreciated in this regard. What does your freqAll contain in terms of spectral data? Fourier coefficients or cross-spectra? In case it’s cross-spectra, does it include multiple trials or not? If not, would it make sense to switch off the cfg.keeptrials flag in your cfg to ft_sourceanalysis. Best, Jan-Mathijs On Feb 10, 2016, at 3:54 PM, David Pedrosa > wrote: Hi Azeez, I have been checking leadfields and data labels and they are actually the same. But the order is slightly different. Do you think this may cause the problems? Thanks for your help. Best, David ________________________________ Dr. David Pedrosa Clinical Research Fellow Medical Research Council Brain Network Dynamics Unit at the University of Oxford Nuffield Department of Clinical Neurosciences University of Oxford Level 6, West Wing John Radcliffe Hospital, OX3 9DU Tel: +44 (0)1865 572490 E-Mail: david.pedrosa at ndcn.ox.ac.uk http://www.mrcbndu.ox.ac.uk/ ________________________________ Von: fieldtrip-bounces at science.ru.nl [fieldtrip-bounces at science.ru.nl]" im Auftrag von "Azeez Adebimpe [azeez.adebimpe5 at gmail.com] Gesendet: Freitag, 5. Februar 2016 22:44 An: FieldTrip discussion list Betreff: Re: [FieldTrip] ft_sourceanalysis, reshape error Hi David, Sorry for late reply, I was on the journey. The same issue happened to me before when the labels in the leadfield and data were not the same. if you have 'Fp1' in leadfield and 'FP1' in data, it will view as different channels. Azeez On Fri, Feb 5, 2016 at 9:51 AM, David Pedrosa > wrote: Hi Azeez, thank you for the fast reply! I hadn't considered that but I have checked and I use the same labels for both leadfield and data. I mean it makes kind of sense that the reshape doesn't work as it is now, but I don't know where the problem is before. Can you think of anything else? Best, David ________________________________ Dr. David Pedrosa Clinical Research Fellow Medical Research Council Brain Network Dynamics Unit at the University of Oxford Nuffield Department of Clinical Neurosciences University of Oxford Level 6, West Wing John Radcliffe Hospital, OX3 9DU Tel: +44 (0)1865 572490 E-Mail: david.pedrosa at ndcn.ox.ac.uk http://www.mrcbndu.ox.ac.uk/ ________________________________ Von: fieldtrip-bounces at science.ru.nl [fieldtrip-bounces at science.ru.nl]" im Auftrag von "Azeez Adebimpe [azeez.adebimpe5 at gmail.com] Gesendet: Freitag, 5. Februar 2016 13:56 An: FieldTrip discussion list Betreff: Re: [FieldTrip] ft_sourceanalysis, reshape error Hi David, Probably the channels' labels in leadfield and data are not the same. check it and try again. Azeez On Fri, Feb 5, 2016 at 8:47 AM, David Pedrosa > wrote: Dear list, after installing the newest version of Fieldtrip today, I have encountered a rather strange error . I am tying to compute corticomuscular coherence for an EEG/EMG dataset and it worked well so far. With the new version however, I get a reshape error I find fard to understand. This is the code: cfg = []; cfg.frequency = 20;; cfg.grid = leadfield; cfg.method = 'dics'; cfg.refchan = 'ExtR1'; cfg.channel = {'EEG' 'ExtR1'}; cfg.vol = hdm; cfg.dics.projectnoise = 'no'; cfg.dics.lambda = '1%'; cfg.dics.keepfilter = 'yes'; cfg.dics.keeptrials = 'yes'; cfg.dics.realfilter = 'yes'; sourceAll = ft_sourceanalysis(cfg, freqAll); but this hasn't changed. The error pops up at lines 619/620 of ft_sourceanalysis (Cf = reshape(sum(Cf, 1) / Ntrials, [Nchans Nchans]);), where it supposedly just averages the CSD matrix over trials. And it makes kind of sense as the line says to reshape the CSDs from a 1xNchans matrix into a [Nchans Nchans] one. But why is it poppin up now as nothing has changed in my analyses? I have checked the updates of the last months and I couldn't find anything related to this. So has any one an idea why the analysis crashes at this point. Thanks in advance Best, David ________________________________ Dr. David Pedrosa Clinical Research Fellow Medical Research Council Brain Network Dynamics Unit at the University of Oxford Nuffield Department of Clinical Neurosciences University of Oxford Level 6, West Wing John Radcliffe Hospital, OX3 9DU Tel: +44 (0)1865 572490 E-Mail: david.pedrosa at ndcn.ox.ac.uk http://www.mrcbndu.ox.ac.uk/ _______________________________________________ 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 Wed Feb 10 17:19:40 2016 From: jan.schoffelen at donders.ru.nl (Schoffelen, J.M. (Jan Mathijs)) Date: Wed, 10 Feb 2016 16:19:40 +0000 Subject: [FieldTrip] ft_sourceanalysis, reshape error In-Reply-To: References: , , <60FD4C45-84AB-4304-9620-F79109898282@fcdonders.ru.nl> Message-ID: <2442A09A-3D29-4D79-8391-1FC9485C08D7@fcdonders.ru.nl> Hi David, Could you first try and upgrade to the most recent version of Fieldtrip? Currently it seems that the reshaping that you mention on line 619/620 of ft_sourceanalysis, corresponds to lines 615/616 in my (i.e. the current) version. It could be that something goes wrong with the data handling, but I want to be sure that you’re not running into the problem with a buggy version of the code that may have been fixed in the meantime. Best Jan-Mathijs On Feb 10, 2016, at 5:04 PM, David Pedrosa > wrote: Hi Jan-Mathijs, thanks for your reply. I have explicitly made sure the order of both is identical (except for the EMG channel which is only present in the frequency analysis but not in the leadfield) and the problem still pops up, which makes me wonder if it could be something else as you suggested. Sorry for not being more precise. So the freqAll contains the fourier spectra for all channels and I have used many trials so I chose 'keeptrials'. Do you have any other suggestions what I could check or which settings might be causing this problem? Thanks Best, David ________________________________ Dr. David Pedrosa Clinical Research Fellow Medical Research Council Brain Network Dynamics Unit at the University of Oxford Nuffield Department of Clinical Neurosciences University of Oxford Level 6, West Wing John Radcliffe Hospital, OX3 9DU Tel: +44 (0)1865 572490 E-Mail: david.pedrosa at ndcn.ox.ac.uk http://www.mrcbndu.ox.ac.uk/ ________________________________ Von: fieldtrip-bounces at science.ru.nl [fieldtrip-bounces at science.ru.nl]" im Auftrag von "Schoffelen, J.M. (Jan Mathijs) [jan.schoffelen at donders.ru.nl] Gesendet: Mittwoch, 10. Februar 2016 15:30 An: FieldTrip discussion list Betreff: Re: [FieldTrip] ft_sourceanalysis, reshape error Hi David, Yes, I think that could cause the problem, although if that were true, your specific issue seems to be a convoluted manifestation of it. Bottom line with respect to channel order: when using pre-computed leadfields, the underlying assumption is more or less that the order of the channels, as represented in the leadfields, is the same as the order of the channels in the data. In principle, this can be accommodated with proper data bookkeeping, i.e. checking the labels that are associated with the data structure containing the forward model (i.e. the leadfield) against the channels in the data. We have started to move in this direction by inclusion of a label-field in data structures containing leadfields. Yet, the explicit check about channels and orderings of channels so far only throws an error if there’s a mismatch in the number of channels. Your reported error with a reshape issue could also reflect a problem with the data handling as such. Some more information would be appreciated in this regard. What does your freqAll contain in terms of spectral data? Fourier coefficients or cross-spectra? In case it’s cross-spectra, does it include multiple trials or not? If not, would it make sense to switch off the cfg.keeptrials flag in your cfg to ft_sourceanalysis. Best, Jan-Mathijs On Feb 10, 2016, at 3:54 PM, David Pedrosa > wrote: Hi Azeez, I have been checking leadfields and data labels and they are actually the same. But the order is slightly different. Do you think this may cause the problems? Thanks for your help. Best, David ________________________________ Dr. David Pedrosa Clinical Research Fellow Medical Research Council Brain Network Dynamics Unit at the University of Oxford Nuffield Department of Clinical Neurosciences University of Oxford Level 6, West Wing John Radcliffe Hospital, OX3 9DU Tel: +44 (0)1865 572490 E-Mail: david.pedrosa at ndcn.ox.ac.uk http://www.mrcbndu.ox.ac.uk/ ________________________________ Von: fieldtrip-bounces at science.ru.nl [fieldtrip-bounces at science.ru.nl]" im Auftrag von "Azeez Adebimpe [azeez.adebimpe5 at gmail.com] Gesendet: Freitag, 5. Februar 2016 22:44 An: FieldTrip discussion list Betreff: Re: [FieldTrip] ft_sourceanalysis, reshape error Hi David, Sorry for late reply, I was on the journey. The same issue happened to me before when the labels in the leadfield and data were not the same. if you have 'Fp1' in leadfield and 'FP1' in data, it will view as different channels. Azeez On Fri, Feb 5, 2016 at 9:51 AM, David Pedrosa > wrote: Hi Azeez, thank you for the fast reply! I hadn't considered that but I have checked and I use the same labels for both leadfield and data. I mean it makes kind of sense that the reshape doesn't work as it is now, but I don't know where the problem is before. Can you think of anything else? Best, David ________________________________ Dr. David Pedrosa Clinical Research Fellow Medical Research Council Brain Network Dynamics Unit at the University of Oxford Nuffield Department of Clinical Neurosciences University of Oxford Level 6, West Wing John Radcliffe Hospital, OX3 9DU Tel: +44 (0)1865 572490 E-Mail: david.pedrosa at ndcn.ox.ac.uk http://www.mrcbndu.ox.ac.uk/ ________________________________ Von: fieldtrip-bounces at science.ru.nl [fieldtrip-bounces at science.ru.nl]" im Auftrag von "Azeez Adebimpe [azeez.adebimpe5 at gmail.com] Gesendet: Freitag, 5. Februar 2016 13:56 An: FieldTrip discussion list Betreff: Re: [FieldTrip] ft_sourceanalysis, reshape error Hi David, Probably the channels' labels in leadfield and data are not the same. check it and try again. Azeez On Fri, Feb 5, 2016 at 8:47 AM, David Pedrosa > wrote: Dear list, after installing the newest version of Fieldtrip today, I have encountered a rather strange error . I am tying to compute corticomuscular coherence for an EEG/EMG dataset and it worked well so far. With the new version however, I get a reshape error I find fard to understand. This is the code: cfg = []; cfg.frequency = 20;; cfg.grid = leadfield; cfg.method = 'dics'; cfg.refchan = 'ExtR1'; cfg.channel = {'EEG' 'ExtR1'}; cfg.vol = hdm; cfg.dics.projectnoise = 'no'; cfg.dics.lambda = '1%'; cfg.dics.keepfilter = 'yes'; cfg.dics.keeptrials = 'yes'; cfg.dics.realfilter = 'yes'; sourceAll = ft_sourceanalysis(cfg, freqAll); but this hasn't changed. The error pops up at lines 619/620 of ft_sourceanalysis (Cf = reshape(sum(Cf, 1) / Ntrials, [Nchans Nchans]);), where it supposedly just averages the CSD matrix over trials. And it makes kind of sense as the line says to reshape the CSDs from a 1xNchans matrix into a [Nchans Nchans] one. But why is it poppin up now as nothing has changed in my analyses? I have checked the updates of the last months and I couldn't find anything related to this. So has any one an idea why the analysis crashes at this point. Thanks in advance Best, David ________________________________ Dr. David Pedrosa Clinical Research Fellow Medical Research Council Brain Network Dynamics Unit at the University of Oxford Nuffield Department of Clinical Neurosciences University of Oxford Level 6, West Wing John Radcliffe Hospital, OX3 9DU Tel: +44 (0)1865 572490 E-Mail: david.pedrosa at ndcn.ox.ac.uk http://www.mrcbndu.ox.ac.uk/ _______________________________________________ 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 _______________________________________________ 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 stephen.politzer-ahles at ling-phil.ox.ac.uk Wed Feb 10 17:30:24 2016 From: stephen.politzer-ahles at ling-phil.ox.ac.uk (Stephen Politzer-Ahles) Date: Wed, 10 Feb 2016 16:30:24 +0000 Subject: [FieldTrip] importing large edf data Message-ID: Hi Leila, I doubt that the file's creation time is stored with that level of precision. Depending on the filesystem of your computer, you might be able to find that information from the operating system's shell; see e.g. http://superuser.com/questions/937380/get-creation-time-of-file-in-milliseconds . I can't imagine what you would need this information for, though, anyway? Normally one would send some trigger events into the data file itself (e.g. on a trigger channel or something like that) so that all the information needed for event processing is within the file. Best, Steve --- Stephen Politzer-Ahles University of Oxford Language and Brain Lab Faculty of Linguistics, Phonetics & Philology http://users.ox.ac.uk/~cpgl0080/ > Message: 1 > Date: Wed, 10 Feb 2016 10:57:23 +0000 (UTC) > From: Leila Ayoubian > To: FieldTrip discussion list > Subject: Re: [FieldTrip] importing large edf data > Message-ID: > <844284323.1594104.1455101843736.JavaMail.yahoo at mail.yahoo.com> > Content-Type: text/plain; charset="utf-8" > > Hi;Thanks. > I have found the timing of the beginning of the file under > data.hdr.orig.T0 > However the time has the format of hh:mm:ssIf I would like to load the > timing of my file with milli-second precision what should I do? > Kind regards > > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From sreenivasan.r.nadar at gmail.com Wed Feb 10 17:33:06 2016 From: sreenivasan.r.nadar at gmail.com (Sreenivasan R. Nadar, Ph.D.) Date: Wed, 10 Feb 2016 11:33:06 -0500 Subject: [FieldTrip] Neuromag/ Elekta 306 layout file In-Reply-To: <620434cf-fd54-4ba5-b262-62e6170cba1c@email.android.com> References: <620434cf-fd54-4ba5-b262-62e6170cba1c@email.android.com> Message-ID: Hi Peter, I used the the 306 layout information from the Neuromag datafile using the following commands and it worked. cfg = []; cfg.component = [1:20]; cfg.comment = 'no'; cfg.skipscale = 'yes'; cfg.skipcomnt = 'no'; cfg.grad = data.grad; ft_topoplotIC(cfg, comp); -Sreenivasan On Mon, Feb 8, 2016 at 2:44 PM, Peter Goodin wrote: > Hi Sreenivasan, > > Try using the neuromag306all.lay and neuromag306cmb.lay layout files. > > Peter > On 9 Feb 2016 6:10 AM, "Sreenivasan R. Nadar, Ph.D." < > sreenivasan.r.nadar at gmail.com> wrote: > > Fieldtripers, > > Anybody has a layout file for Elekta/Neuromag system? I downloaded the > file from the following discussion list: > http://mailman.science.ru.nl/pipermail/fieldtrip/2007-March/001019.html. > However, this layout file give errors (i.e., Attempt to reference field of > non-structure array) when I use it for ft_topoplotIC(cfg,components). Am I > missing something? I used the following commands: > > %~~~~~~~~~~~~~~~ > clear all > > cfg = []; > cfg.dataset = 'C071_resting_150608.fif'; > cfg.hpfilter = 'yes' > cfg.hpfreq = 1; > cfg.channel = {'MEG', '-STI001', '-STI002','-STI003','-STI004', > '-STI005',..., > '-STI006','-STI007','-STI008','-STI101','-STI201','-STI301'}; > > data_continuous = ft_preprocessing(cfg); > > %resample the data to 100Hz > cfg = []; > cfg.resamplefs = 100; > [data] = ft_resampledata(cfg, data_continuous) > > %% running ICA and cleaning data > cfg = []; > cfg.method = 'runica'; > comp = ft_componentanalysis(cfg, data); > > cfg = []; > cfg.component = [1:50]; > cfg.layout = 'NM306all.mat'; > cfg.comment = 'no'; > ft_topoplotIC(cfg, comp); > > %~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ > Thank you > > Sreenivasan > > > > _______________________________________________ > 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 laxmi.shaw22 at gmail.com Wed Feb 10 18:00:01 2016 From: laxmi.shaw22 at gmail.com (Laxmi Shaw) Date: Wed, 10 Feb 2016 22:30:01 +0530 Subject: [FieldTrip] related to topoplot Message-ID: Hello Fieldtrip users, I am new to this tool.I want to use topoplot to plot any parametric quantification of EEG study.Can anybody help me in this regards Regards -- Laxmi Shaw Research Scholar(PhD) IIT Kharagpur West Bengal Ph no-08388837821 -------------- next part -------------- An HTML attachment was scrubbed... URL: From david.pedrosa at ndcn.ox.ac.uk Wed Feb 10 18:31:22 2016 From: david.pedrosa at ndcn.ox.ac.uk (David Pedrosa) Date: Wed, 10 Feb 2016 17:31:22 +0000 Subject: [FieldTrip] ft_sourceanalysis, reshape error In-Reply-To: <60FD4C45-84AB-4304-9620-F79109898282@fcdonders.ru.nl> References: , , <60FD4C45-84AB-4304-9620-F79109898282@fcdonders.ru.nl> Message-ID: Hi Jan-Mathijs, good point! I now have the most recent version but the error is still there, now at lines 615/616. Best, David ________________________________ Von: fieldtrip-bounces at science.ru.nl [fieldtrip-bounces at science.ru.nl]" im Auftrag von "Schoffelen, J.M. (Jan Mathijs) [jan.schoffelen at donders.ru.nl] Gesendet: Mittwoch, 10. Februar 2016 17:19 An: FieldTrip discussion list Betreff: Re: [FieldTrip] ft_sourceanalysis, reshape error Hi David, Could you first try and upgrade to the most recent version of Fieldtrip? Currently it seems that the reshaping that you mention on line 619/620 of ft_sourceanalysis, corresponds to lines 615/616 in my (i.e. the current) version. It could be that something goes wrong with the data handling, but I want to be sure that you’re not running into the problem with a buggy version of the code that may have been fixed in the meantime. Best Jan-Mathijs On Feb 10, 2016, at 5:04 PM, David Pedrosa > wrote: Hi Jan-Mathijs, thanks for your reply. I have explicitly made sure the order of both is identical (except for the EMG channel which is only present in the frequency analysis but not in the leadfield) and the problem still pops up, which makes me wonder if it could be something else as you suggested. Sorry for not being more precise. So the freqAll contains the fourier spectra for all channels and I have used many trials so I chose 'keeptrials'. Do you have any other suggestions what I could check or which settings might be causing this problem? Thanks Best, David ________________________________ Dr. David Pedrosa Clinical Research Fellow Medical Research Council Brain Network Dynamics Unit at the University of Oxford Nuffield Department of Clinical Neurosciences University of Oxford Level 6, West Wing John Radcliffe Hospital, OX3 9DU Tel: +44 (0)1865 572490 E-Mail: david.pedrosa at ndcn.ox.ac.uk http://www.mrcbndu.ox.ac.uk/ ________________________________ Von: fieldtrip-bounces at science.ru.nl [fieldtrip-bounces at science.ru.nl]" im Auftrag von "Schoffelen, J.M. (Jan Mathijs) [jan.schoffelen at donders.ru.nl] Gesendet: Mittwoch, 10. Februar 2016 15:30 An: FieldTrip discussion list Betreff: Re: [FieldTrip] ft_sourceanalysis, reshape error Hi David, Yes, I think that could cause the problem, although if that were true, your specific issue seems to be a convoluted manifestation of it. Bottom line with respect to channel order: when using pre-computed leadfields, the underlying assumption is more or less that the order of the channels, as represented in the leadfields, is the same as the order of the channels in the data. In principle, this can be accommodated with proper data bookkeeping, i.e. checking the labels that are associated with the data structure containing the forward model (i.e. the leadfield) against the channels in the data. We have started to move in this direction by inclusion of a label-field in data structures containing leadfields. Yet, the explicit check about channels and orderings of channels so far only throws an error if there’s a mismatch in the number of channels. Your reported error with a reshape issue could also reflect a problem with the data handling as such. Some more information would be appreciated in this regard. What does your freqAll contain in terms of spectral data? Fourier coefficients or cross-spectra? In case it’s cross-spectra, does it include multiple trials or not? If not, would it make sense to switch off the cfg.keeptrials flag in your cfg to ft_sourceanalysis. Best, Jan-Mathijs On Feb 10, 2016, at 3:54 PM, David Pedrosa > wrote: Hi Azeez, I have been checking leadfields and data labels and they are actually the same. But the order is slightly different. Do you think this may cause the problems? Thanks for your help. Best, David ________________________________ Dr. David Pedrosa Clinical Research Fellow Medical Research Council Brain Network Dynamics Unit at the University of Oxford Nuffield Department of Clinical Neurosciences University of Oxford Level 6, West Wing John Radcliffe Hospital, OX3 9DU Tel: +44 (0)1865 572490 E-Mail: david.pedrosa at ndcn.ox.ac.uk http://www.mrcbndu.ox.ac.uk/ ________________________________ Von: fieldtrip-bounces at science.ru.nl [fieldtrip-bounces at science.ru.nl]" im Auftrag von "Azeez Adebimpe [azeez.adebimpe5 at gmail.com] Gesendet: Freitag, 5. Februar 2016 22:44 An: FieldTrip discussion list Betreff: Re: [FieldTrip] ft_sourceanalysis, reshape error Hi David, Sorry for late reply, I was on the journey. The same issue happened to me before when the labels in the leadfield and data were not the same. if you have 'Fp1' in leadfield and 'FP1' in data, it will view as different channels. Azeez On Fri, Feb 5, 2016 at 9:51 AM, David Pedrosa > wrote: Hi Azeez, thank you for the fast reply! I hadn't considered that but I have checked and I use the same labels for both leadfield and data. I mean it makes kind of sense that the reshape doesn't work as it is now, but I don't know where the problem is before. Can you think of anything else? Best, David ________________________________ Dr. David Pedrosa Clinical Research Fellow Medical Research Council Brain Network Dynamics Unit at the University of Oxford Nuffield Department of Clinical Neurosciences University of Oxford Level 6, West Wing John Radcliffe Hospital, OX3 9DU Tel: +44 (0)1865 572490 E-Mail: david.pedrosa at ndcn.ox.ac.uk http://www.mrcbndu.ox.ac.uk/ ________________________________ Von: fieldtrip-bounces at science.ru.nl [fieldtrip-bounces at science.ru.nl]" im Auftrag von "Azeez Adebimpe [azeez.adebimpe5 at gmail.com] Gesendet: Freitag, 5. Februar 2016 13:56 An: FieldTrip discussion list Betreff: Re: [FieldTrip] ft_sourceanalysis, reshape error Hi David, Probably the channels' labels in leadfield and data are not the same. check it and try again. Azeez On Fri, Feb 5, 2016 at 8:47 AM, David Pedrosa > wrote: Dear list, after installing the newest version of Fieldtrip today, I have encountered a rather strange error . I am tying to compute corticomuscular coherence for an EEG/EMG dataset and it worked well so far. With the new version however, I get a reshape error I find fard to understand. This is the code: cfg = []; cfg.frequency = 20;; cfg.grid = leadfield; cfg.method = 'dics'; cfg.refchan = 'ExtR1'; cfg.channel = {'EEG' 'ExtR1'}; cfg.vol = hdm; cfg.dics.projectnoise = 'no'; cfg.dics.lambda = '1%'; cfg.dics.keepfilter = 'yes'; cfg.dics.keeptrials = 'yes'; cfg.dics.realfilter = 'yes'; sourceAll = ft_sourceanalysis(cfg, freqAll); but this hasn't changed. The error pops up at lines 619/620 of ft_sourceanalysis (Cf = reshape(sum(Cf, 1) / Ntrials, [Nchans Nchans]);), where it supposedly just averages the CSD matrix over trials. And it makes kind of sense as the line says to reshape the CSDs from a 1xNchans matrix into a [Nchans Nchans] one. But why is it poppin up now as nothing has changed in my analyses? I have checked the updates of the last months and I couldn't find anything related to this. So has any one an idea why the analysis crashes at this point. Thanks in advance Best, David ________________________________ Dr. David Pedrosa Clinical Research Fellow Medical Research Council Brain Network Dynamics Unit at the University of Oxford Nuffield Department of Clinical Neurosciences University of Oxford Level 6, West Wing John Radcliffe Hospital, OX3 9DU Tel: +44 (0)1865 572490 E-Mail: david.pedrosa at ndcn.ox.ac.uk http://www.mrcbndu.ox.ac.uk/ _______________________________________________ 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 _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip ________________________________ Dr. David Pedrosa Clinical Research Fellow Medical Research Council Brain Network Dynamics Unit at the University of Oxford Nuffield Department of Clinical Neurosciences University of Oxford Level 6, West Wing John Radcliffe Hospital, OX3 9DU Tel: +44 (0)1865 572490 E-Mail: david.pedrosa at ndcn.ox.ac.uk http://www.mrcbndu.ox.ac.uk/ ________________________________ Von: fieldtrip-bounces at science.ru.nl [fieldtrip-bounces at science.ru.nl]" im Auftrag von "Schoffelen, J.M. (Jan Mathijs) [jan.schoffelen at donders.ru.nl] Gesendet: Mittwoch, 10. Februar 2016 15:30 An: FieldTrip discussion list Betreff: Re: [FieldTrip] ft_sourceanalysis, reshape error Hi David, Yes, I think that could cause the problem, although if that were true, your specific issue seems to be a convoluted manifestation of it. Bottom line with respect to channel order: when using pre-computed leadfields, the underlying assumption is more or less that the order of the channels, as represented in the leadfields, is the same as the order of the channels in the data. In principle, this can be accommodated with proper data bookkeeping, i.e. checking the labels that are associated with the data structure containing the forward model (i.e. the leadfield) against the channels in the data. We have started to move in this direction by inclusion of a label-field in data structures containing leadfields. Yet, the explicit check about channels and orderings of channels so far only throws an error if there’s a mismatch in the number of channels. Your reported error with a reshape issue could also reflect a problem with the data handling as such. Some more information would be appreciated in this regard. What does your freqAll contain in terms of spectral data? Fourier coefficients or cross-spectra? In case it’s cross-spectra, does it include multiple trials or not? If not, would it make sense to switch off the cfg.keeptrials flag in your cfg to ft_sourceanalysis. Best, Jan-Mathijs On Feb 10, 2016, at 3:54 PM, David Pedrosa > wrote: Hi Azeez, I have been checking leadfields and data labels and they are actually the same. But the order is slightly different. Do you think this may cause the problems? Thanks for your help. Best, David ________________________________ Dr. David Pedrosa Clinical Research Fellow Medical Research Council Brain Network Dynamics Unit at the University of Oxford Nuffield Department of Clinical Neurosciences University of Oxford Level 6, West Wing John Radcliffe Hospital, OX3 9DU Tel: +44 (0)1865 572490 E-Mail: david.pedrosa at ndcn.ox.ac.uk http://www.mrcbndu.ox.ac.uk/ ________________________________ Von: fieldtrip-bounces at science.ru.nl [fieldtrip-bounces at science.ru.nl]" im Auftrag von "Azeez Adebimpe [azeez.adebimpe5 at gmail.com] Gesendet: Freitag, 5. Februar 2016 22:44 An: FieldTrip discussion list Betreff: Re: [FieldTrip] ft_sourceanalysis, reshape error Hi David, Sorry for late reply, I was on the journey. The same issue happened to me before when the labels in the leadfield and data were not the same. if you have 'Fp1' in leadfield and 'FP1' in data, it will view as different channels. Azeez On Fri, Feb 5, 2016 at 9:51 AM, David Pedrosa > wrote: Hi Azeez, thank you for the fast reply! I hadn't considered that but I have checked and I use the same labels for both leadfield and data. I mean it makes kind of sense that the reshape doesn't work as it is now, but I don't know where the problem is before. Can you think of anything else? Best, David ________________________________ Dr. David Pedrosa Clinical Research Fellow Medical Research Council Brain Network Dynamics Unit at the University of Oxford Nuffield Department of Clinical Neurosciences University of Oxford Level 6, West Wing John Radcliffe Hospital, OX3 9DU Tel: +44 (0)1865 572490 E-Mail: david.pedrosa at ndcn.ox.ac.uk http://www.mrcbndu.ox.ac.uk/ ________________________________ Von: fieldtrip-bounces at science.ru.nl [fieldtrip-bounces at science.ru.nl]" im Auftrag von "Azeez Adebimpe [azeez.adebimpe5 at gmail.com] Gesendet: Freitag, 5. Februar 2016 13:56 An: FieldTrip discussion list Betreff: Re: [FieldTrip] ft_sourceanalysis, reshape error Hi David, Probably the channels' labels in leadfield and data are not the same. check it and try again. Azeez On Fri, Feb 5, 2016 at 8:47 AM, David Pedrosa > wrote: Dear list, after installing the newest version of Fieldtrip today, I have encountered a rather strange error . I am tying to compute corticomuscular coherence for an EEG/EMG dataset and it worked well so far. With the new version however, I get a reshape error I find fard to understand. This is the code: cfg = []; cfg.frequency = 20;; cfg.grid = leadfield; cfg.method = 'dics'; cfg.refchan = 'ExtR1'; cfg.channel = {'EEG' 'ExtR1'}; cfg.vol = hdm; cfg.dics.projectnoise = 'no'; cfg.dics.lambda = '1%'; cfg.dics.keepfilter = 'yes'; cfg.dics.keeptrials = 'yes'; cfg.dics.realfilter = 'yes'; sourceAll = ft_sourceanalysis(cfg, freqAll); but this hasn't changed. The error pops up at lines 619/620 of ft_sourceanalysis (Cf = reshape(sum(Cf, 1) / Ntrials, [Nchans Nchans]);), where it supposedly just averages the CSD matrix over trials. And it makes kind of sense as the line says to reshape the CSDs from a 1xNchans matrix into a [Nchans Nchans] one. But why is it poppin up now as nothing has changed in my analyses? I have checked the updates of the last months and I couldn't find anything related to this. So has any one an idea why the analysis crashes at this point. Thanks in advance Best, David ________________________________ Dr. David Pedrosa Clinical Research Fellow Medical Research Council Brain Network Dynamics Unit at the University of Oxford Nuffield Department of Clinical Neurosciences University of Oxford Level 6, West Wing John Radcliffe Hospital, OX3 9DU Tel: +44 (0)1865 572490 E-Mail: david.pedrosa at ndcn.ox.ac.uk http://www.mrcbndu.ox.ac.uk/ _______________________________________________ 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 Max.Cantor at Colorado.EDU Thu Feb 11 01:03:36 2016 From: Max.Cantor at Colorado.EDU (Max Cantor) Date: Wed, 10 Feb 2016 17:03:36 -0700 Subject: [FieldTrip] define trials from multiple datasets Message-ID: Hi fieldtrip community, I'm trying to use ft_definetrial to create a trial definition from 8 datasets, recorded back-to-back from a subject, and then use ft_redefinetrial with that trial definition and raw data that was concatenated in eeglab and converted to a fieldtrip structure using eeglab2fieldtrip. Is this feasible in a relatively straightforward way, or would I be better off doing the epoching in eeglab as well before converting back to fieldtrip? On a side note, I chose to concatenate the data in eeglab because I could not figure out a convenient way to do so in fieldtrip. I know there is ft_appenddata, but as best as I can tell this is meant to be used after epoching, and the sample information was not being concatenated (or at least not properly), which was creating problems down the line with artifact rejection in my pipeline. Maybe there was some other way to do this properly in fieldtrip that I had not considered in the first place. Best, Max -- Max Cantor Graduate Student Cognitive Neuroscience of Language Lab University of Colorado Boulder -------------- next part -------------- An HTML attachment was scrubbed... URL: From a.stolk8 at gmail.com Thu Feb 11 01:15:55 2016 From: a.stolk8 at gmail.com (Arjen Stolk) Date: Wed, 10 Feb 2016 16:15:55 -0800 Subject: [FieldTrip] define trials from multiple datasets In-Reply-To: References: Message-ID: Hi Max, See these pages and judge for yourself: http://www.fieldtriptoolbox.org/example/getting_started_with_reading_raw_eeg_or_meg_data http://www.fieldtriptoolbox.org/example/making_your_own_trialfun_for_conditional_trial_definition If your trials are defined as x1 time before a certain trigger until x2 time after, it's very easy. If it's slightly more complicated, then check that second page. In short, the idea there is to make ft_definetrial call a tailormade trial function (cfg.trialfun). The good news is that if the triggers and trials are the same for each subject, you only have to make one function. Hope that gets you started, Arjen 2016-02-10 16:03 GMT-08:00 Max Cantor : > Hi fieldtrip community, > > I'm trying to use ft_definetrial to create a trial definition from 8 > datasets, recorded back-to-back from a subject, and then use > ft_redefinetrial with that trial definition and raw data that was > concatenated in eeglab and converted to a fieldtrip structure using > eeglab2fieldtrip. Is this feasible in a relatively straightforward way, or > would I be better off doing the epoching in eeglab as well before > converting back to fieldtrip? > > On a side note, I chose to concatenate the data in eeglab because I could > not figure out a convenient way to do so in fieldtrip. I know there is > ft_appenddata, but as best as I can tell this is meant to be used after > epoching, and the sample information was not being concatenated (or at > least not properly), which was creating problems down the line with > artifact rejection in my pipeline. Maybe there was some other way to do > this properly in fieldtrip that I had not considered in the first place. > > Best, > > Max > > -- > Max Cantor > Graduate Student > Cognitive Neuroscience of Language Lab > University of Colorado Boulder > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > -------------- next part -------------- An HTML attachment was scrubbed... URL: From a.stolk8 at gmail.com Thu Feb 11 01:18:40 2016 From: a.stolk8 at gmail.com (Arjen Stolk) Date: Wed, 10 Feb 2016 16:18:40 -0800 Subject: [FieldTrip] define trials from multiple datasets In-Reply-To: References: Message-ID: I see now you wrote 8 sessions with the same subject. You could make a loop that conceptually looks like this: for s = 1:numsessions cfg = ft_definetrial(cfg); data{s} = ft_preprocessing(cfg); end data_all = ft_appenddata([], data{:}); 2016-02-10 16:15 GMT-08:00 Arjen Stolk : > Hi Max, > > See these pages and judge for yourself: > > http://www.fieldtriptoolbox.org/example/getting_started_with_reading_raw_eeg_or_meg_data > > http://www.fieldtriptoolbox.org/example/making_your_own_trialfun_for_conditional_trial_definition > > If your trials are defined as x1 time before a certain trigger until x2 > time after, it's very easy. If it's slightly more complicated, then check > that second page. In short, the idea there is to make ft_definetrial call a > tailormade trial function (cfg.trialfun). The good news is that if the > triggers and trials are the same for each subject, you only have to make > one function. > > Hope that gets you started, > Arjen > > 2016-02-10 16:03 GMT-08:00 Max Cantor : > >> Hi fieldtrip community, >> >> I'm trying to use ft_definetrial to create a trial definition from 8 >> datasets, recorded back-to-back from a subject, and then use >> ft_redefinetrial with that trial definition and raw data that was >> concatenated in eeglab and converted to a fieldtrip structure using >> eeglab2fieldtrip. Is this feasible in a relatively straightforward way, or >> would I be better off doing the epoching in eeglab as well before >> converting back to fieldtrip? >> >> On a side note, I chose to concatenate the data in eeglab because I could >> not figure out a convenient way to do so in fieldtrip. I know there is >> ft_appenddata, but as best as I can tell this is meant to be used after >> epoching, and the sample information was not being concatenated (or at >> least not properly), which was creating problems down the line with >> artifact rejection in my pipeline. Maybe there was some other way to do >> this properly in fieldtrip that I had not considered in the first place. >> >> Best, >> >> Max >> >> -- >> Max Cantor >> Graduate Student >> Cognitive Neuroscience of Language Lab >> University of Colorado Boulder >> >> _______________________________________________ >> 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 Max.Cantor at Colorado.EDU Thu Feb 11 01:52:30 2016 From: Max.Cantor at Colorado.EDU (Max Cantor) Date: Wed, 10 Feb 2016 17:52:30 -0700 Subject: [FieldTrip] define trials from multiple datasets In-Reply-To: References: Message-ID: Hi Arjen, I had a feeling it would involve creating my own trial function, which is something I've never done but have looked over in the past, so I'll give that a shot, thanks! As for your suggested loop... I had tried something almost like that, except preprocessing the data first and then using ft_redefinetrial, and then concatenating them all with ft_appenddata. However, What I ended up realizing was that the .trl array was only being retained from one of the 8 sessions, which was creating problems with artifact rejection since the artifact rejection functions use the sample points from .trl. Are you suggesting that if I had used ft_definetrial and then that configuration in ft_preprocessing, rather than what I did, that it would have concatenated .trl for all sessions? If this is not the case, and either way should work, maybe I did something else wrong, or misdiagnosed the problem altogether... On Wed, Feb 10, 2016 at 5:18 PM, Arjen Stolk wrote: > I see now you wrote 8 sessions with the same subject. You could make a > loop that conceptually looks like this: > > for s = 1:numsessions > > cfg = ft_definetrial(cfg); > data{s} = ft_preprocessing(cfg); > > end > data_all = ft_appenddata([], data{:}); > > 2016-02-10 16:15 GMT-08:00 Arjen Stolk : > >> Hi Max, >> >> See these pages and judge for yourself: >> >> http://www.fieldtriptoolbox.org/example/getting_started_with_reading_raw_eeg_or_meg_data >> >> http://www.fieldtriptoolbox.org/example/making_your_own_trialfun_for_conditional_trial_definition >> >> If your trials are defined as x1 time before a certain trigger until x2 >> time after, it's very easy. If it's slightly more complicated, then check >> that second page. In short, the idea there is to make ft_definetrial call a >> tailormade trial function (cfg.trialfun). The good news is that if the >> triggers and trials are the same for each subject, you only have to make >> one function. >> >> Hope that gets you started, >> Arjen >> >> 2016-02-10 16:03 GMT-08:00 Max Cantor : >> >>> Hi fieldtrip community, >>> >>> I'm trying to use ft_definetrial to create a trial definition from 8 >>> datasets, recorded back-to-back from a subject, and then use >>> ft_redefinetrial with that trial definition and raw data that was >>> concatenated in eeglab and converted to a fieldtrip structure using >>> eeglab2fieldtrip. Is this feasible in a relatively straightforward way, or >>> would I be better off doing the epoching in eeglab as well before >>> converting back to fieldtrip? >>> >>> On a side note, I chose to concatenate the data in eeglab because I >>> could not figure out a convenient way to do so in fieldtrip. I know there >>> is ft_appenddata, but as best as I can tell this is meant to be used after >>> epoching, and the sample information was not being concatenated (or at >>> least not properly), which was creating problems down the line with >>> artifact rejection in my pipeline. Maybe there was some other way to do >>> this properly in fieldtrip that I had not considered in the first place. >>> >>> Best, >>> >>> Max >>> >>> -- >>> Max Cantor >>> Graduate Student >>> Cognitive Neuroscience of Language Lab >>> University of Colorado Boulder >>> >>> _______________________________________________ >>> fieldtrip mailing list >>> fieldtrip at donders.ru.nl >>> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip >>> >> >> > -- Max Cantor Graduate Student Cognitive Neuroscience of Language Lab University of Colorado Boulder -------------- next part -------------- An HTML attachment was scrubbed... URL: From jan.schoffelen at donders.ru.nl Thu Feb 11 09:00:29 2016 From: jan.schoffelen at donders.ru.nl (Schoffelen, J.M. (Jan Mathijs)) Date: Thu, 11 Feb 2016 08:00:29 +0000 Subject: [FieldTrip] ft_sourceanalysis, reshape error In-Reply-To: References: , , <60FD4C45-84AB-4304-9620-F79109898282@fcdonders.ru.nl> Message-ID: <0DBD24DC-AF86-423B-8903-7795EF34C696@fcdonders.ru.nl> Hi David, I realized that the issue you raised is related to something that has already been flagged in our bugzilla issue tracker system (on bugzilla.fieldtriptoolbox.org, look for bug #3029). As a matter of fact, I filed this one myself, so I should have recognized it earlier. Although your problem is slightly different, it’s indeed related to the altered data handling that also causes trouble in the bug mentioned. I suggest that you sign up on bugzilla and add yourself to the CC list of this bug (this suggestion of course also holds for the person who followed up on this thread in an e-mail sent to my personal e-mail account :o) ). In this way you can keep an eye on our progress fixing it, and provide feedback/input. Best wishes, Jan-Mathijs On Feb 10, 2016, at 6:31 PM, David Pedrosa > wrote: Hi Jan-Mathijs, good point! I now have the most recent version but the error is still there, now at lines 615/616. Best, David ________________________________ Von: fieldtrip-bounces at science.ru.nl [fieldtrip-bounces at science.ru.nl]" im Auftrag von "Schoffelen, J.M. (Jan Mathijs) [jan.schoffelen at donders.ru.nl] Gesendet: Mittwoch, 10. Februar 2016 17:19 An: FieldTrip discussion list Betreff: Re: [FieldTrip] ft_sourceanalysis, reshape error Hi David, Could you first try and upgrade to the most recent version of Fieldtrip? Currently it seems that the reshaping that you mention on line 619/620 of ft_sourceanalysis, corresponds to lines 615/616 in my (i.e. the current) version. It could be that something goes wrong with the data handling, but I want to be sure that you’re not running into the problem with a buggy version of the code that may have been fixed in the meantime. Best Jan-Mathijs On Feb 10, 2016, at 5:04 PM, David Pedrosa > wrote: Hi Jan-Mathijs, thanks for your reply. I have explicitly made sure the order of both is identical (except for the EMG channel which is only present in the frequency analysis but not in the leadfield) and the problem still pops up, which makes me wonder if it could be something else as you suggested. Sorry for not being more precise. So the freqAll contains the fourier spectra for all channels and I have used many trials so I chose 'keeptrials'. Do you have any other suggestions what I could check or which settings might be causing this problem? Thanks Best, David ________________________________ Dr. David Pedrosa Clinical Research Fellow Medical Research Council Brain Network Dynamics Unit at the University of Oxford Nuffield Department of Clinical Neurosciences University of Oxford Level 6, West Wing John Radcliffe Hospital, OX3 9DU Tel: +44 (0)1865 572490 E-Mail: david.pedrosa at ndcn.ox.ac.uk http://www.mrcbndu.ox.ac.uk/ ________________________________ Von: fieldtrip-bounces at science.ru.nl [fieldtrip-bounces at science.ru.nl]" im Auftrag von "Schoffelen, J.M. (Jan Mathijs) [jan.schoffelen at donders.ru.nl] Gesendet: Mittwoch, 10. Februar 2016 15:30 An: FieldTrip discussion list Betreff: Re: [FieldTrip] ft_sourceanalysis, reshape error Hi David, Yes, I think that could cause the problem, although if that were true, your specific issue seems to be a convoluted manifestation of it. Bottom line with respect to channel order: when using pre-computed leadfields, the underlying assumption is more or less that the order of the channels, as represented in the leadfields, is the same as the order of the channels in the data. In principle, this can be accommodated with proper data bookkeeping, i.e. checking the labels that are associated with the data structure containing the forward model (i.e. the leadfield) against the channels in the data. We have started to move in this direction by inclusion of a label-field in data structures containing leadfields. Yet, the explicit check about channels and orderings of channels so far only throws an error if there’s a mismatch in the number of channels. Your reported error with a reshape issue could also reflect a problem with the data handling as such. Some more information would be appreciated in this regard. What does your freqAll contain in terms of spectral data? Fourier coefficients or cross-spectra? In case it’s cross-spectra, does it include multiple trials or not? If not, would it make sense to switch off the cfg.keeptrials flag in your cfg to ft_sourceanalysis. Best, Jan-Mathijs On Feb 10, 2016, at 3:54 PM, David Pedrosa > wrote: Hi Azeez, I have been checking leadfields and data labels and they are actually the same. But the order is slightly different. Do you think this may cause the problems? Thanks for your help. Best, David ________________________________ Dr. David Pedrosa Clinical Research Fellow Medical Research Council Brain Network Dynamics Unit at the University of Oxford Nuffield Department of Clinical Neurosciences University of Oxford Level 6, West Wing John Radcliffe Hospital, OX3 9DU Tel: +44 (0)1865 572490 E-Mail: david.pedrosa at ndcn.ox.ac.uk http://www.mrcbndu.ox.ac.uk/ ________________________________ Von: fieldtrip-bounces at science.ru.nl [fieldtrip-bounces at science.ru.nl]" im Auftrag von "Azeez Adebimpe [azeez.adebimpe5 at gmail.com] Gesendet: Freitag, 5. Februar 2016 22:44 An: FieldTrip discussion list Betreff: Re: [FieldTrip] ft_sourceanalysis, reshape error Hi David, Sorry for late reply, I was on the journey. The same issue happened to me before when the labels in the leadfield and data were not the same. if you have 'Fp1' in leadfield and 'FP1' in data, it will view as different channels. Azeez On Fri, Feb 5, 2016 at 9:51 AM, David Pedrosa > wrote: Hi Azeez, thank you for the fast reply! I hadn't considered that but I have checked and I use the same labels for both leadfield and data. I mean it makes kind of sense that the reshape doesn't work as it is now, but I don't know where the problem is before. Can you think of anything else? Best, David ________________________________ Dr. David Pedrosa Clinical Research Fellow Medical Research Council Brain Network Dynamics Unit at the University of Oxford Nuffield Department of Clinical Neurosciences University of Oxford Level 6, West Wing John Radcliffe Hospital, OX3 9DU Tel: +44 (0)1865 572490 E-Mail: david.pedrosa at ndcn.ox.ac.uk http://www.mrcbndu.ox.ac.uk/ ________________________________ Von: fieldtrip-bounces at science.ru.nl [fieldtrip-bounces at science.ru.nl]" im Auftrag von "Azeez Adebimpe [azeez.adebimpe5 at gmail.com] Gesendet: Freitag, 5. Februar 2016 13:56 An: FieldTrip discussion list Betreff: Re: [FieldTrip] ft_sourceanalysis, reshape error Hi David, Probably the channels' labels in leadfield and data are not the same. check it and try again. Azeez On Fri, Feb 5, 2016 at 8:47 AM, David Pedrosa > wrote: Dear list, after installing the newest version of Fieldtrip today, I have encountered a rather strange error . I am tying to compute corticomuscular coherence for an EEG/EMG dataset and it worked well so far. With the new version however, I get a reshape error I find fard to understand. This is the code: cfg = []; cfg.frequency = 20;; cfg.grid = leadfield; cfg.method = 'dics'; cfg.refchan = 'ExtR1'; cfg.channel = {'EEG' 'ExtR1'}; cfg.vol = hdm; cfg.dics.projectnoise = 'no'; cfg.dics.lambda = '1%'; cfg.dics.keepfilter = 'yes'; cfg.dics.keeptrials = 'yes'; cfg.dics.realfilter = 'yes'; sourceAll = ft_sourceanalysis(cfg, freqAll); but this hasn't changed. The error pops up at lines 619/620 of ft_sourceanalysis (Cf = reshape(sum(Cf, 1) / Ntrials, [Nchans Nchans]);), where it supposedly just averages the CSD matrix over trials. And it makes kind of sense as the line says to reshape the CSDs from a 1xNchans matrix into a [Nchans Nchans] one. But why is it poppin up now as nothing has changed in my analyses? I have checked the updates of the last months and I couldn't find anything related to this. So has any one an idea why the analysis crashes at this point. Thanks in advance Best, David ________________________________ Dr. David Pedrosa Clinical Research Fellow Medical Research Council Brain Network Dynamics Unit at the University of Oxford Nuffield Department of Clinical Neurosciences University of Oxford Level 6, West Wing John Radcliffe Hospital, OX3 9DU Tel: +44 (0)1865 572490 E-Mail: david.pedrosa at ndcn.ox.ac.uk http://www.mrcbndu.ox.ac.uk/ _______________________________________________ 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 _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip ________________________________ Dr. David Pedrosa Clinical Research Fellow Medical Research Council Brain Network Dynamics Unit at the University of Oxford Nuffield Department of Clinical Neurosciences University of Oxford Level 6, West Wing John Radcliffe Hospital, OX3 9DU Tel: +44 (0)1865 572490 E-Mail: david.pedrosa at ndcn.ox.ac.uk http://www.mrcbndu.ox.ac.uk/ ________________________________ Von: fieldtrip-bounces at science.ru.nl [fieldtrip-bounces at science.ru.nl]" im Auftrag von "Schoffelen, J.M. (Jan Mathijs) [jan.schoffelen at donders.ru.nl] Gesendet: Mittwoch, 10. Februar 2016 15:30 An: FieldTrip discussion list Betreff: Re: [FieldTrip] ft_sourceanalysis, reshape error Hi David, Yes, I think that could cause the problem, although if that were true, your specific issue seems to be a convoluted manifestation of it. Bottom line with respect to channel order: when using pre-computed leadfields, the underlying assumption is more or less that the order of the channels, as represented in the leadfields, is the same as the order of the channels in the data. In principle, this can be accommodated with proper data bookkeeping, i.e. checking the labels that are associated with the data structure containing the forward model (i.e. the leadfield) against the channels in the data. We have started to move in this direction by inclusion of a label-field in data structures containing leadfields. Yet, the explicit check about channels and orderings of channels so far only throws an error if there’s a mismatch in the number of channels. Your reported error with a reshape issue could also reflect a problem with the data handling as such. Some more information would be appreciated in this regard. What does your freqAll contain in terms of spectral data? Fourier coefficients or cross-spectra? In case it’s cross-spectra, does it include multiple trials or not? If not, would it make sense to switch off the cfg.keeptrials flag in your cfg to ft_sourceanalysis. Best, Jan-Mathijs On Feb 10, 2016, at 3:54 PM, David Pedrosa > wrote: Hi Azeez, I have been checking leadfields and data labels and they are actually the same. But the order is slightly different. Do you think this may cause the problems? Thanks for your help. Best, David ________________________________ Dr. David Pedrosa Clinical Research Fellow Medical Research Council Brain Network Dynamics Unit at the University of Oxford Nuffield Department of Clinical Neurosciences University of Oxford Level 6, West Wing John Radcliffe Hospital, OX3 9DU Tel: +44 (0)1865 572490 E-Mail: david.pedrosa at ndcn.ox.ac.uk http://www.mrcbndu.ox.ac.uk/ ________________________________ Von: fieldtrip-bounces at science.ru.nl [fieldtrip-bounces at science.ru.nl]" im Auftrag von "Azeez Adebimpe [azeez.adebimpe5 at gmail.com] Gesendet: Freitag, 5. Februar 2016 22:44 An: FieldTrip discussion list Betreff: Re: [FieldTrip] ft_sourceanalysis, reshape error Hi David, Sorry for late reply, I was on the journey. The same issue happened to me before when the labels in the leadfield and data were not the same. if you have 'Fp1' in leadfield and 'FP1' in data, it will view as different channels. Azeez On Fri, Feb 5, 2016 at 9:51 AM, David Pedrosa > wrote: Hi Azeez, thank you for the fast reply! I hadn't considered that but I have checked and I use the same labels for both leadfield and data. I mean it makes kind of sense that the reshape doesn't work as it is now, but I don't know where the problem is before. Can you think of anything else? Best, David ________________________________ Dr. David Pedrosa Clinical Research Fellow Medical Research Council Brain Network Dynamics Unit at the University of Oxford Nuffield Department of Clinical Neurosciences University of Oxford Level 6, West Wing John Radcliffe Hospital, OX3 9DU Tel: +44 (0)1865 572490 E-Mail: david.pedrosa at ndcn.ox.ac.uk http://www.mrcbndu.ox.ac.uk/ ________________________________ Von: fieldtrip-bounces at science.ru.nl [fieldtrip-bounces at science.ru.nl]" im Auftrag von "Azeez Adebimpe [azeez.adebimpe5 at gmail.com] Gesendet: Freitag, 5. Februar 2016 13:56 An: FieldTrip discussion list Betreff: Re: [FieldTrip] ft_sourceanalysis, reshape error Hi David, Probably the channels' labels in leadfield and data are not the same. check it and try again. Azeez On Fri, Feb 5, 2016 at 8:47 AM, David Pedrosa > wrote: Dear list, after installing the newest version of Fieldtrip today, I have encountered a rather strange error . I am tying to compute corticomuscular coherence for an EEG/EMG dataset and it worked well so far. With the new version however, I get a reshape error I find fard to understand. This is the code: cfg = []; cfg.frequency = 20;; cfg.grid = leadfield; cfg.method = 'dics'; cfg.refchan = 'ExtR1'; cfg.channel = {'EEG' 'ExtR1'}; cfg.vol = hdm; cfg.dics.projectnoise = 'no'; cfg.dics.lambda = '1%'; cfg.dics.keepfilter = 'yes'; cfg.dics.keeptrials = 'yes'; cfg.dics.realfilter = 'yes'; sourceAll = ft_sourceanalysis(cfg, freqAll); but this hasn't changed. The error pops up at lines 619/620 of ft_sourceanalysis (Cf = reshape(sum(Cf, 1) / Ntrials, [Nchans Nchans]);), where it supposedly just averages the CSD matrix over trials. And it makes kind of sense as the line says to reshape the CSDs from a 1xNchans matrix into a [Nchans Nchans] one. But why is it poppin up now as nothing has changed in my analyses? I have checked the updates of the last months and I couldn't find anything related to this. So has any one an idea why the analysis crashes at this point. Thanks in advance Best, David ________________________________ Dr. David Pedrosa Clinical Research Fellow Medical Research Council Brain Network Dynamics Unit at the University of Oxford Nuffield Department of Clinical Neurosciences University of Oxford Level 6, West Wing John Radcliffe Hospital, OX3 9DU Tel: +44 (0)1865 572490 E-Mail: david.pedrosa at ndcn.ox.ac.uk http://www.mrcbndu.ox.ac.uk/ _______________________________________________ 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 _______________________________________________ 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 tzvetan.popov at uni-konstanz.de Thu Feb 11 09:45:48 2016 From: tzvetan.popov at uni-konstanz.de (Tzvetan Popov) Date: Thu, 11 Feb 2016 09:45:48 +0100 Subject: [FieldTrip] source analysis question In-Reply-To: References: Message-ID: Hi Rob, your observation is correct. In the particular method applied, i.e. spatial filtering, one considers always one node at the time. On the basis of the data covariance and the lead field the goal is to compute a set of weights that essentially allow for reconstructing the time course of activity at a given location independent from all others. The entire discretized brain volume is “scanned” eventually resulting in distributed source map. The observation you made becomes relevant when you estimate the activity at all locations at once, e.g. minimum-norm distributed source modeling. best tzvetan > Dear FieldTrip Forum, > > I have a naive question. When carrying out this source analysis (http://www.fieldtriptoolbox.org/tutorial/networkanalysis), I believe there are data from ~275 sensors translated to data occupying ~372 nodes (or voxels) in source space. If this is true (i.e., larger number of source points derived from smaller number of sensors), does this create a margin of error in the source data? And if so, is this error quantifiable? > > Any advice on understanding this would be greatly appreciated. > > Thank you so much, > > Rob Reinhart > _______________________________________________ > 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 Mary-Jo.Diepeveen at mpi.nl Thu Feb 11 11:23:17 2016 From: Mary-Jo.Diepeveen at mpi.nl (Diepeveen, Mary-Jo) Date: Thu, 11 Feb 2016 10:23:17 +0000 Subject: [FieldTrip] Repair missing channel Message-ID: <9AEBC8200222F443B6E297F0D479F1311C4865D0@UM-EXCDAG-A03.um.gwdg.de> Hello, During artifact rejection (in summary mode), I had to remove the F7 channel for some of my subjects. I'm now trying to replace these missing channels but I'm having some difficulties. Since I only have 28 channels (excl. eye and reference) and F7 is all the way on the front left, I thought using the average method would be the best. After some trial and errors, I now have this: cfg = []; cfg.method = 'template'; cfg.template = 'custom_easycap32.mat'; cfg.channel = {'F7'}; neighbours = ft_prepare_neighbours(cfg, data_nat_clean) cfg = []; cfg.method = 'average'; cfg.layout = 'custom_easycap32.mat'; cfg.missingchannel = ft_channelselection('F7', data_nat_clean.label); cfg.neighbours = neighbours; data_nat_chan = ft_channelrepair(cfg, data_nat_clean) If I run this code, I get the following which I think is due to an error in the first part: Trying to load sensor neighbours from a template Successfully loaded neighbour structure from custom_easycap32.mat Improper index matrix reference. Error in ft_prepare_neighbours (line 219) neighb_chans = {neighbours(:).label}; What does this error mean and how can I fix this? I have also tried some things without the first part, but then either it said that everything worked at the resulting data still had 27 channels (so without the F7) or I got an error saying there is a reference to non-existing field 'neighbours' . I hope someone can help me out! Thanks, Mary-Jo -------------- next part -------------- An HTML attachment was scrubbed... URL: From niels.haumann at dac.au.dk Thu Feb 11 13:42:37 2016 From: niels.haumann at dac.au.dk (Niels Trusbak Haumann) Date: Thu, 11 Feb 2016 12:42:37 +0000 Subject: [FieldTrip] related to topoplot In-Reply-To: References: Message-ID: <9DC7C16686EE6344B54A9D39046541939977DC8B@SRVUNIMBX05.uni.au.dk> Hello Laxmi. You will find a tutorial here, which explains how to make topoplots: http://www.fieldtriptoolbox.org/tutorial/plotting You will need to define a time window for the topoplot in seconds with the cfg.xlim variable. Optionally you can also define a lower and upper limit for the mean values within this time window with the cfg.zlim variable. Depending on which type of EEG system you are applying, you will also need to define a layout template for the topoplot. Different layout templates are included with FieldTrip and described here: http://www.fieldtriptoolbox.org/template/layout Best Niels Center for Music In the Brain Dept. Clinical Medicine, Aarhus University Hospital, Denmark ________________________________ Fra: fieldtrip-bounces at science.ru.nl [fieldtrip-bounces at science.ru.nl] på vegne af Laxmi Shaw [laxmi.shaw22 at gmail.com] Sendt: 10. februar 2016 18:00 Til: fieldtrip at science.ru.nl Emne: [FieldTrip] related to topoplot Hello Fieldtrip users, I am new to this tool.I want to use topoplot to plot any parametric quantification of EEG study.Can anybody help me in this regards Regards -- Laxmi Shaw Research Scholar(PhD) IIT Kharagpur West Bengal Ph no-08388837821 -------------- next part -------------- An HTML attachment was scrubbed... URL: From robert.reinhart at vanderbilt.edu Thu Feb 11 17:54:45 2016 From: robert.reinhart at vanderbilt.edu (Rob Reinhart) Date: Thu, 11 Feb 2016 10:54:45 -0600 Subject: [FieldTrip] source analysis question In-Reply-To: References: Message-ID: That's clear now. Thank you so much! Rob On Thursday, February 11, 2016, Tzvetan Popov wrote: > > Hi Rob, > your observation is correct. In the particular method applied, i.e. > spatial filtering, one considers always one node at the time. On the basis > of the data covariance and the lead field the goal is to compute a set of > weights that essentially allow for reconstructing the time course of > activity at a given location independent from all others. The entire > discretized brain volume is “scanned” eventually resulting in distributed > source map. The observation you made becomes relevant when you estimate the > activity at all locations at once, e.g. minimum-norm distributed source > modeling. > > best > tzvetan > > Dear FieldTrip Forum, > > I have a naive question. When carrying out this source analysis ( > http://www.fieldtriptoolbox.org/tutorial/networkanalysis), I believe > there are data from ~275 sensors translated to data occupying ~372 nodes > (or voxels) in source space. If this is true (i.e., larger number of source > points derived from smaller number of sensors), does this create a margin > of error in the source data? And if so, is this error quantifiable? > > Any advice on understanding this would be greatly appreciated. > > Thank you so much, > > Rob Reinhart > _______________________________________________ > 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 wbatschi1976 at gmail.com Fri Feb 12 01:30:39 2016 From: wbatschi1976 at gmail.com (Werner Batschi) Date: Fri, 12 Feb 2016 00:30:39 +0000 Subject: [FieldTrip] Bipolar EMG Message-ID: Dear all, I'm starting right now with EEG analyses using fieldtrip and I have a question which I have not been able to figure out in the list or in the examples so far. In case of recording a bipolar EMG with the BrainAmp System we use, I get a pair of electrodes to work with. Suppose I want to preprocess this data for doing e.g. coherence analyses later, how do you manage both channels? It's not so much a technical question of rectifying and/or filtering that bothers me but rather the question if you would "rereference" or put the EMG channels into relation or something else. Or am I missing something obvious here Thank you, Werner -------------- next part -------------- An HTML attachment was scrubbed... URL: From lev.tankelevitch at some.ox.ac.uk Fri Feb 12 11:18:28 2016 From: lev.tankelevitch at some.ox.ac.uk (Lev Tankelevitch) Date: Fri, 12 Feb 2016 10:18:28 +0000 Subject: [FieldTrip] Neuromag306 planar neighbourhood structure Message-ID: Hi all, I'd like to use ft_channelrepair to interpolate some bad gradiometers in my data that Maxfilter has not fixed very well. However, the neuromag306planar_neighb.mat structure includes both latitude and longitude grads as neighbours for each grad, whereas I'd like to use only e.g., latitude grads for interpolation of other latitude grads, and not mix them together. I wanted to create separate neighbor structures for each grad type, but Elekta has (for whatever reason!) inconsistently named each grad type with a 2 or 3 (e.g., a grad ending in 2 can be either latitude or longitude depending on its location), so there's no easy way to discriminate them. I was wondering whether anyone has already created these separate grad neighbour structures so I don't have to manually check each channel to see which grad is latitude and longitude? Or is there a list of which grads are which? Also, are there any reasons why I shouldn't be doing this kind of interpolation on the grads at all? Thanks for your help, Lev -------------- next part -------------- An HTML attachment was scrubbed... URL: From jorn at artinis.com Fri Feb 12 16:36:00 2016 From: jorn at artinis.com (=?iso-8859-1?Q?J=F6rn_M._Horschig?=) Date: Fri, 12 Feb 2016 16:36:00 +0100 Subject: [FieldTrip] Job opening: Application Specialist (NIRS) Message-ID: <005701d165ab$15c6fb30$4154f190$@artinis.com> Dear all, (please excuse the marginally relevant message) We are looking for an application specialist with strong knowledge in biomedical engineering. We at Artinis are mainly creating NIRS devices, but moving more and more towards multimodal imaging applications (i.e. NIRS/EEG, NIRS/tDCS, NIRS/TMS, etc). The job as an application specialist would mainly involve international customer contact and support with setting up NIRS equipment and recording and analyzing NIRS data, a strong involvement in product development according to the customer needs and market prospects, and project work in collaboration with other R&D companies and academic institutes. For more information, please check out our webpage www.artinis.com and the attached pdf for a more complete job description. With best regards, Jörn -- Jörn M. Horschig, PhD Software Engineer A Einsteinweg 17 6662PW Elst The Netherlands T +31 481 350 980 F +31 84 210 5702 I www.artinis.com The information in this e-mail is confidential and intended solely for the person to whom it is addressed. If this message is not addressed to you, please be aware that you have no authorization to read this e-mail, to copy it, to furnish it to any person other than the addressee, or to use or misuse its content in any way whatsoever. Should you have received this e-mail by mistake, please bring this to the attention of the sender, after which you are kindly requested to destroy the original message. -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image001.png Type: image/png Size: 9919 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: 160107 Advertentie - Application Specialist.pdf Type: application/pdf Size: 39205 bytes Desc: not available URL: From murphyk5 at aston.ac.uk Fri Feb 12 20:51:50 2016 From: murphyk5 at aston.ac.uk (Murphy, Kelly (Research Student)) Date: Fri, 12 Feb 2016 19:51:50 +0000 Subject: [FieldTrip] Custom timing files Message-ID: Hello Fieldtrippers I am trying to epoch my Neuromag MEG using timestamps with ft_definetrial. For all my trials I have a 600x2 matrix ('trl') containing start and stop times (each epoch = 1000ms); and a corresponding <600x5 char> array with condition labels ('labels'). I can combine 'labels' and 'trl' into a structure but I am confused as to what functions to proceed with in order to segment my data. Any help would be greatly appreciated (I hope this problem is relatively simple) Many thanks Kelly PhD Student Cognitive & Affective Neurosciences RG Aston Brain Centre Aston University Birmingham United Kingdom B4 7ET Office no: ++44 1212044250 -------------- next part -------------- An HTML attachment was scrubbed... URL: From K.Muller at psych.ru.nl Sat Feb 13 12:39:27 2016 From: K.Muller at psych.ru.nl (=?iso-8859-1?B?TfxsbGVyLCBLLiAoS2F0amEp?=) Date: Sat, 13 Feb 2016 11:39:27 +0000 Subject: [FieldTrip] ft_sourceplot ortho missing projections Message-ID: <5CF3C648-8BC4-4D99-9743-819343D8804C@psych.ru.nl> Hi, I am plotting statistical data on the orthogonal slices using ft_sourceplot(). In all plots, at least one view (usual axial), sometimes all views are missing: [cid:21371F16-8202-4E39-9726-C8B758D0DBB3] Sometimes one of them appears when I am manually changing the cursor position, but I never get all to work by this. The script I am using had been working flawlessly at the end of last year. I am not sure after which nightly build the problems started to occur. The difference I can see is that the default colormap has been replaced with the better parula now, and according to github there has been some other work on ft_sourceplot(). Best regards, Katja -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: layer6_time_300ms.png Type: image/png Size: 51610 bytes Desc: layer6_time_300ms.png URL: From santagravity at gmail.com Mon Feb 15 03:57:51 2016 From: santagravity at gmail.com (Sanghyun Lim) Date: Mon, 15 Feb 2016 11:57:51 +0900 Subject: [FieldTrip] about leadfield correction following ICA component rejection Message-ID: Dear fieldtripers, I recently read a hipp's 2015 paper which asserts that do not modify leadfields after ICA artifact rejection since it could decrease the estimated source SNR. http://journals.plos.org/plosone/article?id=10.1371/journal.pone.0121048 But by seeing ft_rejectcomponent, fieldtrip recommends modifying leadfields after ICA. Is there a specific reason to do this? thanks in advance Sanghyun. ᐧ -------------- next part -------------- An HTML attachment was scrubbed... URL: From ronny.ibrahim at mq.edu.au Mon Feb 15 07:58:09 2016 From: ronny.ibrahim at mq.edu.au (Ronny Ibrahim) Date: Mon, 15 Feb 2016 06:58:09 +0000 Subject: [FieldTrip] Help on ft_statfun_correlationT Message-ID: Dear Fellow fieldtrip users, I hope that you don't mind me emailing you directly enquiring about the procedures of using ft_statfun_correlationT. I have been reading the fieldtrip forum but seems to still don't quite understand fully on how to get the function to run properly. I currently have power spectrum values (2047 frequency points) from 15 electrode channels (which will give a powspctrm size of 15x2047) and I would like to see whether any of the frequency bands (alpha, delta, beta, gamma values) do correlate to behavioral measures such as distress, etc. As it had suggested in the forum http://mailman.science.ru.nl/pipermail/fieldtrip/2015-February/008950.html I should create a dummy variable with equal size to powspctrm and fill them with my behavioural value (eg 'distress' lets call it D which is essentially D*ones(15,2047)). I have created a design matrix as follow : cfg.design = [1*ones(1,36) 2*ones(1,36); 1:36 1:36]; as I have 36 replications Here is the script that I have put together. %% Conditions %C1 - actual powerspectrum values of 15 electrodes %C2 - distress values C_1 = {TIN1{2} TIN1{4} TIN1{5} TIN1{6} TIN1{7} TIN1{8} TIN1{9} TIN1{10} TIN1{11} TIN2{2} TIN2{4} TIN2{5} TIN2{6} TIN2{7} TIN2{8} TIN2{9} TIN2{10} TIN2{11} TIN3{2} TIN3{4} TIN3{5} TIN3{6} TIN3{7} TIN3{8} TIN3{9} TIN3{10} TIN3{11} TIN4{2} TIN4{4} TIN4{5} TIN4{6} TIN4{7} TIN4{8} TIN4{9} TIN4{10} TIN4{11}}; C_2 = {TFI1{1} TFI1{2} TFI1{3} TFI1{4} TFI1{5} TFI1{6} TFI1{7} TFI1{8} TFI1{9} TFI2{1} TFI2{2} TFI2{3} TFI2{4} TFI2{5} TFI2{6} TFI2{7} TFI2{8} TFI2{9} TFI3{1} TFI3{2} TFI1{3} TFI3{4} TFI3{5} TFI3{6} TFI3{7} TFI3{8} TFI3{9} TFI4{1} TFI4{2} TFI4{3} TFI4{4} TFI4{5} TFI4{6} TFI4{7} TFI4{8} TFI4{9}}; cfg = []; cfg.layout = 'MEG.lay'; lay = ft_prepare_layout(cfg); %% Performing cluster statistics cfg = []; cfg.frequency = [8 12]; cfg.channel = 'all'; cfg.avgovertime = 'no'; cfg.avgoverfreq = 'yes'; cfg.avgoverchan = 'no'; cfg.statistic = 'ft_statfun_correlationT'; cfg.numrandomization = 1000; cfg.correctm = 'cluster'; cfg.method = 'montecarlo'; cfg.clusteralpha = 0.05; cfg.clusterstatistic = 'maxsum'; cfg.minnbchan = 1; cfg.tail = 0; cfg.clustertail = 0; cfg.alpha = 0.05; cfg_neighb.layout = lay; cfg_neighb.method = 'triangulation'; cfg.neighbours = ft_prepare_neighbours(cfg_neighb); cfg.uvar = 1; cfg.ivar = 1; cfg.computecritval = 'yes'; cfg.design = [1*ones(1,36) 2*ones(1,36); 1:36 1:36]; stat = ft_freqstatistics(cfg, C_1{:}, C_2{:}); %% Plotting significant clusters cfg = []; cfg.alpha = 0.05; cfg.parameter = 'stat'; cfg.layout =lay; ft_clusterplot(cfg, stat); I would like to thank you guys for your kind help and assistance. Kind Regards, Ronny -------------- next part -------------- An HTML attachment was scrubbed... URL: From anne.urai at gmail.com Mon Feb 15 13:21:54 2016 From: anne.urai at gmail.com (Anne Urai) Date: Mon, 15 Feb 2016 13:21:54 +0100 Subject: [FieldTrip] Custom timing files In-Reply-To: References: Message-ID: Dear Kelly, it sounds like you want to write your own custom trialfun based on the triggers in your data. See here for a tutorial on how to get started with this: http://www.fieldtriptoolbox.org/example/making_your_own_trialfun_for_conditional_trial_definition 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: Murphy, Kelly (Research Student) Reply: FieldTrip discussion list Date: 12 February 2016 at 20:51:50 To: fieldtrip at science.ru.nl Subject:  [FieldTrip] Custom timing files Hello Fieldtrippers   I am trying to epoch my Neuromag MEG using timestamps with ft_definetrial.    For all my trials I have a 600x2 matrix (‘trl’) containing start and stop times (each epoch = 1000ms); and a corresponding <600x5 char> array with condition labels (‘labels’).  I can combine ‘labels’ and ‘trl’ into a structure but I am confused as to what functions to proceed with in order to segment my data.   Any help would be greatly appreciated (I hope this problem is relatively simple)   Many thanks   Kelly   PhD Student Cognitive & Affective Neurosciences RG Aston Brain Centre Aston University Birmingham United Kingdom B4 7ET Office no: ++44 1212044250   _______________________________________________ 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 helen.wieffering at gmail.com Mon Feb 15 16:00:53 2016 From: helen.wieffering at gmail.com (Helen Wieffering) Date: Mon, 15 Feb 2016 10:00:53 -0500 Subject: [FieldTrip] Connectivity Statistics Message-ID: Hello, Does anyone know of built-in FieldTrip functions for computing statistics or grand averages of connectivity data? I have been searching around and am aware of ft_freqstatistics and ft_freqgrandaverage, but these do not seem to work with granger spectrum data. If anyone has experience with this, I'd love to hear! Thanks, Helen Wieffering Erika Nyhus, P.h.D. Bowdoin College Dept of Neuroscience -------------- next part -------------- An HTML attachment was scrubbed... URL: From a.stolk8 at gmail.com Mon Feb 15 19:57:51 2016 From: a.stolk8 at gmail.com (Arjen Stolk) Date: Mon, 15 Feb 2016 10:57:51 -0800 Subject: [FieldTrip] Help on ft_statfun_correlationT In-Reply-To: <6c160f0705b6476e899163b731441451@EXPRD02.hosting.ru.nl> References: <6c160f0705b6476e899163b731441451@EXPRD02.hosting.ru.nl> Message-ID: Hi Ronny, Can you check whether this page answers your question? It provides a theoretical background, and a couple of examples: http://www.fieldtriptoolbox.org/faq/how_can_i_test_for_correlations_between_neuronal_data_and_quantitative_stimulus_and_behavioural_variables Best, Arjen 2016-02-14 22:58 GMT-08:00 Ronny Ibrahim : > Dear Fellow fieldtrip users, > I hope that you don't mind me emailing you directly enquiring about the > procedures of using ft_statfun_correlationT. I have been reading the > fieldtrip forum but seems to still don't quite understand fully on how to > get the function to run properly. I currently have power spectrum values > (2047 frequency points) from 15 electrode channels (which will give a > powspctrm size of 15x2047) and I would like to see whether any of the > frequency bands (alpha, delta, beta, gamma values) do correlate to > behavioral measures such as distress, etc. As it had suggested in the forum > http://mailman.science.ru.nl/pipermail/fieldtrip/2015-February/008950.html > I should create a dummy variable with equal size to powspctrm and fill > them with my behavioural value (eg 'distress' lets call it D which is > essentially D*ones(15,2047)). > I have created a design matrix as follow : > cfg.design = [1*ones(1,36) 2*ones(1,36); 1:36 1:36]; > > as I have 36 replications > > Here is the script that I have put together. > %% Conditions > %C1 - actual powerspectrum values of 15 electrodes > %C2 - distress values > C_1 = {TIN1{2} TIN1{4} TIN1{5} TIN1{6} TIN1{7} TIN1{8} TIN1{9} TIN1{10} > TIN1{11} TIN2{2} TIN2{4} TIN2{5} TIN2{6} TIN2{7} TIN2{8} TIN2{9} TIN2{10} > TIN2{11} TIN3{2} TIN3{4} TIN3{5} TIN3{6} TIN3{7} TIN3{8} TIN3{9} TIN3{10} > TIN3{11} TIN4{2} TIN4{4} TIN4{5} TIN4{6} TIN4{7} TIN4{8} TIN4{9} TIN4{10} > TIN4{11}}; > C_2 = {TFI1{1} TFI1{2} TFI1{3} TFI1{4} TFI1{5} TFI1{6} TFI1{7} TFI1{8} > TFI1{9} TFI2{1} TFI2{2} TFI2{3} TFI2{4} TFI2{5} TFI2{6} TFI2{7} TFI2{8} > TFI2{9} TFI3{1} TFI3{2} TFI1{3} TFI3{4} TFI3{5} TFI3{6} TFI3{7} TFI3{8} > TFI3{9} TFI4{1} TFI4{2} TFI4{3} TFI4{4} TFI4{5} TFI4{6} TFI4{7} TFI4{8} > TFI4{9}}; > > cfg = []; > cfg.layout = 'MEG.lay'; > lay = ft_prepare_layout(cfg); > > > %% Performing cluster statistics > cfg = []; > cfg.frequency = [8 12]; > cfg.channel = 'all'; > cfg.avgovertime = 'no'; > cfg.avgoverfreq = 'yes'; > cfg.avgoverchan = 'no'; > cfg.statistic = 'ft_statfun_correlationT'; > cfg.numrandomization = 1000; > cfg.correctm = 'cluster'; > cfg.method = 'montecarlo'; > cfg.clusteralpha = 0.05; > cfg.clusterstatistic = 'maxsum'; > cfg.minnbchan = 1; > cfg.tail = 0; > cfg.clustertail = 0; > cfg.alpha = 0.05; > cfg_neighb.layout = lay; > cfg_neighb.method = 'triangulation'; > cfg.neighbours = ft_prepare_neighbours(cfg_neighb); > cfg.uvar = 1; > cfg.ivar = 1; > cfg.computecritval = 'yes'; > cfg.design = [1*ones(1,36) 2*ones(1,36); 1:36 1:36]; > stat = ft_freqstatistics(cfg, C_1{:}, C_2{:}); > %% Plotting significant clusters > cfg = []; > cfg.alpha = 0.05; > cfg.parameter = 'stat'; > cfg.layout =lay; > ft_clusterplot(cfg, stat); > I would like to thank you guys for your kind help and assistance. > > Kind Regards, > > Ronny > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From b.staresina at bham.ac.uk Mon Feb 15 20:31:38 2016 From: b.staresina at bham.ac.uk (Bernhard Staresina) Date: Mon, 15 Feb 2016 19:31:38 +0000 Subject: [FieldTrip] [PostDoc position] Episodic Memory during Offline Periods Message-ID: <6B490D5D5F5F714C88D0C2CE8ED886B6F7EB0DD6@EX13.adf.bham.ac.uk> Applications are invited for a 3-year full-time post-doctoral position investigating memory-related brain processes during post-learning sleep. The project will use EEG, fMRI and transcranial electrical stimulation (tES) together with state-of-the-art multivariate analysis methods to capture and experimentally manipulate consolidation mechanisms in the sleeping human brain. The successful candidate will work in the Episodic Memory Laboratory at the University of Birmingham (UK) and will be supervised by Dr Bernhard Staresina. We work in close collaboration with a vibrant memory research community (http://www.memorybham.com/) and have access to multimodal neuroimaging facilities including 7T MRI, MEG, TMS and intracranial EEG. Applicants must have a PhD in a relevant area (e.g., Psychology, Neuroscience, Computer Science), have demonstrable expertise in sleep research, EEG, fMRI and/or tES and have advanced programming and analysis skills (using MATLAB or equivalent). Publications in peer-reviewed journals and conference presentations at international meetings are required. A background in memory research is highly desirable. The proposed start date is September 2016. If you are interested and wish to find out more, please contact Dr Bernhard Staresina (b.staresina at bham.ac.uk) with your CV and a brief statement of interest. _/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/ Bernhard Staresina, PhD Sir Henry Dale Fellow School of Psychology University of Birmingham www.memorybham.com/bernhard-staresina -------------- next part -------------- An HTML attachment was scrubbed... URL: From seymourr at aston.ac.uk Tue Feb 16 13:51:43 2016 From: seymourr at aston.ac.uk (Seymour, Robert (Research Student)) Date: Tue, 16 Feb 2016 12:51:43 +0000 Subject: [FieldTrip] Eletkta Neuromag data in Fieldtrip Message-ID: Dear all, I am working with Elekta Neuromag data and want to load the raw .fif file into Fieldtrip; i.e. having not undergone Maxfilter cleaning. I have turned off Internal Active Sheilding (IAS) during recording. Loading in motion-corrected data is fine and produces reasonable results. However using the same code with un-Maxfiltered data produces some very strange plots - please see some pictures I have uploaded online.. http://imgur.com/a/b0Mrl . It is not an issue with the data themselves because it looks sensible in Graph (the Elekta data visualisation program). My preprocessing code can be loaded here: http://notepad.cc/peebluki61 . If anyone has any idea what is going on I would be very grateful! Many thanks, Robert Seymour (PhD student, Aston Brain Centre) -------------- next part -------------- An HTML attachment was scrubbed... URL: From gianpaolo.demarchi at unitn.it Tue Feb 16 16:18:04 2016 From: gianpaolo.demarchi at unitn.it (Gianpaolo Demarchi) Date: Tue, 16 Feb 2016 16:18:04 +0100 Subject: [FieldTrip] Eletkta Neuromag data in Fieldtrip In-Reply-To: References: Message-ID: <250797E7-A844-4A39-9919-14FC4FBC4D81@unitn.it> Hi, just a couple of comments, since nobody chimes in :-) > Il giorno 16 feb 2016, alle ore 13:51, Seymour, Robert (Research Student) ha scritto: > > Dear all, > > I am working with Elekta Neuromag data and want to load the raw .fif file into Fieldtrip; i.e. having not undergone Maxfilter cleaning. I have turned off Internal Active Sheilding (IAS) during recording. > > Loading in motion-corrected data is fine and produces reasonable results. However using the same code with un-Maxfiltered data produces some very strange plots - please see some pictures I have uploaded online.. http://imgur.com/a/b0Mrl . It is not an issue with the data themselves because it looks sensible in Graph (the Elekta data visualisation program). They look reasonable ... what you see is the effect of the (bp?) filter on your data and the x seconds rectangular window that you’re using for watching at them. The first pic should be grads, and the second mags, if I’m not mistaken, and in the second one you can clearly see 50 Hz mains noise (you’ve 50Hz over there, isn’t :-) ?!) If you just want to take a look at the data and scroll trough the time, don’t apply “hardcoded” filters with ft_preprocessing, but fully exploit the power of ft_databrowser, and change filters on the fly there with the button on the right, using a cfg.preproc.xxx syntax. For a quick look at e.g. magnetometers, you can use: cfg = []; cfg.dataset= rawfile; %in your case cfg.layout = 'neuromag306mag.lay'; cfg.channel = 'MEGMAG'; ft_databrowser(cfg) check the help of ft_databrowser to see which option does what, but in this case the important part is cfg.dataset, that ft_databrowser uses to read directly the file from the disk. The additional stuff is for topoplotting on right click, e.g. to identify eye blinks … The code above is not applying any filtering, so expect some mess, but then from the data browser click on the grey button on the right and try e.g.: cfg.preproc.lpfilter = 'yes' ; % you don't want to see 50 Hz now cfg.preproc.lpfreq = 45 ; cfg.preproc.hpfilter = 'yes' ; cfg.preproc.hpfreq = 1 ; % try out different value, to suit your needs then change a bit the values and see how this looks like. Then you can chop the data in epochs as you did (btw, there is no need of both cfg.headerfile and cfg.datafile, the latter should suffice), but then again don’t apply any “hardcoded” filter values at this stage, if the idea is still to take a general look at the data. You can filter in plotting later … or just put the hardcoded filter values in your final (data in -> Nature paper out) script. Hope this helps … Best, G. > > My preprocessing code can be loaded here: http://notepad.cc/peebluki61 . If anyone has any idea what is going on I would be very grateful! > > Many thanks, > > Robert Seymour (PhD student, Aston Brain Centre) > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip Dr. Gianpaolo Demarchi FB Psychologie - Universität Salzburg Hellbrunnerstr, 34 5020 Salzburg (A) Tel: +43 (0) 662 / 8044 - 5135 gianpaolo.demarchi at sbg.ac.at -------------- next part -------------- An HTML attachment was scrubbed... URL: From iris.steinmann at med.uni-goettingen.de Tue Feb 16 18:07:49 2016 From: iris.steinmann at med.uni-goettingen.de (Steinmann, Iris) Date: Tue, 16 Feb 2016 17:07:49 +0000 Subject: [FieldTrip] Align electrods to headmodel with method 'interactiv' Message-ID: Hi FieldTripper, I want to do source reconstruction with my EEG data and try to align my electrodes to the headmodel (calculated with my own MR data) (following this description: http://www.fieldtriptoolbox.org/example/align_eeg_electrode_positions_to_bem_headmodel) I run the ft_electroderealign function with the following options: cfg = []; cfg.method = 'interactive'; cfg.elec = elec; cfg.headshape = vol.bnd(1); elec_new = ft_electroderealign(cfg); But all I get is a figure showing a coordinate system with my electrodepositions. The scull saved in vol.bnd(1) is not plotted. (I attached a jpg of the figure). The MATLAB panel asked me: "Do you want to change the anatomical labels for the axes [Y, n]? " If I say 'no', I get the following error: Undefined function or variable 'template'. Error in ft_electroderealign (line 244) for j=1:length(template) I tried the ft_electroderealign function with the cfg.method = 'fiducials', but ended up with the same figure and the same question in the MATLAB panel. Would be great if someone could help me to figure out what's going wrong here and how I can align my electrodes to the headmodel. Thanks! -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: coordinateSystemElectrodePositions.jpg Type: image/jpeg Size: 22433 bytes Desc: coordinateSystemElectrodePositions.jpg URL: From joseluisblues at gmail.com Tue Feb 16 18:43:01 2016 From: joseluisblues at gmail.com (Jose) Date: Tue, 16 Feb 2016 18:43:01 +0100 Subject: [FieldTrip] CTF data, marker and class files Message-ID: dear list, I'm trying to analyse CTF MEG data, but I'm running into problems when getting my triggers. ft_read_event recognize well the triggers in my MarkerFile.mrk, but for some reason do not look at the ClassFile.cls file, so I'm missing the BAD triggers in my events, Someone has run on the same problem?, thanks Jose -------------- next part -------------- An HTML attachment was scrubbed... URL: From seymourr at aston.ac.uk Tue Feb 16 19:04:40 2016 From: seymourr at aston.ac.uk (Seymour, Robert (Research Student)) Date: Tue, 16 Feb 2016 18:04:40 +0000 Subject: [FieldTrip] Eletkta Neuromag data in Fieldtrip Message-ID: Thanks for the detailed reply - yes it looks like it has something to do with powerline noise, but I'm still getting weird plots (and TF plots) even if I low-pass filter at 40Hz.. Trying out Fieldtrip's DFT filter doesn't seem to work either. It's also strange that motion correction seems to sort out the data .. mmm :/ Robert -------------- next part -------------- An HTML attachment was scrubbed... URL: From niels.haumann at dac.au.dk Tue Feb 16 22:47:33 2016 From: niels.haumann at dac.au.dk (Niels Trusbak Haumann) Date: Tue, 16 Feb 2016 21:47:33 +0000 Subject: [FieldTrip] Eletkta Neuromag data in Fieldtrip In-Reply-To: <250797E7-A844-4A39-9919-14FC4FBC4D81@unitn.it> References: , <250797E7-A844-4A39-9919-14FC4FBC4D81@unitn.it> Message-ID: <9DC7C16686EE6344B54A9D39046541939977DE9F@SRVUNIMBX05.uni.au.dk> Hi Robert. If you have applied motion-correction, which are derived from HPI signals, there should also be HPI signals recorded in the raw data. These signals would be seen if MaxFilter was not applied. It might be such signals from the HPI coils, which are usually emitted as high frequency sinus waves - in the standard setting at 290–330 Hz. It's possible to remove these signals with MaxFilter without doing further processing. Have you tried this? I think the MaxFilter command line option is -nosss. Best Niels Center for Music In the Brain Dept. of Clinical Medicine Aarhus University Hospital Denmark ________________________________ Fra: fieldtrip-bounces at science.ru.nl [fieldtrip-bounces at science.ru.nl] på vegne af Gianpaolo Demarchi [gianpaolo.demarchi at unitn.it] Sendt: 16. februar 2016 16:18 Til: FieldTrip discussion list Emne: Re: [FieldTrip] Eletkta Neuromag data in Fieldtrip Hi, just a couple of comments, since nobody chimes in :-) Il giorno 16 feb 2016, alle ore 13:51, Seymour, Robert (Research Student) > ha scritto: Dear all, I am working with Elekta Neuromag data and want to load the raw .fif file into Fieldtrip; i.e. having not undergone Maxfilter cleaning. I have turned off Internal Active Sheilding (IAS) during recording. Loading in motion-corrected data is fine and produces reasonable results. However using the same code with un-Maxfiltered data produces some very strange plots - please see some pictures I have uploaded online.. http://imgur.com/a/b0Mrl . It is not an issue with the data themselves because it looks sensible in Graph (the Elekta data visualisation program). They look reasonable ... what you see is the effect of the (bp?) filter on your data and the x seconds rectangular window that you’re using for watching at them. The first pic should be grads, and the second mags, if I’m not mistaken, and in the second one you can clearly see 50 Hz mains noise (you’ve 50Hz over there, isn’t :-) ?!) If you just want to take a look at the data and scroll trough the time, don’t apply “hardcoded” filters with ft_preprocessing, but fully exploit the power of ft_databrowser, and change filters on the fly there with the button on the right, using a cfg.preproc.xxx syntax. For a quick look at e.g. magnetometers, you can use: cfg = []; cfg.dataset= rawfile; %in your case cfg.layout = 'neuromag306mag.lay'; cfg.channel = 'MEGMAG'; ft_databrowser(cfg) check the help of ft_databrowser to see which option does what, but in this case the important part is cfg.dataset, that ft_databrowser uses to read directly the file from the disk. The additional stuff is for topoplotting on right click, e.g. to identify eye blinks … The code above is not applying any filtering, so expect some mess, but then from the data browser click on the grey button on the right and try e.g.: cfg.preproc.lpfilter = 'yes' ; % you don't want to see 50 Hz now cfg.preproc.lpfreq = 45 ; cfg.preproc.hpfilter = 'yes' ; cfg.preproc.hpfreq = 1 ; % try out different value, to suit your needs then change a bit the values and see how this looks like. Then you can chop the data in epochs as you did (btw, there is no need of both cfg.headerfile and cfg.datafile, the latter should suffice), but then again don’t apply any “hardcoded” filter values at this stage, if the idea is still to take a general look at the data. You can filter in plotting later … or just put the hardcoded filter values in your final (data in -> Nature paper out) script. Hope this helps … Best, G. My preprocessing code can be loaded here: http://notepad.cc/peebluki61 . If anyone has any idea what is going on I would be very grateful! Many thanks, Robert Seymour (PhD student, Aston Brain Centre) _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip Dr. Gianpaolo Demarchi FB Psychologie - Universität Salzburg Hellbrunnerstr, 34 5020 Salzburg (A) Tel: +43 (0) 662 / 8044 - 5135 gianpaolo.demarchi at sbg.ac.at -------------- next part -------------- An HTML attachment was scrubbed... URL: From jan.schoffelen at donders.ru.nl Wed Feb 17 09:02:31 2016 From: jan.schoffelen at donders.ru.nl (Schoffelen, J.M. (Jan Mathijs)) Date: Wed, 17 Feb 2016 08:02:31 +0000 Subject: [FieldTrip] about leadfield correction following ICA component rejection In-Reply-To: References: Message-ID: <0FD8BF96-8017-4732-A504-7BC56FDDEF9B@fcdonders.ru.nl> Hi Sanghyun, Although the ‘perceived SNR’ may change when applying the leadfield correction, it is simply biophyisically incorrect, if you DON’T do it. The reason is the following: If you remove a component from your channel data, what happens is that each of the resulting EEG/MEG channels reflect the potential difference/magnetic field strength as measured by a referenced electrode or a magnetic field pickup coil at a specific location in space, minus a weighted combination of potential differences/magnetic field strengths measured at all other locations (where the weighting is given by the spatial topography of the component). In other words, you apply an intricate re-referencing scheme/create a complicated synthetic gradiometer sensor. When building your forward model (a.k.a. leadfield), the purpose is to build an accurate model of the spatial distribution of potential differences/magnetic field strengths given what your channel leveld data represents. Since it now represents this re-rereferenced data/synthetic gradients, it needs to be accounted for in the model. Best, Jan-Mathijs On Feb 15, 2016, at 3:57 AM, Sanghyun Lim > wrote: Dear fieldtripers, I recently read a hipp's 2015 paper which asserts that do not modify leadfields after ICA artifact rejection since it could decrease the estimated source SNR. http://journals.plos.org/plosone/article?id=10.1371/journal.pone.0121048 But by seeing ft_rejectcomponent, fieldtrip recommends modifying leadfields after ICA. Is there a specific reason to do this? thanks in advance Sanghyun. [https://mailfoogae.appspot.com/t?sender=ac2FudGFncmF2aXR5QGdtYWlsLmNvbQ%3D%3D&type=zerocontent&guid=8d602c05-59e3-43c4-876d-df591e738182]ᐧ _______________________________________________ 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 gianpaolo.demarchi at unitn.it Wed Feb 17 10:02:36 2016 From: gianpaolo.demarchi at unitn.it (Gianpaolo Demarchi) Date: Wed, 17 Feb 2016 10:02:36 +0100 Subject: [FieldTrip] Eletkta Neuromag data in Fieldtrip In-Reply-To: <9DC7C16686EE6344B54A9D39046541939977DE9F@SRVUNIMBX05.uni.au.dk> References: <250797E7-A844-4A39-9919-14FC4FBC4D81@unitn.it> <9DC7C16686EE6344B54A9D39046541939977DE9F@SRVUNIMBX05.uni.au.dk> Message-ID: <999CA7C6-881E-40FA-9997-D7C82C108247@unitn.it> Dear Robert, > Thanks for the detailed reply – yes it looks like it has something to do with powerline noise, but I’m still getting weird plots (and TF plots) even if I low-pass filter at 40Hz.. It depends on what you define as weird. As Niels correctly pointed out, if you don’t filter at all, and you use the HPI, you’ll see a mess @around 300 Hz, plus the mains frequencies and harmonics, plus whatever happened during your experiment (e.g. a car passing by, elevators, etc). Though, if you lp filter at 40 Hz you still should get rid of both HPI(1) and x*50 Hz noise, so I expect that your source of “weirdness” is not there … One thing that comes to my mind is that you mentioned that you usually use IAS, which I imagine in turns means that the raw data per se are not too nice (therefore for need of IAS), but without further info/pics a "differential diagnosis” of the weirdness is hard, e.g. if you see big “strips” in TF plots at 50 Hz, wo filtering, baseline-ing and/or contrasting, I would just call this normal behavior …. > Trying out Fieldtrip’s DFT filter doesn’t seem to work either. Removing power line noise it’s not an easy task, but if you still see “weirdness” filtering @40Hz, then this is not your enemy: if it’s really “power noise like”, take a chunk of a 100ms, count the peaks, and if they are 5 (50Hz) then probably for some reason your filter didn’t do the job (cfg.xxx.lpxxx = ‘yes’ is needed to turn on the filter). If the peaks are less,/more then you have some other problems (although i cannot imagine anything that looks like power line, not at 50, 100, etc (2)) > > It’s also strange that motion correction seems to sort out the data .. mmm :/ This is right. If you use maxfilter -movecomp, you get the “SSS” cleaning “for free”, which usually takes care of many noise sources … I tried in the past also with the ‘-nosss’ switch, but still you get some “beatifying” of the data wrt to the “raw” raw, but maybe it’s just SSP projection, that you don’t get for free in fieldtrip … I didn’t investigate much further …. Try to dig deeper, and feel free to post pics/snip to the list … Best luck, G. (1) although sometimes I had some HPI coils “beatings” @7Hz in few frontal grads, still to understand fully why … (2) caveat: we see obviously big sinusoidal artifacts, at lower frequencies, when we do MEG+tACS, but since you don’t mention it I don’t expect this to be your case :-) Dr. Gianpaolo Demarchi FB Psychologie - Universität Salzburg Hellbrunnerstr, 34 5020 Salzburg (A) Tel: +43 (0) 662 / 8044 - 5135 gianpaolo.demarchi at sbg.ac.at > > Fra: fieldtrip-bounces at science.ru.nl [fieldtrip-bounces at science.ru.nl] på vegne af Gianpaolo Demarchi [gianpaolo.demarchi at unitn.it] > Sendt: 16. februar 2016 16:18 > Til: FieldTrip discussion list > Emne: Re: [FieldTrip] Eletkta Neuromag data in Fieldtrip > > Hi, > just a couple of comments, since nobody chimes in :-) > >> Il giorno 16 feb 2016, alle ore 13:51, Seymour, Robert (Research Student) > ha scritto: >> >> Dear all, >> >> I am working with Elekta Neuromag data and want to load the raw .fif file into Fieldtrip; i.e. having not undergone Maxfilter cleaning. I have turned off Internal Active Sheilding (IAS) during recording. >> >> Loading in motion-corrected data is fine and produces reasonable results. However using the same code with un-Maxfiltered data produces some very strange plots - please see some pictures I have uploaded online.. http://imgur.com/a/b0Mrl . It is not an issue with the data themselves because it looks sensible in Graph (the Elekta data visualisation program). > > They look reasonable ... what you see is the effect of the (bp?) filter on your data and the x seconds rectangular window that you’re using for watching at them. > The first pic should be grads, and the second mags, if I’m not mistaken, and in the second one you can clearly see 50 Hz mains noise (you’ve 50Hz over there, isn’t :-) ?!) > If you just want to take a look at the data and scroll trough the time, don’t apply “hardcoded” filters with ft_preprocessing, but fully exploit the power of ft_databrowser, and change filters on the fly there with the button on the right, using a cfg.preproc.xxx syntax. > > For a quick look at e.g. magnetometers, you can use: > > cfg = []; > cfg.dataset= rawfile; %in your case > cfg.layout = 'neuromag306mag.lay'; > cfg.channel = 'MEGMAG'; > ft_databrowser(cfg) > > check the help of ft_databrowser to see which option does what, but in this case the important part is cfg.dataset, that ft_databrowser uses to read directly the file from the disk. The additional stuff is for topoplotting on right click, e.g. to identify eye blinks … > The code above is not applying any filtering, so expect some mess, but then from the data browser click on the grey button on the right and try e.g.: > > cfg.preproc.lpfilter = 'yes' ; % you don't want to see 50 Hz now > cfg.preproc.lpfreq = 45 ; > cfg.preproc.hpfilter = 'yes' ; > cfg.preproc.hpfreq = 1 ; % try out different value, to suit your needs > > > then change a bit the values and see how this looks like. Then you can chop the data in epochs as you did (btw, there is no need of both cfg.headerfile and > cfg.datafile, the latter should suffice), but then again don’t apply any “hardcoded” filter values at this stage, if the idea is still to take a general look at the data. You can filter in plotting later … or just put the hardcoded filter values in your final (data in -> Nature paper out) script. > Hope this helps … > Best, > G. > > >> >> My preprocessing code can be loaded here: http://notepad.cc/peebluki61 . If anyone has any idea what is going on I would be very grateful! >> >> Many thanks, >> >> Robert Seymour (PhD student, Aston Brain Centre) >> >> _______________________________________________ >> fieldtrip mailing list >> fieldtrip at donders.ru.nl >> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > Dr. Gianpaolo Demarchi > FB Psychologie - Universität Salzburg > Hellbrunnerstr, 34 5020 Salzburg (A) > Tel: +43 (0) 662 / 8044 - 5135 > gianpaolo.demarchi at sbg.ac.at > > > _______________________________________________ > 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 deb.desideri at gmail.com Wed Feb 17 11:19:38 2016 From: deb.desideri at gmail.com (Debora Desideri) Date: Wed, 17 Feb 2016 11:19:38 +0100 Subject: [FieldTrip] Align electrods to headmodel with method 'interactiv' In-Reply-To: References: Message-ID: Dear Iris, you should press Y and specify the coordinate system following the questions that will appear on the command window (you will be asked to specify whether your coordinate sytsem is ras or lps and so on and where the origin of the coordinate system is located). afterwards, the GUI will display the electrodes and the head of the subject as well. You should then be able to align the electrode by simply applying translation/rotation or whatever you need make the electrode fit on the head surface. In case you want to use the methiod 'fiducials', you should have recorded together with the elctrode positions some anatomical landmarks that you can easily find in the MRI of the subject. If you did not record such landmarks during the acquisition of the electrode positions, than I guess your only option is to use the method 'interactive' Hope this helps! Best, Debora On Tue, Feb 16, 2016 at 6:07 PM, Steinmann, Iris < iris.steinmann at med.uni-goettingen.de> wrote: > Hi FieldTripper, > > > > I want to do source reconstruction with my EEG data and try to align my > electrodes to the headmodel (calculated with my own MR data) > > (following this description: > http://www.fieldtriptoolbox.org/example/align_eeg_electrode_positions_to_bem_headmodel) > > > > > I run the ft_electroderealign function with the following options: > > > > cfg = []; > > cfg.method = 'interactive'; > > cfg.elec = elec; > > cfg.headshape = vol.bnd(1); > > elec_new = ft_electroderealign(cfg); > > > > But all I get is a figure showing a coordinate system with my > electrodepositions. The scull saved in vol.bnd(1) is not plotted. > > (I attached a jpg of the figure). > > The MATLAB panel asked me: "Do you want to change the anatomical labels > for the axes [Y, n]? " > > If I say 'no', I get the following error: > > > > Undefined function or variable 'template'. > > Error in ft_electroderealign (line 244) > > for j=1:length(template) > > > > I tried the ft_electroderealign function with the cfg.method = > 'fiducials', but ended up with the same figure and the same question in > > the MATLAB panel. > > > > Would be great if someone could help me to figure out what's going wrong > here and how I can align my electrodes to the headmodel. > > > > Thanks! > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > -- Debora Desideri, PhD Student BNP Lab - Neurology Department University Hospital Tübingen Eberhard Karls University Tübingen Hoppe-Seyler Str. 3 D-72076 Tübingen Tel: +49 7071/29 80478 -------------- next part -------------- An HTML attachment was scrubbed... URL: From stephen.politzer-ahles at ling-phil.ox.ac.uk Wed Feb 17 12:09:55 2016 From: stephen.politzer-ahles at ling-phil.ox.ac.uk (Stephen Politzer-Ahles) Date: Wed, 17 Feb 2016 11:09:55 +0000 Subject: [FieldTrip] CTF data, marker and class files Message-ID: Hello Jose, Does it work differently if you use ft_definetrial and ft_preprocessing? ft_read_event is a low-level function, it should be possible to read your data without using it, and just using ft_definetrial plus ft_preprocessing. I don't remember off the top of my head whether ft_definetrial was able to find the BAD events in the classfile. If you don't find a better way to deal with this issue, another way around would be to just read all your events with ft_definetrial, and write some MATLAB code to read the classfile directly, identify the indices of the bad trials, and remove those rows from the trial definition (or remove them at some later time, e.g., to keep them in the trial definition so they do get read, but then not include those trials in your timelockanalysis later on). best, Steve --- Stephen Politzer-Ahles University of Oxford Language and Brain Lab Faculty of Linguistics, Phonetics & Philology http://users.ox.ac.uk/~cpgl0080/ > > Message: 4 > Date: Tue, 16 Feb 2016 18:43:01 +0100 > From: Jose > To: fieldtrip at science.ru.nl > Subject: [FieldTrip] CTF data, marker and class files > Message-ID: > < > CAH3cVdA_VxHQDcXX3uxoqTFva+4UsMSWP+iccgZ4zZKH51PJ8A at mail.gmail.com> > Content-Type: text/plain; charset="utf-8" > > dear list, > > I'm trying to analyse CTF MEG data, but I'm running into problems when > getting my triggers. ft_read_event recognize well the triggers in my > MarkerFile.mrk, but for some reason do not look at the ClassFile.cls file, > so I'm missing the BAD triggers in my events, > > Someone has run on the same problem?, > > thanks > Jose > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From K.Muller at psych.ru.nl Wed Feb 17 12:18:49 2016 From: K.Muller at psych.ru.nl (=?utf-8?B?TcO8bGxlciwgSy4gKEthdGphKQ==?=) Date: Wed, 17 Feb 2016 11:18:49 +0000 Subject: [FieldTrip] ft_sourceplot ortho missing projections In-Reply-To: <5CF3C648-8BC4-4D99-9743-819343D8804C@psych.ru.nl> References: <5CF3C648-8BC4-4D99-9743-819343D8804C@psych.ru.nl> Message-ID: Hi, (I should have mentioned it) The link to the inline image attachment (example of the problem) is at the end of my e-mail below: > Name: layer6_time_300ms.png > Type: image/png > Size: 51610 bytes > Desc: layer6_time_300ms.png > http://mailman.science.ru.nl/pipermail/fieldtrip/attachments/20160213/3c89a132/attachment.png Best, Katja > Am 13.02.28 Heisei um 12:39 schrieb Müller, K. (Katja) : > > Hi, > > I am plotting statistical data on the orthogonal slices using ft_sourceplot(). In all plots, at least one view (usual axial), sometimes all views are missing: > > > > Sometimes one of them appears when I am manually changing the cursor position, but I never get all to work by this. > > The script I am using had been working flawlessly at the end of last year. I am not sure after which nightly build the problems started to occur. The difference I can see is that the default colormap has been replaced with the better parula now, and according to github there has been some other work on ft_sourceplot(). > > > Best regards, > Katja From antonietta.sorriso at uniparthenope.it Wed Feb 17 12:21:08 2016 From: antonietta.sorriso at uniparthenope.it (Antonietta Sorriso) Date: Wed, 17 Feb 2016 12:21:08 +0100 Subject: [FieldTrip] Input data MEG convention Message-ID: <20160217122108.Horde.u-p-Ld9uxwAzGUae03Ov8A2@webmail.uniparthenope.it> Hi, How can I understand if my input data MEG are left-handed or right-handed? thank you for helping me. Best regards, -- Antonietta Sorriso ​Ph.D. Student ​Dipartimento di Ingegneria ​Laboratorio di TLC ed Elaborazione Segnali ed Immagini ​Centro Direzionale di Napoli, Isola C4, Stanze 326-327, lato Sud, piano 3 ​80143, Napoli, Italia e-mail: antonietta.sorriso at uniparthenope.it From jan.schoffelen at donders.ru.nl Wed Feb 17 12:47:47 2016 From: jan.schoffelen at donders.ru.nl (Schoffelen, J.M. (Jan Mathijs)) Date: Wed, 17 Feb 2016 11:47:47 +0000 Subject: [FieldTrip] Input data MEG convention In-Reply-To: <20160217122108.Horde.u-p-Ld9uxwAzGUae03Ov8A2@webmail.uniparthenope.it> References: <20160217122108.Horde.u-p-Ld9uxwAzGUae03Ov8A2@webmail.uniparthenope.it> Message-ID: <7285B71F-6B07-4B24-85BD-D1C60B22F69F@fcdonders.ru.nl> Hi Antonietta, I would assume that you refer to ‘handedness’ in the context of a coordinate system. You can find out its handedness by making a x/y/z axis system with you thumb/index finger/middle finger, and then check whether the ‘meaning’ of those axes correspond to what you see when using your right hand or your left hand. Example: if you know that your x/y/z axes mean ‘right’,’anterior’,’superior’, you’ll notice that this is a right handed coordinate system, because when your right thumb is pointing to the right and your right index finger is pointing forward, the middle finger is pointing upward (pun not intended). when your x/y/z axes mean ‘left’,’posterior’,’inferior’, you’ll notice that you need your left hand to describe it correctly, hence it’s a left-handed coordinate system. Best, Jan-Mathijs On Feb 17, 2016, at 12:21 PM, Antonietta Sorriso wrote: > > Hi, > > How can I understand if my input data MEG are left-handed or right-handed? > > thank you for helping me. > > Best regards, > -- > Antonietta Sorriso > > ​Ph.D. Student > ​Dipartimento di Ingegneria > ​Laboratorio di TLC ed Elaborazione Segnali ed Immagini > ​Centro Direzionale di Napoli, Isola C4, Stanze 326-327, lato Sud, piano 3 > ​80143, Napoli, Italia > e-mail: antonietta.sorriso at uniparthenope.it > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip From lorenzomagazzini at gmail.com Wed Feb 17 12:59:11 2016 From: lorenzomagazzini at gmail.com (Lorenzo Magazzini) Date: Wed, 17 Feb 2016 11:59:11 +0000 Subject: [FieldTrip] CTF data, marker and class files In-Reply-To: References: Message-ID: Hi Jose, Following on from what Steve said, you could try to use the i/o function read_ctf_cls('ClassFile.cls'). This will return an array of values indexing the trials marked as BAD, which you can use later on to exclude BAD trials from the analysis. Probably this is not the ideal solution but is roughly what I do to read the ClassFile. Best, Lorenzo On 17 February 2016 at 11:09, Stephen Politzer-Ahles < stephen.politzer-ahles at ling-phil.ox.ac.uk> wrote: > Hello Jose, > > Does it work differently if you use ft_definetrial and ft_preprocessing? > ft_read_event is a low-level function, it should be possible to read your > data without using it, and just using ft_definetrial plus ft_preprocessing. > > I don't remember off the top of my head whether ft_definetrial was able to > find the BAD events in the classfile. If you don't find a better way to > deal with this issue, another way around would be to just read all your > events with ft_definetrial, and write some MATLAB code to read the > classfile directly, identify the indices of the bad trials, and remove > those rows from the trial definition (or remove them at some later time, > e.g., to keep them in the trial definition so they do get read, but then > not include those trials in your timelockanalysis later on). > > best, > Steve > > > > --- > Stephen Politzer-Ahles > University of Oxford > Language and Brain Lab > Faculty of Linguistics, Phonetics & Philology > http://users.ox.ac.uk/~cpgl0080/ > > >> >> Message: 4 >> Date: Tue, 16 Feb 2016 18:43:01 +0100 >> From: Jose >> To: fieldtrip at science.ru.nl >> Subject: [FieldTrip] CTF data, marker and class files >> Message-ID: >> < >> CAH3cVdA_VxHQDcXX3uxoqTFva+4UsMSWP+iccgZ4zZKH51PJ8A at mail.gmail.com> >> Content-Type: text/plain; charset="utf-8" >> >> >> dear list, >> >> I'm trying to analyse CTF MEG data, but I'm running into problems when >> getting my triggers. ft_read_event recognize well the triggers in my >> MarkerFile.mrk, but for some reason do not look at the ClassFile.cls file, >> so I'm missing the BAD triggers in my events, >> >> Someone has run on the same problem?, >> >> thanks >> 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 jan.schoffelen at donders.ru.nl Wed Feb 17 13:36:54 2016 From: jan.schoffelen at donders.ru.nl (Schoffelen, J.M. (Jan Mathijs)) Date: Wed, 17 Feb 2016 12:36:54 +0000 Subject: [FieldTrip] ft_sourceplot ortho missing projections In-Reply-To: References: <5CF3C648-8BC4-4D99-9743-819343D8804C@psych.ru.nl> Message-ID: Hi Katja, You may have noticed that this seems an interaction between the matlab version and the crosshair option. The issue you report occurs with matlab 2014b (possibly also with more recent versions), but only if cfg.crosshair = ‘yes’. I suspect something goes wrong with the stacking order of the graphics objects that are to be displayed in each of the figure’s subplots. Thanks, Jan-Mathijs On Feb 17, 2016, at 12:18 PM, Müller, K. (Katja) wrote: > Hi, > > (I should have mentioned it) The link to the inline image attachment (example of the problem) is at the end of my e-mail below: > >> Name: layer6_time_300ms.png >> Type: image/png >> Size: 51610 bytes >> Desc: layer6_time_300ms.png >> http://mailman.science.ru.nl/pipermail/fieldtrip/attachments/20160213/3c89a132/attachment.png > > > Best, > Katja > > > >> Am 13.02.28 Heisei um 12:39 schrieb Müller, K. (Katja) : >> >> Hi, >> >> I am plotting statistical data on the orthogonal slices using ft_sourceplot(). In all plots, at least one view (usual axial), sometimes all views are missing: >> >> >> >> Sometimes one of them appears when I am manually changing the cursor position, but I never get all to work by this. >> >> The script I am using had been working flawlessly at the end of last year. I am not sure after which nightly build the problems started to occur. The difference I can see is that the default colormap has been replaced with the better parula now, and according to github there has been some other work on ft_sourceplot(). >> >> >> Best regards, >> Katja > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip From iris.steinmann at med.uni-goettingen.de Wed Feb 17 15:58:39 2016 From: iris.steinmann at med.uni-goettingen.de (Steinmann, Iris) Date: Wed, 17 Feb 2016 14:58:39 +0000 Subject: [FieldTrip] Align electrods to headmodel with method 'interactiv' In-Reply-To: References: Message-ID: Hi Debora, I tried to do so before, but I ended up with the following error: Do you want to change the anatomical labels for the axes [Y, n]? Y What is the anatomical label for the positive X-axis [r, l, a, p, s, i]? r What is the anatomical label for the positive Y-axis [r, l, a, p, s, i]? a What is the anatomical label for the positive Z-axis [r, l, a, p, s, i]? s Is the origin of the coordinate system at the a(nterior commissure), i(nterauricular), n(ot a landmark)? n Undefined function or variable 'template'. Error in ft_electroderealign (line 244) for j=1:length(template) Error in eeg_beamforming (line 107) elec_aligned = ft_electroderealign(cfg); I prepared now a template following this instruction: http://www.fieldtriptoolbox.org/example/align_eeg_electrode_positions_to_bem_headmodel In this example the template is only used for the cfg.method = ‘fiducial’ but not for the ‘interactiv’ option. Anyhow I additionally specified the template together with the ‘interactiv’ method like this: cfg = []; cfg.method = 'interactive'; cfg.elec = elec; cfg.headshape = vol.bnd(1); cfg.template = elec_mni; elec_new = ft_electroderealign(cfg); now it works! Thanks! Iris From: fieldtrip-bounces at science.ru.nl [mailto:fieldtrip-bounces at science.ru.nl] On Behalf Of Debora Desideri Sent: Mittwoch, 17. Februar 2016 11:20 To: FieldTrip discussion list Subject: Re: [FieldTrip] Align electrods to headmodel with method 'interactiv' Dear Iris, you should press Y and specify the coordinate system following the questions that will appear on the command window (you will be asked to specify whether your coordinate sytsem is ras or lps and so on and where the origin of the coordinate system is located). afterwards, the GUI will display the electrodes and the head of the subject as well. You should then be able to align the electrode by simply applying translation/rotation or whatever you need make the electrode fit on the head surface. In case you want to use the methiod 'fiducials', you should have recorded together with the elctrode positions some anatomical landmarks that you can easily find in the MRI of the subject. If you did not record such landmarks during the acquisition of the electrode positions, than I guess your only option is to use the method 'interactive' Hope this helps! Best, Debora On Tue, Feb 16, 2016 at 6:07 PM, Steinmann, Iris > wrote: Hi FieldTripper, I want to do source reconstruction with my EEG data and try to align my electrodes to the headmodel (calculated with my own MR data) (following this description: http://www.fieldtriptoolbox.org/example/align_eeg_electrode_positions_to_bem_headmodel) I run the ft_electroderealign function with the following options: cfg = []; cfg.method = 'interactive'; cfg.elec = elec; cfg.headshape = vol.bnd(1); elec_new = ft_electroderealign(cfg); But all I get is a figure showing a coordinate system with my electrodepositions. The scull saved in vol.bnd(1) is not plotted. (I attached a jpg of the figure). The MATLAB panel asked me: "Do you want to change the anatomical labels for the axes [Y, n]? " If I say 'no', I get the following error: Undefined function or variable 'template'. Error in ft_electroderealign (line 244) for j=1:length(template) I tried the ft_electroderealign function with the cfg.method = 'fiducials', but ended up with the same figure and the same question in the MATLAB panel. Would be great if someone could help me to figure out what's going wrong here and how I can align my electrodes to the headmodel. Thanks! _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -- Debora Desideri, PhD Student BNP Lab - Neurology Department University Hospital Tübingen Eberhard Karls University Tübingen Hoppe-Seyler Str. 3 D-72076 Tübingen Tel: +49 7071/29 80478 -------------- next part -------------- An HTML attachment was scrubbed... URL: From mi_mayer at gmx.de Wed Feb 17 16:32:34 2016 From: mi_mayer at gmx.de (Irene Sophia Mayer) Date: Wed, 17 Feb 2016 16:32:34 +0100 Subject: [FieldTrip] Epoching/trialdefinition Message-ID: An HTML attachment was scrubbed... URL: From julian.keil at gmail.com Wed Feb 17 17:07:26 2016 From: julian.keil at gmail.com (Julian Keil) Date: Wed, 17 Feb 2016 17:07:26 +0100 Subject: [FieldTrip] Epoching/trialdefinition In-Reply-To: References: Message-ID: <427FA825-7553-49C4-9294-843E909E75B3@gmail.com> Dear Irene, ft_redefinetrial is your friend. Check the Mailinglist archive for a conversation from 2013 in which Jörn Horschig explained some pitfalls here. The mail should be called "ft_preprocessing high-pass filtering question" Good luck, Julian Am 17.02.2016 um 16:32 schrieb Irene Sophia Mayer: > Dear fieldtrippers, > > I am currently analysing data where I wanna look at different time frames around specific triggers. To do so, I was planning on doing all my preprocessing on continuous data and then afterwards epoching it. > > However, when trying to use the following code on my preprocessed data, I get an error message: > > cfg = []; > cfg.datafile = 'data.mat'; > cfg.trialdef.eventtype = 'Stimulus'; > cfg.trialdef.eventvalue = trialmarks; > cfg.trialdef.prestim = .1; % baseline > cfg.trialdef.poststim = .5; % post-baseline trial length > cfg = ft_definetrial(cfg); > > Error using ft_read_header (line 2158) > unsupported header format (matlab) > Error in ft_trialfun_general (line 78) > hdr = ft_read_header(cfg.headerfile, 'headerformat', cfg.headerformat); > Error in ft_definetrial (line 174) > [trl, event] = feval(cfg.trialfun, cfg); > Error in prepro_03_epoching (line 19) > e_data = ft_definetrial(cfg); > > The same code works if applied before ft_preprocessing. > > Is there a way to epoch data after preprocessing it? > > Cheers, > Irene > _______________________________________________ > 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: signature.asc Type: application/pgp-signature Size: 495 bytes Desc: Message signed with OpenPGP using GPGMail URL: From paolo.belardinelli at gmail.com Wed Feb 17 20:20:35 2016 From: paolo.belardinelli at gmail.com (Paolo Belardinelli) Date: Wed, 17 Feb 2016 20:20:35 +0100 Subject: [FieldTrip] Problem with Template Model for Source Reconstruction Message-ID: Dear Fieldtrippers, we are encountering a problem with a template model for source reconstruction. In particular, we are warping (non linearly) a template grid to the individual subject's MRI. Doing that, it appears that the very top of the brain is not fully covered by dipole locations. We found that this issue has been already reported: http://www.fieldtriptoolbox.org/template/sourcemodel Apparently, since March 7th 2013, this issue has been fixed. However we are using August 28th 2015 Fieldtrip version and we are still dealing with the same issue. Any suggestions? Here are our code lines: cfg = []; cfg.grid.warpmni = 'yes'; cfg.resolution = 6; % resolution of the template grid in mm cfg.grid.nonlinear = 'yes'; % use non linear normalization cfg.mri = mri_spm; % use subject's mri in mni coordinates cfg.grid.unit = 'mm'; sourcemodel = ft_prepare_sourcemodel(cfg); Thank you in advance. Paolo -- -- Paolo Belardinelli, PhD Neurology Department University Hospital Tuebingen Eberhard Karls University Tuebingen Hoppe-Seyler Str. 3 D-72076 Tuebingen Tel: +49 7071 / 29 80478 -------------- next part -------------- An HTML attachment was scrubbed... URL: From britta.westner at uni-konstanz.de Thu Feb 18 10:10:18 2016 From: britta.westner at uni-konstanz.de (Britta Westner) Date: Thu, 18 Feb 2016 10:10:18 +0100 Subject: [FieldTrip] Problem with Template Model for Source Reconstruction In-Reply-To: References: Message-ID: <56C58A7A.9000207@uni-konstanz.de> Dear Paolo, I experienced similar problems and found that correcting the field bias in the participant's MRI (e.g. doing a "bias correction" with SPM) can help. My explanation would be that the field bias either leads to small inaccuracies in the segmentation and volume which then "get visible" when warping the grid based on the non-segmented MRI, or that the warping algorithm itself is affected by this bias. Maybe you can give that a try! Hope this helps, Britta Am 17.02.2016 um 20:20 schrieb Paolo Belardinelli: > Dear Fieldtrippers, > we are encountering a problem with a template model for source > reconstruction. In particular, we are warping (non linearly) a > template grid to the individual subject's MRI. > Doing that, it appears that the very top of the brain is not fully > covered by dipole locations. > We found that this issue has been already reported: > > http://www.fieldtriptoolbox.org/template/sourcemodel > > Apparently, since March 7th 2013, this issue has been fixed. > However we are using August 28th 2015 Fieldtrip version and we are > still dealing with the same issue. > Any suggestions? > Here are our code lines: > > cfg = []; > cfg.grid.warpmni = 'yes'; > cfg.resolution = 6; % resolution of the template grid in mm > cfg.grid.nonlinear = 'yes'; % use non linear normalization > cfg.mri = mri_spm; % use subject's mri in mni coordinates > cfg.grid.unit = 'mm'; > sourcemodel = ft_prepare_sourcemodel(cfg); > > Thank you in advance. > > Paolo > > > > > -- > -- > Paolo Belardinelli, PhD > Neurology Department > University Hospital Tuebingen > Eberhard Karls University Tuebingen > Hoppe-Seyler Str. 3 > D-72076 Tuebingen > Tel: +49 7071 / 29 80478 > > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -- Britta Westner, M.Sc. Neuroelectromagnetic Oscillations Laboratory Fachbereich Psychologie Universität Konstanz Postfach 905 78457 Konstanz Telefon: +49-(0)7531-88-5703 Fax: +49-(0)7531-88-5709 www.psychologie.uni-konstanz.de/nemo-lab -------------- next part -------------- An HTML attachment was scrubbed... URL: From singhkd at cardiff.ac.uk Fri Feb 19 00:52:43 2016 From: singhkd at cardiff.ac.uk (Krish Singh) Date: Thu, 18 Feb 2016 23:52:43 +0000 Subject: [FieldTrip] New postdoctoral position supporting a multi-site MEG data cohort Message-ID: Dear All, re: Research Associate in Multi-site MEG Data Cohort Management & Analysis We have just advertised an additional 2-year Research Associate post supporting the establishment of a multi-site database of normative Magnetoencephalographic (MEG) data, collected across all UK MEG laboratories, and the development of common management and analysis pipelines for mining this resource. 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://krb-sjobs.brassring.com/TGWEbHost/jobdetails.aspx?partnerid=30011&siteid=5460&AReq=4394BR ​ ​Best Wishes, Krish ​ -- Prof. Krish Singh CUBRIC School of Psychology / Ysgol Seicoleg Cardiff University / Prifysgol Caerdydd Park Place / Plas y Parc Cardiff / Caerdydd CF10 3AT, UK Tel / Ffôn: 02920 874690 / 870365 Fax / Ffacs: 02920 870339 Email / Ebost : singhkd at cardiff.ac.uk -------------- next part -------------- An HTML attachment was scrubbed... URL: From francois.tadel at mcgill.ca Fri Feb 19 01:20:25 2016 From: francois.tadel at mcgill.ca (=?UTF-8?Q?Fran=c3=a7ois_Tadel?=) Date: Thu, 18 Feb 2016 19:20:25 -0500 Subject: [FieldTrip] ft_dipolefitting and CTF 3rd order gradient compensation Message-ID: <56C65FC9.9010309@mcgill.ca> Hello, When estimating dipoles with ft_dipolefitting: How should I proceed if I want to pass the information about the 3rd order gradient compensation to the computation of the forward model ? Is there a field I should fill either in the data or the cfg structure? We are trying to compare the goodness of fit obtained with Brainstorm, MNE and FieldTrip (simple CTF electric phantom recordings). They are calling the FieldTrip function from the Brainstorm environment and asked me to check what was the situation with the CTF compensation matrix. I was expecting to find something like the line below in the code, but couldn't find it: Gain(iMeg,:) = Gain(iMeg,:) - MegRefCoef * Gain(iRef,:) % iMeg = indices of the MEG channels %iRef = indices of the CTF MEG reference channels % Gain = leadfield matrix [Nchannels x Nsources] % MegRefCoef= 3rd order compensation matrix [Nchannels_meg x Nchannels_ref] Can someone help me with this? Thanks, Francois From jan.schoffelen at donders.ru.nl Fri Feb 19 09:07:46 2016 From: jan.schoffelen at donders.ru.nl (Schoffelen, J.M. (Jan Mathijs)) Date: Fri, 19 Feb 2016 08:07:46 +0000 Subject: [FieldTrip] ft_dipolefitting and CTF 3rd order gradient compensation In-Reply-To: <56C65FC9.9010309@mcgill.ca> References: <56C65FC9.9010309@mcgill.ca> Message-ID: See line 187 in ft_compute_leadfield. More information can be found in ctf2grad and ft_denoise_synthetic. Best, Jan-Mathijs On Feb 19, 2016, at 1:20 AM, François Tadel wrote: > Hello, > > When estimating dipoles with ft_dipolefitting: > How should I proceed if I want to pass the information about the 3rd order gradient compensation to the computation of the forward model ? > Is there a field I should fill either in the data or the cfg structure? > > We are trying to compare the goodness of fit obtained with Brainstorm, MNE and FieldTrip (simple CTF electric phantom recordings). They are calling the FieldTrip function from the Brainstorm environment and asked me to check what was the situation with the CTF compensation matrix. I was expecting to find something like the line below in the code, but couldn't find it: > > Gain(iMeg,:) = Gain(iMeg,:) - MegRefCoef * Gain(iRef,:) > > % iMeg = indices of the MEG channels > %iRef = indices of the CTF MEG reference channels > % Gain = leadfield matrix [Nchannels x Nsources] > % MegRefCoef= 3rd order compensation matrix [Nchannels_meg x Nchannels_ref] > > Can someone help me with this? > > Thanks, > Francois > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip From prasandhya.a.yusuf at gmail.com Fri Feb 19 15:04:25 2016 From: prasandhya.a.yusuf at gmail.com (Prasandhya Astagiri Yusuf) Date: Fri, 19 Feb 2016 15:04:25 +0100 Subject: [FieldTrip] Clarification on plotting WPLI In-Reply-To: References: Message-ID: Hi Peter, sorry for the (very) late response, I guess you have already figured the answer by now. Anyhow, in case someone has similar problem, I try to share my experience here in the forum. I recently computed the debiased WPLI and experienced the same problem. I also found this negative value of debiased WPLI quite frequently asked in this mailing list, even Mr. Martin Vinck himself has already responded to it on June 2011. So as stated in the paper (Vinck et al. 2011), PLI and WPLI result has the range from 0 to 1. But the debiased WPLI could yields negative values as a consequence of debiasing method. One of his latest paper (Phillips, 2014), they mentioned in the Materials and Methods that "the debiased WPLI estimator (Vinck et al. 2011), ranging from zero (*negative values can incidentally occur because of limited sampling*) to one (maximum coherence)". So in my opinion, we can neglect this negative values and convert them to zeros. But surely, we should not take the absolute value from it. Best, Sandhy Prasandhya A. Yusuf *Medizinische Hochschule Hannover* Experimentelle Otologie / OE 8891 / VIANNA / M13 Feodor-Lynen-Str. 35 D-30625 Hannover On Mon, Dec 21, 2015 at 8:39 PM, Peter Lyons wrote: > Hello Everyone, > > I have a question regarding the interpretation of negative values in the > debiased wPLI. Although the reference page on the debiased wPLI notes that > estimates are computed by squaring the wPLI values, I and others have > noticed that some of the values in the debiased wPLI spectrum are negative. > How should these negative values be interpreted in reference to 0? > > To view the results of the debiased wPLI connectivity analysis > (ft_connectivity analysis with cfg.method = 'wpli_debiased'), I've been > using the ft_topoplotER function. However, I'm concerned that the default > scaling (zlim = 'maxmin') of the plot does not seem to register the > negative values in the debiased wPLI spectrum. That is, the negative values > are not being plotted. It is curious, however, that the ft_topoplotER > does register the negative values in the *non-debiased *wPLI spectrum. > > Is there a reason why the ft_topoplotER function is treating the negative > values from the debiased vs. non-debiased wPLI spectrums differently? Is > there perhaps a more appropriate plotting function I should be using to > view the debiased wPLI output? > > I would greatly appreciate any guidance in this. > > Thank you! > > Peter > > _______________________________________________ > 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 michelic72 at gmail.com Fri Feb 19 16:11:57 2016 From: michelic72 at gmail.com (Cristiano Micheli) Date: Fri, 19 Feb 2016 16:11:57 +0100 Subject: [FieldTrip] Clarification on plotting WPLI In-Reply-To: References: Message-ID: Dear Yusuf and Peter, My experience is also that negative squared wPLI values should not be considered, as they constitute a side-effect of the debiasing technique. I would rather clip them to zero, or, better, assign them a NaN (since the result is undetermined). I hope this helped. Cris On Fri, Feb 19, 2016 at 3:04 PM, Prasandhya Astagiri Yusuf < prasandhya.a.yusuf at gmail.com> wrote: > Hi Peter, > sorry for the (very) late response, I guess you have already figured the > answer by now. Anyhow, in case someone has similar problem, I try to share > my experience here in the forum. > > I recently computed the debiased WPLI and experienced the same problem. I > also found this negative value of debiased WPLI quite frequently asked in > this mailing list, even Mr. Martin Vinck himself has already responded to > it on June 2011. > So as stated in the paper (Vinck et al. 2011), PLI and WPLI result has the > range from 0 to 1. But the debiased WPLI could yields negative values as a > consequence of debiasing method. One of his latest paper (Phillips, 2014), > they mentioned in the Materials and Methods that "the debiased WPLI > estimator (Vinck et al. 2011), ranging from zero (*negative values can > incidentally occur because of limited sampling*) to one (maximum > coherence)". > So in my opinion, we can neglect this negative values and convert them to > zeros. But surely, we should not take the absolute value from it. > > Best, > Sandhy > > > Prasandhya A. Yusuf > > *Medizinische Hochschule Hannover* > > Experimentelle Otologie / OE 8891 / > > VIANNA / M13 > > Feodor-Lynen-Str. 35 > > D-30625 Hannover > > > > On Mon, Dec 21, 2015 at 8:39 PM, Peter Lyons wrote: > >> Hello Everyone, >> >> I have a question regarding the interpretation of negative values in the >> debiased wPLI. Although the reference page on the debiased wPLI notes that >> estimates are computed by squaring the wPLI values, I and others have >> noticed that some of the values in the debiased wPLI spectrum are negative. >> How should these negative values be interpreted in reference to 0? >> >> To view the results of the debiased wPLI connectivity analysis >> (ft_connectivity analysis with cfg.method = 'wpli_debiased'), I've been >> using the ft_topoplotER function. However, I'm concerned that the default >> scaling (zlim = 'maxmin') of the plot does not seem to register the >> negative values in the debiased wPLI spectrum. That is, the negative values >> are not being plotted. It is curious, however, that the ft_topoplotER >> does register the negative values in the *non-debiased *wPLI spectrum. >> >> Is there a reason why the ft_topoplotER function is treating the negative >> values from the debiased vs. non-debiased wPLI spectrums differently? Is >> there perhaps a more appropriate plotting function I should be using to >> view the debiased wPLI output? >> >> I would greatly appreciate any guidance in this. >> >> Thank you! >> >> Peter >> >> _______________________________________________ >> 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 valentina.mione at uniroma1.it Fri Feb 19 18:17:50 2016 From: valentina.mione at uniroma1.it (Valentina Mione) Date: Fri, 19 Feb 2016 18:17:50 +0100 Subject: [FieldTrip] error with Computing cross-correlations between spike trains tutorial Message-ID: Hi everyone, I am Valentina and I am a fresh new FieldTrip user. I was following the tutorial http://www.fieldtriptoolbox.org/tutorial/spike, in particular the cross correlation part with the example data ftp://ftp.fieldtriptoolbox.org/pub/fieldtrip/tutorial/spike/p029_sort_final_01.nex, but I'm stuck with a MatLab error. I loaded the data exactly how it's explained and I defined the channels and the trials (just copying the matlab instructions) and all worked fine. Then I followed this part of the tutorial: *and then compute the cross-correlogram (and the shift-predictor cross-correlogram) by* cfg = []; cfg.maxlag = 0.2; % maximum 200 ms cfg.binsize = 0.001; % bins of 1 ms cfg.outputunit = 'proportion'; % make unit area cfg.latency = [-2.5 0]; cfg.vartriallen = 'no'; % do not allow variable trial lengths cfg.method = 'xcorr'; % compute the normal cross-correlogram Xc = ft_spike_xcorr(cfg,spikeTrials); But after processing all the 600 trials the ft_spike_xcorr function interrupts working with the error: "*??? Subscript indices must either be real positive integers or logicals.* *Error in ==> ft_spike_xcorr at 350* *stat.label = spike.label(chansel);*" Trying to understand the error I set I breakpoint on the 350 line of the script and I got another error in ft_checkconfig.m "*??? Error using ==> ft_checkconfig at 208* *The field cfg.progress is not allowed* *Error in ==> ft_spike_xcorr at 126* *cfg = ft_checkconfig(cfg, 'allowed', {'latency', 'trials',* *'keeptrials', 'method', 'channelcmb', 'vartriallen', 'debias',* *'maxlag', 'binsize', 'outputunit'});*" I hope someone can help me because I really can't understand what's wrong (I feel there is a problem with the selection of the channels maybe) and I just followed the instructions. Best, Valentina -------------- next part -------------- An HTML attachment was scrubbed... URL: From joseangel.pineda at ctb.upm.es Sat Feb 20 12:32:02 2016 From: joseangel.pineda at ctb.upm.es (=?UTF-8?Q?Jos=C3=A9_=C3=81ngel_Pineda?=) Date: Sat, 20 Feb 2016 12:32:02 +0100 Subject: [FieldTrip] Job Offer in Madrid Message-ID: We are pleased to offer a 2-year post-doctoral position at the Reina Sofia Foundation Alzheimer's Disease Centre in Madrid, Spain. The successful applicant will be involved in neuroimaging analyses of a 5-year longitudinal study (currently in year 4) of 1200 healthy elderly individuals (aged 70-85) to determine neuronal markers in the healthy state which predict subsequent development of mild cognitive impairment and dementia. In addition, the Reina Sofia Alzheimer's Centre offers: - A research-dedicated MRI facility attached to a 140-bed residence for patients with Alzheimer’s disease. - A brain-bank providing post-mortem histopathological confirmation of dementia diagnosis for patients scanned pre-mortem. - Ex-vivo MRI scanning. A strong background in neuroimaging techniques is required. Applicants must have a PhD in neuroscience, cognitive neuroscience, biomedical engineering, neuropsychology or related field. Experience in dementia research is a plus. Spanish language skills are NOT required. Competitive annual salary depending on experience. SUBMISSION Interested candidates should send CV and a cover letter (including contact details of 2 referees), to the following email address: bryan.strange at upm.es DEADLINE FOR SUBMISSION OF APPLICATIONS March 4, 2016 Any questions, please feel free to contact me. -------------- next part -------------- An HTML attachment was scrubbed... URL: From jan.schoffelen at donders.ru.nl Sat Feb 20 12:49:35 2016 From: jan.schoffelen at donders.ru.nl (Schoffelen, J.M. (Jan Mathijs)) Date: Sat, 20 Feb 2016 11:49:35 +0000 Subject: [FieldTrip] error with Computing cross-correlations between spike trains tutorial In-Reply-To: References: Message-ID: Hi Valentina, Danial Arabali (in BCC) has also encountered this, and filed a bug on bugzilla.fieldtriptoolbox.org, as bug 3058. Perhaps you could create yourself an account, add yourself on the CC-list of this bug, and team up with Danial to do some extra detective work. You seem to be on the right track, with respect to your debugging attempt. I suspect it’s probably relatively easy to solve. Note that the error relating to the issue in ft_checkconfig has been fixed in the current version of the code, that can be easily obtained from github.com/fieldtrip The ft_checkconfig bug is referenced here: http://bugzilla.fieldtriptoolbox.org/show_bug.cgi?id=3062 The current issue is referenced here: http://bugzilla.fieldtriptoolbox.org/show_bug.cgi?id=3058 Best, Jan-Mathijs On Feb 19, 2016, at 6:17 PM, Valentina Mione > wrote: Hi everyone, I am Valentina and I am a fresh new FieldTrip user. I was following the tutorial http://www.fieldtriptoolbox.org/tutorial/spike, in particular the cross correlation part with the example data ftp://ftp.fieldtriptoolbox.org/pub/fieldtrip/tutorial/spike/p029_sort_final_01.nex, but I'm stuck with a MatLab error. I loaded the data exactly how it's explained and I defined the channels and the trials (just copying the matlab instructions) and all worked fine. Then I followed this part of the tutorial: and then compute the cross-correlogram (and the shift-predictor cross-correlogram) by cfg = []; cfg.maxlag = 0.2; % maximum 200 ms cfg.binsize = 0.001; % bins of 1 ms cfg.outputunit = 'proportion'; % make unit area cfg.latency = [-2.5 0]; cfg.vartriallen = 'no'; % do not allow variable trial lengths cfg.method = 'xcorr'; % compute the normal cross-correlogram Xc = ft_spike_xcorr(cfg,spikeTrials); But after processing all the 600 trials the ft_spike_xcorr function interrupts working with the error: "??? Subscript indices must either be real positive integers or logicals. Error in ==> ft_spike_xcorr at 350 stat.label = spike.label(chansel);" Trying to understand the error I set I breakpoint on the 350 line of the script and I got another error in ft_checkconfig.m "??? Error using ==> ft_checkconfig at 208 The field cfg.progress is not allowed Error in ==> ft_spike_xcorr at 126 cfg = ft_checkconfig(cfg, 'allowed', {'latency', 'trials', 'keeptrials', 'method', 'channelcmb', 'vartriallen', 'debias', 'maxlag', 'binsize', 'outputunit'});" I hope someone can help me because I really can't understand what's wrong (I feel there is a problem with the selection of the channels maybe) and I just followed the instructions. Best, Valentina _______________________________________________ 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 ha438 at georgetown.edu Sun Feb 21 00:23:01 2016 From: ha438 at georgetown.edu (Hassan Aleem) Date: Sat, 20 Feb 2016 18:23:01 -0500 Subject: [FieldTrip] Fixing headmodel vertices Message-ID: Hi Everyone, New to fieldtrip. My headmodel looks pretty good except for a couple vertices that are poking in. Is there any way to address them specifically? The code I used is similar to one provided by someone who was successful. As follows mri.coordsys ='SPM' cfg = []; cfg.brainthreshold = 0.15; cfg.scalpthreshold = 0.3; cfg.downsample = 1; %no downsampling cfg.output = {'brain' 'scalp' 'skull'}; segment = ft_volumesegment(cfg, mri); cfg = []; cfg.method = 'projectmesh'; cfg.numvertices = 10000; bnd = ft_prepare_mesh( cfg, seg); % fix mesh [ bnd( 1).pnt, bnd( 1).tri] = meshresample( bnd( 1).pnt, bnd( 1).tri, 1000/size( bnd( 1).pnt, 1)); [ bnd( 2).pnt, bnd( 2).tri] = meshresample( bnd( 2).pnt, bnd( 2).tri, 2000/size( bnd( 2).pnt, 1)); [ bnd( 3).pnt, bnd( 3).tri] = meshresample( bnd( 3).pnt, bnd( 3).tri, 3000/size( bnd( 3).pnt, 1)); for ii = 1:size( bnd), [ bnd( ii).pnt, bnd( ii).tri] = meshcheckrepair( bnd( ii).pnt, bnd( ii).tri, 'dup'); [ bnd( ii).pnt, bnd( ii).tri] = meshcheckrepair( bnd( ii).pnt, bnd( ii).tri, 'isolated'); [ bnd( ii).pnt, bnd( ii).tri] = meshcheckrepair( bnd( ii).pnt, bnd( ii).tri, 'deep'); [ bnd( ii).pnt, bnd( ii).tri] = meshcheckrepair( bnd( ii).pnt, bnd( ii).tri, 'meshfix'); end % calculate headmodel % reordered to brain skull scalp cfg = []; cfg.method = 'bemcp'; %openmeeg doesnt work with multiple output from ft_volumesegment vol = ft_prepare_headmodel(cfg, bnd); clear bnd Thanks! -------------- next part -------------- An HTML attachment was scrubbed... URL: From mi_mayer at gmx.de Sun Feb 21 13:15:26 2016 From: mi_mayer at gmx.de (Irene Sophia Mayer) Date: Sun, 21 Feb 2016 13:15:26 +0100 Subject: [FieldTrip] Global field power Message-ID: An HTML attachment was scrubbed... URL: From valentina.mione at uniroma1.it Mon Feb 22 12:43:55 2016 From: valentina.mione at uniroma1.it (Valentina Mione) Date: Mon, 22 Feb 2016 12:43:55 +0100 Subject: [FieldTrip] error with Computing cross-correlations between spike trains tutorial In-Reply-To: References: Message-ID: Hi everyone, I posted a comment on the error 3058 http://bugzilla.fieldtriptoolbox.org/show_bug.cgi?id=3058 about the cross correlation tutorial on spike data But I copy and paste what I did also here, maybe someone could be intrested as well (In reply to Danial Arabali from comment #0) Hi Danial, I'm stuck exactly at your point with the same error. Today I tried to do some detective work because I think the first error is at the line 138: *chansel = unique(cmbindx(:)); % get the unique channels* because it takes also the value 0 as index for channels. So i corrected like: *chansel = unique(cmbindx(:)); % get the unique channels* *chansel = chansel(chansel~=0); % remove zeros* and the script works fine to the end, but the output is different: infact I don't get the instruction at line 133 *for k=1:size(cfg.channelcmb,1)* * cmbindx(k,1) = strmatch(cfg.channelcmb(k,1), spike.label, 'exact');* * cmbindx(k,2) = strmatch(cfg.channelcmb(k,2), spike.label, 'exact');* *end* Why does it is set to search for only two channels if we specified 4 channels? (*cfg.spikechannel = {'sig001U_wf', 'sig002U_wf', 'sig003U_wf', 'sig004U_wf'}; % select only the MUA*) Maybe the instruction at this point should be something like this *for k=1:size(cfg.channelcmb,1)* * for c=1:length(spike.label)* * cmbindx(k,c) = strmatch(cfg.channelcmb(k,c), spike.label, 'exact');* * end* *end* Anyway, I tried this solution and the output is of the right size now (xcorr: [4x4x400 double] instead of xcorr: [2x2x400 double]), but I don't think the content is right. The last test I did was to select only the channels 3 and 4 *cfg.spikechannel = { 'sig003U_wf', 'sig004U_wf'}; % select only the MUA* and run the original script with only the first modified instruction *chansel = unique(cmbindx(:)); % get the unique channels* *chansel = chansel(chansel~=0); % remove zeros* Then I followed the second part of the tutorial *% compute the shuffled correlogram* *cfg.method = 'shiftpredictor'; % compute the shift predictor* *Xshuff = ft_spike_xcorr(cfg,spikeTrials);* *iCmb = 3;* *jCmb = 4;* *figure* *xcSmoothed = conv(squeeze(Xc.xcorr(iCmb,jCmb,:)),ones(1,5)./5,'same'); % do some smoothing* *hd = plot(Xc.time(3:end-2),xcSmoothed(3:end-2),'k'); % leave out borders (because of smoothing)* *hold on* *xcSmoothed = conv(squeeze(Xshuff.shiftpredictor(iCmb,jCmb,:)),ones(1,5)./5,'same'); * *plot(Xc.time(3:end-2),xcSmoothed(3:end-2),'r')* *hold on* *xlabel('delay')* *ylabel('proportion of coincidences') * *title([Xc.label{iCmb} Xc.label{jCmb}])* *axis tight* And I just changed *iCmb = 3;* *jCmb = 4;* in *iCmb = 1;* *jCmb = 2;* And I got exactly the same figure output of the tutorial. I hope this can be a little help for the work Valentina 2016-02-20 12:49 GMT+01:00 Schoffelen, J.M. (Jan Mathijs) < jan.schoffelen at donders.ru.nl>: > Hi Valentina, > > Danial Arabali (in BCC) has also encountered this, and filed a bug on > bugzilla.fieldtriptoolbox.org, as bug 3058. Perhaps you could create > yourself an account, add yourself on the CC-list of this bug, and team up > with Danial to do some extra detective work. You seem to be on the right > track, with respect to your debugging attempt. I suspect it’s probably > relatively easy to solve. Note that the error relating to the issue in > ft_checkconfig has been fixed in the current version of the code, that can > be easily obtained from github.com/fieldtrip > > The ft_checkconfig bug is referenced here: > > http://bugzilla.fieldtriptoolbox.org/show_bug.cgi?id=3062 > > The current issue is referenced here: > > http://bugzilla.fieldtriptoolbox.org/show_bug.cgi?id=3058 > > Best, > Jan-Mathijs > > > > > On Feb 19, 2016, at 6:17 PM, Valentina Mione > wrote: > > Hi everyone, > > I am Valentina and I am a fresh new FieldTrip user. > > I was following the tutorial > http://www.fieldtriptoolbox.org/tutorial/spike, in particular the cross > correlation part with the example data > ftp://ftp.fieldtriptoolbox.org/pub/fieldtrip/tutorial/spike/p029_sort_final_01.nex, > but I'm stuck with a MatLab error. > > I loaded the data exactly how it's explained and I defined the channels > and the trials (just copying the matlab instructions) and all worked fine. > > Then I followed this part of the tutorial: > > *and then compute the cross-correlogram (and the shift-predictor > cross-correlogram) by* > > cfg = []; > cfg.maxlag = 0.2; % maximum 200 ms > cfg.binsize = 0.001; % bins of 1 ms > cfg.outputunit = 'proportion'; % make unit area > cfg.latency = [-2.5 0]; > cfg.vartriallen = 'no'; % do not allow variable trial lengths > cfg.method = 'xcorr'; % compute the normal cross-correlogram > Xc = ft_spike_xcorr(cfg,spikeTrials); > > But after processing all the 600 trials the ft_spike_xcorr function > interrupts working with the error: > > "*??? Subscript indices must either be real positive integers > or logicals.* > > > *Error in ==> ft_spike_xcorr at 350 * > > *stat.label = spike.label(chansel);*" > > Trying to understand the error I set I breakpoint on the 350 line of the > script and I got another error in ft_checkconfig.m > > "*??? Error using ==> ft_checkconfig at 208* > > *The field cfg.progress is not allowed* > > *Error in ==> ft_spike_xcorr at 126* > > *cfg = ft_checkconfig(cfg, 'allowed', {'latency', 'trials',* > > *'keeptrials', 'method', 'channelcmb', 'vartriallen', 'debias',* > > *'maxlag', 'binsize', 'outputunit'});*" > > > I hope someone can help me because I really can't understand what's wrong > (I feel there is a problem with the selection of the channels maybe) and I > just followed the instructions. > > > Best, > > > Valentina > _______________________________________________ > 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 seymourr at aston.ac.uk Mon Feb 22 19:49:25 2016 From: seymourr at aston.ac.uk (Seymour, Robert (Research Student)) Date: Mon, 22 Feb 2016 18:49:25 +0000 Subject: [FieldTrip] Maxfilter SSS and TF-Plots Message-ID: Dear all, I've been trying out various cleaning parameters on Neuromag data and importing this into Fieldtrip. I've found that applying SSS to my data results in time-frequency plots with bands of activity at very specific frequencies. Image : http://i.imgur.com/QGma6qm.png. I do not believe it is anything to do with plotting because the lines disappear when I use tSSS with a .9 correlation. Has anybody else experienced this or hypothesise as to the cause of these artefacts? Many thanks, Robert Seymour (Aston Brain Centre) -------------- next part -------------- An HTML attachment was scrubbed... URL: From f.roux at bcbl.eu Mon Feb 22 20:03:50 2016 From: f.roux at bcbl.eu (=?utf-8?B?RnLDqWTDqXJpYw==?= Roux) Date: Mon, 22 Feb 2016 20:03:50 +0100 (CET) Subject: [FieldTrip] Maxfilter SSS and TF-Plots In-Reply-To: References: Message-ID: <1398179640.1569002.1456167830690.JavaMail.zimbra@bcbl.eu> Hi Robert, in your preprocessing, did you use: cfg.demean = 'yes'; If no then I suggest you take a look at this link: http://www.fieldtriptoolbox.org/faq/why_does_my_tfr_look_strange The stripe pattern could result from the DC-offset which gets removed when doing demeaning with the cfg-option. Try something like this before feeding data into ft_freqanalysis. cfg = []; cfg.detrending = 'yes'; cfg.demean = 'yes'; [data] = ft_preprocessing(cfg,data); Then use data with ft_freqanalysis. HTH Fred -- FR Legal disclaimer/Aviso legal/Lege-oharra: www.bcbl.eu/legal-disclaimer --------------------------------------------------------------------------- From: "Seymour, Robert (Research Student)" To: "fieldtrip_mailinglist" Sent: Monday, February 22, 2016 7:49:25 PM Subject: [FieldTrip] Maxfilter SSS and TF-Plots Dear all, I've been trying out various cleaning parameters on Neuromag data and importing this into Fieldtrip. I've found that applying SSS to my data results in time-frequency plots with bands of activity at very specific frequencies. Image : http://i.imgur.com/QGma6qm.png . I do not believe it is anything to do with plotting because the lines disappear when I use tSSS with a .9 correlation. Has anybody else experienced this or hypothesise as to the cause of these artefacts? Many thanks, Robert Seymour (Aston Brain Centre) _______________________________________________ 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 seymourr at aston.ac.uk Tue Feb 23 15:37:25 2016 From: seymourr at aston.ac.uk (Seymour, Robert (Research Student)) Date: Tue, 23 Feb 2016 14:37:25 +0000 Subject: [FieldTrip] Eletkta Neuromag data in Fieldtrip Message-ID: Thank you both so much - I definitely think that there are sources of (unknown) noise in my data, especially at lower frequencies, which Maxfilter is magically cleaning up (or "beautifying" might be a better term). I shall do some further investigations and report back! Robert -------------- next part -------------- An HTML attachment was scrubbed... URL: From seymourr at aston.ac.uk Tue Feb 23 15:45:45 2016 From: seymourr at aston.ac.uk (Seymour, Robert (Research Student)) Date: Tue, 23 Feb 2016 14:45:45 +0000 Subject: [FieldTrip] Maxfilter SSS and TF-Plots Message-ID: Thanks for the reply. I do generally have detrending and demeaning switched on during ft_preprocessing. I also tried ft_freqanalysis it with cfg.polyremoval = 1, but there were still horizontal stripes in my TF plots... :/ Robert -------------- next part -------------- An HTML attachment was scrubbed... URL: From j.herring at donders.ru.nl Wed Feb 24 10:32:17 2016 From: j.herring at donders.ru.nl (Herring, J.D. (Jim)) Date: Wed, 24 Feb 2016 09:32:17 +0000 Subject: [FieldTrip] Global field power In-Reply-To: References: Message-ID: <3D00B7615FB58D46A0B49B9AD67A33EB2AB20F0B@exprd01.hosting.ru.nl> Dear Irene, If your research question is whether there is a difference in global mean field power between conditions I would approach this in the same way as if you would want to investigate a difference in ERF/ERPs between conditions. You would therefore first calculate the time-locked averages for both conditions for each participant separately, as you did. The you would calculate the global mean field power using ft_globalmeanfield for both conditions, for each participant. If I’m not mistaken you can calculate the group average using ft_timelockgrandaverage. You could test the difference between conditions using dependent samples t-tests (perhaps cluster corrected over time) using ft_timelockstatistics. Best, Jim From: fieldtrip-bounces at science.ru.nl [mailto:fieldtrip-bounces at science.ru.nl] On Behalf Of Irene Sophia Mayer Sent: Sunday, February 21, 2016 1:15 PM To: fieldtrip at science.ru.nl Subject: [FieldTrip] Global field power Dear fieldtrippers, I want to compare the global field power in two different conditions over several participants. I have computed time-locked averages for both conditions for each participant separately. My first question now is, should I first compute a grand average over all participants and use ft_globalmeanfield on this or should I first compute global mean field for every participant and then average over them? Additionally, which functions should I use for those kinds of averaging? The second question would be, has anyone any recommendations for a statistical test I could use to see whether the conditions differ in global mean field power? Cheers, Irene -------------- next part -------------- An HTML attachment was scrubbed... URL: From Mary-Jo.Diepeveen at mpi.nl Wed Feb 24 11:01:04 2016 From: Mary-Jo.Diepeveen at mpi.nl (Diepeveen, Mary-Jo) Date: Wed, 24 Feb 2016 10:01:04 +0000 Subject: [FieldTrip] ft_timelockgrandaverage with trials Message-ID: <9AEBC8200222F443B6E297F0D479F1311C486C5A@UM-EXCDAG-A03.um.gwdg.de> Hello all, I have done an EEG study in which I have four conditions per subjects and two different subject groups. I would now like to compare the same condition between the two subject groups. To do this, I first tried ft_timelockanalysis with cfg.keeptrials=' yes' after which I tried to do ft_timelockgrandaverage. I get the following message: Warning depreciating trial field using the avg to compute the grand average (bug2372). After some googling I found an old post saying that ft_timelockgrandaverage does not support input data with "trial" field, meaning then that what I am trying to do is not possible. Trying to do the statistics after anyways also did not work because I need the .trial field. The post I found is however, from 2014 so I was wondering if this problem is fixed now. I have thought of my own way around this, but I was wondering if you maybe have any ideas too. Thanks! Mary-Jo -------------- next part -------------- An HTML attachment was scrubbed... URL: From stephen.politzer-ahles at ling-phil.ox.ac.uk Wed Feb 24 12:17:40 2016 From: stephen.politzer-ahles at ling-phil.ox.ac.uk (Stephen Politzer-Ahles) Date: Wed, 24 Feb 2016 11:17:40 +0000 Subject: [FieldTrip] fieldtrip Digest, Vol 63, Issue 26 In-Reply-To: References: Message-ID: Hi Mary-Jo, Are you sure you need individual trials? Normally, for a group-level comparison of means, the unit of observation would be the subject-wise averages, rather than all the trials; as far as I can think of, the only time you would want individual trials for timelock statistics would be if you are doing analysis on a single participants (like in the example at http://www.fieldtriptoolbox.org/tutorial/cluster_permutation_timelock#between-trials_experiments) or if you are computing event-related regression coefficients rather than event-related averages. Can you give more detail about what you're trying to do, what code you used to try running your statistics, and what error you got? Best, Steve --- Stephen Politzer-Ahles University of Oxford Language and Brain Lab Faculty of Linguistics, Phonetics & Philology http://users.ox.ac.uk/~cpgl0080/ > > Message: 4 > Date: Wed, 24 Feb 2016 10:01:04 +0000 > From: "Diepeveen, Mary-Jo" > To: "fieldtrip at science.ru.nl" > Subject: [FieldTrip] ft_timelockgrandaverage with trials > Message-ID: > <9AEBC8200222F443B6E297F0D479F1311C486C5A at UM-EXCDAG-A03.um.gwdg.de > > > Content-Type: text/plain; charset="us-ascii" > > Hello all, > > I have done an EEG study in which I have four conditions per subjects and > two different subject groups. I would now like to compare the same > condition between the two subject groups. To do this, I first tried > ft_timelockanalysis with cfg.keeptrials=' yes' after which I tried to do > ft_timelockgrandaverage. I get the following message: Warning depreciating > trial field using the avg to compute the grand average (bug2372). After > some googling I found an old post saying that ft_timelockgrandaverage does > not support input data with "trial" field, meaning then that what I am > trying to do is not possible. Trying to do the statistics after anyways > also did not work because I need the .trial field. The post I found is > however, from 2014 so I was wondering if this problem is fixed now. I have > thought of my own way around this, but I was wondering if you maybe have > any ideas too. > > Thanks! > > Mary-Jo > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From stephen.politzer-ahles at ling-phil.ox.ac.uk Wed Feb 24 12:18:57 2016 From: stephen.politzer-ahles at ling-phil.ox.ac.uk (Stephen Politzer-Ahles) Date: Wed, 24 Feb 2016 11:18:57 +0000 Subject: [FieldTrip] ft_timelockgrandaverage with trials Message-ID: Hi Mary-Jo, Are you sure you need individual trials? Normally, for a group-level comparison of means, the unit of observation would be the subject-wise averages, rather than all the trials; as far as I can think of, the only time you would want individual trials for timelock statistics would be if you are doing analysis on a single participants (like in the example at http://www.fieldtriptoolbox.org/tutorial/cluster_permutation_timelock#between-trials_experiments) or if you are computing event-related regression coefficients rather than event-related averages. Can you give more detail about what you're trying to do, what code you used to try running your statistics, and what error you got? Best, Steve --- Stephen Politzer-Ahles University of Oxford Language and Brain Lab Faculty of Linguistics, Phonetics & Philology http://users.ox.ac.uk/~cpgl0080/ > Message: 4 > Date: Wed, 24 Feb 2016 10:01:04 +0000 > From: "Diepeveen, Mary-Jo" > To: "fieldtrip at science.ru.nl" > Subject: [FieldTrip] ft_timelockgrandaverage with trials > Message-ID: > <9AEBC8200222F443B6E297F0D479F1311C486C5A at UM-EXCDAG-A03.um.gwdg.de > > > Content-Type: text/plain; charset="us-ascii" > > Hello all, > > I have done an EEG study in which I have four conditions per subjects and > two different subject groups. I would now like to compare the same > condition between the two subject groups. To do this, I first tried > ft_timelockanalysis with cfg.keeptrials=' yes' after which I tried to do > ft_timelockgrandaverage. I get the following message: Warning depreciating > trial field using the avg to compute the grand average (bug2372). After > some googling I found an old post saying that ft_timelockgrandaverage does > not support input data with "trial" field, meaning then that what I am > trying to do is not possible. Trying to do the statistics after anyways > also did not work because I need the .trial field. The post I found is > however, from 2014 so I was wondering if this problem is fixed now. I have > thought of my own way around this, but I was wondering if you maybe have > any ideas too. > > Thanks! > > Mary-Jo > -------------- next part -------------- An HTML attachment was scrubbed... URL: From david.meng at mq.edu.au Thu Feb 25 03:02:53 2016 From: david.meng at mq.edu.au (David Meng) Date: Thu, 25 Feb 2016 02:02:53 +0000 Subject: [FieldTrip] coherence estimation with "FT_FREQANALYSIS_MTMWELCH" Message-ID: Dear fieldtrippers, I just found a description page of the function "ft_freqanalysis_mtmwelch"(http://www.fieldtriptoolbox.org/reference/ft_freqanalysis_mtmwelch). Seems this function has been taken out of the package but as it is described on the webpage above, this Welch's overlapped averaged periodogram method can be implemented as: [freq] = ft_freqanalysis(cfg, data) by specifying 'cfg.method = mtmconvol' and use the options of this function to specify the length of the time windows, the amount of overlap, and the amount of spectral smoothing (in case of dpss tapers) per window. I have tried to implement this method as suggested, however in the field of the output "freq", the power spectrum and cross spectrum has a dimension as 'chan_freq_time' which means it didn't calculate the average value over all time windows. Would anyone suggest a way to enable the averaging? I have tried to average them manually but the topoplot from following 'ft_connectivityanalysis' could not be shown corrected. Best regards David -------------- next part -------------- An HTML attachment was scrubbed... URL: From lethuymy at live.com Thu Feb 25 15:43:47 2016 From: lethuymy at live.com (Thuy-My Le) Date: Thu, 25 Feb 2016 09:43:47 -0500 Subject: [FieldTrip] Out of Memory Issue Message-ID: Hello, I am new to fieldtrip. I was trying to go through the tutorial for preprocessing of continuous data into memory and am trying to run the following first few lines of code: >> cfg = []; cfg.dataset = 'subj2.vhdr'; data_org = ft_preprocessing(cfg) However I keep receiving this error: Error using fread Out of memory. Type HELP MEMORY for your options. Is this a version issue? I feel that my computer should have enough memory/RAM. I have downloaded fieldtrip-20160214. I also have MATLAB R2015a. Thank you for you help. Best, Thuy-My Le -------------- next part -------------- An HTML attachment was scrubbed... URL: From guiraudh at gmail.com Thu Feb 25 16:30:08 2016 From: guiraudh at gmail.com (=?UTF-8?B?SMOpbMOobmUgR3VpcmF1ZA==?=) Date: Thu, 25 Feb 2016 10:30:08 -0500 Subject: [FieldTrip] Brain Atlas for ROI in children. Message-ID: Dear community, I'm working on speech rhythm perception in children using MEG and I'd like to realize a ROI analysis. I use the template for children from the McConnell Brain Imagery Centre for my source analysis. I'd like to know if there is an atlas of different cortical regions in children that I could use? Thank you. Helene Guiraud -------------- next part -------------- An HTML attachment was scrubbed... URL: From azeez.adebimpe5 at gmail.com Thu Feb 25 16:35:47 2016 From: azeez.adebimpe5 at gmail.com (Azeez Adebimpe) Date: Thu, 25 Feb 2016 16:35:47 +0100 Subject: [FieldTrip] Brain Atlas for ROI in children. In-Reply-To: References: Message-ID: HI Helene, You can check this link for list of atlases from infant to adult https://sites.google.com/site/chuanglab/atlas Best, Azeez On Thu, Feb 25, 2016 at 4:30 PM, Hélène Guiraud wrote: > Dear community, > > I'm working on speech rhythm perception in children using MEG and I'd like > to realize a ROI analysis. > I use the template for children from the McConnell Brain Imagery Centre > for my source analysis. > I'd like to know if there is an atlas of different cortical regions in > children that I could use? > > Thank you. > > Helene Guiraud > > _______________________________________________ > 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 guiraudh at gmail.com Thu Feb 25 18:11:33 2016 From: guiraudh at gmail.com (=?UTF-8?B?SMOpbMOobmUgR3VpcmF1ZA==?=) Date: Thu, 25 Feb 2016 12:11:33 -0500 Subject: [FieldTrip] Brain Atlas for ROI in children. In-Reply-To: References: Message-ID: Hi Azeez, Thank you for your answer! Best, Hélène 2016-02-25 10:35 GMT-05:00 Azeez Adebimpe : > HI Helene, > > You can check this link for list of atlases from infant to adult > > https://sites.google.com/site/chuanglab/atlas > > Best, > > Azeez > > On Thu, Feb 25, 2016 at 4:30 PM, Hélène Guiraud > wrote: > >> Dear community, >> >> I'm working on speech rhythm perception in children using MEG and I'd >> like to realize a ROI analysis. >> I use the template for children from the McConnell Brain Imagery Centre >> for my source analysis. >> I'd like to know if there is an atlas of different cortical regions in >> children that I could use? >> >> Thank you. >> >> Helene Guiraud >> >> _______________________________________________ >> 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 vanwijk.bernadette at gmail.com Thu Feb 25 19:30:25 2016 From: vanwijk.bernadette at gmail.com (Bernadette van Wijk) Date: Thu, 25 Feb 2016 18:30:25 +0000 Subject: [FieldTrip] SPM course for MEG/EEG in London: May 16-18 Message-ID: Dear all, We are pleased to announce that our annual *SPM course for MEG/EEG* will take place this year from *Monday May 16 to Wednesday May 18 2016*. Hosted by University College London, the course will be held at Queen Square, a very central location in London (UK). The course will present instruction on the analysis of MEG and EEG data. The first two days will combine theoretical presentations with practical demonstrations of the different data analysis methods implemented in SPM. On the last day participants will have the opportunity to work on SPM tutorial data sets under the supervision of the course faculty. We also invite students to bring their own data for analysis. The course is suitable for both beginners and more advanced users. The topics that will be covered range from pre-processing and statistical analysis to source localization and dynamic causal modelling. The program is listed below. Registration is now open. We offer a reduced rate when attending both the MEG/EEG course and the fMRI course during the second half of the week. For full details of both courses see http://www.fil.ion.ucl.ac.uk/spm/course/london/ where you can also register. Available places are limited so please register as early as possible if you would like to attend! *Monday May 16th* 9.00 - 9.30 Registration 9.30 - 9.45 SPM introduction and resources *Vladimir Litvak * 9.45 - 10.30 What are we measuring with M/EEG? *Saskia Helbling* 10.30 - 11.15 Data pre-processing *Holly Rossiter* *Coffee* 11.45 - 12.30 Data pre-processing - demo *Deborah Talmi * 12.30 - 13.15 General linear model and classical inference *Sven Bestmann* *Lunch* 14.15 - 15.00 Multiple comparisons problem and solutions *Gareth Barnes* 15.00 - 15.45 Bayesian inference *Jean Daunizeau* *Coffee* 16.15 - 17.45 Group M/EEG dataset analysis - demo *Vladimir Litvak / Jason Taylor* 17.45 - 18.30 Advanced applications of the GLM *Bernhard Spitzer* *Tuesday May 17th* 9.30 - 10.15 M/EEG source analysis *Jérémie Mattout* 10.15 - 11.15 M/EEG source analysis - demo *Jose Lopez / Sofie Meyer* *Coffee* 11.45 - 12.30 Principles of dynamic causal modelling *Bernadette van Wijk* 12.30 - 13.15 DCM for evoked responses *Ryszard Auksztulewicz* *Lunch* 14.15 - 15.00 DCM for steady state responses *Rosalyn Moran* 15.00 - 15.45 DCM - demo *Martin Dietz / Andre Marreiros* *Coffee* 16.15 - 17.00 Bayesian model selection and averaging *Peter Zeidman* 17.00 - 18.30 Clinic - questions & answers *Karl Friston* 19.00 - ... Social Event *Wednesday May 18th* 9.30 - 17.00 Practical hands-on session in UCL computer class rooms. Participants can either work on SPM tutorial datasets or on their own data with the help of the faculty. There will also be an opportunity to ask questions in small tutorial groups for further discussions on the topics of the lectures. -------------- next part -------------- An HTML attachment was scrubbed... URL: From jbtrimper at gmail.com Thu Feb 25 23:12:26 2016 From: jbtrimper at gmail.com (John Trimper) Date: Thu, 25 Feb 2016 17:12:26 -0500 Subject: [FieldTrip] Can I declare directional dependencies amongst variables before calculating MVAR model? Message-ID: Hello, My name is John and I am a graduate student currently using a multivariate auto-regressive (MVAR) approach to analyze in vivo electrophysiological data which I recorded simultaneously from four subregions of a larger brain system. The goal of this set of analyses is to ask which of the subregions might be Granger-causing oscillations in specific frequency bands in the other subregions. In short, my question is: With fieldtrip specifically, and the MVAR approach in general, is it possible to declare the dependencies in my data before constructing the MVAR model, and have that information constrain the coefficient calculation? To elaborate, imagine the four brain regions I recorded from (A, B, C, & D) are connected unidirectionally, such that A projects to B projects to C projects to D (A->B->C->D). Using MVAR as I have been, my model will find coefficients for each of the four variables regressed on each of the other four variables. Is it possible for me to declare the dependencies before hand, such that when I build a model for B, I exclude C and D, only calculating coefficients for A and B, but when I build a model for D, I calculate coefficients for A, B, C, & D? Perhaps I have no choice but to calculate the models separately, but moreover, is it possible to declare that the brain regions are in series (unidirectionally projecting)? Thank you for everyone's time. I apologize if I violated any rules of the community forum or if this is a variant of a previous question. I couldn't find any question similar to this one, and this question is my first to the forum. Much obliged, John __________________________________________ This e-mail message (including any attachments) is for the sole use of the intended recipient(s) and may contain confidential and privileged information. If the reader of this message is not the intended recipient, you are hereby notified that any dissemination, distribution or copying of this message (including any attachments) is strictly prohibited. If you have received this message in error, please contact the sender by reply e-mail message and destroy all copies of the original message (including attachments). -------------- next part -------------- An HTML attachment was scrubbed... URL: From stephen.politzer-ahles at ling-phil.ox.ac.uk Fri Feb 26 12:16:41 2016 From: stephen.politzer-ahles at ling-phil.ox.ac.uk (Stephen Politzer-Ahles) Date: Fri, 26 Feb 2016 11:16:41 +0000 Subject: [FieldTrip] Out of Memory Issue Message-ID: Hello Thuy-My, The dataset loads fine for me with fieldtrip-20150113 in MATLAB 2015a on 64-bit Windows 7 with 8GB RAM. I suspect that the out of memory error is more likely to be related to your computer's power than to the fieldtrip version (these errors are quite common in MATLAB) but you can try running an older version of fieldtrip and/or try this analysis on a different computer to try to diagnose the problem. Best, Steve --- Stephen Politzer-Ahles University of Oxford Language and Brain Lab Faculty of Linguistics, Phonetics & Philology http://users.ox.ac.uk/~cpgl0080/ ---------------------------------------------------------------------- > > Message: 1 > Date: Thu, 25 Feb 2016 09:43:47 -0500 > From: Thuy-My Le > To: "fieldtrip at science.ru.nl" > Subject: [FieldTrip] Out of Memory Issue > Message-ID: > Content-Type: text/plain; charset="iso-8859-1" > > Hello, > > I am new to fieldtrip. I was trying to go through the tutorial for > preprocessing of continuous data into memory and am trying to run the > following first few lines of code: > > >> cfg = []; > cfg.dataset = 'subj2.vhdr'; > data_org = ft_preprocessing(cfg) > > However I keep receiving this error: > > Error using fread > Out of memory. Type HELP MEMORY for your options. > > Is this a version issue? I feel that my computer should have enough > memory/RAM. I have downloaded fieldtrip-20160214. I also have MATLAB R2015a. > > Thank you for you help. > > Best, > Thuy-My Le > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From lethuymy at live.com Fri Feb 26 13:44:54 2016 From: lethuymy at live.com (Thuy-My Le) Date: Fri, 26 Feb 2016 07:44:54 -0500 Subject: [FieldTrip] Out of Memory Issue Message-ID: Great thanks. Sent from my Verizon Wireless 4G LTE smartphone -------- Original message -------- From: Stephen Politzer-Ahles Date: 2016/02/26 06:23 (GMT-05:00) To: fieldtrip at science.ru.nl Subject: Re: [FieldTrip] Out of Memory Issue Hello Thuy-My, The dataset loads fine for me with fieldtrip-20150113 in MATLAB 2015a on 64-bit Windows 7 with 8GB RAM. I suspect that the out of memory error is more likely to be related to your computer's power than to the fieldtrip version (these errors are quite common in MATLAB) but you can try running an older version of fieldtrip and/or try this analysis on a different computer to try to diagnose the problem. Best, Steve --- Stephen Politzer-Ahles University of Oxford Language and Brain Lab Faculty of Linguistics, Phonetics & Philology http://users.ox.ac.uk/~cpgl0080/ ---------------------------------------------------------------------- > > Message: 1 > Date: Thu, 25 Feb 2016 09:43:47 -0500 > From: Thuy-My Le > To: "fieldtrip at science.ru.nl" > Subject: [FieldTrip] Out of Memory Issue > Message-ID: > Content-Type: text/plain; charset="iso-8859-1" > > Hello, > > I am new to fieldtrip. I was trying to go through the tutorial for > preprocessing of continuous data into memory and am trying to run the > following first few lines of code: > > >> cfg = []; > cfg.dataset = 'subj2.vhdr'; > data_org = ft_preprocessing(cfg) > > However I keep receiving this error: > > Error using fread > Out of memory. Type HELP MEMORY for your options. > > Is this a version issue? I feel that my computer should have enough > memory/RAM. I have downloaded fieldtrip-20160214. I also have MATLAB R2015a. > > Thank you for you help. > > Best, > Thuy-My Le > > -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip From helen.wieffering at gmail.com Mon Feb 29 01:26:25 2016 From: helen.wieffering at gmail.com (Helen Wieffering) Date: Sun, 28 Feb 2016 19:26:25 -0500 Subject: [FieldTrip] Granger Causality statistics and group analysis Message-ID: Dear Jörn, I recently re-read your 2015 paper on Directed Communication between Nucleus Accumbens and Neocortex in Humans. I am taking a similar approach with my data, looking at non-parametric Granger Causality as computed through FieldTrip. I believe you pointed me to this paper in a response to one of my FieldTrip e-mails a few months back, and it has proven very helpful! If it's not too much trouble, I now wonder if you could provide any further detail on how you computed p-value statistics from each subject's Granger spectrum. As far as I can tell, Fieldtrip's statistical packages are very limited / nonexistent when it comes to connectivity data. In your paper you mentioned obtaining one Granger estimate for each direction - could you explain how you did this, and whether you performed this statistical analysis in Fieldtrip? Any advice is much appreciated! Thank you, Helen -------------- next part -------------- An HTML attachment was scrubbed... URL: From runna90 at 126.com Mon Feb 29 10:15:59 2016 From: runna90 at 126.com (CRN) Date: Mon, 29 Feb 2016 17:15:59 +0800 Subject: [FieldTrip] How to use ft_megrealign before grand average Message-ID: Dear all, My name is Runnan Cao and I am pursuing PhD degree in ShengHe lab in Beijing on vision and cognition science. Currently I am analyzing the MEG data of my project, which were acquired by CTF-275 system. I tried to compute average ERF across several subjects but I had trouble in using ft_megrealign before using ft_timelockgrandaverage. The configuration, cfg.template is required when you apply ft_megrealign function. But I am not clear about how to get that template and what kind of information should be contained in it. If I want to constructed the template by averaging the gradiometer positions over multiple datasets, which function should be applied? If it is not too trouble, could anyone provide an example script showing the detail of applying the ft_megrealign function. Thank you very much and I looking forward to your help any minute. Best wishes, Runnan runna90 at 126.com Institute of Biophysics, Chinese Academy of Science, Beijing, China -------------- next part -------------- An HTML attachment was scrubbed... URL: From antonietta.sorriso at uniparthenope.it Mon Feb 29 10:31:36 2016 From: antonietta.sorriso at uniparthenope.it (Antonietta Sorriso) Date: Mon, 29 Feb 2016 10:31:36 +0100 Subject: [FieldTrip] Time series of sources activation by using LCMV Beamformer Message-ID: <20160229103136.Horde.2LfnDxUE5kiNT7pipIE8hQ3@webmail.uniparthenope.it> Hello, I am using fieltrip in order to obtain source reconstruction from MEG data. I succesfully implemented a code that exploit the function ft_sourceanalysis for performing beamformer. Unfortunately I was not able to obtain the output I need, i.e. the time series of sources activation. In particular I only was able to achieve the mean activation value for each source, divided for frequency bands or not, but I found no way for computing the activation intensity of each source for each time sample. Is it possible to achieve such goal via fieldtrip? If yes, which function and which input parameters should I exploit? Thanks and best regards -- Antonietta Sorriso ​Ph.D. Student ​Dipartimento di Ingegneria ​Laboratorio di TLC ed Elaborazione Segnali ed Immagini ​Centro Direzionale di Napoli, Isola C4, Stanze 326-327, lato Sud, piano 3 ​80143, Napoli, Italia e-mail: antonietta.sorriso at uniparthenope.it From jorn at artinis.com Mon Feb 29 13:21:10 2016 From: jorn at artinis.com (=?UTF-8?Q?J=C3=B6rn_M._Horschig?=) Date: Mon, 29 Feb 2016 13:21:10 +0100 Subject: [FieldTrip] Granger Causality statistics and group analysis In-Reply-To: References: Message-ID: <003a01d172eb$acfeb630$06fc2290$@artinis.com> Dear Helen, Great to hear that you liked the paper! When computing Granger causality you get by default two values, x->y and y->x. I am not sure what more to say to answer your question, so here’s a slightly more detailed response on what we did to the data ;) We did statistics in a two step procedure. First, identifying regions of interest using a surrogate distribution and a permutation test on the z-transformed coherence metric. Second, computing the Granger causality metric and performing an ANOVA (after log-transforming the Granger values to make them satisfy the normality requirement). For both steps, I used FieldTrip functions only for computing the connectivity metric (ordinary coherence, and Granger causality, respectively). Everything else is something I am afraid you will have to do manually (but you can grab some bits and pieces of existing FT functions). I do not have access to my old drive at the Donders Institute anymore, so I cannot send you the code, but I am confident that you can manage to re-code this :) If you get stuck, however, feel free to let me know and I can give you a hand. With best regards, Jörn -- Jörn M. Horschig, PhD, Software Engineer Artinis Medical Systems | +31 481 350 980 From: Helen Wieffering [mailto:helen.wieffering at gmail.com] Sent: Monday, February 29, 2016 1:26 To: FieldTrip discussion list ; jorn at artinis.com Subject: Granger Causality statistics and group analysis Dear Jörn, I recently re-read your 2015 paper on Directed Communication between Nucleus Accumbens and Neocortex in Humans. I am taking a similar approach with my data, looking at non-parametric Granger Causality as computed through FieldTrip. I believe you pointed me to this paper in a response to one of my FieldTrip e-mails a few months back, and it has proven very helpful! If it's not too much trouble, I now wonder if you could provide any further detail on how you computed p-value statistics from each subject's Granger spectrum. As far as I can tell, Fieldtrip's statistical packages are very limited / nonexistent when it comes to connectivity data. In your paper you mentioned obtaining one Granger estimate for each direction - could you explain how you did this, and whether you performed this statistical analysis in Fieldtrip? Any advice is much appreciated! Thank you, Helen -------------- next part -------------- An HTML attachment was scrubbed... URL: From sreenivasan.r.nadar at gmail.com Mon Feb 29 13:57:14 2016 From: sreenivasan.r.nadar at gmail.com (Sreenivasan R. Nadar, Ph.D.) Date: Mon, 29 Feb 2016 07:57:14 -0500 Subject: [FieldTrip] Time series of sources activation by using LCMV Beamformer In-Reply-To: <20160229103136.Horde.2LfnDxUE5kiNT7pipIE8hQ3@webmail.uniparthenope.it> References: <20160229103136.Horde.2LfnDxUE5kiNT7pipIE8hQ3@webmail.uniparthenope.it> Message-ID: Hello Antonietta, Please find the following link for extracting source time series: http://www.fieldtriptoolbox.org/tutorial/connectivity Vasan On Mon, Feb 29, 2016 at 4:31 AM, Antonietta Sorriso < antonietta.sorriso at uniparthenope.it> wrote: > > Hello, > I am using fieltrip in order to obtain source reconstruction from MEG data. > I succesfully implemented a code that exploit the function > ft_sourceanalysis > for performing beamformer. Unfortunately I was not able to obtain the > output > I need, i.e. the time series of sources activation. In particular I only > was > able to achieve the mean activation value for each source, divided for > frequency bands or not, but I found no way for computing the activation > intensity of each source for each time sample. Is it possible to achieve > such goal via fieldtrip? If yes, which function and which input parameters > should I exploit? > > Thanks and best regards > -- > Antonietta Sorriso > > ​Ph.D. Student > ​Dipartimento di Ingegneria > ​Laboratorio di TLC ed Elaborazione Segnali ed Immagini > ​Centro Direzionale di Napoli, Isola C4, Stanze 326-327, lato Sud, piano 3 > ​80143, Napoli, Italia > e-mail: antonietta.sorriso at uniparthenope.it > > _______________________________________________ > 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 stan.vanpelt at donders.ru.nl Mon Feb 29 14:47:24 2016 From: stan.vanpelt at donders.ru.nl (Pelt, S. van (Stan)) Date: Mon, 29 Feb 2016 13:47:24 +0000 Subject: [FieldTrip] Time series of sources activation by using LCMV Beamformer In-Reply-To: References: <20160229103136.Horde.2LfnDxUE5kiNT7pipIE8hQ3@webmail.uniparthenope.it> Message-ID: <7CCA2706D7A4DA45931A892DF3C2894C2D375D2F@exprd03.hosting.ru.nl> Dear Antonietta, In addition to the tutorial Vasan is referring to (where you can find the relevant information under the paragraph “Connectivity between MEG virtual channel and EMG”), there is also a dedicated tutorial for your question: http://www.fieldtriptoolbox.org/tutorial/shared/virtual_sensors Best, Stan -- Stan van Pelt, PhD Donders Institute for Brain, Cognition and Behaviour Radboud University Montessorilaan 3, B.01.34 6525 HR Nijmegen, the Netherlands tel: +31 24 3616288 From: fieldtrip-bounces at science.ru.nl [mailto:fieldtrip-bounces at science.ru.nl] On Behalf Of Sreenivasan R. Nadar, Ph.D. Sent: maandag 29 februari 2016 13:57 To: FieldTrip discussion list Subject: Re: [FieldTrip] Time series of sources activation by using LCMV Beamformer Hello Antonietta, Please find the following link for extracting source time series: http://www.fieldtriptoolbox.org/tutorial/connectivity Vasan On Mon, Feb 29, 2016 at 4:31 AM, Antonietta Sorriso > wrote: Hello, I am using fieltrip in order to obtain source reconstruction from MEG data. I succesfully implemented a code that exploit the function ft_sourceanalysis for performing beamformer. Unfortunately I was not able to obtain the output I need, i.e. the time series of sources activation. In particular I only was able to achieve the mean activation value for each source, divided for frequency bands or not, but I found no way for computing the activation intensity of each source for each time sample. Is it possible to achieve such goal via fieldtrip? If yes, which function and which input parameters should I exploit? Thanks and best regards -- Antonietta Sorriso ​Ph.D. Student ​Dipartimento di Ingegneria ​Laboratorio di TLC ed Elaborazione Segnali ed Immagini ​Centro Direzionale di Napoli, Isola C4, Stanze 326-327, lato Sud, piano 3 ​80143, Napoli, Italia e-mail: antonietta.sorriso at uniparthenope.it _______________________________________________ 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 nwolpert at uni-osnabrueck.de Mon Feb 29 16:18:25 2016 From: nwolpert at uni-osnabrueck.de (nwolpert at uni-osnabrueck.de) Date: Mon, 29 Feb 2016 16:18:25 +0100 (CET) Subject: [FieldTrip] ft_sourceplot on surface Message-ID: <49679.82.226.247.249.1456759105.squirrel@myuos.uni-osnabrueck.de> Dear fieldtrip users, I have an issue when visualizing beamformed data: When using 'ft_sourceplot' to show the interpolated data on slices in the three planes (cfg.method = 'ortho'), reasonable results are produced. However, when doing surface plots by calling cfg.method = 'surface', the power is projected only to a subset of the brain, with very abrupt borders and zero power everywhere else. It gives the impression that there is some kind of scaling problem (i.e. the surface template used has the wrong scale), but I can't figure out the cause for this problem. I would be glad if anyone has a possible explanation. I attach the code below that produced the figures. Best, Nicolai Wolpert cfg = []; cfg.method = 'dics'; cfg.grid = grid; cfg.headmodel = headmodel; cfg.dics.projectnoise = 'yes'; cfg.dics.lambda = 0; sourceAlpha_dics = ft_sourceanalysis(cfg, freq_alpha); % remove center of head bias by using the neural activity index (NAI) sourceAlpha_dics.avg.pow = sourceAlpha_dics.avg.pow ./ sourceAlpha_dics.avg.noise; % reslice mri mri_real_resliced = ft_volumereslice([], mri_real); % Interpolation: Project computed sources on aligned template MRI brain cfg = []; cfg.downsample = 2; cfg.parameter = 'avg.pow'; sourceAlpha_dics_intp = ft_sourceinterpolate(cfg, sourceAlpha_dics , mri_real_resliced); % visualize the result cfg = []; cfg.method = 'surface'; cfg.funparameter = 'avg.pow'; ft_sourceplot(cfg, sourceAlpha_dics_intp); From azeez.adebimpe5 at gmail.com Mon Feb 29 16:28:09 2016 From: azeez.adebimpe5 at gmail.com (Azeez Adebimpe) Date: Mon, 29 Feb 2016 16:28:09 +0100 Subject: [FieldTrip] ft_sourceplot on surface In-Reply-To: <49679.82.226.247.249.1456759105.squirrel@myuos.uni-osnabrueck.de> References: <49679.82.226.247.249.1456759105.squirrel@myuos.uni-osnabrueck.de> Message-ID: it would be nice if you can post the pics that would give much much info On Mon, Feb 29, 2016 at 4:18 PM, wrote: > Dear fieldtrip users, > > I have an issue when visualizing beamformed data: When using > 'ft_sourceplot' to show the interpolated data on slices in the three > planes (cfg.method = 'ortho'), reasonable results are produced. However, > when doing surface plots by calling cfg.method = 'surface', the power is > projected only to a subset of the brain, with very abrupt borders and zero > power everywhere else. It gives the impression that there is some kind of > scaling problem (i.e. the surface template used has the wrong scale), but > I can't figure out the cause for this problem. > > I would be glad if anyone has a possible explanation. I attach the code > below that produced the figures. > > Best, > Nicolai Wolpert > > cfg = []; > cfg.method = 'dics'; > cfg.grid = grid; > cfg.headmodel = headmodel; > cfg.dics.projectnoise = 'yes'; > cfg.dics.lambda = 0; > sourceAlpha_dics = ft_sourceanalysis(cfg, freq_alpha); > > % remove center of head bias by using the neural activity index (NAI) > sourceAlpha_dics.avg.pow = sourceAlpha_dics.avg.pow ./ > sourceAlpha_dics.avg.noise; > > % reslice mri > mri_real_resliced = ft_volumereslice([], mri_real); > > % Interpolation: Project computed sources on aligned template MRI brain > cfg = []; > cfg.downsample = 2; > cfg.parameter = 'avg.pow'; > sourceAlpha_dics_intp = ft_sourceinterpolate(cfg, sourceAlpha_dics , > mri_real_resliced); > > % visualize the result > cfg = []; > cfg.method = 'surface'; > cfg.funparameter = 'avg.pow'; > ft_sourceplot(cfg, sourceAlpha_dics_intp); > > > _______________________________________________ > 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 nicholas.balderston at nih.gov Mon Feb 29 16:48:29 2016 From: nicholas.balderston at nih.gov (Balderston, Nicholas (NIH/NIMH) [F]) Date: Mon, 29 Feb 2016 15:48:29 +0000 Subject: [FieldTrip] Time series of sources activation by using LCMV Beamformer In-Reply-To: <7CCA2706D7A4DA45931A892DF3C2894C2D375D2F@exprd03.hosting.ru.nl> References: <20160229103136.Horde.2LfnDxUE5kiNT7pipIE8hQ3@webmail.uniparthenope.it> , <7CCA2706D7A4DA45931A892DF3C2894C2D375D2F@exprd03.hosting.ru.nl> Message-ID: Hi Antonietta, I'm pretty new to fieldtrip, but I was able to do something similar by doing the following: 1) conducting the timelocked analysis 2) computing the lcmv for all trials 3) extracting the common filter 4) multiplying the common filter by the sensor timecourses I haven't really figured out how to plot these timecourses just yet, but it's a work in progress. Here's the code I used, hope it helps. % 1) conducting the timelocked analysis disp('################################timelocked') cfg = []; cfg.vartrllength = 2; cfg.covariance = 'yes'; cfg.covariancewindow = 'prestim'; cfg.keeptrials = 'yes'; cfg.channel = 'MEG'; cfg.inputfile = strcat(subject, '.alltrials.clean.mat'); cfg.outputfile = strcat(subject, '.alltrials.clean.timelocked.mat'); timelocked = ft_timelockanalysis(cfg); % 2) computing the lcmv for all trials disp('################################create lcmv filter') cfg = []; cfg.method = 'lcmv'; cfg.grid = leadfield_ctf; cfg.vol = vol_ctf; cfg.grad = grad; cfg.channel = 'MEG'; cfg.lambda = '5%'; cfg.lcmv.fixedori = 'yes'; cfg.keepfilter = 'yes'; cfg.outputfile = strcat(subject, '.alltrials.clean.beamformer.filter.mat'); beamformer_avg = ft_sourceanalysis(cfg, timelocked); % 3) extracting the common filter disp('################################create extract common filter') commonfilter = cell2mat(beamformer_avg.avg.filter); beamformer_virt = []; beamformer_virt.fsample = data.fsample; beamformer_virt.trial = []; beamformer_virt.time = time; beamformer_virt.trialinfo = timelocked.trialinfo; beamformer_virt.dimord = timelocked.dimord; % 4) multiplying the common filter by the sensor timecourses disp('################################create source timecourse') for i=1:size(timelocked.trial,1) disp(strcat('################################computing timecourse for trial: ', int2str(i))); beamformer_virt.trial{i} = commonfilter*squeeze(timelocked.trial(i,:,:)); end -nick ________________________________ From: Pelt, S. van (Stan) [stan.vanpelt at donders.ru.nl] Sent: Monday, February 29, 2016 8:47 AM To: FieldTrip discussion list Subject: Re: [FieldTrip] Time series of sources activation by using LCMV Beamformer Dear Antonietta, In addition to the tutorial Vasan is referring to (where you can find the relevant information under the paragraph “Connectivity between MEG virtual channel and EMG”), there is also a dedicated tutorial for your question: http://www.fieldtriptoolbox.org/tutorial/shared/virtual_sensors Best, Stan -- Stan van Pelt, PhD Donders Institute for Brain, Cognition and Behaviour Radboud University Montessorilaan 3, B.01.34 6525 HR Nijmegen, the Netherlands tel: +31 24 3616288 From: fieldtrip-bounces at science.ru.nl [mailto:fieldtrip-bounces at science.ru.nl] On Behalf Of Sreenivasan R. Nadar, Ph.D. Sent: maandag 29 februari 2016 13:57 To: FieldTrip discussion list Subject: Re: [FieldTrip] Time series of sources activation by using LCMV Beamformer Hello Antonietta, Please find the following link for extracting source time series: http://www.fieldtriptoolbox.org/tutorial/connectivity Vasan On Mon, Feb 29, 2016 at 4:31 AM, Antonietta Sorriso > wrote: Hello, I am using fieltrip in order to obtain source reconstruction from MEG data. I succesfully implemented a code that exploit the function ft_sourceanalysis for performing beamformer. Unfortunately I was not able to obtain the output I need, i.e. the time series of sources activation. In particular I only was able to achieve the mean activation value for each source, divided for frequency bands or not, but I found no way for computing the activation intensity of each source for each time sample. Is it possible to achieve such goal via fieldtrip? If yes, which function and which input parameters should I exploit? Thanks and best regards -- Antonietta Sorriso ​Ph.D. Student ​Dipartimento di Ingegneria ​Laboratorio di TLC ed Elaborazione Segnali ed Immagini ​Centro Direzionale di Napoli, Isola C4, Stanze 326-327, lato Sud, piano 3 ​80143, Napoli, Italia e-mail: antonietta.sorriso at uniparthenope.it _______________________________________________ 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 kajal5888 at yahoo.co.in Mon Feb 29 21:11:58 2016 From: kajal5888 at yahoo.co.in (D I L J I T) Date: Mon, 29 Feb 2016 20:11:58 +0000 (UTC) Subject: [FieldTrip] How to plot sourcedata at the cortical surface References: <347287188.845797.1456776718141.JavaMail.yahoo.ref@mail.yahoo.com> Message-ID: <347287188.845797.1456776718141.JavaMail.yahoo@mail.yahoo.com> Hi All, We have done the MEG source analysis using fieltrip. We want to plot the the source data at the surface. We want to have the individual surface. Can anyone please guide us how to prepare them(i.e. surface_white_both.mat etc).Thanks alot in advance,Warm RegardsDJ  Diljit Singh Kajal ------------------------------------ Ph.D Research Scholar, International Max Planck Research School, Graduate Training Centre for Neuroscience, Institute for Medical Psychology & Behavioural Neurobiology, MEG Centre, Room number 202, Otfried-Müller-Str. 47, University of Tübingen, Tübingen-72076, Germany. +49-176-88262138(M), +49-7071-2981196(O) -------------- next part -------------- An HTML attachment was scrubbed... URL: From Elana.Harris at cchmc.org Mon Feb 29 21:20:17 2016 From: Elana.Harris at cchmc.org (Harris, Elana) Date: Mon, 29 Feb 2016 20:20:17 +0000 Subject: [FieldTrip] MEG sensors statistics Message-ID: Dear All, I have the minimum, maximum and mean alpha power for each MEG sensor (found using MEGProcessor developed by Jing Xiang, MD, PhD) for 16 subjects, 8 of whom have a psychiatric condition and 8 are healthy comparison subjects. We find statistical significance when comparing the set all of the MLF or MRO sensors, for instance, between the groups (healthy and pathological), however, I am wondering if this is false statistical power as all of the sensors likely represent once source generator and not truly, multiple, separate, non-independent recordings. Would it be best to summarize each subject’s data with one number to represent the maximum alpha power for the group of MLF sensors and then compare the two groups of subjects? I welcome your advice. Thank you. Elana Elana Harris, MD, PhD Assistant Professor Division of Child & Adolescent Psychiatry Cincinnati Children’s Hospital Medical Center -------------- next part -------------- An HTML attachment was scrubbed... URL: