From ebrahimi_nia at yahoo.com Sat Jun 1 06:52:43 2013 From: ebrahimi_nia at yahoo.com (Fatemeh Ebrahimi nia) Date: Fri, 31 May 2013 21:52:43 -0700 (PDT) Subject: [FieldTrip] loreta2fieldtrip function error In-Reply-To: <1370015815.5183.YahooMailNeo@web122402.mail.ne1.yahoo.com> References: <1369934092.15336.YahooMailNeo@web122405.mail.ne1.yahoo.com> <51A78CC1.6030906@berkeley.edu> <1370015815.5183.YahooMailNeo@web122402.mail.ne1.yahoo.com> Message-ID: <1370062363.83888.YahooMailNeo@web122406.mail.ne1.yahoo.com> Hi Dear all, Can any one give me information about the output structure of "loreta2fieldtrip" function (What do the matrixes refer to?) or advise a reference to study about that please?  Best, Fatemeh ________________________________ From: Ingrid Nieuwenhuis To: fieldtrip at science.ru.nl Sent: Thursday, May 30, 2013 10:30 AM Subject: Re: [FieldTrip] loreta2fieldtrip function error Hi Fatemeh, I had the same error recently when I did the same. I filed the bug, see http://bugzilla.fcdonders.nl/show_bug.cgi?id=2144 I did create a work around. In the LORETA program, you can export the source data as a text file. You can read that text file in with loreta2fieldtrip.m. It's a bit of a patch, but it worked for me. Hope this helps, Ingrid On 5/30/2013 10:14 AM, Fatemeh Ebrahimi nia wrote: Hi dear all, > > >I am analyzing EEG data. I have computed sLORETA (.slor) from ERP data. Now I want to read and convert LORETA source reconstruction into a >MATLAB data structure using "loreta2fieldtrip" function, But I have gotten the bellow error. > > >**** Error using fread > >Invalid precision. >Error in loreta2fieldtrip (line 85) >activity = fread(fid, [voxnumber Ntime], 'float = >single'); *** > > >Can someone give me a help? > > > >Best regards, >Fatemeh > > > > >_______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -- Ingrid Nieuwenhuis PhD Postdoctoral Fellow Sleep and Neuroimaging Laboratory Department of Psychology University of California, Berkeley California 94720-1650 Tolman Hall, room 5305 _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -------------- next part -------------- An HTML attachment was scrubbed... URL: From politzerahless at gmail.com Sat Jun 1 20:44:04 2013 From: politzerahless at gmail.com (Stephen Politzer-Ahles) Date: Sat, 1 Jun 2013 13:44:04 -0500 Subject: [FieldTrip] Question about minimum norm estimate pipeline Message-ID: Hi Arjen, Thanks for your message. I did align the mri to Talairach; as you can see from http://i.imgur.com/26nyHYZ.png, the volume conduction model and sourcespace are both expressed in the same coordinate system (i.e., everything's pointing in the same direction) but they're just not sitting on top of one another. If anyone has any ideas on where that problem was introduced (or how to re-align them now), I would greatly appreciate it. Below I have some more details about how I processed that data, if it helps. I'm trying to go through the data one step at a time and track where the problem might have happened. When I compare the sourcespace before having applied any transformation (i.e., the headshape from -oct-6-src.fif) to the original mri (orig-nomask.mgz), they look ok (I don't know how to plot them together, but see http://i.imgur.com/LGW7YnJ.png and http://i.imgur.com/JUoTxc9.png -- things at least look like they're on more or less the same plane). Then I re-register the mri to CTF ( http://fieldtrip.fcdonders.nl/tutorial/minimumnormestimate#source_modelco-registration_of_the_source_space_to_the_sensor-based_head_coordinate_system); after that, in mri_nom_ctf, the axes are all going in the right direction but the whole head is tilted forward and the origin of the axes is no longer at the anterior commisure (see http://i.imgur.com/CTZNOTk.png for the realigned MRI). Applying the transformation matrix T to the sourcespace also seems to tilt it like that (http://i.imgur.com/bcNIpf3.png), although as can be seen from the first image in this message it doesn't quite line up with the volume conduction model in the end. As for the volume conduction model, here is what it looks like at first ( http://i.imgur.com/ZX3m38b.png) and here is what it looks like after applying the transformation matrix (http://i.imgur.com/vXa3Cnc.png). Obviously the transformation matrix is doing something, but it's not getting the sourcespace and volume conduction model lined up; since it's the same transformation matrix, all I can guess is that there was some pre-existing difference between the source mesh (the .fif file) and the anatomical mri (orig-nomask.mgz), but I'm not sure when that came in. Another minor issue: when I first compared the volume conduction model and the sourcespace, they were expressed in different units even though I followed the code in the tutorial. See http://i.imgur.com/orwgcTJ.png: the sourcespace looks 10x smaller than the volume conduction model, which I assume is because it is expressed in cm whereas the volume conduction model is expressed in mm. To get the figure linked at the very beginning of this message, I had to convert the units of the volume conduction model to cm, even though that's not in the tutorial. I notice that the tutorial on the wiki hasn't been edited since October 2012 (other than a few edits I made this month which were just correcting typos in the prose). Is it possible that what's on the wiki is out of date? (Also cc'ing Lilla on this.) Thanks, Steve > Message: 1 > Date: Fri, 31 May 2013 08:11:23 +0200 (CEST) > From: "Stolk, A." > To: FieldTrip discussion list > Subject: Re: [FieldTrip] Question about minimum norm estimate pipeline > Message-ID: > < 1914237354.1292588.1369980683984.JavaMail.root at sculptor.zimbra.ru.nl> > Content-Type: text/plain; charset="utf-8" > > Hi Steve, A quick guess; did you correctly align your resliced mri to Talairach space by indicating the commissures ( http://imaging.mrc-cbu.cam.ac.uk/imaging/FindingCommissures ) and, if I'm correct, a point in the same place, e.g. between the hemispheres? This should update the transformation matrix. Best regards, Arjen ----- Oorspronkelijk bericht ----- > > Van: "Stephen Politzer-Ahles" > > Aan: fieldtrip at science.ru.nl > > Verzonden: Vrijdag 31 mei 2013 05:53:45 > > Onderwerp: [FieldTrip] Question about minimum norm estimate pipeline > > Hello all, > > I have not yet gotten a response to my question below, but in the > > meantime I have another question about the minimum norm estimate > > workflow--specifically, about the coordinate system for the > > skull-stripped anatomy in the step described at > > http://fieldtrip.fcdonders.nl/tutorial/minimumnormestimate#preprocessing_of_the_anatomical_mrisave_to_disk > > . I'm confused by the following bit of code: > > % ensure that the skull-stripped anatomy is expressed in the same > > coordinate system as the anatomy > > seg.transform = mri_tal.transform; > > In my data, mri_tal.coordsys is 'spm' (I presume this is the result of > > re-aligning to Talairach in the previous step?) whereas seg.coordsys > > is 'ctf' (as a result of re-aligning to CTF several steps earlier). > > (But mri_tal also has a field mri_tal.transformorig, which seg does > > not have.) So should I really be using the same transform for both, as > > shown in the tutorial? > > Apologies if this question is pretty basic; I'm just trying to > > pinpoint where the mis-alignment described in my message below > > occurred, so I want to make sure I understand each step of the > > workflow correctly > > Best, > > Steve > > > Message: 1 > > > Date: Sat, 25 May 2013 08:11:18 -0500 > > > From: Stephen Politzer-Ahles < politzerahless at gmail.com > > > > To: fieldtrip at donders.ru.nl > > > Subject: [FieldTrip] Sourcespace and volume conductor misaligned > > > Message-ID: > > > > > > > > > Content-Type: text/plain; charset="utf-8" > > > > > > Hello all, > > > > > > I am going through the workflow at > > > http://fieldtrip.fcdonders.nl/tutorial/minimumnormestimate . After > > > making > > > the volume conduction model using ft_prepare_headmodel(), I noticed > > > that > > > although the volume conduction model and sourcespace have the same > > > orientation and overall size/shape (after I converted the volume > > > conduction > > > model to cm, which wasn't in the tutorial but my original model came > > > out in > > > mm), they don't quite line up, as you can see in this figure: > > > > > > http://i.imgur.com/mGEtLOa.png > > > > > > I did interactively re-align the data to CTF (twice--in step 2 of > > > "Preprocessing of the anatomical MRI" and in step 4 of "Source > > > model") > > > using fiducials, and to Talairach (step 5 of "Preprocessing of the > > > anatomical data"), so I'm not sure how it ended up this way. The > > > code I've > > > used at each step is basically the same as that in the tutorial. > > > > > > Is there any way to line up my volume conduction model and > > > sourcespace now, > > > without going back and re-running most of the workflow? > > > > > > Best, > > > Steve > > > > > > -- > > > Stephen Politzer-Ahles > > > University of Kansas > > > Linguistics Department > > > http://people.ku.edu/~sjpa/ > > On Sat, May 25, 2013 at 1:56 PM, < fieldtrip-request at science.ru.nl > > > wrote: > > > > > > Send fieldtrip mailing list submissions to > > > fieldtrip at science.ru.nl > > > > > > To subscribe or unsubscribe via the World Wide Web, visit > > > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > > or, via email, send a message with subject or body 'help' to > > > fieldtrip-request at science.ru.nl > > > > > > You can reach the person managing the list at > > > fieldtrip-owner at science.ru.nl > > > > > > When replying, please edit your Subject line so it is more specific > > > than "Re: Contents of fieldtrip digest..." > > > > > > > > > Today's Topics: > > > > > > 1. Sourcespace and volume conductor misaligned > > > (Stephen Politzer-Ahles) > > > 2. Re: fieldtrip Digest, Vol 30, Issue 31 (Johanna Zumer) > > > > > > > > > ---------------------------------------------------------------------- > > > > > > Message: 1 > > > Date: Sat, 25 May 2013 08:11:18 -0500 > > > From: Stephen Politzer-Ahles < politzerahless at gmail.com > > > > To: fieldtrip at donders.ru.nl > > > Subject: [FieldTrip] Sourcespace and volume conductor misaligned > > > Message-ID: > > > > > > > > > Content-Type: text/plain; charset="utf-8" > > > > > > Hello all, > > > > > > I am going through the workflow at > > > http://fieldtrip.fcdonders.nl/tutorial/minimumnormestimate . After > > > making > > > the volume conduction model using ft_prepare_headmodel(), I noticed > > > that > > > although the volume conduction model and sourcespace have the same > > > orientation and overall size/shape (after I converted the volume > > > conduction > > > model to cm, which wasn't in the tutorial but my original model came > > > out in > > > mm), they don't quite line up, as you can see in this figure: > > > > > > http://i.imgur.com/mGEtLOa.png > > > > > > I did interactively re-align the data to CTF (twice--in step 2 of > > > "Preprocessing of the anatomical MRI" and in step 4 of "Source > > > model") > > > using fiducials, and to Talairach (step 5 of "Preprocessing of the > > > anatomical data"), so I'm not sure how it ended up this way. The > > > code I've > > > used at each step is basically the same as that in the tutorial. > > > > > > Is there any way to line up my volume conduction model and > > > sourcespace now, > > > without going back and re-running most of the workflow? > > > > > > Best, > > > Steve > > > > > > -- > > > Stephen Politzer-Ahles > > > University of Kansas > > > Linguistics Department > > > http://people.ku.edu/~sjpa/ -------------- next part -------------- An HTML attachment was scrubbed... URL: From Lilla.Magyari at mpi.nl Sat Jun 1 23:22:34 2013 From: Lilla.Magyari at mpi.nl (Lilla.Magyari at mpi.nl) Date: Sat, 1 Jun 2013 23:22:34 +0200 (CEST) Subject: [FieldTrip] Question about minimum norm estimate pipeline In-Reply-To: References: Message-ID: <2765.87.78.47.204.1370121754.squirrel@87.78.47.204> hi Steve, yes, it is possible that the tutorial is slightly out of the date. I can look at your problem and the tutorial around the end of the next week. Thanks a lot for the detailed email! Lilla > Hi Arjen, > > Thanks for your message. I did align the mri to Talairach; as you can see > from http://i.imgur.com/26nyHYZ.png, the volume conduction model and > sourcespace are both expressed in the same coordinate system (i.e., > everything's pointing in the same direction) but they're just not sitting > on top of one another. If anyone has any ideas on where that problem was > introduced (or how to re-align them now), I would greatly appreciate it. > Below I have some more details about how I processed that data, if it > helps. > > I'm trying to go through the data one step at a time and track where the > problem might have happened. When I compare the sourcespace before having > applied any transformation (i.e., the headshape from > -oct-6-src.fif) to the original mri (orig-nomask.mgz), they look > ok (I don't know how to plot them together, but see > http://i.imgur.com/LGW7YnJ.png and http://i.imgur.com/JUoTxc9.png -- > things > at least look like they're on more or less the same plane). Then I > re-register the mri to CTF ( > http://fieldtrip.fcdonders.nl/tutorial/minimumnormestimate#source_modelco-registration_of_the_source_space_to_the_sensor-based_head_coordinate_system); > after that, in mri_nom_ctf, the axes are all going in the right direction > but the whole head is tilted forward and the origin of the axes is no > longer at the anterior commisure (see http://i.imgur.com/CTZNOTk.png for > the realigned MRI). Applying the transformation matrix T to the > sourcespace also seems to tilt it like that > (http://i.imgur.com/bcNIpf3.png), > although as can be seen from the first image in this message it doesn't > quite line up with the volume conduction model in the end. As for the > volume conduction model, here is what it looks like at first ( > http://i.imgur.com/ZX3m38b.png) and here is what it looks like after > applying the transformation matrix (http://i.imgur.com/vXa3Cnc.png). > Obviously the transformation matrix is doing something, but it's not > getting the sourcespace and volume conduction model lined up; since it's > the same transformation matrix, all I can guess is that there was some > pre-existing difference between the source mesh (the .fif file) and the > anatomical mri (orig-nomask.mgz), but I'm not sure when that came in. > > Another minor issue: when I first compared the volume conduction model and > the sourcespace, they were expressed in different units even though I > followed the code in the tutorial. See http://i.imgur.com/orwgcTJ.png: the > sourcespace looks 10x smaller than the volume conduction model, which I > assume is because it is expressed in cm whereas the volume conduction > model > is expressed in mm. To get the figure linked at the very beginning of this > message, I had to convert the units of the volume conduction model to cm, > even though that's not in the tutorial. > > I notice that the tutorial on the wiki hasn't been edited since October > 2012 (other than a few edits I made this month which were just correcting > typos in the prose). Is it possible that what's on the wiki is out of > date? > (Also cc'ing Lilla on this.) > > Thanks, > Steve > > > >> Message: 1 >> Date: Fri, 31 May 2013 08:11:23 +0200 (CEST) >> From: "Stolk, A." >> To: FieldTrip discussion list >> Subject: Re: [FieldTrip] Question about minimum norm estimate pipeline >> Message-ID: >> < > 1914237354.1292588.1369980683984.JavaMail.root at sculptor.zimbra.ru.nl> >> Content-Type: text/plain; charset="utf-8" >> >> Hi Steve, A quick guess; did you correctly align your resliced mri to > Talairach space by indicating the commissures ( > http://imaging.mrc-cbu.cam.ac.uk/imaging/FindingCommissures ) and, if I'm > correct, a point in the same place, e.g. between the hemispheres? This > should update the transformation matrix. Best regards, Arjen ----- > Oorspronkelijk bericht ----- >> > Van: "Stephen Politzer-Ahles" >> > Aan: fieldtrip at science.ru.nl >> > Verzonden: Vrijdag 31 mei 2013 05:53:45 >> > Onderwerp: [FieldTrip] Question about minimum norm estimate pipeline >> > Hello all, >> > I have not yet gotten a response to my question below, but in the >> > meantime I have another question about the minimum norm estimate >> > workflow--specifically, about the coordinate system for the >> > skull-stripped anatomy in the step described at >> > > http://fieldtrip.fcdonders.nl/tutorial/minimumnormestimate#preprocessing_of_the_anatomical_mrisave_to_disk >> > . I'm confused by the following bit of code: >> > % ensure that the skull-stripped anatomy is expressed in the same >> > coordinate system as the anatomy >> > seg.transform = mri_tal.transform; >> > In my data, mri_tal.coordsys is 'spm' (I presume this is the result of >> > re-aligning to Talairach in the previous step?) whereas seg.coordsys >> > is 'ctf' (as a result of re-aligning to CTF several steps earlier). >> > (But mri_tal also has a field mri_tal.transformorig, which seg does >> > not have.) So should I really be using the same transform for both, as >> > shown in the tutorial? >> > Apologies if this question is pretty basic; I'm just trying to >> > pinpoint where the mis-alignment described in my message below >> > occurred, so I want to make sure I understand each step of the >> > workflow correctly >> > Best, >> > Steve >> > > Message: 1 >> > > Date: Sat, 25 May 2013 08:11:18 -0500 >> > > From: Stephen Politzer-Ahles < politzerahless at gmail.com > >> > > To: fieldtrip at donders.ru.nl >> > > Subject: [FieldTrip] Sourcespace and volume conductor misaligned >> > > Message-ID: >> > > > > > > >> > > Content-Type: text/plain; charset="utf-8" >> > > >> > > Hello all, >> > > >> > > I am going through the workflow at >> > > http://fieldtrip.fcdonders.nl/tutorial/minimumnormestimate . After >> > > making >> > > the volume conduction model using ft_prepare_headmodel(), I noticed >> > > that >> > > although the volume conduction model and sourcespace have the same >> > > orientation and overall size/shape (after I converted the volume >> > > conduction >> > > model to cm, which wasn't in the tutorial but my original model came >> > > out in >> > > mm), they don't quite line up, as you can see in this figure: >> > > >> > > http://i.imgur.com/mGEtLOa.png >> > > >> > > I did interactively re-align the data to CTF (twice--in step 2 of >> > > "Preprocessing of the anatomical MRI" and in step 4 of "Source >> > > model") >> > > using fiducials, and to Talairach (step 5 of "Preprocessing of the >> > > anatomical data"), so I'm not sure how it ended up this way. The >> > > code I've >> > > used at each step is basically the same as that in the tutorial. >> > > >> > > Is there any way to line up my volume conduction model and >> > > sourcespace now, >> > > without going back and re-running most of the workflow? >> > > >> > > Best, >> > > Steve >> > > >> > > -- >> > > Stephen Politzer-Ahles >> > > University of Kansas >> > > Linguistics Department >> > > http://people.ku.edu/~sjpa/ >> > On Sat, May 25, 2013 at 1:56 PM, < fieldtrip-request at science.ru.nl > >> > wrote: >> > > >> > > Send fieldtrip mailing list submissions to >> > > fieldtrip at science.ru.nl >> > > >> > > To subscribe or unsubscribe via the World Wide Web, visit >> > > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip >> > > or, via email, send a message with subject or body 'help' to >> > > fieldtrip-request at science.ru.nl >> > > >> > > You can reach the person managing the list at >> > > fieldtrip-owner at science.ru.nl >> > > >> > > When replying, please edit your Subject line so it is more specific >> > > than "Re: Contents of fieldtrip digest..." >> > > >> > > >> > > Today's Topics: >> > > >> > > 1. Sourcespace and volume conductor misaligned >> > > (Stephen Politzer-Ahles) >> > > 2. Re: fieldtrip Digest, Vol 30, Issue 31 (Johanna Zumer) >> > > >> > > >> > > ---------------------------------------------------------------------- >> > > >> > > Message: 1 >> > > Date: Sat, 25 May 2013 08:11:18 -0500 >> > > From: Stephen Politzer-Ahles < politzerahless at gmail.com > >> > > To: fieldtrip at donders.ru.nl >> > > Subject: [FieldTrip] Sourcespace and volume conductor misaligned >> > > Message-ID: >> > > > > > > >> > > Content-Type: text/plain; charset="utf-8" >> > > >> > > Hello all, >> > > >> > > I am going through the workflow at >> > > http://fieldtrip.fcdonders.nl/tutorial/minimumnormestimate . After >> > > making >> > > the volume conduction model using ft_prepare_headmodel(), I noticed >> > > that >> > > although the volume conduction model and sourcespace have the same >> > > orientation and overall size/shape (after I converted the volume >> > > conduction >> > > model to cm, which wasn't in the tutorial but my original model came >> > > out in >> > > mm), they don't quite line up, as you can see in this figure: >> > > >> > > http://i.imgur.com/mGEtLOa.png >> > > >> > > I did interactively re-align the data to CTF (twice--in step 2 of >> > > "Preprocessing of the anatomical MRI" and in step 4 of "Source >> > > model") >> > > using fiducials, and to Talairach (step 5 of "Preprocessing of the >> > > anatomical data"), so I'm not sure how it ended up this way. The >> > > code I've >> > > used at each step is basically the same as that in the tutorial. >> > > >> > > Is there any way to line up my volume conduction model and >> > > sourcespace now, >> > > without going back and re-running most of the workflow? >> > > >> > > Best, >> > > Steve >> > > >> > > -- >> > > Stephen Politzer-Ahles >> > > University of Kansas >> > > Linguistics Department >> > > http://people.ku.edu/~sjpa/ > From frank.ye.mei at gmail.com Sun Jun 2 03:58:29 2013 From: frank.ye.mei at gmail.com (Frank Mei) Date: Sat, 1 Jun 2013 21:58:29 -0400 Subject: [FieldTrip] error when using ctf2grad (Lozano Soldevilla, D. (Diego)) Message-ID: Hello Diego, Thank you for the reply. I was using fieldtrip20120822. I found the bug in the fieldtrip20120822 file -ft_read_header.m. In line 446 of the file: ------- if any(~cellfun(@isempty,strfind(coeftype, 'G1AR'))) ------- should be: ------- if any(~cellfun(@isempty,strfind(coeftype, 'G3AR'))) ------- The bug is corrected in the latest version of fieldtrip, and it runs correctly now. Now, grad.balance has 'G1BR','G2BR','G3BR''G3AR' in it. The ctf sytem I use is ctf151. Regards, Ye -------------- next part -------------- An HTML attachment was scrubbed... URL: From vitoria.piai at gmail.com Sun Jun 2 11:17:25 2013 From: vitoria.piai at gmail.com (=?ISO-8859-1?Q?Vit=F3ria_Magalh=E3es_Piai?=) Date: Sun, 02 Jun 2013 11:17:25 +0200 Subject: [FieldTrip] how to use ft_stratify? Message-ID: <51AB0DA5.10805@gmail.com> Hi all, I'm trying to use ft_stratify for the first time, but (it could be just me) I don't find the help info helpful enough :) What I want to achieve in the end is TFRs of two conditions for which the histogram of the reaction time over trials for each condition is matched. If I understood ft_stratify correctly (and I doubt that), I could use this function to select the trials for each condition such that the histograms of the RTs match. Then knowing which trials to keep, I run ft_freqanalysis on those specifically. So question number 1, is that how I should proceed? 'Cause as far as I can tell, ft_stratify will not take a whole raw data structure: The help says "each input is a Nchan X Nobs matrix". So I have to go for the RTs then. Assuming my approach is correct (ft_stratify on RTs of two conditions, then move on with only those trials), I've made a matrix Nchan x N_trials for each condition. % input1 = 265 sensors x 95 RT_trials; % input2 = 265 sensors x 100 RT_trials; cfgst = []; cfgst.method = 'histogram'; cfgst.equalbinavg = 'no'; cfgst.numbin = 4; cfgst.numiter = 2000; % default [output,bin] = ft_stratify(cfgst, input1, input2); I then get an error in line 127: linearhisto = zeros(ncond, cfg.numbin.^nchan); ??? Error using ==> zeros Maximum variable size allowed by the program is exceeded. Apparently, zeros(2, 4^265) is something matlab doesn't want to calculate! Am I doing something wrong here? Has anyone worked with this function before (with such a number of sensors)? Any help is greatly appreciated! Cheers, Vitória From a.stolk at fcdonders.ru.nl Sun Jun 2 11:46:03 2013 From: a.stolk at fcdonders.ru.nl (Stolk, A.) Date: Sun, 2 Jun 2013 11:46:03 +0200 (CEST) Subject: [FieldTrip] how to use ft_stratify? In-Reply-To: <51AB0DA5.10805@gmail.com> Message-ID: <1910615072.1312606.1370166363974.JavaMail.root@sculptor.zimbra.ru.nl> Hi Vitoria, There is a wikipage that may help you get started, and answer your questions: http://fieldtrip.fcdonders.nl/example/stratify Best wishes, Arjen ----- Oorspronkelijk bericht ----- > Van: "Vitória Magalhães Piai" > Aan: fieldtrip at donders.ru.nl > Verzonden: Zondag 2 juni 2013 11:17:25 > Onderwerp: [FieldTrip] how to use ft_stratify? > Hi all, > > I'm trying to use ft_stratify for the first time, but (it could be > just > me) I don't find the help info helpful enough :) > What I want to achieve in the end is TFRs of two conditions for which > the histogram of the reaction time over trials for each condition is > matched. > > If I understood ft_stratify correctly (and I doubt that), I could use > this function to select the trials for each condition such that the > histograms of the RTs match. Then knowing which trials to keep, I run > ft_freqanalysis on those specifically. > So question number 1, is that how I should proceed? 'Cause as far as I > can tell, ft_stratify will not take a whole raw data structure: The > help > says "each input is a Nchan X Nobs matrix". So I have to go for the > RTs > then. > > Assuming my approach is correct (ft_stratify on RTs of two conditions, > then move on with only those trials), I've made a matrix Nchan x > N_trials for each condition. > % input1 = 265 sensors x 95 RT_trials; > % input2 = 265 sensors x 100 RT_trials; > > cfgst = []; > cfgst.method = 'histogram'; > cfgst.equalbinavg = 'no'; > cfgst.numbin = 4; > cfgst.numiter = 2000; % default > [output,bin] = ft_stratify(cfgst, input1, input2); > > I then get an error in line 127: > linearhisto = zeros(ncond, cfg.numbin.^nchan); > ??? Error using ==> zeros > Maximum variable size allowed by the program is exceeded. > > Apparently, zeros(2, 4^265) is something matlab doesn't want to > calculate! > Am I doing something wrong here? Has anyone worked with this function > before (with such a number of sensors)? > > Any help is greatly appreciated! > Cheers, Vitória > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip From vitoria.piai at gmail.com Sun Jun 2 17:09:34 2013 From: vitoria.piai at gmail.com (=?ISO-8859-1?Q?Vit=F3ria_Magalh=E3es_Piai?=) Date: Sun, 02 Jun 2013 17:09:34 +0200 Subject: [FieldTrip] how to use ft_stratify? In-Reply-To: References: Message-ID: <51AB602E.8020609@gmail.com> Thanx, Arjen! Shame on me, I should have known that there would be a wikipage on that :) And for the sake of archiving, in case someone else ever bumps into this thread because they're making the same mistake as me when using this function, here's what I was doing wrong: The input Nchan x N_trials for each condition, Nchan should be 1 'cause my data are the RTs So: % input1 = RT_trials_cond1' ; % size = 1 x 95 % input2 = RT_trials_cond2' ; % size = 1 x 100 cfgst = []; cfgst.method = 'histogram'; output = ft_stratify(cfgst, input1, input2); Now it will run and it won't even complain they are of different sizes either! Hope this will help anyone in the future making the same mistake! Cheers, Vitória On 6/2/2013 12:00 PM, fieldtrip-request at science.ru.nl wrote: > Message: 2 > Date: Sun, 02 Jun 2013 11:17:25 +0200 > From: Vit?ria Magalh?es Piai > To:fieldtrip at donders.ru.nl > Subject: [FieldTrip] how to use ft_stratify? > Message-ID:<51AB0DA5.10805 at gmail.com> > Content-Type: text/plain; charset=ISO-8859-1; format=flowed > > Hi all, > > I'm trying to use ft_stratify for the first time, but (it could be just > me) I don't find the help info helpful enough:) > What I want to achieve in the end is TFRs of two conditions for which > the histogram of the reaction time over trials for each condition is > matched. > > If I understood ft_stratify correctly (and I doubt that), I could use > this function to select the trials for each condition such that the > histograms of the RTs match. Then knowing which trials to keep, I run > ft_freqanalysis on those specifically. > So question number 1, is that how I should proceed? 'Cause as far as I > can tell, ft_stratify will not take a whole raw data structure: The help > says "each input is a Nchan X Nobs matrix". So I have to go for the RTs > then. > > Assuming my approach is correct (ft_stratify on RTs of two conditions, > then move on with only those trials), I've made a matrix Nchan x > N_trials for each condition. > % input1 = 265 sensors x 95 RT_trials; > % input2 = 265 sensors x 100 RT_trials; > > cfgst = []; > cfgst.method = 'histogram'; > cfgst.equalbinavg = 'no'; > cfgst.numbin = 4; > cfgst.numiter = 2000; % default > [output,bin] = ft_stratify(cfgst, input1, input2); > > I then get an error in line 127: > linearhisto = zeros(ncond, cfg.numbin.^nchan); > ??? Error using ==> zeros > Maximum variable size allowed by the program is exceeded. > > Apparently, zeros(2, 4^265) is something matlab doesn't want to calculate! > Am I doing something wrong here? Has anyone worked with this function > before (with such a number of sensors)? > > Any help is greatly appreciated! > Cheers, Vit?ria > > > ------------------------------ > > Message: 3 > Date: Sun, 2 Jun 2013 11:46:03 +0200 (CEST) > From: "Stolk, A." > To: FieldTrip discussion list > Subject: Re: [FieldTrip] how to use ft_stratify? > Message-ID: > <1910615072.1312606.1370166363974.JavaMail.root at sculptor.zimbra.ru.nl> > Content-Type: text/plain; charset=utf-8 > > Hi Vitoria, > > There is a wikipage that may help you get started, and answer your questions: > http://fieldtrip.fcdonders.nl/example/stratify > > Best wishes, > Arjen -------------- next part -------------- An HTML attachment was scrubbed... URL: From d.stoffers at gmail.com Mon Jun 3 10:12:17 2013 From: d.stoffers at gmail.com (Diederick Stoffers) Date: Mon, 3 Jun 2013 10:12:17 +0200 Subject: [FieldTrip] Postdoc positions available at the Netherlands Institute for Neuroscience in Amsterdam In-Reply-To: <21E5F1A0-241E-43B6-957B-18A7767A7B51@gmail.com> References: <21E5F1A0-241E-43B6-957B-18A7767A7B51@gmail.com> Message-ID: <8B956BE9-4168-4ED4-B0E9-47FE260EAEE4@gmail.com> Dear all, Please find attached a description of postdoc positions available at the Netherlands Institute for Neuroscience in Amsterdam, which I am posting on behalf of my group leader Eus van Someren (cc). Relevant keywords for these positions are sleep, emotion, arousal, high-density EEG, fMRI, TMS, insomnia, internet assessment, database, latent class and latent trait analysis. Cheers, Diederick -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: VacancyPostdoc.pdf Type: application/pdf Size: 454314 bytes Desc: not available URL: From d.stoffers at gmail.com Mon Jun 3 10:20:20 2013 From: d.stoffers at gmail.com (Diederick Stoffers) Date: Mon, 3 Jun 2013 10:20:20 +0200 Subject: [FieldTrip] Postdoc positions available at the Netherlands Institute for Neuroscience in Amsterdam In-Reply-To: <8B956BE9-4168-4ED4-B0E9-47FE260EAEE4@gmail.com> References: <21E5F1A0-241E-43B6-957B-18A7767A7B51@gmail.com> <8B956BE9-4168-4ED4-B0E9-47FE260EAEE4@gmail.com> Message-ID: <6DACABEC-925B-4E71-A7A2-FB8C7B2A60D1@gmail.com> Dear all, Please find attached a description of postdoc positions available at the Netherlands Institute for Neuroscience in Amsterdam, which I am posting on behalf of my group leader Eus van Someren (cc). Relevant keywords for these positions are sleep, emotion, arousal, high-density EEG, fMRI, TMS, insomnia, internet assessment, database, latent class and latent trait analysis. Cheers, Diederick NB Apologies if you receive this message twice, the initial message was rejected by some servers because it exceeded maximum message size. -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: VacancyPostdoc_reduced.pdf Type: application/pdf Size: 86280 bytes Desc: not available URL: From jm.horschig at donders.ru.nl Mon Jun 3 10:59:49 2013 From: jm.horschig at donders.ru.nl (=?ISO-8859-1?Q?=22J=F6rn_M=2E_Horschig=22?=) Date: Mon, 03 Jun 2013 10:59:49 +0200 Subject: [FieldTrip] channel combination problems In-Reply-To: <27E5CAD9145EEC41BB9B34C01716A1983046156B@UM-EXCDAG-A01.um.gwdg.de> References: <27E5CAD9145EEC41BB9B34C01716A1983046156B@UM-EXCDAG-A01.um.gwdg.de> Message-ID: <51AC5B05.2020409@donders.ru.nl> Hi Thomas, that is indeed a bug that we are currently working on, see also here: http://bugzilla.fcdonders.nl/show_bug.cgi?id=2148 A workaround for the moment is to call this: coh.dimord = 'chancmb_freq'; coh = ft_checkdata(coh, 'cmbrepresentation', 'full'); As you asked what the difference between the two is: Connectivity measures are define between two signals, or channels. So, for example you compute coherence between channel1 and channel2. In FieldTrip there are two ways to represent this: Either by a 3D NxMxF matrix or by a 2D (NxM)xF matrix, where F denotes the frequency dimension and N and M are the in- or output channels (coherence is a symmetric measure, so N=M). In other words, we can either represent it as a three dimensional matrix, where the first dimension denotes the input and the second the output channels, or we represent it as a two dimensional matrix, where the first dimension denotes the relation between in- and output channels. The latter is what we call a channelcombination (chancmb). It can be channel1->channel2 (meaning, influence from channel1 to channel 2). The same in a three dimensional matrix would be channel1 for dimension 1 and channel 2 for dimension 2. The workaround above converts from one to the other convention. If your data is in 'cmbrepresentation;, you will have 'labelcmb' which is a 2D cell-matrix, and your data dimensions (dimord) will be 'chancmb_XXX', where a single dimension respective to labelcmb defines the channel combination. If your data is not in 'cmbrepresentation', you will have a 1D 'label' field and your data dimension (dimord) will be 'chan_chan_XXX', this a 2D channel combinations that explains the channel combination. Btw, I am not aware that you can define cfg.labelcmb in any function, imho it is always cfg.channelcmb. Best, Jörn On 5/31/2013 11:42 AM, Wunderle, Thomas wrote: > > Hi all, > > I'm new in fieldtrip and I try to get the cfg.channelcmb to work, > because I want to plot the connectivity between the channels of > different laminar electrodes, > > let's say the connectivity between channel 1:24 and 25:38 > > I tried the following: > > cfg = []; > > cfg.method = 'mtmfft'; > > cfg.taper = 'dpss'; > > cfg.output = 'fourier'; > > cfg.tapsmofrq = 1; > > freq = ft_freqanalysis(cfg, data) > > The output is: > > >> freq > > freq = > > label: {3x1 cell} > > dimord: 'rpttap_chan_freq' > > freq: [1x101 double] > > fourierspctrm: [500x3x101 double] > > cumsumcnt: [500x1 double] > > cumtapcnt: [500x1 double] > > cfg: [1x1 struct] > > I then run > > cfg = []; > > cfg.method = 'coh'; > > cfg.channelcmb = {freq.label{1} freq.label{2};freq.label{2} > freq.label{1}}; > > coh= ft_connectivityanalysis(cfg, freq); > > And the output here is: > > >> coh > > coh = > > labelcmb: {2x2 cell} > > dimord: 'chan_freq' > > cohspctrm: [2x101 double] > > freq: [1x101 double] > > dof: 500 > > cfg: [1x1 struct] > > As you can seen, the output of dimord is 'chan_freq' so in the > subsequent call of ft_connectivityplot I get an error message: > > cfg = []; > > cfg.parameter = 'cohspctrm'; > > ft_connectivityplot(cfg, coh); > > ??? Error using ==> ft_connectivityplot at 99 > > the data should have a dimord of chan_chan_freq or chancmb_freq > > If I use in ft_freqanalysis the cfg.method = 'powandcsd', > cfg.channelcmb seems to have no effect at all, > > the coherence is computed for all possible pairs. > > I also don't understand the difference between "cfg.channelcmb" and > "cfg.labelcmb" > > Can you help me in how I should correctly use the cannelcmb and > labelcmb options? > > Thanks for your help, > > Thomas > > ----- > > Dr. Thomas Wunderle > > Ernst Strüngmann Institute (ESI) for Neuroscience > > > in Cooperation with Max Planck Society > > > Deutschordenstrasse 46 > > 60528 Frankfurt am Main, Germany > > www.esi-frankfurt.de > > thomas.wunderle at esi-frankfurt.de > > Tel: +49 69 96769 519 > > Fax: +49 69 96769 555 > > Sitz der Gesellschaft: Frankfurt am Main > > Registergericht: Amtsgericht Frankfurt - HRB 84266 > > Geschäftsführer: Prof. Dr. Pascal Fries > > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -- Jörn M. Horschig PhD Student Donders Institute for Brain, Cognition and Behaviour Centre for Cognitive Neuroimaging Radboud University Nijmegen Neuronal Oscillations Group FieldTrip Development Team P.O. Box 9101 NL-6500 HB Nijmegen The Netherlands Contact: E-Mail: jm.horschig at donders.ru.nl Tel: +31-(0)24-36-68493 Web: http://www.ru.nl/donders Visiting address: Trigon, room 2.30 Kapittelweg 29 NL-6525 EN Nijmegen The Netherlands -------------- next part -------------- An HTML attachment was scrubbed... URL: From jm.horschig at donders.ru.nl Mon Jun 3 11:30:34 2013 From: jm.horschig at donders.ru.nl (=?ISO-8859-1?Q?=22J=F6rn_M=2E_Horschig=22?=) Date: Mon, 03 Jun 2013 11:30:34 +0200 Subject: [FieldTrip] some of the requested samples occur twice In-Reply-To: References: Message-ID: <51AC623A.1080207@donders.ru.nl> Hi Robin, it's not a bug that ft_fetch_data is not allowing for overlap. The function needs to be generic and eventually allow for fetching data extending over several trial segments. However, what should be the way to fetch data that occurs twice, i.e. at the end of one trial and the beginning of another? If you have data with overlapping samples, it is not straight forward to define data from one trial as to be fetched and ignore the other. Since preprocessing options like filters are applied per trial segment, data will differ between trial segments if it overlaps. As there are a multitude of possibilities to deal with this and none of them is perfect (imho neither of them can even be called good), we decided to not allow for that. For your problem, however, imho you can define negative trial padding in the function call to ft_artifact_zvalue, which should effectively pad. Have you tried this rather than padding manually? Best, Jörn On 5/31/2013 6:14 PM, Robin wrote: > I have a problem in preprocessing where I am getting this error: > > """ > some of the requested samples occur twice in the data > > Error in ft_artifact_zvalue (line 262) > dat{trlop} = ft_fetch_data(data, 'header', hdr, 'begsample', > trl(trlop,1)-fltpadding, 'endsample', trl(trlop,2)+fltpadding, > 'chanindx', sgnind, 'checkboundary', strcmp(cfg.continuous,'no > Error in ft_artifact_muscle (line 158) > [tmpcfg, artifact] = ft_artifact_zvalue(tmpcfg, data); > """ > > I think this is because I am manually adding some extra padding to the > trials so that the artifact filtering can use that padding (I am doing > the artifact filtering on data in memory which is output from > ft_denoise_pca). So in this case it is not a problem if consecutive > trials overlap a bit. > > I would therefore like to disable this error and wondered what is the > best way to do it. I am a bit confused because ft_artifact_zvalue > calls ft_fetch data with a "checkboundary" option which looks like it > might be what I want (and set correctly), but ft_fetch_data doesn't > seem to use that option. Instead it has an allowoverlap option. > > So for now I will manually add the allowoverlap option to the call in > ft_artifact_zvalue, but I wondered what checkboundary doesn't appear > in ft_fetch_data or if this might be a bug. > > Cheers > > Robin > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -- Jörn M. Horschig PhD Student Donders Institute for Brain, Cognition and Behaviour Centre for Cognitive Neuroimaging Radboud University Nijmegen Neuronal Oscillations Group FieldTrip Development Team P.O. Box 9101 NL-6500 HB Nijmegen The Netherlands Contact: E-Mail: jm.horschig at donders.ru.nl Tel: +31-(0)24-36-68493 Web: http://www.ru.nl/donders Visiting address: Trigon, room 2.30 Kapittelweg 29 NL-6525 EN Nijmegen The Netherlands From julian.keil at gmail.com Mon Jun 3 17:14:08 2013 From: julian.keil at gmail.com (Julian Keil) Date: Mon, 3 Jun 2013 17:14:08 +0200 Subject: [FieldTrip] Polhemus Patriot Message-ID: <67D8C434-4D28-40C3-94A6-A95C86BD6B78@gmail.com> Dear FieldTrip-Users, I have a not really FieldTrip-related question, but maybe one of you can help me anyways. In our lab, we have a Polhemus Patriot 3D tracking system to acquire electrode positions. Unfortunately, the recordings are severely distorted in the Z-axis (up-down). After contacting the Polhemus Support, I got the information, that this is due to metal in the surroundings of the source which distorts the magnetic field. I tried to get as far away from any metal as possible in our lab (~1.5 m to the walls and floor) but to no avail. Now to my question: Has anyone any experience dealing with this? I'm quite puzzled by this as I know plenty of labs use Polhemus trackers, and I'm not sure if our lab is especially metal prone or if I'm missing something. Thanks a lot for any help. Julian ******************** Dr. Julian Keil AG Multisensorische Integration Psychiatrische Universitätsklinik der Charité im St. Hedwig-Krankenhaus Große Hamburger Straße 5-11, Raum E 307 10115 Berlin Telefon: +49-30-2311-1879 Fax: +49-30-2311-2209 http://psy-ccm.charite.de/forschung/bildgebung/ag_multisensorische_integration -------------- next part -------------- An HTML attachment was scrubbed... URL: From inieuwenhuis at berkeley.edu Mon Jun 3 17:52:14 2013 From: inieuwenhuis at berkeley.edu (Ingrid Nieuwenhuis) Date: Mon, 03 Jun 2013 08:52:14 -0700 Subject: [FieldTrip] loreta2fieldtrip function error In-Reply-To: <1370015815.5183.YahooMailNeo@web122402.mail.ne1.yahoo.com> References: <1369934092.15336.YahooMailNeo@web122405.mail.ne1.yahoo.com> <51A78CC1.6030906@berkeley.edu> <1370015815.5183.YahooMailNeo@web122402.mail.ne1.yahoo.com> Message-ID: <51ACBBAE.4070508@berkeley.edu> Hi Fatameh, - In the LORETA program, you go to main utilities > Format converter. - There you select: input binary file (sLORETA) - It does not matter which format for output you choose, I coded it robust, it'll figure it out. As it says, rows are time points, columns are the volume-gridpoints (called voxels) - After using loreta2fieldtrip the data is in normal FieldTrip volume format, see here: http://fieldtrip.fcdonders.nl/reference/ft_datatype_volume To get familiar with FieldTrip source plotting etc, see the tutorials, for instance: http://fieldtrip.fcdonders.nl/tutorial/plotting - The following steps are: 1) create a template: template = ft_read_mri([cur_path_FT, '\external\spm8\templates\T1.nii']); 2) interpolate your volume on the MNI template: [interp_mean] = ft_sourceinterpolate(cfg, GA_mean, template); 3) plot it using ft_sourceplot Hope it helps, Ingrid On 5/31/2013 8:56 AM, Fatemeh Ebrahimi nia wrote: > Dear respondent, > > Thank you for your advices. > I have used the function that you have updated. It works out. Can you > give me information about the output structure (What do the matrixes > refer to?) or advise a reference to study about that please? > > Best, > Fatemeh > > > ------------------------------------------------------------------------ > *From:* Ingrid Nieuwenhuis > *To:* fieldtrip at science.ru.nl > *Sent:* Thursday, May 30, 2013 10:30 AM > *Subject:* Re: [FieldTrip] loreta2fieldtrip function error > > Hi Fatemeh, > > I had the same error recently when I did the same. I filed the bug, > see http://bugzilla.fcdonders.nl/show_bug.cgi?id=2144 > > I did create a work around. In the LORETA program, you can export the > source data as a text file. You can read that text file in with > loreta2fieldtrip.m. It's a bit of a patch, but it worked for me. > > Hope this helps, > Ingrid > > On 5/30/2013 10:14 AM, Fatemeh Ebrahimi nia wrote: >> Hi dear all, >> >> I am analyzing EEG data. I have computed sLORETA (.slor) from ERP >> data. Now I want to read and convert LORETA source reconstruction into a >> MATLAB data structure using "loreta2fieldtrip" function, But I have >> gotten the bellow error. >> >> **** Error using fread >> Invalid precision. >> Error in loreta2fieldtrip (line 85) >> activity = fread(fid, [voxnumber Ntime], 'float = >single'); *** >> >> Can someone give me a help? >> >> Best regards, >> Fatemeh >> >> >> >> _______________________________________________ >> fieldtrip mailing list >> fieldtrip at donders.ru.nl >> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > -- > Ingrid Nieuwenhuis PhD > Postdoctoral Fellow > Sleep and Neuroimaging Laboratory > Department of Psychology > University of California, Berkeley > California 94720-1650 > Tolman Hall, room 5305 > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -- Ingrid Nieuwenhuis PhD Postdoctoral Fellow Sleep and Neuroimaging Laboratory Department of Psychology University of California, Berkeley California 94720-1650 Tolman Hall, room 5305 -------------- next part -------------- An HTML attachment was scrubbed... URL: From smoratti at psi.ucm.es Mon Jun 3 18:07:40 2013 From: smoratti at psi.ucm.es (smoratti at psi.ucm.es) Date: Mon, 3 Jun 2013 18:07:40 +0200 Subject: [FieldTrip] Polhemus Patriot In-Reply-To: <67D8C434-4D28-40C3-94A6-A95C86BD6B78@gmail.com> References: <67D8C434-4D28-40C3-94A6-A95C86BD6B78@gmail.com> Message-ID: Dear Julian, Maybe a stupid answer and probably you have taken care of this already, but does the chair have any metal? We use an IKEA wooden garden chair. Best, Stephan ________________________________________________________ Stephan Moratti, PhD see also: http://web.me.com/smoratti/ Universidad Complutense de Madrid Facultad de Psicología Departamento de Psicología Básica I Campus de Somosaguas 28223 Pozuelo de Alarcón (Madrid) Spain and Center for Biomedical Technology Laboratory for Cognitive and Computational Neuroscience Parque Científico y Tecnológico de la Universidad Politecnica de Madrid Campus Montegancedo 28223 Pozuelo de Alarcón (Madrid) Spain email: smoratti at psi.ucm.es Tel.: +34 679219982 El 03/06/2013, a las 17:14, Julian Keil escribió: > Dear FieldTrip-Users, > > I have a not really FieldTrip-related question, but maybe one of you can help me anyways. > In our lab, we have a Polhemus Patriot 3D tracking system to acquire electrode positions. > Unfortunately, the recordings are severely distorted in the Z-axis (up-down). > After contacting the Polhemus Support, I got the information, that this is due to metal in the surroundings of the source which distorts the magnetic field. > I tried to get as far away from any metal as possible in our lab (~1.5 m to the walls and floor) but to no avail. > > Now to my question: Has anyone any experience dealing with this? I'm quite puzzled by this as I know plenty of labs use Polhemus trackers, and I'm not sure if our lab is especially metal prone or if I'm missing something. > > Thanks a lot for any help. > > Julian > > ******************** > Dr. Julian Keil > > AG Multisensorische Integration > Psychiatrische Universitätsklinik > der Charité im St. Hedwig-Krankenhaus > Große Hamburger Straße 5-11, Raum E 307 > 10115 Berlin > > Telefon: +49-30-2311-1879 > Fax: +49-30-2311-2209 > http://psy-ccm.charite.de/forschung/bildgebung/ag_multisensorische_integration > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -------------- next part -------------- An HTML attachment was scrubbed... URL: From sarang.dalal at uni-konstanz.de Mon Jun 3 18:16:02 2013 From: sarang.dalal at uni-konstanz.de (Sarang S. Dalal) Date: Mon, 3 Jun 2013 09:16:02 -0700 Subject: [FieldTrip] Polhemus Patriot In-Reply-To: References: Message-ID: <27A129F9-9570-4D6B-BBF9-48080801F980@uni-konstanz.de> Dear Julian, At UCSF, we were unable to use a Polhemus (an older model, not sure which) in the shielded room of the MEG, so we performed the digitization just outside the room before moving the subject inside. Perhaps if you have a nicely shielded EEG booth you have the same problem... Sarang On Jun 3, 2013, at 9:08 AM, fieldtrip-request at science.ru.nl wrote: > Date: Mon, 3 Jun 2013 17:14:08 +0200 > From: Julian Keil > To: FieldTrip discussion list > Subject: [FieldTrip] Polhemus Patriot > Message-ID: <67D8C434-4D28-40C3-94A6-A95C86BD6B78 at gmail.com> > Content-Type: text/plain; charset="iso-8859-1" > > Dear FieldTrip-Users, > > I have a not really FieldTrip-related question, but maybe one of you can help me anyways. > In our lab, we have a Polhemus Patriot 3D tracking system to acquire electrode positions. > Unfortunately, the recordings are severely distorted in the Z-axis (up-down). > After contacting the Polhemus Support, I got the information, that this is due to metal in the surroundings of the source which distorts the magnetic field. > I tried to get as far away from any metal as possible in our lab (~1.5 m to the walls and floor) but to no avail. > > Now to my question: Has anyone any experience dealing with this? I'm quite puzzled by this as I know plenty of labs use Polhemus trackers, and I'm not sure if our lab is especially metal prone or if I'm missing something. > > Thanks a lot for any help. > > Julian > > ******************** > Dr. Julian Keil > > AG Multisensorische Integration > Psychiatrische Universit?tsklinik > der Charit? im St. Hedwig-Krankenhaus > Gro?e Hamburger Stra?e 5-11, Raum E 307 > 10115 Berlin > > Telefon: +49-30-2311-1879 > Fax: +49-30-2311-2209 > http://psy-ccm.charite.de/forschung/bildgebung/ag_multisensorische_integration From inieuwenhuis at berkeley.edu Mon Jun 3 18:25:47 2013 From: inieuwenhuis at berkeley.edu (Ingrid Nieuwenhuis) Date: Mon, 03 Jun 2013 09:25:47 -0700 Subject: [FieldTrip] format conversion In-Reply-To: <1369986505.7865.YahooMailNeo@web192306.mail.sg3.yahoo.com> References: <1369986505.7865.YahooMailNeo@web192306.mail.sg3.yahoo.com> Message-ID: <51ACC38B.9080802@berkeley.edu> Hi Bahar, I've added more info on the FieldTrip wiki about this for you and other. See here: http://fieldtrip.fcdonders.nl/integrating_with_loreta Hope it helps, Ingrid On 5/31/2013 12:48 AM, Bahar Bahar wrote: > Hi dear all, > > I have a technical question about format converter module via sLORETA > software (.slor file to .txt one). Can any one give me some > information about the conversion procedure (and the meaning of the > column and row of the output file)? > > Thanks, > bahar > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -- Ingrid Nieuwenhuis PhD Postdoctoral Fellow Sleep and Neuroimaging Laboratory Department of Psychology University of California, Berkeley California 94720-1650 Tolman Hall, room 5305 -------------- next part -------------- An HTML attachment was scrubbed... URL: From andmib at gmail.com Mon Jun 3 22:15:49 2013 From: andmib at gmail.com (Andrew Brooks) Date: Mon, 3 Jun 2013 16:15:49 -0400 Subject: [FieldTrip] Private function problems Message-ID: Hello all, I followed the instructions on properly adding FieldTrip to the Matlab path file. However, I continue to run into errors involving private functions. In this case, I get the error 'undefined function 'hom2six' for input arguments of type 'double''. Does anybody have a suggestion as to why this is occurring? Thanks! Andrew -------------- next part -------------- An HTML attachment was scrubbed... URL: From d.lozanosoldevilla at fcdonders.ru.nl Mon Jun 3 22:53:41 2013 From: d.lozanosoldevilla at fcdonders.ru.nl (Lozano Soldevilla, D. (Diego)) Date: Mon, 3 Jun 2013 22:53:41 +0200 (CEST) Subject: [FieldTrip] Private function problems In-Reply-To: Message-ID: <481032685.1338448.1370292821035.JavaMail.root@sculptor.zimbra.ru.nl> Hi Andrew, Did you type the following? >> restoredefaultpath >> addpath /fieldtripxxxx >> ft_defaults What's the ft_* function you invoke to get the error 'undefined function 'hom2six'? And what's the fieldtrip version you're using? best, Diego ----- Original Message ----- > From: "Andrew Brooks" > To: "FieldTrip discussion list" > Sent: Monday, 3 June, 2013 10:15:49 PM > Subject: [FieldTrip] Private function problems > Hello all, > I followed the instructions on properly adding FieldTrip to the Matlab > path file. However, I continue to run into errors involving private > functions. In this case, I get the error 'undefined function 'hom2six' > for input arguments of type 'double''. > Does anybody have a suggestion as to why this is occurring? > Thanks! > Andrew > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -- PhD Student Neuronal Oscillations Group Donders Institute for Brain, Cognition and Behaviour Centre for Cognitive Neuroimaging Trigon, room 0.83 Kapittelweg 29 Radboud University Nijmegen NL-6525 EN Nijmegen The Netherlands E-Mail: d.lozanosoldevilla at fcdonders.ru.nl Tel: +31-(0)24-36-66274 Web: http://www.neuosc.com/ -------------- next part -------------- An HTML attachment was scrubbed... URL: From 13681530640 at 139.com Tue Jun 4 04:16:18 2013 From: 13681530640 at 139.com (WangJing) Date: Tue, 4 Jun 2013 10:16:18 +0800 (CST) Subject: [FieldTrip] Question about Head Model References: Message-ID: <2af951ad49e020a-0000c.Richmail.00026806626265132618@139.com> HI everyone, When I build head model,I encount some questions. 1.for two Functions ft_volumereslice and ft_volumerealign,which should be run firstly? 2. when surfaces are created at the boarders of the different tissue-types by the ft_prepare_mesh function. how to determine the parameter cfg.numvertices? 3.when I build the head model,using the following codes: cfg = []; cfg.method ='dipoli'; cfg.cond =[0.3300 0.004125 0.3300]; vol = ft_prepare_headmodel(cfg, bnd); the error message is: ??? Error using ==> surface_nesting at 26 the compartment nesting cannot be determined Error in ==> ft_headmodel_dipoli at 84 order = surface_nesting(vol.bnd, 'outsidefirst'); Error in ==> ft_prepare_headmodel at 226 vol = ft_headmodel_dipoli(geometry,'conductivity',cfg.conductivity,'isolatedsource',cfg.isolatedsource); Error in ==> Myheadmodel at 5 vol = ft_prepare_headmodel(cfg, bnd); I don't know where is wrong.who can help me? Thank you! Best Regards, Jing Wang -------------- next part -------------- An HTML attachment was scrubbed... URL: From sauer.mpih at googlemail.com Tue Jun 4 11:42:13 2013 From: sauer.mpih at googlemail.com (Andreas Sauer) Date: Tue, 4 Jun 2013 11:42:13 +0200 Subject: [FieldTrip] NaNs as output of ft_sourceanalysis (DICS) Message-ID: Dear all, I would like to analyze sources with the beamforming approach using the DICS method. I followed the steps in the tutorial and everything works well. However, the output of ft_sourceanalysis contains only NaNs. I checked the TF data that I calculated in the step before but that looks fine, so I assume the error happens somewhere during ft_sourceanalysis. That's how I calculate the TFRs: cfg = []; cfg.toilim = [-0.5 -0.3]; % baseline activity eval(['dataPre = ft_redefinetrial(cfg,Cond_',num2str(cond(j)),');']); cfg.toilim = [0.1 1.0]; % task-related activity eval(['dataPost = ft_redefinetrial(cfg,Cond_',num2str(cond(j)),');']); % Combine the two datasets... data = appenddata(cfg, dataPre, dataPost); trialdesign = [ones(1,length(dataPost.trial)) ones(1,length(dataPre.trial))*2]; % ... and compute the CSD matrices... cfg = []; cfg.output = 'powandcsd'; cfg.channel = Channel.meg; cfg.method = 'mtmfft'; cfg.taper = 'dpss'; cfg.foilim = [75 75]; cfg.tapsmofrq = 15; % amount of spectral smoothing = +/- 15 Hz cfg.channelcmb = {Channel.meg Channel.meg}; % ... for the baseline and task part separately... eval(['freqPre.Cond_',num2str(cond(j)), ' = ft_freqanalysis(cfg,dataPre);']); eval(['freqPost.Cond_',num2str(cond(j)), ' = ft_freqanalysis(cfg,dataPost);']); % ... and for the whole trial eval(['freqAll.Cond_',num2str(cond(j)), ' = ft_freqanalysis(cfg,data);']); eval(['freqAll.Cond_',num2str(cond(j)), '.trialdesign = trialdesign;']); % pre and post info And that's how I calculate the sources: cfg = []; cfg.frequency = 75; cfg.method = 'dics'; cfg.grid = grid; % Here it gives .pos, .inside, .outside to the structure cfg.vol = vol; cfg.dim = template_grid.dim; % Here I give the dimension of the template grid cfg.grad = Cond_101.hdr.grad; cfg.lambda = '5%'; cfg.reducerank = 'no'; cfg.projectnoise = 'yes'; cfg.realfilter = 'yes'; cfg.keepfilter = 'yes'; % the output saves the computed inverse filter eval(['SourceAll = ft_sourceanalysis(cfg, freqAll.Cond_',num2str(cond(k)),');']) % use the common filter here cfg.grid.filter = SourceAll.avg.filter; eval(['sourcePre_con = ft_sourceanalysis(cfg, freqPre.Cond_',num2str(cond(k)),');']) eval(['sourcePost_con = ft_sourceanalysis(cfg, freqPost.Cond_',num2str(cond(k)),');']) I would really appreciate any help with that! Thanks a lot! Best, Andreas -- Andreas Sauer Max Planck Institute for Brain Research Deutschordenstr. 46 60528 Frankfurt am Main Germany T: +49 69 96769 278 F: +49 69 96769 327 Email: andreas.sauer at brain.mpg.de www.brain.mpg.de -------------- next part -------------- An HTML attachment was scrubbed... URL: From sauer.mpih at googlemail.com Tue Jun 4 11:52:24 2013 From: sauer.mpih at googlemail.com (Andreas Sauer) Date: Tue, 4 Jun 2013 11:52:24 +0200 Subject: [FieldTrip] NaNs as outpout of ft_sourceanalysis (DICS) Message-ID: Dear all, I would like to analyze sources with the beamforming approach using the DICS method. I followed the steps in the tutorial and everything works well. However, the output of ft_sourceanalysis contains only NaNs. I checked the TF data that I calculated in the step before but that looks fine, so I assume the error happens somewhere during ft_sourceanalysis. That's how I calculate the TFRs: cfg = []; cfg.toilim = [-0.5 -0.3]; % baseline activity eval(['dataPre = ft_redefinetrial(cfg,Cond_',num2str(cond(j)),');']); cfg.toilim = [0.1 1.0]; % task-related activity eval(['dataPost = ft_redefinetrial(cfg,Cond_',num2str(cond(j)),');']); % Combine the two datasets... data = appenddata(cfg, dataPre, dataPost); trialdesign = [ones(1,length(dataPost.trial)) ones(1,length(dataPre.trial))*2]; % ... and compute the CSD matrices... cfg = []; cfg.output = 'powandcsd'; cfg.channel = Channel.meg; cfg.method = 'mtmfft'; cfg.taper = 'dpss'; cfg.foilim = [75 75]; cfg.tapsmofrq = 15; % amount of spectral smoothing = +/- 15 Hz cfg.channelcmb = {Channel.meg Channel.meg}; % ... for the baseline and task part separately... eval(['freqPre.Cond_',num2str(cond(j)), ' = ft_freqanalysis(cfg,dataPre);']); eval(['freqPost.Cond_',num2str(cond(j)), ' = ft_freqanalysis(cfg,dataPost);']); % ... and for the whole trial eval(['freqAll.Cond_',num2str(cond(j)), ' = ft_freqanalysis(cfg,data);']); eval(['freqAll.Cond_',num2str(cond(j)), '.trialdesign = trialdesign;']); % pre and post info And that's how I calculate the sources: cfg = []; cfg.frequency = 75; cfg.method = 'dics'; cfg.grid = grid; % Here it gives .pos, .inside, .outside to the structure cfg.vol = vol; cfg.dim = template_grid.dim; % Here I give the dimension of the template grid cfg.grad = Cond_101.hdr.grad; cfg.lambda = '5%'; cfg.reducerank = 'no'; cfg.projectnoise = 'yes'; cfg.realfilter = 'yes'; cfg.keepfilter = 'yes'; % the output saves the computed inverse filter eval(['SourceAll = ft_sourceanalysis(cfg, freqAll.Cond_',num2str(cond(k)),');']) % use the common filter here cfg.grid.filter = SourceAll.avg.filter; eval(['sourcePre_con = ft_sourceanalysis(cfg, freqPre.Cond_',num2str(cond(k)),');']) eval(['sourcePost_con = ft_sourceanalysis(cfg, freqPost.Cond_',num2str(cond(k)),');']) I would really appreciate any help with that! Thanks a lot! Best, Andreas -- Andreas Sauer Max Planck Institute for Brain Research Deutschordenstr. 46 60528 Frankfurt am Main Germany T: +49 69 96769 278 F: +49 69 96769 327 Email: andreas.sauer at brain.mpg.de www.brain.mpg.de -------------- next part -------------- An HTML attachment was scrubbed... URL: From eelke.spaak at donders.ru.nl Tue Jun 4 11:54:51 2013 From: eelke.spaak at donders.ru.nl (Eelke Spaak) Date: Tue, 4 Jun 2013 11:54:51 +0200 Subject: [FieldTrip] NaNs as output of ft_sourceanalysis (DICS) In-Reply-To: References: Message-ID: Dear Andreas, How many NaNs do you get exactly and in which field? If it is some NaNs in source.avg.pow, then it is quite normal: the estimates for dipole locations which were flagged as outside the brain are always NaN, as they are not scanned. The following should hold: sum(isnan(source.avg.pow)) == numel(source.outside) && sum(~isnan(source.avg.pow)) == numel(source.inside) Best, Eelke On 4 June 2013 11:42, Andreas Sauer wrote: > Dear all, > > I would like to analyze sources with the beamforming approach using the DICS > method. I followed the steps in the tutorial and everything works well. > However, the output of ft_sourceanalysis contains only NaNs. > > I checked the TF data that I calculated in the step before but that looks > fine, so I assume the error happens somewhere during ft_sourceanalysis. > > That's how I calculate the TFRs: > > cfg = []; > cfg.toilim = [-0.5 -0.3]; % baseline activity > eval(['dataPre = > ft_redefinetrial(cfg,Cond_',num2str(cond(j)),');']); > cfg.toilim = [0.1 1.0]; % task-related activity > eval(['dataPost = > ft_redefinetrial(cfg,Cond_',num2str(cond(j)),');']); > > % Combine the two datasets... > data = appenddata(cfg, dataPre, dataPost); > trialdesign = [ones(1,length(dataPost.trial)) > ones(1,length(dataPre.trial))*2]; > > % ... and compute the CSD matrices... > cfg = []; > cfg.output = 'powandcsd'; > cfg.channel = Channel.meg; > cfg.method = 'mtmfft'; > cfg.taper = 'dpss'; > cfg.foilim = [75 75]; > cfg.tapsmofrq = 15; % amount of spectral smoothing = +/- 15 Hz > cfg.channelcmb = {Channel.meg Channel.meg}; > > % ... for the baseline and task part separately... > eval(['freqPre.Cond_',num2str(cond(j)), ' = > ft_freqanalysis(cfg,dataPre);']); > eval(['freqPost.Cond_',num2str(cond(j)), ' = > ft_freqanalysis(cfg,dataPost);']); > > % ... and for the whole trial > eval(['freqAll.Cond_',num2str(cond(j)), ' = > ft_freqanalysis(cfg,data);']); > eval(['freqAll.Cond_',num2str(cond(j)), '.trialdesign = > trialdesign;']); % pre and post info > > And that's how I calculate the sources: > > cfg = []; > cfg.frequency = 75; > cfg.method = 'dics'; > cfg.grid = grid; % Here it gives .pos, .inside, .outside to > the structure > cfg.vol = vol; > cfg.dim = template_grid.dim; % Here I give the dimension > of the template grid > cfg.grad = Cond_101.hdr.grad; > cfg.lambda = '5%'; > cfg.reducerank = 'no'; > cfg.projectnoise = 'yes'; > cfg.realfilter = 'yes'; > cfg.keepfilter = 'yes'; % the output saves the computed inverse > filter > > eval(['SourceAll = ft_sourceanalysis(cfg, > freqAll.Cond_',num2str(cond(k)),');']) > > % use the common filter here > cfg.grid.filter = SourceAll.avg.filter; > eval(['sourcePre_con = ft_sourceanalysis(cfg, > freqPre.Cond_',num2str(cond(k)),');']) > eval(['sourcePost_con = ft_sourceanalysis(cfg, > freqPost.Cond_',num2str(cond(k)),');']) > > > > I would really appreciate any help with that! Thanks a lot! > > Best, > > Andreas > > -- > Andreas Sauer > Max Planck Institute for Brain Research > Deutschordenstr. 46 > 60528 Frankfurt am Main > Germany > > T: +49 69 96769 278 > F: +49 69 96769 327 > Email: andreas.sauer at brain.mpg.de > www.brain.mpg.de > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip From jm.horschig at donders.ru.nl Tue Jun 4 12:17:37 2013 From: jm.horschig at donders.ru.nl (=?ISO-8859-1?Q?=22J=F6rn_M=2E_Horschig=22?=) Date: Tue, 04 Jun 2013 12:17:37 +0200 Subject: [FieldTrip] NaNs as output of ft_sourceanalysis (DICS) In-Reply-To: References: Message-ID: <51ADBEC1.5060204@donders.ru.nl> Hi Andreas, could it be related to the fact that you redefine your trials and when estimating the frequency content, there is no exact 75Hz bin, thus ft_sourceanalysis cannot beam the frequency you specify? Since you cut out the pre- and poststimulus periods with different lengths, the frequency resolution will be strongly different, thus an estimate of 75Hz will effectively be somewhere around 75Hz, but not exactly 75Hz. You could try to set cfg.frequency=freqAll.Cond_(yourNumberedCondition).freq instead of cfg.frequency=75. Note that in this case, sourceAll might have non-nans, but sourcePre and sourcePost will probably still have nans due to the resolution issue If that's not the case, then I agree also with Eelke that more information is needed to help you, e.g. in which of the three source structures are nans? How many nans are there (try all(isnan(source.avg.pow(:))))? Best, Jörn On 6/4/2013 11:54 AM, Eelke Spaak wrote: > Dear Andreas, > > How many NaNs do you get exactly and in which field? If it is some > NaNs in source.avg.pow, then it is quite normal: the estimates for > dipole locations which were flagged as outside the brain are always > NaN, as they are not scanned. The following should hold: > > sum(isnan(source.avg.pow)) == numel(source.outside) > && > sum(~isnan(source.avg.pow)) == numel(source.inside) > > Best, > Eelke > > On 4 June 2013 11:42, Andreas Sauer wrote: >> Dear all, >> >> I would like to analyze sources with the beamforming approach using the DICS >> method. I followed the steps in the tutorial and everything works well. >> However, the output of ft_sourceanalysis contains only NaNs. >> >> I checked the TF data that I calculated in the step before but that looks >> fine, so I assume the error happens somewhere during ft_sourceanalysis. >> >> That's how I calculate the TFRs: >> >> cfg = []; >> cfg.toilim = [-0.5 -0.3]; % baseline activity >> eval(['dataPre = >> ft_redefinetrial(cfg,Cond_',num2str(cond(j)),');']); >> cfg.toilim = [0.1 1.0]; % task-related activity >> eval(['dataPost = >> ft_redefinetrial(cfg,Cond_',num2str(cond(j)),');']); >> >> % Combine the two datasets... >> data = appenddata(cfg, dataPre, dataPost); >> trialdesign = [ones(1,length(dataPost.trial)) >> ones(1,length(dataPre.trial))*2]; >> >> % ... and compute the CSD matrices... >> cfg = []; >> cfg.output = 'powandcsd'; >> cfg.channel = Channel.meg; >> cfg.method = 'mtmfft'; >> cfg.taper = 'dpss'; >> cfg.foilim = [75 75]; >> cfg.tapsmofrq = 15; % amount of spectral smoothing = +/- 15 Hz >> cfg.channelcmb = {Channel.meg Channel.meg}; >> >> % ... for the baseline and task part separately... >> eval(['freqPre.Cond_',num2str(cond(j)), ' = >> ft_freqanalysis(cfg,dataPre);']); >> eval(['freqPost.Cond_',num2str(cond(j)), ' = >> ft_freqanalysis(cfg,dataPost);']); >> >> % ... and for the whole trial >> eval(['freqAll.Cond_',num2str(cond(j)), ' = >> ft_freqanalysis(cfg,data);']); >> eval(['freqAll.Cond_',num2str(cond(j)), '.trialdesign = >> trialdesign;']); % pre and post info >> >> And that's how I calculate the sources: >> >> cfg = []; >> cfg.frequency = 75; >> cfg.method = 'dics'; >> cfg.grid = grid; % Here it gives .pos, .inside, .outside to >> the structure >> cfg.vol = vol; >> cfg.dim = template_grid.dim; % Here I give the dimension >> of the template grid >> cfg.grad = Cond_101.hdr.grad; >> cfg.lambda = '5%'; >> cfg.reducerank = 'no'; >> cfg.projectnoise = 'yes'; >> cfg.realfilter = 'yes'; >> cfg.keepfilter = 'yes'; % the output saves the computed inverse >> filter >> >> eval(['SourceAll = ft_sourceanalysis(cfg, >> freqAll.Cond_',num2str(cond(k)),');']) >> >> % use the common filter here >> cfg.grid.filter = SourceAll.avg.filter; >> eval(['sourcePre_con = ft_sourceanalysis(cfg, >> freqPre.Cond_',num2str(cond(k)),');']) >> eval(['sourcePost_con = ft_sourceanalysis(cfg, >> freqPost.Cond_',num2str(cond(k)),');']) >> >> >> >> I would really appreciate any help with that! Thanks a lot! >> >> Best, >> >> Andreas >> >> -- >> Andreas Sauer >> Max Planck Institute for Brain Research >> Deutschordenstr. 46 >> 60528 Frankfurt am Main >> Germany >> >> T: +49 69 96769 278 >> F: +49 69 96769 327 >> Email: andreas.sauer at brain.mpg.de >> www.brain.mpg.de >> >> _______________________________________________ >> fieldtrip mailing list >> fieldtrip at donders.ru.nl >> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -- Jörn M. Horschig PhD Student Donders Institute for Brain, Cognition and Behaviour Centre for Cognitive Neuroimaging Radboud University Nijmegen Neuronal Oscillations Group FieldTrip Development Team P.O. Box 9101 NL-6500 HB Nijmegen The Netherlands Contact: E-Mail: jm.horschig at donders.ru.nl Tel: +31-(0)24-36-68493 Web: http://www.ru.nl/donders Visiting address: Trigon, room 2.30 Kapittelweg 29 NL-6525 EN Nijmegen The Netherlands From sauer.mpih at googlemail.com Tue Jun 4 12:31:32 2013 From: sauer.mpih at googlemail.com (Andreas Sauer) Date: Tue, 4 Jun 2013 12:31:32 +0200 Subject: [FieldTrip] NaNs as output of ft_sourceanalysis (DICS) In-Reply-To: References: Message-ID: Dear Eelke and Jörn, thanks for the super quick responses! And sorry for the double post... I tried Eelke's suggestion and that holds. So, I have only NaNs in the fields for the dipole locations outside the brain. However, if I continue and calculate the contrast between pre and post and plot it I don't see any activation. I will try your suggestion, Jörn, as well and see whether it has to do with the re-definition. Thanks again for your suggestions! Best, Andreas 2013/6/4 Eelke Spaak > Dear Andreas, > > How many NaNs do you get exactly and in which field? If it is some > NaNs in source.avg.pow, then it is quite normal: the estimates for > dipole locations which were flagged as outside the brain are always > NaN, as they are not scanned. The following should hold: > > sum(isnan(source.avg.pow)) == numel(source.outside) > && > sum(~isnan(source.avg.pow)) == numel(source.inside) > > Best, > Eelke > > On 4 June 2013 11:42, Andreas Sauer wrote: > > Dear all, > > > > I would like to analyze sources with the beamforming approach using the > DICS > > method. I followed the steps in the tutorial and everything works well. > > However, the output of ft_sourceanalysis contains only NaNs. > > > > I checked the TF data that I calculated in the step before but that looks > > fine, so I assume the error happens somewhere during ft_sourceanalysis. > > > > That's how I calculate the TFRs: > > > > cfg = []; > > cfg.toilim = [-0.5 -0.3]; % baseline activity > > eval(['dataPre = > > ft_redefinetrial(cfg,Cond_',num2str(cond(j)),');']); > > cfg.toilim = [0.1 1.0]; % task-related activity > > eval(['dataPost = > > ft_redefinetrial(cfg,Cond_',num2str(cond(j)),');']); > > > > % Combine the two datasets... > > data = appenddata(cfg, dataPre, dataPost); > > trialdesign = [ones(1,length(dataPost.trial)) > > ones(1,length(dataPre.trial))*2]; > > > > % ... and compute the CSD matrices... > > cfg = []; > > cfg.output = 'powandcsd'; > > cfg.channel = Channel.meg; > > cfg.method = 'mtmfft'; > > cfg.taper = 'dpss'; > > cfg.foilim = [75 75]; > > cfg.tapsmofrq = 15; % amount of spectral smoothing = +/- 15 Hz > > cfg.channelcmb = {Channel.meg Channel.meg}; > > > > % ... for the baseline and task part separately... > > eval(['freqPre.Cond_',num2str(cond(j)), ' = > > ft_freqanalysis(cfg,dataPre);']); > > eval(['freqPost.Cond_',num2str(cond(j)), ' = > > ft_freqanalysis(cfg,dataPost);']); > > > > % ... and for the whole trial > > eval(['freqAll.Cond_',num2str(cond(j)), ' = > > ft_freqanalysis(cfg,data);']); > > eval(['freqAll.Cond_',num2str(cond(j)), '.trialdesign = > > trialdesign;']); % pre and post info > > > > And that's how I calculate the sources: > > > > cfg = []; > > cfg.frequency = 75; > > cfg.method = 'dics'; > > cfg.grid = grid; % Here it gives .pos, .inside, > .outside to > > the structure > > cfg.vol = vol; > > cfg.dim = template_grid.dim; % Here I give the > dimension > > of the template grid > > cfg.grad = Cond_101.hdr.grad; > > cfg.lambda = '5%'; > > cfg.reducerank = 'no'; > > cfg.projectnoise = 'yes'; > > cfg.realfilter = 'yes'; > > cfg.keepfilter = 'yes'; % the output saves the computed > inverse > > filter > > > > eval(['SourceAll = ft_sourceanalysis(cfg, > > freqAll.Cond_',num2str(cond(k)),');']) > > > > % use the common filter here > > cfg.grid.filter = SourceAll.avg.filter; > > eval(['sourcePre_con = ft_sourceanalysis(cfg, > > freqPre.Cond_',num2str(cond(k)),');']) > > eval(['sourcePost_con = ft_sourceanalysis(cfg, > > freqPost.Cond_',num2str(cond(k)),');']) > > > > > > > > I would really appreciate any help with that! Thanks a lot! > > > > Best, > > > > Andreas > > > > -- > > Andreas Sauer > > Max Planck Institute for Brain Research > > Deutschordenstr. 46 > > 60528 Frankfurt am Main > > Germany > > > > T: +49 69 96769 278 > > F: +49 69 96769 327 > > Email: andreas.sauer at brain.mpg.de > > www.brain.mpg.de > > > > _______________________________________________ > > fieldtrip mailing list > > fieldtrip at donders.ru.nl > > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > -- Dipl.-Psych. Andreas Sauer Max Planck Institute for Brain Research Deutschordenstraße 46 60528 Frankfurt am Main Germany T: +49 69 96769 278 F: +49 69 96769 327 Email: sauer.mpih at gmail.com www.brain.mpg.de -------------- next part -------------- An HTML attachment was scrubbed... URL: From r.cox at uva.nl Tue Jun 4 14:31:06 2013 From: r.cox at uva.nl (Roy Cox) Date: Tue, 4 Jun 2013 14:31:06 +0200 Subject: [FieldTrip] ft_freqstatistics & ft_clusterplot Message-ID: Dear all, I recently joined your trip and I want to make use of fieldtrip's cluster correction capabilities. But I can't seem to get it to work. Perhaps some of you can clarify some things I can't figure out easily from the tutorials or functions themselves. A potentially important thing to know is that I performed all single-subject tf analyes using custom scripts, and now I want to have fieldtrip perform the overall statistics (8 subjects, 2 within-subj conditions). ft_freqstatistics works. However, I wonder: does it matter for the statistics what latency and frequency range you choose and/or whether you average across time/freq bins? I tried a number of variants, but the command window output "found [] positive/negative clusters in observed data" is always identical. Which confuses me. is it possible to call ft_freqstatistics and neither average over time nor frequency bins? or am I supposed to average across at least one to end up with less-dimensional data for ft_clusterplot? regardless of how I call ft_freqstatistics, ft_clusterplot crashes like this: Assignment has more non-singleton rhs dimensions than non-singleton subscripts Error in ==> ft_clusterplot at 179 sigposCLM(:,:,iPos) = (posCLM == sigpos(iPos)); here, my posCLM is a 126(chan)x35(freqs)x301(time) array, which indeed does not fit the left-hand side. If anyone has any ideas/suggestions I'd be happy to hear them. Roy -- Roy Cox, M.Sc. | Brain & Cognition Group | Department of Psychology | University of Amsterdam | Weesperplein 4 | 1018 XA Amsterdam | the Netherlands | room 3.21 | phone: +31 20 525 6847 | email: r.cox at uva.nl -------------- next part -------------- An HTML attachment was scrubbed... URL: From andmib at gmail.com Tue Jun 4 17:01:43 2013 From: andmib at gmail.com (Andrew Brooks) Date: Tue, 4 Jun 2013 11:01:43 -0400 Subject: [FieldTrip] Private function problems In-Reply-To: <481032685.1338448.1370292821035.JavaMail.root@sculptor.zimbra.ru.nl> References: <481032685.1338448.1370292821035.JavaMail.root@sculptor.zimbra.ru.nl> Message-ID: Hello Diego, I am using the example pipeline script from an earlier version of FieldTrip (ft_omri_pipeline_nuisance). The exact code that is throwing the error: curSixDof = hom2six(M). I did run the three lines of code to reset the default paths, add fieldtrip, and then ran ft_defaults. The version of FieldTrip I am using is 20130602. Thanks, Andrew On Mon, Jun 3, 2013 at 4:53 PM, Lozano Soldevilla, D. (Diego) < d.lozanosoldevilla at fcdonders.ru.nl> wrote: > Hi Andrew, > > Did you type the following? > > >> restoredefaultpath > >> addpath /fieldtripxxxx > >> ft_defaults > > What's the ft_* function you invoke to get the error 'undefined function > 'hom2six'? And what's the fieldtrip version you're using? > > best, > > Diego > > ------------------------------ > > *From: *"Andrew Brooks" > *To: *"FieldTrip discussion list" > *Sent: *Monday, 3 June, 2013 10:15:49 PM > *Subject: *[FieldTrip] Private function problems > > > Hello all, > > I followed the instructions on properly adding FieldTrip to the Matlab > path file. However, I continue to run into errors involving private > functions. In this case, I get the error 'undefined function 'hom2six' for > input arguments of type 'double''. > > Does anybody have a suggestion as to why this is occurring? > > Thanks! > Andrew > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > > > > -- > PhD Student > Neuronal Oscillations Group > Donders Institute for Brain, Cognition and Behaviour > Centre for Cognitive Neuroimaging > Trigon, room 0.83 > Kapittelweg 29 > Radboud University Nijmegen > NL-6525 EN Nijmegen > The Netherlands > E-Mail: d.lozanosoldevilla at fcdonders.ru.nl > Tel: +31-(0)24-36-66274 > Web: http://www.neuosc.com/ > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > -------------- next part -------------- An HTML attachment was scrubbed... URL: From frank.ye.mei at gmail.com Tue Jun 4 22:47:08 2013 From: frank.ye.mei at gmail.com (Frank Mei) Date: Tue, 4 Jun 2013 16:47:08 -0400 Subject: [FieldTrip] How to set a small window when doing source localization? Message-ID: Hello all, I want to be more precise in time, when doing source localization. So I tried to set a small cfg.toilim, before the 'ft_redefinetrial'. But if it is set smaller than 0.3(corresponding to 300ms), an error will pop up. How to solve that problem? thanks ahead, Ye Mei -------------- next part -------------- An HTML attachment was scrubbed... URL: From d.lozanosoldevilla at fcdonders.ru.nl Wed Jun 5 15:39:14 2013 From: d.lozanosoldevilla at fcdonders.ru.nl (Lozano Soldevilla, D. (Diego)) Date: Wed, 5 Jun 2013 15:39:14 +0200 (CEST) Subject: [FieldTrip] Private function problems In-Reply-To: Message-ID: <2127428772.1387542.1370439554352.JavaMail.root@sculptor.zimbra.ru.nl> Hi Andrew, Could you please check inside your matlab path there's the realtime/mri directory where ft_omri_pipeline_nuisance.m function is located? Mine looks like this: '/home/electromag/dieloz/matlab/ fieldtrip-dev/realtime/online_mri/ ' If it's there, you shouldn't have the private folder problem. Otherwise, add from the command window and tell me. best, Diego ----- Original Message ----- > From: "Andrew Brooks" > To: "Diego Lozano" , > "FieldTrip discussion list" > Sent: Tuesday, 4 June, 2013 5:01:43 PM > Subject: Re: [FieldTrip] Private function problems > Hello Diego, > I am using the example pipeline script from an earlier version of > FieldTrip (ft_omri_pipeline_nuisance). The exact code that is throwing > the error: curSixDof = hom2six(M). > I did run the three lines of code to reset the default paths, add > fieldtrip, and then ran ft_defaults. The version of FieldTrip I am > using is 20130602. > Thanks, > Andrew > On Mon, Jun 3, 2013 at 4:53 PM, Lozano Soldevilla, D. (Diego) < > d.lozanosoldevilla at fcdonders.ru.nl > wrote: > > Hi Andrew, > > Did you type the following? > > >> restoredefaultpath > > >> addpath /fieldtripxxxx > > >> ft_defaults > > What's the ft_* function you invoke to get the error 'undefined > > function 'hom2six'? And what's the fieldtrip version you're using? > > best, > > Diego > > > From: "Andrew Brooks" < andmib at gmail.com > > > > To: "FieldTrip discussion list" < fieldtrip at science.ru.nl > > > > Sent: Monday, 3 June, 2013 10:15:49 PM > > > Subject: [FieldTrip] Private function problems > > > Hello all, > > > I followed the instructions on properly adding FieldTrip to the > > > Matlab > > > path file. However, I continue to run into errors involving > > > private > > > functions. In this case, I get the error 'undefined function > > > 'hom2six' > > > for input arguments of type 'double''. > > > Does anybody have a suggestion as to why this is occurring? > > > Thanks! > > > Andrew > > > _______________________________________________ > > > fieldtrip mailing list > > > fieldtrip at donders.ru.nl > > > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > -- > > PhD Student > > Neuronal Oscillations Group > > Donders Institute for Brain, Cognition and Behaviour > > Centre for Cognitive Neuroimaging > > Trigon, room 0.83 > > Kapittelweg 29 > > Radboud University Nijmegen > > NL-6525 EN Nijmegen > > The Netherlands > > E-Mail: d.lozanosoldevilla at fcdonders.ru.nl > > Tel: +31-(0)24-36-66274 > > Web: http://www.neuosc.com/ > > _______________________________________________ > > fieldtrip mailing list > > fieldtrip at donders.ru.nl > > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -------------- next part -------------- An HTML attachment was scrubbed... URL: From elizabeth.bock at mcgill.ca Wed Jun 5 17:53:36 2013 From: elizabeth.bock at mcgill.ca (Elizabeth Anne Bock, Ms) Date: Wed, 5 Jun 2013 15:53:36 +0000 Subject: [FieldTrip] Polhemus Patriot In-Reply-To: <67D8C434-4D28-40C3-94A6-A95C86BD6B78@gmail.com> References: <67D8C434-4D28-40C3-94A6-A95C86BD6B78@gmail.com> Message-ID: <86D86365C4E767468A79EB52DFBFB46F051E242F@exmbx2010-8.campus.MCGILL.CA> Hi Julian, We have experienced this problem as well. We solved it using the following guidelines: No metal near the polhemus or any of the receivers/transmitters - you will need to move the setup around the room to find the perfect spot. Use a wooden or plastic chair Use plastic or cloth glasses/holder to attach the receiver to the subject My system is sensitive to the proximity of the transmitter and the receiver. I use two receivers, #1 is the stylus and #2 is secured to plastic glasses that the subject wears. The transmitter is taped to the back of the chair. If #2 and the transmitter are too close to each other (i.e. a short person or child), then the measurement are inaccurate. You would have to experiment with different distances that give good results. Hope this helps! Beth ------------------------------------------------------------------------------------------ Elizabeth Bock / MEG System Engineer McConnell Brain Imaging Centre / Montreal Neurological Institute McGill University / 3801 University St. / Montreal, QC H3A 2B4 Office: 514.398.3706 MEG Lab: 514.398.6056 Mobile: 514.718.6342 ________________________________ From: fieldtrip-bounces at science.ru.nl [fieldtrip-bounces at science.ru.nl] on behalf of Julian Keil [julian.keil at gmail.com] Sent: Monday, June 03, 2013 11:14 AM To: FieldTrip discussion list Subject: [FieldTrip] Polhemus Patriot Dear FieldTrip-Users, I have a not really FieldTrip-related question, but maybe one of you can help me anyways. In our lab, we have a Polhemus Patriot 3D tracking system to acquire electrode positions. Unfortunately, the recordings are severely distorted in the Z-axis (up-down). After contacting the Polhemus Support, I got the information, that this is due to metal in the surroundings of the source which distorts the magnetic field. I tried to get as far away from any metal as possible in our lab (~1.5 m to the walls and floor) but to no avail. Now to my question: Has anyone any experience dealing with this? I'm quite puzzled by this as I know plenty of labs use Polhemus trackers, and I'm not sure if our lab is especially metal prone or if I'm missing something. Thanks a lot for any help. Julian ******************** Dr. Julian Keil AG Multisensorische Integration Psychiatrische Universitätsklinik der Charité im St. Hedwig-Krankenhaus Große Hamburger Straße 5-11, Raum E 307 10115 Berlin Telefon: +49-30-2311-1879 Fax: +49-30-2311-2209 http://psy-ccm.charite.de/forschung/bildgebung/ag_multisensorische_integration -------------- next part -------------- An HTML attachment was scrubbed... URL: From julian.keil at gmail.com Wed Jun 5 18:02:55 2013 From: julian.keil at gmail.com (Julian Keil) Date: Wed, 5 Jun 2013 18:02:55 +0200 Subject: [FieldTrip] Polhemus Patriot In-Reply-To: <86D86365C4E767468A79EB52DFBFB46F051E242F@exmbx2010-8.campus.MCGILL.CA> References: <67D8C434-4D28-40C3-94A6-A95C86BD6B78@gmail.com> <86D86365C4E767468A79EB52DFBFB46F051E242F@exmbx2010-8.campus.MCGILL.CA> Message-ID: Dear all, thank you very much for your input. I'll have to experiment a bit more with the distance to the walls (which probably contain metal) and the chair. Thank you also for the idea with the second sensor, I hadn't tried this before. Best, Julian Am 05.06.2013 um 17:53 schrieb Elizabeth Anne Bock, Ms: > Hi Julian, > We have experienced this problem as well. We solved it using the following guidelines: > > No metal near the polhemus or any of the receivers/transmitters - you will need to move the setup around the room to find the perfect spot. > Use a wooden or plastic chair > Use plastic or cloth glasses/holder to attach the receiver to the subject > > My system is sensitive to the proximity of the transmitter and the receiver. I use two receivers, #1 is the stylus and #2 is secured to plastic glasses that the subject wears. The transmitter is taped to the back of the chair. If #2 and the transmitter are too close to each other (i.e. a short person or child), then the measurement are inaccurate. You would have to experiment with different distances that give good results. > > Hope this helps! > Beth > > ------------------------------------------------------------------------------------------ > Elizabeth Bock / MEG System Engineer > McConnell Brain Imaging Centre / Montreal Neurological Institute > McGill University / 3801 University St. / Montreal, QC H3A 2B4 > > Office: 514.398.3706 > MEG Lab: 514.398.6056 > Mobile: 514.718.6342 > From: fieldtrip-bounces at science.ru.nl [fieldtrip-bounces at science.ru.nl] on behalf of Julian Keil [julian.keil at gmail.com] > Sent: Monday, June 03, 2013 11:14 AM > To: FieldTrip discussion list > Subject: [FieldTrip] Polhemus Patriot > > Dear FieldTrip-Users, > > I have a not really FieldTrip-related question, but maybe one of you can help me anyways. > In our lab, we have a Polhemus Patriot 3D tracking system to acquire electrode positions. > Unfortunately, the recordings are severely distorted in the Z-axis (up-down). > After contacting the Polhemus Support, I got the information, that this is due to metal in the surroundings of the source which distorts the magnetic field. > I tried to get as far away from any metal as possible in our lab (~1.5 m to the walls and floor) but to no avail. > > Now to my question: Has anyone any experience dealing with this? I'm quite puzzled by this as I know plenty of labs use Polhemus trackers, and I'm not sure if our lab is especially metal prone or if I'm missing something. > > Thanks a lot for any help. > > Julian > > ******************** > Dr. Julian Keil > > AG Multisensorische Integration > Psychiatrische Universitätsklinik > der Charité im St. Hedwig-Krankenhaus > Große Hamburger Straße 5-11, Raum E 307 > 10115 Berlin > > Telefon: +49-30-2311-1879 > Fax: +49-30-2311-2209 > http://psy-ccm.charite.de/forschung/bildgebung/ag_multisensorische_integration > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -------------- next part -------------- An HTML attachment was scrubbed... URL: From mje.mads at gmail.com Thu Jun 6 09:16:01 2013 From: mje.mads at gmail.com (Mads Jensen) Date: Thu, 06 Jun 2013 09:16:01 +0200 Subject: [FieldTrip] Extracting the time of a cluster Message-ID: <51B03731.2080303@gmail.com> Dear all, I have made a statistics analysis on ERP data using ft_timelockstatistics and got a significant cluster I would like to know the time course of this cluster(i.e. when it starts and ends being significant) , is that possible? I take to the cirange that is computed in the output for the cluster from ft_timelockstatistics be the upper and lower limit of the confidence interval, so the cluster.prop +/- the cirange gives the 95%confidence intervals. Is that correct? best wishes, Mads From jm.horschig at donders.ru.nl Thu Jun 6 10:17:50 2013 From: jm.horschig at donders.ru.nl (=?ISO-8859-1?Q?=22J=F6rn_M=2E_Horschig=22?=) Date: Thu, 06 Jun 2013 10:17:50 +0200 Subject: [FieldTrip] Extracting the time of a cluster In-Reply-To: <51B03731.2080303@gmail.com> References: <51B03731.2080303@gmail.com> Message-ID: <51B045AE.3010305@donders.ru.nl> Hi Mads, there is a stats.posclusterlabelmat and stats.negclusterlabelmat field, which contain the indices of all your clusters. You can use these indices and to index the period where your test shows some significant effect(e.g. for timelock.avg or timelock.time). See here for an example, which does not quite do what you want, but gets close http://fieldtrip.fcdonders.nl/tutorial/cluster_permutation_timelock#plotting_the_results And, yes, cirange defines the range of the confidence interval for that particular cluster, so pvalue - cirange gives the lower bound and pvalue + cirange the upper bound. If your upper bound extends beyond the critical alpha-value, I would advise to use more randomizations. Best, Jörn On 6/6/2013 9:16 AM, Mads Jensen wrote: > Dear all, > > I have made a statistics analysis on ERP data using > ft_timelockstatistics and got a significant cluster I would like to > know the time course of this cluster(i.e. when it starts and ends > being significant) , is that possible? > > I take to the cirange that is computed in the output for the cluster > from ft_timelockstatistics be the upper and lower limit of the > confidence interval, so the cluster.prop +/- the cirange gives the > 95%confidence intervals. Is that correct? > > best wishes, > Mads > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -- Jörn M. Horschig PhD Student Donders Institute for Brain, Cognition and Behaviour Centre for Cognitive Neuroimaging Radboud University Nijmegen Neuronal Oscillations Group FieldTrip Development Team P.O. Box 9101 NL-6500 HB Nijmegen The Netherlands Contact: E-Mail: jm.horschig at donders.ru.nl Tel: +31-(0)24-36-68493 Web: http://www.ru.nl/donders Visiting address: Trigon, room 2.30 Kapittelweg 29 NL-6525 EN Nijmegen The Netherlands From mje.mads at gmail.com Thu Jun 6 12:48:02 2013 From: mje.mads at gmail.com (Mads Jensen) Date: Thu, 06 Jun 2013 12:48:02 +0200 Subject: [FieldTrip] Extracting the time of a cluster In-Reply-To: <51B045AE.3010305@donders.ru.nl> References: <51B03731.2080303@gmail.com> <51B045AE.3010305@donders.ru.nl> Message-ID: <51B068E2.3010500@gmail.com> Hi Jörn, thanks for the swift and very useful reply. best, mads On 06/06/13 10:17, "Jörn M. Horschig" wrote: > Hi Mads, > > there is a stats.posclusterlabelmat and stats.negclusterlabelmat field, > which contain the indices of all your clusters. You can use these > indices and to index the period where your test shows some significant > effect(e.g. for timelock.avg or timelock.time). See here for an example, > which does not quite do what you want, but gets close > http://fieldtrip.fcdonders.nl/tutorial/cluster_permutation_timelock#plotting_the_results > > > And, yes, cirange defines the range of the confidence interval for that > particular cluster, so pvalue - cirange gives the lower bound and pvalue > + cirange the upper bound. If your upper bound extends beyond the > critical alpha-value, I would advise to use more randomizations. > > Best, > Jörn > > On 6/6/2013 9:16 AM, Mads Jensen wrote: >> Dear all, >> >> I have made a statistics analysis on ERP data using >> ft_timelockstatistics and got a significant cluster I would like to >> know the time course of this cluster(i.e. when it starts and ends >> being significant) , is that possible? >> >> I take to the cirange that is computed in the output for the cluster >> from ft_timelockstatistics be the upper and lower limit of the >> confidence interval, so the cluster.prop +/- the cirange gives the >> 95%confidence intervals. Is that correct? >> >> best wishes, >> Mads >> _______________________________________________ >> fieldtrip mailing list >> fieldtrip at donders.ru.nl >> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > From antony.passaro at gmail.com Thu Jun 6 15:59:22 2013 From: antony.passaro at gmail.com (Antony Passaro) Date: Thu, 6 Jun 2013 09:59:22 -0400 Subject: [FieldTrip] Statistics for correlation across subjects using cluster analysis Message-ID: Hi, I came across an email in the mailing list archives from this time last year when a user ( Ingrid ) was asking about using a statistical model with a cluster analysis to correct for multiple comparisons based on performing a correlation across trials (and/or subjects). Jan-mathijs replied saying he had a copy of statfun_corr and statfun_glm but I don't see a copy of either of those functions in the latest fieldtrip release. Would anyone be so kind as to point my in the right directions to tackle this problem? Thank you, -Tony -------------- next part -------------- An HTML attachment was scrubbed... URL: From andmib at gmail.com Thu Jun 6 17:06:25 2013 From: andmib at gmail.com (Andrew Brooks) Date: Thu, 6 Jun 2013 11:06:25 -0400 Subject: [FieldTrip] Private function problems In-Reply-To: <2127428772.1387542.1370439554352.JavaMail.root@sculptor.zimbra.ru.nl> References: <2127428772.1387542.1370439554352.JavaMail.root@sculptor.zimbra.ru.nl> Message-ID: Diego, Thank you, that was indeed the problem. I had moved the ft_omri_pipeline script out of the /realtime/online_mri directory, which caused the problems. Thanks, Andrew On Wed, Jun 5, 2013 at 9:39 AM, Lozano Soldevilla, D. (Diego) < d.lozanosoldevilla at fcdonders.ru.nl> wrote: > Hi Andrew, > > Could you please check inside your matlab path there's the realtime/mri > directory where ft_omri_pipeline_nuisance.m function is located? > > Mine looks like this: > > '/home/electromag/dieloz/matlab/*fieldtrip-dev/realtime/online_mri/*' > > If it's there, you shouldn't have the private folder problem. Otherwise, > add from the command window and tell me. > > best, > > Diego > > ------------------------------ > > *From: *"Andrew Brooks" > *To: *"Diego Lozano" , "FieldTrip > discussion list" > *Sent: *Tuesday, 4 June, 2013 5:01:43 PM > *Subject: *Re: [FieldTrip] Private function problems > > > Hello Diego, > > I am using the example pipeline script from an earlier version of > FieldTrip (ft_omri_pipeline_nuisance). The exact code that is throwing the > error: curSixDof = hom2six(M). > > I did run the three lines of code to reset the default paths, add > fieldtrip, and then ran ft_defaults. The version of FieldTrip I am using is > 20130602. > > Thanks, > Andrew > > > > > > > On Mon, Jun 3, 2013 at 4:53 PM, Lozano Soldevilla, D. (Diego) < > d.lozanosoldevilla at fcdonders.ru.nl> wrote: > >> Hi Andrew, >> >> Did you type the following? >> >> >> restoredefaultpath >> >> addpath /fieldtripxxxx >> >> ft_defaults >> >> What's the ft_* function you invoke to get the error 'undefined function >> 'hom2six'? And what's the fieldtrip version you're using? >> >> best, >> >> Diego >> >> ------------------------------ >> >> *From: *"Andrew Brooks" >> *To: *"FieldTrip discussion list" >> *Sent: *Monday, 3 June, 2013 10:15:49 PM >> *Subject: *[FieldTrip] Private function problems >> >> >> Hello all, >> >> I followed the instructions on properly adding FieldTrip to the Matlab >> path file. However, I continue to run into errors involving private >> functions. In this case, I get the error 'undefined function 'hom2six' for >> input arguments of type 'double''. >> >> Does anybody have a suggestion as to why this is occurring? >> >> Thanks! >> Andrew >> >> _______________________________________________ >> fieldtrip mailing list >> fieldtrip at donders.ru.nl >> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip >> >> >> >> >> -- >> PhD Student >> Neuronal Oscillations Group >> Donders Institute for Brain, Cognition and Behaviour >> Centre for Cognitive Neuroimaging >> Trigon, room 0.83 >> Kapittelweg 29 >> Radboud University Nijmegen >> NL-6525 EN Nijmegen >> The Netherlands >> E-Mail: d.lozanosoldevilla at fcdonders.ru.nl >> Tel: +31-(0)24-36-66274 >> Web: http://www.neuosc.com/ >> >> _______________________________________________ >> fieldtrip mailing list >> fieldtrip at donders.ru.nl >> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip >> > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > -------------- next part -------------- An HTML attachment was scrubbed... URL: From jkamienk at gmail.com Thu Jun 6 17:49:27 2013 From: jkamienk at gmail.com (Juan Kamienkowski) Date: Thu, 6 Jun 2013 12:49:27 -0300 Subject: [FieldTrip] Oscillatory power normalization In-Reply-To: References: Message-ID: Hi everybody, More than one year later we come up with the same questions. Does anybody have suggestions on this topic? Thanks a lot! Best, juan On Fri, Mar 9, 2012 at 4:16 PM, Matt Mollison wrote: > My questions essentially boil down to: what do people do for power > normalization when assessing statistical differences? > > It gets more detailed below regarding examining event-related power > changes relative to a baseline (within-subjects, comparing two conditions, > stimulus onset = 0 ms). I didn't find much discussion of this on the list > or the wiki. Any references for these issues would also be appreciated. > > (1) Does power data need to be baseline normalized for statistical tests > comparing conditions? Normalization would put power on equal footing across > all subjects, conditions, sensors, times, frequencies, etc., but it will > surely affect power during the stimulus period in a particular way. If so, > do the two (or more) conditions need to use the same baseline condition, or > can each trial be normalized to its own pre-stim baseline period (a la > ft_freqbaseline)? For either, it seems like you'd always need > keeptrials='yes' in ft_freqanalysis. However, it does not seem to get > normalized in the cluster_permutation_freq tutorial (within-subjects)---am > I missing something? > > If we should normalize: > (2) I've read a number of papers that Z-transform stimulus period power > relative to pre-stim activity (subtract mean, divide by std) before doing > statistics. I've also read a lot that don't mention baselines, or e.g. do a > decibel [dB] transform. ft_freqbaseline does not have a Z-transform option. > There is ft_preproc_standardize, but this seems to operate at a lower level > than is usually recommended. Z-transforming seems like a good option, but > how can I use it in the FT pipeline for within-subjects analyses > (especially with keeptrials='no')? Alternatively, when should one use > 'absolute', 'relative', or 'relchange'? > > Regarding choosing the baseline period: > (3) It seems that the baseline period needs to precede stimulus onset by a > sufficient amount of time so that the stimulus period doesn't bleed into > the baseline; this time would be specific to both the frequency and either > wavelet width or taper window length. For example, at 4 Hz with wavelet > width=6 or a taper with 6 cycles per time window (t_ftimwin) the > wavelet/window would be 1500 ms long, and the end of the baseline must > precede stimulus onset by at least half this to keep them separate. At > lower frequencies this could get quite unruly (e.g., 1 Hz would require > ending 3000 ms before stimulus). Is this correct? Maybe that's why it's > better to have a single separate baseline condition. Anyway, the > timefrequencyanalysis tutorial seems to disregard this separation of > baseline and stimulus activity (as have many papers I've read), so maybe > I'm wrong about this being necessary. > > Thanks for your time, > Matt Mollison > > -- > Univ. of Colorado at Boulder > Dept. of Psychology and Neuroscience > matthew.mollison at colorado.edu > http://psych.colorado.edu/~mollison/ > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > -- Juan E Kamienkowski Laboratorio de Neurociencia Integrativa Departamento de Fisica, FCEN-UBA Ciudad Universitaria, Pabellon I (1428) Buenos Aires, Argentina Phone: (54-11) 4576 3300 (282) Fax: (54-11) 4576 3357 http://www.neurociencia.df.uba.ar/ -------------- next part -------------- An HTML attachment was scrubbed... URL: From S.J.Johnston at swansea.ac.uk Fri Jun 7 11:23:20 2013 From: S.J.Johnston at swansea.ac.uk (Steve Johnston) Date: Fri, 7 Jun 2013 10:23:20 +0100 Subject: [FieldTrip] Bad channel correction problems and ICA Message-ID: <55D211F2-5D76-43EE-B41A-EA05C8FFCE6F@swansea.ac.uk> Dear fters I've just started using ft and, although being able to run through a test run of eye movement data just fine, I'm now getting into the more detailed stuff and I'm hitting a snag that I hope you can help me with. Specifically I'm struggling to get any real ICA results after using ft_channelrepair but not if I go through without it. Data was recorded on a biosemi 128 system and the trials are just eye movements that I want to identify via ICA (simple test). If I just run through the procedure of importing data, set markers, remove gross artifacts (keeping all channels, including 3 bad ones) and then run the ICA - I get lovely eye movement components appearing. However, now I want to do it 'properly' and replace the bad channels. Currently I do the following … (sorry, for completeness I included everything to be on the safe side). %% % Standard cfg for import cfg = []; cfg.trialdef.prestim = .2; cfg.trialdef.poststim = 2; cfg.trialdef.eventtype = 'STATUS'; %% %Load each dataset and examine for channels that are bad - starting with EOG Localiser. cfg.dataset = [subjectdata.dir filesep subjectdata.artifactfile]; cfg.trialdef.eventvalue = markers.artifact; cfg = ft_definetrial(cfg); cfg.demean = 'yes'; data = ft_preprocessing(cfg); % After the above, run ChannelRepair after identifying bad channels. %% % Channel Replace - get nearest neighbours cfg = []; cfg.method = 'distance' cfg.layout = 'biosemi128.lay'; cfg.neighbourdist = 0.13; [neighbours] = ft_prepare_neighbours(cfg,data) %% Interpolate and put into new data structure cfg = []; cfg.badchannel = replace_channels; cfg.layout = 'biosemi128.lay'; cfg.method = 'nearest'; cfg.neighbours = neighbours; cfg.neighbourdist = 0.13; artifact_cleandata = ft_channelrepair(cfg,data) % Visualise data for and mark uncorrectable artifacts. cfg.viewmode = 'vertical'; cfg.continuous = 'yes'; cfg.blocksize = 12; cfg = ft_databrowser(cfg,artifact_cleandata) %% % Do artifact rejection (also redefine settings lost during re-cfg in artefact rejection) cfg.trialdef.prestim = .2; cfg.trialdef.poststim = 2; cfg.trialdef.eventtype = 'STATUS'; cfg.artifact.reject = 'complete'; cfg.channel = 'EEG'; cfg = ft_rejectartifact(cfg, artifact_cleandata); trialdata = ft_preprocessing(cfg, artifact_cleandata); %% cfg = []; comp = ft_componentanalysis(cfg, trialdata); cfg = []; cfg.component = [1:20] cfg.layout = 'biosemi128.lay' cfg.comment = 'no' ft_topoplotIC(cfg,comp) So, the big question is - why do I get nothing after doing the channel repair. I've been through it several times and that seems to be the step where everything goes wrong. I've looked at the data post re-interpolation and it looks good - for now I'm assuming I've missed something. Thanks for any help Steve -------------- next part -------------- An HTML attachment was scrubbed... URL: From jm.horschig at donders.ru.nl Fri Jun 7 11:47:11 2013 From: jm.horschig at donders.ru.nl (=?ISO-8859-1?Q?=22J=F6rn_M=2E_Horschig=22?=) Date: Fri, 07 Jun 2013 11:47:11 +0200 Subject: [FieldTrip] Bad channel correction problems and ICA In-Reply-To: <55D211F2-5D76-43EE-B41A-EA05C8FFCE6F@swansea.ac.uk> References: <55D211F2-5D76-43EE-B41A-EA05C8FFCE6F@swansea.ac.uk> Message-ID: <51B1AC1F.1010008@donders.ru.nl> Hi Steve, I'm not quite sure what you mean with getting nothing (nothing like, empty? or an error?) or not getting real ICA results (real in contrast to complex?). My hunge is that you need to take the rank of your data into account. Interpolating missing channels is done by combining already existing information, i.e. channels, to reconstruct a time-course at another spatial location, i.e. another channel. Since you do not add any new information by this (it's just a linear combination of your existing data matrix), you can leave that step out prior to doing ICA. Otherwise, you can set something like ica_cfg.XXXica.pca = rank(data.trial{1}), then afaik ft_componentanalysis will perform a PCA and essentially identify that the interpolated channels are a linear combination of other channels (ICA is then done of the PCA components). Both methods are equivalent, so you might as well just drop the interpolation and remove bad channels completely. Best, Jörn On 6/7/2013 11:23 AM, Steve Johnston wrote: > Dear fters > > I've just started using ft and, although being able to run through a > test run of eye movement data just fine, I'm now getting into the more > detailed stuff and I'm hitting a snag that I hope you can help me with. > > Specifically I'm struggling to get any real ICA results after using > ft_channelrepair but not if I go through without it. > > Data was recorded on a biosemi 128 system and the trials are just eye > movements that I want to identify via ICA (simple test). > > If I just run through the procedure of importing data, set markers, > remove gross artifacts (keeping all channels, including 3 bad ones) > and then run the ICA - I get lovely eye movement components appearing. > However, now I want to do it 'properly' and replace the bad channels. > Currently I do the following ... (sorry, for completeness I included > everything to be on the safe side). > > %% > % Standard cfg for import > > cfg = []; > cfg.trialdef.prestim = .2; > cfg.trialdef.poststim = 2; > cfg.trialdef.eventtype = 'STATUS'; > > %% > %Load each dataset and examine for channels that are bad - starting > with EOG Localiser. > > cfg.dataset = [subjectdata.dir filesep > subjectdata.artifactfile]; > cfg.trialdef.eventvalue = markers.artifact; > cfg = ft_definetrial(cfg); > > cfg.demean = 'yes'; > data = ft_preprocessing(cfg); > > % After the above, run ChannelRepair after identifying bad channels. > %% > % Channel Replace - get nearest neighbours > cfg = []; > cfg.method = 'distance' > cfg.layout = 'biosemi128.lay'; > cfg.neighbourdist = 0.13; > [neighbours] = ft_prepare_neighbours(cfg,data) > > %% Interpolate and put into new data structure > cfg = []; > cfg.badchannel = replace_channels; > cfg.layout = 'biosemi128.lay'; > cfg.method = 'nearest'; > cfg.neighbours = neighbours; > cfg.neighbourdist = 0.13; > artifact_cleandata = ft_channelrepair(cfg,data) > > % Visualise data for and mark uncorrectable artifacts. > cfg.viewmode = 'vertical'; > cfg.continuous = 'yes'; > cfg.blocksize = 12; > cfg = ft_databrowser(cfg,artifact_cleandata) > > %% > % Do artifact rejection (also redefine settings lost during re-cfg in > artefact rejection) > cfg.trialdef.prestim = .2; > cfg.trialdef.poststim = 2; > cfg.trialdef.eventtype = 'STATUS'; > cfg.artifact.reject = 'complete'; > cfg.channel = 'EEG'; > cfg = ft_rejectartifact(cfg, artifact_cleandata); > trialdata = ft_preprocessing(cfg, artifact_cleandata); > > %% > cfg = []; > comp = ft_componentanalysis(cfg, trialdata); > cfg = []; > cfg.component = [1:20] > cfg.layout = 'biosemi128.lay' > cfg.comment = 'no' > ft_topoplotIC(cfg,comp) > > So, the big question is - why do I get nothing after doing the channel > repair. I've been through it several times and that seems to be the > step where everything goes wrong. I've looked at the data post > re-interpolation and it looks good - for now I'm assuming I've missed > something. > > Thanks for any help > > Steve > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -- Jörn M. Horschig PhD Student Donders Institute for Brain, Cognition and Behaviour Centre for Cognitive Neuroimaging Radboud University Nijmegen Neuronal Oscillations Group FieldTrip Development Team P.O. Box 9101 NL-6500 HB Nijmegen The Netherlands Contact: E-Mail: jm.horschig at donders.ru.nl Tel: +31-(0)24-36-68493 Web: http://www.ru.nl/donders Visiting address: Trigon, room 2.30 Kapittelweg 29 NL-6525 EN Nijmegen The Netherlands -------------- next part -------------- An HTML attachment was scrubbed... URL: From S.J.Johnston at swansea.ac.uk Fri Jun 7 11:59:10 2013 From: S.J.Johnston at swansea.ac.uk (Steve Johnston) Date: Fri, 7 Jun 2013 10:59:10 +0100 Subject: [FieldTrip] fieldtrip Digest, Vol 31, Issue 15 In-Reply-To: References: Message-ID: <49AE80C3-1CA6-402B-8819-3140FCFF7DC3@swansea.ac.uk> Thanks, and sorry, that was a pretty poor description of the results by me. Yes, I am getting a result, but the error/warning is 'Warning: Matrix is close to singular or badly scaled. Results may be inaccurate. RCOND = 1.376132e-17. ' I figured that matrix singularity may have been the problem, although I hadn't appreciated that replacing only three channels could lead to it - I was expecting that to result from more channel replacements or using a lot of electrodes to interpolate with. Thanks a lot for the help, will try as you suggest Steve > > > ---------------------------------------------------------------------- > > Message: 1 > Date: Fri, 7 Jun 2013 10:23:20 +0100 > From: Steve Johnston > To: "fieldtrip at science.ru.nl" > Subject: [FieldTrip] Bad channel correction problems and ICA > Message-ID: <55D211F2-5D76-43EE-B41A-EA05C8FFCE6F at swansea.ac.uk> > Content-Type: text/plain; charset="windows-1252" > > Dear fters > > I've just started using ft and, although being able to run through a test run of eye movement data just fine, I'm now getting into the more detailed stuff and I'm hitting a snag that I hope you can help me with. > > Specifically I'm struggling to get any real ICA results after using ft_channelrepair but not if I go through without it. > > Data was recorded on a biosemi 128 system and the trials are just eye movements that I want to identify via ICA (simple test). > > If I just run through the procedure of importing data, set markers, remove gross artifacts (keeping all channels, including 3 bad ones) and then run the ICA - I get lovely eye movement components appearing. However, now I want to do it 'properly' and replace the bad channels. Currently I do the following ? (sorry, for completeness I included everything to be on the safe side). > > %% > % Standard cfg for import > > cfg = []; > cfg.trialdef.prestim = .2; > cfg.trialdef.poststim = 2; > cfg.trialdef.eventtype = 'STATUS'; > > %% > %Load each dataset and examine for channels that are bad - starting with EOG Localiser. > > cfg.dataset = [subjectdata.dir filesep subjectdata.artifactfile]; > cfg.trialdef.eventvalue = markers.artifact; > cfg = ft_definetrial(cfg); > > cfg.demean = 'yes'; > data = ft_preprocessing(cfg); > > % After the above, run ChannelRepair after identifying bad channels. > %% > % Channel Replace - get nearest neighbours > cfg = []; > cfg.method = 'distance' > cfg.layout = 'biosemi128.lay'; > cfg.neighbourdist = 0.13; > [neighbours] = ft_prepare_neighbours(cfg,data) > > %% Interpolate and put into new data structure > cfg = []; > cfg.badchannel = replace_channels; > cfg.layout = 'biosemi128.lay'; > cfg.method = 'nearest'; > cfg.neighbours = neighbours; > cfg.neighbourdist = 0.13; > artifact_cleandata = ft_channelrepair(cfg,data) > > % Visualise data for and mark uncorrectable artifacts. > cfg.viewmode = 'vertical'; > cfg.continuous = 'yes'; > cfg.blocksize = 12; > cfg = ft_databrowser(cfg,artifact_cleandata) > > %% > % Do artifact rejection (also redefine settings lost during re-cfg in artefact rejection) > cfg.trialdef.prestim = .2; > cfg.trialdef.poststim = 2; > cfg.trialdef.eventtype = 'STATUS'; > cfg.artifact.reject = 'complete'; > cfg.channel = 'EEG'; > cfg = ft_rejectartifact(cfg, artifact_cleandata); > trialdata = ft_preprocessing(cfg, artifact_cleandata); > > %% > cfg = []; > comp = ft_componentanalysis(cfg, trialdata); > cfg = []; > cfg.component = [1:20] > cfg.layout = 'biosemi128.lay' > cfg.comment = 'no' > ft_topoplotIC(cfg,comp) > > So, the big question is - why do I get nothing after doing the channel repair. I've been through it several times and that seems to be the step where everything goes wrong. I've looked at the data post re-interpolation and it looks good - for now I'm assuming I've missed something. > > Thanks for any help > > Steve > -------------- next part -------------- > An HTML attachment was scrubbed... > URL: > > ------------------------------ > > Message: 2 > Date: Fri, 07 Jun 2013 11:47:11 +0200 > From: "J?rn M. Horschig" > To: FieldTrip discussion list > Subject: Re: [FieldTrip] Bad channel correction problems and ICA > Message-ID: <51B1AC1F.1010008 at donders.ru.nl> > Content-Type: text/plain; charset="iso-8859-1"; Format="flowed" > > Hi Steve, > > I'm not quite sure what you mean with getting nothing (nothing like, > empty? or an error?) or not getting real ICA results (real in contrast > to complex?). My hunge is that you need to take the rank of your data > into account. Interpolating missing channels is done by combining > already existing information, i.e. channels, to reconstruct a > time-course at another spatial location, i.e. another channel. Since you > do not add any new information by this (it's just a linear combination > of your existing data matrix), you can leave that step out prior to > doing ICA. Otherwise, you can set something like ica_cfg.XXXica.pca = > rank(data.trial{1}), then afaik ft_componentanalysis will perform a PCA > and essentially identify that the interpolated channels are a linear > combination of other channels (ICA is then done of the PCA components). > Both methods are equivalent, so you might as well just drop the > interpolation and remove bad channels completely. > > Best, > J?rn > > > On 6/7/2013 11:23 AM, Steve Johnston wrote: >> Dear fters >> >> I've just started using ft and, although being able to run through a >> test run of eye movement data just fine, I'm now getting into the more >> detailed stuff and I'm hitting a snag that I hope you can help me with. >> >> Specifically I'm struggling to get any real ICA results after using >> ft_channelrepair but not if I go through without it. >> >> Data was recorded on a biosemi 128 system and the trials are just eye >> movements that I want to identify via ICA (simple test). >> >> If I just run through the procedure of importing data, set markers, >> remove gross artifacts (keeping all channels, including 3 bad ones) >> and then run the ICA - I get lovely eye movement components appearing. >> However, now I want to do it 'properly' and replace the bad channels. >> Currently I do the following ... (sorry, for completeness I included >> everything to be on the safe side). >> >> %% >> % Standard cfg for import >> >> cfg = []; >> cfg.trialdef.prestim = .2; >> cfg.trialdef.poststim = 2; >> cfg.trialdef.eventtype = 'STATUS'; >> >> %% >> %Load each dataset and examine for channels that are bad - starting >> with EOG Localiser. >> >> cfg.dataset = [subjectdata.dir filesep >> subjectdata.artifactfile]; >> cfg.trialdef.eventvalue = markers.artifact; >> cfg = ft_definetrial(cfg); >> >> cfg.demean = 'yes'; >> data = ft_preprocessing(cfg); >> >> % After the above, run ChannelRepair after identifying bad channels. >> %% >> % Channel Replace - get nearest neighbours >> cfg = []; >> cfg.method = 'distance' >> cfg.layout = 'biosemi128.lay'; >> cfg.neighbourdist = 0.13; >> [neighbours] = ft_prepare_neighbours(cfg,data) >> >> %% Interpolate and put into new data structure >> cfg = []; >> cfg.badchannel = replace_channels; >> cfg.layout = 'biosemi128.lay'; >> cfg.method = 'nearest'; >> cfg.neighbours = neighbours; >> cfg.neighbourdist = 0.13; >> artifact_cleandata = ft_channelrepair(cfg,data) >> >> % Visualise data for and mark uncorrectable artifacts. >> cfg.viewmode = 'vertical'; >> cfg.continuous = 'yes'; >> cfg.blocksize = 12; >> cfg = ft_databrowser(cfg,artifact_cleandata) >> >> %% >> % Do artifact rejection (also redefine settings lost during re-cfg in >> artefact rejection) >> cfg.trialdef.prestim = .2; >> cfg.trialdef.poststim = 2; >> cfg.trialdef.eventtype = 'STATUS'; >> cfg.artifact.reject = 'complete'; >> cfg.channel = 'EEG'; >> cfg = ft_rejectartifact(cfg, artifact_cleandata); >> trialdata = ft_preprocessing(cfg, artifact_cleandata); >> >> %% >> cfg = []; >> comp = ft_componentanalysis(cfg, trialdata); >> cfg = []; >> cfg.component = [1:20] >> cfg.layout = 'biosemi128.lay' >> cfg.comment = 'no' >> ft_topoplotIC(cfg,comp) >> >> So, the big question is - why do I get nothing after doing the channel >> repair. I've been through it several times and that seems to be the >> step where everything goes wrong. I've looked at the data post >> re-interpolation and it looks good - for now I'm assuming I've missed >> something. >> >> Thanks for any help >> >> Steve >> >> >> _______________________________________________ >> fieldtrip mailing list >> fieldtrip at donders.ru.nl >> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > > -- > J?rn M. Horschig > PhD Student > Donders Institute for Brain, Cognition and Behaviour > Centre for Cognitive Neuroimaging > Radboud University Nijmegen > Neuronal Oscillations Group > FieldTrip Development Team > > P.O. Box 9101 > NL-6500 HB Nijmegen > The Netherlands > > Contact: > E-Mail: jm.horschig at donders.ru.nl > Tel: +31-(0)24-36-68493 > Web: http://www.ru.nl/donders > > Visiting address: > Trigon, room 2.30 > Kapittelweg 29 > NL-6525 EN Nijmegen > The Netherlands > > -------------- next part -------------- > An HTML attachment was scrubbed... > URL: > > ------------------------------ > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > End of fieldtrip Digest, Vol 31, Issue 15 > ***************************************** From robince at gmail.com Fri Jun 7 17:03:21 2013 From: robince at gmail.com (Robin) Date: Fri, 7 Jun 2013 16:03:21 +0100 Subject: [FieldTrip] some of the requested samples occur twice In-Reply-To: <51AC623A.1080207@donders.ru.nl> References: <51AC623A.1080207@donders.ru.nl> Message-ID: Hi Jörn, Thanks. I am already using negative trlpadding. In this case I am trying to do the artifact detection on in memory trial data, because I want to do it after denoise_pca. I am not sure if this is correct but it seemed to me that denoise_pca is to correct physical aquisition artifacts so it would be better to do it before trying to identify biological artifacts that are a part of the recorded signal. The code I am using is below. If you could point out how to add padding for the ft*artifact* section so that it can work on in memory data it would be great. Thanks, Robin %% Automatic artifact rejection % for each run run_data = cell(1,length(sub.blocks)); trl_idx = 0; for ri=1:length(sub.blocks) % extra data to allow padding in artifact detection filterpad = 0.2; prestim = 0.5; poststim = 0.6; % extract trials cfg = []; cfg.dataset = fullfile(sub.megDataPath, num2str(sub.blocks(ri)), 'c,rfDC'); cfg.trialdef.eventtype = 'TRIGGER'; cfg.trialdef.eventvalue = 192; cfg.trialdef.prestim = prestim + filterpad; cfg.trialdef.poststim = poststim + filterpad; cfg.trialfun = 'ft_trialfun_general'; cfg.continuous = 'yes'; cfg = ft_definetrial(cfg); % overwrite unnecessary constant eventvalue % with trial number within this block cfg.trl(:,4) = (1:size(cfg.trl,1)) + trl_idx; trl_idx = trl_idx + size(cfg.trl,1); % remove jump artifact trials trlidx = ismember(cfg.trl(:,4), good_trials); cfg.trl = cfg.trl(trlidx, :); % load cfg.detrend = 'yes'; % long padding for line noise removal cfg.dftfilter = 'yes'; cfg.padding = 10; run_raw = ft_preprocessing(cfg); % apply denoise_pca cfg = []; if isfield(sub,'posthoc_badchannels') remove_chans = sub.posthoc_badchannels; else remove_chans = {}; end cfg.channel = ft_channelselection([{'all'} remove_chans], good_meg_channels); cfg.trials = find(ismember(run_raw.trialinfo, good_trials)); run_clean = ft_denoise_pca(cfg, run_raw); % artifact detection cfg = []; cfg.continuous = 'no'; % some trials are excluded cfg.trl = run_clean.sampleinfo; cfg.artfctdef.muscle.trlpadding = -filterpad; cfg.artfctdef.muscle.cutoff = 20; [cfg, artifact] = ft_artifact_muscle(cfg, run_clean); cfg.artfctdef.eog.trlpadding = -filterpad; cfg.artfctdef.eog.channel = {'A150' 'A124'}; cfg.artfctdef.eog.cutoff = 5; [cfg, artifact] = ft_artifact_eog(cfg, run_clean); % reject artifacts cfg.artfctdef.reject = 'complete'; run_artfree = ft_rejectartifact(cfg, run_clean); % reduce to the original window cfg = []; cfg.toilim = [-prestim poststim]; run_artfree = ft_redefinetrial(cfg, run_artfree); run_data{ri} = run_artfree;end On Mon, Jun 3, 2013 at 10:30 AM, "Jörn M. Horschig" < jm.horschig at donders.ru.nl> wrote: Hi Robin, > > it's not a bug that ft_fetch_data is not allowing for overlap. The > function needs to be generic and eventually allow for fetching data > extending over several trial segments. However, what should be the way to > fetch data that occurs twice, i.e. at the end of one trial and the > beginning of another? If you have data with overlapping samples, it is not > straight forward to define data from one trial as to be fetched and ignore > the other. Since preprocessing options like filters are applied per trial > segment, data will differ between trial segments if it overlaps. As there > are a multitude of possibilities to deal with this and none of them is > perfect (imho neither of them can even be called good), we decided to not > allow for that. > > For your problem, however, imho you can define negative trial padding in > the function call to ft_artifact_zvalue, which should effectively pad. Have > you tried this rather than padding manually? > > Best, > Jörn > > > On 5/31/2013 6:14 PM, Robin wrote: > >> I have a problem in preprocessing where I am getting this error: >> >> """ >> some of the requested samples occur twice in the data >> >> Error in ft_artifact_zvalue (line 262) >> dat{trlop} = ft_fetch_data(data, 'header', hdr, 'begsample', >> trl(trlop,1)-fltpadding, 'endsample', trl(trlop,2)+fltpadding, >> 'chanindx', sgnind, 'checkboundary', strcmp(cfg.continuous,'no >> Error in ft_artifact_muscle (line 158) >> [tmpcfg, artifact] = ft_artifact_zvalue(tmpcfg, data); >> """ >> >> I think this is because I am manually adding some extra padding to the >> trials so that the artifact filtering can use that padding (I am doing >> the artifact filtering on data in memory which is output from >> ft_denoise_pca). So in this case it is not a problem if consecutive >> trials overlap a bit. >> >> I would therefore like to disable this error and wondered what is the >> best way to do it. I am a bit confused because ft_artifact_zvalue >> calls ft_fetch data with a "checkboundary" option which looks like it >> might be what I want (and set correctly), but ft_fetch_data doesn't >> seem to use that option. Instead it has an allowoverlap option. >> >> So for now I will manually add the allowoverlap option to the call in >> ft_artifact_zvalue, but I wondered what checkboundary doesn't appear >> in ft_fetch_data or if this might be a bug. >> >> Cheers >> >> Robin >> ______________________________**_________________ >> fieldtrip mailing list >> fieldtrip at donders.ru.nl >> http://mailman.science.ru.nl/**mailman/listinfo/fieldtrip >> > > > -- > Jörn M. Horschig > PhD Student > Donders Institute for Brain, Cognition and Behaviour > Centre for Cognitive Neuroimaging > Radboud University Nijmegen > Neuronal Oscillations Group > FieldTrip Development Team > > P.O. Box 9101 > NL-6500 HB Nijmegen > The Netherlands > > Contact: > E-Mail: jm.horschig at donders.ru.nl > Tel: +31-(0)24-36-68493 > Web: http://www.ru.nl/donders > > Visiting address: > Trigon, room 2.30 > Kapittelweg 29 > NL-6525 EN Nijmegen > The Netherlands > > ______________________________**_________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/**mailman/listinfo/fieldtrip > -------------- next part -------------- An HTML attachment was scrubbed... URL: From jkamienk at gmail.com Fri Jun 7 19:02:22 2013 From: jkamienk at gmail.com (Juan Kamienkowski) Date: Fri, 7 Jun 2013 14:02:22 -0300 Subject: [FieldTrip] Cluster-based permutation tests on single channel Message-ID: Hi, I wanted to perform a Cluster-based permutation tests on time-frequency data, on a single channel (one Independent Component). But the ft_freqstatistics() function ask me for the "neighbours" field in the "cfg" structure, although I set the cfg.minnbchan to 0. Is there a way to run this analysis in a single channel? Thanks a lot in advance! Best, Juan -- Juan E Kamienkowski Laboratorio de Neurociencia Integrativa Departamento de Fisica, FCEN-UBA Ciudad Universitaria, Pabellon I (1428) Buenos Aires, Argentina Phone: (54-11) 4576 3300 (282) Fax: (54-11) 4576 3357 http://www.neurociencia.df.uba.ar/ -------------- next part -------------- An HTML attachment was scrubbed... URL: From Don.Rojas at ucdenver.edu Fri Jun 7 23:37:10 2013 From: Don.Rojas at ucdenver.edu (Rojas, Don) Date: Fri, 7 Jun 2013 15:37:10 -0600 Subject: [FieldTrip] Cluster-based permutation tests on single channel In-Reply-To: References: Message-ID: Juan, The neighbours field is for defining adjacent channels for multi-channel multiple comparison correction. I'm not sure if you've gotten a response on this yet, but you simply set the cfg.neighbours field to be empty in your call to ft_freqstatistics for using cluster based corrections within time-frequency space for single channels. cfg.neighbours = []; Best, Don On Jun 7, 2013, at 11:02 AM, Juan Kamienkowski > wrote: Hi, I wanted to perform a Cluster-based permutation tests on time-frequency data, on a single channel (one Independent Component). But the ft_freqstatistics() function ask me for the "neighbours" field in the "cfg" structure, although I set the cfg.minnbchan to 0. Is there a way to run this analysis in a single channel? Thanks a lot in advance! Best, Juan -- Juan E Kamienkowski Laboratorio de Neurociencia Integrativa Departamento de Fisica, FCEN-UBA Ciudad Universitaria, Pabellon I (1428) Buenos Aires, Argentina Phone: (54-11) 4576 3300 (282) Fax: (54-11) 4576 3357 http://www.neurociencia.df.uba.ar/ _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -------------- next part -------------- An HTML attachment was scrubbed... URL: From Don.Rojas at ucdenver.edu Fri Jun 7 23:37:10 2013 From: Don.Rojas at ucdenver.edu (Rojas, Don) Date: Fri, 7 Jun 2013 15:37:10 -0600 Subject: [FieldTrip] Cluster-based permutation tests on single channel In-Reply-To: References: Message-ID: Juan, The neighbours field is for defining adjacent channels for multi-channel multiple comparison correction. I'm not sure if you've gotten a response on this yet, but you simply set the cfg.neighbours field to be empty in your call to ft_freqstatistics for using cluster based corrections within time-frequency space for single channels. cfg.neighbours = []; Best, Don On Jun 7, 2013, at 11:02 AM, Juan Kamienkowski > wrote: Hi, I wanted to perform a Cluster-based permutation tests on time-frequency data, on a single channel (one Independent Component). But the ft_freqstatistics() function ask me for the "neighbours" field in the "cfg" structure, although I set the cfg.minnbchan to 0. Is there a way to run this analysis in a single channel? Thanks a lot in advance! Best, Juan -- Juan E Kamienkowski Laboratorio de Neurociencia Integrativa Departamento de Fisica, FCEN-UBA Ciudad Universitaria, Pabellon I (1428) Buenos Aires, Argentina Phone: (54-11) 4576 3300 (282) Fax: (54-11) 4576 3357 http://www.neurociencia.df.uba.ar/ _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -------------- next part -------------- An HTML attachment was scrubbed... URL: From haristz at gmail.com Sat Jun 8 00:25:03 2013 From: haristz at gmail.com (Charidimos Tzagarakis) Date: Fri, 7 Jun 2013 17:25:03 -0500 Subject: [FieldTrip] Using ft_rejectcomponent after PCA reduction Message-ID: Dear Fieldtripverse, I have been experimenting with using ICA for artifact correction and have the following question: Because of the relatively large number of channels vs samples I have, I use the option to first reduce the dimensionality of the data with PCA (I have 248 MEG channels and I select, say 100 components, using the cfg.numcomponent=100 and cfg.runica.pca=100 in the call to ft_componentanalysis ). So the "topo" matrix in the component output structure has dimensions 248x100 and the unmixing matrix has dimensions 100x248. I then use something like "data = ft_rejectcomponent(cfg, comp,data)" to say reject 2 components cfg.component=[30 40] that contain ECG signal. Note: data here is the original data I fed in the ft_componentanalysis function. This is all pretty straightforward and as described in the Fieldtrip tutorial (minus the PCA part) . I am however a bit worried by the message:"removing 2 components keeping 246 components" I get in the end. Should it not be "removing 2 components keeping 98 components"? When I look in the code for ft_rejectcomponent, I can see that if "hasdata" is True the message is calculated based on the number of channels : fprintf('keeping %d components\n', nchans-length(cfg.component)); On the other hand (as far as I can tell, not being an ICA expert) the actual calculation for the removal of the desired components seems to correctly use the components selected for removal : mixing = comp.topo(selcomp,:); unmixing = comp.unmixing(:,selcomp); tra = eye(length(selcomp)) - mixing(:, cfg.component)*unmixing(cfg. component, :); (I do note the comment under that snippet!: %I am not sure about this, but it gives comparable results to the ~hasdata case %when comp contains non-orthogonal (=ica) topographies, and contains a complete decomposition) Further down the function code there are however more operations (eg remove unused channels, remove unused components ) where I am less able to follow things to make sure it is robust to non-square mixing and unmixing matrices. In summary, I wanted to ask if it is OK to use ft_rejectcomponent in this way (ie without decomposing to the full number of ICA's and then using it on the original data). With Thanks and Best Wishes, Haris Charidimos [Haris] Tzagarakis MD, PhD, MRCPsych University of Minnesota Dept of Neuroscience and Brain Sciences Center -------------- next part -------------- An HTML attachment was scrubbed... URL: From mengtongxiao at gmail.com Sun Jun 9 03:31:56 2013 From: mengtongxiao at gmail.com (=?GB2312?B?s8LRqQ==?=) Date: Sun, 9 Jun 2013 09:31:56 +0800 Subject: [FieldTrip] what is the MNI-template be use to constructed sourcemodel , MNI125 or colin27? Message-ID: Dear all I use the model ( fieldtrip/template/sourcemodel ) doing source reconstruction with beamformer . I want to know the template is matching MNI125 or colin27 . thanks. best , xiao -------------- next part -------------- An HTML attachment was scrubbed... URL: From nomeserio at gmail.com Mon Jun 10 10:29:21 2013 From: nomeserio at gmail.com (Michele Barsotti) Date: Mon, 10 Jun 2013 10:29:21 +0200 Subject: [FieldTrip] Downloading FieldTrip Message-ID: Dear FieldTrip users and staff, I'm dealing with the download of fieldtrip but everytime I try a download error occurs with this message: "...fieldtrip-aaaammgg.zip could not be saved, because the source file could not be read. Try again later, or contact the server administrator." Can someone help me? Thank in advance -- -Michele- -------------- next part -------------- An HTML attachment was scrubbed... URL: From joramvandriel at gmail.com Mon Jun 10 16:09:25 2013 From: joramvandriel at gmail.com (Joram van Driel) Date: Mon, 10 Jun 2013 16:09:25 +0200 Subject: [FieldTrip] BEM for MEG data Message-ID: Dear Fieldtrip users and developers, I've been struggling quite some time now with the following problem. We want to do source localization of MEG data from an experiment with 10 subjects. We collected MRIs using a Phillips scanner (UvA), and MEG data using the Neuromag Elekta scanner (VUmc). Using Neuromag software in Linux (seglab, xfit), I've created BEM forward models based on coregistered MRIs (coregistration also done using the Neuromag package), which result in .fif files (extension *bem-sol.fif). Using these models we want to continue computing the leadfields and doing source reconstruction in Matlab. For the latter, we have our own customized codes; to get the leadfield, we need some step in between. I'm trying to use fieldtrip functions for this but I get stuck. Here's what I do: - Import the bem fif files using the mne toolbox (function: mne_read_bem_surfaces). - Attach the imported boundary data to a vol structure as follows: [bem] = mne_read_bem_surfaces(bemfilz(subno).name); vol = []; vol.bnd.pnt = bem.rr; vol.bnd.tri = double(bem.tris); vol.unit = 'mm'; vol.cfg.sourceunits = 'mm'; vol.type = 'bemcp'; vol.cfg.numvertices = bem.np; - Import the sensor locations using ft_read_sens and convert to mm using ft_convert_units. - Check whether the resulting structures are OK for leadfield computation using ft_prepare_vol_sens. This results in an error "Unsupported volume conductor model for MEG". I also tried ft_read_vol, but for Neuromag this needs the meg-pd toolbox which doesn't run on Windows (the Linux we use for the Neuromag software, in turn, is a virtual machine and doesn't have Matlab). Is there a way around this? Using BEM models for MEG data should in principle be possible, but not using Fieldtrip? Any suggestions would be much appreciated! Thanks in advance, Joram -- Joram van Driel, MSc. PhD student at the University of Amsterdam Department of Psychology, Brain & Cognition -------------- next part -------------- An HTML attachment was scrubbed... URL: From aaron.schurger at gmail.com Mon Jun 10 18:11:23 2013 From: aaron.schurger at gmail.com (Aaron Schurger) Date: Mon, 10 Jun 2013 18:11:23 +0200 Subject: [FieldTrip] What are the units output by ft_freqanalysis_tfr? Message-ID: Hi, I am preparing figures for a paper, one of which is a time-frequency plot of the output from ft_freqanalysis (using the tfr method). The units of the data going in were on the order of 10e-11 or smaller (MEG data), but the units on the color (power) axis of the plot are on the order of 10e-1. Are the units normalized by default when you use ft_freqanalysis? If not then what are the units? The help on these functions was short on this kind of detail. Thanks! Aaron Schurger -- Aaron Schurger, PhD Post-doctoral researcher INSERM U992 / NeuroSpin CEA - Saclay, France +33-1-69-08-66-47 aaron.schurger at gmail.com http://www.unicog.org From ivan.skelin at uleth.ca Tue Jun 11 03:57:55 2013 From: ivan.skelin at uleth.ca (Skelin, Ivan) Date: Mon, 10 Jun 2013 18:57:55 -0700 Subject: [FieldTrip] ncs file downsampling and further processing Message-ID: Hi, I am recording from the anesthetized rats using the two NeuroNexus silicone probes with 8 tetrodes (32 channels) each and Neuralynx Cheetah system at 32556 Hz sampling frequency. I choose to analyze the .ncs files from 1/4 of the channels or 1 channel per tetrode. Since the recordings took about 150 mins, the .ncs files are too bulky (0.5 GB) for the standard procedure that the FieldTrip recommends for discontinuous data recorded using Neuralynx system. More precisely, when I preprocess the channels separately and subsequently run the ft_read_neuralynx_interp on them, I get the "out of memory" error message (even when running it on only two .ncs files at the time). My question is if I can first downsample all the .csc files that I want to analyze using the ft_spikedownsample, before I run the ft_read_neuralynx_interp on them? Thank you very much, Ivan -- Ivan Skelin, MD, PhD Postdoctoral Fellow Polaris Brain Dynamics Research Group Canadian Centre for Behavioural Neuroscience The University of Lethbridge 4401 University Dr W Lethbridge, AB, T1K 3M4 Canada http://lethbridgebraindynamics.com -------------- next part -------------- An HTML attachment was scrubbed... URL: From explena at gmail.com Tue Jun 11 09:48:34 2013 From: explena at gmail.com (Shen-Mou Hsu) Date: Tue, 11 Jun 2013 15:48:34 +0800 Subject: [FieldTrip] ROC_based permutation test Message-ID: Dear all, I was trying to perform signle-trial ROC-based permutation tests using the statfun_roc. However I encountered two questions and wondered if anyone could kindly shed some light on the issues. First, is it necessary to perform baseline normalization for each trial before the tests? Second, an error message returned stating "Error using roc. Too many input arguments. Error using ft_statistics_montecarlo (line 223) could not determine the parametric critical value for clustering", after running the following script: load (['t_RF_EpoRejDePow']); load (['t_RN_EpoRejDePow']); cfg = []; cfg.channel = 'MEG'; cfg.latency = [-0.35 0.55]; cfg.frequency = [8 12]; cfg.parameter = 'powspctrm'; cfg.method = 'montecarlo'; cfg.statistic = 'roc'; cfg.alpha = 0.025; cfg.tail = 0; cfg.correctm = 'cluster'; cfg.clusteralpha = 0.05; % cfg.correcttail = 'prob'; cfg.clustertail = 0; cfg.numrandomization = 1000; cfg.minnbchan = 2; cfg_neighb.method = 'distance'; cfg.neighbours = ft_prepare_neighbours(cfg_neighb, t_RN_EpoRejDePow); cfg.logtransform = 'yes'; design = [1*ones(1,size(t_RF_EpoRejDePow.powspctrm,1)) 2*ones(1,size(t_RN_EpoRejDePow.powspctrm,1))]; % the first dimension of these variable is the trial number. cfg.design = design; P_ROC_t_RFvsRN = ft_freqstatistics(cfg,t_RF_EpoRejDePow,t_RN_EpoRejDePow); Any help is greatly appreciated. Best regards, Shen-Mou Hsu -------------- next part -------------- An HTML attachment was scrubbed... URL: From eelke.spaak at donders.ru.nl Tue Jun 11 09:58:58 2013 From: eelke.spaak at donders.ru.nl (Eelke Spaak) Date: Tue, 11 Jun 2013 09:58:58 +0200 Subject: [FieldTrip] What are the units output by ft_freqanalysis_tfr? In-Reply-To: References: Message-ID: Hi Aaron, How are you plotting the data? If you are using ft_single/multi/topoplotTFR, did you use baseline correction (cfg.baseline = 'yes' or [begin end])? If you use cfg.baselinetype = 'relative' or cfg.baselinetype = 'relchange', data plotted will typically be on the order of 10e-1. It represents ratio vs baseline ('relative') or relative change vs baseline ('relchange'). If you did not specify baseline correction, then there is something else going on. In any case, ft_freqanalysis does not explicitly transform/normalize units; it does not care about them. Best, Eelke On 10 June 2013 18:11, Aaron Schurger wrote: > Hi, > I am preparing figures for a paper, one of which is a time-frequency > plot of the output from ft_freqanalysis (using the tfr method). The > units of the data going in were on the order of 10e-11 or smaller (MEG > data), but the units on the color (power) axis of the plot are on the > order of 10e-1. Are the units normalized by default when you use > ft_freqanalysis? If not then what are the units? The help on these > functions was short on this kind of detail. > Thanks! > Aaron Schurger > > -- > Aaron Schurger, PhD > Post-doctoral researcher > INSERM U992 / NeuroSpin > CEA - Saclay, France > +33-1-69-08-66-47 > aaron.schurger at gmail.com > http://www.unicog.org > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip From eelke.spaak at donders.ru.nl Tue Jun 11 10:18:09 2013 From: eelke.spaak at donders.ru.nl (Eelke Spaak) Date: Tue, 11 Jun 2013 10:18:09 +0200 Subject: [FieldTrip] ROC_based permutation test In-Reply-To: References: Message-ID: Dear Shen-Mou Hsu, With regards to your first question, I do not know the answer, so someone else might help you there. In response to your second question, regarding the error "could not determine the parametric critical value for clustering", this is caused by the value of cfg.clusterthreshold used. The default value there is 'parametric', meaning that the statistics routine will ask your 'statfun' to compute a parametric threshold for considering a (time/frequency/channel)-voxel a cluster-member candidate. This can be done by e.g. depsamplesT or indepsamplesT, as it is possible to analytically compute a T value corresponding to p < 0.05. However, in the case of the ROC statistic, no such parametric estimate can be computed (or perhaps it can be in some way, I don't know, but at least I know the FT implementation does not). Fortunately, the statistics routines also allow you to use a nonparametric threshold for cluster-member candidates, based on the generated distribution of the test statistic under the null hypothesis. To use this, simply specify cfg.clusterthreshold = 'nonparametric_individual' or cfg.clusterthreshold = 'nonparametric_common'. The difference between the two is that the former computes a threshold per voxel, and the latter uses the same threshold for all voxels. Which one is appropriate for you I don't know. (Good reasons for using 'nonparametric_individual' might be a strong variation of your test statistic with frequency. I know for a fact this is the case with certain quantifications of phase-amplitude coupling; these show much higher values in the low frequencies even when computed on noise.) Hope this helps. Best, Eelke On 11 June 2013 09:48, Shen-Mou Hsu wrote: > Dear all, > > I was trying to perform signle-trial ROC-based permutation tests using the > statfun_roc. However I encountered two questions and wondered if anyone > could kindly shed some light on the issues. First, is it necessary to > perform baseline normalization for each trial before the tests? Second, an > error message returned stating "Error using roc. Too many input arguments. > Error using ft_statistics_montecarlo (line 223) could not determine the > parametric critical value for clustering", after running the following > script: > > load (['t_RF_EpoRejDePow']); load (['t_RN_EpoRejDePow']); > > cfg = []; > cfg.channel = 'MEG'; > cfg.latency = [-0.35 0.55]; > cfg.frequency = [8 12]; > cfg.parameter = 'powspctrm'; > cfg.method = 'montecarlo'; > cfg.statistic = 'roc'; > cfg.alpha = 0.025; > cfg.tail = 0; > cfg.correctm = 'cluster'; > cfg.clusteralpha = 0.05; > % cfg.correcttail = 'prob'; > cfg.clustertail = 0; > cfg.numrandomization = 1000; > cfg.minnbchan = 2; > cfg_neighb.method = 'distance'; > cfg.neighbours = ft_prepare_neighbours(cfg_neighb, t_RN_EpoRejDePow); > cfg.logtransform = 'yes'; > > design = [1*ones(1,size(t_RF_EpoRejDePow.powspctrm,1)) > 2*ones(1,size(t_RN_EpoRejDePow.powspctrm,1))]; % the first dimension of > these variable is the trial number. > cfg.design = design; > > P_ROC_t_RFvsRN = ft_freqstatistics(cfg,t_RF_EpoRejDePow,t_RN_EpoRejDePow); > > > Any help is greatly appreciated. > > Best regards, > > Shen-Mou Hsu > > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip From aaron.schurger at gmail.com Tue Jun 11 11:00:03 2013 From: aaron.schurger at gmail.com (Aaron Schurger) Date: Tue, 11 Jun 2013 11:00:03 +0200 Subject: [FieldTrip] What are the units output by ft_freqanalysis_tfr? In-Reply-To: References: Message-ID: Hi, Eelke, Thanks for your reply. I think that might explain it. When I step through my code, I see that the units are as expected for MEG in the output from ft_freqanalysis, so it must be something after that stage that is changing. Thanks for the tip! Best wishes, Aaron On Tue, Jun 11, 2013 at 9:58 AM, Eelke Spaak wrote: > Hi Aaron, > > How are you plotting the data? If you are using > ft_single/multi/topoplotTFR, did you use baseline correction > (cfg.baseline = 'yes' or [begin end])? If you use cfg.baselinetype = > 'relative' or cfg.baselinetype = 'relchange', data plotted will > typically be on the order of 10e-1. It represents ratio vs baseline > ('relative') or relative change vs baseline ('relchange'). > > If you did not specify baseline correction, then there is something > else going on. In any case, ft_freqanalysis does not explicitly > transform/normalize units; it does not care about them. > > Best, > Eelke > > On 10 June 2013 18:11, Aaron Schurger wrote: >> Hi, >> I am preparing figures for a paper, one of which is a time-frequency >> plot of the output from ft_freqanalysis (using the tfr method). The >> units of the data going in were on the order of 10e-11 or smaller (MEG >> data), but the units on the color (power) axis of the plot are on the >> order of 10e-1. Are the units normalized by default when you use >> ft_freqanalysis? If not then what are the units? The help on these >> functions was short on this kind of detail. >> Thanks! >> Aaron Schurger >> >> -- >> Aaron Schurger, PhD >> Post-doctoral researcher >> INSERM U992 / NeuroSpin >> CEA - Saclay, France >> +33-1-69-08-66-47 >> aaron.schurger at gmail.com >> http://www.unicog.org >> _______________________________________________ >> fieldtrip mailing list >> fieldtrip at donders.ru.nl >> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -- Aaron Schurger, PhD Post-doctoral researcher INSERM U992 / NeuroSpin CEA - Saclay, France +33-1-69-08-66-47 aaron.schurger at gmail.com http://www.unicog.org From nicolai at mersebak.dk Wed Jun 12 15:44:00 2013 From: nicolai at mersebak.dk (Nicolai Mersebak) Date: Wed, 12 Jun 2013 15:44:00 +0200 Subject: [FieldTrip] Source statistics on spatio-temporal source reconstruction data (MNE) Message-ID: Dear all, I have a question concerning the usage of ft_sourcegrandaverage and ft_sourcestatistics. After using ft_sourceanalysis (method: MNE), I get spatio-temporal source reconstructed data in source.avg.pow (4050 x 897): 4050 sources and 897 time points. Now I would like to use the cluster-based permutation test on my source reconstructed data. However it seems like ft_sourcegrandaverage and ft_sourcestatistics don't support source level time courses. E.g when I am using ft_sourcegrandaverage I am getting the following error: Error in ft_sourcegrandaverage (line 158) dat(:,i) = tmp(:); Looking into the code: for i=1:Nsubject tmp = getsubfield(varargin{i}, parameterselection(cfg.parameter, varargin{i})); dat(:,i) = tmp(:); tmp = getsubfield(varargin{i}, 'inside'); inside(tmp,i) = 1; end I see that "tmp" are getting the structure [N_sources x timepoints] from source.avg.pow for one subject, where "dat" requires the structure [N_sources x 1]. I seached the mailing list for similar issues and found this thread: http://mailman.science.ru.nl/pipermail/fieldtrip/2010-September/003122.html Since I am interested in using the temporal dimension in my statistics, I would like to know if it is still not possible to use spatio-temporal source reconstructed data in ft_sourcestatistics and ft_sourcegrandaverage ? Or if any have succeeded in using the cluster-based permutation test on source level also including the temporal dimension ? Alternative I was thinking that I might could use ft_timelockstatistics, where I substituted the channels with sources, e.g instead of having 64 channels, I would now have 4050 "channels". If so I need to calculate a label structure and an appropriate neighbor structure, which I guess is possible as I have all the 3D coordinates for each source, e.g in leadfield.pos ? I know this is a work around solution, but have anyone tried or have any experience using such an approach ? Best, Nicolai -------------- next part -------------- An HTML attachment was scrubbed... URL: From johanna.zumer at donders.ru.nl Wed Jun 12 16:03:16 2013 From: johanna.zumer at donders.ru.nl (Johanna Zumer) Date: Wed, 12 Jun 2013 16:03:16 +0200 Subject: [FieldTrip] Source statistics on spatio-temporal source reconstruction data (MNE) In-Reply-To: References: Message-ID: Dear Nicolai, Good timing, I have just last week filed a 'bug' for this code modification request: http://bugzilla.fcdonders.nl/show_bug.cgi?id=2185 You may add yourself to the CC list if you wish to receive updates on the bug progress. I would be interested to hear if anyone else has thoughts on your suggestion to 'hack' it as a timelock structure with channels. Best, Johanna 2013/6/12 Nicolai Mersebak > Dear all, > > I have a question concerning the usage of ft_sourcegrandaverage and > ft_sourcestatistics. > > After using ft_sourceanalysis (method: MNE), I get spatio-temporal source > reconstructed data in source.avg.pow (4050 x 897): 4050 sources and 897 > time points. > > Now I would like to use the cluster-based permutation test on my source > reconstructed data. However it seems like ft_sourcegrandaverage and ft_sourcestatistics > don't support source level time courses. E.g when I am using ft_sourcegrandaverage > I am getting the following error: > > Error in ft_sourcegrandaverage (line 158) > dat(:,i) = tmp(:); > > Looking into the code: > > for i=1:Nsubject > > tmp = getsubfield(varargin{i}, parameterselection(cfg.parameter, > varargin{i})); > > dat(:,i) = tmp(:); > > tmp = getsubfield(varargin{i}, 'inside'); > > inside(tmp,i) = 1; > > end > > I see that "tmp" are getting the structure [N_sources x timepoints] from > source.avg.pow for one subject, where "dat" requires the structure > [N_sources x 1]. > > I seached the mailing list for similar issues and found this thread: > > http://mailman.science.ru.nl/pipermail/fieldtrip/2010-September/003122.html > > Since I am interested in using the temporal dimension in my statistics, I > would like to know if it is still not possible to use spatio-temporal > source reconstructed data in ft_sourcestatistics and ft_sourcegrandaverage ? > > Or if any have succeeded in using the cluster-based permutation test on > source level also including the temporal dimension ? > > Alternative I was thinking that I might could use ft_timelockstatistics, > where I substituted the channels with sources, e.g instead of having 64 > channels, I would now have 4050 "channels". > If so I need to calculate a label structure and an appropriate neighbor > structure, which I guess is possible as I have all the 3D coordinates for > each source, e.g in leadfield.pos ? > I know this is a work around solution, but have anyone tried or have any > experience using such an approach ? > > Best, > > Nicolai > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > -------------- next part -------------- An HTML attachment was scrubbed... URL: From jm.horschig at donders.ru.nl Wed Jun 12 16:20:29 2013 From: jm.horschig at donders.ru.nl (=?ISO-8859-1?Q?=22J=F6rn_M=2E_Horschig=22?=) Date: Wed, 12 Jun 2013 16:20:29 +0200 Subject: [FieldTrip] Source statistics on spatio-temporal source reconstruction data (MNE) In-Reply-To: References: Message-ID: <51B883AD.8020707@donders.ru.nl> Heyho, it might be a good way, at least I am doing it that way :) But think about defining neighbouring voxels beforehands (easily doable for a decent programmer, hard for a not-so-experienced programmer). In the upcoming months/years there will be something changing on the source-front anyway, so maybe it is best to use the temporary solution with ft_timelockXXX until then. Note that my personal opinion does not necessarily reflect the opinion of the core dev team ;) Best, Jörn On 6/12/2013 4:03 PM, Johanna Zumer wrote: > Dear Nicolai, > > Good timing, I have just last week filed a 'bug' for this code > modification request: http://bugzilla.fcdonders.nl/show_bug.cgi?id=2185 > You may add yourself to the CC list if you wish to receive updates on > the bug progress. > > I would be interested to hear if anyone else has thoughts on your > suggestion to 'hack' it as a timelock structure with channels. > > Best, > Johanna > > > 2013/6/12 Nicolai Mersebak > > > Dear all, > > I have a question concerning the usage of ft_sourcegrandaverage > and ft_sourcestatistics. > > After using ft_sourceanalysis (method: MNE), I get spatio-temporal > source reconstructed data in source.avg.pow (4050 x 897): 4050 > sources and 897 time points. > > Now I would like to use the cluster-based permutation test on my > source reconstructed data. However it seems like > ft_sourcegrandaverage and ft_sourcestatistics don't support source > level time courses. E.g when I am using ft_sourcegrandaverage I am > getting the following error: > > Error in ft_sourcegrandaverage (line 158) > dat(:,i) = tmp(:); > > Looking into the code: > > for i=1:Nsubject > > tmp = getsubfield(varargin{i}, parameterselection(cfg.parameter, > varargin{i})); > > dat(:,i) = tmp(:); > > tmp = getsubfield(varargin{i}, 'inside'); > > inside(tmp,i) = 1; > > end > > > I see that "tmp" are getting the structure [N_sources x > timepoints] from source.avg.pow for one subject, where "dat" > requires the structure [N_sources x 1]. > > I seached the mailing list for similar issues and found this thread: > > http://mailman.science.ru.nl/pipermail/fieldtrip/2010-September/003122.html > > Since I am interested in using the temporal dimension in my > statistics, I would like to know if it is still not possible to > use spatio-temporal source reconstructed data in > ft_sourcestatistics and ft_sourcegrandaverage ? > > Or if any have succeeded in using the cluster-based permutation > test on source level also including the temporal dimension ? > > Alternative I was thinking that I might could use > ft_timelockstatistics, where I substituted the channels with > sources, e.g instead of having 64 channels, I would now have 4050 > "channels". > If so I need to calculate a label structure and an appropriate > neighbor structure, which I guess is possible as I have all the 3D > coordinates for each source, e.g in leadfield.pos ? > I know this is a work around solution, but have anyone tried or > have any experience using such an approach ? > > Best, > > Nicolai > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -- Jörn M. Horschig PhD Student Donders Institute for Brain, Cognition and Behaviour Centre for Cognitive Neuroimaging Radboud University Nijmegen Neuronal Oscillations Group FieldTrip Development Team P.O. Box 9101 NL-6500 HB Nijmegen The Netherlands Contact: E-Mail: jm.horschig at donders.ru.nl Tel: +31-(0)24-36-68493 Web: http://www.ru.nl/donders Visiting address: Trigon, room 2.30 Kapittelweg 29 NL-6525 EN Nijmegen The Netherlands -------------- next part -------------- An HTML attachment was scrubbed... URL: From smoratti at psi.ucm.es Wed Jun 12 17:44:59 2013 From: smoratti at psi.ucm.es (smoratti at psi.ucm.es) Date: Wed, 12 Jun 2013 17:44:59 +0200 Subject: [FieldTrip] Source statistics on spatio-temporal source reconstruction data (MNE) In-Reply-To: References: Message-ID: <05B1DB8A-163B-40C0-B303-5B7D2A5434BD@psi.ucm.es> Dear Nicolai, Indeed I have used ft_timelockstatistics for minimum norm source data. The trick is to put the source level data into a ERF structure. Determining the neighbors of a source surface with vertices is not trivial. However I used tess_vertconn.m from the BrainStorm toolbox to get the connectivity matrix that tells you who is a neighbor. This you can feed into timelockstats. Hope that helps, Stephan ________________________________________________________ Stephan Moratti, PhD see also: http://web.me.com/smoratti/ Universidad Complutense de Madrid Facultad de Psicología Departamento de Psicología Básica I Campus de Somosaguas 28223 Pozuelo de Alarcón (Madrid) Spain and Center for Biomedical Technology Laboratory for Cognitive and Computational Neuroscience Parque Científico y Tecnológico de la Universidad Politecnica de Madrid Campus Montegancedo 28223 Pozuelo de Alarcón (Madrid) Spain email: smoratti at psi.ucm.es Tel.: +34 679219982 El 12/06/2013, a las 15:44, Nicolai Mersebak escribió: > Dear all, > > I have a question concerning the usage of ft_sourcegrandaverage and ft_sourcestatistics. > > After using ft_sourceanalysis (method: MNE), I get spatio-temporal source reconstructed data in source.avg.pow (4050 x 897): 4050 sources and 897 time points. > > Now I would like to use the cluster-based permutation test on my source reconstructed data. However it seems like ft_sourcegrandaverage and ft_sourcestatistics don't support source level time courses. E.g when I am using ft_sourcegrandaverage I am getting the following error: > > Error in ft_sourcegrandaverage (line 158) > dat(:,i) = tmp(:); > > Looking into the code: > > for i=1:Nsubject > tmp = getsubfield(varargin{i}, parameterselection(cfg.parameter, varargin{i})); > dat(:,i) = tmp(:); > tmp = getsubfield(varargin{i}, 'inside'); > inside(tmp,i) = 1; > end > > I see that "tmp" are getting the structure [N_sources x timepoints] from source.avg.pow for one subject, where "dat" requires the structure [N_sources x 1]. > > I seached the mailing list for similar issues and found this thread: > > http://mailman.science.ru.nl/pipermail/fieldtrip/2010-September/003122.html > > Since I am interested in using the temporal dimension in my statistics, I would like to know if it is still not possible to use spatio-temporal source reconstructed data in ft_sourcestatistics and ft_sourcegrandaverage ? > > Or if any have succeeded in using the cluster-based permutation test on source level also including the temporal dimension ? > > Alternative I was thinking that I might could use ft_timelockstatistics, where I substituted the channels with sources, e.g instead of having 64 channels, I would now have 4050 "channels". > If so I need to calculate a label structure and an appropriate neighbor structure, which I guess is possible as I have all the 3D coordinates for each source, e.g in leadfield.pos ? > I know this is a work around solution, but have anyone tried or have any experience using such an approach ? > > Best, > > Nicolai > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -------------- next part -------------- An HTML attachment was scrubbed... URL: From jan.schoffelen at donders.ru.nl Wed Jun 12 18:00:46 2013 From: jan.schoffelen at donders.ru.nl (jan-mathijs schoffelen) Date: Wed, 12 Jun 2013 18:00:46 +0200 Subject: [FieldTrip] Source statistics on spatio-temporal source reconstruction data (MNE) In-Reply-To: <05B1DB8A-163B-40C0-B303-5B7D2A5434BD@psi.ucm.es> References: <05B1DB8A-163B-40C0-B303-5B7D2A5434BD@psi.ucm.es> Message-ID: <683ABC6E-9FC6-420A-9DCF-E54D6FC6A27E@donders.ru.nl> An alternative would be to interpolate the cortical sheet to a 3D grid (where the grid is defined for each subject based on a warped template grid defined in a standard space), and then do clustering using a regular 3D spatial neighbourhood structure. The rationale being that two vertices on the sheet may appear as disconnected (e.g. being on two sides of a sulcus) whereas, given the poor spatial resolution, they belong to the same spatial blob. Best, Jan-Mathijs On Jun 12, 2013, at 5:44 PM, smoratti at psi.ucm.es wrote: > Dear Nicolai, > > Indeed I have used ft_timelockstatistics for minimum norm source data. The trick is to put the source level data into a ERF structure. Determining the neighbors of a source surface with vertices is not trivial. However I used tess_vertconn.m from the BrainStorm toolbox to get the connectivity matrix that tells you who is a neighbor. This you can feed into timelockstats. > > Hope that helps, > > Stephan > > ________________________________________________________ > Stephan Moratti, PhD > > see also: http://web.me.com/smoratti/ > > Universidad Complutense de Madrid > Facultad de Psicología > Departamento de Psicología Básica I > Campus de Somosaguas > 28223 Pozuelo de Alarcón (Madrid) > Spain > > and > > Center for Biomedical Technology > Laboratory for Cognitive and Computational Neuroscience > Parque Científico y Tecnológico de la Universidad Politecnica de Madrid > Campus Montegancedo > 28223 Pozuelo de Alarcón (Madrid) > Spain > > > email: smoratti at psi.ucm.es > Tel.: +34 679219982 > > El 12/06/2013, a las 15:44, Nicolai Mersebak escribió: > >> Dear all, >> >> I have a question concerning the usage of ft_sourcegrandaverage and ft_sourcestatistics. >> >> After using ft_sourceanalysis (method: MNE), I get spatio-temporal source reconstructed data in source.avg.pow (4050 x 897): 4050 sources and 897 time points. >> >> Now I would like to use the cluster-based permutation test on my source reconstructed data. However it seems like ft_sourcegrandaverage and ft_sourcestatistics don't support source level time courses. E.g when I am using ft_sourcegrandaverage I am getting the following error: >> >> Error in ft_sourcegrandaverage (line 158) >> dat(:,i) = tmp(:); >> >> Looking into the code: >> >> for i=1:Nsubject >> tmp = getsubfield(varargin{i}, parameterselection(cfg.parameter, varargin{i})); >> dat(:,i) = tmp(:); >> tmp = getsubfield(varargin{i}, 'inside'); >> inside(tmp,i) = 1; >> end >> >> I see that "tmp" are getting the structure [N_sources x timepoints] from source.avg.pow for one subject, where "dat" requires the structure [N_sources x 1]. >> >> I seached the mailing list for similar issues and found this thread: >> >> http://mailman.science.ru.nl/pipermail/fieldtrip/2010-September/003122.html >> >> Since I am interested in using the temporal dimension in my statistics, I would like to know if it is still not possible to use spatio-temporal source reconstructed data in ft_sourcestatistics and ft_sourcegrandaverage ? >> >> Or if any have succeeded in using the cluster-based permutation test on source level also including the temporal dimension ? >> >> Alternative I was thinking that I might could use ft_timelockstatistics, where I substituted the channels with sources, e.g instead of having 64 channels, I would now have 4050 "channels". >> If so I need to calculate a label structure and an appropriate neighbor structure, which I guess is possible as I have all the 3D coordinates for each source, e.g in leadfield.pos ? >> I know this is a work around solution, but have anyone tried or have any experience using such an approach ? >> >> Best, >> >> Nicolai >> >> _______________________________________________ >> fieldtrip mailing list >> fieldtrip at donders.ru.nl >> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip Jan-Mathijs Schoffelen, MD PhD Donders Institute for Brain, Cognition and Behaviour, Centre for Cognitive Neuroimaging, Radboud University Nijmegen, The Netherlands Max Planck Institute for Psycholinguistics, Nijmegen, The Netherlands J.Schoffelen at donders.ru.nl Telephone: +31-24-3614793 http://www.hettaligebrein.nl -------------- next part -------------- An HTML attachment was scrubbed... URL: From smoratti at psi.ucm.es Wed Jun 12 18:58:40 2013 From: smoratti at psi.ucm.es (smoratti at psi.ucm.es) Date: Wed, 12 Jun 2013 18:58:40 +0200 Subject: [FieldTrip] Source statistics on spatio-temporal source reconstruction data (MNE) In-Reply-To: <683ABC6E-9FC6-420A-9DCF-E54D6FC6A27E@donders.ru.nl> References: <05B1DB8A-163B-40C0-B303-5B7D2A5434BD@psi.ucm.es> <683ABC6E-9FC6-420A-9DCF-E54D6FC6A27E@donders.ru.nl> Message-ID: <8D369E00-7FF3-4CC7-8B91-A55AD9ECE385@psi.ucm.es> I think Jan.Mathijs alternative suggestion is quite attractive. With the neighbors on a cortical sheet I also had the problems that sometimes the vertices do not have the same distance and then clustering may be biased to smaller or bigger clusters as the number of neighbors does not guarantee same cluster sizes. With the interpolation onto a 3D grid, you won't have that problem. best, Stephan ________________________________________________________ Stephan Moratti, PhD see also: http://web.me.com/smoratti/ Universidad Complutense de Madrid Facultad de Psicología Departamento de Psicología Básica I Campus de Somosaguas 28223 Pozuelo de Alarcón (Madrid) Spain and Center for Biomedical Technology Laboratory for Cognitive and Computational Neuroscience Parque Científico y Tecnológico de la Universidad Politecnica de Madrid Campus Montegancedo 28223 Pozuelo de Alarcón (Madrid) Spain email: smoratti at psi.ucm.es Tel.: +34 679219982 El 12/06/2013, a las 18:00, jan-mathijs schoffelen escribió: > An alternative would be to interpolate the cortical sheet to a 3D grid (where the grid is defined for each subject based on a warped template grid defined in a standard space), and then do clustering using a regular 3D spatial neighbourhood structure. The rationale being that two vertices on the sheet may appear as disconnected (e.g. being on two sides of a sulcus) whereas, given the poor spatial resolution, they belong to the same spatial blob. > > Best, > Jan-Mathijs > > On Jun 12, 2013, at 5:44 PM, smoratti at psi.ucm.es wrote: > >> Dear Nicolai, >> >> Indeed I have used ft_timelockstatistics for minimum norm source data. The trick is to put the source level data into a ERF structure. Determining the neighbors of a source surface with vertices is not trivial. However I used tess_vertconn.m from the BrainStorm toolbox to get the connectivity matrix that tells you who is a neighbor. This you can feed into timelockstats. >> >> Hope that helps, >> >> Stephan >> >> ________________________________________________________ >> Stephan Moratti, PhD >> >> see also: http://web.me.com/smoratti/ >> >> Universidad Complutense de Madrid >> Facultad de Psicología >> Departamento de Psicología Básica I >> Campus de Somosaguas >> 28223 Pozuelo de Alarcón (Madrid) >> Spain >> >> and >> >> Center for Biomedical Technology >> Laboratory for Cognitive and Computational Neuroscience >> Parque Científico y Tecnológico de la Universidad Politecnica de Madrid >> Campus Montegancedo >> 28223 Pozuelo de Alarcón (Madrid) >> Spain >> >> >> email: smoratti at psi.ucm.es >> Tel.: +34 679219982 >> >> El 12/06/2013, a las 15:44, Nicolai Mersebak escribió: >> >>> Dear all, >>> >>> I have a question concerning the usage of ft_sourcegrandaverage and ft_sourcestatistics. >>> >>> After using ft_sourceanalysis (method: MNE), I get spatio-temporal source reconstructed data in source.avg.pow (4050 x 897): 4050 sources and 897 time points. >>> >>> Now I would like to use the cluster-based permutation test on my source reconstructed data. However it seems like ft_sourcegrandaverage and ft_sourcestatistics don't support source level time courses. E.g when I am using ft_sourcegrandaverage I am getting the following error: >>> >>> Error in ft_sourcegrandaverage (line 158) >>> dat(:,i) = tmp(:); >>> >>> Looking into the code: >>> >>> for i=1:Nsubject >>> tmp = getsubfield(varargin{i}, parameterselection(cfg.parameter, varargin{i})); >>> dat(:,i) = tmp(:); >>> tmp = getsubfield(varargin{i}, 'inside'); >>> inside(tmp,i) = 1; >>> end >>> >>> I see that "tmp" are getting the structure [N_sources x timepoints] from source.avg.pow for one subject, where "dat" requires the structure [N_sources x 1]. >>> >>> I seached the mailing list for similar issues and found this thread: >>> >>> http://mailman.science.ru.nl/pipermail/fieldtrip/2010-September/003122.html >>> >>> Since I am interested in using the temporal dimension in my statistics, I would like to know if it is still not possible to use spatio-temporal source reconstructed data in ft_sourcestatistics and ft_sourcegrandaverage ? >>> >>> Or if any have succeeded in using the cluster-based permutation test on source level also including the temporal dimension ? >>> >>> Alternative I was thinking that I might could use ft_timelockstatistics, where I substituted the channels with sources, e.g instead of having 64 channels, I would now have 4050 "channels". >>> If so I need to calculate a label structure and an appropriate neighbor structure, which I guess is possible as I have all the 3D coordinates for each source, e.g in leadfield.pos ? >>> I know this is a work around solution, but have anyone tried or have any experience using such an approach ? >>> >>> Best, >>> >>> Nicolai >>> >>> _______________________________________________ >>> fieldtrip mailing list >>> fieldtrip at donders.ru.nl >>> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip >> >> _______________________________________________ >> fieldtrip mailing list >> fieldtrip at donders.ru.nl >> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > Jan-Mathijs Schoffelen, MD PhD > > Donders Institute for Brain, Cognition and Behaviour, > Centre for Cognitive Neuroimaging, > Radboud University Nijmegen, The Netherlands > > Max Planck Institute for Psycholinguistics, > Nijmegen, The Netherlands > > J.Schoffelen at donders.ru.nl > Telephone: +31-24-3614793 > > http://www.hettaligebrein.nl > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -------------- next part -------------- An HTML attachment was scrubbed... URL: From mengtongxiao at gmail.com Thu Jun 13 10:10:14 2013 From: mengtongxiao at gmail.com (=?GB2312?B?s8LRqQ==?=) Date: Thu, 13 Jun 2013 16:10:14 +0800 Subject: [FieldTrip] PDC Message-ID: Dear all I want to use compute PDC, I want to Konw when I got the chan*chan*freq, Dose the information flow from row (chan) to column(chan)? best, xiao         -------------- next part -------------- An HTML attachment was scrubbed... URL: From jan.schoffelen at donders.ru.nl Thu Jun 13 10:20:48 2013 From: jan.schoffelen at donders.ru.nl (jan-mathijs schoffelen) Date: Thu, 13 Jun 2013 10:20:48 +0200 Subject: [FieldTrip] PDC In-Reply-To: References: Message-ID: <756060F3-17D2-420B-B55F-FFE7671B067B@donders.ru.nl> Hi Xiao, this would be from row to column. Best, Jan-Mathijs On Jun 13, 2013, at 10:10 AM, 陈雪 wrote: > Dear all > > I want to use compute PDC, > I want to Konw when I got the chan*chan*freq, > Dose the information flow from row (chan) to column(chan)? > > best, > xiao > > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip Jan-Mathijs Schoffelen, MD PhD Donders Institute for Brain, Cognition and Behaviour, Centre for Cognitive Neuroimaging, Radboud University Nijmegen, The Netherlands Max Planck Institute for Psycholinguistics, Nijmegen, The Netherlands J.Schoffelen at donders.ru.nl Telephone: +31-24-3614793 http://www.hettaligebrein.nl -------------- next part -------------- An HTML attachment was scrubbed... URL: From explena at gmail.com Thu Jun 13 11:15:11 2013 From: explena at gmail.com (Shen-Mou Hsu) Date: Thu, 13 Jun 2013 17:15:11 +0800 Subject: [FieldTrip] ROC_based permutation test In-Reply-To: References: Message-ID: Dear Eelke, Many thanks for your helpful and detailed answers. I think that there is an error in the documentation about the configuration option for performing ROC analysis. The correct one should be cfg.statistic = 'ft_statfun_roc'. Otherwise, it will call the matlab built-in ROC function. Meanwhile, just to clarify my concept about the ROC_based permutation tests. In the initial stage, does the test calculate whether for every sample, the area under ROC curve is significant from 0.5. In this sense, should I specify cfg.clusteralpha = 0.5? Best regards, Shen-Mou Hsu On Tue, Jun 11, 2013 at 4:18 PM, Eelke Spaak wrote: > Dear Shen-Mou Hsu, > > With regards to your first question, I do not know the answer, so > someone else might help you there. > > In response to your second question, regarding the error "could not > determine the parametric critical value for clustering", this is > caused by the value of cfg.clusterthreshold used. The default value > there is 'parametric', meaning that the statistics routine will ask > your 'statfun' to compute a parametric threshold for considering a > (time/frequency/channel)-voxel a cluster-member candidate. This can be > done by e.g. depsamplesT or indepsamplesT, as it is possible to > analytically compute a T value corresponding to p < 0.05. However, in > the case of the ROC statistic, no such parametric estimate can be > computed (or perhaps it can be in some way, I don't know, but at least > I know the FT implementation does not). > > Fortunately, the statistics routines also allow you to use a > nonparametric threshold for cluster-member candidates, based on the > generated distribution of the test statistic under the null > hypothesis. To use this, simply specify cfg.clusterthreshold = > 'nonparametric_individual' or cfg.clusterthreshold = > 'nonparametric_common'. The difference between the two is that the > former computes a threshold per voxel, and the latter uses the same > threshold for all voxels. Which one is appropriate for you I don't > know. (Good reasons for using 'nonparametric_individual' might be a > strong variation of your test statistic with frequency. I know for a > fact this is the case with certain quantifications of phase-amplitude > coupling; these show much higher values in the low frequencies even > when computed on noise.) > > Hope this helps. > > Best, > Eelke > > On 11 June 2013 09:48, Shen-Mou Hsu wrote: > > Dear all, > > > > I was trying to perform signle-trial ROC-based permutation tests using > the > > statfun_roc. However I encountered two questions and wondered if anyone > > could kindly shed some light on the issues. First, is it necessary to > > perform baseline normalization for each trial before the tests? Second, > an > > error message returned stating "Error using roc. Too many input > arguments. > > Error using ft_statistics_montecarlo (line 223) could not determine the > > parametric critical value for clustering", after running the following > > script: > > > > load (['t_RF_EpoRejDePow']); load (['t_RN_EpoRejDePow']); > > > > cfg = []; > > cfg.channel = 'MEG'; > > cfg.latency = [-0.35 0.55]; > > cfg.frequency = [8 12]; > > cfg.parameter = 'powspctrm'; > > cfg.method = 'montecarlo'; > > cfg.statistic = 'roc'; > > cfg.alpha = 0.025; > > cfg.tail = 0; > > cfg.correctm = 'cluster'; > > cfg.clusteralpha = 0.05; > > % cfg.correcttail = 'prob'; > > cfg.clustertail = 0; > > cfg.numrandomization = 1000; > > cfg.minnbchan = 2; > > cfg_neighb.method = 'distance'; > > cfg.neighbours = ft_prepare_neighbours(cfg_neighb, > t_RN_EpoRejDePow); > > cfg.logtransform = 'yes'; > > > > design = [1*ones(1,size(t_RF_EpoRejDePow.powspctrm,1)) > > 2*ones(1,size(t_RN_EpoRejDePow.powspctrm,1))]; % the first dimension of > > these variable is the trial number. > > cfg.design = design; > > > > P_ROC_t_RFvsRN = > ft_freqstatistics(cfg,t_RF_EpoRejDePow,t_RN_EpoRejDePow); > > > > > > Any help is greatly appreciated. > > > > Best regards, > > > > Shen-Mou Hsu > > > > > > > > _______________________________________________ > > fieldtrip mailing list > > fieldtrip at donders.ru.nl > > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > -------------- next part -------------- An HTML attachment was scrubbed... URL: From nicolai at mersebak.dk Thu Jun 13 12:04:34 2013 From: nicolai at mersebak.dk (Nicolai Mersebak) Date: Thu, 13 Jun 2013 12:04:34 +0200 Subject: [FieldTrip] Source statistics on spatio-temporal source reconstruction data (MNE) In-Reply-To: <8D369E00-7FF3-4CC7-8B91-A55AD9ECE385@psi.ucm.es> References: <05B1DB8A-163B-40C0-B303-5B7D2A5434BD@psi.ucm.es> <683ABC6E-9FC6-420A-9DCF-E54D6FC6A27E@donders.ru.nl> <8D369E00-7FF3-4CC7-8B91-A55AD9ECE385@psi.ucm.es> Message-ID: <6F3697BB-194F-422F-A1BF-EBBB132F805B@mersebak.dk> Thanks to all of you for your comments and ideas - they are very helpful! I ( off course :) ) have some follow up questions. I have created an ERP structure for my MNE source, so the only think which I need and that is not straight forward is the neighbour structure. I am using the standard bem template (fieldtrip-20130124/template/headmodel/standard_bem.mat) as a head model and use the following code to get a grid for all subjects as I don't have any subject specific information regarding the anatomy. cfg = []; cfg.grid.xgrid = -100:10:100; cfg.grid.ygrid = -100:10:100; cfg.grid.zgrid = -100:10:100; cfg.grid.tight = 'yes'; cfg.grid.unit = hdm.unit; % unit: mm cfg.vol = hdm; grid = ft_prepare_sourcemodel(cfg); @Jan-Mathijs and Stephan: I guess making a subject specific grid based on a warped template requires anatomic information for each subject, e.g. a MRI image like this tutorial shows: http://fieldtrip.fcdonders.nl/example/create_single-subject_grids_in_individual_head_space_that_are_all_aligned_in_mni_space?s%5B The final grid output in the tutorial - does it have this 3D grid which can be used as a neighbour structure ? I am not sure how to go from my cortical sheet [vertices x coordinates(x,y,z)] to a 3D grid, which I can use as a neighbour structure ? A second thing I would like to know is, if any of you have tried to use an atlas (e.g ALL template atlas) where the regions now are channels in the permutation test? Going from source points to atlas regions can be done through ft_sourcestatistics, but I am still interested in keeping the temporal dimension. The reason to use atlas regions instead of source points is to decrease the computation time. Best, Nicolai Den 12/06/2013 kl. 18.58 skrev "smoratti at psi.ucm.es" : > > I think Jan.Mathijs alternative suggestion is quite attractive. With the neighbors on a cortical sheet I also had the problems that sometimes the vertices do not have the same distance and then clustering may be biased to smaller or bigger clusters as the number of neighbors does not guarantee same cluster sizes. With the interpolation onto a 3D grid, you won't have that problem. > > best, > > Stephan > > > ________________________________________________________ > Stephan Moratti, PhD > > see also: http://web.me.com/smoratti/ > > Universidad Complutense de Madrid > Facultad de Psicología > Departamento de Psicología Básica I > Campus de Somosaguas > 28223 Pozuelo de Alarcón (Madrid) > Spain > > and > > Center for Biomedical Technology > Laboratory for Cognitive and Computational Neuroscience > Parque Científico y Tecnológico de la Universidad Politecnica de Madrid > Campus Montegancedo > 28223 Pozuelo de Alarcón (Madrid) > Spain > > > email: smoratti at psi.ucm.es > Tel.: +34 679219982 > > El 12/06/2013, a las 18:00, jan-mathijs schoffelen escribió: > >> An alternative would be to interpolate the cortical sheet to a 3D grid (where the grid is defined for each subject based on a warped template grid defined in a standard space), and then do clustering using a regular 3D spatial neighbourhood structure. The rationale being that two vertices on the sheet may appear as disconnected (e.g. being on two sides of a sulcus) whereas, given the poor spatial resolution, they belong to the same spatial blob. >> >> Best, >> Jan-Mathijs >> >> On Jun 12, 2013, at 5:44 PM, smoratti at psi.ucm.es wrote: >> >>> Dear Nicolai, >>> >>> Indeed I have used ft_timelockstatistics for minimum norm source data. The trick is to put the source level data into a ERF structure. Determining the neighbors of a source surface with vertices is not trivial. However I used tess_vertconn.m from the BrainStorm toolbox to get the connectivity matrix that tells you who is a neighbor. This you can feed into timelockstats. >>> >>> Hope that helps, >>> >>> Stephan >>> >>> ________________________________________________________ >>> Stephan Moratti, PhD >>> >>> see also: http://web.me.com/smoratti/ >>> >>> Universidad Complutense de Madrid >>> Facultad de Psicología >>> Departamento de Psicología Básica I >>> Campus de Somosaguas >>> 28223 Pozuelo de Alarcón (Madrid) >>> Spain >>> >>> and >>> >>> Center for Biomedical Technology >>> Laboratory for Cognitive and Computational Neuroscience >>> Parque Científico y Tecnológico de la Universidad Politecnica de Madrid >>> Campus Montegancedo >>> 28223 Pozuelo de Alarcón (Madrid) >>> Spain >>> >>> >>> email: smoratti at psi.ucm.es >>> Tel.: +34 679219982 >>> >>> El 12/06/2013, a las 15:44, Nicolai Mersebak escribió: >>> >>>> Dear all, >>>> >>>> I have a question concerning the usage of ft_sourcegrandaverage and ft_sourcestatistics. >>>> >>>> After using ft_sourceanalysis (method: MNE), I get spatio-temporal source reconstructed data in source.avg.pow (4050 x 897): 4050 sources and 897 time points. >>>> >>>> Now I would like to use the cluster-based permutation test on my source reconstructed data. However it seems like ft_sourcegrandaverage and ft_sourcestatistics don't support source level time courses. E.g when I am using ft_sourcegrandaverage I am getting the following error: >>>> >>>> Error in ft_sourcegrandaverage (line 158) >>>> dat(:,i) = tmp(:); >>>> >>>> Looking into the code: >>>> >>>> for i=1:Nsubject >>>> tmp = getsubfield(varargin{i}, parameterselection(cfg.parameter, varargin{i})); >>>> dat(:,i) = tmp(:); >>>> tmp = getsubfield(varargin{i}, 'inside'); >>>> inside(tmp,i) = 1; >>>> end >>>> >>>> I see that "tmp" are getting the structure [N_sources x timepoints] from source.avg.pow for one subject, where "dat" requires the structure [N_sources x 1]. >>>> >>>> I seached the mailing list for similar issues and found this thread: >>>> >>>> http://mailman.science.ru.nl/pipermail/fieldtrip/2010-September/003122.html >>>> >>>> Since I am interested in using the temporal dimension in my statistics, I would like to know if it is still not possible to use spatio-temporal source reconstructed data in ft_sourcestatistics and ft_sourcegrandaverage ? >>>> >>>> Or if any have succeeded in using the cluster-based permutation test on source level also including the temporal dimension ? >>>> >>>> Alternative I was thinking that I might could use ft_timelockstatistics, where I substituted the channels with sources, e.g instead of having 64 channels, I would now have 4050 "channels". >>>> If so I need to calculate a label structure and an appropriate neighbor structure, which I guess is possible as I have all the 3D coordinates for each source, e.g in leadfield.pos ? >>>> I know this is a work around solution, but have anyone tried or have any experience using such an approach ? >>>> >>>> Best, >>>> >>>> Nicolai >>>> >>>> _______________________________________________ >>>> fieldtrip mailing list >>>> fieldtrip at donders.ru.nl >>>> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip >>> >>> _______________________________________________ >>> fieldtrip mailing list >>> fieldtrip at donders.ru.nl >>> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip >> >> Jan-Mathijs Schoffelen, MD PhD >> >> Donders Institute for Brain, Cognition and Behaviour, >> Centre for Cognitive Neuroimaging, >> Radboud University Nijmegen, The Netherlands >> >> Max Planck Institute for Psycholinguistics, >> Nijmegen, The Netherlands >> >> J.Schoffelen at donders.ru.nl >> Telephone: +31-24-3614793 >> >> http://www.hettaligebrein.nl >> >> _______________________________________________ >> fieldtrip mailing list >> fieldtrip at donders.ru.nl >> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -------------- next part -------------- An HTML attachment was scrubbed... URL: From smoratti at psi.ucm.es Thu Jun 13 15:50:30 2013 From: smoratti at psi.ucm.es (smoratti at psi.ucm.es) Date: Thu, 13 Jun 2013 15:50:30 +0200 Subject: [FieldTrip] Source statistics on spatio-temporal source reconstruction data (MNE) In-Reply-To: <6F3697BB-194F-422F-A1BF-EBBB132F805B@mersebak.dk> References: <05B1DB8A-163B-40C0-B303-5B7D2A5434BD@psi.ucm.es> <683ABC6E-9FC6-420A-9DCF-E54D6FC6A27E@donders.ru.nl> <8D369E00-7FF3-4CC7-8B91-A55AD9ECE385@psi.ucm.es> <6F3697BB-194F-422F-A1BF-EBBB132F805B@mersebak.dk> Message-ID: <4755A6E7-44B5-4E98-B536-A19F544ED284@psi.ucm.es> Dear Nikolai, In ft_sourceplot there is the possibility of projecting grid data to surface data. However, I am not sure if the other way round is implemented in field trip. With respect to the other (maybe less accurate solution) of providing a neighbor matrix of the vertices of your brain surface: if you do " channeigbststructmat = your_neighbor_matrix" in clusterstat.m should work. Best, Stephan ________________________________________________________ Stephan Moratti, PhD see also: http://web.me.com/smoratti/ Universidad Complutense de Madrid Facultad de Psicología Departamento de Psicología Básica I Campus de Somosaguas 28223 Pozuelo de Alarcón (Madrid) Spain and Center for Biomedical Technology Laboratory for Cognitive and Computational Neuroscience Parque Científico y Tecnológico de la Universidad Politecnica de Madrid Campus Montegancedo 28223 Pozuelo de Alarcón (Madrid) Spain email: smoratti at psi.ucm.es Tel.: +34 679219982 El 13/06/2013, a las 12:04, Nicolai Mersebak escribió: > Thanks to all of you for your comments and ideas - they are very helpful! > > I ( off course :) ) have some follow up questions. > > I have created an ERP structure for my MNE source, so the only think which I need and that is not straight forward is the neighbour structure. > > I am using the standard bem template (fieldtrip-20130124/template/headmodel/standard_bem.mat) as a head model and use the following code to get a grid for all subjects as I don't have any subject specific information regarding the anatomy. > > cfg = []; > cfg.grid.xgrid = -100:10:100; > cfg.grid.ygrid = -100:10:100; > cfg.grid.zgrid = -100:10:100; > cfg.grid.tight = 'yes'; > cfg.grid.unit = hdm.unit; % unit: mm > cfg.vol = hdm; > grid = ft_prepare_sourcemodel(cfg); > > > @Jan-Mathijs and Stephan: I guess making a subject specific grid based on a warped template requires anatomic information for each subject, e.g. a MRI image like this tutorial shows: > http://fieldtrip.fcdonders.nl/example/create_single-subject_grids_in_individual_head_space_that_are_all_aligned_in_mni_space?s%5B > > The final grid output in the tutorial - does it have this 3D grid which can be used as a neighbour structure ? > > I am not sure how to go from my cortical sheet [vertices x coordinates(x,y,z)] to a 3D grid, which I can use as a neighbour structure ? > > A second thing I would like to know is, if any of you have tried to use an atlas (e.g ALL template atlas) where the regions now are channels in the permutation test? Going from source points to atlas regions can be done through ft_sourcestatistics, but I am still interested in keeping the temporal dimension. The reason to use atlas regions instead of source points is to decrease the computation time. > > Best, > > Nicolai > > > Den 12/06/2013 kl. 18.58 skrev "smoratti at psi.ucm.es" : > >> >> I think Jan.Mathijs alternative suggestion is quite attractive. With the neighbors on a cortical sheet I also had the problems that sometimes the vertices do not have the same distance and then clustering may be biased to smaller or bigger clusters as the number of neighbors does not guarantee same cluster sizes. With the interpolation onto a 3D grid, you won't have that problem. >> >> best, >> >> Stephan >> >> >> ________________________________________________________ >> Stephan Moratti, PhD >> >> see also: http://web.me.com/smoratti/ >> >> Universidad Complutense de Madrid >> Facultad de Psicología >> Departamento de Psicología Básica I >> Campus de Somosaguas >> 28223 Pozuelo de Alarcón (Madrid) >> Spain >> >> and >> >> Center for Biomedical Technology >> Laboratory for Cognitive and Computational Neuroscience >> Parque Científico y Tecnológico de la Universidad Politecnica de Madrid >> Campus Montegancedo >> 28223 Pozuelo de Alarcón (Madrid) >> Spain >> >> >> email: smoratti at psi.ucm.es >> Tel.: +34 679219982 >> >> El 12/06/2013, a las 18:00, jan-mathijs schoffelen escribió: >> >>> An alternative would be to interpolate the cortical sheet to a 3D grid (where the grid is defined for each subject based on a warped template grid defined in a standard space), and then do clustering using a regular 3D spatial neighbourhood structure. The rationale being that two vertices on the sheet may appear as disconnected (e.g. being on two sides of a sulcus) whereas, given the poor spatial resolution, they belong to the same spatial blob. >>> >>> Best, >>> Jan-Mathijs >>> >>> On Jun 12, 2013, at 5:44 PM, smoratti at psi.ucm.es wrote: >>> >>>> Dear Nicolai, >>>> >>>> Indeed I have used ft_timelockstatistics for minimum norm source data. The trick is to put the source level data into a ERF structure. Determining the neighbors of a source surface with vertices is not trivial. However I used tess_vertconn.m from the BrainStorm toolbox to get the connectivity matrix that tells you who is a neighbor. This you can feed into timelockstats. >>>> >>>> Hope that helps, >>>> >>>> Stephan >>>> >>>> ________________________________________________________ >>>> Stephan Moratti, PhD >>>> >>>> see also: http://web.me.com/smoratti/ >>>> >>>> Universidad Complutense de Madrid >>>> Facultad de Psicología >>>> Departamento de Psicología Básica I >>>> Campus de Somosaguas >>>> 28223 Pozuelo de Alarcón (Madrid) >>>> Spain >>>> >>>> and >>>> >>>> Center for Biomedical Technology >>>> Laboratory for Cognitive and Computational Neuroscience >>>> Parque Científico y Tecnológico de la Universidad Politecnica de Madrid >>>> Campus Montegancedo >>>> 28223 Pozuelo de Alarcón (Madrid) >>>> Spain >>>> >>>> >>>> email: smoratti at psi.ucm.es >>>> Tel.: +34 679219982 >>>> >>>> El 12/06/2013, a las 15:44, Nicolai Mersebak escribió: >>>> >>>>> Dear all, >>>>> >>>>> I have a question concerning the usage of ft_sourcegrandaverage and ft_sourcestatistics. >>>>> >>>>> After using ft_sourceanalysis (method: MNE), I get spatio-temporal source reconstructed data in source.avg.pow (4050 x 897): 4050 sources and 897 time points. >>>>> >>>>> Now I would like to use the cluster-based permutation test on my source reconstructed data. However it seems like ft_sourcegrandaverage and ft_sourcestatistics don't support source level time courses. E.g when I am using ft_sourcegrandaverage I am getting the following error: >>>>> >>>>> Error in ft_sourcegrandaverage (line 158) >>>>> dat(:,i) = tmp(:); >>>>> >>>>> Looking into the code: >>>>> >>>>> for i=1:Nsubject >>>>> tmp = getsubfield(varargin{i}, parameterselection(cfg.parameter, varargin{i})); >>>>> dat(:,i) = tmp(:); >>>>> tmp = getsubfield(varargin{i}, 'inside'); >>>>> inside(tmp,i) = 1; >>>>> end >>>>> >>>>> I see that "tmp" are getting the structure [N_sources x timepoints] from source.avg.pow for one subject, where "dat" requires the structure [N_sources x 1]. >>>>> >>>>> I seached the mailing list for similar issues and found this thread: >>>>> >>>>> http://mailman.science.ru.nl/pipermail/fieldtrip/2010-September/003122.html >>>>> >>>>> Since I am interested in using the temporal dimension in my statistics, I would like to know if it is still not possible to use spatio-temporal source reconstructed data in ft_sourcestatistics and ft_sourcegrandaverage ? >>>>> >>>>> Or if any have succeeded in using the cluster-based permutation test on source level also including the temporal dimension ? >>>>> >>>>> Alternative I was thinking that I might could use ft_timelockstatistics, where I substituted the channels with sources, e.g instead of having 64 channels, I would now have 4050 "channels". >>>>> If so I need to calculate a label structure and an appropriate neighbor structure, which I guess is possible as I have all the 3D coordinates for each source, e.g in leadfield.pos ? >>>>> I know this is a work around solution, but have anyone tried or have any experience using such an approach ? >>>>> >>>>> Best, >>>>> >>>>> Nicolai >>>>> >>>>> _______________________________________________ >>>>> fieldtrip mailing list >>>>> fieldtrip at donders.ru.nl >>>>> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip >>>> >>>> _______________________________________________ >>>> fieldtrip mailing list >>>> fieldtrip at donders.ru.nl >>>> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip >>> >>> Jan-Mathijs Schoffelen, MD PhD >>> >>> Donders Institute for Brain, Cognition and Behaviour, >>> Centre for Cognitive Neuroimaging, >>> Radboud University Nijmegen, The Netherlands >>> >>> Max Planck Institute for Psycholinguistics, >>> Nijmegen, The Netherlands >>> >>> J.Schoffelen at donders.ru.nl >>> Telephone: +31-24-3614793 >>> >>> http://www.hettaligebrein.nl >>> >>> _______________________________________________ >>> fieldtrip mailing list >>> fieldtrip at donders.ru.nl >>> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip >> >> _______________________________________________ >> fieldtrip mailing list >> fieldtrip at donders.ru.nl >> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -------------- next part -------------- An HTML attachment was scrubbed... URL: From jan.schoffelen at donders.ru.nl Thu Jun 13 15:58:47 2013 From: jan.schoffelen at donders.ru.nl (jan-mathijs schoffelen) Date: Thu, 13 Jun 2013 15:58:47 +0200 Subject: [FieldTrip] Source statistics on spatio-temporal source reconstruction data (MNE) In-Reply-To: <4755A6E7-44B5-4E98-B536-A19F544ED284@psi.ucm.es> References: <05B1DB8A-163B-40C0-B303-5B7D2A5434BD@psi.ucm.es> <683ABC6E-9FC6-420A-9DCF-E54D6FC6A27E@donders.ru.nl> <8D369E00-7FF3-4CC7-8B91-A55AD9ECE385@psi.ucm.es> <6F3697BB-194F-422F-A1BF-EBBB132F805B@mersebak.dk> <4755A6E7-44B5-4E98-B536-A19F544ED284@psi.ucm.es> Message-ID: <944F6EF6-C03A-46F4-BFF4-3D9EC324E602@donders.ru.nl> Hi all, ft_sourceinterpolate can interpolate from between arbitrary point clouds, so also between a set of points defined on the cortical sheet, and a more or less regular 3D grid. JM On Jun 13, 2013, at 3:50 PM, smoratti at psi.ucm.es wrote: > Dear Nikolai, > > In ft_sourceplot there is the possibility of projecting grid data to surface data. However, I am not sure if the other way round is implemented in field trip. > > With respect to the other (maybe less accurate solution) of providing a neighbor matrix of the vertices of your brain surface: > > if you do " channeigbststructmat = your_neighbor_matrix" in clusterstat.m should work. > > Best, > > Stephan > > > > ________________________________________________________ > Stephan Moratti, PhD > > see also: http://web.me.com/smoratti/ > > Universidad Complutense de Madrid > Facultad de Psicología > Departamento de Psicología Básica I > Campus de Somosaguas > 28223 Pozuelo de Alarcón (Madrid) > Spain > > and > > Center for Biomedical Technology > Laboratory for Cognitive and Computational Neuroscience > Parque Científico y Tecnológico de la Universidad Politecnica de Madrid > Campus Montegancedo > 28223 Pozuelo de Alarcón (Madrid) > Spain > > > email: smoratti at psi.ucm.es > Tel.: +34 679219982 > > El 13/06/2013, a las 12:04, Nicolai Mersebak escribió: > >> Thanks to all of you for your comments and ideas - they are very helpful! >> >> I ( off course :) ) have some follow up questions. >> >> I have created an ERP structure for my MNE source, so the only think which I need and that is not straight forward is the neighbour structure. >> >> I am using the standard bem template (fieldtrip-20130124/template/headmodel/standard_bem.mat) as a head model and use the following code to get a grid for all subjects as I don't have any subject specific information regarding the anatomy. >> >> cfg = []; >> cfg.grid.xgrid = -100:10:100; >> cfg.grid.ygrid = -100:10:100; >> cfg.grid.zgrid = -100:10:100; >> cfg.grid.tight = 'yes'; >> cfg.grid.unit = hdm.unit; % unit: mm >> cfg.vol = hdm; >> grid = ft_prepare_sourcemodel(cfg); >> >> >> @Jan-Mathijs and Stephan: I guess making a subject specific grid based on a warped template requires anatomic information for each subject, e.g. a MRI image like this tutorial shows: >> http://fieldtrip.fcdonders.nl/example/create_single-subject_grids_in_individual_head_space_that_are_all_aligned_in_mni_space?s%5B >> >> The final grid output in the tutorial - does it have this 3D grid which can be used as a neighbour structure ? >> >> I am not sure how to go from my cortical sheet [vertices x coordinates(x,y,z)] to a 3D grid, which I can use as a neighbour structure ? >> >> A second thing I would like to know is, if any of you have tried to use an atlas (e.g ALL template atlas) where the regions now are channels in the permutation test? Going from source points to atlas regions can be done through ft_sourcestatistics, but I am still interested in keeping the temporal dimension. The reason to use atlas regions instead of source points is to decrease the computation time. >> >> Best, >> >> Nicolai >> >> >> Den 12/06/2013 kl. 18.58 skrev "smoratti at psi.ucm.es" : >> >>> >>> I think Jan.Mathijs alternative suggestion is quite attractive. With the neighbors on a cortical sheet I also had the problems that sometimes the vertices do not have the same distance and then clustering may be biased to smaller or bigger clusters as the number of neighbors does not guarantee same cluster sizes. With the interpolation onto a 3D grid, you won't have that problem. >>> >>> best, >>> >>> Stephan >>> >>> >>> ________________________________________________________ >>> Stephan Moratti, PhD >>> >>> see also: http://web.me.com/smoratti/ >>> >>> Universidad Complutense de Madrid >>> Facultad de Psicología >>> Departamento de Psicología Básica I >>> Campus de Somosaguas >>> 28223 Pozuelo de Alarcón (Madrid) >>> Spain >>> >>> and >>> >>> Center for Biomedical Technology >>> Laboratory for Cognitive and Computational Neuroscience >>> Parque Científico y Tecnológico de la Universidad Politecnica de Madrid >>> Campus Montegancedo >>> 28223 Pozuelo de Alarcón (Madrid) >>> Spain >>> >>> >>> email: smoratti at psi.ucm.es >>> Tel.: +34 679219982 >>> >>> El 12/06/2013, a las 18:00, jan-mathijs schoffelen escribió: >>> >>>> An alternative would be to interpolate the cortical sheet to a 3D grid (where the grid is defined for each subject based on a warped template grid defined in a standard space), and then do clustering using a regular 3D spatial neighbourhood structure. The rationale being that two vertices on the sheet may appear as disconnected (e.g. being on two sides of a sulcus) whereas, given the poor spatial resolution, they belong to the same spatial blob. >>>> >>>> Best, >>>> Jan-Mathijs >>>> >>>> On Jun 12, 2013, at 5:44 PM, smoratti at psi.ucm.es wrote: >>>> >>>>> Dear Nicolai, >>>>> >>>>> Indeed I have used ft_timelockstatistics for minimum norm source data. The trick is to put the source level data into a ERF structure. Determining the neighbors of a source surface with vertices is not trivial. However I used tess_vertconn.m from the BrainStorm toolbox to get the connectivity matrix that tells you who is a neighbor. This you can feed into timelockstats. >>>>> >>>>> Hope that helps, >>>>> >>>>> Stephan >>>>> >>>>> ________________________________________________________ >>>>> Stephan Moratti, PhD >>>>> >>>>> see also: http://web.me.com/smoratti/ >>>>> >>>>> Universidad Complutense de Madrid >>>>> Facultad de Psicología >>>>> Departamento de Psicología Básica I >>>>> Campus de Somosaguas >>>>> 28223 Pozuelo de Alarcón (Madrid) >>>>> Spain >>>>> >>>>> and >>>>> >>>>> Center for Biomedical Technology >>>>> Laboratory for Cognitive and Computational Neuroscience >>>>> Parque Científico y Tecnológico de la Universidad Politecnica de Madrid >>>>> Campus Montegancedo >>>>> 28223 Pozuelo de Alarcón (Madrid) >>>>> Spain >>>>> >>>>> >>>>> email: smoratti at psi.ucm.es >>>>> Tel.: +34 679219982 >>>>> >>>>> El 12/06/2013, a las 15:44, Nicolai Mersebak escribió: >>>>> >>>>>> Dear all, >>>>>> >>>>>> I have a question concerning the usage of ft_sourcegrandaverage and ft_sourcestatistics. >>>>>> >>>>>> After using ft_sourceanalysis (method: MNE), I get spatio-temporal source reconstructed data in source.avg.pow (4050 x 897): 4050 sources and 897 time points. >>>>>> >>>>>> Now I would like to use the cluster-based permutation test on my source reconstructed data. However it seems like ft_sourcegrandaverage and ft_sourcestatistics don't support source level time courses. E.g when I am using ft_sourcegrandaverage I am getting the following error: >>>>>> >>>>>> Error in ft_sourcegrandaverage (line 158) >>>>>> dat(:,i) = tmp(:); >>>>>> >>>>>> Looking into the code: >>>>>> >>>>>> for i=1:Nsubject >>>>>> tmp = getsubfield(varargin{i}, parameterselection(cfg.parameter, varargin{i})); >>>>>> dat(:,i) = tmp(:); >>>>>> tmp = getsubfield(varargin{i}, 'inside'); >>>>>> inside(tmp,i) = 1; >>>>>> end >>>>>> >>>>>> I see that "tmp" are getting the structure [N_sources x timepoints] from source.avg.pow for one subject, where "dat" requires the structure [N_sources x 1]. >>>>>> >>>>>> I seached the mailing list for similar issues and found this thread: >>>>>> >>>>>> http://mailman.science.ru.nl/pipermail/fieldtrip/2010-September/003122.html >>>>>> >>>>>> Since I am interested in using the temporal dimension in my statistics, I would like to know if it is still not possible to use spatio-temporal source reconstructed data in ft_sourcestatistics and ft_sourcegrandaverage ? >>>>>> >>>>>> Or if any have succeeded in using the cluster-based permutation test on source level also including the temporal dimension ? >>>>>> >>>>>> Alternative I was thinking that I might could use ft_timelockstatistics, where I substituted the channels with sources, e.g instead of having 64 channels, I would now have 4050 "channels". >>>>>> If so I need to calculate a label structure and an appropriate neighbor structure, which I guess is possible as I have all the 3D coordinates for each source, e.g in leadfield.pos ? >>>>>> I know this is a work around solution, but have anyone tried or have any experience using such an approach ? >>>>>> >>>>>> Best, >>>>>> >>>>>> Nicolai >>>>>> >>>>>> _______________________________________________ >>>>>> fieldtrip mailing list >>>>>> fieldtrip at donders.ru.nl >>>>>> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip >>>>> >>>>> _______________________________________________ >>>>> fieldtrip mailing list >>>>> fieldtrip at donders.ru.nl >>>>> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip >>>> >>>> Jan-Mathijs Schoffelen, MD PhD >>>> >>>> Donders Institute for Brain, Cognition and Behaviour, >>>> Centre for Cognitive Neuroimaging, >>>> Radboud University Nijmegen, The Netherlands >>>> >>>> Max Planck Institute for Psycholinguistics, >>>> Nijmegen, The Netherlands >>>> >>>> J.Schoffelen at donders.ru.nl >>>> Telephone: +31-24-3614793 >>>> >>>> http://www.hettaligebrein.nl >>>> >>>> _______________________________________________ >>>> fieldtrip mailing list >>>> fieldtrip at donders.ru.nl >>>> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip >>> >>> _______________________________________________ >>> fieldtrip mailing list >>> fieldtrip at donders.ru.nl >>> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip >> >> _______________________________________________ >> fieldtrip mailing list >> fieldtrip at donders.ru.nl >> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip Jan-Mathijs Schoffelen, MD PhD Donders Institute for Brain, Cognition and Behaviour, Centre for Cognitive Neuroimaging, Radboud University Nijmegen, The Netherlands Max Planck Institute for Psycholinguistics, Nijmegen, The Netherlands J.Schoffelen at donders.ru.nl Telephone: +31-24-3614793 http://www.hettaligebrein.nl -------------- next part -------------- An HTML attachment was scrubbed... URL: From jan.schoffelen at donders.ru.nl Thu Jun 13 16:12:26 2013 From: jan.schoffelen at donders.ru.nl (jan-mathijs schoffelen) Date: Thu, 13 Jun 2013 16:12:26 +0200 Subject: [FieldTrip] Source statistics on spatio-temporal source reconstruction data (MNE) In-Reply-To: <944F6EF6-C03A-46F4-BFF4-3D9EC324E602@donders.ru.nl> References: <05B1DB8A-163B-40C0-B303-5B7D2A5434BD@psi.ucm.es> <683ABC6E-9FC6-420A-9DCF-E54D6FC6A27E@donders.ru.nl> <8D369E00-7FF3-4CC7-8B91-A55AD9ECE385@psi.ucm.es> <6F3697BB-194F-422F-A1BF-EBBB132F805B@mersebak.dk> <4755A6E7-44B5-4E98-B536-A19F544ED284@psi.ucm.es> <944F6EF6-C03A-46F4-BFF4-3D9EC324E602@donders.ru.nl> Message-ID: Hi all, As a follow up to my previous message: it is intended in the future to remove the functionality in ft_sourceplot, doing the interpolation on the fly when cfg.method='surface' but when the input contains data defined on a 3D grid, and to request the user to go through ft_sourceinterpolate before visualization. Stay tuned... JM On Jun 13, 2013, at 3:58 PM, jan-mathijs schoffelen wrote: > Hi all, > > ft_sourceinterpolate can interpolate from between arbitrary point clouds, so also between a set of points defined on the cortical sheet, and a more or less regular 3D grid. > > JM > > On Jun 13, 2013, at 3:50 PM, smoratti at psi.ucm.es wrote: > >> Dear Nikolai, >> >> In ft_sourceplot there is the possibility of projecting grid data to surface data. However, I am not sure if the other way round is implemented in field trip. >> >> With respect to the other (maybe less accurate solution) of providing a neighbor matrix of the vertices of your brain surface: >> >> if you do " channeigbststructmat = your_neighbor_matrix" in clusterstat.m should work. >> >> Best, >> >> Stephan >> >> >> >> ________________________________________________________ >> Stephan Moratti, PhD >> >> see also: http://web.me.com/smoratti/ >> >> Universidad Complutense de Madrid >> Facultad de Psicología >> Departamento de Psicología Básica I >> Campus de Somosaguas >> 28223 Pozuelo de Alarcón (Madrid) >> Spain >> >> and >> >> Center for Biomedical Technology >> Laboratory for Cognitive and Computational Neuroscience >> Parque Científico y Tecnológico de la Universidad Politecnica de Madrid >> Campus Montegancedo >> 28223 Pozuelo de Alarcón (Madrid) >> Spain >> >> >> email: smoratti at psi.ucm.es >> Tel.: +34 679219982 >> >> El 13/06/2013, a las 12:04, Nicolai Mersebak escribió: >> >>> Thanks to all of you for your comments and ideas - they are very helpful! >>> >>> I ( off course :) ) have some follow up questions. >>> >>> I have created an ERP structure for my MNE source, so the only think which I need and that is not straight forward is the neighbour structure. >>> >>> I am using the standard bem template (fieldtrip-20130124/template/headmodel/standard_bem.mat) as a head model and use the following code to get a grid for all subjects as I don't have any subject specific information regarding the anatomy. >>> >>> cfg = []; >>> cfg.grid.xgrid = -100:10:100; >>> cfg.grid.ygrid = -100:10:100; >>> cfg.grid.zgrid = -100:10:100; >>> cfg.grid.tight = 'yes'; >>> cfg.grid.unit = hdm.unit; % unit: mm >>> cfg.vol = hdm; >>> grid = ft_prepare_sourcemodel(cfg); >>> >>> >>> @Jan-Mathijs and Stephan: I guess making a subject specific grid based on a warped template requires anatomic information for each subject, e.g. a MRI image like this tutorial shows: >>> http://fieldtrip.fcdonders.nl/example/create_single-subject_grids_in_individual_head_space_that_are_all_aligned_in_mni_space?s%5B >>> >>> The final grid output in the tutorial - does it have this 3D grid which can be used as a neighbour structure ? >>> >>> I am not sure how to go from my cortical sheet [vertices x coordinates(x,y,z)] to a 3D grid, which I can use as a neighbour structure ? >>> >>> A second thing I would like to know is, if any of you have tried to use an atlas (e.g ALL template atlas) where the regions now are channels in the permutation test? Going from source points to atlas regions can be done through ft_sourcestatistics, but I am still interested in keeping the temporal dimension. The reason to use atlas regions instead of source points is to decrease the computation time. >>> >>> Best, >>> >>> Nicolai >>> >>> >>> Den 12/06/2013 kl. 18.58 skrev "smoratti at psi.ucm.es" : >>> >>>> >>>> I think Jan.Mathijs alternative suggestion is quite attractive. With the neighbors on a cortical sheet I also had the problems that sometimes the vertices do not have the same distance and then clustering may be biased to smaller or bigger clusters as the number of neighbors does not guarantee same cluster sizes. With the interpolation onto a 3D grid, you won't have that problem. >>>> >>>> best, >>>> >>>> Stephan >>>> >>>> >>>> ________________________________________________________ >>>> Stephan Moratti, PhD >>>> >>>> see also: http://web.me.com/smoratti/ >>>> >>>> Universidad Complutense de Madrid >>>> Facultad de Psicología >>>> Departamento de Psicología Básica I >>>> Campus de Somosaguas >>>> 28223 Pozuelo de Alarcón (Madrid) >>>> Spain >>>> >>>> and >>>> >>>> Center for Biomedical Technology >>>> Laboratory for Cognitive and Computational Neuroscience >>>> Parque Científico y Tecnológico de la Universidad Politecnica de Madrid >>>> Campus Montegancedo >>>> 28223 Pozuelo de Alarcón (Madrid) >>>> Spain >>>> >>>> >>>> email: smoratti at psi.ucm.es >>>> Tel.: +34 679219982 >>>> >>>> El 12/06/2013, a las 18:00, jan-mathijs schoffelen escribió: >>>> >>>>> An alternative would be to interpolate the cortical sheet to a 3D grid (where the grid is defined for each subject based on a warped template grid defined in a standard space), and then do clustering using a regular 3D spatial neighbourhood structure. The rationale being that two vertices on the sheet may appear as disconnected (e.g. being on two sides of a sulcus) whereas, given the poor spatial resolution, they belong to the same spatial blob. >>>>> >>>>> Best, >>>>> Jan-Mathijs >>>>> >>>>> On Jun 12, 2013, at 5:44 PM, smoratti at psi.ucm.es wrote: >>>>> >>>>>> Dear Nicolai, >>>>>> >>>>>> Indeed I have used ft_timelockstatistics for minimum norm source data. The trick is to put the source level data into a ERF structure. Determining the neighbors of a source surface with vertices is not trivial. However I used tess_vertconn.m from the BrainStorm toolbox to get the connectivity matrix that tells you who is a neighbor. This you can feed into timelockstats. >>>>>> >>>>>> Hope that helps, >>>>>> >>>>>> Stephan >>>>>> >>>>>> ________________________________________________________ >>>>>> Stephan Moratti, PhD >>>>>> >>>>>> see also: http://web.me.com/smoratti/ >>>>>> >>>>>> Universidad Complutense de Madrid >>>>>> Facultad de Psicología >>>>>> Departamento de Psicología Básica I >>>>>> Campus de Somosaguas >>>>>> 28223 Pozuelo de Alarcón (Madrid) >>>>>> Spain >>>>>> >>>>>> and >>>>>> >>>>>> Center for Biomedical Technology >>>>>> Laboratory for Cognitive and Computational Neuroscience >>>>>> Parque Científico y Tecnológico de la Universidad Politecnica de Madrid >>>>>> Campus Montegancedo >>>>>> 28223 Pozuelo de Alarcón (Madrid) >>>>>> Spain >>>>>> >>>>>> >>>>>> email: smoratti at psi.ucm.es >>>>>> Tel.: +34 679219982 >>>>>> >>>>>> El 12/06/2013, a las 15:44, Nicolai Mersebak escribió: >>>>>> >>>>>>> Dear all, >>>>>>> >>>>>>> I have a question concerning the usage of ft_sourcegrandaverage and ft_sourcestatistics. >>>>>>> >>>>>>> After using ft_sourceanalysis (method: MNE), I get spatio-temporal source reconstructed data in source.avg.pow (4050 x 897): 4050 sources and 897 time points. >>>>>>> >>>>>>> Now I would like to use the cluster-based permutation test on my source reconstructed data. However it seems like ft_sourcegrandaverage and ft_sourcestatistics don't support source level time courses. E.g when I am using ft_sourcegrandaverage I am getting the following error: >>>>>>> >>>>>>> Error in ft_sourcegrandaverage (line 158) >>>>>>> dat(:,i) = tmp(:); >>>>>>> >>>>>>> Looking into the code: >>>>>>> >>>>>>> for i=1:Nsubject >>>>>>> tmp = getsubfield(varargin{i}, parameterselection(cfg.parameter, varargin{i})); >>>>>>> dat(:,i) = tmp(:); >>>>>>> tmp = getsubfield(varargin{i}, 'inside'); >>>>>>> inside(tmp,i) = 1; >>>>>>> end >>>>>>> >>>>>>> I see that "tmp" are getting the structure [N_sources x timepoints] from source.avg.pow for one subject, where "dat" requires the structure [N_sources x 1]. >>>>>>> >>>>>>> I seached the mailing list for similar issues and found this thread: >>>>>>> >>>>>>> http://mailman.science.ru.nl/pipermail/fieldtrip/2010-September/003122.html >>>>>>> >>>>>>> Since I am interested in using the temporal dimension in my statistics, I would like to know if it is still not possible to use spatio-temporal source reconstructed data in ft_sourcestatistics and ft_sourcegrandaverage ? >>>>>>> >>>>>>> Or if any have succeeded in using the cluster-based permutation test on source level also including the temporal dimension ? >>>>>>> >>>>>>> Alternative I was thinking that I might could use ft_timelockstatistics, where I substituted the channels with sources, e.g instead of having 64 channels, I would now have 4050 "channels". >>>>>>> If so I need to calculate a label structure and an appropriate neighbor structure, which I guess is possible as I have all the 3D coordinates for each source, e.g in leadfield.pos ? >>>>>>> I know this is a work around solution, but have anyone tried or have any experience using such an approach ? >>>>>>> >>>>>>> Best, >>>>>>> >>>>>>> Nicolai >>>>>>> >>>>>>> _______________________________________________ >>>>>>> fieldtrip mailing list >>>>>>> fieldtrip at donders.ru.nl >>>>>>> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip >>>>>> >>>>>> _______________________________________________ >>>>>> fieldtrip mailing list >>>>>> fieldtrip at donders.ru.nl >>>>>> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip >>>>> >>>>> Jan-Mathijs Schoffelen, MD PhD >>>>> >>>>> Donders Institute for Brain, Cognition and Behaviour, >>>>> Centre for Cognitive Neuroimaging, >>>>> Radboud University Nijmegen, The Netherlands >>>>> >>>>> Max Planck Institute for Psycholinguistics, >>>>> Nijmegen, The Netherlands >>>>> >>>>> J.Schoffelen at donders.ru.nl >>>>> Telephone: +31-24-3614793 >>>>> >>>>> http://www.hettaligebrein.nl >>>>> >>>>> _______________________________________________ >>>>> fieldtrip mailing list >>>>> fieldtrip at donders.ru.nl >>>>> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip >>>> >>>> _______________________________________________ >>>> fieldtrip mailing list >>>> fieldtrip at donders.ru.nl >>>> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip >>> >>> _______________________________________________ >>> fieldtrip mailing list >>> fieldtrip at donders.ru.nl >>> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip >> >> _______________________________________________ >> fieldtrip mailing list >> fieldtrip at donders.ru.nl >> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > Jan-Mathijs Schoffelen, MD PhD > > Donders Institute for Brain, Cognition and Behaviour, > Centre for Cognitive Neuroimaging, > Radboud University Nijmegen, The Netherlands > > Max Planck Institute for Psycholinguistics, > Nijmegen, The Netherlands > > J.Schoffelen at donders.ru.nl > Telephone: +31-24-3614793 > > http://www.hettaligebrein.nl > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip Jan-Mathijs Schoffelen, MD PhD Donders Institute for Brain, Cognition and Behaviour, Centre for Cognitive Neuroimaging, Radboud University Nijmegen, The Netherlands Max Planck Institute for Psycholinguistics, Nijmegen, The Netherlands J.Schoffelen at donders.ru.nl Telephone: +31-24-3614793 http://www.hettaligebrein.nl -------------- next part -------------- An HTML attachment was scrubbed... URL: From gopalar.ccf at gmail.com Fri Jun 14 17:37:54 2013 From: gopalar.ccf at gmail.com (Raghavan Gopalakrishnan) Date: Fri, 14 Jun 2013 11:37:54 -0400 Subject: [FieldTrip] Butter command Message-ID: I noticed that 'butter' command in the fieldtrip toolbox '/fieldtrip-20130609/external/signal/butter.m' is interfering with the 'butter' command in the Matlab signal processing toolbox. Can the name be changed? There are probably more commands in fieldtrip that has same names as regular matlab commands. -------------- next part -------------- An HTML attachment was scrubbed... URL: From eelke.spaak at donders.ru.nl Fri Jun 14 20:56:17 2013 From: eelke.spaak at donders.ru.nl (Eelke Spaak) Date: Fri, 14 Jun 2013 20:56:17 +0200 Subject: [FieldTrip] Butter command In-Reply-To: References: Message-ID: Dear Raghavan, The /external/signal/ functions are meant as drop-in replacements for functions in the MATLAB Signal Processing Toolbox, so they should behave exactly the same as the functions they are shadowing. They are included in the FieldTrip release for people who do not have Signal Processing Toolbox licenses, or who would prefer not to use those licenses just for tapering or filter coefficient functions. Best, Eelke On 14 June 2013 17:37, Raghavan Gopalakrishnan wrote: > > I noticed that 'butter' command in the fieldtrip toolbox > '/fieldtrip-20130609/external/signal/butter.m' > is interfering with the 'butter' command in the Matlab signal processing > toolbox. Can the name be changed? > There are probably more commands in fieldtrip that has same names as regular > matlab commands. > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip From karenschuil at gmail.com Mon Jun 17 13:56:09 2013 From: karenschuil at gmail.com (Karen Schuil) Date: Mon, 17 Jun 2013 13:56:09 +0200 Subject: [FieldTrip] ERP average Brain Vision is different from ERP average FieldTrip Message-ID: Dear Fieldtrip Users, I have a BVA-Fieldtrip problem. The average ERPs of Brain Vision Analyser are different from the ERPS of FieldTrip. It seems that in Fieldtrip a slow negative drift is added and peaks are more/less pronounced than in BVA (attached is a picture of the two different plots). An expert FieldTrip User and I could not find a solution for this problem. I hope one of you has a suggestion for this problem. The individual trial data was exported from BVA (version 2.02.5859) with the following settings: File extension: .seg Write header file: yes Write marker file: yes Format: BINARY Orientation: MULTIPLEXED Line Delimiter: CRLF (PC style) Binary format: 16-Bit signed integer format Set resolution manually: no Individually optimized resolution for each channel: yes Convert to big-endian order: no Export all channels: no Export the following channels: AF3 AF4 AF7 AF8 AFz C1 C2 C3 C4 C5 C6 CP1 CP2 CP3 CP4 CP5 CP6 CPz Cz F1 F2 F3 F4 F5 F6 F7 F8 FC1 FC2 FC3 FC4 FC5 FC6 FCz Fpz FT7 FT8 Fz Iz O1 O2 Oz P1 P10 P2 P3 P4 P5 P6 P7 P8 P9 PO3 PO4 PO7 PO8 POz Pz T7 T8 TP7 TP8 Created Using Component Version 2.0.2.5827 We used Matlab version 7.10.0 R2, and fieldtrip version 13-06-2013 (and tried a version from 2011). The scripts we used are read_analyzer_data and timelockanalysis. This is the code we used for calling the scripts: % read data into fieldtrip cfg = []; cfg.inputfile = 'pp10_A'; cfg.triggercode = 'S 20'; cfg.triggertype = 'Stimulus'; cfg.prestim = 1.2; cfg.poststim = 1.7; pp10_l = read_analyzer_data(cfg); % check: compute ERP % cfg = []; pp10_ERP = timelockanalysis(cfg, pp10_l); %plot ERP cfg = []; cfg.layout = 'elec1010.lay'; cfg.xlim = [-0.15 1.7]; cfg.ylim = [-12.25 12.25]; % cfg.baseline = 'yes'; % cfg.baselinetype = 'absolute'; cfg.showlabels = 'yes'; cfg.interactive = 'yes'; multiplotER(cfg, pp10_ERP); I hope you can help! Kind regards, Karen -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: trial_differences.JPG Type: image/jpeg Size: 642131 bytes Desc: not available URL: From j.herring at fcdonders.ru.nl Mon Jun 17 14:23:13 2013 From: j.herring at fcdonders.ru.nl (Herring, J.D. (Jim)) Date: Mon, 17 Jun 2013 14:23:13 +0200 (CEST) Subject: [FieldTrip] ERP average Brain Vision is different from ERP average FieldTrip In-Reply-To: References: Message-ID: <001901ce6b55$6fcf4590$4f6dd0b0$@herring@fcdonders.ru.nl> Dear Karen, Comparing the BVA and Fieldtrip images it seems that the trials in BVA have been filtered using at least a high-pass filter. I can see from the BVA image that you have applied filters prior to averaging your trials. >From the Fieldtrip code you've posted I cannot see any filtering applied. If you could find out what filters were applied to the trials in BVA and apply the same filters to the trials in FieldTrip using ft_preprocessing your results will most likely be the same. Best, Jim From: fieldtrip-bounces at science.ru.nl [mailto:fieldtrip-bounces at science.ru.nl] On Behalf Of Karen Schuil Sent: maandag 17 juni 2013 13:56 To: fieldtrip at science.ru.nl Subject: [FieldTrip] ERP average Brain Vision is different from ERP average FieldTrip Dear Fieldtrip Users, I have a BVA-Fieldtrip problem. The average ERPs of Brain Vision Analyser are different from the ERPS of FieldTrip. It seems that in Fieldtrip a slow negative drift is added and peaks are more/less pronounced than in BVA (attached is a picture of the two different plots). An expert FieldTrip User and I could not find a solution for this problem. I hope one of you has a suggestion for this problem. The individual trial data was exported from BVA (version 2.02.5859) with the following settings: File extension: .seg Write header file: yes Write marker file: yes Format: BINARY Orientation: MULTIPLEXED Line Delimiter: CRLF (PC style) Binary format: 16-Bit signed integer format Set resolution manually: no Individually optimized resolution for each channel: yes Convert to big-endian order: no Export all channels: no Export the following channels: AF3 AF4 AF7 AF8 AFz C1 C2 C3 C4 C5 C6 CP1 CP2 CP3 CP4 CP5 CP6 CPz Cz F1 F2 F3 F4 F5 F6 F7 F8 FC1 FC2 FC3 FC4 FC5 FC6 FCz Fpz FT7 FT8 Fz Iz O1 O2 Oz P1 P10 P2 P3 P4 P5 P6 P7 P8 P9 PO3 PO4 PO7 PO8 POz Pz T7 T8 TP7 TP8 Created Using Component Version 2.0.2.5827 We used Matlab version 7.10.0 R2, and fieldtrip version 13-06-2013 (and tried a version from 2011). The scripts we used are read_analyzer_data and timelockanalysis. This is the code we used for calling the scripts: % read data into fieldtrip cfg = []; cfg.inputfile = 'pp10_A'; cfg.triggercode = 'S 20'; cfg.triggertype = 'Stimulus'; cfg.prestim = 1.2; cfg.poststim = 1.7; pp10_l = read_analyzer_data(cfg); % check: compute ERP % cfg = []; pp10_ERP = timelockanalysis(cfg, pp10_l); %plot ERP cfg = []; cfg.layout = 'elec1010.lay'; cfg.xlim = [-0.15 1.7]; cfg.ylim = [-12.25 12.25]; % cfg.baseline = 'yes'; % cfg.baselinetype = 'absolute'; cfg.showlabels = 'yes'; cfg.interactive = 'yes'; multiplotER(cfg, pp10_ERP); I hope you can help! Kind regards, Karen -------------- next part -------------- An HTML attachment was scrubbed... URL: From aaron.schurger at gmail.com Mon Jun 17 14:25:25 2013 From: aaron.schurger at gmail.com (Aaron Schurger) Date: Mon, 17 Jun 2013 14:25:25 +0200 Subject: [FieldTrip] ERP average Brain Vision is different from ERP average FieldTrip In-Reply-To: References: Message-ID: To me it really looks like BVA is applying a high-pass filter at some stage. When you export the data, the high-pass filter has probably already been applied. It is typical in EEG (though not a good idea in my opinion) to apply a high-pass filter with a cutoff at around 0.05 or 0.1 Hz. There should be a setting somewhere in BVA to turn off the high-pass filter. Anyway, that's my guess just from looking at the figure you attached. Cheers, Aaron On Mon, Jun 17, 2013 at 1:56 PM, Karen Schuil wrote: > Dear Fieldtrip Users, > > I have a BVA-Fieldtrip problem. The average ERPs of Brain Vision Analyser > are different from the ERPS of FieldTrip. It seems that in Fieldtrip a slow > negative drift is added and peaks are more/less pronounced than in BVA > (attached is a picture of the two different plots). > > An expert FieldTrip User and I could not find a solution for this problem. I > hope one of you has a suggestion for this problem. > > The individual trial data was exported from BVA (version 2.02.5859) with the > following settings: > File extension: .seg > Write header file: yes > Write marker file: yes > Format: BINARY > Orientation: MULTIPLEXED > Line Delimiter: CRLF (PC style) > Binary format: 16-Bit signed integer format > Set resolution manually: no > Individually optimized resolution for each channel: yes > Convert to big-endian order: no > Export all channels: no > Export the following channels: > AF3 AF4 AF7 AF8 AFz C1 C2 C3 C4 C5 C6 CP1 CP2 CP3 CP4 CP5 > CP6 CPz Cz F1 F2 F3 F4 F5 F6 F7 F8 FC1 FC2 FC3 FC4 FC5 > FC6 FCz Fpz FT7 FT8 Fz Iz O1 O2 Oz P1 P10 P2 P3 P4 P5 > P6 P7 P8 P9 PO3 PO4 PO7 PO8 POz Pz T7 T8 TP7 TP8 > Created Using Component Version 2.0.2.5827 > > We used Matlab version 7.10.0 R2, and fieldtrip version 13-06-2013 (and > tried a version from 2011). > > The scripts we used are read_analyzer_data and timelockanalysis. This is the > code we used for calling the scripts: > % read data into fieldtrip > cfg = []; > > cfg.inputfile = 'pp10_A'; > cfg.triggercode = 'S 20'; > cfg.triggertype = 'Stimulus'; > cfg.prestim = 1.2; > cfg.poststim = 1.7; > > pp10_l = read_analyzer_data(cfg); > > % check: compute ERP > % > cfg = []; > pp10_ERP = timelockanalysis(cfg, pp10_l); > > %plot ERP > > cfg = []; > cfg.layout = 'elec1010.lay'; > cfg.xlim = [-0.15 1.7]; > cfg.ylim = [-12.25 12.25]; > % cfg.baseline = 'yes'; > % cfg.baselinetype = 'absolute'; > cfg.showlabels = 'yes'; > cfg.interactive = 'yes'; > > multiplotER(cfg, pp10_ERP); > > > I hope you can help! > > Kind regards, > Karen > > > > > > > > > > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -- Aaron Schurger, PhD Post-doctoral researcher INSERM U992 / NeuroSpin CEA - Saclay, France +33-1-69-08-66-47 aaron.schurger at gmail.com http://www.unicog.org From r.vandermeij at donders.ru.nl Mon Jun 17 14:48:18 2013 From: r.vandermeij at donders.ru.nl (Roemer van der Meij) Date: Mon, 17 Jun 2013 14:48:18 +0200 Subject: [FieldTrip] ERP average Brain Vision is different from ERP average FieldTrip In-Reply-To: References: Message-ID: Hi Karen, In case the data wasn't exported with the filtering applied in BVA (see email Jim) then that looks like a probable cause. In case the data was exported with the filterings, I noticed in the BVA part of the attached image that it says AF7 - ref, where I see no such thing in your exported channel list (and thus not in the fieldtrip image). What the AF7 - ref is referring to I don't know, it seems like a uncommon place in the pipeline to do rereferencing, but maybe I'm missing something obvious. Nevertheless, it might lead you somewhere. All the best, Roemer On Mon, Jun 17, 2013 at 1:56 PM, Karen Schuil wrote: > Dear Fieldtrip Users, > > I have a BVA-Fieldtrip problem. The average ERPs of Brain Vision Analyser > are different from the ERPS of FieldTrip. It seems that in Fieldtrip a slow > negative drift is added and peaks are more/less pronounced than in BVA > (attached is a picture of the two different plots). > > An expert FieldTrip User and I could not find a solution for this problem. > I hope one of you has a suggestion for this problem. > > The individual trial data was exported from BVA (version 2.02.5859) with > the following settings: > File extension: .seg > Write header file: yes > Write marker file: yes > Format: BINARY > Orientation: MULTIPLEXED > Line Delimiter: CRLF (PC style) > Binary format: 16-Bit signed integer format > Set resolution manually: no > Individually optimized resolution for each channel: yes > Convert to big-endian order: no > Export all channels: no > Export the following channels: > AF3 AF4 AF7 AF8 AFz C1 C2 C3 C4 C5 C6 CP1 CP2 CP3 CP4 CP5 > CP6 CPz Cz F1 F2 F3 F4 F5 F6 F7 F8 FC1 FC2 FC3 FC4 FC5 > FC6 FCz Fpz FT7 FT8 Fz Iz O1 O2 Oz P1 P10 P2 P3 P4 P5 > P6 P7 P8 P9 PO3 PO4 PO7 PO8 POz Pz T7 T8 TP7 TP8 > Created Using Component Version 2.0.2.5827 > > We used Matlab version 7.10.0 R2, and fieldtrip version 13-06-2013 (and > tried a version from 2011). > > The scripts we used are read_analyzer_data and timelockanalysis. This is > the code we used for calling the scripts: > % read data into fieldtrip > cfg = []; > > cfg.inputfile = 'pp10_A'; > cfg.triggercode = 'S 20'; > cfg.triggertype = 'Stimulus'; > cfg.prestim = 1.2; > cfg.poststim = 1.7; > > pp10_l = read_analyzer_data(cfg); > > % check: compute ERP > % > cfg = []; > pp10_ERP = timelockanalysis(cfg, pp10_l); > > %plot ERP > > cfg = []; > cfg.layout = 'elec1010.lay'; > cfg.xlim = [-0.15 1.7]; > cfg.ylim = [-12.25 12.25]; > % cfg.baseline = 'yes'; > % cfg.baselinetype = 'absolute'; > cfg.showlabels = 'yes'; > cfg.interactive = 'yes'; > > multiplotER(cfg, pp10_ERP); > > > I hope you can help! > > Kind regards, > Karen > > > > > > > > > > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > -- Roemer van der Meij M.Sc. PhD Candidate Donders Institute for Brain, Cognition and Behaviour Centre for Cognition P.O. Box 9104 6500 HE Nijmegen The Netherlands Tel: +31(0)24 3655932 E-mail: r.vandermeij at donders.ru.nl -------------- next part -------------- An HTML attachment was scrubbed... URL: From t.grent-tjong at donders.ru.nl Mon Jun 17 14:55:43 2013 From: t.grent-tjong at donders.ru.nl (Tineke Grent-'t-Jong) Date: Mon, 17 Jun 2013 14:55:43 +0200 Subject: [FieldTrip] fieldtrip Digest, Vol 31, Issue 32 References: Message-ID: <5819595A0394409287071472F2D6352A@socrates> Hi Karen, To me it looks like the only thing you need to do is subtract the baseline, like you have done in BVA (specifying the same window with cfg.baseline = [xmin xmax], not 'yes'). The average ERP that you are plotting in BVA has already been baselined, but the single trials that go into the ft_timelockanalysis function are not, hence the need for baselining later, like in your case at the level of plotting. Hope this helps, Tineke ----- Original Message ----- From: To: Sent: Monday, June 17, 2013 1:56 PM Subject: fieldtrip Digest, Vol 31, Issue 32 > Send fieldtrip mailing list submissions to > fieldtrip at science.ru.nl > > To subscribe or unsubscribe via the World Wide Web, visit > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > or, via email, send a message with subject or body 'help' to > fieldtrip-request at science.ru.nl > > You can reach the person managing the list at > fieldtrip-owner at science.ru.nl > > When replying, please edit your Subject line so it is more specific > than "Re: Contents of fieldtrip digest..." > -------------------------------------------------------------------------------- > Today's Topics: > > 1. ERP average Brain Vision is different from ERP average > FieldTrip (Karen Schuil) > -------------------------------------------------------------------------------- > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip From aaron.schurger at gmail.com Mon Jun 17 15:08:25 2013 From: aaron.schurger at gmail.com (Aaron Schurger) Date: Mon, 17 Jun 2013 15:08:25 +0200 Subject: [FieldTrip] fieldtrip Digest, Vol 31, Issue 32 In-Reply-To: <5819595A0394409287071472F2D6352A@socrates> References: <5819595A0394409287071472F2D6352A@socrates> Message-ID: Hi, Karen, Tineke, To me it looks like more than just a baseline shift. It looks like either linear de-trending or high-pass filtering was applied to the BVA data. I don't see how a baseline shift could get rid of the low frequency component that is clearly visible in the FT plot, but not the BVA plot. Cheers, Aaron On Mon, Jun 17, 2013 at 2:55 PM, Tineke Grent-'t-Jong wrote: > Hi Karen, > > To me it looks like the only thing you need to do is subtract the baseline, > like you have done in BVA (specifying the same window with cfg.baseline = > [xmin xmax], not 'yes'). The average ERP that you are plotting in BVA has > already been baselined, but the single trials that go into the > ft_timelockanalysis function are not, hence the need for baselining later, > like in your case at the level of plotting. > > Hope this helps, > > Tineke > > > ----- Original Message ----- From: > To: > Sent: Monday, June 17, 2013 1:56 PM > Subject: fieldtrip Digest, Vol 31, Issue 32 > > >> Send fieldtrip mailing list submissions to >> fieldtrip at science.ru.nl >> >> To subscribe or unsubscribe via the World Wide Web, visit >> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip >> or, via email, send a message with subject or body 'help' to >> fieldtrip-request at science.ru.nl >> >> You can reach the person managing the list at >> fieldtrip-owner at science.ru.nl >> >> When replying, please edit your Subject line so it is more specific >> than "Re: Contents of fieldtrip digest..." >> > > > -------------------------------------------------------------------------------- > > >> Today's Topics: >> >> 1. ERP average Brain Vision is different from ERP average >> FieldTrip (Karen Schuil) >> > > > -------------------------------------------------------------------------------- > > >> _______________________________________________ >> fieldtrip mailing list >> fieldtrip at donders.ru.nl >> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -- Aaron Schurger, PhD Post-doctoral researcher INSERM U992 / NeuroSpin CEA - Saclay, France +33-1-69-08-66-47 aaron.schurger at gmail.com http://www.unicog.org From schuil at fsw.eur.nl Mon Jun 17 15:22:22 2013 From: schuil at fsw.eur.nl (Karen Schuil) Date: Mon, 17 Jun 2013 15:22:22 +0200 Subject: [FieldTrip] ERP average Brain Vision is different from ERP average FieldTrip In-Reply-To: References: Message-ID: Dear Jim, Aaron, Roemer and Tineke, Thanks for your quick response and suggestions! The whole preprocessing (including the filters) was done in BVA. After segmentatation of the conditions, we exported the data to Fieldtrip. The only steps we did in Fieldtrip was averaging, creating and plotting an ERP. Therefore it can't be the filters, right? Unless, the averaging step in BVA applies filters as well. The ref in AF7-ref is added by BVA and refers to the channels being linked to the mastoids. We have also tried it with subtracting a baseline, but this unfortunately did not help. Do you have any other suggestions? Cheers, Karen On Mon, Jun 17, 2013 at 2:25 PM, Aaron Schurger wrote: > To me it really looks like BVA is applying a high-pass filter at some > stage. When you export the data, the high-pass filter has probably > already been applied. It is typical in EEG (though not a good idea in > my opinion) to apply a high-pass filter with a cutoff at around 0.05 > or 0.1 Hz. There should be a setting somewhere in BVA to turn off the > high-pass filter. Anyway, that's my guess just from looking at the > figure you attached. > Cheers, > Aaron > > On Mon, Jun 17, 2013 at 1:56 PM, Karen Schuil > wrote: > > Dear Fieldtrip Users, > > > > I have a BVA-Fieldtrip problem. The average ERPs of Brain Vision Analyser > > are different from the ERPS of FieldTrip. It seems that in Fieldtrip a > slow > > negative drift is added and peaks are more/less pronounced than in BVA > > (attached is a picture of the two different plots). > > > > An expert FieldTrip User and I could not find a solution for this > problem. I > > hope one of you has a suggestion for this problem. > > > > The individual trial data was exported from BVA (version 2.02.5859) with > the > > following settings: > > File extension: .seg > > Write header file: yes > > Write marker file: yes > > Format: BINARY > > Orientation: MULTIPLEXED > > Line Delimiter: CRLF (PC style) > > Binary format: 16-Bit signed integer format > > Set resolution manually: no > > Individually optimized resolution for each channel: yes > > Convert to big-endian order: no > > Export all channels: no > > Export the following channels: > > AF3 AF4 AF7 AF8 AFz C1 C2 C3 C4 C5 C6 CP1 CP2 CP3 CP4 CP5 > > CP6 CPz Cz F1 F2 F3 F4 F5 F6 F7 F8 FC1 FC2 FC3 FC4 FC5 > > FC6 FCz Fpz FT7 FT8 Fz Iz O1 O2 Oz P1 P10 P2 P3 P4 P5 > > P6 P7 P8 P9 PO3 PO4 PO7 PO8 POz Pz T7 T8 TP7 TP8 > > Created Using Component Version 2.0.2.5827 > > > > We used Matlab version 7.10.0 R2, and fieldtrip version 13-06-2013 (and > > tried a version from 2011). > > > > The scripts we used are read_analyzer_data and timelockanalysis. This is > the > > code we used for calling the scripts: > > % read data into fieldtrip > > cfg = []; > > > > cfg.inputfile = 'pp10_A'; > > cfg.triggercode = 'S 20'; > > cfg.triggertype = 'Stimulus'; > > cfg.prestim = 1.2; > > cfg.poststim = 1.7; > > > > pp10_l = read_analyzer_data(cfg); > > > > % check: compute ERP > > % > > cfg = []; > > pp10_ERP = timelockanalysis(cfg, pp10_l); > > > > %plot ERP > > > > cfg = []; > > cfg.layout = 'elec1010.lay'; > > cfg.xlim = [-0.15 1.7]; > > cfg.ylim = [-12.25 12.25]; > > % cfg.baseline = 'yes'; > > % cfg.baselinetype = 'absolute'; > > cfg.showlabels = 'yes'; > > cfg.interactive = 'yes'; > > > > multiplotER(cfg, pp10_ERP); > > > > > > I hope you can help! > > > > Kind regards, > > Karen > > > > > > > > > > > > > > > > > > > > > > > > _______________________________________________ > > fieldtrip mailing list > > fieldtrip at donders.ru.nl > > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > > > -- > Aaron Schurger, PhD > Post-doctoral researcher > INSERM U992 / NeuroSpin > CEA - Saclay, France > +33-1-69-08-66-47 > aaron.schurger at gmail.com > http://www.unicog.org > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > -- ------------------- Karen Schuil PhD student Erasmus University Rotterdam Institute of Psychology, T 13-09 Burgemeester Oudlaan 50 P.O. Box 1738 3000 DR Rotterdam The Netherlands Phone: +31 (0) 10 408 2293 Email: schuil at fsw.eur.nl -------------- next part -------------- An HTML attachment was scrubbed... URL: From t.grent-tjong at donders.ru.nl Mon Jun 17 15:39:30 2013 From: t.grent-tjong at donders.ru.nl (Tineke Grent-'t-Jong) Date: Mon, 17 Jun 2013 15:39:30 +0200 Subject: [FieldTrip] fieldtrip Digest, Vol 31, Issue 32 References: <5819595A0394409287071472F2D6352A@socrates> Message-ID: <0840040570ED4FE896ED4FAE33DE1355@socrates> Hi Karen, Aaron is right that it could be an effect of de-trending or high-pass filtering. You could try running the ft_timelockanalyis step again with option cfg.removemean = 'no' ('yes' is the default option!). If this solves the problem then it indeed was some kind of de-trending problem. Cheers, Tineke ----- Original Message ----- From: "Aaron Schurger" To: "Tineke Grent-'t-Jong" ; "FieldTrip discussion list" Sent: Monday, June 17, 2013 3:08 PM Subject: Re: [FieldTrip] fieldtrip Digest, Vol 31, Issue 32 > Hi, Karen, Tineke, > To me it looks like more than just a baseline shift. It looks like > either linear de-trending or high-pass filtering was applied to the > BVA data. I don't see how a baseline shift could get rid of the low > frequency component that is clearly visible in the FT plot, but not > the BVA plot. > Cheers, > Aaron > > On Mon, Jun 17, 2013 at 2:55 PM, Tineke Grent-'t-Jong > wrote: >> Hi Karen, >> >> To me it looks like the only thing you need to do is subtract the >> baseline, >> like you have done in BVA (specifying the same window with cfg.baseline = >> [xmin xmax], not 'yes'). The average ERP that you are plotting in BVA has >> already been baselined, but the single trials that go into the >> ft_timelockanalysis function are not, hence the need for baselining >> later, >> like in your case at the level of plotting. >> >> Hope this helps, >> >> Tineke >> >> >> ----- Original Message ----- From: >> To: >> Sent: Monday, June 17, 2013 1:56 PM >> Subject: fieldtrip Digest, Vol 31, Issue 32 >> >> >>> Send fieldtrip mailing list submissions to >>> fieldtrip at science.ru.nl >>> >>> To subscribe or unsubscribe via the World Wide Web, visit >>> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip >>> or, via email, send a message with subject or body 'help' to >>> fieldtrip-request at science.ru.nl >>> >>> You can reach the person managing the list at >>> fieldtrip-owner at science.ru.nl >>> >>> When replying, please edit your Subject line so it is more specific >>> than "Re: Contents of fieldtrip digest..." >>> >> >> >> -------------------------------------------------------------------------------- >> >> >>> Today's Topics: >>> >>> 1. ERP average Brain Vision is different from ERP average >>> FieldTrip (Karen Schuil) >>> >> >> >> -------------------------------------------------------------------------------- >> >> >>> _______________________________________________ >>> fieldtrip mailing list >>> fieldtrip at donders.ru.nl >>> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip >> >> >> _______________________________________________ >> fieldtrip mailing list >> fieldtrip at donders.ru.nl >> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > > > -- > Aaron Schurger, PhD > Post-doctoral researcher > INSERM U992 / NeuroSpin > CEA - Saclay, France > +33-1-69-08-66-47 > aaron.schurger at gmail.com > http://www.unicog.org > From berryv.dberg at gmail.com Mon Jun 17 15:40:14 2013 From: berryv.dberg at gmail.com (berry van den berg) Date: Mon, 17 Jun 2013 09:40:14 -0400 Subject: [FieldTrip] ERP average Brain Vision is different from ERP average FieldTrip In-Reply-To: References: Message-ID: I dont know BVA but it looks like the ERPs are a bit more different (for example at timepoint 100ms) then I would expect just based on high pass filtering.... Suggesting that there is different data going into averaging. Maybe brain vision just detects trials with artifacts and does not throw out the trials until the averaging step (similar to ERPlab). Can you check the number of trials? Cheers, Berry van den Berg On 17 June 2013 09:22, Karen Schuil wrote: > Dear Jim, Aaron, Roemer and Tineke, > > Thanks for your quick response and suggestions! The whole preprocessing > (including the filters) was done in BVA. After segmentatation of the > conditions, we exported the data to Fieldtrip. The only steps we did in > Fieldtrip was averaging, creating and plotting an ERP. Therefore it can't > be the filters, right? Unless, the averaging step in BVA applies filters as > well. > > The ref in AF7-ref is added by BVA and refers to the channels being linked > to the mastoids. > > We have also tried it with subtracting a baseline, but this unfortunately > did not help. > > Do you have any other suggestions? > > Cheers, Karen > > > > > On Mon, Jun 17, 2013 at 2:25 PM, Aaron Schurger wrote: > >> To me it really looks like BVA is applying a high-pass filter at some >> stage. When you export the data, the high-pass filter has probably >> already been applied. It is typical in EEG (though not a good idea in >> my opinion) to apply a high-pass filter with a cutoff at around 0.05 >> or 0.1 Hz. There should be a setting somewhere in BVA to turn off the >> high-pass filter. Anyway, that's my guess just from looking at the >> figure you attached. >> Cheers, >> Aaron >> >> On Mon, Jun 17, 2013 at 1:56 PM, Karen Schuil >> wrote: >> > Dear Fieldtrip Users, >> > >> > I have a BVA-Fieldtrip problem. The average ERPs of Brain Vision >> Analyser >> > are different from the ERPS of FieldTrip. It seems that in Fieldtrip a >> slow >> > negative drift is added and peaks are more/less pronounced than in BVA >> > (attached is a picture of the two different plots). >> > >> > An expert FieldTrip User and I could not find a solution for this >> problem. I >> > hope one of you has a suggestion for this problem. >> > >> > The individual trial data was exported from BVA (version 2.02.5859) >> with the >> > following settings: >> > File extension: .seg >> > Write header file: yes >> > Write marker file: yes >> > Format: BINARY >> > Orientation: MULTIPLEXED >> > Line Delimiter: CRLF (PC style) >> > Binary format: 16-Bit signed integer format >> > Set resolution manually: no >> > Individually optimized resolution for each channel: yes >> > Convert to big-endian order: no >> > Export all channels: no >> > Export the following channels: >> > AF3 AF4 AF7 AF8 AFz C1 C2 C3 C4 C5 C6 CP1 CP2 CP3 CP4 CP5 >> > CP6 CPz Cz F1 F2 F3 F4 F5 F6 F7 F8 FC1 FC2 FC3 FC4 FC5 >> > FC6 FCz Fpz FT7 FT8 Fz Iz O1 O2 Oz P1 P10 P2 P3 P4 P5 >> > P6 P7 P8 P9 PO3 PO4 PO7 PO8 POz Pz T7 T8 TP7 TP8 >> > Created Using Component Version 2.0.2.5827 >> > >> > We used Matlab version 7.10.0 R2, and fieldtrip version 13-06-2013 (and >> > tried a version from 2011). >> > >> > The scripts we used are read_analyzer_data and timelockanalysis. This >> is the >> > code we used for calling the scripts: >> > % read data into fieldtrip >> > cfg = []; >> > >> > cfg.inputfile = 'pp10_A'; >> > cfg.triggercode = 'S 20'; >> > cfg.triggertype = 'Stimulus'; >> > cfg.prestim = 1.2; >> > cfg.poststim = 1.7; >> > >> > pp10_l = read_analyzer_data(cfg); >> > >> > % check: compute ERP >> > % >> > cfg = []; >> > pp10_ERP = timelockanalysis(cfg, pp10_l); >> > >> > %plot ERP >> > >> > cfg = []; >> > cfg.layout = 'elec1010.lay'; >> > cfg.xlim = [-0.15 1.7]; >> > cfg.ylim = [-12.25 12.25]; >> > % cfg.baseline = 'yes'; >> > % cfg.baselinetype = 'absolute'; >> > cfg.showlabels = 'yes'; >> > cfg.interactive = 'yes'; >> > >> > multiplotER(cfg, pp10_ERP); >> > >> > >> > I hope you can help! >> > >> > Kind regards, >> > Karen >> > >> > >> > >> > >> > >> > >> > >> > >> > >> > >> > >> > _______________________________________________ >> > fieldtrip mailing list >> > fieldtrip at donders.ru.nl >> > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip >> >> >> >> -- >> Aaron Schurger, PhD >> Post-doctoral researcher >> INSERM U992 / NeuroSpin >> CEA - Saclay, France >> +33-1-69-08-66-47 >> aaron.schurger at gmail.com >> http://www.unicog.org >> _______________________________________________ >> fieldtrip mailing list >> fieldtrip at donders.ru.nl >> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip >> > > > > -- > ------------------- > Karen Schuil > PhD student > > Erasmus University Rotterdam > Institute of Psychology, T 13-09 > Burgemeester Oudlaan 50 > P.O. Box 1738 > 3000 DR Rotterdam > The Netherlands > Phone: +31 (0) 10 408 2293 > Email: schuil at fsw.eur.nl > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > -- Berry van den Berg berryv.dberg at gmail.com -------------- next part -------------- An HTML attachment was scrubbed... URL: From aaron.schurger at gmail.com Mon Jun 17 15:44:05 2013 From: aaron.schurger at gmail.com (Aaron Schurger) Date: Mon, 17 Jun 2013 15:44:05 +0200 Subject: [FieldTrip] ERP average Brain Vision is different from ERP average FieldTrip In-Reply-To: References: Message-ID: Hi, Karen, Yes, you're right - it would have to be the case that the averaging step in BVA applies the filters. That would be where I would check. If nothing there then it really is mysterious! Aaron On Mon, Jun 17, 2013 at 3:22 PM, Karen Schuil wrote: > Dear Jim, Aaron, Roemer and Tineke, > > Thanks for your quick response and suggestions! The whole preprocessing > (including the filters) was done in BVA. After segmentatation of the > conditions, we exported the data to Fieldtrip. The only steps we did in > Fieldtrip was averaging, creating and plotting an ERP. Therefore it can't be > the filters, right? Unless, the averaging step in BVA applies filters as > well. > > The ref in AF7-ref is added by BVA and refers to the channels being linked > to the mastoids. > > We have also tried it with subtracting a baseline, but this unfortunately > did not help. > > Do you have any other suggestions? > > Cheers, Karen > > > > > On Mon, Jun 17, 2013 at 2:25 PM, Aaron Schurger > wrote: >> >> To me it really looks like BVA is applying a high-pass filter at some >> stage. When you export the data, the high-pass filter has probably >> already been applied. It is typical in EEG (though not a good idea in >> my opinion) to apply a high-pass filter with a cutoff at around 0.05 >> or 0.1 Hz. There should be a setting somewhere in BVA to turn off the >> high-pass filter. Anyway, that's my guess just from looking at the >> figure you attached. >> Cheers, >> Aaron >> >> On Mon, Jun 17, 2013 at 1:56 PM, Karen Schuil >> wrote: >> > Dear Fieldtrip Users, >> > >> > I have a BVA-Fieldtrip problem. The average ERPs of Brain Vision >> > Analyser >> > are different from the ERPS of FieldTrip. It seems that in Fieldtrip a >> > slow >> > negative drift is added and peaks are more/less pronounced than in BVA >> > (attached is a picture of the two different plots). >> > >> > An expert FieldTrip User and I could not find a solution for this >> > problem. I >> > hope one of you has a suggestion for this problem. >> > >> > The individual trial data was exported from BVA (version 2.02.5859) with >> > the >> > following settings: >> > File extension: .seg >> > Write header file: yes >> > Write marker file: yes >> > Format: BINARY >> > Orientation: MULTIPLEXED >> > Line Delimiter: CRLF (PC style) >> > Binary format: 16-Bit signed integer format >> > Set resolution manually: no >> > Individually optimized resolution for each channel: yes >> > Convert to big-endian order: no >> > Export all channels: no >> > Export the following channels: >> > AF3 AF4 AF7 AF8 AFz C1 C2 C3 C4 C5 C6 CP1 CP2 CP3 CP4 CP5 >> > CP6 CPz Cz F1 F2 F3 F4 F5 F6 F7 F8 FC1 FC2 FC3 FC4 FC5 >> > FC6 FCz Fpz FT7 FT8 Fz Iz O1 O2 Oz P1 P10 P2 P3 P4 P5 >> > P6 P7 P8 P9 PO3 PO4 PO7 PO8 POz Pz T7 T8 TP7 TP8 >> > Created Using Component Version 2.0.2.5827 >> > >> > We used Matlab version 7.10.0 R2, and fieldtrip version 13-06-2013 (and >> > tried a version from 2011). >> > >> > The scripts we used are read_analyzer_data and timelockanalysis. This is >> > the >> > code we used for calling the scripts: >> > % read data into fieldtrip >> > cfg = []; >> > >> > cfg.inputfile = 'pp10_A'; >> > cfg.triggercode = 'S 20'; >> > cfg.triggertype = 'Stimulus'; >> > cfg.prestim = 1.2; >> > cfg.poststim = 1.7; >> > >> > pp10_l = read_analyzer_data(cfg); >> > >> > % check: compute ERP >> > % >> > cfg = []; >> > pp10_ERP = timelockanalysis(cfg, pp10_l); >> > >> > %plot ERP >> > >> > cfg = []; >> > cfg.layout = 'elec1010.lay'; >> > cfg.xlim = [-0.15 1.7]; >> > cfg.ylim = [-12.25 12.25]; >> > % cfg.baseline = 'yes'; >> > % cfg.baselinetype = 'absolute'; >> > cfg.showlabels = 'yes'; >> > cfg.interactive = 'yes'; >> > >> > multiplotER(cfg, pp10_ERP); >> > >> > >> > I hope you can help! >> > >> > Kind regards, >> > Karen >> > >> > >> > >> > >> > >> > >> > >> > >> > >> > >> > >> > _______________________________________________ >> > fieldtrip mailing list >> > fieldtrip at donders.ru.nl >> > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip >> >> >> >> -- >> Aaron Schurger, PhD >> Post-doctoral researcher >> INSERM U992 / NeuroSpin >> CEA - Saclay, France >> +33-1-69-08-66-47 >> aaron.schurger at gmail.com >> http://www.unicog.org >> _______________________________________________ >> fieldtrip mailing list >> fieldtrip at donders.ru.nl >> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > > > > -- > ------------------- > Karen Schuil > PhD student > > Erasmus University Rotterdam > Institute of Psychology, T 13-09 > Burgemeester Oudlaan 50 > P.O. Box 1738 > 3000 DR Rotterdam > The Netherlands > Phone: +31 (0) 10 408 2293 > Email: schuil at fsw.eur.nl > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -- Aaron Schurger, PhD Post-doctoral researcher INSERM U992 / NeuroSpin CEA - Saclay, France +33-1-69-08-66-47 aaron.schurger at gmail.com http://www.unicog.org From eelke.spaak at donders.ru.nl Tue Jun 18 10:29:34 2013 From: eelke.spaak at donders.ru.nl (Eelke Spaak) Date: Tue, 18 Jun 2013 10:29:34 +0200 Subject: [FieldTrip] ERP average Brain Vision is different from ERP average FieldTrip In-Reply-To: References: Message-ID: Dear Karen, It seems likely (as the other responses also indicate) that BrainVision Analyzer is doing something to the data that FieldTrip is not; in other words, the FieldTrip ERP is probably more 'pure'. Therefore, perhaps it might be worth asking around on the BVA mailing list if the people there know what BVA is doing to the data prior to computing and displaying the average? It is easy to check whether FieldTrip is doing something unexpected to the data, by computing and plotting the average yourself: erp = mean(cat(3, pp10_l.trial{:}), 3); chanind = strmatch('AF7', pp10_l.label); plot(pp10_l.time{1}, erp(chanind,:)); This only works if all trials have identical time axes, but judging from your script I think they do. It the above steps give a different plot than the FT functions, something is possibly (/probably) wrong in the FT code. Best, Eelke On 17 June 2013 15:22, Karen Schuil wrote: > Dear Jim, Aaron, Roemer and Tineke, > > Thanks for your quick response and suggestions! The whole preprocessing > (including the filters) was done in BVA. After segmentatation of the > conditions, we exported the data to Fieldtrip. The only steps we did in > Fieldtrip was averaging, creating and plotting an ERP. Therefore it can't be > the filters, right? Unless, the averaging step in BVA applies filters as > well. > > The ref in AF7-ref is added by BVA and refers to the channels being linked > to the mastoids. > > We have also tried it with subtracting a baseline, but this unfortunately > did not help. > > Do you have any other suggestions? > > Cheers, Karen > > > > > On Mon, Jun 17, 2013 at 2:25 PM, Aaron Schurger > wrote: >> >> To me it really looks like BVA is applying a high-pass filter at some >> stage. When you export the data, the high-pass filter has probably >> already been applied. It is typical in EEG (though not a good idea in >> my opinion) to apply a high-pass filter with a cutoff at around 0.05 >> or 0.1 Hz. There should be a setting somewhere in BVA to turn off the >> high-pass filter. Anyway, that's my guess just from looking at the >> figure you attached. >> Cheers, >> Aaron >> >> On Mon, Jun 17, 2013 at 1:56 PM, Karen Schuil >> wrote: >> > Dear Fieldtrip Users, >> > >> > I have a BVA-Fieldtrip problem. The average ERPs of Brain Vision >> > Analyser >> > are different from the ERPS of FieldTrip. It seems that in Fieldtrip a >> > slow >> > negative drift is added and peaks are more/less pronounced than in BVA >> > (attached is a picture of the two different plots). >> > >> > An expert FieldTrip User and I could not find a solution for this >> > problem. I >> > hope one of you has a suggestion for this problem. >> > >> > The individual trial data was exported from BVA (version 2.02.5859) with >> > the >> > following settings: >> > File extension: .seg >> > Write header file: yes >> > Write marker file: yes >> > Format: BINARY >> > Orientation: MULTIPLEXED >> > Line Delimiter: CRLF (PC style) >> > Binary format: 16-Bit signed integer format >> > Set resolution manually: no >> > Individually optimized resolution for each channel: yes >> > Convert to big-endian order: no >> > Export all channels: no >> > Export the following channels: >> > AF3 AF4 AF7 AF8 AFz C1 C2 C3 C4 C5 C6 CP1 CP2 CP3 CP4 CP5 >> > CP6 CPz Cz F1 F2 F3 F4 F5 F6 F7 F8 FC1 FC2 FC3 FC4 FC5 >> > FC6 FCz Fpz FT7 FT8 Fz Iz O1 O2 Oz P1 P10 P2 P3 P4 P5 >> > P6 P7 P8 P9 PO3 PO4 PO7 PO8 POz Pz T7 T8 TP7 TP8 >> > Created Using Component Version 2.0.2.5827 >> > >> > We used Matlab version 7.10.0 R2, and fieldtrip version 13-06-2013 (and >> > tried a version from 2011). >> > >> > The scripts we used are read_analyzer_data and timelockanalysis. This is >> > the >> > code we used for calling the scripts: >> > % read data into fieldtrip >> > cfg = []; >> > >> > cfg.inputfile = 'pp10_A'; >> > cfg.triggercode = 'S 20'; >> > cfg.triggertype = 'Stimulus'; >> > cfg.prestim = 1.2; >> > cfg.poststim = 1.7; >> > >> > pp10_l = read_analyzer_data(cfg); >> > >> > % check: compute ERP >> > % >> > cfg = []; >> > pp10_ERP = timelockanalysis(cfg, pp10_l); >> > >> > %plot ERP >> > >> > cfg = []; >> > cfg.layout = 'elec1010.lay'; >> > cfg.xlim = [-0.15 1.7]; >> > cfg.ylim = [-12.25 12.25]; >> > % cfg.baseline = 'yes'; >> > % cfg.baselinetype = 'absolute'; >> > cfg.showlabels = 'yes'; >> > cfg.interactive = 'yes'; >> > >> > multiplotER(cfg, pp10_ERP); >> > >> > >> > I hope you can help! >> > >> > Kind regards, >> > Karen >> > >> > >> > >> > >> > >> > >> > >> > >> > >> > >> > >> > _______________________________________________ >> > fieldtrip mailing list >> > fieldtrip at donders.ru.nl >> > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip >> >> >> >> -- >> Aaron Schurger, PhD >> Post-doctoral researcher >> INSERM U992 / NeuroSpin >> CEA - Saclay, France >> +33-1-69-08-66-47 >> aaron.schurger at gmail.com >> http://www.unicog.org >> _______________________________________________ >> fieldtrip mailing list >> fieldtrip at donders.ru.nl >> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > > > > -- > ------------------- > Karen Schuil > PhD student > > Erasmus University Rotterdam > Institute of Psychology, T 13-09 > Burgemeester Oudlaan 50 > P.O. Box 1738 > 3000 DR Rotterdam > The Netherlands > Phone: +31 (0) 10 408 2293 > Email: schuil at fsw.eur.nl > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip From mje.mads at gmail.com Tue Jun 18 10:44:01 2013 From: mje.mads at gmail.com (Mads Jensen) Date: Tue, 18 Jun 2013 10:44:01 +0200 Subject: [FieldTrip] select trial by previous trigger code Message-ID: <51C01DD1.5070005@gmail.com> Hi all, I would like to know if it is possible select a trail based on the previous trigger code? I got a dataset (MEG, neuromeg) where sometimes the subject just press a button and sometimes a cue is shown and they then press the button, the button presses are coded "1" and the cue "2". So, what I would like is to datasets one with trials where there has been no cue and one dataset where the trials that have cue is. Is that possible to do automatically or do I have to do a "by hand"? best wishes, mads From s.vanpelt at fcdonders.ru.nl Tue Jun 18 11:11:06 2013 From: s.vanpelt at fcdonders.ru.nl (Stan van Pelt) Date: Tue, 18 Jun 2013 11:11:06 +0200 (CEST) Subject: [FieldTrip] select trial by previous trigger code References: <51C01DD1.5070005@gmail.com> Message-ID: <03cc01ce6c03$c403fb20$4c0bf160$@vanpelt@fcdonders.ru.nl> Dear Mads, It is not possible to do this automatically. However, by writing your own 'trialfun', you should be able to program this in a relative straightforward manner. You can enter this trialfun-name in the cfg.trialfun configuration option when subsequently calling ft_definetrial. See http://fieldtrip.fcdonders.nl/example/making_your_own_trialfun_for_conditi onal_trial_definition Best, Stan Stan van Pelt, PhD Donders Institute for Brain, Cognition and Behaviour Centre for Cognition Montessorilaan 3, B.01.19 6525 HR Nijmegen tel: 024-3616288 -----Original Message----- From: fieldtrip-bounces at science.ru.nl [mailto:fieldtrip-bounces at science.ru.nl] On Behalf Of Mads Jensen Sent: dinsdag 18 juni 2013 10:44 To: FieldTrip discussion list Subject: [FieldTrip] select trial by previous trigger code Hi all, I would like to know if it is possible select a trail based on the previous trigger code? I got a dataset (MEG, neuromeg) where sometimes the subject just press a button and sometimes a cue is shown and they then press the button, the button presses are coded "1" and the cue "2". So, what I would like is to datasets one with trials where there has been no cue and one dataset where the trials that have cue is. Is that possible to do automatically or do I have to do a "by hand"? best wishes, mads _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip From jm.horschig at donders.ru.nl Tue Jun 18 11:11:50 2013 From: jm.horschig at donders.ru.nl (=?ISO-8859-1?Q?=22J=F6rn_M=2E_Horschig=22?=) Date: Tue, 18 Jun 2013 11:11:50 +0200 Subject: [FieldTrip] select trial by previous trigger code In-Reply-To: <51C01DD1.5070005@gmail.com> References: <51C01DD1.5070005@gmail.com> Message-ID: <51C02456.2000800@donders.ru.nl> Hi Mads, such things are possible if you write your own trial function. Basically, you need to read in the events (i.e. trigger values) and then make a selection based on that, see also here: http://fieldtrip.fcdonders.nl/example/making_your_own_trialfun_for_conditional_trial_definition?s[]=trialfun http://fieldtrip.fcdonders.nl/faq/what_is_the_relation_between_events_such_as_triggers_and_trials?s[]=trialfun Hope that helps! Best, Jörn On 6/18/2013 10:44 AM, Mads Jensen wrote: > Hi all, > > I would like to know if it is possible select a trail based on the > previous trigger code? > > I got a dataset (MEG, neuromeg) where sometimes the subject just press > a button and sometimes a cue is shown and they then press the button, > the button presses are coded "1" and the cue "2". So, what I would > like is to datasets one with trials where there has been no cue and > one dataset where the trials that have cue is. Is that possible to do > automatically or do I have to do a "by hand"? > > best wishes, > mads > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -- Jörn M. Horschig PhD Student Donders Institute for Brain, Cognition and Behaviour Centre for Cognitive Neuroimaging Radboud University Nijmegen Neuronal Oscillations Group FieldTrip Development Team P.O. Box 9101 NL-6500 HB Nijmegen The Netherlands Contact: E-Mail: jm.horschig at donders.ru.nl Tel: +31-(0)24-36-68493 Web: http://www.ru.nl/donders Visiting address: Trigon, room 2.30 Kapittelweg 29 NL-6525 EN Nijmegen The Netherlands From yuvharpaz at gmail.com Tue Jun 18 14:58:15 2013 From: yuvharpaz at gmail.com (Yuval Harpaz) Date: Tue, 18 Jun 2013 15:58:15 +0300 Subject: [FieldTrip] fixed dipole orientation for MNE Message-ID: Dear group I would like to ask again ( http://mailman.science.ru.nl/pipermail/fieldtrip/2011-February/003456.html) about head model with fixed dipole orientation (obtained from freesurfer), as I saw no reply to the previous message. I understand that there is no civilized way, currently, to tell MNE or beamforming to use fixed orientation, or am I wrong? applying 'sam' I managed to set dipole orinetation by making a dip.mom field in addition to dip.pos and by gain = lf; instead of the existing gain = lf * UnitMDip'; note that here lf is a vector (no 3 columns). However this is patchy and not thorough. So can you please tell me if there is a way to do it with regular ft functions? thank you Yuval Dr .Harpaz BIU MEG lab -------------- next part -------------- An HTML attachment was scrubbed... URL: From eelke.spaak at donders.ru.nl Tue Jun 18 15:16:41 2013 From: eelke.spaak at donders.ru.nl (Eelke Spaak) Date: Tue, 18 Jun 2013 15:16:41 +0200 Subject: [FieldTrip] fixed dipole orientation for MNE In-Reply-To: References: Message-ID: Dear Yuval, The LCMV and DICS beamforming implementations in FieldTrip support cfg..fixedori = 'yes', where is either 'lcmv' or 'dics'. This will compute a filter which constrains each dipole to point in the strongest orientation. For SAM I think this is not implemented, and for MNE I have no clue. Does this answer your question? Or are you lookling for another type of fixed orientation, maybe based on anatomy or so? Best, Eelke On 18 June 2013 14:58, Yuval Harpaz wrote: > Dear group > I would like to ask again > (http://mailman.science.ru.nl/pipermail/fieldtrip/2011-February/003456.html) > about head model with fixed dipole orientation (obtained from freesurfer), > as I saw no reply to the previous message. > > I understand that there is no civilized way, currently, to tell MNE or > beamforming to use fixed orientation, or am I wrong? > > applying 'sam' I managed to set dipole orinetation by making a dip.mom field > in addition to dip.pos and by > gain = lf; > instead of the existing > gain = lf * UnitMDip'; > note that here lf is a vector (no 3 columns). > > However this is patchy and not thorough. So can you please tell me if there > is a way to do it with regular ft functions? > thank you > Yuval > > > > > Dr .Harpaz > > BIU MEG lab > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip From yuvharpaz at gmail.com Tue Jun 18 19:01:40 2013 From: yuvharpaz at gmail.com (Yuval Harpaz) Date: Tue, 18 Jun 2013 20:01:40 +0300 Subject: [FieldTrip] fixed dipole orientation for MNE In-Reply-To: References: Message-ID: Well, it uses fixed orientation but it calculates the orientation based on the signal, not on the anatomy. I am trying to reduce leakage problems by limiting orientation according to structure. you CAN specify dip.mom but this is really buggy. thanks On 18 June 2013 16:16, Eelke Spaak wrote: > Dear Yuval, > > The LCMV and DICS beamforming implementations in FieldTrip support > cfg..fixedori = 'yes', where is either 'lcmv' or > 'dics'. This will compute a filter which constrains each dipole to > point in the strongest orientation. For SAM I think this is not > implemented, and for MNE I have no clue. > > Does this answer your question? Or are you lookling for another type > of fixed orientation, maybe based on anatomy or so? > > Best, > Eelke > > On 18 June 2013 14:58, Yuval Harpaz wrote: > > Dear group > > I would like to ask again > > ( > http://mailman.science.ru.nl/pipermail/fieldtrip/2011-February/003456.html > ) > > about head model with fixed dipole orientation (obtained from > freesurfer), > > as I saw no reply to the previous message. > > > > I understand that there is no civilized way, currently, to tell MNE or > > beamforming to use fixed orientation, or am I wrong? > > > > applying 'sam' I managed to set dipole orinetation by making a dip.mom > field > > in addition to dip.pos and by > > gain = lf; > > instead of the existing > > gain = lf * UnitMDip'; > > note that here lf is a vector (no 3 columns). > > > > However this is patchy and not thorough. So can you please tell me if > there > > is a way to do it with regular ft functions? > > thank you > > Yuval > > > > > > > > > > Dr .Harpaz > > > > BIU MEG lab > > > > _______________________________________________ > > fieldtrip mailing list > > fieldtrip at donders.ru.nl > > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > -- Yuval Dr .Harpaz BIU MEG lab -------------- next part -------------- An HTML attachment was scrubbed... URL: From mje.mads at gmail.com Tue Jun 18 23:52:02 2013 From: mje.mads at gmail.com (Mads Jensen) Date: Tue, 18 Jun 2013 23:52:02 +0200 Subject: [FieldTrip] select trial by previous trigger code In-Reply-To: <51C02456.2000800@donders.ru.nl> References: <51C01DD1.5070005@gmail.com> <51C02456.2000800@donders.ru.nl> Message-ID: <51C0D682.7070008@gmail.com> HI Jörn & Stan, Thanks for your replies and advises. It worked. thanks, best mads On 06/18/2013 11:11 AM, "Jörn M. Horschig" wrote: > Hi Mads, > > such things are possible if you write your own trial function. > Basically, you need to read in the events (i.e. trigger values) and then > make a selection based on that, see also here: > http://fieldtrip.fcdonders.nl/example/making_your_own_trialfun_for_conditional_trial_definition?s[]=trialfun > > http://fieldtrip.fcdonders.nl/faq/what_is_the_relation_between_events_such_as_triggers_and_trials?s[]=trialfun > > > Hope that helps! > Best, > Jörn > > On 6/18/2013 10:44 AM, Mads Jensen wrote: >> Hi all, >> >> I would like to know if it is possible select a trail based on the >> previous trigger code? >> >> I got a dataset (MEG, neuromeg) where sometimes the subject just press >> a button and sometimes a cue is shown and they then press the button, >> the button presses are coded "1" and the cue "2". So, what I would >> like is to datasets one with trials where there has been no cue and >> one dataset where the trials that have cue is. Is that possible to do >> automatically or do I have to do a "by hand"? >> >> best wishes, >> mads >> _______________________________________________ >> fieldtrip mailing list >> fieldtrip at donders.ru.nl >> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > From marco.porta88 at gmail.com Wed Jun 19 16:41:47 2013 From: marco.porta88 at gmail.com (Marco Porta) Date: Wed, 19 Jun 2013 16:41:47 +0200 Subject: [FieldTrip] statistics on non-event-related fields Message-ID: Dear Fieldtrip experts, I have a question regarding the statistics. How can I statistics on non event-related fields in a between-trials. Thanks, Marco -------------- next part -------------- An HTML attachment was scrubbed... URL: From eelke.spaak at donders.ru.nl Wed Jun 19 16:50:48 2013 From: eelke.spaak at donders.ru.nl (Eelke Spaak) Date: Wed, 19 Jun 2013 16:50:48 +0200 Subject: [FieldTrip] statistics on non-event-related fields In-Reply-To: References: Message-ID: Dear Marco, What do you mean exactly with "non event-related fields"? I presume there is some structure in your data that you want to consider as the independent variable of interest, right? Some more information on what you want to do would help us to help you. Best, Eelke On 19 June 2013 16:41, Marco Porta wrote: > Dear Fieldtrip experts, > I have a question regarding the statistics. How can I statistics on non > event-related fields in a between-trials. > Thanks, > > Marco > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip From jdien07 at mac.com Thu Jun 20 02:35:35 2013 From: jdien07 at mac.com (Joseph Dien) Date: Wed, 19 Jun 2013 20:35:35 -0400 Subject: [FieldTrip] ft_dipolefitting options no longer working Message-ID: Hi, it looks like changes have been made to ft_dipolefitting that have resulted in the following options no longer working: cfg.grid.xgrid = 'auto'; cfg.grid.ygrid = 'auto'; cfg.grid.zgrid = 'auto'; The header of the ft_dipolefitting file as of the 20130619 release says: % This function depends on FT_PREPARE_DIPOLE_GRID which has the following options: % cfg.grid.xgrid (default set in FT_PREPARE_DIPOLE_GRID: cfg.grid.xgrid = 'auto'), documented % cfg.grid.ygrid (default set in FT_PREPARE_DIPOLE_GRID: cfg.grid.ygrid = 'auto'), documented % cfg.grid.zgrid (default set in FT_PREPARE_DIPOLE_GRID: cfg.grid.zgrid = 'auto'), documented but a Find Files search indicates that FT_PREPARE_DIPOLE_GRID no longer exists. I don't have copies of FieldTrip older than Feb 2013 so I can't check directly but I know that my function call used to work and no longer does. Can someone help me find a fix for this? Any help appreciated! Joe -------------------------------------------------------------------------------- Joseph Dien, Senior Research Scientist University of Maryland E-mail: jdien07 at mac.com Phone: 301-226-8848 Fax: 301-226-8811 http://joedien.com// -------------- next part -------------- An HTML attachment was scrubbed... URL: From jdien07 at mac.com Thu Jun 20 04:41:49 2013 From: jdien07 at mac.com (Joseph Dien) Date: Wed, 19 Jun 2013 22:41:49 -0400 Subject: [FieldTrip] ft_dipolefitting options no longer working In-Reply-To: References: Message-ID: Okay, I got this sorted out. I was able to use ft_prepare_sourcemodel to set up the config variable. The header info of ft_dipolefitting should get updated though. Cheers! Joe On Jun 19, 2013, at 8:35 PM, Joseph Dien wrote: > Hi, > it looks like changes have been made to ft_dipolefitting that have resulted in the following options no longer working: > > cfg.grid.xgrid = 'auto'; > cfg.grid.ygrid = 'auto'; > cfg.grid.zgrid = 'auto'; > > The header of the ft_dipolefitting file as of the 20130619 release says: > > % This function depends on FT_PREPARE_DIPOLE_GRID which has the following options: > % cfg.grid.xgrid (default set in FT_PREPARE_DIPOLE_GRID: cfg.grid.xgrid = 'auto'), documented > % cfg.grid.ygrid (default set in FT_PREPARE_DIPOLE_GRID: cfg.grid.ygrid = 'auto'), documented > % cfg.grid.zgrid (default set in FT_PREPARE_DIPOLE_GRID: cfg.grid.zgrid = 'auto'), documented > > but a Find Files search indicates that FT_PREPARE_DIPOLE_GRID no longer exists. > > I don't have copies of FieldTrip older than Feb 2013 so I can't check directly but I know that my function call used to work and no longer does. > > Can someone help me find a fix for this? > > Any help appreciated! > > Joe > > -------------------------------------------------------------------------------- > > Joseph Dien, > Senior Research Scientist > University of Maryland > > E-mail: jdien07 at mac.com > Phone: 301-226-8848 > Fax: 301-226-8811 > http://joedien.com// > > > > > > > > > > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -------------------------------------------------------------------------------- Joseph Dien, Senior Research Scientist University of Maryland E-mail: jdien07 at mac.com Phone: 301-226-8848 Fax: 301-226-8811 http://joedien.com// -------------- next part -------------- An HTML attachment was scrubbed... URL: From marco.porta88 at gmail.com Thu Jun 20 14:48:18 2013 From: marco.porta88 at gmail.com (Marco Porta) Date: Thu, 20 Jun 2013 14:48:18 +0200 Subject: [FieldTrip] fieldtrip Digest, Vol 31, Issue 37 In-Reply-To: References: Message-ID: Dear Users and Eelke, I have spontaneous LFP data recorded intracranially. I'm interested in studying phase correlation between sensors and assess such correlation within single subjects studies. Is it possible to study statistical significance in such correlation study or should i implement my own statistic? Thanks, Marco Dear Marco, > > What do you mean exactly with "non event-related fields"? I presume > there is some structure in your data that you want to consider as the > independent variable of interest, right? Some more information on what > you want to do would help us to help you. > > Best, > Eelke > -------------- next part -------------- An HTML attachment was scrubbed... URL: From marco.porta88 at gmail.com Fri Jun 21 14:26:12 2013 From: marco.porta88 at gmail.com (Marco Porta) Date: Fri, 21 Jun 2013 14:26:12 +0200 Subject: [FieldTrip] statistics on non-event-related fields Message-ID: Dear Users and Eelke, I have spontaneous LFP data recorded intracranially. I'm interested in studying phase correlation between sensors and assess such correlation within single subjects studies. Is it possible to study statistical significance in such correlation study or should i implement my own statistic? Thanks, Marco > Dear Marco, > > What do you mean exactly with "non event-related fields"? I presume > there is some structure in your data that you want to consider as the > independent variable of interest, right? Some more information on what > you want to do would help us to help you. > > Best, > Eelke > > > > > Dear Fieldtrip experts, > I have a question regarding the statistics. How can I statistics on non > event-related fields in a between-trials. > Thanks, > Marco -------------- next part -------------- An HTML attachment was scrubbed... URL: From politzerahless at gmail.com Fri Jun 21 20:42:32 2013 From: politzerahless at gmail.com (Stephen Politzer-Ahles) Date: Fri, 21 Jun 2013 13:42:32 -0500 Subject: [FieldTrip] Using fsaverage in the minimum norm pipeline? Message-ID: Hello everyone, I am working through the minimum norm pipeline ( http://fieldtrip.fcdonders.nl/tutorial/minimumnormestimate) on functional data for multiple participants; for all but one of these participants I also have anatomical MRI. For the one participant for whom I couldn't get an MRI, I was hoping to use the freesurfer average surface (fsaverage), but I'm having some difficulty getting volume conduction models and sourcespaces from this brain aligned to CTF. Basically, I'm able to read in the data and create a sourcespace and volume conduction model using the code below. These models seem to be aligned to MNI (see the axes on http://i.imgur.com/g0DPs8A.png). To to re-align them to CTF, what I tried to do was manually do ft_volumerealign on the original anatomical MRI, and then apply that transformation matrix (which I assume specifies the transformation from MNI to CTF) to the sourcespace and volume conductor (in the third and fourth blocks of code below). But the resulting sourcespace and volume conductor are clearly not aligned to CTF (see the axes on http://i.imgur.com/MAjyDkL.png), so I assume I am doing something wrong with the transformation matrix. I admit I do not fully understand how the transformation matrix is supposed to work, so if anyone has any feedback I would greatly appreciate it. Thank you! Steve % Read the source space bnd = ft_read_headshape('/tools/freesurfer/subjects/fsaverage/bem/fsaverage-oct-6-src.fif', 'format', 'mne_source'); sourcespace = ft_convert_units(bnd, 'mm'); % Read in the anatomical MRI, segment, and make volume conduction model fsaverage = ft_read_mri('orig.mgz'); cfg = []; cfg.coordsys = 'spm'; cfg.output = {'skullstrip' 'brain'}; seg = ft_volumesegment( cfg, fsaverage); cfg = [] cfg.method = 'singleshell'; cfg.tissue = 'brain'; vol = ft_prepare_headmodel( cfg, seg ); % Get a transformation matrix from MNI to CTF cfg = []; cfg.method = 'interactive'; seg_ctf = ft_volumerealign(cfg2, seg); % manually identify NAS, LAP, and RAP T = seg_ctf.transform; % Transform the sourcespace and vol sourcespace_trans = ft_transform_geometry( T, sourcespace ); vol_trans = vol; vol_trans.bnd = ft_transform_geometry( T, vol_trans.bnd ); % Plot the un-transformed vol and sourcespace (aligned to MNI) figure;hold on; ft_plot_vol(vol, 'facecolor', 'none');alpha 0.5; ft_plot_mesh(sourcespace, 'edgecolor', 'none'); camlight % Plot the transformed vol and sourcespace figure;hold on; ft_plot_vol(vol_trans, 'facecolor', 'none');alpha 0.5; ft_plot_mesh(sourcespace_trans, 'edgecolor', 'none'); camlight -- Stephen Politzer-Ahles University of Kansas Linguistics Department http://people.ku.edu/~sjpa/ -------------- next part -------------- An HTML attachment was scrubbed... URL: From polomacnenad at gmail.com Sat Jun 22 13:34:56 2013 From: polomacnenad at gmail.com (Nenad Polomac) Date: Sat, 22 Jun 2013 13:34:56 +0200 Subject: [FieldTrip] padding of segmented data Message-ID: Dear all, In my pipeline I need two times to filter data with ft_preprocessing. Is it somehow possible to pad trials after segmentation? I need this in order to avoid filter artifacts during the second filtering. Thank you in advance! Nenad -------------- next part -------------- An HTML attachment was scrubbed... URL: From caspervanheck at gmail.com Sat Jun 22 14:32:45 2013 From: caspervanheck at gmail.com (Casper van Heck) Date: Sat, 22 Jun 2013 14:32:45 +0200 Subject: [FieldTrip] padding of segmented data In-Reply-To: References: Message-ID: Dear Nenad, I think the option cfg.padding only works for that iteration of ft_preprocessing, but what you can do, is select larger segments initially, and then run ft_preprocessing again with smaller segments. While you can set ft_preprocessing to apply multiple different filters in one go (like a low-pass, a high-pass, and a DFT-filter, for example), using a similar filter multiple times (like a high-pass filter at 4Hz, and another at 8Hz) is usually not required, or recommended. If you do multiple analyses on the same data (which, for example, require different filters) you could find it useful to create multiple smaller pipelines with their own ft_preprocessing. Debugging complex analyses can be a lot easier that way:) Hope this helps, Casper On Sat, Jun 22, 2013 at 1:34 PM, Nenad Polomac wrote: > Dear all, > > In my pipeline I need two times to filter data with ft_preprocessing. Is > it somehow possible to pad trials after segmentation? I need this in order > to avoid filter artifacts during the second filtering. > > Thank you in advance! > > Nenad > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > -------------- next part -------------- An HTML attachment was scrubbed... URL: From mbj0310 at gmail.com Mon Jun 24 06:27:47 2013 From: mbj0310 at gmail.com (Beom Jun Min) Date: Mon, 24 Jun 2013 13:27:47 +0900 Subject: [FieldTrip] Decreased baseline level after using ICA in ERP data Message-ID: Dear all, I have ERP data and now I am dealing with ICA to remove muscle and eye artifacts. However, I found that after ft_rejectcomponent, the baseline level of the segmented epoch decreased. (The baselinewindow is [-0.2 0].) The baseline level decreased even though I rejected only one component. My script is shown below. *%% Removing the Artifacts* *cfg = []; * *cfg.component = [ ]; % to be removed component(s)* *post_ICA_temp6 = ft_rejectcomponent(cfg, comp_detrand, data_raw);* * * *%% timelocking* * * *cfg = [];* *timelock_temp6 = ft_timelockanalysis(cfg, post_ICA_temp6);* * * *%% Plot* * * *figure;* *cfg = [];* *cfg.layout = lay;* *cfg.interactive = 'yes';* *cfg.channel = ['all', {'-EKG', '-EMG'}];* *ft_multiplotER(cfg, timelock_temp6)* Is there something that I missed? Thanks. BJ -- BeomJun Min, M.D. Department of Medical System Engineering (DMSE) Gwangju Institute of Science and Technology (GIST) 261 Cheomdan-gwagiro(Oryong-dong), Buk-gu, Gwangju 500-712, Republic of Korea (South) Phone: +82-62-715-3266 / Fax: +82-62-715-3244 E-mail: mbj0310 at gmail.com, http://bmssa.gist.ac.kr -------------- next part -------------- An HTML attachment was scrubbed... URL: From d.lozanosoldevilla at fcdonders.ru.nl Mon Jun 24 10:25:24 2013 From: d.lozanosoldevilla at fcdonders.ru.nl (Lozano Soldevilla, D. (Diego)) Date: Mon, 24 Jun 2013 10:25:24 +0200 (CEST) Subject: [FieldTrip] Decreased baseline level after using ICA in ERP data In-Reply-To: Message-ID: <831995030.1708865.1372062324986.JavaMail.root@sculptor.zimbra.ru.nl> Dear Beom Jun, I see multiple scenarios why this baseline activity decrease could happen. First of all, how the component you're rejecting look like (i.e. "blink component")? Do you see this activity decrease after the baseline period? The "quality" of the ICA decomposition, how well your artifact/component of interest has been isolated by algorithm in time (i.e. blink time courses) and space (marked frontal topography), will determine the activity that later on you'll reject/select. If your decomposition is not well suited, the rejection of a particular IC activity might have "extra" activity you don't want to reject (effect of interest), might be the algorithm is not able to isolate the components of interests (i.e. artifacts) or a combination of both. To evaluate the quality of your ICA decomposition you might have a look here ( http://www.ncbi.nlm.nih.gov/pubmed/19162199 ). Basically, the authors find that the ICA decomposition improves significantly " increased by removing the mean EEG at each channel for each epoch of data rather than the mean EEG in a prestimulus baseline" . In addition (see here: http://sccn.ucsd.edu/pipermail/eeglablist/2012/004925.html ), high-pass filtering above ~1hz improve the results. It's very important to feed ICA as much relevant data as you can use. The more the data, the better the decomposition. There's a rule of thumb that says that for a reliable IC decomposition 20 time points per channel 2 is needed (see here for a reference http://www.ncbi.nlm.nih.gov/pubmed/16904745 ) I hope that helps, Diego ----- Original Message ----- > From: "Beom Jun Min" > To: "FieldTrip discussion list" > Sent: Monday, 24 June, 2013 6:27:47 AM > Subject: [FieldTrip] Decreased baseline level after using ICA in ERP > data > Dear all, > I have ERP data and now I am dealing with ICA to remove muscle and eye > artifacts. > However, I found that after ft_rejectcomponent, the baseline level of > the segmented epoch decreased. (The baselinewindow is [-0.2 0].) > The baseline level decreased even though I rejected only one > component. > My script is shown below. > %% Removing the Artifacts > cfg = []; > cfg.component = [ ]; % to be removed component(s) > post_ICA_temp6 = ft_rejectcomponent(cfg, comp_detrand, data_raw); > %% timelocking > cfg = []; > timelock_temp6 = ft_timelockanalysis(cfg, post_ICA_temp6); > %% Plot > figure; > cfg = []; > cfg.layout = lay; > cfg.interactive = 'yes'; > cfg.channel = ['all', {'-EKG', '-EMG'}]; > ft_multiplotER(cfg, timelock_temp6) > Is there something that I missed? > Thanks. > BJ > -- > BeomJun Min, M.D. > Department of Medical System Engineering (DMSE) > Gwangju Institute of Science and Technology (GIST) > 261 Cheomdan-gwagiro(Oryong-dong), Buk-gu, Gwangju > 500-712, Republic of Korea (South) > Phone: +82-62-715-3266 / Fax: +82-62-715-3244 > E-mail: mbj0310 at gmail.com , http://bmssa.gist.ac.kr > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -- PhD Student Neuronal Oscillations Group Donders Institute for Brain, Cognition and Behaviour Centre for Cognitive Neuroimaging Radboud University Nijmegen NL-6525 EN Nijmegen The Netherlands http://www.ru.nl/people/donders/lozano-soldevilla-d/ -------------- next part -------------- An HTML attachment was scrubbed... URL: From jm.horschig at donders.ru.nl Mon Jun 24 10:43:11 2013 From: jm.horschig at donders.ru.nl (=?ISO-8859-1?Q?=22J=F6rn_M=2E_Horschig=22?=) Date: Mon, 24 Jun 2013 10:43:11 +0200 Subject: [FieldTrip] padding of segmented data In-Reply-To: References: Message-ID: <51C8069F.5070707@donders.ru.nl> Hi Nenad, what Casper said is not quite true. You can pad segmented trials, but you are limited in how to pad. There are different ways of padding, and what Casper was referring to is true data padding. Once you segmented your trials you cannot get back to your recorded data and attach more data to it. This is because filtering artifacts at edges etc would result in discontinuities and the like. However, there are other ways to achieve what you want. The most elegant way in my opinion is what Casper already suggested. Just for completeness, you can still pad using zero-padding (i.e. adding a bunch of 0s in the beginning and at the end of your trials). Other ways are mean-padding (pad with the mean value), or edge-padding (using the first/last value to padding). However, with all these methods you mostly also add a discontinuity, but you explicitly ask for that in this case :) The most elegant solution here might be to use mirror-padding, which is recently implemented. See here: http://fieldtrip.fcdonders.nl/reference/ft_preprocessing and here: http://fieldtrip.fcdonders.nl/reference/ft_preproc_padding Best, Jörn On 6/22/2013 2:32 PM, Casper van Heck wrote: > Dear Nenad, > > I think the option cfg.padding only works for that iteration of > ft_preprocessing, but what you can do, is select larger segments > initially, and then run ft_preprocessing again with smaller segments. > > While you can set ft_preprocessing to apply multiple different filters > in one go (like a low-pass, a high-pass, and a DFT-filter, for > example), using a similar filter multiple times (like a high-pass > filter at 4Hz, and another at 8Hz) is usually not required, or > recommended. If you do multiple analyses on the same data (which, for > example, require different filters) you could find it useful to create > multiple smaller pipelines with their own ft_preprocessing. Debugging > complex analyses can be a lot easier that way:) > > Hope this helps, > > Casper > > > On Sat, Jun 22, 2013 at 1:34 PM, Nenad Polomac > wrote: > > Dear all, > > In my pipeline I need two times to filter data with > ft_preprocessing. Is it somehow possible to pad trials > after segmentation? I need this in order to avoid filter artifacts > during the second filtering. > > Thank you in advance! > > Nenad > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -- Jörn M. Horschig PhD Student Donders Institute for Brain, Cognition and Behaviour Centre for Cognitive Neuroimaging Radboud University Nijmegen Neuronal Oscillations Group FieldTrip Development Team P.O. Box 9101 NL-6500 HB Nijmegen The Netherlands Contact: E-Mail: jm.horschig at donders.ru.nl Tel: +31-(0)24-36-68493 Web: http://www.ru.nl/donders Visiting address: Trigon, room 2.30 Kapittelweg 29 NL-6525 EN Nijmegen The Netherlands -------------- next part -------------- An HTML attachment was scrubbed... URL: From polomacnenad at gmail.com Mon Jun 24 11:02:18 2013 From: polomacnenad at gmail.com (Nenad Polomac) Date: Mon, 24 Jun 2013 11:02:18 +0200 Subject: [FieldTrip] padding of segmented data Message-ID: Hi Jörn and Casper, Thank you very for your answers I will use Jörns suggestion. I wasn't aware that you upgraded ft_preprocessing. All the best! Nenad On 24 June 2013 10:44, wrote: > Send fieldtrip mailing list submissions to > fieldtrip at science.ru.nl > > To subscribe or unsubscribe via the World Wide Web, visit > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > or, via email, send a message with subject or body 'help' to > fieldtrip-request at science.ru.nl > > You can reach the person managing the list at > fieldtrip-owner at science.ru.nl > > When replying, please edit your Subject line so it is more specific > than "Re: Contents of fieldtrip digest..." > > > Today's Topics: > > 1. Decreased baseline level after using ICA in ERP data > (Beom Jun Min) > 2. Re: Decreased baseline level after using ICA in ERP data > (Lozano Soldevilla, D. (Diego)) > 3. Re: padding of segmented data (J?rn M. Horschig) > > > ---------------------------------------------------------------------- > > Message: 1 > Date: Mon, 24 Jun 2013 13:27:47 +0900 > From: Beom Jun Min > To: FieldTrip discussion list > Subject: [FieldTrip] Decreased baseline level after using ICA in ERP > data > Message-ID: > < > CA+v9jvKJnKAfsQDwoDhNVSPAKCmpOpwut8vdmFXa1akp_1WDGA at mail.gmail.com> > Content-Type: text/plain; charset="iso-8859-1" > > Dear all, > > I have ERP data and now I am dealing with ICA to remove muscle and eye > artifacts. > However, I found that after ft_rejectcomponent, the baseline level of the > segmented epoch decreased. (The baselinewindow is [-0.2 0].) > The baseline level decreased even though I rejected only one component. > > My script is shown below. > > *%% Removing the Artifacts* > *cfg = []; > * > *cfg.component = [ ]; % to be removed component(s)* > *post_ICA_temp6 = ft_rejectcomponent(cfg, comp_detrand, data_raw);* > * > * > *%% timelocking* > * > * > *cfg = [];* > *timelock_temp6 = ft_timelockanalysis(cfg, post_ICA_temp6);* > * > * > *%% Plot* > * > * > *figure;* > *cfg = [];* > *cfg.layout = lay;* > *cfg.interactive = 'yes';* > *cfg.channel = ['all', {'-EKG', '-EMG'}];* > *ft_multiplotER(cfg, timelock_temp6)* > > Is there something that I missed? > > Thanks. > > BJ > > -- > BeomJun Min, M.D. > > Department of Medical System Engineering (DMSE) > Gwangju Institute of Science and Technology (GIST) > 261 Cheomdan-gwagiro(Oryong-dong), Buk-gu, Gwangju > 500-712, Republic of Korea (South) > Phone: +82-62-715-3266 / Fax: +82-62-715-3244 > E-mail: mbj0310 at gmail.com, http://bmssa.gist.ac.kr > -------------- next part -------------- > An HTML attachment was scrubbed... > URL: < > http://mailman.science.ru.nl/pipermail/fieldtrip/attachments/20130624/02dd2d57/attachment-0001.html > > > > ------------------------------ > > Message: 2 > Date: Mon, 24 Jun 2013 10:25:24 +0200 (CEST) > From: "Lozano Soldevilla, D. (Diego)" > > To: FieldTrip discussion list > Subject: Re: [FieldTrip] Decreased baseline level after using ICA in > ERP data > Message-ID: > < > 831995030.1708865.1372062324986.JavaMail.root at sculptor.zimbra.ru.nl> > Content-Type: text/plain; charset="utf-8" > > Dear Beom Jun, I see multiple scenarios why this baseline activity > decrease could happen. First of all, how the component you're rejecting > look like (i.e. "blink component")? Do you see this activity decrease after > the baseline period? The "quality" of the ICA decomposition, how well your > artifact/component of interest has been isolated by algorithm in time (i.e. > blink time courses) and space (marked frontal topography), will determine > the activity that later on you'll reject/select. If your decomposition is > not well suited, the rejection of a particular IC activity might have > "extra" activity you don't want to reject (effect of interest), might be > the algorithm is not able to isolate the components of interests (i.e. > artifacts) or a combination of both. To evaluate the quality of your ICA > decomposition you might have a look here ( > http://www.ncbi.nlm.nih.gov/pubmed/19162199 ). Basically, the authors > find that the ICA decomposition improves significantly " increased by > removing the mean EEG at each channel for each epoch of data rather than > the mean EEG in a prestimulus baseline" . In addition (see here: > http://sccn.ucsd.edu/pipermail/eeglablist/2012/004925.html ), high-pass > filtering above ~1hz improve the results. It's very important to feed ICA > as much relevant data as you can use. The more the data, the better the > decomposition. There's a rule of thumb that says that for a reliable IC > decomposition 20 time points per channel 2 is needed (see here for a > reference http://www.ncbi.nlm.nih.gov/pubmed/16904745 ) I hope that > helps, Diego ----- Original Message ----- > > From: "Beom Jun Min" > > To: "FieldTrip discussion list" > > Sent: Monday, 24 June, 2013 6:27:47 AM > > Subject: [FieldTrip] Decreased baseline level after using ICA in ERP > > data > > Dear all, > > I have ERP data and now I am dealing with ICA to remove muscle and eye > > artifacts. > > However, I found that after ft_rejectcomponent, the baseline level of > > the segmented epoch decreased. (The baselinewindow is [-0.2 0].) > > The baseline level decreased even though I rejected only one > > component. > > My script is shown below. > > %% Removing the Artifacts > > cfg = []; > > cfg.component = [ ]; % to be removed component(s) > > post_ICA_temp6 = ft_rejectcomponent(cfg, comp_detrand, data_raw); > > %% timelocking > > cfg = []; > > timelock_temp6 = ft_timelockanalysis(cfg, post_ICA_temp6); > > %% Plot > > figure; > > cfg = []; > > cfg.layout = lay; > > cfg.interactive = 'yes'; > > cfg.channel = ['all', {'-EKG', '-EMG'}]; > > ft_multiplotER(cfg, timelock_temp6) > > Is there something that I missed? > > Thanks. > > BJ > > -- > > BeomJun Min, M.D. > > Department of Medical System Engineering (DMSE) > > Gwangju Institute of Science and Technology (GIST) > > 261 Cheomdan-gwagiro(Oryong-dong), Buk-gu, Gwangju > > 500-712, Republic of Korea (South) > > Phone: +82-62-715-3266 / Fax: +82-62-715-3244 > > E-mail: mbj0310 at gmail.com , http://bmssa.gist.ac.kr > > _______________________________________________ > > fieldtrip mailing list > > fieldtrip at donders.ru.nl > > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > -- PhD Student Neuronal Oscillations Group Donders Institute for Brain, > Cognition and Behaviour Centre for Cognitive Neuroimaging Radboud > University Nijmegen NL-6525 EN Nijmegen The Netherlands > http://www.ru.nl/people/donders/lozano-soldevilla-d/ > -------------- next part -------------- > An HTML attachment was scrubbed... > URL: < > http://mailman.science.ru.nl/pipermail/fieldtrip/attachments/20130624/ea1393f7/attachment-0001.html > > > > ------------------------------ > > Message: 3 > Date: Mon, 24 Jun 2013 10:43:11 +0200 > From: "J?rn M. Horschig" > To: fieldtrip at science.ru.nl > Subject: Re: [FieldTrip] padding of segmented data > Message-ID: <51C8069F.5070707 at donders.ru.nl> > Content-Type: text/plain; charset="iso-8859-1"; Format="flowed" > > Hi Nenad, > > what Casper said is not quite true. You can pad segmented trials, but > you are limited in how to pad. There are different ways of padding, and > what Casper was referring to is true data padding. Once you segmented > your trials you cannot get back to your recorded data and attach more > data to it. This is because filtering artifacts at edges etc would > result in discontinuities and the like. However, there are other ways to > achieve what you want. The most elegant way in my opinion is what Casper > already suggested. Just for completeness, you can still pad using > zero-padding (i.e. adding a bunch of 0s in the beginning and at the end > of your trials). Other ways are mean-padding (pad with the mean value), > or edge-padding (using the first/last value to padding). However, with > all these methods you mostly also add a discontinuity, but you > explicitly ask for that in this case :) The most elegant solution here > might be to use mirror-padding, which is recently implemented. > See here: > http://fieldtrip.fcdonders.nl/reference/ft_preprocessing > and here: > http://fieldtrip.fcdonders.nl/reference/ft_preproc_padding > > Best, > J?rn > > On 6/22/2013 2:32 PM, Casper van Heck wrote: > > Dear Nenad, > > > > I think the option cfg.padding only works for that iteration of > > ft_preprocessing, but what you can do, is select larger segments > > initially, and then run ft_preprocessing again with smaller segments. > > > > While you can set ft_preprocessing to apply multiple different filters > > in one go (like a low-pass, a high-pass, and a DFT-filter, for > > example), using a similar filter multiple times (like a high-pass > > filter at 4Hz, and another at 8Hz) is usually not required, or > > recommended. If you do multiple analyses on the same data (which, for > > example, require different filters) you could find it useful to create > > multiple smaller pipelines with their own ft_preprocessing. Debugging > > complex analyses can be a lot easier that way:) > > > > Hope this helps, > > > > Casper > > > > > > On Sat, Jun 22, 2013 at 1:34 PM, Nenad Polomac > > wrote: > > > > Dear all, > > > > In my pipeline I need two times to filter data with > > ft_preprocessing. Is it somehow possible to pad trials > > after segmentation? I need this in order to avoid filter artifacts > > during the second filtering. > > > > Thank you in advance! > > > > Nenad > > > > _______________________________________________ > > fieldtrip mailing list > > fieldtrip at donders.ru.nl > > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > > > > > > > > > _______________________________________________ > > fieldtrip mailing list > > fieldtrip at donders.ru.nl > > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > > -- > J?rn M. Horschig > PhD Student > Donders Institute for Brain, Cognition and Behaviour > Centre for Cognitive Neuroimaging > Radboud University Nijmegen > Neuronal Oscillations Group > FieldTrip Development Team > > P.O. Box 9101 > NL-6500 HB Nijmegen > The Netherlands > > Contact: > E-Mail: jm.horschig at donders.ru.nl > Tel: +31-(0)24-36-68493 > Web: http://www.ru.nl/donders > > Visiting address: > Trigon, room 2.30 > Kapittelweg 29 > NL-6525 EN Nijmegen > The Netherlands > > -------------- next part -------------- > An HTML attachment was scrubbed... > URL: < > http://mailman.science.ru.nl/pipermail/fieldtrip/attachments/20130624/d7eb547a/attachment.html > > > > ------------------------------ > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > End of fieldtrip Digest, Vol 31, Issue 41 > ***************************************** > -------------- next part -------------- An HTML attachment was scrubbed... URL: From eelke.spaak at donders.ru.nl Mon Jun 24 11:31:35 2013 From: eelke.spaak at donders.ru.nl (Eelke Spaak) Date: Mon, 24 Jun 2013 11:31:35 +0200 Subject: [FieldTrip] statistics on non-event-related fields In-Reply-To: References: Message-ID: Dear Marco, The FieldTrip statistics routines support permutation of condition labels among units of observation. I guess in your data you don't really have 'units of observation', i.e. you have continuous data of one (or several) subjects. In that case I would recommend taking care of the statistics outside of FieldTrip, for instance by using a randomisation approach based on shifting time series of different channels by different, random, amounts. The coupling values obtained by these shifted time series can serve as a distribution under the null hypothesis of no coupling. The usual cluster machinery can then be applied (i.e. combining above-(nonparametric)threshold time-frequency-channel voxels into cluster candidates, compute cluster statistics per randomization, and compare the observed cluster statistic to the randomization distribution). You would also need to write this yourself, but it should not be very difficult. The mex-files bwlabel and spm_bwlabel (distributed with FieldTrip) are very useful; they give index labels to connected clusters in a binary matrix. Note, however, that there is an important caveat with the approach I describe here. The time shifting per channel also destroys the between-channel structure in your data that is due to electric volume conduction. So even if you find significant connectivity by this approach, although the connectivity would be 'real' in a sense, it still might not be meaningful if you do not account for this volume conduction. This is something to think about apart from the statistics. Hope this helps. Best, Eelke On 21 June 2013 14:26, Marco Porta wrote: > Dear Users and Eelke, > I have spontaneous LFP data recorded intracranially. I'm interested in > studying phase correlation between sensors and assess such correlation > within single subjects studies. Is it possible to study statistical > significance in such correlation study or should i implement my own > statistic? > Thanks, > > Marco > > > >> Dear Marco, >> >> What do you mean exactly with "non event-related fields"? I presume >> there is some structure in your data that you want to consider as the >> independent variable of interest, right? Some more information on what >> you want to do would help us to help you. >> >> Best, >> Eelke >> >> >> >> >> Dear Fieldtrip experts, >> I have a question regarding the statistics. How can I statistics on non >> event-related fields in a between-trials. >> Thanks, >> Marco > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip From nomeserio at gmail.com Mon Jun 24 14:43:06 2013 From: nomeserio at gmail.com (Michele Barsotti) Date: Mon, 24 Jun 2013 14:43:06 +0200 Subject: [FieldTrip] Loading Data into a fieldtrip structure Message-ID: Dear FieldTrip Users, I'm working with eeglab since 2 years and now I would like to use also fieldtrip. I've got many dataset in .mat format organized as [channels x dataframe]. For each dataset I've got the channel location in a .ced file format. Can anyone help me to import these dataset into a fieldtrip data structure? The channels (rows of the variable contained in the .mat file) are organized like that: 1- time 2:17 - eeg channels 18:end - possible triggers thank you in advance cheers -- -Michele- -------------- next part -------------- An HTML attachment was scrubbed... URL: From d.lozanosoldevilla at fcdonders.ru.nl Mon Jun 24 14:55:18 2013 From: d.lozanosoldevilla at fcdonders.ru.nl (Diego Lozano Soldevilla) Date: Mon, 24 Jun 2013 14:55:18 +0200 Subject: [FieldTrip] Loading Data into a fieldtrip structure In-Reply-To: References: Message-ID: Dear Michele, You might have a look to the following FAQ: http://fieldtrip.fcdonders.nl/faq/how_can_i_import_my_own_dataformat?s[]=import&s[]=data I'm not sure about the state of the art of the eeglab2fieldtrip.m function but it might help you out as well. To know more about the fieldtrip data type field structures you need to have to work in Fieldtrip, the ft_datatype* functions will be important for you, i.e.: ft_datatype_freq ft_datatype_raw ft_datatype_sens ft_datatype_timelock I hope that helps Diego On 24 June 2013 14:43, Michele Barsotti wrote: > Dear FieldTrip Users, > I'm working with eeglab since 2 years and now I would like to use also > fieldtrip. I've got many dataset in .mat format organized as [channels x > dataframe]. For each dataset I've got the channel location in a .ced file > format. > Can anyone help me to import these dataset into a fieldtrip data structure? > > The channels (rows of the variable contained in the .mat file) are > organized like that: > 1- time > 2:17 - eeg channels > 18:end - possible triggers > > thank you in advance > > cheers > > -- > -Michele- > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > -------------- next part -------------- An HTML attachment was scrubbed... URL: From david.schubring at uni-konstanz.de Mon Jun 24 16:34:46 2013 From: david.schubring at uni-konstanz.de (David Schubring) Date: Mon, 24 Jun 2013 16:34:46 +0200 Subject: [FieldTrip] Matlab 2012/2013 In-Reply-To: References: Message-ID: <51C85906.2090204@uni-konstanz.de> Dear FieldTrip Users, I was wondering if the incompatibility issues with fieldtrip and the latest MATLAB 2013a version still exist (and if so, which bugs exactly occur)? (Some of our Matlab 2012a/b installations stopped working, maybe due to the latest java-update, and only the 2013 version still works.) Thanks in advance and best regards, David Schubring From politzerahless at gmail.com Mon Jun 24 17:19:59 2013 From: politzerahless at gmail.com (Stephen Politzer-Ahles) Date: Mon, 24 Jun 2013 10:19:59 -0500 Subject: [FieldTrip] fieldtrip Digest, Vol 31, Issue 27 In-Reply-To: References: Message-ID: Hi everyone, I recently tried http://fieldtrip.fcdonders.nl/example/create_single-subject_grids_in_individual_head_space_that_are_all_aligned_in_mni_spaceand noticed some inconsistencies between the example code and the results; I updated the code on the wiki but I wanted to send a message to the list to double-check whether my changes are ok. Firstly, I had to add a call to ft_convert_units, because otherwise the vol was expressed in mm and the grid in cm, causing the grid to be much smaller than the volume conductor (see http://i.imgur.com/gzct9Dm.png). Is this change ok? The result I get is still not quite consistent with the examples shown on that page, though; in my result, the grid is a cube ( http://i.imgur.com/NSgCFpg.png), whereas in the example the grid is brain-shaped. I used the same Fieldtrip brain template and the same code from the example (except for the change above), so I'm not sure if the difference is due to different plot settings, a change in the Fieldtrip code since this example was made, or a change in the sample brain included in Fieldtrip since the example was made. Best, Steve On Thu, Jun 13, 2013 at 5:05 AM, wrote: > > Send fieldtrip mailing list submissions to > fieldtrip at science.ru.nl > > To subscribe or unsubscribe via the World Wide Web, visit > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > or, via email, send a message with subject or body 'help' to > fieldtrip-request at science.ru.nl > > You can reach the person managing the list at > fieldtrip-owner at science.ru.nl > > When replying, please edit your Subject line so it is more specific > than "Re: Contents of fieldtrip digest..." > > > Today's Topics: > > 1. Re: Source statistics on spatio-temporal source > reconstruction data (MNE) (Nicolai Mersebak) > > > ---------------------------------------------------------------------- > > Message: 1 > Date: Thu, 13 Jun 2013 12:04:34 +0200 > From: Nicolai Mersebak > To: FieldTrip discussion list > Subject: Re: [FieldTrip] Source statistics on spatio-temporal source > reconstruction data (MNE) > Message-ID: <6F3697BB-194F-422F-A1BF-EBBB132F805B at mersebak.dk> > Content-Type: text/plain; charset="iso-8859-1" > > Thanks to all of you for your comments and ideas - they are very helpful! > > I ( off course :) ) have some follow up questions. > > I have created an ERP structure for my MNE source, so the only think which I need and that is not straight forward is the neighbour structure. > > I am using the standard bem template (fieldtrip-20130124/template/headmodel/standard_bem.mat) as a head model and use the following code to get a grid for all subjects as I don't have any subject specific information regarding the anatomy. > > cfg = []; > cfg.grid.xgrid = -100:10:100; > cfg.grid.ygrid = -100:10:100; > cfg.grid.zgrid = -100:10:100; > cfg.grid.tight = 'yes'; > cfg.grid.unit = hdm.unit; % unit: mm > cfg.vol = hdm; > grid = ft_prepare_sourcemodel(cfg); > > > @Jan-Mathijs and Stephan: I guess making a subject specific grid based on a warped template requires anatomic information for each subject, e.g. a MRI image like this tutorial shows: > http://fieldtrip.fcdonders.nl/example/create_single-subject_grids_in_individual_head_space_that_are_all_aligned_in_mni_space?s%5B > > The final grid output in the tutorial - does it have this 3D grid which can be used as a neighbour structure ? > > I am not sure how to go from my cortical sheet [vertices x coordinates(x,y,z)] to a 3D grid, which I can use as a neighbour structure ? > > A second thing I would like to know is, if any of you have tried to use an atlas (e.g ALL template atlas) where the regions now are channels in the permutation test? Going from source points to atlas regions can be done through ft_sourcestatistics, but I am still interested in keeping the temporal dimension. The reason to use atlas regions instead of source points is to decrease the computation time. > > Best, > > Nicolai > > On Thu, Jun 13, 2013 at 5:05 AM, wrote: > Send fieldtrip mailing list submissions to > fieldtrip at science.ru.nl > > To subscribe or unsubscribe via the World Wide Web, visit > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > or, via email, send a message with subject or body 'help' to > fieldtrip-request at science.ru.nl > > You can reach the person managing the list at > fieldtrip-owner at science.ru.nl > > When replying, please edit your Subject line so it is more specific > than "Re: Contents of fieldtrip digest..." > > > Today's Topics: > > 1. Re: Source statistics on spatio-temporal source > reconstruction data (MNE) (Nicolai Mersebak) > > > ---------------------------------------------------------------------- > > Message: 1 > Date: Thu, 13 Jun 2013 12:04:34 +0200 > From: Nicolai Mersebak > To: FieldTrip discussion list > Subject: Re: [FieldTrip] Source statistics on spatio-temporal source > reconstruction data (MNE) > Message-ID: <6F3697BB-194F-422F-A1BF-EBBB132F805B at mersebak.dk> > Content-Type: text/plain; charset="iso-8859-1" > > Thanks to all of you for your comments and ideas - they are very helpful! > > I ( off course :) ) have some follow up questions. > > I have created an ERP structure for my MNE source, so the only think which > I need and that is not straight forward is the neighbour structure. > > I am using the standard bem template > (fieldtrip-20130124/template/headmodel/standard_bem.mat) as a head model > and use the following code to get a grid for all subjects as I don't have > any subject specific information regarding the anatomy. > > cfg = []; > cfg.grid.xgrid = -100:10:100; > cfg.grid.ygrid = -100:10:100; > cfg.grid.zgrid = -100:10:100; > cfg.grid.tight = 'yes'; > cfg.grid.unit = hdm.unit; % unit: mm > cfg.vol = hdm; > grid = ft_prepare_sourcemodel(cfg); > > > @Jan-Mathijs and Stephan: I guess making a subject specific grid based on > a warped template requires anatomic information for each subject, e.g. a > MRI image like this tutorial shows: > > http://fieldtrip.fcdonders.nl/example/create_single-subject_grids_in_individual_head_space_that_are_all_aligned_in_mni_space?s%5B > > The final grid output in the tutorial - does it have this 3D grid which > can be used as a neighbour structure ? > > I am not sure how to go from my cortical sheet [vertices x > coordinates(x,y,z)] to a 3D grid, which I can use as a neighbour structure ? > > A second thing I would like to know is, if any of you have tried to use an > atlas (e.g ALL template atlas) where the regions now are channels in the > permutation test? Going from source points to atlas regions can be done > through ft_sourcestatistics, but I am still interested in keeping the > temporal dimension. The reason to use atlas regions instead of source > points is to decrease the computation time. > > Best, > > Nicolai > > > Den 12/06/2013 kl. 18.58 skrev "smoratti at psi.ucm.es" >: > > > > > I think Jan.Mathijs alternative suggestion is quite attractive. With the > neighbors on a cortical sheet I also had the problems that sometimes the > vertices do not have the same distance and then clustering may be biased to > smaller or bigger clusters as the number of neighbors does not guarantee > same cluster sizes. With the interpolation onto a 3D grid, you won't have > that problem. > > > > best, > > > > Stephan > > > > > > ________________________________________________________ > > Stephan Moratti, PhD > > > > see also: http://web.me.com/smoratti/ > > > > Universidad Complutense de Madrid > > Facultad de Psicolog?a > > Departamento de Psicolog?a B?sica I > > Campus de Somosaguas > > 28223 Pozuelo de Alarc?n (Madrid) > > Spain > > > > and > > > > Center for Biomedical Technology > > Laboratory for Cognitive and Computational Neuroscience > > Parque Cient?fico y Tecnol?gico de la Universidad Politecnica de Madrid > > Campus Montegancedo > > 28223 Pozuelo de Alarc?n (Madrid) > > Spain > > > > > > email: smoratti at psi.ucm.es > > Tel.: +34 679219982 > > > > El 12/06/2013, a las 18:00, jan-mathijs schoffelen escribi?: > > > >> An alternative would be to interpolate the cortical sheet to a 3D grid > (where the grid is defined for each subject based on a warped template grid > defined in a standard space), and then do clustering using a regular 3D > spatial neighbourhood structure. The rationale being that two vertices on > the sheet may appear as disconnected (e.g. being on two sides of a sulcus) > whereas, given the poor spatial resolution, they belong to the same spatial > blob. > >> > >> Best, > >> Jan-Mathijs > >> > >> On Jun 12, 2013, at 5:44 PM, smoratti at psi.ucm.es wrote: > >> > >>> Dear Nicolai, > >>> > >>> Indeed I have used ft_timelockstatistics for minimum norm source data. > The trick is to put the source level data into a ERF structure. Determining > the neighbors of a source surface with vertices is not trivial. However I > used tess_vertconn.m from the BrainStorm toolbox to get the connectivity > matrix that tells you who is a neighbor. This you can feed into > timelockstats. > >>> > >>> Hope that helps, > >>> > >>> Stephan > >>> > >>> ________________________________________________________ > >>> Stephan Moratti, PhD > >>> > >>> see also: http://web.me.com/smoratti/ > >>> > >>> Universidad Complutense de Madrid > >>> Facultad de Psicolog?a > >>> Departamento de Psicolog?a B?sica I > >>> Campus de Somosaguas > >>> 28223 Pozuelo de Alarc?n (Madrid) > >>> Spain > >>> > >>> and > >>> > >>> Center for Biomedical Technology > >>> Laboratory for Cognitive and Computational Neuroscience > >>> Parque Cient?fico y Tecnol?gico de la Universidad Politecnica de Madrid > >>> Campus Montegancedo > >>> 28223 Pozuelo de Alarc?n (Madrid) > >>> Spain > >>> > >>> > >>> email: smoratti at psi.ucm.es > >>> Tel.: +34 679219982 > >>> > >>> El 12/06/2013, a las 15:44, Nicolai Mersebak escribi?: > >>> > >>>> Dear all, > >>>> > >>>> I have a question concerning the usage of ft_sourcegrandaverage and > ft_sourcestatistics. > >>>> > >>>> After using ft_sourceanalysis (method: MNE), I get spatio-temporal > source reconstructed data in source.avg.pow (4050 x 897): 4050 sources and > 897 time points. > >>>> > >>>> Now I would like to use the cluster-based permutation test on my > source reconstructed data. However it seems like ft_sourcegrandaverage and > ft_sourcestatistics don't support source level time courses. E.g when I am > using ft_sourcegrandaverage I am getting the following error: > >>>> > >>>> Error in ft_sourcegrandaverage (line 158) > >>>> dat(:,i) = tmp(:); > >>>> > >>>> Looking into the code: > >>>> > >>>> for i=1:Nsubject > >>>> tmp = getsubfield(varargin{i}, parameterselection(cfg.parameter, > varargin{i})); > >>>> dat(:,i) = tmp(:); > >>>> tmp = getsubfield(varargin{i}, 'inside'); > >>>> inside(tmp,i) = 1; > >>>> end > >>>> > >>>> I see that "tmp" are getting the structure [N_sources x timepoints] > from source.avg.pow for one subject, where "dat" requires the structure > [N_sources x 1]. > >>>> > >>>> I seached the mailing list for similar issues and found this thread: > >>>> > >>>> > http://mailman.science.ru.nl/pipermail/fieldtrip/2010-September/003122.html > >>>> > >>>> Since I am interested in using the temporal dimension in my > statistics, I would like to know if it is still not possible to use > spatio-temporal source reconstructed data in ft_sourcestatistics and > ft_sourcegrandaverage ? > >>>> > >>>> Or if any have succeeded in using the cluster-based permutation test > on source level also including the temporal dimension ? > >>>> > >>>> Alternative I was thinking that I might could use > ft_timelockstatistics, where I substituted the channels with sources, e.g > instead of having 64 channels, I would now have 4050 "channels". > >>>> If so I need to calculate a label structure and an appropriate > neighbor structure, which I guess is possible as I have all the 3D > coordinates for each source, e.g in leadfield.pos ? > >>>> I know this is a work around solution, but have anyone tried or have > any experience using such an approach ? > >>>> > >>>> Best, > >>>> > >>>> Nicolai > >>>> > >>>> _______________________________________________ > >>>> fieldtrip mailing list > >>>> fieldtrip at donders.ru.nl > >>>> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > >>> > >>> _______________________________________________ > >>> fieldtrip mailing list > >>> fieldtrip at donders.ru.nl > >>> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > >> > >> Jan-Mathijs Schoffelen, MD PhD > >> > >> Donders Institute for Brain, Cognition and Behaviour, > >> Centre for Cognitive Neuroimaging, > >> Radboud University Nijmegen, The Netherlands > >> > >> Max Planck Institute for Psycholinguistics, > >> Nijmegen, The Netherlands > >> > >> J.Schoffelen at donders.ru.nl > >> Telephone: +31-24-3614793 > >> > >> http://www.hettaligebrein.nl > >> > >> _______________________________________________ > >> fieldtrip mailing list > >> fieldtrip at donders.ru.nl > >> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > > > _______________________________________________ > > fieldtrip mailing list > > fieldtrip at donders.ru.nl > > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > -------------- next part -------------- > An HTML attachment was scrubbed... > URL: < > http://mailman.science.ru.nl/pipermail/fieldtrip/attachments/20130613/5974284f/attachment.html > > > > ------------------------------ > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > End of fieldtrip Digest, Vol 31, Issue 27 > ***************************************** > -- Stephen Politzer-Ahles University of Kansas Linguistics Department http://people.ku.edu/~sjpa/ -------------- next part -------------- An HTML attachment was scrubbed... URL: From a.stolk at fcdonders.ru.nl Mon Jun 24 20:11:26 2013 From: a.stolk at fcdonders.ru.nl (Stolk, A.) Date: Mon, 24 Jun 2013 20:11:26 +0200 (CEST) Subject: [FieldTrip] fieldtrip Digest, Vol 31, Issue 27 In-Reply-To: Message-ID: <331233946.1725662.1372097486678.JavaMail.root@sculptor.zimbra.ru.nl> Hi Steve, With respect to the cube vs. brain-shaped grid; this seems to be plotting-related? template_grid.inside in the snippet of code below selects only the grid points that have been determined as inside the brain, but with a negative inwardshift, hence it's also outside. ft_plot_mesh ( template_grid. pos ( template_grid. inside ,: ) ) ; % taken from the wiki Hopefully someone else has up-to-date knowledge to answer your question pertaining to the units (mm vs. cm) of the volume conductor and the source model. Best regards, Arjen ----- Oorspronkelijk bericht ----- > Van: "Stephen Politzer-Ahles" > Aan: fieldtrip at science.ru.nl > Verzonden: Maandag 24 juni 2013 17:19:59 > Onderwerp: Re: [FieldTrip] fieldtrip Digest, Vol 31, Issue 27 > Hi everyone, > I recently tried > http://fieldtrip.fcdonders.nl/example/create_single-subject_grids_in_individual_head_space_that_are_all_aligned_in_mni_space > and noticed some inconsistencies between the example code and the > results; I updated the code on the wiki but I wanted to send a message > to the list to double-check whether my changes are ok. Firstly, I had > to add a call to ft_convert_units, because otherwise the vol was > expressed in mm and the grid in cm, causing the grid to be much > smaller than the volume conductor (see http://i.imgur.com/gzct9Dm.png > ). Is this change ok? > The result I get is still not quite consistent with the examples shown > on that page, though; in my result, the grid is a cube ( > http://i.imgur.com/NSgCFpg.png ), whereas in the example the grid is > brain-shaped. I used the same Fieldtrip brain template and the same > code from the example (except for the change above), so I'm not sure > if the difference is due to different plot settings, a change in the > Fieldtrip code since this example was made, or a change in the sample > brain included in Fieldtrip since the example was made. > Best, > Steve > On Thu, Jun 13, 2013 at 5:05 AM, < fieldtrip-request at science.ru.nl > > wrote: > > > > Send fieldtrip mailing list submissions to > > fieldtrip at science.ru.nl > > > > To subscribe or unsubscribe via the World Wide Web, visit > > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > or, via email, send a message with subject or body 'help' to > > fieldtrip-request at science.ru.nl > > > > You can reach the person managing the list at > > fieldtrip-owner at science.ru.nl > > > > When replying, please edit your Subject line so it is more specific > > than "Re: Contents of fieldtrip digest..." > > > > > > Today's Topics: > > > > 1. Re: Source statistics on spatio-temporal source > > reconstruction data (MNE) (Nicolai Mersebak) > > > > > > ---------------------------------------------------------------------- > > > > Message: 1 > > Date: Thu, 13 Jun 2013 12:04:34 +0200 > > From: Nicolai Mersebak < nicolai at mersebak.dk > > > To: FieldTrip discussion list < fieldtrip at science.ru.nl > > > Subject: Re: [FieldTrip] Source statistics on spatio-temporal source > > reconstruction data (MNE) > > Message-ID: < 6F3697BB-194F-422F-A1BF-EBBB132F805B at mersebak.dk > > > Content-Type: text/plain; charset="iso-8859-1" > > > > Thanks to all of you for your comments and ideas - they are very > > helpful! > > > > I ( off course :) ) have some follow up questions. > > > > I have created an ERP structure for my MNE source, so the only think > > which I need and that is not straight forward is the neighbour > > structure. > > > > I am using the standard bem template > > (fieldtrip-20130124/template/headmodel/standard_bem.mat) as a head > > model and use the following code to get a grid for all subjects as I > > don't have any subject specific information regarding the anatomy. > > > > cfg = []; > > cfg.grid.xgrid = -100:10:100; > > cfg.grid.ygrid = -100:10:100; > > cfg.grid.zgrid = -100:10:100; > > cfg.grid.tight = 'yes'; > > cfg.grid.unit = hdm.unit; % unit: mm > > cfg.vol = hdm; > > grid = ft_prepare_sourcemodel(cfg); > > > > > > @Jan-Mathijs and Stephan: I guess making a subject specific grid > > based on a warped template requires anatomic information for each > > subject, e.g. a MRI image like this tutorial shows: > > http://fieldtrip.fcdonders.nl/example/create_single-subject_grids_in_individual_head_space_that_are_all_aligned_in_mni_space?s%5B > > > > The final grid output in the tutorial - does it have this 3D grid > > which can be used as a neighbour structure ? > > > > I am not sure how to go from my cortical sheet [vertices x > > coordinates(x,y,z)] to a 3D grid, which I can use as a neighbour > > structure ? > > > > A second thing I would like to know is, if any of you have tried to > > use an atlas (e.g ALL template atlas) where the regions now are > > channels in the permutation test? Going from source points to atlas > > regions can be done through ft_sourcestatistics, but I am still > > interested in keeping the temporal dimension. The reason to use > > atlas regions instead of source points is to decrease the > > computation time. > > > > Best, > > > > Nicolai > > > > > On Thu, Jun 13, 2013 at 5:05 AM, < fieldtrip-request at science.ru.nl > > wrote: > > Send fieldtrip mailing list submissions to > > fieldtrip at science.ru.nl > > To subscribe or unsubscribe via the World Wide Web, visit > > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > or, via email, send a message with subject or body 'help' to > > fieldtrip-request at science.ru.nl > > You can reach the person managing the list at > > fieldtrip-owner at science.ru.nl > > When replying, please edit your Subject line so it is more specific > > than "Re: Contents of fieldtrip digest..." > > Today's Topics: > > 1. Re: Source statistics on spatio-temporal source > > reconstruction data (MNE) (Nicolai Mersebak) > > ---------------------------------------------------------------------- > > Message: 1 > > Date: Thu, 13 Jun 2013 12:04:34 +0200 > > From: Nicolai Mersebak < nicolai at mersebak.dk > > > To: FieldTrip discussion list < fieldtrip at science.ru.nl > > > Subject: Re: [FieldTrip] Source statistics on spatio-temporal source > > reconstruction data (MNE) > > Message-ID: < 6F3697BB-194F-422F-A1BF-EBBB132F805B at mersebak.dk > > > Content-Type: text/plain; charset="iso-8859-1" > > Thanks to all of you for your comments and ideas - they are very > > helpful! > > I ( off course :) ) have some follow up questions. > > I have created an ERP structure for my MNE source, so the only think > > which I need and that is not straight forward is the neighbour > > structure. > > I am using the standard bem template > > (fieldtrip-20130124/template/headmodel/standard_bem.mat) as a head > > model and use the following code to get a grid for all subjects as I > > don't have any subject specific information regarding the anatomy. > > cfg = []; > > cfg.grid.xgrid = -100:10:100; > > cfg.grid.ygrid = -100:10:100; > > cfg.grid.zgrid = -100:10:100; > > cfg.grid.tight = 'yes'; > > cfg.grid.unit = hdm.unit; % unit: mm > > cfg.vol = hdm; > > grid = ft_prepare_sourcemodel(cfg); > > @Jan-Mathijs and Stephan: I guess making a subject specific grid > > based > > on a warped template requires anatomic information for each subject, > > e.g. a MRI image like this tutorial shows: > > http://fieldtrip.fcdonders.nl/example/create_single-subject_grids_in_individual_head_space_that_are_all_aligned_in_mni_space?s%5B > > The final grid output in the tutorial - does it have this 3D grid > > which can be used as a neighbour structure ? > > I am not sure how to go from my cortical sheet [vertices x > > coordinates(x,y,z)] to a 3D grid, which I can use as a neighbour > > structure ? > > A second thing I would like to know is, if any of you have tried to > > use an atlas (e.g ALL template atlas) where the regions now are > > channels in the permutation test? Going from source points to atlas > > regions can be done through ft_sourcestatistics, but I am still > > interested in keeping the temporal dimension. The reason to use > > atlas > > regions instead of source points is to decrease the computation > > time. > > Best, > > Nicolai > > Den 12/06/2013 kl. 18.58 skrev " smoratti at psi.ucm.es " < > > smoratti at psi.ucm.es >: > > > > > > I think Jan.Mathijs alternative suggestion is quite attractive. > > > With > > > the neighbors on a cortical sheet I also had the problems that > > > sometimes the vertices do not have the same distance and then > > > clustering may be biased to smaller or bigger clusters as the > > > number > > > of neighbors does not guarantee same cluster sizes. With the > > > interpolation onto a 3D grid, you won't have that problem. > > > > > > best, > > > > > > Stephan > > > > > > > > > ________________________________________________________ > > > Stephan Moratti, PhD > > > > > > see also: http://web.me.com/smoratti/ > > > > > > Universidad Complutense de Madrid > > > Facultad de Psicolog?a > > > Departamento de Psicolog?a B?sica I > > > Campus de Somosaguas > > > 28223 Pozuelo de Alarc?n (Madrid) > > > Spain > > > > > > and > > > > > > Center for Biomedical Technology > > > Laboratory for Cognitive and Computational Neuroscience > > > Parque Cient?fico y Tecnol?gico de la Universidad Politecnica de > > > Madrid > > > Campus Montegancedo > > > 28223 Pozuelo de Alarc?n (Madrid) > > > Spain > > > > > > > > > email: smoratti at psi.ucm.es > > > Tel.: +34 679219982 > > > > > > El 12/06/2013, a las 18:00, jan-mathijs schoffelen escribi?: > > > > > >> An alternative would be to interpolate the cortical sheet to a 3D > > >> grid (where the grid is defined for each subject based on a > > >> warped > > >> template grid defined in a standard space), and then do > > >> clustering > > >> using a regular 3D spatial neighbourhood structure. The rationale > > >> being that two vertices on the sheet may appear as disconnected > > >> (e.g. being on two sides of a sulcus) whereas, given the poor > > >> spatial resolution, they belong to the same spatial blob. > > >> > > >> Best, > > >> Jan-Mathijs > > >> > > >> On Jun 12, 2013, at 5:44 PM, smoratti at psi.ucm.es wrote: > > >> > > >>> Dear Nicolai, > > >>> > > >>> Indeed I have used ft_timelockstatistics for minimum norm source > > >>> data. The trick is to put the source level data into a ERF > > >>> structure. Determining the neighbors of a source surface with > > >>> vertices is not trivial. However I used tess_vertconn.m from the > > >>> BrainStorm toolbox to get the connectivity matrix that tells you > > >>> who is a neighbor. This you can feed into timelockstats. > > >>> > > >>> Hope that helps, > > >>> > > >>> Stephan > > >>> > > >>> ________________________________________________________ > > >>> Stephan Moratti, PhD > > >>> > > >>> see also: http://web.me.com/smoratti/ > > >>> > > >>> Universidad Complutense de Madrid > > >>> Facultad de Psicolog?a > > >>> Departamento de Psicolog?a B?sica I > > >>> Campus de Somosaguas > > >>> 28223 Pozuelo de Alarc?n (Madrid) > > >>> Spain > > >>> > > >>> and > > >>> > > >>> Center for Biomedical Technology > > >>> Laboratory for Cognitive and Computational Neuroscience > > >>> Parque Cient?fico y Tecnol?gico de la Universidad Politecnica de > > >>> Madrid > > >>> Campus Montegancedo > > >>> 28223 Pozuelo de Alarc?n (Madrid) > > >>> Spain > > >>> > > >>> > > >>> email: smoratti at psi.ucm.es > > >>> Tel.: +34 679219982 > > >>> > > >>> El 12/06/2013, a las 15:44, Nicolai Mersebak escribi?: > > >>> > > >>>> Dear all, > > >>>> > > >>>> I have a question concerning the usage of ft_sourcegrandaverage > > >>>> and ft_sourcestatistics. > > >>>> > > >>>> After using ft_sourceanalysis (method: MNE), I get > > >>>> spatio-temporal source reconstructed data in source.avg.pow > > >>>> (4050 > > >>>> x 897): 4050 sources and 897 time points. > > >>>> > > >>>> Now I would like to use the cluster-based permutation test on > > >>>> my > > >>>> source reconstructed data. However it seems like > > >>>> ft_sourcegrandaverage and ft_sourcestatistics don't support > > >>>> source level time courses. E.g when I am using > > >>>> ft_sourcegrandaverage I am getting the following error: > > >>>> > > >>>> Error in ft_sourcegrandaverage (line 158) > > >>>> dat(:,i) = tmp(:); > > >>>> > > >>>> Looking into the code: > > >>>> > > >>>> for i=1:Nsubject > > >>>> tmp = getsubfield(varargin{i}, > > >>>> parameterselection(cfg.parameter, > > >>>> varargin{i})); > > >>>> dat(:,i) = tmp(:); > > >>>> tmp = getsubfield(varargin{i}, 'inside'); > > >>>> inside(tmp,i) = 1; > > >>>> end > > >>>> > > >>>> I see that "tmp" are getting the structure [N_sources x > > >>>> timepoints] from source.avg.pow for one subject, where "dat" > > >>>> requires the structure [N_sources x 1]. > > >>>> > > >>>> I seached the mailing list for similar issues and found this > > >>>> thread: > > >>>> > > >>>> http://mailman.science.ru.nl/pipermail/fieldtrip/2010-September/003122.html > > >>>> > > >>>> Since I am interested in using the temporal dimension in my > > >>>> statistics, I would like to know if it is still not possible to > > >>>> use spatio-temporal source reconstructed data in > > >>>> ft_sourcestatistics and ft_sourcegrandaverage ? > > >>>> > > >>>> Or if any have succeeded in using the cluster-based permutation > > >>>> test on source level also including the temporal dimension ? > > >>>> > > >>>> Alternative I was thinking that I might could use > > >>>> ft_timelockstatistics, where I substituted the channels with > > >>>> sources, e.g instead of having 64 channels, I would now have > > >>>> 4050 > > >>>> "channels". > > >>>> If so I need to calculate a label structure and an appropriate > > >>>> neighbor structure, which I guess is possible as I have all the > > >>>> 3D coordinates for each source, e.g in leadfield.pos ? > > >>>> I know this is a work around solution, but have anyone tried or > > >>>> have any experience using such an approach ? > > >>>> > > >>>> Best, > > >>>> > > >>>> Nicolai > > >>>> > > >>>> _______________________________________________ > > >>>> fieldtrip mailing list > > >>>> fieldtrip at donders.ru.nl > > >>>> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > >>> > > >>> _______________________________________________ > > >>> fieldtrip mailing list > > >>> fieldtrip at donders.ru.nl > > >>> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > >> > > >> Jan-Mathijs Schoffelen, MD PhD > > >> > > >> Donders Institute for Brain, Cognition and Behaviour, > > >> Centre for Cognitive Neuroimaging, > > >> Radboud University Nijmegen, The Netherlands > > >> > > >> Max Planck Institute for Psycholinguistics, > > >> Nijmegen, The Netherlands > > >> > > >> J.Schoffelen at donders.ru.nl > > >> Telephone: +31-24-3614793 > > >> > > >> http://www.hettaligebrein.nl > > >> > > >> _______________________________________________ > > >> fieldtrip mailing list > > >> fieldtrip at donders.ru.nl > > >> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > > > > > _______________________________________________ > > > fieldtrip mailing list > > > fieldtrip at donders.ru.nl > > > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > -------------- next part -------------- > > An HTML attachment was scrubbed... > > URL: < > > http://mailman.science.ru.nl/pipermail/fieldtrip/attachments/20130613/5974284f/attachment.html > > > > > ------------------------------ > > _______________________________________________ > > fieldtrip mailing list > > fieldtrip at donders.ru.nl > > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > End of fieldtrip Digest, Vol 31, Issue 27 > > ***************************************** > -- > Stephen Politzer-Ahles > University of Kansas > Linguistics Department > http://people.ku.edu/~sjpa/ > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -------------- next part -------------- An HTML attachment was scrubbed... URL: From politzerahless at gmail.com Mon Jun 24 20:29:01 2013 From: politzerahless at gmail.com (Stephen Politzer-Ahles) Date: Mon, 24 Jun 2013 13:29:01 -0500 Subject: [FieldTrip] Source statistics on spatio-temporal source reconstruction data (MNE) Message-ID: Hi Arjen, Thanks, I also just tried that (after noticing that code in a later part of the example) and can confirm that that change makes the plot come out like the plot in the example. I updated the wiki accordingly. Best, Steve > Message: 1 > Date: Mon, 24 Jun 2013 20:11:26 +0200 (CEST) > From: "Stolk, A." > To: FieldTrip discussion list > Subject: Re: [FieldTrip] fieldtrip Digest, Vol 31, Issue 27 > Message-ID: > < 331233946.1725662.1372097486678.JavaMail.root at sculptor.zimbra.ru.nl> > Content-Type: text/plain; charset="utf-8" > > Hi Steve, With respect to the cube vs. brain-shaped grid; this seems to be plotting-related? template_grid.inside in the snippet of code below selects only the grid points that have been determined as inside the brain, but with a negative inwardshift, hence it's also outside. ft_plot_mesh ( template_grid. pos ( template_grid. inside ,: ) ) ; % taken from the wiki Hopefully someone else has up-to-date knowledge to answer your question pertaining to the units (mm vs. cm) of the volume conductor and the source model. Best regards, Arjen ----- Oorspronkelijk bericht ----- > > Van: "Stephen Politzer-Ahles" > > Aan: fieldtrip at science.ru.nl > > Verzonden: Maandag 24 juni 2013 17:19:59 > > Onderwerp: Re: [FieldTrip] fieldtrip Digest, Vol 31, Issue 27 > > Hi everyone, > > I recently tried > > http://fieldtrip.fcdonders.nl/example/create_single-subject_grids_in_individual_head_space_that_are_all_aligned_in_mni_space > > and noticed some inconsistencies between the example code and the > > results; I updated the code on the wiki but I wanted to send a message > > to the list to double-check whether my changes are ok. Firstly, I had > > to add a call to ft_convert_units, because otherwise the vol was > > expressed in mm and the grid in cm, causing the grid to be much > > smaller than the volume conductor (see http://i.imgur.com/gzct9Dm.png > > ). Is this change ok? > > The result I get is still not quite consistent with the examples shown > > on that page, though; in my result, the grid is a cube ( > > http://i.imgur.com/NSgCFpg.png ), whereas in the example the grid is > > brain-shaped. I used the same Fieldtrip brain template and the same > > code from the example (except for the change above), so I'm not sure > > if the difference is due to different plot settings, a change in the > > Fieldtrip code since this example was made, or a change in the sample > > brain included in Fieldtrip since the example was made. > > Best, > > Steve -------------- next part -------------- An HTML attachment was scrubbed... URL: From joramvandriel at gmail.com Tue Jun 25 09:17:27 2013 From: joramvandriel at gmail.com (Joram van Driel) Date: Tue, 25 Jun 2013 09:17:27 +0200 Subject: [FieldTrip] fieldtrip Digest, Vol 31, Issue 27 In-Reply-To: <331233946.1725662.1372097486678.JavaMail.root@sculptor.zimbra.ru.nl> References: <331233946.1725662.1372097486678.JavaMail.root@sculptor.zimbra.ru.nl> Message-ID: Hi Steve, I had the same problem a while ago. First of all, you need to take care of all the necessary ingredients to be in cm before computing the volume conduction model and the leadfield matrix, by using ft_convertunits. Second, I also first had a brain-shaped grid, which was not a plot-related problem; I noticed during the computation of the leadfield in the Matlab command lines that it estimated 0 dipoles outside, and x-number of dipoles inside the brain, which already made me suspicious. Check whether you get this as well, then you know it's not a plotting problem. In the end I managed to get a x inside and x outside number of dipoles, and I think the difference was that I first used ft_prepare_singleshell (which gave me the weird brain-shaped results with 0 dipoles outside), while I think you should use ft_prepare_headmodel with cfg.method='singleshell'. Maybe it doesn't matter at all, and the problem lies somewhere else, but for me it worked and I got a nice cube-shaped grid in the end. Hope this helps. Best, Joram On Mon, Jun 24, 2013 at 8:11 PM, Stolk, A. wrote: > Hi Steve, > > With respect to the cube vs. brain-shaped grid; this seems to be > plotting-related? template_grid.inside in the snippet of code below selects > only the grid points that have been determined as inside the brain, but > with a negative inwardshift, hence it's also outside. > > ft_plot_mesh(template_grid.pos(template_grid.inside,:)); % taken from the > wiki > > Hopefully someone else has up-to-date knowledge to answer your question > pertaining to the units (mm vs. cm) of the volume conductor and the source > model. > > Best regards, > Arjen > > ------------------------------ > > *Van: *"Stephen Politzer-Ahles" > *Aan: *fieldtrip at science.ru.nl > *Verzonden: *Maandag 24 juni 2013 17:19:59 > *Onderwerp: *Re: [FieldTrip] fieldtrip Digest, Vol 31, Issue 27 > > > Hi everyone, > > I recently tried > http://fieldtrip.fcdonders.nl/example/create_single-subject_grids_in_individual_head_space_that_are_all_aligned_in_mni_spaceand noticed some inconsistencies between the example code and the results; > I updated the code on the wiki but I wanted to send a message to the list > to double-check whether my changes are ok. Firstly, I had to add a call to > ft_convert_units, because otherwise the vol was expressed in mm and the > grid in cm, causing the grid to be much smaller than the volume conductor > (see http://i.imgur.com/gzct9Dm.png). Is this change ok? > > The result I get is still not quite consistent with the examples shown on > that page, though; in my result, the grid is a cube ( > http://i.imgur.com/NSgCFpg.png), whereas in the example the grid is > brain-shaped. I used the same Fieldtrip brain template and the same code > from the example (except for the change above), so I'm not sure if the > difference is due to different plot settings, a change in the Fieldtrip > code since this example was made, or a change in the sample brain included > in Fieldtrip since the example was made. > > Best, > Steve > > > On Thu, Jun 13, 2013 at 5:05 AM, wrote: > > > > Send fieldtrip mailing list submissions to > > fieldtrip at science.ru.nl > > > > To subscribe or unsubscribe via the World Wide Web, visit > > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > or, via email, send a message with subject or body 'help' to > > fieldtrip-request at science.ru.nl > > > > You can reach the person managing the list at > > fieldtrip-owner at science.ru.nl > > > > When replying, please edit your Subject line so it is more specific > > than "Re: Contents of fieldtrip digest..." > > > > > > Today's Topics: > > > > 1. Re: Source statistics on spatio-temporal source > > reconstruction data (MNE) (Nicolai Mersebak) > > > > > > ---------------------------------------------------------------------- > > > > Message: 1 > > Date: Thu, 13 Jun 2013 12:04:34 +0200 > > From: Nicolai Mersebak > > To: FieldTrip discussion list > > Subject: Re: [FieldTrip] Source statistics on spatio-temporal source > > reconstruction data (MNE) > > Message-ID: <6F3697BB-194F-422F-A1BF-EBBB132F805B at mersebak.dk> > > Content-Type: text/plain; charset="iso-8859-1" > > > > Thanks to all of you for your comments and ideas - they are very helpful! > > > > I ( off course :) ) have some follow up questions. > > > > I have created an ERP structure for my MNE source, so the only think > which I need and that is not straight forward is the neighbour structure. > > > > I am using the standard bem template > (fieldtrip-20130124/template/headmodel/standard_bem.mat) as a head model > and use the following code to get a grid for all subjects as I don't have > any subject specific information regarding the anatomy. > > > > cfg = []; > > cfg.grid.xgrid = -100:10:100; > > cfg.grid.ygrid = -100:10:100; > > cfg.grid.zgrid = -100:10:100; > > cfg.grid.tight = 'yes'; > > cfg.grid.unit = hdm.unit; % unit: mm > > cfg.vol = hdm; > > grid = ft_prepare_sourcemodel(cfg); > > > > > > @Jan-Mathijs and Stephan: I guess making a subject specific grid based > on a warped template requires anatomic information for each subject, e.g. a > MRI image like this tutorial shows: > > > http://fieldtrip.fcdonders.nl/example/create_single-subject_grids_in_individual_head_space_that_are_all_aligned_in_mni_space?s%5B > > > > The final grid output in the tutorial - does it have this 3D grid which > can be used as a neighbour structure ? > > > > I am not sure how to go from my cortical sheet [vertices x > coordinates(x,y,z)] to a 3D grid, which I can use as a neighbour structure ? > > > > A second thing I would like to know is, if any of you have tried to use > an atlas (e.g ALL template atlas) where the regions now are channels in the > permutation test? Going from source points to atlas regions can be done > through ft_sourcestatistics, but I am still interested in keeping the > temporal dimension. The reason to use atlas regions instead of source > points is to decrease the computation time. > > > > Best, > > > > Nicolai > > > > > > > On Thu, Jun 13, 2013 at 5:05 AM, wrote: > >> Send fieldtrip mailing list submissions to >> fieldtrip at science.ru.nl >> >> To subscribe or unsubscribe via the World Wide Web, visit >> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip >> or, via email, send a message with subject or body 'help' to >> fieldtrip-request at science.ru.nl >> >> You can reach the person managing the list at >> fieldtrip-owner at science.ru.nl >> >> When replying, please edit your Subject line so it is more specific >> than "Re: Contents of fieldtrip digest..." >> >> >> Today's Topics: >> >> 1. Re: Source statistics on spatio-temporal source >> reconstruction data (MNE) (Nicolai Mersebak) >> >> >> ---------------------------------------------------------------------- >> >> Message: 1 >> Date: Thu, 13 Jun 2013 12:04:34 +0200 >> From: Nicolai Mersebak >> To: FieldTrip discussion list >> Subject: Re: [FieldTrip] Source statistics on spatio-temporal source >> reconstruction data (MNE) >> Message-ID: <6F3697BB-194F-422F-A1BF-EBBB132F805B at mersebak.dk> >> Content-Type: text/plain; charset="iso-8859-1" >> >> Thanks to all of you for your comments and ideas - they are very helpful! >> >> I ( off course :) ) have some follow up questions. >> >> I have created an ERP structure for my MNE source, so the only think >> which I need and that is not straight forward is the neighbour structure. >> >> I am using the standard bem template >> (fieldtrip-20130124/template/headmodel/standard_bem.mat) as a head model >> and use the following code to get a grid for all subjects as I don't have >> any subject specific information regarding the anatomy. >> >> cfg = []; >> cfg.grid.xgrid = -100:10:100; >> cfg.grid.ygrid = -100:10:100; >> cfg.grid.zgrid = -100:10:100; >> cfg.grid.tight = 'yes'; >> cfg.grid.unit = hdm.unit; % unit: mm >> cfg.vol = hdm; >> grid = ft_prepare_sourcemodel(cfg); >> >> >> @Jan-Mathijs and Stephan: I guess making a subject specific grid based on >> a warped template requires anatomic information for each subject, e.g. a >> MRI image like this tutorial shows: >> >> http://fieldtrip.fcdonders.nl/example/create_single-subject_grids_in_individual_head_space_that_are_all_aligned_in_mni_space?s%5B >> >> The final grid output in the tutorial - does it have this 3D grid which >> can be used as a neighbour structure ? >> >> I am not sure how to go from my cortical sheet [vertices x >> coordinates(x,y,z)] to a 3D grid, which I can use as a neighbour structure ? >> >> A second thing I would like to know is, if any of you have tried to use >> an atlas (e.g ALL template atlas) where the regions now are channels in the >> permutation test? Going from source points to atlas regions can be done >> through ft_sourcestatistics, but I am still interested in keeping the >> temporal dimension. The reason to use atlas regions instead of source >> points is to decrease the computation time. >> >> Best, >> >> Nicolai >> >> >> Den 12/06/2013 kl. 18.58 skrev "smoratti at psi.ucm.es" > >: >> >> > >> > I think Jan.Mathijs alternative suggestion is quite attractive. With >> the neighbors on a cortical sheet I also had the problems that sometimes >> the vertices do not have the same distance and then clustering may be >> biased to smaller or bigger clusters as the number of neighbors does not >> guarantee same cluster sizes. With the interpolation onto a 3D grid, you >> won't have that problem. >> > >> > best, >> > >> > Stephan >> > >> > >> > ________________________________________________________ >> > Stephan Moratti, PhD >> > >> > see also: http://web.me.com/smoratti/ >> > >> > Universidad Complutense de Madrid >> > Facultad de Psicolog?a >> > Departamento de Psicolog?a B?sica I >> > Campus de Somosaguas >> > 28223 Pozuelo de Alarc?n (Madrid) >> > Spain >> > >> > and >> > >> > Center for Biomedical Technology >> > Laboratory for Cognitive and Computational Neuroscience >> > Parque Cient?fico y Tecnol?gico de la Universidad Politecnica de Madrid >> > Campus Montegancedo >> > 28223 Pozuelo de Alarc?n (Madrid) >> > Spain >> > >> > >> > email: smoratti at psi.ucm.es >> > Tel.: +34 679219982 >> > >> > El 12/06/2013, a las 18:00, jan-mathijs schoffelen escribi?: >> > >> >> An alternative would be to interpolate the cortical sheet to a 3D grid >> (where the grid is defined for each subject based on a warped template grid >> defined in a standard space), and then do clustering using a regular 3D >> spatial neighbourhood structure. The rationale being that two vertices on >> the sheet may appear as disconnected (e.g. being on two sides of a sulcus) >> whereas, given the poor spatial resolution, they belong to the same spatial >> blob. >> >> >> >> Best, >> >> Jan-Mathijs >> >> >> >> On Jun 12, 2013, at 5:44 PM, smoratti at psi.ucm.es wrote: >> >> >> >>> Dear Nicolai, >> >>> >> >>> Indeed I have used ft_timelockstatistics for minimum norm source >> data. The trick is to put the source level data into a ERF structure. >> Determining the neighbors of a source surface with vertices is not trivial. >> However I used tess_vertconn.m from the BrainStorm toolbox to get the >> connectivity matrix that tells you who is a neighbor. This you can feed >> into timelockstats. >> >>> >> >>> Hope that helps, >> >>> >> >>> Stephan >> >>> >> >>> ________________________________________________________ >> >>> Stephan Moratti, PhD >> >>> >> >>> see also: http://web.me.com/smoratti/ >> >>> >> >>> Universidad Complutense de Madrid >> >>> Facultad de Psicolog?a >> >>> Departamento de Psicolog?a B?sica I >> >>> Campus de Somosaguas >> >>> 28223 Pozuelo de Alarc?n (Madrid) >> >>> Spain >> >>> >> >>> and >> >>> >> >>> Center for Biomedical Technology >> >>> Laboratory for Cognitive and Computational Neuroscience >> >>> Parque Cient?fico y Tecnol?gico de la Universidad Politecnica de >> Madrid >> >>> Campus Montegancedo >> >>> 28223 Pozuelo de Alarc?n (Madrid) >> >>> Spain >> >>> >> >>> >> >>> email: smoratti at psi.ucm.es >> >>> Tel.: +34 679219982 >> >>> >> >>> El 12/06/2013, a las 15:44, Nicolai Mersebak escribi?: >> >>> >> >>>> Dear all, >> >>>> >> >>>> I have a question concerning the usage of ft_sourcegrandaverage and >> ft_sourcestatistics. >> >>>> >> >>>> After using ft_sourceanalysis (method: MNE), I get spatio-temporal >> source reconstructed data in source.avg.pow (4050 x 897): 4050 sources and >> 897 time points. >> >>>> >> >>>> Now I would like to use the cluster-based permutation test on my >> source reconstructed data. However it seems like ft_sourcegrandaverage and >> ft_sourcestatistics don't support source level time courses. E.g when I am >> using ft_sourcegrandaverage I am getting the following error: >> >>>> >> >>>> Error in ft_sourcegrandaverage (line 158) >> >>>> dat(:,i) = tmp(:); >> >>>> >> >>>> Looking into the code: >> >>>> >> >>>> for i=1:Nsubject >> >>>> tmp = getsubfield(varargin{i}, parameterselection(cfg.parameter, >> varargin{i})); >> >>>> dat(:,i) = tmp(:); >> >>>> tmp = getsubfield(varargin{i}, 'inside'); >> >>>> inside(tmp,i) = 1; >> >>>> end >> >>>> >> >>>> I see that "tmp" are getting the structure [N_sources x timepoints] >> from source.avg.pow for one subject, where "dat" requires the structure >> [N_sources x 1]. >> >>>> >> >>>> I seached the mailing list for similar issues and found this thread: >> >>>> >> >>>> >> http://mailman.science.ru.nl/pipermail/fieldtrip/2010-September/003122.html >> >>>> >> >>>> Since I am interested in using the temporal dimension in my >> statistics, I would like to know if it is still not possible to use >> spatio-temporal source reconstructed data in ft_sourcestatistics and >> ft_sourcegrandaverage ? >> >>>> >> >>>> Or if any have succeeded in using the cluster-based permutation test >> on source level also including the temporal dimension ? >> >>>> >> >>>> Alternative I was thinking that I might could use >> ft_timelockstatistics, where I substituted the channels with sources, e.g >> instead of having 64 channels, I would now have 4050 "channels". >> >>>> If so I need to calculate a label structure and an appropriate >> neighbor structure, which I guess is possible as I have all the 3D >> coordinates for each source, e.g in leadfield.pos ? >> >>>> I know this is a work around solution, but have anyone tried or have >> any experience using such an approach ? >> >>>> >> >>>> Best, >> >>>> >> >>>> Nicolai >> >>>> >> >>>> _______________________________________________ >> >>>> fieldtrip mailing list >> >>>> fieldtrip at donders.ru.nl >> >>>> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip >> >>> >> >>> _______________________________________________ >> >>> fieldtrip mailing list >> >>> fieldtrip at donders.ru.nl >> >>> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip >> >> >> >> Jan-Mathijs Schoffelen, MD PhD >> >> >> >> Donders Institute for Brain, Cognition and Behaviour, >> >> Centre for Cognitive Neuroimaging, >> >> Radboud University Nijmegen, The Netherlands >> >> >> >> Max Planck Institute for Psycholinguistics, >> >> Nijmegen, The Netherlands >> >> >> >> J.Schoffelen at donders.ru.nl >> >> Telephone: +31-24-3614793 >> >> >> >> http://www.hettaligebrein.nl >> >> >> >> _______________________________________________ >> >> fieldtrip mailing list >> >> fieldtrip at donders.ru.nl >> >> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip >> > >> > _______________________________________________ >> > fieldtrip mailing list >> > fieldtrip at donders.ru.nl >> > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip >> >> -------------- next part -------------- >> An HTML attachment was scrubbed... >> URL: < >> http://mailman.science.ru.nl/pipermail/fieldtrip/attachments/20130613/5974284f/attachment.html >> > >> >> ------------------------------ >> >> _______________________________________________ >> fieldtrip mailing list >> fieldtrip at donders.ru.nl >> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip >> >> End of fieldtrip Digest, Vol 31, Issue 27 >> ***************************************** >> > > > > -- > Stephen Politzer-Ahles > University of Kansas > Linguistics Department > http://people.ku.edu/~sjpa/ > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > -- Joram van Driel, MSc. PhD student at the University of Amsterdam Department of Psychology, Brain & Cognition -------------- next part -------------- An HTML attachment was scrubbed... URL: From mbj0310 at gmail.com Tue Jun 25 13:04:15 2013 From: mbj0310 at gmail.com (Beom Jun Min) Date: Tue, 25 Jun 2013 20:04:15 +0900 Subject: [FieldTrip] Decreased baseline level after using ICA in ERP data In-Reply-To: <831995030.1708865.1372062324986.JavaMail.root@sculptor.zimbra.ru.nl> References: <831995030.1708865.1372062324986.JavaMail.root@sculptor.zimbra.ru.nl> Message-ID: Dear Diego, Thank you for your kind answer. The importance of 'quality' you mentioned and the references that you attached could help me to understand the ICA algorithm further. And I have an additional question about preprocessing before ICA. Is detrending needed before the decomposition if there is a linear trend in the segmented data? Because I noticed one component showing linearly and consistently decreased (or increased) activity during one segment in some trials after ICA, I wondered why that happened. Apart from that, I found the possible cause of the past problem. It looks like the ft_rejectcomponent might remove the 'demean' effect. After I used the function without any component removing, (cfg.component = [];) the baseline level decreased again but the shape of the ERP does not change. However, I have not found the way to correct this decreased baseline yet. The ft_preprocessing with demean pre-stimulus does not work. Thanks. BJ 2013/6/24 Lozano Soldevilla, D. (Diego) > Dear Beom Jun, > > I see multiple scenarios why this baseline activity decrease could happen. > First of all, how the component you're rejecting look like (i.e. "blink > component")? Do you see this activity decrease after the baseline period? > > The "quality" of the ICA decomposition, how well your artifact/component > of interest has been isolated by algorithm in time (i.e. blink time > courses) and space (marked frontal topography), will determine the activity > that later on you'll reject/select. If your decomposition is not well > suited, the rejection of a particular IC activity might have "extra" > activity you don't want to reject (effect of interest), might be the > algorithm is not able to isolate the components of interests (i.e. > artifacts) or a combination of both. > > To evaluate the quality of your ICA decomposition you might have a look > here (http://www.ncbi.nlm.nih.gov/pubmed/19162199). Basically, the > authors find that the ICA decomposition improves significantly "increased > by removing the mean EEG at each channel for each epoch of data rather than > the mean EEG in a prestimulus baseline". In addition (see here: > http://sccn.ucsd.edu/pipermail/eeglablist/2012/004925.html), high-pass > filtering above ~1hz improve the results. > > It's very important to feed ICA as much relevant data as you can use. The > more the data, the better the decomposition. There's a rule of thumb that > says that for a reliable IC decomposition 20 time points per channel2 is > needed (see here for a reference > http://www.ncbi.nlm.nih.gov/pubmed/16904745) > > I hope that helps, > > Diego > ------------------------------ > > *From: *"Beom Jun Min" > *To: *"FieldTrip discussion list" > *Sent: *Monday, 24 June, 2013 6:27:47 AM > *Subject: *[FieldTrip] Decreased baseline level after using ICA in ERP > data > > > Dear all, > > I have ERP data and now I am dealing with ICA to remove muscle and eye > artifacts. > However, I found that after ft_rejectcomponent, the baseline level of the > segmented epoch decreased. (The baselinewindow is [-0.2 0].) > The baseline level decreased even though I rejected only one component. > > My script is shown below. > > *%% Removing the Artifacts* > *cfg = []; > * > *cfg.component = [ ]; % to be removed component(s)* > *post_ICA_temp6 = ft_rejectcomponent(cfg, comp_detrand, data_raw);* > * > * > *%% timelocking* > * > * > *cfg = [];* > *timelock_temp6 = ft_timelockanalysis(cfg, post_ICA_temp6);* > * > * > *%% Plot* > * > * > *figure;* > *cfg = [];* > *cfg.layout = lay;* > *cfg.interactive = 'yes';* > *cfg.channel = ['all', {'-EKG', '-EMG'}];* > *ft_multiplotER(cfg, timelock_temp6)* > > Is there something that I missed? > > Thanks. > > BJ > > -- > BeomJun Min, M.D. > > Department of Medical System Engineering (DMSE) > Gwangju Institute of Science and Technology (GIST) > 261 Cheomdan-gwagiro(Oryong-dong), Buk-gu, Gwangju > 500-712, Republic of Korea (South) > Phone: +82-62-715-3266 / Fax: +82-62-715-3244 > E-mail: mbj0310 at gmail.com, http://bmssa.gist.ac.kr > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > > > > -- > PhD Student > Neuronal Oscillations Group > Donders Institute for Brain, Cognition and Behaviour > Centre for Cognitive Neuroimaging > Radboud University Nijmegen > NL-6525 EN Nijmegen > The Netherlands > http://www.ru.nl/people/donders/lozano-soldevilla-d/ > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > -- BeomJun Min, M.D. Department of Medical System Engineering (DMSE) Gwangju Institute of Science and Technology (GIST) 261 Cheomdan-gwagiro(Oryong-dong), Buk-gu, Gwangju 500-712, Republic of Korea (South) Phone: +82-62-715-3266 / Fax: +82-62-715-3244 E-mail: mbj0310 at gmail.com, http://bmssa.gist.ac.kr -------------- next part -------------- An HTML attachment was scrubbed... URL: From mengtongxiao at gmail.com Tue Jun 25 15:29:41 2013 From: mengtongxiao at gmail.com (=?GB2312?B?s8LRqQ==?=) Date: Tue, 25 Jun 2013 21:29:41 +0800 Subject: [FieldTrip] source reconstruction data (MNE .fif) Message-ID: Dear all I have a .fif file and want to source reconstruction . I want use the template sourcemodel in fieldtrip,but I see there are two different coordinate system. Shold I convert the fif coordinate to template coordinate? thanks best, xiao -------------- next part -------------- An HTML attachment was scrubbed... URL: From m.chait at ucl.ac.uk Tue Jun 25 16:39:16 2013 From: m.chait at ucl.ac.uk (Chait, Maria) Date: Tue, 25 Jun 2013 14:39:16 +0000 Subject: [FieldTrip] PhD studentship at the UCL Ear Institute Message-ID: <3BA3DF582C0B7542AE0CB625F0119AB8378B0451@DB3PRD0111MB492.eurprd01.prod.exchangelabs.com> Please forward to anyone who might be interested. A 3 year PhD studentship in auditory cognitive neuroscience is available as part of a research collaboration between the UCL Ear Institute (London, UK) and NTT Communication Science Labs (Nippon Telegraph and Telephone corporation, Atsugi, Japan). The student will be based at the UCL Ear Institute and supervised by Dr. Maria Chait. They will also be working with Prof. Makio Kashino and Dr. Shigeto Furukawa (NTT). The project will use psychophysics, eye tracking, autonomic response measures and MEG functional brain imaging to investigate which features of sound are perceptually salient. Namely, those sounds that automatically capture attention in a busy scene, even when listeners' initial perceptual focus is elsewhere. The UCL Ear Institute provides state-of-the-art research facilities across a wide range of disciplines and is one of the foremost centres for hearing, speech and language-related research within Europe. Key Requirements The PhD start date would be September 2013. Applicants should have a UK/EU nationality and a 1St class, or upper 2nd degree in a relevant discipline (e.g. Psychology, Neuroscience, Engineering). The PhD work would require good programming skills (e.g. in Matlab). Previous experience with auditory research, functional brain imaging, signal processing and/or acoustics is desirable. For an informal discussion, or to submit an application please contact Dr. Maria Chait (m.chait at ucl.ac.uk). Applicants should submit a supporting statement, a CV, and the details of two academic referees. The closing date for receipt of applications is July 15th, 2013.The studentship includes fees and a yearly stipend (about £16000; tax free). Maria Chait PhD m.chait at ucl.ac.uk Senior Lecturer UCL Ear Institute 332 Gray's Inn Road London WC1X 8EE -------------- next part -------------- An HTML attachment was scrubbed... URL: From matt.craddock at uni-leipzig.de Tue Jun 25 17:17:43 2013 From: matt.craddock at uni-leipzig.de (Matt Craddock) Date: Tue, 25 Jun 2013 17:17:43 +0200 Subject: [FieldTrip] Decreased baseline level after using ICA in ERP data In-Reply-To: References: <831995030.1708865.1372062324986.JavaMail.root@sculptor.zimbra.ru.nl> Message-ID: <51C9B497.7080105@uni-leipzig.de> Dear Beom Jun, Regarding detrending - ICA works better with relatively stationary data, which is why high-pass filtering - as Diego mentioned - is often performed. Both detrending and high-pass filtering remove/attenuate slow fluctuations in the signal, so I'd suggest using one or the other procedure before running ICA if you think such low frequency activity is affecting your decompositions. Cheers, Matt On 25/06/2013 13:04, Beom Jun Min wrote: > Dear Diego, > > Thank you for your kind answer. > The importance of 'quality' you mentioned and the references that you > attached could help me to understand the ICA algorithm further. > And I have an additional question about preprocessing before ICA. Is > detrending needed before the decomposition if there is a linear trend in > the segmented data? > Because I noticed one component showing linearly and consistently > decreased (or increased) activity during one segment in some trials > after ICA, I wondered why that happened. > Apart from that, I found the possible cause of the past problem. It > looks like the ft_rejectcomponent might remove the 'demean' effect. > After I used the function without any component removing, (cfg.component > = [];) the baseline level decreased again but the shape of the ERP does > not change. > However, I have not found the way to correct this decreased baseline > yet. The ft_preprocessing with demean pre-stimulus does not work. > > Thanks. > > BJ -- Dr. Matt Craddock Post-doctoral researcher, Institute of Psychology, University of Leipzig, Neumarkt 9-19, 04109 Leipzig, Germany Phone: +49 341 973 95 44 From l.verhagen at fcdonders.ru.nl Wed Jun 26 11:33:36 2013 From: l.verhagen at fcdonders.ru.nl (Verhagen, L. (Lennart)) Date: Wed, 26 Jun 2013 11:33:36 +0200 (CEST) Subject: [FieldTrip] Brain Stimulation (TMS-tDCS-EEG) toolkit course at Donders, Nijmegen - registration is now open Message-ID: <1380b01ce7250$3bba7a70$b32f6f50$@verhagen@fcdonders.ru.nl> On September 2-4, 2013, we will host the “Toolkit of Cognitive Neuroscience: Transcranial Brain Stimulation” at the Donders Institute in Nijmegen. This intensive three-day toolkit course will provide in-depth knowledge on transcranial magnetic stimulation (TMS) and transcranial current stimulation (tDCS/tACS). The course will cover both basic and advanced topics, discussing online and offline approaches of quantification, interference, and modulation of neural activity. We will specifically address multimodal applications of non-invasive brain stimulation, with an emphasis on concurrent electroencephalography (EEG). The course involves a series of lectures and hands-on training of stimulation application, data acquisition and data analysis. These address fundamental paradigms, such as single-pulse TMS, repetitive TMS, tDCS and tACS, and advanced topics, such as paired-pulse TMS and concurrent TMS-tDCS-EEG. Keynote lectures will be given by Rogier Mars (Oxford), Jacinta O’Shea (Oxford), Alexander Sack (Maastricht), and Gregor Thut (Glasgow). Please see the program for more details. The participation fee is €150 for (PhD) students and €300 for more senior researchers. This includes coffee/tea, Dutch sandwich lunches, and social diner and drinks on Monday and Tuesday. Because of space limitations the number of participants in the hands-on sessions is limited to 30; please indicate your preference to join these additional sessions when registering. Location: Donders Institute for Brain, Cognition and Behaviour, Centre for Cognitive Neuroimaging, Kapittelweg 29, 6525 EN Nijmegen Organizers: Lennart Verhagen (l.verhagen at donders.ru.nl) Til Ole Bergmann (t.bergmann at donders.ru.nl) Registration: www.ru.nl/donders/course-information/2013courses/toolkit-cognitive-7 Best regards, Lennart Verhagen and Til Ole Bergmann -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: DondersTookit - BrainStim - program2013.pdf Type: application/pdf Size: 392475 bytes Desc: not available URL: From graham at peyton.co.za Wed Jun 26 12:13:58 2013 From: graham at peyton.co.za (Graham Peyton) Date: Wed, 26 Jun 2013 12:13:58 +0200 Subject: [FieldTrip] QSUB toolbox on a multi-core computer Message-ID: Dear FieldTrip community, I am trying to carry out an MEG analysis using the qsub distributed computing toolbox. I'm using a quad-core i7 computer, and was hoping that I'd be able to distribute the workload over all four cores. I have followed the tutorial below exactly: http://fieldtrip.fcdonders.nl/tutorial/distributedcomputing The problem I am having is this: I managed to run example 1 (with my own dataset), but I am finding that when I use qsubcellfun, the function ft_definetrial is executed *sequentially* (for each condition), *not* in * parallel*. Is there a way I can correct this, so as to parallelize the analysis? Or is the toolbox not designed for multi-core machines? Many thanks, Graham Peyton -------------- next part -------------- An HTML attachment was scrubbed... URL: From m.vandenieuwenhuijzen at fcdonders.ru.nl Wed Jun 26 15:07:02 2013 From: m.vandenieuwenhuijzen at fcdonders.ru.nl (Marieke van de Nieuwenhuijzen) Date: Wed, 26 Jun 2013 15:07:02 +0200 (CEST) Subject: [FieldTrip] ROI selection of beamformer grid points Message-ID: <1483937264.1423478.1372252022737.JavaMail.root@draco.zimbra.ru.nl> Dear Fieldtrippers, I am running my analyses on time courses reconstructed in source space. Basically, that means that my working dataset is a matrix of grid point x time. What I want to do now is do some analyses on a subset of that dataset, a bit analogous to selecting some sensors to restrict analyses to. Therefore, what I would ideally want to do, is select a subset of grid points corresponding to a specific location (for example only the occipital grid points, or only the grid points corresponding to a specific atlas label). Does anyone have any suggestions about how I should go about selecting specific grid points? Is there perhaps some grid based atlas, or is it possible to select grid points based on their corresponding mni coordinates which you get after running ft_sourceinterpolate and ft_volumenormalise (in other words, is it possible to reverse ft_volumenormalise and ft_sourceinterpolate to map the mni coordinates to the grid points instead of the grid points to mni representation). Any pointers would be much appreciated. Best, Marieke From jm.horschig at donders.ru.nl Wed Jun 26 15:26:41 2013 From: jm.horschig at donders.ru.nl (=?ISO-8859-1?Q?=22J=F6rn_M=2E_Horschig=22?=) Date: Wed, 26 Jun 2013 15:26:41 +0200 Subject: [FieldTrip] ROI selection of beamformer grid points In-Reply-To: <1483937264.1423478.1372252022737.JavaMail.root@draco.zimbra.ru.nl> References: <1483937264.1423478.1372252022737.JavaMail.root@draco.zimbra.ru.nl> Message-ID: <51CAEC11.10702@donders.ru.nl> Hi Marieke, I basically use two approaches (in the end, both failed, so any other hints are appreciated): (a) Select voxels purely based on anatomical labels, as found in an atlas or in literature. (b) Select voxels based on some local maxima or minima, e.g. power maximum or maximum difference of log-ratio (a) should be pretty straight forward. In essence it involves getting MNI coordinates, inversely warping your grids to MNI space, getting closest voxel. If you have your region of interest not in MNI coordinates you need to transform them. I found some tal2mni functions on the web for this, but note that this is just an estimate. Of course, (a) is also applicable if you have a localizer task using fMRI and want to focus on some localized voxels. (b) is a bit more tricky, because you might be faced with huge inter-subject variability. Best of course would be to have the subject-specific, fMRI localized voxel. What I done in the past is to define a rough region of interest, e.g. posterior neocortex (based on some quick&dirty coordinate thresholding), using ft_volumesmooth to apply a gaussian blur on single subject-activity and then select the voxel that suits me best (i.e. the one of maximum activity). Of course your ROI could also be based on the grand-average or what have you. I had the feeling that especially this latter approach (base ROI on GA +/- 3 cm, smooth individual subject data, select most sensitive voxel) worked quite well, but I cannot tell for sure, because in the end my results were not reliable enough. Oh and btw, if the question just aims on 'how' to select programming-wise: Match the coordinate with your template, store the index based on the template-grid and use this index on your subject-specific grid to get voxel of interest in subject-specific coordinates. Good luck! Best, Jörn On 6/26/2013 3:07 PM, Marieke van de Nieuwenhuijzen wrote: > Dear Fieldtrippers, > > I am running my analyses on time courses reconstructed in source space. Basically, that means that my working dataset is a matrix of grid point x time. What I want to do now is do some analyses on a subset of that dataset, a bit analogous to selecting some sensors to restrict analyses to. Therefore, what I would ideally want to do, is select a subset of grid points corresponding to a specific location (for example only the occipital grid points, or only the grid points corresponding to a specific atlas label). > > Does anyone have any suggestions about how I should go about selecting specific grid points? Is there perhaps some grid based atlas, or is it possible to select grid points based on their corresponding mni coordinates which you get after running ft_sourceinterpolate and ft_volumenormalise (in other words, is it possible to reverse ft_volumenormalise and ft_sourceinterpolate to map the mni coordinates to the grid points instead of the grid points to mni representation). > > Any pointers would be much appreciated. > > Best, > Marieke > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -- Jörn M. Horschig PhD Student Donders Institute for Brain, Cognition and Behaviour Centre for Cognitive Neuroimaging Radboud University Nijmegen Neuronal Oscillations Group FieldTrip Development Team P.O. Box 9101 NL-6500 HB Nijmegen The Netherlands Contact: E-Mail: jm.horschig at donders.ru.nl Tel: +31-(0)24-36-68493 Web: http://www.ru.nl/donders Visiting address: Trigon, room 2.30 Kapittelweg 29 NL-6525 EN Nijmegen The Netherlands From andmib at gmail.com Wed Jun 26 19:22:33 2013 From: andmib at gmail.com (Andrew Brooks) Date: Wed, 26 Jun 2013 13:22:33 -0400 Subject: [FieldTrip] Siemens GUI Streamer Disconnecting Message-ID: Hello all, I have a protocol that includes three separate sequences. I start the Siemens GUI streamer prior to the first sequence, and keep it open through all three sequences. Only on the last sequence do I run ft_omri_pipeline_nuisance. I've been running into a problem where the Siemens GUI streamer disconnects as soon as the the third sequence starts running (and the ft_omri_pipeline script is waiting for data). I have to manually click 'connect' as soon as it disconnects, and then it works fine. Any ideas as to why the streamer would disconnect like this? Thanks! Andrew -------------- next part -------------- An HTML attachment was scrubbed... URL: From j.herring at fcdonders.ru.nl Thu Jun 27 12:45:53 2013 From: j.herring at fcdonders.ru.nl (Herring, J.D. (Jim)) Date: Thu, 27 Jun 2013 12:45:53 +0200 (CEST) Subject: [FieldTrip] QSUB toolbox on a multi-core computer In-Reply-To: References: Message-ID: <004701ce7323$7fa9ff20$7efdfd60$@herring@fcdonders.ru.nl> Dear Graham, As stated in the tutorial the distributed computing functions are intended to distribute workload over different computers running a Torque or SGE batch system: "This tutorial covered how to distribute your computations/workload over multiple computers in a cluster that uses the Torque or SGE batch queue system". However, what you could do is make use of Matlab's parallel processing tools. Matlab allows you to open a pool of so-called 'workers' to distribute processing jobs to allowing you to run multiple processes in parallel. Please see http://www.mathworks.nl/help/distcomp/matlabpool.html and http://www.mathworks.nl/help/matlab/ref/parfor.html. Once you've opened a pool of workers using 'matlabpool', you can use 'parfor' in the same way as you would use 'for' to create a loop that runs all processes in parallel over all four cores. Best, Jim From: fieldtrip-bounces at science.ru.nl [mailto:fieldtrip-bounces at science.ru.nl] On Behalf Of Graham Peyton Sent: woensdag 26 juni 2013 12:14 To: fieldtrip at science.ru.nl Subject: [FieldTrip] QSUB toolbox on a multi-core computer Dear FieldTrip community, I am trying to carry out an MEG analysis using the qsub distributed computing toolbox. I'm using a quad-core i7 computer, and was hoping that I'd be able to distribute the workload over all four cores. I have followed the tutorial below exactly: http://fieldtrip.fcdonders.nl/tutorial/distributedcomputing The problem I am having is this: I managed to run example 1 (with my own dataset), but I am finding that when I use qsubcellfun, the function ft_definetrial is executed sequentially (for each condition), not in parallel. Is there a way I can correct this, so as to parallelize the analysis? Or is the toolbox not designed for multi-core machines? Many thanks, Graham Peyton -------------- next part -------------- An HTML attachment was scrubbed... URL: From ana.hincapie at gmail.com Fri Jun 28 09:31:24 2013 From: ana.hincapie at gmail.com (=?ISO-8859-1?Q?Ana_Sof=EDa_Hincapi=E9_Casas?=) Date: Fri, 28 Jun 2013 09:31:24 +0200 Subject: [FieldTrip] In the forward problem, how are the points for the grid.inside and grid.outside defined? Message-ID: Hi, I´am new in FieldTrip and I would like to what are the grid.inside and grid.outside points and if I could used the whole grid to calculate the leadfields. Thanks in advance for the help you could bring me. Regards, -- Ana Hincapié -------------- next part -------------- An HTML attachment was scrubbed... URL: From jm.horschig at donders.ru.nl Fri Jun 28 10:42:03 2013 From: jm.horschig at donders.ru.nl (=?ISO-8859-1?Q?=22J=F6rn_M=2E_Horschig=22?=) Date: Fri, 28 Jun 2013 10:42:03 +0200 Subject: [FieldTrip] In the forward problem, how are the points for the grid.inside and grid.outside defined? In-Reply-To: References: Message-ID: <51CD4C5B.5030909@donders.ru.nl> Hi Ana, inside and outside just describe whether the grid point is inside or outside the brain. You can plot this to see for yourself: % plot only what is inside the brain figure; ft_plot_vol(vol, 'edgecolor', 'none'); alpha 0.4; ft_plot_mesh(grid.pos(grid.inside,:)); % plot the whole grid figure; ft_plot_vol(vol, 'edgecolor', 'none'); alpha 0.4; ft_plot_mesh(grid.pos(:,:)); FieldTrip will use that information automatically to only use grid points inside the brain, so yes, you can use the whole grid to compute the leadfield matrix. If you do not want that, you can modify grid.inside and grid.outside yourself. Have fun fieldtrippin' :) Jörn On 6/28/2013 9:31 AM, Ana Sofía Hincapié Casas wrote: > Hi, > > I´am new in FieldTrip and I would like to what are the grid.inside and > grid.outside points and if I could used the whole grid to calculate > the leadfields. > > Thanks in advance for the help you could bring me. > > Regards, > > -- > Ana Hincapié > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -- Jörn M. Horschig PhD Student Donders Institute for Brain, Cognition and Behaviour Centre for Cognitive Neuroimaging Radboud University Nijmegen Neuronal Oscillations Group FieldTrip Development Team P.O. Box 9101 NL-6500 HB Nijmegen The Netherlands Contact: E-Mail: jm.horschig at donders.ru.nl Tel: +31-(0)24-36-68493 Web: http://www.ru.nl/donders Visiting address: Trigon, room 2.30 Kapittelweg 29 NL-6525 EN Nijmegen The Netherlands -------------- next part -------------- An HTML attachment was scrubbed... URL: From ggonesc at upo.es Fri Jun 28 18:28:57 2013 From: ggonesc at upo.es (Gabriel Gonzalez Escamilla) Date: Fri, 28 Jun 2013 18:28:57 +0200 Subject: [FieldTrip] problem appending data Message-ID: <2350c7b9464ea50a.51cdd5e9@upo.es> Dear Fieldtrip experts, I'm working with restin-state EEG data, I'm looking for performing EEG coherence analysis between my normal EEG channels and a channel from the same subject but aquired with a different name I did: data = ft_appenddata([], dataEEG_allchans, dataEEG_1chan) and it did concatenate the one single channel at the end of the dataEEG_allchans, so now I have a matrix with Nchans+1, that looks perfect to me, then I did perform fourier transformations with a hanning window, and workded perfectly, but if I set cfg.method='coh' cfg.complex='imag' cfg.channelcbm={'all', 'ref-P7'} icohe=ft_connectovityanalysis(cfg,) I always get the following error: ???? attempted to access siz(4); index out of bounds because numel(siz=3) Error in ==> ft_checkdata>fixcsd at 798 I have also tried something like: cfg.channelcbm={{1x40cell}, 'ref-P7'} where {1x40 cell} is a cell matrix containing the names of all my sensors but it didn't worked. Any help will be appreciated Many thanks in advanced, Gabriel -------------- next part -------------- An HTML attachment was scrubbed... URL: From manuel.mercier at einstein.yu.edu Fri Jun 28 22:43:54 2013 From: manuel.mercier at einstein.yu.edu (Manuel Mercier) Date: Fri, 28 Jun 2013 20:43:54 +0000 Subject: [FieldTrip] PLV formula Message-ID: Dear Fieldtripers Sometime ago I wrote for myself a function that was computing PLV and some related non parametric statistics. (Phase Locking Value as define as the mean across trials of the phase angle difference recorded at two loci ; based on Lachaux et al., 1999, HBM). I implemented PLV in matlab using the following formula: plv = squeeze(abs(mean(exp(1i*(angle(data.fourierspctrm(:,cmb(1),:,:)) ... -angle(data.fourierspctrm(:,cmb(2),:,:)))),1))); with cmb(1) and cmb(2) being the indices of the electrodes of interest (between which PLV is computed). I compared my results with the ft_connectivityanalysis function from Fieldtrip and the results were exactly the same. So far so good. But I recently went back to my code, and I was a little bit confused. Since I was dealing with angles, I though that the best way to do the subtraction should be done in the complex plane Like: plv = squeeze(abs(mean(exp(1i*(angle(exp(1i*(angle(data.fourierspctrm(:,cmb(1),:,:)))) ... - exp(1i*(angle(data.fourierspctrm(:,cmb(2),:,:))))))),1))); (for instance if the two angles: pi/2 and -pi/2 the direct subtraction will give pi, whereas in the complex plan it will be pi/2 - with the norm x2). The result I got with this code is obviously different from the previous one, and what I got from Fieldtrip. I went back to the archive of the mailing list but didn't find a clear answer to my point. Does anyone can enlighten me ? Thanks ! Manuel -------------- next part -------------- An HTML attachment was scrubbed... URL: From ebrahimi_nia at yahoo.com Sat Jun 1 06:52:43 2013 From: ebrahimi_nia at yahoo.com (Fatemeh Ebrahimi nia) Date: Fri, 31 May 2013 21:52:43 -0700 (PDT) Subject: [FieldTrip] loreta2fieldtrip function error In-Reply-To: <1370015815.5183.YahooMailNeo@web122402.mail.ne1.yahoo.com> References: <1369934092.15336.YahooMailNeo@web122405.mail.ne1.yahoo.com> <51A78CC1.6030906@berkeley.edu> <1370015815.5183.YahooMailNeo@web122402.mail.ne1.yahoo.com> Message-ID: <1370062363.83888.YahooMailNeo@web122406.mail.ne1.yahoo.com> Hi Dear all, Can any one give me information about the output structure of "loreta2fieldtrip" function (What do the matrixes refer to?) or advise a reference to study about that please?  Best, Fatemeh ________________________________ From: Ingrid Nieuwenhuis To: fieldtrip at science.ru.nl Sent: Thursday, May 30, 2013 10:30 AM Subject: Re: [FieldTrip] loreta2fieldtrip function error Hi Fatemeh, I had the same error recently when I did the same. I filed the bug, see http://bugzilla.fcdonders.nl/show_bug.cgi?id=2144 I did create a work around. In the LORETA program, you can export the source data as a text file. You can read that text file in with loreta2fieldtrip.m. It's a bit of a patch, but it worked for me. Hope this helps, Ingrid On 5/30/2013 10:14 AM, Fatemeh Ebrahimi nia wrote: Hi dear all, > > >I am analyzing EEG data. I have computed sLORETA (.slor) from ERP data. Now I want to read and convert LORETA source reconstruction into a >MATLAB data structure using "loreta2fieldtrip" function, But I have gotten the bellow error. > > >**** Error using fread > >Invalid precision. >Error in loreta2fieldtrip (line 85) >activity = fread(fid, [voxnumber Ntime], 'float = >single'); *** > > >Can someone give me a help? > > > >Best regards, >Fatemeh > > > > >_______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -- Ingrid Nieuwenhuis PhD Postdoctoral Fellow Sleep and Neuroimaging Laboratory Department of Psychology University of California, Berkeley California 94720-1650 Tolman Hall, room 5305 _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -------------- next part -------------- An HTML attachment was scrubbed... URL: From politzerahless at gmail.com Sat Jun 1 20:44:04 2013 From: politzerahless at gmail.com (Stephen Politzer-Ahles) Date: Sat, 1 Jun 2013 13:44:04 -0500 Subject: [FieldTrip] Question about minimum norm estimate pipeline Message-ID: Hi Arjen, Thanks for your message. I did align the mri to Talairach; as you can see from http://i.imgur.com/26nyHYZ.png, the volume conduction model and sourcespace are both expressed in the same coordinate system (i.e., everything's pointing in the same direction) but they're just not sitting on top of one another. If anyone has any ideas on where that problem was introduced (or how to re-align them now), I would greatly appreciate it. Below I have some more details about how I processed that data, if it helps. I'm trying to go through the data one step at a time and track where the problem might have happened. When I compare the sourcespace before having applied any transformation (i.e., the headshape from -oct-6-src.fif) to the original mri (orig-nomask.mgz), they look ok (I don't know how to plot them together, but see http://i.imgur.com/LGW7YnJ.png and http://i.imgur.com/JUoTxc9.png -- things at least look like they're on more or less the same plane). Then I re-register the mri to CTF ( http://fieldtrip.fcdonders.nl/tutorial/minimumnormestimate#source_modelco-registration_of_the_source_space_to_the_sensor-based_head_coordinate_system); after that, in mri_nom_ctf, the axes are all going in the right direction but the whole head is tilted forward and the origin of the axes is no longer at the anterior commisure (see http://i.imgur.com/CTZNOTk.png for the realigned MRI). Applying the transformation matrix T to the sourcespace also seems to tilt it like that (http://i.imgur.com/bcNIpf3.png), although as can be seen from the first image in this message it doesn't quite line up with the volume conduction model in the end. As for the volume conduction model, here is what it looks like at first ( http://i.imgur.com/ZX3m38b.png) and here is what it looks like after applying the transformation matrix (http://i.imgur.com/vXa3Cnc.png). Obviously the transformation matrix is doing something, but it's not getting the sourcespace and volume conduction model lined up; since it's the same transformation matrix, all I can guess is that there was some pre-existing difference between the source mesh (the .fif file) and the anatomical mri (orig-nomask.mgz), but I'm not sure when that came in. Another minor issue: when I first compared the volume conduction model and the sourcespace, they were expressed in different units even though I followed the code in the tutorial. See http://i.imgur.com/orwgcTJ.png: the sourcespace looks 10x smaller than the volume conduction model, which I assume is because it is expressed in cm whereas the volume conduction model is expressed in mm. To get the figure linked at the very beginning of this message, I had to convert the units of the volume conduction model to cm, even though that's not in the tutorial. I notice that the tutorial on the wiki hasn't been edited since October 2012 (other than a few edits I made this month which were just correcting typos in the prose). Is it possible that what's on the wiki is out of date? (Also cc'ing Lilla on this.) Thanks, Steve > Message: 1 > Date: Fri, 31 May 2013 08:11:23 +0200 (CEST) > From: "Stolk, A." > To: FieldTrip discussion list > Subject: Re: [FieldTrip] Question about minimum norm estimate pipeline > Message-ID: > < 1914237354.1292588.1369980683984.JavaMail.root at sculptor.zimbra.ru.nl> > Content-Type: text/plain; charset="utf-8" > > Hi Steve, A quick guess; did you correctly align your resliced mri to Talairach space by indicating the commissures ( http://imaging.mrc-cbu.cam.ac.uk/imaging/FindingCommissures ) and, if I'm correct, a point in the same place, e.g. between the hemispheres? This should update the transformation matrix. Best regards, Arjen ----- Oorspronkelijk bericht ----- > > Van: "Stephen Politzer-Ahles" > > Aan: fieldtrip at science.ru.nl > > Verzonden: Vrijdag 31 mei 2013 05:53:45 > > Onderwerp: [FieldTrip] Question about minimum norm estimate pipeline > > Hello all, > > I have not yet gotten a response to my question below, but in the > > meantime I have another question about the minimum norm estimate > > workflow--specifically, about the coordinate system for the > > skull-stripped anatomy in the step described at > > http://fieldtrip.fcdonders.nl/tutorial/minimumnormestimate#preprocessing_of_the_anatomical_mrisave_to_disk > > . I'm confused by the following bit of code: > > % ensure that the skull-stripped anatomy is expressed in the same > > coordinate system as the anatomy > > seg.transform = mri_tal.transform; > > In my data, mri_tal.coordsys is 'spm' (I presume this is the result of > > re-aligning to Talairach in the previous step?) whereas seg.coordsys > > is 'ctf' (as a result of re-aligning to CTF several steps earlier). > > (But mri_tal also has a field mri_tal.transformorig, which seg does > > not have.) So should I really be using the same transform for both, as > > shown in the tutorial? > > Apologies if this question is pretty basic; I'm just trying to > > pinpoint where the mis-alignment described in my message below > > occurred, so I want to make sure I understand each step of the > > workflow correctly > > Best, > > Steve > > > Message: 1 > > > Date: Sat, 25 May 2013 08:11:18 -0500 > > > From: Stephen Politzer-Ahles < politzerahless at gmail.com > > > > To: fieldtrip at donders.ru.nl > > > Subject: [FieldTrip] Sourcespace and volume conductor misaligned > > > Message-ID: > > > > > > > > > Content-Type: text/plain; charset="utf-8" > > > > > > Hello all, > > > > > > I am going through the workflow at > > > http://fieldtrip.fcdonders.nl/tutorial/minimumnormestimate . After > > > making > > > the volume conduction model using ft_prepare_headmodel(), I noticed > > > that > > > although the volume conduction model and sourcespace have the same > > > orientation and overall size/shape (after I converted the volume > > > conduction > > > model to cm, which wasn't in the tutorial but my original model came > > > out in > > > mm), they don't quite line up, as you can see in this figure: > > > > > > http://i.imgur.com/mGEtLOa.png > > > > > > I did interactively re-align the data to CTF (twice--in step 2 of > > > "Preprocessing of the anatomical MRI" and in step 4 of "Source > > > model") > > > using fiducials, and to Talairach (step 5 of "Preprocessing of the > > > anatomical data"), so I'm not sure how it ended up this way. The > > > code I've > > > used at each step is basically the same as that in the tutorial. > > > > > > Is there any way to line up my volume conduction model and > > > sourcespace now, > > > without going back and re-running most of the workflow? > > > > > > Best, > > > Steve > > > > > > -- > > > Stephen Politzer-Ahles > > > University of Kansas > > > Linguistics Department > > > http://people.ku.edu/~sjpa/ > > On Sat, May 25, 2013 at 1:56 PM, < fieldtrip-request at science.ru.nl > > > wrote: > > > > > > Send fieldtrip mailing list submissions to > > > fieldtrip at science.ru.nl > > > > > > To subscribe or unsubscribe via the World Wide Web, visit > > > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > > or, via email, send a message with subject or body 'help' to > > > fieldtrip-request at science.ru.nl > > > > > > You can reach the person managing the list at > > > fieldtrip-owner at science.ru.nl > > > > > > When replying, please edit your Subject line so it is more specific > > > than "Re: Contents of fieldtrip digest..." > > > > > > > > > Today's Topics: > > > > > > 1. Sourcespace and volume conductor misaligned > > > (Stephen Politzer-Ahles) > > > 2. Re: fieldtrip Digest, Vol 30, Issue 31 (Johanna Zumer) > > > > > > > > > ---------------------------------------------------------------------- > > > > > > Message: 1 > > > Date: Sat, 25 May 2013 08:11:18 -0500 > > > From: Stephen Politzer-Ahles < politzerahless at gmail.com > > > > To: fieldtrip at donders.ru.nl > > > Subject: [FieldTrip] Sourcespace and volume conductor misaligned > > > Message-ID: > > > > > > > > > Content-Type: text/plain; charset="utf-8" > > > > > > Hello all, > > > > > > I am going through the workflow at > > > http://fieldtrip.fcdonders.nl/tutorial/minimumnormestimate . After > > > making > > > the volume conduction model using ft_prepare_headmodel(), I noticed > > > that > > > although the volume conduction model and sourcespace have the same > > > orientation and overall size/shape (after I converted the volume > > > conduction > > > model to cm, which wasn't in the tutorial but my original model came > > > out in > > > mm), they don't quite line up, as you can see in this figure: > > > > > > http://i.imgur.com/mGEtLOa.png > > > > > > I did interactively re-align the data to CTF (twice--in step 2 of > > > "Preprocessing of the anatomical MRI" and in step 4 of "Source > > > model") > > > using fiducials, and to Talairach (step 5 of "Preprocessing of the > > > anatomical data"), so I'm not sure how it ended up this way. The > > > code I've > > > used at each step is basically the same as that in the tutorial. > > > > > > Is there any way to line up my volume conduction model and > > > sourcespace now, > > > without going back and re-running most of the workflow? > > > > > > Best, > > > Steve > > > > > > -- > > > Stephen Politzer-Ahles > > > University of Kansas > > > Linguistics Department > > > http://people.ku.edu/~sjpa/ -------------- next part -------------- An HTML attachment was scrubbed... URL: From Lilla.Magyari at mpi.nl Sat Jun 1 23:22:34 2013 From: Lilla.Magyari at mpi.nl (Lilla.Magyari at mpi.nl) Date: Sat, 1 Jun 2013 23:22:34 +0200 (CEST) Subject: [FieldTrip] Question about minimum norm estimate pipeline In-Reply-To: References: Message-ID: <2765.87.78.47.204.1370121754.squirrel@87.78.47.204> hi Steve, yes, it is possible that the tutorial is slightly out of the date. I can look at your problem and the tutorial around the end of the next week. Thanks a lot for the detailed email! Lilla > Hi Arjen, > > Thanks for your message. I did align the mri to Talairach; as you can see > from http://i.imgur.com/26nyHYZ.png, the volume conduction model and > sourcespace are both expressed in the same coordinate system (i.e., > everything's pointing in the same direction) but they're just not sitting > on top of one another. If anyone has any ideas on where that problem was > introduced (or how to re-align them now), I would greatly appreciate it. > Below I have some more details about how I processed that data, if it > helps. > > I'm trying to go through the data one step at a time and track where the > problem might have happened. When I compare the sourcespace before having > applied any transformation (i.e., the headshape from > -oct-6-src.fif) to the original mri (orig-nomask.mgz), they look > ok (I don't know how to plot them together, but see > http://i.imgur.com/LGW7YnJ.png and http://i.imgur.com/JUoTxc9.png -- > things > at least look like they're on more or less the same plane). Then I > re-register the mri to CTF ( > http://fieldtrip.fcdonders.nl/tutorial/minimumnormestimate#source_modelco-registration_of_the_source_space_to_the_sensor-based_head_coordinate_system); > after that, in mri_nom_ctf, the axes are all going in the right direction > but the whole head is tilted forward and the origin of the axes is no > longer at the anterior commisure (see http://i.imgur.com/CTZNOTk.png for > the realigned MRI). Applying the transformation matrix T to the > sourcespace also seems to tilt it like that > (http://i.imgur.com/bcNIpf3.png), > although as can be seen from the first image in this message it doesn't > quite line up with the volume conduction model in the end. As for the > volume conduction model, here is what it looks like at first ( > http://i.imgur.com/ZX3m38b.png) and here is what it looks like after > applying the transformation matrix (http://i.imgur.com/vXa3Cnc.png). > Obviously the transformation matrix is doing something, but it's not > getting the sourcespace and volume conduction model lined up; since it's > the same transformation matrix, all I can guess is that there was some > pre-existing difference between the source mesh (the .fif file) and the > anatomical mri (orig-nomask.mgz), but I'm not sure when that came in. > > Another minor issue: when I first compared the volume conduction model and > the sourcespace, they were expressed in different units even though I > followed the code in the tutorial. See http://i.imgur.com/orwgcTJ.png: the > sourcespace looks 10x smaller than the volume conduction model, which I > assume is because it is expressed in cm whereas the volume conduction > model > is expressed in mm. To get the figure linked at the very beginning of this > message, I had to convert the units of the volume conduction model to cm, > even though that's not in the tutorial. > > I notice that the tutorial on the wiki hasn't been edited since October > 2012 (other than a few edits I made this month which were just correcting > typos in the prose). Is it possible that what's on the wiki is out of > date? > (Also cc'ing Lilla on this.) > > Thanks, > Steve > > > >> Message: 1 >> Date: Fri, 31 May 2013 08:11:23 +0200 (CEST) >> From: "Stolk, A." >> To: FieldTrip discussion list >> Subject: Re: [FieldTrip] Question about minimum norm estimate pipeline >> Message-ID: >> < > 1914237354.1292588.1369980683984.JavaMail.root at sculptor.zimbra.ru.nl> >> Content-Type: text/plain; charset="utf-8" >> >> Hi Steve, A quick guess; did you correctly align your resliced mri to > Talairach space by indicating the commissures ( > http://imaging.mrc-cbu.cam.ac.uk/imaging/FindingCommissures ) and, if I'm > correct, a point in the same place, e.g. between the hemispheres? This > should update the transformation matrix. Best regards, Arjen ----- > Oorspronkelijk bericht ----- >> > Van: "Stephen Politzer-Ahles" >> > Aan: fieldtrip at science.ru.nl >> > Verzonden: Vrijdag 31 mei 2013 05:53:45 >> > Onderwerp: [FieldTrip] Question about minimum norm estimate pipeline >> > Hello all, >> > I have not yet gotten a response to my question below, but in the >> > meantime I have another question about the minimum norm estimate >> > workflow--specifically, about the coordinate system for the >> > skull-stripped anatomy in the step described at >> > > http://fieldtrip.fcdonders.nl/tutorial/minimumnormestimate#preprocessing_of_the_anatomical_mrisave_to_disk >> > . I'm confused by the following bit of code: >> > % ensure that the skull-stripped anatomy is expressed in the same >> > coordinate system as the anatomy >> > seg.transform = mri_tal.transform; >> > In my data, mri_tal.coordsys is 'spm' (I presume this is the result of >> > re-aligning to Talairach in the previous step?) whereas seg.coordsys >> > is 'ctf' (as a result of re-aligning to CTF several steps earlier). >> > (But mri_tal also has a field mri_tal.transformorig, which seg does >> > not have.) So should I really be using the same transform for both, as >> > shown in the tutorial? >> > Apologies if this question is pretty basic; I'm just trying to >> > pinpoint where the mis-alignment described in my message below >> > occurred, so I want to make sure I understand each step of the >> > workflow correctly >> > Best, >> > Steve >> > > Message: 1 >> > > Date: Sat, 25 May 2013 08:11:18 -0500 >> > > From: Stephen Politzer-Ahles < politzerahless at gmail.com > >> > > To: fieldtrip at donders.ru.nl >> > > Subject: [FieldTrip] Sourcespace and volume conductor misaligned >> > > Message-ID: >> > > > > > > >> > > Content-Type: text/plain; charset="utf-8" >> > > >> > > Hello all, >> > > >> > > I am going through the workflow at >> > > http://fieldtrip.fcdonders.nl/tutorial/minimumnormestimate . After >> > > making >> > > the volume conduction model using ft_prepare_headmodel(), I noticed >> > > that >> > > although the volume conduction model and sourcespace have the same >> > > orientation and overall size/shape (after I converted the volume >> > > conduction >> > > model to cm, which wasn't in the tutorial but my original model came >> > > out in >> > > mm), they don't quite line up, as you can see in this figure: >> > > >> > > http://i.imgur.com/mGEtLOa.png >> > > >> > > I did interactively re-align the data to CTF (twice--in step 2 of >> > > "Preprocessing of the anatomical MRI" and in step 4 of "Source >> > > model") >> > > using fiducials, and to Talairach (step 5 of "Preprocessing of the >> > > anatomical data"), so I'm not sure how it ended up this way. The >> > > code I've >> > > used at each step is basically the same as that in the tutorial. >> > > >> > > Is there any way to line up my volume conduction model and >> > > sourcespace now, >> > > without going back and re-running most of the workflow? >> > > >> > > Best, >> > > Steve >> > > >> > > -- >> > > Stephen Politzer-Ahles >> > > University of Kansas >> > > Linguistics Department >> > > http://people.ku.edu/~sjpa/ >> > On Sat, May 25, 2013 at 1:56 PM, < fieldtrip-request at science.ru.nl > >> > wrote: >> > > >> > > Send fieldtrip mailing list submissions to >> > > fieldtrip at science.ru.nl >> > > >> > > To subscribe or unsubscribe via the World Wide Web, visit >> > > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip >> > > or, via email, send a message with subject or body 'help' to >> > > fieldtrip-request at science.ru.nl >> > > >> > > You can reach the person managing the list at >> > > fieldtrip-owner at science.ru.nl >> > > >> > > When replying, please edit your Subject line so it is more specific >> > > than "Re: Contents of fieldtrip digest..." >> > > >> > > >> > > Today's Topics: >> > > >> > > 1. Sourcespace and volume conductor misaligned >> > > (Stephen Politzer-Ahles) >> > > 2. Re: fieldtrip Digest, Vol 30, Issue 31 (Johanna Zumer) >> > > >> > > >> > > ---------------------------------------------------------------------- >> > > >> > > Message: 1 >> > > Date: Sat, 25 May 2013 08:11:18 -0500 >> > > From: Stephen Politzer-Ahles < politzerahless at gmail.com > >> > > To: fieldtrip at donders.ru.nl >> > > Subject: [FieldTrip] Sourcespace and volume conductor misaligned >> > > Message-ID: >> > > > > > > >> > > Content-Type: text/plain; charset="utf-8" >> > > >> > > Hello all, >> > > >> > > I am going through the workflow at >> > > http://fieldtrip.fcdonders.nl/tutorial/minimumnormestimate . After >> > > making >> > > the volume conduction model using ft_prepare_headmodel(), I noticed >> > > that >> > > although the volume conduction model and sourcespace have the same >> > > orientation and overall size/shape (after I converted the volume >> > > conduction >> > > model to cm, which wasn't in the tutorial but my original model came >> > > out in >> > > mm), they don't quite line up, as you can see in this figure: >> > > >> > > http://i.imgur.com/mGEtLOa.png >> > > >> > > I did interactively re-align the data to CTF (twice--in step 2 of >> > > "Preprocessing of the anatomical MRI" and in step 4 of "Source >> > > model") >> > > using fiducials, and to Talairach (step 5 of "Preprocessing of the >> > > anatomical data"), so I'm not sure how it ended up this way. The >> > > code I've >> > > used at each step is basically the same as that in the tutorial. >> > > >> > > Is there any way to line up my volume conduction model and >> > > sourcespace now, >> > > without going back and re-running most of the workflow? >> > > >> > > Best, >> > > Steve >> > > >> > > -- >> > > Stephen Politzer-Ahles >> > > University of Kansas >> > > Linguistics Department >> > > http://people.ku.edu/~sjpa/ > From frank.ye.mei at gmail.com Sun Jun 2 03:58:29 2013 From: frank.ye.mei at gmail.com (Frank Mei) Date: Sat, 1 Jun 2013 21:58:29 -0400 Subject: [FieldTrip] error when using ctf2grad (Lozano Soldevilla, D. (Diego)) Message-ID: Hello Diego, Thank you for the reply. I was using fieldtrip20120822. I found the bug in the fieldtrip20120822 file -ft_read_header.m. In line 446 of the file: ------- if any(~cellfun(@isempty,strfind(coeftype, 'G1AR'))) ------- should be: ------- if any(~cellfun(@isempty,strfind(coeftype, 'G3AR'))) ------- The bug is corrected in the latest version of fieldtrip, and it runs correctly now. Now, grad.balance has 'G1BR','G2BR','G3BR''G3AR' in it. The ctf sytem I use is ctf151. Regards, Ye -------------- next part -------------- An HTML attachment was scrubbed... URL: From vitoria.piai at gmail.com Sun Jun 2 11:17:25 2013 From: vitoria.piai at gmail.com (=?ISO-8859-1?Q?Vit=F3ria_Magalh=E3es_Piai?=) Date: Sun, 02 Jun 2013 11:17:25 +0200 Subject: [FieldTrip] how to use ft_stratify? Message-ID: <51AB0DA5.10805@gmail.com> Hi all, I'm trying to use ft_stratify for the first time, but (it could be just me) I don't find the help info helpful enough :) What I want to achieve in the end is TFRs of two conditions for which the histogram of the reaction time over trials for each condition is matched. If I understood ft_stratify correctly (and I doubt that), I could use this function to select the trials for each condition such that the histograms of the RTs match. Then knowing which trials to keep, I run ft_freqanalysis on those specifically. So question number 1, is that how I should proceed? 'Cause as far as I can tell, ft_stratify will not take a whole raw data structure: The help says "each input is a Nchan X Nobs matrix". So I have to go for the RTs then. Assuming my approach is correct (ft_stratify on RTs of two conditions, then move on with only those trials), I've made a matrix Nchan x N_trials for each condition. % input1 = 265 sensors x 95 RT_trials; % input2 = 265 sensors x 100 RT_trials; cfgst = []; cfgst.method = 'histogram'; cfgst.equalbinavg = 'no'; cfgst.numbin = 4; cfgst.numiter = 2000; % default [output,bin] = ft_stratify(cfgst, input1, input2); I then get an error in line 127: linearhisto = zeros(ncond, cfg.numbin.^nchan); ??? Error using ==> zeros Maximum variable size allowed by the program is exceeded. Apparently, zeros(2, 4^265) is something matlab doesn't want to calculate! Am I doing something wrong here? Has anyone worked with this function before (with such a number of sensors)? Any help is greatly appreciated! Cheers, Vitória From a.stolk at fcdonders.ru.nl Sun Jun 2 11:46:03 2013 From: a.stolk at fcdonders.ru.nl (Stolk, A.) Date: Sun, 2 Jun 2013 11:46:03 +0200 (CEST) Subject: [FieldTrip] how to use ft_stratify? In-Reply-To: <51AB0DA5.10805@gmail.com> Message-ID: <1910615072.1312606.1370166363974.JavaMail.root@sculptor.zimbra.ru.nl> Hi Vitoria, There is a wikipage that may help you get started, and answer your questions: http://fieldtrip.fcdonders.nl/example/stratify Best wishes, Arjen ----- Oorspronkelijk bericht ----- > Van: "Vitória Magalhães Piai" > Aan: fieldtrip at donders.ru.nl > Verzonden: Zondag 2 juni 2013 11:17:25 > Onderwerp: [FieldTrip] how to use ft_stratify? > Hi all, > > I'm trying to use ft_stratify for the first time, but (it could be > just > me) I don't find the help info helpful enough :) > What I want to achieve in the end is TFRs of two conditions for which > the histogram of the reaction time over trials for each condition is > matched. > > If I understood ft_stratify correctly (and I doubt that), I could use > this function to select the trials for each condition such that the > histograms of the RTs match. Then knowing which trials to keep, I run > ft_freqanalysis on those specifically. > So question number 1, is that how I should proceed? 'Cause as far as I > can tell, ft_stratify will not take a whole raw data structure: The > help > says "each input is a Nchan X Nobs matrix". So I have to go for the > RTs > then. > > Assuming my approach is correct (ft_stratify on RTs of two conditions, > then move on with only those trials), I've made a matrix Nchan x > N_trials for each condition. > % input1 = 265 sensors x 95 RT_trials; > % input2 = 265 sensors x 100 RT_trials; > > cfgst = []; > cfgst.method = 'histogram'; > cfgst.equalbinavg = 'no'; > cfgst.numbin = 4; > cfgst.numiter = 2000; % default > [output,bin] = ft_stratify(cfgst, input1, input2); > > I then get an error in line 127: > linearhisto = zeros(ncond, cfg.numbin.^nchan); > ??? Error using ==> zeros > Maximum variable size allowed by the program is exceeded. > > Apparently, zeros(2, 4^265) is something matlab doesn't want to > calculate! > Am I doing something wrong here? Has anyone worked with this function > before (with such a number of sensors)? > > Any help is greatly appreciated! > Cheers, Vitória > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip From vitoria.piai at gmail.com Sun Jun 2 17:09:34 2013 From: vitoria.piai at gmail.com (=?ISO-8859-1?Q?Vit=F3ria_Magalh=E3es_Piai?=) Date: Sun, 02 Jun 2013 17:09:34 +0200 Subject: [FieldTrip] how to use ft_stratify? In-Reply-To: References: Message-ID: <51AB602E.8020609@gmail.com> Thanx, Arjen! Shame on me, I should have known that there would be a wikipage on that :) And for the sake of archiving, in case someone else ever bumps into this thread because they're making the same mistake as me when using this function, here's what I was doing wrong: The input Nchan x N_trials for each condition, Nchan should be 1 'cause my data are the RTs So: % input1 = RT_trials_cond1' ; % size = 1 x 95 % input2 = RT_trials_cond2' ; % size = 1 x 100 cfgst = []; cfgst.method = 'histogram'; output = ft_stratify(cfgst, input1, input2); Now it will run and it won't even complain they are of different sizes either! Hope this will help anyone in the future making the same mistake! Cheers, Vitória On 6/2/2013 12:00 PM, fieldtrip-request at science.ru.nl wrote: > Message: 2 > Date: Sun, 02 Jun 2013 11:17:25 +0200 > From: Vit?ria Magalh?es Piai > To:fieldtrip at donders.ru.nl > Subject: [FieldTrip] how to use ft_stratify? > Message-ID:<51AB0DA5.10805 at gmail.com> > Content-Type: text/plain; charset=ISO-8859-1; format=flowed > > Hi all, > > I'm trying to use ft_stratify for the first time, but (it could be just > me) I don't find the help info helpful enough:) > What I want to achieve in the end is TFRs of two conditions for which > the histogram of the reaction time over trials for each condition is > matched. > > If I understood ft_stratify correctly (and I doubt that), I could use > this function to select the trials for each condition such that the > histograms of the RTs match. Then knowing which trials to keep, I run > ft_freqanalysis on those specifically. > So question number 1, is that how I should proceed? 'Cause as far as I > can tell, ft_stratify will not take a whole raw data structure: The help > says "each input is a Nchan X Nobs matrix". So I have to go for the RTs > then. > > Assuming my approach is correct (ft_stratify on RTs of two conditions, > then move on with only those trials), I've made a matrix Nchan x > N_trials for each condition. > % input1 = 265 sensors x 95 RT_trials; > % input2 = 265 sensors x 100 RT_trials; > > cfgst = []; > cfgst.method = 'histogram'; > cfgst.equalbinavg = 'no'; > cfgst.numbin = 4; > cfgst.numiter = 2000; % default > [output,bin] = ft_stratify(cfgst, input1, input2); > > I then get an error in line 127: > linearhisto = zeros(ncond, cfg.numbin.^nchan); > ??? Error using ==> zeros > Maximum variable size allowed by the program is exceeded. > > Apparently, zeros(2, 4^265) is something matlab doesn't want to calculate! > Am I doing something wrong here? Has anyone worked with this function > before (with such a number of sensors)? > > Any help is greatly appreciated! > Cheers, Vit?ria > > > ------------------------------ > > Message: 3 > Date: Sun, 2 Jun 2013 11:46:03 +0200 (CEST) > From: "Stolk, A." > To: FieldTrip discussion list > Subject: Re: [FieldTrip] how to use ft_stratify? > Message-ID: > <1910615072.1312606.1370166363974.JavaMail.root at sculptor.zimbra.ru.nl> > Content-Type: text/plain; charset=utf-8 > > Hi Vitoria, > > There is a wikipage that may help you get started, and answer your questions: > http://fieldtrip.fcdonders.nl/example/stratify > > Best wishes, > Arjen -------------- next part -------------- An HTML attachment was scrubbed... URL: From d.stoffers at gmail.com Mon Jun 3 10:12:17 2013 From: d.stoffers at gmail.com (Diederick Stoffers) Date: Mon, 3 Jun 2013 10:12:17 +0200 Subject: [FieldTrip] Postdoc positions available at the Netherlands Institute for Neuroscience in Amsterdam In-Reply-To: <21E5F1A0-241E-43B6-957B-18A7767A7B51@gmail.com> References: <21E5F1A0-241E-43B6-957B-18A7767A7B51@gmail.com> Message-ID: <8B956BE9-4168-4ED4-B0E9-47FE260EAEE4@gmail.com> Dear all, Please find attached a description of postdoc positions available at the Netherlands Institute for Neuroscience in Amsterdam, which I am posting on behalf of my group leader Eus van Someren (cc). Relevant keywords for these positions are sleep, emotion, arousal, high-density EEG, fMRI, TMS, insomnia, internet assessment, database, latent class and latent trait analysis. Cheers, Diederick -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: VacancyPostdoc.pdf Type: application/pdf Size: 454314 bytes Desc: not available URL: From d.stoffers at gmail.com Mon Jun 3 10:20:20 2013 From: d.stoffers at gmail.com (Diederick Stoffers) Date: Mon, 3 Jun 2013 10:20:20 +0200 Subject: [FieldTrip] Postdoc positions available at the Netherlands Institute for Neuroscience in Amsterdam In-Reply-To: <8B956BE9-4168-4ED4-B0E9-47FE260EAEE4@gmail.com> References: <21E5F1A0-241E-43B6-957B-18A7767A7B51@gmail.com> <8B956BE9-4168-4ED4-B0E9-47FE260EAEE4@gmail.com> Message-ID: <6DACABEC-925B-4E71-A7A2-FB8C7B2A60D1@gmail.com> Dear all, Please find attached a description of postdoc positions available at the Netherlands Institute for Neuroscience in Amsterdam, which I am posting on behalf of my group leader Eus van Someren (cc). Relevant keywords for these positions are sleep, emotion, arousal, high-density EEG, fMRI, TMS, insomnia, internet assessment, database, latent class and latent trait analysis. Cheers, Diederick NB Apologies if you receive this message twice, the initial message was rejected by some servers because it exceeded maximum message size. -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: VacancyPostdoc_reduced.pdf Type: application/pdf Size: 86280 bytes Desc: not available URL: From jm.horschig at donders.ru.nl Mon Jun 3 10:59:49 2013 From: jm.horschig at donders.ru.nl (=?ISO-8859-1?Q?=22J=F6rn_M=2E_Horschig=22?=) Date: Mon, 03 Jun 2013 10:59:49 +0200 Subject: [FieldTrip] channel combination problems In-Reply-To: <27E5CAD9145EEC41BB9B34C01716A1983046156B@UM-EXCDAG-A01.um.gwdg.de> References: <27E5CAD9145EEC41BB9B34C01716A1983046156B@UM-EXCDAG-A01.um.gwdg.de> Message-ID: <51AC5B05.2020409@donders.ru.nl> Hi Thomas, that is indeed a bug that we are currently working on, see also here: http://bugzilla.fcdonders.nl/show_bug.cgi?id=2148 A workaround for the moment is to call this: coh.dimord = 'chancmb_freq'; coh = ft_checkdata(coh, 'cmbrepresentation', 'full'); As you asked what the difference between the two is: Connectivity measures are define between two signals, or channels. So, for example you compute coherence between channel1 and channel2. In FieldTrip there are two ways to represent this: Either by a 3D NxMxF matrix or by a 2D (NxM)xF matrix, where F denotes the frequency dimension and N and M are the in- or output channels (coherence is a symmetric measure, so N=M). In other words, we can either represent it as a three dimensional matrix, where the first dimension denotes the input and the second the output channels, or we represent it as a two dimensional matrix, where the first dimension denotes the relation between in- and output channels. The latter is what we call a channelcombination (chancmb). It can be channel1->channel2 (meaning, influence from channel1 to channel 2). The same in a three dimensional matrix would be channel1 for dimension 1 and channel 2 for dimension 2. The workaround above converts from one to the other convention. If your data is in 'cmbrepresentation;, you will have 'labelcmb' which is a 2D cell-matrix, and your data dimensions (dimord) will be 'chancmb_XXX', where a single dimension respective to labelcmb defines the channel combination. If your data is not in 'cmbrepresentation', you will have a 1D 'label' field and your data dimension (dimord) will be 'chan_chan_XXX', this a 2D channel combinations that explains the channel combination. Btw, I am not aware that you can define cfg.labelcmb in any function, imho it is always cfg.channelcmb. Best, Jörn On 5/31/2013 11:42 AM, Wunderle, Thomas wrote: > > Hi all, > > I'm new in fieldtrip and I try to get the cfg.channelcmb to work, > because I want to plot the connectivity between the channels of > different laminar electrodes, > > let's say the connectivity between channel 1:24 and 25:38 > > I tried the following: > > cfg = []; > > cfg.method = 'mtmfft'; > > cfg.taper = 'dpss'; > > cfg.output = 'fourier'; > > cfg.tapsmofrq = 1; > > freq = ft_freqanalysis(cfg, data) > > The output is: > > >> freq > > freq = > > label: {3x1 cell} > > dimord: 'rpttap_chan_freq' > > freq: [1x101 double] > > fourierspctrm: [500x3x101 double] > > cumsumcnt: [500x1 double] > > cumtapcnt: [500x1 double] > > cfg: [1x1 struct] > > I then run > > cfg = []; > > cfg.method = 'coh'; > > cfg.channelcmb = {freq.label{1} freq.label{2};freq.label{2} > freq.label{1}}; > > coh= ft_connectivityanalysis(cfg, freq); > > And the output here is: > > >> coh > > coh = > > labelcmb: {2x2 cell} > > dimord: 'chan_freq' > > cohspctrm: [2x101 double] > > freq: [1x101 double] > > dof: 500 > > cfg: [1x1 struct] > > As you can seen, the output of dimord is 'chan_freq' so in the > subsequent call of ft_connectivityplot I get an error message: > > cfg = []; > > cfg.parameter = 'cohspctrm'; > > ft_connectivityplot(cfg, coh); > > ??? Error using ==> ft_connectivityplot at 99 > > the data should have a dimord of chan_chan_freq or chancmb_freq > > If I use in ft_freqanalysis the cfg.method = 'powandcsd', > cfg.channelcmb seems to have no effect at all, > > the coherence is computed for all possible pairs. > > I also don't understand the difference between "cfg.channelcmb" and > "cfg.labelcmb" > > Can you help me in how I should correctly use the cannelcmb and > labelcmb options? > > Thanks for your help, > > Thomas > > ----- > > Dr. Thomas Wunderle > > Ernst Strüngmann Institute (ESI) for Neuroscience > > > in Cooperation with Max Planck Society > > > Deutschordenstrasse 46 > > 60528 Frankfurt am Main, Germany > > www.esi-frankfurt.de > > thomas.wunderle at esi-frankfurt.de > > Tel: +49 69 96769 519 > > Fax: +49 69 96769 555 > > Sitz der Gesellschaft: Frankfurt am Main > > Registergericht: Amtsgericht Frankfurt - HRB 84266 > > Geschäftsführer: Prof. Dr. Pascal Fries > > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -- Jörn M. Horschig PhD Student Donders Institute for Brain, Cognition and Behaviour Centre for Cognitive Neuroimaging Radboud University Nijmegen Neuronal Oscillations Group FieldTrip Development Team P.O. Box 9101 NL-6500 HB Nijmegen The Netherlands Contact: E-Mail: jm.horschig at donders.ru.nl Tel: +31-(0)24-36-68493 Web: http://www.ru.nl/donders Visiting address: Trigon, room 2.30 Kapittelweg 29 NL-6525 EN Nijmegen The Netherlands -------------- next part -------------- An HTML attachment was scrubbed... URL: From jm.horschig at donders.ru.nl Mon Jun 3 11:30:34 2013 From: jm.horschig at donders.ru.nl (=?ISO-8859-1?Q?=22J=F6rn_M=2E_Horschig=22?=) Date: Mon, 03 Jun 2013 11:30:34 +0200 Subject: [FieldTrip] some of the requested samples occur twice In-Reply-To: References: Message-ID: <51AC623A.1080207@donders.ru.nl> Hi Robin, it's not a bug that ft_fetch_data is not allowing for overlap. The function needs to be generic and eventually allow for fetching data extending over several trial segments. However, what should be the way to fetch data that occurs twice, i.e. at the end of one trial and the beginning of another? If you have data with overlapping samples, it is not straight forward to define data from one trial as to be fetched and ignore the other. Since preprocessing options like filters are applied per trial segment, data will differ between trial segments if it overlaps. As there are a multitude of possibilities to deal with this and none of them is perfect (imho neither of them can even be called good), we decided to not allow for that. For your problem, however, imho you can define negative trial padding in the function call to ft_artifact_zvalue, which should effectively pad. Have you tried this rather than padding manually? Best, Jörn On 5/31/2013 6:14 PM, Robin wrote: > I have a problem in preprocessing where I am getting this error: > > """ > some of the requested samples occur twice in the data > > Error in ft_artifact_zvalue (line 262) > dat{trlop} = ft_fetch_data(data, 'header', hdr, 'begsample', > trl(trlop,1)-fltpadding, 'endsample', trl(trlop,2)+fltpadding, > 'chanindx', sgnind, 'checkboundary', strcmp(cfg.continuous,'no > Error in ft_artifact_muscle (line 158) > [tmpcfg, artifact] = ft_artifact_zvalue(tmpcfg, data); > """ > > I think this is because I am manually adding some extra padding to the > trials so that the artifact filtering can use that padding (I am doing > the artifact filtering on data in memory which is output from > ft_denoise_pca). So in this case it is not a problem if consecutive > trials overlap a bit. > > I would therefore like to disable this error and wondered what is the > best way to do it. I am a bit confused because ft_artifact_zvalue > calls ft_fetch data with a "checkboundary" option which looks like it > might be what I want (and set correctly), but ft_fetch_data doesn't > seem to use that option. Instead it has an allowoverlap option. > > So for now I will manually add the allowoverlap option to the call in > ft_artifact_zvalue, but I wondered what checkboundary doesn't appear > in ft_fetch_data or if this might be a bug. > > Cheers > > Robin > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -- Jörn M. Horschig PhD Student Donders Institute for Brain, Cognition and Behaviour Centre for Cognitive Neuroimaging Radboud University Nijmegen Neuronal Oscillations Group FieldTrip Development Team P.O. Box 9101 NL-6500 HB Nijmegen The Netherlands Contact: E-Mail: jm.horschig at donders.ru.nl Tel: +31-(0)24-36-68493 Web: http://www.ru.nl/donders Visiting address: Trigon, room 2.30 Kapittelweg 29 NL-6525 EN Nijmegen The Netherlands From julian.keil at gmail.com Mon Jun 3 17:14:08 2013 From: julian.keil at gmail.com (Julian Keil) Date: Mon, 3 Jun 2013 17:14:08 +0200 Subject: [FieldTrip] Polhemus Patriot Message-ID: <67D8C434-4D28-40C3-94A6-A95C86BD6B78@gmail.com> Dear FieldTrip-Users, I have a not really FieldTrip-related question, but maybe one of you can help me anyways. In our lab, we have a Polhemus Patriot 3D tracking system to acquire electrode positions. Unfortunately, the recordings are severely distorted in the Z-axis (up-down). After contacting the Polhemus Support, I got the information, that this is due to metal in the surroundings of the source which distorts the magnetic field. I tried to get as far away from any metal as possible in our lab (~1.5 m to the walls and floor) but to no avail. Now to my question: Has anyone any experience dealing with this? I'm quite puzzled by this as I know plenty of labs use Polhemus trackers, and I'm not sure if our lab is especially metal prone or if I'm missing something. Thanks a lot for any help. Julian ******************** Dr. Julian Keil AG Multisensorische Integration Psychiatrische Universitätsklinik der Charité im St. Hedwig-Krankenhaus Große Hamburger Straße 5-11, Raum E 307 10115 Berlin Telefon: +49-30-2311-1879 Fax: +49-30-2311-2209 http://psy-ccm.charite.de/forschung/bildgebung/ag_multisensorische_integration -------------- next part -------------- An HTML attachment was scrubbed... URL: From inieuwenhuis at berkeley.edu Mon Jun 3 17:52:14 2013 From: inieuwenhuis at berkeley.edu (Ingrid Nieuwenhuis) Date: Mon, 03 Jun 2013 08:52:14 -0700 Subject: [FieldTrip] loreta2fieldtrip function error In-Reply-To: <1370015815.5183.YahooMailNeo@web122402.mail.ne1.yahoo.com> References: <1369934092.15336.YahooMailNeo@web122405.mail.ne1.yahoo.com> <51A78CC1.6030906@berkeley.edu> <1370015815.5183.YahooMailNeo@web122402.mail.ne1.yahoo.com> Message-ID: <51ACBBAE.4070508@berkeley.edu> Hi Fatameh, - In the LORETA program, you go to main utilities > Format converter. - There you select: input binary file (sLORETA) - It does not matter which format for output you choose, I coded it robust, it'll figure it out. As it says, rows are time points, columns are the volume-gridpoints (called voxels) - After using loreta2fieldtrip the data is in normal FieldTrip volume format, see here: http://fieldtrip.fcdonders.nl/reference/ft_datatype_volume To get familiar with FieldTrip source plotting etc, see the tutorials, for instance: http://fieldtrip.fcdonders.nl/tutorial/plotting - The following steps are: 1) create a template: template = ft_read_mri([cur_path_FT, '\external\spm8\templates\T1.nii']); 2) interpolate your volume on the MNI template: [interp_mean] = ft_sourceinterpolate(cfg, GA_mean, template); 3) plot it using ft_sourceplot Hope it helps, Ingrid On 5/31/2013 8:56 AM, Fatemeh Ebrahimi nia wrote: > Dear respondent, > > Thank you for your advices. > I have used the function that you have updated. It works out. Can you > give me information about the output structure (What do the matrixes > refer to?) or advise a reference to study about that please? > > Best, > Fatemeh > > > ------------------------------------------------------------------------ > *From:* Ingrid Nieuwenhuis > *To:* fieldtrip at science.ru.nl > *Sent:* Thursday, May 30, 2013 10:30 AM > *Subject:* Re: [FieldTrip] loreta2fieldtrip function error > > Hi Fatemeh, > > I had the same error recently when I did the same. I filed the bug, > see http://bugzilla.fcdonders.nl/show_bug.cgi?id=2144 > > I did create a work around. In the LORETA program, you can export the > source data as a text file. You can read that text file in with > loreta2fieldtrip.m. It's a bit of a patch, but it worked for me. > > Hope this helps, > Ingrid > > On 5/30/2013 10:14 AM, Fatemeh Ebrahimi nia wrote: >> Hi dear all, >> >> I am analyzing EEG data. I have computed sLORETA (.slor) from ERP >> data. Now I want to read and convert LORETA source reconstruction into a >> MATLAB data structure using "loreta2fieldtrip" function, But I have >> gotten the bellow error. >> >> **** Error using fread >> Invalid precision. >> Error in loreta2fieldtrip (line 85) >> activity = fread(fid, [voxnumber Ntime], 'float = >single'); *** >> >> Can someone give me a help? >> >> Best regards, >> Fatemeh >> >> >> >> _______________________________________________ >> fieldtrip mailing list >> fieldtrip at donders.ru.nl >> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > -- > Ingrid Nieuwenhuis PhD > Postdoctoral Fellow > Sleep and Neuroimaging Laboratory > Department of Psychology > University of California, Berkeley > California 94720-1650 > Tolman Hall, room 5305 > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -- Ingrid Nieuwenhuis PhD Postdoctoral Fellow Sleep and Neuroimaging Laboratory Department of Psychology University of California, Berkeley California 94720-1650 Tolman Hall, room 5305 -------------- next part -------------- An HTML attachment was scrubbed... URL: From smoratti at psi.ucm.es Mon Jun 3 18:07:40 2013 From: smoratti at psi.ucm.es (smoratti at psi.ucm.es) Date: Mon, 3 Jun 2013 18:07:40 +0200 Subject: [FieldTrip] Polhemus Patriot In-Reply-To: <67D8C434-4D28-40C3-94A6-A95C86BD6B78@gmail.com> References: <67D8C434-4D28-40C3-94A6-A95C86BD6B78@gmail.com> Message-ID: Dear Julian, Maybe a stupid answer and probably you have taken care of this already, but does the chair have any metal? We use an IKEA wooden garden chair. Best, Stephan ________________________________________________________ Stephan Moratti, PhD see also: http://web.me.com/smoratti/ Universidad Complutense de Madrid Facultad de Psicología Departamento de Psicología Básica I Campus de Somosaguas 28223 Pozuelo de Alarcón (Madrid) Spain and Center for Biomedical Technology Laboratory for Cognitive and Computational Neuroscience Parque Científico y Tecnológico de la Universidad Politecnica de Madrid Campus Montegancedo 28223 Pozuelo de Alarcón (Madrid) Spain email: smoratti at psi.ucm.es Tel.: +34 679219982 El 03/06/2013, a las 17:14, Julian Keil escribió: > Dear FieldTrip-Users, > > I have a not really FieldTrip-related question, but maybe one of you can help me anyways. > In our lab, we have a Polhemus Patriot 3D tracking system to acquire electrode positions. > Unfortunately, the recordings are severely distorted in the Z-axis (up-down). > After contacting the Polhemus Support, I got the information, that this is due to metal in the surroundings of the source which distorts the magnetic field. > I tried to get as far away from any metal as possible in our lab (~1.5 m to the walls and floor) but to no avail. > > Now to my question: Has anyone any experience dealing with this? I'm quite puzzled by this as I know plenty of labs use Polhemus trackers, and I'm not sure if our lab is especially metal prone or if I'm missing something. > > Thanks a lot for any help. > > Julian > > ******************** > Dr. Julian Keil > > AG Multisensorische Integration > Psychiatrische Universitätsklinik > der Charité im St. Hedwig-Krankenhaus > Große Hamburger Straße 5-11, Raum E 307 > 10115 Berlin > > Telefon: +49-30-2311-1879 > Fax: +49-30-2311-2209 > http://psy-ccm.charite.de/forschung/bildgebung/ag_multisensorische_integration > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -------------- next part -------------- An HTML attachment was scrubbed... URL: From sarang.dalal at uni-konstanz.de Mon Jun 3 18:16:02 2013 From: sarang.dalal at uni-konstanz.de (Sarang S. Dalal) Date: Mon, 3 Jun 2013 09:16:02 -0700 Subject: [FieldTrip] Polhemus Patriot In-Reply-To: References: Message-ID: <27A129F9-9570-4D6B-BBF9-48080801F980@uni-konstanz.de> Dear Julian, At UCSF, we were unable to use a Polhemus (an older model, not sure which) in the shielded room of the MEG, so we performed the digitization just outside the room before moving the subject inside. Perhaps if you have a nicely shielded EEG booth you have the same problem... Sarang On Jun 3, 2013, at 9:08 AM, fieldtrip-request at science.ru.nl wrote: > Date: Mon, 3 Jun 2013 17:14:08 +0200 > From: Julian Keil > To: FieldTrip discussion list > Subject: [FieldTrip] Polhemus Patriot > Message-ID: <67D8C434-4D28-40C3-94A6-A95C86BD6B78 at gmail.com> > Content-Type: text/plain; charset="iso-8859-1" > > Dear FieldTrip-Users, > > I have a not really FieldTrip-related question, but maybe one of you can help me anyways. > In our lab, we have a Polhemus Patriot 3D tracking system to acquire electrode positions. > Unfortunately, the recordings are severely distorted in the Z-axis (up-down). > After contacting the Polhemus Support, I got the information, that this is due to metal in the surroundings of the source which distorts the magnetic field. > I tried to get as far away from any metal as possible in our lab (~1.5 m to the walls and floor) but to no avail. > > Now to my question: Has anyone any experience dealing with this? I'm quite puzzled by this as I know plenty of labs use Polhemus trackers, and I'm not sure if our lab is especially metal prone or if I'm missing something. > > Thanks a lot for any help. > > Julian > > ******************** > Dr. Julian Keil > > AG Multisensorische Integration > Psychiatrische Universit?tsklinik > der Charit? im St. Hedwig-Krankenhaus > Gro?e Hamburger Stra?e 5-11, Raum E 307 > 10115 Berlin > > Telefon: +49-30-2311-1879 > Fax: +49-30-2311-2209 > http://psy-ccm.charite.de/forschung/bildgebung/ag_multisensorische_integration From inieuwenhuis at berkeley.edu Mon Jun 3 18:25:47 2013 From: inieuwenhuis at berkeley.edu (Ingrid Nieuwenhuis) Date: Mon, 03 Jun 2013 09:25:47 -0700 Subject: [FieldTrip] format conversion In-Reply-To: <1369986505.7865.YahooMailNeo@web192306.mail.sg3.yahoo.com> References: <1369986505.7865.YahooMailNeo@web192306.mail.sg3.yahoo.com> Message-ID: <51ACC38B.9080802@berkeley.edu> Hi Bahar, I've added more info on the FieldTrip wiki about this for you and other. See here: http://fieldtrip.fcdonders.nl/integrating_with_loreta Hope it helps, Ingrid On 5/31/2013 12:48 AM, Bahar Bahar wrote: > Hi dear all, > > I have a technical question about format converter module via sLORETA > software (.slor file to .txt one). Can any one give me some > information about the conversion procedure (and the meaning of the > column and row of the output file)? > > Thanks, > bahar > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -- Ingrid Nieuwenhuis PhD Postdoctoral Fellow Sleep and Neuroimaging Laboratory Department of Psychology University of California, Berkeley California 94720-1650 Tolman Hall, room 5305 -------------- next part -------------- An HTML attachment was scrubbed... URL: From andmib at gmail.com Mon Jun 3 22:15:49 2013 From: andmib at gmail.com (Andrew Brooks) Date: Mon, 3 Jun 2013 16:15:49 -0400 Subject: [FieldTrip] Private function problems Message-ID: Hello all, I followed the instructions on properly adding FieldTrip to the Matlab path file. However, I continue to run into errors involving private functions. In this case, I get the error 'undefined function 'hom2six' for input arguments of type 'double''. Does anybody have a suggestion as to why this is occurring? Thanks! Andrew -------------- next part -------------- An HTML attachment was scrubbed... URL: From d.lozanosoldevilla at fcdonders.ru.nl Mon Jun 3 22:53:41 2013 From: d.lozanosoldevilla at fcdonders.ru.nl (Lozano Soldevilla, D. (Diego)) Date: Mon, 3 Jun 2013 22:53:41 +0200 (CEST) Subject: [FieldTrip] Private function problems In-Reply-To: Message-ID: <481032685.1338448.1370292821035.JavaMail.root@sculptor.zimbra.ru.nl> Hi Andrew, Did you type the following? >> restoredefaultpath >> addpath /fieldtripxxxx >> ft_defaults What's the ft_* function you invoke to get the error 'undefined function 'hom2six'? And what's the fieldtrip version you're using? best, Diego ----- Original Message ----- > From: "Andrew Brooks" > To: "FieldTrip discussion list" > Sent: Monday, 3 June, 2013 10:15:49 PM > Subject: [FieldTrip] Private function problems > Hello all, > I followed the instructions on properly adding FieldTrip to the Matlab > path file. However, I continue to run into errors involving private > functions. In this case, I get the error 'undefined function 'hom2six' > for input arguments of type 'double''. > Does anybody have a suggestion as to why this is occurring? > Thanks! > Andrew > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -- PhD Student Neuronal Oscillations Group Donders Institute for Brain, Cognition and Behaviour Centre for Cognitive Neuroimaging Trigon, room 0.83 Kapittelweg 29 Radboud University Nijmegen NL-6525 EN Nijmegen The Netherlands E-Mail: d.lozanosoldevilla at fcdonders.ru.nl Tel: +31-(0)24-36-66274 Web: http://www.neuosc.com/ -------------- next part -------------- An HTML attachment was scrubbed... URL: From 13681530640 at 139.com Tue Jun 4 04:16:18 2013 From: 13681530640 at 139.com (WangJing) Date: Tue, 4 Jun 2013 10:16:18 +0800 (CST) Subject: [FieldTrip] Question about Head Model References: Message-ID: <2af951ad49e020a-0000c.Richmail.00026806626265132618@139.com> HI everyone, When I build head model,I encount some questions. 1.for two Functions ft_volumereslice and ft_volumerealign,which should be run firstly? 2. when surfaces are created at the boarders of the different tissue-types by the ft_prepare_mesh function. how to determine the parameter cfg.numvertices? 3.when I build the head model,using the following codes: cfg = []; cfg.method ='dipoli'; cfg.cond =[0.3300 0.004125 0.3300]; vol = ft_prepare_headmodel(cfg, bnd); the error message is: ??? Error using ==> surface_nesting at 26 the compartment nesting cannot be determined Error in ==> ft_headmodel_dipoli at 84 order = surface_nesting(vol.bnd, 'outsidefirst'); Error in ==> ft_prepare_headmodel at 226 vol = ft_headmodel_dipoli(geometry,'conductivity',cfg.conductivity,'isolatedsource',cfg.isolatedsource); Error in ==> Myheadmodel at 5 vol = ft_prepare_headmodel(cfg, bnd); I don't know where is wrong.who can help me? Thank you! Best Regards, Jing Wang -------------- next part -------------- An HTML attachment was scrubbed... URL: From sauer.mpih at googlemail.com Tue Jun 4 11:42:13 2013 From: sauer.mpih at googlemail.com (Andreas Sauer) Date: Tue, 4 Jun 2013 11:42:13 +0200 Subject: [FieldTrip] NaNs as output of ft_sourceanalysis (DICS) Message-ID: Dear all, I would like to analyze sources with the beamforming approach using the DICS method. I followed the steps in the tutorial and everything works well. However, the output of ft_sourceanalysis contains only NaNs. I checked the TF data that I calculated in the step before but that looks fine, so I assume the error happens somewhere during ft_sourceanalysis. That's how I calculate the TFRs: cfg = []; cfg.toilim = [-0.5 -0.3]; % baseline activity eval(['dataPre = ft_redefinetrial(cfg,Cond_',num2str(cond(j)),');']); cfg.toilim = [0.1 1.0]; % task-related activity eval(['dataPost = ft_redefinetrial(cfg,Cond_',num2str(cond(j)),');']); % Combine the two datasets... data = appenddata(cfg, dataPre, dataPost); trialdesign = [ones(1,length(dataPost.trial)) ones(1,length(dataPre.trial))*2]; % ... and compute the CSD matrices... cfg = []; cfg.output = 'powandcsd'; cfg.channel = Channel.meg; cfg.method = 'mtmfft'; cfg.taper = 'dpss'; cfg.foilim = [75 75]; cfg.tapsmofrq = 15; % amount of spectral smoothing = +/- 15 Hz cfg.channelcmb = {Channel.meg Channel.meg}; % ... for the baseline and task part separately... eval(['freqPre.Cond_',num2str(cond(j)), ' = ft_freqanalysis(cfg,dataPre);']); eval(['freqPost.Cond_',num2str(cond(j)), ' = ft_freqanalysis(cfg,dataPost);']); % ... and for the whole trial eval(['freqAll.Cond_',num2str(cond(j)), ' = ft_freqanalysis(cfg,data);']); eval(['freqAll.Cond_',num2str(cond(j)), '.trialdesign = trialdesign;']); % pre and post info And that's how I calculate the sources: cfg = []; cfg.frequency = 75; cfg.method = 'dics'; cfg.grid = grid; % Here it gives .pos, .inside, .outside to the structure cfg.vol = vol; cfg.dim = template_grid.dim; % Here I give the dimension of the template grid cfg.grad = Cond_101.hdr.grad; cfg.lambda = '5%'; cfg.reducerank = 'no'; cfg.projectnoise = 'yes'; cfg.realfilter = 'yes'; cfg.keepfilter = 'yes'; % the output saves the computed inverse filter eval(['SourceAll = ft_sourceanalysis(cfg, freqAll.Cond_',num2str(cond(k)),');']) % use the common filter here cfg.grid.filter = SourceAll.avg.filter; eval(['sourcePre_con = ft_sourceanalysis(cfg, freqPre.Cond_',num2str(cond(k)),');']) eval(['sourcePost_con = ft_sourceanalysis(cfg, freqPost.Cond_',num2str(cond(k)),');']) I would really appreciate any help with that! Thanks a lot! Best, Andreas -- Andreas Sauer Max Planck Institute for Brain Research Deutschordenstr. 46 60528 Frankfurt am Main Germany T: +49 69 96769 278 F: +49 69 96769 327 Email: andreas.sauer at brain.mpg.de www.brain.mpg.de -------------- next part -------------- An HTML attachment was scrubbed... URL: From sauer.mpih at googlemail.com Tue Jun 4 11:52:24 2013 From: sauer.mpih at googlemail.com (Andreas Sauer) Date: Tue, 4 Jun 2013 11:52:24 +0200 Subject: [FieldTrip] NaNs as outpout of ft_sourceanalysis (DICS) Message-ID: Dear all, I would like to analyze sources with the beamforming approach using the DICS method. I followed the steps in the tutorial and everything works well. However, the output of ft_sourceanalysis contains only NaNs. I checked the TF data that I calculated in the step before but that looks fine, so I assume the error happens somewhere during ft_sourceanalysis. That's how I calculate the TFRs: cfg = []; cfg.toilim = [-0.5 -0.3]; % baseline activity eval(['dataPre = ft_redefinetrial(cfg,Cond_',num2str(cond(j)),');']); cfg.toilim = [0.1 1.0]; % task-related activity eval(['dataPost = ft_redefinetrial(cfg,Cond_',num2str(cond(j)),');']); % Combine the two datasets... data = appenddata(cfg, dataPre, dataPost); trialdesign = [ones(1,length(dataPost.trial)) ones(1,length(dataPre.trial))*2]; % ... and compute the CSD matrices... cfg = []; cfg.output = 'powandcsd'; cfg.channel = Channel.meg; cfg.method = 'mtmfft'; cfg.taper = 'dpss'; cfg.foilim = [75 75]; cfg.tapsmofrq = 15; % amount of spectral smoothing = +/- 15 Hz cfg.channelcmb = {Channel.meg Channel.meg}; % ... for the baseline and task part separately... eval(['freqPre.Cond_',num2str(cond(j)), ' = ft_freqanalysis(cfg,dataPre);']); eval(['freqPost.Cond_',num2str(cond(j)), ' = ft_freqanalysis(cfg,dataPost);']); % ... and for the whole trial eval(['freqAll.Cond_',num2str(cond(j)), ' = ft_freqanalysis(cfg,data);']); eval(['freqAll.Cond_',num2str(cond(j)), '.trialdesign = trialdesign;']); % pre and post info And that's how I calculate the sources: cfg = []; cfg.frequency = 75; cfg.method = 'dics'; cfg.grid = grid; % Here it gives .pos, .inside, .outside to the structure cfg.vol = vol; cfg.dim = template_grid.dim; % Here I give the dimension of the template grid cfg.grad = Cond_101.hdr.grad; cfg.lambda = '5%'; cfg.reducerank = 'no'; cfg.projectnoise = 'yes'; cfg.realfilter = 'yes'; cfg.keepfilter = 'yes'; % the output saves the computed inverse filter eval(['SourceAll = ft_sourceanalysis(cfg, freqAll.Cond_',num2str(cond(k)),');']) % use the common filter here cfg.grid.filter = SourceAll.avg.filter; eval(['sourcePre_con = ft_sourceanalysis(cfg, freqPre.Cond_',num2str(cond(k)),');']) eval(['sourcePost_con = ft_sourceanalysis(cfg, freqPost.Cond_',num2str(cond(k)),');']) I would really appreciate any help with that! Thanks a lot! Best, Andreas -- Andreas Sauer Max Planck Institute for Brain Research Deutschordenstr. 46 60528 Frankfurt am Main Germany T: +49 69 96769 278 F: +49 69 96769 327 Email: andreas.sauer at brain.mpg.de www.brain.mpg.de -------------- next part -------------- An HTML attachment was scrubbed... URL: From eelke.spaak at donders.ru.nl Tue Jun 4 11:54:51 2013 From: eelke.spaak at donders.ru.nl (Eelke Spaak) Date: Tue, 4 Jun 2013 11:54:51 +0200 Subject: [FieldTrip] NaNs as output of ft_sourceanalysis (DICS) In-Reply-To: References: Message-ID: Dear Andreas, How many NaNs do you get exactly and in which field? If it is some NaNs in source.avg.pow, then it is quite normal: the estimates for dipole locations which were flagged as outside the brain are always NaN, as they are not scanned. The following should hold: sum(isnan(source.avg.pow)) == numel(source.outside) && sum(~isnan(source.avg.pow)) == numel(source.inside) Best, Eelke On 4 June 2013 11:42, Andreas Sauer wrote: > Dear all, > > I would like to analyze sources with the beamforming approach using the DICS > method. I followed the steps in the tutorial and everything works well. > However, the output of ft_sourceanalysis contains only NaNs. > > I checked the TF data that I calculated in the step before but that looks > fine, so I assume the error happens somewhere during ft_sourceanalysis. > > That's how I calculate the TFRs: > > cfg = []; > cfg.toilim = [-0.5 -0.3]; % baseline activity > eval(['dataPre = > ft_redefinetrial(cfg,Cond_',num2str(cond(j)),');']); > cfg.toilim = [0.1 1.0]; % task-related activity > eval(['dataPost = > ft_redefinetrial(cfg,Cond_',num2str(cond(j)),');']); > > % Combine the two datasets... > data = appenddata(cfg, dataPre, dataPost); > trialdesign = [ones(1,length(dataPost.trial)) > ones(1,length(dataPre.trial))*2]; > > % ... and compute the CSD matrices... > cfg = []; > cfg.output = 'powandcsd'; > cfg.channel = Channel.meg; > cfg.method = 'mtmfft'; > cfg.taper = 'dpss'; > cfg.foilim = [75 75]; > cfg.tapsmofrq = 15; % amount of spectral smoothing = +/- 15 Hz > cfg.channelcmb = {Channel.meg Channel.meg}; > > % ... for the baseline and task part separately... > eval(['freqPre.Cond_',num2str(cond(j)), ' = > ft_freqanalysis(cfg,dataPre);']); > eval(['freqPost.Cond_',num2str(cond(j)), ' = > ft_freqanalysis(cfg,dataPost);']); > > % ... and for the whole trial > eval(['freqAll.Cond_',num2str(cond(j)), ' = > ft_freqanalysis(cfg,data);']); > eval(['freqAll.Cond_',num2str(cond(j)), '.trialdesign = > trialdesign;']); % pre and post info > > And that's how I calculate the sources: > > cfg = []; > cfg.frequency = 75; > cfg.method = 'dics'; > cfg.grid = grid; % Here it gives .pos, .inside, .outside to > the structure > cfg.vol = vol; > cfg.dim = template_grid.dim; % Here I give the dimension > of the template grid > cfg.grad = Cond_101.hdr.grad; > cfg.lambda = '5%'; > cfg.reducerank = 'no'; > cfg.projectnoise = 'yes'; > cfg.realfilter = 'yes'; > cfg.keepfilter = 'yes'; % the output saves the computed inverse > filter > > eval(['SourceAll = ft_sourceanalysis(cfg, > freqAll.Cond_',num2str(cond(k)),');']) > > % use the common filter here > cfg.grid.filter = SourceAll.avg.filter; > eval(['sourcePre_con = ft_sourceanalysis(cfg, > freqPre.Cond_',num2str(cond(k)),');']) > eval(['sourcePost_con = ft_sourceanalysis(cfg, > freqPost.Cond_',num2str(cond(k)),');']) > > > > I would really appreciate any help with that! Thanks a lot! > > Best, > > Andreas > > -- > Andreas Sauer > Max Planck Institute for Brain Research > Deutschordenstr. 46 > 60528 Frankfurt am Main > Germany > > T: +49 69 96769 278 > F: +49 69 96769 327 > Email: andreas.sauer at brain.mpg.de > www.brain.mpg.de > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip From jm.horschig at donders.ru.nl Tue Jun 4 12:17:37 2013 From: jm.horschig at donders.ru.nl (=?ISO-8859-1?Q?=22J=F6rn_M=2E_Horschig=22?=) Date: Tue, 04 Jun 2013 12:17:37 +0200 Subject: [FieldTrip] NaNs as output of ft_sourceanalysis (DICS) In-Reply-To: References: Message-ID: <51ADBEC1.5060204@donders.ru.nl> Hi Andreas, could it be related to the fact that you redefine your trials and when estimating the frequency content, there is no exact 75Hz bin, thus ft_sourceanalysis cannot beam the frequency you specify? Since you cut out the pre- and poststimulus periods with different lengths, the frequency resolution will be strongly different, thus an estimate of 75Hz will effectively be somewhere around 75Hz, but not exactly 75Hz. You could try to set cfg.frequency=freqAll.Cond_(yourNumberedCondition).freq instead of cfg.frequency=75. Note that in this case, sourceAll might have non-nans, but sourcePre and sourcePost will probably still have nans due to the resolution issue If that's not the case, then I agree also with Eelke that more information is needed to help you, e.g. in which of the three source structures are nans? How many nans are there (try all(isnan(source.avg.pow(:))))? Best, Jörn On 6/4/2013 11:54 AM, Eelke Spaak wrote: > Dear Andreas, > > How many NaNs do you get exactly and in which field? If it is some > NaNs in source.avg.pow, then it is quite normal: the estimates for > dipole locations which were flagged as outside the brain are always > NaN, as they are not scanned. The following should hold: > > sum(isnan(source.avg.pow)) == numel(source.outside) > && > sum(~isnan(source.avg.pow)) == numel(source.inside) > > Best, > Eelke > > On 4 June 2013 11:42, Andreas Sauer wrote: >> Dear all, >> >> I would like to analyze sources with the beamforming approach using the DICS >> method. I followed the steps in the tutorial and everything works well. >> However, the output of ft_sourceanalysis contains only NaNs. >> >> I checked the TF data that I calculated in the step before but that looks >> fine, so I assume the error happens somewhere during ft_sourceanalysis. >> >> That's how I calculate the TFRs: >> >> cfg = []; >> cfg.toilim = [-0.5 -0.3]; % baseline activity >> eval(['dataPre = >> ft_redefinetrial(cfg,Cond_',num2str(cond(j)),');']); >> cfg.toilim = [0.1 1.0]; % task-related activity >> eval(['dataPost = >> ft_redefinetrial(cfg,Cond_',num2str(cond(j)),');']); >> >> % Combine the two datasets... >> data = appenddata(cfg, dataPre, dataPost); >> trialdesign = [ones(1,length(dataPost.trial)) >> ones(1,length(dataPre.trial))*2]; >> >> % ... and compute the CSD matrices... >> cfg = []; >> cfg.output = 'powandcsd'; >> cfg.channel = Channel.meg; >> cfg.method = 'mtmfft'; >> cfg.taper = 'dpss'; >> cfg.foilim = [75 75]; >> cfg.tapsmofrq = 15; % amount of spectral smoothing = +/- 15 Hz >> cfg.channelcmb = {Channel.meg Channel.meg}; >> >> % ... for the baseline and task part separately... >> eval(['freqPre.Cond_',num2str(cond(j)), ' = >> ft_freqanalysis(cfg,dataPre);']); >> eval(['freqPost.Cond_',num2str(cond(j)), ' = >> ft_freqanalysis(cfg,dataPost);']); >> >> % ... and for the whole trial >> eval(['freqAll.Cond_',num2str(cond(j)), ' = >> ft_freqanalysis(cfg,data);']); >> eval(['freqAll.Cond_',num2str(cond(j)), '.trialdesign = >> trialdesign;']); % pre and post info >> >> And that's how I calculate the sources: >> >> cfg = []; >> cfg.frequency = 75; >> cfg.method = 'dics'; >> cfg.grid = grid; % Here it gives .pos, .inside, .outside to >> the structure >> cfg.vol = vol; >> cfg.dim = template_grid.dim; % Here I give the dimension >> of the template grid >> cfg.grad = Cond_101.hdr.grad; >> cfg.lambda = '5%'; >> cfg.reducerank = 'no'; >> cfg.projectnoise = 'yes'; >> cfg.realfilter = 'yes'; >> cfg.keepfilter = 'yes'; % the output saves the computed inverse >> filter >> >> eval(['SourceAll = ft_sourceanalysis(cfg, >> freqAll.Cond_',num2str(cond(k)),');']) >> >> % use the common filter here >> cfg.grid.filter = SourceAll.avg.filter; >> eval(['sourcePre_con = ft_sourceanalysis(cfg, >> freqPre.Cond_',num2str(cond(k)),');']) >> eval(['sourcePost_con = ft_sourceanalysis(cfg, >> freqPost.Cond_',num2str(cond(k)),');']) >> >> >> >> I would really appreciate any help with that! Thanks a lot! >> >> Best, >> >> Andreas >> >> -- >> Andreas Sauer >> Max Planck Institute for Brain Research >> Deutschordenstr. 46 >> 60528 Frankfurt am Main >> Germany >> >> T: +49 69 96769 278 >> F: +49 69 96769 327 >> Email: andreas.sauer at brain.mpg.de >> www.brain.mpg.de >> >> _______________________________________________ >> fieldtrip mailing list >> fieldtrip at donders.ru.nl >> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -- Jörn M. Horschig PhD Student Donders Institute for Brain, Cognition and Behaviour Centre for Cognitive Neuroimaging Radboud University Nijmegen Neuronal Oscillations Group FieldTrip Development Team P.O. Box 9101 NL-6500 HB Nijmegen The Netherlands Contact: E-Mail: jm.horschig at donders.ru.nl Tel: +31-(0)24-36-68493 Web: http://www.ru.nl/donders Visiting address: Trigon, room 2.30 Kapittelweg 29 NL-6525 EN Nijmegen The Netherlands From sauer.mpih at googlemail.com Tue Jun 4 12:31:32 2013 From: sauer.mpih at googlemail.com (Andreas Sauer) Date: Tue, 4 Jun 2013 12:31:32 +0200 Subject: [FieldTrip] NaNs as output of ft_sourceanalysis (DICS) In-Reply-To: References: Message-ID: Dear Eelke and Jörn, thanks for the super quick responses! And sorry for the double post... I tried Eelke's suggestion and that holds. So, I have only NaNs in the fields for the dipole locations outside the brain. However, if I continue and calculate the contrast between pre and post and plot it I don't see any activation. I will try your suggestion, Jörn, as well and see whether it has to do with the re-definition. Thanks again for your suggestions! Best, Andreas 2013/6/4 Eelke Spaak > Dear Andreas, > > How many NaNs do you get exactly and in which field? If it is some > NaNs in source.avg.pow, then it is quite normal: the estimates for > dipole locations which were flagged as outside the brain are always > NaN, as they are not scanned. The following should hold: > > sum(isnan(source.avg.pow)) == numel(source.outside) > && > sum(~isnan(source.avg.pow)) == numel(source.inside) > > Best, > Eelke > > On 4 June 2013 11:42, Andreas Sauer wrote: > > Dear all, > > > > I would like to analyze sources with the beamforming approach using the > DICS > > method. I followed the steps in the tutorial and everything works well. > > However, the output of ft_sourceanalysis contains only NaNs. > > > > I checked the TF data that I calculated in the step before but that looks > > fine, so I assume the error happens somewhere during ft_sourceanalysis. > > > > That's how I calculate the TFRs: > > > > cfg = []; > > cfg.toilim = [-0.5 -0.3]; % baseline activity > > eval(['dataPre = > > ft_redefinetrial(cfg,Cond_',num2str(cond(j)),');']); > > cfg.toilim = [0.1 1.0]; % task-related activity > > eval(['dataPost = > > ft_redefinetrial(cfg,Cond_',num2str(cond(j)),');']); > > > > % Combine the two datasets... > > data = appenddata(cfg, dataPre, dataPost); > > trialdesign = [ones(1,length(dataPost.trial)) > > ones(1,length(dataPre.trial))*2]; > > > > % ... and compute the CSD matrices... > > cfg = []; > > cfg.output = 'powandcsd'; > > cfg.channel = Channel.meg; > > cfg.method = 'mtmfft'; > > cfg.taper = 'dpss'; > > cfg.foilim = [75 75]; > > cfg.tapsmofrq = 15; % amount of spectral smoothing = +/- 15 Hz > > cfg.channelcmb = {Channel.meg Channel.meg}; > > > > % ... for the baseline and task part separately... > > eval(['freqPre.Cond_',num2str(cond(j)), ' = > > ft_freqanalysis(cfg,dataPre);']); > > eval(['freqPost.Cond_',num2str(cond(j)), ' = > > ft_freqanalysis(cfg,dataPost);']); > > > > % ... and for the whole trial > > eval(['freqAll.Cond_',num2str(cond(j)), ' = > > ft_freqanalysis(cfg,data);']); > > eval(['freqAll.Cond_',num2str(cond(j)), '.trialdesign = > > trialdesign;']); % pre and post info > > > > And that's how I calculate the sources: > > > > cfg = []; > > cfg.frequency = 75; > > cfg.method = 'dics'; > > cfg.grid = grid; % Here it gives .pos, .inside, > .outside to > > the structure > > cfg.vol = vol; > > cfg.dim = template_grid.dim; % Here I give the > dimension > > of the template grid > > cfg.grad = Cond_101.hdr.grad; > > cfg.lambda = '5%'; > > cfg.reducerank = 'no'; > > cfg.projectnoise = 'yes'; > > cfg.realfilter = 'yes'; > > cfg.keepfilter = 'yes'; % the output saves the computed > inverse > > filter > > > > eval(['SourceAll = ft_sourceanalysis(cfg, > > freqAll.Cond_',num2str(cond(k)),');']) > > > > % use the common filter here > > cfg.grid.filter = SourceAll.avg.filter; > > eval(['sourcePre_con = ft_sourceanalysis(cfg, > > freqPre.Cond_',num2str(cond(k)),');']) > > eval(['sourcePost_con = ft_sourceanalysis(cfg, > > freqPost.Cond_',num2str(cond(k)),');']) > > > > > > > > I would really appreciate any help with that! Thanks a lot! > > > > Best, > > > > Andreas > > > > -- > > Andreas Sauer > > Max Planck Institute for Brain Research > > Deutschordenstr. 46 > > 60528 Frankfurt am Main > > Germany > > > > T: +49 69 96769 278 > > F: +49 69 96769 327 > > Email: andreas.sauer at brain.mpg.de > > www.brain.mpg.de > > > > _______________________________________________ > > fieldtrip mailing list > > fieldtrip at donders.ru.nl > > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > -- Dipl.-Psych. Andreas Sauer Max Planck Institute for Brain Research Deutschordenstraße 46 60528 Frankfurt am Main Germany T: +49 69 96769 278 F: +49 69 96769 327 Email: sauer.mpih at gmail.com www.brain.mpg.de -------------- next part -------------- An HTML attachment was scrubbed... URL: From r.cox at uva.nl Tue Jun 4 14:31:06 2013 From: r.cox at uva.nl (Roy Cox) Date: Tue, 4 Jun 2013 14:31:06 +0200 Subject: [FieldTrip] ft_freqstatistics & ft_clusterplot Message-ID: Dear all, I recently joined your trip and I want to make use of fieldtrip's cluster correction capabilities. But I can't seem to get it to work. Perhaps some of you can clarify some things I can't figure out easily from the tutorials or functions themselves. A potentially important thing to know is that I performed all single-subject tf analyes using custom scripts, and now I want to have fieldtrip perform the overall statistics (8 subjects, 2 within-subj conditions). ft_freqstatistics works. However, I wonder: does it matter for the statistics what latency and frequency range you choose and/or whether you average across time/freq bins? I tried a number of variants, but the command window output "found [] positive/negative clusters in observed data" is always identical. Which confuses me. is it possible to call ft_freqstatistics and neither average over time nor frequency bins? or am I supposed to average across at least one to end up with less-dimensional data for ft_clusterplot? regardless of how I call ft_freqstatistics, ft_clusterplot crashes like this: Assignment has more non-singleton rhs dimensions than non-singleton subscripts Error in ==> ft_clusterplot at 179 sigposCLM(:,:,iPos) = (posCLM == sigpos(iPos)); here, my posCLM is a 126(chan)x35(freqs)x301(time) array, which indeed does not fit the left-hand side. If anyone has any ideas/suggestions I'd be happy to hear them. Roy -- Roy Cox, M.Sc. | Brain & Cognition Group | Department of Psychology | University of Amsterdam | Weesperplein 4 | 1018 XA Amsterdam | the Netherlands | room 3.21 | phone: +31 20 525 6847 | email: r.cox at uva.nl -------------- next part -------------- An HTML attachment was scrubbed... URL: From andmib at gmail.com Tue Jun 4 17:01:43 2013 From: andmib at gmail.com (Andrew Brooks) Date: Tue, 4 Jun 2013 11:01:43 -0400 Subject: [FieldTrip] Private function problems In-Reply-To: <481032685.1338448.1370292821035.JavaMail.root@sculptor.zimbra.ru.nl> References: <481032685.1338448.1370292821035.JavaMail.root@sculptor.zimbra.ru.nl> Message-ID: Hello Diego, I am using the example pipeline script from an earlier version of FieldTrip (ft_omri_pipeline_nuisance). The exact code that is throwing the error: curSixDof = hom2six(M). I did run the three lines of code to reset the default paths, add fieldtrip, and then ran ft_defaults. The version of FieldTrip I am using is 20130602. Thanks, Andrew On Mon, Jun 3, 2013 at 4:53 PM, Lozano Soldevilla, D. (Diego) < d.lozanosoldevilla at fcdonders.ru.nl> wrote: > Hi Andrew, > > Did you type the following? > > >> restoredefaultpath > >> addpath /fieldtripxxxx > >> ft_defaults > > What's the ft_* function you invoke to get the error 'undefined function > 'hom2six'? And what's the fieldtrip version you're using? > > best, > > Diego > > ------------------------------ > > *From: *"Andrew Brooks" > *To: *"FieldTrip discussion list" > *Sent: *Monday, 3 June, 2013 10:15:49 PM > *Subject: *[FieldTrip] Private function problems > > > Hello all, > > I followed the instructions on properly adding FieldTrip to the Matlab > path file. However, I continue to run into errors involving private > functions. In this case, I get the error 'undefined function 'hom2six' for > input arguments of type 'double''. > > Does anybody have a suggestion as to why this is occurring? > > Thanks! > Andrew > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > > > > -- > PhD Student > Neuronal Oscillations Group > Donders Institute for Brain, Cognition and Behaviour > Centre for Cognitive Neuroimaging > Trigon, room 0.83 > Kapittelweg 29 > Radboud University Nijmegen > NL-6525 EN Nijmegen > The Netherlands > E-Mail: d.lozanosoldevilla at fcdonders.ru.nl > Tel: +31-(0)24-36-66274 > Web: http://www.neuosc.com/ > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > -------------- next part -------------- An HTML attachment was scrubbed... URL: From frank.ye.mei at gmail.com Tue Jun 4 22:47:08 2013 From: frank.ye.mei at gmail.com (Frank Mei) Date: Tue, 4 Jun 2013 16:47:08 -0400 Subject: [FieldTrip] How to set a small window when doing source localization? Message-ID: Hello all, I want to be more precise in time, when doing source localization. So I tried to set a small cfg.toilim, before the 'ft_redefinetrial'. But if it is set smaller than 0.3(corresponding to 300ms), an error will pop up. How to solve that problem? thanks ahead, Ye Mei -------------- next part -------------- An HTML attachment was scrubbed... URL: From d.lozanosoldevilla at fcdonders.ru.nl Wed Jun 5 15:39:14 2013 From: d.lozanosoldevilla at fcdonders.ru.nl (Lozano Soldevilla, D. (Diego)) Date: Wed, 5 Jun 2013 15:39:14 +0200 (CEST) Subject: [FieldTrip] Private function problems In-Reply-To: Message-ID: <2127428772.1387542.1370439554352.JavaMail.root@sculptor.zimbra.ru.nl> Hi Andrew, Could you please check inside your matlab path there's the realtime/mri directory where ft_omri_pipeline_nuisance.m function is located? Mine looks like this: '/home/electromag/dieloz/matlab/ fieldtrip-dev/realtime/online_mri/ ' If it's there, you shouldn't have the private folder problem. Otherwise, add from the command window and tell me. best, Diego ----- Original Message ----- > From: "Andrew Brooks" > To: "Diego Lozano" , > "FieldTrip discussion list" > Sent: Tuesday, 4 June, 2013 5:01:43 PM > Subject: Re: [FieldTrip] Private function problems > Hello Diego, > I am using the example pipeline script from an earlier version of > FieldTrip (ft_omri_pipeline_nuisance). The exact code that is throwing > the error: curSixDof = hom2six(M). > I did run the three lines of code to reset the default paths, add > fieldtrip, and then ran ft_defaults. The version of FieldTrip I am > using is 20130602. > Thanks, > Andrew > On Mon, Jun 3, 2013 at 4:53 PM, Lozano Soldevilla, D. (Diego) < > d.lozanosoldevilla at fcdonders.ru.nl > wrote: > > Hi Andrew, > > Did you type the following? > > >> restoredefaultpath > > >> addpath /fieldtripxxxx > > >> ft_defaults > > What's the ft_* function you invoke to get the error 'undefined > > function 'hom2six'? And what's the fieldtrip version you're using? > > best, > > Diego > > > From: "Andrew Brooks" < andmib at gmail.com > > > > To: "FieldTrip discussion list" < fieldtrip at science.ru.nl > > > > Sent: Monday, 3 June, 2013 10:15:49 PM > > > Subject: [FieldTrip] Private function problems > > > Hello all, > > > I followed the instructions on properly adding FieldTrip to the > > > Matlab > > > path file. However, I continue to run into errors involving > > > private > > > functions. In this case, I get the error 'undefined function > > > 'hom2six' > > > for input arguments of type 'double''. > > > Does anybody have a suggestion as to why this is occurring? > > > Thanks! > > > Andrew > > > _______________________________________________ > > > fieldtrip mailing list > > > fieldtrip at donders.ru.nl > > > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > -- > > PhD Student > > Neuronal Oscillations Group > > Donders Institute for Brain, Cognition and Behaviour > > Centre for Cognitive Neuroimaging > > Trigon, room 0.83 > > Kapittelweg 29 > > Radboud University Nijmegen > > NL-6525 EN Nijmegen > > The Netherlands > > E-Mail: d.lozanosoldevilla at fcdonders.ru.nl > > Tel: +31-(0)24-36-66274 > > Web: http://www.neuosc.com/ > > _______________________________________________ > > fieldtrip mailing list > > fieldtrip at donders.ru.nl > > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -------------- next part -------------- An HTML attachment was scrubbed... URL: From elizabeth.bock at mcgill.ca Wed Jun 5 17:53:36 2013 From: elizabeth.bock at mcgill.ca (Elizabeth Anne Bock, Ms) Date: Wed, 5 Jun 2013 15:53:36 +0000 Subject: [FieldTrip] Polhemus Patriot In-Reply-To: <67D8C434-4D28-40C3-94A6-A95C86BD6B78@gmail.com> References: <67D8C434-4D28-40C3-94A6-A95C86BD6B78@gmail.com> Message-ID: <86D86365C4E767468A79EB52DFBFB46F051E242F@exmbx2010-8.campus.MCGILL.CA> Hi Julian, We have experienced this problem as well. We solved it using the following guidelines: No metal near the polhemus or any of the receivers/transmitters - you will need to move the setup around the room to find the perfect spot. Use a wooden or plastic chair Use plastic or cloth glasses/holder to attach the receiver to the subject My system is sensitive to the proximity of the transmitter and the receiver. I use two receivers, #1 is the stylus and #2 is secured to plastic glasses that the subject wears. The transmitter is taped to the back of the chair. If #2 and the transmitter are too close to each other (i.e. a short person or child), then the measurement are inaccurate. You would have to experiment with different distances that give good results. Hope this helps! Beth ------------------------------------------------------------------------------------------ Elizabeth Bock / MEG System Engineer McConnell Brain Imaging Centre / Montreal Neurological Institute McGill University / 3801 University St. / Montreal, QC H3A 2B4 Office: 514.398.3706 MEG Lab: 514.398.6056 Mobile: 514.718.6342 ________________________________ From: fieldtrip-bounces at science.ru.nl [fieldtrip-bounces at science.ru.nl] on behalf of Julian Keil [julian.keil at gmail.com] Sent: Monday, June 03, 2013 11:14 AM To: FieldTrip discussion list Subject: [FieldTrip] Polhemus Patriot Dear FieldTrip-Users, I have a not really FieldTrip-related question, but maybe one of you can help me anyways. In our lab, we have a Polhemus Patriot 3D tracking system to acquire electrode positions. Unfortunately, the recordings are severely distorted in the Z-axis (up-down). After contacting the Polhemus Support, I got the information, that this is due to metal in the surroundings of the source which distorts the magnetic field. I tried to get as far away from any metal as possible in our lab (~1.5 m to the walls and floor) but to no avail. Now to my question: Has anyone any experience dealing with this? I'm quite puzzled by this as I know plenty of labs use Polhemus trackers, and I'm not sure if our lab is especially metal prone or if I'm missing something. Thanks a lot for any help. Julian ******************** Dr. Julian Keil AG Multisensorische Integration Psychiatrische Universitätsklinik der Charité im St. Hedwig-Krankenhaus Große Hamburger Straße 5-11, Raum E 307 10115 Berlin Telefon: +49-30-2311-1879 Fax: +49-30-2311-2209 http://psy-ccm.charite.de/forschung/bildgebung/ag_multisensorische_integration -------------- next part -------------- An HTML attachment was scrubbed... URL: From julian.keil at gmail.com Wed Jun 5 18:02:55 2013 From: julian.keil at gmail.com (Julian Keil) Date: Wed, 5 Jun 2013 18:02:55 +0200 Subject: [FieldTrip] Polhemus Patriot In-Reply-To: <86D86365C4E767468A79EB52DFBFB46F051E242F@exmbx2010-8.campus.MCGILL.CA> References: <67D8C434-4D28-40C3-94A6-A95C86BD6B78@gmail.com> <86D86365C4E767468A79EB52DFBFB46F051E242F@exmbx2010-8.campus.MCGILL.CA> Message-ID: Dear all, thank you very much for your input. I'll have to experiment a bit more with the distance to the walls (which probably contain metal) and the chair. Thank you also for the idea with the second sensor, I hadn't tried this before. Best, Julian Am 05.06.2013 um 17:53 schrieb Elizabeth Anne Bock, Ms: > Hi Julian, > We have experienced this problem as well. We solved it using the following guidelines: > > No metal near the polhemus or any of the receivers/transmitters - you will need to move the setup around the room to find the perfect spot. > Use a wooden or plastic chair > Use plastic or cloth glasses/holder to attach the receiver to the subject > > My system is sensitive to the proximity of the transmitter and the receiver. I use two receivers, #1 is the stylus and #2 is secured to plastic glasses that the subject wears. The transmitter is taped to the back of the chair. If #2 and the transmitter are too close to each other (i.e. a short person or child), then the measurement are inaccurate. You would have to experiment with different distances that give good results. > > Hope this helps! > Beth > > ------------------------------------------------------------------------------------------ > Elizabeth Bock / MEG System Engineer > McConnell Brain Imaging Centre / Montreal Neurological Institute > McGill University / 3801 University St. / Montreal, QC H3A 2B4 > > Office: 514.398.3706 > MEG Lab: 514.398.6056 > Mobile: 514.718.6342 > From: fieldtrip-bounces at science.ru.nl [fieldtrip-bounces at science.ru.nl] on behalf of Julian Keil [julian.keil at gmail.com] > Sent: Monday, June 03, 2013 11:14 AM > To: FieldTrip discussion list > Subject: [FieldTrip] Polhemus Patriot > > Dear FieldTrip-Users, > > I have a not really FieldTrip-related question, but maybe one of you can help me anyways. > In our lab, we have a Polhemus Patriot 3D tracking system to acquire electrode positions. > Unfortunately, the recordings are severely distorted in the Z-axis (up-down). > After contacting the Polhemus Support, I got the information, that this is due to metal in the surroundings of the source which distorts the magnetic field. > I tried to get as far away from any metal as possible in our lab (~1.5 m to the walls and floor) but to no avail. > > Now to my question: Has anyone any experience dealing with this? I'm quite puzzled by this as I know plenty of labs use Polhemus trackers, and I'm not sure if our lab is especially metal prone or if I'm missing something. > > Thanks a lot for any help. > > Julian > > ******************** > Dr. Julian Keil > > AG Multisensorische Integration > Psychiatrische Universitätsklinik > der Charité im St. Hedwig-Krankenhaus > Große Hamburger Straße 5-11, Raum E 307 > 10115 Berlin > > Telefon: +49-30-2311-1879 > Fax: +49-30-2311-2209 > http://psy-ccm.charite.de/forschung/bildgebung/ag_multisensorische_integration > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -------------- next part -------------- An HTML attachment was scrubbed... URL: From mje.mads at gmail.com Thu Jun 6 09:16:01 2013 From: mje.mads at gmail.com (Mads Jensen) Date: Thu, 06 Jun 2013 09:16:01 +0200 Subject: [FieldTrip] Extracting the time of a cluster Message-ID: <51B03731.2080303@gmail.com> Dear all, I have made a statistics analysis on ERP data using ft_timelockstatistics and got a significant cluster I would like to know the time course of this cluster(i.e. when it starts and ends being significant) , is that possible? I take to the cirange that is computed in the output for the cluster from ft_timelockstatistics be the upper and lower limit of the confidence interval, so the cluster.prop +/- the cirange gives the 95%confidence intervals. Is that correct? best wishes, Mads From jm.horschig at donders.ru.nl Thu Jun 6 10:17:50 2013 From: jm.horschig at donders.ru.nl (=?ISO-8859-1?Q?=22J=F6rn_M=2E_Horschig=22?=) Date: Thu, 06 Jun 2013 10:17:50 +0200 Subject: [FieldTrip] Extracting the time of a cluster In-Reply-To: <51B03731.2080303@gmail.com> References: <51B03731.2080303@gmail.com> Message-ID: <51B045AE.3010305@donders.ru.nl> Hi Mads, there is a stats.posclusterlabelmat and stats.negclusterlabelmat field, which contain the indices of all your clusters. You can use these indices and to index the period where your test shows some significant effect(e.g. for timelock.avg or timelock.time). See here for an example, which does not quite do what you want, but gets close http://fieldtrip.fcdonders.nl/tutorial/cluster_permutation_timelock#plotting_the_results And, yes, cirange defines the range of the confidence interval for that particular cluster, so pvalue - cirange gives the lower bound and pvalue + cirange the upper bound. If your upper bound extends beyond the critical alpha-value, I would advise to use more randomizations. Best, Jörn On 6/6/2013 9:16 AM, Mads Jensen wrote: > Dear all, > > I have made a statistics analysis on ERP data using > ft_timelockstatistics and got a significant cluster I would like to > know the time course of this cluster(i.e. when it starts and ends > being significant) , is that possible? > > I take to the cirange that is computed in the output for the cluster > from ft_timelockstatistics be the upper and lower limit of the > confidence interval, so the cluster.prop +/- the cirange gives the > 95%confidence intervals. Is that correct? > > best wishes, > Mads > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -- Jörn M. Horschig PhD Student Donders Institute for Brain, Cognition and Behaviour Centre for Cognitive Neuroimaging Radboud University Nijmegen Neuronal Oscillations Group FieldTrip Development Team P.O. Box 9101 NL-6500 HB Nijmegen The Netherlands Contact: E-Mail: jm.horschig at donders.ru.nl Tel: +31-(0)24-36-68493 Web: http://www.ru.nl/donders Visiting address: Trigon, room 2.30 Kapittelweg 29 NL-6525 EN Nijmegen The Netherlands From mje.mads at gmail.com Thu Jun 6 12:48:02 2013 From: mje.mads at gmail.com (Mads Jensen) Date: Thu, 06 Jun 2013 12:48:02 +0200 Subject: [FieldTrip] Extracting the time of a cluster In-Reply-To: <51B045AE.3010305@donders.ru.nl> References: <51B03731.2080303@gmail.com> <51B045AE.3010305@donders.ru.nl> Message-ID: <51B068E2.3010500@gmail.com> Hi Jörn, thanks for the swift and very useful reply. best, mads On 06/06/13 10:17, "Jörn M. Horschig" wrote: > Hi Mads, > > there is a stats.posclusterlabelmat and stats.negclusterlabelmat field, > which contain the indices of all your clusters. You can use these > indices and to index the period where your test shows some significant > effect(e.g. for timelock.avg or timelock.time). See here for an example, > which does not quite do what you want, but gets close > http://fieldtrip.fcdonders.nl/tutorial/cluster_permutation_timelock#plotting_the_results > > > And, yes, cirange defines the range of the confidence interval for that > particular cluster, so pvalue - cirange gives the lower bound and pvalue > + cirange the upper bound. If your upper bound extends beyond the > critical alpha-value, I would advise to use more randomizations. > > Best, > Jörn > > On 6/6/2013 9:16 AM, Mads Jensen wrote: >> Dear all, >> >> I have made a statistics analysis on ERP data using >> ft_timelockstatistics and got a significant cluster I would like to >> know the time course of this cluster(i.e. when it starts and ends >> being significant) , is that possible? >> >> I take to the cirange that is computed in the output for the cluster >> from ft_timelockstatistics be the upper and lower limit of the >> confidence interval, so the cluster.prop +/- the cirange gives the >> 95%confidence intervals. Is that correct? >> >> best wishes, >> Mads >> _______________________________________________ >> fieldtrip mailing list >> fieldtrip at donders.ru.nl >> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > From antony.passaro at gmail.com Thu Jun 6 15:59:22 2013 From: antony.passaro at gmail.com (Antony Passaro) Date: Thu, 6 Jun 2013 09:59:22 -0400 Subject: [FieldTrip] Statistics for correlation across subjects using cluster analysis Message-ID: Hi, I came across an email in the mailing list archives from this time last year when a user ( Ingrid ) was asking about using a statistical model with a cluster analysis to correct for multiple comparisons based on performing a correlation across trials (and/or subjects). Jan-mathijs replied saying he had a copy of statfun_corr and statfun_glm but I don't see a copy of either of those functions in the latest fieldtrip release. Would anyone be so kind as to point my in the right directions to tackle this problem? Thank you, -Tony -------------- next part -------------- An HTML attachment was scrubbed... URL: From andmib at gmail.com Thu Jun 6 17:06:25 2013 From: andmib at gmail.com (Andrew Brooks) Date: Thu, 6 Jun 2013 11:06:25 -0400 Subject: [FieldTrip] Private function problems In-Reply-To: <2127428772.1387542.1370439554352.JavaMail.root@sculptor.zimbra.ru.nl> References: <2127428772.1387542.1370439554352.JavaMail.root@sculptor.zimbra.ru.nl> Message-ID: Diego, Thank you, that was indeed the problem. I had moved the ft_omri_pipeline script out of the /realtime/online_mri directory, which caused the problems. Thanks, Andrew On Wed, Jun 5, 2013 at 9:39 AM, Lozano Soldevilla, D. (Diego) < d.lozanosoldevilla at fcdonders.ru.nl> wrote: > Hi Andrew, > > Could you please check inside your matlab path there's the realtime/mri > directory where ft_omri_pipeline_nuisance.m function is located? > > Mine looks like this: > > '/home/electromag/dieloz/matlab/*fieldtrip-dev/realtime/online_mri/*' > > If it's there, you shouldn't have the private folder problem. Otherwise, > add from the command window and tell me. > > best, > > Diego > > ------------------------------ > > *From: *"Andrew Brooks" > *To: *"Diego Lozano" , "FieldTrip > discussion list" > *Sent: *Tuesday, 4 June, 2013 5:01:43 PM > *Subject: *Re: [FieldTrip] Private function problems > > > Hello Diego, > > I am using the example pipeline script from an earlier version of > FieldTrip (ft_omri_pipeline_nuisance). The exact code that is throwing the > error: curSixDof = hom2six(M). > > I did run the three lines of code to reset the default paths, add > fieldtrip, and then ran ft_defaults. The version of FieldTrip I am using is > 20130602. > > Thanks, > Andrew > > > > > > > On Mon, Jun 3, 2013 at 4:53 PM, Lozano Soldevilla, D. (Diego) < > d.lozanosoldevilla at fcdonders.ru.nl> wrote: > >> Hi Andrew, >> >> Did you type the following? >> >> >> restoredefaultpath >> >> addpath /fieldtripxxxx >> >> ft_defaults >> >> What's the ft_* function you invoke to get the error 'undefined function >> 'hom2six'? And what's the fieldtrip version you're using? >> >> best, >> >> Diego >> >> ------------------------------ >> >> *From: *"Andrew Brooks" >> *To: *"FieldTrip discussion list" >> *Sent: *Monday, 3 June, 2013 10:15:49 PM >> *Subject: *[FieldTrip] Private function problems >> >> >> Hello all, >> >> I followed the instructions on properly adding FieldTrip to the Matlab >> path file. However, I continue to run into errors involving private >> functions. In this case, I get the error 'undefined function 'hom2six' for >> input arguments of type 'double''. >> >> Does anybody have a suggestion as to why this is occurring? >> >> Thanks! >> Andrew >> >> _______________________________________________ >> fieldtrip mailing list >> fieldtrip at donders.ru.nl >> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip >> >> >> >> >> -- >> PhD Student >> Neuronal Oscillations Group >> Donders Institute for Brain, Cognition and Behaviour >> Centre for Cognitive Neuroimaging >> Trigon, room 0.83 >> Kapittelweg 29 >> Radboud University Nijmegen >> NL-6525 EN Nijmegen >> The Netherlands >> E-Mail: d.lozanosoldevilla at fcdonders.ru.nl >> Tel: +31-(0)24-36-66274 >> Web: http://www.neuosc.com/ >> >> _______________________________________________ >> fieldtrip mailing list >> fieldtrip at donders.ru.nl >> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip >> > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > -------------- next part -------------- An HTML attachment was scrubbed... URL: From jkamienk at gmail.com Thu Jun 6 17:49:27 2013 From: jkamienk at gmail.com (Juan Kamienkowski) Date: Thu, 6 Jun 2013 12:49:27 -0300 Subject: [FieldTrip] Oscillatory power normalization In-Reply-To: References: Message-ID: Hi everybody, More than one year later we come up with the same questions. Does anybody have suggestions on this topic? Thanks a lot! Best, juan On Fri, Mar 9, 2012 at 4:16 PM, Matt Mollison wrote: > My questions essentially boil down to: what do people do for power > normalization when assessing statistical differences? > > It gets more detailed below regarding examining event-related power > changes relative to a baseline (within-subjects, comparing two conditions, > stimulus onset = 0 ms). I didn't find much discussion of this on the list > or the wiki. Any references for these issues would also be appreciated. > > (1) Does power data need to be baseline normalized for statistical tests > comparing conditions? Normalization would put power on equal footing across > all subjects, conditions, sensors, times, frequencies, etc., but it will > surely affect power during the stimulus period in a particular way. If so, > do the two (or more) conditions need to use the same baseline condition, or > can each trial be normalized to its own pre-stim baseline period (a la > ft_freqbaseline)? For either, it seems like you'd always need > keeptrials='yes' in ft_freqanalysis. However, it does not seem to get > normalized in the cluster_permutation_freq tutorial (within-subjects)---am > I missing something? > > If we should normalize: > (2) I've read a number of papers that Z-transform stimulus period power > relative to pre-stim activity (subtract mean, divide by std) before doing > statistics. I've also read a lot that don't mention baselines, or e.g. do a > decibel [dB] transform. ft_freqbaseline does not have a Z-transform option. > There is ft_preproc_standardize, but this seems to operate at a lower level > than is usually recommended. Z-transforming seems like a good option, but > how can I use it in the FT pipeline for within-subjects analyses > (especially with keeptrials='no')? Alternatively, when should one use > 'absolute', 'relative', or 'relchange'? > > Regarding choosing the baseline period: > (3) It seems that the baseline period needs to precede stimulus onset by a > sufficient amount of time so that the stimulus period doesn't bleed into > the baseline; this time would be specific to both the frequency and either > wavelet width or taper window length. For example, at 4 Hz with wavelet > width=6 or a taper with 6 cycles per time window (t_ftimwin) the > wavelet/window would be 1500 ms long, and the end of the baseline must > precede stimulus onset by at least half this to keep them separate. At > lower frequencies this could get quite unruly (e.g., 1 Hz would require > ending 3000 ms before stimulus). Is this correct? Maybe that's why it's > better to have a single separate baseline condition. Anyway, the > timefrequencyanalysis tutorial seems to disregard this separation of > baseline and stimulus activity (as have many papers I've read), so maybe > I'm wrong about this being necessary. > > Thanks for your time, > Matt Mollison > > -- > Univ. of Colorado at Boulder > Dept. of Psychology and Neuroscience > matthew.mollison at colorado.edu > http://psych.colorado.edu/~mollison/ > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > -- Juan E Kamienkowski Laboratorio de Neurociencia Integrativa Departamento de Fisica, FCEN-UBA Ciudad Universitaria, Pabellon I (1428) Buenos Aires, Argentina Phone: (54-11) 4576 3300 (282) Fax: (54-11) 4576 3357 http://www.neurociencia.df.uba.ar/ -------------- next part -------------- An HTML attachment was scrubbed... URL: From S.J.Johnston at swansea.ac.uk Fri Jun 7 11:23:20 2013 From: S.J.Johnston at swansea.ac.uk (Steve Johnston) Date: Fri, 7 Jun 2013 10:23:20 +0100 Subject: [FieldTrip] Bad channel correction problems and ICA Message-ID: <55D211F2-5D76-43EE-B41A-EA05C8FFCE6F@swansea.ac.uk> Dear fters I've just started using ft and, although being able to run through a test run of eye movement data just fine, I'm now getting into the more detailed stuff and I'm hitting a snag that I hope you can help me with. Specifically I'm struggling to get any real ICA results after using ft_channelrepair but not if I go through without it. Data was recorded on a biosemi 128 system and the trials are just eye movements that I want to identify via ICA (simple test). If I just run through the procedure of importing data, set markers, remove gross artifacts (keeping all channels, including 3 bad ones) and then run the ICA - I get lovely eye movement components appearing. However, now I want to do it 'properly' and replace the bad channels. Currently I do the following … (sorry, for completeness I included everything to be on the safe side). %% % Standard cfg for import cfg = []; cfg.trialdef.prestim = .2; cfg.trialdef.poststim = 2; cfg.trialdef.eventtype = 'STATUS'; %% %Load each dataset and examine for channels that are bad - starting with EOG Localiser. cfg.dataset = [subjectdata.dir filesep subjectdata.artifactfile]; cfg.trialdef.eventvalue = markers.artifact; cfg = ft_definetrial(cfg); cfg.demean = 'yes'; data = ft_preprocessing(cfg); % After the above, run ChannelRepair after identifying bad channels. %% % Channel Replace - get nearest neighbours cfg = []; cfg.method = 'distance' cfg.layout = 'biosemi128.lay'; cfg.neighbourdist = 0.13; [neighbours] = ft_prepare_neighbours(cfg,data) %% Interpolate and put into new data structure cfg = []; cfg.badchannel = replace_channels; cfg.layout = 'biosemi128.lay'; cfg.method = 'nearest'; cfg.neighbours = neighbours; cfg.neighbourdist = 0.13; artifact_cleandata = ft_channelrepair(cfg,data) % Visualise data for and mark uncorrectable artifacts. cfg.viewmode = 'vertical'; cfg.continuous = 'yes'; cfg.blocksize = 12; cfg = ft_databrowser(cfg,artifact_cleandata) %% % Do artifact rejection (also redefine settings lost during re-cfg in artefact rejection) cfg.trialdef.prestim = .2; cfg.trialdef.poststim = 2; cfg.trialdef.eventtype = 'STATUS'; cfg.artifact.reject = 'complete'; cfg.channel = 'EEG'; cfg = ft_rejectartifact(cfg, artifact_cleandata); trialdata = ft_preprocessing(cfg, artifact_cleandata); %% cfg = []; comp = ft_componentanalysis(cfg, trialdata); cfg = []; cfg.component = [1:20] cfg.layout = 'biosemi128.lay' cfg.comment = 'no' ft_topoplotIC(cfg,comp) So, the big question is - why do I get nothing after doing the channel repair. I've been through it several times and that seems to be the step where everything goes wrong. I've looked at the data post re-interpolation and it looks good - for now I'm assuming I've missed something. Thanks for any help Steve -------------- next part -------------- An HTML attachment was scrubbed... URL: From jm.horschig at donders.ru.nl Fri Jun 7 11:47:11 2013 From: jm.horschig at donders.ru.nl (=?ISO-8859-1?Q?=22J=F6rn_M=2E_Horschig=22?=) Date: Fri, 07 Jun 2013 11:47:11 +0200 Subject: [FieldTrip] Bad channel correction problems and ICA In-Reply-To: <55D211F2-5D76-43EE-B41A-EA05C8FFCE6F@swansea.ac.uk> References: <55D211F2-5D76-43EE-B41A-EA05C8FFCE6F@swansea.ac.uk> Message-ID: <51B1AC1F.1010008@donders.ru.nl> Hi Steve, I'm not quite sure what you mean with getting nothing (nothing like, empty? or an error?) or not getting real ICA results (real in contrast to complex?). My hunge is that you need to take the rank of your data into account. Interpolating missing channels is done by combining already existing information, i.e. channels, to reconstruct a time-course at another spatial location, i.e. another channel. Since you do not add any new information by this (it's just a linear combination of your existing data matrix), you can leave that step out prior to doing ICA. Otherwise, you can set something like ica_cfg.XXXica.pca = rank(data.trial{1}), then afaik ft_componentanalysis will perform a PCA and essentially identify that the interpolated channels are a linear combination of other channels (ICA is then done of the PCA components). Both methods are equivalent, so you might as well just drop the interpolation and remove bad channels completely. Best, Jörn On 6/7/2013 11:23 AM, Steve Johnston wrote: > Dear fters > > I've just started using ft and, although being able to run through a > test run of eye movement data just fine, I'm now getting into the more > detailed stuff and I'm hitting a snag that I hope you can help me with. > > Specifically I'm struggling to get any real ICA results after using > ft_channelrepair but not if I go through without it. > > Data was recorded on a biosemi 128 system and the trials are just eye > movements that I want to identify via ICA (simple test). > > If I just run through the procedure of importing data, set markers, > remove gross artifacts (keeping all channels, including 3 bad ones) > and then run the ICA - I get lovely eye movement components appearing. > However, now I want to do it 'properly' and replace the bad channels. > Currently I do the following ... (sorry, for completeness I included > everything to be on the safe side). > > %% > % Standard cfg for import > > cfg = []; > cfg.trialdef.prestim = .2; > cfg.trialdef.poststim = 2; > cfg.trialdef.eventtype = 'STATUS'; > > %% > %Load each dataset and examine for channels that are bad - starting > with EOG Localiser. > > cfg.dataset = [subjectdata.dir filesep > subjectdata.artifactfile]; > cfg.trialdef.eventvalue = markers.artifact; > cfg = ft_definetrial(cfg); > > cfg.demean = 'yes'; > data = ft_preprocessing(cfg); > > % After the above, run ChannelRepair after identifying bad channels. > %% > % Channel Replace - get nearest neighbours > cfg = []; > cfg.method = 'distance' > cfg.layout = 'biosemi128.lay'; > cfg.neighbourdist = 0.13; > [neighbours] = ft_prepare_neighbours(cfg,data) > > %% Interpolate and put into new data structure > cfg = []; > cfg.badchannel = replace_channels; > cfg.layout = 'biosemi128.lay'; > cfg.method = 'nearest'; > cfg.neighbours = neighbours; > cfg.neighbourdist = 0.13; > artifact_cleandata = ft_channelrepair(cfg,data) > > % Visualise data for and mark uncorrectable artifacts. > cfg.viewmode = 'vertical'; > cfg.continuous = 'yes'; > cfg.blocksize = 12; > cfg = ft_databrowser(cfg,artifact_cleandata) > > %% > % Do artifact rejection (also redefine settings lost during re-cfg in > artefact rejection) > cfg.trialdef.prestim = .2; > cfg.trialdef.poststim = 2; > cfg.trialdef.eventtype = 'STATUS'; > cfg.artifact.reject = 'complete'; > cfg.channel = 'EEG'; > cfg = ft_rejectartifact(cfg, artifact_cleandata); > trialdata = ft_preprocessing(cfg, artifact_cleandata); > > %% > cfg = []; > comp = ft_componentanalysis(cfg, trialdata); > cfg = []; > cfg.component = [1:20] > cfg.layout = 'biosemi128.lay' > cfg.comment = 'no' > ft_topoplotIC(cfg,comp) > > So, the big question is - why do I get nothing after doing the channel > repair. I've been through it several times and that seems to be the > step where everything goes wrong. I've looked at the data post > re-interpolation and it looks good - for now I'm assuming I've missed > something. > > Thanks for any help > > Steve > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -- Jörn M. Horschig PhD Student Donders Institute for Brain, Cognition and Behaviour Centre for Cognitive Neuroimaging Radboud University Nijmegen Neuronal Oscillations Group FieldTrip Development Team P.O. Box 9101 NL-6500 HB Nijmegen The Netherlands Contact: E-Mail: jm.horschig at donders.ru.nl Tel: +31-(0)24-36-68493 Web: http://www.ru.nl/donders Visiting address: Trigon, room 2.30 Kapittelweg 29 NL-6525 EN Nijmegen The Netherlands -------------- next part -------------- An HTML attachment was scrubbed... URL: From S.J.Johnston at swansea.ac.uk Fri Jun 7 11:59:10 2013 From: S.J.Johnston at swansea.ac.uk (Steve Johnston) Date: Fri, 7 Jun 2013 10:59:10 +0100 Subject: [FieldTrip] fieldtrip Digest, Vol 31, Issue 15 In-Reply-To: References: Message-ID: <49AE80C3-1CA6-402B-8819-3140FCFF7DC3@swansea.ac.uk> Thanks, and sorry, that was a pretty poor description of the results by me. Yes, I am getting a result, but the error/warning is 'Warning: Matrix is close to singular or badly scaled. Results may be inaccurate. RCOND = 1.376132e-17. ' I figured that matrix singularity may have been the problem, although I hadn't appreciated that replacing only three channels could lead to it - I was expecting that to result from more channel replacements or using a lot of electrodes to interpolate with. Thanks a lot for the help, will try as you suggest Steve > > > ---------------------------------------------------------------------- > > Message: 1 > Date: Fri, 7 Jun 2013 10:23:20 +0100 > From: Steve Johnston > To: "fieldtrip at science.ru.nl" > Subject: [FieldTrip] Bad channel correction problems and ICA > Message-ID: <55D211F2-5D76-43EE-B41A-EA05C8FFCE6F at swansea.ac.uk> > Content-Type: text/plain; charset="windows-1252" > > Dear fters > > I've just started using ft and, although being able to run through a test run of eye movement data just fine, I'm now getting into the more detailed stuff and I'm hitting a snag that I hope you can help me with. > > Specifically I'm struggling to get any real ICA results after using ft_channelrepair but not if I go through without it. > > Data was recorded on a biosemi 128 system and the trials are just eye movements that I want to identify via ICA (simple test). > > If I just run through the procedure of importing data, set markers, remove gross artifacts (keeping all channels, including 3 bad ones) and then run the ICA - I get lovely eye movement components appearing. However, now I want to do it 'properly' and replace the bad channels. Currently I do the following ? (sorry, for completeness I included everything to be on the safe side). > > %% > % Standard cfg for import > > cfg = []; > cfg.trialdef.prestim = .2; > cfg.trialdef.poststim = 2; > cfg.trialdef.eventtype = 'STATUS'; > > %% > %Load each dataset and examine for channels that are bad - starting with EOG Localiser. > > cfg.dataset = [subjectdata.dir filesep subjectdata.artifactfile]; > cfg.trialdef.eventvalue = markers.artifact; > cfg = ft_definetrial(cfg); > > cfg.demean = 'yes'; > data = ft_preprocessing(cfg); > > % After the above, run ChannelRepair after identifying bad channels. > %% > % Channel Replace - get nearest neighbours > cfg = []; > cfg.method = 'distance' > cfg.layout = 'biosemi128.lay'; > cfg.neighbourdist = 0.13; > [neighbours] = ft_prepare_neighbours(cfg,data) > > %% Interpolate and put into new data structure > cfg = []; > cfg.badchannel = replace_channels; > cfg.layout = 'biosemi128.lay'; > cfg.method = 'nearest'; > cfg.neighbours = neighbours; > cfg.neighbourdist = 0.13; > artifact_cleandata = ft_channelrepair(cfg,data) > > % Visualise data for and mark uncorrectable artifacts. > cfg.viewmode = 'vertical'; > cfg.continuous = 'yes'; > cfg.blocksize = 12; > cfg = ft_databrowser(cfg,artifact_cleandata) > > %% > % Do artifact rejection (also redefine settings lost during re-cfg in artefact rejection) > cfg.trialdef.prestim = .2; > cfg.trialdef.poststim = 2; > cfg.trialdef.eventtype = 'STATUS'; > cfg.artifact.reject = 'complete'; > cfg.channel = 'EEG'; > cfg = ft_rejectartifact(cfg, artifact_cleandata); > trialdata = ft_preprocessing(cfg, artifact_cleandata); > > %% > cfg = []; > comp = ft_componentanalysis(cfg, trialdata); > cfg = []; > cfg.component = [1:20] > cfg.layout = 'biosemi128.lay' > cfg.comment = 'no' > ft_topoplotIC(cfg,comp) > > So, the big question is - why do I get nothing after doing the channel repair. I've been through it several times and that seems to be the step where everything goes wrong. I've looked at the data post re-interpolation and it looks good - for now I'm assuming I've missed something. > > Thanks for any help > > Steve > -------------- next part -------------- > An HTML attachment was scrubbed... > URL: > > ------------------------------ > > Message: 2 > Date: Fri, 07 Jun 2013 11:47:11 +0200 > From: "J?rn M. Horschig" > To: FieldTrip discussion list > Subject: Re: [FieldTrip] Bad channel correction problems and ICA > Message-ID: <51B1AC1F.1010008 at donders.ru.nl> > Content-Type: text/plain; charset="iso-8859-1"; Format="flowed" > > Hi Steve, > > I'm not quite sure what you mean with getting nothing (nothing like, > empty? or an error?) or not getting real ICA results (real in contrast > to complex?). My hunge is that you need to take the rank of your data > into account. Interpolating missing channels is done by combining > already existing information, i.e. channels, to reconstruct a > time-course at another spatial location, i.e. another channel. Since you > do not add any new information by this (it's just a linear combination > of your existing data matrix), you can leave that step out prior to > doing ICA. Otherwise, you can set something like ica_cfg.XXXica.pca = > rank(data.trial{1}), then afaik ft_componentanalysis will perform a PCA > and essentially identify that the interpolated channels are a linear > combination of other channels (ICA is then done of the PCA components). > Both methods are equivalent, so you might as well just drop the > interpolation and remove bad channels completely. > > Best, > J?rn > > > On 6/7/2013 11:23 AM, Steve Johnston wrote: >> Dear fters >> >> I've just started using ft and, although being able to run through a >> test run of eye movement data just fine, I'm now getting into the more >> detailed stuff and I'm hitting a snag that I hope you can help me with. >> >> Specifically I'm struggling to get any real ICA results after using >> ft_channelrepair but not if I go through without it. >> >> Data was recorded on a biosemi 128 system and the trials are just eye >> movements that I want to identify via ICA (simple test). >> >> If I just run through the procedure of importing data, set markers, >> remove gross artifacts (keeping all channels, including 3 bad ones) >> and then run the ICA - I get lovely eye movement components appearing. >> However, now I want to do it 'properly' and replace the bad channels. >> Currently I do the following ... (sorry, for completeness I included >> everything to be on the safe side). >> >> %% >> % Standard cfg for import >> >> cfg = []; >> cfg.trialdef.prestim = .2; >> cfg.trialdef.poststim = 2; >> cfg.trialdef.eventtype = 'STATUS'; >> >> %% >> %Load each dataset and examine for channels that are bad - starting >> with EOG Localiser. >> >> cfg.dataset = [subjectdata.dir filesep >> subjectdata.artifactfile]; >> cfg.trialdef.eventvalue = markers.artifact; >> cfg = ft_definetrial(cfg); >> >> cfg.demean = 'yes'; >> data = ft_preprocessing(cfg); >> >> % After the above, run ChannelRepair after identifying bad channels. >> %% >> % Channel Replace - get nearest neighbours >> cfg = []; >> cfg.method = 'distance' >> cfg.layout = 'biosemi128.lay'; >> cfg.neighbourdist = 0.13; >> [neighbours] = ft_prepare_neighbours(cfg,data) >> >> %% Interpolate and put into new data structure >> cfg = []; >> cfg.badchannel = replace_channels; >> cfg.layout = 'biosemi128.lay'; >> cfg.method = 'nearest'; >> cfg.neighbours = neighbours; >> cfg.neighbourdist = 0.13; >> artifact_cleandata = ft_channelrepair(cfg,data) >> >> % Visualise data for and mark uncorrectable artifacts. >> cfg.viewmode = 'vertical'; >> cfg.continuous = 'yes'; >> cfg.blocksize = 12; >> cfg = ft_databrowser(cfg,artifact_cleandata) >> >> %% >> % Do artifact rejection (also redefine settings lost during re-cfg in >> artefact rejection) >> cfg.trialdef.prestim = .2; >> cfg.trialdef.poststim = 2; >> cfg.trialdef.eventtype = 'STATUS'; >> cfg.artifact.reject = 'complete'; >> cfg.channel = 'EEG'; >> cfg = ft_rejectartifact(cfg, artifact_cleandata); >> trialdata = ft_preprocessing(cfg, artifact_cleandata); >> >> %% >> cfg = []; >> comp = ft_componentanalysis(cfg, trialdata); >> cfg = []; >> cfg.component = [1:20] >> cfg.layout = 'biosemi128.lay' >> cfg.comment = 'no' >> ft_topoplotIC(cfg,comp) >> >> So, the big question is - why do I get nothing after doing the channel >> repair. I've been through it several times and that seems to be the >> step where everything goes wrong. I've looked at the data post >> re-interpolation and it looks good - for now I'm assuming I've missed >> something. >> >> Thanks for any help >> >> Steve >> >> >> _______________________________________________ >> fieldtrip mailing list >> fieldtrip at donders.ru.nl >> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > > -- > J?rn M. Horschig > PhD Student > Donders Institute for Brain, Cognition and Behaviour > Centre for Cognitive Neuroimaging > Radboud University Nijmegen > Neuronal Oscillations Group > FieldTrip Development Team > > P.O. Box 9101 > NL-6500 HB Nijmegen > The Netherlands > > Contact: > E-Mail: jm.horschig at donders.ru.nl > Tel: +31-(0)24-36-68493 > Web: http://www.ru.nl/donders > > Visiting address: > Trigon, room 2.30 > Kapittelweg 29 > NL-6525 EN Nijmegen > The Netherlands > > -------------- next part -------------- > An HTML attachment was scrubbed... > URL: > > ------------------------------ > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > End of fieldtrip Digest, Vol 31, Issue 15 > ***************************************** From robince at gmail.com Fri Jun 7 17:03:21 2013 From: robince at gmail.com (Robin) Date: Fri, 7 Jun 2013 16:03:21 +0100 Subject: [FieldTrip] some of the requested samples occur twice In-Reply-To: <51AC623A.1080207@donders.ru.nl> References: <51AC623A.1080207@donders.ru.nl> Message-ID: Hi Jörn, Thanks. I am already using negative trlpadding. In this case I am trying to do the artifact detection on in memory trial data, because I want to do it after denoise_pca. I am not sure if this is correct but it seemed to me that denoise_pca is to correct physical aquisition artifacts so it would be better to do it before trying to identify biological artifacts that are a part of the recorded signal. The code I am using is below. If you could point out how to add padding for the ft*artifact* section so that it can work on in memory data it would be great. Thanks, Robin %% Automatic artifact rejection % for each run run_data = cell(1,length(sub.blocks)); trl_idx = 0; for ri=1:length(sub.blocks) % extra data to allow padding in artifact detection filterpad = 0.2; prestim = 0.5; poststim = 0.6; % extract trials cfg = []; cfg.dataset = fullfile(sub.megDataPath, num2str(sub.blocks(ri)), 'c,rfDC'); cfg.trialdef.eventtype = 'TRIGGER'; cfg.trialdef.eventvalue = 192; cfg.trialdef.prestim = prestim + filterpad; cfg.trialdef.poststim = poststim + filterpad; cfg.trialfun = 'ft_trialfun_general'; cfg.continuous = 'yes'; cfg = ft_definetrial(cfg); % overwrite unnecessary constant eventvalue % with trial number within this block cfg.trl(:,4) = (1:size(cfg.trl,1)) + trl_idx; trl_idx = trl_idx + size(cfg.trl,1); % remove jump artifact trials trlidx = ismember(cfg.trl(:,4), good_trials); cfg.trl = cfg.trl(trlidx, :); % load cfg.detrend = 'yes'; % long padding for line noise removal cfg.dftfilter = 'yes'; cfg.padding = 10; run_raw = ft_preprocessing(cfg); % apply denoise_pca cfg = []; if isfield(sub,'posthoc_badchannels') remove_chans = sub.posthoc_badchannels; else remove_chans = {}; end cfg.channel = ft_channelselection([{'all'} remove_chans], good_meg_channels); cfg.trials = find(ismember(run_raw.trialinfo, good_trials)); run_clean = ft_denoise_pca(cfg, run_raw); % artifact detection cfg = []; cfg.continuous = 'no'; % some trials are excluded cfg.trl = run_clean.sampleinfo; cfg.artfctdef.muscle.trlpadding = -filterpad; cfg.artfctdef.muscle.cutoff = 20; [cfg, artifact] = ft_artifact_muscle(cfg, run_clean); cfg.artfctdef.eog.trlpadding = -filterpad; cfg.artfctdef.eog.channel = {'A150' 'A124'}; cfg.artfctdef.eog.cutoff = 5; [cfg, artifact] = ft_artifact_eog(cfg, run_clean); % reject artifacts cfg.artfctdef.reject = 'complete'; run_artfree = ft_rejectartifact(cfg, run_clean); % reduce to the original window cfg = []; cfg.toilim = [-prestim poststim]; run_artfree = ft_redefinetrial(cfg, run_artfree); run_data{ri} = run_artfree;end On Mon, Jun 3, 2013 at 10:30 AM, "Jörn M. Horschig" < jm.horschig at donders.ru.nl> wrote: Hi Robin, > > it's not a bug that ft_fetch_data is not allowing for overlap. The > function needs to be generic and eventually allow for fetching data > extending over several trial segments. However, what should be the way to > fetch data that occurs twice, i.e. at the end of one trial and the > beginning of another? If you have data with overlapping samples, it is not > straight forward to define data from one trial as to be fetched and ignore > the other. Since preprocessing options like filters are applied per trial > segment, data will differ between trial segments if it overlaps. As there > are a multitude of possibilities to deal with this and none of them is > perfect (imho neither of them can even be called good), we decided to not > allow for that. > > For your problem, however, imho you can define negative trial padding in > the function call to ft_artifact_zvalue, which should effectively pad. Have > you tried this rather than padding manually? > > Best, > Jörn > > > On 5/31/2013 6:14 PM, Robin wrote: > >> I have a problem in preprocessing where I am getting this error: >> >> """ >> some of the requested samples occur twice in the data >> >> Error in ft_artifact_zvalue (line 262) >> dat{trlop} = ft_fetch_data(data, 'header', hdr, 'begsample', >> trl(trlop,1)-fltpadding, 'endsample', trl(trlop,2)+fltpadding, >> 'chanindx', sgnind, 'checkboundary', strcmp(cfg.continuous,'no >> Error in ft_artifact_muscle (line 158) >> [tmpcfg, artifact] = ft_artifact_zvalue(tmpcfg, data); >> """ >> >> I think this is because I am manually adding some extra padding to the >> trials so that the artifact filtering can use that padding (I am doing >> the artifact filtering on data in memory which is output from >> ft_denoise_pca). So in this case it is not a problem if consecutive >> trials overlap a bit. >> >> I would therefore like to disable this error and wondered what is the >> best way to do it. I am a bit confused because ft_artifact_zvalue >> calls ft_fetch data with a "checkboundary" option which looks like it >> might be what I want (and set correctly), but ft_fetch_data doesn't >> seem to use that option. Instead it has an allowoverlap option. >> >> So for now I will manually add the allowoverlap option to the call in >> ft_artifact_zvalue, but I wondered what checkboundary doesn't appear >> in ft_fetch_data or if this might be a bug. >> >> Cheers >> >> Robin >> ______________________________**_________________ >> fieldtrip mailing list >> fieldtrip at donders.ru.nl >> http://mailman.science.ru.nl/**mailman/listinfo/fieldtrip >> > > > -- > Jörn M. Horschig > PhD Student > Donders Institute for Brain, Cognition and Behaviour > Centre for Cognitive Neuroimaging > Radboud University Nijmegen > Neuronal Oscillations Group > FieldTrip Development Team > > P.O. Box 9101 > NL-6500 HB Nijmegen > The Netherlands > > Contact: > E-Mail: jm.horschig at donders.ru.nl > Tel: +31-(0)24-36-68493 > Web: http://www.ru.nl/donders > > Visiting address: > Trigon, room 2.30 > Kapittelweg 29 > NL-6525 EN Nijmegen > The Netherlands > > ______________________________**_________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/**mailman/listinfo/fieldtrip > -------------- next part -------------- An HTML attachment was scrubbed... URL: From jkamienk at gmail.com Fri Jun 7 19:02:22 2013 From: jkamienk at gmail.com (Juan Kamienkowski) Date: Fri, 7 Jun 2013 14:02:22 -0300 Subject: [FieldTrip] Cluster-based permutation tests on single channel Message-ID: Hi, I wanted to perform a Cluster-based permutation tests on time-frequency data, on a single channel (one Independent Component). But the ft_freqstatistics() function ask me for the "neighbours" field in the "cfg" structure, although I set the cfg.minnbchan to 0. Is there a way to run this analysis in a single channel? Thanks a lot in advance! Best, Juan -- Juan E Kamienkowski Laboratorio de Neurociencia Integrativa Departamento de Fisica, FCEN-UBA Ciudad Universitaria, Pabellon I (1428) Buenos Aires, Argentina Phone: (54-11) 4576 3300 (282) Fax: (54-11) 4576 3357 http://www.neurociencia.df.uba.ar/ -------------- next part -------------- An HTML attachment was scrubbed... URL: From Don.Rojas at ucdenver.edu Fri Jun 7 23:37:10 2013 From: Don.Rojas at ucdenver.edu (Rojas, Don) Date: Fri, 7 Jun 2013 15:37:10 -0600 Subject: [FieldTrip] Cluster-based permutation tests on single channel In-Reply-To: References: Message-ID: Juan, The neighbours field is for defining adjacent channels for multi-channel multiple comparison correction. I'm not sure if you've gotten a response on this yet, but you simply set the cfg.neighbours field to be empty in your call to ft_freqstatistics for using cluster based corrections within time-frequency space for single channels. cfg.neighbours = []; Best, Don On Jun 7, 2013, at 11:02 AM, Juan Kamienkowski > wrote: Hi, I wanted to perform a Cluster-based permutation tests on time-frequency data, on a single channel (one Independent Component). But the ft_freqstatistics() function ask me for the "neighbours" field in the "cfg" structure, although I set the cfg.minnbchan to 0. Is there a way to run this analysis in a single channel? Thanks a lot in advance! Best, Juan -- Juan E Kamienkowski Laboratorio de Neurociencia Integrativa Departamento de Fisica, FCEN-UBA Ciudad Universitaria, Pabellon I (1428) Buenos Aires, Argentina Phone: (54-11) 4576 3300 (282) Fax: (54-11) 4576 3357 http://www.neurociencia.df.uba.ar/ _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -------------- next part -------------- An HTML attachment was scrubbed... URL: From Don.Rojas at ucdenver.edu Fri Jun 7 23:37:10 2013 From: Don.Rojas at ucdenver.edu (Rojas, Don) Date: Fri, 7 Jun 2013 15:37:10 -0600 Subject: [FieldTrip] Cluster-based permutation tests on single channel In-Reply-To: References: Message-ID: Juan, The neighbours field is for defining adjacent channels for multi-channel multiple comparison correction. I'm not sure if you've gotten a response on this yet, but you simply set the cfg.neighbours field to be empty in your call to ft_freqstatistics for using cluster based corrections within time-frequency space for single channels. cfg.neighbours = []; Best, Don On Jun 7, 2013, at 11:02 AM, Juan Kamienkowski > wrote: Hi, I wanted to perform a Cluster-based permutation tests on time-frequency data, on a single channel (one Independent Component). But the ft_freqstatistics() function ask me for the "neighbours" field in the "cfg" structure, although I set the cfg.minnbchan to 0. Is there a way to run this analysis in a single channel? Thanks a lot in advance! Best, Juan -- Juan E Kamienkowski Laboratorio de Neurociencia Integrativa Departamento de Fisica, FCEN-UBA Ciudad Universitaria, Pabellon I (1428) Buenos Aires, Argentina Phone: (54-11) 4576 3300 (282) Fax: (54-11) 4576 3357 http://www.neurociencia.df.uba.ar/ _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -------------- next part -------------- An HTML attachment was scrubbed... URL: From haristz at gmail.com Sat Jun 8 00:25:03 2013 From: haristz at gmail.com (Charidimos Tzagarakis) Date: Fri, 7 Jun 2013 17:25:03 -0500 Subject: [FieldTrip] Using ft_rejectcomponent after PCA reduction Message-ID: Dear Fieldtripverse, I have been experimenting with using ICA for artifact correction and have the following question: Because of the relatively large number of channels vs samples I have, I use the option to first reduce the dimensionality of the data with PCA (I have 248 MEG channels and I select, say 100 components, using the cfg.numcomponent=100 and cfg.runica.pca=100 in the call to ft_componentanalysis ). So the "topo" matrix in the component output structure has dimensions 248x100 and the unmixing matrix has dimensions 100x248. I then use something like "data = ft_rejectcomponent(cfg, comp,data)" to say reject 2 components cfg.component=[30 40] that contain ECG signal. Note: data here is the original data I fed in the ft_componentanalysis function. This is all pretty straightforward and as described in the Fieldtrip tutorial (minus the PCA part) . I am however a bit worried by the message:"removing 2 components keeping 246 components" I get in the end. Should it not be "removing 2 components keeping 98 components"? When I look in the code for ft_rejectcomponent, I can see that if "hasdata" is True the message is calculated based on the number of channels : fprintf('keeping %d components\n', nchans-length(cfg.component)); On the other hand (as far as I can tell, not being an ICA expert) the actual calculation for the removal of the desired components seems to correctly use the components selected for removal : mixing = comp.topo(selcomp,:); unmixing = comp.unmixing(:,selcomp); tra = eye(length(selcomp)) - mixing(:, cfg.component)*unmixing(cfg. component, :); (I do note the comment under that snippet!: %I am not sure about this, but it gives comparable results to the ~hasdata case %when comp contains non-orthogonal (=ica) topographies, and contains a complete decomposition) Further down the function code there are however more operations (eg remove unused channels, remove unused components ) where I am less able to follow things to make sure it is robust to non-square mixing and unmixing matrices. In summary, I wanted to ask if it is OK to use ft_rejectcomponent in this way (ie without decomposing to the full number of ICA's and then using it on the original data). With Thanks and Best Wishes, Haris Charidimos [Haris] Tzagarakis MD, PhD, MRCPsych University of Minnesota Dept of Neuroscience and Brain Sciences Center -------------- next part -------------- An HTML attachment was scrubbed... URL: From mengtongxiao at gmail.com Sun Jun 9 03:31:56 2013 From: mengtongxiao at gmail.com (=?GB2312?B?s8LRqQ==?=) Date: Sun, 9 Jun 2013 09:31:56 +0800 Subject: [FieldTrip] what is the MNI-template be use to constructed sourcemodel , MNI125 or colin27? Message-ID: Dear all I use the model ( fieldtrip/template/sourcemodel ) doing source reconstruction with beamformer . I want to know the template is matching MNI125 or colin27 . thanks. best , xiao -------------- next part -------------- An HTML attachment was scrubbed... URL: From nomeserio at gmail.com Mon Jun 10 10:29:21 2013 From: nomeserio at gmail.com (Michele Barsotti) Date: Mon, 10 Jun 2013 10:29:21 +0200 Subject: [FieldTrip] Downloading FieldTrip Message-ID: Dear FieldTrip users and staff, I'm dealing with the download of fieldtrip but everytime I try a download error occurs with this message: "...fieldtrip-aaaammgg.zip could not be saved, because the source file could not be read. Try again later, or contact the server administrator." Can someone help me? Thank in advance -- -Michele- -------------- next part -------------- An HTML attachment was scrubbed... URL: From joramvandriel at gmail.com Mon Jun 10 16:09:25 2013 From: joramvandriel at gmail.com (Joram van Driel) Date: Mon, 10 Jun 2013 16:09:25 +0200 Subject: [FieldTrip] BEM for MEG data Message-ID: Dear Fieldtrip users and developers, I've been struggling quite some time now with the following problem. We want to do source localization of MEG data from an experiment with 10 subjects. We collected MRIs using a Phillips scanner (UvA), and MEG data using the Neuromag Elekta scanner (VUmc). Using Neuromag software in Linux (seglab, xfit), I've created BEM forward models based on coregistered MRIs (coregistration also done using the Neuromag package), which result in .fif files (extension *bem-sol.fif). Using these models we want to continue computing the leadfields and doing source reconstruction in Matlab. For the latter, we have our own customized codes; to get the leadfield, we need some step in between. I'm trying to use fieldtrip functions for this but I get stuck. Here's what I do: - Import the bem fif files using the mne toolbox (function: mne_read_bem_surfaces). - Attach the imported boundary data to a vol structure as follows: [bem] = mne_read_bem_surfaces(bemfilz(subno).name); vol = []; vol.bnd.pnt = bem.rr; vol.bnd.tri = double(bem.tris); vol.unit = 'mm'; vol.cfg.sourceunits = 'mm'; vol.type = 'bemcp'; vol.cfg.numvertices = bem.np; - Import the sensor locations using ft_read_sens and convert to mm using ft_convert_units. - Check whether the resulting structures are OK for leadfield computation using ft_prepare_vol_sens. This results in an error "Unsupported volume conductor model for MEG". I also tried ft_read_vol, but for Neuromag this needs the meg-pd toolbox which doesn't run on Windows (the Linux we use for the Neuromag software, in turn, is a virtual machine and doesn't have Matlab). Is there a way around this? Using BEM models for MEG data should in principle be possible, but not using Fieldtrip? Any suggestions would be much appreciated! Thanks in advance, Joram -- Joram van Driel, MSc. PhD student at the University of Amsterdam Department of Psychology, Brain & Cognition -------------- next part -------------- An HTML attachment was scrubbed... URL: From aaron.schurger at gmail.com Mon Jun 10 18:11:23 2013 From: aaron.schurger at gmail.com (Aaron Schurger) Date: Mon, 10 Jun 2013 18:11:23 +0200 Subject: [FieldTrip] What are the units output by ft_freqanalysis_tfr? Message-ID: Hi, I am preparing figures for a paper, one of which is a time-frequency plot of the output from ft_freqanalysis (using the tfr method). The units of the data going in were on the order of 10e-11 or smaller (MEG data), but the units on the color (power) axis of the plot are on the order of 10e-1. Are the units normalized by default when you use ft_freqanalysis? If not then what are the units? The help on these functions was short on this kind of detail. Thanks! Aaron Schurger -- Aaron Schurger, PhD Post-doctoral researcher INSERM U992 / NeuroSpin CEA - Saclay, France +33-1-69-08-66-47 aaron.schurger at gmail.com http://www.unicog.org From ivan.skelin at uleth.ca Tue Jun 11 03:57:55 2013 From: ivan.skelin at uleth.ca (Skelin, Ivan) Date: Mon, 10 Jun 2013 18:57:55 -0700 Subject: [FieldTrip] ncs file downsampling and further processing Message-ID: Hi, I am recording from the anesthetized rats using the two NeuroNexus silicone probes with 8 tetrodes (32 channels) each and Neuralynx Cheetah system at 32556 Hz sampling frequency. I choose to analyze the .ncs files from 1/4 of the channels or 1 channel per tetrode. Since the recordings took about 150 mins, the .ncs files are too bulky (0.5 GB) for the standard procedure that the FieldTrip recommends for discontinuous data recorded using Neuralynx system. More precisely, when I preprocess the channels separately and subsequently run the ft_read_neuralynx_interp on them, I get the "out of memory" error message (even when running it on only two .ncs files at the time). My question is if I can first downsample all the .csc files that I want to analyze using the ft_spikedownsample, before I run the ft_read_neuralynx_interp on them? Thank you very much, Ivan -- Ivan Skelin, MD, PhD Postdoctoral Fellow Polaris Brain Dynamics Research Group Canadian Centre for Behavioural Neuroscience The University of Lethbridge 4401 University Dr W Lethbridge, AB, T1K 3M4 Canada http://lethbridgebraindynamics.com -------------- next part -------------- An HTML attachment was scrubbed... URL: From explena at gmail.com Tue Jun 11 09:48:34 2013 From: explena at gmail.com (Shen-Mou Hsu) Date: Tue, 11 Jun 2013 15:48:34 +0800 Subject: [FieldTrip] ROC_based permutation test Message-ID: Dear all, I was trying to perform signle-trial ROC-based permutation tests using the statfun_roc. However I encountered two questions and wondered if anyone could kindly shed some light on the issues. First, is it necessary to perform baseline normalization for each trial before the tests? Second, an error message returned stating "Error using roc. Too many input arguments. Error using ft_statistics_montecarlo (line 223) could not determine the parametric critical value for clustering", after running the following script: load (['t_RF_EpoRejDePow']); load (['t_RN_EpoRejDePow']); cfg = []; cfg.channel = 'MEG'; cfg.latency = [-0.35 0.55]; cfg.frequency = [8 12]; cfg.parameter = 'powspctrm'; cfg.method = 'montecarlo'; cfg.statistic = 'roc'; cfg.alpha = 0.025; cfg.tail = 0; cfg.correctm = 'cluster'; cfg.clusteralpha = 0.05; % cfg.correcttail = 'prob'; cfg.clustertail = 0; cfg.numrandomization = 1000; cfg.minnbchan = 2; cfg_neighb.method = 'distance'; cfg.neighbours = ft_prepare_neighbours(cfg_neighb, t_RN_EpoRejDePow); cfg.logtransform = 'yes'; design = [1*ones(1,size(t_RF_EpoRejDePow.powspctrm,1)) 2*ones(1,size(t_RN_EpoRejDePow.powspctrm,1))]; % the first dimension of these variable is the trial number. cfg.design = design; P_ROC_t_RFvsRN = ft_freqstatistics(cfg,t_RF_EpoRejDePow,t_RN_EpoRejDePow); Any help is greatly appreciated. Best regards, Shen-Mou Hsu -------------- next part -------------- An HTML attachment was scrubbed... URL: From eelke.spaak at donders.ru.nl Tue Jun 11 09:58:58 2013 From: eelke.spaak at donders.ru.nl (Eelke Spaak) Date: Tue, 11 Jun 2013 09:58:58 +0200 Subject: [FieldTrip] What are the units output by ft_freqanalysis_tfr? In-Reply-To: References: Message-ID: Hi Aaron, How are you plotting the data? If you are using ft_single/multi/topoplotTFR, did you use baseline correction (cfg.baseline = 'yes' or [begin end])? If you use cfg.baselinetype = 'relative' or cfg.baselinetype = 'relchange', data plotted will typically be on the order of 10e-1. It represents ratio vs baseline ('relative') or relative change vs baseline ('relchange'). If you did not specify baseline correction, then there is something else going on. In any case, ft_freqanalysis does not explicitly transform/normalize units; it does not care about them. Best, Eelke On 10 June 2013 18:11, Aaron Schurger wrote: > Hi, > I am preparing figures for a paper, one of which is a time-frequency > plot of the output from ft_freqanalysis (using the tfr method). The > units of the data going in were on the order of 10e-11 or smaller (MEG > data), but the units on the color (power) axis of the plot are on the > order of 10e-1. Are the units normalized by default when you use > ft_freqanalysis? If not then what are the units? The help on these > functions was short on this kind of detail. > Thanks! > Aaron Schurger > > -- > Aaron Schurger, PhD > Post-doctoral researcher > INSERM U992 / NeuroSpin > CEA - Saclay, France > +33-1-69-08-66-47 > aaron.schurger at gmail.com > http://www.unicog.org > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip From eelke.spaak at donders.ru.nl Tue Jun 11 10:18:09 2013 From: eelke.spaak at donders.ru.nl (Eelke Spaak) Date: Tue, 11 Jun 2013 10:18:09 +0200 Subject: [FieldTrip] ROC_based permutation test In-Reply-To: References: Message-ID: Dear Shen-Mou Hsu, With regards to your first question, I do not know the answer, so someone else might help you there. In response to your second question, regarding the error "could not determine the parametric critical value for clustering", this is caused by the value of cfg.clusterthreshold used. The default value there is 'parametric', meaning that the statistics routine will ask your 'statfun' to compute a parametric threshold for considering a (time/frequency/channel)-voxel a cluster-member candidate. This can be done by e.g. depsamplesT or indepsamplesT, as it is possible to analytically compute a T value corresponding to p < 0.05. However, in the case of the ROC statistic, no such parametric estimate can be computed (or perhaps it can be in some way, I don't know, but at least I know the FT implementation does not). Fortunately, the statistics routines also allow you to use a nonparametric threshold for cluster-member candidates, based on the generated distribution of the test statistic under the null hypothesis. To use this, simply specify cfg.clusterthreshold = 'nonparametric_individual' or cfg.clusterthreshold = 'nonparametric_common'. The difference between the two is that the former computes a threshold per voxel, and the latter uses the same threshold for all voxels. Which one is appropriate for you I don't know. (Good reasons for using 'nonparametric_individual' might be a strong variation of your test statistic with frequency. I know for a fact this is the case with certain quantifications of phase-amplitude coupling; these show much higher values in the low frequencies even when computed on noise.) Hope this helps. Best, Eelke On 11 June 2013 09:48, Shen-Mou Hsu wrote: > Dear all, > > I was trying to perform signle-trial ROC-based permutation tests using the > statfun_roc. However I encountered two questions and wondered if anyone > could kindly shed some light on the issues. First, is it necessary to > perform baseline normalization for each trial before the tests? Second, an > error message returned stating "Error using roc. Too many input arguments. > Error using ft_statistics_montecarlo (line 223) could not determine the > parametric critical value for clustering", after running the following > script: > > load (['t_RF_EpoRejDePow']); load (['t_RN_EpoRejDePow']); > > cfg = []; > cfg.channel = 'MEG'; > cfg.latency = [-0.35 0.55]; > cfg.frequency = [8 12]; > cfg.parameter = 'powspctrm'; > cfg.method = 'montecarlo'; > cfg.statistic = 'roc'; > cfg.alpha = 0.025; > cfg.tail = 0; > cfg.correctm = 'cluster'; > cfg.clusteralpha = 0.05; > % cfg.correcttail = 'prob'; > cfg.clustertail = 0; > cfg.numrandomization = 1000; > cfg.minnbchan = 2; > cfg_neighb.method = 'distance'; > cfg.neighbours = ft_prepare_neighbours(cfg_neighb, t_RN_EpoRejDePow); > cfg.logtransform = 'yes'; > > design = [1*ones(1,size(t_RF_EpoRejDePow.powspctrm,1)) > 2*ones(1,size(t_RN_EpoRejDePow.powspctrm,1))]; % the first dimension of > these variable is the trial number. > cfg.design = design; > > P_ROC_t_RFvsRN = ft_freqstatistics(cfg,t_RF_EpoRejDePow,t_RN_EpoRejDePow); > > > Any help is greatly appreciated. > > Best regards, > > Shen-Mou Hsu > > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip From aaron.schurger at gmail.com Tue Jun 11 11:00:03 2013 From: aaron.schurger at gmail.com (Aaron Schurger) Date: Tue, 11 Jun 2013 11:00:03 +0200 Subject: [FieldTrip] What are the units output by ft_freqanalysis_tfr? In-Reply-To: References: Message-ID: Hi, Eelke, Thanks for your reply. I think that might explain it. When I step through my code, I see that the units are as expected for MEG in the output from ft_freqanalysis, so it must be something after that stage that is changing. Thanks for the tip! Best wishes, Aaron On Tue, Jun 11, 2013 at 9:58 AM, Eelke Spaak wrote: > Hi Aaron, > > How are you plotting the data? If you are using > ft_single/multi/topoplotTFR, did you use baseline correction > (cfg.baseline = 'yes' or [begin end])? If you use cfg.baselinetype = > 'relative' or cfg.baselinetype = 'relchange', data plotted will > typically be on the order of 10e-1. It represents ratio vs baseline > ('relative') or relative change vs baseline ('relchange'). > > If you did not specify baseline correction, then there is something > else going on. In any case, ft_freqanalysis does not explicitly > transform/normalize units; it does not care about them. > > Best, > Eelke > > On 10 June 2013 18:11, Aaron Schurger wrote: >> Hi, >> I am preparing figures for a paper, one of which is a time-frequency >> plot of the output from ft_freqanalysis (using the tfr method). The >> units of the data going in were on the order of 10e-11 or smaller (MEG >> data), but the units on the color (power) axis of the plot are on the >> order of 10e-1. Are the units normalized by default when you use >> ft_freqanalysis? If not then what are the units? The help on these >> functions was short on this kind of detail. >> Thanks! >> Aaron Schurger >> >> -- >> Aaron Schurger, PhD >> Post-doctoral researcher >> INSERM U992 / NeuroSpin >> CEA - Saclay, France >> +33-1-69-08-66-47 >> aaron.schurger at gmail.com >> http://www.unicog.org >> _______________________________________________ >> fieldtrip mailing list >> fieldtrip at donders.ru.nl >> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -- Aaron Schurger, PhD Post-doctoral researcher INSERM U992 / NeuroSpin CEA - Saclay, France +33-1-69-08-66-47 aaron.schurger at gmail.com http://www.unicog.org From nicolai at mersebak.dk Wed Jun 12 15:44:00 2013 From: nicolai at mersebak.dk (Nicolai Mersebak) Date: Wed, 12 Jun 2013 15:44:00 +0200 Subject: [FieldTrip] Source statistics on spatio-temporal source reconstruction data (MNE) Message-ID: Dear all, I have a question concerning the usage of ft_sourcegrandaverage and ft_sourcestatistics. After using ft_sourceanalysis (method: MNE), I get spatio-temporal source reconstructed data in source.avg.pow (4050 x 897): 4050 sources and 897 time points. Now I would like to use the cluster-based permutation test on my source reconstructed data. However it seems like ft_sourcegrandaverage and ft_sourcestatistics don't support source level time courses. E.g when I am using ft_sourcegrandaverage I am getting the following error: Error in ft_sourcegrandaverage (line 158) dat(:,i) = tmp(:); Looking into the code: for i=1:Nsubject tmp = getsubfield(varargin{i}, parameterselection(cfg.parameter, varargin{i})); dat(:,i) = tmp(:); tmp = getsubfield(varargin{i}, 'inside'); inside(tmp,i) = 1; end I see that "tmp" are getting the structure [N_sources x timepoints] from source.avg.pow for one subject, where "dat" requires the structure [N_sources x 1]. I seached the mailing list for similar issues and found this thread: http://mailman.science.ru.nl/pipermail/fieldtrip/2010-September/003122.html Since I am interested in using the temporal dimension in my statistics, I would like to know if it is still not possible to use spatio-temporal source reconstructed data in ft_sourcestatistics and ft_sourcegrandaverage ? Or if any have succeeded in using the cluster-based permutation test on source level also including the temporal dimension ? Alternative I was thinking that I might could use ft_timelockstatistics, where I substituted the channels with sources, e.g instead of having 64 channels, I would now have 4050 "channels". If so I need to calculate a label structure and an appropriate neighbor structure, which I guess is possible as I have all the 3D coordinates for each source, e.g in leadfield.pos ? I know this is a work around solution, but have anyone tried or have any experience using such an approach ? Best, Nicolai -------------- next part -------------- An HTML attachment was scrubbed... URL: From johanna.zumer at donders.ru.nl Wed Jun 12 16:03:16 2013 From: johanna.zumer at donders.ru.nl (Johanna Zumer) Date: Wed, 12 Jun 2013 16:03:16 +0200 Subject: [FieldTrip] Source statistics on spatio-temporal source reconstruction data (MNE) In-Reply-To: References: Message-ID: Dear Nicolai, Good timing, I have just last week filed a 'bug' for this code modification request: http://bugzilla.fcdonders.nl/show_bug.cgi?id=2185 You may add yourself to the CC list if you wish to receive updates on the bug progress. I would be interested to hear if anyone else has thoughts on your suggestion to 'hack' it as a timelock structure with channels. Best, Johanna 2013/6/12 Nicolai Mersebak > Dear all, > > I have a question concerning the usage of ft_sourcegrandaverage and > ft_sourcestatistics. > > After using ft_sourceanalysis (method: MNE), I get spatio-temporal source > reconstructed data in source.avg.pow (4050 x 897): 4050 sources and 897 > time points. > > Now I would like to use the cluster-based permutation test on my source > reconstructed data. However it seems like ft_sourcegrandaverage and ft_sourcestatistics > don't support source level time courses. E.g when I am using ft_sourcegrandaverage > I am getting the following error: > > Error in ft_sourcegrandaverage (line 158) > dat(:,i) = tmp(:); > > Looking into the code: > > for i=1:Nsubject > > tmp = getsubfield(varargin{i}, parameterselection(cfg.parameter, > varargin{i})); > > dat(:,i) = tmp(:); > > tmp = getsubfield(varargin{i}, 'inside'); > > inside(tmp,i) = 1; > > end > > I see that "tmp" are getting the structure [N_sources x timepoints] from > source.avg.pow for one subject, where "dat" requires the structure > [N_sources x 1]. > > I seached the mailing list for similar issues and found this thread: > > http://mailman.science.ru.nl/pipermail/fieldtrip/2010-September/003122.html > > Since I am interested in using the temporal dimension in my statistics, I > would like to know if it is still not possible to use spatio-temporal > source reconstructed data in ft_sourcestatistics and ft_sourcegrandaverage ? > > Or if any have succeeded in using the cluster-based permutation test on > source level also including the temporal dimension ? > > Alternative I was thinking that I might could use ft_timelockstatistics, > where I substituted the channels with sources, e.g instead of having 64 > channels, I would now have 4050 "channels". > If so I need to calculate a label structure and an appropriate neighbor > structure, which I guess is possible as I have all the 3D coordinates for > each source, e.g in leadfield.pos ? > I know this is a work around solution, but have anyone tried or have any > experience using such an approach ? > > Best, > > Nicolai > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > -------------- next part -------------- An HTML attachment was scrubbed... URL: From jm.horschig at donders.ru.nl Wed Jun 12 16:20:29 2013 From: jm.horschig at donders.ru.nl (=?ISO-8859-1?Q?=22J=F6rn_M=2E_Horschig=22?=) Date: Wed, 12 Jun 2013 16:20:29 +0200 Subject: [FieldTrip] Source statistics on spatio-temporal source reconstruction data (MNE) In-Reply-To: References: Message-ID: <51B883AD.8020707@donders.ru.nl> Heyho, it might be a good way, at least I am doing it that way :) But think about defining neighbouring voxels beforehands (easily doable for a decent programmer, hard for a not-so-experienced programmer). In the upcoming months/years there will be something changing on the source-front anyway, so maybe it is best to use the temporary solution with ft_timelockXXX until then. Note that my personal opinion does not necessarily reflect the opinion of the core dev team ;) Best, Jörn On 6/12/2013 4:03 PM, Johanna Zumer wrote: > Dear Nicolai, > > Good timing, I have just last week filed a 'bug' for this code > modification request: http://bugzilla.fcdonders.nl/show_bug.cgi?id=2185 > You may add yourself to the CC list if you wish to receive updates on > the bug progress. > > I would be interested to hear if anyone else has thoughts on your > suggestion to 'hack' it as a timelock structure with channels. > > Best, > Johanna > > > 2013/6/12 Nicolai Mersebak > > > Dear all, > > I have a question concerning the usage of ft_sourcegrandaverage > and ft_sourcestatistics. > > After using ft_sourceanalysis (method: MNE), I get spatio-temporal > source reconstructed data in source.avg.pow (4050 x 897): 4050 > sources and 897 time points. > > Now I would like to use the cluster-based permutation test on my > source reconstructed data. However it seems like > ft_sourcegrandaverage and ft_sourcestatistics don't support source > level time courses. E.g when I am using ft_sourcegrandaverage I am > getting the following error: > > Error in ft_sourcegrandaverage (line 158) > dat(:,i) = tmp(:); > > Looking into the code: > > for i=1:Nsubject > > tmp = getsubfield(varargin{i}, parameterselection(cfg.parameter, > varargin{i})); > > dat(:,i) = tmp(:); > > tmp = getsubfield(varargin{i}, 'inside'); > > inside(tmp,i) = 1; > > end > > > I see that "tmp" are getting the structure [N_sources x > timepoints] from source.avg.pow for one subject, where "dat" > requires the structure [N_sources x 1]. > > I seached the mailing list for similar issues and found this thread: > > http://mailman.science.ru.nl/pipermail/fieldtrip/2010-September/003122.html > > Since I am interested in using the temporal dimension in my > statistics, I would like to know if it is still not possible to > use spatio-temporal source reconstructed data in > ft_sourcestatistics and ft_sourcegrandaverage ? > > Or if any have succeeded in using the cluster-based permutation > test on source level also including the temporal dimension ? > > Alternative I was thinking that I might could use > ft_timelockstatistics, where I substituted the channels with > sources, e.g instead of having 64 channels, I would now have 4050 > "channels". > If so I need to calculate a label structure and an appropriate > neighbor structure, which I guess is possible as I have all the 3D > coordinates for each source, e.g in leadfield.pos ? > I know this is a work around solution, but have anyone tried or > have any experience using such an approach ? > > Best, > > Nicolai > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -- Jörn M. Horschig PhD Student Donders Institute for Brain, Cognition and Behaviour Centre for Cognitive Neuroimaging Radboud University Nijmegen Neuronal Oscillations Group FieldTrip Development Team P.O. Box 9101 NL-6500 HB Nijmegen The Netherlands Contact: E-Mail: jm.horschig at donders.ru.nl Tel: +31-(0)24-36-68493 Web: http://www.ru.nl/donders Visiting address: Trigon, room 2.30 Kapittelweg 29 NL-6525 EN Nijmegen The Netherlands -------------- next part -------------- An HTML attachment was scrubbed... URL: From smoratti at psi.ucm.es Wed Jun 12 17:44:59 2013 From: smoratti at psi.ucm.es (smoratti at psi.ucm.es) Date: Wed, 12 Jun 2013 17:44:59 +0200 Subject: [FieldTrip] Source statistics on spatio-temporal source reconstruction data (MNE) In-Reply-To: References: Message-ID: <05B1DB8A-163B-40C0-B303-5B7D2A5434BD@psi.ucm.es> Dear Nicolai, Indeed I have used ft_timelockstatistics for minimum norm source data. The trick is to put the source level data into a ERF structure. Determining the neighbors of a source surface with vertices is not trivial. However I used tess_vertconn.m from the BrainStorm toolbox to get the connectivity matrix that tells you who is a neighbor. This you can feed into timelockstats. Hope that helps, Stephan ________________________________________________________ Stephan Moratti, PhD see also: http://web.me.com/smoratti/ Universidad Complutense de Madrid Facultad de Psicología Departamento de Psicología Básica I Campus de Somosaguas 28223 Pozuelo de Alarcón (Madrid) Spain and Center for Biomedical Technology Laboratory for Cognitive and Computational Neuroscience Parque Científico y Tecnológico de la Universidad Politecnica de Madrid Campus Montegancedo 28223 Pozuelo de Alarcón (Madrid) Spain email: smoratti at psi.ucm.es Tel.: +34 679219982 El 12/06/2013, a las 15:44, Nicolai Mersebak escribió: > Dear all, > > I have a question concerning the usage of ft_sourcegrandaverage and ft_sourcestatistics. > > After using ft_sourceanalysis (method: MNE), I get spatio-temporal source reconstructed data in source.avg.pow (4050 x 897): 4050 sources and 897 time points. > > Now I would like to use the cluster-based permutation test on my source reconstructed data. However it seems like ft_sourcegrandaverage and ft_sourcestatistics don't support source level time courses. E.g when I am using ft_sourcegrandaverage I am getting the following error: > > Error in ft_sourcegrandaverage (line 158) > dat(:,i) = tmp(:); > > Looking into the code: > > for i=1:Nsubject > tmp = getsubfield(varargin{i}, parameterselection(cfg.parameter, varargin{i})); > dat(:,i) = tmp(:); > tmp = getsubfield(varargin{i}, 'inside'); > inside(tmp,i) = 1; > end > > I see that "tmp" are getting the structure [N_sources x timepoints] from source.avg.pow for one subject, where "dat" requires the structure [N_sources x 1]. > > I seached the mailing list for similar issues and found this thread: > > http://mailman.science.ru.nl/pipermail/fieldtrip/2010-September/003122.html > > Since I am interested in using the temporal dimension in my statistics, I would like to know if it is still not possible to use spatio-temporal source reconstructed data in ft_sourcestatistics and ft_sourcegrandaverage ? > > Or if any have succeeded in using the cluster-based permutation test on source level also including the temporal dimension ? > > Alternative I was thinking that I might could use ft_timelockstatistics, where I substituted the channels with sources, e.g instead of having 64 channels, I would now have 4050 "channels". > If so I need to calculate a label structure and an appropriate neighbor structure, which I guess is possible as I have all the 3D coordinates for each source, e.g in leadfield.pos ? > I know this is a work around solution, but have anyone tried or have any experience using such an approach ? > > Best, > > Nicolai > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -------------- next part -------------- An HTML attachment was scrubbed... URL: From jan.schoffelen at donders.ru.nl Wed Jun 12 18:00:46 2013 From: jan.schoffelen at donders.ru.nl (jan-mathijs schoffelen) Date: Wed, 12 Jun 2013 18:00:46 +0200 Subject: [FieldTrip] Source statistics on spatio-temporal source reconstruction data (MNE) In-Reply-To: <05B1DB8A-163B-40C0-B303-5B7D2A5434BD@psi.ucm.es> References: <05B1DB8A-163B-40C0-B303-5B7D2A5434BD@psi.ucm.es> Message-ID: <683ABC6E-9FC6-420A-9DCF-E54D6FC6A27E@donders.ru.nl> An alternative would be to interpolate the cortical sheet to a 3D grid (where the grid is defined for each subject based on a warped template grid defined in a standard space), and then do clustering using a regular 3D spatial neighbourhood structure. The rationale being that two vertices on the sheet may appear as disconnected (e.g. being on two sides of a sulcus) whereas, given the poor spatial resolution, they belong to the same spatial blob. Best, Jan-Mathijs On Jun 12, 2013, at 5:44 PM, smoratti at psi.ucm.es wrote: > Dear Nicolai, > > Indeed I have used ft_timelockstatistics for minimum norm source data. The trick is to put the source level data into a ERF structure. Determining the neighbors of a source surface with vertices is not trivial. However I used tess_vertconn.m from the BrainStorm toolbox to get the connectivity matrix that tells you who is a neighbor. This you can feed into timelockstats. > > Hope that helps, > > Stephan > > ________________________________________________________ > Stephan Moratti, PhD > > see also: http://web.me.com/smoratti/ > > Universidad Complutense de Madrid > Facultad de Psicología > Departamento de Psicología Básica I > Campus de Somosaguas > 28223 Pozuelo de Alarcón (Madrid) > Spain > > and > > Center for Biomedical Technology > Laboratory for Cognitive and Computational Neuroscience > Parque Científico y Tecnológico de la Universidad Politecnica de Madrid > Campus Montegancedo > 28223 Pozuelo de Alarcón (Madrid) > Spain > > > email: smoratti at psi.ucm.es > Tel.: +34 679219982 > > El 12/06/2013, a las 15:44, Nicolai Mersebak escribió: > >> Dear all, >> >> I have a question concerning the usage of ft_sourcegrandaverage and ft_sourcestatistics. >> >> After using ft_sourceanalysis (method: MNE), I get spatio-temporal source reconstructed data in source.avg.pow (4050 x 897): 4050 sources and 897 time points. >> >> Now I would like to use the cluster-based permutation test on my source reconstructed data. However it seems like ft_sourcegrandaverage and ft_sourcestatistics don't support source level time courses. E.g when I am using ft_sourcegrandaverage I am getting the following error: >> >> Error in ft_sourcegrandaverage (line 158) >> dat(:,i) = tmp(:); >> >> Looking into the code: >> >> for i=1:Nsubject >> tmp = getsubfield(varargin{i}, parameterselection(cfg.parameter, varargin{i})); >> dat(:,i) = tmp(:); >> tmp = getsubfield(varargin{i}, 'inside'); >> inside(tmp,i) = 1; >> end >> >> I see that "tmp" are getting the structure [N_sources x timepoints] from source.avg.pow for one subject, where "dat" requires the structure [N_sources x 1]. >> >> I seached the mailing list for similar issues and found this thread: >> >> http://mailman.science.ru.nl/pipermail/fieldtrip/2010-September/003122.html >> >> Since I am interested in using the temporal dimension in my statistics, I would like to know if it is still not possible to use spatio-temporal source reconstructed data in ft_sourcestatistics and ft_sourcegrandaverage ? >> >> Or if any have succeeded in using the cluster-based permutation test on source level also including the temporal dimension ? >> >> Alternative I was thinking that I might could use ft_timelockstatistics, where I substituted the channels with sources, e.g instead of having 64 channels, I would now have 4050 "channels". >> If so I need to calculate a label structure and an appropriate neighbor structure, which I guess is possible as I have all the 3D coordinates for each source, e.g in leadfield.pos ? >> I know this is a work around solution, but have anyone tried or have any experience using such an approach ? >> >> Best, >> >> Nicolai >> >> _______________________________________________ >> fieldtrip mailing list >> fieldtrip at donders.ru.nl >> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip Jan-Mathijs Schoffelen, MD PhD Donders Institute for Brain, Cognition and Behaviour, Centre for Cognitive Neuroimaging, Radboud University Nijmegen, The Netherlands Max Planck Institute for Psycholinguistics, Nijmegen, The Netherlands J.Schoffelen at donders.ru.nl Telephone: +31-24-3614793 http://www.hettaligebrein.nl -------------- next part -------------- An HTML attachment was scrubbed... URL: From smoratti at psi.ucm.es Wed Jun 12 18:58:40 2013 From: smoratti at psi.ucm.es (smoratti at psi.ucm.es) Date: Wed, 12 Jun 2013 18:58:40 +0200 Subject: [FieldTrip] Source statistics on spatio-temporal source reconstruction data (MNE) In-Reply-To: <683ABC6E-9FC6-420A-9DCF-E54D6FC6A27E@donders.ru.nl> References: <05B1DB8A-163B-40C0-B303-5B7D2A5434BD@psi.ucm.es> <683ABC6E-9FC6-420A-9DCF-E54D6FC6A27E@donders.ru.nl> Message-ID: <8D369E00-7FF3-4CC7-8B91-A55AD9ECE385@psi.ucm.es> I think Jan.Mathijs alternative suggestion is quite attractive. With the neighbors on a cortical sheet I also had the problems that sometimes the vertices do not have the same distance and then clustering may be biased to smaller or bigger clusters as the number of neighbors does not guarantee same cluster sizes. With the interpolation onto a 3D grid, you won't have that problem. best, Stephan ________________________________________________________ Stephan Moratti, PhD see also: http://web.me.com/smoratti/ Universidad Complutense de Madrid Facultad de Psicología Departamento de Psicología Básica I Campus de Somosaguas 28223 Pozuelo de Alarcón (Madrid) Spain and Center for Biomedical Technology Laboratory for Cognitive and Computational Neuroscience Parque Científico y Tecnológico de la Universidad Politecnica de Madrid Campus Montegancedo 28223 Pozuelo de Alarcón (Madrid) Spain email: smoratti at psi.ucm.es Tel.: +34 679219982 El 12/06/2013, a las 18:00, jan-mathijs schoffelen escribió: > An alternative would be to interpolate the cortical sheet to a 3D grid (where the grid is defined for each subject based on a warped template grid defined in a standard space), and then do clustering using a regular 3D spatial neighbourhood structure. The rationale being that two vertices on the sheet may appear as disconnected (e.g. being on two sides of a sulcus) whereas, given the poor spatial resolution, they belong to the same spatial blob. > > Best, > Jan-Mathijs > > On Jun 12, 2013, at 5:44 PM, smoratti at psi.ucm.es wrote: > >> Dear Nicolai, >> >> Indeed I have used ft_timelockstatistics for minimum norm source data. The trick is to put the source level data into a ERF structure. Determining the neighbors of a source surface with vertices is not trivial. However I used tess_vertconn.m from the BrainStorm toolbox to get the connectivity matrix that tells you who is a neighbor. This you can feed into timelockstats. >> >> Hope that helps, >> >> Stephan >> >> ________________________________________________________ >> Stephan Moratti, PhD >> >> see also: http://web.me.com/smoratti/ >> >> Universidad Complutense de Madrid >> Facultad de Psicología >> Departamento de Psicología Básica I >> Campus de Somosaguas >> 28223 Pozuelo de Alarcón (Madrid) >> Spain >> >> and >> >> Center for Biomedical Technology >> Laboratory for Cognitive and Computational Neuroscience >> Parque Científico y Tecnológico de la Universidad Politecnica de Madrid >> Campus Montegancedo >> 28223 Pozuelo de Alarcón (Madrid) >> Spain >> >> >> email: smoratti at psi.ucm.es >> Tel.: +34 679219982 >> >> El 12/06/2013, a las 15:44, Nicolai Mersebak escribió: >> >>> Dear all, >>> >>> I have a question concerning the usage of ft_sourcegrandaverage and ft_sourcestatistics. >>> >>> After using ft_sourceanalysis (method: MNE), I get spatio-temporal source reconstructed data in source.avg.pow (4050 x 897): 4050 sources and 897 time points. >>> >>> Now I would like to use the cluster-based permutation test on my source reconstructed data. However it seems like ft_sourcegrandaverage and ft_sourcestatistics don't support source level time courses. E.g when I am using ft_sourcegrandaverage I am getting the following error: >>> >>> Error in ft_sourcegrandaverage (line 158) >>> dat(:,i) = tmp(:); >>> >>> Looking into the code: >>> >>> for i=1:Nsubject >>> tmp = getsubfield(varargin{i}, parameterselection(cfg.parameter, varargin{i})); >>> dat(:,i) = tmp(:); >>> tmp = getsubfield(varargin{i}, 'inside'); >>> inside(tmp,i) = 1; >>> end >>> >>> I see that "tmp" are getting the structure [N_sources x timepoints] from source.avg.pow for one subject, where "dat" requires the structure [N_sources x 1]. >>> >>> I seached the mailing list for similar issues and found this thread: >>> >>> http://mailman.science.ru.nl/pipermail/fieldtrip/2010-September/003122.html >>> >>> Since I am interested in using the temporal dimension in my statistics, I would like to know if it is still not possible to use spatio-temporal source reconstructed data in ft_sourcestatistics and ft_sourcegrandaverage ? >>> >>> Or if any have succeeded in using the cluster-based permutation test on source level also including the temporal dimension ? >>> >>> Alternative I was thinking that I might could use ft_timelockstatistics, where I substituted the channels with sources, e.g instead of having 64 channels, I would now have 4050 "channels". >>> If so I need to calculate a label structure and an appropriate neighbor structure, which I guess is possible as I have all the 3D coordinates for each source, e.g in leadfield.pos ? >>> I know this is a work around solution, but have anyone tried or have any experience using such an approach ? >>> >>> Best, >>> >>> Nicolai >>> >>> _______________________________________________ >>> fieldtrip mailing list >>> fieldtrip at donders.ru.nl >>> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip >> >> _______________________________________________ >> fieldtrip mailing list >> fieldtrip at donders.ru.nl >> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > Jan-Mathijs Schoffelen, MD PhD > > Donders Institute for Brain, Cognition and Behaviour, > Centre for Cognitive Neuroimaging, > Radboud University Nijmegen, The Netherlands > > Max Planck Institute for Psycholinguistics, > Nijmegen, The Netherlands > > J.Schoffelen at donders.ru.nl > Telephone: +31-24-3614793 > > http://www.hettaligebrein.nl > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -------------- next part -------------- An HTML attachment was scrubbed... URL: From mengtongxiao at gmail.com Thu Jun 13 10:10:14 2013 From: mengtongxiao at gmail.com (=?GB2312?B?s8LRqQ==?=) Date: Thu, 13 Jun 2013 16:10:14 +0800 Subject: [FieldTrip] PDC Message-ID: Dear all I want to use compute PDC, I want to Konw when I got the chan*chan*freq, Dose the information flow from row (chan) to column(chan)? best, xiao         -------------- next part -------------- An HTML attachment was scrubbed... URL: From jan.schoffelen at donders.ru.nl Thu Jun 13 10:20:48 2013 From: jan.schoffelen at donders.ru.nl (jan-mathijs schoffelen) Date: Thu, 13 Jun 2013 10:20:48 +0200 Subject: [FieldTrip] PDC In-Reply-To: References: Message-ID: <756060F3-17D2-420B-B55F-FFE7671B067B@donders.ru.nl> Hi Xiao, this would be from row to column. Best, Jan-Mathijs On Jun 13, 2013, at 10:10 AM, 陈雪 wrote: > Dear all > > I want to use compute PDC, > I want to Konw when I got the chan*chan*freq, > Dose the information flow from row (chan) to column(chan)? > > best, > xiao > > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip Jan-Mathijs Schoffelen, MD PhD Donders Institute for Brain, Cognition and Behaviour, Centre for Cognitive Neuroimaging, Radboud University Nijmegen, The Netherlands Max Planck Institute for Psycholinguistics, Nijmegen, The Netherlands J.Schoffelen at donders.ru.nl Telephone: +31-24-3614793 http://www.hettaligebrein.nl -------------- next part -------------- An HTML attachment was scrubbed... URL: From explena at gmail.com Thu Jun 13 11:15:11 2013 From: explena at gmail.com (Shen-Mou Hsu) Date: Thu, 13 Jun 2013 17:15:11 +0800 Subject: [FieldTrip] ROC_based permutation test In-Reply-To: References: Message-ID: Dear Eelke, Many thanks for your helpful and detailed answers. I think that there is an error in the documentation about the configuration option for performing ROC analysis. The correct one should be cfg.statistic = 'ft_statfun_roc'. Otherwise, it will call the matlab built-in ROC function. Meanwhile, just to clarify my concept about the ROC_based permutation tests. In the initial stage, does the test calculate whether for every sample, the area under ROC curve is significant from 0.5. In this sense, should I specify cfg.clusteralpha = 0.5? Best regards, Shen-Mou Hsu On Tue, Jun 11, 2013 at 4:18 PM, Eelke Spaak wrote: > Dear Shen-Mou Hsu, > > With regards to your first question, I do not know the answer, so > someone else might help you there. > > In response to your second question, regarding the error "could not > determine the parametric critical value for clustering", this is > caused by the value of cfg.clusterthreshold used. The default value > there is 'parametric', meaning that the statistics routine will ask > your 'statfun' to compute a parametric threshold for considering a > (time/frequency/channel)-voxel a cluster-member candidate. This can be > done by e.g. depsamplesT or indepsamplesT, as it is possible to > analytically compute a T value corresponding to p < 0.05. However, in > the case of the ROC statistic, no such parametric estimate can be > computed (or perhaps it can be in some way, I don't know, but at least > I know the FT implementation does not). > > Fortunately, the statistics routines also allow you to use a > nonparametric threshold for cluster-member candidates, based on the > generated distribution of the test statistic under the null > hypothesis. To use this, simply specify cfg.clusterthreshold = > 'nonparametric_individual' or cfg.clusterthreshold = > 'nonparametric_common'. The difference between the two is that the > former computes a threshold per voxel, and the latter uses the same > threshold for all voxels. Which one is appropriate for you I don't > know. (Good reasons for using 'nonparametric_individual' might be a > strong variation of your test statistic with frequency. I know for a > fact this is the case with certain quantifications of phase-amplitude > coupling; these show much higher values in the low frequencies even > when computed on noise.) > > Hope this helps. > > Best, > Eelke > > On 11 June 2013 09:48, Shen-Mou Hsu wrote: > > Dear all, > > > > I was trying to perform signle-trial ROC-based permutation tests using > the > > statfun_roc. However I encountered two questions and wondered if anyone > > could kindly shed some light on the issues. First, is it necessary to > > perform baseline normalization for each trial before the tests? Second, > an > > error message returned stating "Error using roc. Too many input > arguments. > > Error using ft_statistics_montecarlo (line 223) could not determine the > > parametric critical value for clustering", after running the following > > script: > > > > load (['t_RF_EpoRejDePow']); load (['t_RN_EpoRejDePow']); > > > > cfg = []; > > cfg.channel = 'MEG'; > > cfg.latency = [-0.35 0.55]; > > cfg.frequency = [8 12]; > > cfg.parameter = 'powspctrm'; > > cfg.method = 'montecarlo'; > > cfg.statistic = 'roc'; > > cfg.alpha = 0.025; > > cfg.tail = 0; > > cfg.correctm = 'cluster'; > > cfg.clusteralpha = 0.05; > > % cfg.correcttail = 'prob'; > > cfg.clustertail = 0; > > cfg.numrandomization = 1000; > > cfg.minnbchan = 2; > > cfg_neighb.method = 'distance'; > > cfg.neighbours = ft_prepare_neighbours(cfg_neighb, > t_RN_EpoRejDePow); > > cfg.logtransform = 'yes'; > > > > design = [1*ones(1,size(t_RF_EpoRejDePow.powspctrm,1)) > > 2*ones(1,size(t_RN_EpoRejDePow.powspctrm,1))]; % the first dimension of > > these variable is the trial number. > > cfg.design = design; > > > > P_ROC_t_RFvsRN = > ft_freqstatistics(cfg,t_RF_EpoRejDePow,t_RN_EpoRejDePow); > > > > > > Any help is greatly appreciated. > > > > Best regards, > > > > Shen-Mou Hsu > > > > > > > > _______________________________________________ > > fieldtrip mailing list > > fieldtrip at donders.ru.nl > > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > -------------- next part -------------- An HTML attachment was scrubbed... URL: From nicolai at mersebak.dk Thu Jun 13 12:04:34 2013 From: nicolai at mersebak.dk (Nicolai Mersebak) Date: Thu, 13 Jun 2013 12:04:34 +0200 Subject: [FieldTrip] Source statistics on spatio-temporal source reconstruction data (MNE) In-Reply-To: <8D369E00-7FF3-4CC7-8B91-A55AD9ECE385@psi.ucm.es> References: <05B1DB8A-163B-40C0-B303-5B7D2A5434BD@psi.ucm.es> <683ABC6E-9FC6-420A-9DCF-E54D6FC6A27E@donders.ru.nl> <8D369E00-7FF3-4CC7-8B91-A55AD9ECE385@psi.ucm.es> Message-ID: <6F3697BB-194F-422F-A1BF-EBBB132F805B@mersebak.dk> Thanks to all of you for your comments and ideas - they are very helpful! I ( off course :) ) have some follow up questions. I have created an ERP structure for my MNE source, so the only think which I need and that is not straight forward is the neighbour structure. I am using the standard bem template (fieldtrip-20130124/template/headmodel/standard_bem.mat) as a head model and use the following code to get a grid for all subjects as I don't have any subject specific information regarding the anatomy. cfg = []; cfg.grid.xgrid = -100:10:100; cfg.grid.ygrid = -100:10:100; cfg.grid.zgrid = -100:10:100; cfg.grid.tight = 'yes'; cfg.grid.unit = hdm.unit; % unit: mm cfg.vol = hdm; grid = ft_prepare_sourcemodel(cfg); @Jan-Mathijs and Stephan: I guess making a subject specific grid based on a warped template requires anatomic information for each subject, e.g. a MRI image like this tutorial shows: http://fieldtrip.fcdonders.nl/example/create_single-subject_grids_in_individual_head_space_that_are_all_aligned_in_mni_space?s%5B The final grid output in the tutorial - does it have this 3D grid which can be used as a neighbour structure ? I am not sure how to go from my cortical sheet [vertices x coordinates(x,y,z)] to a 3D grid, which I can use as a neighbour structure ? A second thing I would like to know is, if any of you have tried to use an atlas (e.g ALL template atlas) where the regions now are channels in the permutation test? Going from source points to atlas regions can be done through ft_sourcestatistics, but I am still interested in keeping the temporal dimension. The reason to use atlas regions instead of source points is to decrease the computation time. Best, Nicolai Den 12/06/2013 kl. 18.58 skrev "smoratti at psi.ucm.es" : > > I think Jan.Mathijs alternative suggestion is quite attractive. With the neighbors on a cortical sheet I also had the problems that sometimes the vertices do not have the same distance and then clustering may be biased to smaller or bigger clusters as the number of neighbors does not guarantee same cluster sizes. With the interpolation onto a 3D grid, you won't have that problem. > > best, > > Stephan > > > ________________________________________________________ > Stephan Moratti, PhD > > see also: http://web.me.com/smoratti/ > > Universidad Complutense de Madrid > Facultad de Psicología > Departamento de Psicología Básica I > Campus de Somosaguas > 28223 Pozuelo de Alarcón (Madrid) > Spain > > and > > Center for Biomedical Technology > Laboratory for Cognitive and Computational Neuroscience > Parque Científico y Tecnológico de la Universidad Politecnica de Madrid > Campus Montegancedo > 28223 Pozuelo de Alarcón (Madrid) > Spain > > > email: smoratti at psi.ucm.es > Tel.: +34 679219982 > > El 12/06/2013, a las 18:00, jan-mathijs schoffelen escribió: > >> An alternative would be to interpolate the cortical sheet to a 3D grid (where the grid is defined for each subject based on a warped template grid defined in a standard space), and then do clustering using a regular 3D spatial neighbourhood structure. The rationale being that two vertices on the sheet may appear as disconnected (e.g. being on two sides of a sulcus) whereas, given the poor spatial resolution, they belong to the same spatial blob. >> >> Best, >> Jan-Mathijs >> >> On Jun 12, 2013, at 5:44 PM, smoratti at psi.ucm.es wrote: >> >>> Dear Nicolai, >>> >>> Indeed I have used ft_timelockstatistics for minimum norm source data. The trick is to put the source level data into a ERF structure. Determining the neighbors of a source surface with vertices is not trivial. However I used tess_vertconn.m from the BrainStorm toolbox to get the connectivity matrix that tells you who is a neighbor. This you can feed into timelockstats. >>> >>> Hope that helps, >>> >>> Stephan >>> >>> ________________________________________________________ >>> Stephan Moratti, PhD >>> >>> see also: http://web.me.com/smoratti/ >>> >>> Universidad Complutense de Madrid >>> Facultad de Psicología >>> Departamento de Psicología Básica I >>> Campus de Somosaguas >>> 28223 Pozuelo de Alarcón (Madrid) >>> Spain >>> >>> and >>> >>> Center for Biomedical Technology >>> Laboratory for Cognitive and Computational Neuroscience >>> Parque Científico y Tecnológico de la Universidad Politecnica de Madrid >>> Campus Montegancedo >>> 28223 Pozuelo de Alarcón (Madrid) >>> Spain >>> >>> >>> email: smoratti at psi.ucm.es >>> Tel.: +34 679219982 >>> >>> El 12/06/2013, a las 15:44, Nicolai Mersebak escribió: >>> >>>> Dear all, >>>> >>>> I have a question concerning the usage of ft_sourcegrandaverage and ft_sourcestatistics. >>>> >>>> After using ft_sourceanalysis (method: MNE), I get spatio-temporal source reconstructed data in source.avg.pow (4050 x 897): 4050 sources and 897 time points. >>>> >>>> Now I would like to use the cluster-based permutation test on my source reconstructed data. However it seems like ft_sourcegrandaverage and ft_sourcestatistics don't support source level time courses. E.g when I am using ft_sourcegrandaverage I am getting the following error: >>>> >>>> Error in ft_sourcegrandaverage (line 158) >>>> dat(:,i) = tmp(:); >>>> >>>> Looking into the code: >>>> >>>> for i=1:Nsubject >>>> tmp = getsubfield(varargin{i}, parameterselection(cfg.parameter, varargin{i})); >>>> dat(:,i) = tmp(:); >>>> tmp = getsubfield(varargin{i}, 'inside'); >>>> inside(tmp,i) = 1; >>>> end >>>> >>>> I see that "tmp" are getting the structure [N_sources x timepoints] from source.avg.pow for one subject, where "dat" requires the structure [N_sources x 1]. >>>> >>>> I seached the mailing list for similar issues and found this thread: >>>> >>>> http://mailman.science.ru.nl/pipermail/fieldtrip/2010-September/003122.html >>>> >>>> Since I am interested in using the temporal dimension in my statistics, I would like to know if it is still not possible to use spatio-temporal source reconstructed data in ft_sourcestatistics and ft_sourcegrandaverage ? >>>> >>>> Or if any have succeeded in using the cluster-based permutation test on source level also including the temporal dimension ? >>>> >>>> Alternative I was thinking that I might could use ft_timelockstatistics, where I substituted the channels with sources, e.g instead of having 64 channels, I would now have 4050 "channels". >>>> If so I need to calculate a label structure and an appropriate neighbor structure, which I guess is possible as I have all the 3D coordinates for each source, e.g in leadfield.pos ? >>>> I know this is a work around solution, but have anyone tried or have any experience using such an approach ? >>>> >>>> Best, >>>> >>>> Nicolai >>>> >>>> _______________________________________________ >>>> fieldtrip mailing list >>>> fieldtrip at donders.ru.nl >>>> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip >>> >>> _______________________________________________ >>> fieldtrip mailing list >>> fieldtrip at donders.ru.nl >>> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip >> >> Jan-Mathijs Schoffelen, MD PhD >> >> Donders Institute for Brain, Cognition and Behaviour, >> Centre for Cognitive Neuroimaging, >> Radboud University Nijmegen, The Netherlands >> >> Max Planck Institute for Psycholinguistics, >> Nijmegen, The Netherlands >> >> J.Schoffelen at donders.ru.nl >> Telephone: +31-24-3614793 >> >> http://www.hettaligebrein.nl >> >> _______________________________________________ >> fieldtrip mailing list >> fieldtrip at donders.ru.nl >> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -------------- next part -------------- An HTML attachment was scrubbed... URL: From smoratti at psi.ucm.es Thu Jun 13 15:50:30 2013 From: smoratti at psi.ucm.es (smoratti at psi.ucm.es) Date: Thu, 13 Jun 2013 15:50:30 +0200 Subject: [FieldTrip] Source statistics on spatio-temporal source reconstruction data (MNE) In-Reply-To: <6F3697BB-194F-422F-A1BF-EBBB132F805B@mersebak.dk> References: <05B1DB8A-163B-40C0-B303-5B7D2A5434BD@psi.ucm.es> <683ABC6E-9FC6-420A-9DCF-E54D6FC6A27E@donders.ru.nl> <8D369E00-7FF3-4CC7-8B91-A55AD9ECE385@psi.ucm.es> <6F3697BB-194F-422F-A1BF-EBBB132F805B@mersebak.dk> Message-ID: <4755A6E7-44B5-4E98-B536-A19F544ED284@psi.ucm.es> Dear Nikolai, In ft_sourceplot there is the possibility of projecting grid data to surface data. However, I am not sure if the other way round is implemented in field trip. With respect to the other (maybe less accurate solution) of providing a neighbor matrix of the vertices of your brain surface: if you do " channeigbststructmat = your_neighbor_matrix" in clusterstat.m should work. Best, Stephan ________________________________________________________ Stephan Moratti, PhD see also: http://web.me.com/smoratti/ Universidad Complutense de Madrid Facultad de Psicología Departamento de Psicología Básica I Campus de Somosaguas 28223 Pozuelo de Alarcón (Madrid) Spain and Center for Biomedical Technology Laboratory for Cognitive and Computational Neuroscience Parque Científico y Tecnológico de la Universidad Politecnica de Madrid Campus Montegancedo 28223 Pozuelo de Alarcón (Madrid) Spain email: smoratti at psi.ucm.es Tel.: +34 679219982 El 13/06/2013, a las 12:04, Nicolai Mersebak escribió: > Thanks to all of you for your comments and ideas - they are very helpful! > > I ( off course :) ) have some follow up questions. > > I have created an ERP structure for my MNE source, so the only think which I need and that is not straight forward is the neighbour structure. > > I am using the standard bem template (fieldtrip-20130124/template/headmodel/standard_bem.mat) as a head model and use the following code to get a grid for all subjects as I don't have any subject specific information regarding the anatomy. > > cfg = []; > cfg.grid.xgrid = -100:10:100; > cfg.grid.ygrid = -100:10:100; > cfg.grid.zgrid = -100:10:100; > cfg.grid.tight = 'yes'; > cfg.grid.unit = hdm.unit; % unit: mm > cfg.vol = hdm; > grid = ft_prepare_sourcemodel(cfg); > > > @Jan-Mathijs and Stephan: I guess making a subject specific grid based on a warped template requires anatomic information for each subject, e.g. a MRI image like this tutorial shows: > http://fieldtrip.fcdonders.nl/example/create_single-subject_grids_in_individual_head_space_that_are_all_aligned_in_mni_space?s%5B > > The final grid output in the tutorial - does it have this 3D grid which can be used as a neighbour structure ? > > I am not sure how to go from my cortical sheet [vertices x coordinates(x,y,z)] to a 3D grid, which I can use as a neighbour structure ? > > A second thing I would like to know is, if any of you have tried to use an atlas (e.g ALL template atlas) where the regions now are channels in the permutation test? Going from source points to atlas regions can be done through ft_sourcestatistics, but I am still interested in keeping the temporal dimension. The reason to use atlas regions instead of source points is to decrease the computation time. > > Best, > > Nicolai > > > Den 12/06/2013 kl. 18.58 skrev "smoratti at psi.ucm.es" : > >> >> I think Jan.Mathijs alternative suggestion is quite attractive. With the neighbors on a cortical sheet I also had the problems that sometimes the vertices do not have the same distance and then clustering may be biased to smaller or bigger clusters as the number of neighbors does not guarantee same cluster sizes. With the interpolation onto a 3D grid, you won't have that problem. >> >> best, >> >> Stephan >> >> >> ________________________________________________________ >> Stephan Moratti, PhD >> >> see also: http://web.me.com/smoratti/ >> >> Universidad Complutense de Madrid >> Facultad de Psicología >> Departamento de Psicología Básica I >> Campus de Somosaguas >> 28223 Pozuelo de Alarcón (Madrid) >> Spain >> >> and >> >> Center for Biomedical Technology >> Laboratory for Cognitive and Computational Neuroscience >> Parque Científico y Tecnológico de la Universidad Politecnica de Madrid >> Campus Montegancedo >> 28223 Pozuelo de Alarcón (Madrid) >> Spain >> >> >> email: smoratti at psi.ucm.es >> Tel.: +34 679219982 >> >> El 12/06/2013, a las 18:00, jan-mathijs schoffelen escribió: >> >>> An alternative would be to interpolate the cortical sheet to a 3D grid (where the grid is defined for each subject based on a warped template grid defined in a standard space), and then do clustering using a regular 3D spatial neighbourhood structure. The rationale being that two vertices on the sheet may appear as disconnected (e.g. being on two sides of a sulcus) whereas, given the poor spatial resolution, they belong to the same spatial blob. >>> >>> Best, >>> Jan-Mathijs >>> >>> On Jun 12, 2013, at 5:44 PM, smoratti at psi.ucm.es wrote: >>> >>>> Dear Nicolai, >>>> >>>> Indeed I have used ft_timelockstatistics for minimum norm source data. The trick is to put the source level data into a ERF structure. Determining the neighbors of a source surface with vertices is not trivial. However I used tess_vertconn.m from the BrainStorm toolbox to get the connectivity matrix that tells you who is a neighbor. This you can feed into timelockstats. >>>> >>>> Hope that helps, >>>> >>>> Stephan >>>> >>>> ________________________________________________________ >>>> Stephan Moratti, PhD >>>> >>>> see also: http://web.me.com/smoratti/ >>>> >>>> Universidad Complutense de Madrid >>>> Facultad de Psicología >>>> Departamento de Psicología Básica I >>>> Campus de Somosaguas >>>> 28223 Pozuelo de Alarcón (Madrid) >>>> Spain >>>> >>>> and >>>> >>>> Center for Biomedical Technology >>>> Laboratory for Cognitive and Computational Neuroscience >>>> Parque Científico y Tecnológico de la Universidad Politecnica de Madrid >>>> Campus Montegancedo >>>> 28223 Pozuelo de Alarcón (Madrid) >>>> Spain >>>> >>>> >>>> email: smoratti at psi.ucm.es >>>> Tel.: +34 679219982 >>>> >>>> El 12/06/2013, a las 15:44, Nicolai Mersebak escribió: >>>> >>>>> Dear all, >>>>> >>>>> I have a question concerning the usage of ft_sourcegrandaverage and ft_sourcestatistics. >>>>> >>>>> After using ft_sourceanalysis (method: MNE), I get spatio-temporal source reconstructed data in source.avg.pow (4050 x 897): 4050 sources and 897 time points. >>>>> >>>>> Now I would like to use the cluster-based permutation test on my source reconstructed data. However it seems like ft_sourcegrandaverage and ft_sourcestatistics don't support source level time courses. E.g when I am using ft_sourcegrandaverage I am getting the following error: >>>>> >>>>> Error in ft_sourcegrandaverage (line 158) >>>>> dat(:,i) = tmp(:); >>>>> >>>>> Looking into the code: >>>>> >>>>> for i=1:Nsubject >>>>> tmp = getsubfield(varargin{i}, parameterselection(cfg.parameter, varargin{i})); >>>>> dat(:,i) = tmp(:); >>>>> tmp = getsubfield(varargin{i}, 'inside'); >>>>> inside(tmp,i) = 1; >>>>> end >>>>> >>>>> I see that "tmp" are getting the structure [N_sources x timepoints] from source.avg.pow for one subject, where "dat" requires the structure [N_sources x 1]. >>>>> >>>>> I seached the mailing list for similar issues and found this thread: >>>>> >>>>> http://mailman.science.ru.nl/pipermail/fieldtrip/2010-September/003122.html >>>>> >>>>> Since I am interested in using the temporal dimension in my statistics, I would like to know if it is still not possible to use spatio-temporal source reconstructed data in ft_sourcestatistics and ft_sourcegrandaverage ? >>>>> >>>>> Or if any have succeeded in using the cluster-based permutation test on source level also including the temporal dimension ? >>>>> >>>>> Alternative I was thinking that I might could use ft_timelockstatistics, where I substituted the channels with sources, e.g instead of having 64 channels, I would now have 4050 "channels". >>>>> If so I need to calculate a label structure and an appropriate neighbor structure, which I guess is possible as I have all the 3D coordinates for each source, e.g in leadfield.pos ? >>>>> I know this is a work around solution, but have anyone tried or have any experience using such an approach ? >>>>> >>>>> Best, >>>>> >>>>> Nicolai >>>>> >>>>> _______________________________________________ >>>>> fieldtrip mailing list >>>>> fieldtrip at donders.ru.nl >>>>> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip >>>> >>>> _______________________________________________ >>>> fieldtrip mailing list >>>> fieldtrip at donders.ru.nl >>>> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip >>> >>> Jan-Mathijs Schoffelen, MD PhD >>> >>> Donders Institute for Brain, Cognition and Behaviour, >>> Centre for Cognitive Neuroimaging, >>> Radboud University Nijmegen, The Netherlands >>> >>> Max Planck Institute for Psycholinguistics, >>> Nijmegen, The Netherlands >>> >>> J.Schoffelen at donders.ru.nl >>> Telephone: +31-24-3614793 >>> >>> http://www.hettaligebrein.nl >>> >>> _______________________________________________ >>> fieldtrip mailing list >>> fieldtrip at donders.ru.nl >>> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip >> >> _______________________________________________ >> fieldtrip mailing list >> fieldtrip at donders.ru.nl >> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -------------- next part -------------- An HTML attachment was scrubbed... URL: From jan.schoffelen at donders.ru.nl Thu Jun 13 15:58:47 2013 From: jan.schoffelen at donders.ru.nl (jan-mathijs schoffelen) Date: Thu, 13 Jun 2013 15:58:47 +0200 Subject: [FieldTrip] Source statistics on spatio-temporal source reconstruction data (MNE) In-Reply-To: <4755A6E7-44B5-4E98-B536-A19F544ED284@psi.ucm.es> References: <05B1DB8A-163B-40C0-B303-5B7D2A5434BD@psi.ucm.es> <683ABC6E-9FC6-420A-9DCF-E54D6FC6A27E@donders.ru.nl> <8D369E00-7FF3-4CC7-8B91-A55AD9ECE385@psi.ucm.es> <6F3697BB-194F-422F-A1BF-EBBB132F805B@mersebak.dk> <4755A6E7-44B5-4E98-B536-A19F544ED284@psi.ucm.es> Message-ID: <944F6EF6-C03A-46F4-BFF4-3D9EC324E602@donders.ru.nl> Hi all, ft_sourceinterpolate can interpolate from between arbitrary point clouds, so also between a set of points defined on the cortical sheet, and a more or less regular 3D grid. JM On Jun 13, 2013, at 3:50 PM, smoratti at psi.ucm.es wrote: > Dear Nikolai, > > In ft_sourceplot there is the possibility of projecting grid data to surface data. However, I am not sure if the other way round is implemented in field trip. > > With respect to the other (maybe less accurate solution) of providing a neighbor matrix of the vertices of your brain surface: > > if you do " channeigbststructmat = your_neighbor_matrix" in clusterstat.m should work. > > Best, > > Stephan > > > > ________________________________________________________ > Stephan Moratti, PhD > > see also: http://web.me.com/smoratti/ > > Universidad Complutense de Madrid > Facultad de Psicología > Departamento de Psicología Básica I > Campus de Somosaguas > 28223 Pozuelo de Alarcón (Madrid) > Spain > > and > > Center for Biomedical Technology > Laboratory for Cognitive and Computational Neuroscience > Parque Científico y Tecnológico de la Universidad Politecnica de Madrid > Campus Montegancedo > 28223 Pozuelo de Alarcón (Madrid) > Spain > > > email: smoratti at psi.ucm.es > Tel.: +34 679219982 > > El 13/06/2013, a las 12:04, Nicolai Mersebak escribió: > >> Thanks to all of you for your comments and ideas - they are very helpful! >> >> I ( off course :) ) have some follow up questions. >> >> I have created an ERP structure for my MNE source, so the only think which I need and that is not straight forward is the neighbour structure. >> >> I am using the standard bem template (fieldtrip-20130124/template/headmodel/standard_bem.mat) as a head model and use the following code to get a grid for all subjects as I don't have any subject specific information regarding the anatomy. >> >> cfg = []; >> cfg.grid.xgrid = -100:10:100; >> cfg.grid.ygrid = -100:10:100; >> cfg.grid.zgrid = -100:10:100; >> cfg.grid.tight = 'yes'; >> cfg.grid.unit = hdm.unit; % unit: mm >> cfg.vol = hdm; >> grid = ft_prepare_sourcemodel(cfg); >> >> >> @Jan-Mathijs and Stephan: I guess making a subject specific grid based on a warped template requires anatomic information for each subject, e.g. a MRI image like this tutorial shows: >> http://fieldtrip.fcdonders.nl/example/create_single-subject_grids_in_individual_head_space_that_are_all_aligned_in_mni_space?s%5B >> >> The final grid output in the tutorial - does it have this 3D grid which can be used as a neighbour structure ? >> >> I am not sure how to go from my cortical sheet [vertices x coordinates(x,y,z)] to a 3D grid, which I can use as a neighbour structure ? >> >> A second thing I would like to know is, if any of you have tried to use an atlas (e.g ALL template atlas) where the regions now are channels in the permutation test? Going from source points to atlas regions can be done through ft_sourcestatistics, but I am still interested in keeping the temporal dimension. The reason to use atlas regions instead of source points is to decrease the computation time. >> >> Best, >> >> Nicolai >> >> >> Den 12/06/2013 kl. 18.58 skrev "smoratti at psi.ucm.es" : >> >>> >>> I think Jan.Mathijs alternative suggestion is quite attractive. With the neighbors on a cortical sheet I also had the problems that sometimes the vertices do not have the same distance and then clustering may be biased to smaller or bigger clusters as the number of neighbors does not guarantee same cluster sizes. With the interpolation onto a 3D grid, you won't have that problem. >>> >>> best, >>> >>> Stephan >>> >>> >>> ________________________________________________________ >>> Stephan Moratti, PhD >>> >>> see also: http://web.me.com/smoratti/ >>> >>> Universidad Complutense de Madrid >>> Facultad de Psicología >>> Departamento de Psicología Básica I >>> Campus de Somosaguas >>> 28223 Pozuelo de Alarcón (Madrid) >>> Spain >>> >>> and >>> >>> Center for Biomedical Technology >>> Laboratory for Cognitive and Computational Neuroscience >>> Parque Científico y Tecnológico de la Universidad Politecnica de Madrid >>> Campus Montegancedo >>> 28223 Pozuelo de Alarcón (Madrid) >>> Spain >>> >>> >>> email: smoratti at psi.ucm.es >>> Tel.: +34 679219982 >>> >>> El 12/06/2013, a las 18:00, jan-mathijs schoffelen escribió: >>> >>>> An alternative would be to interpolate the cortical sheet to a 3D grid (where the grid is defined for each subject based on a warped template grid defined in a standard space), and then do clustering using a regular 3D spatial neighbourhood structure. The rationale being that two vertices on the sheet may appear as disconnected (e.g. being on two sides of a sulcus) whereas, given the poor spatial resolution, they belong to the same spatial blob. >>>> >>>> Best, >>>> Jan-Mathijs >>>> >>>> On Jun 12, 2013, at 5:44 PM, smoratti at psi.ucm.es wrote: >>>> >>>>> Dear Nicolai, >>>>> >>>>> Indeed I have used ft_timelockstatistics for minimum norm source data. The trick is to put the source level data into a ERF structure. Determining the neighbors of a source surface with vertices is not trivial. However I used tess_vertconn.m from the BrainStorm toolbox to get the connectivity matrix that tells you who is a neighbor. This you can feed into timelockstats. >>>>> >>>>> Hope that helps, >>>>> >>>>> Stephan >>>>> >>>>> ________________________________________________________ >>>>> Stephan Moratti, PhD >>>>> >>>>> see also: http://web.me.com/smoratti/ >>>>> >>>>> Universidad Complutense de Madrid >>>>> Facultad de Psicología >>>>> Departamento de Psicología Básica I >>>>> Campus de Somosaguas >>>>> 28223 Pozuelo de Alarcón (Madrid) >>>>> Spain >>>>> >>>>> and >>>>> >>>>> Center for Biomedical Technology >>>>> Laboratory for Cognitive and Computational Neuroscience >>>>> Parque Científico y Tecnológico de la Universidad Politecnica de Madrid >>>>> Campus Montegancedo >>>>> 28223 Pozuelo de Alarcón (Madrid) >>>>> Spain >>>>> >>>>> >>>>> email: smoratti at psi.ucm.es >>>>> Tel.: +34 679219982 >>>>> >>>>> El 12/06/2013, a las 15:44, Nicolai Mersebak escribió: >>>>> >>>>>> Dear all, >>>>>> >>>>>> I have a question concerning the usage of ft_sourcegrandaverage and ft_sourcestatistics. >>>>>> >>>>>> After using ft_sourceanalysis (method: MNE), I get spatio-temporal source reconstructed data in source.avg.pow (4050 x 897): 4050 sources and 897 time points. >>>>>> >>>>>> Now I would like to use the cluster-based permutation test on my source reconstructed data. However it seems like ft_sourcegrandaverage and ft_sourcestatistics don't support source level time courses. E.g when I am using ft_sourcegrandaverage I am getting the following error: >>>>>> >>>>>> Error in ft_sourcegrandaverage (line 158) >>>>>> dat(:,i) = tmp(:); >>>>>> >>>>>> Looking into the code: >>>>>> >>>>>> for i=1:Nsubject >>>>>> tmp = getsubfield(varargin{i}, parameterselection(cfg.parameter, varargin{i})); >>>>>> dat(:,i) = tmp(:); >>>>>> tmp = getsubfield(varargin{i}, 'inside'); >>>>>> inside(tmp,i) = 1; >>>>>> end >>>>>> >>>>>> I see that "tmp" are getting the structure [N_sources x timepoints] from source.avg.pow for one subject, where "dat" requires the structure [N_sources x 1]. >>>>>> >>>>>> I seached the mailing list for similar issues and found this thread: >>>>>> >>>>>> http://mailman.science.ru.nl/pipermail/fieldtrip/2010-September/003122.html >>>>>> >>>>>> Since I am interested in using the temporal dimension in my statistics, I would like to know if it is still not possible to use spatio-temporal source reconstructed data in ft_sourcestatistics and ft_sourcegrandaverage ? >>>>>> >>>>>> Or if any have succeeded in using the cluster-based permutation test on source level also including the temporal dimension ? >>>>>> >>>>>> Alternative I was thinking that I might could use ft_timelockstatistics, where I substituted the channels with sources, e.g instead of having 64 channels, I would now have 4050 "channels". >>>>>> If so I need to calculate a label structure and an appropriate neighbor structure, which I guess is possible as I have all the 3D coordinates for each source, e.g in leadfield.pos ? >>>>>> I know this is a work around solution, but have anyone tried or have any experience using such an approach ? >>>>>> >>>>>> Best, >>>>>> >>>>>> Nicolai >>>>>> >>>>>> _______________________________________________ >>>>>> fieldtrip mailing list >>>>>> fieldtrip at donders.ru.nl >>>>>> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip >>>>> >>>>> _______________________________________________ >>>>> fieldtrip mailing list >>>>> fieldtrip at donders.ru.nl >>>>> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip >>>> >>>> Jan-Mathijs Schoffelen, MD PhD >>>> >>>> Donders Institute for Brain, Cognition and Behaviour, >>>> Centre for Cognitive Neuroimaging, >>>> Radboud University Nijmegen, The Netherlands >>>> >>>> Max Planck Institute for Psycholinguistics, >>>> Nijmegen, The Netherlands >>>> >>>> J.Schoffelen at donders.ru.nl >>>> Telephone: +31-24-3614793 >>>> >>>> http://www.hettaligebrein.nl >>>> >>>> _______________________________________________ >>>> fieldtrip mailing list >>>> fieldtrip at donders.ru.nl >>>> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip >>> >>> _______________________________________________ >>> fieldtrip mailing list >>> fieldtrip at donders.ru.nl >>> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip >> >> _______________________________________________ >> fieldtrip mailing list >> fieldtrip at donders.ru.nl >> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip Jan-Mathijs Schoffelen, MD PhD Donders Institute for Brain, Cognition and Behaviour, Centre for Cognitive Neuroimaging, Radboud University Nijmegen, The Netherlands Max Planck Institute for Psycholinguistics, Nijmegen, The Netherlands J.Schoffelen at donders.ru.nl Telephone: +31-24-3614793 http://www.hettaligebrein.nl -------------- next part -------------- An HTML attachment was scrubbed... URL: From jan.schoffelen at donders.ru.nl Thu Jun 13 16:12:26 2013 From: jan.schoffelen at donders.ru.nl (jan-mathijs schoffelen) Date: Thu, 13 Jun 2013 16:12:26 +0200 Subject: [FieldTrip] Source statistics on spatio-temporal source reconstruction data (MNE) In-Reply-To: <944F6EF6-C03A-46F4-BFF4-3D9EC324E602@donders.ru.nl> References: <05B1DB8A-163B-40C0-B303-5B7D2A5434BD@psi.ucm.es> <683ABC6E-9FC6-420A-9DCF-E54D6FC6A27E@donders.ru.nl> <8D369E00-7FF3-4CC7-8B91-A55AD9ECE385@psi.ucm.es> <6F3697BB-194F-422F-A1BF-EBBB132F805B@mersebak.dk> <4755A6E7-44B5-4E98-B536-A19F544ED284@psi.ucm.es> <944F6EF6-C03A-46F4-BFF4-3D9EC324E602@donders.ru.nl> Message-ID: Hi all, As a follow up to my previous message: it is intended in the future to remove the functionality in ft_sourceplot, doing the interpolation on the fly when cfg.method='surface' but when the input contains data defined on a 3D grid, and to request the user to go through ft_sourceinterpolate before visualization. Stay tuned... JM On Jun 13, 2013, at 3:58 PM, jan-mathijs schoffelen wrote: > Hi all, > > ft_sourceinterpolate can interpolate from between arbitrary point clouds, so also between a set of points defined on the cortical sheet, and a more or less regular 3D grid. > > JM > > On Jun 13, 2013, at 3:50 PM, smoratti at psi.ucm.es wrote: > >> Dear Nikolai, >> >> In ft_sourceplot there is the possibility of projecting grid data to surface data. However, I am not sure if the other way round is implemented in field trip. >> >> With respect to the other (maybe less accurate solution) of providing a neighbor matrix of the vertices of your brain surface: >> >> if you do " channeigbststructmat = your_neighbor_matrix" in clusterstat.m should work. >> >> Best, >> >> Stephan >> >> >> >> ________________________________________________________ >> Stephan Moratti, PhD >> >> see also: http://web.me.com/smoratti/ >> >> Universidad Complutense de Madrid >> Facultad de Psicología >> Departamento de Psicología Básica I >> Campus de Somosaguas >> 28223 Pozuelo de Alarcón (Madrid) >> Spain >> >> and >> >> Center for Biomedical Technology >> Laboratory for Cognitive and Computational Neuroscience >> Parque Científico y Tecnológico de la Universidad Politecnica de Madrid >> Campus Montegancedo >> 28223 Pozuelo de Alarcón (Madrid) >> Spain >> >> >> email: smoratti at psi.ucm.es >> Tel.: +34 679219982 >> >> El 13/06/2013, a las 12:04, Nicolai Mersebak escribió: >> >>> Thanks to all of you for your comments and ideas - they are very helpful! >>> >>> I ( off course :) ) have some follow up questions. >>> >>> I have created an ERP structure for my MNE source, so the only think which I need and that is not straight forward is the neighbour structure. >>> >>> I am using the standard bem template (fieldtrip-20130124/template/headmodel/standard_bem.mat) as a head model and use the following code to get a grid for all subjects as I don't have any subject specific information regarding the anatomy. >>> >>> cfg = []; >>> cfg.grid.xgrid = -100:10:100; >>> cfg.grid.ygrid = -100:10:100; >>> cfg.grid.zgrid = -100:10:100; >>> cfg.grid.tight = 'yes'; >>> cfg.grid.unit = hdm.unit; % unit: mm >>> cfg.vol = hdm; >>> grid = ft_prepare_sourcemodel(cfg); >>> >>> >>> @Jan-Mathijs and Stephan: I guess making a subject specific grid based on a warped template requires anatomic information for each subject, e.g. a MRI image like this tutorial shows: >>> http://fieldtrip.fcdonders.nl/example/create_single-subject_grids_in_individual_head_space_that_are_all_aligned_in_mni_space?s%5B >>> >>> The final grid output in the tutorial - does it have this 3D grid which can be used as a neighbour structure ? >>> >>> I am not sure how to go from my cortical sheet [vertices x coordinates(x,y,z)] to a 3D grid, which I can use as a neighbour structure ? >>> >>> A second thing I would like to know is, if any of you have tried to use an atlas (e.g ALL template atlas) where the regions now are channels in the permutation test? Going from source points to atlas regions can be done through ft_sourcestatistics, but I am still interested in keeping the temporal dimension. The reason to use atlas regions instead of source points is to decrease the computation time. >>> >>> Best, >>> >>> Nicolai >>> >>> >>> Den 12/06/2013 kl. 18.58 skrev "smoratti at psi.ucm.es" : >>> >>>> >>>> I think Jan.Mathijs alternative suggestion is quite attractive. With the neighbors on a cortical sheet I also had the problems that sometimes the vertices do not have the same distance and then clustering may be biased to smaller or bigger clusters as the number of neighbors does not guarantee same cluster sizes. With the interpolation onto a 3D grid, you won't have that problem. >>>> >>>> best, >>>> >>>> Stephan >>>> >>>> >>>> ________________________________________________________ >>>> Stephan Moratti, PhD >>>> >>>> see also: http://web.me.com/smoratti/ >>>> >>>> Universidad Complutense de Madrid >>>> Facultad de Psicología >>>> Departamento de Psicología Básica I >>>> Campus de Somosaguas >>>> 28223 Pozuelo de Alarcón (Madrid) >>>> Spain >>>> >>>> and >>>> >>>> Center for Biomedical Technology >>>> Laboratory for Cognitive and Computational Neuroscience >>>> Parque Científico y Tecnológico de la Universidad Politecnica de Madrid >>>> Campus Montegancedo >>>> 28223 Pozuelo de Alarcón (Madrid) >>>> Spain >>>> >>>> >>>> email: smoratti at psi.ucm.es >>>> Tel.: +34 679219982 >>>> >>>> El 12/06/2013, a las 18:00, jan-mathijs schoffelen escribió: >>>> >>>>> An alternative would be to interpolate the cortical sheet to a 3D grid (where the grid is defined for each subject based on a warped template grid defined in a standard space), and then do clustering using a regular 3D spatial neighbourhood structure. The rationale being that two vertices on the sheet may appear as disconnected (e.g. being on two sides of a sulcus) whereas, given the poor spatial resolution, they belong to the same spatial blob. >>>>> >>>>> Best, >>>>> Jan-Mathijs >>>>> >>>>> On Jun 12, 2013, at 5:44 PM, smoratti at psi.ucm.es wrote: >>>>> >>>>>> Dear Nicolai, >>>>>> >>>>>> Indeed I have used ft_timelockstatistics for minimum norm source data. The trick is to put the source level data into a ERF structure. Determining the neighbors of a source surface with vertices is not trivial. However I used tess_vertconn.m from the BrainStorm toolbox to get the connectivity matrix that tells you who is a neighbor. This you can feed into timelockstats. >>>>>> >>>>>> Hope that helps, >>>>>> >>>>>> Stephan >>>>>> >>>>>> ________________________________________________________ >>>>>> Stephan Moratti, PhD >>>>>> >>>>>> see also: http://web.me.com/smoratti/ >>>>>> >>>>>> Universidad Complutense de Madrid >>>>>> Facultad de Psicología >>>>>> Departamento de Psicología Básica I >>>>>> Campus de Somosaguas >>>>>> 28223 Pozuelo de Alarcón (Madrid) >>>>>> Spain >>>>>> >>>>>> and >>>>>> >>>>>> Center for Biomedical Technology >>>>>> Laboratory for Cognitive and Computational Neuroscience >>>>>> Parque Científico y Tecnológico de la Universidad Politecnica de Madrid >>>>>> Campus Montegancedo >>>>>> 28223 Pozuelo de Alarcón (Madrid) >>>>>> Spain >>>>>> >>>>>> >>>>>> email: smoratti at psi.ucm.es >>>>>> Tel.: +34 679219982 >>>>>> >>>>>> El 12/06/2013, a las 15:44, Nicolai Mersebak escribió: >>>>>> >>>>>>> Dear all, >>>>>>> >>>>>>> I have a question concerning the usage of ft_sourcegrandaverage and ft_sourcestatistics. >>>>>>> >>>>>>> After using ft_sourceanalysis (method: MNE), I get spatio-temporal source reconstructed data in source.avg.pow (4050 x 897): 4050 sources and 897 time points. >>>>>>> >>>>>>> Now I would like to use the cluster-based permutation test on my source reconstructed data. However it seems like ft_sourcegrandaverage and ft_sourcestatistics don't support source level time courses. E.g when I am using ft_sourcegrandaverage I am getting the following error: >>>>>>> >>>>>>> Error in ft_sourcegrandaverage (line 158) >>>>>>> dat(:,i) = tmp(:); >>>>>>> >>>>>>> Looking into the code: >>>>>>> >>>>>>> for i=1:Nsubject >>>>>>> tmp = getsubfield(varargin{i}, parameterselection(cfg.parameter, varargin{i})); >>>>>>> dat(:,i) = tmp(:); >>>>>>> tmp = getsubfield(varargin{i}, 'inside'); >>>>>>> inside(tmp,i) = 1; >>>>>>> end >>>>>>> >>>>>>> I see that "tmp" are getting the structure [N_sources x timepoints] from source.avg.pow for one subject, where "dat" requires the structure [N_sources x 1]. >>>>>>> >>>>>>> I seached the mailing list for similar issues and found this thread: >>>>>>> >>>>>>> http://mailman.science.ru.nl/pipermail/fieldtrip/2010-September/003122.html >>>>>>> >>>>>>> Since I am interested in using the temporal dimension in my statistics, I would like to know if it is still not possible to use spatio-temporal source reconstructed data in ft_sourcestatistics and ft_sourcegrandaverage ? >>>>>>> >>>>>>> Or if any have succeeded in using the cluster-based permutation test on source level also including the temporal dimension ? >>>>>>> >>>>>>> Alternative I was thinking that I might could use ft_timelockstatistics, where I substituted the channels with sources, e.g instead of having 64 channels, I would now have 4050 "channels". >>>>>>> If so I need to calculate a label structure and an appropriate neighbor structure, which I guess is possible as I have all the 3D coordinates for each source, e.g in leadfield.pos ? >>>>>>> I know this is a work around solution, but have anyone tried or have any experience using such an approach ? >>>>>>> >>>>>>> Best, >>>>>>> >>>>>>> Nicolai >>>>>>> >>>>>>> _______________________________________________ >>>>>>> fieldtrip mailing list >>>>>>> fieldtrip at donders.ru.nl >>>>>>> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip >>>>>> >>>>>> _______________________________________________ >>>>>> fieldtrip mailing list >>>>>> fieldtrip at donders.ru.nl >>>>>> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip >>>>> >>>>> Jan-Mathijs Schoffelen, MD PhD >>>>> >>>>> Donders Institute for Brain, Cognition and Behaviour, >>>>> Centre for Cognitive Neuroimaging, >>>>> Radboud University Nijmegen, The Netherlands >>>>> >>>>> Max Planck Institute for Psycholinguistics, >>>>> Nijmegen, The Netherlands >>>>> >>>>> J.Schoffelen at donders.ru.nl >>>>> Telephone: +31-24-3614793 >>>>> >>>>> http://www.hettaligebrein.nl >>>>> >>>>> _______________________________________________ >>>>> fieldtrip mailing list >>>>> fieldtrip at donders.ru.nl >>>>> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip >>>> >>>> _______________________________________________ >>>> fieldtrip mailing list >>>> fieldtrip at donders.ru.nl >>>> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip >>> >>> _______________________________________________ >>> fieldtrip mailing list >>> fieldtrip at donders.ru.nl >>> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip >> >> _______________________________________________ >> fieldtrip mailing list >> fieldtrip at donders.ru.nl >> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > Jan-Mathijs Schoffelen, MD PhD > > Donders Institute for Brain, Cognition and Behaviour, > Centre for Cognitive Neuroimaging, > Radboud University Nijmegen, The Netherlands > > Max Planck Institute for Psycholinguistics, > Nijmegen, The Netherlands > > J.Schoffelen at donders.ru.nl > Telephone: +31-24-3614793 > > http://www.hettaligebrein.nl > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip Jan-Mathijs Schoffelen, MD PhD Donders Institute for Brain, Cognition and Behaviour, Centre for Cognitive Neuroimaging, Radboud University Nijmegen, The Netherlands Max Planck Institute for Psycholinguistics, Nijmegen, The Netherlands J.Schoffelen at donders.ru.nl Telephone: +31-24-3614793 http://www.hettaligebrein.nl -------------- next part -------------- An HTML attachment was scrubbed... URL: From gopalar.ccf at gmail.com Fri Jun 14 17:37:54 2013 From: gopalar.ccf at gmail.com (Raghavan Gopalakrishnan) Date: Fri, 14 Jun 2013 11:37:54 -0400 Subject: [FieldTrip] Butter command Message-ID: I noticed that 'butter' command in the fieldtrip toolbox '/fieldtrip-20130609/external/signal/butter.m' is interfering with the 'butter' command in the Matlab signal processing toolbox. Can the name be changed? There are probably more commands in fieldtrip that has same names as regular matlab commands. -------------- next part -------------- An HTML attachment was scrubbed... URL: From eelke.spaak at donders.ru.nl Fri Jun 14 20:56:17 2013 From: eelke.spaak at donders.ru.nl (Eelke Spaak) Date: Fri, 14 Jun 2013 20:56:17 +0200 Subject: [FieldTrip] Butter command In-Reply-To: References: Message-ID: Dear Raghavan, The /external/signal/ functions are meant as drop-in replacements for functions in the MATLAB Signal Processing Toolbox, so they should behave exactly the same as the functions they are shadowing. They are included in the FieldTrip release for people who do not have Signal Processing Toolbox licenses, or who would prefer not to use those licenses just for tapering or filter coefficient functions. Best, Eelke On 14 June 2013 17:37, Raghavan Gopalakrishnan wrote: > > I noticed that 'butter' command in the fieldtrip toolbox > '/fieldtrip-20130609/external/signal/butter.m' > is interfering with the 'butter' command in the Matlab signal processing > toolbox. Can the name be changed? > There are probably more commands in fieldtrip that has same names as regular > matlab commands. > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip From karenschuil at gmail.com Mon Jun 17 13:56:09 2013 From: karenschuil at gmail.com (Karen Schuil) Date: Mon, 17 Jun 2013 13:56:09 +0200 Subject: [FieldTrip] ERP average Brain Vision is different from ERP average FieldTrip Message-ID: Dear Fieldtrip Users, I have a BVA-Fieldtrip problem. The average ERPs of Brain Vision Analyser are different from the ERPS of FieldTrip. It seems that in Fieldtrip a slow negative drift is added and peaks are more/less pronounced than in BVA (attached is a picture of the two different plots). An expert FieldTrip User and I could not find a solution for this problem. I hope one of you has a suggestion for this problem. The individual trial data was exported from BVA (version 2.02.5859) with the following settings: File extension: .seg Write header file: yes Write marker file: yes Format: BINARY Orientation: MULTIPLEXED Line Delimiter: CRLF (PC style) Binary format: 16-Bit signed integer format Set resolution manually: no Individually optimized resolution for each channel: yes Convert to big-endian order: no Export all channels: no Export the following channels: AF3 AF4 AF7 AF8 AFz C1 C2 C3 C4 C5 C6 CP1 CP2 CP3 CP4 CP5 CP6 CPz Cz F1 F2 F3 F4 F5 F6 F7 F8 FC1 FC2 FC3 FC4 FC5 FC6 FCz Fpz FT7 FT8 Fz Iz O1 O2 Oz P1 P10 P2 P3 P4 P5 P6 P7 P8 P9 PO3 PO4 PO7 PO8 POz Pz T7 T8 TP7 TP8 Created Using Component Version 2.0.2.5827 We used Matlab version 7.10.0 R2, and fieldtrip version 13-06-2013 (and tried a version from 2011). The scripts we used are read_analyzer_data and timelockanalysis. This is the code we used for calling the scripts: % read data into fieldtrip cfg = []; cfg.inputfile = 'pp10_A'; cfg.triggercode = 'S 20'; cfg.triggertype = 'Stimulus'; cfg.prestim = 1.2; cfg.poststim = 1.7; pp10_l = read_analyzer_data(cfg); % check: compute ERP % cfg = []; pp10_ERP = timelockanalysis(cfg, pp10_l); %plot ERP cfg = []; cfg.layout = 'elec1010.lay'; cfg.xlim = [-0.15 1.7]; cfg.ylim = [-12.25 12.25]; % cfg.baseline = 'yes'; % cfg.baselinetype = 'absolute'; cfg.showlabels = 'yes'; cfg.interactive = 'yes'; multiplotER(cfg, pp10_ERP); I hope you can help! Kind regards, Karen -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: trial_differences.JPG Type: image/jpeg Size: 642131 bytes Desc: not available URL: From j.herring at fcdonders.ru.nl Mon Jun 17 14:23:13 2013 From: j.herring at fcdonders.ru.nl (Herring, J.D. (Jim)) Date: Mon, 17 Jun 2013 14:23:13 +0200 (CEST) Subject: [FieldTrip] ERP average Brain Vision is different from ERP average FieldTrip In-Reply-To: References: Message-ID: <001901ce6b55$6fcf4590$4f6dd0b0$@herring@fcdonders.ru.nl> Dear Karen, Comparing the BVA and Fieldtrip images it seems that the trials in BVA have been filtered using at least a high-pass filter. I can see from the BVA image that you have applied filters prior to averaging your trials. >From the Fieldtrip code you've posted I cannot see any filtering applied. If you could find out what filters were applied to the trials in BVA and apply the same filters to the trials in FieldTrip using ft_preprocessing your results will most likely be the same. Best, Jim From: fieldtrip-bounces at science.ru.nl [mailto:fieldtrip-bounces at science.ru.nl] On Behalf Of Karen Schuil Sent: maandag 17 juni 2013 13:56 To: fieldtrip at science.ru.nl Subject: [FieldTrip] ERP average Brain Vision is different from ERP average FieldTrip Dear Fieldtrip Users, I have a BVA-Fieldtrip problem. The average ERPs of Brain Vision Analyser are different from the ERPS of FieldTrip. It seems that in Fieldtrip a slow negative drift is added and peaks are more/less pronounced than in BVA (attached is a picture of the two different plots). An expert FieldTrip User and I could not find a solution for this problem. I hope one of you has a suggestion for this problem. The individual trial data was exported from BVA (version 2.02.5859) with the following settings: File extension: .seg Write header file: yes Write marker file: yes Format: BINARY Orientation: MULTIPLEXED Line Delimiter: CRLF (PC style) Binary format: 16-Bit signed integer format Set resolution manually: no Individually optimized resolution for each channel: yes Convert to big-endian order: no Export all channels: no Export the following channels: AF3 AF4 AF7 AF8 AFz C1 C2 C3 C4 C5 C6 CP1 CP2 CP3 CP4 CP5 CP6 CPz Cz F1 F2 F3 F4 F5 F6 F7 F8 FC1 FC2 FC3 FC4 FC5 FC6 FCz Fpz FT7 FT8 Fz Iz O1 O2 Oz P1 P10 P2 P3 P4 P5 P6 P7 P8 P9 PO3 PO4 PO7 PO8 POz Pz T7 T8 TP7 TP8 Created Using Component Version 2.0.2.5827 We used Matlab version 7.10.0 R2, and fieldtrip version 13-06-2013 (and tried a version from 2011). The scripts we used are read_analyzer_data and timelockanalysis. This is the code we used for calling the scripts: % read data into fieldtrip cfg = []; cfg.inputfile = 'pp10_A'; cfg.triggercode = 'S 20'; cfg.triggertype = 'Stimulus'; cfg.prestim = 1.2; cfg.poststim = 1.7; pp10_l = read_analyzer_data(cfg); % check: compute ERP % cfg = []; pp10_ERP = timelockanalysis(cfg, pp10_l); %plot ERP cfg = []; cfg.layout = 'elec1010.lay'; cfg.xlim = [-0.15 1.7]; cfg.ylim = [-12.25 12.25]; % cfg.baseline = 'yes'; % cfg.baselinetype = 'absolute'; cfg.showlabels = 'yes'; cfg.interactive = 'yes'; multiplotER(cfg, pp10_ERP); I hope you can help! Kind regards, Karen -------------- next part -------------- An HTML attachment was scrubbed... URL: From aaron.schurger at gmail.com Mon Jun 17 14:25:25 2013 From: aaron.schurger at gmail.com (Aaron Schurger) Date: Mon, 17 Jun 2013 14:25:25 +0200 Subject: [FieldTrip] ERP average Brain Vision is different from ERP average FieldTrip In-Reply-To: References: Message-ID: To me it really looks like BVA is applying a high-pass filter at some stage. When you export the data, the high-pass filter has probably already been applied. It is typical in EEG (though not a good idea in my opinion) to apply a high-pass filter with a cutoff at around 0.05 or 0.1 Hz. There should be a setting somewhere in BVA to turn off the high-pass filter. Anyway, that's my guess just from looking at the figure you attached. Cheers, Aaron On Mon, Jun 17, 2013 at 1:56 PM, Karen Schuil wrote: > Dear Fieldtrip Users, > > I have a BVA-Fieldtrip problem. The average ERPs of Brain Vision Analyser > are different from the ERPS of FieldTrip. It seems that in Fieldtrip a slow > negative drift is added and peaks are more/less pronounced than in BVA > (attached is a picture of the two different plots). > > An expert FieldTrip User and I could not find a solution for this problem. I > hope one of you has a suggestion for this problem. > > The individual trial data was exported from BVA (version 2.02.5859) with the > following settings: > File extension: .seg > Write header file: yes > Write marker file: yes > Format: BINARY > Orientation: MULTIPLEXED > Line Delimiter: CRLF (PC style) > Binary format: 16-Bit signed integer format > Set resolution manually: no > Individually optimized resolution for each channel: yes > Convert to big-endian order: no > Export all channels: no > Export the following channels: > AF3 AF4 AF7 AF8 AFz C1 C2 C3 C4 C5 C6 CP1 CP2 CP3 CP4 CP5 > CP6 CPz Cz F1 F2 F3 F4 F5 F6 F7 F8 FC1 FC2 FC3 FC4 FC5 > FC6 FCz Fpz FT7 FT8 Fz Iz O1 O2 Oz P1 P10 P2 P3 P4 P5 > P6 P7 P8 P9 PO3 PO4 PO7 PO8 POz Pz T7 T8 TP7 TP8 > Created Using Component Version 2.0.2.5827 > > We used Matlab version 7.10.0 R2, and fieldtrip version 13-06-2013 (and > tried a version from 2011). > > The scripts we used are read_analyzer_data and timelockanalysis. This is the > code we used for calling the scripts: > % read data into fieldtrip > cfg = []; > > cfg.inputfile = 'pp10_A'; > cfg.triggercode = 'S 20'; > cfg.triggertype = 'Stimulus'; > cfg.prestim = 1.2; > cfg.poststim = 1.7; > > pp10_l = read_analyzer_data(cfg); > > % check: compute ERP > % > cfg = []; > pp10_ERP = timelockanalysis(cfg, pp10_l); > > %plot ERP > > cfg = []; > cfg.layout = 'elec1010.lay'; > cfg.xlim = [-0.15 1.7]; > cfg.ylim = [-12.25 12.25]; > % cfg.baseline = 'yes'; > % cfg.baselinetype = 'absolute'; > cfg.showlabels = 'yes'; > cfg.interactive = 'yes'; > > multiplotER(cfg, pp10_ERP); > > > I hope you can help! > > Kind regards, > Karen > > > > > > > > > > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -- Aaron Schurger, PhD Post-doctoral researcher INSERM U992 / NeuroSpin CEA - Saclay, France +33-1-69-08-66-47 aaron.schurger at gmail.com http://www.unicog.org From r.vandermeij at donders.ru.nl Mon Jun 17 14:48:18 2013 From: r.vandermeij at donders.ru.nl (Roemer van der Meij) Date: Mon, 17 Jun 2013 14:48:18 +0200 Subject: [FieldTrip] ERP average Brain Vision is different from ERP average FieldTrip In-Reply-To: References: Message-ID: Hi Karen, In case the data wasn't exported with the filtering applied in BVA (see email Jim) then that looks like a probable cause. In case the data was exported with the filterings, I noticed in the BVA part of the attached image that it says AF7 - ref, where I see no such thing in your exported channel list (and thus not in the fieldtrip image). What the AF7 - ref is referring to I don't know, it seems like a uncommon place in the pipeline to do rereferencing, but maybe I'm missing something obvious. Nevertheless, it might lead you somewhere. All the best, Roemer On Mon, Jun 17, 2013 at 1:56 PM, Karen Schuil wrote: > Dear Fieldtrip Users, > > I have a BVA-Fieldtrip problem. The average ERPs of Brain Vision Analyser > are different from the ERPS of FieldTrip. It seems that in Fieldtrip a slow > negative drift is added and peaks are more/less pronounced than in BVA > (attached is a picture of the two different plots). > > An expert FieldTrip User and I could not find a solution for this problem. > I hope one of you has a suggestion for this problem. > > The individual trial data was exported from BVA (version 2.02.5859) with > the following settings: > File extension: .seg > Write header file: yes > Write marker file: yes > Format: BINARY > Orientation: MULTIPLEXED > Line Delimiter: CRLF (PC style) > Binary format: 16-Bit signed integer format > Set resolution manually: no > Individually optimized resolution for each channel: yes > Convert to big-endian order: no > Export all channels: no > Export the following channels: > AF3 AF4 AF7 AF8 AFz C1 C2 C3 C4 C5 C6 CP1 CP2 CP3 CP4 CP5 > CP6 CPz Cz F1 F2 F3 F4 F5 F6 F7 F8 FC1 FC2 FC3 FC4 FC5 > FC6 FCz Fpz FT7 FT8 Fz Iz O1 O2 Oz P1 P10 P2 P3 P4 P5 > P6 P7 P8 P9 PO3 PO4 PO7 PO8 POz Pz T7 T8 TP7 TP8 > Created Using Component Version 2.0.2.5827 > > We used Matlab version 7.10.0 R2, and fieldtrip version 13-06-2013 (and > tried a version from 2011). > > The scripts we used are read_analyzer_data and timelockanalysis. This is > the code we used for calling the scripts: > % read data into fieldtrip > cfg = []; > > cfg.inputfile = 'pp10_A'; > cfg.triggercode = 'S 20'; > cfg.triggertype = 'Stimulus'; > cfg.prestim = 1.2; > cfg.poststim = 1.7; > > pp10_l = read_analyzer_data(cfg); > > % check: compute ERP > % > cfg = []; > pp10_ERP = timelockanalysis(cfg, pp10_l); > > %plot ERP > > cfg = []; > cfg.layout = 'elec1010.lay'; > cfg.xlim = [-0.15 1.7]; > cfg.ylim = [-12.25 12.25]; > % cfg.baseline = 'yes'; > % cfg.baselinetype = 'absolute'; > cfg.showlabels = 'yes'; > cfg.interactive = 'yes'; > > multiplotER(cfg, pp10_ERP); > > > I hope you can help! > > Kind regards, > Karen > > > > > > > > > > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > -- Roemer van der Meij M.Sc. PhD Candidate Donders Institute for Brain, Cognition and Behaviour Centre for Cognition P.O. Box 9104 6500 HE Nijmegen The Netherlands Tel: +31(0)24 3655932 E-mail: r.vandermeij at donders.ru.nl -------------- next part -------------- An HTML attachment was scrubbed... URL: From t.grent-tjong at donders.ru.nl Mon Jun 17 14:55:43 2013 From: t.grent-tjong at donders.ru.nl (Tineke Grent-'t-Jong) Date: Mon, 17 Jun 2013 14:55:43 +0200 Subject: [FieldTrip] fieldtrip Digest, Vol 31, Issue 32 References: Message-ID: <5819595A0394409287071472F2D6352A@socrates> Hi Karen, To me it looks like the only thing you need to do is subtract the baseline, like you have done in BVA (specifying the same window with cfg.baseline = [xmin xmax], not 'yes'). The average ERP that you are plotting in BVA has already been baselined, but the single trials that go into the ft_timelockanalysis function are not, hence the need for baselining later, like in your case at the level of plotting. Hope this helps, Tineke ----- Original Message ----- From: To: Sent: Monday, June 17, 2013 1:56 PM Subject: fieldtrip Digest, Vol 31, Issue 32 > Send fieldtrip mailing list submissions to > fieldtrip at science.ru.nl > > To subscribe or unsubscribe via the World Wide Web, visit > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > or, via email, send a message with subject or body 'help' to > fieldtrip-request at science.ru.nl > > You can reach the person managing the list at > fieldtrip-owner at science.ru.nl > > When replying, please edit your Subject line so it is more specific > than "Re: Contents of fieldtrip digest..." > -------------------------------------------------------------------------------- > Today's Topics: > > 1. ERP average Brain Vision is different from ERP average > FieldTrip (Karen Schuil) > -------------------------------------------------------------------------------- > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip From aaron.schurger at gmail.com Mon Jun 17 15:08:25 2013 From: aaron.schurger at gmail.com (Aaron Schurger) Date: Mon, 17 Jun 2013 15:08:25 +0200 Subject: [FieldTrip] fieldtrip Digest, Vol 31, Issue 32 In-Reply-To: <5819595A0394409287071472F2D6352A@socrates> References: <5819595A0394409287071472F2D6352A@socrates> Message-ID: Hi, Karen, Tineke, To me it looks like more than just a baseline shift. It looks like either linear de-trending or high-pass filtering was applied to the BVA data. I don't see how a baseline shift could get rid of the low frequency component that is clearly visible in the FT plot, but not the BVA plot. Cheers, Aaron On Mon, Jun 17, 2013 at 2:55 PM, Tineke Grent-'t-Jong wrote: > Hi Karen, > > To me it looks like the only thing you need to do is subtract the baseline, > like you have done in BVA (specifying the same window with cfg.baseline = > [xmin xmax], not 'yes'). The average ERP that you are plotting in BVA has > already been baselined, but the single trials that go into the > ft_timelockanalysis function are not, hence the need for baselining later, > like in your case at the level of plotting. > > Hope this helps, > > Tineke > > > ----- Original Message ----- From: > To: > Sent: Monday, June 17, 2013 1:56 PM > Subject: fieldtrip Digest, Vol 31, Issue 32 > > >> Send fieldtrip mailing list submissions to >> fieldtrip at science.ru.nl >> >> To subscribe or unsubscribe via the World Wide Web, visit >> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip >> or, via email, send a message with subject or body 'help' to >> fieldtrip-request at science.ru.nl >> >> You can reach the person managing the list at >> fieldtrip-owner at science.ru.nl >> >> When replying, please edit your Subject line so it is more specific >> than "Re: Contents of fieldtrip digest..." >> > > > -------------------------------------------------------------------------------- > > >> Today's Topics: >> >> 1. ERP average Brain Vision is different from ERP average >> FieldTrip (Karen Schuil) >> > > > -------------------------------------------------------------------------------- > > >> _______________________________________________ >> fieldtrip mailing list >> fieldtrip at donders.ru.nl >> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -- Aaron Schurger, PhD Post-doctoral researcher INSERM U992 / NeuroSpin CEA - Saclay, France +33-1-69-08-66-47 aaron.schurger at gmail.com http://www.unicog.org From schuil at fsw.eur.nl Mon Jun 17 15:22:22 2013 From: schuil at fsw.eur.nl (Karen Schuil) Date: Mon, 17 Jun 2013 15:22:22 +0200 Subject: [FieldTrip] ERP average Brain Vision is different from ERP average FieldTrip In-Reply-To: References: Message-ID: Dear Jim, Aaron, Roemer and Tineke, Thanks for your quick response and suggestions! The whole preprocessing (including the filters) was done in BVA. After segmentatation of the conditions, we exported the data to Fieldtrip. The only steps we did in Fieldtrip was averaging, creating and plotting an ERP. Therefore it can't be the filters, right? Unless, the averaging step in BVA applies filters as well. The ref in AF7-ref is added by BVA and refers to the channels being linked to the mastoids. We have also tried it with subtracting a baseline, but this unfortunately did not help. Do you have any other suggestions? Cheers, Karen On Mon, Jun 17, 2013 at 2:25 PM, Aaron Schurger wrote: > To me it really looks like BVA is applying a high-pass filter at some > stage. When you export the data, the high-pass filter has probably > already been applied. It is typical in EEG (though not a good idea in > my opinion) to apply a high-pass filter with a cutoff at around 0.05 > or 0.1 Hz. There should be a setting somewhere in BVA to turn off the > high-pass filter. Anyway, that's my guess just from looking at the > figure you attached. > Cheers, > Aaron > > On Mon, Jun 17, 2013 at 1:56 PM, Karen Schuil > wrote: > > Dear Fieldtrip Users, > > > > I have a BVA-Fieldtrip problem. The average ERPs of Brain Vision Analyser > > are different from the ERPS of FieldTrip. It seems that in Fieldtrip a > slow > > negative drift is added and peaks are more/less pronounced than in BVA > > (attached is a picture of the two different plots). > > > > An expert FieldTrip User and I could not find a solution for this > problem. I > > hope one of you has a suggestion for this problem. > > > > The individual trial data was exported from BVA (version 2.02.5859) with > the > > following settings: > > File extension: .seg > > Write header file: yes > > Write marker file: yes > > Format: BINARY > > Orientation: MULTIPLEXED > > Line Delimiter: CRLF (PC style) > > Binary format: 16-Bit signed integer format > > Set resolution manually: no > > Individually optimized resolution for each channel: yes > > Convert to big-endian order: no > > Export all channels: no > > Export the following channels: > > AF3 AF4 AF7 AF8 AFz C1 C2 C3 C4 C5 C6 CP1 CP2 CP3 CP4 CP5 > > CP6 CPz Cz F1 F2 F3 F4 F5 F6 F7 F8 FC1 FC2 FC3 FC4 FC5 > > FC6 FCz Fpz FT7 FT8 Fz Iz O1 O2 Oz P1 P10 P2 P3 P4 P5 > > P6 P7 P8 P9 PO3 PO4 PO7 PO8 POz Pz T7 T8 TP7 TP8 > > Created Using Component Version 2.0.2.5827 > > > > We used Matlab version 7.10.0 R2, and fieldtrip version 13-06-2013 (and > > tried a version from 2011). > > > > The scripts we used are read_analyzer_data and timelockanalysis. This is > the > > code we used for calling the scripts: > > % read data into fieldtrip > > cfg = []; > > > > cfg.inputfile = 'pp10_A'; > > cfg.triggercode = 'S 20'; > > cfg.triggertype = 'Stimulus'; > > cfg.prestim = 1.2; > > cfg.poststim = 1.7; > > > > pp10_l = read_analyzer_data(cfg); > > > > % check: compute ERP > > % > > cfg = []; > > pp10_ERP = timelockanalysis(cfg, pp10_l); > > > > %plot ERP > > > > cfg = []; > > cfg.layout = 'elec1010.lay'; > > cfg.xlim = [-0.15 1.7]; > > cfg.ylim = [-12.25 12.25]; > > % cfg.baseline = 'yes'; > > % cfg.baselinetype = 'absolute'; > > cfg.showlabels = 'yes'; > > cfg.interactive = 'yes'; > > > > multiplotER(cfg, pp10_ERP); > > > > > > I hope you can help! > > > > Kind regards, > > Karen > > > > > > > > > > > > > > > > > > > > > > > > _______________________________________________ > > fieldtrip mailing list > > fieldtrip at donders.ru.nl > > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > > > -- > Aaron Schurger, PhD > Post-doctoral researcher > INSERM U992 / NeuroSpin > CEA - Saclay, France > +33-1-69-08-66-47 > aaron.schurger at gmail.com > http://www.unicog.org > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > -- ------------------- Karen Schuil PhD student Erasmus University Rotterdam Institute of Psychology, T 13-09 Burgemeester Oudlaan 50 P.O. Box 1738 3000 DR Rotterdam The Netherlands Phone: +31 (0) 10 408 2293 Email: schuil at fsw.eur.nl -------------- next part -------------- An HTML attachment was scrubbed... URL: From t.grent-tjong at donders.ru.nl Mon Jun 17 15:39:30 2013 From: t.grent-tjong at donders.ru.nl (Tineke Grent-'t-Jong) Date: Mon, 17 Jun 2013 15:39:30 +0200 Subject: [FieldTrip] fieldtrip Digest, Vol 31, Issue 32 References: <5819595A0394409287071472F2D6352A@socrates> Message-ID: <0840040570ED4FE896ED4FAE33DE1355@socrates> Hi Karen, Aaron is right that it could be an effect of de-trending or high-pass filtering. You could try running the ft_timelockanalyis step again with option cfg.removemean = 'no' ('yes' is the default option!). If this solves the problem then it indeed was some kind of de-trending problem. Cheers, Tineke ----- Original Message ----- From: "Aaron Schurger" To: "Tineke Grent-'t-Jong" ; "FieldTrip discussion list" Sent: Monday, June 17, 2013 3:08 PM Subject: Re: [FieldTrip] fieldtrip Digest, Vol 31, Issue 32 > Hi, Karen, Tineke, > To me it looks like more than just a baseline shift. It looks like > either linear de-trending or high-pass filtering was applied to the > BVA data. I don't see how a baseline shift could get rid of the low > frequency component that is clearly visible in the FT plot, but not > the BVA plot. > Cheers, > Aaron > > On Mon, Jun 17, 2013 at 2:55 PM, Tineke Grent-'t-Jong > wrote: >> Hi Karen, >> >> To me it looks like the only thing you need to do is subtract the >> baseline, >> like you have done in BVA (specifying the same window with cfg.baseline = >> [xmin xmax], not 'yes'). The average ERP that you are plotting in BVA has >> already been baselined, but the single trials that go into the >> ft_timelockanalysis function are not, hence the need for baselining >> later, >> like in your case at the level of plotting. >> >> Hope this helps, >> >> Tineke >> >> >> ----- Original Message ----- From: >> To: >> Sent: Monday, June 17, 2013 1:56 PM >> Subject: fieldtrip Digest, Vol 31, Issue 32 >> >> >>> Send fieldtrip mailing list submissions to >>> fieldtrip at science.ru.nl >>> >>> To subscribe or unsubscribe via the World Wide Web, visit >>> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip >>> or, via email, send a message with subject or body 'help' to >>> fieldtrip-request at science.ru.nl >>> >>> You can reach the person managing the list at >>> fieldtrip-owner at science.ru.nl >>> >>> When replying, please edit your Subject line so it is more specific >>> than "Re: Contents of fieldtrip digest..." >>> >> >> >> -------------------------------------------------------------------------------- >> >> >>> Today's Topics: >>> >>> 1. ERP average Brain Vision is different from ERP average >>> FieldTrip (Karen Schuil) >>> >> >> >> -------------------------------------------------------------------------------- >> >> >>> _______________________________________________ >>> fieldtrip mailing list >>> fieldtrip at donders.ru.nl >>> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip >> >> >> _______________________________________________ >> fieldtrip mailing list >> fieldtrip at donders.ru.nl >> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > > > -- > Aaron Schurger, PhD > Post-doctoral researcher > INSERM U992 / NeuroSpin > CEA - Saclay, France > +33-1-69-08-66-47 > aaron.schurger at gmail.com > http://www.unicog.org > From berryv.dberg at gmail.com Mon Jun 17 15:40:14 2013 From: berryv.dberg at gmail.com (berry van den berg) Date: Mon, 17 Jun 2013 09:40:14 -0400 Subject: [FieldTrip] ERP average Brain Vision is different from ERP average FieldTrip In-Reply-To: References: Message-ID: I dont know BVA but it looks like the ERPs are a bit more different (for example at timepoint 100ms) then I would expect just based on high pass filtering.... Suggesting that there is different data going into averaging. Maybe brain vision just detects trials with artifacts and does not throw out the trials until the averaging step (similar to ERPlab). Can you check the number of trials? Cheers, Berry van den Berg On 17 June 2013 09:22, Karen Schuil wrote: > Dear Jim, Aaron, Roemer and Tineke, > > Thanks for your quick response and suggestions! The whole preprocessing > (including the filters) was done in BVA. After segmentatation of the > conditions, we exported the data to Fieldtrip. The only steps we did in > Fieldtrip was averaging, creating and plotting an ERP. Therefore it can't > be the filters, right? Unless, the averaging step in BVA applies filters as > well. > > The ref in AF7-ref is added by BVA and refers to the channels being linked > to the mastoids. > > We have also tried it with subtracting a baseline, but this unfortunately > did not help. > > Do you have any other suggestions? > > Cheers, Karen > > > > > On Mon, Jun 17, 2013 at 2:25 PM, Aaron Schurger wrote: > >> To me it really looks like BVA is applying a high-pass filter at some >> stage. When you export the data, the high-pass filter has probably >> already been applied. It is typical in EEG (though not a good idea in >> my opinion) to apply a high-pass filter with a cutoff at around 0.05 >> or 0.1 Hz. There should be a setting somewhere in BVA to turn off the >> high-pass filter. Anyway, that's my guess just from looking at the >> figure you attached. >> Cheers, >> Aaron >> >> On Mon, Jun 17, 2013 at 1:56 PM, Karen Schuil >> wrote: >> > Dear Fieldtrip Users, >> > >> > I have a BVA-Fieldtrip problem. The average ERPs of Brain Vision >> Analyser >> > are different from the ERPS of FieldTrip. It seems that in Fieldtrip a >> slow >> > negative drift is added and peaks are more/less pronounced than in BVA >> > (attached is a picture of the two different plots). >> > >> > An expert FieldTrip User and I could not find a solution for this >> problem. I >> > hope one of you has a suggestion for this problem. >> > >> > The individual trial data was exported from BVA (version 2.02.5859) >> with the >> > following settings: >> > File extension: .seg >> > Write header file: yes >> > Write marker file: yes >> > Format: BINARY >> > Orientation: MULTIPLEXED >> > Line Delimiter: CRLF (PC style) >> > Binary format: 16-Bit signed integer format >> > Set resolution manually: no >> > Individually optimized resolution for each channel: yes >> > Convert to big-endian order: no >> > Export all channels: no >> > Export the following channels: >> > AF3 AF4 AF7 AF8 AFz C1 C2 C3 C4 C5 C6 CP1 CP2 CP3 CP4 CP5 >> > CP6 CPz Cz F1 F2 F3 F4 F5 F6 F7 F8 FC1 FC2 FC3 FC4 FC5 >> > FC6 FCz Fpz FT7 FT8 Fz Iz O1 O2 Oz P1 P10 P2 P3 P4 P5 >> > P6 P7 P8 P9 PO3 PO4 PO7 PO8 POz Pz T7 T8 TP7 TP8 >> > Created Using Component Version 2.0.2.5827 >> > >> > We used Matlab version 7.10.0 R2, and fieldtrip version 13-06-2013 (and >> > tried a version from 2011). >> > >> > The scripts we used are read_analyzer_data and timelockanalysis. This >> is the >> > code we used for calling the scripts: >> > % read data into fieldtrip >> > cfg = []; >> > >> > cfg.inputfile = 'pp10_A'; >> > cfg.triggercode = 'S 20'; >> > cfg.triggertype = 'Stimulus'; >> > cfg.prestim = 1.2; >> > cfg.poststim = 1.7; >> > >> > pp10_l = read_analyzer_data(cfg); >> > >> > % check: compute ERP >> > % >> > cfg = []; >> > pp10_ERP = timelockanalysis(cfg, pp10_l); >> > >> > %plot ERP >> > >> > cfg = []; >> > cfg.layout = 'elec1010.lay'; >> > cfg.xlim = [-0.15 1.7]; >> > cfg.ylim = [-12.25 12.25]; >> > % cfg.baseline = 'yes'; >> > % cfg.baselinetype = 'absolute'; >> > cfg.showlabels = 'yes'; >> > cfg.interactive = 'yes'; >> > >> > multiplotER(cfg, pp10_ERP); >> > >> > >> > I hope you can help! >> > >> > Kind regards, >> > Karen >> > >> > >> > >> > >> > >> > >> > >> > >> > >> > >> > >> > _______________________________________________ >> > fieldtrip mailing list >> > fieldtrip at donders.ru.nl >> > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip >> >> >> >> -- >> Aaron Schurger, PhD >> Post-doctoral researcher >> INSERM U992 / NeuroSpin >> CEA - Saclay, France >> +33-1-69-08-66-47 >> aaron.schurger at gmail.com >> http://www.unicog.org >> _______________________________________________ >> fieldtrip mailing list >> fieldtrip at donders.ru.nl >> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip >> > > > > -- > ------------------- > Karen Schuil > PhD student > > Erasmus University Rotterdam > Institute of Psychology, T 13-09 > Burgemeester Oudlaan 50 > P.O. Box 1738 > 3000 DR Rotterdam > The Netherlands > Phone: +31 (0) 10 408 2293 > Email: schuil at fsw.eur.nl > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > -- Berry van den Berg berryv.dberg at gmail.com -------------- next part -------------- An HTML attachment was scrubbed... URL: From aaron.schurger at gmail.com Mon Jun 17 15:44:05 2013 From: aaron.schurger at gmail.com (Aaron Schurger) Date: Mon, 17 Jun 2013 15:44:05 +0200 Subject: [FieldTrip] ERP average Brain Vision is different from ERP average FieldTrip In-Reply-To: References: Message-ID: Hi, Karen, Yes, you're right - it would have to be the case that the averaging step in BVA applies the filters. That would be where I would check. If nothing there then it really is mysterious! Aaron On Mon, Jun 17, 2013 at 3:22 PM, Karen Schuil wrote: > Dear Jim, Aaron, Roemer and Tineke, > > Thanks for your quick response and suggestions! The whole preprocessing > (including the filters) was done in BVA. After segmentatation of the > conditions, we exported the data to Fieldtrip. The only steps we did in > Fieldtrip was averaging, creating and plotting an ERP. Therefore it can't be > the filters, right? Unless, the averaging step in BVA applies filters as > well. > > The ref in AF7-ref is added by BVA and refers to the channels being linked > to the mastoids. > > We have also tried it with subtracting a baseline, but this unfortunately > did not help. > > Do you have any other suggestions? > > Cheers, Karen > > > > > On Mon, Jun 17, 2013 at 2:25 PM, Aaron Schurger > wrote: >> >> To me it really looks like BVA is applying a high-pass filter at some >> stage. When you export the data, the high-pass filter has probably >> already been applied. It is typical in EEG (though not a good idea in >> my opinion) to apply a high-pass filter with a cutoff at around 0.05 >> or 0.1 Hz. There should be a setting somewhere in BVA to turn off the >> high-pass filter. Anyway, that's my guess just from looking at the >> figure you attached. >> Cheers, >> Aaron >> >> On Mon, Jun 17, 2013 at 1:56 PM, Karen Schuil >> wrote: >> > Dear Fieldtrip Users, >> > >> > I have a BVA-Fieldtrip problem. The average ERPs of Brain Vision >> > Analyser >> > are different from the ERPS of FieldTrip. It seems that in Fieldtrip a >> > slow >> > negative drift is added and peaks are more/less pronounced than in BVA >> > (attached is a picture of the two different plots). >> > >> > An expert FieldTrip User and I could not find a solution for this >> > problem. I >> > hope one of you has a suggestion for this problem. >> > >> > The individual trial data was exported from BVA (version 2.02.5859) with >> > the >> > following settings: >> > File extension: .seg >> > Write header file: yes >> > Write marker file: yes >> > Format: BINARY >> > Orientation: MULTIPLEXED >> > Line Delimiter: CRLF (PC style) >> > Binary format: 16-Bit signed integer format >> > Set resolution manually: no >> > Individually optimized resolution for each channel: yes >> > Convert to big-endian order: no >> > Export all channels: no >> > Export the following channels: >> > AF3 AF4 AF7 AF8 AFz C1 C2 C3 C4 C5 C6 CP1 CP2 CP3 CP4 CP5 >> > CP6 CPz Cz F1 F2 F3 F4 F5 F6 F7 F8 FC1 FC2 FC3 FC4 FC5 >> > FC6 FCz Fpz FT7 FT8 Fz Iz O1 O2 Oz P1 P10 P2 P3 P4 P5 >> > P6 P7 P8 P9 PO3 PO4 PO7 PO8 POz Pz T7 T8 TP7 TP8 >> > Created Using Component Version 2.0.2.5827 >> > >> > We used Matlab version 7.10.0 R2, and fieldtrip version 13-06-2013 (and >> > tried a version from 2011). >> > >> > The scripts we used are read_analyzer_data and timelockanalysis. This is >> > the >> > code we used for calling the scripts: >> > % read data into fieldtrip >> > cfg = []; >> > >> > cfg.inputfile = 'pp10_A'; >> > cfg.triggercode = 'S 20'; >> > cfg.triggertype = 'Stimulus'; >> > cfg.prestim = 1.2; >> > cfg.poststim = 1.7; >> > >> > pp10_l = read_analyzer_data(cfg); >> > >> > % check: compute ERP >> > % >> > cfg = []; >> > pp10_ERP = timelockanalysis(cfg, pp10_l); >> > >> > %plot ERP >> > >> > cfg = []; >> > cfg.layout = 'elec1010.lay'; >> > cfg.xlim = [-0.15 1.7]; >> > cfg.ylim = [-12.25 12.25]; >> > % cfg.baseline = 'yes'; >> > % cfg.baselinetype = 'absolute'; >> > cfg.showlabels = 'yes'; >> > cfg.interactive = 'yes'; >> > >> > multiplotER(cfg, pp10_ERP); >> > >> > >> > I hope you can help! >> > >> > Kind regards, >> > Karen >> > >> > >> > >> > >> > >> > >> > >> > >> > >> > >> > >> > _______________________________________________ >> > fieldtrip mailing list >> > fieldtrip at donders.ru.nl >> > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip >> >> >> >> -- >> Aaron Schurger, PhD >> Post-doctoral researcher >> INSERM U992 / NeuroSpin >> CEA - Saclay, France >> +33-1-69-08-66-47 >> aaron.schurger at gmail.com >> http://www.unicog.org >> _______________________________________________ >> fieldtrip mailing list >> fieldtrip at donders.ru.nl >> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > > > > -- > ------------------- > Karen Schuil > PhD student > > Erasmus University Rotterdam > Institute of Psychology, T 13-09 > Burgemeester Oudlaan 50 > P.O. Box 1738 > 3000 DR Rotterdam > The Netherlands > Phone: +31 (0) 10 408 2293 > Email: schuil at fsw.eur.nl > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -- Aaron Schurger, PhD Post-doctoral researcher INSERM U992 / NeuroSpin CEA - Saclay, France +33-1-69-08-66-47 aaron.schurger at gmail.com http://www.unicog.org From eelke.spaak at donders.ru.nl Tue Jun 18 10:29:34 2013 From: eelke.spaak at donders.ru.nl (Eelke Spaak) Date: Tue, 18 Jun 2013 10:29:34 +0200 Subject: [FieldTrip] ERP average Brain Vision is different from ERP average FieldTrip In-Reply-To: References: Message-ID: Dear Karen, It seems likely (as the other responses also indicate) that BrainVision Analyzer is doing something to the data that FieldTrip is not; in other words, the FieldTrip ERP is probably more 'pure'. Therefore, perhaps it might be worth asking around on the BVA mailing list if the people there know what BVA is doing to the data prior to computing and displaying the average? It is easy to check whether FieldTrip is doing something unexpected to the data, by computing and plotting the average yourself: erp = mean(cat(3, pp10_l.trial{:}), 3); chanind = strmatch('AF7', pp10_l.label); plot(pp10_l.time{1}, erp(chanind,:)); This only works if all trials have identical time axes, but judging from your script I think they do. It the above steps give a different plot than the FT functions, something is possibly (/probably) wrong in the FT code. Best, Eelke On 17 June 2013 15:22, Karen Schuil wrote: > Dear Jim, Aaron, Roemer and Tineke, > > Thanks for your quick response and suggestions! The whole preprocessing > (including the filters) was done in BVA. After segmentatation of the > conditions, we exported the data to Fieldtrip. The only steps we did in > Fieldtrip was averaging, creating and plotting an ERP. Therefore it can't be > the filters, right? Unless, the averaging step in BVA applies filters as > well. > > The ref in AF7-ref is added by BVA and refers to the channels being linked > to the mastoids. > > We have also tried it with subtracting a baseline, but this unfortunately > did not help. > > Do you have any other suggestions? > > Cheers, Karen > > > > > On Mon, Jun 17, 2013 at 2:25 PM, Aaron Schurger > wrote: >> >> To me it really looks like BVA is applying a high-pass filter at some >> stage. When you export the data, the high-pass filter has probably >> already been applied. It is typical in EEG (though not a good idea in >> my opinion) to apply a high-pass filter with a cutoff at around 0.05 >> or 0.1 Hz. There should be a setting somewhere in BVA to turn off the >> high-pass filter. Anyway, that's my guess just from looking at the >> figure you attached. >> Cheers, >> Aaron >> >> On Mon, Jun 17, 2013 at 1:56 PM, Karen Schuil >> wrote: >> > Dear Fieldtrip Users, >> > >> > I have a BVA-Fieldtrip problem. The average ERPs of Brain Vision >> > Analyser >> > are different from the ERPS of FieldTrip. It seems that in Fieldtrip a >> > slow >> > negative drift is added and peaks are more/less pronounced than in BVA >> > (attached is a picture of the two different plots). >> > >> > An expert FieldTrip User and I could not find a solution for this >> > problem. I >> > hope one of you has a suggestion for this problem. >> > >> > The individual trial data was exported from BVA (version 2.02.5859) with >> > the >> > following settings: >> > File extension: .seg >> > Write header file: yes >> > Write marker file: yes >> > Format: BINARY >> > Orientation: MULTIPLEXED >> > Line Delimiter: CRLF (PC style) >> > Binary format: 16-Bit signed integer format >> > Set resolution manually: no >> > Individually optimized resolution for each channel: yes >> > Convert to big-endian order: no >> > Export all channels: no >> > Export the following channels: >> > AF3 AF4 AF7 AF8 AFz C1 C2 C3 C4 C5 C6 CP1 CP2 CP3 CP4 CP5 >> > CP6 CPz Cz F1 F2 F3 F4 F5 F6 F7 F8 FC1 FC2 FC3 FC4 FC5 >> > FC6 FCz Fpz FT7 FT8 Fz Iz O1 O2 Oz P1 P10 P2 P3 P4 P5 >> > P6 P7 P8 P9 PO3 PO4 PO7 PO8 POz Pz T7 T8 TP7 TP8 >> > Created Using Component Version 2.0.2.5827 >> > >> > We used Matlab version 7.10.0 R2, and fieldtrip version 13-06-2013 (and >> > tried a version from 2011). >> > >> > The scripts we used are read_analyzer_data and timelockanalysis. This is >> > the >> > code we used for calling the scripts: >> > % read data into fieldtrip >> > cfg = []; >> > >> > cfg.inputfile = 'pp10_A'; >> > cfg.triggercode = 'S 20'; >> > cfg.triggertype = 'Stimulus'; >> > cfg.prestim = 1.2; >> > cfg.poststim = 1.7; >> > >> > pp10_l = read_analyzer_data(cfg); >> > >> > % check: compute ERP >> > % >> > cfg = []; >> > pp10_ERP = timelockanalysis(cfg, pp10_l); >> > >> > %plot ERP >> > >> > cfg = []; >> > cfg.layout = 'elec1010.lay'; >> > cfg.xlim = [-0.15 1.7]; >> > cfg.ylim = [-12.25 12.25]; >> > % cfg.baseline = 'yes'; >> > % cfg.baselinetype = 'absolute'; >> > cfg.showlabels = 'yes'; >> > cfg.interactive = 'yes'; >> > >> > multiplotER(cfg, pp10_ERP); >> > >> > >> > I hope you can help! >> > >> > Kind regards, >> > Karen >> > >> > >> > >> > >> > >> > >> > >> > >> > >> > >> > >> > _______________________________________________ >> > fieldtrip mailing list >> > fieldtrip at donders.ru.nl >> > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip >> >> >> >> -- >> Aaron Schurger, PhD >> Post-doctoral researcher >> INSERM U992 / NeuroSpin >> CEA - Saclay, France >> +33-1-69-08-66-47 >> aaron.schurger at gmail.com >> http://www.unicog.org >> _______________________________________________ >> fieldtrip mailing list >> fieldtrip at donders.ru.nl >> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > > > > -- > ------------------- > Karen Schuil > PhD student > > Erasmus University Rotterdam > Institute of Psychology, T 13-09 > Burgemeester Oudlaan 50 > P.O. Box 1738 > 3000 DR Rotterdam > The Netherlands > Phone: +31 (0) 10 408 2293 > Email: schuil at fsw.eur.nl > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip From mje.mads at gmail.com Tue Jun 18 10:44:01 2013 From: mje.mads at gmail.com (Mads Jensen) Date: Tue, 18 Jun 2013 10:44:01 +0200 Subject: [FieldTrip] select trial by previous trigger code Message-ID: <51C01DD1.5070005@gmail.com> Hi all, I would like to know if it is possible select a trail based on the previous trigger code? I got a dataset (MEG, neuromeg) where sometimes the subject just press a button and sometimes a cue is shown and they then press the button, the button presses are coded "1" and the cue "2". So, what I would like is to datasets one with trials where there has been no cue and one dataset where the trials that have cue is. Is that possible to do automatically or do I have to do a "by hand"? best wishes, mads From s.vanpelt at fcdonders.ru.nl Tue Jun 18 11:11:06 2013 From: s.vanpelt at fcdonders.ru.nl (Stan van Pelt) Date: Tue, 18 Jun 2013 11:11:06 +0200 (CEST) Subject: [FieldTrip] select trial by previous trigger code References: <51C01DD1.5070005@gmail.com> Message-ID: <03cc01ce6c03$c403fb20$4c0bf160$@vanpelt@fcdonders.ru.nl> Dear Mads, It is not possible to do this automatically. However, by writing your own 'trialfun', you should be able to program this in a relative straightforward manner. You can enter this trialfun-name in the cfg.trialfun configuration option when subsequently calling ft_definetrial. See http://fieldtrip.fcdonders.nl/example/making_your_own_trialfun_for_conditi onal_trial_definition Best, Stan Stan van Pelt, PhD Donders Institute for Brain, Cognition and Behaviour Centre for Cognition Montessorilaan 3, B.01.19 6525 HR Nijmegen tel: 024-3616288 -----Original Message----- From: fieldtrip-bounces at science.ru.nl [mailto:fieldtrip-bounces at science.ru.nl] On Behalf Of Mads Jensen Sent: dinsdag 18 juni 2013 10:44 To: FieldTrip discussion list Subject: [FieldTrip] select trial by previous trigger code Hi all, I would like to know if it is possible select a trail based on the previous trigger code? I got a dataset (MEG, neuromeg) where sometimes the subject just press a button and sometimes a cue is shown and they then press the button, the button presses are coded "1" and the cue "2". So, what I would like is to datasets one with trials where there has been no cue and one dataset where the trials that have cue is. Is that possible to do automatically or do I have to do a "by hand"? best wishes, mads _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip From jm.horschig at donders.ru.nl Tue Jun 18 11:11:50 2013 From: jm.horschig at donders.ru.nl (=?ISO-8859-1?Q?=22J=F6rn_M=2E_Horschig=22?=) Date: Tue, 18 Jun 2013 11:11:50 +0200 Subject: [FieldTrip] select trial by previous trigger code In-Reply-To: <51C01DD1.5070005@gmail.com> References: <51C01DD1.5070005@gmail.com> Message-ID: <51C02456.2000800@donders.ru.nl> Hi Mads, such things are possible if you write your own trial function. Basically, you need to read in the events (i.e. trigger values) and then make a selection based on that, see also here: http://fieldtrip.fcdonders.nl/example/making_your_own_trialfun_for_conditional_trial_definition?s[]=trialfun http://fieldtrip.fcdonders.nl/faq/what_is_the_relation_between_events_such_as_triggers_and_trials?s[]=trialfun Hope that helps! Best, Jörn On 6/18/2013 10:44 AM, Mads Jensen wrote: > Hi all, > > I would like to know if it is possible select a trail based on the > previous trigger code? > > I got a dataset (MEG, neuromeg) where sometimes the subject just press > a button and sometimes a cue is shown and they then press the button, > the button presses are coded "1" and the cue "2". So, what I would > like is to datasets one with trials where there has been no cue and > one dataset where the trials that have cue is. Is that possible to do > automatically or do I have to do a "by hand"? > > best wishes, > mads > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -- Jörn M. Horschig PhD Student Donders Institute for Brain, Cognition and Behaviour Centre for Cognitive Neuroimaging Radboud University Nijmegen Neuronal Oscillations Group FieldTrip Development Team P.O. Box 9101 NL-6500 HB Nijmegen The Netherlands Contact: E-Mail: jm.horschig at donders.ru.nl Tel: +31-(0)24-36-68493 Web: http://www.ru.nl/donders Visiting address: Trigon, room 2.30 Kapittelweg 29 NL-6525 EN Nijmegen The Netherlands From yuvharpaz at gmail.com Tue Jun 18 14:58:15 2013 From: yuvharpaz at gmail.com (Yuval Harpaz) Date: Tue, 18 Jun 2013 15:58:15 +0300 Subject: [FieldTrip] fixed dipole orientation for MNE Message-ID: Dear group I would like to ask again ( http://mailman.science.ru.nl/pipermail/fieldtrip/2011-February/003456.html) about head model with fixed dipole orientation (obtained from freesurfer), as I saw no reply to the previous message. I understand that there is no civilized way, currently, to tell MNE or beamforming to use fixed orientation, or am I wrong? applying 'sam' I managed to set dipole orinetation by making a dip.mom field in addition to dip.pos and by gain = lf; instead of the existing gain = lf * UnitMDip'; note that here lf is a vector (no 3 columns). However this is patchy and not thorough. So can you please tell me if there is a way to do it with regular ft functions? thank you Yuval Dr .Harpaz BIU MEG lab -------------- next part -------------- An HTML attachment was scrubbed... URL: From eelke.spaak at donders.ru.nl Tue Jun 18 15:16:41 2013 From: eelke.spaak at donders.ru.nl (Eelke Spaak) Date: Tue, 18 Jun 2013 15:16:41 +0200 Subject: [FieldTrip] fixed dipole orientation for MNE In-Reply-To: References: Message-ID: Dear Yuval, The LCMV and DICS beamforming implementations in FieldTrip support cfg..fixedori = 'yes', where is either 'lcmv' or 'dics'. This will compute a filter which constrains each dipole to point in the strongest orientation. For SAM I think this is not implemented, and for MNE I have no clue. Does this answer your question? Or are you lookling for another type of fixed orientation, maybe based on anatomy or so? Best, Eelke On 18 June 2013 14:58, Yuval Harpaz wrote: > Dear group > I would like to ask again > (http://mailman.science.ru.nl/pipermail/fieldtrip/2011-February/003456.html) > about head model with fixed dipole orientation (obtained from freesurfer), > as I saw no reply to the previous message. > > I understand that there is no civilized way, currently, to tell MNE or > beamforming to use fixed orientation, or am I wrong? > > applying 'sam' I managed to set dipole orinetation by making a dip.mom field > in addition to dip.pos and by > gain = lf; > instead of the existing > gain = lf * UnitMDip'; > note that here lf is a vector (no 3 columns). > > However this is patchy and not thorough. So can you please tell me if there > is a way to do it with regular ft functions? > thank you > Yuval > > > > > Dr .Harpaz > > BIU MEG lab > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip From yuvharpaz at gmail.com Tue Jun 18 19:01:40 2013 From: yuvharpaz at gmail.com (Yuval Harpaz) Date: Tue, 18 Jun 2013 20:01:40 +0300 Subject: [FieldTrip] fixed dipole orientation for MNE In-Reply-To: References: Message-ID: Well, it uses fixed orientation but it calculates the orientation based on the signal, not on the anatomy. I am trying to reduce leakage problems by limiting orientation according to structure. you CAN specify dip.mom but this is really buggy. thanks On 18 June 2013 16:16, Eelke Spaak wrote: > Dear Yuval, > > The LCMV and DICS beamforming implementations in FieldTrip support > cfg..fixedori = 'yes', where is either 'lcmv' or > 'dics'. This will compute a filter which constrains each dipole to > point in the strongest orientation. For SAM I think this is not > implemented, and for MNE I have no clue. > > Does this answer your question? Or are you lookling for another type > of fixed orientation, maybe based on anatomy or so? > > Best, > Eelke > > On 18 June 2013 14:58, Yuval Harpaz wrote: > > Dear group > > I would like to ask again > > ( > http://mailman.science.ru.nl/pipermail/fieldtrip/2011-February/003456.html > ) > > about head model with fixed dipole orientation (obtained from > freesurfer), > > as I saw no reply to the previous message. > > > > I understand that there is no civilized way, currently, to tell MNE or > > beamforming to use fixed orientation, or am I wrong? > > > > applying 'sam' I managed to set dipole orinetation by making a dip.mom > field > > in addition to dip.pos and by > > gain = lf; > > instead of the existing > > gain = lf * UnitMDip'; > > note that here lf is a vector (no 3 columns). > > > > However this is patchy and not thorough. So can you please tell me if > there > > is a way to do it with regular ft functions? > > thank you > > Yuval > > > > > > > > > > Dr .Harpaz > > > > BIU MEG lab > > > > _______________________________________________ > > fieldtrip mailing list > > fieldtrip at donders.ru.nl > > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > -- Yuval Dr .Harpaz BIU MEG lab -------------- next part -------------- An HTML attachment was scrubbed... URL: From mje.mads at gmail.com Tue Jun 18 23:52:02 2013 From: mje.mads at gmail.com (Mads Jensen) Date: Tue, 18 Jun 2013 23:52:02 +0200 Subject: [FieldTrip] select trial by previous trigger code In-Reply-To: <51C02456.2000800@donders.ru.nl> References: <51C01DD1.5070005@gmail.com> <51C02456.2000800@donders.ru.nl> Message-ID: <51C0D682.7070008@gmail.com> HI Jörn & Stan, Thanks for your replies and advises. It worked. thanks, best mads On 06/18/2013 11:11 AM, "Jörn M. Horschig" wrote: > Hi Mads, > > such things are possible if you write your own trial function. > Basically, you need to read in the events (i.e. trigger values) and then > make a selection based on that, see also here: > http://fieldtrip.fcdonders.nl/example/making_your_own_trialfun_for_conditional_trial_definition?s[]=trialfun > > http://fieldtrip.fcdonders.nl/faq/what_is_the_relation_between_events_such_as_triggers_and_trials?s[]=trialfun > > > Hope that helps! > Best, > Jörn > > On 6/18/2013 10:44 AM, Mads Jensen wrote: >> Hi all, >> >> I would like to know if it is possible select a trail based on the >> previous trigger code? >> >> I got a dataset (MEG, neuromeg) where sometimes the subject just press >> a button and sometimes a cue is shown and they then press the button, >> the button presses are coded "1" and the cue "2". So, what I would >> like is to datasets one with trials where there has been no cue and >> one dataset where the trials that have cue is. Is that possible to do >> automatically or do I have to do a "by hand"? >> >> best wishes, >> mads >> _______________________________________________ >> fieldtrip mailing list >> fieldtrip at donders.ru.nl >> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > From marco.porta88 at gmail.com Wed Jun 19 16:41:47 2013 From: marco.porta88 at gmail.com (Marco Porta) Date: Wed, 19 Jun 2013 16:41:47 +0200 Subject: [FieldTrip] statistics on non-event-related fields Message-ID: Dear Fieldtrip experts, I have a question regarding the statistics. How can I statistics on non event-related fields in a between-trials. Thanks, Marco -------------- next part -------------- An HTML attachment was scrubbed... URL: From eelke.spaak at donders.ru.nl Wed Jun 19 16:50:48 2013 From: eelke.spaak at donders.ru.nl (Eelke Spaak) Date: Wed, 19 Jun 2013 16:50:48 +0200 Subject: [FieldTrip] statistics on non-event-related fields In-Reply-To: References: Message-ID: Dear Marco, What do you mean exactly with "non event-related fields"? I presume there is some structure in your data that you want to consider as the independent variable of interest, right? Some more information on what you want to do would help us to help you. Best, Eelke On 19 June 2013 16:41, Marco Porta wrote: > Dear Fieldtrip experts, > I have a question regarding the statistics. How can I statistics on non > event-related fields in a between-trials. > Thanks, > > Marco > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip From jdien07 at mac.com Thu Jun 20 02:35:35 2013 From: jdien07 at mac.com (Joseph Dien) Date: Wed, 19 Jun 2013 20:35:35 -0400 Subject: [FieldTrip] ft_dipolefitting options no longer working Message-ID: Hi, it looks like changes have been made to ft_dipolefitting that have resulted in the following options no longer working: cfg.grid.xgrid = 'auto'; cfg.grid.ygrid = 'auto'; cfg.grid.zgrid = 'auto'; The header of the ft_dipolefitting file as of the 20130619 release says: % This function depends on FT_PREPARE_DIPOLE_GRID which has the following options: % cfg.grid.xgrid (default set in FT_PREPARE_DIPOLE_GRID: cfg.grid.xgrid = 'auto'), documented % cfg.grid.ygrid (default set in FT_PREPARE_DIPOLE_GRID: cfg.grid.ygrid = 'auto'), documented % cfg.grid.zgrid (default set in FT_PREPARE_DIPOLE_GRID: cfg.grid.zgrid = 'auto'), documented but a Find Files search indicates that FT_PREPARE_DIPOLE_GRID no longer exists. I don't have copies of FieldTrip older than Feb 2013 so I can't check directly but I know that my function call used to work and no longer does. Can someone help me find a fix for this? Any help appreciated! Joe -------------------------------------------------------------------------------- Joseph Dien, Senior Research Scientist University of Maryland E-mail: jdien07 at mac.com Phone: 301-226-8848 Fax: 301-226-8811 http://joedien.com// -------------- next part -------------- An HTML attachment was scrubbed... URL: From jdien07 at mac.com Thu Jun 20 04:41:49 2013 From: jdien07 at mac.com (Joseph Dien) Date: Wed, 19 Jun 2013 22:41:49 -0400 Subject: [FieldTrip] ft_dipolefitting options no longer working In-Reply-To: References: Message-ID: Okay, I got this sorted out. I was able to use ft_prepare_sourcemodel to set up the config variable. The header info of ft_dipolefitting should get updated though. Cheers! Joe On Jun 19, 2013, at 8:35 PM, Joseph Dien wrote: > Hi, > it looks like changes have been made to ft_dipolefitting that have resulted in the following options no longer working: > > cfg.grid.xgrid = 'auto'; > cfg.grid.ygrid = 'auto'; > cfg.grid.zgrid = 'auto'; > > The header of the ft_dipolefitting file as of the 20130619 release says: > > % This function depends on FT_PREPARE_DIPOLE_GRID which has the following options: > % cfg.grid.xgrid (default set in FT_PREPARE_DIPOLE_GRID: cfg.grid.xgrid = 'auto'), documented > % cfg.grid.ygrid (default set in FT_PREPARE_DIPOLE_GRID: cfg.grid.ygrid = 'auto'), documented > % cfg.grid.zgrid (default set in FT_PREPARE_DIPOLE_GRID: cfg.grid.zgrid = 'auto'), documented > > but a Find Files search indicates that FT_PREPARE_DIPOLE_GRID no longer exists. > > I don't have copies of FieldTrip older than Feb 2013 so I can't check directly but I know that my function call used to work and no longer does. > > Can someone help me find a fix for this? > > Any help appreciated! > > Joe > > -------------------------------------------------------------------------------- > > Joseph Dien, > Senior Research Scientist > University of Maryland > > E-mail: jdien07 at mac.com > Phone: 301-226-8848 > Fax: 301-226-8811 > http://joedien.com// > > > > > > > > > > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -------------------------------------------------------------------------------- Joseph Dien, Senior Research Scientist University of Maryland E-mail: jdien07 at mac.com Phone: 301-226-8848 Fax: 301-226-8811 http://joedien.com// -------------- next part -------------- An HTML attachment was scrubbed... URL: From marco.porta88 at gmail.com Thu Jun 20 14:48:18 2013 From: marco.porta88 at gmail.com (Marco Porta) Date: Thu, 20 Jun 2013 14:48:18 +0200 Subject: [FieldTrip] fieldtrip Digest, Vol 31, Issue 37 In-Reply-To: References: Message-ID: Dear Users and Eelke, I have spontaneous LFP data recorded intracranially. I'm interested in studying phase correlation between sensors and assess such correlation within single subjects studies. Is it possible to study statistical significance in such correlation study or should i implement my own statistic? Thanks, Marco Dear Marco, > > What do you mean exactly with "non event-related fields"? I presume > there is some structure in your data that you want to consider as the > independent variable of interest, right? Some more information on what > you want to do would help us to help you. > > Best, > Eelke > -------------- next part -------------- An HTML attachment was scrubbed... URL: From marco.porta88 at gmail.com Fri Jun 21 14:26:12 2013 From: marco.porta88 at gmail.com (Marco Porta) Date: Fri, 21 Jun 2013 14:26:12 +0200 Subject: [FieldTrip] statistics on non-event-related fields Message-ID: Dear Users and Eelke, I have spontaneous LFP data recorded intracranially. I'm interested in studying phase correlation between sensors and assess such correlation within single subjects studies. Is it possible to study statistical significance in such correlation study or should i implement my own statistic? Thanks, Marco > Dear Marco, > > What do you mean exactly with "non event-related fields"? I presume > there is some structure in your data that you want to consider as the > independent variable of interest, right? Some more information on what > you want to do would help us to help you. > > Best, > Eelke > > > > > Dear Fieldtrip experts, > I have a question regarding the statistics. How can I statistics on non > event-related fields in a between-trials. > Thanks, > Marco -------------- next part -------------- An HTML attachment was scrubbed... URL: From politzerahless at gmail.com Fri Jun 21 20:42:32 2013 From: politzerahless at gmail.com (Stephen Politzer-Ahles) Date: Fri, 21 Jun 2013 13:42:32 -0500 Subject: [FieldTrip] Using fsaverage in the minimum norm pipeline? Message-ID: Hello everyone, I am working through the minimum norm pipeline ( http://fieldtrip.fcdonders.nl/tutorial/minimumnormestimate) on functional data for multiple participants; for all but one of these participants I also have anatomical MRI. For the one participant for whom I couldn't get an MRI, I was hoping to use the freesurfer average surface (fsaverage), but I'm having some difficulty getting volume conduction models and sourcespaces from this brain aligned to CTF. Basically, I'm able to read in the data and create a sourcespace and volume conduction model using the code below. These models seem to be aligned to MNI (see the axes on http://i.imgur.com/g0DPs8A.png). To to re-align them to CTF, what I tried to do was manually do ft_volumerealign on the original anatomical MRI, and then apply that transformation matrix (which I assume specifies the transformation from MNI to CTF) to the sourcespace and volume conductor (in the third and fourth blocks of code below). But the resulting sourcespace and volume conductor are clearly not aligned to CTF (see the axes on http://i.imgur.com/MAjyDkL.png), so I assume I am doing something wrong with the transformation matrix. I admit I do not fully understand how the transformation matrix is supposed to work, so if anyone has any feedback I would greatly appreciate it. Thank you! Steve % Read the source space bnd = ft_read_headshape('/tools/freesurfer/subjects/fsaverage/bem/fsaverage-oct-6-src.fif', 'format', 'mne_source'); sourcespace = ft_convert_units(bnd, 'mm'); % Read in the anatomical MRI, segment, and make volume conduction model fsaverage = ft_read_mri('orig.mgz'); cfg = []; cfg.coordsys = 'spm'; cfg.output = {'skullstrip' 'brain'}; seg = ft_volumesegment( cfg, fsaverage); cfg = [] cfg.method = 'singleshell'; cfg.tissue = 'brain'; vol = ft_prepare_headmodel( cfg, seg ); % Get a transformation matrix from MNI to CTF cfg = []; cfg.method = 'interactive'; seg_ctf = ft_volumerealign(cfg2, seg); % manually identify NAS, LAP, and RAP T = seg_ctf.transform; % Transform the sourcespace and vol sourcespace_trans = ft_transform_geometry( T, sourcespace ); vol_trans = vol; vol_trans.bnd = ft_transform_geometry( T, vol_trans.bnd ); % Plot the un-transformed vol and sourcespace (aligned to MNI) figure;hold on; ft_plot_vol(vol, 'facecolor', 'none');alpha 0.5; ft_plot_mesh(sourcespace, 'edgecolor', 'none'); camlight % Plot the transformed vol and sourcespace figure;hold on; ft_plot_vol(vol_trans, 'facecolor', 'none');alpha 0.5; ft_plot_mesh(sourcespace_trans, 'edgecolor', 'none'); camlight -- Stephen Politzer-Ahles University of Kansas Linguistics Department http://people.ku.edu/~sjpa/ -------------- next part -------------- An HTML attachment was scrubbed... URL: From polomacnenad at gmail.com Sat Jun 22 13:34:56 2013 From: polomacnenad at gmail.com (Nenad Polomac) Date: Sat, 22 Jun 2013 13:34:56 +0200 Subject: [FieldTrip] padding of segmented data Message-ID: Dear all, In my pipeline I need two times to filter data with ft_preprocessing. Is it somehow possible to pad trials after segmentation? I need this in order to avoid filter artifacts during the second filtering. Thank you in advance! Nenad -------------- next part -------------- An HTML attachment was scrubbed... URL: From caspervanheck at gmail.com Sat Jun 22 14:32:45 2013 From: caspervanheck at gmail.com (Casper van Heck) Date: Sat, 22 Jun 2013 14:32:45 +0200 Subject: [FieldTrip] padding of segmented data In-Reply-To: References: Message-ID: Dear Nenad, I think the option cfg.padding only works for that iteration of ft_preprocessing, but what you can do, is select larger segments initially, and then run ft_preprocessing again with smaller segments. While you can set ft_preprocessing to apply multiple different filters in one go (like a low-pass, a high-pass, and a DFT-filter, for example), using a similar filter multiple times (like a high-pass filter at 4Hz, and another at 8Hz) is usually not required, or recommended. If you do multiple analyses on the same data (which, for example, require different filters) you could find it useful to create multiple smaller pipelines with their own ft_preprocessing. Debugging complex analyses can be a lot easier that way:) Hope this helps, Casper On Sat, Jun 22, 2013 at 1:34 PM, Nenad Polomac wrote: > Dear all, > > In my pipeline I need two times to filter data with ft_preprocessing. Is > it somehow possible to pad trials after segmentation? I need this in order > to avoid filter artifacts during the second filtering. > > Thank you in advance! > > Nenad > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > -------------- next part -------------- An HTML attachment was scrubbed... URL: From mbj0310 at gmail.com Mon Jun 24 06:27:47 2013 From: mbj0310 at gmail.com (Beom Jun Min) Date: Mon, 24 Jun 2013 13:27:47 +0900 Subject: [FieldTrip] Decreased baseline level after using ICA in ERP data Message-ID: Dear all, I have ERP data and now I am dealing with ICA to remove muscle and eye artifacts. However, I found that after ft_rejectcomponent, the baseline level of the segmented epoch decreased. (The baselinewindow is [-0.2 0].) The baseline level decreased even though I rejected only one component. My script is shown below. *%% Removing the Artifacts* *cfg = []; * *cfg.component = [ ]; % to be removed component(s)* *post_ICA_temp6 = ft_rejectcomponent(cfg, comp_detrand, data_raw);* * * *%% timelocking* * * *cfg = [];* *timelock_temp6 = ft_timelockanalysis(cfg, post_ICA_temp6);* * * *%% Plot* * * *figure;* *cfg = [];* *cfg.layout = lay;* *cfg.interactive = 'yes';* *cfg.channel = ['all', {'-EKG', '-EMG'}];* *ft_multiplotER(cfg, timelock_temp6)* Is there something that I missed? Thanks. BJ -- BeomJun Min, M.D. Department of Medical System Engineering (DMSE) Gwangju Institute of Science and Technology (GIST) 261 Cheomdan-gwagiro(Oryong-dong), Buk-gu, Gwangju 500-712, Republic of Korea (South) Phone: +82-62-715-3266 / Fax: +82-62-715-3244 E-mail: mbj0310 at gmail.com, http://bmssa.gist.ac.kr -------------- next part -------------- An HTML attachment was scrubbed... URL: From d.lozanosoldevilla at fcdonders.ru.nl Mon Jun 24 10:25:24 2013 From: d.lozanosoldevilla at fcdonders.ru.nl (Lozano Soldevilla, D. (Diego)) Date: Mon, 24 Jun 2013 10:25:24 +0200 (CEST) Subject: [FieldTrip] Decreased baseline level after using ICA in ERP data In-Reply-To: Message-ID: <831995030.1708865.1372062324986.JavaMail.root@sculptor.zimbra.ru.nl> Dear Beom Jun, I see multiple scenarios why this baseline activity decrease could happen. First of all, how the component you're rejecting look like (i.e. "blink component")? Do you see this activity decrease after the baseline period? The "quality" of the ICA decomposition, how well your artifact/component of interest has been isolated by algorithm in time (i.e. blink time courses) and space (marked frontal topography), will determine the activity that later on you'll reject/select. If your decomposition is not well suited, the rejection of a particular IC activity might have "extra" activity you don't want to reject (effect of interest), might be the algorithm is not able to isolate the components of interests (i.e. artifacts) or a combination of both. To evaluate the quality of your ICA decomposition you might have a look here ( http://www.ncbi.nlm.nih.gov/pubmed/19162199 ). Basically, the authors find that the ICA decomposition improves significantly " increased by removing the mean EEG at each channel for each epoch of data rather than the mean EEG in a prestimulus baseline" . In addition (see here: http://sccn.ucsd.edu/pipermail/eeglablist/2012/004925.html ), high-pass filtering above ~1hz improve the results. It's very important to feed ICA as much relevant data as you can use. The more the data, the better the decomposition. There's a rule of thumb that says that for a reliable IC decomposition 20 time points per channel 2 is needed (see here for a reference http://www.ncbi.nlm.nih.gov/pubmed/16904745 ) I hope that helps, Diego ----- Original Message ----- > From: "Beom Jun Min" > To: "FieldTrip discussion list" > Sent: Monday, 24 June, 2013 6:27:47 AM > Subject: [FieldTrip] Decreased baseline level after using ICA in ERP > data > Dear all, > I have ERP data and now I am dealing with ICA to remove muscle and eye > artifacts. > However, I found that after ft_rejectcomponent, the baseline level of > the segmented epoch decreased. (The baselinewindow is [-0.2 0].) > The baseline level decreased even though I rejected only one > component. > My script is shown below. > %% Removing the Artifacts > cfg = []; > cfg.component = [ ]; % to be removed component(s) > post_ICA_temp6 = ft_rejectcomponent(cfg, comp_detrand, data_raw); > %% timelocking > cfg = []; > timelock_temp6 = ft_timelockanalysis(cfg, post_ICA_temp6); > %% Plot > figure; > cfg = []; > cfg.layout = lay; > cfg.interactive = 'yes'; > cfg.channel = ['all', {'-EKG', '-EMG'}]; > ft_multiplotER(cfg, timelock_temp6) > Is there something that I missed? > Thanks. > BJ > -- > BeomJun Min, M.D. > Department of Medical System Engineering (DMSE) > Gwangju Institute of Science and Technology (GIST) > 261 Cheomdan-gwagiro(Oryong-dong), Buk-gu, Gwangju > 500-712, Republic of Korea (South) > Phone: +82-62-715-3266 / Fax: +82-62-715-3244 > E-mail: mbj0310 at gmail.com , http://bmssa.gist.ac.kr > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -- PhD Student Neuronal Oscillations Group Donders Institute for Brain, Cognition and Behaviour Centre for Cognitive Neuroimaging Radboud University Nijmegen NL-6525 EN Nijmegen The Netherlands http://www.ru.nl/people/donders/lozano-soldevilla-d/ -------------- next part -------------- An HTML attachment was scrubbed... URL: From jm.horschig at donders.ru.nl Mon Jun 24 10:43:11 2013 From: jm.horschig at donders.ru.nl (=?ISO-8859-1?Q?=22J=F6rn_M=2E_Horschig=22?=) Date: Mon, 24 Jun 2013 10:43:11 +0200 Subject: [FieldTrip] padding of segmented data In-Reply-To: References: Message-ID: <51C8069F.5070707@donders.ru.nl> Hi Nenad, what Casper said is not quite true. You can pad segmented trials, but you are limited in how to pad. There are different ways of padding, and what Casper was referring to is true data padding. Once you segmented your trials you cannot get back to your recorded data and attach more data to it. This is because filtering artifacts at edges etc would result in discontinuities and the like. However, there are other ways to achieve what you want. The most elegant way in my opinion is what Casper already suggested. Just for completeness, you can still pad using zero-padding (i.e. adding a bunch of 0s in the beginning and at the end of your trials). Other ways are mean-padding (pad with the mean value), or edge-padding (using the first/last value to padding). However, with all these methods you mostly also add a discontinuity, but you explicitly ask for that in this case :) The most elegant solution here might be to use mirror-padding, which is recently implemented. See here: http://fieldtrip.fcdonders.nl/reference/ft_preprocessing and here: http://fieldtrip.fcdonders.nl/reference/ft_preproc_padding Best, Jörn On 6/22/2013 2:32 PM, Casper van Heck wrote: > Dear Nenad, > > I think the option cfg.padding only works for that iteration of > ft_preprocessing, but what you can do, is select larger segments > initially, and then run ft_preprocessing again with smaller segments. > > While you can set ft_preprocessing to apply multiple different filters > in one go (like a low-pass, a high-pass, and a DFT-filter, for > example), using a similar filter multiple times (like a high-pass > filter at 4Hz, and another at 8Hz) is usually not required, or > recommended. If you do multiple analyses on the same data (which, for > example, require different filters) you could find it useful to create > multiple smaller pipelines with their own ft_preprocessing. Debugging > complex analyses can be a lot easier that way:) > > Hope this helps, > > Casper > > > On Sat, Jun 22, 2013 at 1:34 PM, Nenad Polomac > wrote: > > Dear all, > > In my pipeline I need two times to filter data with > ft_preprocessing. Is it somehow possible to pad trials > after segmentation? I need this in order to avoid filter artifacts > during the second filtering. > > Thank you in advance! > > Nenad > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -- Jörn M. Horschig PhD Student Donders Institute for Brain, Cognition and Behaviour Centre for Cognitive Neuroimaging Radboud University Nijmegen Neuronal Oscillations Group FieldTrip Development Team P.O. Box 9101 NL-6500 HB Nijmegen The Netherlands Contact: E-Mail: jm.horschig at donders.ru.nl Tel: +31-(0)24-36-68493 Web: http://www.ru.nl/donders Visiting address: Trigon, room 2.30 Kapittelweg 29 NL-6525 EN Nijmegen The Netherlands -------------- next part -------------- An HTML attachment was scrubbed... URL: From polomacnenad at gmail.com Mon Jun 24 11:02:18 2013 From: polomacnenad at gmail.com (Nenad Polomac) Date: Mon, 24 Jun 2013 11:02:18 +0200 Subject: [FieldTrip] padding of segmented data Message-ID: Hi Jörn and Casper, Thank you very for your answers I will use Jörns suggestion. I wasn't aware that you upgraded ft_preprocessing. All the best! Nenad On 24 June 2013 10:44, wrote: > Send fieldtrip mailing list submissions to > fieldtrip at science.ru.nl > > To subscribe or unsubscribe via the World Wide Web, visit > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > or, via email, send a message with subject or body 'help' to > fieldtrip-request at science.ru.nl > > You can reach the person managing the list at > fieldtrip-owner at science.ru.nl > > When replying, please edit your Subject line so it is more specific > than "Re: Contents of fieldtrip digest..." > > > Today's Topics: > > 1. Decreased baseline level after using ICA in ERP data > (Beom Jun Min) > 2. Re: Decreased baseline level after using ICA in ERP data > (Lozano Soldevilla, D. (Diego)) > 3. Re: padding of segmented data (J?rn M. Horschig) > > > ---------------------------------------------------------------------- > > Message: 1 > Date: Mon, 24 Jun 2013 13:27:47 +0900 > From: Beom Jun Min > To: FieldTrip discussion list > Subject: [FieldTrip] Decreased baseline level after using ICA in ERP > data > Message-ID: > < > CA+v9jvKJnKAfsQDwoDhNVSPAKCmpOpwut8vdmFXa1akp_1WDGA at mail.gmail.com> > Content-Type: text/plain; charset="iso-8859-1" > > Dear all, > > I have ERP data and now I am dealing with ICA to remove muscle and eye > artifacts. > However, I found that after ft_rejectcomponent, the baseline level of the > segmented epoch decreased. (The baselinewindow is [-0.2 0].) > The baseline level decreased even though I rejected only one component. > > My script is shown below. > > *%% Removing the Artifacts* > *cfg = []; > * > *cfg.component = [ ]; % to be removed component(s)* > *post_ICA_temp6 = ft_rejectcomponent(cfg, comp_detrand, data_raw);* > * > * > *%% timelocking* > * > * > *cfg = [];* > *timelock_temp6 = ft_timelockanalysis(cfg, post_ICA_temp6);* > * > * > *%% Plot* > * > * > *figure;* > *cfg = [];* > *cfg.layout = lay;* > *cfg.interactive = 'yes';* > *cfg.channel = ['all', {'-EKG', '-EMG'}];* > *ft_multiplotER(cfg, timelock_temp6)* > > Is there something that I missed? > > Thanks. > > BJ > > -- > BeomJun Min, M.D. > > Department of Medical System Engineering (DMSE) > Gwangju Institute of Science and Technology (GIST) > 261 Cheomdan-gwagiro(Oryong-dong), Buk-gu, Gwangju > 500-712, Republic of Korea (South) > Phone: +82-62-715-3266 / Fax: +82-62-715-3244 > E-mail: mbj0310 at gmail.com, http://bmssa.gist.ac.kr > -------------- next part -------------- > An HTML attachment was scrubbed... > URL: < > http://mailman.science.ru.nl/pipermail/fieldtrip/attachments/20130624/02dd2d57/attachment-0001.html > > > > ------------------------------ > > Message: 2 > Date: Mon, 24 Jun 2013 10:25:24 +0200 (CEST) > From: "Lozano Soldevilla, D. (Diego)" > > To: FieldTrip discussion list > Subject: Re: [FieldTrip] Decreased baseline level after using ICA in > ERP data > Message-ID: > < > 831995030.1708865.1372062324986.JavaMail.root at sculptor.zimbra.ru.nl> > Content-Type: text/plain; charset="utf-8" > > Dear Beom Jun, I see multiple scenarios why this baseline activity > decrease could happen. First of all, how the component you're rejecting > look like (i.e. "blink component")? Do you see this activity decrease after > the baseline period? The "quality" of the ICA decomposition, how well your > artifact/component of interest has been isolated by algorithm in time (i.e. > blink time courses) and space (marked frontal topography), will determine > the activity that later on you'll reject/select. If your decomposition is > not well suited, the rejection of a particular IC activity might have > "extra" activity you don't want to reject (effect of interest), might be > the algorithm is not able to isolate the components of interests (i.e. > artifacts) or a combination of both. To evaluate the quality of your ICA > decomposition you might have a look here ( > http://www.ncbi.nlm.nih.gov/pubmed/19162199 ). Basically, the authors > find that the ICA decomposition improves significantly " increased by > removing the mean EEG at each channel for each epoch of data rather than > the mean EEG in a prestimulus baseline" . In addition (see here: > http://sccn.ucsd.edu/pipermail/eeglablist/2012/004925.html ), high-pass > filtering above ~1hz improve the results. It's very important to feed ICA > as much relevant data as you can use. The more the data, the better the > decomposition. There's a rule of thumb that says that for a reliable IC > decomposition 20 time points per channel 2 is needed (see here for a > reference http://www.ncbi.nlm.nih.gov/pubmed/16904745 ) I hope that > helps, Diego ----- Original Message ----- > > From: "Beom Jun Min" > > To: "FieldTrip discussion list" > > Sent: Monday, 24 June, 2013 6:27:47 AM > > Subject: [FieldTrip] Decreased baseline level after using ICA in ERP > > data > > Dear all, > > I have ERP data and now I am dealing with ICA to remove muscle and eye > > artifacts. > > However, I found that after ft_rejectcomponent, the baseline level of > > the segmented epoch decreased. (The baselinewindow is [-0.2 0].) > > The baseline level decreased even though I rejected only one > > component. > > My script is shown below. > > %% Removing the Artifacts > > cfg = []; > > cfg.component = [ ]; % to be removed component(s) > > post_ICA_temp6 = ft_rejectcomponent(cfg, comp_detrand, data_raw); > > %% timelocking > > cfg = []; > > timelock_temp6 = ft_timelockanalysis(cfg, post_ICA_temp6); > > %% Plot > > figure; > > cfg = []; > > cfg.layout = lay; > > cfg.interactive = 'yes'; > > cfg.channel = ['all', {'-EKG', '-EMG'}]; > > ft_multiplotER(cfg, timelock_temp6) > > Is there something that I missed? > > Thanks. > > BJ > > -- > > BeomJun Min, M.D. > > Department of Medical System Engineering (DMSE) > > Gwangju Institute of Science and Technology (GIST) > > 261 Cheomdan-gwagiro(Oryong-dong), Buk-gu, Gwangju > > 500-712, Republic of Korea (South) > > Phone: +82-62-715-3266 / Fax: +82-62-715-3244 > > E-mail: mbj0310 at gmail.com , http://bmssa.gist.ac.kr > > _______________________________________________ > > fieldtrip mailing list > > fieldtrip at donders.ru.nl > > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > -- PhD Student Neuronal Oscillations Group Donders Institute for Brain, > Cognition and Behaviour Centre for Cognitive Neuroimaging Radboud > University Nijmegen NL-6525 EN Nijmegen The Netherlands > http://www.ru.nl/people/donders/lozano-soldevilla-d/ > -------------- next part -------------- > An HTML attachment was scrubbed... > URL: < > http://mailman.science.ru.nl/pipermail/fieldtrip/attachments/20130624/ea1393f7/attachment-0001.html > > > > ------------------------------ > > Message: 3 > Date: Mon, 24 Jun 2013 10:43:11 +0200 > From: "J?rn M. Horschig" > To: fieldtrip at science.ru.nl > Subject: Re: [FieldTrip] padding of segmented data > Message-ID: <51C8069F.5070707 at donders.ru.nl> > Content-Type: text/plain; charset="iso-8859-1"; Format="flowed" > > Hi Nenad, > > what Casper said is not quite true. You can pad segmented trials, but > you are limited in how to pad. There are different ways of padding, and > what Casper was referring to is true data padding. Once you segmented > your trials you cannot get back to your recorded data and attach more > data to it. This is because filtering artifacts at edges etc would > result in discontinuities and the like. However, there are other ways to > achieve what you want. The most elegant way in my opinion is what Casper > already suggested. Just for completeness, you can still pad using > zero-padding (i.e. adding a bunch of 0s in the beginning and at the end > of your trials). Other ways are mean-padding (pad with the mean value), > or edge-padding (using the first/last value to padding). However, with > all these methods you mostly also add a discontinuity, but you > explicitly ask for that in this case :) The most elegant solution here > might be to use mirror-padding, which is recently implemented. > See here: > http://fieldtrip.fcdonders.nl/reference/ft_preprocessing > and here: > http://fieldtrip.fcdonders.nl/reference/ft_preproc_padding > > Best, > J?rn > > On 6/22/2013 2:32 PM, Casper van Heck wrote: > > Dear Nenad, > > > > I think the option cfg.padding only works for that iteration of > > ft_preprocessing, but what you can do, is select larger segments > > initially, and then run ft_preprocessing again with smaller segments. > > > > While you can set ft_preprocessing to apply multiple different filters > > in one go (like a low-pass, a high-pass, and a DFT-filter, for > > example), using a similar filter multiple times (like a high-pass > > filter at 4Hz, and another at 8Hz) is usually not required, or > > recommended. If you do multiple analyses on the same data (which, for > > example, require different filters) you could find it useful to create > > multiple smaller pipelines with their own ft_preprocessing. Debugging > > complex analyses can be a lot easier that way:) > > > > Hope this helps, > > > > Casper > > > > > > On Sat, Jun 22, 2013 at 1:34 PM, Nenad Polomac > > wrote: > > > > Dear all, > > > > In my pipeline I need two times to filter data with > > ft_preprocessing. Is it somehow possible to pad trials > > after segmentation? I need this in order to avoid filter artifacts > > during the second filtering. > > > > Thank you in advance! > > > > Nenad > > > > _______________________________________________ > > fieldtrip mailing list > > fieldtrip at donders.ru.nl > > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > > > > > > > > > _______________________________________________ > > fieldtrip mailing list > > fieldtrip at donders.ru.nl > > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > > -- > J?rn M. Horschig > PhD Student > Donders Institute for Brain, Cognition and Behaviour > Centre for Cognitive Neuroimaging > Radboud University Nijmegen > Neuronal Oscillations Group > FieldTrip Development Team > > P.O. Box 9101 > NL-6500 HB Nijmegen > The Netherlands > > Contact: > E-Mail: jm.horschig at donders.ru.nl > Tel: +31-(0)24-36-68493 > Web: http://www.ru.nl/donders > > Visiting address: > Trigon, room 2.30 > Kapittelweg 29 > NL-6525 EN Nijmegen > The Netherlands > > -------------- next part -------------- > An HTML attachment was scrubbed... > URL: < > http://mailman.science.ru.nl/pipermail/fieldtrip/attachments/20130624/d7eb547a/attachment.html > > > > ------------------------------ > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > End of fieldtrip Digest, Vol 31, Issue 41 > ***************************************** > -------------- next part -------------- An HTML attachment was scrubbed... URL: From eelke.spaak at donders.ru.nl Mon Jun 24 11:31:35 2013 From: eelke.spaak at donders.ru.nl (Eelke Spaak) Date: Mon, 24 Jun 2013 11:31:35 +0200 Subject: [FieldTrip] statistics on non-event-related fields In-Reply-To: References: Message-ID: Dear Marco, The FieldTrip statistics routines support permutation of condition labels among units of observation. I guess in your data you don't really have 'units of observation', i.e. you have continuous data of one (or several) subjects. In that case I would recommend taking care of the statistics outside of FieldTrip, for instance by using a randomisation approach based on shifting time series of different channels by different, random, amounts. The coupling values obtained by these shifted time series can serve as a distribution under the null hypothesis of no coupling. The usual cluster machinery can then be applied (i.e. combining above-(nonparametric)threshold time-frequency-channel voxels into cluster candidates, compute cluster statistics per randomization, and compare the observed cluster statistic to the randomization distribution). You would also need to write this yourself, but it should not be very difficult. The mex-files bwlabel and spm_bwlabel (distributed with FieldTrip) are very useful; they give index labels to connected clusters in a binary matrix. Note, however, that there is an important caveat with the approach I describe here. The time shifting per channel also destroys the between-channel structure in your data that is due to electric volume conduction. So even if you find significant connectivity by this approach, although the connectivity would be 'real' in a sense, it still might not be meaningful if you do not account for this volume conduction. This is something to think about apart from the statistics. Hope this helps. Best, Eelke On 21 June 2013 14:26, Marco Porta wrote: > Dear Users and Eelke, > I have spontaneous LFP data recorded intracranially. I'm interested in > studying phase correlation between sensors and assess such correlation > within single subjects studies. Is it possible to study statistical > significance in such correlation study or should i implement my own > statistic? > Thanks, > > Marco > > > >> Dear Marco, >> >> What do you mean exactly with "non event-related fields"? I presume >> there is some structure in your data that you want to consider as the >> independent variable of interest, right? Some more information on what >> you want to do would help us to help you. >> >> Best, >> Eelke >> >> >> >> >> Dear Fieldtrip experts, >> I have a question regarding the statistics. How can I statistics on non >> event-related fields in a between-trials. >> Thanks, >> Marco > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip From nomeserio at gmail.com Mon Jun 24 14:43:06 2013 From: nomeserio at gmail.com (Michele Barsotti) Date: Mon, 24 Jun 2013 14:43:06 +0200 Subject: [FieldTrip] Loading Data into a fieldtrip structure Message-ID: Dear FieldTrip Users, I'm working with eeglab since 2 years and now I would like to use also fieldtrip. I've got many dataset in .mat format organized as [channels x dataframe]. For each dataset I've got the channel location in a .ced file format. Can anyone help me to import these dataset into a fieldtrip data structure? The channels (rows of the variable contained in the .mat file) are organized like that: 1- time 2:17 - eeg channels 18:end - possible triggers thank you in advance cheers -- -Michele- -------------- next part -------------- An HTML attachment was scrubbed... URL: From d.lozanosoldevilla at fcdonders.ru.nl Mon Jun 24 14:55:18 2013 From: d.lozanosoldevilla at fcdonders.ru.nl (Diego Lozano Soldevilla) Date: Mon, 24 Jun 2013 14:55:18 +0200 Subject: [FieldTrip] Loading Data into a fieldtrip structure In-Reply-To: References: Message-ID: Dear Michele, You might have a look to the following FAQ: http://fieldtrip.fcdonders.nl/faq/how_can_i_import_my_own_dataformat?s[]=import&s[]=data I'm not sure about the state of the art of the eeglab2fieldtrip.m function but it might help you out as well. To know more about the fieldtrip data type field structures you need to have to work in Fieldtrip, the ft_datatype* functions will be important for you, i.e.: ft_datatype_freq ft_datatype_raw ft_datatype_sens ft_datatype_timelock I hope that helps Diego On 24 June 2013 14:43, Michele Barsotti wrote: > Dear FieldTrip Users, > I'm working with eeglab since 2 years and now I would like to use also > fieldtrip. I've got many dataset in .mat format organized as [channels x > dataframe]. For each dataset I've got the channel location in a .ced file > format. > Can anyone help me to import these dataset into a fieldtrip data structure? > > The channels (rows of the variable contained in the .mat file) are > organized like that: > 1- time > 2:17 - eeg channels > 18:end - possible triggers > > thank you in advance > > cheers > > -- > -Michele- > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > -------------- next part -------------- An HTML attachment was scrubbed... URL: From david.schubring at uni-konstanz.de Mon Jun 24 16:34:46 2013 From: david.schubring at uni-konstanz.de (David Schubring) Date: Mon, 24 Jun 2013 16:34:46 +0200 Subject: [FieldTrip] Matlab 2012/2013 In-Reply-To: References: Message-ID: <51C85906.2090204@uni-konstanz.de> Dear FieldTrip Users, I was wondering if the incompatibility issues with fieldtrip and the latest MATLAB 2013a version still exist (and if so, which bugs exactly occur)? (Some of our Matlab 2012a/b installations stopped working, maybe due to the latest java-update, and only the 2013 version still works.) Thanks in advance and best regards, David Schubring From politzerahless at gmail.com Mon Jun 24 17:19:59 2013 From: politzerahless at gmail.com (Stephen Politzer-Ahles) Date: Mon, 24 Jun 2013 10:19:59 -0500 Subject: [FieldTrip] fieldtrip Digest, Vol 31, Issue 27 In-Reply-To: References: Message-ID: Hi everyone, I recently tried http://fieldtrip.fcdonders.nl/example/create_single-subject_grids_in_individual_head_space_that_are_all_aligned_in_mni_spaceand noticed some inconsistencies between the example code and the results; I updated the code on the wiki but I wanted to send a message to the list to double-check whether my changes are ok. Firstly, I had to add a call to ft_convert_units, because otherwise the vol was expressed in mm and the grid in cm, causing the grid to be much smaller than the volume conductor (see http://i.imgur.com/gzct9Dm.png). Is this change ok? The result I get is still not quite consistent with the examples shown on that page, though; in my result, the grid is a cube ( http://i.imgur.com/NSgCFpg.png), whereas in the example the grid is brain-shaped. I used the same Fieldtrip brain template and the same code from the example (except for the change above), so I'm not sure if the difference is due to different plot settings, a change in the Fieldtrip code since this example was made, or a change in the sample brain included in Fieldtrip since the example was made. Best, Steve On Thu, Jun 13, 2013 at 5:05 AM, wrote: > > Send fieldtrip mailing list submissions to > fieldtrip at science.ru.nl > > To subscribe or unsubscribe via the World Wide Web, visit > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > or, via email, send a message with subject or body 'help' to > fieldtrip-request at science.ru.nl > > You can reach the person managing the list at > fieldtrip-owner at science.ru.nl > > When replying, please edit your Subject line so it is more specific > than "Re: Contents of fieldtrip digest..." > > > Today's Topics: > > 1. Re: Source statistics on spatio-temporal source > reconstruction data (MNE) (Nicolai Mersebak) > > > ---------------------------------------------------------------------- > > Message: 1 > Date: Thu, 13 Jun 2013 12:04:34 +0200 > From: Nicolai Mersebak > To: FieldTrip discussion list > Subject: Re: [FieldTrip] Source statistics on spatio-temporal source > reconstruction data (MNE) > Message-ID: <6F3697BB-194F-422F-A1BF-EBBB132F805B at mersebak.dk> > Content-Type: text/plain; charset="iso-8859-1" > > Thanks to all of you for your comments and ideas - they are very helpful! > > I ( off course :) ) have some follow up questions. > > I have created an ERP structure for my MNE source, so the only think which I need and that is not straight forward is the neighbour structure. > > I am using the standard bem template (fieldtrip-20130124/template/headmodel/standard_bem.mat) as a head model and use the following code to get a grid for all subjects as I don't have any subject specific information regarding the anatomy. > > cfg = []; > cfg.grid.xgrid = -100:10:100; > cfg.grid.ygrid = -100:10:100; > cfg.grid.zgrid = -100:10:100; > cfg.grid.tight = 'yes'; > cfg.grid.unit = hdm.unit; % unit: mm > cfg.vol = hdm; > grid = ft_prepare_sourcemodel(cfg); > > > @Jan-Mathijs and Stephan: I guess making a subject specific grid based on a warped template requires anatomic information for each subject, e.g. a MRI image like this tutorial shows: > http://fieldtrip.fcdonders.nl/example/create_single-subject_grids_in_individual_head_space_that_are_all_aligned_in_mni_space?s%5B > > The final grid output in the tutorial - does it have this 3D grid which can be used as a neighbour structure ? > > I am not sure how to go from my cortical sheet [vertices x coordinates(x,y,z)] to a 3D grid, which I can use as a neighbour structure ? > > A second thing I would like to know is, if any of you have tried to use an atlas (e.g ALL template atlas) where the regions now are channels in the permutation test? Going from source points to atlas regions can be done through ft_sourcestatistics, but I am still interested in keeping the temporal dimension. The reason to use atlas regions instead of source points is to decrease the computation time. > > Best, > > Nicolai > > On Thu, Jun 13, 2013 at 5:05 AM, wrote: > Send fieldtrip mailing list submissions to > fieldtrip at science.ru.nl > > To subscribe or unsubscribe via the World Wide Web, visit > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > or, via email, send a message with subject or body 'help' to > fieldtrip-request at science.ru.nl > > You can reach the person managing the list at > fieldtrip-owner at science.ru.nl > > When replying, please edit your Subject line so it is more specific > than "Re: Contents of fieldtrip digest..." > > > Today's Topics: > > 1. Re: Source statistics on spatio-temporal source > reconstruction data (MNE) (Nicolai Mersebak) > > > ---------------------------------------------------------------------- > > Message: 1 > Date: Thu, 13 Jun 2013 12:04:34 +0200 > From: Nicolai Mersebak > To: FieldTrip discussion list > Subject: Re: [FieldTrip] Source statistics on spatio-temporal source > reconstruction data (MNE) > Message-ID: <6F3697BB-194F-422F-A1BF-EBBB132F805B at mersebak.dk> > Content-Type: text/plain; charset="iso-8859-1" > > Thanks to all of you for your comments and ideas - they are very helpful! > > I ( off course :) ) have some follow up questions. > > I have created an ERP structure for my MNE source, so the only think which > I need and that is not straight forward is the neighbour structure. > > I am using the standard bem template > (fieldtrip-20130124/template/headmodel/standard_bem.mat) as a head model > and use the following code to get a grid for all subjects as I don't have > any subject specific information regarding the anatomy. > > cfg = []; > cfg.grid.xgrid = -100:10:100; > cfg.grid.ygrid = -100:10:100; > cfg.grid.zgrid = -100:10:100; > cfg.grid.tight = 'yes'; > cfg.grid.unit = hdm.unit; % unit: mm > cfg.vol = hdm; > grid = ft_prepare_sourcemodel(cfg); > > > @Jan-Mathijs and Stephan: I guess making a subject specific grid based on > a warped template requires anatomic information for each subject, e.g. a > MRI image like this tutorial shows: > > http://fieldtrip.fcdonders.nl/example/create_single-subject_grids_in_individual_head_space_that_are_all_aligned_in_mni_space?s%5B > > The final grid output in the tutorial - does it have this 3D grid which > can be used as a neighbour structure ? > > I am not sure how to go from my cortical sheet [vertices x > coordinates(x,y,z)] to a 3D grid, which I can use as a neighbour structure ? > > A second thing I would like to know is, if any of you have tried to use an > atlas (e.g ALL template atlas) where the regions now are channels in the > permutation test? Going from source points to atlas regions can be done > through ft_sourcestatistics, but I am still interested in keeping the > temporal dimension. The reason to use atlas regions instead of source > points is to decrease the computation time. > > Best, > > Nicolai > > > Den 12/06/2013 kl. 18.58 skrev "smoratti at psi.ucm.es" >: > > > > > I think Jan.Mathijs alternative suggestion is quite attractive. With the > neighbors on a cortical sheet I also had the problems that sometimes the > vertices do not have the same distance and then clustering may be biased to > smaller or bigger clusters as the number of neighbors does not guarantee > same cluster sizes. With the interpolation onto a 3D grid, you won't have > that problem. > > > > best, > > > > Stephan > > > > > > ________________________________________________________ > > Stephan Moratti, PhD > > > > see also: http://web.me.com/smoratti/ > > > > Universidad Complutense de Madrid > > Facultad de Psicolog?a > > Departamento de Psicolog?a B?sica I > > Campus de Somosaguas > > 28223 Pozuelo de Alarc?n (Madrid) > > Spain > > > > and > > > > Center for Biomedical Technology > > Laboratory for Cognitive and Computational Neuroscience > > Parque Cient?fico y Tecnol?gico de la Universidad Politecnica de Madrid > > Campus Montegancedo > > 28223 Pozuelo de Alarc?n (Madrid) > > Spain > > > > > > email: smoratti at psi.ucm.es > > Tel.: +34 679219982 > > > > El 12/06/2013, a las 18:00, jan-mathijs schoffelen escribi?: > > > >> An alternative would be to interpolate the cortical sheet to a 3D grid > (where the grid is defined for each subject based on a warped template grid > defined in a standard space), and then do clustering using a regular 3D > spatial neighbourhood structure. The rationale being that two vertices on > the sheet may appear as disconnected (e.g. being on two sides of a sulcus) > whereas, given the poor spatial resolution, they belong to the same spatial > blob. > >> > >> Best, > >> Jan-Mathijs > >> > >> On Jun 12, 2013, at 5:44 PM, smoratti at psi.ucm.es wrote: > >> > >>> Dear Nicolai, > >>> > >>> Indeed I have used ft_timelockstatistics for minimum norm source data. > The trick is to put the source level data into a ERF structure. Determining > the neighbors of a source surface with vertices is not trivial. However I > used tess_vertconn.m from the BrainStorm toolbox to get the connectivity > matrix that tells you who is a neighbor. This you can feed into > timelockstats. > >>> > >>> Hope that helps, > >>> > >>> Stephan > >>> > >>> ________________________________________________________ > >>> Stephan Moratti, PhD > >>> > >>> see also: http://web.me.com/smoratti/ > >>> > >>> Universidad Complutense de Madrid > >>> Facultad de Psicolog?a > >>> Departamento de Psicolog?a B?sica I > >>> Campus de Somosaguas > >>> 28223 Pozuelo de Alarc?n (Madrid) > >>> Spain > >>> > >>> and > >>> > >>> Center for Biomedical Technology > >>> Laboratory for Cognitive and Computational Neuroscience > >>> Parque Cient?fico y Tecnol?gico de la Universidad Politecnica de Madrid > >>> Campus Montegancedo > >>> 28223 Pozuelo de Alarc?n (Madrid) > >>> Spain > >>> > >>> > >>> email: smoratti at psi.ucm.es > >>> Tel.: +34 679219982 > >>> > >>> El 12/06/2013, a las 15:44, Nicolai Mersebak escribi?: > >>> > >>>> Dear all, > >>>> > >>>> I have a question concerning the usage of ft_sourcegrandaverage and > ft_sourcestatistics. > >>>> > >>>> After using ft_sourceanalysis (method: MNE), I get spatio-temporal > source reconstructed data in source.avg.pow (4050 x 897): 4050 sources and > 897 time points. > >>>> > >>>> Now I would like to use the cluster-based permutation test on my > source reconstructed data. However it seems like ft_sourcegrandaverage and > ft_sourcestatistics don't support source level time courses. E.g when I am > using ft_sourcegrandaverage I am getting the following error: > >>>> > >>>> Error in ft_sourcegrandaverage (line 158) > >>>> dat(:,i) = tmp(:); > >>>> > >>>> Looking into the code: > >>>> > >>>> for i=1:Nsubject > >>>> tmp = getsubfield(varargin{i}, parameterselection(cfg.parameter, > varargin{i})); > >>>> dat(:,i) = tmp(:); > >>>> tmp = getsubfield(varargin{i}, 'inside'); > >>>> inside(tmp,i) = 1; > >>>> end > >>>> > >>>> I see that "tmp" are getting the structure [N_sources x timepoints] > from source.avg.pow for one subject, where "dat" requires the structure > [N_sources x 1]. > >>>> > >>>> I seached the mailing list for similar issues and found this thread: > >>>> > >>>> > http://mailman.science.ru.nl/pipermail/fieldtrip/2010-September/003122.html > >>>> > >>>> Since I am interested in using the temporal dimension in my > statistics, I would like to know if it is still not possible to use > spatio-temporal source reconstructed data in ft_sourcestatistics and > ft_sourcegrandaverage ? > >>>> > >>>> Or if any have succeeded in using the cluster-based permutation test > on source level also including the temporal dimension ? > >>>> > >>>> Alternative I was thinking that I might could use > ft_timelockstatistics, where I substituted the channels with sources, e.g > instead of having 64 channels, I would now have 4050 "channels". > >>>> If so I need to calculate a label structure and an appropriate > neighbor structure, which I guess is possible as I have all the 3D > coordinates for each source, e.g in leadfield.pos ? > >>>> I know this is a work around solution, but have anyone tried or have > any experience using such an approach ? > >>>> > >>>> Best, > >>>> > >>>> Nicolai > >>>> > >>>> _______________________________________________ > >>>> fieldtrip mailing list > >>>> fieldtrip at donders.ru.nl > >>>> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > >>> > >>> _______________________________________________ > >>> fieldtrip mailing list > >>> fieldtrip at donders.ru.nl > >>> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > >> > >> Jan-Mathijs Schoffelen, MD PhD > >> > >> Donders Institute for Brain, Cognition and Behaviour, > >> Centre for Cognitive Neuroimaging, > >> Radboud University Nijmegen, The Netherlands > >> > >> Max Planck Institute for Psycholinguistics, > >> Nijmegen, The Netherlands > >> > >> J.Schoffelen at donders.ru.nl > >> Telephone: +31-24-3614793 > >> > >> http://www.hettaligebrein.nl > >> > >> _______________________________________________ > >> fieldtrip mailing list > >> fieldtrip at donders.ru.nl > >> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > > > _______________________________________________ > > fieldtrip mailing list > > fieldtrip at donders.ru.nl > > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > -------------- next part -------------- > An HTML attachment was scrubbed... > URL: < > http://mailman.science.ru.nl/pipermail/fieldtrip/attachments/20130613/5974284f/attachment.html > > > > ------------------------------ > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > End of fieldtrip Digest, Vol 31, Issue 27 > ***************************************** > -- Stephen Politzer-Ahles University of Kansas Linguistics Department http://people.ku.edu/~sjpa/ -------------- next part -------------- An HTML attachment was scrubbed... URL: From a.stolk at fcdonders.ru.nl Mon Jun 24 20:11:26 2013 From: a.stolk at fcdonders.ru.nl (Stolk, A.) Date: Mon, 24 Jun 2013 20:11:26 +0200 (CEST) Subject: [FieldTrip] fieldtrip Digest, Vol 31, Issue 27 In-Reply-To: Message-ID: <331233946.1725662.1372097486678.JavaMail.root@sculptor.zimbra.ru.nl> Hi Steve, With respect to the cube vs. brain-shaped grid; this seems to be plotting-related? template_grid.inside in the snippet of code below selects only the grid points that have been determined as inside the brain, but with a negative inwardshift, hence it's also outside. ft_plot_mesh ( template_grid. pos ( template_grid. inside ,: ) ) ; % taken from the wiki Hopefully someone else has up-to-date knowledge to answer your question pertaining to the units (mm vs. cm) of the volume conductor and the source model. Best regards, Arjen ----- Oorspronkelijk bericht ----- > Van: "Stephen Politzer-Ahles" > Aan: fieldtrip at science.ru.nl > Verzonden: Maandag 24 juni 2013 17:19:59 > Onderwerp: Re: [FieldTrip] fieldtrip Digest, Vol 31, Issue 27 > Hi everyone, > I recently tried > http://fieldtrip.fcdonders.nl/example/create_single-subject_grids_in_individual_head_space_that_are_all_aligned_in_mni_space > and noticed some inconsistencies between the example code and the > results; I updated the code on the wiki but I wanted to send a message > to the list to double-check whether my changes are ok. Firstly, I had > to add a call to ft_convert_units, because otherwise the vol was > expressed in mm and the grid in cm, causing the grid to be much > smaller than the volume conductor (see http://i.imgur.com/gzct9Dm.png > ). Is this change ok? > The result I get is still not quite consistent with the examples shown > on that page, though; in my result, the grid is a cube ( > http://i.imgur.com/NSgCFpg.png ), whereas in the example the grid is > brain-shaped. I used the same Fieldtrip brain template and the same > code from the example (except for the change above), so I'm not sure > if the difference is due to different plot settings, a change in the > Fieldtrip code since this example was made, or a change in the sample > brain included in Fieldtrip since the example was made. > Best, > Steve > On Thu, Jun 13, 2013 at 5:05 AM, < fieldtrip-request at science.ru.nl > > wrote: > > > > Send fieldtrip mailing list submissions to > > fieldtrip at science.ru.nl > > > > To subscribe or unsubscribe via the World Wide Web, visit > > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > or, via email, send a message with subject or body 'help' to > > fieldtrip-request at science.ru.nl > > > > You can reach the person managing the list at > > fieldtrip-owner at science.ru.nl > > > > When replying, please edit your Subject line so it is more specific > > than "Re: Contents of fieldtrip digest..." > > > > > > Today's Topics: > > > > 1. Re: Source statistics on spatio-temporal source > > reconstruction data (MNE) (Nicolai Mersebak) > > > > > > ---------------------------------------------------------------------- > > > > Message: 1 > > Date: Thu, 13 Jun 2013 12:04:34 +0200 > > From: Nicolai Mersebak < nicolai at mersebak.dk > > > To: FieldTrip discussion list < fieldtrip at science.ru.nl > > > Subject: Re: [FieldTrip] Source statistics on spatio-temporal source > > reconstruction data (MNE) > > Message-ID: < 6F3697BB-194F-422F-A1BF-EBBB132F805B at mersebak.dk > > > Content-Type: text/plain; charset="iso-8859-1" > > > > Thanks to all of you for your comments and ideas - they are very > > helpful! > > > > I ( off course :) ) have some follow up questions. > > > > I have created an ERP structure for my MNE source, so the only think > > which I need and that is not straight forward is the neighbour > > structure. > > > > I am using the standard bem template > > (fieldtrip-20130124/template/headmodel/standard_bem.mat) as a head > > model and use the following code to get a grid for all subjects as I > > don't have any subject specific information regarding the anatomy. > > > > cfg = []; > > cfg.grid.xgrid = -100:10:100; > > cfg.grid.ygrid = -100:10:100; > > cfg.grid.zgrid = -100:10:100; > > cfg.grid.tight = 'yes'; > > cfg.grid.unit = hdm.unit; % unit: mm > > cfg.vol = hdm; > > grid = ft_prepare_sourcemodel(cfg); > > > > > > @Jan-Mathijs and Stephan: I guess making a subject specific grid > > based on a warped template requires anatomic information for each > > subject, e.g. a MRI image like this tutorial shows: > > http://fieldtrip.fcdonders.nl/example/create_single-subject_grids_in_individual_head_space_that_are_all_aligned_in_mni_space?s%5B > > > > The final grid output in the tutorial - does it have this 3D grid > > which can be used as a neighbour structure ? > > > > I am not sure how to go from my cortical sheet [vertices x > > coordinates(x,y,z)] to a 3D grid, which I can use as a neighbour > > structure ? > > > > A second thing I would like to know is, if any of you have tried to > > use an atlas (e.g ALL template atlas) where the regions now are > > channels in the permutation test? Going from source points to atlas > > regions can be done through ft_sourcestatistics, but I am still > > interested in keeping the temporal dimension. The reason to use > > atlas regions instead of source points is to decrease the > > computation time. > > > > Best, > > > > Nicolai > > > > > On Thu, Jun 13, 2013 at 5:05 AM, < fieldtrip-request at science.ru.nl > > wrote: > > Send fieldtrip mailing list submissions to > > fieldtrip at science.ru.nl > > To subscribe or unsubscribe via the World Wide Web, visit > > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > or, via email, send a message with subject or body 'help' to > > fieldtrip-request at science.ru.nl > > You can reach the person managing the list at > > fieldtrip-owner at science.ru.nl > > When replying, please edit your Subject line so it is more specific > > than "Re: Contents of fieldtrip digest..." > > Today's Topics: > > 1. Re: Source statistics on spatio-temporal source > > reconstruction data (MNE) (Nicolai Mersebak) > > ---------------------------------------------------------------------- > > Message: 1 > > Date: Thu, 13 Jun 2013 12:04:34 +0200 > > From: Nicolai Mersebak < nicolai at mersebak.dk > > > To: FieldTrip discussion list < fieldtrip at science.ru.nl > > > Subject: Re: [FieldTrip] Source statistics on spatio-temporal source > > reconstruction data (MNE) > > Message-ID: < 6F3697BB-194F-422F-A1BF-EBBB132F805B at mersebak.dk > > > Content-Type: text/plain; charset="iso-8859-1" > > Thanks to all of you for your comments and ideas - they are very > > helpful! > > I ( off course :) ) have some follow up questions. > > I have created an ERP structure for my MNE source, so the only think > > which I need and that is not straight forward is the neighbour > > structure. > > I am using the standard bem template > > (fieldtrip-20130124/template/headmodel/standard_bem.mat) as a head > > model and use the following code to get a grid for all subjects as I > > don't have any subject specific information regarding the anatomy. > > cfg = []; > > cfg.grid.xgrid = -100:10:100; > > cfg.grid.ygrid = -100:10:100; > > cfg.grid.zgrid = -100:10:100; > > cfg.grid.tight = 'yes'; > > cfg.grid.unit = hdm.unit; % unit: mm > > cfg.vol = hdm; > > grid = ft_prepare_sourcemodel(cfg); > > @Jan-Mathijs and Stephan: I guess making a subject specific grid > > based > > on a warped template requires anatomic information for each subject, > > e.g. a MRI image like this tutorial shows: > > http://fieldtrip.fcdonders.nl/example/create_single-subject_grids_in_individual_head_space_that_are_all_aligned_in_mni_space?s%5B > > The final grid output in the tutorial - does it have this 3D grid > > which can be used as a neighbour structure ? > > I am not sure how to go from my cortical sheet [vertices x > > coordinates(x,y,z)] to a 3D grid, which I can use as a neighbour > > structure ? > > A second thing I would like to know is, if any of you have tried to > > use an atlas (e.g ALL template atlas) where the regions now are > > channels in the permutation test? Going from source points to atlas > > regions can be done through ft_sourcestatistics, but I am still > > interested in keeping the temporal dimension. The reason to use > > atlas > > regions instead of source points is to decrease the computation > > time. > > Best, > > Nicolai > > Den 12/06/2013 kl. 18.58 skrev " smoratti at psi.ucm.es " < > > smoratti at psi.ucm.es >: > > > > > > I think Jan.Mathijs alternative suggestion is quite attractive. > > > With > > > the neighbors on a cortical sheet I also had the problems that > > > sometimes the vertices do not have the same distance and then > > > clustering may be biased to smaller or bigger clusters as the > > > number > > > of neighbors does not guarantee same cluster sizes. With the > > > interpolation onto a 3D grid, you won't have that problem. > > > > > > best, > > > > > > Stephan > > > > > > > > > ________________________________________________________ > > > Stephan Moratti, PhD > > > > > > see also: http://web.me.com/smoratti/ > > > > > > Universidad Complutense de Madrid > > > Facultad de Psicolog?a > > > Departamento de Psicolog?a B?sica I > > > Campus de Somosaguas > > > 28223 Pozuelo de Alarc?n (Madrid) > > > Spain > > > > > > and > > > > > > Center for Biomedical Technology > > > Laboratory for Cognitive and Computational Neuroscience > > > Parque Cient?fico y Tecnol?gico de la Universidad Politecnica de > > > Madrid > > > Campus Montegancedo > > > 28223 Pozuelo de Alarc?n (Madrid) > > > Spain > > > > > > > > > email: smoratti at psi.ucm.es > > > Tel.: +34 679219982 > > > > > > El 12/06/2013, a las 18:00, jan-mathijs schoffelen escribi?: > > > > > >> An alternative would be to interpolate the cortical sheet to a 3D > > >> grid (where the grid is defined for each subject based on a > > >> warped > > >> template grid defined in a standard space), and then do > > >> clustering > > >> using a regular 3D spatial neighbourhood structure. The rationale > > >> being that two vertices on the sheet may appear as disconnected > > >> (e.g. being on two sides of a sulcus) whereas, given the poor > > >> spatial resolution, they belong to the same spatial blob. > > >> > > >> Best, > > >> Jan-Mathijs > > >> > > >> On Jun 12, 2013, at 5:44 PM, smoratti at psi.ucm.es wrote: > > >> > > >>> Dear Nicolai, > > >>> > > >>> Indeed I have used ft_timelockstatistics for minimum norm source > > >>> data. The trick is to put the source level data into a ERF > > >>> structure. Determining the neighbors of a source surface with > > >>> vertices is not trivial. However I used tess_vertconn.m from the > > >>> BrainStorm toolbox to get the connectivity matrix that tells you > > >>> who is a neighbor. This you can feed into timelockstats. > > >>> > > >>> Hope that helps, > > >>> > > >>> Stephan > > >>> > > >>> ________________________________________________________ > > >>> Stephan Moratti, PhD > > >>> > > >>> see also: http://web.me.com/smoratti/ > > >>> > > >>> Universidad Complutense de Madrid > > >>> Facultad de Psicolog?a > > >>> Departamento de Psicolog?a B?sica I > > >>> Campus de Somosaguas > > >>> 28223 Pozuelo de Alarc?n (Madrid) > > >>> Spain > > >>> > > >>> and > > >>> > > >>> Center for Biomedical Technology > > >>> Laboratory for Cognitive and Computational Neuroscience > > >>> Parque Cient?fico y Tecnol?gico de la Universidad Politecnica de > > >>> Madrid > > >>> Campus Montegancedo > > >>> 28223 Pozuelo de Alarc?n (Madrid) > > >>> Spain > > >>> > > >>> > > >>> email: smoratti at psi.ucm.es > > >>> Tel.: +34 679219982 > > >>> > > >>> El 12/06/2013, a las 15:44, Nicolai Mersebak escribi?: > > >>> > > >>>> Dear all, > > >>>> > > >>>> I have a question concerning the usage of ft_sourcegrandaverage > > >>>> and ft_sourcestatistics. > > >>>> > > >>>> After using ft_sourceanalysis (method: MNE), I get > > >>>> spatio-temporal source reconstructed data in source.avg.pow > > >>>> (4050 > > >>>> x 897): 4050 sources and 897 time points. > > >>>> > > >>>> Now I would like to use the cluster-based permutation test on > > >>>> my > > >>>> source reconstructed data. However it seems like > > >>>> ft_sourcegrandaverage and ft_sourcestatistics don't support > > >>>> source level time courses. E.g when I am using > > >>>> ft_sourcegrandaverage I am getting the following error: > > >>>> > > >>>> Error in ft_sourcegrandaverage (line 158) > > >>>> dat(:,i) = tmp(:); > > >>>> > > >>>> Looking into the code: > > >>>> > > >>>> for i=1:Nsubject > > >>>> tmp = getsubfield(varargin{i}, > > >>>> parameterselection(cfg.parameter, > > >>>> varargin{i})); > > >>>> dat(:,i) = tmp(:); > > >>>> tmp = getsubfield(varargin{i}, 'inside'); > > >>>> inside(tmp,i) = 1; > > >>>> end > > >>>> > > >>>> I see that "tmp" are getting the structure [N_sources x > > >>>> timepoints] from source.avg.pow for one subject, where "dat" > > >>>> requires the structure [N_sources x 1]. > > >>>> > > >>>> I seached the mailing list for similar issues and found this > > >>>> thread: > > >>>> > > >>>> http://mailman.science.ru.nl/pipermail/fieldtrip/2010-September/003122.html > > >>>> > > >>>> Since I am interested in using the temporal dimension in my > > >>>> statistics, I would like to know if it is still not possible to > > >>>> use spatio-temporal source reconstructed data in > > >>>> ft_sourcestatistics and ft_sourcegrandaverage ? > > >>>> > > >>>> Or if any have succeeded in using the cluster-based permutation > > >>>> test on source level also including the temporal dimension ? > > >>>> > > >>>> Alternative I was thinking that I might could use > > >>>> ft_timelockstatistics, where I substituted the channels with > > >>>> sources, e.g instead of having 64 channels, I would now have > > >>>> 4050 > > >>>> "channels". > > >>>> If so I need to calculate a label structure and an appropriate > > >>>> neighbor structure, which I guess is possible as I have all the > > >>>> 3D coordinates for each source, e.g in leadfield.pos ? > > >>>> I know this is a work around solution, but have anyone tried or > > >>>> have any experience using such an approach ? > > >>>> > > >>>> Best, > > >>>> > > >>>> Nicolai > > >>>> > > >>>> _______________________________________________ > > >>>> fieldtrip mailing list > > >>>> fieldtrip at donders.ru.nl > > >>>> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > >>> > > >>> _______________________________________________ > > >>> fieldtrip mailing list > > >>> fieldtrip at donders.ru.nl > > >>> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > >> > > >> Jan-Mathijs Schoffelen, MD PhD > > >> > > >> Donders Institute for Brain, Cognition and Behaviour, > > >> Centre for Cognitive Neuroimaging, > > >> Radboud University Nijmegen, The Netherlands > > >> > > >> Max Planck Institute for Psycholinguistics, > > >> Nijmegen, The Netherlands > > >> > > >> J.Schoffelen at donders.ru.nl > > >> Telephone: +31-24-3614793 > > >> > > >> http://www.hettaligebrein.nl > > >> > > >> _______________________________________________ > > >> fieldtrip mailing list > > >> fieldtrip at donders.ru.nl > > >> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > > > > > _______________________________________________ > > > fieldtrip mailing list > > > fieldtrip at donders.ru.nl > > > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > -------------- next part -------------- > > An HTML attachment was scrubbed... > > URL: < > > http://mailman.science.ru.nl/pipermail/fieldtrip/attachments/20130613/5974284f/attachment.html > > > > > ------------------------------ > > _______________________________________________ > > fieldtrip mailing list > > fieldtrip at donders.ru.nl > > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > End of fieldtrip Digest, Vol 31, Issue 27 > > ***************************************** > -- > Stephen Politzer-Ahles > University of Kansas > Linguistics Department > http://people.ku.edu/~sjpa/ > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -------------- next part -------------- An HTML attachment was scrubbed... URL: From politzerahless at gmail.com Mon Jun 24 20:29:01 2013 From: politzerahless at gmail.com (Stephen Politzer-Ahles) Date: Mon, 24 Jun 2013 13:29:01 -0500 Subject: [FieldTrip] Source statistics on spatio-temporal source reconstruction data (MNE) Message-ID: Hi Arjen, Thanks, I also just tried that (after noticing that code in a later part of the example) and can confirm that that change makes the plot come out like the plot in the example. I updated the wiki accordingly. Best, Steve > Message: 1 > Date: Mon, 24 Jun 2013 20:11:26 +0200 (CEST) > From: "Stolk, A." > To: FieldTrip discussion list > Subject: Re: [FieldTrip] fieldtrip Digest, Vol 31, Issue 27 > Message-ID: > < 331233946.1725662.1372097486678.JavaMail.root at sculptor.zimbra.ru.nl> > Content-Type: text/plain; charset="utf-8" > > Hi Steve, With respect to the cube vs. brain-shaped grid; this seems to be plotting-related? template_grid.inside in the snippet of code below selects only the grid points that have been determined as inside the brain, but with a negative inwardshift, hence it's also outside. ft_plot_mesh ( template_grid. pos ( template_grid. inside ,: ) ) ; % taken from the wiki Hopefully someone else has up-to-date knowledge to answer your question pertaining to the units (mm vs. cm) of the volume conductor and the source model. Best regards, Arjen ----- Oorspronkelijk bericht ----- > > Van: "Stephen Politzer-Ahles" > > Aan: fieldtrip at science.ru.nl > > Verzonden: Maandag 24 juni 2013 17:19:59 > > Onderwerp: Re: [FieldTrip] fieldtrip Digest, Vol 31, Issue 27 > > Hi everyone, > > I recently tried > > http://fieldtrip.fcdonders.nl/example/create_single-subject_grids_in_individual_head_space_that_are_all_aligned_in_mni_space > > and noticed some inconsistencies between the example code and the > > results; I updated the code on the wiki but I wanted to send a message > > to the list to double-check whether my changes are ok. Firstly, I had > > to add a call to ft_convert_units, because otherwise the vol was > > expressed in mm and the grid in cm, causing the grid to be much > > smaller than the volume conductor (see http://i.imgur.com/gzct9Dm.png > > ). Is this change ok? > > The result I get is still not quite consistent with the examples shown > > on that page, though; in my result, the grid is a cube ( > > http://i.imgur.com/NSgCFpg.png ), whereas in the example the grid is > > brain-shaped. I used the same Fieldtrip brain template and the same > > code from the example (except for the change above), so I'm not sure > > if the difference is due to different plot settings, a change in the > > Fieldtrip code since this example was made, or a change in the sample > > brain included in Fieldtrip since the example was made. > > Best, > > Steve -------------- next part -------------- An HTML attachment was scrubbed... URL: From joramvandriel at gmail.com Tue Jun 25 09:17:27 2013 From: joramvandriel at gmail.com (Joram van Driel) Date: Tue, 25 Jun 2013 09:17:27 +0200 Subject: [FieldTrip] fieldtrip Digest, Vol 31, Issue 27 In-Reply-To: <331233946.1725662.1372097486678.JavaMail.root@sculptor.zimbra.ru.nl> References: <331233946.1725662.1372097486678.JavaMail.root@sculptor.zimbra.ru.nl> Message-ID: Hi Steve, I had the same problem a while ago. First of all, you need to take care of all the necessary ingredients to be in cm before computing the volume conduction model and the leadfield matrix, by using ft_convertunits. Second, I also first had a brain-shaped grid, which was not a plot-related problem; I noticed during the computation of the leadfield in the Matlab command lines that it estimated 0 dipoles outside, and x-number of dipoles inside the brain, which already made me suspicious. Check whether you get this as well, then you know it's not a plotting problem. In the end I managed to get a x inside and x outside number of dipoles, and I think the difference was that I first used ft_prepare_singleshell (which gave me the weird brain-shaped results with 0 dipoles outside), while I think you should use ft_prepare_headmodel with cfg.method='singleshell'. Maybe it doesn't matter at all, and the problem lies somewhere else, but for me it worked and I got a nice cube-shaped grid in the end. Hope this helps. Best, Joram On Mon, Jun 24, 2013 at 8:11 PM, Stolk, A. wrote: > Hi Steve, > > With respect to the cube vs. brain-shaped grid; this seems to be > plotting-related? template_grid.inside in the snippet of code below selects > only the grid points that have been determined as inside the brain, but > with a negative inwardshift, hence it's also outside. > > ft_plot_mesh(template_grid.pos(template_grid.inside,:)); % taken from the > wiki > > Hopefully someone else has up-to-date knowledge to answer your question > pertaining to the units (mm vs. cm) of the volume conductor and the source > model. > > Best regards, > Arjen > > ------------------------------ > > *Van: *"Stephen Politzer-Ahles" > *Aan: *fieldtrip at science.ru.nl > *Verzonden: *Maandag 24 juni 2013 17:19:59 > *Onderwerp: *Re: [FieldTrip] fieldtrip Digest, Vol 31, Issue 27 > > > Hi everyone, > > I recently tried > http://fieldtrip.fcdonders.nl/example/create_single-subject_grids_in_individual_head_space_that_are_all_aligned_in_mni_spaceand noticed some inconsistencies between the example code and the results; > I updated the code on the wiki but I wanted to send a message to the list > to double-check whether my changes are ok. Firstly, I had to add a call to > ft_convert_units, because otherwise the vol was expressed in mm and the > grid in cm, causing the grid to be much smaller than the volume conductor > (see http://i.imgur.com/gzct9Dm.png). Is this change ok? > > The result I get is still not quite consistent with the examples shown on > that page, though; in my result, the grid is a cube ( > http://i.imgur.com/NSgCFpg.png), whereas in the example the grid is > brain-shaped. I used the same Fieldtrip brain template and the same code > from the example (except for the change above), so I'm not sure if the > difference is due to different plot settings, a change in the Fieldtrip > code since this example was made, or a change in the sample brain included > in Fieldtrip since the example was made. > > Best, > Steve > > > On Thu, Jun 13, 2013 at 5:05 AM, wrote: > > > > Send fieldtrip mailing list submissions to > > fieldtrip at science.ru.nl > > > > To subscribe or unsubscribe via the World Wide Web, visit > > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > or, via email, send a message with subject or body 'help' to > > fieldtrip-request at science.ru.nl > > > > You can reach the person managing the list at > > fieldtrip-owner at science.ru.nl > > > > When replying, please edit your Subject line so it is more specific > > than "Re: Contents of fieldtrip digest..." > > > > > > Today's Topics: > > > > 1. Re: Source statistics on spatio-temporal source > > reconstruction data (MNE) (Nicolai Mersebak) > > > > > > ---------------------------------------------------------------------- > > > > Message: 1 > > Date: Thu, 13 Jun 2013 12:04:34 +0200 > > From: Nicolai Mersebak > > To: FieldTrip discussion list > > Subject: Re: [FieldTrip] Source statistics on spatio-temporal source > > reconstruction data (MNE) > > Message-ID: <6F3697BB-194F-422F-A1BF-EBBB132F805B at mersebak.dk> > > Content-Type: text/plain; charset="iso-8859-1" > > > > Thanks to all of you for your comments and ideas - they are very helpful! > > > > I ( off course :) ) have some follow up questions. > > > > I have created an ERP structure for my MNE source, so the only think > which I need and that is not straight forward is the neighbour structure. > > > > I am using the standard bem template > (fieldtrip-20130124/template/headmodel/standard_bem.mat) as a head model > and use the following code to get a grid for all subjects as I don't have > any subject specific information regarding the anatomy. > > > > cfg = []; > > cfg.grid.xgrid = -100:10:100; > > cfg.grid.ygrid = -100:10:100; > > cfg.grid.zgrid = -100:10:100; > > cfg.grid.tight = 'yes'; > > cfg.grid.unit = hdm.unit; % unit: mm > > cfg.vol = hdm; > > grid = ft_prepare_sourcemodel(cfg); > > > > > > @Jan-Mathijs and Stephan: I guess making a subject specific grid based > on a warped template requires anatomic information for each subject, e.g. a > MRI image like this tutorial shows: > > > http://fieldtrip.fcdonders.nl/example/create_single-subject_grids_in_individual_head_space_that_are_all_aligned_in_mni_space?s%5B > > > > The final grid output in the tutorial - does it have this 3D grid which > can be used as a neighbour structure ? > > > > I am not sure how to go from my cortical sheet [vertices x > coordinates(x,y,z)] to a 3D grid, which I can use as a neighbour structure ? > > > > A second thing I would like to know is, if any of you have tried to use > an atlas (e.g ALL template atlas) where the regions now are channels in the > permutation test? Going from source points to atlas regions can be done > through ft_sourcestatistics, but I am still interested in keeping the > temporal dimension. The reason to use atlas regions instead of source > points is to decrease the computation time. > > > > Best, > > > > Nicolai > > > > > > > On Thu, Jun 13, 2013 at 5:05 AM, wrote: > >> Send fieldtrip mailing list submissions to >> fieldtrip at science.ru.nl >> >> To subscribe or unsubscribe via the World Wide Web, visit >> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip >> or, via email, send a message with subject or body 'help' to >> fieldtrip-request at science.ru.nl >> >> You can reach the person managing the list at >> fieldtrip-owner at science.ru.nl >> >> When replying, please edit your Subject line so it is more specific >> than "Re: Contents of fieldtrip digest..." >> >> >> Today's Topics: >> >> 1. Re: Source statistics on spatio-temporal source >> reconstruction data (MNE) (Nicolai Mersebak) >> >> >> ---------------------------------------------------------------------- >> >> Message: 1 >> Date: Thu, 13 Jun 2013 12:04:34 +0200 >> From: Nicolai Mersebak >> To: FieldTrip discussion list >> Subject: Re: [FieldTrip] Source statistics on spatio-temporal source >> reconstruction data (MNE) >> Message-ID: <6F3697BB-194F-422F-A1BF-EBBB132F805B at mersebak.dk> >> Content-Type: text/plain; charset="iso-8859-1" >> >> Thanks to all of you for your comments and ideas - they are very helpful! >> >> I ( off course :) ) have some follow up questions. >> >> I have created an ERP structure for my MNE source, so the only think >> which I need and that is not straight forward is the neighbour structure. >> >> I am using the standard bem template >> (fieldtrip-20130124/template/headmodel/standard_bem.mat) as a head model >> and use the following code to get a grid for all subjects as I don't have >> any subject specific information regarding the anatomy. >> >> cfg = []; >> cfg.grid.xgrid = -100:10:100; >> cfg.grid.ygrid = -100:10:100; >> cfg.grid.zgrid = -100:10:100; >> cfg.grid.tight = 'yes'; >> cfg.grid.unit = hdm.unit; % unit: mm >> cfg.vol = hdm; >> grid = ft_prepare_sourcemodel(cfg); >> >> >> @Jan-Mathijs and Stephan: I guess making a subject specific grid based on >> a warped template requires anatomic information for each subject, e.g. a >> MRI image like this tutorial shows: >> >> http://fieldtrip.fcdonders.nl/example/create_single-subject_grids_in_individual_head_space_that_are_all_aligned_in_mni_space?s%5B >> >> The final grid output in the tutorial - does it have this 3D grid which >> can be used as a neighbour structure ? >> >> I am not sure how to go from my cortical sheet [vertices x >> coordinates(x,y,z)] to a 3D grid, which I can use as a neighbour structure ? >> >> A second thing I would like to know is, if any of you have tried to use >> an atlas (e.g ALL template atlas) where the regions now are channels in the >> permutation test? Going from source points to atlas regions can be done >> through ft_sourcestatistics, but I am still interested in keeping the >> temporal dimension. The reason to use atlas regions instead of source >> points is to decrease the computation time. >> >> Best, >> >> Nicolai >> >> >> Den 12/06/2013 kl. 18.58 skrev "smoratti at psi.ucm.es" > >: >> >> > >> > I think Jan.Mathijs alternative suggestion is quite attractive. With >> the neighbors on a cortical sheet I also had the problems that sometimes >> the vertices do not have the same distance and then clustering may be >> biased to smaller or bigger clusters as the number of neighbors does not >> guarantee same cluster sizes. With the interpolation onto a 3D grid, you >> won't have that problem. >> > >> > best, >> > >> > Stephan >> > >> > >> > ________________________________________________________ >> > Stephan Moratti, PhD >> > >> > see also: http://web.me.com/smoratti/ >> > >> > Universidad Complutense de Madrid >> > Facultad de Psicolog?a >> > Departamento de Psicolog?a B?sica I >> > Campus de Somosaguas >> > 28223 Pozuelo de Alarc?n (Madrid) >> > Spain >> > >> > and >> > >> > Center for Biomedical Technology >> > Laboratory for Cognitive and Computational Neuroscience >> > Parque Cient?fico y Tecnol?gico de la Universidad Politecnica de Madrid >> > Campus Montegancedo >> > 28223 Pozuelo de Alarc?n (Madrid) >> > Spain >> > >> > >> > email: smoratti at psi.ucm.es >> > Tel.: +34 679219982 >> > >> > El 12/06/2013, a las 18:00, jan-mathijs schoffelen escribi?: >> > >> >> An alternative would be to interpolate the cortical sheet to a 3D grid >> (where the grid is defined for each subject based on a warped template grid >> defined in a standard space), and then do clustering using a regular 3D >> spatial neighbourhood structure. The rationale being that two vertices on >> the sheet may appear as disconnected (e.g. being on two sides of a sulcus) >> whereas, given the poor spatial resolution, they belong to the same spatial >> blob. >> >> >> >> Best, >> >> Jan-Mathijs >> >> >> >> On Jun 12, 2013, at 5:44 PM, smoratti at psi.ucm.es wrote: >> >> >> >>> Dear Nicolai, >> >>> >> >>> Indeed I have used ft_timelockstatistics for minimum norm source >> data. The trick is to put the source level data into a ERF structure. >> Determining the neighbors of a source surface with vertices is not trivial. >> However I used tess_vertconn.m from the BrainStorm toolbox to get the >> connectivity matrix that tells you who is a neighbor. This you can feed >> into timelockstats. >> >>> >> >>> Hope that helps, >> >>> >> >>> Stephan >> >>> >> >>> ________________________________________________________ >> >>> Stephan Moratti, PhD >> >>> >> >>> see also: http://web.me.com/smoratti/ >> >>> >> >>> Universidad Complutense de Madrid >> >>> Facultad de Psicolog?a >> >>> Departamento de Psicolog?a B?sica I >> >>> Campus de Somosaguas >> >>> 28223 Pozuelo de Alarc?n (Madrid) >> >>> Spain >> >>> >> >>> and >> >>> >> >>> Center for Biomedical Technology >> >>> Laboratory for Cognitive and Computational Neuroscience >> >>> Parque Cient?fico y Tecnol?gico de la Universidad Politecnica de >> Madrid >> >>> Campus Montegancedo >> >>> 28223 Pozuelo de Alarc?n (Madrid) >> >>> Spain >> >>> >> >>> >> >>> email: smoratti at psi.ucm.es >> >>> Tel.: +34 679219982 >> >>> >> >>> El 12/06/2013, a las 15:44, Nicolai Mersebak escribi?: >> >>> >> >>>> Dear all, >> >>>> >> >>>> I have a question concerning the usage of ft_sourcegrandaverage and >> ft_sourcestatistics. >> >>>> >> >>>> After using ft_sourceanalysis (method: MNE), I get spatio-temporal >> source reconstructed data in source.avg.pow (4050 x 897): 4050 sources and >> 897 time points. >> >>>> >> >>>> Now I would like to use the cluster-based permutation test on my >> source reconstructed data. However it seems like ft_sourcegrandaverage and >> ft_sourcestatistics don't support source level time courses. E.g when I am >> using ft_sourcegrandaverage I am getting the following error: >> >>>> >> >>>> Error in ft_sourcegrandaverage (line 158) >> >>>> dat(:,i) = tmp(:); >> >>>> >> >>>> Looking into the code: >> >>>> >> >>>> for i=1:Nsubject >> >>>> tmp = getsubfield(varargin{i}, parameterselection(cfg.parameter, >> varargin{i})); >> >>>> dat(:,i) = tmp(:); >> >>>> tmp = getsubfield(varargin{i}, 'inside'); >> >>>> inside(tmp,i) = 1; >> >>>> end >> >>>> >> >>>> I see that "tmp" are getting the structure [N_sources x timepoints] >> from source.avg.pow for one subject, where "dat" requires the structure >> [N_sources x 1]. >> >>>> >> >>>> I seached the mailing list for similar issues and found this thread: >> >>>> >> >>>> >> http://mailman.science.ru.nl/pipermail/fieldtrip/2010-September/003122.html >> >>>> >> >>>> Since I am interested in using the temporal dimension in my >> statistics, I would like to know if it is still not possible to use >> spatio-temporal source reconstructed data in ft_sourcestatistics and >> ft_sourcegrandaverage ? >> >>>> >> >>>> Or if any have succeeded in using the cluster-based permutation test >> on source level also including the temporal dimension ? >> >>>> >> >>>> Alternative I was thinking that I might could use >> ft_timelockstatistics, where I substituted the channels with sources, e.g >> instead of having 64 channels, I would now have 4050 "channels". >> >>>> If so I need to calculate a label structure and an appropriate >> neighbor structure, which I guess is possible as I have all the 3D >> coordinates for each source, e.g in leadfield.pos ? >> >>>> I know this is a work around solution, but have anyone tried or have >> any experience using such an approach ? >> >>>> >> >>>> Best, >> >>>> >> >>>> Nicolai >> >>>> >> >>>> _______________________________________________ >> >>>> fieldtrip mailing list >> >>>> fieldtrip at donders.ru.nl >> >>>> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip >> >>> >> >>> _______________________________________________ >> >>> fieldtrip mailing list >> >>> fieldtrip at donders.ru.nl >> >>> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip >> >> >> >> Jan-Mathijs Schoffelen, MD PhD >> >> >> >> Donders Institute for Brain, Cognition and Behaviour, >> >> Centre for Cognitive Neuroimaging, >> >> Radboud University Nijmegen, The Netherlands >> >> >> >> Max Planck Institute for Psycholinguistics, >> >> Nijmegen, The Netherlands >> >> >> >> J.Schoffelen at donders.ru.nl >> >> Telephone: +31-24-3614793 >> >> >> >> http://www.hettaligebrein.nl >> >> >> >> _______________________________________________ >> >> fieldtrip mailing list >> >> fieldtrip at donders.ru.nl >> >> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip >> > >> > _______________________________________________ >> > fieldtrip mailing list >> > fieldtrip at donders.ru.nl >> > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip >> >> -------------- next part -------------- >> An HTML attachment was scrubbed... >> URL: < >> http://mailman.science.ru.nl/pipermail/fieldtrip/attachments/20130613/5974284f/attachment.html >> > >> >> ------------------------------ >> >> _______________________________________________ >> fieldtrip mailing list >> fieldtrip at donders.ru.nl >> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip >> >> End of fieldtrip Digest, Vol 31, Issue 27 >> ***************************************** >> > > > > -- > Stephen Politzer-Ahles > University of Kansas > Linguistics Department > http://people.ku.edu/~sjpa/ > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > -- Joram van Driel, MSc. PhD student at the University of Amsterdam Department of Psychology, Brain & Cognition -------------- next part -------------- An HTML attachment was scrubbed... URL: From mbj0310 at gmail.com Tue Jun 25 13:04:15 2013 From: mbj0310 at gmail.com (Beom Jun Min) Date: Tue, 25 Jun 2013 20:04:15 +0900 Subject: [FieldTrip] Decreased baseline level after using ICA in ERP data In-Reply-To: <831995030.1708865.1372062324986.JavaMail.root@sculptor.zimbra.ru.nl> References: <831995030.1708865.1372062324986.JavaMail.root@sculptor.zimbra.ru.nl> Message-ID: Dear Diego, Thank you for your kind answer. The importance of 'quality' you mentioned and the references that you attached could help me to understand the ICA algorithm further. And I have an additional question about preprocessing before ICA. Is detrending needed before the decomposition if there is a linear trend in the segmented data? Because I noticed one component showing linearly and consistently decreased (or increased) activity during one segment in some trials after ICA, I wondered why that happened. Apart from that, I found the possible cause of the past problem. It looks like the ft_rejectcomponent might remove the 'demean' effect. After I used the function without any component removing, (cfg.component = [];) the baseline level decreased again but the shape of the ERP does not change. However, I have not found the way to correct this decreased baseline yet. The ft_preprocessing with demean pre-stimulus does not work. Thanks. BJ 2013/6/24 Lozano Soldevilla, D. (Diego) > Dear Beom Jun, > > I see multiple scenarios why this baseline activity decrease could happen. > First of all, how the component you're rejecting look like (i.e. "blink > component")? Do you see this activity decrease after the baseline period? > > The "quality" of the ICA decomposition, how well your artifact/component > of interest has been isolated by algorithm in time (i.e. blink time > courses) and space (marked frontal topography), will determine the activity > that later on you'll reject/select. If your decomposition is not well > suited, the rejection of a particular IC activity might have "extra" > activity you don't want to reject (effect of interest), might be the > algorithm is not able to isolate the components of interests (i.e. > artifacts) or a combination of both. > > To evaluate the quality of your ICA decomposition you might have a look > here (http://www.ncbi.nlm.nih.gov/pubmed/19162199). Basically, the > authors find that the ICA decomposition improves significantly "increased > by removing the mean EEG at each channel for each epoch of data rather than > the mean EEG in a prestimulus baseline". In addition (see here: > http://sccn.ucsd.edu/pipermail/eeglablist/2012/004925.html), high-pass > filtering above ~1hz improve the results. > > It's very important to feed ICA as much relevant data as you can use. The > more the data, the better the decomposition. There's a rule of thumb that > says that for a reliable IC decomposition 20 time points per channel2 is > needed (see here for a reference > http://www.ncbi.nlm.nih.gov/pubmed/16904745) > > I hope that helps, > > Diego > ------------------------------ > > *From: *"Beom Jun Min" > *To: *"FieldTrip discussion list" > *Sent: *Monday, 24 June, 2013 6:27:47 AM > *Subject: *[FieldTrip] Decreased baseline level after using ICA in ERP > data > > > Dear all, > > I have ERP data and now I am dealing with ICA to remove muscle and eye > artifacts. > However, I found that after ft_rejectcomponent, the baseline level of the > segmented epoch decreased. (The baselinewindow is [-0.2 0].) > The baseline level decreased even though I rejected only one component. > > My script is shown below. > > *%% Removing the Artifacts* > *cfg = []; > * > *cfg.component = [ ]; % to be removed component(s)* > *post_ICA_temp6 = ft_rejectcomponent(cfg, comp_detrand, data_raw);* > * > * > *%% timelocking* > * > * > *cfg = [];* > *timelock_temp6 = ft_timelockanalysis(cfg, post_ICA_temp6);* > * > * > *%% Plot* > * > * > *figure;* > *cfg = [];* > *cfg.layout = lay;* > *cfg.interactive = 'yes';* > *cfg.channel = ['all', {'-EKG', '-EMG'}];* > *ft_multiplotER(cfg, timelock_temp6)* > > Is there something that I missed? > > Thanks. > > BJ > > -- > BeomJun Min, M.D. > > Department of Medical System Engineering (DMSE) > Gwangju Institute of Science and Technology (GIST) > 261 Cheomdan-gwagiro(Oryong-dong), Buk-gu, Gwangju > 500-712, Republic of Korea (South) > Phone: +82-62-715-3266 / Fax: +82-62-715-3244 > E-mail: mbj0310 at gmail.com, http://bmssa.gist.ac.kr > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > > > > -- > PhD Student > Neuronal Oscillations Group > Donders Institute for Brain, Cognition and Behaviour > Centre for Cognitive Neuroimaging > Radboud University Nijmegen > NL-6525 EN Nijmegen > The Netherlands > http://www.ru.nl/people/donders/lozano-soldevilla-d/ > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > -- BeomJun Min, M.D. Department of Medical System Engineering (DMSE) Gwangju Institute of Science and Technology (GIST) 261 Cheomdan-gwagiro(Oryong-dong), Buk-gu, Gwangju 500-712, Republic of Korea (South) Phone: +82-62-715-3266 / Fax: +82-62-715-3244 E-mail: mbj0310 at gmail.com, http://bmssa.gist.ac.kr -------------- next part -------------- An HTML attachment was scrubbed... URL: From mengtongxiao at gmail.com Tue Jun 25 15:29:41 2013 From: mengtongxiao at gmail.com (=?GB2312?B?s8LRqQ==?=) Date: Tue, 25 Jun 2013 21:29:41 +0800 Subject: [FieldTrip] source reconstruction data (MNE .fif) Message-ID: Dear all I have a .fif file and want to source reconstruction . I want use the template sourcemodel in fieldtrip,but I see there are two different coordinate system. Shold I convert the fif coordinate to template coordinate? thanks best, xiao -------------- next part -------------- An HTML attachment was scrubbed... URL: From m.chait at ucl.ac.uk Tue Jun 25 16:39:16 2013 From: m.chait at ucl.ac.uk (Chait, Maria) Date: Tue, 25 Jun 2013 14:39:16 +0000 Subject: [FieldTrip] PhD studentship at the UCL Ear Institute Message-ID: <3BA3DF582C0B7542AE0CB625F0119AB8378B0451@DB3PRD0111MB492.eurprd01.prod.exchangelabs.com> Please forward to anyone who might be interested. A 3 year PhD studentship in auditory cognitive neuroscience is available as part of a research collaboration between the UCL Ear Institute (London, UK) and NTT Communication Science Labs (Nippon Telegraph and Telephone corporation, Atsugi, Japan). The student will be based at the UCL Ear Institute and supervised by Dr. Maria Chait. They will also be working with Prof. Makio Kashino and Dr. Shigeto Furukawa (NTT). The project will use psychophysics, eye tracking, autonomic response measures and MEG functional brain imaging to investigate which features of sound are perceptually salient. Namely, those sounds that automatically capture attention in a busy scene, even when listeners' initial perceptual focus is elsewhere. The UCL Ear Institute provides state-of-the-art research facilities across a wide range of disciplines and is one of the foremost centres for hearing, speech and language-related research within Europe. Key Requirements The PhD start date would be September 2013. Applicants should have a UK/EU nationality and a 1St class, or upper 2nd degree in a relevant discipline (e.g. Psychology, Neuroscience, Engineering). The PhD work would require good programming skills (e.g. in Matlab). Previous experience with auditory research, functional brain imaging, signal processing and/or acoustics is desirable. For an informal discussion, or to submit an application please contact Dr. Maria Chait (m.chait at ucl.ac.uk). Applicants should submit a supporting statement, a CV, and the details of two academic referees. The closing date for receipt of applications is July 15th, 2013.The studentship includes fees and a yearly stipend (about £16000; tax free). Maria Chait PhD m.chait at ucl.ac.uk Senior Lecturer UCL Ear Institute 332 Gray's Inn Road London WC1X 8EE -------------- next part -------------- An HTML attachment was scrubbed... URL: From matt.craddock at uni-leipzig.de Tue Jun 25 17:17:43 2013 From: matt.craddock at uni-leipzig.de (Matt Craddock) Date: Tue, 25 Jun 2013 17:17:43 +0200 Subject: [FieldTrip] Decreased baseline level after using ICA in ERP data In-Reply-To: References: <831995030.1708865.1372062324986.JavaMail.root@sculptor.zimbra.ru.nl> Message-ID: <51C9B497.7080105@uni-leipzig.de> Dear Beom Jun, Regarding detrending - ICA works better with relatively stationary data, which is why high-pass filtering - as Diego mentioned - is often performed. Both detrending and high-pass filtering remove/attenuate slow fluctuations in the signal, so I'd suggest using one or the other procedure before running ICA if you think such low frequency activity is affecting your decompositions. Cheers, Matt On 25/06/2013 13:04, Beom Jun Min wrote: > Dear Diego, > > Thank you for your kind answer. > The importance of 'quality' you mentioned and the references that you > attached could help me to understand the ICA algorithm further. > And I have an additional question about preprocessing before ICA. Is > detrending needed before the decomposition if there is a linear trend in > the segmented data? > Because I noticed one component showing linearly and consistently > decreased (or increased) activity during one segment in some trials > after ICA, I wondered why that happened. > Apart from that, I found the possible cause of the past problem. It > looks like the ft_rejectcomponent might remove the 'demean' effect. > After I used the function without any component removing, (cfg.component > = [];) the baseline level decreased again but the shape of the ERP does > not change. > However, I have not found the way to correct this decreased baseline > yet. The ft_preprocessing with demean pre-stimulus does not work. > > Thanks. > > BJ -- Dr. Matt Craddock Post-doctoral researcher, Institute of Psychology, University of Leipzig, Neumarkt 9-19, 04109 Leipzig, Germany Phone: +49 341 973 95 44 From l.verhagen at fcdonders.ru.nl Wed Jun 26 11:33:36 2013 From: l.verhagen at fcdonders.ru.nl (Verhagen, L. (Lennart)) Date: Wed, 26 Jun 2013 11:33:36 +0200 (CEST) Subject: [FieldTrip] Brain Stimulation (TMS-tDCS-EEG) toolkit course at Donders, Nijmegen - registration is now open Message-ID: <1380b01ce7250$3bba7a70$b32f6f50$@verhagen@fcdonders.ru.nl> On September 2-4, 2013, we will host the “Toolkit of Cognitive Neuroscience: Transcranial Brain Stimulation” at the Donders Institute in Nijmegen. This intensive three-day toolkit course will provide in-depth knowledge on transcranial magnetic stimulation (TMS) and transcranial current stimulation (tDCS/tACS). The course will cover both basic and advanced topics, discussing online and offline approaches of quantification, interference, and modulation of neural activity. We will specifically address multimodal applications of non-invasive brain stimulation, with an emphasis on concurrent electroencephalography (EEG). The course involves a series of lectures and hands-on training of stimulation application, data acquisition and data analysis. These address fundamental paradigms, such as single-pulse TMS, repetitive TMS, tDCS and tACS, and advanced topics, such as paired-pulse TMS and concurrent TMS-tDCS-EEG. Keynote lectures will be given by Rogier Mars (Oxford), Jacinta O’Shea (Oxford), Alexander Sack (Maastricht), and Gregor Thut (Glasgow). Please see the program for more details. The participation fee is €150 for (PhD) students and €300 for more senior researchers. This includes coffee/tea, Dutch sandwich lunches, and social diner and drinks on Monday and Tuesday. Because of space limitations the number of participants in the hands-on sessions is limited to 30; please indicate your preference to join these additional sessions when registering. Location: Donders Institute for Brain, Cognition and Behaviour, Centre for Cognitive Neuroimaging, Kapittelweg 29, 6525 EN Nijmegen Organizers: Lennart Verhagen (l.verhagen at donders.ru.nl) Til Ole Bergmann (t.bergmann at donders.ru.nl) Registration: www.ru.nl/donders/course-information/2013courses/toolkit-cognitive-7 Best regards, Lennart Verhagen and Til Ole Bergmann -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: DondersTookit - BrainStim - program2013.pdf Type: application/pdf Size: 392475 bytes Desc: not available URL: From graham at peyton.co.za Wed Jun 26 12:13:58 2013 From: graham at peyton.co.za (Graham Peyton) Date: Wed, 26 Jun 2013 12:13:58 +0200 Subject: [FieldTrip] QSUB toolbox on a multi-core computer Message-ID: Dear FieldTrip community, I am trying to carry out an MEG analysis using the qsub distributed computing toolbox. I'm using a quad-core i7 computer, and was hoping that I'd be able to distribute the workload over all four cores. I have followed the tutorial below exactly: http://fieldtrip.fcdonders.nl/tutorial/distributedcomputing The problem I am having is this: I managed to run example 1 (with my own dataset), but I am finding that when I use qsubcellfun, the function ft_definetrial is executed *sequentially* (for each condition), *not* in * parallel*. Is there a way I can correct this, so as to parallelize the analysis? Or is the toolbox not designed for multi-core machines? Many thanks, Graham Peyton -------------- next part -------------- An HTML attachment was scrubbed... URL: From m.vandenieuwenhuijzen at fcdonders.ru.nl Wed Jun 26 15:07:02 2013 From: m.vandenieuwenhuijzen at fcdonders.ru.nl (Marieke van de Nieuwenhuijzen) Date: Wed, 26 Jun 2013 15:07:02 +0200 (CEST) Subject: [FieldTrip] ROI selection of beamformer grid points Message-ID: <1483937264.1423478.1372252022737.JavaMail.root@draco.zimbra.ru.nl> Dear Fieldtrippers, I am running my analyses on time courses reconstructed in source space. Basically, that means that my working dataset is a matrix of grid point x time. What I want to do now is do some analyses on a subset of that dataset, a bit analogous to selecting some sensors to restrict analyses to. Therefore, what I would ideally want to do, is select a subset of grid points corresponding to a specific location (for example only the occipital grid points, or only the grid points corresponding to a specific atlas label). Does anyone have any suggestions about how I should go about selecting specific grid points? Is there perhaps some grid based atlas, or is it possible to select grid points based on their corresponding mni coordinates which you get after running ft_sourceinterpolate and ft_volumenormalise (in other words, is it possible to reverse ft_volumenormalise and ft_sourceinterpolate to map the mni coordinates to the grid points instead of the grid points to mni representation). Any pointers would be much appreciated. Best, Marieke From jm.horschig at donders.ru.nl Wed Jun 26 15:26:41 2013 From: jm.horschig at donders.ru.nl (=?ISO-8859-1?Q?=22J=F6rn_M=2E_Horschig=22?=) Date: Wed, 26 Jun 2013 15:26:41 +0200 Subject: [FieldTrip] ROI selection of beamformer grid points In-Reply-To: <1483937264.1423478.1372252022737.JavaMail.root@draco.zimbra.ru.nl> References: <1483937264.1423478.1372252022737.JavaMail.root@draco.zimbra.ru.nl> Message-ID: <51CAEC11.10702@donders.ru.nl> Hi Marieke, I basically use two approaches (in the end, both failed, so any other hints are appreciated): (a) Select voxels purely based on anatomical labels, as found in an atlas or in literature. (b) Select voxels based on some local maxima or minima, e.g. power maximum or maximum difference of log-ratio (a) should be pretty straight forward. In essence it involves getting MNI coordinates, inversely warping your grids to MNI space, getting closest voxel. If you have your region of interest not in MNI coordinates you need to transform them. I found some tal2mni functions on the web for this, but note that this is just an estimate. Of course, (a) is also applicable if you have a localizer task using fMRI and want to focus on some localized voxels. (b) is a bit more tricky, because you might be faced with huge inter-subject variability. Best of course would be to have the subject-specific, fMRI localized voxel. What I done in the past is to define a rough region of interest, e.g. posterior neocortex (based on some quick&dirty coordinate thresholding), using ft_volumesmooth to apply a gaussian blur on single subject-activity and then select the voxel that suits me best (i.e. the one of maximum activity). Of course your ROI could also be based on the grand-average or what have you. I had the feeling that especially this latter approach (base ROI on GA +/- 3 cm, smooth individual subject data, select most sensitive voxel) worked quite well, but I cannot tell for sure, because in the end my results were not reliable enough. Oh and btw, if the question just aims on 'how' to select programming-wise: Match the coordinate with your template, store the index based on the template-grid and use this index on your subject-specific grid to get voxel of interest in subject-specific coordinates. Good luck! Best, Jörn On 6/26/2013 3:07 PM, Marieke van de Nieuwenhuijzen wrote: > Dear Fieldtrippers, > > I am running my analyses on time courses reconstructed in source space. Basically, that means that my working dataset is a matrix of grid point x time. What I want to do now is do some analyses on a subset of that dataset, a bit analogous to selecting some sensors to restrict analyses to. Therefore, what I would ideally want to do, is select a subset of grid points corresponding to a specific location (for example only the occipital grid points, or only the grid points corresponding to a specific atlas label). > > Does anyone have any suggestions about how I should go about selecting specific grid points? Is there perhaps some grid based atlas, or is it possible to select grid points based on their corresponding mni coordinates which you get after running ft_sourceinterpolate and ft_volumenormalise (in other words, is it possible to reverse ft_volumenormalise and ft_sourceinterpolate to map the mni coordinates to the grid points instead of the grid points to mni representation). > > Any pointers would be much appreciated. > > Best, > Marieke > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -- Jörn M. Horschig PhD Student Donders Institute for Brain, Cognition and Behaviour Centre for Cognitive Neuroimaging Radboud University Nijmegen Neuronal Oscillations Group FieldTrip Development Team P.O. Box 9101 NL-6500 HB Nijmegen The Netherlands Contact: E-Mail: jm.horschig at donders.ru.nl Tel: +31-(0)24-36-68493 Web: http://www.ru.nl/donders Visiting address: Trigon, room 2.30 Kapittelweg 29 NL-6525 EN Nijmegen The Netherlands From andmib at gmail.com Wed Jun 26 19:22:33 2013 From: andmib at gmail.com (Andrew Brooks) Date: Wed, 26 Jun 2013 13:22:33 -0400 Subject: [FieldTrip] Siemens GUI Streamer Disconnecting Message-ID: Hello all, I have a protocol that includes three separate sequences. I start the Siemens GUI streamer prior to the first sequence, and keep it open through all three sequences. Only on the last sequence do I run ft_omri_pipeline_nuisance. I've been running into a problem where the Siemens GUI streamer disconnects as soon as the the third sequence starts running (and the ft_omri_pipeline script is waiting for data). I have to manually click 'connect' as soon as it disconnects, and then it works fine. Any ideas as to why the streamer would disconnect like this? Thanks! Andrew -------------- next part -------------- An HTML attachment was scrubbed... URL: From j.herring at fcdonders.ru.nl Thu Jun 27 12:45:53 2013 From: j.herring at fcdonders.ru.nl (Herring, J.D. (Jim)) Date: Thu, 27 Jun 2013 12:45:53 +0200 (CEST) Subject: [FieldTrip] QSUB toolbox on a multi-core computer In-Reply-To: References: Message-ID: <004701ce7323$7fa9ff20$7efdfd60$@herring@fcdonders.ru.nl> Dear Graham, As stated in the tutorial the distributed computing functions are intended to distribute workload over different computers running a Torque or SGE batch system: "This tutorial covered how to distribute your computations/workload over multiple computers in a cluster that uses the Torque or SGE batch queue system". However, what you could do is make use of Matlab's parallel processing tools. Matlab allows you to open a pool of so-called 'workers' to distribute processing jobs to allowing you to run multiple processes in parallel. Please see http://www.mathworks.nl/help/distcomp/matlabpool.html and http://www.mathworks.nl/help/matlab/ref/parfor.html. Once you've opened a pool of workers using 'matlabpool', you can use 'parfor' in the same way as you would use 'for' to create a loop that runs all processes in parallel over all four cores. Best, Jim From: fieldtrip-bounces at science.ru.nl [mailto:fieldtrip-bounces at science.ru.nl] On Behalf Of Graham Peyton Sent: woensdag 26 juni 2013 12:14 To: fieldtrip at science.ru.nl Subject: [FieldTrip] QSUB toolbox on a multi-core computer Dear FieldTrip community, I am trying to carry out an MEG analysis using the qsub distributed computing toolbox. I'm using a quad-core i7 computer, and was hoping that I'd be able to distribute the workload over all four cores. I have followed the tutorial below exactly: http://fieldtrip.fcdonders.nl/tutorial/distributedcomputing The problem I am having is this: I managed to run example 1 (with my own dataset), but I am finding that when I use qsubcellfun, the function ft_definetrial is executed sequentially (for each condition), not in parallel. Is there a way I can correct this, so as to parallelize the analysis? Or is the toolbox not designed for multi-core machines? Many thanks, Graham Peyton -------------- next part -------------- An HTML attachment was scrubbed... URL: From ana.hincapie at gmail.com Fri Jun 28 09:31:24 2013 From: ana.hincapie at gmail.com (=?ISO-8859-1?Q?Ana_Sof=EDa_Hincapi=E9_Casas?=) Date: Fri, 28 Jun 2013 09:31:24 +0200 Subject: [FieldTrip] In the forward problem, how are the points for the grid.inside and grid.outside defined? Message-ID: Hi, I´am new in FieldTrip and I would like to what are the grid.inside and grid.outside points and if I could used the whole grid to calculate the leadfields. Thanks in advance for the help you could bring me. Regards, -- Ana Hincapié -------------- next part -------------- An HTML attachment was scrubbed... URL: From jm.horschig at donders.ru.nl Fri Jun 28 10:42:03 2013 From: jm.horschig at donders.ru.nl (=?ISO-8859-1?Q?=22J=F6rn_M=2E_Horschig=22?=) Date: Fri, 28 Jun 2013 10:42:03 +0200 Subject: [FieldTrip] In the forward problem, how are the points for the grid.inside and grid.outside defined? In-Reply-To: References: Message-ID: <51CD4C5B.5030909@donders.ru.nl> Hi Ana, inside and outside just describe whether the grid point is inside or outside the brain. You can plot this to see for yourself: % plot only what is inside the brain figure; ft_plot_vol(vol, 'edgecolor', 'none'); alpha 0.4; ft_plot_mesh(grid.pos(grid.inside,:)); % plot the whole grid figure; ft_plot_vol(vol, 'edgecolor', 'none'); alpha 0.4; ft_plot_mesh(grid.pos(:,:)); FieldTrip will use that information automatically to only use grid points inside the brain, so yes, you can use the whole grid to compute the leadfield matrix. If you do not want that, you can modify grid.inside and grid.outside yourself. Have fun fieldtrippin' :) Jörn On 6/28/2013 9:31 AM, Ana Sofía Hincapié Casas wrote: > Hi, > > I´am new in FieldTrip and I would like to what are the grid.inside and > grid.outside points and if I could used the whole grid to calculate > the leadfields. > > Thanks in advance for the help you could bring me. > > Regards, > > -- > Ana Hincapié > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -- Jörn M. Horschig PhD Student Donders Institute for Brain, Cognition and Behaviour Centre for Cognitive Neuroimaging Radboud University Nijmegen Neuronal Oscillations Group FieldTrip Development Team P.O. Box 9101 NL-6500 HB Nijmegen The Netherlands Contact: E-Mail: jm.horschig at donders.ru.nl Tel: +31-(0)24-36-68493 Web: http://www.ru.nl/donders Visiting address: Trigon, room 2.30 Kapittelweg 29 NL-6525 EN Nijmegen The Netherlands -------------- next part -------------- An HTML attachment was scrubbed... URL: From ggonesc at upo.es Fri Jun 28 18:28:57 2013 From: ggonesc at upo.es (Gabriel Gonzalez Escamilla) Date: Fri, 28 Jun 2013 18:28:57 +0200 Subject: [FieldTrip] problem appending data Message-ID: <2350c7b9464ea50a.51cdd5e9@upo.es> Dear Fieldtrip experts, I'm working with restin-state EEG data, I'm looking for performing EEG coherence analysis between my normal EEG channels and a channel from the same subject but aquired with a different name I did: data = ft_appenddata([], dataEEG_allchans, dataEEG_1chan) and it did concatenate the one single channel at the end of the dataEEG_allchans, so now I have a matrix with Nchans+1, that looks perfect to me, then I did perform fourier transformations with a hanning window, and workded perfectly, but if I set cfg.method='coh' cfg.complex='imag' cfg.channelcbm={'all', 'ref-P7'} icohe=ft_connectovityanalysis(cfg,) I always get the following error: ???? attempted to access siz(4); index out of bounds because numel(siz=3) Error in ==> ft_checkdata>fixcsd at 798 I have also tried something like: cfg.channelcbm={{1x40cell}, 'ref-P7'} where {1x40 cell} is a cell matrix containing the names of all my sensors but it didn't worked. Any help will be appreciated Many thanks in advanced, Gabriel -------------- next part -------------- An HTML attachment was scrubbed... URL: From manuel.mercier at einstein.yu.edu Fri Jun 28 22:43:54 2013 From: manuel.mercier at einstein.yu.edu (Manuel Mercier) Date: Fri, 28 Jun 2013 20:43:54 +0000 Subject: [FieldTrip] PLV formula Message-ID: Dear Fieldtripers Sometime ago I wrote for myself a function that was computing PLV and some related non parametric statistics. (Phase Locking Value as define as the mean across trials of the phase angle difference recorded at two loci ; based on Lachaux et al., 1999, HBM). I implemented PLV in matlab using the following formula: plv = squeeze(abs(mean(exp(1i*(angle(data.fourierspctrm(:,cmb(1),:,:)) ... -angle(data.fourierspctrm(:,cmb(2),:,:)))),1))); with cmb(1) and cmb(2) being the indices of the electrodes of interest (between which PLV is computed). I compared my results with the ft_connectivityanalysis function from Fieldtrip and the results were exactly the same. So far so good. But I recently went back to my code, and I was a little bit confused. Since I was dealing with angles, I though that the best way to do the subtraction should be done in the complex plane Like: plv = squeeze(abs(mean(exp(1i*(angle(exp(1i*(angle(data.fourierspctrm(:,cmb(1),:,:)))) ... - exp(1i*(angle(data.fourierspctrm(:,cmb(2),:,:))))))),1))); (for instance if the two angles: pi/2 and -pi/2 the direct subtraction will give pi, whereas in the complex plan it will be pi/2 - with the norm x2). The result I got with this code is obviously different from the previous one, and what I got from Fieldtrip. I went back to the archive of the mailing list but didn't find a clear answer to my point. Does anyone can enlighten me ? Thanks ! Manuel -------------- next part -------------- An HTML attachment was scrubbed... URL: From ebrahimi_nia at yahoo.com Sat Jun 1 06:52:43 2013 From: ebrahimi_nia at yahoo.com (Fatemeh Ebrahimi nia) Date: Fri, 31 May 2013 21:52:43 -0700 (PDT) Subject: [FieldTrip] loreta2fieldtrip function error In-Reply-To: <1370015815.5183.YahooMailNeo@web122402.mail.ne1.yahoo.com> References: <1369934092.15336.YahooMailNeo@web122405.mail.ne1.yahoo.com> <51A78CC1.6030906@berkeley.edu> <1370015815.5183.YahooMailNeo@web122402.mail.ne1.yahoo.com> Message-ID: <1370062363.83888.YahooMailNeo@web122406.mail.ne1.yahoo.com> Hi Dear all, Can any one give me information about the output structure of "loreta2fieldtrip" function (What do the matrixes refer to?) or advise a reference to study about that please?  Best, Fatemeh ________________________________ From: Ingrid Nieuwenhuis To: fieldtrip at science.ru.nl Sent: Thursday, May 30, 2013 10:30 AM Subject: Re: [FieldTrip] loreta2fieldtrip function error Hi Fatemeh, I had the same error recently when I did the same. I filed the bug, see http://bugzilla.fcdonders.nl/show_bug.cgi?id=2144 I did create a work around. In the LORETA program, you can export the source data as a text file. You can read that text file in with loreta2fieldtrip.m. It's a bit of a patch, but it worked for me. Hope this helps, Ingrid On 5/30/2013 10:14 AM, Fatemeh Ebrahimi nia wrote: Hi dear all, > > >I am analyzing EEG data. I have computed sLORETA (.slor) from ERP data. Now I want to read and convert LORETA source reconstruction into a >MATLAB data structure using "loreta2fieldtrip" function, But I have gotten the bellow error. > > >**** Error using fread > >Invalid precision. >Error in loreta2fieldtrip (line 85) >activity = fread(fid, [voxnumber Ntime], 'float = >single'); *** > > >Can someone give me a help? > > > >Best regards, >Fatemeh > > > > >_______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -- Ingrid Nieuwenhuis PhD Postdoctoral Fellow Sleep and Neuroimaging Laboratory Department of Psychology University of California, Berkeley California 94720-1650 Tolman Hall, room 5305 _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -------------- next part -------------- An HTML attachment was scrubbed... URL: From politzerahless at gmail.com Sat Jun 1 20:44:04 2013 From: politzerahless at gmail.com (Stephen Politzer-Ahles) Date: Sat, 1 Jun 2013 13:44:04 -0500 Subject: [FieldTrip] Question about minimum norm estimate pipeline Message-ID: Hi Arjen, Thanks for your message. I did align the mri to Talairach; as you can see from http://i.imgur.com/26nyHYZ.png, the volume conduction model and sourcespace are both expressed in the same coordinate system (i.e., everything's pointing in the same direction) but they're just not sitting on top of one another. If anyone has any ideas on where that problem was introduced (or how to re-align them now), I would greatly appreciate it. Below I have some more details about how I processed that data, if it helps. I'm trying to go through the data one step at a time and track where the problem might have happened. When I compare the sourcespace before having applied any transformation (i.e., the headshape from -oct-6-src.fif) to the original mri (orig-nomask.mgz), they look ok (I don't know how to plot them together, but see http://i.imgur.com/LGW7YnJ.png and http://i.imgur.com/JUoTxc9.png -- things at least look like they're on more or less the same plane). Then I re-register the mri to CTF ( http://fieldtrip.fcdonders.nl/tutorial/minimumnormestimate#source_modelco-registration_of_the_source_space_to_the_sensor-based_head_coordinate_system); after that, in mri_nom_ctf, the axes are all going in the right direction but the whole head is tilted forward and the origin of the axes is no longer at the anterior commisure (see http://i.imgur.com/CTZNOTk.png for the realigned MRI). Applying the transformation matrix T to the sourcespace also seems to tilt it like that (http://i.imgur.com/bcNIpf3.png), although as can be seen from the first image in this message it doesn't quite line up with the volume conduction model in the end. As for the volume conduction model, here is what it looks like at first ( http://i.imgur.com/ZX3m38b.png) and here is what it looks like after applying the transformation matrix (http://i.imgur.com/vXa3Cnc.png). Obviously the transformation matrix is doing something, but it's not getting the sourcespace and volume conduction model lined up; since it's the same transformation matrix, all I can guess is that there was some pre-existing difference between the source mesh (the .fif file) and the anatomical mri (orig-nomask.mgz), but I'm not sure when that came in. Another minor issue: when I first compared the volume conduction model and the sourcespace, they were expressed in different units even though I followed the code in the tutorial. See http://i.imgur.com/orwgcTJ.png: the sourcespace looks 10x smaller than the volume conduction model, which I assume is because it is expressed in cm whereas the volume conduction model is expressed in mm. To get the figure linked at the very beginning of this message, I had to convert the units of the volume conduction model to cm, even though that's not in the tutorial. I notice that the tutorial on the wiki hasn't been edited since October 2012 (other than a few edits I made this month which were just correcting typos in the prose). Is it possible that what's on the wiki is out of date? (Also cc'ing Lilla on this.) Thanks, Steve > Message: 1 > Date: Fri, 31 May 2013 08:11:23 +0200 (CEST) > From: "Stolk, A." > To: FieldTrip discussion list > Subject: Re: [FieldTrip] Question about minimum norm estimate pipeline > Message-ID: > < 1914237354.1292588.1369980683984.JavaMail.root at sculptor.zimbra.ru.nl> > Content-Type: text/plain; charset="utf-8" > > Hi Steve, A quick guess; did you correctly align your resliced mri to Talairach space by indicating the commissures ( http://imaging.mrc-cbu.cam.ac.uk/imaging/FindingCommissures ) and, if I'm correct, a point in the same place, e.g. between the hemispheres? This should update the transformation matrix. Best regards, Arjen ----- Oorspronkelijk bericht ----- > > Van: "Stephen Politzer-Ahles" > > Aan: fieldtrip at science.ru.nl > > Verzonden: Vrijdag 31 mei 2013 05:53:45 > > Onderwerp: [FieldTrip] Question about minimum norm estimate pipeline > > Hello all, > > I have not yet gotten a response to my question below, but in the > > meantime I have another question about the minimum norm estimate > > workflow--specifically, about the coordinate system for the > > skull-stripped anatomy in the step described at > > http://fieldtrip.fcdonders.nl/tutorial/minimumnormestimate#preprocessing_of_the_anatomical_mrisave_to_disk > > . I'm confused by the following bit of code: > > % ensure that the skull-stripped anatomy is expressed in the same > > coordinate system as the anatomy > > seg.transform = mri_tal.transform; > > In my data, mri_tal.coordsys is 'spm' (I presume this is the result of > > re-aligning to Talairach in the previous step?) whereas seg.coordsys > > is 'ctf' (as a result of re-aligning to CTF several steps earlier). > > (But mri_tal also has a field mri_tal.transformorig, which seg does > > not have.) So should I really be using the same transform for both, as > > shown in the tutorial? > > Apologies if this question is pretty basic; I'm just trying to > > pinpoint where the mis-alignment described in my message below > > occurred, so I want to make sure I understand each step of the > > workflow correctly > > Best, > > Steve > > > Message: 1 > > > Date: Sat, 25 May 2013 08:11:18 -0500 > > > From: Stephen Politzer-Ahles < politzerahless at gmail.com > > > > To: fieldtrip at donders.ru.nl > > > Subject: [FieldTrip] Sourcespace and volume conductor misaligned > > > Message-ID: > > > > > > > > > Content-Type: text/plain; charset="utf-8" > > > > > > Hello all, > > > > > > I am going through the workflow at > > > http://fieldtrip.fcdonders.nl/tutorial/minimumnormestimate . After > > > making > > > the volume conduction model using ft_prepare_headmodel(), I noticed > > > that > > > although the volume conduction model and sourcespace have the same > > > orientation and overall size/shape (after I converted the volume > > > conduction > > > model to cm, which wasn't in the tutorial but my original model came > > > out in > > > mm), they don't quite line up, as you can see in this figure: > > > > > > http://i.imgur.com/mGEtLOa.png > > > > > > I did interactively re-align the data to CTF (twice--in step 2 of > > > "Preprocessing of the anatomical MRI" and in step 4 of "Source > > > model") > > > using fiducials, and to Talairach (step 5 of "Preprocessing of the > > > anatomical data"), so I'm not sure how it ended up this way. The > > > code I've > > > used at each step is basically the same as that in the tutorial. > > > > > > Is there any way to line up my volume conduction model and > > > sourcespace now, > > > without going back and re-running most of the workflow? > > > > > > Best, > > > Steve > > > > > > -- > > > Stephen Politzer-Ahles > > > University of Kansas > > > Linguistics Department > > > http://people.ku.edu/~sjpa/ > > On Sat, May 25, 2013 at 1:56 PM, < fieldtrip-request at science.ru.nl > > > wrote: > > > > > > Send fieldtrip mailing list submissions to > > > fieldtrip at science.ru.nl > > > > > > To subscribe or unsubscribe via the World Wide Web, visit > > > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > > or, via email, send a message with subject or body 'help' to > > > fieldtrip-request at science.ru.nl > > > > > > You can reach the person managing the list at > > > fieldtrip-owner at science.ru.nl > > > > > > When replying, please edit your Subject line so it is more specific > > > than "Re: Contents of fieldtrip digest..." > > > > > > > > > Today's Topics: > > > > > > 1. Sourcespace and volume conductor misaligned > > > (Stephen Politzer-Ahles) > > > 2. Re: fieldtrip Digest, Vol 30, Issue 31 (Johanna Zumer) > > > > > > > > > ---------------------------------------------------------------------- > > > > > > Message: 1 > > > Date: Sat, 25 May 2013 08:11:18 -0500 > > > From: Stephen Politzer-Ahles < politzerahless at gmail.com > > > > To: fieldtrip at donders.ru.nl > > > Subject: [FieldTrip] Sourcespace and volume conductor misaligned > > > Message-ID: > > > > > > > > > Content-Type: text/plain; charset="utf-8" > > > > > > Hello all, > > > > > > I am going through the workflow at > > > http://fieldtrip.fcdonders.nl/tutorial/minimumnormestimate . After > > > making > > > the volume conduction model using ft_prepare_headmodel(), I noticed > > > that > > > although the volume conduction model and sourcespace have the same > > > orientation and overall size/shape (after I converted the volume > > > conduction > > > model to cm, which wasn't in the tutorial but my original model came > > > out in > > > mm), they don't quite line up, as you can see in this figure: > > > > > > http://i.imgur.com/mGEtLOa.png > > > > > > I did interactively re-align the data to CTF (twice--in step 2 of > > > "Preprocessing of the anatomical MRI" and in step 4 of "Source > > > model") > > > using fiducials, and to Talairach (step 5 of "Preprocessing of the > > > anatomical data"), so I'm not sure how it ended up this way. The > > > code I've > > > used at each step is basically the same as that in the tutorial. > > > > > > Is there any way to line up my volume conduction model and > > > sourcespace now, > > > without going back and re-running most of the workflow? > > > > > > Best, > > > Steve > > > > > > -- > > > Stephen Politzer-Ahles > > > University of Kansas > > > Linguistics Department > > > http://people.ku.edu/~sjpa/ -------------- next part -------------- An HTML attachment was scrubbed... URL: From Lilla.Magyari at mpi.nl Sat Jun 1 23:22:34 2013 From: Lilla.Magyari at mpi.nl (Lilla.Magyari at mpi.nl) Date: Sat, 1 Jun 2013 23:22:34 +0200 (CEST) Subject: [FieldTrip] Question about minimum norm estimate pipeline In-Reply-To: References: Message-ID: <2765.87.78.47.204.1370121754.squirrel@87.78.47.204> hi Steve, yes, it is possible that the tutorial is slightly out of the date. I can look at your problem and the tutorial around the end of the next week. Thanks a lot for the detailed email! Lilla > Hi Arjen, > > Thanks for your message. I did align the mri to Talairach; as you can see > from http://i.imgur.com/26nyHYZ.png, the volume conduction model and > sourcespace are both expressed in the same coordinate system (i.e., > everything's pointing in the same direction) but they're just not sitting > on top of one another. If anyone has any ideas on where that problem was > introduced (or how to re-align them now), I would greatly appreciate it. > Below I have some more details about how I processed that data, if it > helps. > > I'm trying to go through the data one step at a time and track where the > problem might have happened. When I compare the sourcespace before having > applied any transformation (i.e., the headshape from > -oct-6-src.fif) to the original mri (orig-nomask.mgz), they look > ok (I don't know how to plot them together, but see > http://i.imgur.com/LGW7YnJ.png and http://i.imgur.com/JUoTxc9.png -- > things > at least look like they're on more or less the same plane). Then I > re-register the mri to CTF ( > http://fieldtrip.fcdonders.nl/tutorial/minimumnormestimate#source_modelco-registration_of_the_source_space_to_the_sensor-based_head_coordinate_system); > after that, in mri_nom_ctf, the axes are all going in the right direction > but the whole head is tilted forward and the origin of the axes is no > longer at the anterior commisure (see http://i.imgur.com/CTZNOTk.png for > the realigned MRI). Applying the transformation matrix T to the > sourcespace also seems to tilt it like that > (http://i.imgur.com/bcNIpf3.png), > although as can be seen from the first image in this message it doesn't > quite line up with the volume conduction model in the end. As for the > volume conduction model, here is what it looks like at first ( > http://i.imgur.com/ZX3m38b.png) and here is what it looks like after > applying the transformation matrix (http://i.imgur.com/vXa3Cnc.png). > Obviously the transformation matrix is doing something, but it's not > getting the sourcespace and volume conduction model lined up; since it's > the same transformation matrix, all I can guess is that there was some > pre-existing difference between the source mesh (the .fif file) and the > anatomical mri (orig-nomask.mgz), but I'm not sure when that came in. > > Another minor issue: when I first compared the volume conduction model and > the sourcespace, they were expressed in different units even though I > followed the code in the tutorial. See http://i.imgur.com/orwgcTJ.png: the > sourcespace looks 10x smaller than the volume conduction model, which I > assume is because it is expressed in cm whereas the volume conduction > model > is expressed in mm. To get the figure linked at the very beginning of this > message, I had to convert the units of the volume conduction model to cm, > even though that's not in the tutorial. > > I notice that the tutorial on the wiki hasn't been edited since October > 2012 (other than a few edits I made this month which were just correcting > typos in the prose). Is it possible that what's on the wiki is out of > date? > (Also cc'ing Lilla on this.) > > Thanks, > Steve > > > >> Message: 1 >> Date: Fri, 31 May 2013 08:11:23 +0200 (CEST) >> From: "Stolk, A." >> To: FieldTrip discussion list >> Subject: Re: [FieldTrip] Question about minimum norm estimate pipeline >> Message-ID: >> < > 1914237354.1292588.1369980683984.JavaMail.root at sculptor.zimbra.ru.nl> >> Content-Type: text/plain; charset="utf-8" >> >> Hi Steve, A quick guess; did you correctly align your resliced mri to > Talairach space by indicating the commissures ( > http://imaging.mrc-cbu.cam.ac.uk/imaging/FindingCommissures ) and, if I'm > correct, a point in the same place, e.g. between the hemispheres? This > should update the transformation matrix. Best regards, Arjen ----- > Oorspronkelijk bericht ----- >> > Van: "Stephen Politzer-Ahles" >> > Aan: fieldtrip at science.ru.nl >> > Verzonden: Vrijdag 31 mei 2013 05:53:45 >> > Onderwerp: [FieldTrip] Question about minimum norm estimate pipeline >> > Hello all, >> > I have not yet gotten a response to my question below, but in the >> > meantime I have another question about the minimum norm estimate >> > workflow--specifically, about the coordinate system for the >> > skull-stripped anatomy in the step described at >> > > http://fieldtrip.fcdonders.nl/tutorial/minimumnormestimate#preprocessing_of_the_anatomical_mrisave_to_disk >> > . I'm confused by the following bit of code: >> > % ensure that the skull-stripped anatomy is expressed in the same >> > coordinate system as the anatomy >> > seg.transform = mri_tal.transform; >> > In my data, mri_tal.coordsys is 'spm' (I presume this is the result of >> > re-aligning to Talairach in the previous step?) whereas seg.coordsys >> > is 'ctf' (as a result of re-aligning to CTF several steps earlier). >> > (But mri_tal also has a field mri_tal.transformorig, which seg does >> > not have.) So should I really be using the same transform for both, as >> > shown in the tutorial? >> > Apologies if this question is pretty basic; I'm just trying to >> > pinpoint where the mis-alignment described in my message below >> > occurred, so I want to make sure I understand each step of the >> > workflow correctly >> > Best, >> > Steve >> > > Message: 1 >> > > Date: Sat, 25 May 2013 08:11:18 -0500 >> > > From: Stephen Politzer-Ahles < politzerahless at gmail.com > >> > > To: fieldtrip at donders.ru.nl >> > > Subject: [FieldTrip] Sourcespace and volume conductor misaligned >> > > Message-ID: >> > > > > > > >> > > Content-Type: text/plain; charset="utf-8" >> > > >> > > Hello all, >> > > >> > > I am going through the workflow at >> > > http://fieldtrip.fcdonders.nl/tutorial/minimumnormestimate . After >> > > making >> > > the volume conduction model using ft_prepare_headmodel(), I noticed >> > > that >> > > although the volume conduction model and sourcespace have the same >> > > orientation and overall size/shape (after I converted the volume >> > > conduction >> > > model to cm, which wasn't in the tutorial but my original model came >> > > out in >> > > mm), they don't quite line up, as you can see in this figure: >> > > >> > > http://i.imgur.com/mGEtLOa.png >> > > >> > > I did interactively re-align the data to CTF (twice--in step 2 of >> > > "Preprocessing of the anatomical MRI" and in step 4 of "Source >> > > model") >> > > using fiducials, and to Talairach (step 5 of "Preprocessing of the >> > > anatomical data"), so I'm not sure how it ended up this way. The >> > > code I've >> > > used at each step is basically the same as that in the tutorial. >> > > >> > > Is there any way to line up my volume conduction model and >> > > sourcespace now, >> > > without going back and re-running most of the workflow? >> > > >> > > Best, >> > > Steve >> > > >> > > -- >> > > Stephen Politzer-Ahles >> > > University of Kansas >> > > Linguistics Department >> > > http://people.ku.edu/~sjpa/ >> > On Sat, May 25, 2013 at 1:56 PM, < fieldtrip-request at science.ru.nl > >> > wrote: >> > > >> > > Send fieldtrip mailing list submissions to >> > > fieldtrip at science.ru.nl >> > > >> > > To subscribe or unsubscribe via the World Wide Web, visit >> > > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip >> > > or, via email, send a message with subject or body 'help' to >> > > fieldtrip-request at science.ru.nl >> > > >> > > You can reach the person managing the list at >> > > fieldtrip-owner at science.ru.nl >> > > >> > > When replying, please edit your Subject line so it is more specific >> > > than "Re: Contents of fieldtrip digest..." >> > > >> > > >> > > Today's Topics: >> > > >> > > 1. Sourcespace and volume conductor misaligned >> > > (Stephen Politzer-Ahles) >> > > 2. Re: fieldtrip Digest, Vol 30, Issue 31 (Johanna Zumer) >> > > >> > > >> > > ---------------------------------------------------------------------- >> > > >> > > Message: 1 >> > > Date: Sat, 25 May 2013 08:11:18 -0500 >> > > From: Stephen Politzer-Ahles < politzerahless at gmail.com > >> > > To: fieldtrip at donders.ru.nl >> > > Subject: [FieldTrip] Sourcespace and volume conductor misaligned >> > > Message-ID: >> > > > > > > >> > > Content-Type: text/plain; charset="utf-8" >> > > >> > > Hello all, >> > > >> > > I am going through the workflow at >> > > http://fieldtrip.fcdonders.nl/tutorial/minimumnormestimate . After >> > > making >> > > the volume conduction model using ft_prepare_headmodel(), I noticed >> > > that >> > > although the volume conduction model and sourcespace have the same >> > > orientation and overall size/shape (after I converted the volume >> > > conduction >> > > model to cm, which wasn't in the tutorial but my original model came >> > > out in >> > > mm), they don't quite line up, as you can see in this figure: >> > > >> > > http://i.imgur.com/mGEtLOa.png >> > > >> > > I did interactively re-align the data to CTF (twice--in step 2 of >> > > "Preprocessing of the anatomical MRI" and in step 4 of "Source >> > > model") >> > > using fiducials, and to Talairach (step 5 of "Preprocessing of the >> > > anatomical data"), so I'm not sure how it ended up this way. The >> > > code I've >> > > used at each step is basically the same as that in the tutorial. >> > > >> > > Is there any way to line up my volume conduction model and >> > > sourcespace now, >> > > without going back and re-running most of the workflow? >> > > >> > > Best, >> > > Steve >> > > >> > > -- >> > > Stephen Politzer-Ahles >> > > University of Kansas >> > > Linguistics Department >> > > http://people.ku.edu/~sjpa/ > From frank.ye.mei at gmail.com Sun Jun 2 03:58:29 2013 From: frank.ye.mei at gmail.com (Frank Mei) Date: Sat, 1 Jun 2013 21:58:29 -0400 Subject: [FieldTrip] error when using ctf2grad (Lozano Soldevilla, D. (Diego)) Message-ID: Hello Diego, Thank you for the reply. I was using fieldtrip20120822. I found the bug in the fieldtrip20120822 file -ft_read_header.m. In line 446 of the file: ------- if any(~cellfun(@isempty,strfind(coeftype, 'G1AR'))) ------- should be: ------- if any(~cellfun(@isempty,strfind(coeftype, 'G3AR'))) ------- The bug is corrected in the latest version of fieldtrip, and it runs correctly now. Now, grad.balance has 'G1BR','G2BR','G3BR''G3AR' in it. The ctf sytem I use is ctf151. Regards, Ye -------------- next part -------------- An HTML attachment was scrubbed... URL: From vitoria.piai at gmail.com Sun Jun 2 11:17:25 2013 From: vitoria.piai at gmail.com (=?ISO-8859-1?Q?Vit=F3ria_Magalh=E3es_Piai?=) Date: Sun, 02 Jun 2013 11:17:25 +0200 Subject: [FieldTrip] how to use ft_stratify? Message-ID: <51AB0DA5.10805@gmail.com> Hi all, I'm trying to use ft_stratify for the first time, but (it could be just me) I don't find the help info helpful enough :) What I want to achieve in the end is TFRs of two conditions for which the histogram of the reaction time over trials for each condition is matched. If I understood ft_stratify correctly (and I doubt that), I could use this function to select the trials for each condition such that the histograms of the RTs match. Then knowing which trials to keep, I run ft_freqanalysis on those specifically. So question number 1, is that how I should proceed? 'Cause as far as I can tell, ft_stratify will not take a whole raw data structure: The help says "each input is a Nchan X Nobs matrix". So I have to go for the RTs then. Assuming my approach is correct (ft_stratify on RTs of two conditions, then move on with only those trials), I've made a matrix Nchan x N_trials for each condition. % input1 = 265 sensors x 95 RT_trials; % input2 = 265 sensors x 100 RT_trials; cfgst = []; cfgst.method = 'histogram'; cfgst.equalbinavg = 'no'; cfgst.numbin = 4; cfgst.numiter = 2000; % default [output,bin] = ft_stratify(cfgst, input1, input2); I then get an error in line 127: linearhisto = zeros(ncond, cfg.numbin.^nchan); ??? Error using ==> zeros Maximum variable size allowed by the program is exceeded. Apparently, zeros(2, 4^265) is something matlab doesn't want to calculate! Am I doing something wrong here? Has anyone worked with this function before (with such a number of sensors)? Any help is greatly appreciated! Cheers, Vitória From a.stolk at fcdonders.ru.nl Sun Jun 2 11:46:03 2013 From: a.stolk at fcdonders.ru.nl (Stolk, A.) Date: Sun, 2 Jun 2013 11:46:03 +0200 (CEST) Subject: [FieldTrip] how to use ft_stratify? In-Reply-To: <51AB0DA5.10805@gmail.com> Message-ID: <1910615072.1312606.1370166363974.JavaMail.root@sculptor.zimbra.ru.nl> Hi Vitoria, There is a wikipage that may help you get started, and answer your questions: http://fieldtrip.fcdonders.nl/example/stratify Best wishes, Arjen ----- Oorspronkelijk bericht ----- > Van: "Vitória Magalhães Piai" > Aan: fieldtrip at donders.ru.nl > Verzonden: Zondag 2 juni 2013 11:17:25 > Onderwerp: [FieldTrip] how to use ft_stratify? > Hi all, > > I'm trying to use ft_stratify for the first time, but (it could be > just > me) I don't find the help info helpful enough :) > What I want to achieve in the end is TFRs of two conditions for which > the histogram of the reaction time over trials for each condition is > matched. > > If I understood ft_stratify correctly (and I doubt that), I could use > this function to select the trials for each condition such that the > histograms of the RTs match. Then knowing which trials to keep, I run > ft_freqanalysis on those specifically. > So question number 1, is that how I should proceed? 'Cause as far as I > can tell, ft_stratify will not take a whole raw data structure: The > help > says "each input is a Nchan X Nobs matrix". So I have to go for the > RTs > then. > > Assuming my approach is correct (ft_stratify on RTs of two conditions, > then move on with only those trials), I've made a matrix Nchan x > N_trials for each condition. > % input1 = 265 sensors x 95 RT_trials; > % input2 = 265 sensors x 100 RT_trials; > > cfgst = []; > cfgst.method = 'histogram'; > cfgst.equalbinavg = 'no'; > cfgst.numbin = 4; > cfgst.numiter = 2000; % default > [output,bin] = ft_stratify(cfgst, input1, input2); > > I then get an error in line 127: > linearhisto = zeros(ncond, cfg.numbin.^nchan); > ??? Error using ==> zeros > Maximum variable size allowed by the program is exceeded. > > Apparently, zeros(2, 4^265) is something matlab doesn't want to > calculate! > Am I doing something wrong here? Has anyone worked with this function > before (with such a number of sensors)? > > Any help is greatly appreciated! > Cheers, Vitória > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip From vitoria.piai at gmail.com Sun Jun 2 17:09:34 2013 From: vitoria.piai at gmail.com (=?ISO-8859-1?Q?Vit=F3ria_Magalh=E3es_Piai?=) Date: Sun, 02 Jun 2013 17:09:34 +0200 Subject: [FieldTrip] how to use ft_stratify? In-Reply-To: References: Message-ID: <51AB602E.8020609@gmail.com> Thanx, Arjen! Shame on me, I should have known that there would be a wikipage on that :) And for the sake of archiving, in case someone else ever bumps into this thread because they're making the same mistake as me when using this function, here's what I was doing wrong: The input Nchan x N_trials for each condition, Nchan should be 1 'cause my data are the RTs So: % input1 = RT_trials_cond1' ; % size = 1 x 95 % input2 = RT_trials_cond2' ; % size = 1 x 100 cfgst = []; cfgst.method = 'histogram'; output = ft_stratify(cfgst, input1, input2); Now it will run and it won't even complain they are of different sizes either! Hope this will help anyone in the future making the same mistake! Cheers, Vitória On 6/2/2013 12:00 PM, fieldtrip-request at science.ru.nl wrote: > Message: 2 > Date: Sun, 02 Jun 2013 11:17:25 +0200 > From: Vit?ria Magalh?es Piai > To:fieldtrip at donders.ru.nl > Subject: [FieldTrip] how to use ft_stratify? > Message-ID:<51AB0DA5.10805 at gmail.com> > Content-Type: text/plain; charset=ISO-8859-1; format=flowed > > Hi all, > > I'm trying to use ft_stratify for the first time, but (it could be just > me) I don't find the help info helpful enough:) > What I want to achieve in the end is TFRs of two conditions for which > the histogram of the reaction time over trials for each condition is > matched. > > If I understood ft_stratify correctly (and I doubt that), I could use > this function to select the trials for each condition such that the > histograms of the RTs match. Then knowing which trials to keep, I run > ft_freqanalysis on those specifically. > So question number 1, is that how I should proceed? 'Cause as far as I > can tell, ft_stratify will not take a whole raw data structure: The help > says "each input is a Nchan X Nobs matrix". So I have to go for the RTs > then. > > Assuming my approach is correct (ft_stratify on RTs of two conditions, > then move on with only those trials), I've made a matrix Nchan x > N_trials for each condition. > % input1 = 265 sensors x 95 RT_trials; > % input2 = 265 sensors x 100 RT_trials; > > cfgst = []; > cfgst.method = 'histogram'; > cfgst.equalbinavg = 'no'; > cfgst.numbin = 4; > cfgst.numiter = 2000; % default > [output,bin] = ft_stratify(cfgst, input1, input2); > > I then get an error in line 127: > linearhisto = zeros(ncond, cfg.numbin.^nchan); > ??? Error using ==> zeros > Maximum variable size allowed by the program is exceeded. > > Apparently, zeros(2, 4^265) is something matlab doesn't want to calculate! > Am I doing something wrong here? Has anyone worked with this function > before (with such a number of sensors)? > > Any help is greatly appreciated! > Cheers, Vit?ria > > > ------------------------------ > > Message: 3 > Date: Sun, 2 Jun 2013 11:46:03 +0200 (CEST) > From: "Stolk, A." > To: FieldTrip discussion list > Subject: Re: [FieldTrip] how to use ft_stratify? > Message-ID: > <1910615072.1312606.1370166363974.JavaMail.root at sculptor.zimbra.ru.nl> > Content-Type: text/plain; charset=utf-8 > > Hi Vitoria, > > There is a wikipage that may help you get started, and answer your questions: > http://fieldtrip.fcdonders.nl/example/stratify > > Best wishes, > Arjen -------------- next part -------------- An HTML attachment was scrubbed... URL: From d.stoffers at gmail.com Mon Jun 3 10:12:17 2013 From: d.stoffers at gmail.com (Diederick Stoffers) Date: Mon, 3 Jun 2013 10:12:17 +0200 Subject: [FieldTrip] Postdoc positions available at the Netherlands Institute for Neuroscience in Amsterdam In-Reply-To: <21E5F1A0-241E-43B6-957B-18A7767A7B51@gmail.com> References: <21E5F1A0-241E-43B6-957B-18A7767A7B51@gmail.com> Message-ID: <8B956BE9-4168-4ED4-B0E9-47FE260EAEE4@gmail.com> Dear all, Please find attached a description of postdoc positions available at the Netherlands Institute for Neuroscience in Amsterdam, which I am posting on behalf of my group leader Eus van Someren (cc). Relevant keywords for these positions are sleep, emotion, arousal, high-density EEG, fMRI, TMS, insomnia, internet assessment, database, latent class and latent trait analysis. Cheers, Diederick -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: VacancyPostdoc.pdf Type: application/pdf Size: 454314 bytes Desc: not available URL: From d.stoffers at gmail.com Mon Jun 3 10:20:20 2013 From: d.stoffers at gmail.com (Diederick Stoffers) Date: Mon, 3 Jun 2013 10:20:20 +0200 Subject: [FieldTrip] Postdoc positions available at the Netherlands Institute for Neuroscience in Amsterdam In-Reply-To: <8B956BE9-4168-4ED4-B0E9-47FE260EAEE4@gmail.com> References: <21E5F1A0-241E-43B6-957B-18A7767A7B51@gmail.com> <8B956BE9-4168-4ED4-B0E9-47FE260EAEE4@gmail.com> Message-ID: <6DACABEC-925B-4E71-A7A2-FB8C7B2A60D1@gmail.com> Dear all, Please find attached a description of postdoc positions available at the Netherlands Institute for Neuroscience in Amsterdam, which I am posting on behalf of my group leader Eus van Someren (cc). Relevant keywords for these positions are sleep, emotion, arousal, high-density EEG, fMRI, TMS, insomnia, internet assessment, database, latent class and latent trait analysis. Cheers, Diederick NB Apologies if you receive this message twice, the initial message was rejected by some servers because it exceeded maximum message size. -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: VacancyPostdoc_reduced.pdf Type: application/pdf Size: 86280 bytes Desc: not available URL: From jm.horschig at donders.ru.nl Mon Jun 3 10:59:49 2013 From: jm.horschig at donders.ru.nl (=?ISO-8859-1?Q?=22J=F6rn_M=2E_Horschig=22?=) Date: Mon, 03 Jun 2013 10:59:49 +0200 Subject: [FieldTrip] channel combination problems In-Reply-To: <27E5CAD9145EEC41BB9B34C01716A1983046156B@UM-EXCDAG-A01.um.gwdg.de> References: <27E5CAD9145EEC41BB9B34C01716A1983046156B@UM-EXCDAG-A01.um.gwdg.de> Message-ID: <51AC5B05.2020409@donders.ru.nl> Hi Thomas, that is indeed a bug that we are currently working on, see also here: http://bugzilla.fcdonders.nl/show_bug.cgi?id=2148 A workaround for the moment is to call this: coh.dimord = 'chancmb_freq'; coh = ft_checkdata(coh, 'cmbrepresentation', 'full'); As you asked what the difference between the two is: Connectivity measures are define between two signals, or channels. So, for example you compute coherence between channel1 and channel2. In FieldTrip there are two ways to represent this: Either by a 3D NxMxF matrix or by a 2D (NxM)xF matrix, where F denotes the frequency dimension and N and M are the in- or output channels (coherence is a symmetric measure, so N=M). In other words, we can either represent it as a three dimensional matrix, where the first dimension denotes the input and the second the output channels, or we represent it as a two dimensional matrix, where the first dimension denotes the relation between in- and output channels. The latter is what we call a channelcombination (chancmb). It can be channel1->channel2 (meaning, influence from channel1 to channel 2). The same in a three dimensional matrix would be channel1 for dimension 1 and channel 2 for dimension 2. The workaround above converts from one to the other convention. If your data is in 'cmbrepresentation;, you will have 'labelcmb' which is a 2D cell-matrix, and your data dimensions (dimord) will be 'chancmb_XXX', where a single dimension respective to labelcmb defines the channel combination. If your data is not in 'cmbrepresentation', you will have a 1D 'label' field and your data dimension (dimord) will be 'chan_chan_XXX', this a 2D channel combinations that explains the channel combination. Btw, I am not aware that you can define cfg.labelcmb in any function, imho it is always cfg.channelcmb. Best, Jörn On 5/31/2013 11:42 AM, Wunderle, Thomas wrote: > > Hi all, > > I'm new in fieldtrip and I try to get the cfg.channelcmb to work, > because I want to plot the connectivity between the channels of > different laminar electrodes, > > let's say the connectivity between channel 1:24 and 25:38 > > I tried the following: > > cfg = []; > > cfg.method = 'mtmfft'; > > cfg.taper = 'dpss'; > > cfg.output = 'fourier'; > > cfg.tapsmofrq = 1; > > freq = ft_freqanalysis(cfg, data) > > The output is: > > >> freq > > freq = > > label: {3x1 cell} > > dimord: 'rpttap_chan_freq' > > freq: [1x101 double] > > fourierspctrm: [500x3x101 double] > > cumsumcnt: [500x1 double] > > cumtapcnt: [500x1 double] > > cfg: [1x1 struct] > > I then run > > cfg = []; > > cfg.method = 'coh'; > > cfg.channelcmb = {freq.label{1} freq.label{2};freq.label{2} > freq.label{1}}; > > coh= ft_connectivityanalysis(cfg, freq); > > And the output here is: > > >> coh > > coh = > > labelcmb: {2x2 cell} > > dimord: 'chan_freq' > > cohspctrm: [2x101 double] > > freq: [1x101 double] > > dof: 500 > > cfg: [1x1 struct] > > As you can seen, the output of dimord is 'chan_freq' so in the > subsequent call of ft_connectivityplot I get an error message: > > cfg = []; > > cfg.parameter = 'cohspctrm'; > > ft_connectivityplot(cfg, coh); > > ??? Error using ==> ft_connectivityplot at 99 > > the data should have a dimord of chan_chan_freq or chancmb_freq > > If I use in ft_freqanalysis the cfg.method = 'powandcsd', > cfg.channelcmb seems to have no effect at all, > > the coherence is computed for all possible pairs. > > I also don't understand the difference between "cfg.channelcmb" and > "cfg.labelcmb" > > Can you help me in how I should correctly use the cannelcmb and > labelcmb options? > > Thanks for your help, > > Thomas > > ----- > > Dr. Thomas Wunderle > > Ernst Strüngmann Institute (ESI) for Neuroscience > > > in Cooperation with Max Planck Society > > > Deutschordenstrasse 46 > > 60528 Frankfurt am Main, Germany > > www.esi-frankfurt.de > > thomas.wunderle at esi-frankfurt.de > > Tel: +49 69 96769 519 > > Fax: +49 69 96769 555 > > Sitz der Gesellschaft: Frankfurt am Main > > Registergericht: Amtsgericht Frankfurt - HRB 84266 > > Geschäftsführer: Prof. Dr. Pascal Fries > > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -- Jörn M. Horschig PhD Student Donders Institute for Brain, Cognition and Behaviour Centre for Cognitive Neuroimaging Radboud University Nijmegen Neuronal Oscillations Group FieldTrip Development Team P.O. Box 9101 NL-6500 HB Nijmegen The Netherlands Contact: E-Mail: jm.horschig at donders.ru.nl Tel: +31-(0)24-36-68493 Web: http://www.ru.nl/donders Visiting address: Trigon, room 2.30 Kapittelweg 29 NL-6525 EN Nijmegen The Netherlands -------------- next part -------------- An HTML attachment was scrubbed... URL: From jm.horschig at donders.ru.nl Mon Jun 3 11:30:34 2013 From: jm.horschig at donders.ru.nl (=?ISO-8859-1?Q?=22J=F6rn_M=2E_Horschig=22?=) Date: Mon, 03 Jun 2013 11:30:34 +0200 Subject: [FieldTrip] some of the requested samples occur twice In-Reply-To: References: Message-ID: <51AC623A.1080207@donders.ru.nl> Hi Robin, it's not a bug that ft_fetch_data is not allowing for overlap. The function needs to be generic and eventually allow for fetching data extending over several trial segments. However, what should be the way to fetch data that occurs twice, i.e. at the end of one trial and the beginning of another? If you have data with overlapping samples, it is not straight forward to define data from one trial as to be fetched and ignore the other. Since preprocessing options like filters are applied per trial segment, data will differ between trial segments if it overlaps. As there are a multitude of possibilities to deal with this and none of them is perfect (imho neither of them can even be called good), we decided to not allow for that. For your problem, however, imho you can define negative trial padding in the function call to ft_artifact_zvalue, which should effectively pad. Have you tried this rather than padding manually? Best, Jörn On 5/31/2013 6:14 PM, Robin wrote: > I have a problem in preprocessing where I am getting this error: > > """ > some of the requested samples occur twice in the data > > Error in ft_artifact_zvalue (line 262) > dat{trlop} = ft_fetch_data(data, 'header', hdr, 'begsample', > trl(trlop,1)-fltpadding, 'endsample', trl(trlop,2)+fltpadding, > 'chanindx', sgnind, 'checkboundary', strcmp(cfg.continuous,'no > Error in ft_artifact_muscle (line 158) > [tmpcfg, artifact] = ft_artifact_zvalue(tmpcfg, data); > """ > > I think this is because I am manually adding some extra padding to the > trials so that the artifact filtering can use that padding (I am doing > the artifact filtering on data in memory which is output from > ft_denoise_pca). So in this case it is not a problem if consecutive > trials overlap a bit. > > I would therefore like to disable this error and wondered what is the > best way to do it. I am a bit confused because ft_artifact_zvalue > calls ft_fetch data with a "checkboundary" option which looks like it > might be what I want (and set correctly), but ft_fetch_data doesn't > seem to use that option. Instead it has an allowoverlap option. > > So for now I will manually add the allowoverlap option to the call in > ft_artifact_zvalue, but I wondered what checkboundary doesn't appear > in ft_fetch_data or if this might be a bug. > > Cheers > > Robin > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -- Jörn M. Horschig PhD Student Donders Institute for Brain, Cognition and Behaviour Centre for Cognitive Neuroimaging Radboud University Nijmegen Neuronal Oscillations Group FieldTrip Development Team P.O. Box 9101 NL-6500 HB Nijmegen The Netherlands Contact: E-Mail: jm.horschig at donders.ru.nl Tel: +31-(0)24-36-68493 Web: http://www.ru.nl/donders Visiting address: Trigon, room 2.30 Kapittelweg 29 NL-6525 EN Nijmegen The Netherlands From julian.keil at gmail.com Mon Jun 3 17:14:08 2013 From: julian.keil at gmail.com (Julian Keil) Date: Mon, 3 Jun 2013 17:14:08 +0200 Subject: [FieldTrip] Polhemus Patriot Message-ID: <67D8C434-4D28-40C3-94A6-A95C86BD6B78@gmail.com> Dear FieldTrip-Users, I have a not really FieldTrip-related question, but maybe one of you can help me anyways. In our lab, we have a Polhemus Patriot 3D tracking system to acquire electrode positions. Unfortunately, the recordings are severely distorted in the Z-axis (up-down). After contacting the Polhemus Support, I got the information, that this is due to metal in the surroundings of the source which distorts the magnetic field. I tried to get as far away from any metal as possible in our lab (~1.5 m to the walls and floor) but to no avail. Now to my question: Has anyone any experience dealing with this? I'm quite puzzled by this as I know plenty of labs use Polhemus trackers, and I'm not sure if our lab is especially metal prone or if I'm missing something. Thanks a lot for any help. Julian ******************** Dr. Julian Keil AG Multisensorische Integration Psychiatrische Universitätsklinik der Charité im St. Hedwig-Krankenhaus Große Hamburger Straße 5-11, Raum E 307 10115 Berlin Telefon: +49-30-2311-1879 Fax: +49-30-2311-2209 http://psy-ccm.charite.de/forschung/bildgebung/ag_multisensorische_integration -------------- next part -------------- An HTML attachment was scrubbed... URL: From inieuwenhuis at berkeley.edu Mon Jun 3 17:52:14 2013 From: inieuwenhuis at berkeley.edu (Ingrid Nieuwenhuis) Date: Mon, 03 Jun 2013 08:52:14 -0700 Subject: [FieldTrip] loreta2fieldtrip function error In-Reply-To: <1370015815.5183.YahooMailNeo@web122402.mail.ne1.yahoo.com> References: <1369934092.15336.YahooMailNeo@web122405.mail.ne1.yahoo.com> <51A78CC1.6030906@berkeley.edu> <1370015815.5183.YahooMailNeo@web122402.mail.ne1.yahoo.com> Message-ID: <51ACBBAE.4070508@berkeley.edu> Hi Fatameh, - In the LORETA program, you go to main utilities > Format converter. - There you select: input binary file (sLORETA) - It does not matter which format for output you choose, I coded it robust, it'll figure it out. As it says, rows are time points, columns are the volume-gridpoints (called voxels) - After using loreta2fieldtrip the data is in normal FieldTrip volume format, see here: http://fieldtrip.fcdonders.nl/reference/ft_datatype_volume To get familiar with FieldTrip source plotting etc, see the tutorials, for instance: http://fieldtrip.fcdonders.nl/tutorial/plotting - The following steps are: 1) create a template: template = ft_read_mri([cur_path_FT, '\external\spm8\templates\T1.nii']); 2) interpolate your volume on the MNI template: [interp_mean] = ft_sourceinterpolate(cfg, GA_mean, template); 3) plot it using ft_sourceplot Hope it helps, Ingrid On 5/31/2013 8:56 AM, Fatemeh Ebrahimi nia wrote: > Dear respondent, > > Thank you for your advices. > I have used the function that you have updated. It works out. Can you > give me information about the output structure (What do the matrixes > refer to?) or advise a reference to study about that please? > > Best, > Fatemeh > > > ------------------------------------------------------------------------ > *From:* Ingrid Nieuwenhuis > *To:* fieldtrip at science.ru.nl > *Sent:* Thursday, May 30, 2013 10:30 AM > *Subject:* Re: [FieldTrip] loreta2fieldtrip function error > > Hi Fatemeh, > > I had the same error recently when I did the same. I filed the bug, > see http://bugzilla.fcdonders.nl/show_bug.cgi?id=2144 > > I did create a work around. In the LORETA program, you can export the > source data as a text file. You can read that text file in with > loreta2fieldtrip.m. It's a bit of a patch, but it worked for me. > > Hope this helps, > Ingrid > > On 5/30/2013 10:14 AM, Fatemeh Ebrahimi nia wrote: >> Hi dear all, >> >> I am analyzing EEG data. I have computed sLORETA (.slor) from ERP >> data. Now I want to read and convert LORETA source reconstruction into a >> MATLAB data structure using "loreta2fieldtrip" function, But I have >> gotten the bellow error. >> >> **** Error using fread >> Invalid precision. >> Error in loreta2fieldtrip (line 85) >> activity = fread(fid, [voxnumber Ntime], 'float = >single'); *** >> >> Can someone give me a help? >> >> Best regards, >> Fatemeh >> >> >> >> _______________________________________________ >> fieldtrip mailing list >> fieldtrip at donders.ru.nl >> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > -- > Ingrid Nieuwenhuis PhD > Postdoctoral Fellow > Sleep and Neuroimaging Laboratory > Department of Psychology > University of California, Berkeley > California 94720-1650 > Tolman Hall, room 5305 > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -- Ingrid Nieuwenhuis PhD Postdoctoral Fellow Sleep and Neuroimaging Laboratory Department of Psychology University of California, Berkeley California 94720-1650 Tolman Hall, room 5305 -------------- next part -------------- An HTML attachment was scrubbed... URL: From smoratti at psi.ucm.es Mon Jun 3 18:07:40 2013 From: smoratti at psi.ucm.es (smoratti at psi.ucm.es) Date: Mon, 3 Jun 2013 18:07:40 +0200 Subject: [FieldTrip] Polhemus Patriot In-Reply-To: <67D8C434-4D28-40C3-94A6-A95C86BD6B78@gmail.com> References: <67D8C434-4D28-40C3-94A6-A95C86BD6B78@gmail.com> Message-ID: Dear Julian, Maybe a stupid answer and probably you have taken care of this already, but does the chair have any metal? We use an IKEA wooden garden chair. Best, Stephan ________________________________________________________ Stephan Moratti, PhD see also: http://web.me.com/smoratti/ Universidad Complutense de Madrid Facultad de Psicología Departamento de Psicología Básica I Campus de Somosaguas 28223 Pozuelo de Alarcón (Madrid) Spain and Center for Biomedical Technology Laboratory for Cognitive and Computational Neuroscience Parque Científico y Tecnológico de la Universidad Politecnica de Madrid Campus Montegancedo 28223 Pozuelo de Alarcón (Madrid) Spain email: smoratti at psi.ucm.es Tel.: +34 679219982 El 03/06/2013, a las 17:14, Julian Keil escribió: > Dear FieldTrip-Users, > > I have a not really FieldTrip-related question, but maybe one of you can help me anyways. > In our lab, we have a Polhemus Patriot 3D tracking system to acquire electrode positions. > Unfortunately, the recordings are severely distorted in the Z-axis (up-down). > After contacting the Polhemus Support, I got the information, that this is due to metal in the surroundings of the source which distorts the magnetic field. > I tried to get as far away from any metal as possible in our lab (~1.5 m to the walls and floor) but to no avail. > > Now to my question: Has anyone any experience dealing with this? I'm quite puzzled by this as I know plenty of labs use Polhemus trackers, and I'm not sure if our lab is especially metal prone or if I'm missing something. > > Thanks a lot for any help. > > Julian > > ******************** > Dr. Julian Keil > > AG Multisensorische Integration > Psychiatrische Universitätsklinik > der Charité im St. Hedwig-Krankenhaus > Große Hamburger Straße 5-11, Raum E 307 > 10115 Berlin > > Telefon: +49-30-2311-1879 > Fax: +49-30-2311-2209 > http://psy-ccm.charite.de/forschung/bildgebung/ag_multisensorische_integration > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -------------- next part -------------- An HTML attachment was scrubbed... URL: From sarang.dalal at uni-konstanz.de Mon Jun 3 18:16:02 2013 From: sarang.dalal at uni-konstanz.de (Sarang S. Dalal) Date: Mon, 3 Jun 2013 09:16:02 -0700 Subject: [FieldTrip] Polhemus Patriot In-Reply-To: References: Message-ID: <27A129F9-9570-4D6B-BBF9-48080801F980@uni-konstanz.de> Dear Julian, At UCSF, we were unable to use a Polhemus (an older model, not sure which) in the shielded room of the MEG, so we performed the digitization just outside the room before moving the subject inside. Perhaps if you have a nicely shielded EEG booth you have the same problem... Sarang On Jun 3, 2013, at 9:08 AM, fieldtrip-request at science.ru.nl wrote: > Date: Mon, 3 Jun 2013 17:14:08 +0200 > From: Julian Keil > To: FieldTrip discussion list > Subject: [FieldTrip] Polhemus Patriot > Message-ID: <67D8C434-4D28-40C3-94A6-A95C86BD6B78 at gmail.com> > Content-Type: text/plain; charset="iso-8859-1" > > Dear FieldTrip-Users, > > I have a not really FieldTrip-related question, but maybe one of you can help me anyways. > In our lab, we have a Polhemus Patriot 3D tracking system to acquire electrode positions. > Unfortunately, the recordings are severely distorted in the Z-axis (up-down). > After contacting the Polhemus Support, I got the information, that this is due to metal in the surroundings of the source which distorts the magnetic field. > I tried to get as far away from any metal as possible in our lab (~1.5 m to the walls and floor) but to no avail. > > Now to my question: Has anyone any experience dealing with this? I'm quite puzzled by this as I know plenty of labs use Polhemus trackers, and I'm not sure if our lab is especially metal prone or if I'm missing something. > > Thanks a lot for any help. > > Julian > > ******************** > Dr. Julian Keil > > AG Multisensorische Integration > Psychiatrische Universit?tsklinik > der Charit? im St. Hedwig-Krankenhaus > Gro?e Hamburger Stra?e 5-11, Raum E 307 > 10115 Berlin > > Telefon: +49-30-2311-1879 > Fax: +49-30-2311-2209 > http://psy-ccm.charite.de/forschung/bildgebung/ag_multisensorische_integration From inieuwenhuis at berkeley.edu Mon Jun 3 18:25:47 2013 From: inieuwenhuis at berkeley.edu (Ingrid Nieuwenhuis) Date: Mon, 03 Jun 2013 09:25:47 -0700 Subject: [FieldTrip] format conversion In-Reply-To: <1369986505.7865.YahooMailNeo@web192306.mail.sg3.yahoo.com> References: <1369986505.7865.YahooMailNeo@web192306.mail.sg3.yahoo.com> Message-ID: <51ACC38B.9080802@berkeley.edu> Hi Bahar, I've added more info on the FieldTrip wiki about this for you and other. See here: http://fieldtrip.fcdonders.nl/integrating_with_loreta Hope it helps, Ingrid On 5/31/2013 12:48 AM, Bahar Bahar wrote: > Hi dear all, > > I have a technical question about format converter module via sLORETA > software (.slor file to .txt one). Can any one give me some > information about the conversion procedure (and the meaning of the > column and row of the output file)? > > Thanks, > bahar > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -- Ingrid Nieuwenhuis PhD Postdoctoral Fellow Sleep and Neuroimaging Laboratory Department of Psychology University of California, Berkeley California 94720-1650 Tolman Hall, room 5305 -------------- next part -------------- An HTML attachment was scrubbed... URL: From andmib at gmail.com Mon Jun 3 22:15:49 2013 From: andmib at gmail.com (Andrew Brooks) Date: Mon, 3 Jun 2013 16:15:49 -0400 Subject: [FieldTrip] Private function problems Message-ID: Hello all, I followed the instructions on properly adding FieldTrip to the Matlab path file. However, I continue to run into errors involving private functions. In this case, I get the error 'undefined function 'hom2six' for input arguments of type 'double''. Does anybody have a suggestion as to why this is occurring? Thanks! Andrew -------------- next part -------------- An HTML attachment was scrubbed... URL: From d.lozanosoldevilla at fcdonders.ru.nl Mon Jun 3 22:53:41 2013 From: d.lozanosoldevilla at fcdonders.ru.nl (Lozano Soldevilla, D. (Diego)) Date: Mon, 3 Jun 2013 22:53:41 +0200 (CEST) Subject: [FieldTrip] Private function problems In-Reply-To: Message-ID: <481032685.1338448.1370292821035.JavaMail.root@sculptor.zimbra.ru.nl> Hi Andrew, Did you type the following? >> restoredefaultpath >> addpath /fieldtripxxxx >> ft_defaults What's the ft_* function you invoke to get the error 'undefined function 'hom2six'? And what's the fieldtrip version you're using? best, Diego ----- Original Message ----- > From: "Andrew Brooks" > To: "FieldTrip discussion list" > Sent: Monday, 3 June, 2013 10:15:49 PM > Subject: [FieldTrip] Private function problems > Hello all, > I followed the instructions on properly adding FieldTrip to the Matlab > path file. However, I continue to run into errors involving private > functions. In this case, I get the error 'undefined function 'hom2six' > for input arguments of type 'double''. > Does anybody have a suggestion as to why this is occurring? > Thanks! > Andrew > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -- PhD Student Neuronal Oscillations Group Donders Institute for Brain, Cognition and Behaviour Centre for Cognitive Neuroimaging Trigon, room 0.83 Kapittelweg 29 Radboud University Nijmegen NL-6525 EN Nijmegen The Netherlands E-Mail: d.lozanosoldevilla at fcdonders.ru.nl Tel: +31-(0)24-36-66274 Web: http://www.neuosc.com/ -------------- next part -------------- An HTML attachment was scrubbed... URL: From 13681530640 at 139.com Tue Jun 4 04:16:18 2013 From: 13681530640 at 139.com (WangJing) Date: Tue, 4 Jun 2013 10:16:18 +0800 (CST) Subject: [FieldTrip] Question about Head Model References: Message-ID: <2af951ad49e020a-0000c.Richmail.00026806626265132618@139.com> HI everyone, When I build head model,I encount some questions. 1.for two Functions ft_volumereslice and ft_volumerealign,which should be run firstly? 2. when surfaces are created at the boarders of the different tissue-types by the ft_prepare_mesh function. how to determine the parameter cfg.numvertices? 3.when I build the head model,using the following codes: cfg = []; cfg.method ='dipoli'; cfg.cond =[0.3300 0.004125 0.3300]; vol = ft_prepare_headmodel(cfg, bnd); the error message is: ??? Error using ==> surface_nesting at 26 the compartment nesting cannot be determined Error in ==> ft_headmodel_dipoli at 84 order = surface_nesting(vol.bnd, 'outsidefirst'); Error in ==> ft_prepare_headmodel at 226 vol = ft_headmodel_dipoli(geometry,'conductivity',cfg.conductivity,'isolatedsource',cfg.isolatedsource); Error in ==> Myheadmodel at 5 vol = ft_prepare_headmodel(cfg, bnd); I don't know where is wrong.who can help me? Thank you! Best Regards, Jing Wang -------------- next part -------------- An HTML attachment was scrubbed... URL: From sauer.mpih at googlemail.com Tue Jun 4 11:42:13 2013 From: sauer.mpih at googlemail.com (Andreas Sauer) Date: Tue, 4 Jun 2013 11:42:13 +0200 Subject: [FieldTrip] NaNs as output of ft_sourceanalysis (DICS) Message-ID: Dear all, I would like to analyze sources with the beamforming approach using the DICS method. I followed the steps in the tutorial and everything works well. However, the output of ft_sourceanalysis contains only NaNs. I checked the TF data that I calculated in the step before but that looks fine, so I assume the error happens somewhere during ft_sourceanalysis. That's how I calculate the TFRs: cfg = []; cfg.toilim = [-0.5 -0.3]; % baseline activity eval(['dataPre = ft_redefinetrial(cfg,Cond_',num2str(cond(j)),');']); cfg.toilim = [0.1 1.0]; % task-related activity eval(['dataPost = ft_redefinetrial(cfg,Cond_',num2str(cond(j)),');']); % Combine the two datasets... data = appenddata(cfg, dataPre, dataPost); trialdesign = [ones(1,length(dataPost.trial)) ones(1,length(dataPre.trial))*2]; % ... and compute the CSD matrices... cfg = []; cfg.output = 'powandcsd'; cfg.channel = Channel.meg; cfg.method = 'mtmfft'; cfg.taper = 'dpss'; cfg.foilim = [75 75]; cfg.tapsmofrq = 15; % amount of spectral smoothing = +/- 15 Hz cfg.channelcmb = {Channel.meg Channel.meg}; % ... for the baseline and task part separately... eval(['freqPre.Cond_',num2str(cond(j)), ' = ft_freqanalysis(cfg,dataPre);']); eval(['freqPost.Cond_',num2str(cond(j)), ' = ft_freqanalysis(cfg,dataPost);']); % ... and for the whole trial eval(['freqAll.Cond_',num2str(cond(j)), ' = ft_freqanalysis(cfg,data);']); eval(['freqAll.Cond_',num2str(cond(j)), '.trialdesign = trialdesign;']); % pre and post info And that's how I calculate the sources: cfg = []; cfg.frequency = 75; cfg.method = 'dics'; cfg.grid = grid; % Here it gives .pos, .inside, .outside to the structure cfg.vol = vol; cfg.dim = template_grid.dim; % Here I give the dimension of the template grid cfg.grad = Cond_101.hdr.grad; cfg.lambda = '5%'; cfg.reducerank = 'no'; cfg.projectnoise = 'yes'; cfg.realfilter = 'yes'; cfg.keepfilter = 'yes'; % the output saves the computed inverse filter eval(['SourceAll = ft_sourceanalysis(cfg, freqAll.Cond_',num2str(cond(k)),');']) % use the common filter here cfg.grid.filter = SourceAll.avg.filter; eval(['sourcePre_con = ft_sourceanalysis(cfg, freqPre.Cond_',num2str(cond(k)),');']) eval(['sourcePost_con = ft_sourceanalysis(cfg, freqPost.Cond_',num2str(cond(k)),');']) I would really appreciate any help with that! Thanks a lot! Best, Andreas -- Andreas Sauer Max Planck Institute for Brain Research Deutschordenstr. 46 60528 Frankfurt am Main Germany T: +49 69 96769 278 F: +49 69 96769 327 Email: andreas.sauer at brain.mpg.de www.brain.mpg.de -------------- next part -------------- An HTML attachment was scrubbed... URL: From sauer.mpih at googlemail.com Tue Jun 4 11:52:24 2013 From: sauer.mpih at googlemail.com (Andreas Sauer) Date: Tue, 4 Jun 2013 11:52:24 +0200 Subject: [FieldTrip] NaNs as outpout of ft_sourceanalysis (DICS) Message-ID: Dear all, I would like to analyze sources with the beamforming approach using the DICS method. I followed the steps in the tutorial and everything works well. However, the output of ft_sourceanalysis contains only NaNs. I checked the TF data that I calculated in the step before but that looks fine, so I assume the error happens somewhere during ft_sourceanalysis. That's how I calculate the TFRs: cfg = []; cfg.toilim = [-0.5 -0.3]; % baseline activity eval(['dataPre = ft_redefinetrial(cfg,Cond_',num2str(cond(j)),');']); cfg.toilim = [0.1 1.0]; % task-related activity eval(['dataPost = ft_redefinetrial(cfg,Cond_',num2str(cond(j)),');']); % Combine the two datasets... data = appenddata(cfg, dataPre, dataPost); trialdesign = [ones(1,length(dataPost.trial)) ones(1,length(dataPre.trial))*2]; % ... and compute the CSD matrices... cfg = []; cfg.output = 'powandcsd'; cfg.channel = Channel.meg; cfg.method = 'mtmfft'; cfg.taper = 'dpss'; cfg.foilim = [75 75]; cfg.tapsmofrq = 15; % amount of spectral smoothing = +/- 15 Hz cfg.channelcmb = {Channel.meg Channel.meg}; % ... for the baseline and task part separately... eval(['freqPre.Cond_',num2str(cond(j)), ' = ft_freqanalysis(cfg,dataPre);']); eval(['freqPost.Cond_',num2str(cond(j)), ' = ft_freqanalysis(cfg,dataPost);']); % ... and for the whole trial eval(['freqAll.Cond_',num2str(cond(j)), ' = ft_freqanalysis(cfg,data);']); eval(['freqAll.Cond_',num2str(cond(j)), '.trialdesign = trialdesign;']); % pre and post info And that's how I calculate the sources: cfg = []; cfg.frequency = 75; cfg.method = 'dics'; cfg.grid = grid; % Here it gives .pos, .inside, .outside to the structure cfg.vol = vol; cfg.dim = template_grid.dim; % Here I give the dimension of the template grid cfg.grad = Cond_101.hdr.grad; cfg.lambda = '5%'; cfg.reducerank = 'no'; cfg.projectnoise = 'yes'; cfg.realfilter = 'yes'; cfg.keepfilter = 'yes'; % the output saves the computed inverse filter eval(['SourceAll = ft_sourceanalysis(cfg, freqAll.Cond_',num2str(cond(k)),');']) % use the common filter here cfg.grid.filter = SourceAll.avg.filter; eval(['sourcePre_con = ft_sourceanalysis(cfg, freqPre.Cond_',num2str(cond(k)),');']) eval(['sourcePost_con = ft_sourceanalysis(cfg, freqPost.Cond_',num2str(cond(k)),');']) I would really appreciate any help with that! Thanks a lot! Best, Andreas -- Andreas Sauer Max Planck Institute for Brain Research Deutschordenstr. 46 60528 Frankfurt am Main Germany T: +49 69 96769 278 F: +49 69 96769 327 Email: andreas.sauer at brain.mpg.de www.brain.mpg.de -------------- next part -------------- An HTML attachment was scrubbed... URL: From eelke.spaak at donders.ru.nl Tue Jun 4 11:54:51 2013 From: eelke.spaak at donders.ru.nl (Eelke Spaak) Date: Tue, 4 Jun 2013 11:54:51 +0200 Subject: [FieldTrip] NaNs as output of ft_sourceanalysis (DICS) In-Reply-To: References: Message-ID: Dear Andreas, How many NaNs do you get exactly and in which field? If it is some NaNs in source.avg.pow, then it is quite normal: the estimates for dipole locations which were flagged as outside the brain are always NaN, as they are not scanned. The following should hold: sum(isnan(source.avg.pow)) == numel(source.outside) && sum(~isnan(source.avg.pow)) == numel(source.inside) Best, Eelke On 4 June 2013 11:42, Andreas Sauer wrote: > Dear all, > > I would like to analyze sources with the beamforming approach using the DICS > method. I followed the steps in the tutorial and everything works well. > However, the output of ft_sourceanalysis contains only NaNs. > > I checked the TF data that I calculated in the step before but that looks > fine, so I assume the error happens somewhere during ft_sourceanalysis. > > That's how I calculate the TFRs: > > cfg = []; > cfg.toilim = [-0.5 -0.3]; % baseline activity > eval(['dataPre = > ft_redefinetrial(cfg,Cond_',num2str(cond(j)),');']); > cfg.toilim = [0.1 1.0]; % task-related activity > eval(['dataPost = > ft_redefinetrial(cfg,Cond_',num2str(cond(j)),');']); > > % Combine the two datasets... > data = appenddata(cfg, dataPre, dataPost); > trialdesign = [ones(1,length(dataPost.trial)) > ones(1,length(dataPre.trial))*2]; > > % ... and compute the CSD matrices... > cfg = []; > cfg.output = 'powandcsd'; > cfg.channel = Channel.meg; > cfg.method = 'mtmfft'; > cfg.taper = 'dpss'; > cfg.foilim = [75 75]; > cfg.tapsmofrq = 15; % amount of spectral smoothing = +/- 15 Hz > cfg.channelcmb = {Channel.meg Channel.meg}; > > % ... for the baseline and task part separately... > eval(['freqPre.Cond_',num2str(cond(j)), ' = > ft_freqanalysis(cfg,dataPre);']); > eval(['freqPost.Cond_',num2str(cond(j)), ' = > ft_freqanalysis(cfg,dataPost);']); > > % ... and for the whole trial > eval(['freqAll.Cond_',num2str(cond(j)), ' = > ft_freqanalysis(cfg,data);']); > eval(['freqAll.Cond_',num2str(cond(j)), '.trialdesign = > trialdesign;']); % pre and post info > > And that's how I calculate the sources: > > cfg = []; > cfg.frequency = 75; > cfg.method = 'dics'; > cfg.grid = grid; % Here it gives .pos, .inside, .outside to > the structure > cfg.vol = vol; > cfg.dim = template_grid.dim; % Here I give the dimension > of the template grid > cfg.grad = Cond_101.hdr.grad; > cfg.lambda = '5%'; > cfg.reducerank = 'no'; > cfg.projectnoise = 'yes'; > cfg.realfilter = 'yes'; > cfg.keepfilter = 'yes'; % the output saves the computed inverse > filter > > eval(['SourceAll = ft_sourceanalysis(cfg, > freqAll.Cond_',num2str(cond(k)),');']) > > % use the common filter here > cfg.grid.filter = SourceAll.avg.filter; > eval(['sourcePre_con = ft_sourceanalysis(cfg, > freqPre.Cond_',num2str(cond(k)),');']) > eval(['sourcePost_con = ft_sourceanalysis(cfg, > freqPost.Cond_',num2str(cond(k)),');']) > > > > I would really appreciate any help with that! Thanks a lot! > > Best, > > Andreas > > -- > Andreas Sauer > Max Planck Institute for Brain Research > Deutschordenstr. 46 > 60528 Frankfurt am Main > Germany > > T: +49 69 96769 278 > F: +49 69 96769 327 > Email: andreas.sauer at brain.mpg.de > www.brain.mpg.de > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip From jm.horschig at donders.ru.nl Tue Jun 4 12:17:37 2013 From: jm.horschig at donders.ru.nl (=?ISO-8859-1?Q?=22J=F6rn_M=2E_Horschig=22?=) Date: Tue, 04 Jun 2013 12:17:37 +0200 Subject: [FieldTrip] NaNs as output of ft_sourceanalysis (DICS) In-Reply-To: References: Message-ID: <51ADBEC1.5060204@donders.ru.nl> Hi Andreas, could it be related to the fact that you redefine your trials and when estimating the frequency content, there is no exact 75Hz bin, thus ft_sourceanalysis cannot beam the frequency you specify? Since you cut out the pre- and poststimulus periods with different lengths, the frequency resolution will be strongly different, thus an estimate of 75Hz will effectively be somewhere around 75Hz, but not exactly 75Hz. You could try to set cfg.frequency=freqAll.Cond_(yourNumberedCondition).freq instead of cfg.frequency=75. Note that in this case, sourceAll might have non-nans, but sourcePre and sourcePost will probably still have nans due to the resolution issue If that's not the case, then I agree also with Eelke that more information is needed to help you, e.g. in which of the three source structures are nans? How many nans are there (try all(isnan(source.avg.pow(:))))? Best, Jörn On 6/4/2013 11:54 AM, Eelke Spaak wrote: > Dear Andreas, > > How many NaNs do you get exactly and in which field? If it is some > NaNs in source.avg.pow, then it is quite normal: the estimates for > dipole locations which were flagged as outside the brain are always > NaN, as they are not scanned. The following should hold: > > sum(isnan(source.avg.pow)) == numel(source.outside) > && > sum(~isnan(source.avg.pow)) == numel(source.inside) > > Best, > Eelke > > On 4 June 2013 11:42, Andreas Sauer wrote: >> Dear all, >> >> I would like to analyze sources with the beamforming approach using the DICS >> method. I followed the steps in the tutorial and everything works well. >> However, the output of ft_sourceanalysis contains only NaNs. >> >> I checked the TF data that I calculated in the step before but that looks >> fine, so I assume the error happens somewhere during ft_sourceanalysis. >> >> That's how I calculate the TFRs: >> >> cfg = []; >> cfg.toilim = [-0.5 -0.3]; % baseline activity >> eval(['dataPre = >> ft_redefinetrial(cfg,Cond_',num2str(cond(j)),');']); >> cfg.toilim = [0.1 1.0]; % task-related activity >> eval(['dataPost = >> ft_redefinetrial(cfg,Cond_',num2str(cond(j)),');']); >> >> % Combine the two datasets... >> data = appenddata(cfg, dataPre, dataPost); >> trialdesign = [ones(1,length(dataPost.trial)) >> ones(1,length(dataPre.trial))*2]; >> >> % ... and compute the CSD matrices... >> cfg = []; >> cfg.output = 'powandcsd'; >> cfg.channel = Channel.meg; >> cfg.method = 'mtmfft'; >> cfg.taper = 'dpss'; >> cfg.foilim = [75 75]; >> cfg.tapsmofrq = 15; % amount of spectral smoothing = +/- 15 Hz >> cfg.channelcmb = {Channel.meg Channel.meg}; >> >> % ... for the baseline and task part separately... >> eval(['freqPre.Cond_',num2str(cond(j)), ' = >> ft_freqanalysis(cfg,dataPre);']); >> eval(['freqPost.Cond_',num2str(cond(j)), ' = >> ft_freqanalysis(cfg,dataPost);']); >> >> % ... and for the whole trial >> eval(['freqAll.Cond_',num2str(cond(j)), ' = >> ft_freqanalysis(cfg,data);']); >> eval(['freqAll.Cond_',num2str(cond(j)), '.trialdesign = >> trialdesign;']); % pre and post info >> >> And that's how I calculate the sources: >> >> cfg = []; >> cfg.frequency = 75; >> cfg.method = 'dics'; >> cfg.grid = grid; % Here it gives .pos, .inside, .outside to >> the structure >> cfg.vol = vol; >> cfg.dim = template_grid.dim; % Here I give the dimension >> of the template grid >> cfg.grad = Cond_101.hdr.grad; >> cfg.lambda = '5%'; >> cfg.reducerank = 'no'; >> cfg.projectnoise = 'yes'; >> cfg.realfilter = 'yes'; >> cfg.keepfilter = 'yes'; % the output saves the computed inverse >> filter >> >> eval(['SourceAll = ft_sourceanalysis(cfg, >> freqAll.Cond_',num2str(cond(k)),');']) >> >> % use the common filter here >> cfg.grid.filter = SourceAll.avg.filter; >> eval(['sourcePre_con = ft_sourceanalysis(cfg, >> freqPre.Cond_',num2str(cond(k)),');']) >> eval(['sourcePost_con = ft_sourceanalysis(cfg, >> freqPost.Cond_',num2str(cond(k)),');']) >> >> >> >> I would really appreciate any help with that! Thanks a lot! >> >> Best, >> >> Andreas >> >> -- >> Andreas Sauer >> Max Planck Institute for Brain Research >> Deutschordenstr. 46 >> 60528 Frankfurt am Main >> Germany >> >> T: +49 69 96769 278 >> F: +49 69 96769 327 >> Email: andreas.sauer at brain.mpg.de >> www.brain.mpg.de >> >> _______________________________________________ >> fieldtrip mailing list >> fieldtrip at donders.ru.nl >> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -- Jörn M. Horschig PhD Student Donders Institute for Brain, Cognition and Behaviour Centre for Cognitive Neuroimaging Radboud University Nijmegen Neuronal Oscillations Group FieldTrip Development Team P.O. Box 9101 NL-6500 HB Nijmegen The Netherlands Contact: E-Mail: jm.horschig at donders.ru.nl Tel: +31-(0)24-36-68493 Web: http://www.ru.nl/donders Visiting address: Trigon, room 2.30 Kapittelweg 29 NL-6525 EN Nijmegen The Netherlands From sauer.mpih at googlemail.com Tue Jun 4 12:31:32 2013 From: sauer.mpih at googlemail.com (Andreas Sauer) Date: Tue, 4 Jun 2013 12:31:32 +0200 Subject: [FieldTrip] NaNs as output of ft_sourceanalysis (DICS) In-Reply-To: References: Message-ID: Dear Eelke and Jörn, thanks for the super quick responses! And sorry for the double post... I tried Eelke's suggestion and that holds. So, I have only NaNs in the fields for the dipole locations outside the brain. However, if I continue and calculate the contrast between pre and post and plot it I don't see any activation. I will try your suggestion, Jörn, as well and see whether it has to do with the re-definition. Thanks again for your suggestions! Best, Andreas 2013/6/4 Eelke Spaak > Dear Andreas, > > How many NaNs do you get exactly and in which field? If it is some > NaNs in source.avg.pow, then it is quite normal: the estimates for > dipole locations which were flagged as outside the brain are always > NaN, as they are not scanned. The following should hold: > > sum(isnan(source.avg.pow)) == numel(source.outside) > && > sum(~isnan(source.avg.pow)) == numel(source.inside) > > Best, > Eelke > > On 4 June 2013 11:42, Andreas Sauer wrote: > > Dear all, > > > > I would like to analyze sources with the beamforming approach using the > DICS > > method. I followed the steps in the tutorial and everything works well. > > However, the output of ft_sourceanalysis contains only NaNs. > > > > I checked the TF data that I calculated in the step before but that looks > > fine, so I assume the error happens somewhere during ft_sourceanalysis. > > > > That's how I calculate the TFRs: > > > > cfg = []; > > cfg.toilim = [-0.5 -0.3]; % baseline activity > > eval(['dataPre = > > ft_redefinetrial(cfg,Cond_',num2str(cond(j)),');']); > > cfg.toilim = [0.1 1.0]; % task-related activity > > eval(['dataPost = > > ft_redefinetrial(cfg,Cond_',num2str(cond(j)),');']); > > > > % Combine the two datasets... > > data = appenddata(cfg, dataPre, dataPost); > > trialdesign = [ones(1,length(dataPost.trial)) > > ones(1,length(dataPre.trial))*2]; > > > > % ... and compute the CSD matrices... > > cfg = []; > > cfg.output = 'powandcsd'; > > cfg.channel = Channel.meg; > > cfg.method = 'mtmfft'; > > cfg.taper = 'dpss'; > > cfg.foilim = [75 75]; > > cfg.tapsmofrq = 15; % amount of spectral smoothing = +/- 15 Hz > > cfg.channelcmb = {Channel.meg Channel.meg}; > > > > % ... for the baseline and task part separately... > > eval(['freqPre.Cond_',num2str(cond(j)), ' = > > ft_freqanalysis(cfg,dataPre);']); > > eval(['freqPost.Cond_',num2str(cond(j)), ' = > > ft_freqanalysis(cfg,dataPost);']); > > > > % ... and for the whole trial > > eval(['freqAll.Cond_',num2str(cond(j)), ' = > > ft_freqanalysis(cfg,data);']); > > eval(['freqAll.Cond_',num2str(cond(j)), '.trialdesign = > > trialdesign;']); % pre and post info > > > > And that's how I calculate the sources: > > > > cfg = []; > > cfg.frequency = 75; > > cfg.method = 'dics'; > > cfg.grid = grid; % Here it gives .pos, .inside, > .outside to > > the structure > > cfg.vol = vol; > > cfg.dim = template_grid.dim; % Here I give the > dimension > > of the template grid > > cfg.grad = Cond_101.hdr.grad; > > cfg.lambda = '5%'; > > cfg.reducerank = 'no'; > > cfg.projectnoise = 'yes'; > > cfg.realfilter = 'yes'; > > cfg.keepfilter = 'yes'; % the output saves the computed > inverse > > filter > > > > eval(['SourceAll = ft_sourceanalysis(cfg, > > freqAll.Cond_',num2str(cond(k)),');']) > > > > % use the common filter here > > cfg.grid.filter = SourceAll.avg.filter; > > eval(['sourcePre_con = ft_sourceanalysis(cfg, > > freqPre.Cond_',num2str(cond(k)),');']) > > eval(['sourcePost_con = ft_sourceanalysis(cfg, > > freqPost.Cond_',num2str(cond(k)),');']) > > > > > > > > I would really appreciate any help with that! Thanks a lot! > > > > Best, > > > > Andreas > > > > -- > > Andreas Sauer > > Max Planck Institute for Brain Research > > Deutschordenstr. 46 > > 60528 Frankfurt am Main > > Germany > > > > T: +49 69 96769 278 > > F: +49 69 96769 327 > > Email: andreas.sauer at brain.mpg.de > > www.brain.mpg.de > > > > _______________________________________________ > > fieldtrip mailing list > > fieldtrip at donders.ru.nl > > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > -- Dipl.-Psych. Andreas Sauer Max Planck Institute for Brain Research Deutschordenstraße 46 60528 Frankfurt am Main Germany T: +49 69 96769 278 F: +49 69 96769 327 Email: sauer.mpih at gmail.com www.brain.mpg.de -------------- next part -------------- An HTML attachment was scrubbed... URL: From r.cox at uva.nl Tue Jun 4 14:31:06 2013 From: r.cox at uva.nl (Roy Cox) Date: Tue, 4 Jun 2013 14:31:06 +0200 Subject: [FieldTrip] ft_freqstatistics & ft_clusterplot Message-ID: Dear all, I recently joined your trip and I want to make use of fieldtrip's cluster correction capabilities. But I can't seem to get it to work. Perhaps some of you can clarify some things I can't figure out easily from the tutorials or functions themselves. A potentially important thing to know is that I performed all single-subject tf analyes using custom scripts, and now I want to have fieldtrip perform the overall statistics (8 subjects, 2 within-subj conditions). ft_freqstatistics works. However, I wonder: does it matter for the statistics what latency and frequency range you choose and/or whether you average across time/freq bins? I tried a number of variants, but the command window output "found [] positive/negative clusters in observed data" is always identical. Which confuses me. is it possible to call ft_freqstatistics and neither average over time nor frequency bins? or am I supposed to average across at least one to end up with less-dimensional data for ft_clusterplot? regardless of how I call ft_freqstatistics, ft_clusterplot crashes like this: Assignment has more non-singleton rhs dimensions than non-singleton subscripts Error in ==> ft_clusterplot at 179 sigposCLM(:,:,iPos) = (posCLM == sigpos(iPos)); here, my posCLM is a 126(chan)x35(freqs)x301(time) array, which indeed does not fit the left-hand side. If anyone has any ideas/suggestions I'd be happy to hear them. Roy -- Roy Cox, M.Sc. | Brain & Cognition Group | Department of Psychology | University of Amsterdam | Weesperplein 4 | 1018 XA Amsterdam | the Netherlands | room 3.21 | phone: +31 20 525 6847 | email: r.cox at uva.nl -------------- next part -------------- An HTML attachment was scrubbed... URL: From andmib at gmail.com Tue Jun 4 17:01:43 2013 From: andmib at gmail.com (Andrew Brooks) Date: Tue, 4 Jun 2013 11:01:43 -0400 Subject: [FieldTrip] Private function problems In-Reply-To: <481032685.1338448.1370292821035.JavaMail.root@sculptor.zimbra.ru.nl> References: <481032685.1338448.1370292821035.JavaMail.root@sculptor.zimbra.ru.nl> Message-ID: Hello Diego, I am using the example pipeline script from an earlier version of FieldTrip (ft_omri_pipeline_nuisance). The exact code that is throwing the error: curSixDof = hom2six(M). I did run the three lines of code to reset the default paths, add fieldtrip, and then ran ft_defaults. The version of FieldTrip I am using is 20130602. Thanks, Andrew On Mon, Jun 3, 2013 at 4:53 PM, Lozano Soldevilla, D. (Diego) < d.lozanosoldevilla at fcdonders.ru.nl> wrote: > Hi Andrew, > > Did you type the following? > > >> restoredefaultpath > >> addpath /fieldtripxxxx > >> ft_defaults > > What's the ft_* function you invoke to get the error 'undefined function > 'hom2six'? And what's the fieldtrip version you're using? > > best, > > Diego > > ------------------------------ > > *From: *"Andrew Brooks" > *To: *"FieldTrip discussion list" > *Sent: *Monday, 3 June, 2013 10:15:49 PM > *Subject: *[FieldTrip] Private function problems > > > Hello all, > > I followed the instructions on properly adding FieldTrip to the Matlab > path file. However, I continue to run into errors involving private > functions. In this case, I get the error 'undefined function 'hom2six' for > input arguments of type 'double''. > > Does anybody have a suggestion as to why this is occurring? > > Thanks! > Andrew > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > > > > -- > PhD Student > Neuronal Oscillations Group > Donders Institute for Brain, Cognition and Behaviour > Centre for Cognitive Neuroimaging > Trigon, room 0.83 > Kapittelweg 29 > Radboud University Nijmegen > NL-6525 EN Nijmegen > The Netherlands > E-Mail: d.lozanosoldevilla at fcdonders.ru.nl > Tel: +31-(0)24-36-66274 > Web: http://www.neuosc.com/ > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > -------------- next part -------------- An HTML attachment was scrubbed... URL: From frank.ye.mei at gmail.com Tue Jun 4 22:47:08 2013 From: frank.ye.mei at gmail.com (Frank Mei) Date: Tue, 4 Jun 2013 16:47:08 -0400 Subject: [FieldTrip] How to set a small window when doing source localization? Message-ID: Hello all, I want to be more precise in time, when doing source localization. So I tried to set a small cfg.toilim, before the 'ft_redefinetrial'. But if it is set smaller than 0.3(corresponding to 300ms), an error will pop up. How to solve that problem? thanks ahead, Ye Mei -------------- next part -------------- An HTML attachment was scrubbed... URL: From d.lozanosoldevilla at fcdonders.ru.nl Wed Jun 5 15:39:14 2013 From: d.lozanosoldevilla at fcdonders.ru.nl (Lozano Soldevilla, D. (Diego)) Date: Wed, 5 Jun 2013 15:39:14 +0200 (CEST) Subject: [FieldTrip] Private function problems In-Reply-To: Message-ID: <2127428772.1387542.1370439554352.JavaMail.root@sculptor.zimbra.ru.nl> Hi Andrew, Could you please check inside your matlab path there's the realtime/mri directory where ft_omri_pipeline_nuisance.m function is located? Mine looks like this: '/home/electromag/dieloz/matlab/ fieldtrip-dev/realtime/online_mri/ ' If it's there, you shouldn't have the private folder problem. Otherwise, add from the command window and tell me. best, Diego ----- Original Message ----- > From: "Andrew Brooks" > To: "Diego Lozano" , > "FieldTrip discussion list" > Sent: Tuesday, 4 June, 2013 5:01:43 PM > Subject: Re: [FieldTrip] Private function problems > Hello Diego, > I am using the example pipeline script from an earlier version of > FieldTrip (ft_omri_pipeline_nuisance). The exact code that is throwing > the error: curSixDof = hom2six(M). > I did run the three lines of code to reset the default paths, add > fieldtrip, and then ran ft_defaults. The version of FieldTrip I am > using is 20130602. > Thanks, > Andrew > On Mon, Jun 3, 2013 at 4:53 PM, Lozano Soldevilla, D. (Diego) < > d.lozanosoldevilla at fcdonders.ru.nl > wrote: > > Hi Andrew, > > Did you type the following? > > >> restoredefaultpath > > >> addpath /fieldtripxxxx > > >> ft_defaults > > What's the ft_* function you invoke to get the error 'undefined > > function 'hom2six'? And what's the fieldtrip version you're using? > > best, > > Diego > > > From: "Andrew Brooks" < andmib at gmail.com > > > > To: "FieldTrip discussion list" < fieldtrip at science.ru.nl > > > > Sent: Monday, 3 June, 2013 10:15:49 PM > > > Subject: [FieldTrip] Private function problems > > > Hello all, > > > I followed the instructions on properly adding FieldTrip to the > > > Matlab > > > path file. However, I continue to run into errors involving > > > private > > > functions. In this case, I get the error 'undefined function > > > 'hom2six' > > > for input arguments of type 'double''. > > > Does anybody have a suggestion as to why this is occurring? > > > Thanks! > > > Andrew > > > _______________________________________________ > > > fieldtrip mailing list > > > fieldtrip at donders.ru.nl > > > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > -- > > PhD Student > > Neuronal Oscillations Group > > Donders Institute for Brain, Cognition and Behaviour > > Centre for Cognitive Neuroimaging > > Trigon, room 0.83 > > Kapittelweg 29 > > Radboud University Nijmegen > > NL-6525 EN Nijmegen > > The Netherlands > > E-Mail: d.lozanosoldevilla at fcdonders.ru.nl > > Tel: +31-(0)24-36-66274 > > Web: http://www.neuosc.com/ > > _______________________________________________ > > fieldtrip mailing list > > fieldtrip at donders.ru.nl > > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -------------- next part -------------- An HTML attachment was scrubbed... URL: From elizabeth.bock at mcgill.ca Wed Jun 5 17:53:36 2013 From: elizabeth.bock at mcgill.ca (Elizabeth Anne Bock, Ms) Date: Wed, 5 Jun 2013 15:53:36 +0000 Subject: [FieldTrip] Polhemus Patriot In-Reply-To: <67D8C434-4D28-40C3-94A6-A95C86BD6B78@gmail.com> References: <67D8C434-4D28-40C3-94A6-A95C86BD6B78@gmail.com> Message-ID: <86D86365C4E767468A79EB52DFBFB46F051E242F@exmbx2010-8.campus.MCGILL.CA> Hi Julian, We have experienced this problem as well. We solved it using the following guidelines: No metal near the polhemus or any of the receivers/transmitters - you will need to move the setup around the room to find the perfect spot. Use a wooden or plastic chair Use plastic or cloth glasses/holder to attach the receiver to the subject My system is sensitive to the proximity of the transmitter and the receiver. I use two receivers, #1 is the stylus and #2 is secured to plastic glasses that the subject wears. The transmitter is taped to the back of the chair. If #2 and the transmitter are too close to each other (i.e. a short person or child), then the measurement are inaccurate. You would have to experiment with different distances that give good results. Hope this helps! Beth ------------------------------------------------------------------------------------------ Elizabeth Bock / MEG System Engineer McConnell Brain Imaging Centre / Montreal Neurological Institute McGill University / 3801 University St. / Montreal, QC H3A 2B4 Office: 514.398.3706 MEG Lab: 514.398.6056 Mobile: 514.718.6342 ________________________________ From: fieldtrip-bounces at science.ru.nl [fieldtrip-bounces at science.ru.nl] on behalf of Julian Keil [julian.keil at gmail.com] Sent: Monday, June 03, 2013 11:14 AM To: FieldTrip discussion list Subject: [FieldTrip] Polhemus Patriot Dear FieldTrip-Users, I have a not really FieldTrip-related question, but maybe one of you can help me anyways. In our lab, we have a Polhemus Patriot 3D tracking system to acquire electrode positions. Unfortunately, the recordings are severely distorted in the Z-axis (up-down). After contacting the Polhemus Support, I got the information, that this is due to metal in the surroundings of the source which distorts the magnetic field. I tried to get as far away from any metal as possible in our lab (~1.5 m to the walls and floor) but to no avail. Now to my question: Has anyone any experience dealing with this? I'm quite puzzled by this as I know plenty of labs use Polhemus trackers, and I'm not sure if our lab is especially metal prone or if I'm missing something. Thanks a lot for any help. Julian ******************** Dr. Julian Keil AG Multisensorische Integration Psychiatrische Universitätsklinik der Charité im St. Hedwig-Krankenhaus Große Hamburger Straße 5-11, Raum E 307 10115 Berlin Telefon: +49-30-2311-1879 Fax: +49-30-2311-2209 http://psy-ccm.charite.de/forschung/bildgebung/ag_multisensorische_integration -------------- next part -------------- An HTML attachment was scrubbed... URL: From julian.keil at gmail.com Wed Jun 5 18:02:55 2013 From: julian.keil at gmail.com (Julian Keil) Date: Wed, 5 Jun 2013 18:02:55 +0200 Subject: [FieldTrip] Polhemus Patriot In-Reply-To: <86D86365C4E767468A79EB52DFBFB46F051E242F@exmbx2010-8.campus.MCGILL.CA> References: <67D8C434-4D28-40C3-94A6-A95C86BD6B78@gmail.com> <86D86365C4E767468A79EB52DFBFB46F051E242F@exmbx2010-8.campus.MCGILL.CA> Message-ID: Dear all, thank you very much for your input. I'll have to experiment a bit more with the distance to the walls (which probably contain metal) and the chair. Thank you also for the idea with the second sensor, I hadn't tried this before. Best, Julian Am 05.06.2013 um 17:53 schrieb Elizabeth Anne Bock, Ms: > Hi Julian, > We have experienced this problem as well. We solved it using the following guidelines: > > No metal near the polhemus or any of the receivers/transmitters - you will need to move the setup around the room to find the perfect spot. > Use a wooden or plastic chair > Use plastic or cloth glasses/holder to attach the receiver to the subject > > My system is sensitive to the proximity of the transmitter and the receiver. I use two receivers, #1 is the stylus and #2 is secured to plastic glasses that the subject wears. The transmitter is taped to the back of the chair. If #2 and the transmitter are too close to each other (i.e. a short person or child), then the measurement are inaccurate. You would have to experiment with different distances that give good results. > > Hope this helps! > Beth > > ------------------------------------------------------------------------------------------ > Elizabeth Bock / MEG System Engineer > McConnell Brain Imaging Centre / Montreal Neurological Institute > McGill University / 3801 University St. / Montreal, QC H3A 2B4 > > Office: 514.398.3706 > MEG Lab: 514.398.6056 > Mobile: 514.718.6342 > From: fieldtrip-bounces at science.ru.nl [fieldtrip-bounces at science.ru.nl] on behalf of Julian Keil [julian.keil at gmail.com] > Sent: Monday, June 03, 2013 11:14 AM > To: FieldTrip discussion list > Subject: [FieldTrip] Polhemus Patriot > > Dear FieldTrip-Users, > > I have a not really FieldTrip-related question, but maybe one of you can help me anyways. > In our lab, we have a Polhemus Patriot 3D tracking system to acquire electrode positions. > Unfortunately, the recordings are severely distorted in the Z-axis (up-down). > After contacting the Polhemus Support, I got the information, that this is due to metal in the surroundings of the source which distorts the magnetic field. > I tried to get as far away from any metal as possible in our lab (~1.5 m to the walls and floor) but to no avail. > > Now to my question: Has anyone any experience dealing with this? I'm quite puzzled by this as I know plenty of labs use Polhemus trackers, and I'm not sure if our lab is especially metal prone or if I'm missing something. > > Thanks a lot for any help. > > Julian > > ******************** > Dr. Julian Keil > > AG Multisensorische Integration > Psychiatrische Universitätsklinik > der Charité im St. Hedwig-Krankenhaus > Große Hamburger Straße 5-11, Raum E 307 > 10115 Berlin > > Telefon: +49-30-2311-1879 > Fax: +49-30-2311-2209 > http://psy-ccm.charite.de/forschung/bildgebung/ag_multisensorische_integration > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -------------- next part -------------- An HTML attachment was scrubbed... URL: From mje.mads at gmail.com Thu Jun 6 09:16:01 2013 From: mje.mads at gmail.com (Mads Jensen) Date: Thu, 06 Jun 2013 09:16:01 +0200 Subject: [FieldTrip] Extracting the time of a cluster Message-ID: <51B03731.2080303@gmail.com> Dear all, I have made a statistics analysis on ERP data using ft_timelockstatistics and got a significant cluster I would like to know the time course of this cluster(i.e. when it starts and ends being significant) , is that possible? I take to the cirange that is computed in the output for the cluster from ft_timelockstatistics be the upper and lower limit of the confidence interval, so the cluster.prop +/- the cirange gives the 95%confidence intervals. Is that correct? best wishes, Mads From jm.horschig at donders.ru.nl Thu Jun 6 10:17:50 2013 From: jm.horschig at donders.ru.nl (=?ISO-8859-1?Q?=22J=F6rn_M=2E_Horschig=22?=) Date: Thu, 06 Jun 2013 10:17:50 +0200 Subject: [FieldTrip] Extracting the time of a cluster In-Reply-To: <51B03731.2080303@gmail.com> References: <51B03731.2080303@gmail.com> Message-ID: <51B045AE.3010305@donders.ru.nl> Hi Mads, there is a stats.posclusterlabelmat and stats.negclusterlabelmat field, which contain the indices of all your clusters. You can use these indices and to index the period where your test shows some significant effect(e.g. for timelock.avg or timelock.time). See here for an example, which does not quite do what you want, but gets close http://fieldtrip.fcdonders.nl/tutorial/cluster_permutation_timelock#plotting_the_results And, yes, cirange defines the range of the confidence interval for that particular cluster, so pvalue - cirange gives the lower bound and pvalue + cirange the upper bound. If your upper bound extends beyond the critical alpha-value, I would advise to use more randomizations. Best, Jörn On 6/6/2013 9:16 AM, Mads Jensen wrote: > Dear all, > > I have made a statistics analysis on ERP data using > ft_timelockstatistics and got a significant cluster I would like to > know the time course of this cluster(i.e. when it starts and ends > being significant) , is that possible? > > I take to the cirange that is computed in the output for the cluster > from ft_timelockstatistics be the upper and lower limit of the > confidence interval, so the cluster.prop +/- the cirange gives the > 95%confidence intervals. Is that correct? > > best wishes, > Mads > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -- Jörn M. Horschig PhD Student Donders Institute for Brain, Cognition and Behaviour Centre for Cognitive Neuroimaging Radboud University Nijmegen Neuronal Oscillations Group FieldTrip Development Team P.O. Box 9101 NL-6500 HB Nijmegen The Netherlands Contact: E-Mail: jm.horschig at donders.ru.nl Tel: +31-(0)24-36-68493 Web: http://www.ru.nl/donders Visiting address: Trigon, room 2.30 Kapittelweg 29 NL-6525 EN Nijmegen The Netherlands From mje.mads at gmail.com Thu Jun 6 12:48:02 2013 From: mje.mads at gmail.com (Mads Jensen) Date: Thu, 06 Jun 2013 12:48:02 +0200 Subject: [FieldTrip] Extracting the time of a cluster In-Reply-To: <51B045AE.3010305@donders.ru.nl> References: <51B03731.2080303@gmail.com> <51B045AE.3010305@donders.ru.nl> Message-ID: <51B068E2.3010500@gmail.com> Hi Jörn, thanks for the swift and very useful reply. best, mads On 06/06/13 10:17, "Jörn M. Horschig" wrote: > Hi Mads, > > there is a stats.posclusterlabelmat and stats.negclusterlabelmat field, > which contain the indices of all your clusters. You can use these > indices and to index the period where your test shows some significant > effect(e.g. for timelock.avg or timelock.time). See here for an example, > which does not quite do what you want, but gets close > http://fieldtrip.fcdonders.nl/tutorial/cluster_permutation_timelock#plotting_the_results > > > And, yes, cirange defines the range of the confidence interval for that > particular cluster, so pvalue - cirange gives the lower bound and pvalue > + cirange the upper bound. If your upper bound extends beyond the > critical alpha-value, I would advise to use more randomizations. > > Best, > Jörn > > On 6/6/2013 9:16 AM, Mads Jensen wrote: >> Dear all, >> >> I have made a statistics analysis on ERP data using >> ft_timelockstatistics and got a significant cluster I would like to >> know the time course of this cluster(i.e. when it starts and ends >> being significant) , is that possible? >> >> I take to the cirange that is computed in the output for the cluster >> from ft_timelockstatistics be the upper and lower limit of the >> confidence interval, so the cluster.prop +/- the cirange gives the >> 95%confidence intervals. Is that correct? >> >> best wishes, >> Mads >> _______________________________________________ >> fieldtrip mailing list >> fieldtrip at donders.ru.nl >> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > From antony.passaro at gmail.com Thu Jun 6 15:59:22 2013 From: antony.passaro at gmail.com (Antony Passaro) Date: Thu, 6 Jun 2013 09:59:22 -0400 Subject: [FieldTrip] Statistics for correlation across subjects using cluster analysis Message-ID: Hi, I came across an email in the mailing list archives from this time last year when a user ( Ingrid ) was asking about using a statistical model with a cluster analysis to correct for multiple comparisons based on performing a correlation across trials (and/or subjects). Jan-mathijs replied saying he had a copy of statfun_corr and statfun_glm but I don't see a copy of either of those functions in the latest fieldtrip release. Would anyone be so kind as to point my in the right directions to tackle this problem? Thank you, -Tony -------------- next part -------------- An HTML attachment was scrubbed... URL: From andmib at gmail.com Thu Jun 6 17:06:25 2013 From: andmib at gmail.com (Andrew Brooks) Date: Thu, 6 Jun 2013 11:06:25 -0400 Subject: [FieldTrip] Private function problems In-Reply-To: <2127428772.1387542.1370439554352.JavaMail.root@sculptor.zimbra.ru.nl> References: <2127428772.1387542.1370439554352.JavaMail.root@sculptor.zimbra.ru.nl> Message-ID: Diego, Thank you, that was indeed the problem. I had moved the ft_omri_pipeline script out of the /realtime/online_mri directory, which caused the problems. Thanks, Andrew On Wed, Jun 5, 2013 at 9:39 AM, Lozano Soldevilla, D. (Diego) < d.lozanosoldevilla at fcdonders.ru.nl> wrote: > Hi Andrew, > > Could you please check inside your matlab path there's the realtime/mri > directory where ft_omri_pipeline_nuisance.m function is located? > > Mine looks like this: > > '/home/electromag/dieloz/matlab/*fieldtrip-dev/realtime/online_mri/*' > > If it's there, you shouldn't have the private folder problem. Otherwise, > add from the command window and tell me. > > best, > > Diego > > ------------------------------ > > *From: *"Andrew Brooks" > *To: *"Diego Lozano" , "FieldTrip > discussion list" > *Sent: *Tuesday, 4 June, 2013 5:01:43 PM > *Subject: *Re: [FieldTrip] Private function problems > > > Hello Diego, > > I am using the example pipeline script from an earlier version of > FieldTrip (ft_omri_pipeline_nuisance). The exact code that is throwing the > error: curSixDof = hom2six(M). > > I did run the three lines of code to reset the default paths, add > fieldtrip, and then ran ft_defaults. The version of FieldTrip I am using is > 20130602. > > Thanks, > Andrew > > > > > > > On Mon, Jun 3, 2013 at 4:53 PM, Lozano Soldevilla, D. (Diego) < > d.lozanosoldevilla at fcdonders.ru.nl> wrote: > >> Hi Andrew, >> >> Did you type the following? >> >> >> restoredefaultpath >> >> addpath /fieldtripxxxx >> >> ft_defaults >> >> What's the ft_* function you invoke to get the error 'undefined function >> 'hom2six'? And what's the fieldtrip version you're using? >> >> best, >> >> Diego >> >> ------------------------------ >> >> *From: *"Andrew Brooks" >> *To: *"FieldTrip discussion list" >> *Sent: *Monday, 3 June, 2013 10:15:49 PM >> *Subject: *[FieldTrip] Private function problems >> >> >> Hello all, >> >> I followed the instructions on properly adding FieldTrip to the Matlab >> path file. However, I continue to run into errors involving private >> functions. In this case, I get the error 'undefined function 'hom2six' for >> input arguments of type 'double''. >> >> Does anybody have a suggestion as to why this is occurring? >> >> Thanks! >> Andrew >> >> _______________________________________________ >> fieldtrip mailing list >> fieldtrip at donders.ru.nl >> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip >> >> >> >> >> -- >> PhD Student >> Neuronal Oscillations Group >> Donders Institute for Brain, Cognition and Behaviour >> Centre for Cognitive Neuroimaging >> Trigon, room 0.83 >> Kapittelweg 29 >> Radboud University Nijmegen >> NL-6525 EN Nijmegen >> The Netherlands >> E-Mail: d.lozanosoldevilla at fcdonders.ru.nl >> Tel: +31-(0)24-36-66274 >> Web: http://www.neuosc.com/ >> >> _______________________________________________ >> fieldtrip mailing list >> fieldtrip at donders.ru.nl >> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip >> > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > -------------- next part -------------- An HTML attachment was scrubbed... URL: From jkamienk at gmail.com Thu Jun 6 17:49:27 2013 From: jkamienk at gmail.com (Juan Kamienkowski) Date: Thu, 6 Jun 2013 12:49:27 -0300 Subject: [FieldTrip] Oscillatory power normalization In-Reply-To: References: Message-ID: Hi everybody, More than one year later we come up with the same questions. Does anybody have suggestions on this topic? Thanks a lot! Best, juan On Fri, Mar 9, 2012 at 4:16 PM, Matt Mollison wrote: > My questions essentially boil down to: what do people do for power > normalization when assessing statistical differences? > > It gets more detailed below regarding examining event-related power > changes relative to a baseline (within-subjects, comparing two conditions, > stimulus onset = 0 ms). I didn't find much discussion of this on the list > or the wiki. Any references for these issues would also be appreciated. > > (1) Does power data need to be baseline normalized for statistical tests > comparing conditions? Normalization would put power on equal footing across > all subjects, conditions, sensors, times, frequencies, etc., but it will > surely affect power during the stimulus period in a particular way. If so, > do the two (or more) conditions need to use the same baseline condition, or > can each trial be normalized to its own pre-stim baseline period (a la > ft_freqbaseline)? For either, it seems like you'd always need > keeptrials='yes' in ft_freqanalysis. However, it does not seem to get > normalized in the cluster_permutation_freq tutorial (within-subjects)---am > I missing something? > > If we should normalize: > (2) I've read a number of papers that Z-transform stimulus period power > relative to pre-stim activity (subtract mean, divide by std) before doing > statistics. I've also read a lot that don't mention baselines, or e.g. do a > decibel [dB] transform. ft_freqbaseline does not have a Z-transform option. > There is ft_preproc_standardize, but this seems to operate at a lower level > than is usually recommended. Z-transforming seems like a good option, but > how can I use it in the FT pipeline for within-subjects analyses > (especially with keeptrials='no')? Alternatively, when should one use > 'absolute', 'relative', or 'relchange'? > > Regarding choosing the baseline period: > (3) It seems that the baseline period needs to precede stimulus onset by a > sufficient amount of time so that the stimulus period doesn't bleed into > the baseline; this time would be specific to both the frequency and either > wavelet width or taper window length. For example, at 4 Hz with wavelet > width=6 or a taper with 6 cycles per time window (t_ftimwin) the > wavelet/window would be 1500 ms long, and the end of the baseline must > precede stimulus onset by at least half this to keep them separate. At > lower frequencies this could get quite unruly (e.g., 1 Hz would require > ending 3000 ms before stimulus). Is this correct? Maybe that's why it's > better to have a single separate baseline condition. Anyway, the > timefrequencyanalysis tutorial seems to disregard this separation of > baseline and stimulus activity (as have many papers I've read), so maybe > I'm wrong about this being necessary. > > Thanks for your time, > Matt Mollison > > -- > Univ. of Colorado at Boulder > Dept. of Psychology and Neuroscience > matthew.mollison at colorado.edu > http://psych.colorado.edu/~mollison/ > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > -- Juan E Kamienkowski Laboratorio de Neurociencia Integrativa Departamento de Fisica, FCEN-UBA Ciudad Universitaria, Pabellon I (1428) Buenos Aires, Argentina Phone: (54-11) 4576 3300 (282) Fax: (54-11) 4576 3357 http://www.neurociencia.df.uba.ar/ -------------- next part -------------- An HTML attachment was scrubbed... URL: From S.J.Johnston at swansea.ac.uk Fri Jun 7 11:23:20 2013 From: S.J.Johnston at swansea.ac.uk (Steve Johnston) Date: Fri, 7 Jun 2013 10:23:20 +0100 Subject: [FieldTrip] Bad channel correction problems and ICA Message-ID: <55D211F2-5D76-43EE-B41A-EA05C8FFCE6F@swansea.ac.uk> Dear fters I've just started using ft and, although being able to run through a test run of eye movement data just fine, I'm now getting into the more detailed stuff and I'm hitting a snag that I hope you can help me with. Specifically I'm struggling to get any real ICA results after using ft_channelrepair but not if I go through without it. Data was recorded on a biosemi 128 system and the trials are just eye movements that I want to identify via ICA (simple test). If I just run through the procedure of importing data, set markers, remove gross artifacts (keeping all channels, including 3 bad ones) and then run the ICA - I get lovely eye movement components appearing. However, now I want to do it 'properly' and replace the bad channels. Currently I do the following … (sorry, for completeness I included everything to be on the safe side). %% % Standard cfg for import cfg = []; cfg.trialdef.prestim = .2; cfg.trialdef.poststim = 2; cfg.trialdef.eventtype = 'STATUS'; %% %Load each dataset and examine for channels that are bad - starting with EOG Localiser. cfg.dataset = [subjectdata.dir filesep subjectdata.artifactfile]; cfg.trialdef.eventvalue = markers.artifact; cfg = ft_definetrial(cfg); cfg.demean = 'yes'; data = ft_preprocessing(cfg); % After the above, run ChannelRepair after identifying bad channels. %% % Channel Replace - get nearest neighbours cfg = []; cfg.method = 'distance' cfg.layout = 'biosemi128.lay'; cfg.neighbourdist = 0.13; [neighbours] = ft_prepare_neighbours(cfg,data) %% Interpolate and put into new data structure cfg = []; cfg.badchannel = replace_channels; cfg.layout = 'biosemi128.lay'; cfg.method = 'nearest'; cfg.neighbours = neighbours; cfg.neighbourdist = 0.13; artifact_cleandata = ft_channelrepair(cfg,data) % Visualise data for and mark uncorrectable artifacts. cfg.viewmode = 'vertical'; cfg.continuous = 'yes'; cfg.blocksize = 12; cfg = ft_databrowser(cfg,artifact_cleandata) %% % Do artifact rejection (also redefine settings lost during re-cfg in artefact rejection) cfg.trialdef.prestim = .2; cfg.trialdef.poststim = 2; cfg.trialdef.eventtype = 'STATUS'; cfg.artifact.reject = 'complete'; cfg.channel = 'EEG'; cfg = ft_rejectartifact(cfg, artifact_cleandata); trialdata = ft_preprocessing(cfg, artifact_cleandata); %% cfg = []; comp = ft_componentanalysis(cfg, trialdata); cfg = []; cfg.component = [1:20] cfg.layout = 'biosemi128.lay' cfg.comment = 'no' ft_topoplotIC(cfg,comp) So, the big question is - why do I get nothing after doing the channel repair. I've been through it several times and that seems to be the step where everything goes wrong. I've looked at the data post re-interpolation and it looks good - for now I'm assuming I've missed something. Thanks for any help Steve -------------- next part -------------- An HTML attachment was scrubbed... URL: From jm.horschig at donders.ru.nl Fri Jun 7 11:47:11 2013 From: jm.horschig at donders.ru.nl (=?ISO-8859-1?Q?=22J=F6rn_M=2E_Horschig=22?=) Date: Fri, 07 Jun 2013 11:47:11 +0200 Subject: [FieldTrip] Bad channel correction problems and ICA In-Reply-To: <55D211F2-5D76-43EE-B41A-EA05C8FFCE6F@swansea.ac.uk> References: <55D211F2-5D76-43EE-B41A-EA05C8FFCE6F@swansea.ac.uk> Message-ID: <51B1AC1F.1010008@donders.ru.nl> Hi Steve, I'm not quite sure what you mean with getting nothing (nothing like, empty? or an error?) or not getting real ICA results (real in contrast to complex?). My hunge is that you need to take the rank of your data into account. Interpolating missing channels is done by combining already existing information, i.e. channels, to reconstruct a time-course at another spatial location, i.e. another channel. Since you do not add any new information by this (it's just a linear combination of your existing data matrix), you can leave that step out prior to doing ICA. Otherwise, you can set something like ica_cfg.XXXica.pca = rank(data.trial{1}), then afaik ft_componentanalysis will perform a PCA and essentially identify that the interpolated channels are a linear combination of other channels (ICA is then done of the PCA components). Both methods are equivalent, so you might as well just drop the interpolation and remove bad channels completely. Best, Jörn On 6/7/2013 11:23 AM, Steve Johnston wrote: > Dear fters > > I've just started using ft and, although being able to run through a > test run of eye movement data just fine, I'm now getting into the more > detailed stuff and I'm hitting a snag that I hope you can help me with. > > Specifically I'm struggling to get any real ICA results after using > ft_channelrepair but not if I go through without it. > > Data was recorded on a biosemi 128 system and the trials are just eye > movements that I want to identify via ICA (simple test). > > If I just run through the procedure of importing data, set markers, > remove gross artifacts (keeping all channels, including 3 bad ones) > and then run the ICA - I get lovely eye movement components appearing. > However, now I want to do it 'properly' and replace the bad channels. > Currently I do the following ... (sorry, for completeness I included > everything to be on the safe side). > > %% > % Standard cfg for import > > cfg = []; > cfg.trialdef.prestim = .2; > cfg.trialdef.poststim = 2; > cfg.trialdef.eventtype = 'STATUS'; > > %% > %Load each dataset and examine for channels that are bad - starting > with EOG Localiser. > > cfg.dataset = [subjectdata.dir filesep > subjectdata.artifactfile]; > cfg.trialdef.eventvalue = markers.artifact; > cfg = ft_definetrial(cfg); > > cfg.demean = 'yes'; > data = ft_preprocessing(cfg); > > % After the above, run ChannelRepair after identifying bad channels. > %% > % Channel Replace - get nearest neighbours > cfg = []; > cfg.method = 'distance' > cfg.layout = 'biosemi128.lay'; > cfg.neighbourdist = 0.13; > [neighbours] = ft_prepare_neighbours(cfg,data) > > %% Interpolate and put into new data structure > cfg = []; > cfg.badchannel = replace_channels; > cfg.layout = 'biosemi128.lay'; > cfg.method = 'nearest'; > cfg.neighbours = neighbours; > cfg.neighbourdist = 0.13; > artifact_cleandata = ft_channelrepair(cfg,data) > > % Visualise data for and mark uncorrectable artifacts. > cfg.viewmode = 'vertical'; > cfg.continuous = 'yes'; > cfg.blocksize = 12; > cfg = ft_databrowser(cfg,artifact_cleandata) > > %% > % Do artifact rejection (also redefine settings lost during re-cfg in > artefact rejection) > cfg.trialdef.prestim = .2; > cfg.trialdef.poststim = 2; > cfg.trialdef.eventtype = 'STATUS'; > cfg.artifact.reject = 'complete'; > cfg.channel = 'EEG'; > cfg = ft_rejectartifact(cfg, artifact_cleandata); > trialdata = ft_preprocessing(cfg, artifact_cleandata); > > %% > cfg = []; > comp = ft_componentanalysis(cfg, trialdata); > cfg = []; > cfg.component = [1:20] > cfg.layout = 'biosemi128.lay' > cfg.comment = 'no' > ft_topoplotIC(cfg,comp) > > So, the big question is - why do I get nothing after doing the channel > repair. I've been through it several times and that seems to be the > step where everything goes wrong. I've looked at the data post > re-interpolation and it looks good - for now I'm assuming I've missed > something. > > Thanks for any help > > Steve > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -- Jörn M. Horschig PhD Student Donders Institute for Brain, Cognition and Behaviour Centre for Cognitive Neuroimaging Radboud University Nijmegen Neuronal Oscillations Group FieldTrip Development Team P.O. Box 9101 NL-6500 HB Nijmegen The Netherlands Contact: E-Mail: jm.horschig at donders.ru.nl Tel: +31-(0)24-36-68493 Web: http://www.ru.nl/donders Visiting address: Trigon, room 2.30 Kapittelweg 29 NL-6525 EN Nijmegen The Netherlands -------------- next part -------------- An HTML attachment was scrubbed... URL: From S.J.Johnston at swansea.ac.uk Fri Jun 7 11:59:10 2013 From: S.J.Johnston at swansea.ac.uk (Steve Johnston) Date: Fri, 7 Jun 2013 10:59:10 +0100 Subject: [FieldTrip] fieldtrip Digest, Vol 31, Issue 15 In-Reply-To: References: Message-ID: <49AE80C3-1CA6-402B-8819-3140FCFF7DC3@swansea.ac.uk> Thanks, and sorry, that was a pretty poor description of the results by me. Yes, I am getting a result, but the error/warning is 'Warning: Matrix is close to singular or badly scaled. Results may be inaccurate. RCOND = 1.376132e-17. ' I figured that matrix singularity may have been the problem, although I hadn't appreciated that replacing only three channels could lead to it - I was expecting that to result from more channel replacements or using a lot of electrodes to interpolate with. Thanks a lot for the help, will try as you suggest Steve > > > ---------------------------------------------------------------------- > > Message: 1 > Date: Fri, 7 Jun 2013 10:23:20 +0100 > From: Steve Johnston > To: "fieldtrip at science.ru.nl" > Subject: [FieldTrip] Bad channel correction problems and ICA > Message-ID: <55D211F2-5D76-43EE-B41A-EA05C8FFCE6F at swansea.ac.uk> > Content-Type: text/plain; charset="windows-1252" > > Dear fters > > I've just started using ft and, although being able to run through a test run of eye movement data just fine, I'm now getting into the more detailed stuff and I'm hitting a snag that I hope you can help me with. > > Specifically I'm struggling to get any real ICA results after using ft_channelrepair but not if I go through without it. > > Data was recorded on a biosemi 128 system and the trials are just eye movements that I want to identify via ICA (simple test). > > If I just run through the procedure of importing data, set markers, remove gross artifacts (keeping all channels, including 3 bad ones) and then run the ICA - I get lovely eye movement components appearing. However, now I want to do it 'properly' and replace the bad channels. Currently I do the following ? (sorry, for completeness I included everything to be on the safe side). > > %% > % Standard cfg for import > > cfg = []; > cfg.trialdef.prestim = .2; > cfg.trialdef.poststim = 2; > cfg.trialdef.eventtype = 'STATUS'; > > %% > %Load each dataset and examine for channels that are bad - starting with EOG Localiser. > > cfg.dataset = [subjectdata.dir filesep subjectdata.artifactfile]; > cfg.trialdef.eventvalue = markers.artifact; > cfg = ft_definetrial(cfg); > > cfg.demean = 'yes'; > data = ft_preprocessing(cfg); > > % After the above, run ChannelRepair after identifying bad channels. > %% > % Channel Replace - get nearest neighbours > cfg = []; > cfg.method = 'distance' > cfg.layout = 'biosemi128.lay'; > cfg.neighbourdist = 0.13; > [neighbours] = ft_prepare_neighbours(cfg,data) > > %% Interpolate and put into new data structure > cfg = []; > cfg.badchannel = replace_channels; > cfg.layout = 'biosemi128.lay'; > cfg.method = 'nearest'; > cfg.neighbours = neighbours; > cfg.neighbourdist = 0.13; > artifact_cleandata = ft_channelrepair(cfg,data) > > % Visualise data for and mark uncorrectable artifacts. > cfg.viewmode = 'vertical'; > cfg.continuous = 'yes'; > cfg.blocksize = 12; > cfg = ft_databrowser(cfg,artifact_cleandata) > > %% > % Do artifact rejection (also redefine settings lost during re-cfg in artefact rejection) > cfg.trialdef.prestim = .2; > cfg.trialdef.poststim = 2; > cfg.trialdef.eventtype = 'STATUS'; > cfg.artifact.reject = 'complete'; > cfg.channel = 'EEG'; > cfg = ft_rejectartifact(cfg, artifact_cleandata); > trialdata = ft_preprocessing(cfg, artifact_cleandata); > > %% > cfg = []; > comp = ft_componentanalysis(cfg, trialdata); > cfg = []; > cfg.component = [1:20] > cfg.layout = 'biosemi128.lay' > cfg.comment = 'no' > ft_topoplotIC(cfg,comp) > > So, the big question is - why do I get nothing after doing the channel repair. I've been through it several times and that seems to be the step where everything goes wrong. I've looked at the data post re-interpolation and it looks good - for now I'm assuming I've missed something. > > Thanks for any help > > Steve > -------------- next part -------------- > An HTML attachment was scrubbed... > URL: > > ------------------------------ > > Message: 2 > Date: Fri, 07 Jun 2013 11:47:11 +0200 > From: "J?rn M. Horschig" > To: FieldTrip discussion list > Subject: Re: [FieldTrip] Bad channel correction problems and ICA > Message-ID: <51B1AC1F.1010008 at donders.ru.nl> > Content-Type: text/plain; charset="iso-8859-1"; Format="flowed" > > Hi Steve, > > I'm not quite sure what you mean with getting nothing (nothing like, > empty? or an error?) or not getting real ICA results (real in contrast > to complex?). My hunge is that you need to take the rank of your data > into account. Interpolating missing channels is done by combining > already existing information, i.e. channels, to reconstruct a > time-course at another spatial location, i.e. another channel. Since you > do not add any new information by this (it's just a linear combination > of your existing data matrix), you can leave that step out prior to > doing ICA. Otherwise, you can set something like ica_cfg.XXXica.pca = > rank(data.trial{1}), then afaik ft_componentanalysis will perform a PCA > and essentially identify that the interpolated channels are a linear > combination of other channels (ICA is then done of the PCA components). > Both methods are equivalent, so you might as well just drop the > interpolation and remove bad channels completely. > > Best, > J?rn > > > On 6/7/2013 11:23 AM, Steve Johnston wrote: >> Dear fters >> >> I've just started using ft and, although being able to run through a >> test run of eye movement data just fine, I'm now getting into the more >> detailed stuff and I'm hitting a snag that I hope you can help me with. >> >> Specifically I'm struggling to get any real ICA results after using >> ft_channelrepair but not if I go through without it. >> >> Data was recorded on a biosemi 128 system and the trials are just eye >> movements that I want to identify via ICA (simple test). >> >> If I just run through the procedure of importing data, set markers, >> remove gross artifacts (keeping all channels, including 3 bad ones) >> and then run the ICA - I get lovely eye movement components appearing. >> However, now I want to do it 'properly' and replace the bad channels. >> Currently I do the following ... (sorry, for completeness I included >> everything to be on the safe side). >> >> %% >> % Standard cfg for import >> >> cfg = []; >> cfg.trialdef.prestim = .2; >> cfg.trialdef.poststim = 2; >> cfg.trialdef.eventtype = 'STATUS'; >> >> %% >> %Load each dataset and examine for channels that are bad - starting >> with EOG Localiser. >> >> cfg.dataset = [subjectdata.dir filesep >> subjectdata.artifactfile]; >> cfg.trialdef.eventvalue = markers.artifact; >> cfg = ft_definetrial(cfg); >> >> cfg.demean = 'yes'; >> data = ft_preprocessing(cfg); >> >> % After the above, run ChannelRepair after identifying bad channels. >> %% >> % Channel Replace - get nearest neighbours >> cfg = []; >> cfg.method = 'distance' >> cfg.layout = 'biosemi128.lay'; >> cfg.neighbourdist = 0.13; >> [neighbours] = ft_prepare_neighbours(cfg,data) >> >> %% Interpolate and put into new data structure >> cfg = []; >> cfg.badchannel = replace_channels; >> cfg.layout = 'biosemi128.lay'; >> cfg.method = 'nearest'; >> cfg.neighbours = neighbours; >> cfg.neighbourdist = 0.13; >> artifact_cleandata = ft_channelrepair(cfg,data) >> >> % Visualise data for and mark uncorrectable artifacts. >> cfg.viewmode = 'vertical'; >> cfg.continuous = 'yes'; >> cfg.blocksize = 12; >> cfg = ft_databrowser(cfg,artifact_cleandata) >> >> %% >> % Do artifact rejection (also redefine settings lost during re-cfg in >> artefact rejection) >> cfg.trialdef.prestim = .2; >> cfg.trialdef.poststim = 2; >> cfg.trialdef.eventtype = 'STATUS'; >> cfg.artifact.reject = 'complete'; >> cfg.channel = 'EEG'; >> cfg = ft_rejectartifact(cfg, artifact_cleandata); >> trialdata = ft_preprocessing(cfg, artifact_cleandata); >> >> %% >> cfg = []; >> comp = ft_componentanalysis(cfg, trialdata); >> cfg = []; >> cfg.component = [1:20] >> cfg.layout = 'biosemi128.lay' >> cfg.comment = 'no' >> ft_topoplotIC(cfg,comp) >> >> So, the big question is - why do I get nothing after doing the channel >> repair. I've been through it several times and that seems to be the >> step where everything goes wrong. I've looked at the data post >> re-interpolation and it looks good - for now I'm assuming I've missed >> something. >> >> Thanks for any help >> >> Steve >> >> >> _______________________________________________ >> fieldtrip mailing list >> fieldtrip at donders.ru.nl >> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > > -- > J?rn M. Horschig > PhD Student > Donders Institute for Brain, Cognition and Behaviour > Centre for Cognitive Neuroimaging > Radboud University Nijmegen > Neuronal Oscillations Group > FieldTrip Development Team > > P.O. Box 9101 > NL-6500 HB Nijmegen > The Netherlands > > Contact: > E-Mail: jm.horschig at donders.ru.nl > Tel: +31-(0)24-36-68493 > Web: http://www.ru.nl/donders > > Visiting address: > Trigon, room 2.30 > Kapittelweg 29 > NL-6525 EN Nijmegen > The Netherlands > > -------------- next part -------------- > An HTML attachment was scrubbed... > URL: > > ------------------------------ > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > End of fieldtrip Digest, Vol 31, Issue 15 > ***************************************** From robince at gmail.com Fri Jun 7 17:03:21 2013 From: robince at gmail.com (Robin) Date: Fri, 7 Jun 2013 16:03:21 +0100 Subject: [FieldTrip] some of the requested samples occur twice In-Reply-To: <51AC623A.1080207@donders.ru.nl> References: <51AC623A.1080207@donders.ru.nl> Message-ID: Hi Jörn, Thanks. I am already using negative trlpadding. In this case I am trying to do the artifact detection on in memory trial data, because I want to do it after denoise_pca. I am not sure if this is correct but it seemed to me that denoise_pca is to correct physical aquisition artifacts so it would be better to do it before trying to identify biological artifacts that are a part of the recorded signal. The code I am using is below. If you could point out how to add padding for the ft*artifact* section so that it can work on in memory data it would be great. Thanks, Robin %% Automatic artifact rejection % for each run run_data = cell(1,length(sub.blocks)); trl_idx = 0; for ri=1:length(sub.blocks) % extra data to allow padding in artifact detection filterpad = 0.2; prestim = 0.5; poststim = 0.6; % extract trials cfg = []; cfg.dataset = fullfile(sub.megDataPath, num2str(sub.blocks(ri)), 'c,rfDC'); cfg.trialdef.eventtype = 'TRIGGER'; cfg.trialdef.eventvalue = 192; cfg.trialdef.prestim = prestim + filterpad; cfg.trialdef.poststim = poststim + filterpad; cfg.trialfun = 'ft_trialfun_general'; cfg.continuous = 'yes'; cfg = ft_definetrial(cfg); % overwrite unnecessary constant eventvalue % with trial number within this block cfg.trl(:,4) = (1:size(cfg.trl,1)) + trl_idx; trl_idx = trl_idx + size(cfg.trl,1); % remove jump artifact trials trlidx = ismember(cfg.trl(:,4), good_trials); cfg.trl = cfg.trl(trlidx, :); % load cfg.detrend = 'yes'; % long padding for line noise removal cfg.dftfilter = 'yes'; cfg.padding = 10; run_raw = ft_preprocessing(cfg); % apply denoise_pca cfg = []; if isfield(sub,'posthoc_badchannels') remove_chans = sub.posthoc_badchannels; else remove_chans = {}; end cfg.channel = ft_channelselection([{'all'} remove_chans], good_meg_channels); cfg.trials = find(ismember(run_raw.trialinfo, good_trials)); run_clean = ft_denoise_pca(cfg, run_raw); % artifact detection cfg = []; cfg.continuous = 'no'; % some trials are excluded cfg.trl = run_clean.sampleinfo; cfg.artfctdef.muscle.trlpadding = -filterpad; cfg.artfctdef.muscle.cutoff = 20; [cfg, artifact] = ft_artifact_muscle(cfg, run_clean); cfg.artfctdef.eog.trlpadding = -filterpad; cfg.artfctdef.eog.channel = {'A150' 'A124'}; cfg.artfctdef.eog.cutoff = 5; [cfg, artifact] = ft_artifact_eog(cfg, run_clean); % reject artifacts cfg.artfctdef.reject = 'complete'; run_artfree = ft_rejectartifact(cfg, run_clean); % reduce to the original window cfg = []; cfg.toilim = [-prestim poststim]; run_artfree = ft_redefinetrial(cfg, run_artfree); run_data{ri} = run_artfree;end On Mon, Jun 3, 2013 at 10:30 AM, "Jörn M. Horschig" < jm.horschig at donders.ru.nl> wrote: Hi Robin, > > it's not a bug that ft_fetch_data is not allowing for overlap. The > function needs to be generic and eventually allow for fetching data > extending over several trial segments. However, what should be the way to > fetch data that occurs twice, i.e. at the end of one trial and the > beginning of another? If you have data with overlapping samples, it is not > straight forward to define data from one trial as to be fetched and ignore > the other. Since preprocessing options like filters are applied per trial > segment, data will differ between trial segments if it overlaps. As there > are a multitude of possibilities to deal with this and none of them is > perfect (imho neither of them can even be called good), we decided to not > allow for that. > > For your problem, however, imho you can define negative trial padding in > the function call to ft_artifact_zvalue, which should effectively pad. Have > you tried this rather than padding manually? > > Best, > Jörn > > > On 5/31/2013 6:14 PM, Robin wrote: > >> I have a problem in preprocessing where I am getting this error: >> >> """ >> some of the requested samples occur twice in the data >> >> Error in ft_artifact_zvalue (line 262) >> dat{trlop} = ft_fetch_data(data, 'header', hdr, 'begsample', >> trl(trlop,1)-fltpadding, 'endsample', trl(trlop,2)+fltpadding, >> 'chanindx', sgnind, 'checkboundary', strcmp(cfg.continuous,'no >> Error in ft_artifact_muscle (line 158) >> [tmpcfg, artifact] = ft_artifact_zvalue(tmpcfg, data); >> """ >> >> I think this is because I am manually adding some extra padding to the >> trials so that the artifact filtering can use that padding (I am doing >> the artifact filtering on data in memory which is output from >> ft_denoise_pca). So in this case it is not a problem if consecutive >> trials overlap a bit. >> >> I would therefore like to disable this error and wondered what is the >> best way to do it. I am a bit confused because ft_artifact_zvalue >> calls ft_fetch data with a "checkboundary" option which looks like it >> might be what I want (and set correctly), but ft_fetch_data doesn't >> seem to use that option. Instead it has an allowoverlap option. >> >> So for now I will manually add the allowoverlap option to the call in >> ft_artifact_zvalue, but I wondered what checkboundary doesn't appear >> in ft_fetch_data or if this might be a bug. >> >> Cheers >> >> Robin >> ______________________________**_________________ >> fieldtrip mailing list >> fieldtrip at donders.ru.nl >> http://mailman.science.ru.nl/**mailman/listinfo/fieldtrip >> > > > -- > Jörn M. Horschig > PhD Student > Donders Institute for Brain, Cognition and Behaviour > Centre for Cognitive Neuroimaging > Radboud University Nijmegen > Neuronal Oscillations Group > FieldTrip Development Team > > P.O. Box 9101 > NL-6500 HB Nijmegen > The Netherlands > > Contact: > E-Mail: jm.horschig at donders.ru.nl > Tel: +31-(0)24-36-68493 > Web: http://www.ru.nl/donders > > Visiting address: > Trigon, room 2.30 > Kapittelweg 29 > NL-6525 EN Nijmegen > The Netherlands > > ______________________________**_________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/**mailman/listinfo/fieldtrip > -------------- next part -------------- An HTML attachment was scrubbed... URL: From jkamienk at gmail.com Fri Jun 7 19:02:22 2013 From: jkamienk at gmail.com (Juan Kamienkowski) Date: Fri, 7 Jun 2013 14:02:22 -0300 Subject: [FieldTrip] Cluster-based permutation tests on single channel Message-ID: Hi, I wanted to perform a Cluster-based permutation tests on time-frequency data, on a single channel (one Independent Component). But the ft_freqstatistics() function ask me for the "neighbours" field in the "cfg" structure, although I set the cfg.minnbchan to 0. Is there a way to run this analysis in a single channel? Thanks a lot in advance! Best, Juan -- Juan E Kamienkowski Laboratorio de Neurociencia Integrativa Departamento de Fisica, FCEN-UBA Ciudad Universitaria, Pabellon I (1428) Buenos Aires, Argentina Phone: (54-11) 4576 3300 (282) Fax: (54-11) 4576 3357 http://www.neurociencia.df.uba.ar/ -------------- next part -------------- An HTML attachment was scrubbed... URL: From Don.Rojas at ucdenver.edu Fri Jun 7 23:37:10 2013 From: Don.Rojas at ucdenver.edu (Rojas, Don) Date: Fri, 7 Jun 2013 15:37:10 -0600 Subject: [FieldTrip] Cluster-based permutation tests on single channel In-Reply-To: References: Message-ID: Juan, The neighbours field is for defining adjacent channels for multi-channel multiple comparison correction. I'm not sure if you've gotten a response on this yet, but you simply set the cfg.neighbours field to be empty in your call to ft_freqstatistics for using cluster based corrections within time-frequency space for single channels. cfg.neighbours = []; Best, Don On Jun 7, 2013, at 11:02 AM, Juan Kamienkowski > wrote: Hi, I wanted to perform a Cluster-based permutation tests on time-frequency data, on a single channel (one Independent Component). But the ft_freqstatistics() function ask me for the "neighbours" field in the "cfg" structure, although I set the cfg.minnbchan to 0. Is there a way to run this analysis in a single channel? Thanks a lot in advance! Best, Juan -- Juan E Kamienkowski Laboratorio de Neurociencia Integrativa Departamento de Fisica, FCEN-UBA Ciudad Universitaria, Pabellon I (1428) Buenos Aires, Argentina Phone: (54-11) 4576 3300 (282) Fax: (54-11) 4576 3357 http://www.neurociencia.df.uba.ar/ _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -------------- next part -------------- An HTML attachment was scrubbed... URL: From Don.Rojas at ucdenver.edu Fri Jun 7 23:37:10 2013 From: Don.Rojas at ucdenver.edu (Rojas, Don) Date: Fri, 7 Jun 2013 15:37:10 -0600 Subject: [FieldTrip] Cluster-based permutation tests on single channel In-Reply-To: References: Message-ID: Juan, The neighbours field is for defining adjacent channels for multi-channel multiple comparison correction. I'm not sure if you've gotten a response on this yet, but you simply set the cfg.neighbours field to be empty in your call to ft_freqstatistics for using cluster based corrections within time-frequency space for single channels. cfg.neighbours = []; Best, Don On Jun 7, 2013, at 11:02 AM, Juan Kamienkowski > wrote: Hi, I wanted to perform a Cluster-based permutation tests on time-frequency data, on a single channel (one Independent Component). But the ft_freqstatistics() function ask me for the "neighbours" field in the "cfg" structure, although I set the cfg.minnbchan to 0. Is there a way to run this analysis in a single channel? Thanks a lot in advance! Best, Juan -- Juan E Kamienkowski Laboratorio de Neurociencia Integrativa Departamento de Fisica, FCEN-UBA Ciudad Universitaria, Pabellon I (1428) Buenos Aires, Argentina Phone: (54-11) 4576 3300 (282) Fax: (54-11) 4576 3357 http://www.neurociencia.df.uba.ar/ _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -------------- next part -------------- An HTML attachment was scrubbed... URL: From haristz at gmail.com Sat Jun 8 00:25:03 2013 From: haristz at gmail.com (Charidimos Tzagarakis) Date: Fri, 7 Jun 2013 17:25:03 -0500 Subject: [FieldTrip] Using ft_rejectcomponent after PCA reduction Message-ID: Dear Fieldtripverse, I have been experimenting with using ICA for artifact correction and have the following question: Because of the relatively large number of channels vs samples I have, I use the option to first reduce the dimensionality of the data with PCA (I have 248 MEG channels and I select, say 100 components, using the cfg.numcomponent=100 and cfg.runica.pca=100 in the call to ft_componentanalysis ). So the "topo" matrix in the component output structure has dimensions 248x100 and the unmixing matrix has dimensions 100x248. I then use something like "data = ft_rejectcomponent(cfg, comp,data)" to say reject 2 components cfg.component=[30 40] that contain ECG signal. Note: data here is the original data I fed in the ft_componentanalysis function. This is all pretty straightforward and as described in the Fieldtrip tutorial (minus the PCA part) . I am however a bit worried by the message:"removing 2 components keeping 246 components" I get in the end. Should it not be "removing 2 components keeping 98 components"? When I look in the code for ft_rejectcomponent, I can see that if "hasdata" is True the message is calculated based on the number of channels : fprintf('keeping %d components\n', nchans-length(cfg.component)); On the other hand (as far as I can tell, not being an ICA expert) the actual calculation for the removal of the desired components seems to correctly use the components selected for removal : mixing = comp.topo(selcomp,:); unmixing = comp.unmixing(:,selcomp); tra = eye(length(selcomp)) - mixing(:, cfg.component)*unmixing(cfg. component, :); (I do note the comment under that snippet!: %I am not sure about this, but it gives comparable results to the ~hasdata case %when comp contains non-orthogonal (=ica) topographies, and contains a complete decomposition) Further down the function code there are however more operations (eg remove unused channels, remove unused components ) where I am less able to follow things to make sure it is robust to non-square mixing and unmixing matrices. In summary, I wanted to ask if it is OK to use ft_rejectcomponent in this way (ie without decomposing to the full number of ICA's and then using it on the original data). With Thanks and Best Wishes, Haris Charidimos [Haris] Tzagarakis MD, PhD, MRCPsych University of Minnesota Dept of Neuroscience and Brain Sciences Center -------------- next part -------------- An HTML attachment was scrubbed... URL: From mengtongxiao at gmail.com Sun Jun 9 03:31:56 2013 From: mengtongxiao at gmail.com (=?GB2312?B?s8LRqQ==?=) Date: Sun, 9 Jun 2013 09:31:56 +0800 Subject: [FieldTrip] what is the MNI-template be use to constructed sourcemodel , MNI125 or colin27? Message-ID: Dear all I use the model ( fieldtrip/template/sourcemodel ) doing source reconstruction with beamformer . I want to know the template is matching MNI125 or colin27 . thanks. best , xiao -------------- next part -------------- An HTML attachment was scrubbed... URL: From nomeserio at gmail.com Mon Jun 10 10:29:21 2013 From: nomeserio at gmail.com (Michele Barsotti) Date: Mon, 10 Jun 2013 10:29:21 +0200 Subject: [FieldTrip] Downloading FieldTrip Message-ID: Dear FieldTrip users and staff, I'm dealing with the download of fieldtrip but everytime I try a download error occurs with this message: "...fieldtrip-aaaammgg.zip could not be saved, because the source file could not be read. Try again later, or contact the server administrator." Can someone help me? Thank in advance -- -Michele- -------------- next part -------------- An HTML attachment was scrubbed... URL: From joramvandriel at gmail.com Mon Jun 10 16:09:25 2013 From: joramvandriel at gmail.com (Joram van Driel) Date: Mon, 10 Jun 2013 16:09:25 +0200 Subject: [FieldTrip] BEM for MEG data Message-ID: Dear Fieldtrip users and developers, I've been struggling quite some time now with the following problem. We want to do source localization of MEG data from an experiment with 10 subjects. We collected MRIs using a Phillips scanner (UvA), and MEG data using the Neuromag Elekta scanner (VUmc). Using Neuromag software in Linux (seglab, xfit), I've created BEM forward models based on coregistered MRIs (coregistration also done using the Neuromag package), which result in .fif files (extension *bem-sol.fif). Using these models we want to continue computing the leadfields and doing source reconstruction in Matlab. For the latter, we have our own customized codes; to get the leadfield, we need some step in between. I'm trying to use fieldtrip functions for this but I get stuck. Here's what I do: - Import the bem fif files using the mne toolbox (function: mne_read_bem_surfaces). - Attach the imported boundary data to a vol structure as follows: [bem] = mne_read_bem_surfaces(bemfilz(subno).name); vol = []; vol.bnd.pnt = bem.rr; vol.bnd.tri = double(bem.tris); vol.unit = 'mm'; vol.cfg.sourceunits = 'mm'; vol.type = 'bemcp'; vol.cfg.numvertices = bem.np; - Import the sensor locations using ft_read_sens and convert to mm using ft_convert_units. - Check whether the resulting structures are OK for leadfield computation using ft_prepare_vol_sens. This results in an error "Unsupported volume conductor model for MEG". I also tried ft_read_vol, but for Neuromag this needs the meg-pd toolbox which doesn't run on Windows (the Linux we use for the Neuromag software, in turn, is a virtual machine and doesn't have Matlab). Is there a way around this? Using BEM models for MEG data should in principle be possible, but not using Fieldtrip? Any suggestions would be much appreciated! Thanks in advance, Joram -- Joram van Driel, MSc. PhD student at the University of Amsterdam Department of Psychology, Brain & Cognition -------------- next part -------------- An HTML attachment was scrubbed... URL: From aaron.schurger at gmail.com Mon Jun 10 18:11:23 2013 From: aaron.schurger at gmail.com (Aaron Schurger) Date: Mon, 10 Jun 2013 18:11:23 +0200 Subject: [FieldTrip] What are the units output by ft_freqanalysis_tfr? Message-ID: Hi, I am preparing figures for a paper, one of which is a time-frequency plot of the output from ft_freqanalysis (using the tfr method). The units of the data going in were on the order of 10e-11 or smaller (MEG data), but the units on the color (power) axis of the plot are on the order of 10e-1. Are the units normalized by default when you use ft_freqanalysis? If not then what are the units? The help on these functions was short on this kind of detail. Thanks! Aaron Schurger -- Aaron Schurger, PhD Post-doctoral researcher INSERM U992 / NeuroSpin CEA - Saclay, France +33-1-69-08-66-47 aaron.schurger at gmail.com http://www.unicog.org From ivan.skelin at uleth.ca Tue Jun 11 03:57:55 2013 From: ivan.skelin at uleth.ca (Skelin, Ivan) Date: Mon, 10 Jun 2013 18:57:55 -0700 Subject: [FieldTrip] ncs file downsampling and further processing Message-ID: Hi, I am recording from the anesthetized rats using the two NeuroNexus silicone probes with 8 tetrodes (32 channels) each and Neuralynx Cheetah system at 32556 Hz sampling frequency. I choose to analyze the .ncs files from 1/4 of the channels or 1 channel per tetrode. Since the recordings took about 150 mins, the .ncs files are too bulky (0.5 GB) for the standard procedure that the FieldTrip recommends for discontinuous data recorded using Neuralynx system. More precisely, when I preprocess the channels separately and subsequently run the ft_read_neuralynx_interp on them, I get the "out of memory" error message (even when running it on only two .ncs files at the time). My question is if I can first downsample all the .csc files that I want to analyze using the ft_spikedownsample, before I run the ft_read_neuralynx_interp on them? Thank you very much, Ivan -- Ivan Skelin, MD, PhD Postdoctoral Fellow Polaris Brain Dynamics Research Group Canadian Centre for Behavioural Neuroscience The University of Lethbridge 4401 University Dr W Lethbridge, AB, T1K 3M4 Canada http://lethbridgebraindynamics.com -------------- next part -------------- An HTML attachment was scrubbed... URL: From explena at gmail.com Tue Jun 11 09:48:34 2013 From: explena at gmail.com (Shen-Mou Hsu) Date: Tue, 11 Jun 2013 15:48:34 +0800 Subject: [FieldTrip] ROC_based permutation test Message-ID: Dear all, I was trying to perform signle-trial ROC-based permutation tests using the statfun_roc. However I encountered two questions and wondered if anyone could kindly shed some light on the issues. First, is it necessary to perform baseline normalization for each trial before the tests? Second, an error message returned stating "Error using roc. Too many input arguments. Error using ft_statistics_montecarlo (line 223) could not determine the parametric critical value for clustering", after running the following script: load (['t_RF_EpoRejDePow']); load (['t_RN_EpoRejDePow']); cfg = []; cfg.channel = 'MEG'; cfg.latency = [-0.35 0.55]; cfg.frequency = [8 12]; cfg.parameter = 'powspctrm'; cfg.method = 'montecarlo'; cfg.statistic = 'roc'; cfg.alpha = 0.025; cfg.tail = 0; cfg.correctm = 'cluster'; cfg.clusteralpha = 0.05; % cfg.correcttail = 'prob'; cfg.clustertail = 0; cfg.numrandomization = 1000; cfg.minnbchan = 2; cfg_neighb.method = 'distance'; cfg.neighbours = ft_prepare_neighbours(cfg_neighb, t_RN_EpoRejDePow); cfg.logtransform = 'yes'; design = [1*ones(1,size(t_RF_EpoRejDePow.powspctrm,1)) 2*ones(1,size(t_RN_EpoRejDePow.powspctrm,1))]; % the first dimension of these variable is the trial number. cfg.design = design; P_ROC_t_RFvsRN = ft_freqstatistics(cfg,t_RF_EpoRejDePow,t_RN_EpoRejDePow); Any help is greatly appreciated. Best regards, Shen-Mou Hsu -------------- next part -------------- An HTML attachment was scrubbed... URL: From eelke.spaak at donders.ru.nl Tue Jun 11 09:58:58 2013 From: eelke.spaak at donders.ru.nl (Eelke Spaak) Date: Tue, 11 Jun 2013 09:58:58 +0200 Subject: [FieldTrip] What are the units output by ft_freqanalysis_tfr? In-Reply-To: References: Message-ID: Hi Aaron, How are you plotting the data? If you are using ft_single/multi/topoplotTFR, did you use baseline correction (cfg.baseline = 'yes' or [begin end])? If you use cfg.baselinetype = 'relative' or cfg.baselinetype = 'relchange', data plotted will typically be on the order of 10e-1. It represents ratio vs baseline ('relative') or relative change vs baseline ('relchange'). If you did not specify baseline correction, then there is something else going on. In any case, ft_freqanalysis does not explicitly transform/normalize units; it does not care about them. Best, Eelke On 10 June 2013 18:11, Aaron Schurger wrote: > Hi, > I am preparing figures for a paper, one of which is a time-frequency > plot of the output from ft_freqanalysis (using the tfr method). The > units of the data going in were on the order of 10e-11 or smaller (MEG > data), but the units on the color (power) axis of the plot are on the > order of 10e-1. Are the units normalized by default when you use > ft_freqanalysis? If not then what are the units? The help on these > functions was short on this kind of detail. > Thanks! > Aaron Schurger > > -- > Aaron Schurger, PhD > Post-doctoral researcher > INSERM U992 / NeuroSpin > CEA - Saclay, France > +33-1-69-08-66-47 > aaron.schurger at gmail.com > http://www.unicog.org > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip From eelke.spaak at donders.ru.nl Tue Jun 11 10:18:09 2013 From: eelke.spaak at donders.ru.nl (Eelke Spaak) Date: Tue, 11 Jun 2013 10:18:09 +0200 Subject: [FieldTrip] ROC_based permutation test In-Reply-To: References: Message-ID: Dear Shen-Mou Hsu, With regards to your first question, I do not know the answer, so someone else might help you there. In response to your second question, regarding the error "could not determine the parametric critical value for clustering", this is caused by the value of cfg.clusterthreshold used. The default value there is 'parametric', meaning that the statistics routine will ask your 'statfun' to compute a parametric threshold for considering a (time/frequency/channel)-voxel a cluster-member candidate. This can be done by e.g. depsamplesT or indepsamplesT, as it is possible to analytically compute a T value corresponding to p < 0.05. However, in the case of the ROC statistic, no such parametric estimate can be computed (or perhaps it can be in some way, I don't know, but at least I know the FT implementation does not). Fortunately, the statistics routines also allow you to use a nonparametric threshold for cluster-member candidates, based on the generated distribution of the test statistic under the null hypothesis. To use this, simply specify cfg.clusterthreshold = 'nonparametric_individual' or cfg.clusterthreshold = 'nonparametric_common'. The difference between the two is that the former computes a threshold per voxel, and the latter uses the same threshold for all voxels. Which one is appropriate for you I don't know. (Good reasons for using 'nonparametric_individual' might be a strong variation of your test statistic with frequency. I know for a fact this is the case with certain quantifications of phase-amplitude coupling; these show much higher values in the low frequencies even when computed on noise.) Hope this helps. Best, Eelke On 11 June 2013 09:48, Shen-Mou Hsu wrote: > Dear all, > > I was trying to perform signle-trial ROC-based permutation tests using the > statfun_roc. However I encountered two questions and wondered if anyone > could kindly shed some light on the issues. First, is it necessary to > perform baseline normalization for each trial before the tests? Second, an > error message returned stating "Error using roc. Too many input arguments. > Error using ft_statistics_montecarlo (line 223) could not determine the > parametric critical value for clustering", after running the following > script: > > load (['t_RF_EpoRejDePow']); load (['t_RN_EpoRejDePow']); > > cfg = []; > cfg.channel = 'MEG'; > cfg.latency = [-0.35 0.55]; > cfg.frequency = [8 12]; > cfg.parameter = 'powspctrm'; > cfg.method = 'montecarlo'; > cfg.statistic = 'roc'; > cfg.alpha = 0.025; > cfg.tail = 0; > cfg.correctm = 'cluster'; > cfg.clusteralpha = 0.05; > % cfg.correcttail = 'prob'; > cfg.clustertail = 0; > cfg.numrandomization = 1000; > cfg.minnbchan = 2; > cfg_neighb.method = 'distance'; > cfg.neighbours = ft_prepare_neighbours(cfg_neighb, t_RN_EpoRejDePow); > cfg.logtransform = 'yes'; > > design = [1*ones(1,size(t_RF_EpoRejDePow.powspctrm,1)) > 2*ones(1,size(t_RN_EpoRejDePow.powspctrm,1))]; % the first dimension of > these variable is the trial number. > cfg.design = design; > > P_ROC_t_RFvsRN = ft_freqstatistics(cfg,t_RF_EpoRejDePow,t_RN_EpoRejDePow); > > > Any help is greatly appreciated. > > Best regards, > > Shen-Mou Hsu > > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip From aaron.schurger at gmail.com Tue Jun 11 11:00:03 2013 From: aaron.schurger at gmail.com (Aaron Schurger) Date: Tue, 11 Jun 2013 11:00:03 +0200 Subject: [FieldTrip] What are the units output by ft_freqanalysis_tfr? In-Reply-To: References: Message-ID: Hi, Eelke, Thanks for your reply. I think that might explain it. When I step through my code, I see that the units are as expected for MEG in the output from ft_freqanalysis, so it must be something after that stage that is changing. Thanks for the tip! Best wishes, Aaron On Tue, Jun 11, 2013 at 9:58 AM, Eelke Spaak wrote: > Hi Aaron, > > How are you plotting the data? If you are using > ft_single/multi/topoplotTFR, did you use baseline correction > (cfg.baseline = 'yes' or [begin end])? If you use cfg.baselinetype = > 'relative' or cfg.baselinetype = 'relchange', data plotted will > typically be on the order of 10e-1. It represents ratio vs baseline > ('relative') or relative change vs baseline ('relchange'). > > If you did not specify baseline correction, then there is something > else going on. In any case, ft_freqanalysis does not explicitly > transform/normalize units; it does not care about them. > > Best, > Eelke > > On 10 June 2013 18:11, Aaron Schurger wrote: >> Hi, >> I am preparing figures for a paper, one of which is a time-frequency >> plot of the output from ft_freqanalysis (using the tfr method). The >> units of the data going in were on the order of 10e-11 or smaller (MEG >> data), but the units on the color (power) axis of the plot are on the >> order of 10e-1. Are the units normalized by default when you use >> ft_freqanalysis? If not then what are the units? The help on these >> functions was short on this kind of detail. >> Thanks! >> Aaron Schurger >> >> -- >> Aaron Schurger, PhD >> Post-doctoral researcher >> INSERM U992 / NeuroSpin >> CEA - Saclay, France >> +33-1-69-08-66-47 >> aaron.schurger at gmail.com >> http://www.unicog.org >> _______________________________________________ >> fieldtrip mailing list >> fieldtrip at donders.ru.nl >> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -- Aaron Schurger, PhD Post-doctoral researcher INSERM U992 / NeuroSpin CEA - Saclay, France +33-1-69-08-66-47 aaron.schurger at gmail.com http://www.unicog.org From nicolai at mersebak.dk Wed Jun 12 15:44:00 2013 From: nicolai at mersebak.dk (Nicolai Mersebak) Date: Wed, 12 Jun 2013 15:44:00 +0200 Subject: [FieldTrip] Source statistics on spatio-temporal source reconstruction data (MNE) Message-ID: Dear all, I have a question concerning the usage of ft_sourcegrandaverage and ft_sourcestatistics. After using ft_sourceanalysis (method: MNE), I get spatio-temporal source reconstructed data in source.avg.pow (4050 x 897): 4050 sources and 897 time points. Now I would like to use the cluster-based permutation test on my source reconstructed data. However it seems like ft_sourcegrandaverage and ft_sourcestatistics don't support source level time courses. E.g when I am using ft_sourcegrandaverage I am getting the following error: Error in ft_sourcegrandaverage (line 158) dat(:,i) = tmp(:); Looking into the code: for i=1:Nsubject tmp = getsubfield(varargin{i}, parameterselection(cfg.parameter, varargin{i})); dat(:,i) = tmp(:); tmp = getsubfield(varargin{i}, 'inside'); inside(tmp,i) = 1; end I see that "tmp" are getting the structure [N_sources x timepoints] from source.avg.pow for one subject, where "dat" requires the structure [N_sources x 1]. I seached the mailing list for similar issues and found this thread: http://mailman.science.ru.nl/pipermail/fieldtrip/2010-September/003122.html Since I am interested in using the temporal dimension in my statistics, I would like to know if it is still not possible to use spatio-temporal source reconstructed data in ft_sourcestatistics and ft_sourcegrandaverage ? Or if any have succeeded in using the cluster-based permutation test on source level also including the temporal dimension ? Alternative I was thinking that I might could use ft_timelockstatistics, where I substituted the channels with sources, e.g instead of having 64 channels, I would now have 4050 "channels". If so I need to calculate a label structure and an appropriate neighbor structure, which I guess is possible as I have all the 3D coordinates for each source, e.g in leadfield.pos ? I know this is a work around solution, but have anyone tried or have any experience using such an approach ? Best, Nicolai -------------- next part -------------- An HTML attachment was scrubbed... URL: From johanna.zumer at donders.ru.nl Wed Jun 12 16:03:16 2013 From: johanna.zumer at donders.ru.nl (Johanna Zumer) Date: Wed, 12 Jun 2013 16:03:16 +0200 Subject: [FieldTrip] Source statistics on spatio-temporal source reconstruction data (MNE) In-Reply-To: References: Message-ID: Dear Nicolai, Good timing, I have just last week filed a 'bug' for this code modification request: http://bugzilla.fcdonders.nl/show_bug.cgi?id=2185 You may add yourself to the CC list if you wish to receive updates on the bug progress. I would be interested to hear if anyone else has thoughts on your suggestion to 'hack' it as a timelock structure with channels. Best, Johanna 2013/6/12 Nicolai Mersebak > Dear all, > > I have a question concerning the usage of ft_sourcegrandaverage and > ft_sourcestatistics. > > After using ft_sourceanalysis (method: MNE), I get spatio-temporal source > reconstructed data in source.avg.pow (4050 x 897): 4050 sources and 897 > time points. > > Now I would like to use the cluster-based permutation test on my source > reconstructed data. However it seems like ft_sourcegrandaverage and ft_sourcestatistics > don't support source level time courses. E.g when I am using ft_sourcegrandaverage > I am getting the following error: > > Error in ft_sourcegrandaverage (line 158) > dat(:,i) = tmp(:); > > Looking into the code: > > for i=1:Nsubject > > tmp = getsubfield(varargin{i}, parameterselection(cfg.parameter, > varargin{i})); > > dat(:,i) = tmp(:); > > tmp = getsubfield(varargin{i}, 'inside'); > > inside(tmp,i) = 1; > > end > > I see that "tmp" are getting the structure [N_sources x timepoints] from > source.avg.pow for one subject, where "dat" requires the structure > [N_sources x 1]. > > I seached the mailing list for similar issues and found this thread: > > http://mailman.science.ru.nl/pipermail/fieldtrip/2010-September/003122.html > > Since I am interested in using the temporal dimension in my statistics, I > would like to know if it is still not possible to use spatio-temporal > source reconstructed data in ft_sourcestatistics and ft_sourcegrandaverage ? > > Or if any have succeeded in using the cluster-based permutation test on > source level also including the temporal dimension ? > > Alternative I was thinking that I might could use ft_timelockstatistics, > where I substituted the channels with sources, e.g instead of having 64 > channels, I would now have 4050 "channels". > If so I need to calculate a label structure and an appropriate neighbor > structure, which I guess is possible as I have all the 3D coordinates for > each source, e.g in leadfield.pos ? > I know this is a work around solution, but have anyone tried or have any > experience using such an approach ? > > Best, > > Nicolai > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > -------------- next part -------------- An HTML attachment was scrubbed... URL: From jm.horschig at donders.ru.nl Wed Jun 12 16:20:29 2013 From: jm.horschig at donders.ru.nl (=?ISO-8859-1?Q?=22J=F6rn_M=2E_Horschig=22?=) Date: Wed, 12 Jun 2013 16:20:29 +0200 Subject: [FieldTrip] Source statistics on spatio-temporal source reconstruction data (MNE) In-Reply-To: References: Message-ID: <51B883AD.8020707@donders.ru.nl> Heyho, it might be a good way, at least I am doing it that way :) But think about defining neighbouring voxels beforehands (easily doable for a decent programmer, hard for a not-so-experienced programmer). In the upcoming months/years there will be something changing on the source-front anyway, so maybe it is best to use the temporary solution with ft_timelockXXX until then. Note that my personal opinion does not necessarily reflect the opinion of the core dev team ;) Best, Jörn On 6/12/2013 4:03 PM, Johanna Zumer wrote: > Dear Nicolai, > > Good timing, I have just last week filed a 'bug' for this code > modification request: http://bugzilla.fcdonders.nl/show_bug.cgi?id=2185 > You may add yourself to the CC list if you wish to receive updates on > the bug progress. > > I would be interested to hear if anyone else has thoughts on your > suggestion to 'hack' it as a timelock structure with channels. > > Best, > Johanna > > > 2013/6/12 Nicolai Mersebak > > > Dear all, > > I have a question concerning the usage of ft_sourcegrandaverage > and ft_sourcestatistics. > > After using ft_sourceanalysis (method: MNE), I get spatio-temporal > source reconstructed data in source.avg.pow (4050 x 897): 4050 > sources and 897 time points. > > Now I would like to use the cluster-based permutation test on my > source reconstructed data. However it seems like > ft_sourcegrandaverage and ft_sourcestatistics don't support source > level time courses. E.g when I am using ft_sourcegrandaverage I am > getting the following error: > > Error in ft_sourcegrandaverage (line 158) > dat(:,i) = tmp(:); > > Looking into the code: > > for i=1:Nsubject > > tmp = getsubfield(varargin{i}, parameterselection(cfg.parameter, > varargin{i})); > > dat(:,i) = tmp(:); > > tmp = getsubfield(varargin{i}, 'inside'); > > inside(tmp,i) = 1; > > end > > > I see that "tmp" are getting the structure [N_sources x > timepoints] from source.avg.pow for one subject, where "dat" > requires the structure [N_sources x 1]. > > I seached the mailing list for similar issues and found this thread: > > http://mailman.science.ru.nl/pipermail/fieldtrip/2010-September/003122.html > > Since I am interested in using the temporal dimension in my > statistics, I would like to know if it is still not possible to > use spatio-temporal source reconstructed data in > ft_sourcestatistics and ft_sourcegrandaverage ? > > Or if any have succeeded in using the cluster-based permutation > test on source level also including the temporal dimension ? > > Alternative I was thinking that I might could use > ft_timelockstatistics, where I substituted the channels with > sources, e.g instead of having 64 channels, I would now have 4050 > "channels". > If so I need to calculate a label structure and an appropriate > neighbor structure, which I guess is possible as I have all the 3D > coordinates for each source, e.g in leadfield.pos ? > I know this is a work around solution, but have anyone tried or > have any experience using such an approach ? > > Best, > > Nicolai > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -- Jörn M. Horschig PhD Student Donders Institute for Brain, Cognition and Behaviour Centre for Cognitive Neuroimaging Radboud University Nijmegen Neuronal Oscillations Group FieldTrip Development Team P.O. Box 9101 NL-6500 HB Nijmegen The Netherlands Contact: E-Mail: jm.horschig at donders.ru.nl Tel: +31-(0)24-36-68493 Web: http://www.ru.nl/donders Visiting address: Trigon, room 2.30 Kapittelweg 29 NL-6525 EN Nijmegen The Netherlands -------------- next part -------------- An HTML attachment was scrubbed... URL: From smoratti at psi.ucm.es Wed Jun 12 17:44:59 2013 From: smoratti at psi.ucm.es (smoratti at psi.ucm.es) Date: Wed, 12 Jun 2013 17:44:59 +0200 Subject: [FieldTrip] Source statistics on spatio-temporal source reconstruction data (MNE) In-Reply-To: References: Message-ID: <05B1DB8A-163B-40C0-B303-5B7D2A5434BD@psi.ucm.es> Dear Nicolai, Indeed I have used ft_timelockstatistics for minimum norm source data. The trick is to put the source level data into a ERF structure. Determining the neighbors of a source surface with vertices is not trivial. However I used tess_vertconn.m from the BrainStorm toolbox to get the connectivity matrix that tells you who is a neighbor. This you can feed into timelockstats. Hope that helps, Stephan ________________________________________________________ Stephan Moratti, PhD see also: http://web.me.com/smoratti/ Universidad Complutense de Madrid Facultad de Psicología Departamento de Psicología Básica I Campus de Somosaguas 28223 Pozuelo de Alarcón (Madrid) Spain and Center for Biomedical Technology Laboratory for Cognitive and Computational Neuroscience Parque Científico y Tecnológico de la Universidad Politecnica de Madrid Campus Montegancedo 28223 Pozuelo de Alarcón (Madrid) Spain email: smoratti at psi.ucm.es Tel.: +34 679219982 El 12/06/2013, a las 15:44, Nicolai Mersebak escribió: > Dear all, > > I have a question concerning the usage of ft_sourcegrandaverage and ft_sourcestatistics. > > After using ft_sourceanalysis (method: MNE), I get spatio-temporal source reconstructed data in source.avg.pow (4050 x 897): 4050 sources and 897 time points. > > Now I would like to use the cluster-based permutation test on my source reconstructed data. However it seems like ft_sourcegrandaverage and ft_sourcestatistics don't support source level time courses. E.g when I am using ft_sourcegrandaverage I am getting the following error: > > Error in ft_sourcegrandaverage (line 158) > dat(:,i) = tmp(:); > > Looking into the code: > > for i=1:Nsubject > tmp = getsubfield(varargin{i}, parameterselection(cfg.parameter, varargin{i})); > dat(:,i) = tmp(:); > tmp = getsubfield(varargin{i}, 'inside'); > inside(tmp,i) = 1; > end > > I see that "tmp" are getting the structure [N_sources x timepoints] from source.avg.pow for one subject, where "dat" requires the structure [N_sources x 1]. > > I seached the mailing list for similar issues and found this thread: > > http://mailman.science.ru.nl/pipermail/fieldtrip/2010-September/003122.html > > Since I am interested in using the temporal dimension in my statistics, I would like to know if it is still not possible to use spatio-temporal source reconstructed data in ft_sourcestatistics and ft_sourcegrandaverage ? > > Or if any have succeeded in using the cluster-based permutation test on source level also including the temporal dimension ? > > Alternative I was thinking that I might could use ft_timelockstatistics, where I substituted the channels with sources, e.g instead of having 64 channels, I would now have 4050 "channels". > If so I need to calculate a label structure and an appropriate neighbor structure, which I guess is possible as I have all the 3D coordinates for each source, e.g in leadfield.pos ? > I know this is a work around solution, but have anyone tried or have any experience using such an approach ? > > Best, > > Nicolai > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -------------- next part -------------- An HTML attachment was scrubbed... URL: From jan.schoffelen at donders.ru.nl Wed Jun 12 18:00:46 2013 From: jan.schoffelen at donders.ru.nl (jan-mathijs schoffelen) Date: Wed, 12 Jun 2013 18:00:46 +0200 Subject: [FieldTrip] Source statistics on spatio-temporal source reconstruction data (MNE) In-Reply-To: <05B1DB8A-163B-40C0-B303-5B7D2A5434BD@psi.ucm.es> References: <05B1DB8A-163B-40C0-B303-5B7D2A5434BD@psi.ucm.es> Message-ID: <683ABC6E-9FC6-420A-9DCF-E54D6FC6A27E@donders.ru.nl> An alternative would be to interpolate the cortical sheet to a 3D grid (where the grid is defined for each subject based on a warped template grid defined in a standard space), and then do clustering using a regular 3D spatial neighbourhood structure. The rationale being that two vertices on the sheet may appear as disconnected (e.g. being on two sides of a sulcus) whereas, given the poor spatial resolution, they belong to the same spatial blob. Best, Jan-Mathijs On Jun 12, 2013, at 5:44 PM, smoratti at psi.ucm.es wrote: > Dear Nicolai, > > Indeed I have used ft_timelockstatistics for minimum norm source data. The trick is to put the source level data into a ERF structure. Determining the neighbors of a source surface with vertices is not trivial. However I used tess_vertconn.m from the BrainStorm toolbox to get the connectivity matrix that tells you who is a neighbor. This you can feed into timelockstats. > > Hope that helps, > > Stephan > > ________________________________________________________ > Stephan Moratti, PhD > > see also: http://web.me.com/smoratti/ > > Universidad Complutense de Madrid > Facultad de Psicología > Departamento de Psicología Básica I > Campus de Somosaguas > 28223 Pozuelo de Alarcón (Madrid) > Spain > > and > > Center for Biomedical Technology > Laboratory for Cognitive and Computational Neuroscience > Parque Científico y Tecnológico de la Universidad Politecnica de Madrid > Campus Montegancedo > 28223 Pozuelo de Alarcón (Madrid) > Spain > > > email: smoratti at psi.ucm.es > Tel.: +34 679219982 > > El 12/06/2013, a las 15:44, Nicolai Mersebak escribió: > >> Dear all, >> >> I have a question concerning the usage of ft_sourcegrandaverage and ft_sourcestatistics. >> >> After using ft_sourceanalysis (method: MNE), I get spatio-temporal source reconstructed data in source.avg.pow (4050 x 897): 4050 sources and 897 time points. >> >> Now I would like to use the cluster-based permutation test on my source reconstructed data. However it seems like ft_sourcegrandaverage and ft_sourcestatistics don't support source level time courses. E.g when I am using ft_sourcegrandaverage I am getting the following error: >> >> Error in ft_sourcegrandaverage (line 158) >> dat(:,i) = tmp(:); >> >> Looking into the code: >> >> for i=1:Nsubject >> tmp = getsubfield(varargin{i}, parameterselection(cfg.parameter, varargin{i})); >> dat(:,i) = tmp(:); >> tmp = getsubfield(varargin{i}, 'inside'); >> inside(tmp,i) = 1; >> end >> >> I see that "tmp" are getting the structure [N_sources x timepoints] from source.avg.pow for one subject, where "dat" requires the structure [N_sources x 1]. >> >> I seached the mailing list for similar issues and found this thread: >> >> http://mailman.science.ru.nl/pipermail/fieldtrip/2010-September/003122.html >> >> Since I am interested in using the temporal dimension in my statistics, I would like to know if it is still not possible to use spatio-temporal source reconstructed data in ft_sourcestatistics and ft_sourcegrandaverage ? >> >> Or if any have succeeded in using the cluster-based permutation test on source level also including the temporal dimension ? >> >> Alternative I was thinking that I might could use ft_timelockstatistics, where I substituted the channels with sources, e.g instead of having 64 channels, I would now have 4050 "channels". >> If so I need to calculate a label structure and an appropriate neighbor structure, which I guess is possible as I have all the 3D coordinates for each source, e.g in leadfield.pos ? >> I know this is a work around solution, but have anyone tried or have any experience using such an approach ? >> >> Best, >> >> Nicolai >> >> _______________________________________________ >> fieldtrip mailing list >> fieldtrip at donders.ru.nl >> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip Jan-Mathijs Schoffelen, MD PhD Donders Institute for Brain, Cognition and Behaviour, Centre for Cognitive Neuroimaging, Radboud University Nijmegen, The Netherlands Max Planck Institute for Psycholinguistics, Nijmegen, The Netherlands J.Schoffelen at donders.ru.nl Telephone: +31-24-3614793 http://www.hettaligebrein.nl -------------- next part -------------- An HTML attachment was scrubbed... URL: From smoratti at psi.ucm.es Wed Jun 12 18:58:40 2013 From: smoratti at psi.ucm.es (smoratti at psi.ucm.es) Date: Wed, 12 Jun 2013 18:58:40 +0200 Subject: [FieldTrip] Source statistics on spatio-temporal source reconstruction data (MNE) In-Reply-To: <683ABC6E-9FC6-420A-9DCF-E54D6FC6A27E@donders.ru.nl> References: <05B1DB8A-163B-40C0-B303-5B7D2A5434BD@psi.ucm.es> <683ABC6E-9FC6-420A-9DCF-E54D6FC6A27E@donders.ru.nl> Message-ID: <8D369E00-7FF3-4CC7-8B91-A55AD9ECE385@psi.ucm.es> I think Jan.Mathijs alternative suggestion is quite attractive. With the neighbors on a cortical sheet I also had the problems that sometimes the vertices do not have the same distance and then clustering may be biased to smaller or bigger clusters as the number of neighbors does not guarantee same cluster sizes. With the interpolation onto a 3D grid, you won't have that problem. best, Stephan ________________________________________________________ Stephan Moratti, PhD see also: http://web.me.com/smoratti/ Universidad Complutense de Madrid Facultad de Psicología Departamento de Psicología Básica I Campus de Somosaguas 28223 Pozuelo de Alarcón (Madrid) Spain and Center for Biomedical Technology Laboratory for Cognitive and Computational Neuroscience Parque Científico y Tecnológico de la Universidad Politecnica de Madrid Campus Montegancedo 28223 Pozuelo de Alarcón (Madrid) Spain email: smoratti at psi.ucm.es Tel.: +34 679219982 El 12/06/2013, a las 18:00, jan-mathijs schoffelen escribió: > An alternative would be to interpolate the cortical sheet to a 3D grid (where the grid is defined for each subject based on a warped template grid defined in a standard space), and then do clustering using a regular 3D spatial neighbourhood structure. The rationale being that two vertices on the sheet may appear as disconnected (e.g. being on two sides of a sulcus) whereas, given the poor spatial resolution, they belong to the same spatial blob. > > Best, > Jan-Mathijs > > On Jun 12, 2013, at 5:44 PM, smoratti at psi.ucm.es wrote: > >> Dear Nicolai, >> >> Indeed I have used ft_timelockstatistics for minimum norm source data. The trick is to put the source level data into a ERF structure. Determining the neighbors of a source surface with vertices is not trivial. However I used tess_vertconn.m from the BrainStorm toolbox to get the connectivity matrix that tells you who is a neighbor. This you can feed into timelockstats. >> >> Hope that helps, >> >> Stephan >> >> ________________________________________________________ >> Stephan Moratti, PhD >> >> see also: http://web.me.com/smoratti/ >> >> Universidad Complutense de Madrid >> Facultad de Psicología >> Departamento de Psicología Básica I >> Campus de Somosaguas >> 28223 Pozuelo de Alarcón (Madrid) >> Spain >> >> and >> >> Center for Biomedical Technology >> Laboratory for Cognitive and Computational Neuroscience >> Parque Científico y Tecnológico de la Universidad Politecnica de Madrid >> Campus Montegancedo >> 28223 Pozuelo de Alarcón (Madrid) >> Spain >> >> >> email: smoratti at psi.ucm.es >> Tel.: +34 679219982 >> >> El 12/06/2013, a las 15:44, Nicolai Mersebak escribió: >> >>> Dear all, >>> >>> I have a question concerning the usage of ft_sourcegrandaverage and ft_sourcestatistics. >>> >>> After using ft_sourceanalysis (method: MNE), I get spatio-temporal source reconstructed data in source.avg.pow (4050 x 897): 4050 sources and 897 time points. >>> >>> Now I would like to use the cluster-based permutation test on my source reconstructed data. However it seems like ft_sourcegrandaverage and ft_sourcestatistics don't support source level time courses. E.g when I am using ft_sourcegrandaverage I am getting the following error: >>> >>> Error in ft_sourcegrandaverage (line 158) >>> dat(:,i) = tmp(:); >>> >>> Looking into the code: >>> >>> for i=1:Nsubject >>> tmp = getsubfield(varargin{i}, parameterselection(cfg.parameter, varargin{i})); >>> dat(:,i) = tmp(:); >>> tmp = getsubfield(varargin{i}, 'inside'); >>> inside(tmp,i) = 1; >>> end >>> >>> I see that "tmp" are getting the structure [N_sources x timepoints] from source.avg.pow for one subject, where "dat" requires the structure [N_sources x 1]. >>> >>> I seached the mailing list for similar issues and found this thread: >>> >>> http://mailman.science.ru.nl/pipermail/fieldtrip/2010-September/003122.html >>> >>> Since I am interested in using the temporal dimension in my statistics, I would like to know if it is still not possible to use spatio-temporal source reconstructed data in ft_sourcestatistics and ft_sourcegrandaverage ? >>> >>> Or if any have succeeded in using the cluster-based permutation test on source level also including the temporal dimension ? >>> >>> Alternative I was thinking that I might could use ft_timelockstatistics, where I substituted the channels with sources, e.g instead of having 64 channels, I would now have 4050 "channels". >>> If so I need to calculate a label structure and an appropriate neighbor structure, which I guess is possible as I have all the 3D coordinates for each source, e.g in leadfield.pos ? >>> I know this is a work around solution, but have anyone tried or have any experience using such an approach ? >>> >>> Best, >>> >>> Nicolai >>> >>> _______________________________________________ >>> fieldtrip mailing list >>> fieldtrip at donders.ru.nl >>> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip >> >> _______________________________________________ >> fieldtrip mailing list >> fieldtrip at donders.ru.nl >> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > Jan-Mathijs Schoffelen, MD PhD > > Donders Institute for Brain, Cognition and Behaviour, > Centre for Cognitive Neuroimaging, > Radboud University Nijmegen, The Netherlands > > Max Planck Institute for Psycholinguistics, > Nijmegen, The Netherlands > > J.Schoffelen at donders.ru.nl > Telephone: +31-24-3614793 > > http://www.hettaligebrein.nl > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -------------- next part -------------- An HTML attachment was scrubbed... URL: From mengtongxiao at gmail.com Thu Jun 13 10:10:14 2013 From: mengtongxiao at gmail.com (=?GB2312?B?s8LRqQ==?=) Date: Thu, 13 Jun 2013 16:10:14 +0800 Subject: [FieldTrip] PDC Message-ID: Dear all I want to use compute PDC, I want to Konw when I got the chan*chan*freq, Dose the information flow from row (chan) to column(chan)? best, xiao         -------------- next part -------------- An HTML attachment was scrubbed... URL: From jan.schoffelen at donders.ru.nl Thu Jun 13 10:20:48 2013 From: jan.schoffelen at donders.ru.nl (jan-mathijs schoffelen) Date: Thu, 13 Jun 2013 10:20:48 +0200 Subject: [FieldTrip] PDC In-Reply-To: References: Message-ID: <756060F3-17D2-420B-B55F-FFE7671B067B@donders.ru.nl> Hi Xiao, this would be from row to column. Best, Jan-Mathijs On Jun 13, 2013, at 10:10 AM, 陈雪 wrote: > Dear all > > I want to use compute PDC, > I want to Konw when I got the chan*chan*freq, > Dose the information flow from row (chan) to column(chan)? > > best, > xiao > > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip Jan-Mathijs Schoffelen, MD PhD Donders Institute for Brain, Cognition and Behaviour, Centre for Cognitive Neuroimaging, Radboud University Nijmegen, The Netherlands Max Planck Institute for Psycholinguistics, Nijmegen, The Netherlands J.Schoffelen at donders.ru.nl Telephone: +31-24-3614793 http://www.hettaligebrein.nl -------------- next part -------------- An HTML attachment was scrubbed... URL: From explena at gmail.com Thu Jun 13 11:15:11 2013 From: explena at gmail.com (Shen-Mou Hsu) Date: Thu, 13 Jun 2013 17:15:11 +0800 Subject: [FieldTrip] ROC_based permutation test In-Reply-To: References: Message-ID: Dear Eelke, Many thanks for your helpful and detailed answers. I think that there is an error in the documentation about the configuration option for performing ROC analysis. The correct one should be cfg.statistic = 'ft_statfun_roc'. Otherwise, it will call the matlab built-in ROC function. Meanwhile, just to clarify my concept about the ROC_based permutation tests. In the initial stage, does the test calculate whether for every sample, the area under ROC curve is significant from 0.5. In this sense, should I specify cfg.clusteralpha = 0.5? Best regards, Shen-Mou Hsu On Tue, Jun 11, 2013 at 4:18 PM, Eelke Spaak wrote: > Dear Shen-Mou Hsu, > > With regards to your first question, I do not know the answer, so > someone else might help you there. > > In response to your second question, regarding the error "could not > determine the parametric critical value for clustering", this is > caused by the value of cfg.clusterthreshold used. The default value > there is 'parametric', meaning that the statistics routine will ask > your 'statfun' to compute a parametric threshold for considering a > (time/frequency/channel)-voxel a cluster-member candidate. This can be > done by e.g. depsamplesT or indepsamplesT, as it is possible to > analytically compute a T value corresponding to p < 0.05. However, in > the case of the ROC statistic, no such parametric estimate can be > computed (or perhaps it can be in some way, I don't know, but at least > I know the FT implementation does not). > > Fortunately, the statistics routines also allow you to use a > nonparametric threshold for cluster-member candidates, based on the > generated distribution of the test statistic under the null > hypothesis. To use this, simply specify cfg.clusterthreshold = > 'nonparametric_individual' or cfg.clusterthreshold = > 'nonparametric_common'. The difference between the two is that the > former computes a threshold per voxel, and the latter uses the same > threshold for all voxels. Which one is appropriate for you I don't > know. (Good reasons for using 'nonparametric_individual' might be a > strong variation of your test statistic with frequency. I know for a > fact this is the case with certain quantifications of phase-amplitude > coupling; these show much higher values in the low frequencies even > when computed on noise.) > > Hope this helps. > > Best, > Eelke > > On 11 June 2013 09:48, Shen-Mou Hsu wrote: > > Dear all, > > > > I was trying to perform signle-trial ROC-based permutation tests using > the > > statfun_roc. However I encountered two questions and wondered if anyone > > could kindly shed some light on the issues. First, is it necessary to > > perform baseline normalization for each trial before the tests? Second, > an > > error message returned stating "Error using roc. Too many input > arguments. > > Error using ft_statistics_montecarlo (line 223) could not determine the > > parametric critical value for clustering", after running the following > > script: > > > > load (['t_RF_EpoRejDePow']); load (['t_RN_EpoRejDePow']); > > > > cfg = []; > > cfg.channel = 'MEG'; > > cfg.latency = [-0.35 0.55]; > > cfg.frequency = [8 12]; > > cfg.parameter = 'powspctrm'; > > cfg.method = 'montecarlo'; > > cfg.statistic = 'roc'; > > cfg.alpha = 0.025; > > cfg.tail = 0; > > cfg.correctm = 'cluster'; > > cfg.clusteralpha = 0.05; > > % cfg.correcttail = 'prob'; > > cfg.clustertail = 0; > > cfg.numrandomization = 1000; > > cfg.minnbchan = 2; > > cfg_neighb.method = 'distance'; > > cfg.neighbours = ft_prepare_neighbours(cfg_neighb, > t_RN_EpoRejDePow); > > cfg.logtransform = 'yes'; > > > > design = [1*ones(1,size(t_RF_EpoRejDePow.powspctrm,1)) > > 2*ones(1,size(t_RN_EpoRejDePow.powspctrm,1))]; % the first dimension of > > these variable is the trial number. > > cfg.design = design; > > > > P_ROC_t_RFvsRN = > ft_freqstatistics(cfg,t_RF_EpoRejDePow,t_RN_EpoRejDePow); > > > > > > Any help is greatly appreciated. > > > > Best regards, > > > > Shen-Mou Hsu > > > > > > > > _______________________________________________ > > fieldtrip mailing list > > fieldtrip at donders.ru.nl > > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > -------------- next part -------------- An HTML attachment was scrubbed... URL: From nicolai at mersebak.dk Thu Jun 13 12:04:34 2013 From: nicolai at mersebak.dk (Nicolai Mersebak) Date: Thu, 13 Jun 2013 12:04:34 +0200 Subject: [FieldTrip] Source statistics on spatio-temporal source reconstruction data (MNE) In-Reply-To: <8D369E00-7FF3-4CC7-8B91-A55AD9ECE385@psi.ucm.es> References: <05B1DB8A-163B-40C0-B303-5B7D2A5434BD@psi.ucm.es> <683ABC6E-9FC6-420A-9DCF-E54D6FC6A27E@donders.ru.nl> <8D369E00-7FF3-4CC7-8B91-A55AD9ECE385@psi.ucm.es> Message-ID: <6F3697BB-194F-422F-A1BF-EBBB132F805B@mersebak.dk> Thanks to all of you for your comments and ideas - they are very helpful! I ( off course :) ) have some follow up questions. I have created an ERP structure for my MNE source, so the only think which I need and that is not straight forward is the neighbour structure. I am using the standard bem template (fieldtrip-20130124/template/headmodel/standard_bem.mat) as a head model and use the following code to get a grid for all subjects as I don't have any subject specific information regarding the anatomy. cfg = []; cfg.grid.xgrid = -100:10:100; cfg.grid.ygrid = -100:10:100; cfg.grid.zgrid = -100:10:100; cfg.grid.tight = 'yes'; cfg.grid.unit = hdm.unit; % unit: mm cfg.vol = hdm; grid = ft_prepare_sourcemodel(cfg); @Jan-Mathijs and Stephan: I guess making a subject specific grid based on a warped template requires anatomic information for each subject, e.g. a MRI image like this tutorial shows: http://fieldtrip.fcdonders.nl/example/create_single-subject_grids_in_individual_head_space_that_are_all_aligned_in_mni_space?s%5B The final grid output in the tutorial - does it have this 3D grid which can be used as a neighbour structure ? I am not sure how to go from my cortical sheet [vertices x coordinates(x,y,z)] to a 3D grid, which I can use as a neighbour structure ? A second thing I would like to know is, if any of you have tried to use an atlas (e.g ALL template atlas) where the regions now are channels in the permutation test? Going from source points to atlas regions can be done through ft_sourcestatistics, but I am still interested in keeping the temporal dimension. The reason to use atlas regions instead of source points is to decrease the computation time. Best, Nicolai Den 12/06/2013 kl. 18.58 skrev "smoratti at psi.ucm.es" : > > I think Jan.Mathijs alternative suggestion is quite attractive. With the neighbors on a cortical sheet I also had the problems that sometimes the vertices do not have the same distance and then clustering may be biased to smaller or bigger clusters as the number of neighbors does not guarantee same cluster sizes. With the interpolation onto a 3D grid, you won't have that problem. > > best, > > Stephan > > > ________________________________________________________ > Stephan Moratti, PhD > > see also: http://web.me.com/smoratti/ > > Universidad Complutense de Madrid > Facultad de Psicología > Departamento de Psicología Básica I > Campus de Somosaguas > 28223 Pozuelo de Alarcón (Madrid) > Spain > > and > > Center for Biomedical Technology > Laboratory for Cognitive and Computational Neuroscience > Parque Científico y Tecnológico de la Universidad Politecnica de Madrid > Campus Montegancedo > 28223 Pozuelo de Alarcón (Madrid) > Spain > > > email: smoratti at psi.ucm.es > Tel.: +34 679219982 > > El 12/06/2013, a las 18:00, jan-mathijs schoffelen escribió: > >> An alternative would be to interpolate the cortical sheet to a 3D grid (where the grid is defined for each subject based on a warped template grid defined in a standard space), and then do clustering using a regular 3D spatial neighbourhood structure. The rationale being that two vertices on the sheet may appear as disconnected (e.g. being on two sides of a sulcus) whereas, given the poor spatial resolution, they belong to the same spatial blob. >> >> Best, >> Jan-Mathijs >> >> On Jun 12, 2013, at 5:44 PM, smoratti at psi.ucm.es wrote: >> >>> Dear Nicolai, >>> >>> Indeed I have used ft_timelockstatistics for minimum norm source data. The trick is to put the source level data into a ERF structure. Determining the neighbors of a source surface with vertices is not trivial. However I used tess_vertconn.m from the BrainStorm toolbox to get the connectivity matrix that tells you who is a neighbor. This you can feed into timelockstats. >>> >>> Hope that helps, >>> >>> Stephan >>> >>> ________________________________________________________ >>> Stephan Moratti, PhD >>> >>> see also: http://web.me.com/smoratti/ >>> >>> Universidad Complutense de Madrid >>> Facultad de Psicología >>> Departamento de Psicología Básica I >>> Campus de Somosaguas >>> 28223 Pozuelo de Alarcón (Madrid) >>> Spain >>> >>> and >>> >>> Center for Biomedical Technology >>> Laboratory for Cognitive and Computational Neuroscience >>> Parque Científico y Tecnológico de la Universidad Politecnica de Madrid >>> Campus Montegancedo >>> 28223 Pozuelo de Alarcón (Madrid) >>> Spain >>> >>> >>> email: smoratti at psi.ucm.es >>> Tel.: +34 679219982 >>> >>> El 12/06/2013, a las 15:44, Nicolai Mersebak escribió: >>> >>>> Dear all, >>>> >>>> I have a question concerning the usage of ft_sourcegrandaverage and ft_sourcestatistics. >>>> >>>> After using ft_sourceanalysis (method: MNE), I get spatio-temporal source reconstructed data in source.avg.pow (4050 x 897): 4050 sources and 897 time points. >>>> >>>> Now I would like to use the cluster-based permutation test on my source reconstructed data. However it seems like ft_sourcegrandaverage and ft_sourcestatistics don't support source level time courses. E.g when I am using ft_sourcegrandaverage I am getting the following error: >>>> >>>> Error in ft_sourcegrandaverage (line 158) >>>> dat(:,i) = tmp(:); >>>> >>>> Looking into the code: >>>> >>>> for i=1:Nsubject >>>> tmp = getsubfield(varargin{i}, parameterselection(cfg.parameter, varargin{i})); >>>> dat(:,i) = tmp(:); >>>> tmp = getsubfield(varargin{i}, 'inside'); >>>> inside(tmp,i) = 1; >>>> end >>>> >>>> I see that "tmp" are getting the structure [N_sources x timepoints] from source.avg.pow for one subject, where "dat" requires the structure [N_sources x 1]. >>>> >>>> I seached the mailing list for similar issues and found this thread: >>>> >>>> http://mailman.science.ru.nl/pipermail/fieldtrip/2010-September/003122.html >>>> >>>> Since I am interested in using the temporal dimension in my statistics, I would like to know if it is still not possible to use spatio-temporal source reconstructed data in ft_sourcestatistics and ft_sourcegrandaverage ? >>>> >>>> Or if any have succeeded in using the cluster-based permutation test on source level also including the temporal dimension ? >>>> >>>> Alternative I was thinking that I might could use ft_timelockstatistics, where I substituted the channels with sources, e.g instead of having 64 channels, I would now have 4050 "channels". >>>> If so I need to calculate a label structure and an appropriate neighbor structure, which I guess is possible as I have all the 3D coordinates for each source, e.g in leadfield.pos ? >>>> I know this is a work around solution, but have anyone tried or have any experience using such an approach ? >>>> >>>> Best, >>>> >>>> Nicolai >>>> >>>> _______________________________________________ >>>> fieldtrip mailing list >>>> fieldtrip at donders.ru.nl >>>> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip >>> >>> _______________________________________________ >>> fieldtrip mailing list >>> fieldtrip at donders.ru.nl >>> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip >> >> Jan-Mathijs Schoffelen, MD PhD >> >> Donders Institute for Brain, Cognition and Behaviour, >> Centre for Cognitive Neuroimaging, >> Radboud University Nijmegen, The Netherlands >> >> Max Planck Institute for Psycholinguistics, >> Nijmegen, The Netherlands >> >> J.Schoffelen at donders.ru.nl >> Telephone: +31-24-3614793 >> >> http://www.hettaligebrein.nl >> >> _______________________________________________ >> fieldtrip mailing list >> fieldtrip at donders.ru.nl >> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -------------- next part -------------- An HTML attachment was scrubbed... URL: From smoratti at psi.ucm.es Thu Jun 13 15:50:30 2013 From: smoratti at psi.ucm.es (smoratti at psi.ucm.es) Date: Thu, 13 Jun 2013 15:50:30 +0200 Subject: [FieldTrip] Source statistics on spatio-temporal source reconstruction data (MNE) In-Reply-To: <6F3697BB-194F-422F-A1BF-EBBB132F805B@mersebak.dk> References: <05B1DB8A-163B-40C0-B303-5B7D2A5434BD@psi.ucm.es> <683ABC6E-9FC6-420A-9DCF-E54D6FC6A27E@donders.ru.nl> <8D369E00-7FF3-4CC7-8B91-A55AD9ECE385@psi.ucm.es> <6F3697BB-194F-422F-A1BF-EBBB132F805B@mersebak.dk> Message-ID: <4755A6E7-44B5-4E98-B536-A19F544ED284@psi.ucm.es> Dear Nikolai, In ft_sourceplot there is the possibility of projecting grid data to surface data. However, I am not sure if the other way round is implemented in field trip. With respect to the other (maybe less accurate solution) of providing a neighbor matrix of the vertices of your brain surface: if you do " channeigbststructmat = your_neighbor_matrix" in clusterstat.m should work. Best, Stephan ________________________________________________________ Stephan Moratti, PhD see also: http://web.me.com/smoratti/ Universidad Complutense de Madrid Facultad de Psicología Departamento de Psicología Básica I Campus de Somosaguas 28223 Pozuelo de Alarcón (Madrid) Spain and Center for Biomedical Technology Laboratory for Cognitive and Computational Neuroscience Parque Científico y Tecnológico de la Universidad Politecnica de Madrid Campus Montegancedo 28223 Pozuelo de Alarcón (Madrid) Spain email: smoratti at psi.ucm.es Tel.: +34 679219982 El 13/06/2013, a las 12:04, Nicolai Mersebak escribió: > Thanks to all of you for your comments and ideas - they are very helpful! > > I ( off course :) ) have some follow up questions. > > I have created an ERP structure for my MNE source, so the only think which I need and that is not straight forward is the neighbour structure. > > I am using the standard bem template (fieldtrip-20130124/template/headmodel/standard_bem.mat) as a head model and use the following code to get a grid for all subjects as I don't have any subject specific information regarding the anatomy. > > cfg = []; > cfg.grid.xgrid = -100:10:100; > cfg.grid.ygrid = -100:10:100; > cfg.grid.zgrid = -100:10:100; > cfg.grid.tight = 'yes'; > cfg.grid.unit = hdm.unit; % unit: mm > cfg.vol = hdm; > grid = ft_prepare_sourcemodel(cfg); > > > @Jan-Mathijs and Stephan: I guess making a subject specific grid based on a warped template requires anatomic information for each subject, e.g. a MRI image like this tutorial shows: > http://fieldtrip.fcdonders.nl/example/create_single-subject_grids_in_individual_head_space_that_are_all_aligned_in_mni_space?s%5B > > The final grid output in the tutorial - does it have this 3D grid which can be used as a neighbour structure ? > > I am not sure how to go from my cortical sheet [vertices x coordinates(x,y,z)] to a 3D grid, which I can use as a neighbour structure ? > > A second thing I would like to know is, if any of you have tried to use an atlas (e.g ALL template atlas) where the regions now are channels in the permutation test? Going from source points to atlas regions can be done through ft_sourcestatistics, but I am still interested in keeping the temporal dimension. The reason to use atlas regions instead of source points is to decrease the computation time. > > Best, > > Nicolai > > > Den 12/06/2013 kl. 18.58 skrev "smoratti at psi.ucm.es" : > >> >> I think Jan.Mathijs alternative suggestion is quite attractive. With the neighbors on a cortical sheet I also had the problems that sometimes the vertices do not have the same distance and then clustering may be biased to smaller or bigger clusters as the number of neighbors does not guarantee same cluster sizes. With the interpolation onto a 3D grid, you won't have that problem. >> >> best, >> >> Stephan >> >> >> ________________________________________________________ >> Stephan Moratti, PhD >> >> see also: http://web.me.com/smoratti/ >> >> Universidad Complutense de Madrid >> Facultad de Psicología >> Departamento de Psicología Básica I >> Campus de Somosaguas >> 28223 Pozuelo de Alarcón (Madrid) >> Spain >> >> and >> >> Center for Biomedical Technology >> Laboratory for Cognitive and Computational Neuroscience >> Parque Científico y Tecnológico de la Universidad Politecnica de Madrid >> Campus Montegancedo >> 28223 Pozuelo de Alarcón (Madrid) >> Spain >> >> >> email: smoratti at psi.ucm.es >> Tel.: +34 679219982 >> >> El 12/06/2013, a las 18:00, jan-mathijs schoffelen escribió: >> >>> An alternative would be to interpolate the cortical sheet to a 3D grid (where the grid is defined for each subject based on a warped template grid defined in a standard space), and then do clustering using a regular 3D spatial neighbourhood structure. The rationale being that two vertices on the sheet may appear as disconnected (e.g. being on two sides of a sulcus) whereas, given the poor spatial resolution, they belong to the same spatial blob. >>> >>> Best, >>> Jan-Mathijs >>> >>> On Jun 12, 2013, at 5:44 PM, smoratti at psi.ucm.es wrote: >>> >>>> Dear Nicolai, >>>> >>>> Indeed I have used ft_timelockstatistics for minimum norm source data. The trick is to put the source level data into a ERF structure. Determining the neighbors of a source surface with vertices is not trivial. However I used tess_vertconn.m from the BrainStorm toolbox to get the connectivity matrix that tells you who is a neighbor. This you can feed into timelockstats. >>>> >>>> Hope that helps, >>>> >>>> Stephan >>>> >>>> ________________________________________________________ >>>> Stephan Moratti, PhD >>>> >>>> see also: http://web.me.com/smoratti/ >>>> >>>> Universidad Complutense de Madrid >>>> Facultad de Psicología >>>> Departamento de Psicología Básica I >>>> Campus de Somosaguas >>>> 28223 Pozuelo de Alarcón (Madrid) >>>> Spain >>>> >>>> and >>>> >>>> Center for Biomedical Technology >>>> Laboratory for Cognitive and Computational Neuroscience >>>> Parque Científico y Tecnológico de la Universidad Politecnica de Madrid >>>> Campus Montegancedo >>>> 28223 Pozuelo de Alarcón (Madrid) >>>> Spain >>>> >>>> >>>> email: smoratti at psi.ucm.es >>>> Tel.: +34 679219982 >>>> >>>> El 12/06/2013, a las 15:44, Nicolai Mersebak escribió: >>>> >>>>> Dear all, >>>>> >>>>> I have a question concerning the usage of ft_sourcegrandaverage and ft_sourcestatistics. >>>>> >>>>> After using ft_sourceanalysis (method: MNE), I get spatio-temporal source reconstructed data in source.avg.pow (4050 x 897): 4050 sources and 897 time points. >>>>> >>>>> Now I would like to use the cluster-based permutation test on my source reconstructed data. However it seems like ft_sourcegrandaverage and ft_sourcestatistics don't support source level time courses. E.g when I am using ft_sourcegrandaverage I am getting the following error: >>>>> >>>>> Error in ft_sourcegrandaverage (line 158) >>>>> dat(:,i) = tmp(:); >>>>> >>>>> Looking into the code: >>>>> >>>>> for i=1:Nsubject >>>>> tmp = getsubfield(varargin{i}, parameterselection(cfg.parameter, varargin{i})); >>>>> dat(:,i) = tmp(:); >>>>> tmp = getsubfield(varargin{i}, 'inside'); >>>>> inside(tmp,i) = 1; >>>>> end >>>>> >>>>> I see that "tmp" are getting the structure [N_sources x timepoints] from source.avg.pow for one subject, where "dat" requires the structure [N_sources x 1]. >>>>> >>>>> I seached the mailing list for similar issues and found this thread: >>>>> >>>>> http://mailman.science.ru.nl/pipermail/fieldtrip/2010-September/003122.html >>>>> >>>>> Since I am interested in using the temporal dimension in my statistics, I would like to know if it is still not possible to use spatio-temporal source reconstructed data in ft_sourcestatistics and ft_sourcegrandaverage ? >>>>> >>>>> Or if any have succeeded in using the cluster-based permutation test on source level also including the temporal dimension ? >>>>> >>>>> Alternative I was thinking that I might could use ft_timelockstatistics, where I substituted the channels with sources, e.g instead of having 64 channels, I would now have 4050 "channels". >>>>> If so I need to calculate a label structure and an appropriate neighbor structure, which I guess is possible as I have all the 3D coordinates for each source, e.g in leadfield.pos ? >>>>> I know this is a work around solution, but have anyone tried or have any experience using such an approach ? >>>>> >>>>> Best, >>>>> >>>>> Nicolai >>>>> >>>>> _______________________________________________ >>>>> fieldtrip mailing list >>>>> fieldtrip at donders.ru.nl >>>>> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip >>>> >>>> _______________________________________________ >>>> fieldtrip mailing list >>>> fieldtrip at donders.ru.nl >>>> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip >>> >>> Jan-Mathijs Schoffelen, MD PhD >>> >>> Donders Institute for Brain, Cognition and Behaviour, >>> Centre for Cognitive Neuroimaging, >>> Radboud University Nijmegen, The Netherlands >>> >>> Max Planck Institute for Psycholinguistics, >>> Nijmegen, The Netherlands >>> >>> J.Schoffelen at donders.ru.nl >>> Telephone: +31-24-3614793 >>> >>> http://www.hettaligebrein.nl >>> >>> _______________________________________________ >>> fieldtrip mailing list >>> fieldtrip at donders.ru.nl >>> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip >> >> _______________________________________________ >> fieldtrip mailing list >> fieldtrip at donders.ru.nl >> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -------------- next part -------------- An HTML attachment was scrubbed... URL: From jan.schoffelen at donders.ru.nl Thu Jun 13 15:58:47 2013 From: jan.schoffelen at donders.ru.nl (jan-mathijs schoffelen) Date: Thu, 13 Jun 2013 15:58:47 +0200 Subject: [FieldTrip] Source statistics on spatio-temporal source reconstruction data (MNE) In-Reply-To: <4755A6E7-44B5-4E98-B536-A19F544ED284@psi.ucm.es> References: <05B1DB8A-163B-40C0-B303-5B7D2A5434BD@psi.ucm.es> <683ABC6E-9FC6-420A-9DCF-E54D6FC6A27E@donders.ru.nl> <8D369E00-7FF3-4CC7-8B91-A55AD9ECE385@psi.ucm.es> <6F3697BB-194F-422F-A1BF-EBBB132F805B@mersebak.dk> <4755A6E7-44B5-4E98-B536-A19F544ED284@psi.ucm.es> Message-ID: <944F6EF6-C03A-46F4-BFF4-3D9EC324E602@donders.ru.nl> Hi all, ft_sourceinterpolate can interpolate from between arbitrary point clouds, so also between a set of points defined on the cortical sheet, and a more or less regular 3D grid. JM On Jun 13, 2013, at 3:50 PM, smoratti at psi.ucm.es wrote: > Dear Nikolai, > > In ft_sourceplot there is the possibility of projecting grid data to surface data. However, I am not sure if the other way round is implemented in field trip. > > With respect to the other (maybe less accurate solution) of providing a neighbor matrix of the vertices of your brain surface: > > if you do " channeigbststructmat = your_neighbor_matrix" in clusterstat.m should work. > > Best, > > Stephan > > > > ________________________________________________________ > Stephan Moratti, PhD > > see also: http://web.me.com/smoratti/ > > Universidad Complutense de Madrid > Facultad de Psicología > Departamento de Psicología Básica I > Campus de Somosaguas > 28223 Pozuelo de Alarcón (Madrid) > Spain > > and > > Center for Biomedical Technology > Laboratory for Cognitive and Computational Neuroscience > Parque Científico y Tecnológico de la Universidad Politecnica de Madrid > Campus Montegancedo > 28223 Pozuelo de Alarcón (Madrid) > Spain > > > email: smoratti at psi.ucm.es > Tel.: +34 679219982 > > El 13/06/2013, a las 12:04, Nicolai Mersebak escribió: > >> Thanks to all of you for your comments and ideas - they are very helpful! >> >> I ( off course :) ) have some follow up questions. >> >> I have created an ERP structure for my MNE source, so the only think which I need and that is not straight forward is the neighbour structure. >> >> I am using the standard bem template (fieldtrip-20130124/template/headmodel/standard_bem.mat) as a head model and use the following code to get a grid for all subjects as I don't have any subject specific information regarding the anatomy. >> >> cfg = []; >> cfg.grid.xgrid = -100:10:100; >> cfg.grid.ygrid = -100:10:100; >> cfg.grid.zgrid = -100:10:100; >> cfg.grid.tight = 'yes'; >> cfg.grid.unit = hdm.unit; % unit: mm >> cfg.vol = hdm; >> grid = ft_prepare_sourcemodel(cfg); >> >> >> @Jan-Mathijs and Stephan: I guess making a subject specific grid based on a warped template requires anatomic information for each subject, e.g. a MRI image like this tutorial shows: >> http://fieldtrip.fcdonders.nl/example/create_single-subject_grids_in_individual_head_space_that_are_all_aligned_in_mni_space?s%5B >> >> The final grid output in the tutorial - does it have this 3D grid which can be used as a neighbour structure ? >> >> I am not sure how to go from my cortical sheet [vertices x coordinates(x,y,z)] to a 3D grid, which I can use as a neighbour structure ? >> >> A second thing I would like to know is, if any of you have tried to use an atlas (e.g ALL template atlas) where the regions now are channels in the permutation test? Going from source points to atlas regions can be done through ft_sourcestatistics, but I am still interested in keeping the temporal dimension. The reason to use atlas regions instead of source points is to decrease the computation time. >> >> Best, >> >> Nicolai >> >> >> Den 12/06/2013 kl. 18.58 skrev "smoratti at psi.ucm.es" : >> >>> >>> I think Jan.Mathijs alternative suggestion is quite attractive. With the neighbors on a cortical sheet I also had the problems that sometimes the vertices do not have the same distance and then clustering may be biased to smaller or bigger clusters as the number of neighbors does not guarantee same cluster sizes. With the interpolation onto a 3D grid, you won't have that problem. >>> >>> best, >>> >>> Stephan >>> >>> >>> ________________________________________________________ >>> Stephan Moratti, PhD >>> >>> see also: http://web.me.com/smoratti/ >>> >>> Universidad Complutense de Madrid >>> Facultad de Psicología >>> Departamento de Psicología Básica I >>> Campus de Somosaguas >>> 28223 Pozuelo de Alarcón (Madrid) >>> Spain >>> >>> and >>> >>> Center for Biomedical Technology >>> Laboratory for Cognitive and Computational Neuroscience >>> Parque Científico y Tecnológico de la Universidad Politecnica de Madrid >>> Campus Montegancedo >>> 28223 Pozuelo de Alarcón (Madrid) >>> Spain >>> >>> >>> email: smoratti at psi.ucm.es >>> Tel.: +34 679219982 >>> >>> El 12/06/2013, a las 18:00, jan-mathijs schoffelen escribió: >>> >>>> An alternative would be to interpolate the cortical sheet to a 3D grid (where the grid is defined for each subject based on a warped template grid defined in a standard space), and then do clustering using a regular 3D spatial neighbourhood structure. The rationale being that two vertices on the sheet may appear as disconnected (e.g. being on two sides of a sulcus) whereas, given the poor spatial resolution, they belong to the same spatial blob. >>>> >>>> Best, >>>> Jan-Mathijs >>>> >>>> On Jun 12, 2013, at 5:44 PM, smoratti at psi.ucm.es wrote: >>>> >>>>> Dear Nicolai, >>>>> >>>>> Indeed I have used ft_timelockstatistics for minimum norm source data. The trick is to put the source level data into a ERF structure. Determining the neighbors of a source surface with vertices is not trivial. However I used tess_vertconn.m from the BrainStorm toolbox to get the connectivity matrix that tells you who is a neighbor. This you can feed into timelockstats. >>>>> >>>>> Hope that helps, >>>>> >>>>> Stephan >>>>> >>>>> ________________________________________________________ >>>>> Stephan Moratti, PhD >>>>> >>>>> see also: http://web.me.com/smoratti/ >>>>> >>>>> Universidad Complutense de Madrid >>>>> Facultad de Psicología >>>>> Departamento de Psicología Básica I >>>>> Campus de Somosaguas >>>>> 28223 Pozuelo de Alarcón (Madrid) >>>>> Spain >>>>> >>>>> and >>>>> >>>>> Center for Biomedical Technology >>>>> Laboratory for Cognitive and Computational Neuroscience >>>>> Parque Científico y Tecnológico de la Universidad Politecnica de Madrid >>>>> Campus Montegancedo >>>>> 28223 Pozuelo de Alarcón (Madrid) >>>>> Spain >>>>> >>>>> >>>>> email: smoratti at psi.ucm.es >>>>> Tel.: +34 679219982 >>>>> >>>>> El 12/06/2013, a las 15:44, Nicolai Mersebak escribió: >>>>> >>>>>> Dear all, >>>>>> >>>>>> I have a question concerning the usage of ft_sourcegrandaverage and ft_sourcestatistics. >>>>>> >>>>>> After using ft_sourceanalysis (method: MNE), I get spatio-temporal source reconstructed data in source.avg.pow (4050 x 897): 4050 sources and 897 time points. >>>>>> >>>>>> Now I would like to use the cluster-based permutation test on my source reconstructed data. However it seems like ft_sourcegrandaverage and ft_sourcestatistics don't support source level time courses. E.g when I am using ft_sourcegrandaverage I am getting the following error: >>>>>> >>>>>> Error in ft_sourcegrandaverage (line 158) >>>>>> dat(:,i) = tmp(:); >>>>>> >>>>>> Looking into the code: >>>>>> >>>>>> for i=1:Nsubject >>>>>> tmp = getsubfield(varargin{i}, parameterselection(cfg.parameter, varargin{i})); >>>>>> dat(:,i) = tmp(:); >>>>>> tmp = getsubfield(varargin{i}, 'inside'); >>>>>> inside(tmp,i) = 1; >>>>>> end >>>>>> >>>>>> I see that "tmp" are getting the structure [N_sources x timepoints] from source.avg.pow for one subject, where "dat" requires the structure [N_sources x 1]. >>>>>> >>>>>> I seached the mailing list for similar issues and found this thread: >>>>>> >>>>>> http://mailman.science.ru.nl/pipermail/fieldtrip/2010-September/003122.html >>>>>> >>>>>> Since I am interested in using the temporal dimension in my statistics, I would like to know if it is still not possible to use spatio-temporal source reconstructed data in ft_sourcestatistics and ft_sourcegrandaverage ? >>>>>> >>>>>> Or if any have succeeded in using the cluster-based permutation test on source level also including the temporal dimension ? >>>>>> >>>>>> Alternative I was thinking that I might could use ft_timelockstatistics, where I substituted the channels with sources, e.g instead of having 64 channels, I would now have 4050 "channels". >>>>>> If so I need to calculate a label structure and an appropriate neighbor structure, which I guess is possible as I have all the 3D coordinates for each source, e.g in leadfield.pos ? >>>>>> I know this is a work around solution, but have anyone tried or have any experience using such an approach ? >>>>>> >>>>>> Best, >>>>>> >>>>>> Nicolai >>>>>> >>>>>> _______________________________________________ >>>>>> fieldtrip mailing list >>>>>> fieldtrip at donders.ru.nl >>>>>> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip >>>>> >>>>> _______________________________________________ >>>>> fieldtrip mailing list >>>>> fieldtrip at donders.ru.nl >>>>> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip >>>> >>>> Jan-Mathijs Schoffelen, MD PhD >>>> >>>> Donders Institute for Brain, Cognition and Behaviour, >>>> Centre for Cognitive Neuroimaging, >>>> Radboud University Nijmegen, The Netherlands >>>> >>>> Max Planck Institute for Psycholinguistics, >>>> Nijmegen, The Netherlands >>>> >>>> J.Schoffelen at donders.ru.nl >>>> Telephone: +31-24-3614793 >>>> >>>> http://www.hettaligebrein.nl >>>> >>>> _______________________________________________ >>>> fieldtrip mailing list >>>> fieldtrip at donders.ru.nl >>>> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip >>> >>> _______________________________________________ >>> fieldtrip mailing list >>> fieldtrip at donders.ru.nl >>> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip >> >> _______________________________________________ >> fieldtrip mailing list >> fieldtrip at donders.ru.nl >> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip Jan-Mathijs Schoffelen, MD PhD Donders Institute for Brain, Cognition and Behaviour, Centre for Cognitive Neuroimaging, Radboud University Nijmegen, The Netherlands Max Planck Institute for Psycholinguistics, Nijmegen, The Netherlands J.Schoffelen at donders.ru.nl Telephone: +31-24-3614793 http://www.hettaligebrein.nl -------------- next part -------------- An HTML attachment was scrubbed... URL: From jan.schoffelen at donders.ru.nl Thu Jun 13 16:12:26 2013 From: jan.schoffelen at donders.ru.nl (jan-mathijs schoffelen) Date: Thu, 13 Jun 2013 16:12:26 +0200 Subject: [FieldTrip] Source statistics on spatio-temporal source reconstruction data (MNE) In-Reply-To: <944F6EF6-C03A-46F4-BFF4-3D9EC324E602@donders.ru.nl> References: <05B1DB8A-163B-40C0-B303-5B7D2A5434BD@psi.ucm.es> <683ABC6E-9FC6-420A-9DCF-E54D6FC6A27E@donders.ru.nl> <8D369E00-7FF3-4CC7-8B91-A55AD9ECE385@psi.ucm.es> <6F3697BB-194F-422F-A1BF-EBBB132F805B@mersebak.dk> <4755A6E7-44B5-4E98-B536-A19F544ED284@psi.ucm.es> <944F6EF6-C03A-46F4-BFF4-3D9EC324E602@donders.ru.nl> Message-ID: Hi all, As a follow up to my previous message: it is intended in the future to remove the functionality in ft_sourceplot, doing the interpolation on the fly when cfg.method='surface' but when the input contains data defined on a 3D grid, and to request the user to go through ft_sourceinterpolate before visualization. Stay tuned... JM On Jun 13, 2013, at 3:58 PM, jan-mathijs schoffelen wrote: > Hi all, > > ft_sourceinterpolate can interpolate from between arbitrary point clouds, so also between a set of points defined on the cortical sheet, and a more or less regular 3D grid. > > JM > > On Jun 13, 2013, at 3:50 PM, smoratti at psi.ucm.es wrote: > >> Dear Nikolai, >> >> In ft_sourceplot there is the possibility of projecting grid data to surface data. However, I am not sure if the other way round is implemented in field trip. >> >> With respect to the other (maybe less accurate solution) of providing a neighbor matrix of the vertices of your brain surface: >> >> if you do " channeigbststructmat = your_neighbor_matrix" in clusterstat.m should work. >> >> Best, >> >> Stephan >> >> >> >> ________________________________________________________ >> Stephan Moratti, PhD >> >> see also: http://web.me.com/smoratti/ >> >> Universidad Complutense de Madrid >> Facultad de Psicología >> Departamento de Psicología Básica I >> Campus de Somosaguas >> 28223 Pozuelo de Alarcón (Madrid) >> Spain >> >> and >> >> Center for Biomedical Technology >> Laboratory for Cognitive and Computational Neuroscience >> Parque Científico y Tecnológico de la Universidad Politecnica de Madrid >> Campus Montegancedo >> 28223 Pozuelo de Alarcón (Madrid) >> Spain >> >> >> email: smoratti at psi.ucm.es >> Tel.: +34 679219982 >> >> El 13/06/2013, a las 12:04, Nicolai Mersebak escribió: >> >>> Thanks to all of you for your comments and ideas - they are very helpful! >>> >>> I ( off course :) ) have some follow up questions. >>> >>> I have created an ERP structure for my MNE source, so the only think which I need and that is not straight forward is the neighbour structure. >>> >>> I am using the standard bem template (fieldtrip-20130124/template/headmodel/standard_bem.mat) as a head model and use the following code to get a grid for all subjects as I don't have any subject specific information regarding the anatomy. >>> >>> cfg = []; >>> cfg.grid.xgrid = -100:10:100; >>> cfg.grid.ygrid = -100:10:100; >>> cfg.grid.zgrid = -100:10:100; >>> cfg.grid.tight = 'yes'; >>> cfg.grid.unit = hdm.unit; % unit: mm >>> cfg.vol = hdm; >>> grid = ft_prepare_sourcemodel(cfg); >>> >>> >>> @Jan-Mathijs and Stephan: I guess making a subject specific grid based on a warped template requires anatomic information for each subject, e.g. a MRI image like this tutorial shows: >>> http://fieldtrip.fcdonders.nl/example/create_single-subject_grids_in_individual_head_space_that_are_all_aligned_in_mni_space?s%5B >>> >>> The final grid output in the tutorial - does it have this 3D grid which can be used as a neighbour structure ? >>> >>> I am not sure how to go from my cortical sheet [vertices x coordinates(x,y,z)] to a 3D grid, which I can use as a neighbour structure ? >>> >>> A second thing I would like to know is, if any of you have tried to use an atlas (e.g ALL template atlas) where the regions now are channels in the permutation test? Going from source points to atlas regions can be done through ft_sourcestatistics, but I am still interested in keeping the temporal dimension. The reason to use atlas regions instead of source points is to decrease the computation time. >>> >>> Best, >>> >>> Nicolai >>> >>> >>> Den 12/06/2013 kl. 18.58 skrev "smoratti at psi.ucm.es" : >>> >>>> >>>> I think Jan.Mathijs alternative suggestion is quite attractive. With the neighbors on a cortical sheet I also had the problems that sometimes the vertices do not have the same distance and then clustering may be biased to smaller or bigger clusters as the number of neighbors does not guarantee same cluster sizes. With the interpolation onto a 3D grid, you won't have that problem. >>>> >>>> best, >>>> >>>> Stephan >>>> >>>> >>>> ________________________________________________________ >>>> Stephan Moratti, PhD >>>> >>>> see also: http://web.me.com/smoratti/ >>>> >>>> Universidad Complutense de Madrid >>>> Facultad de Psicología >>>> Departamento de Psicología Básica I >>>> Campus de Somosaguas >>>> 28223 Pozuelo de Alarcón (Madrid) >>>> Spain >>>> >>>> and >>>> >>>> Center for Biomedical Technology >>>> Laboratory for Cognitive and Computational Neuroscience >>>> Parque Científico y Tecnológico de la Universidad Politecnica de Madrid >>>> Campus Montegancedo >>>> 28223 Pozuelo de Alarcón (Madrid) >>>> Spain >>>> >>>> >>>> email: smoratti at psi.ucm.es >>>> Tel.: +34 679219982 >>>> >>>> El 12/06/2013, a las 18:00, jan-mathijs schoffelen escribió: >>>> >>>>> An alternative would be to interpolate the cortical sheet to a 3D grid (where the grid is defined for each subject based on a warped template grid defined in a standard space), and then do clustering using a regular 3D spatial neighbourhood structure. The rationale being that two vertices on the sheet may appear as disconnected (e.g. being on two sides of a sulcus) whereas, given the poor spatial resolution, they belong to the same spatial blob. >>>>> >>>>> Best, >>>>> Jan-Mathijs >>>>> >>>>> On Jun 12, 2013, at 5:44 PM, smoratti at psi.ucm.es wrote: >>>>> >>>>>> Dear Nicolai, >>>>>> >>>>>> Indeed I have used ft_timelockstatistics for minimum norm source data. The trick is to put the source level data into a ERF structure. Determining the neighbors of a source surface with vertices is not trivial. However I used tess_vertconn.m from the BrainStorm toolbox to get the connectivity matrix that tells you who is a neighbor. This you can feed into timelockstats. >>>>>> >>>>>> Hope that helps, >>>>>> >>>>>> Stephan >>>>>> >>>>>> ________________________________________________________ >>>>>> Stephan Moratti, PhD >>>>>> >>>>>> see also: http://web.me.com/smoratti/ >>>>>> >>>>>> Universidad Complutense de Madrid >>>>>> Facultad de Psicología >>>>>> Departamento de Psicología Básica I >>>>>> Campus de Somosaguas >>>>>> 28223 Pozuelo de Alarcón (Madrid) >>>>>> Spain >>>>>> >>>>>> and >>>>>> >>>>>> Center for Biomedical Technology >>>>>> Laboratory for Cognitive and Computational Neuroscience >>>>>> Parque Científico y Tecnológico de la Universidad Politecnica de Madrid >>>>>> Campus Montegancedo >>>>>> 28223 Pozuelo de Alarcón (Madrid) >>>>>> Spain >>>>>> >>>>>> >>>>>> email: smoratti at psi.ucm.es >>>>>> Tel.: +34 679219982 >>>>>> >>>>>> El 12/06/2013, a las 15:44, Nicolai Mersebak escribió: >>>>>> >>>>>>> Dear all, >>>>>>> >>>>>>> I have a question concerning the usage of ft_sourcegrandaverage and ft_sourcestatistics. >>>>>>> >>>>>>> After using ft_sourceanalysis (method: MNE), I get spatio-temporal source reconstructed data in source.avg.pow (4050 x 897): 4050 sources and 897 time points. >>>>>>> >>>>>>> Now I would like to use the cluster-based permutation test on my source reconstructed data. However it seems like ft_sourcegrandaverage and ft_sourcestatistics don't support source level time courses. E.g when I am using ft_sourcegrandaverage I am getting the following error: >>>>>>> >>>>>>> Error in ft_sourcegrandaverage (line 158) >>>>>>> dat(:,i) = tmp(:); >>>>>>> >>>>>>> Looking into the code: >>>>>>> >>>>>>> for i=1:Nsubject >>>>>>> tmp = getsubfield(varargin{i}, parameterselection(cfg.parameter, varargin{i})); >>>>>>> dat(:,i) = tmp(:); >>>>>>> tmp = getsubfield(varargin{i}, 'inside'); >>>>>>> inside(tmp,i) = 1; >>>>>>> end >>>>>>> >>>>>>> I see that "tmp" are getting the structure [N_sources x timepoints] from source.avg.pow for one subject, where "dat" requires the structure [N_sources x 1]. >>>>>>> >>>>>>> I seached the mailing list for similar issues and found this thread: >>>>>>> >>>>>>> http://mailman.science.ru.nl/pipermail/fieldtrip/2010-September/003122.html >>>>>>> >>>>>>> Since I am interested in using the temporal dimension in my statistics, I would like to know if it is still not possible to use spatio-temporal source reconstructed data in ft_sourcestatistics and ft_sourcegrandaverage ? >>>>>>> >>>>>>> Or if any have succeeded in using the cluster-based permutation test on source level also including the temporal dimension ? >>>>>>> >>>>>>> Alternative I was thinking that I might could use ft_timelockstatistics, where I substituted the channels with sources, e.g instead of having 64 channels, I would now have 4050 "channels". >>>>>>> If so I need to calculate a label structure and an appropriate neighbor structure, which I guess is possible as I have all the 3D coordinates for each source, e.g in leadfield.pos ? >>>>>>> I know this is a work around solution, but have anyone tried or have any experience using such an approach ? >>>>>>> >>>>>>> Best, >>>>>>> >>>>>>> Nicolai >>>>>>> >>>>>>> _______________________________________________ >>>>>>> fieldtrip mailing list >>>>>>> fieldtrip at donders.ru.nl >>>>>>> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip >>>>>> >>>>>> _______________________________________________ >>>>>> fieldtrip mailing list >>>>>> fieldtrip at donders.ru.nl >>>>>> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip >>>>> >>>>> Jan-Mathijs Schoffelen, MD PhD >>>>> >>>>> Donders Institute for Brain, Cognition and Behaviour, >>>>> Centre for Cognitive Neuroimaging, >>>>> Radboud University Nijmegen, The Netherlands >>>>> >>>>> Max Planck Institute for Psycholinguistics, >>>>> Nijmegen, The Netherlands >>>>> >>>>> J.Schoffelen at donders.ru.nl >>>>> Telephone: +31-24-3614793 >>>>> >>>>> http://www.hettaligebrein.nl >>>>> >>>>> _______________________________________________ >>>>> fieldtrip mailing list >>>>> fieldtrip at donders.ru.nl >>>>> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip >>>> >>>> _______________________________________________ >>>> fieldtrip mailing list >>>> fieldtrip at donders.ru.nl >>>> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip >>> >>> _______________________________________________ >>> fieldtrip mailing list >>> fieldtrip at donders.ru.nl >>> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip >> >> _______________________________________________ >> fieldtrip mailing list >> fieldtrip at donders.ru.nl >> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > Jan-Mathijs Schoffelen, MD PhD > > Donders Institute for Brain, Cognition and Behaviour, > Centre for Cognitive Neuroimaging, > Radboud University Nijmegen, The Netherlands > > Max Planck Institute for Psycholinguistics, > Nijmegen, The Netherlands > > J.Schoffelen at donders.ru.nl > Telephone: +31-24-3614793 > > http://www.hettaligebrein.nl > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip Jan-Mathijs Schoffelen, MD PhD Donders Institute for Brain, Cognition and Behaviour, Centre for Cognitive Neuroimaging, Radboud University Nijmegen, The Netherlands Max Planck Institute for Psycholinguistics, Nijmegen, The Netherlands J.Schoffelen at donders.ru.nl Telephone: +31-24-3614793 http://www.hettaligebrein.nl -------------- next part -------------- An HTML attachment was scrubbed... URL: From gopalar.ccf at gmail.com Fri Jun 14 17:37:54 2013 From: gopalar.ccf at gmail.com (Raghavan Gopalakrishnan) Date: Fri, 14 Jun 2013 11:37:54 -0400 Subject: [FieldTrip] Butter command Message-ID: I noticed that 'butter' command in the fieldtrip toolbox '/fieldtrip-20130609/external/signal/butter.m' is interfering with the 'butter' command in the Matlab signal processing toolbox. Can the name be changed? There are probably more commands in fieldtrip that has same names as regular matlab commands. -------------- next part -------------- An HTML attachment was scrubbed... URL: From eelke.spaak at donders.ru.nl Fri Jun 14 20:56:17 2013 From: eelke.spaak at donders.ru.nl (Eelke Spaak) Date: Fri, 14 Jun 2013 20:56:17 +0200 Subject: [FieldTrip] Butter command In-Reply-To: References: Message-ID: Dear Raghavan, The /external/signal/ functions are meant as drop-in replacements for functions in the MATLAB Signal Processing Toolbox, so they should behave exactly the same as the functions they are shadowing. They are included in the FieldTrip release for people who do not have Signal Processing Toolbox licenses, or who would prefer not to use those licenses just for tapering or filter coefficient functions. Best, Eelke On 14 June 2013 17:37, Raghavan Gopalakrishnan wrote: > > I noticed that 'butter' command in the fieldtrip toolbox > '/fieldtrip-20130609/external/signal/butter.m' > is interfering with the 'butter' command in the Matlab signal processing > toolbox. Can the name be changed? > There are probably more commands in fieldtrip that has same names as regular > matlab commands. > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip From karenschuil at gmail.com Mon Jun 17 13:56:09 2013 From: karenschuil at gmail.com (Karen Schuil) Date: Mon, 17 Jun 2013 13:56:09 +0200 Subject: [FieldTrip] ERP average Brain Vision is different from ERP average FieldTrip Message-ID: Dear Fieldtrip Users, I have a BVA-Fieldtrip problem. The average ERPs of Brain Vision Analyser are different from the ERPS of FieldTrip. It seems that in Fieldtrip a slow negative drift is added and peaks are more/less pronounced than in BVA (attached is a picture of the two different plots). An expert FieldTrip User and I could not find a solution for this problem. I hope one of you has a suggestion for this problem. The individual trial data was exported from BVA (version 2.02.5859) with the following settings: File extension: .seg Write header file: yes Write marker file: yes Format: BINARY Orientation: MULTIPLEXED Line Delimiter: CRLF (PC style) Binary format: 16-Bit signed integer format Set resolution manually: no Individually optimized resolution for each channel: yes Convert to big-endian order: no Export all channels: no Export the following channels: AF3 AF4 AF7 AF8 AFz C1 C2 C3 C4 C5 C6 CP1 CP2 CP3 CP4 CP5 CP6 CPz Cz F1 F2 F3 F4 F5 F6 F7 F8 FC1 FC2 FC3 FC4 FC5 FC6 FCz Fpz FT7 FT8 Fz Iz O1 O2 Oz P1 P10 P2 P3 P4 P5 P6 P7 P8 P9 PO3 PO4 PO7 PO8 POz Pz T7 T8 TP7 TP8 Created Using Component Version 2.0.2.5827 We used Matlab version 7.10.0 R2, and fieldtrip version 13-06-2013 (and tried a version from 2011). The scripts we used are read_analyzer_data and timelockanalysis. This is the code we used for calling the scripts: % read data into fieldtrip cfg = []; cfg.inputfile = 'pp10_A'; cfg.triggercode = 'S 20'; cfg.triggertype = 'Stimulus'; cfg.prestim = 1.2; cfg.poststim = 1.7; pp10_l = read_analyzer_data(cfg); % check: compute ERP % cfg = []; pp10_ERP = timelockanalysis(cfg, pp10_l); %plot ERP cfg = []; cfg.layout = 'elec1010.lay'; cfg.xlim = [-0.15 1.7]; cfg.ylim = [-12.25 12.25]; % cfg.baseline = 'yes'; % cfg.baselinetype = 'absolute'; cfg.showlabels = 'yes'; cfg.interactive = 'yes'; multiplotER(cfg, pp10_ERP); I hope you can help! Kind regards, Karen -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: trial_differences.JPG Type: image/jpeg Size: 642131 bytes Desc: not available URL: From j.herring at fcdonders.ru.nl Mon Jun 17 14:23:13 2013 From: j.herring at fcdonders.ru.nl (Herring, J.D. (Jim)) Date: Mon, 17 Jun 2013 14:23:13 +0200 (CEST) Subject: [FieldTrip] ERP average Brain Vision is different from ERP average FieldTrip In-Reply-To: References: Message-ID: <001901ce6b55$6fcf4590$4f6dd0b0$@herring@fcdonders.ru.nl> Dear Karen, Comparing the BVA and Fieldtrip images it seems that the trials in BVA have been filtered using at least a high-pass filter. I can see from the BVA image that you have applied filters prior to averaging your trials. >From the Fieldtrip code you've posted I cannot see any filtering applied. If you could find out what filters were applied to the trials in BVA and apply the same filters to the trials in FieldTrip using ft_preprocessing your results will most likely be the same. Best, Jim From: fieldtrip-bounces at science.ru.nl [mailto:fieldtrip-bounces at science.ru.nl] On Behalf Of Karen Schuil Sent: maandag 17 juni 2013 13:56 To: fieldtrip at science.ru.nl Subject: [FieldTrip] ERP average Brain Vision is different from ERP average FieldTrip Dear Fieldtrip Users, I have a BVA-Fieldtrip problem. The average ERPs of Brain Vision Analyser are different from the ERPS of FieldTrip. It seems that in Fieldtrip a slow negative drift is added and peaks are more/less pronounced than in BVA (attached is a picture of the two different plots). An expert FieldTrip User and I could not find a solution for this problem. I hope one of you has a suggestion for this problem. The individual trial data was exported from BVA (version 2.02.5859) with the following settings: File extension: .seg Write header file: yes Write marker file: yes Format: BINARY Orientation: MULTIPLEXED Line Delimiter: CRLF (PC style) Binary format: 16-Bit signed integer format Set resolution manually: no Individually optimized resolution for each channel: yes Convert to big-endian order: no Export all channels: no Export the following channels: AF3 AF4 AF7 AF8 AFz C1 C2 C3 C4 C5 C6 CP1 CP2 CP3 CP4 CP5 CP6 CPz Cz F1 F2 F3 F4 F5 F6 F7 F8 FC1 FC2 FC3 FC4 FC5 FC6 FCz Fpz FT7 FT8 Fz Iz O1 O2 Oz P1 P10 P2 P3 P4 P5 P6 P7 P8 P9 PO3 PO4 PO7 PO8 POz Pz T7 T8 TP7 TP8 Created Using Component Version 2.0.2.5827 We used Matlab version 7.10.0 R2, and fieldtrip version 13-06-2013 (and tried a version from 2011). The scripts we used are read_analyzer_data and timelockanalysis. This is the code we used for calling the scripts: % read data into fieldtrip cfg = []; cfg.inputfile = 'pp10_A'; cfg.triggercode = 'S 20'; cfg.triggertype = 'Stimulus'; cfg.prestim = 1.2; cfg.poststim = 1.7; pp10_l = read_analyzer_data(cfg); % check: compute ERP % cfg = []; pp10_ERP = timelockanalysis(cfg, pp10_l); %plot ERP cfg = []; cfg.layout = 'elec1010.lay'; cfg.xlim = [-0.15 1.7]; cfg.ylim = [-12.25 12.25]; % cfg.baseline = 'yes'; % cfg.baselinetype = 'absolute'; cfg.showlabels = 'yes'; cfg.interactive = 'yes'; multiplotER(cfg, pp10_ERP); I hope you can help! Kind regards, Karen -------------- next part -------------- An HTML attachment was scrubbed... URL: From aaron.schurger at gmail.com Mon Jun 17 14:25:25 2013 From: aaron.schurger at gmail.com (Aaron Schurger) Date: Mon, 17 Jun 2013 14:25:25 +0200 Subject: [FieldTrip] ERP average Brain Vision is different from ERP average FieldTrip In-Reply-To: References: Message-ID: To me it really looks like BVA is applying a high-pass filter at some stage. When you export the data, the high-pass filter has probably already been applied. It is typical in EEG (though not a good idea in my opinion) to apply a high-pass filter with a cutoff at around 0.05 or 0.1 Hz. There should be a setting somewhere in BVA to turn off the high-pass filter. Anyway, that's my guess just from looking at the figure you attached. Cheers, Aaron On Mon, Jun 17, 2013 at 1:56 PM, Karen Schuil wrote: > Dear Fieldtrip Users, > > I have a BVA-Fieldtrip problem. The average ERPs of Brain Vision Analyser > are different from the ERPS of FieldTrip. It seems that in Fieldtrip a slow > negative drift is added and peaks are more/less pronounced than in BVA > (attached is a picture of the two different plots). > > An expert FieldTrip User and I could not find a solution for this problem. I > hope one of you has a suggestion for this problem. > > The individual trial data was exported from BVA (version 2.02.5859) with the > following settings: > File extension: .seg > Write header file: yes > Write marker file: yes > Format: BINARY > Orientation: MULTIPLEXED > Line Delimiter: CRLF (PC style) > Binary format: 16-Bit signed integer format > Set resolution manually: no > Individually optimized resolution for each channel: yes > Convert to big-endian order: no > Export all channels: no > Export the following channels: > AF3 AF4 AF7 AF8 AFz C1 C2 C3 C4 C5 C6 CP1 CP2 CP3 CP4 CP5 > CP6 CPz Cz F1 F2 F3 F4 F5 F6 F7 F8 FC1 FC2 FC3 FC4 FC5 > FC6 FCz Fpz FT7 FT8 Fz Iz O1 O2 Oz P1 P10 P2 P3 P4 P5 > P6 P7 P8 P9 PO3 PO4 PO7 PO8 POz Pz T7 T8 TP7 TP8 > Created Using Component Version 2.0.2.5827 > > We used Matlab version 7.10.0 R2, and fieldtrip version 13-06-2013 (and > tried a version from 2011). > > The scripts we used are read_analyzer_data and timelockanalysis. This is the > code we used for calling the scripts: > % read data into fieldtrip > cfg = []; > > cfg.inputfile = 'pp10_A'; > cfg.triggercode = 'S 20'; > cfg.triggertype = 'Stimulus'; > cfg.prestim = 1.2; > cfg.poststim = 1.7; > > pp10_l = read_analyzer_data(cfg); > > % check: compute ERP > % > cfg = []; > pp10_ERP = timelockanalysis(cfg, pp10_l); > > %plot ERP > > cfg = []; > cfg.layout = 'elec1010.lay'; > cfg.xlim = [-0.15 1.7]; > cfg.ylim = [-12.25 12.25]; > % cfg.baseline = 'yes'; > % cfg.baselinetype = 'absolute'; > cfg.showlabels = 'yes'; > cfg.interactive = 'yes'; > > multiplotER(cfg, pp10_ERP); > > > I hope you can help! > > Kind regards, > Karen > > > > > > > > > > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -- Aaron Schurger, PhD Post-doctoral researcher INSERM U992 / NeuroSpin CEA - Saclay, France +33-1-69-08-66-47 aaron.schurger at gmail.com http://www.unicog.org From r.vandermeij at donders.ru.nl Mon Jun 17 14:48:18 2013 From: r.vandermeij at donders.ru.nl (Roemer van der Meij) Date: Mon, 17 Jun 2013 14:48:18 +0200 Subject: [FieldTrip] ERP average Brain Vision is different from ERP average FieldTrip In-Reply-To: References: Message-ID: Hi Karen, In case the data wasn't exported with the filtering applied in BVA (see email Jim) then that looks like a probable cause. In case the data was exported with the filterings, I noticed in the BVA part of the attached image that it says AF7 - ref, where I see no such thing in your exported channel list (and thus not in the fieldtrip image). What the AF7 - ref is referring to I don't know, it seems like a uncommon place in the pipeline to do rereferencing, but maybe I'm missing something obvious. Nevertheless, it might lead you somewhere. All the best, Roemer On Mon, Jun 17, 2013 at 1:56 PM, Karen Schuil wrote: > Dear Fieldtrip Users, > > I have a BVA-Fieldtrip problem. The average ERPs of Brain Vision Analyser > are different from the ERPS of FieldTrip. It seems that in Fieldtrip a slow > negative drift is added and peaks are more/less pronounced than in BVA > (attached is a picture of the two different plots). > > An expert FieldTrip User and I could not find a solution for this problem. > I hope one of you has a suggestion for this problem. > > The individual trial data was exported from BVA (version 2.02.5859) with > the following settings: > File extension: .seg > Write header file: yes > Write marker file: yes > Format: BINARY > Orientation: MULTIPLEXED > Line Delimiter: CRLF (PC style) > Binary format: 16-Bit signed integer format > Set resolution manually: no > Individually optimized resolution for each channel: yes > Convert to big-endian order: no > Export all channels: no > Export the following channels: > AF3 AF4 AF7 AF8 AFz C1 C2 C3 C4 C5 C6 CP1 CP2 CP3 CP4 CP5 > CP6 CPz Cz F1 F2 F3 F4 F5 F6 F7 F8 FC1 FC2 FC3 FC4 FC5 > FC6 FCz Fpz FT7 FT8 Fz Iz O1 O2 Oz P1 P10 P2 P3 P4 P5 > P6 P7 P8 P9 PO3 PO4 PO7 PO8 POz Pz T7 T8 TP7 TP8 > Created Using Component Version 2.0.2.5827 > > We used Matlab version 7.10.0 R2, and fieldtrip version 13-06-2013 (and > tried a version from 2011). > > The scripts we used are read_analyzer_data and timelockanalysis. This is > the code we used for calling the scripts: > % read data into fieldtrip > cfg = []; > > cfg.inputfile = 'pp10_A'; > cfg.triggercode = 'S 20'; > cfg.triggertype = 'Stimulus'; > cfg.prestim = 1.2; > cfg.poststim = 1.7; > > pp10_l = read_analyzer_data(cfg); > > % check: compute ERP > % > cfg = []; > pp10_ERP = timelockanalysis(cfg, pp10_l); > > %plot ERP > > cfg = []; > cfg.layout = 'elec1010.lay'; > cfg.xlim = [-0.15 1.7]; > cfg.ylim = [-12.25 12.25]; > % cfg.baseline = 'yes'; > % cfg.baselinetype = 'absolute'; > cfg.showlabels = 'yes'; > cfg.interactive = 'yes'; > > multiplotER(cfg, pp10_ERP); > > > I hope you can help! > > Kind regards, > Karen > > > > > > > > > > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > -- Roemer van der Meij M.Sc. PhD Candidate Donders Institute for Brain, Cognition and Behaviour Centre for Cognition P.O. Box 9104 6500 HE Nijmegen The Netherlands Tel: +31(0)24 3655932 E-mail: r.vandermeij at donders.ru.nl -------------- next part -------------- An HTML attachment was scrubbed... URL: From t.grent-tjong at donders.ru.nl Mon Jun 17 14:55:43 2013 From: t.grent-tjong at donders.ru.nl (Tineke Grent-'t-Jong) Date: Mon, 17 Jun 2013 14:55:43 +0200 Subject: [FieldTrip] fieldtrip Digest, Vol 31, Issue 32 References: Message-ID: <5819595A0394409287071472F2D6352A@socrates> Hi Karen, To me it looks like the only thing you need to do is subtract the baseline, like you have done in BVA (specifying the same window with cfg.baseline = [xmin xmax], not 'yes'). The average ERP that you are plotting in BVA has already been baselined, but the single trials that go into the ft_timelockanalysis function are not, hence the need for baselining later, like in your case at the level of plotting. Hope this helps, Tineke ----- Original Message ----- From: To: Sent: Monday, June 17, 2013 1:56 PM Subject: fieldtrip Digest, Vol 31, Issue 32 > Send fieldtrip mailing list submissions to > fieldtrip at science.ru.nl > > To subscribe or unsubscribe via the World Wide Web, visit > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > or, via email, send a message with subject or body 'help' to > fieldtrip-request at science.ru.nl > > You can reach the person managing the list at > fieldtrip-owner at science.ru.nl > > When replying, please edit your Subject line so it is more specific > than "Re: Contents of fieldtrip digest..." > -------------------------------------------------------------------------------- > Today's Topics: > > 1. ERP average Brain Vision is different from ERP average > FieldTrip (Karen Schuil) > -------------------------------------------------------------------------------- > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip From aaron.schurger at gmail.com Mon Jun 17 15:08:25 2013 From: aaron.schurger at gmail.com (Aaron Schurger) Date: Mon, 17 Jun 2013 15:08:25 +0200 Subject: [FieldTrip] fieldtrip Digest, Vol 31, Issue 32 In-Reply-To: <5819595A0394409287071472F2D6352A@socrates> References: <5819595A0394409287071472F2D6352A@socrates> Message-ID: Hi, Karen, Tineke, To me it looks like more than just a baseline shift. It looks like either linear de-trending or high-pass filtering was applied to the BVA data. I don't see how a baseline shift could get rid of the low frequency component that is clearly visible in the FT plot, but not the BVA plot. Cheers, Aaron On Mon, Jun 17, 2013 at 2:55 PM, Tineke Grent-'t-Jong wrote: > Hi Karen, > > To me it looks like the only thing you need to do is subtract the baseline, > like you have done in BVA (specifying the same window with cfg.baseline = > [xmin xmax], not 'yes'). The average ERP that you are plotting in BVA has > already been baselined, but the single trials that go into the > ft_timelockanalysis function are not, hence the need for baselining later, > like in your case at the level of plotting. > > Hope this helps, > > Tineke > > > ----- Original Message ----- From: > To: > Sent: Monday, June 17, 2013 1:56 PM > Subject: fieldtrip Digest, Vol 31, Issue 32 > > >> Send fieldtrip mailing list submissions to >> fieldtrip at science.ru.nl >> >> To subscribe or unsubscribe via the World Wide Web, visit >> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip >> or, via email, send a message with subject or body 'help' to >> fieldtrip-request at science.ru.nl >> >> You can reach the person managing the list at >> fieldtrip-owner at science.ru.nl >> >> When replying, please edit your Subject line so it is more specific >> than "Re: Contents of fieldtrip digest..." >> > > > -------------------------------------------------------------------------------- > > >> Today's Topics: >> >> 1. ERP average Brain Vision is different from ERP average >> FieldTrip (Karen Schuil) >> > > > -------------------------------------------------------------------------------- > > >> _______________________________________________ >> fieldtrip mailing list >> fieldtrip at donders.ru.nl >> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -- Aaron Schurger, PhD Post-doctoral researcher INSERM U992 / NeuroSpin CEA - Saclay, France +33-1-69-08-66-47 aaron.schurger at gmail.com http://www.unicog.org From schuil at fsw.eur.nl Mon Jun 17 15:22:22 2013 From: schuil at fsw.eur.nl (Karen Schuil) Date: Mon, 17 Jun 2013 15:22:22 +0200 Subject: [FieldTrip] ERP average Brain Vision is different from ERP average FieldTrip In-Reply-To: References: Message-ID: Dear Jim, Aaron, Roemer and Tineke, Thanks for your quick response and suggestions! The whole preprocessing (including the filters) was done in BVA. After segmentatation of the conditions, we exported the data to Fieldtrip. The only steps we did in Fieldtrip was averaging, creating and plotting an ERP. Therefore it can't be the filters, right? Unless, the averaging step in BVA applies filters as well. The ref in AF7-ref is added by BVA and refers to the channels being linked to the mastoids. We have also tried it with subtracting a baseline, but this unfortunately did not help. Do you have any other suggestions? Cheers, Karen On Mon, Jun 17, 2013 at 2:25 PM, Aaron Schurger wrote: > To me it really looks like BVA is applying a high-pass filter at some > stage. When you export the data, the high-pass filter has probably > already been applied. It is typical in EEG (though not a good idea in > my opinion) to apply a high-pass filter with a cutoff at around 0.05 > or 0.1 Hz. There should be a setting somewhere in BVA to turn off the > high-pass filter. Anyway, that's my guess just from looking at the > figure you attached. > Cheers, > Aaron > > On Mon, Jun 17, 2013 at 1:56 PM, Karen Schuil > wrote: > > Dear Fieldtrip Users, > > > > I have a BVA-Fieldtrip problem. The average ERPs of Brain Vision Analyser > > are different from the ERPS of FieldTrip. It seems that in Fieldtrip a > slow > > negative drift is added and peaks are more/less pronounced than in BVA > > (attached is a picture of the two different plots). > > > > An expert FieldTrip User and I could not find a solution for this > problem. I > > hope one of you has a suggestion for this problem. > > > > The individual trial data was exported from BVA (version 2.02.5859) with > the > > following settings: > > File extension: .seg > > Write header file: yes > > Write marker file: yes > > Format: BINARY > > Orientation: MULTIPLEXED > > Line Delimiter: CRLF (PC style) > > Binary format: 16-Bit signed integer format > > Set resolution manually: no > > Individually optimized resolution for each channel: yes > > Convert to big-endian order: no > > Export all channels: no > > Export the following channels: > > AF3 AF4 AF7 AF8 AFz C1 C2 C3 C4 C5 C6 CP1 CP2 CP3 CP4 CP5 > > CP6 CPz Cz F1 F2 F3 F4 F5 F6 F7 F8 FC1 FC2 FC3 FC4 FC5 > > FC6 FCz Fpz FT7 FT8 Fz Iz O1 O2 Oz P1 P10 P2 P3 P4 P5 > > P6 P7 P8 P9 PO3 PO4 PO7 PO8 POz Pz T7 T8 TP7 TP8 > > Created Using Component Version 2.0.2.5827 > > > > We used Matlab version 7.10.0 R2, and fieldtrip version 13-06-2013 (and > > tried a version from 2011). > > > > The scripts we used are read_analyzer_data and timelockanalysis. This is > the > > code we used for calling the scripts: > > % read data into fieldtrip > > cfg = []; > > > > cfg.inputfile = 'pp10_A'; > > cfg.triggercode = 'S 20'; > > cfg.triggertype = 'Stimulus'; > > cfg.prestim = 1.2; > > cfg.poststim = 1.7; > > > > pp10_l = read_analyzer_data(cfg); > > > > % check: compute ERP > > % > > cfg = []; > > pp10_ERP = timelockanalysis(cfg, pp10_l); > > > > %plot ERP > > > > cfg = []; > > cfg.layout = 'elec1010.lay'; > > cfg.xlim = [-0.15 1.7]; > > cfg.ylim = [-12.25 12.25]; > > % cfg.baseline = 'yes'; > > % cfg.baselinetype = 'absolute'; > > cfg.showlabels = 'yes'; > > cfg.interactive = 'yes'; > > > > multiplotER(cfg, pp10_ERP); > > > > > > I hope you can help! > > > > Kind regards, > > Karen > > > > > > > > > > > > > > > > > > > > > > > > _______________________________________________ > > fieldtrip mailing list > > fieldtrip at donders.ru.nl > > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > > > -- > Aaron Schurger, PhD > Post-doctoral researcher > INSERM U992 / NeuroSpin > CEA - Saclay, France > +33-1-69-08-66-47 > aaron.schurger at gmail.com > http://www.unicog.org > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > -- ------------------- Karen Schuil PhD student Erasmus University Rotterdam Institute of Psychology, T 13-09 Burgemeester Oudlaan 50 P.O. Box 1738 3000 DR Rotterdam The Netherlands Phone: +31 (0) 10 408 2293 Email: schuil at fsw.eur.nl -------------- next part -------------- An HTML attachment was scrubbed... URL: From t.grent-tjong at donders.ru.nl Mon Jun 17 15:39:30 2013 From: t.grent-tjong at donders.ru.nl (Tineke Grent-'t-Jong) Date: Mon, 17 Jun 2013 15:39:30 +0200 Subject: [FieldTrip] fieldtrip Digest, Vol 31, Issue 32 References: <5819595A0394409287071472F2D6352A@socrates> Message-ID: <0840040570ED4FE896ED4FAE33DE1355@socrates> Hi Karen, Aaron is right that it could be an effect of de-trending or high-pass filtering. You could try running the ft_timelockanalyis step again with option cfg.removemean = 'no' ('yes' is the default option!). If this solves the problem then it indeed was some kind of de-trending problem. Cheers, Tineke ----- Original Message ----- From: "Aaron Schurger" To: "Tineke Grent-'t-Jong" ; "FieldTrip discussion list" Sent: Monday, June 17, 2013 3:08 PM Subject: Re: [FieldTrip] fieldtrip Digest, Vol 31, Issue 32 > Hi, Karen, Tineke, > To me it looks like more than just a baseline shift. It looks like > either linear de-trending or high-pass filtering was applied to the > BVA data. I don't see how a baseline shift could get rid of the low > frequency component that is clearly visible in the FT plot, but not > the BVA plot. > Cheers, > Aaron > > On Mon, Jun 17, 2013 at 2:55 PM, Tineke Grent-'t-Jong > wrote: >> Hi Karen, >> >> To me it looks like the only thing you need to do is subtract the >> baseline, >> like you have done in BVA (specifying the same window with cfg.baseline = >> [xmin xmax], not 'yes'). The average ERP that you are plotting in BVA has >> already been baselined, but the single trials that go into the >> ft_timelockanalysis function are not, hence the need for baselining >> later, >> like in your case at the level of plotting. >> >> Hope this helps, >> >> Tineke >> >> >> ----- Original Message ----- From: >> To: >> Sent: Monday, June 17, 2013 1:56 PM >> Subject: fieldtrip Digest, Vol 31, Issue 32 >> >> >>> Send fieldtrip mailing list submissions to >>> fieldtrip at science.ru.nl >>> >>> To subscribe or unsubscribe via the World Wide Web, visit >>> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip >>> or, via email, send a message with subject or body 'help' to >>> fieldtrip-request at science.ru.nl >>> >>> You can reach the person managing the list at >>> fieldtrip-owner at science.ru.nl >>> >>> When replying, please edit your Subject line so it is more specific >>> than "Re: Contents of fieldtrip digest..." >>> >> >> >> -------------------------------------------------------------------------------- >> >> >>> Today's Topics: >>> >>> 1. ERP average Brain Vision is different from ERP average >>> FieldTrip (Karen Schuil) >>> >> >> >> -------------------------------------------------------------------------------- >> >> >>> _______________________________________________ >>> fieldtrip mailing list >>> fieldtrip at donders.ru.nl >>> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip >> >> >> _______________________________________________ >> fieldtrip mailing list >> fieldtrip at donders.ru.nl >> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > > > -- > Aaron Schurger, PhD > Post-doctoral researcher > INSERM U992 / NeuroSpin > CEA - Saclay, France > +33-1-69-08-66-47 > aaron.schurger at gmail.com > http://www.unicog.org > From berryv.dberg at gmail.com Mon Jun 17 15:40:14 2013 From: berryv.dberg at gmail.com (berry van den berg) Date: Mon, 17 Jun 2013 09:40:14 -0400 Subject: [FieldTrip] ERP average Brain Vision is different from ERP average FieldTrip In-Reply-To: References: Message-ID: I dont know BVA but it looks like the ERPs are a bit more different (for example at timepoint 100ms) then I would expect just based on high pass filtering.... Suggesting that there is different data going into averaging. Maybe brain vision just detects trials with artifacts and does not throw out the trials until the averaging step (similar to ERPlab). Can you check the number of trials? Cheers, Berry van den Berg On 17 June 2013 09:22, Karen Schuil wrote: > Dear Jim, Aaron, Roemer and Tineke, > > Thanks for your quick response and suggestions! The whole preprocessing > (including the filters) was done in BVA. After segmentatation of the > conditions, we exported the data to Fieldtrip. The only steps we did in > Fieldtrip was averaging, creating and plotting an ERP. Therefore it can't > be the filters, right? Unless, the averaging step in BVA applies filters as > well. > > The ref in AF7-ref is added by BVA and refers to the channels being linked > to the mastoids. > > We have also tried it with subtracting a baseline, but this unfortunately > did not help. > > Do you have any other suggestions? > > Cheers, Karen > > > > > On Mon, Jun 17, 2013 at 2:25 PM, Aaron Schurger wrote: > >> To me it really looks like BVA is applying a high-pass filter at some >> stage. When you export the data, the high-pass filter has probably >> already been applied. It is typical in EEG (though not a good idea in >> my opinion) to apply a high-pass filter with a cutoff at around 0.05 >> or 0.1 Hz. There should be a setting somewhere in BVA to turn off the >> high-pass filter. Anyway, that's my guess just from looking at the >> figure you attached. >> Cheers, >> Aaron >> >> On Mon, Jun 17, 2013 at 1:56 PM, Karen Schuil >> wrote: >> > Dear Fieldtrip Users, >> > >> > I have a BVA-Fieldtrip problem. The average ERPs of Brain Vision >> Analyser >> > are different from the ERPS of FieldTrip. It seems that in Fieldtrip a >> slow >> > negative drift is added and peaks are more/less pronounced than in BVA >> > (attached is a picture of the two different plots). >> > >> > An expert FieldTrip User and I could not find a solution for this >> problem. I >> > hope one of you has a suggestion for this problem. >> > >> > The individual trial data was exported from BVA (version 2.02.5859) >> with the >> > following settings: >> > File extension: .seg >> > Write header file: yes >> > Write marker file: yes >> > Format: BINARY >> > Orientation: MULTIPLEXED >> > Line Delimiter: CRLF (PC style) >> > Binary format: 16-Bit signed integer format >> > Set resolution manually: no >> > Individually optimized resolution for each channel: yes >> > Convert to big-endian order: no >> > Export all channels: no >> > Export the following channels: >> > AF3 AF4 AF7 AF8 AFz C1 C2 C3 C4 C5 C6 CP1 CP2 CP3 CP4 CP5 >> > CP6 CPz Cz F1 F2 F3 F4 F5 F6 F7 F8 FC1 FC2 FC3 FC4 FC5 >> > FC6 FCz Fpz FT7 FT8 Fz Iz O1 O2 Oz P1 P10 P2 P3 P4 P5 >> > P6 P7 P8 P9 PO3 PO4 PO7 PO8 POz Pz T7 T8 TP7 TP8 >> > Created Using Component Version 2.0.2.5827 >> > >> > We used Matlab version 7.10.0 R2, and fieldtrip version 13-06-2013 (and >> > tried a version from 2011). >> > >> > The scripts we used are read_analyzer_data and timelockanalysis. This >> is the >> > code we used for calling the scripts: >> > % read data into fieldtrip >> > cfg = []; >> > >> > cfg.inputfile = 'pp10_A'; >> > cfg.triggercode = 'S 20'; >> > cfg.triggertype = 'Stimulus'; >> > cfg.prestim = 1.2; >> > cfg.poststim = 1.7; >> > >> > pp10_l = read_analyzer_data(cfg); >> > >> > % check: compute ERP >> > % >> > cfg = []; >> > pp10_ERP = timelockanalysis(cfg, pp10_l); >> > >> > %plot ERP >> > >> > cfg = []; >> > cfg.layout = 'elec1010.lay'; >> > cfg.xlim = [-0.15 1.7]; >> > cfg.ylim = [-12.25 12.25]; >> > % cfg.baseline = 'yes'; >> > % cfg.baselinetype = 'absolute'; >> > cfg.showlabels = 'yes'; >> > cfg.interactive = 'yes'; >> > >> > multiplotER(cfg, pp10_ERP); >> > >> > >> > I hope you can help! >> > >> > Kind regards, >> > Karen >> > >> > >> > >> > >> > >> > >> > >> > >> > >> > >> > >> > _______________________________________________ >> > fieldtrip mailing list >> > fieldtrip at donders.ru.nl >> > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip >> >> >> >> -- >> Aaron Schurger, PhD >> Post-doctoral researcher >> INSERM U992 / NeuroSpin >> CEA - Saclay, France >> +33-1-69-08-66-47 >> aaron.schurger at gmail.com >> http://www.unicog.org >> _______________________________________________ >> fieldtrip mailing list >> fieldtrip at donders.ru.nl >> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip >> > > > > -- > ------------------- > Karen Schuil > PhD student > > Erasmus University Rotterdam > Institute of Psychology, T 13-09 > Burgemeester Oudlaan 50 > P.O. Box 1738 > 3000 DR Rotterdam > The Netherlands > Phone: +31 (0) 10 408 2293 > Email: schuil at fsw.eur.nl > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > -- Berry van den Berg berryv.dberg at gmail.com -------------- next part -------------- An HTML attachment was scrubbed... URL: From aaron.schurger at gmail.com Mon Jun 17 15:44:05 2013 From: aaron.schurger at gmail.com (Aaron Schurger) Date: Mon, 17 Jun 2013 15:44:05 +0200 Subject: [FieldTrip] ERP average Brain Vision is different from ERP average FieldTrip In-Reply-To: References: Message-ID: Hi, Karen, Yes, you're right - it would have to be the case that the averaging step in BVA applies the filters. That would be where I would check. If nothing there then it really is mysterious! Aaron On Mon, Jun 17, 2013 at 3:22 PM, Karen Schuil wrote: > Dear Jim, Aaron, Roemer and Tineke, > > Thanks for your quick response and suggestions! The whole preprocessing > (including the filters) was done in BVA. After segmentatation of the > conditions, we exported the data to Fieldtrip. The only steps we did in > Fieldtrip was averaging, creating and plotting an ERP. Therefore it can't be > the filters, right? Unless, the averaging step in BVA applies filters as > well. > > The ref in AF7-ref is added by BVA and refers to the channels being linked > to the mastoids. > > We have also tried it with subtracting a baseline, but this unfortunately > did not help. > > Do you have any other suggestions? > > Cheers, Karen > > > > > On Mon, Jun 17, 2013 at 2:25 PM, Aaron Schurger > wrote: >> >> To me it really looks like BVA is applying a high-pass filter at some >> stage. When you export the data, the high-pass filter has probably >> already been applied. It is typical in EEG (though not a good idea in >> my opinion) to apply a high-pass filter with a cutoff at around 0.05 >> or 0.1 Hz. There should be a setting somewhere in BVA to turn off the >> high-pass filter. Anyway, that's my guess just from looking at the >> figure you attached. >> Cheers, >> Aaron >> >> On Mon, Jun 17, 2013 at 1:56 PM, Karen Schuil >> wrote: >> > Dear Fieldtrip Users, >> > >> > I have a BVA-Fieldtrip problem. The average ERPs of Brain Vision >> > Analyser >> > are different from the ERPS of FieldTrip. It seems that in Fieldtrip a >> > slow >> > negative drift is added and peaks are more/less pronounced than in BVA >> > (attached is a picture of the two different plots). >> > >> > An expert FieldTrip User and I could not find a solution for this >> > problem. I >> > hope one of you has a suggestion for this problem. >> > >> > The individual trial data was exported from BVA (version 2.02.5859) with >> > the >> > following settings: >> > File extension: .seg >> > Write header file: yes >> > Write marker file: yes >> > Format: BINARY >> > Orientation: MULTIPLEXED >> > Line Delimiter: CRLF (PC style) >> > Binary format: 16-Bit signed integer format >> > Set resolution manually: no >> > Individually optimized resolution for each channel: yes >> > Convert to big-endian order: no >> > Export all channels: no >> > Export the following channels: >> > AF3 AF4 AF7 AF8 AFz C1 C2 C3 C4 C5 C6 CP1 CP2 CP3 CP4 CP5 >> > CP6 CPz Cz F1 F2 F3 F4 F5 F6 F7 F8 FC1 FC2 FC3 FC4 FC5 >> > FC6 FCz Fpz FT7 FT8 Fz Iz O1 O2 Oz P1 P10 P2 P3 P4 P5 >> > P6 P7 P8 P9 PO3 PO4 PO7 PO8 POz Pz T7 T8 TP7 TP8 >> > Created Using Component Version 2.0.2.5827 >> > >> > We used Matlab version 7.10.0 R2, and fieldtrip version 13-06-2013 (and >> > tried a version from 2011). >> > >> > The scripts we used are read_analyzer_data and timelockanalysis. This is >> > the >> > code we used for calling the scripts: >> > % read data into fieldtrip >> > cfg = []; >> > >> > cfg.inputfile = 'pp10_A'; >> > cfg.triggercode = 'S 20'; >> > cfg.triggertype = 'Stimulus'; >> > cfg.prestim = 1.2; >> > cfg.poststim = 1.7; >> > >> > pp10_l = read_analyzer_data(cfg); >> > >> > % check: compute ERP >> > % >> > cfg = []; >> > pp10_ERP = timelockanalysis(cfg, pp10_l); >> > >> > %plot ERP >> > >> > cfg = []; >> > cfg.layout = 'elec1010.lay'; >> > cfg.xlim = [-0.15 1.7]; >> > cfg.ylim = [-12.25 12.25]; >> > % cfg.baseline = 'yes'; >> > % cfg.baselinetype = 'absolute'; >> > cfg.showlabels = 'yes'; >> > cfg.interactive = 'yes'; >> > >> > multiplotER(cfg, pp10_ERP); >> > >> > >> > I hope you can help! >> > >> > Kind regards, >> > Karen >> > >> > >> > >> > >> > >> > >> > >> > >> > >> > >> > >> > _______________________________________________ >> > fieldtrip mailing list >> > fieldtrip at donders.ru.nl >> > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip >> >> >> >> -- >> Aaron Schurger, PhD >> Post-doctoral researcher >> INSERM U992 / NeuroSpin >> CEA - Saclay, France >> +33-1-69-08-66-47 >> aaron.schurger at gmail.com >> http://www.unicog.org >> _______________________________________________ >> fieldtrip mailing list >> fieldtrip at donders.ru.nl >> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > > > > -- > ------------------- > Karen Schuil > PhD student > > Erasmus University Rotterdam > Institute of Psychology, T 13-09 > Burgemeester Oudlaan 50 > P.O. Box 1738 > 3000 DR Rotterdam > The Netherlands > Phone: +31 (0) 10 408 2293 > Email: schuil at fsw.eur.nl > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -- Aaron Schurger, PhD Post-doctoral researcher INSERM U992 / NeuroSpin CEA - Saclay, France +33-1-69-08-66-47 aaron.schurger at gmail.com http://www.unicog.org From eelke.spaak at donders.ru.nl Tue Jun 18 10:29:34 2013 From: eelke.spaak at donders.ru.nl (Eelke Spaak) Date: Tue, 18 Jun 2013 10:29:34 +0200 Subject: [FieldTrip] ERP average Brain Vision is different from ERP average FieldTrip In-Reply-To: References: Message-ID: Dear Karen, It seems likely (as the other responses also indicate) that BrainVision Analyzer is doing something to the data that FieldTrip is not; in other words, the FieldTrip ERP is probably more 'pure'. Therefore, perhaps it might be worth asking around on the BVA mailing list if the people there know what BVA is doing to the data prior to computing and displaying the average? It is easy to check whether FieldTrip is doing something unexpected to the data, by computing and plotting the average yourself: erp = mean(cat(3, pp10_l.trial{:}), 3); chanind = strmatch('AF7', pp10_l.label); plot(pp10_l.time{1}, erp(chanind,:)); This only works if all trials have identical time axes, but judging from your script I think they do. It the above steps give a different plot than the FT functions, something is possibly (/probably) wrong in the FT code. Best, Eelke On 17 June 2013 15:22, Karen Schuil wrote: > Dear Jim, Aaron, Roemer and Tineke, > > Thanks for your quick response and suggestions! The whole preprocessing > (including the filters) was done in BVA. After segmentatation of the > conditions, we exported the data to Fieldtrip. The only steps we did in > Fieldtrip was averaging, creating and plotting an ERP. Therefore it can't be > the filters, right? Unless, the averaging step in BVA applies filters as > well. > > The ref in AF7-ref is added by BVA and refers to the channels being linked > to the mastoids. > > We have also tried it with subtracting a baseline, but this unfortunately > did not help. > > Do you have any other suggestions? > > Cheers, Karen > > > > > On Mon, Jun 17, 2013 at 2:25 PM, Aaron Schurger > wrote: >> >> To me it really looks like BVA is applying a high-pass filter at some >> stage. When you export the data, the high-pass filter has probably >> already been applied. It is typical in EEG (though not a good idea in >> my opinion) to apply a high-pass filter with a cutoff at around 0.05 >> or 0.1 Hz. There should be a setting somewhere in BVA to turn off the >> high-pass filter. Anyway, that's my guess just from looking at the >> figure you attached. >> Cheers, >> Aaron >> >> On Mon, Jun 17, 2013 at 1:56 PM, Karen Schuil >> wrote: >> > Dear Fieldtrip Users, >> > >> > I have a BVA-Fieldtrip problem. The average ERPs of Brain Vision >> > Analyser >> > are different from the ERPS of FieldTrip. It seems that in Fieldtrip a >> > slow >> > negative drift is added and peaks are more/less pronounced than in BVA >> > (attached is a picture of the two different plots). >> > >> > An expert FieldTrip User and I could not find a solution for this >> > problem. I >> > hope one of you has a suggestion for this problem. >> > >> > The individual trial data was exported from BVA (version 2.02.5859) with >> > the >> > following settings: >> > File extension: .seg >> > Write header file: yes >> > Write marker file: yes >> > Format: BINARY >> > Orientation: MULTIPLEXED >> > Line Delimiter: CRLF (PC style) >> > Binary format: 16-Bit signed integer format >> > Set resolution manually: no >> > Individually optimized resolution for each channel: yes >> > Convert to big-endian order: no >> > Export all channels: no >> > Export the following channels: >> > AF3 AF4 AF7 AF8 AFz C1 C2 C3 C4 C5 C6 CP1 CP2 CP3 CP4 CP5 >> > CP6 CPz Cz F1 F2 F3 F4 F5 F6 F7 F8 FC1 FC2 FC3 FC4 FC5 >> > FC6 FCz Fpz FT7 FT8 Fz Iz O1 O2 Oz P1 P10 P2 P3 P4 P5 >> > P6 P7 P8 P9 PO3 PO4 PO7 PO8 POz Pz T7 T8 TP7 TP8 >> > Created Using Component Version 2.0.2.5827 >> > >> > We used Matlab version 7.10.0 R2, and fieldtrip version 13-06-2013 (and >> > tried a version from 2011). >> > >> > The scripts we used are read_analyzer_data and timelockanalysis. This is >> > the >> > code we used for calling the scripts: >> > % read data into fieldtrip >> > cfg = []; >> > >> > cfg.inputfile = 'pp10_A'; >> > cfg.triggercode = 'S 20'; >> > cfg.triggertype = 'Stimulus'; >> > cfg.prestim = 1.2; >> > cfg.poststim = 1.7; >> > >> > pp10_l = read_analyzer_data(cfg); >> > >> > % check: compute ERP >> > % >> > cfg = []; >> > pp10_ERP = timelockanalysis(cfg, pp10_l); >> > >> > %plot ERP >> > >> > cfg = []; >> > cfg.layout = 'elec1010.lay'; >> > cfg.xlim = [-0.15 1.7]; >> > cfg.ylim = [-12.25 12.25]; >> > % cfg.baseline = 'yes'; >> > % cfg.baselinetype = 'absolute'; >> > cfg.showlabels = 'yes'; >> > cfg.interactive = 'yes'; >> > >> > multiplotER(cfg, pp10_ERP); >> > >> > >> > I hope you can help! >> > >> > Kind regards, >> > Karen >> > >> > >> > >> > >> > >> > >> > >> > >> > >> > >> > >> > _______________________________________________ >> > fieldtrip mailing list >> > fieldtrip at donders.ru.nl >> > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip >> >> >> >> -- >> Aaron Schurger, PhD >> Post-doctoral researcher >> INSERM U992 / NeuroSpin >> CEA - Saclay, France >> +33-1-69-08-66-47 >> aaron.schurger at gmail.com >> http://www.unicog.org >> _______________________________________________ >> fieldtrip mailing list >> fieldtrip at donders.ru.nl >> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > > > > -- > ------------------- > Karen Schuil > PhD student > > Erasmus University Rotterdam > Institute of Psychology, T 13-09 > Burgemeester Oudlaan 50 > P.O. Box 1738 > 3000 DR Rotterdam > The Netherlands > Phone: +31 (0) 10 408 2293 > Email: schuil at fsw.eur.nl > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip From mje.mads at gmail.com Tue Jun 18 10:44:01 2013 From: mje.mads at gmail.com (Mads Jensen) Date: Tue, 18 Jun 2013 10:44:01 +0200 Subject: [FieldTrip] select trial by previous trigger code Message-ID: <51C01DD1.5070005@gmail.com> Hi all, I would like to know if it is possible select a trail based on the previous trigger code? I got a dataset (MEG, neuromeg) where sometimes the subject just press a button and sometimes a cue is shown and they then press the button, the button presses are coded "1" and the cue "2". So, what I would like is to datasets one with trials where there has been no cue and one dataset where the trials that have cue is. Is that possible to do automatically or do I have to do a "by hand"? best wishes, mads From s.vanpelt at fcdonders.ru.nl Tue Jun 18 11:11:06 2013 From: s.vanpelt at fcdonders.ru.nl (Stan van Pelt) Date: Tue, 18 Jun 2013 11:11:06 +0200 (CEST) Subject: [FieldTrip] select trial by previous trigger code References: <51C01DD1.5070005@gmail.com> Message-ID: <03cc01ce6c03$c403fb20$4c0bf160$@vanpelt@fcdonders.ru.nl> Dear Mads, It is not possible to do this automatically. However, by writing your own 'trialfun', you should be able to program this in a relative straightforward manner. You can enter this trialfun-name in the cfg.trialfun configuration option when subsequently calling ft_definetrial. See http://fieldtrip.fcdonders.nl/example/making_your_own_trialfun_for_conditi onal_trial_definition Best, Stan Stan van Pelt, PhD Donders Institute for Brain, Cognition and Behaviour Centre for Cognition Montessorilaan 3, B.01.19 6525 HR Nijmegen tel: 024-3616288 -----Original Message----- From: fieldtrip-bounces at science.ru.nl [mailto:fieldtrip-bounces at science.ru.nl] On Behalf Of Mads Jensen Sent: dinsdag 18 juni 2013 10:44 To: FieldTrip discussion list Subject: [FieldTrip] select trial by previous trigger code Hi all, I would like to know if it is possible select a trail based on the previous trigger code? I got a dataset (MEG, neuromeg) where sometimes the subject just press a button and sometimes a cue is shown and they then press the button, the button presses are coded "1" and the cue "2". So, what I would like is to datasets one with trials where there has been no cue and one dataset where the trials that have cue is. Is that possible to do automatically or do I have to do a "by hand"? best wishes, mads _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip From jm.horschig at donders.ru.nl Tue Jun 18 11:11:50 2013 From: jm.horschig at donders.ru.nl (=?ISO-8859-1?Q?=22J=F6rn_M=2E_Horschig=22?=) Date: Tue, 18 Jun 2013 11:11:50 +0200 Subject: [FieldTrip] select trial by previous trigger code In-Reply-To: <51C01DD1.5070005@gmail.com> References: <51C01DD1.5070005@gmail.com> Message-ID: <51C02456.2000800@donders.ru.nl> Hi Mads, such things are possible if you write your own trial function. Basically, you need to read in the events (i.e. trigger values) and then make a selection based on that, see also here: http://fieldtrip.fcdonders.nl/example/making_your_own_trialfun_for_conditional_trial_definition?s[]=trialfun http://fieldtrip.fcdonders.nl/faq/what_is_the_relation_between_events_such_as_triggers_and_trials?s[]=trialfun Hope that helps! Best, Jörn On 6/18/2013 10:44 AM, Mads Jensen wrote: > Hi all, > > I would like to know if it is possible select a trail based on the > previous trigger code? > > I got a dataset (MEG, neuromeg) where sometimes the subject just press > a button and sometimes a cue is shown and they then press the button, > the button presses are coded "1" and the cue "2". So, what I would > like is to datasets one with trials where there has been no cue and > one dataset where the trials that have cue is. Is that possible to do > automatically or do I have to do a "by hand"? > > best wishes, > mads > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -- Jörn M. Horschig PhD Student Donders Institute for Brain, Cognition and Behaviour Centre for Cognitive Neuroimaging Radboud University Nijmegen Neuronal Oscillations Group FieldTrip Development Team P.O. Box 9101 NL-6500 HB Nijmegen The Netherlands Contact: E-Mail: jm.horschig at donders.ru.nl Tel: +31-(0)24-36-68493 Web: http://www.ru.nl/donders Visiting address: Trigon, room 2.30 Kapittelweg 29 NL-6525 EN Nijmegen The Netherlands From yuvharpaz at gmail.com Tue Jun 18 14:58:15 2013 From: yuvharpaz at gmail.com (Yuval Harpaz) Date: Tue, 18 Jun 2013 15:58:15 +0300 Subject: [FieldTrip] fixed dipole orientation for MNE Message-ID: Dear group I would like to ask again ( http://mailman.science.ru.nl/pipermail/fieldtrip/2011-February/003456.html) about head model with fixed dipole orientation (obtained from freesurfer), as I saw no reply to the previous message. I understand that there is no civilized way, currently, to tell MNE or beamforming to use fixed orientation, or am I wrong? applying 'sam' I managed to set dipole orinetation by making a dip.mom field in addition to dip.pos and by gain = lf; instead of the existing gain = lf * UnitMDip'; note that here lf is a vector (no 3 columns). However this is patchy and not thorough. So can you please tell me if there is a way to do it with regular ft functions? thank you Yuval Dr .Harpaz BIU MEG lab -------------- next part -------------- An HTML attachment was scrubbed... URL: From eelke.spaak at donders.ru.nl Tue Jun 18 15:16:41 2013 From: eelke.spaak at donders.ru.nl (Eelke Spaak) Date: Tue, 18 Jun 2013 15:16:41 +0200 Subject: [FieldTrip] fixed dipole orientation for MNE In-Reply-To: References: Message-ID: Dear Yuval, The LCMV and DICS beamforming implementations in FieldTrip support cfg..fixedori = 'yes', where is either 'lcmv' or 'dics'. This will compute a filter which constrains each dipole to point in the strongest orientation. For SAM I think this is not implemented, and for MNE I have no clue. Does this answer your question? Or are you lookling for another type of fixed orientation, maybe based on anatomy or so? Best, Eelke On 18 June 2013 14:58, Yuval Harpaz wrote: > Dear group > I would like to ask again > (http://mailman.science.ru.nl/pipermail/fieldtrip/2011-February/003456.html) > about head model with fixed dipole orientation (obtained from freesurfer), > as I saw no reply to the previous message. > > I understand that there is no civilized way, currently, to tell MNE or > beamforming to use fixed orientation, or am I wrong? > > applying 'sam' I managed to set dipole orinetation by making a dip.mom field > in addition to dip.pos and by > gain = lf; > instead of the existing > gain = lf * UnitMDip'; > note that here lf is a vector (no 3 columns). > > However this is patchy and not thorough. So can you please tell me if there > is a way to do it with regular ft functions? > thank you > Yuval > > > > > Dr .Harpaz > > BIU MEG lab > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip From yuvharpaz at gmail.com Tue Jun 18 19:01:40 2013 From: yuvharpaz at gmail.com (Yuval Harpaz) Date: Tue, 18 Jun 2013 20:01:40 +0300 Subject: [FieldTrip] fixed dipole orientation for MNE In-Reply-To: References: Message-ID: Well, it uses fixed orientation but it calculates the orientation based on the signal, not on the anatomy. I am trying to reduce leakage problems by limiting orientation according to structure. you CAN specify dip.mom but this is really buggy. thanks On 18 June 2013 16:16, Eelke Spaak wrote: > Dear Yuval, > > The LCMV and DICS beamforming implementations in FieldTrip support > cfg..fixedori = 'yes', where is either 'lcmv' or > 'dics'. This will compute a filter which constrains each dipole to > point in the strongest orientation. For SAM I think this is not > implemented, and for MNE I have no clue. > > Does this answer your question? Or are you lookling for another type > of fixed orientation, maybe based on anatomy or so? > > Best, > Eelke > > On 18 June 2013 14:58, Yuval Harpaz wrote: > > Dear group > > I would like to ask again > > ( > http://mailman.science.ru.nl/pipermail/fieldtrip/2011-February/003456.html > ) > > about head model with fixed dipole orientation (obtained from > freesurfer), > > as I saw no reply to the previous message. > > > > I understand that there is no civilized way, currently, to tell MNE or > > beamforming to use fixed orientation, or am I wrong? > > > > applying 'sam' I managed to set dipole orinetation by making a dip.mom > field > > in addition to dip.pos and by > > gain = lf; > > instead of the existing > > gain = lf * UnitMDip'; > > note that here lf is a vector (no 3 columns). > > > > However this is patchy and not thorough. So can you please tell me if > there > > is a way to do it with regular ft functions? > > thank you > > Yuval > > > > > > > > > > Dr .Harpaz > > > > BIU MEG lab > > > > _______________________________________________ > > fieldtrip mailing list > > fieldtrip at donders.ru.nl > > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > -- Yuval Dr .Harpaz BIU MEG lab -------------- next part -------------- An HTML attachment was scrubbed... URL: From mje.mads at gmail.com Tue Jun 18 23:52:02 2013 From: mje.mads at gmail.com (Mads Jensen) Date: Tue, 18 Jun 2013 23:52:02 +0200 Subject: [FieldTrip] select trial by previous trigger code In-Reply-To: <51C02456.2000800@donders.ru.nl> References: <51C01DD1.5070005@gmail.com> <51C02456.2000800@donders.ru.nl> Message-ID: <51C0D682.7070008@gmail.com> HI Jörn & Stan, Thanks for your replies and advises. It worked. thanks, best mads On 06/18/2013 11:11 AM, "Jörn M. Horschig" wrote: > Hi Mads, > > such things are possible if you write your own trial function. > Basically, you need to read in the events (i.e. trigger values) and then > make a selection based on that, see also here: > http://fieldtrip.fcdonders.nl/example/making_your_own_trialfun_for_conditional_trial_definition?s[]=trialfun > > http://fieldtrip.fcdonders.nl/faq/what_is_the_relation_between_events_such_as_triggers_and_trials?s[]=trialfun > > > Hope that helps! > Best, > Jörn > > On 6/18/2013 10:44 AM, Mads Jensen wrote: >> Hi all, >> >> I would like to know if it is possible select a trail based on the >> previous trigger code? >> >> I got a dataset (MEG, neuromeg) where sometimes the subject just press >> a button and sometimes a cue is shown and they then press the button, >> the button presses are coded "1" and the cue "2". So, what I would >> like is to datasets one with trials where there has been no cue and >> one dataset where the trials that have cue is. Is that possible to do >> automatically or do I have to do a "by hand"? >> >> best wishes, >> mads >> _______________________________________________ >> fieldtrip mailing list >> fieldtrip at donders.ru.nl >> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > From marco.porta88 at gmail.com Wed Jun 19 16:41:47 2013 From: marco.porta88 at gmail.com (Marco Porta) Date: Wed, 19 Jun 2013 16:41:47 +0200 Subject: [FieldTrip] statistics on non-event-related fields Message-ID: Dear Fieldtrip experts, I have a question regarding the statistics. How can I statistics on non event-related fields in a between-trials. Thanks, Marco -------------- next part -------------- An HTML attachment was scrubbed... URL: From eelke.spaak at donders.ru.nl Wed Jun 19 16:50:48 2013 From: eelke.spaak at donders.ru.nl (Eelke Spaak) Date: Wed, 19 Jun 2013 16:50:48 +0200 Subject: [FieldTrip] statistics on non-event-related fields In-Reply-To: References: Message-ID: Dear Marco, What do you mean exactly with "non event-related fields"? I presume there is some structure in your data that you want to consider as the independent variable of interest, right? Some more information on what you want to do would help us to help you. Best, Eelke On 19 June 2013 16:41, Marco Porta wrote: > Dear Fieldtrip experts, > I have a question regarding the statistics. How can I statistics on non > event-related fields in a between-trials. > Thanks, > > Marco > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip From jdien07 at mac.com Thu Jun 20 02:35:35 2013 From: jdien07 at mac.com (Joseph Dien) Date: Wed, 19 Jun 2013 20:35:35 -0400 Subject: [FieldTrip] ft_dipolefitting options no longer working Message-ID: Hi, it looks like changes have been made to ft_dipolefitting that have resulted in the following options no longer working: cfg.grid.xgrid = 'auto'; cfg.grid.ygrid = 'auto'; cfg.grid.zgrid = 'auto'; The header of the ft_dipolefitting file as of the 20130619 release says: % This function depends on FT_PREPARE_DIPOLE_GRID which has the following options: % cfg.grid.xgrid (default set in FT_PREPARE_DIPOLE_GRID: cfg.grid.xgrid = 'auto'), documented % cfg.grid.ygrid (default set in FT_PREPARE_DIPOLE_GRID: cfg.grid.ygrid = 'auto'), documented % cfg.grid.zgrid (default set in FT_PREPARE_DIPOLE_GRID: cfg.grid.zgrid = 'auto'), documented but a Find Files search indicates that FT_PREPARE_DIPOLE_GRID no longer exists. I don't have copies of FieldTrip older than Feb 2013 so I can't check directly but I know that my function call used to work and no longer does. Can someone help me find a fix for this? Any help appreciated! Joe -------------------------------------------------------------------------------- Joseph Dien, Senior Research Scientist University of Maryland E-mail: jdien07 at mac.com Phone: 301-226-8848 Fax: 301-226-8811 http://joedien.com// -------------- next part -------------- An HTML attachment was scrubbed... URL: From jdien07 at mac.com Thu Jun 20 04:41:49 2013 From: jdien07 at mac.com (Joseph Dien) Date: Wed, 19 Jun 2013 22:41:49 -0400 Subject: [FieldTrip] ft_dipolefitting options no longer working In-Reply-To: References: Message-ID: Okay, I got this sorted out. I was able to use ft_prepare_sourcemodel to set up the config variable. The header info of ft_dipolefitting should get updated though. Cheers! Joe On Jun 19, 2013, at 8:35 PM, Joseph Dien wrote: > Hi, > it looks like changes have been made to ft_dipolefitting that have resulted in the following options no longer working: > > cfg.grid.xgrid = 'auto'; > cfg.grid.ygrid = 'auto'; > cfg.grid.zgrid = 'auto'; > > The header of the ft_dipolefitting file as of the 20130619 release says: > > % This function depends on FT_PREPARE_DIPOLE_GRID which has the following options: > % cfg.grid.xgrid (default set in FT_PREPARE_DIPOLE_GRID: cfg.grid.xgrid = 'auto'), documented > % cfg.grid.ygrid (default set in FT_PREPARE_DIPOLE_GRID: cfg.grid.ygrid = 'auto'), documented > % cfg.grid.zgrid (default set in FT_PREPARE_DIPOLE_GRID: cfg.grid.zgrid = 'auto'), documented > > but a Find Files search indicates that FT_PREPARE_DIPOLE_GRID no longer exists. > > I don't have copies of FieldTrip older than Feb 2013 so I can't check directly but I know that my function call used to work and no longer does. > > Can someone help me find a fix for this? > > Any help appreciated! > > Joe > > -------------------------------------------------------------------------------- > > Joseph Dien, > Senior Research Scientist > University of Maryland > > E-mail: jdien07 at mac.com > Phone: 301-226-8848 > Fax: 301-226-8811 > http://joedien.com// > > > > > > > > > > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -------------------------------------------------------------------------------- Joseph Dien, Senior Research Scientist University of Maryland E-mail: jdien07 at mac.com Phone: 301-226-8848 Fax: 301-226-8811 http://joedien.com// -------------- next part -------------- An HTML attachment was scrubbed... URL: From marco.porta88 at gmail.com Thu Jun 20 14:48:18 2013 From: marco.porta88 at gmail.com (Marco Porta) Date: Thu, 20 Jun 2013 14:48:18 +0200 Subject: [FieldTrip] fieldtrip Digest, Vol 31, Issue 37 In-Reply-To: References: Message-ID: Dear Users and Eelke, I have spontaneous LFP data recorded intracranially. I'm interested in studying phase correlation between sensors and assess such correlation within single subjects studies. Is it possible to study statistical significance in such correlation study or should i implement my own statistic? Thanks, Marco Dear Marco, > > What do you mean exactly with "non event-related fields"? I presume > there is some structure in your data that you want to consider as the > independent variable of interest, right? Some more information on what > you want to do would help us to help you. > > Best, > Eelke > -------------- next part -------------- An HTML attachment was scrubbed... URL: From marco.porta88 at gmail.com Fri Jun 21 14:26:12 2013 From: marco.porta88 at gmail.com (Marco Porta) Date: Fri, 21 Jun 2013 14:26:12 +0200 Subject: [FieldTrip] statistics on non-event-related fields Message-ID: Dear Users and Eelke, I have spontaneous LFP data recorded intracranially. I'm interested in studying phase correlation between sensors and assess such correlation within single subjects studies. Is it possible to study statistical significance in such correlation study or should i implement my own statistic? Thanks, Marco > Dear Marco, > > What do you mean exactly with "non event-related fields"? I presume > there is some structure in your data that you want to consider as the > independent variable of interest, right? Some more information on what > you want to do would help us to help you. > > Best, > Eelke > > > > > Dear Fieldtrip experts, > I have a question regarding the statistics. How can I statistics on non > event-related fields in a between-trials. > Thanks, > Marco -------------- next part -------------- An HTML attachment was scrubbed... URL: From politzerahless at gmail.com Fri Jun 21 20:42:32 2013 From: politzerahless at gmail.com (Stephen Politzer-Ahles) Date: Fri, 21 Jun 2013 13:42:32 -0500 Subject: [FieldTrip] Using fsaverage in the minimum norm pipeline? Message-ID: Hello everyone, I am working through the minimum norm pipeline ( http://fieldtrip.fcdonders.nl/tutorial/minimumnormestimate) on functional data for multiple participants; for all but one of these participants I also have anatomical MRI. For the one participant for whom I couldn't get an MRI, I was hoping to use the freesurfer average surface (fsaverage), but I'm having some difficulty getting volume conduction models and sourcespaces from this brain aligned to CTF. Basically, I'm able to read in the data and create a sourcespace and volume conduction model using the code below. These models seem to be aligned to MNI (see the axes on http://i.imgur.com/g0DPs8A.png). To to re-align them to CTF, what I tried to do was manually do ft_volumerealign on the original anatomical MRI, and then apply that transformation matrix (which I assume specifies the transformation from MNI to CTF) to the sourcespace and volume conductor (in the third and fourth blocks of code below). But the resulting sourcespace and volume conductor are clearly not aligned to CTF (see the axes on http://i.imgur.com/MAjyDkL.png), so I assume I am doing something wrong with the transformation matrix. I admit I do not fully understand how the transformation matrix is supposed to work, so if anyone has any feedback I would greatly appreciate it. Thank you! Steve % Read the source space bnd = ft_read_headshape('/tools/freesurfer/subjects/fsaverage/bem/fsaverage-oct-6-src.fif', 'format', 'mne_source'); sourcespace = ft_convert_units(bnd, 'mm'); % Read in the anatomical MRI, segment, and make volume conduction model fsaverage = ft_read_mri('orig.mgz'); cfg = []; cfg.coordsys = 'spm'; cfg.output = {'skullstrip' 'brain'}; seg = ft_volumesegment( cfg, fsaverage); cfg = [] cfg.method = 'singleshell'; cfg.tissue = 'brain'; vol = ft_prepare_headmodel( cfg, seg ); % Get a transformation matrix from MNI to CTF cfg = []; cfg.method = 'interactive'; seg_ctf = ft_volumerealign(cfg2, seg); % manually identify NAS, LAP, and RAP T = seg_ctf.transform; % Transform the sourcespace and vol sourcespace_trans = ft_transform_geometry( T, sourcespace ); vol_trans = vol; vol_trans.bnd = ft_transform_geometry( T, vol_trans.bnd ); % Plot the un-transformed vol and sourcespace (aligned to MNI) figure;hold on; ft_plot_vol(vol, 'facecolor', 'none');alpha 0.5; ft_plot_mesh(sourcespace, 'edgecolor', 'none'); camlight % Plot the transformed vol and sourcespace figure;hold on; ft_plot_vol(vol_trans, 'facecolor', 'none');alpha 0.5; ft_plot_mesh(sourcespace_trans, 'edgecolor', 'none'); camlight -- Stephen Politzer-Ahles University of Kansas Linguistics Department http://people.ku.edu/~sjpa/ -------------- next part -------------- An HTML attachment was scrubbed... URL: From polomacnenad at gmail.com Sat Jun 22 13:34:56 2013 From: polomacnenad at gmail.com (Nenad Polomac) Date: Sat, 22 Jun 2013 13:34:56 +0200 Subject: [FieldTrip] padding of segmented data Message-ID: Dear all, In my pipeline I need two times to filter data with ft_preprocessing. Is it somehow possible to pad trials after segmentation? I need this in order to avoid filter artifacts during the second filtering. Thank you in advance! Nenad -------------- next part -------------- An HTML attachment was scrubbed... URL: From caspervanheck at gmail.com Sat Jun 22 14:32:45 2013 From: caspervanheck at gmail.com (Casper van Heck) Date: Sat, 22 Jun 2013 14:32:45 +0200 Subject: [FieldTrip] padding of segmented data In-Reply-To: References: Message-ID: Dear Nenad, I think the option cfg.padding only works for that iteration of ft_preprocessing, but what you can do, is select larger segments initially, and then run ft_preprocessing again with smaller segments. While you can set ft_preprocessing to apply multiple different filters in one go (like a low-pass, a high-pass, and a DFT-filter, for example), using a similar filter multiple times (like a high-pass filter at 4Hz, and another at 8Hz) is usually not required, or recommended. If you do multiple analyses on the same data (which, for example, require different filters) you could find it useful to create multiple smaller pipelines with their own ft_preprocessing. Debugging complex analyses can be a lot easier that way:) Hope this helps, Casper On Sat, Jun 22, 2013 at 1:34 PM, Nenad Polomac wrote: > Dear all, > > In my pipeline I need two times to filter data with ft_preprocessing. Is > it somehow possible to pad trials after segmentation? I need this in order > to avoid filter artifacts during the second filtering. > > Thank you in advance! > > Nenad > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > -------------- next part -------------- An HTML attachment was scrubbed... URL: From mbj0310 at gmail.com Mon Jun 24 06:27:47 2013 From: mbj0310 at gmail.com (Beom Jun Min) Date: Mon, 24 Jun 2013 13:27:47 +0900 Subject: [FieldTrip] Decreased baseline level after using ICA in ERP data Message-ID: Dear all, I have ERP data and now I am dealing with ICA to remove muscle and eye artifacts. However, I found that after ft_rejectcomponent, the baseline level of the segmented epoch decreased. (The baselinewindow is [-0.2 0].) The baseline level decreased even though I rejected only one component. My script is shown below. *%% Removing the Artifacts* *cfg = []; * *cfg.component = [ ]; % to be removed component(s)* *post_ICA_temp6 = ft_rejectcomponent(cfg, comp_detrand, data_raw);* * * *%% timelocking* * * *cfg = [];* *timelock_temp6 = ft_timelockanalysis(cfg, post_ICA_temp6);* * * *%% Plot* * * *figure;* *cfg = [];* *cfg.layout = lay;* *cfg.interactive = 'yes';* *cfg.channel = ['all', {'-EKG', '-EMG'}];* *ft_multiplotER(cfg, timelock_temp6)* Is there something that I missed? Thanks. BJ -- BeomJun Min, M.D. Department of Medical System Engineering (DMSE) Gwangju Institute of Science and Technology (GIST) 261 Cheomdan-gwagiro(Oryong-dong), Buk-gu, Gwangju 500-712, Republic of Korea (South) Phone: +82-62-715-3266 / Fax: +82-62-715-3244 E-mail: mbj0310 at gmail.com, http://bmssa.gist.ac.kr -------------- next part -------------- An HTML attachment was scrubbed... URL: From d.lozanosoldevilla at fcdonders.ru.nl Mon Jun 24 10:25:24 2013 From: d.lozanosoldevilla at fcdonders.ru.nl (Lozano Soldevilla, D. (Diego)) Date: Mon, 24 Jun 2013 10:25:24 +0200 (CEST) Subject: [FieldTrip] Decreased baseline level after using ICA in ERP data In-Reply-To: Message-ID: <831995030.1708865.1372062324986.JavaMail.root@sculptor.zimbra.ru.nl> Dear Beom Jun, I see multiple scenarios why this baseline activity decrease could happen. First of all, how the component you're rejecting look like (i.e. "blink component")? Do you see this activity decrease after the baseline period? The "quality" of the ICA decomposition, how well your artifact/component of interest has been isolated by algorithm in time (i.e. blink time courses) and space (marked frontal topography), will determine the activity that later on you'll reject/select. If your decomposition is not well suited, the rejection of a particular IC activity might have "extra" activity you don't want to reject (effect of interest), might be the algorithm is not able to isolate the components of interests (i.e. artifacts) or a combination of both. To evaluate the quality of your ICA decomposition you might have a look here ( http://www.ncbi.nlm.nih.gov/pubmed/19162199 ). Basically, the authors find that the ICA decomposition improves significantly " increased by removing the mean EEG at each channel for each epoch of data rather than the mean EEG in a prestimulus baseline" . In addition (see here: http://sccn.ucsd.edu/pipermail/eeglablist/2012/004925.html ), high-pass filtering above ~1hz improve the results. It's very important to feed ICA as much relevant data as you can use. The more the data, the better the decomposition. There's a rule of thumb that says that for a reliable IC decomposition 20 time points per channel 2 is needed (see here for a reference http://www.ncbi.nlm.nih.gov/pubmed/16904745 ) I hope that helps, Diego ----- Original Message ----- > From: "Beom Jun Min" > To: "FieldTrip discussion list" > Sent: Monday, 24 June, 2013 6:27:47 AM > Subject: [FieldTrip] Decreased baseline level after using ICA in ERP > data > Dear all, > I have ERP data and now I am dealing with ICA to remove muscle and eye > artifacts. > However, I found that after ft_rejectcomponent, the baseline level of > the segmented epoch decreased. (The baselinewindow is [-0.2 0].) > The baseline level decreased even though I rejected only one > component. > My script is shown below. > %% Removing the Artifacts > cfg = []; > cfg.component = [ ]; % to be removed component(s) > post_ICA_temp6 = ft_rejectcomponent(cfg, comp_detrand, data_raw); > %% timelocking > cfg = []; > timelock_temp6 = ft_timelockanalysis(cfg, post_ICA_temp6); > %% Plot > figure; > cfg = []; > cfg.layout = lay; > cfg.interactive = 'yes'; > cfg.channel = ['all', {'-EKG', '-EMG'}]; > ft_multiplotER(cfg, timelock_temp6) > Is there something that I missed? > Thanks. > BJ > -- > BeomJun Min, M.D. > Department of Medical System Engineering (DMSE) > Gwangju Institute of Science and Technology (GIST) > 261 Cheomdan-gwagiro(Oryong-dong), Buk-gu, Gwangju > 500-712, Republic of Korea (South) > Phone: +82-62-715-3266 / Fax: +82-62-715-3244 > E-mail: mbj0310 at gmail.com , http://bmssa.gist.ac.kr > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -- PhD Student Neuronal Oscillations Group Donders Institute for Brain, Cognition and Behaviour Centre for Cognitive Neuroimaging Radboud University Nijmegen NL-6525 EN Nijmegen The Netherlands http://www.ru.nl/people/donders/lozano-soldevilla-d/ -------------- next part -------------- An HTML attachment was scrubbed... URL: From jm.horschig at donders.ru.nl Mon Jun 24 10:43:11 2013 From: jm.horschig at donders.ru.nl (=?ISO-8859-1?Q?=22J=F6rn_M=2E_Horschig=22?=) Date: Mon, 24 Jun 2013 10:43:11 +0200 Subject: [FieldTrip] padding of segmented data In-Reply-To: References: Message-ID: <51C8069F.5070707@donders.ru.nl> Hi Nenad, what Casper said is not quite true. You can pad segmented trials, but you are limited in how to pad. There are different ways of padding, and what Casper was referring to is true data padding. Once you segmented your trials you cannot get back to your recorded data and attach more data to it. This is because filtering artifacts at edges etc would result in discontinuities and the like. However, there are other ways to achieve what you want. The most elegant way in my opinion is what Casper already suggested. Just for completeness, you can still pad using zero-padding (i.e. adding a bunch of 0s in the beginning and at the end of your trials). Other ways are mean-padding (pad with the mean value), or edge-padding (using the first/last value to padding). However, with all these methods you mostly also add a discontinuity, but you explicitly ask for that in this case :) The most elegant solution here might be to use mirror-padding, which is recently implemented. See here: http://fieldtrip.fcdonders.nl/reference/ft_preprocessing and here: http://fieldtrip.fcdonders.nl/reference/ft_preproc_padding Best, Jörn On 6/22/2013 2:32 PM, Casper van Heck wrote: > Dear Nenad, > > I think the option cfg.padding only works for that iteration of > ft_preprocessing, but what you can do, is select larger segments > initially, and then run ft_preprocessing again with smaller segments. > > While you can set ft_preprocessing to apply multiple different filters > in one go (like a low-pass, a high-pass, and a DFT-filter, for > example), using a similar filter multiple times (like a high-pass > filter at 4Hz, and another at 8Hz) is usually not required, or > recommended. If you do multiple analyses on the same data (which, for > example, require different filters) you could find it useful to create > multiple smaller pipelines with their own ft_preprocessing. Debugging > complex analyses can be a lot easier that way:) > > Hope this helps, > > Casper > > > On Sat, Jun 22, 2013 at 1:34 PM, Nenad Polomac > wrote: > > Dear all, > > In my pipeline I need two times to filter data with > ft_preprocessing. Is it somehow possible to pad trials > after segmentation? I need this in order to avoid filter artifacts > during the second filtering. > > Thank you in advance! > > Nenad > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -- Jörn M. Horschig PhD Student Donders Institute for Brain, Cognition and Behaviour Centre for Cognitive Neuroimaging Radboud University Nijmegen Neuronal Oscillations Group FieldTrip Development Team P.O. Box 9101 NL-6500 HB Nijmegen The Netherlands Contact: E-Mail: jm.horschig at donders.ru.nl Tel: +31-(0)24-36-68493 Web: http://www.ru.nl/donders Visiting address: Trigon, room 2.30 Kapittelweg 29 NL-6525 EN Nijmegen The Netherlands -------------- next part -------------- An HTML attachment was scrubbed... URL: From polomacnenad at gmail.com Mon Jun 24 11:02:18 2013 From: polomacnenad at gmail.com (Nenad Polomac) Date: Mon, 24 Jun 2013 11:02:18 +0200 Subject: [FieldTrip] padding of segmented data Message-ID: Hi Jörn and Casper, Thank you very for your answers I will use Jörns suggestion. I wasn't aware that you upgraded ft_preprocessing. All the best! Nenad On 24 June 2013 10:44, wrote: > Send fieldtrip mailing list submissions to > fieldtrip at science.ru.nl > > To subscribe or unsubscribe via the World Wide Web, visit > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > or, via email, send a message with subject or body 'help' to > fieldtrip-request at science.ru.nl > > You can reach the person managing the list at > fieldtrip-owner at science.ru.nl > > When replying, please edit your Subject line so it is more specific > than "Re: Contents of fieldtrip digest..." > > > Today's Topics: > > 1. Decreased baseline level after using ICA in ERP data > (Beom Jun Min) > 2. Re: Decreased baseline level after using ICA in ERP data > (Lozano Soldevilla, D. (Diego)) > 3. Re: padding of segmented data (J?rn M. Horschig) > > > ---------------------------------------------------------------------- > > Message: 1 > Date: Mon, 24 Jun 2013 13:27:47 +0900 > From: Beom Jun Min > To: FieldTrip discussion list > Subject: [FieldTrip] Decreased baseline level after using ICA in ERP > data > Message-ID: > < > CA+v9jvKJnKAfsQDwoDhNVSPAKCmpOpwut8vdmFXa1akp_1WDGA at mail.gmail.com> > Content-Type: text/plain; charset="iso-8859-1" > > Dear all, > > I have ERP data and now I am dealing with ICA to remove muscle and eye > artifacts. > However, I found that after ft_rejectcomponent, the baseline level of the > segmented epoch decreased. (The baselinewindow is [-0.2 0].) > The baseline level decreased even though I rejected only one component. > > My script is shown below. > > *%% Removing the Artifacts* > *cfg = []; > * > *cfg.component = [ ]; % to be removed component(s)* > *post_ICA_temp6 = ft_rejectcomponent(cfg, comp_detrand, data_raw);* > * > * > *%% timelocking* > * > * > *cfg = [];* > *timelock_temp6 = ft_timelockanalysis(cfg, post_ICA_temp6);* > * > * > *%% Plot* > * > * > *figure;* > *cfg = [];* > *cfg.layout = lay;* > *cfg.interactive = 'yes';* > *cfg.channel = ['all', {'-EKG', '-EMG'}];* > *ft_multiplotER(cfg, timelock_temp6)* > > Is there something that I missed? > > Thanks. > > BJ > > -- > BeomJun Min, M.D. > > Department of Medical System Engineering (DMSE) > Gwangju Institute of Science and Technology (GIST) > 261 Cheomdan-gwagiro(Oryong-dong), Buk-gu, Gwangju > 500-712, Republic of Korea (South) > Phone: +82-62-715-3266 / Fax: +82-62-715-3244 > E-mail: mbj0310 at gmail.com, http://bmssa.gist.ac.kr > -------------- next part -------------- > An HTML attachment was scrubbed... > URL: < > http://mailman.science.ru.nl/pipermail/fieldtrip/attachments/20130624/02dd2d57/attachment-0001.html > > > > ------------------------------ > > Message: 2 > Date: Mon, 24 Jun 2013 10:25:24 +0200 (CEST) > From: "Lozano Soldevilla, D. (Diego)" > > To: FieldTrip discussion list > Subject: Re: [FieldTrip] Decreased baseline level after using ICA in > ERP data > Message-ID: > < > 831995030.1708865.1372062324986.JavaMail.root at sculptor.zimbra.ru.nl> > Content-Type: text/plain; charset="utf-8" > > Dear Beom Jun, I see multiple scenarios why this baseline activity > decrease could happen. First of all, how the component you're rejecting > look like (i.e. "blink component")? Do you see this activity decrease after > the baseline period? The "quality" of the ICA decomposition, how well your > artifact/component of interest has been isolated by algorithm in time (i.e. > blink time courses) and space (marked frontal topography), will determine > the activity that later on you'll reject/select. If your decomposition is > not well suited, the rejection of a particular IC activity might have > "extra" activity you don't want to reject (effect of interest), might be > the algorithm is not able to isolate the components of interests (i.e. > artifacts) or a combination of both. To evaluate the quality of your ICA > decomposition you might have a look here ( > http://www.ncbi.nlm.nih.gov/pubmed/19162199 ). Basically, the authors > find that the ICA decomposition improves significantly " increased by > removing the mean EEG at each channel for each epoch of data rather than > the mean EEG in a prestimulus baseline" . In addition (see here: > http://sccn.ucsd.edu/pipermail/eeglablist/2012/004925.html ), high-pass > filtering above ~1hz improve the results. It's very important to feed ICA > as much relevant data as you can use. The more the data, the better the > decomposition. There's a rule of thumb that says that for a reliable IC > decomposition 20 time points per channel 2 is needed (see here for a > reference http://www.ncbi.nlm.nih.gov/pubmed/16904745 ) I hope that > helps, Diego ----- Original Message ----- > > From: "Beom Jun Min" > > To: "FieldTrip discussion list" > > Sent: Monday, 24 June, 2013 6:27:47 AM > > Subject: [FieldTrip] Decreased baseline level after using ICA in ERP > > data > > Dear all, > > I have ERP data and now I am dealing with ICA to remove muscle and eye > > artifacts. > > However, I found that after ft_rejectcomponent, the baseline level of > > the segmented epoch decreased. (The baselinewindow is [-0.2 0].) > > The baseline level decreased even though I rejected only one > > component. > > My script is shown below. > > %% Removing the Artifacts > > cfg = []; > > cfg.component = [ ]; % to be removed component(s) > > post_ICA_temp6 = ft_rejectcomponent(cfg, comp_detrand, data_raw); > > %% timelocking > > cfg = []; > > timelock_temp6 = ft_timelockanalysis(cfg, post_ICA_temp6); > > %% Plot > > figure; > > cfg = []; > > cfg.layout = lay; > > cfg.interactive = 'yes'; > > cfg.channel = ['all', {'-EKG', '-EMG'}]; > > ft_multiplotER(cfg, timelock_temp6) > > Is there something that I missed? > > Thanks. > > BJ > > -- > > BeomJun Min, M.D. > > Department of Medical System Engineering (DMSE) > > Gwangju Institute of Science and Technology (GIST) > > 261 Cheomdan-gwagiro(Oryong-dong), Buk-gu, Gwangju > > 500-712, Republic of Korea (South) > > Phone: +82-62-715-3266 / Fax: +82-62-715-3244 > > E-mail: mbj0310 at gmail.com , http://bmssa.gist.ac.kr > > _______________________________________________ > > fieldtrip mailing list > > fieldtrip at donders.ru.nl > > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > -- PhD Student Neuronal Oscillations Group Donders Institute for Brain, > Cognition and Behaviour Centre for Cognitive Neuroimaging Radboud > University Nijmegen NL-6525 EN Nijmegen The Netherlands > http://www.ru.nl/people/donders/lozano-soldevilla-d/ > -------------- next part -------------- > An HTML attachment was scrubbed... > URL: < > http://mailman.science.ru.nl/pipermail/fieldtrip/attachments/20130624/ea1393f7/attachment-0001.html > > > > ------------------------------ > > Message: 3 > Date: Mon, 24 Jun 2013 10:43:11 +0200 > From: "J?rn M. Horschig" > To: fieldtrip at science.ru.nl > Subject: Re: [FieldTrip] padding of segmented data > Message-ID: <51C8069F.5070707 at donders.ru.nl> > Content-Type: text/plain; charset="iso-8859-1"; Format="flowed" > > Hi Nenad, > > what Casper said is not quite true. You can pad segmented trials, but > you are limited in how to pad. There are different ways of padding, and > what Casper was referring to is true data padding. Once you segmented > your trials you cannot get back to your recorded data and attach more > data to it. This is because filtering artifacts at edges etc would > result in discontinuities and the like. However, there are other ways to > achieve what you want. The most elegant way in my opinion is what Casper > already suggested. Just for completeness, you can still pad using > zero-padding (i.e. adding a bunch of 0s in the beginning and at the end > of your trials). Other ways are mean-padding (pad with the mean value), > or edge-padding (using the first/last value to padding). However, with > all these methods you mostly also add a discontinuity, but you > explicitly ask for that in this case :) The most elegant solution here > might be to use mirror-padding, which is recently implemented. > See here: > http://fieldtrip.fcdonders.nl/reference/ft_preprocessing > and here: > http://fieldtrip.fcdonders.nl/reference/ft_preproc_padding > > Best, > J?rn > > On 6/22/2013 2:32 PM, Casper van Heck wrote: > > Dear Nenad, > > > > I think the option cfg.padding only works for that iteration of > > ft_preprocessing, but what you can do, is select larger segments > > initially, and then run ft_preprocessing again with smaller segments. > > > > While you can set ft_preprocessing to apply multiple different filters > > in one go (like a low-pass, a high-pass, and a DFT-filter, for > > example), using a similar filter multiple times (like a high-pass > > filter at 4Hz, and another at 8Hz) is usually not required, or > > recommended. If you do multiple analyses on the same data (which, for > > example, require different filters) you could find it useful to create > > multiple smaller pipelines with their own ft_preprocessing. Debugging > > complex analyses can be a lot easier that way:) > > > > Hope this helps, > > > > Casper > > > > > > On Sat, Jun 22, 2013 at 1:34 PM, Nenad Polomac > > wrote: > > > > Dear all, > > > > In my pipeline I need two times to filter data with > > ft_preprocessing. Is it somehow possible to pad trials > > after segmentation? I need this in order to avoid filter artifacts > > during the second filtering. > > > > Thank you in advance! > > > > Nenad > > > > _______________________________________________ > > fieldtrip mailing list > > fieldtrip at donders.ru.nl > > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > > > > > > > > > _______________________________________________ > > fieldtrip mailing list > > fieldtrip at donders.ru.nl > > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > > -- > J?rn M. Horschig > PhD Student > Donders Institute for Brain, Cognition and Behaviour > Centre for Cognitive Neuroimaging > Radboud University Nijmegen > Neuronal Oscillations Group > FieldTrip Development Team > > P.O. Box 9101 > NL-6500 HB Nijmegen > The Netherlands > > Contact: > E-Mail: jm.horschig at donders.ru.nl > Tel: +31-(0)24-36-68493 > Web: http://www.ru.nl/donders > > Visiting address: > Trigon, room 2.30 > Kapittelweg 29 > NL-6525 EN Nijmegen > The Netherlands > > -------------- next part -------------- > An HTML attachment was scrubbed... > URL: < > http://mailman.science.ru.nl/pipermail/fieldtrip/attachments/20130624/d7eb547a/attachment.html > > > > ------------------------------ > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > End of fieldtrip Digest, Vol 31, Issue 41 > ***************************************** > -------------- next part -------------- An HTML attachment was scrubbed... URL: From eelke.spaak at donders.ru.nl Mon Jun 24 11:31:35 2013 From: eelke.spaak at donders.ru.nl (Eelke Spaak) Date: Mon, 24 Jun 2013 11:31:35 +0200 Subject: [FieldTrip] statistics on non-event-related fields In-Reply-To: References: Message-ID: Dear Marco, The FieldTrip statistics routines support permutation of condition labels among units of observation. I guess in your data you don't really have 'units of observation', i.e. you have continuous data of one (or several) subjects. In that case I would recommend taking care of the statistics outside of FieldTrip, for instance by using a randomisation approach based on shifting time series of different channels by different, random, amounts. The coupling values obtained by these shifted time series can serve as a distribution under the null hypothesis of no coupling. The usual cluster machinery can then be applied (i.e. combining above-(nonparametric)threshold time-frequency-channel voxels into cluster candidates, compute cluster statistics per randomization, and compare the observed cluster statistic to the randomization distribution). You would also need to write this yourself, but it should not be very difficult. The mex-files bwlabel and spm_bwlabel (distributed with FieldTrip) are very useful; they give index labels to connected clusters in a binary matrix. Note, however, that there is an important caveat with the approach I describe here. The time shifting per channel also destroys the between-channel structure in your data that is due to electric volume conduction. So even if you find significant connectivity by this approach, although the connectivity would be 'real' in a sense, it still might not be meaningful if you do not account for this volume conduction. This is something to think about apart from the statistics. Hope this helps. Best, Eelke On 21 June 2013 14:26, Marco Porta wrote: > Dear Users and Eelke, > I have spontaneous LFP data recorded intracranially. I'm interested in > studying phase correlation between sensors and assess such correlation > within single subjects studies. Is it possible to study statistical > significance in such correlation study or should i implement my own > statistic? > Thanks, > > Marco > > > >> Dear Marco, >> >> What do you mean exactly with "non event-related fields"? I presume >> there is some structure in your data that you want to consider as the >> independent variable of interest, right? Some more information on what >> you want to do would help us to help you. >> >> Best, >> Eelke >> >> >> >> >> Dear Fieldtrip experts, >> I have a question regarding the statistics. How can I statistics on non >> event-related fields in a between-trials. >> Thanks, >> Marco > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip From nomeserio at gmail.com Mon Jun 24 14:43:06 2013 From: nomeserio at gmail.com (Michele Barsotti) Date: Mon, 24 Jun 2013 14:43:06 +0200 Subject: [FieldTrip] Loading Data into a fieldtrip structure Message-ID: Dear FieldTrip Users, I'm working with eeglab since 2 years and now I would like to use also fieldtrip. I've got many dataset in .mat format organized as [channels x dataframe]. For each dataset I've got the channel location in a .ced file format. Can anyone help me to import these dataset into a fieldtrip data structure? The channels (rows of the variable contained in the .mat file) are organized like that: 1- time 2:17 - eeg channels 18:end - possible triggers thank you in advance cheers -- -Michele- -------------- next part -------------- An HTML attachment was scrubbed... URL: From d.lozanosoldevilla at fcdonders.ru.nl Mon Jun 24 14:55:18 2013 From: d.lozanosoldevilla at fcdonders.ru.nl (Diego Lozano Soldevilla) Date: Mon, 24 Jun 2013 14:55:18 +0200 Subject: [FieldTrip] Loading Data into a fieldtrip structure In-Reply-To: References: Message-ID: Dear Michele, You might have a look to the following FAQ: http://fieldtrip.fcdonders.nl/faq/how_can_i_import_my_own_dataformat?s[]=import&s[]=data I'm not sure about the state of the art of the eeglab2fieldtrip.m function but it might help you out as well. To know more about the fieldtrip data type field structures you need to have to work in Fieldtrip, the ft_datatype* functions will be important for you, i.e.: ft_datatype_freq ft_datatype_raw ft_datatype_sens ft_datatype_timelock I hope that helps Diego On 24 June 2013 14:43, Michele Barsotti wrote: > Dear FieldTrip Users, > I'm working with eeglab since 2 years and now I would like to use also > fieldtrip. I've got many dataset in .mat format organized as [channels x > dataframe]. For each dataset I've got the channel location in a .ced file > format. > Can anyone help me to import these dataset into a fieldtrip data structure? > > The channels (rows of the variable contained in the .mat file) are > organized like that: > 1- time > 2:17 - eeg channels > 18:end - possible triggers > > thank you in advance > > cheers > > -- > -Michele- > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > -------------- next part -------------- An HTML attachment was scrubbed... URL: From david.schubring at uni-konstanz.de Mon Jun 24 16:34:46 2013 From: david.schubring at uni-konstanz.de (David Schubring) Date: Mon, 24 Jun 2013 16:34:46 +0200 Subject: [FieldTrip] Matlab 2012/2013 In-Reply-To: References: Message-ID: <51C85906.2090204@uni-konstanz.de> Dear FieldTrip Users, I was wondering if the incompatibility issues with fieldtrip and the latest MATLAB 2013a version still exist (and if so, which bugs exactly occur)? (Some of our Matlab 2012a/b installations stopped working, maybe due to the latest java-update, and only the 2013 version still works.) Thanks in advance and best regards, David Schubring From politzerahless at gmail.com Mon Jun 24 17:19:59 2013 From: politzerahless at gmail.com (Stephen Politzer-Ahles) Date: Mon, 24 Jun 2013 10:19:59 -0500 Subject: [FieldTrip] fieldtrip Digest, Vol 31, Issue 27 In-Reply-To: References: Message-ID: Hi everyone, I recently tried http://fieldtrip.fcdonders.nl/example/create_single-subject_grids_in_individual_head_space_that_are_all_aligned_in_mni_spaceand noticed some inconsistencies between the example code and the results; I updated the code on the wiki but I wanted to send a message to the list to double-check whether my changes are ok. Firstly, I had to add a call to ft_convert_units, because otherwise the vol was expressed in mm and the grid in cm, causing the grid to be much smaller than the volume conductor (see http://i.imgur.com/gzct9Dm.png). Is this change ok? The result I get is still not quite consistent with the examples shown on that page, though; in my result, the grid is a cube ( http://i.imgur.com/NSgCFpg.png), whereas in the example the grid is brain-shaped. I used the same Fieldtrip brain template and the same code from the example (except for the change above), so I'm not sure if the difference is due to different plot settings, a change in the Fieldtrip code since this example was made, or a change in the sample brain included in Fieldtrip since the example was made. Best, Steve On Thu, Jun 13, 2013 at 5:05 AM, wrote: > > Send fieldtrip mailing list submissions to > fieldtrip at science.ru.nl > > To subscribe or unsubscribe via the World Wide Web, visit > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > or, via email, send a message with subject or body 'help' to > fieldtrip-request at science.ru.nl > > You can reach the person managing the list at > fieldtrip-owner at science.ru.nl > > When replying, please edit your Subject line so it is more specific > than "Re: Contents of fieldtrip digest..." > > > Today's Topics: > > 1. Re: Source statistics on spatio-temporal source > reconstruction data (MNE) (Nicolai Mersebak) > > > ---------------------------------------------------------------------- > > Message: 1 > Date: Thu, 13 Jun 2013 12:04:34 +0200 > From: Nicolai Mersebak > To: FieldTrip discussion list > Subject: Re: [FieldTrip] Source statistics on spatio-temporal source > reconstruction data (MNE) > Message-ID: <6F3697BB-194F-422F-A1BF-EBBB132F805B at mersebak.dk> > Content-Type: text/plain; charset="iso-8859-1" > > Thanks to all of you for your comments and ideas - they are very helpful! > > I ( off course :) ) have some follow up questions. > > I have created an ERP structure for my MNE source, so the only think which I need and that is not straight forward is the neighbour structure. > > I am using the standard bem template (fieldtrip-20130124/template/headmodel/standard_bem.mat) as a head model and use the following code to get a grid for all subjects as I don't have any subject specific information regarding the anatomy. > > cfg = []; > cfg.grid.xgrid = -100:10:100; > cfg.grid.ygrid = -100:10:100; > cfg.grid.zgrid = -100:10:100; > cfg.grid.tight = 'yes'; > cfg.grid.unit = hdm.unit; % unit: mm > cfg.vol = hdm; > grid = ft_prepare_sourcemodel(cfg); > > > @Jan-Mathijs and Stephan: I guess making a subject specific grid based on a warped template requires anatomic information for each subject, e.g. a MRI image like this tutorial shows: > http://fieldtrip.fcdonders.nl/example/create_single-subject_grids_in_individual_head_space_that_are_all_aligned_in_mni_space?s%5B > > The final grid output in the tutorial - does it have this 3D grid which can be used as a neighbour structure ? > > I am not sure how to go from my cortical sheet [vertices x coordinates(x,y,z)] to a 3D grid, which I can use as a neighbour structure ? > > A second thing I would like to know is, if any of you have tried to use an atlas (e.g ALL template atlas) where the regions now are channels in the permutation test? Going from source points to atlas regions can be done through ft_sourcestatistics, but I am still interested in keeping the temporal dimension. The reason to use atlas regions instead of source points is to decrease the computation time. > > Best, > > Nicolai > > On Thu, Jun 13, 2013 at 5:05 AM, wrote: > Send fieldtrip mailing list submissions to > fieldtrip at science.ru.nl > > To subscribe or unsubscribe via the World Wide Web, visit > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > or, via email, send a message with subject or body 'help' to > fieldtrip-request at science.ru.nl > > You can reach the person managing the list at > fieldtrip-owner at science.ru.nl > > When replying, please edit your Subject line so it is more specific > than "Re: Contents of fieldtrip digest..." > > > Today's Topics: > > 1. Re: Source statistics on spatio-temporal source > reconstruction data (MNE) (Nicolai Mersebak) > > > ---------------------------------------------------------------------- > > Message: 1 > Date: Thu, 13 Jun 2013 12:04:34 +0200 > From: Nicolai Mersebak > To: FieldTrip discussion list > Subject: Re: [FieldTrip] Source statistics on spatio-temporal source > reconstruction data (MNE) > Message-ID: <6F3697BB-194F-422F-A1BF-EBBB132F805B at mersebak.dk> > Content-Type: text/plain; charset="iso-8859-1" > > Thanks to all of you for your comments and ideas - they are very helpful! > > I ( off course :) ) have some follow up questions. > > I have created an ERP structure for my MNE source, so the only think which > I need and that is not straight forward is the neighbour structure. > > I am using the standard bem template > (fieldtrip-20130124/template/headmodel/standard_bem.mat) as a head model > and use the following code to get a grid for all subjects as I don't have > any subject specific information regarding the anatomy. > > cfg = []; > cfg.grid.xgrid = -100:10:100; > cfg.grid.ygrid = -100:10:100; > cfg.grid.zgrid = -100:10:100; > cfg.grid.tight = 'yes'; > cfg.grid.unit = hdm.unit; % unit: mm > cfg.vol = hdm; > grid = ft_prepare_sourcemodel(cfg); > > > @Jan-Mathijs and Stephan: I guess making a subject specific grid based on > a warped template requires anatomic information for each subject, e.g. a > MRI image like this tutorial shows: > > http://fieldtrip.fcdonders.nl/example/create_single-subject_grids_in_individual_head_space_that_are_all_aligned_in_mni_space?s%5B > > The final grid output in the tutorial - does it have this 3D grid which > can be used as a neighbour structure ? > > I am not sure how to go from my cortical sheet [vertices x > coordinates(x,y,z)] to a 3D grid, which I can use as a neighbour structure ? > > A second thing I would like to know is, if any of you have tried to use an > atlas (e.g ALL template atlas) where the regions now are channels in the > permutation test? Going from source points to atlas regions can be done > through ft_sourcestatistics, but I am still interested in keeping the > temporal dimension. The reason to use atlas regions instead of source > points is to decrease the computation time. > > Best, > > Nicolai > > > Den 12/06/2013 kl. 18.58 skrev "smoratti at psi.ucm.es" >: > > > > > I think Jan.Mathijs alternative suggestion is quite attractive. With the > neighbors on a cortical sheet I also had the problems that sometimes the > vertices do not have the same distance and then clustering may be biased to > smaller or bigger clusters as the number of neighbors does not guarantee > same cluster sizes. With the interpolation onto a 3D grid, you won't have > that problem. > > > > best, > > > > Stephan > > > > > > ________________________________________________________ > > Stephan Moratti, PhD > > > > see also: http://web.me.com/smoratti/ > > > > Universidad Complutense de Madrid > > Facultad de Psicolog?a > > Departamento de Psicolog?a B?sica I > > Campus de Somosaguas > > 28223 Pozuelo de Alarc?n (Madrid) > > Spain > > > > and > > > > Center for Biomedical Technology > > Laboratory for Cognitive and Computational Neuroscience > > Parque Cient?fico y Tecnol?gico de la Universidad Politecnica de Madrid > > Campus Montegancedo > > 28223 Pozuelo de Alarc?n (Madrid) > > Spain > > > > > > email: smoratti at psi.ucm.es > > Tel.: +34 679219982 > > > > El 12/06/2013, a las 18:00, jan-mathijs schoffelen escribi?: > > > >> An alternative would be to interpolate the cortical sheet to a 3D grid > (where the grid is defined for each subject based on a warped template grid > defined in a standard space), and then do clustering using a regular 3D > spatial neighbourhood structure. The rationale being that two vertices on > the sheet may appear as disconnected (e.g. being on two sides of a sulcus) > whereas, given the poor spatial resolution, they belong to the same spatial > blob. > >> > >> Best, > >> Jan-Mathijs > >> > >> On Jun 12, 2013, at 5:44 PM, smoratti at psi.ucm.es wrote: > >> > >>> Dear Nicolai, > >>> > >>> Indeed I have used ft_timelockstatistics for minimum norm source data. > The trick is to put the source level data into a ERF structure. Determining > the neighbors of a source surface with vertices is not trivial. However I > used tess_vertconn.m from the BrainStorm toolbox to get the connectivity > matrix that tells you who is a neighbor. This you can feed into > timelockstats. > >>> > >>> Hope that helps, > >>> > >>> Stephan > >>> > >>> ________________________________________________________ > >>> Stephan Moratti, PhD > >>> > >>> see also: http://web.me.com/smoratti/ > >>> > >>> Universidad Complutense de Madrid > >>> Facultad de Psicolog?a > >>> Departamento de Psicolog?a B?sica I > >>> Campus de Somosaguas > >>> 28223 Pozuelo de Alarc?n (Madrid) > >>> Spain > >>> > >>> and > >>> > >>> Center for Biomedical Technology > >>> Laboratory for Cognitive and Computational Neuroscience > >>> Parque Cient?fico y Tecnol?gico de la Universidad Politecnica de Madrid > >>> Campus Montegancedo > >>> 28223 Pozuelo de Alarc?n (Madrid) > >>> Spain > >>> > >>> > >>> email: smoratti at psi.ucm.es > >>> Tel.: +34 679219982 > >>> > >>> El 12/06/2013, a las 15:44, Nicolai Mersebak escribi?: > >>> > >>>> Dear all, > >>>> > >>>> I have a question concerning the usage of ft_sourcegrandaverage and > ft_sourcestatistics. > >>>> > >>>> After using ft_sourceanalysis (method: MNE), I get spatio-temporal > source reconstructed data in source.avg.pow (4050 x 897): 4050 sources and > 897 time points. > >>>> > >>>> Now I would like to use the cluster-based permutation test on my > source reconstructed data. However it seems like ft_sourcegrandaverage and > ft_sourcestatistics don't support source level time courses. E.g when I am > using ft_sourcegrandaverage I am getting the following error: > >>>> > >>>> Error in ft_sourcegrandaverage (line 158) > >>>> dat(:,i) = tmp(:); > >>>> > >>>> Looking into the code: > >>>> > >>>> for i=1:Nsubject > >>>> tmp = getsubfield(varargin{i}, parameterselection(cfg.parameter, > varargin{i})); > >>>> dat(:,i) = tmp(:); > >>>> tmp = getsubfield(varargin{i}, 'inside'); > >>>> inside(tmp,i) = 1; > >>>> end > >>>> > >>>> I see that "tmp" are getting the structure [N_sources x timepoints] > from source.avg.pow for one subject, where "dat" requires the structure > [N_sources x 1]. > >>>> > >>>> I seached the mailing list for similar issues and found this thread: > >>>> > >>>> > http://mailman.science.ru.nl/pipermail/fieldtrip/2010-September/003122.html > >>>> > >>>> Since I am interested in using the temporal dimension in my > statistics, I would like to know if it is still not possible to use > spatio-temporal source reconstructed data in ft_sourcestatistics and > ft_sourcegrandaverage ? > >>>> > >>>> Or if any have succeeded in using the cluster-based permutation test > on source level also including the temporal dimension ? > >>>> > >>>> Alternative I was thinking that I might could use > ft_timelockstatistics, where I substituted the channels with sources, e.g > instead of having 64 channels, I would now have 4050 "channels". > >>>> If so I need to calculate a label structure and an appropriate > neighbor structure, which I guess is possible as I have all the 3D > coordinates for each source, e.g in leadfield.pos ? > >>>> I know this is a work around solution, but have anyone tried or have > any experience using such an approach ? > >>>> > >>>> Best, > >>>> > >>>> Nicolai > >>>> > >>>> _______________________________________________ > >>>> fieldtrip mailing list > >>>> fieldtrip at donders.ru.nl > >>>> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > >>> > >>> _______________________________________________ > >>> fieldtrip mailing list > >>> fieldtrip at donders.ru.nl > >>> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > >> > >> Jan-Mathijs Schoffelen, MD PhD > >> > >> Donders Institute for Brain, Cognition and Behaviour, > >> Centre for Cognitive Neuroimaging, > >> Radboud University Nijmegen, The Netherlands > >> > >> Max Planck Institute for Psycholinguistics, > >> Nijmegen, The Netherlands > >> > >> J.Schoffelen at donders.ru.nl > >> Telephone: +31-24-3614793 > >> > >> http://www.hettaligebrein.nl > >> > >> _______________________________________________ > >> fieldtrip mailing list > >> fieldtrip at donders.ru.nl > >> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > > > _______________________________________________ > > fieldtrip mailing list > > fieldtrip at donders.ru.nl > > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > -------------- next part -------------- > An HTML attachment was scrubbed... > URL: < > http://mailman.science.ru.nl/pipermail/fieldtrip/attachments/20130613/5974284f/attachment.html > > > > ------------------------------ > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > End of fieldtrip Digest, Vol 31, Issue 27 > ***************************************** > -- Stephen Politzer-Ahles University of Kansas Linguistics Department http://people.ku.edu/~sjpa/ -------------- next part -------------- An HTML attachment was scrubbed... URL: From a.stolk at fcdonders.ru.nl Mon Jun 24 20:11:26 2013 From: a.stolk at fcdonders.ru.nl (Stolk, A.) Date: Mon, 24 Jun 2013 20:11:26 +0200 (CEST) Subject: [FieldTrip] fieldtrip Digest, Vol 31, Issue 27 In-Reply-To: Message-ID: <331233946.1725662.1372097486678.JavaMail.root@sculptor.zimbra.ru.nl> Hi Steve, With respect to the cube vs. brain-shaped grid; this seems to be plotting-related? template_grid.inside in the snippet of code below selects only the grid points that have been determined as inside the brain, but with a negative inwardshift, hence it's also outside. ft_plot_mesh ( template_grid. pos ( template_grid. inside ,: ) ) ; % taken from the wiki Hopefully someone else has up-to-date knowledge to answer your question pertaining to the units (mm vs. cm) of the volume conductor and the source model. Best regards, Arjen ----- Oorspronkelijk bericht ----- > Van: "Stephen Politzer-Ahles" > Aan: fieldtrip at science.ru.nl > Verzonden: Maandag 24 juni 2013 17:19:59 > Onderwerp: Re: [FieldTrip] fieldtrip Digest, Vol 31, Issue 27 > Hi everyone, > I recently tried > http://fieldtrip.fcdonders.nl/example/create_single-subject_grids_in_individual_head_space_that_are_all_aligned_in_mni_space > and noticed some inconsistencies between the example code and the > results; I updated the code on the wiki but I wanted to send a message > to the list to double-check whether my changes are ok. Firstly, I had > to add a call to ft_convert_units, because otherwise the vol was > expressed in mm and the grid in cm, causing the grid to be much > smaller than the volume conductor (see http://i.imgur.com/gzct9Dm.png > ). Is this change ok? > The result I get is still not quite consistent with the examples shown > on that page, though; in my result, the grid is a cube ( > http://i.imgur.com/NSgCFpg.png ), whereas in the example the grid is > brain-shaped. I used the same Fieldtrip brain template and the same > code from the example (except for the change above), so I'm not sure > if the difference is due to different plot settings, a change in the > Fieldtrip code since this example was made, or a change in the sample > brain included in Fieldtrip since the example was made. > Best, > Steve > On Thu, Jun 13, 2013 at 5:05 AM, < fieldtrip-request at science.ru.nl > > wrote: > > > > Send fieldtrip mailing list submissions to > > fieldtrip at science.ru.nl > > > > To subscribe or unsubscribe via the World Wide Web, visit > > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > or, via email, send a message with subject or body 'help' to > > fieldtrip-request at science.ru.nl > > > > You can reach the person managing the list at > > fieldtrip-owner at science.ru.nl > > > > When replying, please edit your Subject line so it is more specific > > than "Re: Contents of fieldtrip digest..." > > > > > > Today's Topics: > > > > 1. Re: Source statistics on spatio-temporal source > > reconstruction data (MNE) (Nicolai Mersebak) > > > > > > ---------------------------------------------------------------------- > > > > Message: 1 > > Date: Thu, 13 Jun 2013 12:04:34 +0200 > > From: Nicolai Mersebak < nicolai at mersebak.dk > > > To: FieldTrip discussion list < fieldtrip at science.ru.nl > > > Subject: Re: [FieldTrip] Source statistics on spatio-temporal source > > reconstruction data (MNE) > > Message-ID: < 6F3697BB-194F-422F-A1BF-EBBB132F805B at mersebak.dk > > > Content-Type: text/plain; charset="iso-8859-1" > > > > Thanks to all of you for your comments and ideas - they are very > > helpful! > > > > I ( off course :) ) have some follow up questions. > > > > I have created an ERP structure for my MNE source, so the only think > > which I need and that is not straight forward is the neighbour > > structure. > > > > I am using the standard bem template > > (fieldtrip-20130124/template/headmodel/standard_bem.mat) as a head > > model and use the following code to get a grid for all subjects as I > > don't have any subject specific information regarding the anatomy. > > > > cfg = []; > > cfg.grid.xgrid = -100:10:100; > > cfg.grid.ygrid = -100:10:100; > > cfg.grid.zgrid = -100:10:100; > > cfg.grid.tight = 'yes'; > > cfg.grid.unit = hdm.unit; % unit: mm > > cfg.vol = hdm; > > grid = ft_prepare_sourcemodel(cfg); > > > > > > @Jan-Mathijs and Stephan: I guess making a subject specific grid > > based on a warped template requires anatomic information for each > > subject, e.g. a MRI image like this tutorial shows: > > http://fieldtrip.fcdonders.nl/example/create_single-subject_grids_in_individual_head_space_that_are_all_aligned_in_mni_space?s%5B > > > > The final grid output in the tutorial - does it have this 3D grid > > which can be used as a neighbour structure ? > > > > I am not sure how to go from my cortical sheet [vertices x > > coordinates(x,y,z)] to a 3D grid, which I can use as a neighbour > > structure ? > > > > A second thing I would like to know is, if any of you have tried to > > use an atlas (e.g ALL template atlas) where the regions now are > > channels in the permutation test? Going from source points to atlas > > regions can be done through ft_sourcestatistics, but I am still > > interested in keeping the temporal dimension. The reason to use > > atlas regions instead of source points is to decrease the > > computation time. > > > > Best, > > > > Nicolai > > > > > On Thu, Jun 13, 2013 at 5:05 AM, < fieldtrip-request at science.ru.nl > > wrote: > > Send fieldtrip mailing list submissions to > > fieldtrip at science.ru.nl > > To subscribe or unsubscribe via the World Wide Web, visit > > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > or, via email, send a message with subject or body 'help' to > > fieldtrip-request at science.ru.nl > > You can reach the person managing the list at > > fieldtrip-owner at science.ru.nl > > When replying, please edit your Subject line so it is more specific > > than "Re: Contents of fieldtrip digest..." > > Today's Topics: > > 1. Re: Source statistics on spatio-temporal source > > reconstruction data (MNE) (Nicolai Mersebak) > > ---------------------------------------------------------------------- > > Message: 1 > > Date: Thu, 13 Jun 2013 12:04:34 +0200 > > From: Nicolai Mersebak < nicolai at mersebak.dk > > > To: FieldTrip discussion list < fieldtrip at science.ru.nl > > > Subject: Re: [FieldTrip] Source statistics on spatio-temporal source > > reconstruction data (MNE) > > Message-ID: < 6F3697BB-194F-422F-A1BF-EBBB132F805B at mersebak.dk > > > Content-Type: text/plain; charset="iso-8859-1" > > Thanks to all of you for your comments and ideas - they are very > > helpful! > > I ( off course :) ) have some follow up questions. > > I have created an ERP structure for my MNE source, so the only think > > which I need and that is not straight forward is the neighbour > > structure. > > I am using the standard bem template > > (fieldtrip-20130124/template/headmodel/standard_bem.mat) as a head > > model and use the following code to get a grid for all subjects as I > > don't have any subject specific information regarding the anatomy. > > cfg = []; > > cfg.grid.xgrid = -100:10:100; > > cfg.grid.ygrid = -100:10:100; > > cfg.grid.zgrid = -100:10:100; > > cfg.grid.tight = 'yes'; > > cfg.grid.unit = hdm.unit; % unit: mm > > cfg.vol = hdm; > > grid = ft_prepare_sourcemodel(cfg); > > @Jan-Mathijs and Stephan: I guess making a subject specific grid > > based > > on a warped template requires anatomic information for each subject, > > e.g. a MRI image like this tutorial shows: > > http://fieldtrip.fcdonders.nl/example/create_single-subject_grids_in_individual_head_space_that_are_all_aligned_in_mni_space?s%5B > > The final grid output in the tutorial - does it have this 3D grid > > which can be used as a neighbour structure ? > > I am not sure how to go from my cortical sheet [vertices x > > coordinates(x,y,z)] to a 3D grid, which I can use as a neighbour > > structure ? > > A second thing I would like to know is, if any of you have tried to > > use an atlas (e.g ALL template atlas) where the regions now are > > channels in the permutation test? Going from source points to atlas > > regions can be done through ft_sourcestatistics, but I am still > > interested in keeping the temporal dimension. The reason to use > > atlas > > regions instead of source points is to decrease the computation > > time. > > Best, > > Nicolai > > Den 12/06/2013 kl. 18.58 skrev " smoratti at psi.ucm.es " < > > smoratti at psi.ucm.es >: > > > > > > I think Jan.Mathijs alternative suggestion is quite attractive. > > > With > > > the neighbors on a cortical sheet I also had the problems that > > > sometimes the vertices do not have the same distance and then > > > clustering may be biased to smaller or bigger clusters as the > > > number > > > of neighbors does not guarantee same cluster sizes. With the > > > interpolation onto a 3D grid, you won't have that problem. > > > > > > best, > > > > > > Stephan > > > > > > > > > ________________________________________________________ > > > Stephan Moratti, PhD > > > > > > see also: http://web.me.com/smoratti/ > > > > > > Universidad Complutense de Madrid > > > Facultad de Psicolog?a > > > Departamento de Psicolog?a B?sica I > > > Campus de Somosaguas > > > 28223 Pozuelo de Alarc?n (Madrid) > > > Spain > > > > > > and > > > > > > Center for Biomedical Technology > > > Laboratory for Cognitive and Computational Neuroscience > > > Parque Cient?fico y Tecnol?gico de la Universidad Politecnica de > > > Madrid > > > Campus Montegancedo > > > 28223 Pozuelo de Alarc?n (Madrid) > > > Spain > > > > > > > > > email: smoratti at psi.ucm.es > > > Tel.: +34 679219982 > > > > > > El 12/06/2013, a las 18:00, jan-mathijs schoffelen escribi?: > > > > > >> An alternative would be to interpolate the cortical sheet to a 3D > > >> grid (where the grid is defined for each subject based on a > > >> warped > > >> template grid defined in a standard space), and then do > > >> clustering > > >> using a regular 3D spatial neighbourhood structure. The rationale > > >> being that two vertices on the sheet may appear as disconnected > > >> (e.g. being on two sides of a sulcus) whereas, given the poor > > >> spatial resolution, they belong to the same spatial blob. > > >> > > >> Best, > > >> Jan-Mathijs > > >> > > >> On Jun 12, 2013, at 5:44 PM, smoratti at psi.ucm.es wrote: > > >> > > >>> Dear Nicolai, > > >>> > > >>> Indeed I have used ft_timelockstatistics for minimum norm source > > >>> data. The trick is to put the source level data into a ERF > > >>> structure. Determining the neighbors of a source surface with > > >>> vertices is not trivial. However I used tess_vertconn.m from the > > >>> BrainStorm toolbox to get the connectivity matrix that tells you > > >>> who is a neighbor. This you can feed into timelockstats. > > >>> > > >>> Hope that helps, > > >>> > > >>> Stephan > > >>> > > >>> ________________________________________________________ > > >>> Stephan Moratti, PhD > > >>> > > >>> see also: http://web.me.com/smoratti/ > > >>> > > >>> Universidad Complutense de Madrid > > >>> Facultad de Psicolog?a > > >>> Departamento de Psicolog?a B?sica I > > >>> Campus de Somosaguas > > >>> 28223 Pozuelo de Alarc?n (Madrid) > > >>> Spain > > >>> > > >>> and > > >>> > > >>> Center for Biomedical Technology > > >>> Laboratory for Cognitive and Computational Neuroscience > > >>> Parque Cient?fico y Tecnol?gico de la Universidad Politecnica de > > >>> Madrid > > >>> Campus Montegancedo > > >>> 28223 Pozuelo de Alarc?n (Madrid) > > >>> Spain > > >>> > > >>> > > >>> email: smoratti at psi.ucm.es > > >>> Tel.: +34 679219982 > > >>> > > >>> El 12/06/2013, a las 15:44, Nicolai Mersebak escribi?: > > >>> > > >>>> Dear all, > > >>>> > > >>>> I have a question concerning the usage of ft_sourcegrandaverage > > >>>> and ft_sourcestatistics. > > >>>> > > >>>> After using ft_sourceanalysis (method: MNE), I get > > >>>> spatio-temporal source reconstructed data in source.avg.pow > > >>>> (4050 > > >>>> x 897): 4050 sources and 897 time points. > > >>>> > > >>>> Now I would like to use the cluster-based permutation test on > > >>>> my > > >>>> source reconstructed data. However it seems like > > >>>> ft_sourcegrandaverage and ft_sourcestatistics don't support > > >>>> source level time courses. E.g when I am using > > >>>> ft_sourcegrandaverage I am getting the following error: > > >>>> > > >>>> Error in ft_sourcegrandaverage (line 158) > > >>>> dat(:,i) = tmp(:); > > >>>> > > >>>> Looking into the code: > > >>>> > > >>>> for i=1:Nsubject > > >>>> tmp = getsubfield(varargin{i}, > > >>>> parameterselection(cfg.parameter, > > >>>> varargin{i})); > > >>>> dat(:,i) = tmp(:); > > >>>> tmp = getsubfield(varargin{i}, 'inside'); > > >>>> inside(tmp,i) = 1; > > >>>> end > > >>>> > > >>>> I see that "tmp" are getting the structure [N_sources x > > >>>> timepoints] from source.avg.pow for one subject, where "dat" > > >>>> requires the structure [N_sources x 1]. > > >>>> > > >>>> I seached the mailing list for similar issues and found this > > >>>> thread: > > >>>> > > >>>> http://mailman.science.ru.nl/pipermail/fieldtrip/2010-September/003122.html > > >>>> > > >>>> Since I am interested in using the temporal dimension in my > > >>>> statistics, I would like to know if it is still not possible to > > >>>> use spatio-temporal source reconstructed data in > > >>>> ft_sourcestatistics and ft_sourcegrandaverage ? > > >>>> > > >>>> Or if any have succeeded in using the cluster-based permutation > > >>>> test on source level also including the temporal dimension ? > > >>>> > > >>>> Alternative I was thinking that I might could use > > >>>> ft_timelockstatistics, where I substituted the channels with > > >>>> sources, e.g instead of having 64 channels, I would now have > > >>>> 4050 > > >>>> "channels". > > >>>> If so I need to calculate a label structure and an appropriate > > >>>> neighbor structure, which I guess is possible as I have all the > > >>>> 3D coordinates for each source, e.g in leadfield.pos ? > > >>>> I know this is a work around solution, but have anyone tried or > > >>>> have any experience using such an approach ? > > >>>> > > >>>> Best, > > >>>> > > >>>> Nicolai > > >>>> > > >>>> _______________________________________________ > > >>>> fieldtrip mailing list > > >>>> fieldtrip at donders.ru.nl > > >>>> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > >>> > > >>> _______________________________________________ > > >>> fieldtrip mailing list > > >>> fieldtrip at donders.ru.nl > > >>> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > >> > > >> Jan-Mathijs Schoffelen, MD PhD > > >> > > >> Donders Institute for Brain, Cognition and Behaviour, > > >> Centre for Cognitive Neuroimaging, > > >> Radboud University Nijmegen, The Netherlands > > >> > > >> Max Planck Institute for Psycholinguistics, > > >> Nijmegen, The Netherlands > > >> > > >> J.Schoffelen at donders.ru.nl > > >> Telephone: +31-24-3614793 > > >> > > >> http://www.hettaligebrein.nl > > >> > > >> _______________________________________________ > > >> fieldtrip mailing list > > >> fieldtrip at donders.ru.nl > > >> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > > > > > _______________________________________________ > > > fieldtrip mailing list > > > fieldtrip at donders.ru.nl > > > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > -------------- next part -------------- > > An HTML attachment was scrubbed... > > URL: < > > http://mailman.science.ru.nl/pipermail/fieldtrip/attachments/20130613/5974284f/attachment.html > > > > > ------------------------------ > > _______________________________________________ > > fieldtrip mailing list > > fieldtrip at donders.ru.nl > > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > End of fieldtrip Digest, Vol 31, Issue 27 > > ***************************************** > -- > Stephen Politzer-Ahles > University of Kansas > Linguistics Department > http://people.ku.edu/~sjpa/ > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -------------- next part -------------- An HTML attachment was scrubbed... URL: From politzerahless at gmail.com Mon Jun 24 20:29:01 2013 From: politzerahless at gmail.com (Stephen Politzer-Ahles) Date: Mon, 24 Jun 2013 13:29:01 -0500 Subject: [FieldTrip] Source statistics on spatio-temporal source reconstruction data (MNE) Message-ID: Hi Arjen, Thanks, I also just tried that (after noticing that code in a later part of the example) and can confirm that that change makes the plot come out like the plot in the example. I updated the wiki accordingly. Best, Steve > Message: 1 > Date: Mon, 24 Jun 2013 20:11:26 +0200 (CEST) > From: "Stolk, A." > To: FieldTrip discussion list > Subject: Re: [FieldTrip] fieldtrip Digest, Vol 31, Issue 27 > Message-ID: > < 331233946.1725662.1372097486678.JavaMail.root at sculptor.zimbra.ru.nl> > Content-Type: text/plain; charset="utf-8" > > Hi Steve, With respect to the cube vs. brain-shaped grid; this seems to be plotting-related? template_grid.inside in the snippet of code below selects only the grid points that have been determined as inside the brain, but with a negative inwardshift, hence it's also outside. ft_plot_mesh ( template_grid. pos ( template_grid. inside ,: ) ) ; % taken from the wiki Hopefully someone else has up-to-date knowledge to answer your question pertaining to the units (mm vs. cm) of the volume conductor and the source model. Best regards, Arjen ----- Oorspronkelijk bericht ----- > > Van: "Stephen Politzer-Ahles" > > Aan: fieldtrip at science.ru.nl > > Verzonden: Maandag 24 juni 2013 17:19:59 > > Onderwerp: Re: [FieldTrip] fieldtrip Digest, Vol 31, Issue 27 > > Hi everyone, > > I recently tried > > http://fieldtrip.fcdonders.nl/example/create_single-subject_grids_in_individual_head_space_that_are_all_aligned_in_mni_space > > and noticed some inconsistencies between the example code and the > > results; I updated the code on the wiki but I wanted to send a message > > to the list to double-check whether my changes are ok. Firstly, I had > > to add a call to ft_convert_units, because otherwise the vol was > > expressed in mm and the grid in cm, causing the grid to be much > > smaller than the volume conductor (see http://i.imgur.com/gzct9Dm.png > > ). Is this change ok? > > The result I get is still not quite consistent with the examples shown > > on that page, though; in my result, the grid is a cube ( > > http://i.imgur.com/NSgCFpg.png ), whereas in the example the grid is > > brain-shaped. I used the same Fieldtrip brain template and the same > > code from the example (except for the change above), so I'm not sure > > if the difference is due to different plot settings, a change in the > > Fieldtrip code since this example was made, or a change in the sample > > brain included in Fieldtrip since the example was made. > > Best, > > Steve -------------- next part -------------- An HTML attachment was scrubbed... URL: From joramvandriel at gmail.com Tue Jun 25 09:17:27 2013 From: joramvandriel at gmail.com (Joram van Driel) Date: Tue, 25 Jun 2013 09:17:27 +0200 Subject: [FieldTrip] fieldtrip Digest, Vol 31, Issue 27 In-Reply-To: <331233946.1725662.1372097486678.JavaMail.root@sculptor.zimbra.ru.nl> References: <331233946.1725662.1372097486678.JavaMail.root@sculptor.zimbra.ru.nl> Message-ID: Hi Steve, I had the same problem a while ago. First of all, you need to take care of all the necessary ingredients to be in cm before computing the volume conduction model and the leadfield matrix, by using ft_convertunits. Second, I also first had a brain-shaped grid, which was not a plot-related problem; I noticed during the computation of the leadfield in the Matlab command lines that it estimated 0 dipoles outside, and x-number of dipoles inside the brain, which already made me suspicious. Check whether you get this as well, then you know it's not a plotting problem. In the end I managed to get a x inside and x outside number of dipoles, and I think the difference was that I first used ft_prepare_singleshell (which gave me the weird brain-shaped results with 0 dipoles outside), while I think you should use ft_prepare_headmodel with cfg.method='singleshell'. Maybe it doesn't matter at all, and the problem lies somewhere else, but for me it worked and I got a nice cube-shaped grid in the end. Hope this helps. Best, Joram On Mon, Jun 24, 2013 at 8:11 PM, Stolk, A. wrote: > Hi Steve, > > With respect to the cube vs. brain-shaped grid; this seems to be > plotting-related? template_grid.inside in the snippet of code below selects > only the grid points that have been determined as inside the brain, but > with a negative inwardshift, hence it's also outside. > > ft_plot_mesh(template_grid.pos(template_grid.inside,:)); % taken from the > wiki > > Hopefully someone else has up-to-date knowledge to answer your question > pertaining to the units (mm vs. cm) of the volume conductor and the source > model. > > Best regards, > Arjen > > ------------------------------ > > *Van: *"Stephen Politzer-Ahles" > *Aan: *fieldtrip at science.ru.nl > *Verzonden: *Maandag 24 juni 2013 17:19:59 > *Onderwerp: *Re: [FieldTrip] fieldtrip Digest, Vol 31, Issue 27 > > > Hi everyone, > > I recently tried > http://fieldtrip.fcdonders.nl/example/create_single-subject_grids_in_individual_head_space_that_are_all_aligned_in_mni_spaceand noticed some inconsistencies between the example code and the results; > I updated the code on the wiki but I wanted to send a message to the list > to double-check whether my changes are ok. Firstly, I had to add a call to > ft_convert_units, because otherwise the vol was expressed in mm and the > grid in cm, causing the grid to be much smaller than the volume conductor > (see http://i.imgur.com/gzct9Dm.png). Is this change ok? > > The result I get is still not quite consistent with the examples shown on > that page, though; in my result, the grid is a cube ( > http://i.imgur.com/NSgCFpg.png), whereas in the example the grid is > brain-shaped. I used the same Fieldtrip brain template and the same code > from the example (except for the change above), so I'm not sure if the > difference is due to different plot settings, a change in the Fieldtrip > code since this example was made, or a change in the sample brain included > in Fieldtrip since the example was made. > > Best, > Steve > > > On Thu, Jun 13, 2013 at 5:05 AM, wrote: > > > > Send fieldtrip mailing list submissions to > > fieldtrip at science.ru.nl > > > > To subscribe or unsubscribe via the World Wide Web, visit > > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > or, via email, send a message with subject or body 'help' to > > fieldtrip-request at science.ru.nl > > > > You can reach the person managing the list at > > fieldtrip-owner at science.ru.nl > > > > When replying, please edit your Subject line so it is more specific > > than "Re: Contents of fieldtrip digest..." > > > > > > Today's Topics: > > > > 1. Re: Source statistics on spatio-temporal source > > reconstruction data (MNE) (Nicolai Mersebak) > > > > > > ---------------------------------------------------------------------- > > > > Message: 1 > > Date: Thu, 13 Jun 2013 12:04:34 +0200 > > From: Nicolai Mersebak > > To: FieldTrip discussion list > > Subject: Re: [FieldTrip] Source statistics on spatio-temporal source > > reconstruction data (MNE) > > Message-ID: <6F3697BB-194F-422F-A1BF-EBBB132F805B at mersebak.dk> > > Content-Type: text/plain; charset="iso-8859-1" > > > > Thanks to all of you for your comments and ideas - they are very helpful! > > > > I ( off course :) ) have some follow up questions. > > > > I have created an ERP structure for my MNE source, so the only think > which I need and that is not straight forward is the neighbour structure. > > > > I am using the standard bem template > (fieldtrip-20130124/template/headmodel/standard_bem.mat) as a head model > and use the following code to get a grid for all subjects as I don't have > any subject specific information regarding the anatomy. > > > > cfg = []; > > cfg.grid.xgrid = -100:10:100; > > cfg.grid.ygrid = -100:10:100; > > cfg.grid.zgrid = -100:10:100; > > cfg.grid.tight = 'yes'; > > cfg.grid.unit = hdm.unit; % unit: mm > > cfg.vol = hdm; > > grid = ft_prepare_sourcemodel(cfg); > > > > > > @Jan-Mathijs and Stephan: I guess making a subject specific grid based > on a warped template requires anatomic information for each subject, e.g. a > MRI image like this tutorial shows: > > > http://fieldtrip.fcdonders.nl/example/create_single-subject_grids_in_individual_head_space_that_are_all_aligned_in_mni_space?s%5B > > > > The final grid output in the tutorial - does it have this 3D grid which > can be used as a neighbour structure ? > > > > I am not sure how to go from my cortical sheet [vertices x > coordinates(x,y,z)] to a 3D grid, which I can use as a neighbour structure ? > > > > A second thing I would like to know is, if any of you have tried to use > an atlas (e.g ALL template atlas) where the regions now are channels in the > permutation test? Going from source points to atlas regions can be done > through ft_sourcestatistics, but I am still interested in keeping the > temporal dimension. The reason to use atlas regions instead of source > points is to decrease the computation time. > > > > Best, > > > > Nicolai > > > > > > > On Thu, Jun 13, 2013 at 5:05 AM, wrote: > >> Send fieldtrip mailing list submissions to >> fieldtrip at science.ru.nl >> >> To subscribe or unsubscribe via the World Wide Web, visit >> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip >> or, via email, send a message with subject or body 'help' to >> fieldtrip-request at science.ru.nl >> >> You can reach the person managing the list at >> fieldtrip-owner at science.ru.nl >> >> When replying, please edit your Subject line so it is more specific >> than "Re: Contents of fieldtrip digest..." >> >> >> Today's Topics: >> >> 1. Re: Source statistics on spatio-temporal source >> reconstruction data (MNE) (Nicolai Mersebak) >> >> >> ---------------------------------------------------------------------- >> >> Message: 1 >> Date: Thu, 13 Jun 2013 12:04:34 +0200 >> From: Nicolai Mersebak >> To: FieldTrip discussion list >> Subject: Re: [FieldTrip] Source statistics on spatio-temporal source >> reconstruction data (MNE) >> Message-ID: <6F3697BB-194F-422F-A1BF-EBBB132F805B at mersebak.dk> >> Content-Type: text/plain; charset="iso-8859-1" >> >> Thanks to all of you for your comments and ideas - they are very helpful! >> >> I ( off course :) ) have some follow up questions. >> >> I have created an ERP structure for my MNE source, so the only think >> which I need and that is not straight forward is the neighbour structure. >> >> I am using the standard bem template >> (fieldtrip-20130124/template/headmodel/standard_bem.mat) as a head model >> and use the following code to get a grid for all subjects as I don't have >> any subject specific information regarding the anatomy. >> >> cfg = []; >> cfg.grid.xgrid = -100:10:100; >> cfg.grid.ygrid = -100:10:100; >> cfg.grid.zgrid = -100:10:100; >> cfg.grid.tight = 'yes'; >> cfg.grid.unit = hdm.unit; % unit: mm >> cfg.vol = hdm; >> grid = ft_prepare_sourcemodel(cfg); >> >> >> @Jan-Mathijs and Stephan: I guess making a subject specific grid based on >> a warped template requires anatomic information for each subject, e.g. a >> MRI image like this tutorial shows: >> >> http://fieldtrip.fcdonders.nl/example/create_single-subject_grids_in_individual_head_space_that_are_all_aligned_in_mni_space?s%5B >> >> The final grid output in the tutorial - does it have this 3D grid which >> can be used as a neighbour structure ? >> >> I am not sure how to go from my cortical sheet [vertices x >> coordinates(x,y,z)] to a 3D grid, which I can use as a neighbour structure ? >> >> A second thing I would like to know is, if any of you have tried to use >> an atlas (e.g ALL template atlas) where the regions now are channels in the >> permutation test? Going from source points to atlas regions can be done >> through ft_sourcestatistics, but I am still interested in keeping the >> temporal dimension. The reason to use atlas regions instead of source >> points is to decrease the computation time. >> >> Best, >> >> Nicolai >> >> >> Den 12/06/2013 kl. 18.58 skrev "smoratti at psi.ucm.es" > >: >> >> > >> > I think Jan.Mathijs alternative suggestion is quite attractive. With >> the neighbors on a cortical sheet I also had the problems that sometimes >> the vertices do not have the same distance and then clustering may be >> biased to smaller or bigger clusters as the number of neighbors does not >> guarantee same cluster sizes. With the interpolation onto a 3D grid, you >> won't have that problem. >> > >> > best, >> > >> > Stephan >> > >> > >> > ________________________________________________________ >> > Stephan Moratti, PhD >> > >> > see also: http://web.me.com/smoratti/ >> > >> > Universidad Complutense de Madrid >> > Facultad de Psicolog?a >> > Departamento de Psicolog?a B?sica I >> > Campus de Somosaguas >> > 28223 Pozuelo de Alarc?n (Madrid) >> > Spain >> > >> > and >> > >> > Center for Biomedical Technology >> > Laboratory for Cognitive and Computational Neuroscience >> > Parque Cient?fico y Tecnol?gico de la Universidad Politecnica de Madrid >> > Campus Montegancedo >> > 28223 Pozuelo de Alarc?n (Madrid) >> > Spain >> > >> > >> > email: smoratti at psi.ucm.es >> > Tel.: +34 679219982 >> > >> > El 12/06/2013, a las 18:00, jan-mathijs schoffelen escribi?: >> > >> >> An alternative would be to interpolate the cortical sheet to a 3D grid >> (where the grid is defined for each subject based on a warped template grid >> defined in a standard space), and then do clustering using a regular 3D >> spatial neighbourhood structure. The rationale being that two vertices on >> the sheet may appear as disconnected (e.g. being on two sides of a sulcus) >> whereas, given the poor spatial resolution, they belong to the same spatial >> blob. >> >> >> >> Best, >> >> Jan-Mathijs >> >> >> >> On Jun 12, 2013, at 5:44 PM, smoratti at psi.ucm.es wrote: >> >> >> >>> Dear Nicolai, >> >>> >> >>> Indeed I have used ft_timelockstatistics for minimum norm source >> data. The trick is to put the source level data into a ERF structure. >> Determining the neighbors of a source surface with vertices is not trivial. >> However I used tess_vertconn.m from the BrainStorm toolbox to get the >> connectivity matrix that tells you who is a neighbor. This you can feed >> into timelockstats. >> >>> >> >>> Hope that helps, >> >>> >> >>> Stephan >> >>> >> >>> ________________________________________________________ >> >>> Stephan Moratti, PhD >> >>> >> >>> see also: http://web.me.com/smoratti/ >> >>> >> >>> Universidad Complutense de Madrid >> >>> Facultad de Psicolog?a >> >>> Departamento de Psicolog?a B?sica I >> >>> Campus de Somosaguas >> >>> 28223 Pozuelo de Alarc?n (Madrid) >> >>> Spain >> >>> >> >>> and >> >>> >> >>> Center for Biomedical Technology >> >>> Laboratory for Cognitive and Computational Neuroscience >> >>> Parque Cient?fico y Tecnol?gico de la Universidad Politecnica de >> Madrid >> >>> Campus Montegancedo >> >>> 28223 Pozuelo de Alarc?n (Madrid) >> >>> Spain >> >>> >> >>> >> >>> email: smoratti at psi.ucm.es >> >>> Tel.: +34 679219982 >> >>> >> >>> El 12/06/2013, a las 15:44, Nicolai Mersebak escribi?: >> >>> >> >>>> Dear all, >> >>>> >> >>>> I have a question concerning the usage of ft_sourcegrandaverage and >> ft_sourcestatistics. >> >>>> >> >>>> After using ft_sourceanalysis (method: MNE), I get spatio-temporal >> source reconstructed data in source.avg.pow (4050 x 897): 4050 sources and >> 897 time points. >> >>>> >> >>>> Now I would like to use the cluster-based permutation test on my >> source reconstructed data. However it seems like ft_sourcegrandaverage and >> ft_sourcestatistics don't support source level time courses. E.g when I am >> using ft_sourcegrandaverage I am getting the following error: >> >>>> >> >>>> Error in ft_sourcegrandaverage (line 158) >> >>>> dat(:,i) = tmp(:); >> >>>> >> >>>> Looking into the code: >> >>>> >> >>>> for i=1:Nsubject >> >>>> tmp = getsubfield(varargin{i}, parameterselection(cfg.parameter, >> varargin{i})); >> >>>> dat(:,i) = tmp(:); >> >>>> tmp = getsubfield(varargin{i}, 'inside'); >> >>>> inside(tmp,i) = 1; >> >>>> end >> >>>> >> >>>> I see that "tmp" are getting the structure [N_sources x timepoints] >> from source.avg.pow for one subject, where "dat" requires the structure >> [N_sources x 1]. >> >>>> >> >>>> I seached the mailing list for similar issues and found this thread: >> >>>> >> >>>> >> http://mailman.science.ru.nl/pipermail/fieldtrip/2010-September/003122.html >> >>>> >> >>>> Since I am interested in using the temporal dimension in my >> statistics, I would like to know if it is still not possible to use >> spatio-temporal source reconstructed data in ft_sourcestatistics and >> ft_sourcegrandaverage ? >> >>>> >> >>>> Or if any have succeeded in using the cluster-based permutation test >> on source level also including the temporal dimension ? >> >>>> >> >>>> Alternative I was thinking that I might could use >> ft_timelockstatistics, where I substituted the channels with sources, e.g >> instead of having 64 channels, I would now have 4050 "channels". >> >>>> If so I need to calculate a label structure and an appropriate >> neighbor structure, which I guess is possible as I have all the 3D >> coordinates for each source, e.g in leadfield.pos ? >> >>>> I know this is a work around solution, but have anyone tried or have >> any experience using such an approach ? >> >>>> >> >>>> Best, >> >>>> >> >>>> Nicolai >> >>>> >> >>>> _______________________________________________ >> >>>> fieldtrip mailing list >> >>>> fieldtrip at donders.ru.nl >> >>>> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip >> >>> >> >>> _______________________________________________ >> >>> fieldtrip mailing list >> >>> fieldtrip at donders.ru.nl >> >>> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip >> >> >> >> Jan-Mathijs Schoffelen, MD PhD >> >> >> >> Donders Institute for Brain, Cognition and Behaviour, >> >> Centre for Cognitive Neuroimaging, >> >> Radboud University Nijmegen, The Netherlands >> >> >> >> Max Planck Institute for Psycholinguistics, >> >> Nijmegen, The Netherlands >> >> >> >> J.Schoffelen at donders.ru.nl >> >> Telephone: +31-24-3614793 >> >> >> >> http://www.hettaligebrein.nl >> >> >> >> _______________________________________________ >> >> fieldtrip mailing list >> >> fieldtrip at donders.ru.nl >> >> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip >> > >> > _______________________________________________ >> > fieldtrip mailing list >> > fieldtrip at donders.ru.nl >> > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip >> >> -------------- next part -------------- >> An HTML attachment was scrubbed... >> URL: < >> http://mailman.science.ru.nl/pipermail/fieldtrip/attachments/20130613/5974284f/attachment.html >> > >> >> ------------------------------ >> >> _______________________________________________ >> fieldtrip mailing list >> fieldtrip at donders.ru.nl >> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip >> >> End of fieldtrip Digest, Vol 31, Issue 27 >> ***************************************** >> > > > > -- > Stephen Politzer-Ahles > University of Kansas > Linguistics Department > http://people.ku.edu/~sjpa/ > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > -- Joram van Driel, MSc. PhD student at the University of Amsterdam Department of Psychology, Brain & Cognition -------------- next part -------------- An HTML attachment was scrubbed... URL: From mbj0310 at gmail.com Tue Jun 25 13:04:15 2013 From: mbj0310 at gmail.com (Beom Jun Min) Date: Tue, 25 Jun 2013 20:04:15 +0900 Subject: [FieldTrip] Decreased baseline level after using ICA in ERP data In-Reply-To: <831995030.1708865.1372062324986.JavaMail.root@sculptor.zimbra.ru.nl> References: <831995030.1708865.1372062324986.JavaMail.root@sculptor.zimbra.ru.nl> Message-ID: Dear Diego, Thank you for your kind answer. The importance of 'quality' you mentioned and the references that you attached could help me to understand the ICA algorithm further. And I have an additional question about preprocessing before ICA. Is detrending needed before the decomposition if there is a linear trend in the segmented data? Because I noticed one component showing linearly and consistently decreased (or increased) activity during one segment in some trials after ICA, I wondered why that happened. Apart from that, I found the possible cause of the past problem. It looks like the ft_rejectcomponent might remove the 'demean' effect. After I used the function without any component removing, (cfg.component = [];) the baseline level decreased again but the shape of the ERP does not change. However, I have not found the way to correct this decreased baseline yet. The ft_preprocessing with demean pre-stimulus does not work. Thanks. BJ 2013/6/24 Lozano Soldevilla, D. (Diego) > Dear Beom Jun, > > I see multiple scenarios why this baseline activity decrease could happen. > First of all, how the component you're rejecting look like (i.e. "blink > component")? Do you see this activity decrease after the baseline period? > > The "quality" of the ICA decomposition, how well your artifact/component > of interest has been isolated by algorithm in time (i.e. blink time > courses) and space (marked frontal topography), will determine the activity > that later on you'll reject/select. If your decomposition is not well > suited, the rejection of a particular IC activity might have "extra" > activity you don't want to reject (effect of interest), might be the > algorithm is not able to isolate the components of interests (i.e. > artifacts) or a combination of both. > > To evaluate the quality of your ICA decomposition you might have a look > here (http://www.ncbi.nlm.nih.gov/pubmed/19162199). Basically, the > authors find that the ICA decomposition improves significantly "increased > by removing the mean EEG at each channel for each epoch of data rather than > the mean EEG in a prestimulus baseline". In addition (see here: > http://sccn.ucsd.edu/pipermail/eeglablist/2012/004925.html), high-pass > filtering above ~1hz improve the results. > > It's very important to feed ICA as much relevant data as you can use. The > more the data, the better the decomposition. There's a rule of thumb that > says that for a reliable IC decomposition 20 time points per channel2 is > needed (see here for a reference > http://www.ncbi.nlm.nih.gov/pubmed/16904745) > > I hope that helps, > > Diego > ------------------------------ > > *From: *"Beom Jun Min" > *To: *"FieldTrip discussion list" > *Sent: *Monday, 24 June, 2013 6:27:47 AM > *Subject: *[FieldTrip] Decreased baseline level after using ICA in ERP > data > > > Dear all, > > I have ERP data and now I am dealing with ICA to remove muscle and eye > artifacts. > However, I found that after ft_rejectcomponent, the baseline level of the > segmented epoch decreased. (The baselinewindow is [-0.2 0].) > The baseline level decreased even though I rejected only one component. > > My script is shown below. > > *%% Removing the Artifacts* > *cfg = []; > * > *cfg.component = [ ]; % to be removed component(s)* > *post_ICA_temp6 = ft_rejectcomponent(cfg, comp_detrand, data_raw);* > * > * > *%% timelocking* > * > * > *cfg = [];* > *timelock_temp6 = ft_timelockanalysis(cfg, post_ICA_temp6);* > * > * > *%% Plot* > * > * > *figure;* > *cfg = [];* > *cfg.layout = lay;* > *cfg.interactive = 'yes';* > *cfg.channel = ['all', {'-EKG', '-EMG'}];* > *ft_multiplotER(cfg, timelock_temp6)* > > Is there something that I missed? > > Thanks. > > BJ > > -- > BeomJun Min, M.D. > > Department of Medical System Engineering (DMSE) > Gwangju Institute of Science and Technology (GIST) > 261 Cheomdan-gwagiro(Oryong-dong), Buk-gu, Gwangju > 500-712, Republic of Korea (South) > Phone: +82-62-715-3266 / Fax: +82-62-715-3244 > E-mail: mbj0310 at gmail.com, http://bmssa.gist.ac.kr > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > > > > -- > PhD Student > Neuronal Oscillations Group > Donders Institute for Brain, Cognition and Behaviour > Centre for Cognitive Neuroimaging > Radboud University Nijmegen > NL-6525 EN Nijmegen > The Netherlands > http://www.ru.nl/people/donders/lozano-soldevilla-d/ > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > -- BeomJun Min, M.D. Department of Medical System Engineering (DMSE) Gwangju Institute of Science and Technology (GIST) 261 Cheomdan-gwagiro(Oryong-dong), Buk-gu, Gwangju 500-712, Republic of Korea (South) Phone: +82-62-715-3266 / Fax: +82-62-715-3244 E-mail: mbj0310 at gmail.com, http://bmssa.gist.ac.kr -------------- next part -------------- An HTML attachment was scrubbed... URL: From mengtongxiao at gmail.com Tue Jun 25 15:29:41 2013 From: mengtongxiao at gmail.com (=?GB2312?B?s8LRqQ==?=) Date: Tue, 25 Jun 2013 21:29:41 +0800 Subject: [FieldTrip] source reconstruction data (MNE .fif) Message-ID: Dear all I have a .fif file and want to source reconstruction . I want use the template sourcemodel in fieldtrip,but I see there are two different coordinate system. Shold I convert the fif coordinate to template coordinate? thanks best, xiao -------------- next part -------------- An HTML attachment was scrubbed... URL: From m.chait at ucl.ac.uk Tue Jun 25 16:39:16 2013 From: m.chait at ucl.ac.uk (Chait, Maria) Date: Tue, 25 Jun 2013 14:39:16 +0000 Subject: [FieldTrip] PhD studentship at the UCL Ear Institute Message-ID: <3BA3DF582C0B7542AE0CB625F0119AB8378B0451@DB3PRD0111MB492.eurprd01.prod.exchangelabs.com> Please forward to anyone who might be interested. A 3 year PhD studentship in auditory cognitive neuroscience is available as part of a research collaboration between the UCL Ear Institute (London, UK) and NTT Communication Science Labs (Nippon Telegraph and Telephone corporation, Atsugi, Japan). The student will be based at the UCL Ear Institute and supervised by Dr. Maria Chait. They will also be working with Prof. Makio Kashino and Dr. Shigeto Furukawa (NTT). The project will use psychophysics, eye tracking, autonomic response measures and MEG functional brain imaging to investigate which features of sound are perceptually salient. Namely, those sounds that automatically capture attention in a busy scene, even when listeners' initial perceptual focus is elsewhere. The UCL Ear Institute provides state-of-the-art research facilities across a wide range of disciplines and is one of the foremost centres for hearing, speech and language-related research within Europe. Key Requirements The PhD start date would be September 2013. Applicants should have a UK/EU nationality and a 1St class, or upper 2nd degree in a relevant discipline (e.g. Psychology, Neuroscience, Engineering). The PhD work would require good programming skills (e.g. in Matlab). Previous experience with auditory research, functional brain imaging, signal processing and/or acoustics is desirable. For an informal discussion, or to submit an application please contact Dr. Maria Chait (m.chait at ucl.ac.uk). Applicants should submit a supporting statement, a CV, and the details of two academic referees. The closing date for receipt of applications is July 15th, 2013.The studentship includes fees and a yearly stipend (about £16000; tax free). Maria Chait PhD m.chait at ucl.ac.uk Senior Lecturer UCL Ear Institute 332 Gray's Inn Road London WC1X 8EE -------------- next part -------------- An HTML attachment was scrubbed... URL: From matt.craddock at uni-leipzig.de Tue Jun 25 17:17:43 2013 From: matt.craddock at uni-leipzig.de (Matt Craddock) Date: Tue, 25 Jun 2013 17:17:43 +0200 Subject: [FieldTrip] Decreased baseline level after using ICA in ERP data In-Reply-To: References: <831995030.1708865.1372062324986.JavaMail.root@sculptor.zimbra.ru.nl> Message-ID: <51C9B497.7080105@uni-leipzig.de> Dear Beom Jun, Regarding detrending - ICA works better with relatively stationary data, which is why high-pass filtering - as Diego mentioned - is often performed. Both detrending and high-pass filtering remove/attenuate slow fluctuations in the signal, so I'd suggest using one or the other procedure before running ICA if you think such low frequency activity is affecting your decompositions. Cheers, Matt On 25/06/2013 13:04, Beom Jun Min wrote: > Dear Diego, > > Thank you for your kind answer. > The importance of 'quality' you mentioned and the references that you > attached could help me to understand the ICA algorithm further. > And I have an additional question about preprocessing before ICA. Is > detrending needed before the decomposition if there is a linear trend in > the segmented data? > Because I noticed one component showing linearly and consistently > decreased (or increased) activity during one segment in some trials > after ICA, I wondered why that happened. > Apart from that, I found the possible cause of the past problem. It > looks like the ft_rejectcomponent might remove the 'demean' effect. > After I used the function without any component removing, (cfg.component > = [];) the baseline level decreased again but the shape of the ERP does > not change. > However, I have not found the way to correct this decreased baseline > yet. The ft_preprocessing with demean pre-stimulus does not work. > > Thanks. > > BJ -- Dr. Matt Craddock Post-doctoral researcher, Institute of Psychology, University of Leipzig, Neumarkt 9-19, 04109 Leipzig, Germany Phone: +49 341 973 95 44 From l.verhagen at fcdonders.ru.nl Wed Jun 26 11:33:36 2013 From: l.verhagen at fcdonders.ru.nl (Verhagen, L. (Lennart)) Date: Wed, 26 Jun 2013 11:33:36 +0200 (CEST) Subject: [FieldTrip] Brain Stimulation (TMS-tDCS-EEG) toolkit course at Donders, Nijmegen - registration is now open Message-ID: <1380b01ce7250$3bba7a70$b32f6f50$@verhagen@fcdonders.ru.nl> On September 2-4, 2013, we will host the “Toolkit of Cognitive Neuroscience: Transcranial Brain Stimulation” at the Donders Institute in Nijmegen. This intensive three-day toolkit course will provide in-depth knowledge on transcranial magnetic stimulation (TMS) and transcranial current stimulation (tDCS/tACS). The course will cover both basic and advanced topics, discussing online and offline approaches of quantification, interference, and modulation of neural activity. We will specifically address multimodal applications of non-invasive brain stimulation, with an emphasis on concurrent electroencephalography (EEG). The course involves a series of lectures and hands-on training of stimulation application, data acquisition and data analysis. These address fundamental paradigms, such as single-pulse TMS, repetitive TMS, tDCS and tACS, and advanced topics, such as paired-pulse TMS and concurrent TMS-tDCS-EEG. Keynote lectures will be given by Rogier Mars (Oxford), Jacinta O’Shea (Oxford), Alexander Sack (Maastricht), and Gregor Thut (Glasgow). Please see the program for more details. The participation fee is €150 for (PhD) students and €300 for more senior researchers. This includes coffee/tea, Dutch sandwich lunches, and social diner and drinks on Monday and Tuesday. Because of space limitations the number of participants in the hands-on sessions is limited to 30; please indicate your preference to join these additional sessions when registering. Location: Donders Institute for Brain, Cognition and Behaviour, Centre for Cognitive Neuroimaging, Kapittelweg 29, 6525 EN Nijmegen Organizers: Lennart Verhagen (l.verhagen at donders.ru.nl) Til Ole Bergmann (t.bergmann at donders.ru.nl) Registration: www.ru.nl/donders/course-information/2013courses/toolkit-cognitive-7 Best regards, Lennart Verhagen and Til Ole Bergmann -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: DondersTookit - BrainStim - program2013.pdf Type: application/pdf Size: 392475 bytes Desc: not available URL: From graham at peyton.co.za Wed Jun 26 12:13:58 2013 From: graham at peyton.co.za (Graham Peyton) Date: Wed, 26 Jun 2013 12:13:58 +0200 Subject: [FieldTrip] QSUB toolbox on a multi-core computer Message-ID: Dear FieldTrip community, I am trying to carry out an MEG analysis using the qsub distributed computing toolbox. I'm using a quad-core i7 computer, and was hoping that I'd be able to distribute the workload over all four cores. I have followed the tutorial below exactly: http://fieldtrip.fcdonders.nl/tutorial/distributedcomputing The problem I am having is this: I managed to run example 1 (with my own dataset), but I am finding that when I use qsubcellfun, the function ft_definetrial is executed *sequentially* (for each condition), *not* in * parallel*. Is there a way I can correct this, so as to parallelize the analysis? Or is the toolbox not designed for multi-core machines? Many thanks, Graham Peyton -------------- next part -------------- An HTML attachment was scrubbed... URL: From m.vandenieuwenhuijzen at fcdonders.ru.nl Wed Jun 26 15:07:02 2013 From: m.vandenieuwenhuijzen at fcdonders.ru.nl (Marieke van de Nieuwenhuijzen) Date: Wed, 26 Jun 2013 15:07:02 +0200 (CEST) Subject: [FieldTrip] ROI selection of beamformer grid points Message-ID: <1483937264.1423478.1372252022737.JavaMail.root@draco.zimbra.ru.nl> Dear Fieldtrippers, I am running my analyses on time courses reconstructed in source space. Basically, that means that my working dataset is a matrix of grid point x time. What I want to do now is do some analyses on a subset of that dataset, a bit analogous to selecting some sensors to restrict analyses to. Therefore, what I would ideally want to do, is select a subset of grid points corresponding to a specific location (for example only the occipital grid points, or only the grid points corresponding to a specific atlas label). Does anyone have any suggestions about how I should go about selecting specific grid points? Is there perhaps some grid based atlas, or is it possible to select grid points based on their corresponding mni coordinates which you get after running ft_sourceinterpolate and ft_volumenormalise (in other words, is it possible to reverse ft_volumenormalise and ft_sourceinterpolate to map the mni coordinates to the grid points instead of the grid points to mni representation). Any pointers would be much appreciated. Best, Marieke From jm.horschig at donders.ru.nl Wed Jun 26 15:26:41 2013 From: jm.horschig at donders.ru.nl (=?ISO-8859-1?Q?=22J=F6rn_M=2E_Horschig=22?=) Date: Wed, 26 Jun 2013 15:26:41 +0200 Subject: [FieldTrip] ROI selection of beamformer grid points In-Reply-To: <1483937264.1423478.1372252022737.JavaMail.root@draco.zimbra.ru.nl> References: <1483937264.1423478.1372252022737.JavaMail.root@draco.zimbra.ru.nl> Message-ID: <51CAEC11.10702@donders.ru.nl> Hi Marieke, I basically use two approaches (in the end, both failed, so any other hints are appreciated): (a) Select voxels purely based on anatomical labels, as found in an atlas or in literature. (b) Select voxels based on some local maxima or minima, e.g. power maximum or maximum difference of log-ratio (a) should be pretty straight forward. In essence it involves getting MNI coordinates, inversely warping your grids to MNI space, getting closest voxel. If you have your region of interest not in MNI coordinates you need to transform them. I found some tal2mni functions on the web for this, but note that this is just an estimate. Of course, (a) is also applicable if you have a localizer task using fMRI and want to focus on some localized voxels. (b) is a bit more tricky, because you might be faced with huge inter-subject variability. Best of course would be to have the subject-specific, fMRI localized voxel. What I done in the past is to define a rough region of interest, e.g. posterior neocortex (based on some quick&dirty coordinate thresholding), using ft_volumesmooth to apply a gaussian blur on single subject-activity and then select the voxel that suits me best (i.e. the one of maximum activity). Of course your ROI could also be based on the grand-average or what have you. I had the feeling that especially this latter approach (base ROI on GA +/- 3 cm, smooth individual subject data, select most sensitive voxel) worked quite well, but I cannot tell for sure, because in the end my results were not reliable enough. Oh and btw, if the question just aims on 'how' to select programming-wise: Match the coordinate with your template, store the index based on the template-grid and use this index on your subject-specific grid to get voxel of interest in subject-specific coordinates. Good luck! Best, Jörn On 6/26/2013 3:07 PM, Marieke van de Nieuwenhuijzen wrote: > Dear Fieldtrippers, > > I am running my analyses on time courses reconstructed in source space. Basically, that means that my working dataset is a matrix of grid point x time. What I want to do now is do some analyses on a subset of that dataset, a bit analogous to selecting some sensors to restrict analyses to. Therefore, what I would ideally want to do, is select a subset of grid points corresponding to a specific location (for example only the occipital grid points, or only the grid points corresponding to a specific atlas label). > > Does anyone have any suggestions about how I should go about selecting specific grid points? Is there perhaps some grid based atlas, or is it possible to select grid points based on their corresponding mni coordinates which you get after running ft_sourceinterpolate and ft_volumenormalise (in other words, is it possible to reverse ft_volumenormalise and ft_sourceinterpolate to map the mni coordinates to the grid points instead of the grid points to mni representation). > > Any pointers would be much appreciated. > > Best, > Marieke > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -- Jörn M. Horschig PhD Student Donders Institute for Brain, Cognition and Behaviour Centre for Cognitive Neuroimaging Radboud University Nijmegen Neuronal Oscillations Group FieldTrip Development Team P.O. Box 9101 NL-6500 HB Nijmegen The Netherlands Contact: E-Mail: jm.horschig at donders.ru.nl Tel: +31-(0)24-36-68493 Web: http://www.ru.nl/donders Visiting address: Trigon, room 2.30 Kapittelweg 29 NL-6525 EN Nijmegen The Netherlands From andmib at gmail.com Wed Jun 26 19:22:33 2013 From: andmib at gmail.com (Andrew Brooks) Date: Wed, 26 Jun 2013 13:22:33 -0400 Subject: [FieldTrip] Siemens GUI Streamer Disconnecting Message-ID: Hello all, I have a protocol that includes three separate sequences. I start the Siemens GUI streamer prior to the first sequence, and keep it open through all three sequences. Only on the last sequence do I run ft_omri_pipeline_nuisance. I've been running into a problem where the Siemens GUI streamer disconnects as soon as the the third sequence starts running (and the ft_omri_pipeline script is waiting for data). I have to manually click 'connect' as soon as it disconnects, and then it works fine. Any ideas as to why the streamer would disconnect like this? Thanks! Andrew -------------- next part -------------- An HTML attachment was scrubbed... URL: From j.herring at fcdonders.ru.nl Thu Jun 27 12:45:53 2013 From: j.herring at fcdonders.ru.nl (Herring, J.D. (Jim)) Date: Thu, 27 Jun 2013 12:45:53 +0200 (CEST) Subject: [FieldTrip] QSUB toolbox on a multi-core computer In-Reply-To: References: Message-ID: <004701ce7323$7fa9ff20$7efdfd60$@herring@fcdonders.ru.nl> Dear Graham, As stated in the tutorial the distributed computing functions are intended to distribute workload over different computers running a Torque or SGE batch system: "This tutorial covered how to distribute your computations/workload over multiple computers in a cluster that uses the Torque or SGE batch queue system". However, what you could do is make use of Matlab's parallel processing tools. Matlab allows you to open a pool of so-called 'workers' to distribute processing jobs to allowing you to run multiple processes in parallel. Please see http://www.mathworks.nl/help/distcomp/matlabpool.html and http://www.mathworks.nl/help/matlab/ref/parfor.html. Once you've opened a pool of workers using 'matlabpool', you can use 'parfor' in the same way as you would use 'for' to create a loop that runs all processes in parallel over all four cores. Best, Jim From: fieldtrip-bounces at science.ru.nl [mailto:fieldtrip-bounces at science.ru.nl] On Behalf Of Graham Peyton Sent: woensdag 26 juni 2013 12:14 To: fieldtrip at science.ru.nl Subject: [FieldTrip] QSUB toolbox on a multi-core computer Dear FieldTrip community, I am trying to carry out an MEG analysis using the qsub distributed computing toolbox. I'm using a quad-core i7 computer, and was hoping that I'd be able to distribute the workload over all four cores. I have followed the tutorial below exactly: http://fieldtrip.fcdonders.nl/tutorial/distributedcomputing The problem I am having is this: I managed to run example 1 (with my own dataset), but I am finding that when I use qsubcellfun, the function ft_definetrial is executed sequentially (for each condition), not in parallel. Is there a way I can correct this, so as to parallelize the analysis? Or is the toolbox not designed for multi-core machines? Many thanks, Graham Peyton -------------- next part -------------- An HTML attachment was scrubbed... URL: From ana.hincapie at gmail.com Fri Jun 28 09:31:24 2013 From: ana.hincapie at gmail.com (=?ISO-8859-1?Q?Ana_Sof=EDa_Hincapi=E9_Casas?=) Date: Fri, 28 Jun 2013 09:31:24 +0200 Subject: [FieldTrip] In the forward problem, how are the points for the grid.inside and grid.outside defined? Message-ID: Hi, I´am new in FieldTrip and I would like to what are the grid.inside and grid.outside points and if I could used the whole grid to calculate the leadfields. Thanks in advance for the help you could bring me. Regards, -- Ana Hincapié -------------- next part -------------- An HTML attachment was scrubbed... URL: From jm.horschig at donders.ru.nl Fri Jun 28 10:42:03 2013 From: jm.horschig at donders.ru.nl (=?ISO-8859-1?Q?=22J=F6rn_M=2E_Horschig=22?=) Date: Fri, 28 Jun 2013 10:42:03 +0200 Subject: [FieldTrip] In the forward problem, how are the points for the grid.inside and grid.outside defined? In-Reply-To: References: Message-ID: <51CD4C5B.5030909@donders.ru.nl> Hi Ana, inside and outside just describe whether the grid point is inside or outside the brain. You can plot this to see for yourself: % plot only what is inside the brain figure; ft_plot_vol(vol, 'edgecolor', 'none'); alpha 0.4; ft_plot_mesh(grid.pos(grid.inside,:)); % plot the whole grid figure; ft_plot_vol(vol, 'edgecolor', 'none'); alpha 0.4; ft_plot_mesh(grid.pos(:,:)); FieldTrip will use that information automatically to only use grid points inside the brain, so yes, you can use the whole grid to compute the leadfield matrix. If you do not want that, you can modify grid.inside and grid.outside yourself. Have fun fieldtrippin' :) Jörn On 6/28/2013 9:31 AM, Ana Sofía Hincapié Casas wrote: > Hi, > > I´am new in FieldTrip and I would like to what are the grid.inside and > grid.outside points and if I could used the whole grid to calculate > the leadfields. > > Thanks in advance for the help you could bring me. > > Regards, > > -- > Ana Hincapié > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -- Jörn M. Horschig PhD Student Donders Institute for Brain, Cognition and Behaviour Centre for Cognitive Neuroimaging Radboud University Nijmegen Neuronal Oscillations Group FieldTrip Development Team P.O. Box 9101 NL-6500 HB Nijmegen The Netherlands Contact: E-Mail: jm.horschig at donders.ru.nl Tel: +31-(0)24-36-68493 Web: http://www.ru.nl/donders Visiting address: Trigon, room 2.30 Kapittelweg 29 NL-6525 EN Nijmegen The Netherlands -------------- next part -------------- An HTML attachment was scrubbed... URL: From ggonesc at upo.es Fri Jun 28 18:28:57 2013 From: ggonesc at upo.es (Gabriel Gonzalez Escamilla) Date: Fri, 28 Jun 2013 18:28:57 +0200 Subject: [FieldTrip] problem appending data Message-ID: <2350c7b9464ea50a.51cdd5e9@upo.es> Dear Fieldtrip experts, I'm working with restin-state EEG data, I'm looking for performing EEG coherence analysis between my normal EEG channels and a channel from the same subject but aquired with a different name I did: data = ft_appenddata([], dataEEG_allchans, dataEEG_1chan) and it did concatenate the one single channel at the end of the dataEEG_allchans, so now I have a matrix with Nchans+1, that looks perfect to me, then I did perform fourier transformations with a hanning window, and workded perfectly, but if I set cfg.method='coh' cfg.complex='imag' cfg.channelcbm={'all', 'ref-P7'} icohe=ft_connectovityanalysis(cfg,) I always get the following error: ???? attempted to access siz(4); index out of bounds because numel(siz=3) Error in ==> ft_checkdata>fixcsd at 798 I have also tried something like: cfg.channelcbm={{1x40cell}, 'ref-P7'} where {1x40 cell} is a cell matrix containing the names of all my sensors but it didn't worked. Any help will be appreciated Many thanks in advanced, Gabriel -------------- next part -------------- An HTML attachment was scrubbed... URL: From manuel.mercier at einstein.yu.edu Fri Jun 28 22:43:54 2013 From: manuel.mercier at einstein.yu.edu (Manuel Mercier) Date: Fri, 28 Jun 2013 20:43:54 +0000 Subject: [FieldTrip] PLV formula Message-ID: Dear Fieldtripers Sometime ago I wrote for myself a function that was computing PLV and some related non parametric statistics. (Phase Locking Value as define as the mean across trials of the phase angle difference recorded at two loci ; based on Lachaux et al., 1999, HBM). I implemented PLV in matlab using the following formula: plv = squeeze(abs(mean(exp(1i*(angle(data.fourierspctrm(:,cmb(1),:,:)) ... -angle(data.fourierspctrm(:,cmb(2),:,:)))),1))); with cmb(1) and cmb(2) being the indices of the electrodes of interest (between which PLV is computed). I compared my results with the ft_connectivityanalysis function from Fieldtrip and the results were exactly the same. So far so good. But I recently went back to my code, and I was a little bit confused. Since I was dealing with angles, I though that the best way to do the subtraction should be done in the complex plane Like: plv = squeeze(abs(mean(exp(1i*(angle(exp(1i*(angle(data.fourierspctrm(:,cmb(1),:,:)))) ... - exp(1i*(angle(data.fourierspctrm(:,cmb(2),:,:))))))),1))); (for instance if the two angles: pi/2 and -pi/2 the direct subtraction will give pi, whereas in the complex plan it will be pi/2 - with the norm x2). The result I got with this code is obviously different from the previous one, and what I got from Fieldtrip. I went back to the archive of the mailing list but didn't find a clear answer to my point. Does anyone can enlighten me ? Thanks ! Manuel -------------- next part -------------- An HTML attachment was scrubbed... URL: