From kramerrobin92 at gmail.com Fri Jul 1 11:53:06 2016 From: kramerrobin92 at gmail.com (Robin Kramer) Date: Fri, 1 Jul 2016 11:53:06 +0200 Subject: [FieldTrip] Automatic artifact detection (no rejection) Message-ID: Hi all, I want to use automatic artifact detection to easily find the trials where range-thresholds may be exceeded. However, because the segments are a little larger than the time of interest (for baseline correction a.o.), I do not always want to remove all the trials where the threshold is exceeded. Is there a way to deselect the automatically detected artifacts? Best, Robin Kramer -------------- next part -------------- An HTML attachment was scrubbed... URL: From stephen.politzer-ahles at ling-phil.ox.ac.uk Fri Jul 1 12:25:59 2016 From: stephen.politzer-ahles at ling-phil.ox.ac.uk (Stephen Politzer-Ahles) Date: Fri, 1 Jul 2016 11:25:59 +0100 Subject: [FieldTrip] Automatic artifact detection (no rejection) Message-ID: Hi Robin, Rather than deselecting certain trials, it sounds like what you'd want to do is just not mark a trial 'bad' at all if the artifact is outside your time window of interest. For this, I think negative trial-padding ( http://www.fieldtriptoolbox.org/tutorial/automatic_artifact_rejection#negative_trialpadding) should be able to do what you need. 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: Fri, 1 Jul 2016 11:53:06 +0200 > From: Robin Kramer > To: fieldtrip at science.ru.nl > Subject: [FieldTrip] Automatic artifact detection (no rejection) > Message-ID: > X_1c4fPQ at mail.gmail.com> > Content-Type: text/plain; charset="utf-8" > > Hi all, > > I want to use automatic artifact detection to easily find the trials where > range-thresholds may be exceeded. However, because the segments are a > little larger than the time of interest (for baseline correction a.o.), I > do not always want to remove all the trials where the threshold is > exceeded. Is there a way to deselect the automatically detected artifacts? > > Best, > > Robin Kramer > > fieldtrip mailing list > fieldtrip at donders.ru.nl > https://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > End of fieldtrip Digest, Vol 68, Issue 1 > **************************************** > -------------- next part -------------- An HTML attachment was scrubbed... URL: From p.taesler at uke.de Fri Jul 1 12:34:22 2016 From: p.taesler at uke.de (Philipp Taesler) Date: Fri, 1 Jul 2016 12:34:22 +0200 Subject: [FieldTrip] Automatic artifact detection (no rejection) In-Reply-To: References: Message-ID: Hi Robin, you might be interested in the section "Negative trialpadding" in the rejection tutorial at http://www.fieldtriptoolbox.org/tutorial/automatic_artifact_rejection Otherwise, you can just pass the structure containing the artifact info from automatic detection (cfg.artfctdef.xxx) to ft_databrowser. This way you can screen the data and manually define and/or remove artifacts from the trials. Cheers, Phil Am 01.07.2016 um 11:53 schrieb Robin Kramer: > Hi all, > > I want to use automatic artifact detection to easily find the trials > where range-thresholds may be exceeded. However, because the segments > are a little larger than the time of interest (for baseline correction > a.o.), I do not always want to remove all the trials where the threshold > is exceeded. Is there a way to deselect the automatically detected > artifacts? > > Best, > > Robin Kramer -- Philipp Taesler Department of Systems Neuroscience University Medical Center Hamburg-Eppendorf Martinistr. 52, W34, 20248 Hamburg, Germany Phone: +49-40-7410-59902 Fax: +49-40-7410-59955 Email: p.taesler at uke.de -- _____________________________________________________________________ Universitätsklinikum Hamburg-Eppendorf; Körperschaft des öffentlichen Rechts; Gerichtsstand: Hamburg | www.uke.de Vorstandsmitglieder: Prof. Dr. Burkhard Göke (Vorsitzender), Prof. Dr. Dr. Uwe Koch-Gromus, Joachim Prölß, Rainer Schoppik _____________________________________________________________________ SAVE PAPER - THINK BEFORE PRINTING From kramerrobin92 at gmail.com Fri Jul 1 13:45:18 2016 From: kramerrobin92 at gmail.com (Robin Kramer) Date: Fri, 1 Jul 2016 13:45:18 +0200 Subject: [FieldTrip] Automatic artifact detection (no rejection) In-Reply-To: References: Message-ID: Hi Steve and Phil, Thank you, that is exactly what I was looking for. However, it seems as if it not yet implemented in ft_artifact_threshold(). I see no difference between the amount of rejected trials. Moreover, the option is not specified on the reference page, though it is on ft_artifact_eog for instance. Is that correct? Best, Robin 2016-07-01 12:25 GMT+02:00 Stephen Politzer-Ahles < stephen.politzer-ahles at ling-phil.ox.ac.uk>: > Hi Robin, > > Rather than deselecting certain trials, it sounds like what you'd want to > do is just not mark a trial 'bad' at all if the artifact is outside your > time window of interest. For this, I think negative trial-padding ( > http://www.fieldtriptoolbox.org/tutorial/automatic_artifact_rejection#negative_trialpadding) > should be able to do what you need. > > 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: Fri, 1 Jul 2016 11:53:06 +0200 >> From: Robin Kramer >> To: fieldtrip at science.ru.nl >> Subject: [FieldTrip] Automatic artifact detection (no rejection) >> Message-ID: >> > X_1c4fPQ at mail.gmail.com> >> Content-Type: text/plain; charset="utf-8" >> >> Hi all, >> >> I want to use automatic artifact detection to easily find the trials where >> range-thresholds may be exceeded. However, because the segments are a >> little larger than the time of interest (for baseline correction a.o.), I >> do not always want to remove all the trials where the threshold is >> exceeded. Is there a way to deselect the automatically detected artifacts? >> >> Best, >> >> Robin Kramer >> > > >> fieldtrip mailing list >> fieldtrip at donders.ru.nl >> https://mailman.science.ru.nl/mailman/listinfo/fieldtrip >> >> End of fieldtrip Digest, Vol 68, Issue 1 >> **************************************** >> > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > https://mailman.science.ru.nl/mailman/listinfo/fieldtrip > -------------- next part -------------- An HTML attachment was scrubbed... URL: From p.taesler at uke.de Fri Jul 1 14:10:09 2016 From: p.taesler at uke.de (Philipp Taesler) Date: Fri, 1 Jul 2016 14:10:09 +0200 Subject: [FieldTrip] Automatic artifact detection (no rejection) In-Reply-To: References: Message-ID: <15e80a9d-3eba-0c7b-cd77-af2e5f1d80c4@uke.de> Hi Robin, you are right, the comment in the function explicitly says: % Contrary to the other artifact detection functions, this function % will mark the whole trial as an artifact if the threshold is exceeded. % Furthermore, this function does not support artifact- or filterpadding. I didn't know that. Hmmm, then I guess your only option is to either visually review the marked trials and unmark the ones you want to keep. Another possibilty might be to use ft_redefinetrial to create a dataset with shorter trials, run the rejection on this data, and use the resulting artefact definitions for your original data. (Not sure if that is straightforward, since I never did this myself). Cheers, Phil Am 01.07.2016 um 13:45 schrieb Robin Kramer: > Hi Steve and Phil, > > Thank you, that is exactly what I was looking for. However, it seems as > if it not yet implemented in ft_artifact_threshold(). I see no > difference between the amount of rejected trials. Moreover, the option > is not specified on the reference page, though it is on ft_artifact_eog > for instance. Is that correct? > > Best, > Robin > > 2016-07-01 12:25 GMT+02:00 Stephen Politzer-Ahles > >: > > Hi Robin, > > Rather than deselecting certain trials, it sounds like what you'd > want to do is just not mark a trial 'bad' at all if the artifact is > outside your time window of interest. For this, I think negative > trial-padding > (http://www.fieldtriptoolbox.org/tutorial/automatic_artifact_rejection#negative_trialpadding) > should be able to do what you need. > > 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: Fri, 1 Jul 2016 11:53:06 +0200 > From: Robin Kramer > > To: fieldtrip at science.ru.nl > Subject: [FieldTrip] Automatic artifact detection (no rejection) > Message-ID: > > > > Content-Type: text/plain; charset="utf-8" > > Hi all, > > I want to use automatic artifact detection to easily find the > trials where > range-thresholds may be exceeded. However, because the segments > are a > little larger than the time of interest (for baseline correction > a.o.), I > do not always want to remove all the trials where the threshold is > exceeded. Is there a way to deselect the automatically detected > artifacts? > > Best, > > Robin Kramer > -- Philipp Taesler Department of Systems Neuroscience University Medical Center Hamburg-Eppendorf Martinistr. 52, W34, 20248 Hamburg, Germany Phone: +49-40-7410-59902 Fax: +49-40-7410-59955 Email: p.taesler at uke.de -- _____________________________________________________________________ Universitätsklinikum Hamburg-Eppendorf; Körperschaft des öffentlichen Rechts; Gerichtsstand: Hamburg | www.uke.de Vorstandsmitglieder: Prof. Dr. Burkhard Göke (Vorsitzender), Prof. Dr. Dr. Uwe Koch-Gromus, Joachim Prölß, Rainer Schoppik _____________________________________________________________________ SAVE PAPER - THINK BEFORE PRINTING From viviana.betti at gmail.com Fri Jul 1 15:56:18 2016 From: viviana.betti at gmail.com (Viviana Betti) Date: Fri, 1 Jul 2016 15:56:18 +0200 Subject: [FieldTrip] PhD Position in Rome Message-ID: Dear Fieldtrip community, Please see below the opportunity for the "International PhD in Cognitive Social Affective and Social Neuroscience" (CoSAN, http://www.cosanphd.com/) at the Department of Psychology, Sapienza University of Rome and the research-oriented hospital IRCCS Fondazione Santa Lucia in Rome. In the attachment you may find all the information concerning the details of the PhD program. I would kindly ask you to spread the voice to your Department or any other Institution, colleague, or to any potential applicant you think may qualify for the post. Best wishes Viviana Betti -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: Attachment.pdf Type: application/pdf Size: 247299 bytes Desc: not available URL: From stephen.politzer-ahles at ling-phil.ox.ac.uk Fri Jul 1 16:29:47 2016 From: stephen.politzer-ahles at ling-phil.ox.ac.uk (Stephen Politzer-Ahles) Date: Fri, 1 Jul 2016 15:29:47 +0100 Subject: [FieldTrip] Automatic artifact detection (no rejection) Message-ID: I second Phil's suggestion. While I haven't done this myself, what i would do if I were in this situation is something like the following: 1. Create a dataset with the shorter epochs 2. Run the artifact rejection 3. Save the list of good trials (trials that weren't rejected) 4. Throw out that dataset, and make a new dataset with the epoch length I actually want 5. Directly use the list of good trials at whatever stage is relevant (ft_timelockanalysis or whatever) to make sure you're only keeping the trials that would have made it through artifact rejection 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: Fri, 1 Jul 2016 14:10:09 +0200 > From: Philipp Taesler > To: > Subject: Re: [FieldTrip] Automatic artifact detection (no rejection) > Message-ID: <15e80a9d-3eba-0c7b-cd77-af2e5f1d80c4 at uke.de> > Content-Type: text/plain; charset="utf-8" > > Hi Robin, > > you are right, the comment in the function explicitly says: > > % Contrary to the other artifact detection functions, this function > % will mark the whole trial as an artifact if the threshold is exceeded. > % Furthermore, this function does not support artifact- or filterpadding. > > I didn't know that. Hmmm, then I guess your only option is to either > visually review the marked trials and unmark the ones you want to keep. > Another possibilty might be to use ft_redefinetrial to create a dataset > with shorter trials, run the rejection on this data, and use the > resulting artefact definitions for your original data. (Not sure if that > is straightforward, since I never did this myself). > > Cheers, > Phil > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From viviana.betti at gmail.com Fri Jul 1 21:27:07 2016 From: viviana.betti at gmail.com (Viviana Betti) Date: Fri, 1 Jul 2016 19:27:07 +0000 Subject: [FieldTrip] PhD position in Rome Message-ID: <3c8cb771f59a449ebf442e3379facc76@EXPRD02.hosting.ru.nl> Dear Fieldtrip community, Please see below the opportunity for the "International PhD in Cognitive Social Affective and Social Neuroscience" (CoSAN, http://www.cosanphd.com/) at the Department of Psychology, Sapienza University of Rome and the research-oriented hospital IRCCS Fondazione Santa Lucia in Rome. In the attachment you may find all the information concerning the details of the PhD program. I would kindly ask you to spread the voice to your Department or any other Institution, colleague, or to any potential applicant. Best wishes Viviana Betti -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: Attachment.pdf Type: application/pdf Size: 247299 bytes Desc: Attachment.pdf URL: From jan at brogger.no Sat Jul 2 01:13:57 2016 From: jan at brogger.no (=?iso-8859-1?Q?Jan_Br=F8gger?=) Date: Sat, 2 Jul 2016 01:13:57 +0200 Subject: [FieldTrip] EEGLAB integration code question Message-ID: <007101d1d3ee$3ec1cae0$bc4560a0$@brogger.no> I just submitted a pull request to read Nicolet/Nervus files with fieldtrip (https://github.com/fieldtrip/fieldtrip/pull/186) based on Joost Wagenaar’s code from https://github.com/ieeg-portal/Nicolet-Reader with some updates from me. Nicolet/Nervus is popular for clinical EEG. The chief advantage is that it reads the file without depending on any external (vendor-supplied) DLLs or conversion to EDF. I have two questions that concern EEGLAB and fieldtrip integration: 1. How can I make EEGLAB know that the Nervus/Nicolet EEG file read with fieldtrip was originally recorded with a common reference (Fp1-REF, Fp2-REF)? As far as I know, almost all clinical EEG is recorded with REF in this way. There is an example in ft_read_header.m line 299 for the ‘Anywave’ format, which says “hdr.reference = orig.reference(:);” but apparently EEGLAB doesn’t use this field. In fieldtrip2eeglab.m there is no functionality to say that this is a common reference. There are many references in the EEGLAB code similar to EEG.ref = ‘common’ but I can’t quite make heads or tails of it. 2. How can I make EEGLAB know the original filename of the Nervus/Nicolet EEG file read with fieldtrip? In fieldtrip2eeglab.m line 25 it simply says “EEG.filename = '';”. Could I submit a pull request to EEGLAB with “EEG.filename = hdr.filename;” (with a check to see if the filename field exists?) 3. There are often breaks in clinical EEG recordings (e.g. adjusting the photic lamps, instructing in hyperventilation etc.). Currently the Nicolet/Nervus code handles this by creating events of type ‘boundary’, which should make it work for EEGLAB. I hope I don’t have to use the “trials” functionality of fieldtrip to indicate discontinuities. Will fieldtrip understand events of type ‘boundary’? Yours sincerely, Jan Brogger Clinical neurophysiologist/software developer, MD PhD Bergen, Norway -------------- next part -------------- An HTML attachment was scrubbed... URL: From andrejakosticln at gmail.com Wed Jul 6 15:33:01 2016 From: andrejakosticln at gmail.com (=?UTF-8?Q?Andreja_Kosti=C4=87?=) Date: Wed, 6 Jul 2016 15:33:01 +0200 Subject: [FieldTrip] How do I use an atlas to find regions on an individual MRI? Message-ID: Hello dear Fieldtrippers! This is my first post on the mailing list, so I apologize if this looks a bit confused. So I'm trying to use the WFU PickAtlas for Brodmann areas in what I think are MNI coordinates to find specific regions inside of a brain (I'm coming from electrical engineering background, so I can't do that "by hand") in an individual whole-head MRI and I'm having issues getting sane results. I suspect that my workflow is the problem, so I would be very grateful if someone could provide some advice as to what I should be actually doing. My original idea was to take MRI in CTF coordinates, convert it to MNI coordinates and then just use atlas to make masks. From what I could gather, it's not that simple. So here are examples of what I'm doing right now: ft_defaults; %Let's read atlas atlas = ft_read_atlas('C:\REALY_LONG_PATH_TO_PICKATLAS\wfu_pickatlas\MNI_atlas_templates\TD_brodmann.nii'); %Using Subject01from FT tutorials right now, for simplicity's sake. mri = ft_read_mri('Subject01\Subject01.mri'); %Reslice, apply transformations cfg=[]; cfg.dim=[256 256 256]; mri_resliced=ft_volumereslice(cfg, mri); cfg=[]; mri_norm1=ft_volumenormalise(cfg,mri_resliced); %Unfortunately, this cuts off everything below the nose! %Still let's take a look at the visualization with atlas cfg=[]; cfg.inputcoord='mni'; cfg.atlas=atlas; cfg.roi='brodmann area 4'; mask4 = ft_volumelookup(cfg, mri_norm1); mri_norm1.mask4=mask4; cfg=[]; cfg.atlas=atlas; cfg.funparameter = 'mask4'; ft_sourceplot(cfg,mri_norm1) %The result doesn't look so good, big part of the area seems to fit inside of the gaps between brain tissue! So this doesn't seem to have worked out. My next attempt was to directly use ft_convert_coordsys. This fixed the cutting issue, but it didn't solve the problem of results looking strange. So my other idea was to try with template=ft_read_mri('C:\PathToFT\external\spm8\templates\T1.nii'); cfg=[]; cfg.method='spm'; cfg.coordsys='spm'; mri_realigned=ft_volumerealign(cfg,mri_resliced,template); But this produces very obviously wrong results, like coronal slices on sagittal plane. I'm also not sure if I should be trying to somehow transform an atlas to fit the individual MRI that I'm using? All the best, Andreja Kostić -------------- next part -------------- An HTML attachment was scrubbed... URL: From jan.schoffelen at donders.ru.nl Wed Jul 6 16:06:16 2016 From: jan.schoffelen at donders.ru.nl (Schoffelen, J.M. (Jan Mathijs)) Date: Wed, 6 Jul 2016 14:06:16 +0000 Subject: [FieldTrip] How do I use an atlas to find regions on an individual MRI? In-Reply-To: References: Message-ID: <78D16A4A-6C63-4FDB-A3CD-09C759B7140D@donders.ru.nl> Dear Andreja, I have never understood ft_volumelookup myself, so I wonder whether you would be helped by proposing a different strategy… I would do the following: % read in the atlas atlas = ft_read_atlas(‘somefilename’); % read in and normalise the anatomical image mri = ft_read_mri(‘someotherfilename’) mri = ft_volumenormalise([], mri); % assuming that both atlas and mri are in the same coordinate system cfg = []; cfg.parameter = ‘tissue’; mri2 = ft_sourceinterpolate(cfg, atlas, mri); The last step gives you the atlas interpolated onto the anatomical MRI. It should be straightforward to create a boolean mask from here that specifies a particular ROI mri2.mask = mri2.tissue==strcmp(atlas.tissuelabel, ‘yourfavoritebrodmannarea’); I hope this helps. Best wishes, Jan-Mathijs On 06 Jul 2016, at 15:33, Andreja Kostić > wrote: Hello dear Fieldtrippers! This is my first post on the mailing list, so I apologize if this looks a bit confused. So I'm trying to use the WFU PickAtlas for Brodmann areas in what I think are MNI coordinates to find specific regions inside of a brain (I'm coming from electrical engineering background, so I can't do that "by hand") in an individual whole-head MRI and I'm having issues getting sane results. I suspect that my workflow is the problem, so I would be very grateful if someone could provide some advice as to what I should be actually doing. My original idea was to take MRI in CTF coordinates, convert it to MNI coordinates and then just use atlas to make masks. From what I could gather, it's not that simple. So here are examples of what I'm doing right now: ft_defaults; %Let's read atlas atlas = ft_read_atlas('C:\REALY_LONG_PATH_TO_PICKATLAS\wfu_pickatlas\MNI_atlas_templates\TD_brodmann.nii'); %Using Subject01from FT tutorials right now, for simplicity's sake. mri = ft_read_mri('Subject01\Subject01.mri'); %Reslice, apply transformations cfg=[]; cfg.dim=[256 256 256]; mri_resliced=ft_volumereslice(cfg, mri); cfg=[]; mri_norm1=ft_volumenormalise(cfg,mri_resliced); %Unfortunately, this cuts off everything below the nose! %Still let's take a look at the visualization with atlas cfg=[]; cfg.inputcoord='mni'; cfg.atlas=atlas; cfg.roi='brodmann area 4'; mask4 = ft_volumelookup(cfg, mri_norm1); mri_norm1.mask4=mask4; cfg=[]; cfg.atlas=atlas; cfg.funparameter = 'mask4'; ft_sourceplot(cfg,mri_norm1) %The result doesn't look so good, big part of the area seems to fit inside of the gaps between brain tissue! So this doesn't seem to have worked out. My next attempt was to directly use ft_convert_coordsys. This fixed the cutting issue, but it didn't solve the problem of results looking strange. So my other idea was to try with template=ft_read_mri('C:\PathToFT\external\spm8\templates\T1.nii'); cfg=[]; cfg.method='spm'; cfg.coordsys='spm'; mri_realigned=ft_volumerealign(cfg,mri_resliced,template); But this produces very obviously wrong results, like coronal slices on sagittal plane. I'm also not sure if I should be trying to somehow transform an atlas to fit the individual MRI that I'm using? All the best, Andreja Kostić _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl https://mailman.science.ru.nl/mailman/listinfo/fieldtrip -------------- next part -------------- An HTML attachment was scrubbed... URL: From r.thomas at nin.knaw.nl Wed Jul 6 17:11:04 2016 From: r.thomas at nin.knaw.nl (Rajat Thomas) Date: Wed, 6 Jul 2016 15:11:04 +0000 Subject: [FieldTrip] Group analysis, source surface recon Message-ID: <1467817864661.72517@nin.knaw.nl> Dear Fieldtrippers, I did a MinimumNorm source recon on individual subjects successfully following the nice tutorial on minnorm on fieldtrip.org! Now, I want to do a group analysis extending this tutorial to the group level. Q1. Anyone has done or knows how to do group analysis using surfaces (that we so painfully constructed using freesurfer)? Q2. Any helper scripts for group analysis (even volumetric) would be highly appreciated. If it all works, I will be happy to upload my scripts and write up a neat group analysis tutorial. :-) Thank you. Rajat Rajat Mani Thomas Social Brain Lab Netherlands Institute for Neuroscience Amsterdam -------------- next part -------------- An HTML attachment was scrubbed... URL: From andrejakosticln at gmail.com Wed Jul 6 18:20:48 2016 From: andrejakosticln at gmail.com (=?UTF-8?Q?Andreja_Kosti=C4=87?=) Date: Wed, 6 Jul 2016 18:20:48 +0200 Subject: [FieldTrip] How do I use an atlas to find regions on an individual MRI? In-Reply-To: <78D16A4A-6C63-4FDB-A3CD-09C759B7140D@donders.ru.nl> References: <78D16A4A-6C63-4FDB-A3CD-09C759B7140D@donders.ru.nl> Message-ID: Hello Jan-Mathijs and thank you very much for your answer!! Since my approach is not producing results, I'm naturally very open to different strategies! Unfortunately, I do not understand how exactly your suggested process of creating a mask works. Namely, at least for me, the mri2.tissue is a 3D matrix that has the same size as the anatomy. Result of strcmp(atlas.tissuelabel, ‘yourfavoritebrodmannarea’) is a vector that has a 1 at the index of my favorite Brodmann area. Matlab does not allow comparison between two of them. At first I thought that the value in the tissue structure is a number matching the index of a label, but then I saw that there are also decimal numbers in the mri2.tissue as well, which confused me. I also tried with following: mri2.mask = mri2.tissue==find(strcmp(atlas.tissuelabel,'brodmann area 17')); which does return something, but the mask has points spread around the whole brain, so this obviously doesn't work the way I thought it does. So I'm not really sure how to make this mask work. All the best, Andreja Kostić 2016-07-06 16:06 GMT+02:00 Schoffelen, J.M. (Jan Mathijs) < jan.schoffelen at donders.ru.nl>: > Dear Andreja, > > I have never understood ft_volumelookup myself, so I wonder whether you > would be helped by proposing a different strategy… > > I would do the following: > > % read in the atlas > atlas = ft_read_atlas(‘somefilename’); > > % read in and normalise the anatomical image > mri = ft_read_mri(‘someotherfilename’) > mri = ft_volumenormalise([], mri); > > % assuming that both atlas and mri are in the same coordinate system > cfg = []; > cfg.parameter = ‘tissue’; > mri2 = ft_sourceinterpolate(cfg, atlas, mri); > > The last step gives you the atlas interpolated onto the anatomical MRI. > > It should be straightforward to create a boolean mask from here that > specifies a particular ROI > > mri2.mask = mri2.tissue==strcmp(atlas.tissuelabel, > ‘yourfavoritebrodmannarea’); > > > I hope this helps. > > Best wishes, > Jan-Mathijs > > > > On 06 Jul 2016, at 15:33, Andreja Kostić > wrote: > > Hello dear Fieldtrippers! > > This is my first post on the mailing list, so I apologize if this looks a > bit confused. > > > So I'm trying to use the WFU PickAtlas for Brodmann areas in what I think > are MNI coordinates to find specific regions inside of a brain (I'm coming > from electrical engineering background, so I can't do that "by hand") in an > individual whole-head MRI and I'm having issues getting sane results. > > I suspect that my workflow is the problem, so I would be very grateful if > someone could provide some advice as to what I should be actually doing. > > My original idea was to take MRI in CTF coordinates, convert it to MNI > coordinates and then just use atlas to make masks. From what I could > gather, it's not that simple. > > So here are examples of what I'm doing right now: > > ft_defaults; > > %Let's read atlas > > atlas = > ft_read_atlas('C:\REALY_LONG_PATH_TO_PICKATLAS\wfu_pickatlas\MNI_atlas_templates\TD_brodmann.nii'); > > > %Using Subject01from FT tutorials right now, for simplicity's sake. > mri = ft_read_mri('Subject01\Subject01.mri'); > > > %Reslice, apply transformations > cfg=[]; > cfg.dim=[256 256 256]; > mri_resliced=ft_volumereslice(cfg, mri); > > cfg=[]; > mri_norm1=ft_volumenormalise(cfg,mri_resliced); > > %Unfortunately, this cuts off everything below the nose! > > %Still let's take a look at the visualization with atlas > > cfg=[]; > cfg.inputcoord='mni'; > cfg.atlas=atlas; > cfg.roi='brodmann area 4'; > > mask4 = ft_volumelookup(cfg, mri_norm1); > mri_norm1.mask4=mask4; > > cfg=[]; > cfg.atlas=atlas; > cfg.funparameter = 'mask4'; > ft_sourceplot(cfg,mri_norm1) > > > %The result doesn't look so good, big part of the area seems to fit inside > of the gaps between brain tissue! > > So this doesn't seem to have worked out. My next attempt was to directly > use ft_convert_coordsys. This fixed the cutting issue, but it didn't solve > the problem of results looking strange. > > So my other idea was to try with > > template=ft_read_mri('C:\PathToFT\external\spm8\templates\T1.nii'); > > cfg=[]; > cfg.method='spm'; > cfg.coordsys='spm'; > mri_realigned=ft_volumerealign(cfg,mri_resliced,template); > > But this produces very obviously wrong results, like coronal slices on > sagittal plane. > > I'm also not sure if I should be trying to somehow transform an atlas to > fit the individual MRI that I'm using? > > All the best, > Andreja Kostić > > > > > > > > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > https://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > https://mailman.science.ru.nl/mailman/listinfo/fieldtrip > -------------- next part -------------- An HTML attachment was scrubbed... URL: From jan.schoffelen at donders.ru.nl Wed Jul 6 18:43:20 2016 From: jan.schoffelen at donders.ru.nl (Schoffelen, J.M. (Jan Mathijs)) Date: Wed, 6 Jul 2016 16:43:20 +0000 Subject: [FieldTrip] How do I use an atlas to find regions on an individual MRI? In-Reply-To: References: <78D16A4A-6C63-4FDB-A3CD-09C759B7140D@donders.ru.nl> Message-ID: Sorry Andreja, I forgot the find() indeed. Also, I forgot to mention that the cfg to ft_sourceinterpolate should specify the interpolation method to be ‘nearest’. I hope this helps. Best, Jan-Mathijs On 06 Jul 2016, at 18:20, Andreja Kostić > wrote: Hello Jan-Mathijs and thank you very much for your answer!! Since my approach is not producing results, I'm naturally very open to different strategies! Unfortunately, I do not understand how exactly your suggested process of creating a mask works. Namely, at least for me, the mri2.tissue is a 3D matrix that has the same size as the anatomy. Result of strcmp(atlas.tissuelabel, ‘yourfavoritebrodmannarea’) is a vector that has a 1 at the index of my favorite Brodmann area. Matlab does not allow comparison between two of them. At first I thought that the value in the tissue structure is a number matching the index of a label, but then I saw that there are also decimal numbers in the mri2.tissue as well, which confused me. I also tried with following: mri2.mask = mri2.tissue==find(strcmp(atlas.tissuelabel,'brodmann area 17')); which does return something, but the mask has points spread around the whole brain, so this obviously doesn't work the way I thought it does. So I'm not really sure how to make this mask work. All the best, Andreja Kostić 2016-07-06 16:06 GMT+02:00 Schoffelen, J.M. (Jan Mathijs) >: Dear Andreja, I have never understood ft_volumelookup myself, so I wonder whether you would be helped by proposing a different strategy… I would do the following: % read in the atlas atlas = ft_read_atlas(‘somefilename’); % read in and normalise the anatomical image mri = ft_read_mri(‘someotherfilename’) mri = ft_volumenormalise([], mri); % assuming that both atlas and mri are in the same coordinate system cfg = []; cfg.parameter = ‘tissue’; mri2 = ft_sourceinterpolate(cfg, atlas, mri); The last step gives you the atlas interpolated onto the anatomical MRI. It should be straightforward to create a boolean mask from here that specifies a particular ROI mri2.mask = mri2.tissue==strcmp(atlas.tissuelabel, ‘yourfavoritebrodmannarea’); I hope this helps. Best wishes, Jan-Mathijs On 06 Jul 2016, at 15:33, Andreja Kostić > wrote: Hello dear Fieldtrippers! This is my first post on the mailing list, so I apologize if this looks a bit confused. So I'm trying to use the WFU PickAtlas for Brodmann areas in what I think are MNI coordinates to find specific regions inside of a brain (I'm coming from electrical engineering background, so I can't do that "by hand") in an individual whole-head MRI and I'm having issues getting sane results. I suspect that my workflow is the problem, so I would be very grateful if someone could provide some advice as to what I should be actually doing. My original idea was to take MRI in CTF coordinates, convert it to MNI coordinates and then just use atlas to make masks. From what I could gather, it's not that simple. So here are examples of what I'm doing right now: ft_defaults; %Let's read atlas atlas = ft_read_atlas('C:\REALY_LONG_PATH_TO_PICKATLAS\wfu_pickatlas\MNI_atlas_templates\TD_brodmann.nii'); %Using Subject01from FT tutorials right now, for simplicity's sake. mri = ft_read_mri('Subject01\Subject01.mri'); %Reslice, apply transformations cfg=[]; cfg.dim=[256 256 256]; mri_resliced=ft_volumereslice(cfg, mri); cfg=[]; mri_norm1=ft_volumenormalise(cfg,mri_resliced); %Unfortunately, this cuts off everything below the nose! %Still let's take a look at the visualization with atlas cfg=[]; cfg.inputcoord='mni'; cfg.atlas=atlas; cfg.roi='brodmann area 4'; mask4 = ft_volumelookup(cfg, mri_norm1); mri_norm1.mask4=mask4; cfg=[]; cfg.atlas=atlas; cfg.funparameter = 'mask4'; ft_sourceplot(cfg,mri_norm1) %The result doesn't look so good, big part of the area seems to fit inside of the gaps between brain tissue! So this doesn't seem to have worked out. My next attempt was to directly use ft_convert_coordsys. This fixed the cutting issue, but it didn't solve the problem of results looking strange. So my other idea was to try with template=ft_read_mri('C:\PathToFT\external\spm8\templates\T1.nii'); cfg=[]; cfg.method='spm'; cfg.coordsys='spm'; mri_realigned=ft_volumerealign(cfg,mri_resliced,template); But this produces very obviously wrong results, like coronal slices on sagittal plane. I'm also not sure if I should be trying to somehow transform an atlas to fit the individual MRI that I'm using? All the best, Andreja Kostić _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl https://mailman.science.ru.nl/mailman/listinfo/fieldtrip _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl https://mailman.science.ru.nl/mailman/listinfo/fieldtrip _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl https://mailman.science.ru.nl/mailman/listinfo/fieldtrip -------------- next part -------------- An HTML attachment was scrubbed... URL: From jan.schoffelen at donders.ru.nl Thu Jul 7 07:36:01 2016 From: jan.schoffelen at donders.ru.nl (Schoffelen, J.M. (Jan Mathijs)) Date: Thu, 7 Jul 2016 05:36:01 +0000 Subject: [FieldTrip] Group analysis, source surface recon In-Reply-To: <1467817864661.72517@nin.knaw.nl> References: <1467817864661.72517@nin.knaw.nl> Message-ID: Dear Rajat, Q1. Anyone has done or knows how to do group analysis using surfaces (that we so painfully constructed using freesurfer)? A1: Yes, I have done it, and know how to do so. Q2. Any helper scripts for group analysis (even volumetric) would be highly appreciated. A2: This question has been asked and answered before. A good start would be to look at the following (so that I don’t need to type it again :o) ): https://mailman.science.ru.nl/pipermail/fieldtrip/2016-June/010539.html https://mailman.science.ru.nl/pipermail/fieldtrip/2015-July/009348.html https://mailman.science.ru.nl/pipermail/fieldtrip/2015-June/009312.html https://mailman.science.ru.nl/pipermail/fieldtrip/2015-September/009669.html If it all works, I will be happy to upload my scripts and write up a neat group analysis tutorial. :-) That sounds like a good deal, but be warned: in the past I gently nudged the people involved to contribute their solution back to the wiki. I haven’t heard back from them since. Whether this is due them running into problems, or whether it has other reasons…? Best, Jan-Mathijs Thank you. Rajat Rajat Mani Thomas Social Brain Lab Netherlands Institute for Neuroscience Amsterdam _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl https://mailman.science.ru.nl/mailman/listinfo/fieldtrip -------------- next part -------------- An HTML attachment was scrubbed... URL: From martinvinck at gmail.com Fri Jul 8 17:04:10 2016 From: martinvinck at gmail.com (Martin Vinck) Date: Fri, 8 Jul 2016 17:04:10 +0200 Subject: [FieldTrip] =?utf-8?q?PhD/postdoc_positions_at_Ernst_Str=C3=BCngm?= =?utf-8?q?ann_Institute_for_Neuroscience?= Message-ID: Our laboratory at the Ernst Strüngmann Institute for Neuroscience in Cooperation with Max Planck Society is seeking candidates for Postdoc and Ph.D. positions. Projects involve the application of parallel, large-scale electrophysiological recording techniques of single units and EEG in combination with closed-loop optogenetic manipulation methods to investigate mechanisms of information encoding and transmission in mice brains. We are particularly interested in the way in which the brain efficiently encodes information, and the way in which sensory predictions established in higher areas influence sensory representations in earlier sensory areas. We are furthermore interested in investigating the role of GABAergic interneurons in selective attention and neuronal oscillations. We address these questions using laminar recordings in combination with optogenetics in mice, as well as through the development of novel tools for the quantitative analysis of large-scale electrophysiological data. Within the ESI, tight collaborations exist with the lab of Prof. Dr. Pascal Fries. Because we are searching for members that can strengthen an interdisciplinary team, we are encouraging students/researchers with a background either in biological/medical sciences or in physics/engineering/mathematics/etc. to apply. The ideal PhD or postdoc candidate has previous experience and strengths either in 1) performing hands-on experimental work and electrophysiological recordings or 2) hardware engineering and quantitative analysis of large-scale data. We are searching for applicants with good communication skills and a high commitment and curiosity about neuroscientific questions. Interested candidates are invited to send their application materials in electronic form (PDF format) to martin.vinck at esi-frankfurt.de Applications should contain a letter of intent, a detailed curriculum vitae, lists of university courses completed with marks obtained (only for PhD candidates), and the names of at least two scientists who can give references. The advertisement will be valid until positions are filled. Dr. Martin Vinck martin.vinck at esi-frankfurt.de Research Group Leader Ernst Strüngmann Institute (ESI) for Neuroscience in Cooperation with Max Planck Society Deutschordenstr. 46, D-60528 Frankfurt am Main, Germany -------------- next part -------------- An HTML attachment was scrubbed... URL: From RICHARDS at mailbox.sc.edu Mon Jul 11 04:14:41 2016 From: RICHARDS at mailbox.sc.edu (RICHARDS, JOHN) Date: Mon, 11 Jul 2016 02:14:41 +0000 Subject: [FieldTrip] tissue labels in mesh for prepare head model Message-ID: I switched a couple of months ago to a version of FT. I am using simbio meshes and ft_prepare_headmodel for a FEM source analysis. This is the code to prepare the mesh: (mri.tissuelabel is in the mri structure). cfg = []; cfg.shift = 0.3; cfg.method = 'hexahedral'; cfg.tissue = mri.tissuelabel; mesh = ft_prepare_mesh(cfg,mri); This results in a struct with hex labels tissue tissuelabel When I run cfg = []; cfg.method ='simbio'; cfg.conductivity=conductivity1; vol = ft_prepare_headmodel(cfg, mesh); I get several instances warnings (see below). The warnings are because the getdimord does not recognize “labels” and “tissue”. But the ft_headmodel_simbio needs the tissue to tell which tissues to assign conductivity to a hex voxel. See header of the ft_headmodel_simbio, designates hex, tissue, and tissuelabel. This used to work in the previous version; it may still be working just giving a warning. Any help? John E.g., from header Use as headmodel = ft_headmodel_simbio(mesh,'conductivity', conductivities, ...) The mesh is given as a volumetric mesh, using ft_datatype_parcellation mesh.pos = vertex positions mesh.tet/mesh.hex = list of volume elements mesh.tissue = tissue assignment for elements mesh.tissuelabel = labels correspondig to tissues Required input arguments should be specified in key-value pairs and have Warning: could not determine dimord of "tissue" in the following data > In getdimord (line 549) In ft_datatype_source (line 232) In ft_datatype_parcellation (line 178) In ft_headmodel_simbio (line 46) In ft_prepare_headmodel (line 430) In CreateFieldtripHeadModels (line 348) hex: [1440558x8 double] labels: [1440558x1 double] tissue: [1440558x1 double] tissuelabel: {'wm' 'gm' 't2wcsf' 'dura' 'skull' 'scalp' 'head' 'eyes' 'nasalcavity' 'nma_pve'} unit: 'mm' cfg: [1x1 struct] pos: [1487661x3 double] inside: [1487661x1 logical] AND Warning: could not determine dimord of "labels" in the following data > In getdimord (line 549) In ft_datatype_source (line 232) In ft_datatype_parcellation (line 178) In ft_headmodel_simbio (line 46) In ft_prepare_headmodel (line 430) In CreateFieldtripHeadModels (line 348) hex: [1440558x8 double] labels: [1440558x1 double] tissue: [1440558x1 double] tissuelabel: {'wm' 'gm' 't2wcsf' 'dura' 'skull' 'scalp' 'head' 'eyes' 'nasalcavity' 'nma_pve'} unit: 'mm' cfg: [1x1 struct] pos: [1487661x3 double] inside: [1487661x1 logical] *********************************************** John E. Richards Carolina Distinguished Professor Department of Psychology University of South Carolina Columbia, SC 29208 Dept Phone: 803 777 2079 Fax: 803 777 9558 HTTP: jerlab.psych.sc.edu *********************************************** From simon.nougaret at uniroma1.it Mon Jul 11 12:56:15 2016 From: simon.nougaret at uniroma1.it (Simon Nougaret) Date: Mon, 11 Jul 2016 12:56:15 +0200 Subject: [FieldTrip] Significance of the cross correlogram Message-ID: Hello everybody, I'm a new Fildtrip User and I use it principally to compute crosscorrelations analysis. I tried to find a topic in the archives of the discussion about a technique to compute significance level of the correlations performed by filedtrip but I didn't found anything. My first question concern the ft_spike_xcorr function where I do not understand the case 'shiftpredictor' line 272. Why the 'shuffling' method means to compute the cross correlation between the trial n of the neuron 1 on the trial n-1 of the neuron 2 ? Why is it not a real shuffle ? (to keep the same 'shuffle' curve if we redo the analysis ?) My second is about significance between the shuffled and real cross-correlogram. Do you think that it is correct, instead of the lines 275 to 278 : inTrial1_old = spike.trial{indx(1)}==cfg.trials(iTrial-1); ts1_old = sort(spike.time{indx(1)}(inTrial1_old(:) & inWindow1(:))); inTrial2_old = spike.trial{indx(2)}==cfg.trials(iTrial-1); ts2_old = sort(spike.time{indx(2)}(inTrial2_old(:) & inWindow2(:))); to perform the analysis between trials taken by chance ? RandTrial = 1 + (nTrials-1) * rand(1); RandTrial = round(RandTrial); inTrial1_shuff = spike.trial{indx(1)}==cfg.trials(RandTrial); ts1_Rand = sort(spike.time{indx(1)}(inTrial1_shuff(:) & inWindow1(:))); inTrial2_shuff = spike.trial{indx(2)}==cfg.trials(RandTrial); ts2_Rand = sort(spike.time{indx(2)}(inTrial2_shuff(:) & inWindow2(:))); The idea is to compute that thousand times to have the possibility to get an equivalent of the p.value (as a kind of bootstrap analysis). I join a figure of this computation where we can easily calculate p-values for each bins of the crosscorrelogram. For each bin the value of the black curve (real crosscorrelogram) will be compared to the level of chance based of the thousands of repetitions. Thank you in advance for your feedbacks and your responses. Best regards, Simon Nougaret -- ___________________________________________ INVESTI SUL FUTURO, FAI CRESCERE L’UNIVERSITÀ: *DONA IL 5 PER MILLE ALLA SAPIENZA* CODICE FISCALE *80209930587* -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: Example shuffling.png Type: image/png Size: 196932 bytes Desc: not available URL: From stephen.whitmarsh at gmail.com Mon Jul 11 15:39:54 2016 From: stephen.whitmarsh at gmail.com (Stephen Whitmarsh) Date: Mon, 11 Jul 2016 15:39:54 +0200 Subject: [FieldTrip] User-defined random seed in ft_componentanalysis (runica) Message-ID: Hi there, I have a question about the use of the cfg.randomseed option in ft_componentanalysis. I would like to be able to use the same seed over different iterations of ft_componentanalysis, which should result in the same output. Can anyone confirm this is actually the case? I cannot see how cfg.randomseed is passed through to runica.m, and line 812 (runica.m) reads: rand('state',sum(100*clock)); % set the random number generator state to % a position dependent on the system clock Best, Stephen -------------- next part -------------- An HTML attachment was scrubbed... URL: From jan.schoffelen at donders.ru.nl Mon Jul 11 17:06:23 2016 From: jan.schoffelen at donders.ru.nl (Schoffelen, J.M. (Jan Mathijs)) Date: Mon, 11 Jul 2016 15:06:23 +0000 Subject: [FieldTrip] User-defined random seed in ft_componentanalysis (runica) In-Reply-To: References: Message-ID: <6329D8FE-28FE-421C-9DD6-CD4282B021D5@donders.ru.nl> Hi Stephen, The fieldtrip-version of runica (in fieldtrip/external/eeglab/runica) allows for a user-specified setting reset_randomseed, that can be passed on from the higher level function (i.e. ft_componentanalysis). This way the user can pass on a predefined random seed, allowing for deterministic behaviour of runica upon different function calls. This has been changed about a year ago. Time to update your fieldtrip copy? Best, Jan-Mathijs > On 11 Jul 2016, at 15:39, Stephen Whitmarsh wrote: > > Hi there, > > I have a question about the use of the cfg.randomseed option in ft_componentanalysis. I would like to be able to use the same seed over different iterations of ft_componentanalysis, which should result in the same output. > > Can anyone confirm this is actually the case? I cannot see how cfg.randomseed is passed through to runica.m, and line 812 (runica.m) reads: > > rand('state',sum(100*clock)); % set the random number generator state to > % a position dependent on the system clock > > > Best, > Stephen > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > https://mailman.science.ru.nl/mailman/listinfo/fieldtrip From Holger.Krause at med.uni-duesseldorf.de Mon Jul 11 17:16:00 2016 From: Holger.Krause at med.uni-duesseldorf.de (Holger Krause) Date: Mon, 11 Jul 2016 17:16:00 +0200 Subject: [FieldTrip] User-defined random seed in ft_componentanalysis (runica) In-Reply-To: References: Message-ID: <1903164.HQZdkoyGZl@metta> Am Montag, 11. Juli 2016, 15:39:54 schrieb Stephen Whitmarsh: > Hi there, > > I have a question about the use of the cfg.randomseed option in > ft_componentanalysis. I would like to be able to use the same seed over > different iterations of ft_componentanalysis, which should result in the > same output. > > Can anyone confirm this is actually the case? I cannot see how > cfg.randomseed is passed through to runica.m, and line 812 (runica.m) reads: > > rand('state',sum(100*clock)); % set the random number generator state to > % a position dependent on the system clock Hi Stephen, That's a known bug, which has been fixed last year (see http://bugzilla.fcdonders.nl/show_bug.cgi?id=2585). Should you need to stick to an older version of FT, it might be sufficient to disable the line you mentioned above. If I remember correctly, FT will handle setting the random seed elsewhere. (So there's no need to pass through 'cfg.randomseed'.) Best, Holger -- Dr. rer. nat. Holger Krause MEG-Labor Institut für klinische Neurowissenschaften http://www.uniklinik-duesseldorf.de/klinneurowiss Uniklinik Düsseldorf From nugenta at mail.nih.gov Tue Jul 12 02:40:54 2016 From: nugenta at mail.nih.gov (Nugent, Allison C. (NIH/NIMH) [E]) Date: Tue, 12 Jul 2016 00:40:54 +0000 Subject: [FieldTrip] NIH MEG workshop Message-ID: It is our pleasure to announce the NIH MEG North America workshop, to be held November 1st and 2nd at the NIH campus in Bethesda, MD. A call for abstracts is currently open! We are soliciting abstracts based on the four themes for discussion below, as well as for a general scientific session. Visit http://megworkshop.nih.gov for more details. Abstracts are due by September 1st. At this meeting, we plan to address the following four themes: 1. What does MEG add to the field of neuroscience above and beyond other existing techniques? 2. How can we support the evolution of MEG acquisition and methods, through both software and hardware? 3. How can we develop and support infrastructure to share data and facilitate big science? 4. How could an MEG-North America consortium work to address these issues? Keynote Speakers: Sylvain Baillet, PhD, Director, MEG Core McGill University, McConnell Brain Imaging Center Dimitrios Pantazis, PhD, Director of MEG Lab, Martinos Imaging Center Timothy P. Roberts, PhD, Vice Chair of Research, Department of Radiology, The Children's Hospital of Philadelphia Julia M. Stephen, PhD, Director, MEG/EEG Core, The Mind Research Network For more details, visit http://megworkshop.nih.gov Registration to this NIH sponsored event is free of charge. We hope to see you in Bethesda in November! Dr. Richard Coppola, Director, NIMH MEG Core Dr. Allison C Nugent, Director of Neuroimaging Research, Experimental Therapeutics and Pathophysiology Branch, NIMH Register Now at Eventbrite! Allison Nugent, PhD Director of Neuroimaging Research Experimental Therapeutics and Pathophysiology Branch NIMH/NIH/DHHS Ph 301-451-8863 -------------- next part -------------- An HTML attachment was scrubbed... URL: From ha438 at georgetown.edu Tue Jul 12 18:35:05 2016 From: ha438 at georgetown.edu (Hassan Aleem) Date: Tue, 12 Jul 2016 12:35:05 -0400 Subject: [FieldTrip] ft_sourcemovie Message-ID: Does anyone have an example of how to use ft_sourcemovie to look at source localization across time with the 'lcmv' method. would be greatly appreciated. Thanks! -------------- next part -------------- An HTML attachment was scrubbed... URL: From joseluisblues at gmail.com Tue Jul 12 19:45:21 2016 From: joseluisblues at gmail.com (Jose) Date: Tue, 12 Jul 2016 19:45:21 +0200 Subject: [FieldTrip] grand average (with average across frequencies) Message-ID: dear list, I'm analysing CTF MEG data. I computed the power of my data for frequencies from 1 to 50 Hz. Is it possible to perform a grand average across my subjects, but additionally averaging across frequencies for exploratory purposes? Maybe there is a way to do it with ft_freqgrandaverage?, but so far I haven't find it, Many thanks for any hint, Jose -------------- next part -------------- An HTML attachment was scrubbed... URL: From aborna at sandia.gov Wed Jul 13 02:47:14 2016 From: aborna at sandia.gov (Borna, Amir) Date: Wed, 13 Jul 2016 00:47:14 +0000 Subject: [FieldTrip] Running "ft_preprocessing" on user defined data Message-ID: Hi, I have successfully imported my data into the fieldtrip's data structure according to the instructions on: http://www.fieldtriptoolbox.org/faq/how_can_i_import_my_own_dataformat Later I save the data in "fif" format using fieldtrip2fiff. When I read back the data using "ft_preprocessing", the chantype and chanunit are all unknown except for the trigger. Is there any solution to this issue? Thank you. Regards, Amir Borna. -------------- next part -------------- An HTML attachment was scrubbed... URL: From xiew1202 at gmail.com Wed Jul 13 04:22:30 2016 From: xiew1202 at gmail.com (Xie Wanze) Date: Tue, 12 Jul 2016 22:22:30 -0400 Subject: [FieldTrip] grand average (with average across frequencies) In-Reply-To: References: Message-ID: Jose, It is not difficult to do grand average across subjects or frequencies if I understand your questions correctly. After you get the powspctrm matrix (chan x freq) for each subject, you can write a "for loop" to read in each person's data and then divided by the total number of subjects. Assuming you name your output structure as EEG_freq for each subject, the syntax would be something like: freqtotal = []; numsubject = 0; for i = 1:length(subjects) ...load your data here; if ~numsubject; freqtotal = EEG_freq.powspctrm; else; freqtotal = freqtotal + EEG_freq.powspctrm; end; numsubject = numsubject + 1; end; freqavg = freqtotal / numsubject; or freqavg = freqtotal / length(subjects); To get average across frequencies, simply use the "mean" function. If you have the chan x pow structure for your output then use "mean (freqavg, 2)" will do the average across the second dimension (i.e., frequencies). Or you can do the average for frequencies for each subject then do the average across subjects. Hope this will answer your questions. Wanze 2016-07-12 13:45 GMT-04:00 Jose : > dear list, > > I'm analysing CTF MEG data. I computed the power of my data for > frequencies from 1 to 50 Hz. Is it possible to perform a grand average > across my subjects, but additionally averaging across frequencies for > exploratory purposes? Maybe there is a way to do it with > ft_freqgrandaverage?, but so far I haven't find it, > > Many thanks for any hint, > Jose > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > https://mailman.science.ru.nl/mailman/listinfo/fieldtrip > -------------- next part -------------- An HTML attachment was scrubbed... URL: From sarathykousik at gmail.com Wed Jul 13 10:09:01 2016 From: sarathykousik at gmail.com (kousik sarathy) Date: Wed, 13 Jul 2016 10:09:01 +0200 Subject: [FieldTrip] grand average (with average across frequencies) In-Reply-To: References: Message-ID: Hey Jose, It might not be the most elegant solution, but I would suggest something like ft_selectdata with ''cfg.avgovrfreq" & cfg.frequency=[10 50] arguments before the actual grandaverage. Hope it helps. -- Regards, Kousik Sarathy, S On Wed, Jul 13, 2016 at 4:22 AM, Xie Wanze wrote: > Jose, > It is not difficult to do grand average across subjects or frequencies if > I understand your questions correctly. > After you get the powspctrm matrix (chan x freq) for each subject, you > can write a "for loop" to read in each person's data and then divided by > the total number of subjects. Assuming you name your output structure as > EEG_freq for each subject, the syntax would be something like: > freqtotal = []; numsubject = 0; > for i = 1:length(subjects) > ...load your data here; > if ~numsubject; freqtotal = EEG_freq.powspctrm; > else; freqtotal = freqtotal + EEG_freq.powspctrm; > end; > numsubject = numsubject + 1; > end; > freqavg = freqtotal / numsubject; or freqavg = freqtotal / > length(subjects); > > To get average across frequencies, simply use the "mean" function. If you > have the chan x pow structure for your output then use "mean (freqavg, 2)" > will do the average across the second dimension (i.e., frequencies). > Or you can do the average for frequencies for each subject then do the > average across subjects. > > Hope this will answer your questions. > > Wanze > > > > 2016-07-12 13:45 GMT-04:00 Jose : > >> dear list, >> >> I'm analysing CTF MEG data. I computed the power of my data for >> frequencies from 1 to 50 Hz. Is it possible to perform a grand average >> across my subjects, but additionally averaging across frequencies for >> exploratory purposes? Maybe there is a way to do it with >> ft_freqgrandaverage?, but so far I haven't find it, >> >> Many thanks for any hint, >> Jose >> >> _______________________________________________ >> fieldtrip mailing list >> fieldtrip at donders.ru.nl >> https://mailman.science.ru.nl/mailman/listinfo/fieldtrip >> > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > https://mailman.science.ru.nl/mailman/listinfo/fieldtrip > -------------- next part -------------- An HTML attachment was scrubbed... URL: From stephen.whitmarsh at gmail.com Wed Jul 13 11:21:22 2016 From: stephen.whitmarsh at gmail.com (Stephen Whitmarsh) Date: Wed, 13 Jul 2016 11:21:22 +0200 Subject: [FieldTrip] User-defined random seed in ft_componentanalysis (runica) In-Reply-To: <1903164.HQZdkoyGZl@metta> References: <1903164.HQZdkoyGZl@metta> Message-ID: Hi guys, Thanks! And oops... I will update FT :-) Cheers, Stephen On 11 July 2016 at 17:16, Holger Krause < Holger.Krause at med.uni-duesseldorf.de> wrote: > Am Montag, 11. Juli 2016, 15:39:54 schrieb Stephen Whitmarsh: > > Hi there, > > > > I have a question about the use of the cfg.randomseed option in > > ft_componentanalysis. I would like to be able to use the same seed over > > different iterations of ft_componentanalysis, which should result in the > > same output. > > > > Can anyone confirm this is actually the case? I cannot see how > > cfg.randomseed is passed through to runica.m, and line 812 (runica.m) > reads: > > > > rand('state',sum(100*clock)); % set the random number generator state to > > % a position dependent on the system clock > > Hi Stephen, > > That's a known bug, which has been fixed last year (see > http://bugzilla.fcdonders.nl/show_bug.cgi?id=2585). Should you need to > stick > to an older version of FT, it might be sufficient to disable the line you > mentioned above. If I remember correctly, FT will handle setting the random > seed elsewhere. (So there's no need to pass through 'cfg.randomseed'.) > > Best, > > Holger > > -- > Dr. rer. nat. Holger Krause > MEG-Labor > Institut für klinische Neurowissenschaften > http://www.uniklinik-duesseldorf.de/klinneurowiss Uniklinik > Düsseldorf > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > https://mailman.science.ru.nl/mailman/listinfo/fieldtrip > -------------- next part -------------- An HTML attachment was scrubbed... URL: From deb.desideri at gmail.com Wed Jul 13 12:01:26 2016 From: deb.desideri at gmail.com (Debora Desideri) Date: Wed, 13 Jul 2016 12:01:26 +0200 Subject: [FieldTrip] ft_sourcemovie In-Reply-To: References: Message-ID: Dear Hassan, to my knowledge ft_sourcemovie works only with sources estimated using MNE. What you can do is exctrating the source time course (for example using ft_sourcedescriptives) and then plot each frame and create your own movie using the matlab function getframe. Here is a sample code: %%% Extract source timecourse with ft_sourcedescriptives %%% source is the output of ft_sourceanalysis with method lcmv cfg = []; cfg.projectmom = 'yes'; cfg.fixedori = 'over_trials'; source_timecourse = ft_sourcedescriptives(cfg,source); Npos = size(source.pos,1); Ntime = length(source.time); source_timecourse.avg.momint = nan(Npos,Ntime); idx = find(source_timecourse.inside); for i = 1:length(idx) index = idx(i); source_timecourse.avg.momint(index,:) = source_timecourse.avg.mom{index}; end %% Interpolate each time point of interest for tt = 1:length(source_timecourse.time) % full trial length or you can select a time window of interest src = source_timecourse; src.time = source_timecourse.time(:,tt); src.avg.momint = source_tc.avg.momint(:,tt); % here you may just leave the time course as it is, or square it or normalize it by a baseline etc etc cfg = []; cfg.parameter = 'momint'; sourceInt{tt} = ft_sourceinterpolate(cfg, src, mri); % mri is the mri of your subject or a template mri clear src end %% Plot on surface ( if you want you can set the colorlimt to be the same in each frames so you will be able to see changes in the "amplitude" as well) for tt = 1:length(sourceInt{tt}) cfg = []; cfg.method = 'surface'; cfg.funparameter = 'momint'; cfg.funcolormap = 'hot'; ft_sourceplot(cfg, sourceInt{tt}) drawnow Frames(tt) = getframe; % get the current frame and store it end %% Show movie figure movie(Frames,1) %% Save movie (frames) in AVI format writerObj = VideoWriter('Movie.avi'); % Name it. %writerObj.FrameRate = 60; % How many frames per second. open(writerObj); for tt=1:size(Frames,2) writeVideo(writerObj, Frames(tt)); %end end hold off close(writerObj); % Saves the movie. Hope this helps :) Best, Debora On Tue, Jul 12, 2016 at 6:35 PM, Hassan Aleem wrote: > Does anyone have an example of how to use ft_sourcemovie to look at source > localization across time with the 'lcmv' method. would be greatly > appreciated. Thanks! > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > https://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 s.homolle at donders.ru.nl Wed Jul 13 12:41:35 2016 From: s.homolle at donders.ru.nl (Simon Homolle) Date: Wed, 13 Jul 2016 12:41:35 +0200 Subject: [FieldTrip] tissue labels in mesh for prepare head model In-Reply-To: References: Message-ID: <2962B32C-549C-4D62-9A61-06C276D026C9@donders.ru.nl> Dear John, Can you still recall the previous and current version of fieldtrip you are using? I tried ft_prepare_headmodel (cfg.method =simbio) myself with the fieldtrip version from today and did not encounter this warning. The structure of my mesh looks quite similar: hex: [4992121x8 double] labels: [4992121x1 double] tissue: [4992121x1 double] tissuelabel: {'csf' 'gray' 'scalp' 'skull' 'white'} unit: 'mm' cfg: [1x1 struct] pos: [5105088x3 double] inside: [5105088x1 logical] Simon Homölle PhD Candidate Donders Institute for Brain, Cognition and Behaviour Centre for Cognitive Neuroimaging Radboud University Nijmegen Phone: +31-(0)24-36-65059 > On 11 Jul 2016, at 04:14, RICHARDS, JOHN wrote: > > I switched a couple of months ago to a version of FT. I am using simbio meshes and ft_prepare_headmodel for a FEM source analysis. > > This is the code to prepare the mesh: (mri.tissuelabel is in the mri structure). > cfg = []; > cfg.shift = 0.3; > cfg.method = 'hexahedral'; > cfg.tissue = mri.tissuelabel; > mesh = ft_prepare_mesh(cfg,mri); > > This results in a struct with > hex > labels > tissue > tissuelabel > > When I run > cfg = []; > cfg.method ='simbio'; > cfg.conductivity=conductivity1; > vol = ft_prepare_headmodel(cfg, mesh); > > I get several instances warnings (see below). The warnings are because the getdimord does not recognize “labels” and “tissue”. But the ft_headmodel_simbio needs the tissue to tell which tissues to assign conductivity to a hex voxel. See header of the ft_headmodel_simbio, designates hex, tissue, and tissuelabel. > > This used to work in the previous version; it may still be working just giving a warning. > > Any help? > > John > > E.g., from header > Use as > headmodel = ft_headmodel_simbio(mesh,'conductivity', conductivities, ...) > > The mesh is given as a volumetric mesh, using ft_datatype_parcellation > mesh.pos = vertex positions > mesh.tet/mesh.hex = list of volume elements > mesh.tissue = tissue assignment for elements > mesh.tissuelabel = labels correspondig to tissues > > Required input arguments should be specified in key-value pairs and have > > Warning: could not determine dimord of "tissue" in the following data >> In getdimord (line 549) > In ft_datatype_source (line 232) > In ft_datatype_parcellation (line 178) > In ft_headmodel_simbio (line 46) > In ft_prepare_headmodel (line 430) > In CreateFieldtripHeadModels (line 348) > hex: [1440558x8 double] > labels: [1440558x1 double] > tissue: [1440558x1 double] > tissuelabel: {'wm' 'gm' 't2wcsf' 'dura' 'skull' 'scalp' 'head' 'eyes' 'nasalcavity' 'nma_pve'} > unit: 'mm' > cfg: [1x1 struct] > pos: [1487661x3 double] > inside: [1487661x1 logical] > > AND > > Warning: could not determine dimord of "labels" in the following data >> In getdimord (line 549) > In ft_datatype_source (line 232) > In ft_datatype_parcellation (line 178) > In ft_headmodel_simbio (line 46) > In ft_prepare_headmodel (line 430) > In CreateFieldtripHeadModels (line 348) > hex: [1440558x8 double] > labels: [1440558x1 double] > tissue: [1440558x1 double] > tissuelabel: {'wm' 'gm' 't2wcsf' 'dura' 'skull' 'scalp' 'head' 'eyes' 'nasalcavity' 'nma_pve'} > unit: 'mm' > cfg: [1x1 struct] > pos: [1487661x3 double] > inside: [1487661x1 logical] > > *********************************************** > John E. Richards Carolina Distinguished Professor > Department of Psychology > University of South Carolina > Columbia, SC 29208 > Dept Phone: 803 777 2079 > Fax: 803 777 9558 > HTTP: jerlab.psych.sc.edu > *********************************************** > > > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > https://mailman.science.ru.nl/mailman/listinfo/fieldtrip From rleese12 at berkeley.edu Thu Jul 14 08:50:42 2016 From: rleese12 at berkeley.edu (Nakyung Lee) Date: Wed, 13 Jul 2016 23:50:42 -0700 Subject: [FieldTrip] Unsupported data format Message-ID: Dear FieldTrip community, My name is Rachel Lee and I'm a research assistant in Prof. Ming Hsu's lab in UC Berkeley. We currently have a .Tbk file, a .Tdx file, .tev file, .tsq file to preprocess and analyze but it seems like those data formats are not yet supported by FieldTrip. So, instead of using those raw data files, we've been trying to find a workaround by transforming them into a .mat file (and casting the .mat file into a raw datatype in FieldTrip by manually assigning fields to it). This hasn't been so successful; we've been unable to call ft_preprocessing because of the lack of a proper header format (which is needed in ft_read_header, one of the lower level functions that ft_preprocessing calls). I've been looking at the codes but been unable to come up with a solution. Does anyone have a similar experience? Is there any way to circumvent this issue? Any type of help would be appreciated. Thank you, Rachel Lee -------------- next part -------------- An HTML attachment was scrubbed... URL: From a.stolk8 at gmail.com Thu Jul 14 09:10:45 2016 From: a.stolk8 at gmail.com (Arjen Stolk) Date: Thu, 14 Jul 2016 00:10:45 -0700 Subject: [FieldTrip] Unsupported data format In-Reply-To: References: Message-ID: Hi Rachel, What is the error you're receiving, and how are you calling ft_preprocessing? If the data is in raw format (incl a trial, time and label field), it should theoretically be possible to use ft_preprocessing on it, eg; cfg = [] cfg .. data = ft_preprocessing(cfg, raw) where raw is your data as described above. Best, Arjen > On Jul 13, 2016, at 11:50 PM, Nakyung Lee wrote: > > Dear FieldTrip community, > > My name is Rachel Lee and I'm a research assistant in Prof. Ming Hsu's lab in UC Berkeley. > > We currently have a .Tbk file, a .Tdx file, .tev file, .tsq file to preprocess and analyze but it seems like those data formats are not yet supported by FieldTrip. > So, instead of using those raw data files, we've been trying to find a workaround by transforming them into a .mat file (and casting the .mat file into a raw datatype in FieldTrip by manually assigning fields to it). > This hasn't been so successful; we've been unable to call ft_preprocessing because of the lack of a proper header format (which is needed in ft_read_header, one of the lower level functions that ft_preprocessing calls). > I've been looking at the codes but been unable to come up with a solution. > > Does anyone have a similar experience? > Is there any way to circumvent this issue? > Any type of help would be appreciated. > > Thank you, > Rachel Lee > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > https://mailman.science.ru.nl/mailman/listinfo/fieldtrip From muthuraman10 at hotmail.com Thu Jul 14 13:20:58 2016 From: muthuraman10 at hotmail.com (Muthuraman Muthuraman) Date: Thu, 14 Jul 2016 11:20:58 +0000 Subject: [FieldTrip] Post-Doc position with focus on multimodal brain imaging Message-ID: Post-Doc Neuroscientist with focus on multimodal brain imaging The medical faculty of the University of Mainz, Germany, invites applications for a Post Doc Position for a functional translational neuroscience (FTN) scholarship two years position to work on multi-modal imaging, neurostimulation (TMS) and EEG. Additionally, the new position requires experience with structural and functional MRI data analysis, computational modeling or magnetic diffusion imaging. The candidate should have a PhD or equivalent degree preferably in neuroscience, biomedical physics, psychology, psychiatry, or biology and should be able to supervise experiments and data analyses in programming platforms. The working language at the institute is English. The location for this research will mainly be the workgroups "Section of movement disorders, neurostimulation and neuroimaging" of Prof. Sergiu Groppa at the Department of Neurology and "Biomedical statistics and multimodal signal processing unit" of Prof. Muthuraman Muthuraman, both at the Focus Program Translational Neurosciences (http://www.ftn.uni-mainz.de/) and Neuroimaging Centre Mainz (http://www.ftn.nic.uni-mainz.de/) and within the CRC "Neurobiology of resilience to stress-related mental dysfunction" and SFB TR-128 "Initiating/effector versus regulatory mechanisms in Multiple Sclerosis" (www.sfbtr128.de). Expected close collaborations with national and international partners. The application should include a statement of research interests and reasons for applying to the project, curriculum vitae (max. 4 pages) composed according to good scientific practice. The position will be open until filled. To apply for the position, please send the above documents to Prof. Sergiu Groppa and Prof. Muthuraman Muthuraman, Department of Neurology, Section of Movement Disorders and Neurostimulation, University of Mainz, Langenbeckstrasse 1, 55131 Mainz, Germany, or by Email to segroppa(at)uni-mainz.de & mmuthura(at)uni-mainz.de. Prof. Dr.- Ing. M.Muthuraman Biomedical statistics and multimodal signal processing unit Movement Disorders and Neurostimulation, Department of Neurology, Focus Program Translational Neuroscience (FTN) Johannes-Gutenberg-University Hospital, Langenbeckstr. 1 55131 Mainz, Germany Email: mmuthura at uni-mainz.de -------------- next part -------------- An HTML attachment was scrubbed... URL: From sarang at cfin.au.dk Thu Jul 14 18:02:05 2016 From: sarang at cfin.au.dk (Sarang S. Dalal) Date: Thu, 14 Jul 2016 16:02:05 +0000 Subject: [FieldTrip] Running "ft_preprocessing" on user defined data In-Reply-To: References: Message-ID: <1468519324767.97865@cfin.au.dk> Dear Amir, Perhaps you were a?ffected by this bug (introduced and fixed last month): http://bugzilla.fieldtriptoolbox.org/show_bug.cgi?id=3154 So maybe the newest version of FieldTrip would work for you. If not, you may like to file a bug report through the bugzilla website. Cheers, Sarang ________________________________ From: fieldtrip-bounces at science.ru.nl on behalf of Borna, Amir Sent: Wednesday, July 13, 2016 2:47 AM To: fieldtrip at science.ru.nl Subject: [FieldTrip] Running "ft_preprocessing" on user defined data Hi, I have successfully imported my data into the fieldtrip's data structure according to the instructions on: http://www.fieldtriptoolbox.org/faq/how_can_i_import_my_own_dataformat Later I save the data in "fif" format using fieldtrip2fiff. When I read back the data using "ft_preprocessing", the chantype and chanunit are all unknown except for the trigger. Is there any solution to this issue? Thank you. Regards, Amir Borna. -------------- next part -------------- An HTML attachment was scrubbed... URL: From rleese12 at berkeley.edu Fri Jul 15 08:49:41 2016 From: rleese12 at berkeley.edu (Nakyung Lee) Date: Thu, 14 Jul 2016 23:49:41 -0700 Subject: [FieldTrip] Unsupported data format In-Reply-To: References: Message-ID: Hi Arjen, Thank you for your reply. Your email got forwarded successfully. So currently I tried using 'ft_definetrial' and 'ft_preprocessing'. 'ft_definetrial' returns an error when used with 'ft_trialfun' set to default. Below is the code I used (and 'signal_raw.mat' is a fieldtrip raw data and it has all three fields you mentioned). cfg.dataset = 'signal_raw.mat'; cfg.trialdef.event = subj_globals.buttonpress_times; cfg = ft_definetrial(cfg); So I simply call ft_definetrial with minimal configuration and here's the error I got: Error using ft_read_header (line 2194) 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 177) [trl, event] = feval(cfg.trialfun, cfg); Error in trialdef_alsotest (line 12) cfg = ft_definetrial(cfg); I circumvented this issue by using my own trialfun ('ft_trialfun_test' in the code). We already have all the necessary timestamps so I could build a very simple one. Here's a new code (I ran the code with minimal cfg for 'ft_preprocessing' to isolate the problem): cfg.dataset = 'signal_raw.mat'; cfg.trialfun = 'ft_trialfun_test'; cfg.trialdef.event = subj_globals.buttonpress_times; cfg = ft_definetrial(cfg); cfg.continuous = 'yes'; buttonpress_hg = ft_preprocessing(cfg); And here's the error I got: Error using ft_read_header (line 2194) unsupported header format "matlab" Error in ft_preprocessing (line 397) hdr = ft_read_header(cfg.headerfile, 'headerformat', cfg.headerformat, 'coordsys', cfg.coordsys, 'coilaccuracy', cfg.coilaccuracy); Error in test_trialdef (line 18) buttonpress_hg = ft_preprocessing(cfg); So both error come from 'ft_read_header'. I've been looking at the code but it seemed quite hard to debug as 'ft_read_header' uses a lower level function that directly reads from the file (hence it seemed like a simple fix like passing in a fake header wouldn't work). Am I doing something wrong here? Again, thank you for your reply and let me know if you need more information. Best, Rachel On Thu, Jul 14, 2016 at 12:10 AM, Arjen Stolk wrote: > Hi Rachel, > > What is the error you're receiving, and how are you calling > ft_preprocessing? > > If the data is in raw format (incl a trial, time and label field), it > should theoretically be possible to use ft_preprocessing on it, eg; > cfg = [] > cfg .. > data = ft_preprocessing(cfg, raw) > > where raw is your data as described above. > > Best, > Arjen > > > On Jul 13, 2016, at 11:50 PM, Nakyung Lee wrote: > > > > Dear FieldTrip community, > > > > My name is Rachel Lee and I'm a research assistant in Prof. Ming Hsu's > lab in UC Berkeley. > > > > We currently have a .Tbk file, a .Tdx file, .tev file, .tsq file to > preprocess and analyze but it seems like those data formats are not yet > supported by FieldTrip. > > So, instead of using those raw data files, we've been trying to find a > workaround by transforming them into a .mat file (and casting the .mat file > into a raw datatype in FieldTrip by manually assigning fields to it). > > This hasn't been so successful; we've been unable to call > ft_preprocessing because of the lack of a proper header format (which is > needed in ft_read_header, one of the lower level functions that > ft_preprocessing calls). > > I've been looking at the codes but been unable to come up with a > solution. > > > > Does anyone have a similar experience? > > Is there any way to circumvent this issue? > > Any type of help would be appreciated. > > > > Thank you, > > Rachel Lee > > _______________________________________________ > > fieldtrip mailing list > > fieldtrip at donders.ru.nl > > https://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > https://mailman.science.ru.nl/mailman/listinfo/fieldtrip > -------------- next part -------------- An HTML attachment was scrubbed... URL: From jan.schoffelen at donders.ru.nl Fri Jul 15 10:10:02 2016 From: jan.schoffelen at donders.ru.nl (Schoffelen, J.M. (Jan Mathijs)) Date: Fri, 15 Jul 2016 08:10:02 +0000 Subject: [FieldTrip] Unsupported data format In-Reply-To: References: Message-ID: <5DD7AA41-AB91-408F-804C-0A8FCC7A633C@donders.ru.nl> Hi Rachel, Once your data is represented in a fieldtrip-style structure, there’s no need anymore to call ft_definetrial with a specified named dataset in the cfg. If you want to segment your data, you may still want to call ft_definetrial to generate a so-called ‘trl’ matrix, and subsequently use ft_redefinetrial to re-segment, i.e.: load(’signal_raw.mat’); % I assume that this files contains the fieldtrip-style data structure cfg = []; cfg.trl = trl; data_epoched = ft_redefinetrial(cfg, data); So, note that ft_preprocessing shouldn’t be called, this is onlyl useable when reading proprietary data from disk. It seems that you don’t need the cfg.dataset argument to begin with, and if you manage to titrate your ft_trialfun_test such that it converts the timestamps you provide it with into the correct trl-matrix, I don’t see a reason why it shouldn’t work. Best, Jan-Mathijs On 15 Jul 2016, at 08:49, Nakyung Lee > wrote: Hi Arjen, Thank you for your reply. Your email got forwarded successfully. So currently I tried using 'ft_definetrial' and 'ft_preprocessing'. 'ft_definetrial' returns an error when used with 'ft_trialfun' set to default. Below is the code I used (and 'signal_raw.mat' is a fieldtrip raw data and it has all three fields you mentioned). cfg.dataset = 'signal_raw.mat'; cfg.trialdef.event = subj_globals.buttonpress_times; cfg = ft_definetrial(cfg); So I simply call ft_definetrial with minimal configuration and here's the error I got: Error using ft_read_header (line 2194) 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 177) [trl, event] = feval(cfg.trialfun, cfg); Error in trialdef_alsotest (line 12) cfg = ft_definetrial(cfg); I circumvented this issue by using my own trialfun ('ft_trialfun_test' in the code). We already have all the necessary timestamps so I could build a very simple one. Here's a new code (I ran the code with minimal cfg for 'ft_preprocessing' to isolate the problem): cfg.dataset = 'signal_raw.mat'; cfg.trialfun = 'ft_trialfun_test'; cfg.trialdef.event = subj_globals.buttonpress_times; cfg = ft_definetrial(cfg); cfg.continuous = 'yes'; buttonpress_hg = ft_preprocessing(cfg); And here's the error I got: Error using ft_read_header (line 2194) unsupported header format "matlab" Error in ft_preprocessing (line 397) hdr = ft_read_header(cfg.headerfile, 'headerformat', cfg.headerformat, 'coordsys', cfg.coordsys, 'coilaccuracy', cfg.coilaccuracy); Error in test_trialdef (line 18) buttonpress_hg = ft_preprocessing(cfg); So both error come from 'ft_read_header'. I've been looking at the code but it seemed quite hard to debug as 'ft_read_header' uses a lower level function that directly reads from the file (hence it seemed like a simple fix like passing in a fake header wouldn't work). Am I doing something wrong here? Again, thank you for your reply and let me know if you need more information. Best, Rachel On Thu, Jul 14, 2016 at 12:10 AM, Arjen Stolk > wrote: Hi Rachel, What is the error you're receiving, and how are you calling ft_preprocessing? If the data is in raw format (incl a trial, time and label field), it should theoretically be possible to use ft_preprocessing on it, eg; cfg = [] cfg .. data = ft_preprocessing(cfg, raw) where raw is your data as described above. Best, Arjen > On Jul 13, 2016, at 11:50 PM, Nakyung Lee > wrote: > > Dear FieldTrip community, > > My name is Rachel Lee and I'm a research assistant in Prof. Ming Hsu's lab in UC Berkeley. > > We currently have a .Tbk file, a .Tdx file, .tev file, .tsq file to preprocess and analyze but it seems like those data formats are not yet supported by FieldTrip. > So, instead of using those raw data files, we've been trying to find a workaround by transforming them into a .mat file (and casting the .mat file into a raw datatype in FieldTrip by manually assigning fields to it). > This hasn't been so successful; we've been unable to call ft_preprocessing because of the lack of a proper header format (which is needed in ft_read_header, one of the lower level functions that ft_preprocessing calls). > I've been looking at the codes but been unable to come up with a solution. > > Does anyone have a similar experience? > Is there any way to circumvent this issue? > Any type of help would be appreciated. > > Thank you, > Rachel Lee > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > https://mailman.science.ru.nl/mailman/listinfo/fieldtrip _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl https://mailman.science.ru.nl/mailman/listinfo/fieldtrip _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl https://mailman.science.ru.nl/mailman/listinfo/fieldtrip -------------- next part -------------- An HTML attachment was scrubbed... URL: From ecr38 at cam.ac.uk Fri Jul 15 17:35:03 2016 From: ecr38 at cam.ac.uk (E.C. Rocheteau) Date: Fri, 15 Jul 2016 16:35:03 +0100 Subject: [FieldTrip] Request for help in re-organising my data for use in FieldTrip Message-ID: I already my time-locked trial data in a structure in MATLAB, and I want to start using FieldTrip. How do I go about doing re-organising my data into something which is usable to the functions in FieldTrip? I've looked at the ft_preprocessing functions but I have no idea what the trial info, sample info, hdr, or grad fields are for, and what I should put in them. -- Best Wishes, Emma From rleese12 at berkeley.edu Fri Jul 15 18:51:54 2016 From: rleese12 at berkeley.edu (Nakyung Lee) Date: Fri, 15 Jul 2016 09:51:54 -0700 Subject: [FieldTrip] Unsupported data format In-Reply-To: <5DD7AA41-AB91-408F-804C-0A8FCC7A633C@donders.ru.nl> References: <5DD7AA41-AB91-408F-804C-0A8FCC7A633C@donders.ru.nl> Message-ID: Hi Jan-Mathijs, Thanks for your advice. Yes, I used 'ft_=definetrial' to segment the data. My data is in the fieldtrip style data format not because it's been segmented and preprocessed through fieldtrip but because our original dataformat is unsupported by fieldtrip (.Tbk, .Tdx, .tev, .tsq to be exact). So my coworker transformed those data into a .mat file and I transformed into a fieldtrip style raw data but it still needs some segmenting and some other preprocessing done on it (for example high-gamma filtering). But if 'ft_preprocessing' is only useable when reading proprietary data from disk, there's just no way we can preprocess the above data using fieldtrip? Thank you, Rachel On Fri, Jul 15, 2016 at 1:10 AM, Schoffelen, J.M. (Jan Mathijs) < jan.schoffelen at donders.ru.nl> wrote: > Hi Rachel, > > Once your data is represented in a fieldtrip-style structure, there’s no > need anymore to call ft_definetrial with a specified named dataset in the > cfg. > > If you want to segment your data, you may still want to call > ft_definetrial to generate a so-called ‘trl’ matrix, and subsequently use > ft_redefinetrial to re-segment, i.e.: > > load(’signal_raw.mat’); % I assume that this files contains the > fieldtrip-style data structure > > cfg = []; > cfg.trl = trl; > data_epoched = ft_redefinetrial(cfg, data); > > So, note that ft_preprocessing shouldn’t be called, this is onlyl useable > when reading proprietary data from disk. > > It seems that you don’t need the cfg.dataset argument to begin with, and > if you manage to titrate your ft_trialfun_test such that it converts the > timestamps you provide it with into the correct trl-matrix, I don’t see a > reason why it shouldn’t work. > > Best, > Jan-Mathijs > > > On 15 Jul 2016, at 08:49, Nakyung Lee wrote: > > Hi Arjen, > > Thank you for your reply. > Your email got forwarded successfully. > > So currently I tried using 'ft_definetrial' and 'ft_preprocessing'. > 'ft_definetrial' returns an error when used with 'ft_trialfun' set to > default. > Below is the code I used (and 'signal_raw.mat' is a fieldtrip raw data and > it has all three fields you mentioned). > > cfg.dataset = 'signal_raw.mat'; > cfg.trialdef.event = subj_globals.buttonpress_times; > cfg = ft_definetrial(cfg); > > So I simply call ft_definetrial with minimal configuration and here's the > error I got: > > Error using ft_read_header (line 2194) > 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 177) > [trl, event] = feval(cfg.trialfun, cfg); > > Error in trialdef_alsotest (line 12) > cfg = ft_definetrial(cfg); > > I circumvented this issue by using my own trialfun ('ft_trialfun_test' in > the code). > We already have all the necessary timestamps so I could build a very > simple one. > Here's a new code (I ran the code with minimal cfg for 'ft_preprocessing' > to isolate the problem): > > cfg.dataset = 'signal_raw.mat'; > cfg.trialfun = 'ft_trialfun_test'; > cfg.trialdef.event = subj_globals.buttonpress_times; > > cfg = ft_definetrial(cfg); > > cfg.continuous = 'yes'; > buttonpress_hg = ft_preprocessing(cfg); > > And here's the error I got: > > Error using ft_read_header (line 2194) > unsupported header format "matlab" > > Error in ft_preprocessing (line 397) > hdr = ft_read_header(cfg.headerfile, 'headerformat', cfg.headerformat, > 'coordsys', cfg.coordsys, 'coilaccuracy', > cfg.coilaccuracy); > > Error in test_trialdef (line 18) > buttonpress_hg = ft_preprocessing(cfg); > > So both error come from 'ft_read_header'. > I've been looking at the code but it seemed quite hard to debug as > 'ft_read_header' uses a lower level function that directly reads from the > file (hence it seemed like a simple fix like passing in a fake header > wouldn't work). > Am I doing something wrong here? > > Again, thank you for your reply and let me know if you need more > information. > > Best, > Rachel > > On Thu, Jul 14, 2016 at 12:10 AM, Arjen Stolk wrote: > >> Hi Rachel, >> >> What is the error you're receiving, and how are you calling >> ft_preprocessing? >> >> If the data is in raw format (incl a trial, time and label field), it >> should theoretically be possible to use ft_preprocessing on it, eg; >> cfg = [] >> cfg .. >> data = ft_preprocessing(cfg, raw) >> >> where raw is your data as described above. >> >> Best, >> Arjen >> >> > On Jul 13, 2016, at 11:50 PM, Nakyung Lee >> wrote: >> > >> > Dear FieldTrip community, >> > >> > My name is Rachel Lee and I'm a research assistant in Prof. Ming Hsu's >> lab in UC Berkeley. >> > >> > We currently have a .Tbk file, a .Tdx file, .tev file, .tsq file to >> preprocess and analyze but it seems like those data formats are not yet >> supported by FieldTrip. >> > So, instead of using those raw data files, we've been trying to find a >> workaround by transforming them into a .mat file (and casting the .mat file >> into a raw datatype in FieldTrip by manually assigning fields to it). >> > This hasn't been so successful; we've been unable to call >> ft_preprocessing because of the lack of a proper header format (which is >> needed in ft_read_header, one of the lower level functions that >> ft_preprocessing calls). >> > I've been looking at the codes but been unable to come up with a >> solution. >> > >> > Does anyone have a similar experience? >> > Is there any way to circumvent this issue? >> > Any type of help would be appreciated. >> > >> > Thank you, >> > Rachel Lee >> > _______________________________________________ >> > fieldtrip mailing list >> > fieldtrip at donders.ru.nl >> > https://mailman.science.ru.nl/mailman/listinfo/fieldtrip >> >> _______________________________________________ >> fieldtrip mailing list >> fieldtrip at donders.ru.nl >> https://mailman.science.ru.nl/mailman/listinfo/fieldtrip >> > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > https://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > https://mailman.science.ru.nl/mailman/listinfo/fieldtrip > -------------- next part -------------- An HTML attachment was scrubbed... URL: From a.stolk8 at gmail.com Fri Jul 15 19:01:07 2016 From: a.stolk8 at gmail.com (Arjen Stolk) Date: Fri, 15 Jul 2016 10:01:07 -0700 Subject: [FieldTrip] Unsupported data format In-Reply-To: References: <5DD7AA41-AB91-408F-804C-0A8FCC7A633C@donders.ru.nl> Message-ID: Hi Rachel, Given that you already have the data imported into matlab and organized into trials, try creating a structure 'data' with the following fields (i.e. data.label, data.time, data.trial) and the following dimensions: label: {151x1 cell} the channel labels (e.g. 'MRC13') time: {1x266 cell} the timeaxis [1*Ntime double] per trial trial: {1x266 cell} the numeric data [151*Ntime double] per trial Then, for a proof of principle, try: cfg = []; cfg.demean = 'yes'; data2 = ft_preprocessing(cfg, data); Let us know if this worked for you. Arjen 2016-07-15 9:51 GMT-07:00 Nakyung Lee : > Hi Jan-Mathijs, > > Thanks for your advice. > Yes, I used 'ft_=definetrial' to segment the data. > My data is in the fieldtrip style data format not because it's been > segmented and preprocessed through fieldtrip but because our original > dataformat is unsupported by fieldtrip (.Tbk, .Tdx, .tev, .tsq to be exact). > So my coworker transformed those data into a .mat file and I transformed > into a fieldtrip style raw data but it still needs some segmenting and some > other preprocessing done on it (for example high-gamma filtering). > But if 'ft_preprocessing' is only useable when reading proprietary data > from disk, there's just no way we can preprocess the above data using > fieldtrip? > > Thank you, > Rachel > > On Fri, Jul 15, 2016 at 1:10 AM, Schoffelen, J.M. (Jan Mathijs) < > jan.schoffelen at donders.ru.nl> wrote: > >> Hi Rachel, >> >> Once your data is represented in a fieldtrip-style structure, there’s no >> need anymore to call ft_definetrial with a specified named dataset in the >> cfg. >> >> If you want to segment your data, you may still want to call >> ft_definetrial to generate a so-called ‘trl’ matrix, and subsequently use >> ft_redefinetrial to re-segment, i.e.: >> >> load(’signal_raw.mat’); % I assume that this files contains the >> fieldtrip-style data structure >> >> cfg = []; >> cfg.trl = trl; >> data_epoched = ft_redefinetrial(cfg, data); >> >> So, note that ft_preprocessing shouldn’t be called, this is onlyl useable >> when reading proprietary data from disk. >> >> It seems that you don’t need the cfg.dataset argument to begin with, and >> if you manage to titrate your ft_trialfun_test such that it converts the >> timestamps you provide it with into the correct trl-matrix, I don’t see a >> reason why it shouldn’t work. >> >> Best, >> Jan-Mathijs >> >> >> On 15 Jul 2016, at 08:49, Nakyung Lee wrote: >> >> Hi Arjen, >> >> Thank you for your reply. >> Your email got forwarded successfully. >> >> So currently I tried using 'ft_definetrial' and 'ft_preprocessing'. >> 'ft_definetrial' returns an error when used with 'ft_trialfun' set to >> default. >> Below is the code I used (and 'signal_raw.mat' is a fieldtrip raw data >> and it has all three fields you mentioned). >> >> cfg.dataset = 'signal_raw.mat'; >> cfg.trialdef.event = subj_globals.buttonpress_times; >> cfg = ft_definetrial(cfg); >> >> So I simply call ft_definetrial with minimal configuration and here's the >> error I got: >> >> Error using ft_read_header (line 2194) >> 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 177) >> [trl, event] = feval(cfg.trialfun, cfg); >> >> Error in trialdef_alsotest (line 12) >> cfg = ft_definetrial(cfg); >> >> I circumvented this issue by using my own trialfun ('ft_trialfun_test' in >> the code). >> We already have all the necessary timestamps so I could build a very >> simple one. >> Here's a new code (I ran the code with minimal cfg for 'ft_preprocessing' >> to isolate the problem): >> >> cfg.dataset = 'signal_raw.mat'; >> cfg.trialfun = 'ft_trialfun_test'; >> cfg.trialdef.event = subj_globals.buttonpress_times; >> >> cfg = ft_definetrial(cfg); >> >> cfg.continuous = 'yes'; >> buttonpress_hg = ft_preprocessing(cfg); >> >> And here's the error I got: >> >> Error using ft_read_header (line 2194) >> unsupported header format "matlab" >> >> Error in ft_preprocessing (line 397) >> hdr = ft_read_header(cfg.headerfile, 'headerformat', cfg.headerformat, >> 'coordsys', cfg.coordsys, 'coilaccuracy', >> cfg.coilaccuracy); >> >> Error in test_trialdef (line 18) >> buttonpress_hg = ft_preprocessing(cfg); >> >> So both error come from 'ft_read_header'. >> I've been looking at the code but it seemed quite hard to debug as >> 'ft_read_header' uses a lower level function that directly reads from the >> file (hence it seemed like a simple fix like passing in a fake header >> wouldn't work). >> Am I doing something wrong here? >> >> Again, thank you for your reply and let me know if you need more >> information. >> >> Best, >> Rachel >> >> On Thu, Jul 14, 2016 at 12:10 AM, Arjen Stolk wrote: >> >>> Hi Rachel, >>> >>> What is the error you're receiving, and how are you calling >>> ft_preprocessing? >>> >>> If the data is in raw format (incl a trial, time and label field), it >>> should theoretically be possible to use ft_preprocessing on it, eg; >>> cfg = [] >>> cfg .. >>> data = ft_preprocessing(cfg, raw) >>> >>> where raw is your data as described above. >>> >>> Best, >>> Arjen >>> >>> > On Jul 13, 2016, at 11:50 PM, Nakyung Lee >>> wrote: >>> > >>> > Dear FieldTrip community, >>> > >>> > My name is Rachel Lee and I'm a research assistant in Prof. Ming Hsu's >>> lab in UC Berkeley. >>> > >>> > We currently have a .Tbk file, a .Tdx file, .tev file, .tsq file to >>> preprocess and analyze but it seems like those data formats are not yet >>> supported by FieldTrip. >>> > So, instead of using those raw data files, we've been trying to find a >>> workaround by transforming them into a .mat file (and casting the .mat file >>> into a raw datatype in FieldTrip by manually assigning fields to it). >>> > This hasn't been so successful; we've been unable to call >>> ft_preprocessing because of the lack of a proper header format (which is >>> needed in ft_read_header, one of the lower level functions that >>> ft_preprocessing calls). >>> > I've been looking at the codes but been unable to come up with a >>> solution. >>> > >>> > Does anyone have a similar experience? >>> > Is there any way to circumvent this issue? >>> > Any type of help would be appreciated. >>> > >>> > Thank you, >>> > Rachel Lee >>> > _______________________________________________ >>> > fieldtrip mailing list >>> > fieldtrip at donders.ru.nl >>> > https://mailman.science.ru.nl/mailman/listinfo/fieldtrip >>> >>> _______________________________________________ >>> fieldtrip mailing list >>> fieldtrip at donders.ru.nl >>> https://mailman.science.ru.nl/mailman/listinfo/fieldtrip >>> >> >> _______________________________________________ >> fieldtrip mailing list >> fieldtrip at donders.ru.nl >> https://mailman.science.ru.nl/mailman/listinfo/fieldtrip >> >> >> >> _______________________________________________ >> fieldtrip mailing list >> fieldtrip at donders.ru.nl >> https://mailman.science.ru.nl/mailman/listinfo/fieldtrip >> > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > https://mailman.science.ru.nl/mailman/listinfo/fieldtrip > -------------- next part -------------- An HTML attachment was scrubbed... URL: From rleese12 at berkeley.edu Fri Jul 15 19:33:35 2016 From: rleese12 at berkeley.edu (Nakyung Lee) Date: Fri, 15 Jul 2016 10:33:35 -0700 Subject: [FieldTrip] Unsupported data format In-Reply-To: References: <5DD7AA41-AB91-408F-804C-0A8FCC7A633C@donders.ru.nl> Message-ID: Hi Arjen, Yes, that is exactly the structure of 'signal_raw' I'm using. I tried your code (without running 'ft_definetrial' beforehand) and here's the log: >> cfg = []; >> cfg.demean = 'yes'; >> data = signal_raw data = label: {176x1 cell} time: {[1x721186 double]} trial: {[176x721186 double]} fsample: 1000 >> data2 = ft_preprocessing(cfg, data); Warning: the data does not contain a trial definition > In ft_warning (line 184) In fixsampleinfo (line 66) In ft_datatype_raw (line 175) In ft_checkdata (line 219) In ft_preprocessing (line 274) Warning: reconstructing sampleinfo by assuming that the trials are consecutive segments of a continuous recording > In ft_warning (line 184) In fixsampleinfo (line 79) In ft_datatype_raw (line 175) In ft_checkdata (line 219) In ft_preprocessing (line 274) Error using cell/ismember (line 34) Input A of class cell and input B of class cell must be cell arrays of strings, unless one is a string. Error in ft_senstype (line 303) if (mean(ismember(ft_senslabel('ant128'), sens.label)) > 0.8) Error in ft_channelselection (line 83) senstype = ft_senstype(datachannel); Error in ft_selectdata>getselection_chan (line 649) selchannel = ft_channelselection(cfg.channel, varargin{k}.label); Error in ft_selectdata (line 279) if haschan, [selchan, cfg] = getselection_chan (cfg, varargin{:}, cfg.select); end Error in ft_preprocessing (line 317) data = ft_selectdata(tmpcfg, data); This data is not segmented yet so there's only one trial (and hence time: {[1x721186 double]} and trial: {[176x721186 double]}) with 'Ntime' equal to '721186'. There were warning signs but seems like those are ignore-able ones. Again, let me know if you need more information and thank you. Best, Rachel On Fri, Jul 15, 2016 at 10:01 AM, Arjen Stolk wrote: > Hi Rachel, > > Given that you already have the data imported into matlab and organized > into trials, try creating a structure 'data' with the following fields > (i.e. data.label, data.time, data.trial) and the following dimensions: > > label: {151x1 cell} the channel labels (e.g. 'MRC13') > time: {1x266 cell} the timeaxis [1*Ntime double] per trial > trial: {1x266 cell} the numeric data [151*Ntime double] per trial > > Then, for a proof of principle, try: > > cfg = []; > cfg.demean = 'yes'; > data2 = ft_preprocessing(cfg, data); > > Let us know if this worked for you. > Arjen > > > 2016-07-15 9:51 GMT-07:00 Nakyung Lee : > >> Hi Jan-Mathijs, >> >> Thanks for your advice. >> Yes, I used 'ft_=definetrial' to segment the data. >> My data is in the fieldtrip style data format not because it's been >> segmented and preprocessed through fieldtrip but because our original >> dataformat is unsupported by fieldtrip (.Tbk, .Tdx, .tev, .tsq to be exact). >> So my coworker transformed those data into a .mat file and I transformed >> into a fieldtrip style raw data but it still needs some segmenting and some >> other preprocessing done on it (for example high-gamma filtering). >> But if 'ft_preprocessing' is only useable when reading proprietary data >> from disk, there's just no way we can preprocess the above data using >> fieldtrip? >> >> Thank you, >> Rachel >> >> On Fri, Jul 15, 2016 at 1:10 AM, Schoffelen, J.M. (Jan Mathijs) < >> jan.schoffelen at donders.ru.nl> wrote: >> >>> Hi Rachel, >>> >>> Once your data is represented in a fieldtrip-style structure, there’s no >>> need anymore to call ft_definetrial with a specified named dataset in the >>> cfg. >>> >>> If you want to segment your data, you may still want to call >>> ft_definetrial to generate a so-called ‘trl’ matrix, and subsequently use >>> ft_redefinetrial to re-segment, i.e.: >>> >>> load(’signal_raw.mat’); % I assume that this files contains the >>> fieldtrip-style data structure >>> >>> cfg = []; >>> cfg.trl = trl; >>> data_epoched = ft_redefinetrial(cfg, data); >>> >>> So, note that ft_preprocessing shouldn’t be called, this is onlyl >>> useable when reading proprietary data from disk. >>> >>> It seems that you don’t need the cfg.dataset argument to begin with, and >>> if you manage to titrate your ft_trialfun_test such that it converts the >>> timestamps you provide it with into the correct trl-matrix, I don’t see a >>> reason why it shouldn’t work. >>> >>> Best, >>> Jan-Mathijs >>> >>> >>> On 15 Jul 2016, at 08:49, Nakyung Lee wrote: >>> >>> Hi Arjen, >>> >>> Thank you for your reply. >>> Your email got forwarded successfully. >>> >>> So currently I tried using 'ft_definetrial' and 'ft_preprocessing'. >>> 'ft_definetrial' returns an error when used with 'ft_trialfun' set to >>> default. >>> Below is the code I used (and 'signal_raw.mat' is a fieldtrip raw data >>> and it has all three fields you mentioned). >>> >>> cfg.dataset = 'signal_raw.mat'; >>> cfg.trialdef.event = subj_globals.buttonpress_times; >>> cfg = ft_definetrial(cfg); >>> >>> So I simply call ft_definetrial with minimal configuration and here's >>> the error I got: >>> >>> Error using ft_read_header (line 2194) >>> 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 177) >>> [trl, event] = feval(cfg.trialfun, cfg); >>> >>> Error in trialdef_alsotest (line 12) >>> cfg = ft_definetrial(cfg); >>> >>> I circumvented this issue by using my own trialfun ('ft_trialfun_test' >>> in the code). >>> We already have all the necessary timestamps so I could build a very >>> simple one. >>> Here's a new code (I ran the code with minimal cfg for >>> 'ft_preprocessing' to isolate the problem): >>> >>> cfg.dataset = 'signal_raw.mat'; >>> cfg.trialfun = 'ft_trialfun_test'; >>> cfg.trialdef.event = subj_globals.buttonpress_times; >>> >>> cfg = ft_definetrial(cfg); >>> >>> cfg.continuous = 'yes'; >>> buttonpress_hg = ft_preprocessing(cfg); >>> >>> And here's the error I got: >>> >>> Error using ft_read_header (line 2194) >>> unsupported header format "matlab" >>> >>> Error in ft_preprocessing (line 397) >>> hdr = ft_read_header(cfg.headerfile, 'headerformat', cfg.headerformat, >>> 'coordsys', cfg.coordsys, 'coilaccuracy', >>> cfg.coilaccuracy); >>> >>> Error in test_trialdef (line 18) >>> buttonpress_hg = ft_preprocessing(cfg); >>> >>> So both error come from 'ft_read_header'. >>> I've been looking at the code but it seemed quite hard to debug as >>> 'ft_read_header' uses a lower level function that directly reads from the >>> file (hence it seemed like a simple fix like passing in a fake header >>> wouldn't work). >>> Am I doing something wrong here? >>> >>> Again, thank you for your reply and let me know if you need more >>> information. >>> >>> Best, >>> Rachel >>> >>> On Thu, Jul 14, 2016 at 12:10 AM, Arjen Stolk >>> wrote: >>> >>>> Hi Rachel, >>>> >>>> What is the error you're receiving, and how are you calling >>>> ft_preprocessing? >>>> >>>> If the data is in raw format (incl a trial, time and label field), it >>>> should theoretically be possible to use ft_preprocessing on it, eg; >>>> cfg = [] >>>> cfg .. >>>> data = ft_preprocessing(cfg, raw) >>>> >>>> where raw is your data as described above. >>>> >>>> Best, >>>> Arjen >>>> >>>> > On Jul 13, 2016, at 11:50 PM, Nakyung Lee >>>> wrote: >>>> > >>>> > Dear FieldTrip community, >>>> > >>>> > My name is Rachel Lee and I'm a research assistant in Prof. Ming >>>> Hsu's lab in UC Berkeley. >>>> > >>>> > We currently have a .Tbk file, a .Tdx file, .tev file, .tsq file to >>>> preprocess and analyze but it seems like those data formats are not yet >>>> supported by FieldTrip. >>>> > So, instead of using those raw data files, we've been trying to find >>>> a workaround by transforming them into a .mat file (and casting the .mat >>>> file into a raw datatype in FieldTrip by manually assigning fields to it). >>>> > This hasn't been so successful; we've been unable to call >>>> ft_preprocessing because of the lack of a proper header format (which is >>>> needed in ft_read_header, one of the lower level functions that >>>> ft_preprocessing calls). >>>> > I've been looking at the codes but been unable to come up with a >>>> solution. >>>> > >>>> > Does anyone have a similar experience? >>>> > Is there any way to circumvent this issue? >>>> > Any type of help would be appreciated. >>>> > >>>> > Thank you, >>>> > Rachel Lee >>>> > _______________________________________________ >>>> > fieldtrip mailing list >>>> > fieldtrip at donders.ru.nl >>>> > https://mailman.science.ru.nl/mailman/listinfo/fieldtrip >>>> >>>> _______________________________________________ >>>> fieldtrip mailing list >>>> fieldtrip at donders.ru.nl >>>> https://mailman.science.ru.nl/mailman/listinfo/fieldtrip >>>> >>> >>> _______________________________________________ >>> fieldtrip mailing list >>> fieldtrip at donders.ru.nl >>> https://mailman.science.ru.nl/mailman/listinfo/fieldtrip >>> >>> >>> >>> _______________________________________________ >>> fieldtrip mailing list >>> fieldtrip at donders.ru.nl >>> https://mailman.science.ru.nl/mailman/listinfo/fieldtrip >>> >> >> >> _______________________________________________ >> fieldtrip mailing list >> fieldtrip at donders.ru.nl >> https://mailman.science.ru.nl/mailman/listinfo/fieldtrip >> > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > https://mailman.science.ru.nl/mailman/listinfo/fieldtrip > -------------- next part -------------- An HTML attachment was scrubbed... URL: From a.stolk8 at gmail.com Fri Jul 15 19:47:39 2016 From: a.stolk8 at gmail.com (Arjen Stolk) Date: Fri, 15 Jul 2016 10:47:39 -0700 Subject: [FieldTrip] Unsupported data format In-Reply-To: References: <5DD7AA41-AB91-408F-804C-0A8FCC7A633C@donders.ru.nl> Message-ID: Almost there, Rachel. :) Now ensure your data.label field contains strings and not numbers, i.e. data.label = {'1';'2'} and not {1;2} 2016-07-15 10:33 GMT-07:00 Nakyung Lee : > Hi Arjen, > > Yes, that is exactly the structure of 'signal_raw' I'm using. > I tried your code (without running 'ft_definetrial' beforehand) and here's > the log: > > >> cfg = []; > >> cfg.demean = 'yes'; > >> data = signal_raw > > data = > > label: {176x1 cell} > time: {[1x721186 double]} > trial: {[176x721186 double]} > fsample: 1000 > > >> data2 = ft_preprocessing(cfg, data); > Warning: the data does not contain a trial definition > > In ft_warning (line 184) > In fixsampleinfo (line 66) > In ft_datatype_raw (line 175) > In ft_checkdata (line 219) > In ft_preprocessing (line 274) > Warning: reconstructing sampleinfo by assuming that the trials are > consecutive segments of a continuous recording > > In ft_warning (line 184) > In fixsampleinfo (line 79) > In ft_datatype_raw (line 175) > In ft_checkdata (line 219) > In ft_preprocessing (line 274) > Error using cell/ismember (line 34) > Input A of class cell and input B of class cell must be cell arrays of > strings, unless one is a string. > > Error in ft_senstype (line 303) > if (mean(ismember(ft_senslabel('ant128'), sens.label)) > > 0.8) > > Error in ft_channelselection (line 83) > senstype = ft_senstype(datachannel); > > Error in ft_selectdata>getselection_chan (line 649) > selchannel = ft_channelselection(cfg.channel, varargin{k}.label); > > Error in ft_selectdata (line 279) > if haschan, [selchan, cfg] = getselection_chan (cfg, varargin{:}, > cfg.select); end > > Error in ft_preprocessing (line 317) > data = ft_selectdata(tmpcfg, data); > > This data is not segmented yet so there's only one trial (and hence time: {[1x721186 > double]} and trial: {[176x721186 double]}) with 'Ntime' equal to '721186'. > There were warning signs but seems like those are ignore-able ones. > Again, let me know if you need more information and thank you. > > Best, > Rachel > > On Fri, Jul 15, 2016 at 10:01 AM, Arjen Stolk wrote: > >> Hi Rachel, >> >> Given that you already have the data imported into matlab and organized >> into trials, try creating a structure 'data' with the following fields >> (i.e. data.label, data.time, data.trial) and the following dimensions: >> >> label: {151x1 cell} the channel labels (e.g. 'MRC13') >> time: {1x266 cell} the timeaxis [1*Ntime double] per trial >> trial: {1x266 cell} the numeric data [151*Ntime double] per trial >> >> Then, for a proof of principle, try: >> >> cfg = []; >> cfg.demean = 'yes'; >> data2 = ft_preprocessing(cfg, data); >> >> Let us know if this worked for you. >> Arjen >> >> >> 2016-07-15 9:51 GMT-07:00 Nakyung Lee : >> >>> Hi Jan-Mathijs, >>> >>> Thanks for your advice. >>> Yes, I used 'ft_=definetrial' to segment the data. >>> My data is in the fieldtrip style data format not because it's been >>> segmented and preprocessed through fieldtrip but because our original >>> dataformat is unsupported by fieldtrip (.Tbk, .Tdx, .tev, .tsq to be exact). >>> So my coworker transformed those data into a .mat file and I transformed >>> into a fieldtrip style raw data but it still needs some segmenting and some >>> other preprocessing done on it (for example high-gamma filtering). >>> But if 'ft_preprocessing' is only useable when reading proprietary data >>> from disk, there's just no way we can preprocess the above data using >>> fieldtrip? >>> >>> Thank you, >>> Rachel >>> >>> On Fri, Jul 15, 2016 at 1:10 AM, Schoffelen, J.M. (Jan Mathijs) < >>> jan.schoffelen at donders.ru.nl> wrote: >>> >>>> Hi Rachel, >>>> >>>> Once your data is represented in a fieldtrip-style structure, there’s >>>> no need anymore to call ft_definetrial with a specified named dataset in >>>> the cfg. >>>> >>>> If you want to segment your data, you may still want to call >>>> ft_definetrial to generate a so-called ‘trl’ matrix, and subsequently use >>>> ft_redefinetrial to re-segment, i.e.: >>>> >>>> load(’signal_raw.mat’); % I assume that this files contains the >>>> fieldtrip-style data structure >>>> >>>> cfg = []; >>>> cfg.trl = trl; >>>> data_epoched = ft_redefinetrial(cfg, data); >>>> >>>> So, note that ft_preprocessing shouldn’t be called, this is onlyl >>>> useable when reading proprietary data from disk. >>>> >>>> It seems that you don’t need the cfg.dataset argument to begin with, >>>> and if you manage to titrate your ft_trialfun_test such that it converts >>>> the timestamps you provide it with into the correct trl-matrix, I don’t see >>>> a reason why it shouldn’t work. >>>> >>>> Best, >>>> Jan-Mathijs >>>> >>>> >>>> On 15 Jul 2016, at 08:49, Nakyung Lee wrote: >>>> >>>> Hi Arjen, >>>> >>>> Thank you for your reply. >>>> Your email got forwarded successfully. >>>> >>>> So currently I tried using 'ft_definetrial' and 'ft_preprocessing'. >>>> 'ft_definetrial' returns an error when used with 'ft_trialfun' set to >>>> default. >>>> Below is the code I used (and 'signal_raw.mat' is a fieldtrip raw data >>>> and it has all three fields you mentioned). >>>> >>>> cfg.dataset = 'signal_raw.mat'; >>>> cfg.trialdef.event = subj_globals.buttonpress_times; >>>> cfg = ft_definetrial(cfg); >>>> >>>> So I simply call ft_definetrial with minimal configuration and here's >>>> the error I got: >>>> >>>> Error using ft_read_header (line 2194) >>>> 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 177) >>>> [trl, event] = feval(cfg.trialfun, cfg); >>>> >>>> Error in trialdef_alsotest (line 12) >>>> cfg = ft_definetrial(cfg); >>>> >>>> I circumvented this issue by using my own trialfun ('ft_trialfun_test' >>>> in the code). >>>> We already have all the necessary timestamps so I could build a very >>>> simple one. >>>> Here's a new code (I ran the code with minimal cfg for >>>> 'ft_preprocessing' to isolate the problem): >>>> >>>> cfg.dataset = 'signal_raw.mat'; >>>> cfg.trialfun = 'ft_trialfun_test'; >>>> cfg.trialdef.event = subj_globals.buttonpress_times; >>>> >>>> cfg = ft_definetrial(cfg); >>>> >>>> cfg.continuous = 'yes'; >>>> buttonpress_hg = ft_preprocessing(cfg); >>>> >>>> And here's the error I got: >>>> >>>> Error using ft_read_header (line 2194) >>>> unsupported header format "matlab" >>>> >>>> Error in ft_preprocessing (line 397) >>>> hdr = ft_read_header(cfg.headerfile, 'headerformat', >>>> cfg.headerformat, 'coordsys', cfg.coordsys, 'coilaccuracy', >>>> cfg.coilaccuracy); >>>> >>>> Error in test_trialdef (line 18) >>>> buttonpress_hg = ft_preprocessing(cfg); >>>> >>>> So both error come from 'ft_read_header'. >>>> I've been looking at the code but it seemed quite hard to debug as >>>> 'ft_read_header' uses a lower level function that directly reads from the >>>> file (hence it seemed like a simple fix like passing in a fake header >>>> wouldn't work). >>>> Am I doing something wrong here? >>>> >>>> Again, thank you for your reply and let me know if you need more >>>> information. >>>> >>>> Best, >>>> Rachel >>>> >>>> On Thu, Jul 14, 2016 at 12:10 AM, Arjen Stolk >>>> wrote: >>>> >>>>> Hi Rachel, >>>>> >>>>> What is the error you're receiving, and how are you calling >>>>> ft_preprocessing? >>>>> >>>>> If the data is in raw format (incl a trial, time and label field), it >>>>> should theoretically be possible to use ft_preprocessing on it, eg; >>>>> cfg = [] >>>>> cfg .. >>>>> data = ft_preprocessing(cfg, raw) >>>>> >>>>> where raw is your data as described above. >>>>> >>>>> Best, >>>>> Arjen >>>>> >>>>> > On Jul 13, 2016, at 11:50 PM, Nakyung Lee >>>>> wrote: >>>>> > >>>>> > Dear FieldTrip community, >>>>> > >>>>> > My name is Rachel Lee and I'm a research assistant in Prof. Ming >>>>> Hsu's lab in UC Berkeley. >>>>> > >>>>> > We currently have a .Tbk file, a .Tdx file, .tev file, .tsq file to >>>>> preprocess and analyze but it seems like those data formats are not yet >>>>> supported by FieldTrip. >>>>> > So, instead of using those raw data files, we've been trying to find >>>>> a workaround by transforming them into a .mat file (and casting the .mat >>>>> file into a raw datatype in FieldTrip by manually assigning fields to it). >>>>> > This hasn't been so successful; we've been unable to call >>>>> ft_preprocessing because of the lack of a proper header format (which is >>>>> needed in ft_read_header, one of the lower level functions that >>>>> ft_preprocessing calls). >>>>> > I've been looking at the codes but been unable to come up with a >>>>> solution. >>>>> > >>>>> > Does anyone have a similar experience? >>>>> > Is there any way to circumvent this issue? >>>>> > Any type of help would be appreciated. >>>>> > >>>>> > Thank you, >>>>> > Rachel Lee >>>>> > _______________________________________________ >>>>> > fieldtrip mailing list >>>>> > fieldtrip at donders.ru.nl >>>>> > https://mailman.science.ru.nl/mailman/listinfo/fieldtrip >>>>> >>>>> _______________________________________________ >>>>> fieldtrip mailing list >>>>> fieldtrip at donders.ru.nl >>>>> https://mailman.science.ru.nl/mailman/listinfo/fieldtrip >>>>> >>>> >>>> _______________________________________________ >>>> fieldtrip mailing list >>>> fieldtrip at donders.ru.nl >>>> https://mailman.science.ru.nl/mailman/listinfo/fieldtrip >>>> >>>> >>>> >>>> _______________________________________________ >>>> fieldtrip mailing list >>>> fieldtrip at donders.ru.nl >>>> https://mailman.science.ru.nl/mailman/listinfo/fieldtrip >>>> >>> >>> >>> _______________________________________________ >>> fieldtrip mailing list >>> fieldtrip at donders.ru.nl >>> https://mailman.science.ru.nl/mailman/listinfo/fieldtrip >>> >> >> >> _______________________________________________ >> fieldtrip mailing list >> fieldtrip at donders.ru.nl >> https://mailman.science.ru.nl/mailman/listinfo/fieldtrip >> > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > https://mailman.science.ru.nl/mailman/listinfo/fieldtrip > -------------- next part -------------- An HTML attachment was scrubbed... URL: From rleese12 at berkeley.edu Sat Jul 16 03:54:29 2016 From: rleese12 at berkeley.edu (Nakyung Lee) Date: Fri, 15 Jul 2016 18:54:29 -0700 Subject: [FieldTrip] Unsupported data format In-Reply-To: References: <5DD7AA41-AB91-408F-804C-0A8FCC7A633C@donders.ru.nl> Message-ID: Hooray, it works! Thanks for being patient with me :) >> cfg = []; >> cfg.demean = 'yes'; >> data = signal_raw data = label: {176x1 cell} time: {[1x721186 double]} trial: {[176x721186 double]} fsample: 1000 >> data2 = ft_preprocessing(cfg, data); Warning: discarding non-unique channel names > In ft_channelselection (line 102) In ft_selectdata>getselection_chan (line 649) In ft_selectdata (line 279) In ft_preprocessing (line 317) the call to "ft_selectdata" took 2 seconds preprocessing preprocessing trial 1 from 1 the call to "ft_preprocessing" took 4 seconds And thanks again. Best, Rachel On Fri, Jul 15, 2016 at 10:47 AM, Arjen Stolk wrote: > Almost there, Rachel. :) Now ensure your data.label field contains strings > and not numbers, i.e. > > data.label = {'1';'2'} and not {1;2} > > 2016-07-15 10:33 GMT-07:00 Nakyung Lee : > >> Hi Arjen, >> >> Yes, that is exactly the structure of 'signal_raw' I'm using. >> I tried your code (without running 'ft_definetrial' beforehand) and >> here's the log: >> >> >> cfg = []; >> >> cfg.demean = 'yes'; >> >> data = signal_raw >> >> data = >> >> label: {176x1 cell} >> time: {[1x721186 double]} >> trial: {[176x721186 double]} >> fsample: 1000 >> >> >> data2 = ft_preprocessing(cfg, data); >> Warning: the data does not contain a trial definition >> > In ft_warning (line 184) >> In fixsampleinfo (line 66) >> In ft_datatype_raw (line 175) >> In ft_checkdata (line 219) >> In ft_preprocessing (line 274) >> Warning: reconstructing sampleinfo by assuming that the trials are >> consecutive segments of a continuous recording >> > In ft_warning (line 184) >> In fixsampleinfo (line 79) >> In ft_datatype_raw (line 175) >> In ft_checkdata (line 219) >> In ft_preprocessing (line 274) >> Error using cell/ismember (line 34) >> Input A of class cell and input B of class cell must be cell arrays of >> strings, unless one is a string. >> >> Error in ft_senstype (line 303) >> if (mean(ismember(ft_senslabel('ant128'), sens.label)) > >> 0.8) >> >> Error in ft_channelselection (line 83) >> senstype = ft_senstype(datachannel); >> >> Error in ft_selectdata>getselection_chan (line 649) >> selchannel = ft_channelselection(cfg.channel, varargin{k}.label); >> >> Error in ft_selectdata (line 279) >> if haschan, [selchan, cfg] = getselection_chan (cfg, varargin{:}, >> cfg.select); end >> >> Error in ft_preprocessing (line 317) >> data = ft_selectdata(tmpcfg, data); >> >> This data is not segmented yet so there's only one trial (and hence time: {[1x721186 >> double]} and trial: {[176x721186 double]}) with 'Ntime' equal to >> '721186'. >> There were warning signs but seems like those are ignore-able ones. >> Again, let me know if you need more information and thank you. >> >> Best, >> Rachel >> >> On Fri, Jul 15, 2016 at 10:01 AM, Arjen Stolk wrote: >> >>> Hi Rachel, >>> >>> Given that you already have the data imported into matlab and organized >>> into trials, try creating a structure 'data' with the following fields >>> (i.e. data.label, data.time, data.trial) and the following dimensions: >>> >>> label: {151x1 cell} the channel labels (e.g. 'MRC13') >>> time: {1x266 cell} the timeaxis [1*Ntime double] per trial >>> trial: {1x266 cell} the numeric data [151*Ntime double] per trial >>> >>> Then, for a proof of principle, try: >>> >>> cfg = []; >>> cfg.demean = 'yes'; >>> data2 = ft_preprocessing(cfg, data); >>> >>> Let us know if this worked for you. >>> Arjen >>> >>> >>> 2016-07-15 9:51 GMT-07:00 Nakyung Lee : >>> >>>> Hi Jan-Mathijs, >>>> >>>> Thanks for your advice. >>>> Yes, I used 'ft_=definetrial' to segment the data. >>>> My data is in the fieldtrip style data format not because it's been >>>> segmented and preprocessed through fieldtrip but because our original >>>> dataformat is unsupported by fieldtrip (.Tbk, .Tdx, .tev, .tsq to be exact). >>>> So my coworker transformed those data into a .mat file and I >>>> transformed into a fieldtrip style raw data but it still needs some >>>> segmenting and some other preprocessing done on it (for example high-gamma >>>> filtering). >>>> But if 'ft_preprocessing' is only useable when reading proprietary >>>> data from disk, there's just no way we can preprocess the above data using >>>> fieldtrip? >>>> >>>> Thank you, >>>> Rachel >>>> >>>> On Fri, Jul 15, 2016 at 1:10 AM, Schoffelen, J.M. (Jan Mathijs) < >>>> jan.schoffelen at donders.ru.nl> wrote: >>>> >>>>> Hi Rachel, >>>>> >>>>> Once your data is represented in a fieldtrip-style structure, there’s >>>>> no need anymore to call ft_definetrial with a specified named dataset in >>>>> the cfg. >>>>> >>>>> If you want to segment your data, you may still want to call >>>>> ft_definetrial to generate a so-called ‘trl’ matrix, and subsequently use >>>>> ft_redefinetrial to re-segment, i.e.: >>>>> >>>>> load(’signal_raw.mat’); % I assume that this files contains the >>>>> fieldtrip-style data structure >>>>> >>>>> cfg = []; >>>>> cfg.trl = trl; >>>>> data_epoched = ft_redefinetrial(cfg, data); >>>>> >>>>> So, note that ft_preprocessing shouldn’t be called, this is onlyl >>>>> useable when reading proprietary data from disk. >>>>> >>>>> It seems that you don’t need the cfg.dataset argument to begin with, >>>>> and if you manage to titrate your ft_trialfun_test such that it converts >>>>> the timestamps you provide it with into the correct trl-matrix, I don’t see >>>>> a reason why it shouldn’t work. >>>>> >>>>> Best, >>>>> Jan-Mathijs >>>>> >>>>> >>>>> On 15 Jul 2016, at 08:49, Nakyung Lee wrote: >>>>> >>>>> Hi Arjen, >>>>> >>>>> Thank you for your reply. >>>>> Your email got forwarded successfully. >>>>> >>>>> So currently I tried using 'ft_definetrial' and 'ft_preprocessing'. >>>>> 'ft_definetrial' returns an error when used with 'ft_trialfun' set to >>>>> default. >>>>> Below is the code I used (and 'signal_raw.mat' is a fieldtrip raw data >>>>> and it has all three fields you mentioned). >>>>> >>>>> cfg.dataset = 'signal_raw.mat'; >>>>> cfg.trialdef.event = subj_globals.buttonpress_times; >>>>> cfg = ft_definetrial(cfg); >>>>> >>>>> So I simply call ft_definetrial with minimal configuration and here's >>>>> the error I got: >>>>> >>>>> Error using ft_read_header (line 2194) >>>>> 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 177) >>>>> [trl, event] = feval(cfg.trialfun, cfg); >>>>> >>>>> Error in trialdef_alsotest (line 12) >>>>> cfg = ft_definetrial(cfg); >>>>> >>>>> I circumvented this issue by using my own trialfun ('ft_trialfun_test' >>>>> in the code). >>>>> We already have all the necessary timestamps so I could build a very >>>>> simple one. >>>>> Here's a new code (I ran the code with minimal cfg for >>>>> 'ft_preprocessing' to isolate the problem): >>>>> >>>>> cfg.dataset = 'signal_raw.mat'; >>>>> cfg.trialfun = 'ft_trialfun_test'; >>>>> cfg.trialdef.event = subj_globals.buttonpress_times; >>>>> >>>>> cfg = ft_definetrial(cfg); >>>>> >>>>> cfg.continuous = 'yes'; >>>>> buttonpress_hg = ft_preprocessing(cfg); >>>>> >>>>> And here's the error I got: >>>>> >>>>> Error using ft_read_header (line 2194) >>>>> unsupported header format "matlab" >>>>> >>>>> Error in ft_preprocessing (line 397) >>>>> hdr = ft_read_header(cfg.headerfile, 'headerformat', >>>>> cfg.headerformat, 'coordsys', cfg.coordsys, 'coilaccuracy', >>>>> cfg.coilaccuracy); >>>>> >>>>> Error in test_trialdef (line 18) >>>>> buttonpress_hg = ft_preprocessing(cfg); >>>>> >>>>> So both error come from 'ft_read_header'. >>>>> I've been looking at the code but it seemed quite hard to debug as >>>>> 'ft_read_header' uses a lower level function that directly reads from the >>>>> file (hence it seemed like a simple fix like passing in a fake header >>>>> wouldn't work). >>>>> Am I doing something wrong here? >>>>> >>>>> Again, thank you for your reply and let me know if you need more >>>>> information. >>>>> >>>>> Best, >>>>> Rachel >>>>> >>>>> On Thu, Jul 14, 2016 at 12:10 AM, Arjen Stolk >>>>> wrote: >>>>> >>>>>> Hi Rachel, >>>>>> >>>>>> What is the error you're receiving, and how are you calling >>>>>> ft_preprocessing? >>>>>> >>>>>> If the data is in raw format (incl a trial, time and label field), it >>>>>> should theoretically be possible to use ft_preprocessing on it, eg; >>>>>> cfg = [] >>>>>> cfg .. >>>>>> data = ft_preprocessing(cfg, raw) >>>>>> >>>>>> where raw is your data as described above. >>>>>> >>>>>> Best, >>>>>> Arjen >>>>>> >>>>>> > On Jul 13, 2016, at 11:50 PM, Nakyung Lee >>>>>> wrote: >>>>>> > >>>>>> > Dear FieldTrip community, >>>>>> > >>>>>> > My name is Rachel Lee and I'm a research assistant in Prof. Ming >>>>>> Hsu's lab in UC Berkeley. >>>>>> > >>>>>> > We currently have a .Tbk file, a .Tdx file, .tev file, .tsq file to >>>>>> preprocess and analyze but it seems like those data formats are not yet >>>>>> supported by FieldTrip. >>>>>> > So, instead of using those raw data files, we've been trying to >>>>>> find a workaround by transforming them into a .mat file (and casting the >>>>>> .mat file into a raw datatype in FieldTrip by manually assigning fields to >>>>>> it). >>>>>> > This hasn't been so successful; we've been unable to call >>>>>> ft_preprocessing because of the lack of a proper header format (which is >>>>>> needed in ft_read_header, one of the lower level functions that >>>>>> ft_preprocessing calls). >>>>>> > I've been looking at the codes but been unable to come up with a >>>>>> solution. >>>>>> > >>>>>> > Does anyone have a similar experience? >>>>>> > Is there any way to circumvent this issue? >>>>>> > Any type of help would be appreciated. >>>>>> > >>>>>> > Thank you, >>>>>> > Rachel Lee >>>>>> > _______________________________________________ >>>>>> > fieldtrip mailing list >>>>>> > fieldtrip at donders.ru.nl >>>>>> > https://mailman.science.ru.nl/mailman/listinfo/fieldtrip >>>>>> >>>>>> _______________________________________________ >>>>>> fieldtrip mailing list >>>>>> fieldtrip at donders.ru.nl >>>>>> https://mailman.science.ru.nl/mailman/listinfo/fieldtrip >>>>>> >>>>> >>>>> _______________________________________________ >>>>> fieldtrip mailing list >>>>> fieldtrip at donders.ru.nl >>>>> https://mailman.science.ru.nl/mailman/listinfo/fieldtrip >>>>> >>>>> >>>>> >>>>> _______________________________________________ >>>>> fieldtrip mailing list >>>>> fieldtrip at donders.ru.nl >>>>> https://mailman.science.ru.nl/mailman/listinfo/fieldtrip >>>>> >>>> >>>> >>>> _______________________________________________ >>>> fieldtrip mailing list >>>> fieldtrip at donders.ru.nl >>>> https://mailman.science.ru.nl/mailman/listinfo/fieldtrip >>>> >>> >>> >>> _______________________________________________ >>> fieldtrip mailing list >>> fieldtrip at donders.ru.nl >>> https://mailman.science.ru.nl/mailman/listinfo/fieldtrip >>> >> >> >> _______________________________________________ >> fieldtrip mailing list >> fieldtrip at donders.ru.nl >> https://mailman.science.ru.nl/mailman/listinfo/fieldtrip >> > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > https://mailman.science.ru.nl/mailman/listinfo/fieldtrip > -------------- next part -------------- An HTML attachment was scrubbed... URL: From a.stolk8 at gmail.com Sat Jul 16 04:26:32 2016 From: a.stolk8 at gmail.com (Arjen Stolk) Date: Fri, 15 Jul 2016 19:26:32 -0700 Subject: [FieldTrip] Unsupported data format In-Reply-To: References: <5DD7AA41-AB91-408F-804C-0A8FCC7A633C@donders.ru.nl> Message-ID: <43EC80C7-0230-40E6-AD33-57B625D414DC@gmail.com> Great to hear! > On Jul 15, 2016, at 6:54 PM, Nakyung Lee wrote: > > Hooray, it works! > Thanks for being patient with me :) > > >> cfg = []; > >> cfg.demean = 'yes'; > >> data = signal_raw > > data = > > label: {176x1 cell} > time: {[1x721186 double]} > trial: {[176x721186 double]} > fsample: 1000 > > >> data2 = ft_preprocessing(cfg, data); > Warning: discarding non-unique channel names > > In ft_channelselection (line 102) > In ft_selectdata>getselection_chan (line 649) > In ft_selectdata (line 279) > In ft_preprocessing (line 317) > the call to "ft_selectdata" took 2 seconds > preprocessing > preprocessing trial 1 from 1 > > the call to "ft_preprocessing" took 4 seconds > > And thanks again. > > Best, > Rachel > >> On Fri, Jul 15, 2016 at 10:47 AM, Arjen Stolk wrote: >> Almost there, Rachel. :) Now ensure your data.label field contains strings and not numbers, i.e. >> >> data.label = {'1';'2'} and not {1;2} >> >> 2016-07-15 10:33 GMT-07:00 Nakyung Lee : >>> Hi Arjen, >>> >>> Yes, that is exactly the structure of 'signal_raw' I'm using. >>> I tried your code (without running 'ft_definetrial' beforehand) and here's the log: >>> >>> >> cfg = []; >>> >> cfg.demean = 'yes'; >>> >> data = signal_raw >>> >>> data = >>> >>> label: {176x1 cell} >>> time: {[1x721186 double]} >>> trial: {[176x721186 double]} >>> fsample: 1000 >>> >>> >> data2 = ft_preprocessing(cfg, data); >>> Warning: the data does not contain a trial definition >>> > In ft_warning (line 184) >>> In fixsampleinfo (line 66) >>> In ft_datatype_raw (line 175) >>> In ft_checkdata (line 219) >>> In ft_preprocessing (line 274) >>> Warning: reconstructing sampleinfo by assuming that the trials are consecutive segments of a continuous recording >>> > In ft_warning (line 184) >>> In fixsampleinfo (line 79) >>> In ft_datatype_raw (line 175) >>> In ft_checkdata (line 219) >>> In ft_preprocessing (line 274) >>> Error using cell/ismember (line 34) >>> Input A of class cell and input B of class cell must be cell arrays of strings, unless one is a string. >>> >>> Error in ft_senstype (line 303) >>> if (mean(ismember(ft_senslabel('ant128'), sens.label)) > 0.8) >>> >>> Error in ft_channelselection (line 83) >>> senstype = ft_senstype(datachannel); >>> >>> Error in ft_selectdata>getselection_chan (line 649) >>> selchannel = ft_channelselection(cfg.channel, varargin{k}.label); >>> >>> Error in ft_selectdata (line 279) >>> if haschan, [selchan, cfg] = getselection_chan (cfg, varargin{:}, cfg.select); end >>> >>> Error in ft_preprocessing (line 317) >>> data = ft_selectdata(tmpcfg, data); >>> >>> This data is not segmented yet so there's only one trial (and hence time: {[1x721186 double]} and trial: {[176x721186 double]}) with 'Ntime' equal to '721186'. >>> There were warning signs but seems like those are ignore-able ones. >>> Again, let me know if you need more information and thank you. >>> >>> Best, >>> Rachel >>> >>>> On Fri, Jul 15, 2016 at 10:01 AM, Arjen Stolk wrote: >>>> Hi Rachel, >>>> >>>> Given that you already have the data imported into matlab and organized into trials, try creating a structure 'data' with the following fields (i.e. data.label, data.time, data.trial) and the following dimensions: >>>> >>>> label: {151x1 cell} the channel labels (e.g. 'MRC13') >>>> time: {1x266 cell} the timeaxis [1*Ntime double] per trial >>>> trial: {1x266 cell} the numeric data [151*Ntime double] per trial >>>> Then, for a proof of principle, try: >>>> >>>> cfg = []; >>>> cfg.demean = 'yes'; >>>> data2 = ft_preprocessing(cfg, data); >>>> >>>> Let us know if this worked for you. >>>> Arjen >>>> >>>> >>>> 2016-07-15 9:51 GMT-07:00 Nakyung Lee : >>>>> Hi Jan-Mathijs, >>>>> >>>>> Thanks for your advice. >>>>> Yes, I used 'ft_=definetrial' to segment the data. >>>>> My data is in the fieldtrip style data format not because it's been segmented and preprocessed through fieldtrip but because our original dataformat is unsupported by fieldtrip (.Tbk, .Tdx, .tev, .tsq to be exact). >>>>> So my coworker transformed those data into a .mat file and I transformed into a fieldtrip style raw data but it still needs some segmenting and some other preprocessing done on it (for example high-gamma filtering). >>>>> But if 'ft_preprocessing' is only useable when reading proprietary data from disk, there's just no way we can preprocess the above data using fieldtrip? >>>>> >>>>> Thank you, >>>>> Rachel >>>>> >>>>>> On Fri, Jul 15, 2016 at 1:10 AM, Schoffelen, J.M. (Jan Mathijs) wrote: >>>>>> Hi Rachel, >>>>>> >>>>>> Once your data is represented in a fieldtrip-style structure, there’s no need anymore to call ft_definetrial with a specified named dataset in the cfg. >>>>>> >>>>>> If you want to segment your data, you may still want to call ft_definetrial to generate a so-called ‘trl’ matrix, and subsequently use ft_redefinetrial to re-segment, i.e.: >>>>>> >>>>>> load(’signal_raw.mat’); % I assume that this files contains the fieldtrip-style data structure >>>>>> >>>>>> cfg = []; >>>>>> cfg.trl = trl; >>>>>> data_epoched = ft_redefinetrial(cfg, data); >>>>>> >>>>>> So, note that ft_preprocessing shouldn’t be called, this is onlyl useable when reading proprietary data from disk. >>>>>> >>>>>> It seems that you don’t need the cfg.dataset argument to begin with, and if you manage to titrate your ft_trialfun_test such that it converts the timestamps you provide it with into the correct trl-matrix, I don’t see a reason why it shouldn’t work. >>>>>> >>>>>> Best, >>>>>> Jan-Mathijs >>>>>> >>>>>> >>>>>>> On 15 Jul 2016, at 08:49, Nakyung Lee wrote: >>>>>>> >>>>>>> Hi Arjen, >>>>>>> >>>>>>> Thank you for your reply. >>>>>>> Your email got forwarded successfully. >>>>>>> >>>>>>> So currently I tried using 'ft_definetrial' and 'ft_preprocessing'. >>>>>>> 'ft_definetrial' returns an error when used with 'ft_trialfun' set to default. >>>>>>> Below is the code I used (and 'signal_raw.mat' is a fieldtrip raw data and it has all three fields you mentioned). >>>>>>> >>>>>>> cfg.dataset = 'signal_raw.mat'; >>>>>>> cfg.trialdef.event = subj_globals.buttonpress_times; >>>>>>> cfg = ft_definetrial(cfg); >>>>>>> >>>>>>> So I simply call ft_definetrial with minimal configuration and here's the error I got: >>>>>>> >>>>>>> Error using ft_read_header (line 2194) >>>>>>> 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 177) >>>>>>> [trl, event] = feval(cfg.trialfun, cfg); >>>>>>> >>>>>>> Error in trialdef_alsotest (line 12) >>>>>>> cfg = ft_definetrial(cfg); >>>>>>> >>>>>>> I circumvented this issue by using my own trialfun ('ft_trialfun_test' in the code). >>>>>>> We already have all the necessary timestamps so I could build a very simple one. >>>>>>> Here's a new code (I ran the code with minimal cfg for 'ft_preprocessing' to isolate the problem): >>>>>>> >>>>>>> cfg.dataset = 'signal_raw.mat'; >>>>>>> cfg.trialfun = 'ft_trialfun_test'; >>>>>>> cfg.trialdef.event = subj_globals.buttonpress_times; >>>>>>> >>>>>>> cfg = ft_definetrial(cfg); >>>>>>> >>>>>>> cfg.continuous = 'yes'; >>>>>>> buttonpress_hg = ft_preprocessing(cfg); >>>>>>> >>>>>>> And here's the error I got: >>>>>>> >>>>>>> Error using ft_read_header (line 2194) >>>>>>> unsupported header format "matlab" >>>>>>> >>>>>>> Error in ft_preprocessing (line 397) >>>>>>> hdr = ft_read_header(cfg.headerfile, 'headerformat', cfg.headerformat, 'coordsys', cfg.coordsys, 'coilaccuracy', >>>>>>> cfg.coilaccuracy); >>>>>>> >>>>>>> Error in test_trialdef (line 18) >>>>>>> buttonpress_hg = ft_preprocessing(cfg); >>>>>>> >>>>>>> So both error come from 'ft_read_header'. >>>>>>> I've been looking at the code but it seemed quite hard to debug as 'ft_read_header' uses a lower level function that directly reads from the file (hence it seemed like a simple fix like passing in a fake header wouldn't work). >>>>>>> Am I doing something wrong here? >>>>>>> >>>>>>> Again, thank you for your reply and let me know if you need more information. >>>>>>> >>>>>>> Best, >>>>>>> Rachel >>>>>>> >>>>>>>> On Thu, Jul 14, 2016 at 12:10 AM, Arjen Stolk wrote: >>>>>>>> Hi Rachel, >>>>>>>> >>>>>>>> What is the error you're receiving, and how are you calling ft_preprocessing? >>>>>>>> >>>>>>>> If the data is in raw format (incl a trial, time and label field), it should theoretically be possible to use ft_preprocessing on it, eg; >>>>>>>> cfg = [] >>>>>>>> cfg .. >>>>>>>> data = ft_preprocessing(cfg, raw) >>>>>>>> >>>>>>>> where raw is your data as described above. >>>>>>>> >>>>>>>> Best, >>>>>>>> Arjen >>>>>>>> >>>>>>>> > On Jul 13, 2016, at 11:50 PM, Nakyung Lee wrote: >>>>>>>> > >>>>>>>> > Dear FieldTrip community, >>>>>>>> > >>>>>>>> > My name is Rachel Lee and I'm a research assistant in Prof. Ming Hsu's lab in UC Berkeley. >>>>>>>> > >>>>>>>> > We currently have a .Tbk file, a .Tdx file, .tev file, .tsq file to preprocess and analyze but it seems like those data formats are not yet supported by FieldTrip. >>>>>>>> > So, instead of using those raw data files, we've been trying to find a workaround by transforming them into a .mat file (and casting the .mat file into a raw datatype in FieldTrip by manually assigning fields to it). >>>>>>>> > This hasn't been so successful; we've been unable to call ft_preprocessing because of the lack of a proper header format (which is needed in ft_read_header, one of the lower level functions that ft_preprocessing calls). >>>>>>>> > I've been looking at the codes but been unable to come up with a solution. >>>>>>>> > >>>>>>>> > Does anyone have a similar experience? >>>>>>>> > Is there any way to circumvent this issue? >>>>>>>> > Any type of help would be appreciated. >>>>>>>> > >>>>>>>> > Thank you, >>>>>>>> > Rachel Lee >>>>>>>> > _______________________________________________ >>>>>>>> > fieldtrip mailing list >>>>>>>> > fieldtrip at donders.ru.nl >>>>>>>> > https://mailman.science.ru.nl/mailman/listinfo/fieldtrip >>>>>>>> >>>>>>>> _______________________________________________ >>>>>>>> fieldtrip mailing list >>>>>>>> fieldtrip at donders.ru.nl >>>>>>>> https://mailman.science.ru.nl/mailman/listinfo/fieldtrip >>>>>>> >>>>>>> _______________________________________________ >>>>>>> fieldtrip mailing list >>>>>>> fieldtrip at donders.ru.nl >>>>>>> https://mailman.science.ru.nl/mailman/listinfo/fieldtrip >>>>>> >>>>>> >>>>>> _______________________________________________ >>>>>> fieldtrip mailing list >>>>>> fieldtrip at donders.ru.nl >>>>>> https://mailman.science.ru.nl/mailman/listinfo/fieldtrip >>>>> >>>>> >>>>> _______________________________________________ >>>>> fieldtrip mailing list >>>>> fieldtrip at donders.ru.nl >>>>> https://mailman.science.ru.nl/mailman/listinfo/fieldtrip >>>> >>>> >>>> _______________________________________________ >>>> fieldtrip mailing list >>>> fieldtrip at donders.ru.nl >>>> https://mailman.science.ru.nl/mailman/listinfo/fieldtrip >>> >>> >>> _______________________________________________ >>> fieldtrip mailing list >>> fieldtrip at donders.ru.nl >>> https://mailman.science.ru.nl/mailman/listinfo/fieldtrip >> >> >> _______________________________________________ >> fieldtrip mailing list >> fieldtrip at donders.ru.nl >> https://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > https://mailman.science.ru.nl/mailman/listinfo/fieldtrip -------------- next part -------------- An HTML attachment was scrubbed... URL: From icelandhouse at gmail.com Sun Jul 17 21:30:37 2016 From: icelandhouse at gmail.com (Maris Skujevskis) Date: Sun, 17 Jul 2016 21:30:37 +0200 Subject: [FieldTrip] warnings when running ft_sourceinterpolate Message-ID: Hi all, I get two warnings when running ft_sourceinterpolate after DICS beamformer based source reconstruction. The warnings and my question come after the pasted code section. The code that generates the input to ft_sourceinterpolate: %% Source analysis cfg = [ ]; cfg.method = 'dics'; cfg.frequency = 10; cfg.grid = leadfield_ft; (leadfield_ft.leadfield is a cell structure with non-empty cells containing matrices of size channel count x 3 ) cfg.keepleadfield = 'yes'; cfg.headmodel = vol; cfg.dics.keepfilter = 'yes'; cfg.dics.lambda = '5%'; cfg.dics.fixedori = 'yes'; cfg.dics.keepmom = 'no'; cfg.dics.realfilter = 'yes'; source_A = ft_sourceanalysis(cfg, trials_A); >>source_A = freq: 9.8462 dim: [18 21 18] inside: [6804x1 logical] leadfield: {1x6804 cell} pos: [6804x3 double] method: 'average' avg: [1x1 struct] cfg: [1x1 struct] %% Source interpolation cfg = [ ]; cfg.parameter = 'pow'; A_int = ft_sourceinterpolate(cfg, source_A, template_mri); WARNING 1 Warning: could not determine dimord of "filter" in the following data > In getdimord (line 541) In getdatfield (line 31) In ft_datatype_volume (line 133) In ft_checkdata (line 329) In ft_sourceinterpolate (line 160) freq: 9.8462 dim: [18 21 18] inside: [6804x1 logical] leadfield: {1x6804 cell} cfg: [1x1 struct] pow: [6804x1 double] filter: {6804x1 cell} transform: [4x4 double] WARNING 2 Warning: could not reshape freq to the expected dimensions > In ft_datatype_volume (line 138) In ft_checkdata (line 329) In ft_sourceinterpolate (line 160) I understand that cfg.dics.fixedori = 'yes' reduces the dimensions of the leadfield matrices from 3 x channel number, to 1 x channel number. Does it mean I can safely ignore the "could not determine dimord of "filter" in the following data" ? Or is there something wrong in the data structure that I need to manually fix? Warning 2 escapes me. There is a only single frequency, to what dimensions does it need to be reshaped? Can I safely ignore this one or again, some fixing is needed? Thanks a lot! Maris -------------- next part -------------- An HTML attachment was scrubbed... URL: From amickan1990 at gmail.com Mon Jul 18 14:22:48 2016 From: amickan1990 at gmail.com (Anne Mickan) Date: Mon, 18 Jul 2016 14:22:48 +0200 Subject: [FieldTrip] 3x2 ANOVA using permutation tests? Message-ID: Dear fieldtrip community, I've been using cluster-based permutation tests to analysis my EEG data in which I have 3 groups and 2 conditions each. Ultimately I want to know whether groups differ from each other with respect to differences in conditions. In a traditional analysis I would do an ANOVA on preselected time-windows, but I haven't been able to figure out how to properly do that within the permutation test. So far I simply did permutation tests for each of the groups separately. Then on the basis of these I choose windows for an ANOVA (and a regression analysis with some behavioral measures I acquired). Is that OK? Or is there a way to do the permutation tests for all groups together and add group as a between-subject factor (in addition to the within-subjects factor condition)? And would that be better / obligatory to do (instead of what I did so far). How do I need to change the cfg.design in order to do that? Thanks a lot in advance! Best, Anne -------------- next part -------------- An HTML attachment was scrubbed... URL: From tineke.snijders at donders.ru.nl Mon Jul 18 14:54:30 2016 From: tineke.snijders at donders.ru.nl (Snijders, T.M. (Tineke)) Date: Mon, 18 Jul 2016 12:54:30 +0000 Subject: [FieldTrip] 3x2 ANOVA using permutation tests? In-Reply-To: References: Message-ID: <815A9820E75FBC4F96B7CD3A8089D11C378ED8B3@exprd04.hosting.ru.nl> Hi Anne, To first do the analysis on separate groups, and then do an ANOVA on the resulting time-windows comparing the groups is double dipping. The simplest solution is to first do the cluster randomization test on all 3 groups together (i.e. treat them as 1 group), and compare the 2 conditions (so just a depsamplesT). Based on this you get a time-window & electrodes that show a difference between conditions. You then extract the subject means from this time-window&electrodes (meaning you get one value per subject per condition), and use these in an ANOVA to compare the different groups, and to look at the effect of the behavioral regressor. Alternatively, you can use the difference scores (condition 2- condition 1) as an input for the cluster randomization, with the three groups as between-subject factor (indepsamplesF). Best, Tineke ________________________________ From: fieldtrip-bounces at science.ru.nl [fieldtrip-bounces at science.ru.nl] on behalf of Anne Mickan [amickan1990 at gmail.com] Sent: Monday, July 18, 2016 2:22 PM To: fieldtrip at science.ru.nl Subject: [FieldTrip] 3x2 ANOVA using permutation tests? Dear fieldtrip community, I've been using cluster-based permutation tests to analysis my EEG data in which I have 3 groups and 2 conditions each. Ultimately I want to know whether groups differ from each other with respect to differences in conditions. In a traditional analysis I would do an ANOVA on preselected time-windows, but I haven't been able to figure out how to properly do that within the permutation test. So far I simply did permutation tests for each of the groups separately. Then on the basis of these I choose windows for an ANOVA (and a regression analysis with some behavioral measures I acquired). Is that OK? Or is there a way to do the permutation tests for all groups together and add group as a between-subject factor (in addition to the within-subjects factor condition)? And would that be better / obligatory to do (instead of what I did so far). How do I need to change the cfg.design in order to do that? Thanks a lot in advance! Best, Anne -------------- next part -------------- An HTML attachment was scrubbed... URL: From joseluisblues at gmail.com Mon Jul 18 18:07:31 2016 From: joseluisblues at gmail.com (Jose) Date: Mon, 18 Jul 2016 18:07:31 +0200 Subject: [FieldTrip] cluster-based permutation test - baseline correction Message-ID: dear community, I'm performing analysis of CTF MEG data. I have two conditions of interest: A and B, and I have performed spectral decomposition with the wavelet method to obtain the power (frequencies from 1 to 50 Hz). I would like to perform a cluster-based permutation test to assess if there are significant power differences between my two conditions of interest between the onset of my stimulus and 1 sec after, While I understand the principles of cluster-based permutation test, with their distinct versions: between trials, within trials and within subjects, what I am interested in is to test differences between my two conditions in their baseline-corrected versions. Since I haven't seen this procedure in the tutorial, but it seems logic to me, I would like to verify the way to proceed is do baseline correction (for each condition and subject) and then run my cluster-permutation test. Is there anything else I should consider? Also, since I haven't used 'demean' during my trial definition (I was advised not to do this), I was wondering if this could impact my baseline correction, and subsequent statistical analysis. I've seen some messages in the forum referring to this procedure, Thanks in advance, Jose -------------- next part -------------- An HTML attachment was scrubbed... URL: From r.thomas at nin.knaw.nl Tue Jul 19 08:10:24 2016 From: r.thomas at nin.knaw.nl (Rajat Thomas) Date: Tue, 19 Jul 2016 06:10:24 +0000 Subject: [FieldTrip] Sourcestatistics on surfaces Message-ID: <1468908624743.12047@nin.knaw.nl> Hi Fieldtrippers, I have been working on source statistics after source analysis on surfaces using MNE. I used the following configuration; % run statistics over subjects % cfg=[]; cfg.latency = [0 0.7]; %s cfg.avgovertime = 'no'; cfg.method = 'montecarlo'; cfg.statistic = 'ft_statfun_depsamplesT'; cfg.parameter = 'pow'; cfg.correctm = 'cluster'; cfg.numrandomization = 100; cfg.alpha = 0.05; % note that this only implies single-sided testing cfg.tail = 0; cfg.tri = sourcespace.tri; nsubj=numel(all_source_intact); cfg.design(1,:) = [1:nsubj 1:nsubj]; cfg.design(2,:) = [ones(1,nsubj) ones(1,nsubj)*2]; cfg.uvar = 1; % row of design matrix that contains unit variable (in this case: subjects) cfg.ivar = 2; % row of design matrix that contains independent variable (the conditions) stat = ft_sourcestatistics(cfg, all_source_condA{:}, all_source_condB{:}); save('stat_cluster.mat', 'stat'); %---- I wanted to know if there are other options typically set when I do sourcestatistics on surfaces. Any guide would be helpful. Thank you. Rajat Rajat Mani Thomas Social Brain Lab Netherlands Institute for Neuroscience Amsterdam -------------- next part -------------- An HTML attachment was scrubbed... URL: From J.Herring at donders.ru.nl Tue Jul 19 09:28:58 2016 From: J.Herring at donders.ru.nl (Herring, J.D. (Jim)) Date: Tue, 19 Jul 2016 07:28:58 +0000 Subject: [FieldTrip] cluster-based permutation test - baseline correction In-Reply-To: References: Message-ID: <6F9804CE79B042468FDC7E8C86CF4CBC49EB592A@exprd04.hosting.ru.nl> Dear Jose, If you assume there to be (perhaps trivial) differences in the baselines of conditions A and B, but you are interested in the difference in change from baseline then doing a baseline correction is indeed what you want to do. If you do not assume a difference at baseline it is in principle not necessary to correct for it (It might even hurt: http://datacolada.org/39) . With regards to ‘demeaning’ (and detrending), have a look at these two pages: http://www.fieldtriptoolbox.org/faq/why_does_my_tfr_look_strange http://www.fieldtriptoolbox.org/faq/why_does_my_tfr_look_strange_part_ii It might be beneficial to demean and detrend before doing your frequency analysis. Best, Jim From: fieldtrip-bounces at science.ru.nl [mailto:fieldtrip-bounces at science.ru.nl] On Behalf Of Jose Sent: Monday, July 18, 2016 6:08 PM To: fieldtrip at science.ru.nl Subject: [FieldTrip] cluster-based permutation test - baseline correction dear community, I'm performing analysis of CTF MEG data. I have two conditions of interest: A and B, and I have performed spectral decomposition with the wavelet method to obtain the power (frequencies from 1 to 50 Hz). I would like to perform a cluster-based permutation test to assess if there are significant power differences between my two conditions of interest between the onset of my stimulus and 1 sec after, While I understand the principles of cluster-based permutation test, with their distinct versions: between trials, within trials and within subjects, what I am interested in is to test differences between my two conditions in their baseline-corrected versions. Since I haven't seen this procedure in the tutorial, but it seems logic to me, I would like to verify the way to proceed is do baseline correction (for each condition and subject) and then run my cluster-permutation test. Is there anything else I should consider? Also, since I haven't used 'demean' during my trial definition (I was advised not to do this), I was wondering if this could impact my baseline correction, and subsequent statistical analysis. I've seen some messages in the forum referring to this procedure, Thanks in advance, Jose -------------- next part -------------- An HTML attachment was scrubbed... URL: From constantino.mendezbertolo at ctb.upm.es Tue Jul 19 02:45:04 2016 From: constantino.mendezbertolo at ctb.upm.es (=?UTF-8?Q?Constantino_M=C3=A9ndez_B=C3=A9rtolo?=) Date: Tue, 19 Jul 2016 02:45:04 +0200 Subject: [FieldTrip] QuickCap64 layout and PO8 Message-ID: Dears, Sorry if this is silly question or I am doing something wrong. I have been handled EEG data recorded with a QuickCap64 electrode "helmet". I had planned to apply QuickCap64.lay present at /fieldtrip/templates/layouts since ~2012. When I use "cfg = []; cfg.layout = 'QuickCap64.lay'; ft_layoutplot(cfg)" I get the following picture (attached) Seemingly there is no PO8 electrode. If I explore the structure lay inside "quickcap64.lay" I see there IS PO8 though. I am also able to mulitplotER my data and everybody is there, including PO8 I am using 20160607 version and this is the same with some 2014 version. So the question is: *anyone thinks this will poss a problem further on the analysis?* I think it may be only an "error" (or not that much) with the visualization Any ideas what I am doing wrong, or not seeing? (besides PO8 :) Cheers, T ​ -- Constantino Méndez-Bértolo Laboratorio de Neurociencia Clínica, Centro de Tecnología Biomédica (CTB) Parque Científico y Tecnológico de la UPM, Campus de Montegancedo 28223 Pozuelo de Alarcón, Madrid, SPAIN -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: QuickCap64_pic.bmp Type: image/bmp Size: 2102754 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: QuickCap64_pic.bmp Type: image/bmp Size: 2102754 bytes Desc: not available URL: From stephen.politzer-ahles at ling-phil.ox.ac.uk Tue Jul 19 11:16:06 2016 From: stephen.politzer-ahles at ling-phil.ox.ac.uk (Stephen Politzer-Ahles) Date: Tue, 19 Jul 2016 10:16:06 +0100 Subject: [FieldTrip] 3x2 ANOVA using permutation tests? Message-ID: Hi Anne, I agree with Tineke. The best thing, I think, would be to calculate the difference waves for each individual (essentially turning it into a 1-condition design with 3 groups) and then use indepsamplesT to compare the three groups; this is conceptually the same as testing the group*condition interaction; see http://www.fieldtriptoolbox.org/faq/how_can_i_test_an_interaction_effect_using_cluster-based_permutation_tests. I guess you could also test the main effect of group (by using the two conditions' data and treating all subjects together as if they're one group, to compare the two conditions across all subjects) or the main effect of group (by getting the average, rather than the difference, of the two conditions for each subject, and then comparing that across the three groups), but I guess based on your design that the group*condition interaction is probably the thing of primary interest. best, Steve --- Stephen Politzer-Ahles University of Oxford Language and Brain Lab Faculty of Linguistics, Phonetics & Philology http://users.ox.ac.uk/~cpgl0080/ > Message: 2 > Date: Mon, 18 Jul 2016 12:54:30 +0000 > From: "Snijders, T.M. (Tineke)" > To: FieldTrip discussion list > Subject: Re: [FieldTrip] 3x2 ANOVA using permutation tests? > Message-ID: > <815A9820E75FBC4F96B7CD3A8089D11C378ED8B3 at exprd04.hosting.ru.nl> > Content-Type: text/plain; charset="iso-8859-1" > > Hi Anne, > > To first do the analysis on separate groups, and then do an ANOVA on the > resulting time-windows comparing the groups is double dipping. > > The simplest solution is to first do the cluster randomization test on all > 3 groups together (i.e. treat them as 1 group), and compare the 2 > conditions (so just a depsamplesT). > Based on this you get a time-window & electrodes that show a difference > between conditions. > You then extract the subject means from this time-window&electrodes > (meaning you get one value per subject per condition), and use these in an > ANOVA to compare the different groups, and to look at the effect of the > behavioral regressor. > > Alternatively, you can use the difference scores (condition 2- condition > 1) as an input for the cluster randomization, with the three groups as > between-subject factor (indepsamplesF). > > Best, > > Tineke > > > > ________________________________ > From: fieldtrip-bounces at science.ru.nl [fieldtrip-bounces at science.ru.nl] > on behalf of Anne Mickan [amickan1990 at gmail.com] > Sent: Monday, July 18, 2016 2:22 PM > To: fieldtrip at science.ru.nl > Subject: [FieldTrip] 3x2 ANOVA using permutation tests? > > Dear fieldtrip community, > > I've been using cluster-based permutation tests to analysis my EEG data in > which I have 3 groups and 2 conditions each. Ultimately I want to know > whether groups differ from each other with respect to differences in > conditions. In a traditional analysis I would do an ANOVA on preselected > time-windows, but I haven't been able to figure out how to properly do that > within the permutation test. > > So far I simply did permutation tests for each of the groups separately. > Then on the basis of these I choose windows for an ANOVA (and a regression > analysis with some behavioral measures I acquired). Is that OK? Or is there > a way to do the permutation tests for all groups together and add group as > a between-subject factor (in addition to the within-subjects factor > condition)? And would that be better / obligatory to do (instead of what I > did so far). > > How do I need to change the cfg.design in order to do that? > > Thanks a lot in advance! > > Best, > Anne > -------------- next part -------------- > An HTML attachment was scrubbed... > URL: < > http://mailman.science.ru.nl/pipermail/fieldtrip/attachments/20160718/7f208e09/attachment-0001.html > > > > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From gauthierb.ens at gmail.com Wed Jul 20 11:49:50 2016 From: gauthierb.ens at gmail.com (Baptiste Gauthier) Date: Wed, 20 Jul 2016 11:49:50 +0200 Subject: [FieldTrip] Regression test and t-test providing almost identical results Message-ID: Dear Fieldtrippers, I recently observed a strange behavior with the results provided with the regression statistics provided by “ft_statfun_depsamplesregrT”: I did a regression test on 3 conditions: cond1, cond2 and cond3: Here are the results: [image: Images intégrées 1] *Output for group-level regression test:* the call to "ft_timelockgrandaverage" took 36 seconds and required the additional allocation of an estimated 0 MB reading layout from file /neurospin/meg/meg_tmp/MTT_MEG_Baptiste/From_laptop/fieldtrip-20130901/template/layout/NM306mag.lay the call to "ft_prepare_layout" took 0 seconds and required the additional allocation of an estimated 0 MB the call to "ft_selectdata" took 0 seconds and required the additional allocation of an estimated 0 MB using "ft_statistics_montecarlo" for the statistical testing using "ft_statfun_depsamplesregrT" for the single-sample statistics constructing randomized design total number of measurements = 57 total number of variables = 2 number of independent variables = 1 number of unit variables = 1 number of within-cell variables = 0 number of control variables = 0 using a permutation resampling approach repeated measurement in variable 1 over 19 levels number of repeated measurements in each level is 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 computing a parametric threshold for clustering computing statistic estimated time per randomization is 0.26 seconds computing statistic 1000 from 1000 Warning: adding /neurospin/meg/meg_tmp/MTT_MEG_Baptiste/fieldtrip-20160719/external/spm8 toolbox to your MATLAB path found 13 positive clusters in observed data found 9 negative clusters in observed data computing clusters in randomization computing clusters in randomization 1000 from 1000 using a cluster-based method for multiple comparison correction the returned probabilities and the thresholded mask are corrected for multiple comparisons the call to "ft_timelockstatistics" took 55 seconds and required the additional allocation of an estimated 12 MB Afterwards, for some other reasons I performed directly a T-test between condition 1 and condition 3. Here is the result: [image: Images intégrées 2] *Output for group-level T-test:* the call to "ft_timelockgrandaverage" took 36 seconds and required the additional allocation of an estimated 0 MB reading layout from file /neurospin/meg/meg_tmp/MTT_MEG_Baptiste/From_laptop/fieldtrip-20130901/template/layout/NM306mag.lay the call to "ft_prepare_layout" took 0 seconds and required the additional allocation of an estimated 0 MB the call to "ft_selectdata" took 0 seconds and required the additional allocation of an estimated 0 MB using "ft_statistics_montecarlo" for the statistical testing using "ft_statfun_depsamplesT" for the single-sample statistics constructing randomized design total number of measurements = 38 total number of variables = 2 number of independent variables = 1 number of unit variables = 1 number of within-cell variables = 0 number of control variables = 0 using a permutation resampling approach repeated measurement in variable 1 over 19 levels number of repeated measurements in each level is 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 computing a parametric threshold for clustering computing statistic estimated time per randomization is 0.04 seconds computing statistic 1000 from 1000 found 9 positive clusters in observed data found 13 negative clusters in observed data computing clusters in randomization computing clusters in randomization 1000 from 1000 using a cluster-based method for multiple comparison correction the returned probabilities and the thresholded mask are corrected for multiple comparisons the call to "ft_timelockstatistics" took 46 seconds and required the additional allocation of an estimated 0 MB I checked that I actually provided the good data and parameters to the function, but I am puzzled by the resemblance (if you invert the sign) of the results. To doublecheck, I directly compared the stat.stat field from the two tests. Here are the results: [image: Images intégrées 3] So basically, it is the same if you round to the 3rd digits after the floating point. It sounds really weird to me. Has someone ever noticed something similar when performing regression tests? I there any simple mathematical tricks that could explain that? Best regards, Baptiste Gauthier, PhD -- Baptiste Gauthier Postdoctoral Research Fellow INSERM-CEA Cognitive Neuroimaging unit CEA/SAC/DSV/DRM/Neurospin center Bât 145, Point Courier 156 F-91191 Gif-sur-Yvette Cedex FRANCE -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image.png Type: image/png Size: 102935 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image.png Type: image/png Size: 87834 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image.png Type: image/png Size: 30501 bytes Desc: not available URL: From jan at brogger.no Wed Jul 20 12:25:17 2016 From: jan at brogger.no (jan at brogger.no) Date: Wed, 20 Jul 2016 12:25:17 +0200 Subject: [FieldTrip] Regression test and t-test providing almost identical results Message-ID: <3047B000-8594-4A7B-B58F-A6541108D763@brogger.no> That is because a t- test and a regression test are the same. See this link: http://stats.stackexchange.com/questions/59047/how-are-regression-the-t-test-and-the-anova-all-versions-of-the-general-linear Yours, Jan Brogger From tineke.snijders at donders.ru.nl Wed Jul 20 13:16:41 2016 From: tineke.snijders at donders.ru.nl (Snijders, T.M. (Tineke)) Date: Wed, 20 Jul 2016 11:16:41 +0000 Subject: [FieldTrip] Regression test and t-test providing almost identical results Message-ID: <815A9820E75FBC4F96B7CD3A8089D11C49E75C7E@exprd04.hosting.ru.nl> Hi Baptiste, Indeed, as Jan points out, t-test and regression are all GLM. You wonder what happened to the condition (cond 2) that you didn't use in the t-test: In a regression with 3 conditions, the GLM 'contrasts' would be [-1 0 1] and [1 0 -1], so the 2nd condition is coded as ''0", meaning that without the 2nd condition the regression would also give exactly the same results... Best, Tineke ________________________________________ From: fieldtrip-bounces at science.ru.nl [fieldtrip-bounces at science.ru.nl] on behalf of jan at brogger.no [jan at brogger.no] Sent: Wednesday, July 20, 2016 12:25 PM To: fieldtrip at science.ru.nl Subject: Re: [FieldTrip] Regression test and t-test providing almost identical results That is because a t- test and a regression test are the same. See this link: http://stats.stackexchange.com/questions/59047/how-are-regression-the-t-test-and-the-anova-all-versions-of-the-general-linear Yours, Jan Brogger _______________________________________________ fieldtrip mailing list ________________________________ From: fieldtrip-bounces at science.ru.nl [fieldtrip-bounces at science.ru.nl] on behalf of Baptiste Gauthier [gauthierb.ens at gmail.com] Sent: Wednesday, July 20, 2016 11:49 AM To: fieldtrip at science.ru.nl Subject: [FieldTrip] Regression test and t-test providing almost identical results Dear Fieldtrippers, I recently observed a strange behavior with the results provided with the regression statistics provided by “ft_statfun_depsamplesregrT”: I did a regression test on 3 conditions: cond1, cond2 and cond3: Here are the results: [Images intégrées 1] Output for group-level regression test: the call to "ft_timelockgrandaverage" took 36 seconds and required the additional allocation of an estimated 0 MB reading layout from file /neurospin/meg/meg_tmp/MTT_MEG_Baptiste/From_laptop/fieldtrip-20130901/template/layout/NM306mag.lay the call to "ft_prepare_layout" took 0 seconds and required the additional allocation of an estimated 0 MB the call to "ft_selectdata" took 0 seconds and required the additional allocation of an estimated 0 MB using "ft_statistics_montecarlo" for the statistical testing using "ft_statfun_depsamplesregrT" for the single-sample statistics constructing randomized design total number of measurements = 57 total number of variables = 2 number of independent variables = 1 number of unit variables = 1 number of within-cell variables = 0 number of control variables = 0 using a permutation resampling approach repeated measurement in variable 1 over 19 levels number of repeated measurements in each level is 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 computing a parametric threshold for clustering computing statistic estimated time per randomization is 0.26 seconds computing statistic 1000 from 1000 Warning: adding /neurospin/meg/meg_tmp/MTT_MEG_Baptiste/fieldtrip-20160719/external/spm8 toolbox to your MATLAB path found 13 positive clusters in observed data found 9 negative clusters in observed data computing clusters in randomization computing clusters in randomization 1000 from 1000 using a cluster-based method for multiple comparison correction the returned probabilities and the thresholded mask are corrected for multiple comparisons the call to "ft_timelockstatistics" took 55 seconds and required the additional allocation of an estimated 12 MB Afterwards, for some other reasons I performed directly a T-test between condition 1 and condition 3. Here is the result: [Images intégrées 2] Output for group-level T-test: the call to "ft_timelockgrandaverage" took 36 seconds and required the additional allocation of an estimated 0 MB reading layout from file /neurospin/meg/meg_tmp/MTT_MEG_Baptiste/From_laptop/fieldtrip-20130901/template/layout/NM306mag.lay the call to "ft_prepare_layout" took 0 seconds and required the additional allocation of an estimated 0 MB the call to "ft_selectdata" took 0 seconds and required the additional allocation of an estimated 0 MB using "ft_statistics_montecarlo" for the statistical testing using "ft_statfun_depsamplesT" for the single-sample statistics constructing randomized design total number of measurements = 38 total number of variables = 2 number of independent variables = 1 number of unit variables = 1 number of within-cell variables = 0 number of control variables = 0 using a permutation resampling approach repeated measurement in variable 1 over 19 levels number of repeated measurements in each level is 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 computing a parametric threshold for clustering computing statistic estimated time per randomization is 0.04 seconds computing statistic 1000 from 1000 found 9 positive clusters in observed data found 13 negative clusters in observed data computing clusters in randomization computing clusters in randomization 1000 from 1000 using a cluster-based method for multiple comparison correction the returned probabilities and the thresholded mask are corrected for multiple comparisons the call to "ft_timelockstatistics" took 46 seconds and required the additional allocation of an estimated 0 MB I checked that I actually provided the good data and parameters to the function, but I am puzzled by the resemblance (if you invert the sign) of the results. To doublecheck, I directly compared the stat.stat field from the two tests. Here are the results: [Images intégrées 3] So basically, it is the same if you round to the 3rd digits after the floating point. It sounds really weird to me. Has someone ever noticed something similar when performing regression tests? I there any simple mathematical tricks that could explain that? Best regards, Baptiste Gauthier, PhD -- Baptiste Gauthier Postdoctoral Research Fellow INSERM-CEA Cognitive Neuroimaging unit CEA/SAC/DSV/DRM/Neurospin center Bât 145, Point Courier 156 F-91191 Gif-sur-Yvette Cedex FRANCE -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image.png Type: image/png Size: 102935 bytes Desc: image.png URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image.png Type: image/png Size: 87834 bytes Desc: image.png URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image.png Type: image/png Size: 30501 bytes Desc: image.png URL: From e.maris at donders.ru.nl Wed Jul 20 13:25:29 2016 From: e.maris at donders.ru.nl (Maris, E.G.G. (Eric)) Date: Wed, 20 Jul 2016 11:25:29 +0000 Subject: [FieldTrip] fieldtrip Digest, Vol 68, Issue 18 In-Reply-To: References: Message-ID: Hi Baptiste & Tineke, Hi Baptiste, Indeed, as Jan points out, t-test and regression are all GLM. You wonder what happened to the condition (cond 2) that you didn't use in the t-test: In a regression with 3 conditions, the GLM 'contrasts' would be [-1 0 1] and [1 0 -1], so the 2nd condition is coded as ''0", meaning that without the 2nd condition the regression would also give exactly the same results... Best, Tineke Is there a typo here, Tineke? The two contrast that you list are actually one and the same. There are multiple ways to specify the contrasts, and this is one way: [-1 1 0] and [0 -1 1]. Baptiste, what is your independent variable? This should be a quantitative variable (e.g., memory load) that varies over the three within-subjects conditions. Could you show your cfg.design? This would allow others to help you better. Btw, I may not reply to next post. I’m about to leave for vacation. best, Eric Maris ________________________________________ From: fieldtrip-bounces at science.ru.nl [fieldtrip-bounces at science.ru.nl] on behalf of jan at brogger.no [jan at brogger.no] Sent: Wednesday, July 20, 2016 12:25 PM To: fieldtrip at science.ru.nl Subject: Re: [FieldTrip] Regression test and t-test providing almost identical results That is because a t- test and a regression test are the same. See this link: http://stats.stackexchange.com/questions/59047/how-are-regression-the-t-test-and-the-anova-all-versions-of-the-general-linear Yours, Jan Brogger _______________________________________________ fieldtrip mailing list ________________________________ From: fieldtrip-bounces at science.ru.nl [fieldtrip-bounces at science.ru.nl] on behalf of Baptiste Gauthier [gauthierb.ens at gmail.com] Sent: Wednesday, July 20, 2016 11:49 AM To: fieldtrip at science.ru.nl Subject: [FieldTrip] Regression test and t-test providing almost identical results Dear Fieldtrippers, I recently observed a strange behavior with the results provided with the regression statistics provided by “ft_statfun_depsamplesregrT”: I did a regression test on 3 conditions: cond1, cond2 and cond3: Here are the results: Output for group-level regression test: the call to "ft_timelockgrandaverage" took 36 seconds and required the additional allocation of an estimated 0 MB reading layout from file /neurospin/meg/meg_tmp/MTT_MEG_Baptiste/From_laptop/fieldtrip-20130901/template/layout/NM306mag.lay the call to "ft_prepare_layout" took 0 seconds and required the additional allocation of an estimated 0 MB the call to "ft_selectdata" took 0 seconds and required the additional allocation of an estimated 0 MB using "ft_statistics_montecarlo" for the statistical testing using "ft_statfun_depsamplesregrT" for the single-sample statistics constructing randomized design total number of measurements = 57 total number of variables = 2 number of independent variables = 1 number of unit variables = 1 number of within-cell variables = 0 number of control variables = 0 using a permutation resampling approach repeated measurement in variable 1 over 19 levels number of repeated measurements in each level is 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 computing a parametric threshold for clustering computing statistic estimated time per randomization is 0.26 seconds computing statistic 1000 from 1000 Warning: adding /neurospin/meg/meg_tmp/MTT_MEG_Baptiste/fieldtrip-20160719/external/spm8 toolbox to your MATLAB path found 13 positive clusters in observed data found 9 negative clusters in observed data computing clusters in randomization computing clusters in randomization 1000 from 1000 using a cluster-based method for multiple comparison correction the returned probabilities and the thresholded mask are corrected for multiple comparisons the call to "ft_timelockstatistics" took 55 seconds and required the additional allocation of an estimated 12 MB Afterwards, for some other reasons I performed directly a T-test between condition 1 and condition 3. Here is the result: Output for group-level T-test: the call to "ft_timelockgrandaverage" took 36 seconds and required the additional allocation of an estimated 0 MB reading layout from file /neurospin/meg/meg_tmp/MTT_MEG_Baptiste/From_laptop/fieldtrip-20130901/template/layout/NM306mag.lay the call to "ft_prepare_layout" took 0 seconds and required the additional allocation of an estimated 0 MB the call to "ft_selectdata" took 0 seconds and required the additional allocation of an estimated 0 MB using "ft_statistics_montecarlo" for the statistical testing using "ft_statfun_depsamplesT" for the single-sample statistics constructing randomized design total number of measurements = 38 total number of variables = 2 number of independent variables = 1 number of unit variables = 1 number of within-cell variables = 0 number of control variables = 0 using a permutation resampling approach repeated measurement in variable 1 over 19 levels number of repeated measurements in each level is 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 computing a parametric threshold for clustering computing statistic estimated time per randomization is 0.04 seconds computing statistic 1000 from 1000 found 9 positive clusters in observed data found 13 negative clusters in observed data computing clusters in randomization computing clusters in randomization 1000 from 1000 using a cluster-based method for multiple comparison correction the returned probabilities and the thresholded mask are corrected for multiple comparisons the call to "ft_timelockstatistics" took 46 seconds and required the additional allocation of an estimated 0 MB I checked that I actually provided the good data and parameters to the function, but I am puzzled by the resemblance (if you invert the sign) of the results. To doublecheck, I directly compared the stat.stat field from the two tests. Here are the results: So basically, it is the same if you round to the 3rd digits after the floating point. It sounds really weird to me. Has someone ever noticed something similar when performing regression tests? I there any simple mathematical tricks that could explain that? Best regards, Baptiste Gauthier, PhD -- Baptiste Gauthier Postdoctoral Research Fellow INSERM-CEA Cognitive Neuroimaging unit CEA/SAC/DSV/DRM/Neurospin center Bât 145, Point Courier 156 F-91191 Gif-sur-Yvette Cedex FRANCE _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl https://mailman.science.ru.nl/mailman/listinfo/fieldtrip -------------- next part -------------- An HTML attachment was scrubbed... URL: From ruil3 at student.unimelb.edu.au Wed Jul 20 14:12:31 2016 From: ruil3 at student.unimelb.edu.au (Rui Li) Date: Wed, 20 Jul 2016 22:12:31 +1000 Subject: [FieldTrip] Kurtosis topography at sensor level Message-ID: Dear FieldTrip users, Recently, I am working on the case 1 dataset of epilepsy tutorial. The first patient got the MEG recording from Neuromag and CTF, respectively. I encountered some problems when I tried to depict the Kurtosis topography at channel - level. *Question 1:* why and how does the filter affect the kurtosis? Figure 1 and Figure 2 are kurtosis topographies at channel level without band pass filter and with band pass filter, respectively. As we can see, these two figures are very different. Therefore, I am wondering why and how does the frequency filter affect the kurtosis? The figure 1 is generated by the following program; %% preporcessing the channel level data dataset = 'case1.ds'; cfg = []; cfg.dataset = dataset; % cfg.hpfilter = 'yes'; % cfg.hpfreq = 10; % cfg.lpfilter = 'yes'; % cfg.lpfreq = 70; cfg.channel = {'MEG'}; data = ft_preprocessing(cfg); %% compute channel-level kurtosis datak = []; datak.label = data.label; datak.dimord = 'chan'; datak.kurtosis = kurtosis(data.trial{1}')'; cfg = []; cfg.comment = 'computed channel-level kurtosis'; datak = ft_annotate(cfg, datak); %% plot kurtosis topography at channel-level cfg = []; cfg.layout = 'CTF275.lay'; cfg.parameter = 'kurtosis'; figure; ft_topoplotER(cfg, datak); ​ Figure 1 kurtosis topography + no filter + case1.ds If the band pass filter is included in the pre-processing, the kurtosis topography is figure 2; the pre-processing matlab program is %% preporcessing the channel level data dataset = 'case1.ds'; cfg = []; cfg.dataset = dataset; cfg.hpfilter = 'yes'; cfg.hpfreq = 10; cfg.lpfilter = 'yes'; cfg.lpfreq = 70; cfg.channel = {'MEG'}; data = ft_preprocessing(cfg); Figure 2 kurtosis topography + [10Hz 70Hz] filter + case1.ds *Question 2:* Why the kurtosis topographies at channel level from two dataset case1.ds (figure 1 (no filter), figure 2 (filtered)) and case1_cHPI_raw_trans_sss.fif (figure 3 (no filter) and figure 4 (filtered)) are not consistent? Because these two datasets are measured from the same patient, the kurtosis topography should be consistent. Do you have any idea about this? ​ Figure 3 kurtosis topography + no filter + case1_cHPI_raw_trans_sss.fif ​ Figure 4 kurtosis topography + [10Hz 70Hz] filter + case1_cHPI_raw_trans_sss.fif Regards, Rui. -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: 2.png Type: image/png Size: 40708 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: 1.png Type: image/png Size: 52589 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: 3.png Type: image/png Size: 72472 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: 4.png Type: image/png Size: 23855 bytes Desc: not available URL: From gauthierb.ens at gmail.com Wed Jul 20 15:19:40 2016 From: gauthierb.ens at gmail.com (Baptiste Gauthier) Date: Wed, 20 Jul 2016 15:19:40 +0200 Subject: [FieldTrip] Regression test and t-test providing almost identical results In-Reply-To: <815A9820E75FBC4F96B7CD3A8089D11C49E75C7E@exprd04.hosting.ru.nl> References: <815A9820E75FBC4F96B7CD3A8089D11C49E75C7E@exprd04.hosting.ru.nl> Message-ID: Thank you for your quick answers! This is very clear now. i'm familiar with GLM as I use it in fMRI but I did not thought my question in term of contrast. So, to test for a linear ordering between cond3,cond2 and cond1, would it be reasonable to compute a regression beta for each subject and then compare it to zero with a group t-test? (as it would use the data of condition 2). thanks again and best regards 2016-07-20 13:16 GMT+02:00 Snijders, T.M. (Tineke) < tineke.snijders at donders.ru.nl>: > Hi Baptiste, > > Indeed, as Jan points out, t-test and regression are all GLM. > You wonder what happened to the condition (cond 2) that you didn't use in > the t-test: > In a regression with 3 conditions, the GLM 'contrasts' would be [-1 0 1] > and [1 0 -1], so the 2nd condition is coded as ''0", meaning that without > the 2nd condition the regression would also give exactly the same results... > > Best, > Tineke > > ________________________________________ > From: fieldtrip-bounces at science.ru.nl [fieldtrip-bounces at science.ru.nl] > on behalf of jan at brogger.no [jan at brogger.no] > Sent: Wednesday, July 20, 2016 12:25 PM > To: fieldtrip at science.ru.nl > Subject: Re: [FieldTrip] Regression test and t-test providing almost > identical results > > That is because a t- test and a regression test are the same. See this > link: > http://stats.stackexchange.com/questions/59047/how-are-regression-the-t-test-and-the-anova-all-versions-of-the-general-linear > > Yours, > > Jan Brogger > > _______________________________________________ > fieldtrip mailing list > > > ------------------------------ > *From:* fieldtrip-bounces at science.ru.nl [fieldtrip-bounces at science.ru.nl] > on behalf of Baptiste Gauthier [gauthierb.ens at gmail.com] > *Sent:* Wednesday, July 20, 2016 11:49 AM > *To:* fieldtrip at science.ru.nl > *Subject:* [FieldTrip] Regression test and t-test providing almost > identical results > > Dear Fieldtrippers, > > I recently observed a strange behavior with the results provided with the > regression statistics provided by “ft_statfun_depsamplesregrT”: > > I did a regression test on 3 conditions: cond1, cond2 and cond3: > > Here are the results: > > > [image: Images intégrées 1] > > > > *Output for group-level regression test:* > > the call to "ft_timelockgrandaverage" took 36 seconds and required the > additional allocation of an estimated 0 MB > reading layout from file > /neurospin/meg/meg_tmp/MTT_MEG_Baptiste/From_laptop/fieldtrip-20130901/template/layout/NM306mag.lay > the call to "ft_prepare_layout" took 0 seconds and required the additional > allocation of an estimated 0 MB > the call to "ft_selectdata" took 0 seconds and required the additional > allocation of an estimated 0 MB > using "ft_statistics_montecarlo" for the statistical testing > using "ft_statfun_depsamplesregrT" for the single-sample statistics > constructing randomized design > total number of measurements = 57 > total number of variables = 2 > number of independent variables = 1 > number of unit variables = 1 > number of within-cell variables = 0 > number of control variables = 0 > using a permutation resampling approach > repeated measurement in variable 1 over 19 levels > number of repeated measurements in each level is 3 3 3 3 3 3 3 3 3 3 3 3 3 > 3 3 3 3 3 3 > computing a parametric threshold for clustering > computing statistic > estimated time per randomization is 0.26 seconds > computing statistic 1000 from 1000 > > Warning: adding > /neurospin/meg/meg_tmp/MTT_MEG_Baptiste/fieldtrip-20160719/external/spm8 > toolbox to your MATLAB path > found 13 positive clusters in observed data > found 9 negative clusters in observed data > computing clusters in randomization > computing clusters in randomization 1000 from 1000 > > using a cluster-based method for multiple comparison correction > the returned probabilities and the thresholded mask are corrected for > multiple comparisons > the call to "ft_timelockstatistics" took 55 seconds and required the > additional allocation of an estimated 12 MB > > > > Afterwards, for some other reasons I performed directly a T-test between > condition 1 and condition 3. Here is the result: > > > [image: Images intégrées 2] > > > *Output for group-level T-test:* > > the call to "ft_timelockgrandaverage" took 36 seconds and required the > additional allocation of an estimated 0 MB > reading layout from file > /neurospin/meg/meg_tmp/MTT_MEG_Baptiste/From_laptop/fieldtrip-20130901/template/layout/NM306mag.lay > the call to "ft_prepare_layout" took 0 seconds and required the additional > allocation of an estimated 0 MB > the call to "ft_selectdata" took 0 seconds and required the additional > allocation of an estimated 0 MB > using "ft_statistics_montecarlo" for the statistical testing > using "ft_statfun_depsamplesT" for the single-sample statistics > constructing randomized design > total number of measurements = 38 > total number of variables = 2 > number of independent variables = 1 > number of unit variables = 1 > number of within-cell variables = 0 > number of control variables = 0 > using a permutation resampling approach > repeated measurement in variable 1 over 19 levels > number of repeated measurements in each level is 2 2 2 2 2 2 2 2 2 2 2 2 2 > 2 2 2 2 2 2 > computing a parametric threshold for clustering > computing statistic > estimated time per randomization is 0.04 seconds > computing statistic 1000 from 1000 > > found 9 positive clusters in observed data > found 13 negative clusters in observed data > computing clusters in randomization > computing clusters in randomization 1000 from 1000 > > using a cluster-based method for multiple comparison correction > the returned probabilities and the thresholded mask are corrected for > multiple comparisons > the call to "ft_timelockstatistics" took 46 seconds and required the > additional allocation of an estimated 0 MB > > > > I checked that I actually provided the good data and parameters to the > function, but I am puzzled by the resemblance (if you invert the sign) of > the results. To doublecheck, I directly compared the stat.stat field from > the two tests. Here are the results: > > > [image: Images intégrées 3] > > > So basically, it is the same if you round to the 3rd digits after the > floating point. It sounds really weird to me. > > Has someone ever noticed something similar when performing regression > tests? I there any simple mathematical tricks that could explain that? > > > Best regards, > > > > Baptiste Gauthier, PhD > > -- > Baptiste Gauthier > Postdoctoral Research Fellow > > INSERM-CEA Cognitive Neuroimaging unit > CEA/SAC/DSV/DRM/Neurospin center > Bât 145, Point Courier 156 > F-91191 Gif-sur-Yvette Cedex FRANCE > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > https://mailman.science.ru.nl/mailman/listinfo/fieldtrip > -- Baptiste Gauthier Postdoctoral Research Fellow INSERM-CEA Cognitive Neuroimaging unit CEA/SAC/DSV/DRM/Neurospin center Bât 145, Point Courier 156 F-91191 Gif-sur-Yvette Cedex FRANCE -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image.png Type: image/png Size: 102935 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image.png Type: image/png Size: 30501 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image.png Type: image/png Size: 87834 bytes Desc: not available URL: From roycox.roycox at gmail.com Thu Jul 21 04:08:34 2016 From: roycox.roycox at gmail.com (Roy Cox) Date: Wed, 20 Jul 2016 22:08:34 -0400 Subject: [FieldTrip] Fwd: postdoctoral position on sleep and memory In-Reply-To: References: Message-ID: hi all, See attachment for a postdoctoral position in the lab of Dara Manoach (Martinos Center for Biomedical Imaging and the Psychiatric Neuroimaging Division of the Psychiatry Department at Massachusetts General Hospital) on the role of sleep in memory consolidation in healthy and clinical populations. Please do NOT contact me for additional information, but contact the PI directly. Roy -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: SLEEP_Postdoc_2016.docx Type: application/vnd.openxmlformats-officedocument.wordprocessingml.document Size: 116578 bytes Desc: not available URL: From ruil3 at student.unimelb.edu.au Thu Jul 21 08:14:47 2016 From: ruil3 at student.unimelb.edu.au (Rui Li) Date: Thu, 21 Jul 2016 16:14:47 +1000 Subject: [FieldTrip] Kurtosis topography at channel level Message-ID: Dear FieldTrip users, Recently, I am working on the case 1 dataset of epilepsy tutorial. The first patient got the MEG recording from Neuromag and CTF, respectively. I encountered some problems when I tried to depict the Kurtosis topography at channel - level. *Question 1:* why and how does the filter affect the kurtosis? Figure 1 and Figure 2 are kurtosis topographies at channel level without band pass filter and with band pass filter, respectively. As we can see, these two figures are very different. Therefore, I am wondering why and how does the frequency filter affect the kurtosis? The figure 1 is generated by the following program; %% preporcessing the channel level data dataset = 'case1.ds'; cfg = []; cfg.dataset = dataset; % cfg.hpfilter = 'yes'; % cfg.hpfreq = 10; % cfg.lpfilter = 'yes'; % cfg.lpfreq = 70; cfg.channel = {'MEG'}; data = ft_preprocessing(cfg); %% compute channel-level kurtosis datak = []; datak.label = data.label; datak.dimord = 'chan'; datak.kurtosis = kurtosis(data.trial{1}')'; cfg = []; cfg.comment = 'computed channel-level kurtosis'; datak = ft_annotate(cfg, datak); %% plot kurtosis topography at channel-level cfg = []; cfg.layout = 'CTF275.lay'; cfg.parameter = 'kurtosis'; figure; ft_topoplotER(cfg, datak); ​ Figure 1 kurtosis topography + no filter + case1.ds If the band pass filter is included in the pre-processing, the kurtosis topography is figure 2; the pre-processing matlab program is %% preporcessing the channel level data dataset = 'case1.ds'; cfg = []; cfg.dataset = dataset; cfg.hpfilter = 'yes'; cfg.hpfreq = 10; cfg.lpfilter = 'yes'; cfg.lpfreq = 70; cfg.channel = {'MEG'}; data = ft_preprocessing(cfg); Figure 2 kurtosis topography + [10Hz 70Hz] filter + case1.ds *Question 2:* Why the kurtosis topographies at channel level from two dataset case1.ds (figure 1 (no filter), figure 2 (filtered)) and case1_cHPI_raw_trans_sss.fif (figure 3 (no filter) and figure 4 (filtered)) are not consistent? Because these two datasets are measured from the same patient, the kurtosis topography should be consistent. Do you have any idea about this? ​ Figure 3 kurtosis topography + no filter + case1_cHPI_raw_trans_sss.fif ​ Figure 4 kurtosis topography + [10Hz 70Hz] filter + case1_cHPI_raw_trans_sss.fif Regards, Rui. -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: 4.png Type: image/png Size: 23855 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: 1.png Type: image/png Size: 52589 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: 2.png Type: image/png Size: 40708 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: 3.png Type: image/png Size: 72472 bytes Desc: not available URL: From f.neugebauer at uni-muenster.de Thu Jul 21 10:48:36 2016 From: f.neugebauer at uni-muenster.de (Frank Neugebauer) Date: Thu, 21 Jul 2016 10:48:36 +0200 (CEST) Subject: [FieldTrip] Kurtosis topography at channel level In-Reply-To: Message-ID: Hi Rui, *Question 1:* why and how does the filter affect the kurtosis? As kurtosis is not linear, that is kurtosis(data+noise)=/=kurtosis(data)+kurtosis(noise), it is a little hard to say how exactly changing your data will change the output kurtosis. If you filter Gaussian noise the signal should form stronger outlier and thus the data should yield higher kurtosis. As far as I understand kurtosis, the frequency itself does not directly influence the kurtosis output. *Question 2:* Why the kurtosis topographies at channel level from two > dataset case1.ds (figure 1 (no filter), figure 2 (filtered)) and > case1_cHPI_raw_trans_sss.fif (figure 3 (no filter) and figure 4 (filtered)) > are not consistent? Because these two datasets are measured from the same > patient, the kurtosis topography should be consistent. Do you have any idea > about this? As far as I understand, epileptic activity is hard to measure because you don't know when it will occur and different measurements are not inconsistent, but just show different activity at a different time and circumstance (such as different sensor noise, interference, but also the patient's condition). In the introduction to the case they say, >> Corticography also showed interictal discharges in the frontal lobe, though seizures were of parietal origin. <<. Maybe this is the explanation? The kurtosis points to the frontal lobe, too. I hope this was a little helpful, best regards, Frank Rui Li wrote on 2016-07-21: > Dear FieldTrip users, > Recently, I am working on the case 1 dataset of epilepsy tutorial. The > first patient got the MEG recording from Neuromag and CTF, respectively. I > encountered some problems when I tried to depict the Kurtosis topography > at channel - level. > *Question 1:* why and how does the filter affect the kurtosis? > Figure 1 and Figure 2 are kurtosis topographies at channel level without > band pass filter and with band pass filter, respectively. As we can see, > these two figures are very different. Therefore, I am wondering why and how > does the frequency filter affect the kurtosis? > The figure 1 is generated by the following program; > %% preporcessing the channel level data > dataset = 'case1.ds'; > cfg = []; > cfg.dataset = dataset; > % cfg.hpfilter = 'yes'; > % cfg.hpfreq = 10; > % cfg.lpfilter = 'yes'; > % cfg.lpfreq = 70; > cfg.channel = {'MEG'}; > data = ft_preprocessing(cfg); > %% compute channel-level kurtosis > datak = []; > datak.label = data.label; > datak.dimord = 'chan'; > datak.kurtosis = kurtosis(data.trial{1}')'; > cfg = []; > cfg.comment = 'computed channel-level kurtosis'; > datak = ft_annotate(cfg, datak); > %% plot kurtosis topography at channel-level > cfg = []; > cfg.layout = 'CTF275.lay'; > cfg.parameter = 'kurtosis'; > figure; > ft_topoplotER(cfg, datak); > ​ > Figure 1 kurtosis topography + no filter + case1.ds > If the band pass filter is included in the pre-processing, the kurtosis > topography is figure 2; the pre-processing matlab program is > %% preporcessing the channel level data > dataset = 'case1.ds'; > cfg = []; > cfg.dataset = dataset; > cfg.hpfilter = 'yes'; > cfg.hpfreq = 10; > cfg.lpfilter = 'yes'; > cfg.lpfreq = 70; > cfg.channel = {'MEG'}; > data = ft_preprocessing(cfg); > Figure 2 kurtosis topography + [10Hz 70Hz] filter + case1.ds > *Question 2:* Why the kurtosis topographies at channel level from two > dataset case1.ds (figure 1 (no filter), figure 2 (filtered)) and > case1_cHPI_raw_trans_sss.fif (figure 3 (no filter) and figure 4 (filtered)) > are not consistent? Because these two datasets are measured from the same > patient, the kurtosis topography should be consistent. Do you have any idea > about this? > ​ > Figure 3 kurtosis topography + no filter + case1_cHPI_raw_trans_sss.fif > ​ > Figure 4 kurtosis topography + [10Hz 70Hz] filter + > case1_cHPI_raw_trans_sss.fif > Regards, > Rui. From seymourr at aston.ac.uk Thu Jul 21 17:06:06 2016 From: seymourr at aston.ac.uk (Seymour, Robert (Research Student)) Date: Thu, 21 Jul 2016 15:06:06 +0000 Subject: [FieldTrip] Compensation for maxfilter in source analysis? Message-ID: Hi Peter, Would also be interested in the answer to your first question - it is not clear how Fieldtrip combines MAGS+GRADS using ft_sourceanalysis/ft_prepareleadfield. For your second question I don't think there is a 'right' answer & it depends how aggressively you've Maxfiltered... as a rule of thumb, this is the code I use: cfg = []; cfg.method = 'pca'; cfg.updatesens = 'no'; cfg.channel = 'MEGMAG'; comp = ft_componentanalysis(cfg, data); cfg = []; cfg.updatesens = 'no'; cfg.component = comp.label(51:end); data_fix = ft_rejectcomponent(cfg, comp); Cheers, Robert Seymour (PhD Student, Aston Brain Centre) -------------- next part -------------- An HTML attachment was scrubbed... URL: From seymourr at aston.ac.uk Thu Jul 21 17:19:22 2016 From: seymourr at aston.ac.uk (Seymour, Robert (Research Student)) Date: Thu, 21 Jul 2016 15:19:22 +0000 Subject: [FieldTrip] Conte69 Atlas-Based Source Localisation Message-ID: Dear Fieldtrip Forum, I'd just like to pick up from an old thread posted to the FT forum: https://mailman.science.ru.nl/pipermail/fieldtrip/2015-October/009682.html. Basically, I am trying to perform source localisation using regions within an atlas described on the Conte69 brain http://brainvis.wustl.edu/wiki/index.php//Caret:Atlases/Conte69_Atlas. I have run the standard Freesurfer pipeline on my MRIs (in head co-ordinate system), converted the output to the Conte69 atlas using "freesurfer_to_fs_LR" pipeline, and finally down-sampled the mesh using the helpful instructions from the above thread, combined with MNE function: mne_setup_source_space --ico -6 . So to my questions: i) How do I map from the atlas vertices (on the 327684 vertex Conte69 brain) to the downsampled mesh with 4096 vertices per hemisphere? I feel it has something to do with the deformation maps... ii) How to I align everything in the head co-ordinate system (appreciate this is a bit of a general question)? Many thanks, Robert Seymour (PhD Student, Aston Brain Centre) -------------- next part -------------- An HTML attachment was scrubbed... URL: From jan.schoffelen at donders.ru.nl Thu Jul 21 17:33:44 2016 From: jan.schoffelen at donders.ru.nl (Schoffelen, J.M. (Jan Mathijs)) Date: Thu, 21 Jul 2016 15:33:44 +0000 Subject: [FieldTrip] Conte69 Atlas-Based Source Localisation In-Reply-To: References: Message-ID: Hi Robert, If you process the cortical sheet that is shipped with the Conte69 atlas, i.e. pass it through freesurfer_to_fs_LR, and then through mne_setup_source_space, you’ll get a topologically valid low-resolution parcellation, which you could use with your individual source models. Each of the vertices is surface-registered by construction. Best, Jan-Mathijs On 21 Jul 2016, at 17:19, Seymour, Robert (Research Student) > wrote: Dear Fieldtrip Forum, I'd just like to pick up from an old thread posted to the FT forum: https://mailman.science.ru.nl/pipermail/fieldtrip/2015-October/009682.html. Basically, I am trying to perform source localisation using regions within an atlas described on the Conte69 brain http://brainvis.wustl.edu/wiki/index.php//Caret:Atlases/Conte69_Atlas. I have run the standard Freesurfer pipeline on my MRIs (in head co-ordinate system), converted the output to the Conte69 atlas using “freesurfer_to_fs_LR” pipeline, and finally down-sampled the mesh using the helpful instructions from the above thread, combined with MNE function: mne_setup_source_space --ico -6 . So to my questions: i) How do I map from the atlas vertices (on the 327684 vertex Conte69 brain) to the downsampled mesh with 4096 vertices per hemisphere? I feel it has something to do with the deformation maps... ii) How to I align everything in the head co-ordinate system (appreciate this is a bit of a general question)? Many thanks, Robert Seymour (PhD Student, Aston Brain Centre) _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl https://mailman.science.ru.nl/mailman/listinfo/fieldtrip -------------- next part -------------- An HTML attachment was scrubbed... URL: From jan.schoffelen at donders.ru.nl Thu Jul 21 17:59:16 2016 From: jan.schoffelen at donders.ru.nl (Schoffelen, J.M. (Jan Mathijs)) Date: Thu, 21 Jul 2016 15:59:16 +0000 Subject: [FieldTrip] Conte69 Atlas-Based Source Localisation In-Reply-To: References: Message-ID: Hi Robert, Here I am again. I forgot to add to my previous message that you need to look into the sourcemodel.orig.inuse field to find out which vertices in the high resolution cortical sheet are used in the downsampled version. Best, Jan-Mathijs On 21 Jul 2016, at 17:33, Schoffelen, J.M. (Jan Mathijs) > wrote: Hi Robert, If you process the cortical sheet that is shipped with the Conte69 atlas, i.e. pass it through freesurfer_to_fs_LR, and then through mne_setup_source_space, you’ll get a topologically valid low-resolution parcellation, which you could use with your individual source models. Each of the vertices is surface-registered by construction. Best, Jan-Mathijs On 21 Jul 2016, at 17:19, Seymour, Robert (Research Student) > wrote: Dear Fieldtrip Forum, I'd just like to pick up from an old thread posted to the FT forum: https://mailman.science.ru.nl/pipermail/fieldtrip/2015-October/009682.html. Basically, I am trying to perform source localisation using regions within an atlas described on the Conte69 brain http://brainvis.wustl.edu/wiki/index.php//Caret:Atlases/Conte69_Atlas. I have run the standard Freesurfer pipeline on my MRIs (in head co-ordinate system), converted the output to the Conte69 atlas using “freesurfer_to_fs_LR” pipeline, and finally down-sampled the mesh using the helpful instructions from the above thread, combined with MNE function: mne_setup_source_space --ico -6 . So to my questions: i) How do I map from the atlas vertices (on the 327684 vertex Conte69 brain) to the downsampled mesh with 4096 vertices per hemisphere? I feel it has something to do with the deformation maps... ii) How to I align everything in the head co-ordinate system (appreciate this is a bit of a general question)? Many thanks, Robert Seymour (PhD Student, Aston Brain Centre) _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl https://mailman.science.ru.nl/mailman/listinfo/fieldtrip _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl https://mailman.science.ru.nl/mailman/listinfo/fieldtrip -------------- next part -------------- An HTML attachment was scrubbed... URL: From ruil3 at student.unimelb.edu.au Fri Jul 22 08:05:35 2016 From: ruil3 at student.unimelb.edu.au (Rui Li) Date: Fri, 22 Jul 2016 16:05:35 +1000 Subject: [FieldTrip] Kurtosis topography at channel level In-Reply-To: References: Message-ID: Dear Frank, Thanks for your kind reply. Regards, Rui. On Thu, Jul 21, 2016 at 6:48 PM, Frank Neugebauer < f.neugebauer at uni-muenster.de> wrote: > Hi Rui, > > *Question 1:* why and how does the filter affect the kurtosis? > > As kurtosis is not linear, that is > kurtosis(data+noise)=/=kurtosis(data)+kurtosis(noise), it is a little hard > to say how exactly changing your data will change the output kurtosis. > If you filter Gaussian noise the signal should form stronger outlier and > thus the data should yield higher kurtosis. > As far as I understand kurtosis, the frequency itself does not directly > influence the kurtosis output. > > > *Question 2:* Why the kurtosis topographies at channel level from two > > dataset case1.ds (figure 1 (no filter), figure 2 (filtered)) and > > case1_cHPI_raw_trans_sss.fif (figure 3 (no filter) and figure 4 > (filtered)) > > are not consistent? Because these two datasets are measured from the same > > patient, the kurtosis topography should be consistent. Do you have any > idea > > about this? > > > As far as I understand, epileptic activity is hard to measure because you > don't know when it will occur and different measurements are not > inconsistent, but just show different activity at a different time and > circumstance (such as different sensor noise, interference, but also the > patient's condition). > In the introduction to the case they say, > >> Corticography also showed interictal discharges in the frontal lobe, > though seizures were of parietal origin. <<. Maybe this is the explanation? > The kurtosis points to the frontal lobe, too. > > I hope this was a little helpful, > best regards, > Frank > > > Rui Li wrote on 2016-07-21: > > Dear FieldTrip users, > > > Recently, I am working on the case 1 dataset of epilepsy tutorial. The > > first patient got the MEG recording from Neuromag and CTF, respectively. > I > > encountered some problems when I tried to depict the Kurtosis topography > > at channel - level. > > > > *Question 1:* why and how does the filter affect the kurtosis? > > > Figure 1 and Figure 2 are kurtosis topographies at channel level without > > band pass filter and with band pass filter, respectively. As we can see, > > these two figures are very different. Therefore, I am wondering why and > how > > does the frequency filter affect the kurtosis? > > > The figure 1 is generated by the following program; > > > %% preporcessing the channel level data > > > dataset = 'case1.ds'; > > > cfg = []; > > > cfg.dataset = dataset; > > > % cfg.hpfilter = 'yes'; > > > % cfg.hpfreq = 10; > > > % cfg.lpfilter = 'yes'; > > > % cfg.lpfreq = 70; > > > cfg.channel = {'MEG'}; > > > data = ft_preprocessing(cfg); > > > > > %% compute channel-level kurtosis > > > > > datak = []; > > > datak.label = data.label; > > > datak.dimord = 'chan'; > > > datak.kurtosis = kurtosis(data.trial{1}')'; > > > > > cfg = []; > > > cfg.comment = 'computed channel-level kurtosis'; > > > datak = ft_annotate(cfg, datak); > > > > > %% plot kurtosis topography at channel-level > > > > > cfg = []; > > > cfg.layout = 'CTF275.lay'; > > > cfg.parameter = 'kurtosis'; > > > > > figure; > > > ft_topoplotER(cfg, datak); > > > > ​ > > > Figure 1 kurtosis topography + no filter + case1.ds > > > If the band pass filter is included in the pre-processing, the kurtosis > > topography is figure 2; the pre-processing matlab program is > > > %% preporcessing the channel level data > > > dataset = 'case1.ds'; > > > cfg = []; > > > cfg.dataset = dataset; > > > cfg.hpfilter = 'yes'; > > > cfg.hpfreq = 10; > > > cfg.lpfilter = 'yes'; > > > cfg.lpfreq = 70; > > > cfg.channel = {'MEG'}; > > > data = ft_preprocessing(cfg); > > > > > Figure 2 kurtosis topography + [10Hz 70Hz] filter + case1.ds > > > *Question 2:* Why the kurtosis topographies at channel level from two > > dataset case1.ds (figure 1 (no filter), figure 2 (filtered)) and > > case1_cHPI_raw_trans_sss.fif (figure 3 (no filter) and figure 4 > (filtered)) > > are not consistent? Because these two datasets are measured from the same > > patient, the kurtosis topography should be consistent. Do you have any > idea > > about this? > > > > ​ > > > Figure 3 kurtosis topography + no filter + case1_cHPI_raw_trans_sss.fif > > > > ​ > > > Figure 4 kurtosis topography + [10Hz 70Hz] filter + > > case1_cHPI_raw_trans_sss.fif > > > Regards, > > > Rui. > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > https://mailman.science.ru.nl/mailman/listinfo/fieldtrip -------------- next part -------------- An HTML attachment was scrubbed... URL: From jonas.chatel.goldman at gmail.com Fri Jul 22 11:27:05 2016 From: jonas.chatel.goldman at gmail.com (Jonas Chatel-Goldman) Date: Fri, 22 Jul 2016 11:27:05 +0200 Subject: [FieldTrip] Adequate connectivity measure for continuous data Message-ID: Dear Fieldtrippers, In terms of connectivity measure for EEG signals, WPLI appears to have a good reputation among the neurophysio community. However it seems to require multiple trials for its estimation (e.g., https://mailman.science.ru.nl/pipermail/fieldtrip/2015-August/009575.html). Could it be applied on continuous data (e.g., >1 minute resting state segments) and, if not, what could be an appropriate connectivity measure in this context? best, *Jonas * -------------- next part -------------- An HTML attachment was scrubbed... URL: From tzvetan.popov at uni-konstanz.de Fri Jul 22 12:07:00 2016 From: tzvetan.popov at uni-konstanz.de (Tzvetan Popov) Date: Fri, 22 Jul 2016 12:07:00 +0200 Subject: [FieldTrip] Adequate connectivity measure for continuous data In-Reply-To: References: Message-ID: <646F174E-105D-4A5B-961D-62AAED16862A@uni-konstanz.de> Dear Jonas, this paper is quite a good start: http://journal.frontiersin.org/article/10.3389/fnsys.2015.00175/full Very accessible read also providing some playground data to begin with. Good luck, tzvetan > Dear Fieldtrippers, > > In terms of connectivity measure for EEG signals, WPLI appears to have a good reputation among the neurophysio community. However it seems to require multiple trials for its estimation (e.g., https://mailman.science.ru.nl/pipermail/fieldtrip/2015-August/009575.html). Could it be applied on continuous data (e.g., >1 minute resting state segments) and, if not, what could be an appropriate connectivity measure in this context? > > best, > > > Jonas > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > https://mailman.science.ru.nl/mailman/listinfo/fieldtrip -------------- next part -------------- An HTML attachment was scrubbed... URL: From nima.noury at student.uni-tuebingen.de Fri Jul 22 13:00:16 2016 From: nima.noury at student.uni-tuebingen.de (Nima Noury) Date: Fri, 22 Jul 2016 13:00:16 +0200 Subject: [FieldTrip] 2016 Tuebingen MEG Symposium, Oct 26-27 Message-ID: <20160722130016.Horde.jxvSalIKRTkLclaFmo6w-Mu@webmail.uni-tuebingen.de> The MEG Center Tuebingen is pleased to announce the 2016 Tuebingen MEG Symposium The symposium takes place on October 26 and 27, 2016 at the University Hospital’s Conference Center. The meeting brings together leading researchers in the field of MEG and related disciplines. Join us to learn about the latest advances in MEG research and beyond. Confirmed speakers: Radoslaw Cichy, Berlin Michael Cohen, Nijmegen Freek van Ede, Oxford Stefan Haufe, New York Vladimir Litvak, London Laura Marzetti, Chieti Satu Palva, Helsinki Rafael Polania, Zurich Martin Vinck, New Haven Mark Woolrich, Oxford For more information and registration, please visit: http://meg.medizin.uni-tuebingen.de/2016/ Please forward this information to any of your colleagues and collaborators that may be interested in the symposium. Nima Noury AG Large-Scale Neuronal Interactions Centre for Integrative Neuroscience (CIN) University of Tübingen Otfried Müller-Straße 25 72076 Tübingen Germany From jonas.chatel.goldman at gmail.com Fri Jul 22 16:43:25 2016 From: jonas.chatel.goldman at gmail.com (Jonas Chatel-Goldman) Date: Fri, 22 Jul 2016 16:43:25 +0200 Subject: [FieldTrip] Adequate connectivity measure for continuous data In-Reply-To: <646F174E-105D-4A5B-961D-62AAED16862A@uni-konstanz.de> References: <646F174E-105D-4A5B-961D-62AAED16862A@uni-konstanz.de> Message-ID: Dear Tzvetan, thanks for your reply. However the reference you kindly provided doesn't address the estimation of connectivity in the case of continuous data (all mentioned measures seem to require being fed with multiple trials data). Beside, it is a good tutorial but not really exhaustive (for instance not a word on WPLI). *Jonas * 2016-07-22 12:07 GMT+02:00 Tzvetan Popov : > Dear Jonas, > > this paper is quite a good start: > http://journal.frontiersin.org/article/10.3389/fnsys.2015.00175/full > Very accessible read also providing some playground data to begin with. > Good luck, > tzvetan > > > > > Dear Fieldtrippers, > > In terms of connectivity measure for EEG signals, WPLI appears to have a > good reputation among the neurophysio community. However it seems to > require multiple trials for its estimation (e.g., > https://mailman.science.ru.nl/pipermail/fieldtrip/2015-August/009575.html). > Could it be applied on continuous data (e.g., >1 minute resting state > segments) and, if not, what could be an appropriate connectivity measure in > this context? > > best, > > > *Jonas * > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > https://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > https://mailman.science.ru.nl/mailman/listinfo/fieldtrip > -------------- next part -------------- An HTML attachment was scrubbed... URL: From seymourr at aston.ac.uk Fri Jul 22 17:42:51 2016 From: seymourr at aston.ac.uk (Seymour, Robert (Research Student)) Date: Fri, 22 Jul 2016 15:42:51 +0000 Subject: [FieldTrip] Conte69 Atlas-Based Source Localisation Message-ID: Thanks Jan-Mathijs, Now got it working! There's probably a more elegant way to do this but thought I'd attach my code here anyway. Rob -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: conte69_atlas.m Type: application/octet-stream Size: 854 bytes Desc: conte69_atlas.m URL: From michelic72 at gmail.com Fri Jul 22 18:03:26 2016 From: michelic72 at gmail.com (Cristiano Micheli) Date: Fri, 22 Jul 2016 18:03:26 +0200 Subject: [FieldTrip] Adequate connectivity measure for continuous data In-Reply-To: References: <646F174E-105D-4A5B-961D-62AAED16862A@uni-konstanz.de> Message-ID: Dear Jonas This paper addresses your question: http://www.hindawi.com/journals/cmmm/2012/186353/abs/ IHTH Cris On Fri, Jul 22, 2016 at 4:43 PM, Jonas Chatel-Goldman < jonas.chatel.goldman at gmail.com> wrote: > Dear Tzvetan, > > thanks for your reply. However the reference you kindly provided doesn't > address the estimation of connectivity in the case of continuous data (all > mentioned measures seem to require being fed with multiple trials data). > Beside, it is a good tutorial but not really exhaustive (for instance not a > word on WPLI). > > > *Jonas * > > 2016-07-22 12:07 GMT+02:00 Tzvetan Popov : > >> Dear Jonas, >> >> this paper is quite a good start: >> http://journal.frontiersin.org/article/10.3389/fnsys.2015.00175/full >> Very accessible read also providing some playground data to begin with. >> Good luck, >> tzvetan >> >> >> >> >> Dear Fieldtrippers, >> >> In terms of connectivity measure for EEG signals, WPLI appears to have a >> good reputation among the neurophysio community. However it seems to >> require multiple trials for its estimation (e.g., >> https://mailman.science.ru.nl/pipermail/fieldtrip/2015-August/009575.html). >> Could it be applied on continuous data (e.g., >1 minute resting state >> segments) and, if not, what could be an appropriate connectivity measure in >> this context? >> >> best, >> >> >> *Jonas * >> _______________________________________________ >> fieldtrip mailing list >> fieldtrip at donders.ru.nl >> https://mailman.science.ru.nl/mailman/listinfo/fieldtrip >> >> >> >> _______________________________________________ >> fieldtrip mailing list >> fieldtrip at donders.ru.nl >> https://mailman.science.ru.nl/mailman/listinfo/fieldtrip >> > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > https://mailman.science.ru.nl/mailman/listinfo/fieldtrip > -------------- next part -------------- An HTML attachment was scrubbed... URL: From tzvetan.popov at uni-konstanz.de Fri Jul 22 18:20:35 2016 From: tzvetan.popov at uni-konstanz.de (Tzvetan Popov) Date: Fri, 22 Jul 2016 18:20:35 +0200 Subject: [FieldTrip] Adequate connectivity measure for continuous data In-Reply-To: References: <646F174E-105D-4A5B-961D-62AAED16862A@uni-konstanz.de> Message-ID: <71C6CFDD-7C0B-44A4-9838-36757CDD2F24@uni-konstanz.de> HI, you could check out this approach: http://www.fieldtriptoolbox.org/tutorial/networkanalysis. You can compute your desired connectivity metric during the call to ft_connectivity analysis. Many of the issues stressed in the paper still apply though, independent of the metric of your choice. You could also segment your data on the basis of some event you consider relevant, e.g. particular phases of an ongoing signal. It is your model that you believe represents a good “guess” of the cerebral connectivity pattern not so much the metric. good luck tzvetan > Dear Tzvetan, > > thanks for your reply. However the reference you kindly provided doesn't address the estimation of connectivity in the case of continuous data (all mentioned measures seem to require being fed with multiple trials data). Beside, it is a good tutorial but not really exhaustive (for instance not a word on WPLI). > > > Jonas > > 2016-07-22 12:07 GMT+02:00 Tzvetan Popov : > Dear Jonas, > > this paper is quite a good start: http://journal.frontiersin.org/article/10.3389/fnsys.2015.00175/full > Very accessible read also providing some playground data to begin with. > Good luck, > tzvetan > > > > >> Dear Fieldtrippers, >> >> In terms of connectivity measure for EEG signals, WPLI appears to have a good reputation among the neurophysio community. However it seems to require multiple trials for its estimation (e.g., https://mailman.science.ru.nl/pipermail/fieldtrip/2015-August/009575.html). Could it be applied on continuous data (e.g., >1 minute resting state segments) and, if not, what could be an appropriate connectivity measure in this context? >> >> best, >> >> >> Jonas >> _______________________________________________ >> fieldtrip mailing list >> fieldtrip at donders.ru.nl >> https://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > https://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > https://mailman.science.ru.nl/mailman/listinfo/fieldtrip -------------- next part -------------- An HTML attachment was scrubbed... URL: From rb643 at medschl.cam.ac.uk Sat Jul 23 12:51:15 2016 From: rb643 at medschl.cam.ac.uk (Richard Bethlehem) Date: Sat, 23 Jul 2016 10:51:15 +0000 Subject: [FieldTrip] channel combination after wpli Message-ID: <3188FAB8621D294696F13E80A7BBC97E010A306F3A@me-mbx3.medschl.cam.ac.uk> Dear Fieltrippers, After running ft_connectivityanalysis on a subset of pre-processed resting-state EEG data the dimord is still listed as chan_freq_time (where the first dimension is simply all the pairwise channel comparisons). If I want to run subsequent network analysis on this the ft_networkanalysis require a chan_chan_freq_time matrix. Is there any way to convert this so that I can run the network analysis or am I missing a setting in the connectivity analysis that would give me that output? This is the code I used (my entire resting-state recording has been replaced into 4 second segments in order to get 'trials' for the WPLI connectivity function: cfg_freq = []; cfg_freq.method = 'wavelet'; cfg_freq.output = 'powandcsd'; cfg_freq.channel = 1:64; cfg_freq.keeptrials ='yes'; %do not return an average of all trials for subsequent wpli analysis cfg_freq.toi = [0.5:0.05:3.5]; %delta cfg_freq.foi = [2:0.02:4]; cfg_freq.width = 3; %small width for low frequency [freq_data.delta] = ft_freqanalysis(cfg_freq, data_iccleaned); cfg_conn = []; cfg_conn.method = 'wpli'; conn.delta = ft_connectivityanalysis(cfg_conn, freq_data.delta); Cheers, Richard -------------- next part -------------- An HTML attachment was scrubbed... URL: From johanna.zumer at gmail.com Sun Jul 24 20:30:32 2016 From: johanna.zumer at gmail.com (Johanna Zumer) Date: Sun, 24 Jul 2016 19:30:32 +0100 Subject: [FieldTrip] PhD advert In-Reply-To: <9d9efc01808a4a72ad165f7b66ce4a70@EXHUB01.adf.bham.ac.uk> References: <9d9efc01808a4a72ad165f7b66ce4a70@EXHUB01.adf.bham.ac.uk> Message-ID: Dear all, Please see attached for an advert for a PhD position in Birmingham, UK on multisensory integration in the group of Uta Noppeney. Kind regards, Johanna -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: advert2016_multsense_PhD.doc Type: application/msword Size: 37888 bytes Desc: not available URL: From RXW494 at student.bham.ac.uk Mon Jul 25 13:47:37 2016 From: RXW494 at student.bham.ac.uk (Ross Wilson) Date: Mon, 25 Jul 2016 11:47:37 +0000 Subject: [FieldTrip] Using an fMRI cluster as an ROI Message-ID: <3105F3FB20D2B242A7F70546785A60FC01752632D7@EX13.adf.bham.ac.uk> Hello all! I am attempting to use an fMRI cluster as an ROI to look at virtual electrode timecourses post-beamforming. I have been using the aal atlas to find virtual electrodes of maximum change between baseline and stimulus period within, for example, the motor cortex afer beamforming. However, the virtual electrodes found are not necessarily in a position similar to that of the fMRI cluster and I'd like to be more specific than that if possible. The template grid I have been using for beamforming is created from the T1 (code as below, in MNI space: ...fieldtrip\external/spm8/templates/T1.nii). Is it possible to transform an fMRI cluster (in MNI space) onto the template grid so that the data from specific grid points relating to that cluster can be extracted post-beamforming?? Any help with this would be great! Thank you, Ross %%%tempale grid creation T1 = ft_read_mri('F:\fieldtrip\external/spm8/templates/T1.nii'); T1.coordsys = 'spm'; cfg = []; template_seg = ft_volumesegment(cfg, T1); cfg = []; cfg.method = 'singleshell'; template_vol = ft_prepare_headmodel(cfg, template_seg); template_vol = ft_convert_units(template_vol, 'cm'); cfg = []; cfg.grid.xgrid = -20:0.5:20; cfg.grid.ygrid = -20:0.5:20; cfg.grid.zgrid = -20:0.5:20; cfg.grid.unit = 'cm'; cfg.grid.tight = 'yes'; cfg.inwardshift = 0.15; cfg.vol = template_vol; template_grid = ft_prepare_sourcemodel(cfg); -------------- next part -------------- An HTML attachment was scrubbed... URL: From julian.keil at gmail.com Mon Jul 25 14:03:26 2016 From: julian.keil at gmail.com (Julian Keil) Date: Mon, 25 Jul 2016 14:03:26 +0200 Subject: [FieldTrip] Using an fMRI cluster as an ROI In-Reply-To: <3105F3FB20D2B242A7F70546785A60FC01752632D7@EX13.adf.bham.ac.uk> References: <3105F3FB20D2B242A7F70546785A60FC01752632D7@EX13.adf.bham.ac.uk> Message-ID: <55341243-86D4-479C-8769-9270AF12B3D1@gmail.com> Hi Ross, one way to attempt this, is to create a 3D grid on your fMRI data, so that each voxel is a grid point. Then you can compute the distance between grid points from the fMRI grid and your virtual electrode grid and find the nearest neighbours. This sould work for the whole brain as well as for predefined ROIs. I've attached a function I use for similar problems. I'm sure there are more elegant ways but this works for me. It won't do exactly what you want to do, but maybe some bits and pieces can help you along. Good luck, Julian Am 25.07.2016 um 13:47 schrieb Ross Wilson: > Hello all! > > I am attempting to use an fMRI cluster as an ROI to look at virtual electrode timecourses post-beamforming. > > I have been using the aal atlas to find virtual electrodes of maximum change between baseline and stimulus period within, for example, the motor cortex afer beamforming. However, the virtual electrodes found are not necessarily in a position similar to that of the fMRI cluster and I’d like to be more specific than that if possible. > > The template grid I have been using for beamforming is created from the T1 (code as below, in MNI space: …fieldtrip\external/spm8/templates/T1.nii). Is it possible to transform an fMRI cluster (in MNI space) onto the template grid so that the data from specific grid points relating to that cluster can be extracted post-beamforming?? > > Any help with this would be great! > > Thank you, > > Ross > %%%tempale grid creation > T1 = ft_read_mri('F:\fieldtrip\external/spm8/templates/T1.nii'); > T1.coordsys = 'spm'; > > cfg = []; > template_seg = ft_volumesegment(cfg, T1); > > cfg = []; > cfg.method = 'singleshell'; > template_vol = ft_prepare_headmodel(cfg, template_seg); > template_vol = ft_convert_units(template_vol, 'cm'); > > cfg = []; > cfg.grid.xgrid = -20:0.5:20; > cfg.grid.ygrid = -20:0.5:20; > cfg.grid.zgrid = -20:0.5:20; > cfg.grid.unit = 'cm'; > cfg.grid.tight = 'yes'; > cfg.inwardshift = 0.15; > cfg.vol = template_vol; > template_grid = ft_prepare_sourcemodel(cfg); > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > https://mailman.science.ru.nl/mailman/listinfo/fieldtrip -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: vt_make_roifield.m Type: application/octet-stream Size: 6646 bytes Desc: not available URL: -------------- 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 stan.vanpelt at donders.ru.nl Tue Jul 26 09:12:59 2016 From: stan.vanpelt at donders.ru.nl (Pelt, S. van (Stan)) Date: Tue, 26 Jul 2016 07:12:59 +0000 Subject: [FieldTrip] Using an fMRI cluster as an ROI In-Reply-To: <55341243-86D4-479C-8769-9270AF12B3D1@gmail.com> References: <3105F3FB20D2B242A7F70546785A60FC01752632D7@EX13.adf.bham.ac.uk>, <55341243-86D4-479C-8769-9270AF12B3D1@gmail.com> Message-ID: <1556CA07-969A-4678-8127-948CF195E727@donders.ru.nl> Hi Ross, I think what you looking for is explainef in this turorial: http://www.fieldtriptoolbox.org/tutorial/shared/virtual_sensors?s[]=virtual Make sure that you first warp the subject's brain coordinates to MNI coordinates. Then enter your ROI coordinates at cfg.grid.pos and run the lcmv beamformer to get the spatial filter that is specific of your ROI peak MNI coordinates. Hope that helps. Stan Op 25 jul. 2016 om 14:06 heeft Julian Keil > het volgende geschreven: Hi Ross, one way to attempt this, is to create a 3D grid on your fMRI data, so that each voxel is a grid point. Then you can compute the distance between grid points from the fMRI grid and your virtual electrode grid and find the nearest neighbours. This sould work for the whole brain as well as for predefined ROIs. I've attached a function I use for similar problems. I'm sure there are more elegant ways but this works for me. It won't do exactly what you want to do, but maybe some bits and pieces can help you along. Good luck, Julian Am 25.07.2016 um 13:47 schrieb Ross Wilson: Hello all! I am attempting to use an fMRI cluster as an ROI to look at virtual electrode timecourses post-beamforming. I have been using the aal atlas to find virtual electrodes of maximum change between baseline and stimulus period within, for example, the motor cortex afer beamforming. However, the virtual electrodes found are not necessarily in a position similar to that of the fMRI cluster and I’d like to be more specific than that if possible. The template grid I have been using for beamforming is created from the T1 (code as below, in MNI space: …fieldtrip\external/spm8/templates/T1.nii). Is it possible to transform an fMRI cluster (in MNI space) onto the template grid so that the data from specific grid points relating to that cluster can be extracted post-beamforming?? Any help with this would be great! Thank you, Ross %%%tempale grid creation T1 = ft_read_mri('F:\fieldtrip\external/spm8/templates/T1.nii'); T1.coordsys = 'spm'; cfg = []; template_seg = ft_volumesegment(cfg, T1); cfg = []; cfg.method = 'singleshell'; template_vol = ft_prepare_headmodel(cfg, template_seg); template_vol = ft_convert_units(template_vol, 'cm'); cfg = []; cfg.grid.xgrid = -20:0.5:20; cfg.grid.ygrid = -20:0.5:20; cfg.grid.zgrid = -20:0.5:20; cfg.grid.unit = 'cm'; cfg.grid.tight = 'yes'; cfg.inwardshift = 0.15; cfg.vol = template_vol; template_grid = ft_prepare_sourcemodel(cfg); _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl https://mailman.science.ru.nl/mailman/listinfo/fieldtrip -------------- next part -------------- An HTML attachment was scrubbed... URL: From carmen.kung at mq.edu.au Wed Jul 27 08:01:40 2016 From: carmen.kung at mq.edu.au (Carmen Kung) Date: Wed, 27 Jul 2016 16:01:40 +1000 Subject: [FieldTrip] ft_databrowser error Message-ID: Dear fieldtripers, After running ft_definetrial and ft_preprocessing, we try to plot the data using ft_databrowser using the script at follow: >> cfg = []; >> ft_databrowser(cfg, data); But this is the error message we got: the input is raw data with 69 channels and 25 trials detected 0 visual artifacts Error using zeros Size inputs must be integers. Error in convert_event>artifact2artvec (line 179) artvec = zeros(length(artifact), endsample); Error in convert_event (line 103) obj = artifact2artvec(obj,endsample); Error in ft_databrowser (line 501) artdata.trial{1} = convert_event(artifact, 'boolvec', 'endsample', datendsample); % every artifact is a "channel" We did try to plot the raw *.cnt file (the cnt is recorded using curry 7) using ft_databrowser. It worked, but not the epoched data. This is the parameters we used for the cfg to run ft_definetrial and ft_preprocessing cfg = []; cfg.dataformat = 'ns_cnt'; cfg.headerformat= 'ns_cnt'; cfg.eventformat= 'ns_cnt'; cfg.trialdef.eventtype = 'stimtype'; cfg.trialdef.prestim = 0.5; cfg.trialdef.poststim = 1.5; cfg.trialdef.eventvalue = 114; cfg.dataset = [dir filesep 'cnt' filesep subjectdata.subjectnr '_' subjectdata.initial '_' subjectdata.date '.cnt']; cfg = ft_definetrial(cfg); data = ft_preprocessing(cfg); The analysis is run on fieldtrip-20150522 and Matlab 2014a. Any help with this will be appreciated! Many thanks in advance, Carmen -------------- next part -------------- An HTML attachment was scrubbed... URL: From ipalma6 at msn.com Wed Jul 27 12:18:43 2016 From: ipalma6 at msn.com (=?utf-8?B?SW7DqnMgUA==?=) Date: Wed, 27 Jul 2016 10:18:43 +0000 Subject: [FieldTrip] Changing density of channels in ft_topoplotER? Message-ID: Dear community, My name is Inês and I'm using fieldtrip to look at EEG data acquired from a 32-channel BioSemi using BCI2000 in my BCI experiment. Currently I have been looking at the alpha band power over averaged trials in a particular condition, and to do that I have been using both ft_topoplotER and ft_multiplotER (). My problem is that although my data has 32 channels (all specified under data.label), both plots only display a few main channels - 20 to be exact. I'm including an example image of the layout and the corresponding topoplot. The same channels are shown in multiplot. Here's my code: %preprocessing for each subject and extracting desired trials% cfg=[]; data_alltrials = ft_appenddata(cfg, data{:}); % FFT freq_cfg = []; freq_cfg.channel = 'all'; freq_cfg.method = 'mtmfft'; freq_cfg.output = 'pow'; freq_cfg.taper = 'hanning'; freq_cfg.keeptrials = 'yes'; freq_cfg.foi = foi; freq_cfg.tapsmofrq = 1; fft_alltrials = ft_freqanalysis(freq_cfg, data_alltrials); disp('Preprocessing done.'); cfg = []; cfg.layout = layout; layout = ft_prepare_layout(cfg, data_alltrials); ft_layoutplot(cfg, data_alltrials) cfg = []; cfg.layout = 'biosemi32.lay'; channel = ft_channelselection({'all'},data_alltrials.label); cfg.channel = channel; cfg.colorbar = 'yes'; cfg.showlabels = 'yes'; figure(); ft_topoplotER(cfg, fft_alltrials); figure(); ft_multiplotER(cfg, fft_alltrials); So I guess my question is: is there a way to change the density of electrodes plotted, or even show them all? Can someone tell me if there is something wrong with the cfg settings I use or if I am doing something wrong at any other place? Looking forward to hear from you all! Best, Inês -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: example_layout.JPG Type: image/jpeg Size: 90342 bytes Desc: example_layout.JPG URL: From M.vanEs at donders.ru.nl Wed Jul 27 17:04:15 2016 From: M.vanEs at donders.ru.nl (Es, M.W.J. van (Mats)) Date: Wed, 27 Jul 2016 15:04:15 +0000 Subject: [FieldTrip] Source analysis/statistics single subject Message-ID: <3FC79061C73BEF44A3BEDA5DFC0ADBDF4ECD5569@exprd01.hosting.ru.nl> Hi FieldTrippers, I am currently trying to do source analysis on an individual subject (using the fieldtrip tutorial as a guideline). I have baseline (*Bl) and activity (*Act) data. I constructed a common filter (using DICS) and added the filter to the cfg structure before doing sourceanalysis on the individual CSD's of the active and baseline data, respectively. Although I tried specifying cfg.keeptrials = 'yes' in every step, the output of ft_sourceanalysis is an average over trials: sourceAct = freq: 11 inside: [2004x1 logical] pos: [2004x3 double] method: 'average' avg: [1x1 struct] cfg: [1x1 struct] This (I think) causes errors when I subsequently try to do sourcestatistics: Error using ft_statistics_montecarlo (line 242) could not determine the parametric critical value for clustering Error in ft_sourcestatistics (line 205) [stat, cfg] = statmethod(cfg, dat, design); Can anybody tell me what I'm doing wrong/how to do source statistics on an individual subject? You can find my code below. Thank you! Mats % calculate individual CSD cfg = []; cfg.method = 'mtmfft'; cfg.output = 'powandcsd'; cfg.tapsmofrq = 3; cfg.foilim = [11 11]; % cfg.keeptrials = 'yes'; freqAct = ft_freqanalysis(cfg, dataAct); freqBl = ft_freqanalysis(cfg, dataBl); % compute common filter dataAll = ft_appenddata([], dataAct, dataBl); cfg=[]; cfg.method = 'mtmfft'; cfg.output = 'powandcsd'; cfg.tapsmofrq = 3; cfg. foilim = [11 11]; freqAll = ft_freqanalysis(cfg, dataAll); cfg = []; cfg.method = 'dics'; cfg.frequency = 11; cfg.grid = grid; % caculated beforehand cfg.headmodel = headmodel; % caculated beforehand cfg.dics.projectnoise = 'yes'; cfg.dics.lambda = '5%'; cfg.dics.keepfilter = 'yes'; cfg.dics.realfilter = 'yes'; sourceAll = ft_sourceanalysis(cfg, freqAll); % source analysis cfg.grid.filter = sourceAll.avg.filter; cfg.dics.fixedori = 'yes'; cfg.keeptrials = 'yes'; sourceAct = ft_sourceanalysis(cfg, freqAct); sourceBl = ft_sourceanalysis(cfg, freqBl); % source statistics cfg = []; cfg.method = 'montecarlo'; cfg.statistic = 'ft_statfun_depsamplesT'; cfg.parameter = 'avg.pow'; cfg.correctm = 'cluster'; cfg.clusteralpha = 0.05; cfg.clusterstatistic = 'maxsum'; cfg.numrandomization = 1000; cfg.alpha = 0.05; % note that this only implies single-sided testing cfg.tail = 0; cfg.clustertail = 0; cfg.uvar = 1; % row of design matrix that contains unit variable (in this case: trials) cfg.ivar = 2; % row of design matrix that contains independent variable (the conditions) design = [1:nTrials, 1:nTrials; ones(1, nTrials), 2*ones(1,nTrials)]'; cfg.design = design'; stat = ft_sourcestatistics(cfg, sourceAct, sourceBl); -------------- next part -------------- An HTML attachment was scrubbed... URL: From magazzinil at gmail.com Wed Jul 27 17:24:25 2016 From: magazzinil at gmail.com (Lorenzo Magazzini) Date: Wed, 27 Jul 2016 16:24:25 +0100 Subject: [FieldTrip] Source analysis/statistics single subject In-Reply-To: <3FC79061C73BEF44A3BEDA5DFC0ADBDF4ECD5569@exprd01.hosting.ru.nl> References: <3FC79061C73BEF44A3BEDA5DFC0ADBDF4ECD5569@exprd01.hosting.ru.nl> Message-ID: Hi Mats, Check out the option cfg.rawtrial='yes' Lorenzo Lorenzo Magazzini PhD Student magazzinil at cardiff.ac.uk CUBRIC Building Maindy Road Cardiff CF24 4HQ On 27 July 2016 at 16:04, Es, M.W.J. van (Mats) wrote: > Hi FieldTrippers, > > I am currently trying to do source analysis on an individual subject > (using the fieldtrip tutorial as a guideline). I have baseline (*Bl) and > activity (*Act) data. I constructed a common filter (using DICS) and added > the filter to the cfg structure before doing sourceanalysis on the > individual CSD's of the active and baseline data, respectively. Although I > tried specifying cfg.keeptrials = 'yes' in every step, the output of > ft_sourceanalysis is an average over trials: > > sourceAct = > > freq: 11 > inside: [2004x1 logical] > pos: [2004x3 double] > method: 'average' > avg: [1x1 struct] > cfg: [1x1 struct] > > This (I think) causes errors when I subsequently try to do > sourcestatistics: > > Error using ft_statistics_montecarlo (line 242) > could not determine the parametric critical value for clustering > > Error in ft_sourcestatistics (line 205) > [stat, cfg] = statmethod(cfg, dat, design); > > Can anybody tell me what I'm doing wrong/how to do source statistics on an > individual subject? You can find my code below. Thank you! > Mats > > > *% calculate individual CSD* > *cfg = [];* > *cfg.method = 'mtmfft';* > *cfg.output = 'powandcsd';* > *cfg.tapsmofrq = 3;* > *cfg.foilim = [11 11];* > *% cfg.keeptrials = 'yes';* > *freqAct = ft_freqanalysis(cfg, dataAct);* > *freqBl = ft_freqanalysis(cfg, dataBl);* > > > *% compute common filter* > *dataAll = ft_appenddata([], dataAct, dataBl);* > *cfg=[];* > *cfg.method = 'mtmfft';* > *cfg.output = 'powandcsd';* > *cfg.tapsmofrq = 3;* > *cfg. foilim = [11 11];* > *freqAll = ft_freqanalysis(cfg, dataAll);* > > * cfg = []; cfg.method = 'dics'; cfg.frequency = 11; > cfg.grid = grid; % caculated beforehand cfg.headmodel = > headmodel; % caculated beforehand * > > > > > > > * cfg.dics.projectnoise = 'yes'; cfg.dics.lambda = '5%'; > cfg.dics.keepfilter = 'yes'; cfg.dics.realfilter = 'yes'; sourceAll = > ft_sourceanalysis(cfg, freqAll); % source analysis cfg.grid.filter = > sourceAll.avg.filter; cfg.dics.fixedori = 'yes'; cfg.keeptrials = 'yes'; > sourceAct = ft_sourceanalysis(cfg, freqAct); sourceBl = > ft_sourceanalysis(cfg, freqBl); % source statistics cfg = []; cfg.method > = 'montecarlo'; cfg.statistic = 'ft_statfun_depsamplesT'; > cfg.parameter = 'avg.pow'; cfg.correctm = 'cluster'; cfg.clusteralpha > = 0.05; cfg.clusterstatistic = 'maxsum'; cfg.numrandomization = 1000; > cfg.alpha = 0.05; % note that this only implies single-sided testing > cfg.tail = 0; cfg.clustertail = 0; cfg.uvar = 1; % row > of design matrix that contains unit variable (in this case: trials) > cfg.ivar = 2; % row of design matrix that contains independent > variable (the conditions) design = [1:nTrials, 1:nTrials; ones(1, nTrials), > 2*ones(1,nTrials)]'; cfg.design = design'; stat = > ft_sourcestatistics(cfg, sourceAct, sourceBl); * > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > https://mailman.science.ru.nl/mailman/listinfo/fieldtrip > -------------- next part -------------- An HTML attachment was scrubbed... URL: From sgj.umontreal at gmail.com Wed Jul 27 23:07:14 2016 From: sgj.umontreal at gmail.com (sandra guerreiro jacinto) Date: Wed, 27 Jul 2016 17:07:14 -0400 Subject: [FieldTrip] topoplot CSD data Message-ID: I’m having trouble topoplot my data after a ft_scalpcurrentdensity procedure. I get an error message : « Error using topoplot_common (line 267) cfg.parameter=avg is not present in data structure » Is that correct I take my individuals and make the mean over all subjects in order to create the avg? here is my code: cfg.method ='spline'; cfg.elec = ft_read_sens('standard_waveguard64.elc'); cfg.trials = 'all' ; cfg.conductivity = 0.33; cfg.lambda = 1e-05; cfg.order = 4; cfg.degree = 14; ft_csd_GA_Checker_og = ft_scalpcurrentdensity(cfg, GA_Checker_og) ft_csd_GA_Checker_og.avg = squeeze(mean(ft_csd_GA_Checker_og.trial,1)); the last line was my turnaround. I just want to make sure the procedure is correct. Thank you! -------------- next part -------------- An HTML attachment was scrubbed... URL: From rleese12 at berkeley.edu Thu Jul 28 07:43:44 2016 From: rleese12 at berkeley.edu (Nakyung Lee) Date: Wed, 27 Jul 2016 22:43:44 -0700 Subject: [FieldTrip] 'ft_redefinetrial' returning only one trial Message-ID: Dear FieldTrip community, I've been having a problem calling 'ft_redefinetrial'. Basically with my raw data with one trial (simply 'data' here), I've been trying to segment that one trial into smaller trials (so I can get rid of ' bad_times') by using the following code: time = data.time{1,1}; bad_times = globals.bad_times_sorted; % a N*2 sorted double cfg.begsample = [time(1); bad_times(:,2) + 1]; cfg.endsample = [bad_times(:,1) - 1; time(end)]; data_good = ft_redefinetrial(cfg, data); However the code returns a data with only one trial. (i.e. the resulting data_good consists of only one trial which correspond to the time (time(1) : bad_times(1,1).) The code is very simple and I didn't really expect it to behave this way. Does anyone see why this is happening? Any type of help would be appreciated. Best regards, Rachel Lee -------------- next part -------------- An HTML attachment was scrubbed... URL: From icelandhouse at gmail.com Thu Jul 28 09:20:34 2016 From: icelandhouse at gmail.com (Maris Skujevskis) Date: Thu, 28 Jul 2016 09:20:34 +0200 Subject: [FieldTrip] Beamformer for S1 A1 responses with EEG Message-ID: Dear Fieldtrip community, I am working on localizing primary sensory responses using the beamformer technique. My subjects receive 'noisy' stimuli: tactile vibrations (0-100Hz frequncy content) to both index fingers, OR 1-2kHz auditory noise stimuli in both ears for 500 ms; I have 118 EEG channels and around 170 clean trials for each modality per subject to work with. My results look ok at the sensor level, but the sources look messy (for now...). My question is: how accurately have you managed to beamformer-source-localize primary somatosensory/auditory responses - say, in a range from "not at all", "very vaguely/unreliably", "reasonably", "quite accurately"? I just want to know how successful you guys have been so I know what to expect from EEG data, when to feel satisfied with the result I am getting. Thanks a lot for your input! On Wednesday, July 27, 2016, wrote: > Send fieldtrip mailing list submissions to > fieldtrip at science.ru.nl > > To subscribe or unsubscribe via the World Wide Web, visit > https://mailman.science.ru.nl/mailman/listinfo/fieldtrip > or, via email, send a message with subject or body 'help' to > fieldtrip-request at science.ru.nl > > You can reach the person managing the list at > fieldtrip-owner at science.ru.nl > > When replying, please edit your Subject line so it is more specific > than "Re: Contents of fieldtrip digest..." > > > Today's Topics: > > 1. ft_databrowser error (Carmen Kung) > > > ---------------------------------------------------------------------- > > Message: 1 > Date: Wed, 27 Jul 2016 16:01:40 +1000 > From: Carmen Kung > > To: > > Subject: [FieldTrip] ft_databrowser error > Message-ID: > > > Content-Type: text/plain; charset="utf-8"; Format="flowed" > > Dear fieldtripers, > > After running ft_definetrial and ft_preprocessing, we try to plot the > data using ft_databrowser using the script at follow: > > > >> cfg = []; > >> ft_databrowser(cfg, data); > > But this is the error message we got: > > the input is raw data with 69 channels and 25 trials > detected 0 visual artifacts > Error using zeros > Size inputs must be integers. > > Error in convert_event>artifact2artvec (line 179) > artvec = zeros(length(artifact), endsample); > > Error in convert_event (line 103) > obj = artifact2artvec(obj,endsample); > > Error in ft_databrowser (line 501) > artdata.trial{1} = convert_event(artifact, 'boolvec', 'endsample', > datendsample); % every artifact is a "channel" > > > We did try to plot the raw *.cnt file (the cnt is recorded using curry > 7) using ft_databrowser. It worked, but not the epoched data. This is > the parameters we used for the cfg to run ft_definetrial and > ft_preprocessing > > cfg = []; > cfg.dataformat = 'ns_cnt'; > cfg.headerformat= 'ns_cnt'; > cfg.eventformat= 'ns_cnt'; > cfg.trialdef.eventtype = 'stimtype'; > cfg.trialdef.prestim = 0.5; > cfg.trialdef.poststim = 1.5; > cfg.trialdef.eventvalue = 114; > cfg.dataset = [dir filesep 'cnt' filesep subjectdata.subjectnr '_' > subjectdata.initial '_' subjectdata.date '.cnt']; > cfg = ft_definetrial(cfg); > data = ft_preprocessing(cfg); > > The analysis is run on fieldtrip-20150522 and Matlab 2014a. Any help > with this will be appreciated! > > Many thanks in advance, > Carmen > > -------------- next part -------------- > An HTML attachment was scrubbed... > URL: < > http://mailman.science.ru.nl/pipermail/fieldtrip/attachments/20160727/6df4adac/attachment-0001.html > > > > ------------------------------ > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > https://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > End of fieldtrip Digest, Vol 68, Issue 28 > ***************************************** > -------------- next part -------------- An HTML attachment was scrubbed... URL: From ruil3 at student.unimelb.edu.au Thu Jul 28 09:58:07 2016 From: ruil3 at student.unimelb.edu.au (Rui Li) Date: Thu, 28 Jul 2016 17:58:07 +1000 Subject: [FieldTrip] 'ft_redefinetrial' returning only one trial In-Reply-To: References: Message-ID: Hi, Rachel Probably because cfg.begsample and cfg.endsample should be sample points of the begin and the end of the trails instead of the time; I am not sure; Regards, Rui. On Thu, Jul 28, 2016 at 3:43 PM, Nakyung Lee wrote: > Dear FieldTrip community, > > I've been having a problem calling 'ft_redefinetrial'. > Basically with my raw data with one trial (simply 'data' here), I've been > trying to segment that one trial into smaller trials (so I can get rid of ' > bad_times') by using the following code: > > time = data.time{1,1}; > bad_times = globals.bad_times_sorted; % a N*2 sorted double > > cfg.begsample = [time(1); bad_times(:,2) + 1]; > cfg.endsample = [bad_times(:,1) - 1; time(end)]; > > data_good = ft_redefinetrial(cfg, data); > > However the code returns a data with only one trial. > (i.e. the resulting data_good consists of only one trial which correspond > to the time (time(1) : bad_times(1,1).) > The code is very simple and I didn't really expect it to behave this way. > Does anyone see why this is happening? > Any type of help would be appreciated. > > Best regards, > Rachel Lee > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > https://mailman.science.ru.nl/mailman/listinfo/fieldtrip > -------------- next part -------------- An HTML attachment was scrubbed... URL: From tineke.snijders at donders.ru.nl Thu Jul 28 10:16:18 2016 From: tineke.snijders at donders.ru.nl (Snijders, T.M. (Tineke)) Date: Thu, 28 Jul 2016 08:16:18 +0000 Subject: [FieldTrip] topoplot CSD data In-Reply-To: References: Message-ID: <815A9820E75FBC4F96B7CD3A8089D11C49E7619A@exprd04.hosting.ru.nl> Hi Sandra, I assume the input GA_Checker_og is a grand average where you have used cfg.keepindividual='yes', so you have the field .individual in the data instead of .avg. So, you can either use cfg.keepindividual='no' when making your grand average, or I guess you can use ft_timelockanalysis after the ft_scalpcurrentdensity. Cheers, Tineke ________________________________ From: fieldtrip-bounces at science.ru.nl [fieldtrip-bounces at science.ru.nl] on behalf of sandra guerreiro jacinto [sgj.umontreal at gmail.com] Sent: Wednesday, July 27, 2016 11:07 PM To: fieldtrip at science.ru.nl Subject: [FieldTrip] topoplot CSD data I’m having trouble topoplot my data after a ft_scalpcurrentdensity procedure. I get an error message : « Error using topoplot_common (line 267) cfg.parameter=avg is not present in data structure » Is that correct I take my individuals and make the mean over all subjects in order to create the avg? here is my code: cfg.method ='spline'; cfg.elec = ft_read_sens('standard_waveguard64.elc'); cfg.trials = 'all' ; cfg.conductivity = 0.33; cfg.lambda = 1e-05; cfg.order = 4; cfg.degree = 14; ft_csd_GA_Checker_og = ft_scalpcurrentdensity(cfg, GA_Checker_og) ft_csd_GA_Checker_og.avg = squeeze(mean(ft_csd_GA_Checker_og.trial,1)); the last line was my turnaround. I just want to make sure the procedure is correct. Thank you! -------------- next part -------------- An HTML attachment was scrubbed... URL: From icelandhouse at gmail.com Thu Jul 28 17:28:14 2016 From: icelandhouse at gmail.com (Maris Skujevskis) Date: Thu, 28 Jul 2016 17:28:14 +0200 Subject: [FieldTrip] Leadfield issues for EEG source reconstruction Message-ID: Dear Fieldtrip community, The leadfields I have constructed for my EEG source reconstruction look rather strange. You can take a look at them here: https://drive.google.com/folderview?id=0B9QSyDy3RhMIeFkxcm5kdmxOWVk&usp=drive_web For a given electrode (red circle), the blue vectors represent the direction and the strength of the leadfield. There are two issues: (a) for some subjects there is an expected leadfield gradient' (closer source points have larger vectors), while some others do not show this pattern at all; (b) some source points have disproportionately large/wrongly directed vectors. This is closely related to a previous fieldtrip discussion: https://mailman.science.ru.nl/pipermail/fieldtrip/2015-March/009058.html , but in that discussion no conclusion/solution was reached. Have you encountered these issues in your EEG source reconstruction and if yes, how/did you manage to solve them? Thanks a lot! Maris -------------- next part -------------- An HTML attachment was scrubbed... URL: From rleese12 at berkeley.edu Thu Jul 28 18:01:57 2016 From: rleese12 at berkeley.edu (Nakyung Lee) Date: Thu, 28 Jul 2016 09:01:57 -0700 Subject: [FieldTrip] 'ft_redefinetrial' returning only one trial In-Reply-To: References: Message-ID: Hi Rui, In the code, the time (data.time{1,1}) is simply (1:NTime) (so it just increments by 1). Would it still matter? Thank you for your reply. Best, Rachel On Thu, Jul 28, 2016 at 12:58 AM, Rui Li wrote: > Hi, Rachel > > Probably because cfg.begsample and cfg.endsample should be sample points > of the begin and the end of the trails instead of the time; > > I am not sure; > > Regards, > Rui. > > On Thu, Jul 28, 2016 at 3:43 PM, Nakyung Lee > wrote: > >> Dear FieldTrip community, >> >> I've been having a problem calling 'ft_redefinetrial'. >> Basically with my raw data with one trial (simply 'data' here), I've >> been trying to segment that one trial into smaller trials (so I can get rid >> of 'bad_times') by using the following code: >> >> time = data.time{1,1}; >> bad_times = globals.bad_times_sorted; % a N*2 sorted double >> >> cfg.begsample = [time(1); bad_times(:,2) + 1]; >> cfg.endsample = [bad_times(:,1) - 1; time(end)]; >> >> data_good = ft_redefinetrial(cfg, data); >> >> However the code returns a data with only one trial. >> (i.e. the resulting data_good consists of only one trial which correspond >> to the time (time(1) : bad_times(1,1).) >> The code is very simple and I didn't really expect it to behave this way. >> Does anyone see why this is happening? >> Any type of help would be appreciated. >> >> Best regards, >> Rachel Lee >> >> >> _______________________________________________ >> fieldtrip mailing list >> fieldtrip at donders.ru.nl >> https://mailman.science.ru.nl/mailman/listinfo/fieldtrip >> > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > https://mailman.science.ru.nl/mailman/listinfo/fieldtrip > -------------- next part -------------- An HTML attachment was scrubbed... URL: From angela_rosink at live.nl Thu Jul 28 19:42:30 2016 From: angela_rosink at live.nl (Angela Rosink) Date: Thu, 28 Jul 2016 19:42:30 +0200 Subject: [FieldTrip] FW: ft_clusterplot In-Reply-To: References: Message-ID: Dear community, My name is Angela and I am working in the UvA Sleeplab in Amsterdam on sleep and memory. Currently I am analysing EEG data and want to make time frequency plots with corresponding topoplots revealing statistical differences between conditions. I already got time frequency plots, but I'm having problems with creating the topoplots and statistics. I preprocessed my data, did time frequency analysis on it with ft_freqanalysis, grandaveraged the single TFs across conditions with ft_freqgrandaverage (and plotted those results) and performed cluster based permutation statistics on it with ft_freqstatistics. I tried using ft_clusterplot to assess topographies with highlighted clusters originating from ft_freqstatistics. When I called it, I got several results ranging from not being able to plot anything because dimensions were wrong, to 57 clusterplots. (why?)I got the message that dimord dimensions were exceeded, its not supporting chan_freq_time. Because I have a priori knowledge, I averaged over a frequency range with: cfg.frequency = [5 8]; cfg.avgoverfreq = 'yes';. Then I was able to plot, but giving strange results. (See attachtment 1-4). I tried cfg.zlim with maxmin and also without specifing it, without result.In order to solve the dimension problem I used ft_freqdescriptives, also shown at the example at your website, resulting in a lot of topographies which I cannot use. I tried to plot cfg.parameter = 'stat' and with cfg.parameter = 'raweffect', where stat is the outcome of ft_freqstatistics and stat.raweffect = grandavg1.powspctrm - grandavg3 as shown at http://www.fieldtriptoolbox.org/tutorial/cluster_permutation_freq at: Between trial experiments under: Plotting the results. But then again I'm getting an error: Error using ft_clusterplot (line 151), unsupported dimord chan_unknown_time. Because the grandaveraged data with freqdescriptives is again 3D, chan_freq_time. The cfg and data I use are as follows:>> display(cfg) cfg = alpha: 0.0250 parameter: 'raweffect' layout: 'waveguard_layout_064ch2.lay' >> display(stat) stat = prob: [65x1x351 double] posclusters: [1x2 struct] posclusterslabelmat: [65x1x351 double] posdistribution: [1x500 double] negclusters: [1x3 struct] negclusterslabelmat: [65x1x351 double] negdistribution: [1x500 double] cirange: [65x1x351 double] mask: [65x1x351 logical] stat: [65x1x351 double] ref: [65x1x351 double] dimord: 'chan_freq_time' freq: 6.4898 label: {65x1 cell} time: [1x351 double] cfg: [1x1 struct] raweffect: [65x35x351 double] >> display(grandavg1) grandavg1 = powspctrm: [4-D double] label: {65x1 cell} freq: [1x35 double] time: [1x351 double] dimord: 'subj_chan_freq_time' cfg: [1x1 struct] >> display(grandavg3) grandavg3 = powspctrm: [4-D double] label: {65x1 cell} freq: [1x35 double] time: [1x351 double] dimord: 'subj_chan_freq_time' cfg: [1x1 struct] Can someone tell me if there is something wrong with the cfg settings I use or if I am doing something wrong at any other place? Any help would be appreciated! I also included my script starting from time frequency analysis. I used only 2 subjects per condition (condition 3 being control) only to try out my script, because I once already processed my data wrongly and I want to avoid that I have to redo all my data over and over. I'm not the best programmer, but it should give an idea of my most recent settings. All the best,Angela -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: 3.png Type: image/png Size: 154986 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: 4.png Type: image/png Size: 120671 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: Cluster calculation.docx Type: application/vnd.openxmlformats-officedocument.wordprocessingml.document Size: 14663 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: 1.png Type: image/png Size: 166140 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: 2.png Type: image/png Size: 167393 bytes Desc: not available URL: From elam4hcp at gmail.com Thu Jul 28 23:43:07 2016 From: elam4hcp at gmail.com (Jennifer Elam) Date: Thu, 28 Jul 2016 16:43:07 -0500 Subject: [FieldTrip] Register NOW for the 2016 HCP Course (Boston, 28 August - September 1)! Message-ID: The 2016 HCP Course: “Exploring the Human Connectome” starts in one month: August 28-September 1 in Boston! There are still some open slots, but we encourage you to Register today! The HCP Course is the best place to learn directly from HCP investigators and to explore HCP data and methods. This year's course will provide hands-on experience in working with the new, multi-modal human cortical parcellation (Glasser et al., Nature, July 20, http://www.ncbi.nlm.nih.gov/pubmed/27437579) and with the “HCP-Style” paradigm for data acquisition, analysis, and sharing (Glasser et al., Nature Neuroscience, in press). The 2016 HCP Course curriculum (see the full Course Schedule ) includes over *20 Lectures and 15 Practicals* and will be presented by 19 HCP investigators and staff and and will be held over *five full days: August 28-September 1 (Sunday-Thursday) *at the Joseph B. Martin Conference Center at Harvard Medical School , in Boston, Massachusetts, USA. If you have any questions, please contact us at hcpcourse at humanconnectome.org Hope to see you in Boston! Best, 2016 HCP Course Staff Jennifer Elam, Ph.D. Scientific Outreach, Human Connectome Project Washington University School of Medicine Department of Neuroscience, Box 8108 660 South Euclid Avenue St. Louis, MO 63110 314-362-9387 elam at wustl.edu www.humanconnectome.org -------------- next part -------------- An HTML attachment was scrubbed... URL: From ruil3 at student.unimelb.edu.au Fri Jul 29 06:19:31 2016 From: ruil3 at student.unimelb.edu.au (Rui Li) Date: Fri, 29 Jul 2016 14:19:31 +1000 Subject: [FieldTrip] 'ft_redefinetrial' returning only one trial In-Reply-To: References: Message-ID: hi, cfg.begsample = [time(1); bad_times(:,2) + 1]; cfg.endsample = [bad_times(:,1) - 1; time(end)]; How about the rest three time samples: bad_times(:,2)+1, bad_times(:,1)-1 and time(end)? Are they samples or the time? Regards, Rui. On Fri, Jul 29, 2016 at 2:01 AM, Nakyung Lee wrote: > Hi Rui, > > In the code, the time (data.time{1,1}) is simply (1:NTime) (so it just > increments by 1). > Would it still matter? > Thank you for your reply. > > Best, > Rachel > > On Thu, Jul 28, 2016 at 12:58 AM, Rui Li > wrote: > >> Hi, Rachel >> >> Probably because cfg.begsample and cfg.endsample should be sample points >> of the begin and the end of the trails instead of the time; >> >> I am not sure; >> >> Regards, >> Rui. >> >> On Thu, Jul 28, 2016 at 3:43 PM, Nakyung Lee >> wrote: >> >>> Dear FieldTrip community, >>> >>> I've been having a problem calling 'ft_redefinetrial'. >>> Basically with my raw data with one trial (simply 'data' here), I've >>> been trying to segment that one trial into smaller trials (so I can get rid >>> of 'bad_times') by using the following code: >>> >>> time = data.time{1,1}; >>> bad_times = globals.bad_times_sorted; % a N*2 sorted double >>> >>> cfg.begsample = [time(1); bad_times(:,2) + 1]; >>> cfg.endsample = [bad_times(:,1) - 1; time(end)]; >>> >>> data_good = ft_redefinetrial(cfg, data); >>> >>> However the code returns a data with only one trial. >>> (i.e. the resulting data_good consists of only one trial which >>> correspond to the time (time(1) : bad_times(1,1).) >>> The code is very simple and I didn't really expect it to behave this way. >>> Does anyone see why this is happening? >>> Any type of help would be appreciated. >>> >>> Best regards, >>> Rachel Lee >>> >>> >>> _______________________________________________ >>> fieldtrip mailing list >>> fieldtrip at donders.ru.nl >>> https://mailman.science.ru.nl/mailman/listinfo/fieldtrip >>> >> >> >> _______________________________________________ >> fieldtrip mailing list >> fieldtrip at donders.ru.nl >> https://mailman.science.ru.nl/mailman/listinfo/fieldtrip >> > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > https://mailman.science.ru.nl/mailman/listinfo/fieldtrip > -------------- next part -------------- An HTML attachment was scrubbed... URL: From angela_rosink at live.nl Fri Jul 29 10:45:31 2016 From: angela_rosink at live.nl (Angela Rosink) Date: Fri, 29 Jul 2016 10:45:31 +0200 Subject: [FieldTrip] Unsupported dimord in ft_clusterplot Message-ID: Dear community,I noticed that my previous email had a wrong layout, therefore I'm posting my question again. My name is Angela and I am working in the UvA Sleeplab in Amsterdam on sleep and memory. Currently I am analysing EEG data and want to make time frequency plots with corresponding topoplots revealing statistical differences between conditions. I already got time frequency plots, but I'm having problems with creating the topoplots and statistics. I preprocessed my data, did time frequency analysis on it with ft_freqanalysis, grandaveraged the single TFs across conditions with ft_freqgrandaverage (and plotted those results) and performed cluster based permutation statistics on it with ft_freqstatistics. I tried using ft_clusterplot to assess topographies with highlighted clusters originating from ft_freqstatistics, but it's not working.When I call it, I got the message that dimord dimensions were exceeded, its not supporting chan_freq_time. Because I have a priori knowledge, I averaged over a frequency range with: cfg.frequency = [5 8]; cfg.avgoverfreq = 'yes'; during the ft_freqstatistics. Then I was able to plot, but giving strange results. (See on jumpshare.com: http://jmp.sh/qXfKbwY). I tried cfg.zlim with maxmin and also without specifing it, without result.In order to solve the dimension problem I used ft_freqdescriptives, also shown at the example at your website. I tried to plot cfg.parameter = 'stat' and with cfg.parameter = 'raweffect', where stat is the outcome of ft_freqstatistics and stat.raweffect = grandavg1.powspctrm - grandavg3.powspctrm as shown at http://www.fieldtriptoolbox.org/tutorial/cluster_permutation_freq at: Between trial experiments under: Plotting the results. But then again I'm getting an error: Error using ft_clusterplot (line 151), unsupported dimord chan_unknown_time. Because the grandaveraged data with freqdescriptives is again 3D, chan_freq_time.The cfg and data I use are as follows:>> display(cfg)cfg = alpha: 0.0250 parameter: 'raweffect' layout: 'waveguard_layout_064ch2.lay'>> display(stat)stat = prob: [65x1x351 double] posclusters: [1x2 struct] posclusterslabelmat: [65x1x351 double] posdistribution: [1x500 double] negclusters: [1x3 struct] negclusterslabelmat: [65x1x351 double] negdistribution: [1x500 double] cirange: [65x1x351 double] mask: [65x1x351 logical] stat: [65x1x351 double] ref: [65x1x351 double] dimord: 'chan_freq_time' freq: 6.4898 label: {65x1 cell} time: [1x351 double] cfg: [1x1 struct] raweffect: [65x35x351 double]>> display(grandavg1)grandavg1 = powspctrm: [4-D double] label: {65x1 cell} freq: [1x35 double] time: [1x351 double] dimord: 'subj_chan_freq_time' cfg: [1x1 struct]>> display(grandavg3)grandavg3 = powspctrm: [4-D double] label: {65x1 cell} freq: [1x35 double] time: [1x351 double] dimord: 'subj_chan_freq_time' cfg: [1x1 struct]Can someone tell me if there is something wrong with the cfg settings I use or if I am doing something wrong at any other place? Any help would be appreciated!I also included my script starting from time frequency analysis. I used only 2 subjects per condition (condition 3 being control) only to try out my script, because I once already processed my data wrongly and I want to avoid that I have to redo all my data over and over. See on jumpshare.com: http://jmp.sh/qXfKbwY I'm not the best programmer, but it should give an idea of my most recent settings. All the best,Angela -------------- next part -------------- An HTML attachment was scrubbed... URL: From rleese12 at berkeley.edu Sat Jul 30 00:37:57 2016 From: rleese12 at berkeley.edu (Nakyung Lee) Date: Fri, 29 Jul 2016 15:37:57 -0700 Subject: [FieldTrip] 'ft_redefinetrial' returning only one trial In-Reply-To: References: Message-ID: Hi Rui, Again thank you for your reply. They are samples as well. Hence the elements of the first row of bad_times, which is 141000, 146000, each represents the 141000th and 146000th indices of time and trial. And since time is simply and array of consecutive integers (so it acts just like indices) time(end) behaves just like a sample as well. Best, Rachel On Thu, Jul 28, 2016 at 9:19 PM, Rui Li wrote: > hi, > > cfg.begsample = [time(1); bad_times(:,2) + 1]; > cfg.endsample = [bad_times(:,1) - 1; time(end)]; > > How about the rest three time samples: bad_times(:,2)+1, bad_times(:,1)-1 > and time(end)? > > Are they samples or the time? > > Regards, > Rui. > > On Fri, Jul 29, 2016 at 2:01 AM, Nakyung Lee > wrote: > >> Hi Rui, >> >> In the code, the time (data.time{1,1}) is simply (1:NTime) (so it just >> increments by 1). >> Would it still matter? >> Thank you for your reply. >> >> Best, >> Rachel >> >> On Thu, Jul 28, 2016 at 12:58 AM, Rui Li >> wrote: >> >>> Hi, Rachel >>> >>> Probably because cfg.begsample and cfg.endsample should be sample points >>> of the begin and the end of the trails instead of the time; >>> >>> I am not sure; >>> >>> Regards, >>> Rui. >>> >>> On Thu, Jul 28, 2016 at 3:43 PM, Nakyung Lee >>> wrote: >>> >>>> Dear FieldTrip community, >>>> >>>> I've been having a problem calling 'ft_redefinetrial'. >>>> Basically with my raw data with one trial (simply 'data' here), I've >>>> been trying to segment that one trial into smaller trials (so I can get rid >>>> of 'bad_times') by using the following code: >>>> >>>> time = data.time{1,1}; >>>> bad_times = globals.bad_times_sorted; % a N*2 sorted double >>>> >>>> cfg.begsample = [time(1); bad_times(:,2) + 1]; >>>> cfg.endsample = [bad_times(:,1) - 1; time(end)]; >>>> >>>> data_good = ft_redefinetrial(cfg, data); >>>> >>>> However the code returns a data with only one trial. >>>> (i.e. the resulting data_good consists of only one trial which >>>> correspond to the time (time(1) : bad_times(1,1).) >>>> The code is very simple and I didn't really expect it to behave this >>>> way. >>>> Does anyone see why this is happening? >>>> Any type of help would be appreciated. >>>> >>>> Best regards, >>>> Rachel Lee >>>> >>>> >>>> _______________________________________________ >>>> fieldtrip mailing list >>>> fieldtrip at donders.ru.nl >>>> https://mailman.science.ru.nl/mailman/listinfo/fieldtrip >>>> >>> >>> >>> _______________________________________________ >>> fieldtrip mailing list >>> fieldtrip at donders.ru.nl >>> https://mailman.science.ru.nl/mailman/listinfo/fieldtrip >>> >> >> >> _______________________________________________ >> fieldtrip mailing list >> fieldtrip at donders.ru.nl >> https://mailman.science.ru.nl/mailman/listinfo/fieldtrip >> > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > https://mailman.science.ru.nl/mailman/listinfo/fieldtrip > -------------- next part -------------- An HTML attachment was scrubbed... URL: From laxmi.shaw22 at gmail.com Sun Jul 31 12:22:24 2016 From: laxmi.shaw22 at gmail.com (Laxmi Shaw) Date: Sun, 31 Jul 2016 15:52:24 +0530 Subject: [FieldTrip] queries_related to_error Message-ID: Dear Fieldtrip users, Suddenly i got one error while compiling any fieldtrip function based code.Please need your help to remove this error. I have attach the screen shot of that matlab program. [image: Inline image 1] Your helps always been appreciated. Regards -- Laxmi Shaw Research Scholar(PhD) IIT Kharagpur West Bengal Ph no-08388837821 -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image.png Type: image/png Size: 103003 bytes Desc: not available URL: