From b.reuderink at donders.ru.nl Mon Jan 2 16:27:26 2012 From: b.reuderink at donders.ru.nl (Boris Reuderink) Date: Mon, 2 Jan 2012 16:27:26 +0100 Subject: [FieldTrip] Problem detecting triggers with real time synchronous analysis In-Reply-To: <29E38593-B980-47D1-9E86-E197EF62994E@adamcsnyder.com> References: <29E38593-B980-47D1-9E86-E197EF62994E@adamcsnyder.com> Message-ID: Dear Adam, I took a look at the code for ft_realtime_synchronous, and I have to say I can't see why it should not work with the config you provided. I would like to localize the problem; specifically, I would like to know if it 1) occurs before the data is put in the buffer (i.e. biosemi2ft), or 2) after it is read from the buffer --- assuming it does not happen in the buffer. Could perhaps send me output of biosemi2ft containing the messages regarding the triggers? Even better would be file-dump of the buffer using http://fieldtrip.fcdonders.nl/development/realtime#recording_and_playing_back_online_experiments . @Marcel, is appears you wrote ft_realtime_synchronous. Do you have any clue? Best regards, Boris On Tue, Dec 20, 2011 at 4:54 AM, Adam C. Snyder wrote: > Hello, >     I'm trying to perform a real time synchronous analysis in response to a particular trigger, but it isn't working. Here are some brief details of the setup: we're using BioSemi ActiveTwo, a December 2011 version of FieldTrip and MATLAB 2010b. >     I've managed to get the biosemi2ft executable running, and if I send a trigger through the BioSemi system, the details are noted in the command window. However, within the ft_realtime_synchronous function, the trigger events are not being found. The built-in status updates (e.g., "CMS_IN_RANGE", etc.), in contrast, are picked up by the ft_read_event call within ft_realtime_synchronous function, which adds to my confusion. >     My configurations are something like these: > >          cfg.dataset = 'buffer://localhost:1972'; >          cfg.bcifun = @hello_world; >          cfg.blocksize = 1; >          cfg.trigger = [4 2]; >          cfg.jumptoeof = 'yes'; >          cfg.bufferdata = 'last'; %maybe the name of this option was different -- I'm typing from memory > >     I hope someone can kindly help me to figure this out, and thank you in advance for whatever help you can provide. > > In Science, > > Adam C. Snyder > > Postdoctoral Fellow > Cognitive Neurophysiology Lab > Albert Einstein College of Medicine > Bronx, NY > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip From lavado at gmail.com Mon Jan 2 17:11:51 2012 From: lavado at gmail.com (Ion Lavado) Date: Mon, 2 Jan 2012 17:11:51 +0100 Subject: [FieldTrip] ft_headmodelplot coordinate system origin problem Message-ID: Hello, i'm working with MEG data from Elekta Neuromag. My problem comes when i try to plot the headmodel with the function ft_headmodelplot(cfg). This should plot the head model(volume) + brain grid + sensors. As you can see in the adjunted image, my head volume and grid is not centered and part of the head could not be read by the sensors. Is it possible to modify this so i can center the head in the sensors(helmet)? Thank you very much. Ion Lavado -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: headmodelplot.jpg Type: image/jpeg Size: 18720 bytes Desc: not available URL: From jan.schoffelen at donders.ru.nl Mon Jan 2 17:27:07 2012 From: jan.schoffelen at donders.ru.nl (jan-mathijs schoffelen) Date: Mon, 2 Jan 2012 17:27:07 +0100 Subject: [FieldTrip] ft_headmodelplot coordinate system origin problem In-Reply-To: References: Message-ID: Dear Ion, Are you sure that the sensor positions are defined in the same coordinate system as are the volume conductor model and the source positions? If not, then this is the likely cause of the shift. You can have a look here for more information about the different coordinate systems: http://fieldtrip.fcdonders.nl/faq/how_are_the_different_head_and_mri_coordinate_systems_defined In order to coregister the anatomical mri to the sensor array, you can use ft_volumerealign. Best wishes, Jan-Mathijs On Jan 2, 2012, at 5:11 PM, Ion Lavado wrote: > Hello, i'm working with MEG data from Elekta Neuromag. My problem comes when i try to plot the headmodel with the function ft_headmodelplot(cfg). This should plot the head model(volume) + brain grid + sensors. As you can see in the adjunted image, my head volume and grid is not centered and part of the head could not be read by the sensors. Is it possible to modify this so i can center the head in the sensors(helmet)? > Thank you very much. > > Ion Lavado > _______________________________________________ > 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 -------------- next part -------------- An HTML attachment was scrubbed... URL: From adam at adamcsnyder.com Mon Jan 2 18:48:16 2012 From: adam at adamcsnyder.com (Adam C. Snyder) Date: Mon, 02 Jan 2012 12:48:16 -0500 Subject: [FieldTrip] fieldtrip Digest, Vol 14, Issue 2 In-Reply-To: References: Message-ID: <4F01EDE0.6040900@adamcsnyder.com> Dear Boris, I just wanted to thank you for helping me with this issue. I will gather together the information you requested when I get back to the lab after the New Year's holiday and let you know. Many thanks again! -Adam On 02-Jan-2012 11:12, fieldtrip-request at donders.ru.nl wrote: > Message: 1 > Date: Mon, 2 Jan 2012 16:27:26 +0100 > From: Boris Reuderink > To: Email discussion list for the FieldTrip project > > Cc: "m.vangerven" > Subject: Re: [FieldTrip] Problem detecting triggers with real time > synchronous analysis > Message-ID: > > Content-Type: text/plain; charset=ISO-8859-1 > > Dear Adam, > > I took a look at the code for ft_realtime_synchronous, and I have to > say I can't see why it should not work with the config you provided. I > would like to localize the problem; specifically, I would like to know > if it 1) occurs before the data is put in the buffer (i.e. > biosemi2ft), or 2) after it is read from the buffer --- assuming it > does not happen in the buffer. > > Could perhaps send me output of biosemi2ft containing the messages > regarding the triggers? Even better would be file-dump of the buffer > using http://fieldtrip.fcdonders.nl/development/realtime#recording_and_playing_back_online_experiments > . > > @Marcel, is appears you wrote ft_realtime_synchronous. Do you have any clue? > > Best regards, > > Boris > > On Tue, Dec 20, 2011 at 4:54 AM, Adam C. Snyder wrote: >> Hello, >> ? ? I'm trying to perform a real time synchronous analysis in response to a particular trigger, but it isn't working. Here are some brief details of the setup: we're using BioSemi ActiveTwo, a December 2011 version of FieldTrip and MATLAB 2010b. >> ? ? I've managed to get the biosemi2ft executable running, and if I send a trigger through the BioSemi system, the details are noted in the command window. However, within the ft_realtime_synchronous function, the trigger events are not being found. The built-in status updates (e.g., "CMS_IN_RANGE", etc.), in contrast, are picked up by the ft_read_event call within ft_realtime_synchronous function, which adds to my confusion. >> ? ? My configurations are something like these: >> >> ? ? ? ? ?cfg.dataset = 'buffer://localhost:1972'; >> ? ? ? ? ?cfg.bcifun = @hello_world; >> ? ? ? ? ?cfg.blocksize = 1; >> ? ? ? ? ?cfg.trigger = [4 2]; >> ? ? ? ? ?cfg.jumptoeof = 'yes'; >> ? ? ? ? ?cfg.bufferdata = 'last'; %maybe the name of this option was different -- I'm typing from memory >> >> ? ? I hope someone can kindly help me to figure this out, and thank you in advance for whatever help you can provide. >> >> In Science, >> >> Adam C. Snyder >> >> Postdoctoral Fellow >> Cognitive Neurophysiology Lab >> Albert Einstein College of Medicine >> Bronx, NY >> _______________________________________________ >> fieldtrip mailing list >> fieldtrip at donders.ru.nl >> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip From lavado at gmail.com Tue Jan 3 11:38:25 2012 From: lavado at gmail.com (Ion Lavado) Date: Tue, 3 Jan 2012 11:38:25 +0100 Subject: [FieldTrip] ft_headmodelplot coordinate system origin problem In-Reply-To: References: Message-ID: Thank you for your help Jan. I tried all you told but i continue with my problem. The coordinates for the head (volume) and mri are the same, with the function ft_determine_coordsys i see this. I think that the problem is about the sensor (helmet) origin of coordinates. Please see the images i adjunt here,* the sensors origin is very low*(nearly out of the helmet) and when ploting everything i suppose that every origin align to each other, so that the brain comes a little bit low. Best whishes, Ion 2012/1/2 jan-mathijs schoffelen > Dear Ion, > > Are you sure that the sensor positions are defined in the same coordinate > system as are the volume conductor model and the source positions? If not, > then this is the likely cause of the shift. You can have a look here for > more information about the different coordinate systems: > http://fieldtrip.fcdonders.nl/faq/how_are_the_different_head_and_mri_coordinate_systems_defined > > In order to coregister the anatomical mri to the sensor array, you can use > ft_volumerealign. > > Best wishes, > > Jan-Mathijs > > > On Jan 2, 2012, at 5:11 PM, Ion Lavado wrote: > > Hello, i'm working with MEG data from Elekta Neuromag. My problem comes > when i try to plot the headmodel with the function ft_headmodelplot(cfg). > This should plot the head model(volume) + brain grid + sensors. As you can > see in the adjunted image, my head volume and grid is not centered and part > of the head could not be read by the sensors. Is it possible to modify this > so i can center the head in the sensors(helmet)? > Thank you very much. > > Ion Lavado > _______________________________________________ > 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 > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: helmet.jpg Type: image/jpeg Size: 15093 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: vol.jpg Type: image/jpeg Size: 19456 bytes Desc: not available URL: From jan.schoffelen at donders.ru.nl Tue Jan 3 11:50:27 2012 From: jan.schoffelen at donders.ru.nl (jan-mathijs schoffelen) Date: Tue, 3 Jan 2012 11:50:27 +0100 Subject: [FieldTrip] ft_headmodelplot coordinate system origin problem In-Reply-To: References: Message-ID: <321B871E-53E2-43D8-B397-EA9C73C8B32C@donders.ru.nl> Hi Ion, What is the coordinate system in which the vol and mri are defined? To me it does not look like the neuromag coordinate system, but rather like MNI-space. I would expect the origin to be a bit (~4 cm) lower and a bit more anterior (because the origin is defined on the line going through the pre-auricular points. In the 'vol.jpg' it seems that the origin is in the anterior commissure. Although in principle it shouldn't matter, it is convention to express the coordinates in the MEG-system's coordinate system, i.e. in neuromag space in this case. Therefore I would say that the vol and grid variables need to be adjusted, rather than the sensor positions. As mentioned in my previoius message, this can be achieved by coregistering the anatomy to the neuromag coordinate system using ft_volumerealign. You need to manually identify the locations of the fiducials that define the coordinate system, i.e. the nasion, lpa and rpa. The required cfg is: cfg.interactive = 'yes', cfg.coordsys = 'neuromag'. Once the anatomy is coregistered you can proceed with creating the vol and grid variables. Best, Jan-Mathijs On Jan 3, 2012, at 11:38 AM, Ion Lavado wrote: > Thank you for your help Jan. I tried all you told but i continue with my problem. The coordinates for the head (volume) and mri are the same, with the function ft_determine_coordsys i see this. > I think that the problem is about the sensor (helmet) origin of coordinates. Please see the images i adjunt here, the sensors origin is very low(nearly out of the helmet) and when ploting everything i suppose that every origin align to each other, so that the brain comes a little bit low. > > Best whishes, > > Ion > > 2012/1/2 jan-mathijs schoffelen > Dear Ion, > > Are you sure that the sensor positions are defined in the same coordinate system as are the volume conductor model and the source positions? If not, then this is the likely cause of the shift. You can have a look here for more information about the different coordinate systems: http://fieldtrip.fcdonders.nl/faq/how_are_the_different_head_and_mri_coordinate_systems_defined > > In order to coregister the anatomical mri to the sensor array, you can use ft_volumerealign. > > Best wishes, > > Jan-Mathijs > > > On Jan 2, 2012, at 5:11 PM, Ion Lavado wrote: > >> Hello, i'm working with MEG data from Elekta Neuromag. My problem comes when i try to plot the headmodel with the function ft_headmodelplot(cfg). This should plot the head model(volume) + brain grid + sensors. As you can see in the adjunted image, my head volume and grid is not centered and part of the head could not be read by the sensors. Is it possible to modify this so i can center the head in the sensors(helmet)? >> Thank you very much. >> >> Ion Lavado >> _______________________________________________ >> 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 > > > _______________________________________________ > 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 -------------- next part -------------- An HTML attachment was scrubbed... URL: From lavado at gmail.com Tue Jan 3 12:45:53 2012 From: lavado at gmail.com (Ion Lavado) Date: Tue, 3 Jan 2012 12:45:53 +0100 Subject: [FieldTrip] ft_headmodelplot coordinate system origin problem In-Reply-To: <321B871E-53E2-43D8-B397-EA9C73C8B32C@donders.ru.nl> References: <321B871E-53E2-43D8-B397-EA9C73C8B32C@donders.ru.nl> Message-ID: Hi Jan, I am sorry, I have been trying with your method but now what is incorrect is the segmentation. Here is the script. Maybe you understand better the problem...I am getting crazy. The problem comes from line 53 Thank you very much, Best, Ion 2012/1/3 jan-mathijs schoffelen > Hi Ion, > > What is the coordinate system in which the vol and mri are defined? To me > it does not look like the neuromag coordinate system, but rather like > MNI-space. I would expect the origin to be a bit (~4 cm) lower and a bit > more anterior (because the origin is defined on the line going through the > pre-auricular points. In the 'vol.jpg' it seems that the origin is in the > anterior commissure. Although in principle it shouldn't matter, it is > convention to express the coordinates in the MEG-system's coordinate > system, i.e. in neuromag space in this case. Therefore I would say that the > vol and grid variables need to be adjusted, rather than the sensor > positions. As mentioned in my previoius message, this can be achieved by > coregistering the anatomy to the neuromag coordinate system using > ft_volumerealign. You need to manually identify the locations of the > fiducials that define the coordinate system, i.e. the nasion, lpa and rpa. > The required cfg is: cfg.interactive = 'yes', cfg.coordsys = 'neuromag'. > Once the anatomy is coregistered you can proceed with creating the vol and > grid variables. > > Best, > > Jan-Mathijs > > > On Jan 3, 2012, at 11:38 AM, Ion Lavado wrote: > > Thank you for your help Jan. I tried all you told but i continue with my > problem. The coordinates for the head (volume) and mri are the same, with > the function ft_determine_coordsys i see this. > I think that the problem is about the sensor (helmet) origin of > coordinates. Please see the images i adjunt here,* the sensors origin is > very low*(nearly out of the helmet) and when ploting everything i suppose > that every origin align to each other, so that the brain comes a little bit > low. > > Best whishes, > > Ion > > 2012/1/2 jan-mathijs schoffelen > >> Dear Ion, >> >> Are you sure that the sensor positions are defined in the same coordinate >> system as are the volume conductor model and the source positions? If not, >> then this is the likely cause of the shift. You can have a look here for >> more information about the different coordinate systems: >> http://fieldtrip.fcdonders.nl/faq/how_are_the_different_head_and_mri_coordinate_systems_defined >> >> In order to coregister the anatomical mri to the sensor array, you can >> use ft_volumerealign. >> >> Best wishes, >> >> Jan-Mathijs >> >> >> On Jan 2, 2012, at 5:11 PM, Ion Lavado wrote: >> >> Hello, i'm working with MEG data from Elekta Neuromag. My problem comes >> when i try to plot the headmodel with the function ft_headmodelplot(cfg). >> This should plot the head model(volume) + brain grid + sensors. As you can >> see in the adjunted image, my head volume and grid is not centered and part >> of the head could not be read by the sensors. Is it possible to modify this >> so i can center the head in the sensors(helmet)? >> Thank you very much. >> >> Ion Lavado >> _______________________________________________ >> 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 >> >> >> _______________________________________________ >> 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 > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: script.m Type: application/octet-stream Size: 3977 bytes Desc: not available URL: From jan.schoffelen at donders.ru.nl Tue Jan 3 12:57:27 2012 From: jan.schoffelen at donders.ru.nl (jan-mathijs schoffelen) Date: Tue, 3 Jan 2012 12:57:27 +0100 Subject: [FieldTrip] ft_headmodelplot coordinate system origin problem In-Reply-To: References: <321B871E-53E2-43D8-B397-EA9C73C8B32C@donders.ru.nl> Message-ID: <76760214-3081-465C-8AFB-3E3A52A53C24@donders.ru.nl> Hi Ion, I'd suggest first to have a look at mri_real. How does it look in ft_determine_coordsys? In particular, is the z-axis pointing in the correct direction? JM On Jan 3, 2012, at 12:45 PM, Ion Lavado wrote: > Hi Jan, > I am sorry, I have been trying with your method but now what is incorrect is the segmentation. > Here is the script. Maybe you understand better the problem...I am getting crazy. The problem comes from line 53 > Thank you very much, > Best, > Ion > > > > 2012/1/3 jan-mathijs schoffelen > Hi Ion, > > What is the coordinate system in which the vol and mri are defined? To me it does not look like the neuromag coordinate system, but rather like MNI-space. I would expect the origin to be a bit (~4 cm) lower and a bit more anterior (because the origin is defined on the line going through the pre-auricular points. In the 'vol.jpg' it seems that the origin is in the anterior commissure. Although in principle it shouldn't matter, it is convention to express the coordinates in the MEG-system's coordinate system, i.e. in neuromag space in this case. Therefore I would say that the vol and grid variables need to be adjusted, rather than the sensor positions. As mentioned in my previoius message, this can be achieved by coregistering the anatomy to the neuromag coordinate system using ft_volumerealign. You need to manually identify the locations of the fiducials that define the coordinate system, i.e. the nasion, lpa and rpa. The required cfg is: cfg.interactive = 'yes', cfg.coordsys = 'neuromag'. Once the anatomy is coregistered you can proceed with creating the vol and grid variables. > > Best, > > Jan-Mathijs > > > On Jan 3, 2012, at 11:38 AM, Ion Lavado wrote: > >> Thank you for your help Jan. I tried all you told but i continue with my problem. The coordinates for the head (volume) and mri are the same, with the function ft_determine_coordsys i see this. >> I think that the problem is about the sensor (helmet) origin of coordinates. Please see the images i adjunt here, the sensors origin is very low(nearly out of the helmet) and when ploting everything i suppose that every origin align to each other, so that the brain comes a little bit low. >> >> Best whishes, >> >> Ion >> >> 2012/1/2 jan-mathijs schoffelen >> Dear Ion, >> >> Are you sure that the sensor positions are defined in the same coordinate system as are the volume conductor model and the source positions? If not, then this is the likely cause of the shift. You can have a look here for more information about the different coordinate systems: http://fieldtrip.fcdonders.nl/faq/how_are_the_different_head_and_mri_coordinate_systems_defined >> >> In order to coregister the anatomical mri to the sensor array, you can use ft_volumerealign. >> >> Best wishes, >> >> Jan-Mathijs >> >> >> On Jan 2, 2012, at 5:11 PM, Ion Lavado wrote: >> >>> Hello, i'm working with MEG data from Elekta Neuromag. My problem comes when i try to plot the headmodel with the function ft_headmodelplot(cfg). This should plot the head model(volume) + brain grid + sensors. As you can see in the adjunted image, my head volume and grid is not centered and part of the head could not be read by the sensors. Is it possible to modify this so i can center the head in the sensors(helmet)? >>> Thank you very much. >>> >>> Ion Lavado >>> _______________________________________________ >>> 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 >> >> >> _______________________________________________ >> 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 > > > _______________________________________________ > 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 -------------- next part -------------- An HTML attachment was scrubbed... URL: From lavado at gmail.com Tue Jan 3 13:20:09 2012 From: lavado at gmail.com (Ion Lavado) Date: Tue, 3 Jan 2012 13:20:09 +0100 Subject: [FieldTrip] ft_headmodelplot coordinate system origin problem In-Reply-To: <76760214-3081-465C-8AFB-3E3A52A53C24@donders.ru.nl> References: <321B871E-53E2-43D8-B397-EA9C73C8B32C@donders.ru.nl> <76760214-3081-465C-8AFB-3E3A52A53C24@donders.ru.nl> Message-ID: The Z axis is pointing to the oposite direction (inferior), so i have the mri upside down. How can i change this? When Matlab plots the figure it asks me this: The positive x-axis is pointing towards the right The positive y-axis is pointing towards anterior The positive z-axis is pointing towards superior Do you want to change the anatomical labels for the axes [y, N]? I then mark to change the axis and mark the positive z-axis as (i)inferior, but when plotting again is as the begginig... What do i have to do? Thank you very much Jan. 2012/1/3 jan-mathijs schoffelen > Hi Ion, > > I'd suggest first to have a look at mri_real. How does it look in > ft_determine_coordsys? > In particular, is the z-axis pointing in the correct direction? > > JM > > > On Jan 3, 2012, at 12:45 PM, Ion Lavado wrote: > > Hi Jan, > I am sorry, I have been trying with your method but now what is incorrect > is the segmentation. > Here is the script. Maybe you understand better the problem...I am getting > crazy. The problem comes from line 53 > Thank you very much, > Best, > Ion > > > > 2012/1/3 jan-mathijs schoffelen > >> Hi Ion, >> >> What is the coordinate system in which the vol and mri are defined? To me >> it does not look like the neuromag coordinate system, but rather like >> MNI-space. I would expect the origin to be a bit (~4 cm) lower and a bit >> more anterior (because the origin is defined on the line going through the >> pre-auricular points. In the 'vol.jpg' it seems that the origin is in the >> anterior commissure. Although in principle it shouldn't matter, it is >> convention to express the coordinates in the MEG-system's coordinate >> system, i.e. in neuromag space in this case. Therefore I would say that the >> vol and grid variables need to be adjusted, rather than the sensor >> positions. As mentioned in my previoius message, this can be achieved by >> coregistering the anatomy to the neuromag coordinate system using >> ft_volumerealign. You need to manually identify the locations of the >> fiducials that define the coordinate system, i.e. the nasion, lpa and rpa. >> The required cfg is: cfg.interactive = 'yes', cfg.coordsys = 'neuromag'. >> Once the anatomy is coregistered you can proceed with creating the vol and >> grid variables. >> >> Best, >> >> Jan-Mathijs >> >> >> On Jan 3, 2012, at 11:38 AM, Ion Lavado wrote: >> >> Thank you for your help Jan. I tried all you told but i continue with my >> problem. The coordinates for the head (volume) and mri are the same, with >> the function ft_determine_coordsys i see this. >> I think that the problem is about the sensor (helmet) origin of >> coordinates. Please see the images i adjunt here,* the sensors origin is >> very low*(nearly out of the helmet) and when ploting everything i >> suppose that every origin align to each other, so that the brain comes a >> little bit low. >> >> Best whishes, >> >> Ion >> >> 2012/1/2 jan-mathijs schoffelen >> >>> Dear Ion, >>> >>> Are you sure that the sensor positions are defined in the same >>> coordinate system as are the volume conductor model and the source >>> positions? If not, then this is the likely cause of the shift. You can have >>> a look here for more information about the different coordinate systems: >>> http://fieldtrip.fcdonders.nl/faq/how_are_the_different_head_and_mri_coordinate_systems_defined >>> >>> In order to coregister the anatomical mri to the sensor array, you can >>> use ft_volumerealign. >>> >>> Best wishes, >>> >>> Jan-Mathijs >>> >>> >>> On Jan 2, 2012, at 5:11 PM, Ion Lavado wrote: >>> >>> Hello, i'm working with MEG data from Elekta Neuromag. My problem comes >>> when i try to plot the headmodel with the function ft_headmodelplot(cfg). >>> This should plot the head model(volume) + brain grid + sensors. As you can >>> see in the adjunted image, my head volume and grid is not centered and part >>> of the head could not be read by the sensors. Is it possible to modify this >>> so i can center the head in the sensors(helmet)? >>> Thank you very much. >>> >>> Ion Lavado >>> _______________________________________________ >>> 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 >>> >>> >>> _______________________________________________ >>> 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 >> >> >> _______________________________________________ >> 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 > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > -------------- next part -------------- An HTML attachment was scrubbed... URL: From jan.schoffelen at donders.ru.nl Tue Jan 3 13:37:56 2012 From: jan.schoffelen at donders.ru.nl (jan-mathijs schoffelen) Date: Tue, 3 Jan 2012 13:37:56 +0100 Subject: [FieldTrip] ft_headmodelplot coordinate system origin problem In-Reply-To: References: <321B871E-53E2-43D8-B397-EA9C73C8B32C@donders.ru.nl> <76760214-3081-465C-8AFB-3E3A52A53C24@donders.ru.nl> Message-ID: <1F5462DE-0087-4F8A-AD1B-62B2A334E5FF@donders.ru.nl> Hi Ion, If the positive z-axis (denoted by +Z in the figure that is created by ft_determine_coordsys) is not pointing to the top of the head you made an error in ft_volumerealign and probably exchanged left with right in setting the lpa and rpa locations. This results in the coordinate system being a left-handed one and causes all kind of trouble later on. If this is the case, you need to repeat ft_volumerealign (with the original MRI) and type 'l' where you typed 'r', and the other way around. Ft_volumesegment relies on spm for the segmentation, which relies on the mri-data being defined in a meaningful right-handed coordinate system (which can be either mni-based, or MEG system based). If however the +Z is just pointing downward but the anatomy is 'upside-down' (neck pointing to the ceiling) then the coordinate system is a valid, i.e. a right-handed RAS (right-anterior-superior) coordinate system. If this is the case then I wouldn't know what's going on, because I would suspect that ft_volumesegment Perhaps some other neuromag aficionados could jump to the rescue here? As such ft_determine_coordsys does not change the coordinate system of your mri, it just changes the coordsys field, which helps FieldTrip in the interpretation of the real-world coordinates. The mapping of voxel locations to real-world locations is defined by mri.transform which can be changed by ft_volumerealign. Best wishes, JM On Jan 3, 2012, at 1:20 PM, Ion Lavado wrote: > The Z axis is pointing to the oposite direction (inferior), so i have the mri upside down. How can i change this? When Matlab plots the figure it asks me this: > > The positive x-axis is pointing towards the right > The positive y-axis is pointing towards anterior > The positive z-axis is pointing towards superior > Do you want to change the anatomical labels for the axes [y, N]? > > I then mark to change the axis and mark the positive z-axis as (i)inferior, but when plotting again is as the begginig... What do i have to do? > > Thank you very much Jan. > > > > 2012/1/3 jan-mathijs schoffelen > Hi Ion, > > I'd suggest first to have a look at mri_real. How does it look in ft_determine_coordsys? > In particular, is the z-axis pointing in the correct direction? > > JM > > > On Jan 3, 2012, at 12:45 PM, Ion Lavado wrote: > >> Hi Jan, >> I am sorry, I have been trying with your method but now what is incorrect is the segmentation. >> Here is the script. Maybe you understand better the problem...I am getting crazy. The problem comes from line 53 >> Thank you very much, >> Best, >> Ion >> >> >> >> 2012/1/3 jan-mathijs schoffelen >> Hi Ion, >> >> What is the coordinate system in which the vol and mri are defined? To me it does not look like the neuromag coordinate system, but rather like MNI-space. I would expect the origin to be a bit (~4 cm) lower and a bit more anterior (because the origin is defined on the line going through the pre-auricular points. In the 'vol.jpg' it seems that the origin is in the anterior commissure. Although in principle it shouldn't matter, it is convention to express the coordinates in the MEG-system's coordinate system, i.e. in neuromag space in this case. Therefore I would say that the vol and grid variables need to be adjusted, rather than the sensor positions. As mentioned in my previoius message, this can be achieved by coregistering the anatomy to the neuromag coordinate system using ft_volumerealign. You need to manually identify the locations of the fiducials that define the coordinate system, i.e. the nasion, lpa and rpa. The required cfg is: cfg.interactive = 'yes', cfg.coordsys = 'neuromag'. Once the anatomy is coregistered you can proceed with creating the vol and grid variables. >> >> Best, >> >> Jan-Mathijs >> >> >> On Jan 3, 2012, at 11:38 AM, Ion Lavado wrote: >> >>> Thank you for your help Jan. I tried all you told but i continue with my problem. The coordinates for the head (volume) and mri are the same, with the function ft_determine_coordsys i see this. >>> I think that the problem is about the sensor (helmet) origin of coordinates. Please see the images i adjunt here, the sensors origin is very low(nearly out of the helmet) and when ploting everything i suppose that every origin align to each other, so that the brain comes a little bit low. >>> >>> Best whishes, >>> >>> Ion >>> >>> 2012/1/2 jan-mathijs schoffelen >>> Dear Ion, >>> >>> Are you sure that the sensor positions are defined in the same coordinate system as are the volume conductor model and the source positions? If not, then this is the likely cause of the shift. You can have a look here for more information about the different coordinate systems: http://fieldtrip.fcdonders.nl/faq/how_are_the_different_head_and_mri_coordinate_systems_defined >>> >>> In order to coregister the anatomical mri to the sensor array, you can use ft_volumerealign. >>> >>> Best wishes, >>> >>> Jan-Mathijs >>> >>> >>> On Jan 2, 2012, at 5:11 PM, Ion Lavado wrote: >>> >>>> Hello, i'm working with MEG data from Elekta Neuromag. My problem comes when i try to plot the headmodel with the function ft_headmodelplot(cfg). This should plot the head model(volume) + brain grid + sensors. As you can see in the adjunted image, my head volume and grid is not centered and part of the head could not be read by the sensors. Is it possible to modify this so i can center the head in the sensors(helmet)? >>>> Thank you very much. >>>> >>>> Ion Lavado >>>> _______________________________________________ >>>> 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 >>> >>> >>> _______________________________________________ >>> 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 >> >> >> _______________________________________________ >> 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 > > > _______________________________________________ > 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 -------------- next part -------------- An HTML attachment was scrubbed... URL: From lavado at gmail.com Tue Jan 3 14:22:34 2012 From: lavado at gmail.com (Ion Lavado) Date: Tue, 3 Jan 2012 14:22:34 +0100 Subject: [FieldTrip] ft_headmodelplot coordinate system origin problem In-Reply-To: <1F5462DE-0087-4F8A-AD1B-62B2A334E5FF@donders.ru.nl> References: <321B871E-53E2-43D8-B397-EA9C73C8B32C@donders.ru.nl> <76760214-3081-465C-8AFB-3E3A52A53C24@donders.ru.nl> <1F5462DE-0087-4F8A-AD1B-62B2A334E5FF@donders.ru.nl> Message-ID: Thank you very much Jan! Now everything fits using ft_headmodelplot(cfg). You solved our problem of the week. Just one final problem we have: - we are doing the beamformig source analisys. - our vol, grid and grad fits ok. -we have the sourcePre = ft_sourceanalysis(cfg, freqPre); sourcePost = ft_sourceanalysis(cfg, freqPost); -we then interpolate the data with cfg = []; cfg.downsample = 2; sourcePostInt = ft_sourceinterpolate(cfg, sourcePost , mri_real); - finally we use method SLICE to plot the results: (WITH MRI_REAL) %METHOD SLICE: sourceDiff = sourcePost; sourceDiff.avg.pow = (sourcePost.avg.pow - sourcePre.avg.pow) ./ sourcePre.avg.pow; cfg = [] cfg.downsample = 2; sourceDiffInt = ft_sourceinterpolate(cfg, sourceDiff , mri_real); cfg = []; cfg.method = 'slice'; cfg.interactive = 'yes'; cfg.funparameter = 'avg.pow'; cfg.maskparameter = cfg.funparameter; cfg.funcolorlim = [0 2]; cfg.opacitylim = [0 2]; cfg.opacitymap = 'rampup'; figure('Name', 'SLICE Method') ft_sourceplot(cfg, sourceDiffInt); The problem comes now (not before), that when plotting the result don't fit the mri in the figure. I send you the .jpg so you can see it and try to help us whith this FINAL problem! In the script i send you, the problem i think starts after line 156. You are really kind, and thank you very much for your usefull help. Ion 2012/1/3 jan-mathijs schoffelen > Hi Ion, > > If the positive z-axis (denoted by +Z in the figure that is created by > ft_determine_coordsys) is not pointing to the top of the head you made an > error in ft_volumerealign and probably exchanged left with right in setting > the lpa and rpa locations. This results in the coordinate system being a > left-handed one and causes all kind of trouble later on. If this is the > case, you need to repeat ft_volumerealign (with the original MRI) and type > 'l' where you typed 'r', and the other way around. Ft_volumesegment relies > on spm for the segmentation, which relies on the mri-data being defined in > a meaningful right-handed coordinate system (which can be either mni-based, > or MEG system based). > > If however the +Z is just pointing downward but the anatomy is > 'upside-down' (neck pointing to the ceiling) then the coordinate system is > a valid, i.e. a right-handed RAS (right-anterior-superior) coordinate > system. If this is the case then I wouldn't know what's going on, because I > would suspect that ft_volumesegment Perhaps some other neuromag > aficionados could jump to the rescue here? > > As such ft_determine_coordsys does not change the coordinate system of > your mri, it just changes the coordsys field, which helps FieldTrip in the > interpretation of the real-world coordinates. The mapping of voxel > locations to real-world locations is defined by mri.transform which can be > changed by ft_volumerealign. > > Best wishes, > > JM > > > On Jan 3, 2012, at 1:20 PM, Ion Lavado wrote: > > The Z axis is pointing to the oposite direction (inferior), so i have the > mri upside down. How can i change this? When Matlab plots the figure it > asks me this: > > The positive x-axis is pointing towards the right > The positive y-axis is pointing towards anterior > The positive z-axis is pointing towards superior > Do you want to change the anatomical labels for the axes [y, N]? > > I then mark to change the axis and mark the positive z-axis as > (i)inferior, but when plotting again is as the begginig... What do i have > to do? > > Thank you very much Jan. > > > > 2012/1/3 jan-mathijs schoffelen > >> Hi Ion, >> >> I'd suggest first to have a look at mri_real. How does it look in >> ft_determine_coordsys? >> In particular, is the z-axis pointing in the correct direction? >> >> JM >> >> >> On Jan 3, 2012, at 12:45 PM, Ion Lavado wrote: >> >> Hi Jan, >> I am sorry, I have been trying with your method but now what is incorrect >> is the segmentation. >> Here is the script. Maybe you understand better the problem...I am >> getting crazy. The problem comes from line 53 >> Thank you very much, >> Best, >> Ion >> >> >> >> 2012/1/3 jan-mathijs schoffelen >> >>> Hi Ion, >>> >>> What is the coordinate system in which the vol and mri are defined? To >>> me it does not look like the neuromag coordinate system, but rather like >>> MNI-space. I would expect the origin to be a bit (~4 cm) lower and a bit >>> more anterior (because the origin is defined on the line going through the >>> pre-auricular points. In the 'vol.jpg' it seems that the origin is in the >>> anterior commissure. Although in principle it shouldn't matter, it is >>> convention to express the coordinates in the MEG-system's coordinate >>> system, i.e. in neuromag space in this case. Therefore I would say that the >>> vol and grid variables need to be adjusted, rather than the sensor >>> positions. As mentioned in my previoius message, this can be achieved by >>> coregistering the anatomy to the neuromag coordinate system using >>> ft_volumerealign. You need to manually identify the locations of the >>> fiducials that define the coordinate system, i.e. the nasion, lpa and rpa. >>> The required cfg is: cfg.interactive = 'yes', cfg.coordsys = 'neuromag'. >>> Once the anatomy is coregistered you can proceed with creating the vol and >>> grid variables. >>> >>> Best, >>> >>> Jan-Mathijs >>> >>> >>> On Jan 3, 2012, at 11:38 AM, Ion Lavado wrote: >>> >>> Thank you for your help Jan. I tried all you told but i continue with my >>> problem. The coordinates for the head (volume) and mri are the same, with >>> the function ft_determine_coordsys i see this. >>> I think that the problem is about the sensor (helmet) origin of >>> coordinates. Please see the images i adjunt here,* the sensors origin >>> is very low*(nearly out of the helmet) and when ploting everything i >>> suppose that every origin align to each other, so that the brain comes a >>> little bit low. >>> >>> Best whishes, >>> >>> Ion >>> >>> 2012/1/2 jan-mathijs schoffelen >>> >>>> Dear Ion, >>>> >>>> Are you sure that the sensor positions are defined in the same >>>> coordinate system as are the volume conductor model and the source >>>> positions? If not, then this is the likely cause of the shift. You can have >>>> a look here for more information about the different coordinate systems: >>>> http://fieldtrip.fcdonders.nl/faq/how_are_the_different_head_and_mri_coordinate_systems_defined >>>> >>>> In order to coregister the anatomical mri to the sensor array, you can >>>> use ft_volumerealign. >>>> >>>> Best wishes, >>>> >>>> Jan-Mathijs >>>> >>>> >>>> On Jan 2, 2012, at 5:11 PM, Ion Lavado wrote: >>>> >>>> Hello, i'm working with MEG data from Elekta Neuromag. My problem comes >>>> when i try to plot the headmodel with the function ft_headmodelplot(cfg). >>>> This should plot the head model(volume) + brain grid + sensors. As you can >>>> see in the adjunted image, my head volume and grid is not centered and part >>>> of the head could not be read by the sensors. Is it possible to modify this >>>> so i can center the head in the sensors(helmet)? >>>> Thank you very much. >>>> >>>> Ion Lavado >>>> _______________________________________________ >>>> 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 >>>> >>>> >>>> _______________________________________________ >>>> 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 >>> >>> >>> _______________________________________________ >>> 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 >> >> >> _______________________________________________ >> 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 > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: plot.jpg Type: image/jpeg Size: 24158 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: script.m Type: application/octet-stream Size: 5145 bytes Desc: not available URL: From hamzaf at sabanciuniv.edu Wed Jan 4 07:11:33 2012 From: hamzaf at sabanciuniv.edu (Hamza Fawzi Altakroury (Student)) Date: Wed, 4 Jan 2012 08:11:33 +0200 Subject: [FieldTrip] Reading data while biosemi2ft is running Message-ID: Hello, What is the best function for reading data from *.gdf file in Matlab while "biosemi2ft" is running. Best -- Hamza Fawzi Altakroury Graduate student - MA Faculty of Engineering and Natural Sciences Sabancı University -------------- next part -------------- An HTML attachment was scrubbed... URL: From b.reuderink at donders.ru.nl Wed Jan 4 07:54:31 2012 From: b.reuderink at donders.ru.nl (Boris Reuderink) Date: Wed, 4 Jan 2012 07:54:31 +0100 Subject: [FieldTrip] Reading data while biosemi2ft is running In-Reply-To: References: Message-ID: Hi, What exactly are you trying to achieve by reading from the .gdf file being written? Can't you connect the the FieldTrip buffer that captures biosemi2ft's output? Best, Boris On Wed, Jan 4, 2012 at 7:11 AM, Hamza Fawzi Altakroury (Student) wrote: > Hello, > > What is the best function for reading data from *.gdf file in Matlab while > "biosemi2ft" is running. > > Best > > -- > Hamza Fawzi Altakroury > Graduate student - MA > Faculty of Engineering and Natural Sciences > Sabancı University > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip From hamzaf at sabanciuniv.edu Wed Jan 4 08:13:13 2012 From: hamzaf at sabanciuniv.edu (Hamza Fawzi Altakroury (Student)) Date: Wed, 4 Jan 2012 09:13:13 +0200 Subject: [FieldTrip] Reading data while biosemi2ft is running In-Reply-To: References: Message-ID: Hello, I am trying to do online processing, where the biosemi2ft captures the data puts it in a gdf file, and a function in Matlab reads the file continuously and process it. Or do you recommend me to use another way for online processing? Best On Wed, Jan 4, 2012 at 8:54 AM, Boris Reuderink wrote: > Hi, > > What exactly are you trying to achieve by reading from the .gdf file > being written? > Can't you connect the the FieldTrip buffer that > captures biosemi2ft's output? > > Best, > > Boris > > > On Wed, Jan 4, 2012 at 7:11 AM, Hamza Fawzi Altakroury (Student) > wrote: > > Hello, > > > > What is the best function for reading data from *.gdf file in Matlab > while > > "biosemi2ft" is running. > > > > Best > > > > -- > > Hamza Fawzi Altakroury > > Graduate student - MA > > Faculty of Engineering and Natural Sciences > > Sabancı University > > > > _______________________________________________ > > 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 -- Hamza Fawzi Altakroury Graduate student - MA Faculty of Engineering and Natural Sciences Sabancı University -------------- next part -------------- An HTML attachment was scrubbed... URL: From b.reuderink at donders.ru.nl Wed Jan 4 12:13:07 2012 From: b.reuderink at donders.ru.nl (Boris Reuderink) Date: Wed, 4 Jan 2012 12:13:07 +0100 Subject: [FieldTrip] Reading data while biosemi2ft is running In-Reply-To: References: Message-ID: Then I would definitely recommend to read form the buffer, and not from a file that is being written to disk. Maybe you can find some pointers on this wiki page: http://fieldtrip.fcdonders.nl/getting_started/realtime ? Best regards, Boris On Wed, Jan 4, 2012 at 8:13 AM, Hamza Fawzi Altakroury (Student) wrote: > Hello, > > I am trying to do online processing, where the biosemi2ft captures the data > puts it in a gdf file, and a function in Matlab reads the file continuously > and process it. > > Or do you recommend me to use another way for online processing? > > Best > > > On Wed, Jan 4, 2012 at 8:54 AM, Boris Reuderink > wrote: >> >> Hi, >> >> What exactly are you trying to achieve by reading from the .gdf file >> being written? > > >> >> Can't you connect the the FieldTrip buffer that >> captures biosemi2ft's output? >> >> Best, >> >> Boris >> >> >> On Wed, Jan 4, 2012 at 7:11 AM, Hamza Fawzi Altakroury (Student) >> wrote: >> > Hello, >> > >> > What is the best function for reading data from *.gdf file in Matlab >> > while >> > "biosemi2ft" is running. >> > >> > Best >> > >> > -- >> > Hamza Fawzi Altakroury >> > Graduate student - MA >> > Faculty of Engineering and Natural Sciences >> > Sabancı University >> > >> > _______________________________________________ >> > 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 > > > > > -- > Hamza Fawzi Altakroury > Graduate student - MA > Faculty of Engineering and Natural Sciences > Sabancı University > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip From lihqih at gmail.com Wed Jan 4 16:52:30 2012 From: lihqih at gmail.com (qi li) Date: Wed, 4 Jan 2012 10:52:30 -0500 Subject: [FieldTrip] artifact rejection Message-ID: Hi, I am confused about the plot of the z-score and 'most contribute' channel trial plot in the automatic artifact rejection tutorial. The z-score formula provided in the tutorial is linear to the time course of a particular channel of a specific trial, but the two plots don't look alike. ICA in the tutorial only applies to ECG, can it be applied to remove eye blink and other known artifacts instead of rejecting trials. Thanks! Qi -------------- next part -------------- An HTML attachment was scrubbed... URL: From jm.horschig at donders.ru.nl Thu Jan 5 09:20:25 2012 From: jm.horschig at donders.ru.nl (=?ISO-8859-1?Q?=22J=F6rn_M=2E_Horschig=22?=) Date: Thu, 05 Jan 2012 09:20:25 +0100 Subject: [FieldTrip] artifact rejection In-Reply-To: References: Message-ID: <4F055D49.4020401@donders.ru.nl> Dear Qi, Though I am not sure to what z-score formula you are referring to, I guess you are talking about the 'summary' mode of ft_rejectvisual. Z-scores are computed in different ways here, once across channels and once across time, leading to two different plots. The third plot is an accumulated plot of these two, where colors indicate the strength of the selected measure (e.g. z-score). Thus, in terms of the z-score formula, it is once computed with the average and standard deviation across the time-dimension per channel and once across the channel-dimension per time bin. I hope this clarifies why the two plots don't show the same. ICA can also be applied to eye blinks, for which an example is given in the "Walkthrough" http://fieldtrip.fcdonders.nl/walkthrough#using_ica_for_eye_artifact_removal And of course, ICA can be used for anything else you believe in (e.g. look for papers by Makeig) Best, Jörn On 1/4/2012 4:52 PM, qi li wrote: > Hi, > > I am confused about the plot of the z-score and 'most contribute' > channel trial plot in the automatic artifact rejection tutorial. The > z-score formula provided in the tutorial is linear to the time course > of a particular channel of a specific trial, but the two plots don't > look alike. > > ICA in the tutorial only applies to ECG, can it be applied to remove > eye blink and other known artifacts instead of rejecting trials. > > Thanks! > > Qi > > > > > _______________________________________________ > 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 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 b.reuderink at donders.ru.nl Thu Jan 5 12:19:29 2012 From: b.reuderink at donders.ru.nl (Boris Reuderink) Date: Thu, 5 Jan 2012 12:19:29 +0100 Subject: [FieldTrip] Trigger values in data matrix In-Reply-To: References: Message-ID: Dear Hamza, Could you elaborate on what you mean here? Could you perhaps provide some context, and a minimal working example? Best, Boris On Sunday, December 25, 2011, Hamza Fawzi Altakroury (Student) wrote: > Hello, > > I can't get the real trigger values if use sopen function (or > ft_read_data), even after adding the min value -1.7281e+009 to get a > positive values. > > Note: I plotted the triggers and their proportion is right but I can't get > their exact values, what should I do. > > Best, > > -- > Hamza Fawzi Altakroury > Graduate student - MA > Faculty of Engineering and Natural Sciences > Sabancı University > -------------- next part -------------- An HTML attachment was scrubbed... URL: From jan.schoffelen at donders.ru.nl Thu Jan 5 12:36:05 2012 From: jan.schoffelen at donders.ru.nl (jan-mathijs schoffelen) Date: Thu, 5 Jan 2012 12:36:05 +0100 Subject: [FieldTrip] ft_headmodelplot coordinate system origin problem In-Reply-To: References: <321B871E-53E2-43D8-B397-EA9C73C8B32C@donders.ru.nl> <76760214-3081-465C-8AFB-3E3A52A53C24@donders.ru.nl> <1F5462DE-0087-4F8A-AD1B-62B2A334E5FF@donders.ru.nl> Message-ID: <0F50C0B9-135D-49BA-8024-FD8DC15C0C90@donders.ru.nl> Hi Ion, Did you use the mri with the correct coordinate system (i.e. MEG-based) for the interpolation? JM On Jan 3, 2012, at 2:22 PM, Ion Lavado wrote: > Thank you very much Jan! Now everything fits using ft_headmodelplot(cfg). You solved our problem of the week. > > Just one final problem we have: > > - we are doing the beamformig source analisys. > > - our vol, grid and grad fits ok. > > -we have the sourcePre = ft_sourceanalysis(cfg, freqPre); > sourcePost = ft_sourceanalysis(cfg, freqPost); > > -we then interpolate the data with > > cfg = []; > cfg.downsample = 2; > sourcePostInt = ft_sourceinterpolate(cfg, sourcePost , mri_real); > > - finally we use method SLICE to plot the results: (WITH MRI_REAL) > > %METHOD SLICE: > sourceDiff = sourcePost; > sourceDiff.avg.pow = (sourcePost.avg.pow - sourcePre.avg.pow) ./ sourcePre.avg.pow; > cfg = [] > cfg.downsample = 2; > sourceDiffInt = ft_sourceinterpolate(cfg, sourceDiff , mri_real); > cfg = []; > cfg.method = 'slice'; > cfg.interactive = 'yes'; > cfg.funparameter = 'avg.pow'; > cfg.maskparameter = cfg.funparameter; > cfg.funcolorlim = [0 2]; > cfg.opacitylim = [0 2]; > cfg.opacitymap = 'rampup'; > figure('Name', 'SLICE Method') > ft_sourceplot(cfg, sourceDiffInt); > > > The problem comes now (not before), that when plotting the result don't fit the mri in the figure. I send you the .jpg so you can see it and try to help us whith this FINAL problem! In the script i send you, the problem i think starts after line 156. > > You are really kind, and thank you very much for your usefull help. > > Ion > > > > > > > > > 2012/1/3 jan-mathijs schoffelen > Hi Ion, > > If the positive z-axis (denoted by +Z in the figure that is created by ft_determine_coordsys) is not pointing to the top of the head you made an error in ft_volumerealign and probably exchanged left with right in setting the lpa and rpa locations. This results in the coordinate system being a left-handed one and causes all kind of trouble later on. If this is the case, you need to repeat ft_volumerealign (with the original MRI) and type 'l' where you typed 'r', and the other way around. Ft_volumesegment relies on spm for the segmentation, which relies on the mri-data being defined in a meaningful right-handed coordinate system (which can be either mni-based, or MEG system based). > > If however the +Z is just pointing downward but the anatomy is 'upside-down' (neck pointing to the ceiling) then the coordinate system is a valid, i.e. a right-handed RAS (right-anterior-superior) coordinate system. If this is the case then I wouldn't know what's going on, because I would suspect that ft_volumesegment Perhaps some other neuromag aficionados could jump to the rescue here? > > As such ft_determine_coordsys does not change the coordinate system of your mri, it just changes the coordsys field, which helps FieldTrip in the interpretation of the real-world coordinates. The mapping of voxel locations to real-world locations is defined by mri.transform which can be changed by ft_volumerealign. > > Best wishes, > > JM > > > On Jan 3, 2012, at 1:20 PM, Ion Lavado wrote: > >> The Z axis is pointing to the oposite direction (inferior), so i have the mri upside down. How can i change this? When Matlab plots the figure it asks me this: >> >> The positive x-axis is pointing towards the right >> The positive y-axis is pointing towards anterior >> The positive z-axis is pointing towards superior >> Do you want to change the anatomical labels for the axes [y, N]? >> >> I then mark to change the axis and mark the positive z-axis as (i)inferior, but when plotting again is as the begginig... What do i have to do? >> >> Thank you very much Jan. >> >> >> >> 2012/1/3 jan-mathijs schoffelen >> Hi Ion, >> >> I'd suggest first to have a look at mri_real. How does it look in ft_determine_coordsys? >> In particular, is the z-axis pointing in the correct direction? >> >> JM >> >> >> On Jan 3, 2012, at 12:45 PM, Ion Lavado wrote: >> >>> Hi Jan, >>> I am sorry, I have been trying with your method but now what is incorrect is the segmentation. >>> Here is the script. Maybe you understand better the problem...I am getting crazy. The problem comes from line 53 >>> Thank you very much, >>> Best, >>> Ion >>> >>> >>> >>> 2012/1/3 jan-mathijs schoffelen >>> Hi Ion, >>> >>> What is the coordinate system in which the vol and mri are defined? To me it does not look like the neuromag coordinate system, but rather like MNI-space. I would expect the origin to be a bit (~4 cm) lower and a bit more anterior (because the origin is defined on the line going through the pre-auricular points. In the 'vol.jpg' it seems that the origin is in the anterior commissure. Although in principle it shouldn't matter, it is convention to express the coordinates in the MEG-system's coordinate system, i.e. in neuromag space in this case. Therefore I would say that the vol and grid variables need to be adjusted, rather than the sensor positions. As mentioned in my previoius message, this can be achieved by coregistering the anatomy to the neuromag coordinate system using ft_volumerealign. You need to manually identify the locations of the fiducials that define the coordinate system, i.e. the nasion, lpa and rpa. The required cfg is: cfg.interactive = 'yes', cfg.coordsys = 'neuromag'. Once the anatomy is coregistered you can proceed with creating the vol and grid variables. >>> >>> Best, >>> >>> Jan-Mathijs >>> >>> >>> On Jan 3, 2012, at 11:38 AM, Ion Lavado wrote: >>> >>>> Thank you for your help Jan. I tried all you told but i continue with my problem. The coordinates for the head (volume) and mri are the same, with the function ft_determine_coordsys i see this. >>>> I think that the problem is about the sensor (helmet) origin of coordinates. Please see the images i adjunt here, the sensors origin is very low(nearly out of the helmet) and when ploting everything i suppose that every origin align to each other, so that the brain comes a little bit low. >>>> >>>> Best whishes, >>>> >>>> Ion >>>> >>>> 2012/1/2 jan-mathijs schoffelen >>>> Dear Ion, >>>> >>>> Are you sure that the sensor positions are defined in the same coordinate system as are the volume conductor model and the source positions? If not, then this is the likely cause of the shift. You can have a look here for more information about the different coordinate systems: http://fieldtrip.fcdonders.nl/faq/how_are_the_different_head_and_mri_coordinate_systems_defined >>>> >>>> In order to coregister the anatomical mri to the sensor array, you can use ft_volumerealign. >>>> >>>> Best wishes, >>>> >>>> Jan-Mathijs >>>> >>>> >>>> On Jan 2, 2012, at 5:11 PM, Ion Lavado wrote: >>>> >>>>> Hello, i'm working with MEG data from Elekta Neuromag. My problem comes when i try to plot the headmodel with the function ft_headmodelplot(cfg). This should plot the head model(volume) + brain grid + sensors. As you can see in the adjunted image, my head volume and grid is not centered and part of the head could not be read by the sensors. Is it possible to modify this so i can center the head in the sensors(helmet)? >>>>> Thank you very much. >>>>> >>>>> Ion Lavado >>>>> _______________________________________________ >>>>> 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 >>>> >>>> >>>> _______________________________________________ >>>> 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 >>> >>> >>> _______________________________________________ >>> 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 >> >> >> _______________________________________________ >> 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 > > > _______________________________________________ > 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 -------------- next part -------------- An HTML attachment was scrubbed... URL: From lihqih at gmail.com Thu Jan 5 14:30:22 2012 From: lihqih at gmail.com (qi li) Date: Thu, 5 Jan 2012 08:30:22 -0500 Subject: [FieldTrip] artifact rejection In-Reply-To: <4F055D49.4020401@donders.ru.nl> References: <4F055D49.4020401@donders.ru.nl> Message-ID: Hi Jörn, Thanks a lot! Now it makes sense to me. Best regards, Qi On Thu, Jan 5, 2012 at 3:20 AM, "Jörn M. Horschig" < jm.horschig at donders.ru.nl> wrote: > Dear Qi, > > Though I am not sure to what z-score formula you are referring to, I guess > you are talking about the 'summary' mode of ft_rejectvisual. Z-scores are > computed in different ways here, once across channels and once across time, > leading to two different plots. The third plot is an accumulated plot of > these two, where colors indicate the strength of the selected measure (e.g. > z-score). Thus, in terms of the z-score formula, it is once computed with > the average and standard deviation across the time-dimension per channel > and once across the channel-dimension per time bin. I hope this clarifies > why the two plots don't show the same. > > ICA can also be applied to eye blinks, for which an example is given in > the "Walkthrough" > > http://fieldtrip.fcdonders.nl/walkthrough#using_ica_for_eye_artifact_removal > > And of course, ICA can be used for anything else you believe in (e.g. look > for papers by Makeig) > > Best, > Jörn > > > On 1/4/2012 4:52 PM, qi li wrote: > > Hi, > > I am confused about the plot of the z-score and 'most contribute' channel > trial plot in the automatic artifact rejection tutorial. The z-score > formula provided in the tutorial is linear to the time course of a > particular channel of a specific trial, but the two plots don't look alike. > > ICA in the tutorial only applies to ECG, can it be applied to remove eye > blink and other known artifacts instead of rejecting trials. > > Thanks! > > Qi > > > > > _______________________________________________ > fieldtrip mailing listfieldtrip at donders.ru.nlhttp://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 > > 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 hamzaf at sabanciuniv.edu Thu Jan 5 15:14:00 2012 From: hamzaf at sabanciuniv.edu (Hamza Fawzi Altakroury (Student)) Date: Thu, 5 Jan 2012 16:14:00 +0200 Subject: [FieldTrip] Trigger values in data matrix In-Reply-To: References: Message-ID: Dear Boris I sent that email when I was trying to read from .gdf file (by sread) while it is acquiring the data through biosemi2ft. But it did not work. My question was if I do the following: >> H = sopen('test.gdf'); >> data = sread(H,2048); % I did not here 2048 sample I did not know why. >> data = data'; >> trig = data(1,:); % The status channel >> plot(trig) I am not going to get the trigger values that I desired. Best. On Thu, Jan 5, 2012 at 1:19 PM, Boris Reuderink wrote: > Dear Hamza, > > Could you elaborate on what you mean here? Could you perhaps provide some > context, and a minimal working example? > > Best, > > Boris > > On Sunday, December 25, 2011, Hamza Fawzi Altakroury (Student) wrote: > >> Hello, >> >> I can't get the real trigger values if use sopen function (or >> ft_read_data), even after adding the min value -1.7281e+009 to get a >> positive values. >> >> Note: I plotted the triggers and their proportion is right but I can't >> get their exact values, what should I do. >> >> Best, >> >> -- >> Hamza Fawzi Altakroury >> Graduate student - MA >> Faculty of Engineering and Natural Sciences >> Sabancı University >> > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > -- Hamza Fawzi Altakroury Graduate student - MA Faculty of Engineering and Natural Sciences Sabancı University -------------- next part -------------- An HTML attachment was scrubbed... URL: From b.reuderink at donders.ru.nl Thu Jan 5 15:30:14 2012 From: b.reuderink at donders.ru.nl (Boris Reuderink) Date: Thu, 5 Jan 2012 15:30:14 +0100 Subject: [FieldTrip] Trigger values in data matrix In-Reply-To: References: Message-ID: Dear Hamza, It seems that the sopen and sread functions are not part of the FieldTrip interface. Perhaps you could use ft_read_data [1]? Best, Boris [1] http://fieldtrip.fcdonders.nl/reference/ft_read_data On Thu, Jan 5, 2012 at 3:14 PM, Hamza Fawzi Altakroury (Student) wrote: > Dear Boris > > I sent that email when I was trying to read from .gdf file (by sread) while > it is acquiring the data through biosemi2ft. But it did not work. > > My question was if I do the following: > >>> H = sopen('test.gdf'); >>> data = sread(H,2048);     % I did not here 2048 sample I did not know >>> why. >>> data = data'; >>> trig = data(1,:);               % The status channel >>> plot(trig) > > I am not going to get the trigger values that I desired. > > Best. > > On Thu, Jan 5, 2012 at 1:19 PM, Boris Reuderink > wrote: >> >> Dear Hamza, >> >> Could you elaborate on what you mean here? Could you perhaps provide some >> context, and a minimal working example? >> >> Best, >> >> Boris >> >> On Sunday, December 25, 2011, Hamza Fawzi Altakroury (Student) wrote: >>> >>> Hello, >>> >>> I can't get the real trigger values if use sopen function (or >>> ft_read_data), even after adding the min value -1.7281e+009 to get a >>> positive values. >>> >>> Note: I plotted the triggers and their proportion is right but I can't >>> get their exact values, what should I do. >>> >>> Best, >>> >>> -- >>> Hamza Fawzi Altakroury >>> Graduate student - MA >>> Faculty of Engineering and Natural Sciences >>> Sabancı University >> >> >> _______________________________________________ >> fieldtrip mailing list >> fieldtrip at donders.ru.nl >> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > > > > -- > Hamza Fawzi Altakroury > Graduate student - MA > Faculty of Engineering and Natural Sciences > Sabancı University > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip From Don.Rojas at ucdenver.edu Fri Jan 6 22:12:15 2012 From: Don.Rojas at ucdenver.edu (Rojas, Don) Date: Fri, 6 Jan 2012 14:12:15 -0700 Subject: [FieldTrip] beamformer_sam lambda Message-ID: <6023196E-323C-45C6-BCB2-7CC16204E790@ucdenver.edu> To all, I encountered a problem with the 'sam' method for ft_sourceanalysis. It looks to me that when specifying the configuration option: cfg.sam.lambda = '5%'; i.e., lambda is a percentage, not an actual number, the beamformer_sam routine does not have comparable code as the beamformer_lcmv routine to handle that type of input. I'm wondering if simply inserting the following bit of code between lines 97 and 99 of beamformer_sam, borrowed and edited from beamformer_lcmv, will work: if ~isempty(lambda) && ischar(lambda) && lambda(end)=='%' ratio = sscanf(lambda, '%f%%'); ratio = ratio/100; lambda = ratio * trace(all_cov)/size(all_cov,1); end This seems to work okay in limited tests, but maybe I'm making a mistake here. I'm using a recent svn code version, revision 5097. Best, Don ----------------------- Don Rojas, Ph.D. Associate Professor of Psychiatry U. of Colorado Denver Anschutz Medical Campus Director, UCD Magnetoencephalography Lab 13001 E. 17th Pl F546 Aurora, CO 80045 303-724-4994 -------------- next part -------------- An HTML attachment was scrubbed... URL: From jan.schoffelen at donders.ru.nl Sat Jan 7 09:02:58 2012 From: jan.schoffelen at donders.ru.nl (jan-mathijs schoffelen) Date: Sat, 7 Jan 2012 09:02:58 +0100 Subject: [FieldTrip] beamformer_sam lambda In-Reply-To: <6023196E-323C-45C6-BCB2-7CC16204E790@ucdenver.edu> References: <6023196E-323C-45C6-BCB2-7CC16204E790@ucdenver.edu> Message-ID: <45341A04-A0B9-4717-8863-C13E47854226@donders.ru.nl> Dear Don, At first sight, this makes sense to me, also in the light of consistency across the different algorithms. I'll create a 'bug' out of this and we will discuss it in the group and most likely implement it. Thanks for the notification and best wishes, Jan-Mathijs On Jan 6, 2012, at 10:12 PM, Rojas, Don wrote: > To all, > > I encountered a problem with the 'sam' method for ft_sourceanalysis. It looks to me that when specifying the configuration option: > > cfg.sam.lambda = '5%'; > > i.e., lambda is a percentage, not an actual number, the beamformer_sam routine does not have comparable code as the beamformer_lcmv routine to handle that type of input. I'm wondering if simply inserting the following bit of code between lines 97 and 99 of beamformer_sam, borrowed and edited from beamformer_lcmv, will work: > > if ~isempty(lambda) && ischar(lambda) && lambda(end)=='%' > ratio = sscanf(lambda, '%f%%'); > ratio = ratio/100; > lambda = ratio * trace(all_cov)/size(all_cov,1); > end > > This seems to work okay in limited tests, but maybe I'm making a mistake here. I'm using a recent svn code version, revision 5097. > > Best, > > Don > > > ----------------------- > Don Rojas, Ph.D. > Associate Professor of Psychiatry > U. of Colorado Denver Anschutz Medical Campus > Director, UCD Magnetoencephalography Lab > 13001 E. 17th Pl F546 > Aurora, CO 80045 > 303-724-4994 > > _______________________________________________ > 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 -------------- next part -------------- An HTML attachment was scrubbed... URL: From drivolta81 at gmail.com Mon Jan 9 00:00:57 2012 From: drivolta81 at gmail.com (Davide) Date: Mon, 9 Jan 2012 00:00:57 +0100 Subject: [FieldTrip] Tms artifact removal from eeg data Message-ID: <22A7D4AE-B0CF-4222-BAA9-C44CF588697F@gmail.com> Dear all, I just wish to ask what is a good way to remove tms artifacts from eeg data using fieldtrip. The artifact lasts for around 4-8 ms after the tms pulse. Thanks for your help, Davide Sent from my iPad From mark.noordenbos at gmail.com Mon Jan 9 17:34:52 2012 From: mark.noordenbos at gmail.com (Mark Noordenbos) Date: Mon, 9 Jan 2012 17:34:52 +0100 Subject: [FieldTrip] Plotting mask using ft_singleplotER Message-ID: Hi Fieldtrippers, I was wondering if it is possible to plot a highlighted area under a curve using the 'mask' option of the function ft_singleplotER to indicate time intervals with significant effects. The mask structure was obtained from the timelockstatistics function. I try to plot the mask using the following code: cfgplot=[]; cfgplot.ylim = [-4 2]; cfgplot.maskparameter='mask'; ft_singleplotER(cfgplot, Data); The structure Data contains the following: label: {'Fz'} time: [1x101 double] individual: [1x101 double] dimord: 'chan_time' cfg: [1x1 struct] avg: [1x101 double] mask: [1x101 logical] This results in the following error: ??? Undefined function or variable 'xvector'. Error in ==> ft_singleplotER at 477 maskdatavector = reshape(mean(datmask,1), [1 numel(xvector)]); The variable xvector is not defined in ft_singleplotER. Replacing xvector with datmask, didn't helped. However, this resulted in another error: ??? Error using ==> ft_plot_vector at 105 the dimensions of the highlight should be identical to the dimensions of the data Error in ==> ft_singleplotER at 514 ft_plot_vector(xval, datavector, 'style', cfg.linestyle{i}, 'color', color, ... So my questions are: Is this the right function to highlight significant time intervals under a curve? And, if so, how to do this? Kind Regards, Mark -- Mark Noordenbos, MSc Radboud University Nijmegen Behavioural Science Institute P.O. Box 9104, Room A05.36 6500 HE Nijmegen The Netherlands Email: m.noordenbos at bsi.ru.nl Telephone: +31 24 3612070 Fax: +31 24 3616211 http://www.ru.nl -------------- next part -------------- An HTML attachment was scrubbed... URL: From l.verhagen at fcdonders.ru.nl Mon Jan 9 19:44:01 2012 From: l.verhagen at fcdonders.ru.nl (Verhagen, L. (Lennart)) Date: Mon, 9 Jan 2012 19:44:01 +0100 (CET) Subject: [FieldTrip] Tms artifact removal from eeg data In-Reply-To: <17641A8D-2EF2-4CF9-9A80-C23B43367011@donders.ru.nl> Message-ID: <150077787.882929.1326134641950.JavaMail.root@monoceros.zimbra.ru.nl> Dear Davide, Currently, there is no dedicated processing pipeline available in FieldTrip that will allow you to remove TMS artifacts from EEG data. However, I have been using FieldTrip to analyze TMS-EEG data for the past two years (with success), so I am happy to give you some advice. Please remember that the difference between "good" and "bad" TMS-EEG data will not be made by FieldTrip (or any other analysis package), but by your data acquisition. There are a number of artifacts which are dealt with in different ways: the pulse itself, clipping, ringing step-response of the op-amp, decay of the RC-circuit in the filters of the amplifier, decay of the scalp-electrolyte-electrode circuit, muscle twitch, TMS recharging artifact, auditory evoked response, somatosensory evoked response. 1. Pulse: The data during the pulse (e.g. 0.3 ms) is lost and cannot be recovered. 2. Clipping: Only the Nexstim amplifier is currently theoretically able to hold-and-clamp your data acquisition. In all other amplifiers the signal will go out-of-range ("clip") between 2-6 ms, depending on your setup. In this time-period, your data is lost. Some people like to interpolate their data over the missing values. I personally don't like that. 3. Following the clipping of the data your operational amplifier circuit will be subject to a step-response. This is a characteristic ringing artifact often lasting up to 10 ms. You can put a lot of effort in modeling this artifact (search for "Kalman filter"), but I personally have not seen any modeling/filtering that worked adequately. Therefore many people consider the first 8-10 ms following the TMS pulse as lost. Some interpolate, I replace the values by NaNs. 4. Decay step-response. You are very likely to also observe a decay artifact in some channels, resembling an exponential decay. This decay can last relatively long. In horrible cases even up to 1 second, but a decay lasting 50-150 ms is not uncommon. I have addressed this artifact by developing an constrained iterative fitting algorithm that is capable of modeling four additive exponential decays with different time constants. This worked reasonable well for my data, but has not been tested on data acquired in any other lab (or setup for that matter). If you are interested, and know what you are doing, I could share my code with you (ft_tms_fitexpstepresp). I plan to develop this code (and a tutorial TMS-EEG processing pipeline) together with other TMS-EEG experts at the Donders, into a tested set op mfiles, which will hopefully find their place in the FieldTrip distribution. 5. the muscle twitch is notorious and cannot be easily removed. 6. depending on your TMS machine, you can see a recharging artifact. Sometimes it can be horrendous, other times it is hardly visible or completely absent. The best way to deal with this artifact is to avoid it. Next to replacing values by NaNs and modeling artifacts, I have also used Independent Component Analysis to identify and remove artifacts. Please keep in mind that you can only use ICA if you have already attempted to clean up your data by all other means. TMS artifacts can be quite strong and show non-linear behavior. Therefore the independent components might be overloaded by the extreme variance provided by the TMS pulse alone. I hope I have helped you a bit further. I can imagine that you have more questions. If so, it would be great if you specify them clearly. I could fill a whole new paper will many little tips and tricks, but that would be utterly impractical. By the way, a TMS toolkit focusing on multi-modal TMS (strong emphasis on TMS-EEG) is likely to be organized by the Donders early this summer, so keep an eye out on this mailing list if you are interested. Cheers, Lennart. > From: Davide > Date: 9 January 2012 0:00:57 CET > To: "fieldtrip at donders.ru.nl" > Subject: [FieldTrip] Tms artifact removal from eeg data > Reply-To: Email discussion list for the FieldTrip project > > Dear all, > > I just wish to ask what is a good way to remove tms artifacts from eeg data using fieldtrip. > > The artifact lasts for around 4-8 ms after the tms pulse. > > Thanks for your help, > Davide From drivolta81 at gmail.com Tue Jan 10 10:59:01 2012 From: drivolta81 at gmail.com (Davide Rivolta) Date: Tue, 10 Jan 2012 10:59:01 +0100 Subject: [FieldTrip] Tms artifact removal from eeg data In-Reply-To: <150077787.882929.1326134641950.JavaMail.root@monoceros.zimbra.ru.nl> References: <17641A8D-2EF2-4CF9-9A80-C23B43367011@donders.ru.nl> <150077787.882929.1326134641950.JavaMail.root@monoceros.zimbra.ru.nl> Message-ID: Dear Lennart, Thank you for your reply. It is really useful. Let me play a bit with it and will let you know if I have further problems. Thanks again, Davide On Mon, Jan 9, 2012 at 7:44 PM, Verhagen, L. (Lennart) < l.verhagen at fcdonders.ru.nl> wrote: > Dear Davide, > > Currently, there is no dedicated processing pipeline available in > FieldTrip that will allow you to remove TMS artifacts from EEG data. > However, I have been using FieldTrip to analyze TMS-EEG data for the past > two years (with success), so I am happy to give you some advice. > > Please remember that the difference between "good" and "bad" TMS-EEG data > will not be made by FieldTrip (or any other analysis package), but by your > data acquisition. > > There are a number of artifacts which are dealt with in different ways: > the pulse itself, clipping, ringing step-response of the op-amp, decay of > the RC-circuit in the filters of the amplifier, decay of the > scalp-electrolyte-electrode circuit, muscle twitch, TMS recharging > artifact, auditory evoked response, somatosensory evoked response. > > 1. Pulse: The data during the pulse (e.g. 0.3 ms) is lost and cannot be > recovered. > 2. Clipping: Only the Nexstim amplifier is currently theoretically able to > hold-and-clamp your data acquisition. In all other amplifiers the signal > will go out-of-range ("clip") between 2-6 ms, depending on your setup. In > this time-period, your data is lost. Some people like to interpolate their > data over the missing values. I personally don't like that. > 3. Following the clipping of the data your operational amplifier circuit > will be subject to a step-response. This is a characteristic ringing > artifact often lasting up to 10 ms. You can put a lot of effort in > modeling this artifact (search for "Kalman filter"), but I personally have > not seen any modeling/filtering that worked adequately. Therefore many > people consider the first 8-10 ms following the TMS pulse as lost. Some > interpolate, I replace the values by NaNs. > 4. Decay step-response. You are very likely to also observe a decay > artifact in some channels, resembling an exponential decay. This decay can > last relatively long. In horrible cases even up to 1 second, but a decay > lasting 50-150 ms is not uncommon. I have addressed this artifact by > developing an constrained iterative fitting algorithm that is capable of > modeling four additive exponential decays with different time constants. > This worked reasonable well for my data, but has not been tested on data > acquired in any other lab (or setup for that matter). If you are > interested, and know what you are doing, I could share my code with you > (ft_tms_fitexpstepresp). I plan to develop this code (and a tutorial > TMS-EEG processing pipeline) together with other TMS-EEG experts at the > Donders, into a tested set op mfiles, which will hopefully find their > place in the FieldTrip distribution. > 5. the muscle twitch is notorious and cannot be easily removed. > 6. depending on your TMS machine, you can see a recharging artifact. > Sometimes it can be horrendous, other times it is hardly visible or > completely absent. The best way to deal with this artifact is to avoid it. > > Next to replacing values by NaNs and modeling artifacts, I have also used > Independent Component Analysis to identify and remove artifacts. Please > keep in mind that you can only use ICA if you have already attempted to > clean up your data by all other means. TMS artifacts can be quite strong > and show non-linear behavior. Therefore the independent components might > be overloaded by the extreme variance provided by the TMS pulse alone. > > I hope I have helped you a bit further. I can imagine that you have more > questions. If so, it would be great if you specify them clearly. I could > fill a whole new paper will many little tips and tricks, but that would be > utterly impractical. By the way, a TMS toolkit focusing on multi-modal TMS > (strong emphasis on TMS-EEG) is likely to be organized by the Donders > early this summer, so keep an eye out on this mailing list if you are > interested. > > Cheers, > Lennart. > > > > From: Davide > > Date: 9 January 2012 0:00:57 CET > > To: "fieldtrip at donders.ru.nl" > > Subject: [FieldTrip] Tms artifact removal from eeg data > > Reply-To: Email discussion list for the FieldTrip project > > > > > Dear all, > > > > I just wish to ask what is a good way to remove tms artifacts from eeg > data using fieldtrip. > > > > The artifact lasts for around 4-8 ms after the tms pulse. > > > > Thanks for your help, > > Davide > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > -- Davide Rivolta, PhD -------------- next part -------------- An HTML attachment was scrubbed... URL: From ole.jensen at donders.ru.nl Tue Jan 10 11:23:53 2012 From: ole.jensen at donders.ru.nl (Ole Jensen) Date: Tue, 10 Jan 2012 11:23:53 +0100 Subject: [FieldTrip] Data Analysis Competition at Biomag2012 Message-ID: <4F0C11B9.9050806@donders.ru.nl> Dear colleagues, We are happy to announce the 'Biomag2012 analysis competition'. Please consider participating or encourage students, postdocs and colleagues to take part. See below for details. Best regards, Ole Jensen and Ali Bahramisharif ------ *Biomag2012 analysis competition - distributed representations *The decoding of mental states and neuronal representations from brain imaging data is a research field in rapid development (Spiers HJ, Maguire EA. Decoding human brain activity during real-world experiences. Trends Cogn Sci. 2007 ; Haynes JD, Rees G. Decoding mental states from brain activity in humans. Nat Rev Neurosci. 2006). These decoding approaches have a great potential in MEG research where data are recorded from hundreds of sensors with a millisecond time resolution. In particular cognitive neuroscience could benefit from further development of decoding approaches in order to identify representational specific brain activity._ _The aims of the competition is to: * Promote the development and application of new multivariate analysis techniques for decoding of brain activity * Make the audience aware of novel approaches * Elucidate the pros and cons of different the techniques o Which assumptions are behind a given approach? o What are the limitations? * Attract signal-processing experts from outside the MEG field * Encourage a discussion on the cognitive insight which the techniques can bring about The deadline for submitting results is Aug 17, 2012 Link for details, data etc: http://www.biomag2012.org/content/data-analysis-competition -- Ole Jensen http://www.neuosc.com -------------- next part -------------- An HTML attachment was scrubbed... URL: From jan.schoffelen at donders.ru.nl Tue Jan 10 14:16:35 2012 From: jan.schoffelen at donders.ru.nl (jan-mathijs schoffelen) Date: Tue, 10 Jan 2012 14:16:35 +0100 Subject: [FieldTrip] change in default behavior spectral analysis functions Message-ID: Dear all, I would like to report a slight change in the default behavior of the spectral analysis routines (ft_freqanalysis, and the low level specest_XXX functions). I do not expect that this change has a major effect on your analysis results, but I want you to be aware of the change. The issue at hand is the way in which the low-level spectral analysis routines preprocess the data just prior to taking the fft, and it relates to the following FAQs: http://fieldtrip.fcdonders.nl/faq/why_does_my_tfr_look_strange http://fieldtrip.fcdonders.nl/faq/why_does_my_tfr_look_strange_part_ii As of revision 3752 of ft_freqanalysis (the version information of the function used to generate your data can be obtained from freq.cfg.version) we introduced a default preprocessing step, which entailed the fitting and subtraction of a first order polynome to the time-domain data, prior to fourier transformation. This step was intended to address both abovementioned FAQs, and removes the DC-component and the linear trend. However, after hot and lengthy discussions in the FieldTrip team we decided to change the default behavior into just removing the DC-component. This change will be effective as of revision 5106. Once again, I don't expect this change to have whopping effects on your results, e.g. all of a sudden losing significance or so. If it does, it warrants attention because something funny might be going on in the lower frequency components of your data. If you want to emulate the default behavior of ft_freqanalysis as it existed prior to revision 3752, you need to specify cfg.polyremoval = -1; If you want to emulate the default behavior of ft_freqanalysis as it existed between revision 3752 and revision 5106, you need to specify cfg.polyremoval = 1; The new default is now cfg.polyremoval = 0; Happy computing, Jan-Mathijs 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 From julian.keil at gmail.com Thu Jan 12 15:18:16 2012 From: julian.keil at gmail.com (Julian Keil) Date: Thu, 12 Jan 2012 15:18:16 +0100 Subject: [FieldTrip] Error loading 4D-data Message-ID: <3AF95F5C-5DBB-4BC4-A52A-72637306597C@gmail.com> Hi, I have an error loading a 4D-dataset: ??? SWITCH expression must be a scalar or string constant. Error in ==> read_4d_hdr at 60 switch format Error in ==> ft_read_header at 164 orig = read_4d_hdr(datafile); Error in ==> trialfun_general at 55 hdr = ft_read_header(cfg.headerfile, 'headerformat', cfg.headerformat); Error in ==> ft_definetrial at 166 [trl, event] = feval(cfg.trialfun, cfg); It looks like field trip can't open the header for the datafile as: K>> header.header_data ans = FileType: [] file_type: '' and: K>> header_end header_end = 581365760 K>> header_offset header_offset = 6.4740e+15 However, a dataset from the same subject recorded 5 minutes earlier could be loaded just fine. Does anyone have an idea what is wrong here and maybe how to fix it? Thanks a lot! Julian Dipl. Psych. Julian Keil OBOB-Lab University of Konstanz Department of Psychology P.O. Box D25 78457 Konstanz Germany Tel: ++49 - (0)7531 - 88 42 50 Fax: ++49 - (0)7531 - 88 28 91 Email: julian.keil at uni-konstanz.de Homepage: http://www.uni-konstanz.de/obob -------------- next part -------------- An HTML attachment was scrubbed... URL: From lihqih at gmail.com Thu Jan 12 17:20:24 2012 From: lihqih at gmail.com (qi li) Date: Thu, 12 Jan 2012 11:20:24 -0500 Subject: [FieldTrip] ft_redefinetrial problem Message-ID: Hi, I have a fixed length experiment raw. I apply ft_redefinetrial with cfg.trl to epoch it into many segments. When this step is done, the output.hdr.grad has different fields from the input field. More specifically the pnt and ori field are gone thus cause trouble for the later analysis.* *I am using 12/23 version, is there a bug or it is suppose to be so. If I only want to separate the long data into segments, which command can change only the time window while keeping all the other parameters unchanged? Thanks! Qi -------------- next part -------------- An HTML attachment was scrubbed... URL: From r.oostenveld at donders.ru.nl Thu Jan 12 18:11:36 2012 From: r.oostenveld at donders.ru.nl (Robert Oostenveld) Date: Thu, 12 Jan 2012 18:11:36 +0100 Subject: [FieldTrip] Trigger values in data matrix In-Reply-To: References: Message-ID: <4AD90687-0D23-437B-8388-B872DB82B8D3@donders.ru.nl> Dear Hamza, For the GDF format, the low-level reading function underneath ft_read_data uses the Biosig toolbox (which contains the sopen and sread function) as you already had figured out. The problem with biosig is that it does not have a consistent way of representing the events in a dataset for all data formats that it represents, so the general wrapper around it in fieldtrip cannot get the events. So in short: fieldtrip explicitely recognizes header+data+event, whereas biosig only has header+data as a consistent representaiton of the file content. In your gdf file there is probably a trigger or status channel, which can be used for flank detection. In ft_read_event around line 354 you see the relevant code, where the fieldtrip/fileio/private/read_trigger function is used to read the channel and detect the triggers. I can imagine that the calibration of the trigger/status channel is incorerct, resulting in values that are not integers (as you would expect on a trigger channel). We recently internally discussed the gdf writer linked to the biosemi2ft realtime application. It would be good to have more example data from another system. We don't have a biosemi system ourselves, but a collaborating group in Nijmegen (Peter Desain's lab) has one. They have not yet reported a problem like yours, but it would be good to check. Therefore I suggest that you report it as a bug on bugzilla.fcdonders.nl and upload a problematic example file (see http://fieldtrip.fcdonders.nl/faq/how_should_i_send_example_data_to_the_developers). best Robert On 5 Jan 2012, at 15:14, Hamza Fawzi Altakroury (Student) wrote: > Dear Boris > > I sent that email when I was trying to read from .gdf file (by sread) while it is acquiring the data through biosemi2ft. But it did not work. > > My question was if I do the following: > > >> H = sopen('test.gdf'); > >> data = sread(H,2048); % I did not here 2048 sample I did not know why. > >> data = data'; > >> trig = data(1,:); % The status channel > >> plot(trig) > > I am not going to get the trigger values that I desired. > > Best. > > On Thu, Jan 5, 2012 at 1:19 PM, Boris Reuderink wrote: > Dear Hamza, > > Could you elaborate on what you mean here? Could you perhaps provide some context, and a minimal working example? > > Best, > > Boris > > On Sunday, December 25, 2011, Hamza Fawzi Altakroury (Student) wrote: > Hello, > > I can't get the real trigger values if use sopen function (or ft_read_data), even after adding the min value -1.7281e+009 to get a positive values. > > Note: I plotted the triggers and their proportion is right but I can't get their exact values, what should I do. > > Best, > > -- > Hamza Fawzi Altakroury > Graduate student - MA > Faculty of Engineering and Natural Sciences > Sabancı University > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > > > -- > Hamza Fawzi Altakroury > Graduate student - MA > Faculty of Engineering and Natural Sciences > Sabancı University > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip From stephen.whitmarsh at gmail.com Thu Jan 12 18:30:34 2012 From: stephen.whitmarsh at gmail.com (Stephen Whitmarsh) Date: Thu, 12 Jan 2012 18:30:34 +0100 Subject: [FieldTrip] Trigger values in data matrix In-Reply-To: <4AD90687-0D23-437B-8388-B872DB82B8D3@donders.ru.nl> References: <4AD90687-0D23-437B-8388-B872DB82B8D3@donders.ru.nl> Message-ID: Dear Hamza, For what it's worth: I use Fieldtrip to read GDF data written bybiosemi2ft (64 channel EEG), in the lab Robert mentioned, in the followingway (after installing the biosig toolbox): event  = ft_read_event(cfg.dataset,'headerformat','gdf');value  = [event(find(strcmp('STATUS', {event.type}))).value]';sample = [event(find(strcmp('STATUS', {event.type}))).sample]'; All the best,Stephen On 12 January 2012 18:11, Robert Oostenveld wrote: > Dear Hamza, > > For the GDF format, the low-level reading function underneath ft_read_data uses the Biosig toolbox (which contains the sopen and sread function) as you already had figured out. The problem with biosig is that it does not have a consistent way of representing the events in a dataset for all data formats that it represents, so the general wrapper around it in fieldtrip cannot get the events. So in short: fieldtrip explicitely recognizes header+data+event, whereas biosig only has header+data as a consistent representaiton of the file content. > > In your gdf file there is probably a trigger or status channel, which can be used for flank detection. In ft_read_event around line 354 you see the relevant code, where the fieldtrip/fileio/private/read_trigger function is used to read the channel and detect the triggers. I can imagine that the calibration of the trigger/status channel is incorerct, resulting in values that are not integers (as you would expect on a trigger channel). > > We recently internally discussed the gdf writer linked to the biosemi2ft realtime application. It would be good to have more example data from another system. We don't have a biosemi system ourselves, but a collaborating group in Nijmegen (Peter Desain's lab) has one. They have not yet reported a problem like yours, but it would be good to check. Therefore I suggest that you report it as a bug on bugzilla.fcdonders.nl and upload a problematic example file (see http://fieldtrip.fcdonders.nl/faq/how_should_i_send_example_data_to_the_developers). > > best > Robert > > > > > On 5 Jan 2012, at 15:14, Hamza Fawzi Altakroury (Student) wrote: > >> Dear Boris >> >> I sent that email when I was trying to read from .gdf file (by sread) while it is acquiring the data through biosemi2ft. But it did not work. >> >> My question was if I do the following: >> >> >> H = sopen('test.gdf'); >> >> data = sread(H,2048);     % I did not here 2048 sample I did not know why. >> >> data = data'; >> >> trig = data(1,:);               % The status channel >> >> plot(trig) >> >> I am not going to get the trigger values that I desired. >> >> Best. >> >> On Thu, Jan 5, 2012 at 1:19 PM, Boris Reuderink wrote: >> Dear Hamza, >> >> Could you elaborate on what you mean here? Could you perhaps provide some context, and a minimal working example? >> >> Best, >> >> Boris >> >> On Sunday, December 25, 2011, Hamza Fawzi Altakroury (Student) wrote: >> Hello, >> >> I can't get the real trigger values if use sopen function (or ft_read_data), even after adding the min value -1.7281e+009 to get a positive values. >> >> Note: I plotted the triggers and their proportion is right but I can't get their exact values, what should I do. >> >> Best, >> >> -- >> Hamza Fawzi Altakroury >> Graduate student - MA >> Faculty of Engineering and Natural Sciences >> Sabancı University >> >> _______________________________________________ >> fieldtrip mailing list >> fieldtrip at donders.ru.nl >> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip >> >> >> >> -- >> Hamza Fawzi Altakroury >> Graduate student - MA >> Faculty of Engineering and Natural Sciences >> Sabancı University >> _______________________________________________ >> 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 From nathanweisz at mac.com Thu Jan 12 22:02:19 2012 From: nathanweisz at mac.com (Nathan Weisz) Date: Thu, 12 Jan 2012 22:02:19 +0100 Subject: [FieldTrip] ft_redefinetrial problem In-Reply-To: References: Message-ID: Hi Qi, providing some code, including some output may actually help … I am unaware of ft_redifinetrial altering the contents of your hdr field (i admit i have never paid attention to it), but even if it did how does this affect your subsequent analysis steps? e.g. at least to my knowledge, FT looks for data.grad (instead of data.hdr.grad) e.g. for plotting, source analysis etc. so if you add your grad info via ft_read_sens, then everything should be fine … otherwise, if the original hdr content is so important, then save it as a temporary variable and add it to your redefined trial later. but perhaps i have totally misunderstood your problem. in that case see introductory remark on code. good luck, n On 12.01.2012, at 17:20, qi li wrote: > Hi, > > I have a fixed length experiment raw. I apply ft_redefinetrial with cfg.trl to epoch it into many segments. When this step is done, the output.hdr.grad has different fields from the input field. More specifically the pnt and ori field are gone thus cause trouble for the later analysis. I am using 12/23 version, is there a bug or it is suppose to be so. > > If I only want to separate the long data into segments, which command can change only the time window while keeping all the other parameters unchanged? > > Thanks! > > Qi > > > _______________________________________________ > 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 Jan 12 22:09:51 2012 From: jan.schoffelen at donders.ru.nl (jan-mathijs schoffelen) Date: Thu, 12 Jan 2012 22:09:51 +0100 Subject: [FieldTrip] ft_redefinetrial problem In-Reply-To: References: Message-ID: <40F79FF9-A96B-4AEC-97FD-5C78BAC8377B@donders.ru.nl> Hi guys, I agree with Nathan that some additional information would be helpful. The 'problem' Qi relates to (at least the issue with the hdr.grad) is a change in the way the sensor-array is defined in FT. A while ago we changed the .pnt/.ori naming scheme into .chanpos/.coilpos/.coilori to make the distinction between channels and coils more transparent. There is a thread on this mailing list about it and more documentation can be found on: http://fieldtrip.fcdonders.nl/faq/how_are_electrodes_magnetometers_or_gradiometers_described In general this change should not affect your analysis, unless you are relying on outdated code, or custom-written code which expects the .pnt/.ori fields still to be present. If you want to chop up your data into short fixed length segment, you should use ft_redefinetrial with the options: cfg.length and cfg.overlap. BW, JM On Jan 12, 2012, at 10:02 PM, Nathan Weisz wrote: > Hi Qi, > > providing some code, including some output may actually help … > > I am unaware of ft_redifinetrial altering the contents of your hdr field (i admit i have never paid attention to it), but even if it did how does this affect your subsequent analysis steps? e.g. at least to my knowledge, FT looks for data.grad (instead of data.hdr.grad) e.g. for plotting, source analysis etc. so if you add your grad info via ft_read_sens, then everything should be fine … > > otherwise, if the original hdr content is so important, then save it as a temporary variable and add it to your redefined trial later. > > but perhaps i have totally misunderstood your problem. in that case see introductory remark on code. > > good luck, > n > > On 12.01.2012, at 17:20, qi li wrote: > >> Hi, >> >> I have a fixed length experiment raw. I apply ft_redefinetrial with cfg.trl to epoch it into many segments. When this step is done, the output.hdr.grad has different fields from the input field. More specifically the pnt and ori field are gone thus cause trouble for the later analysis. I am using 12/23 version, is there a bug or it is suppose to be so. >> >> If I only want to separate the long data into segments, which command can change only the time window while keeping all the other parameters unchanged? >> >> Thanks! >> >> Qi >> >> >> _______________________________________________ >> 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 -------------- next part -------------- An HTML attachment was scrubbed... URL: From shhirano at npsych.med.kyushu-u.ac.jp Fri Jan 13 02:49:06 2012 From: shhirano at npsych.med.kyushu-u.ac.jp (=?iso-2022-jp?B?GyRCSj9MbhsoQiAbJEI+PDhjGyhC?=) Date: Fri, 13 Jan 2012 10:49:06 +0900 Subject: [FieldTrip] How can I calculate phase locking factor in FieldTrip? Message-ID: <75DF5877-BB2D-4918-A4C0-2A66F7EDCF8E@npsych.med.kyushu-u.ac.jp> Hi everyone! I'm a FieldTrip beginner and I have a question. I'm sure I can estimate time frequency power with FieldTrip. But I don't know how I can estimate time-frequency phase locking factor. phase locking factor is defined as following equation. Phase-locking(t)=1/N x |Σz(t)|, where N is the number of epochs and z(t) refers to the continuous phase of a single trial. Here, z is a complex value on the unit circle, i.e., z=exp(jq), where q is the phase of an oscillation and j is the imaginary unit (e.g. Tallon-baudry et al., 1996). Does anyone know how to calculate this phase locking factor with FieldTrip? Any answer will help me. Best regards, Shogo Hirano Department of Neuropsychiatry Graduate school of medical sciences Kyushu University Fukuoka, Japan -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: SpamAssassinReport.txt URL: From lavado at gmail.com Fri Jan 13 10:00:17 2012 From: lavado at gmail.com (Ion Lavado) Date: Fri, 13 Jan 2012 10:00:17 +0100 Subject: [FieldTrip] Problem reading .mgz files Message-ID: Hello, i'm trying source reconstruction using Minimum-Norm Estimates and i have a problem when reading the (filled.mgz) or any other .mgz file after using Freesurfer and created the files. This is the ERROR i get: >> mri=ft_read_mri('F:\SUBJECT29_BUENO\Subject29\mri\filled.mgz'); The system cannot find the path specified. ERROR: could not open /tmp/tmp7914012.mgh for reading ERROR: loading F:\SUBJECT29_BUENO\Subject29\mri\filled.mgz as MGH ??? Attempt to reference field of non-structure array. Error in ==> ft_read_mri at 248 ndims = numel(size(tmp.vol)); Hope anyone can help me. Thanks! -------------- next part -------------- An HTML attachment was scrubbed... URL: From lavado at gmail.com Fri Jan 13 10:04:17 2012 From: lavado at gmail.com (Ion Lavado) Date: Fri, 13 Jan 2012 10:04:17 +0100 Subject: [FieldTrip] Problem reading .mgz files In-Reply-To: References: Message-ID: Forget to mention, after this commands on freesurfer: recon-all -talairach -subjid Subject01 recon-all -nuintensitycor -subjid Subject01 recon-all -normalization -subjid Subject01 cp T1.mgz brainmask.mgz recon-all -gcareg -subjid Subject01 recon-all -canorm -subjid Subject01 recon-all -careg -subjid Subject01 recon-all -calabel -subjid Subject01 recon-all -normalization2 -subjid Subject01 recon-all -segmentation -subjid Subject01 recon-all -fill -subjid Subject01 I have the mri folder with the tmp folder in it but it is empty... Thank you. 2012/1/13 Ion Lavado > Hello, i'm trying source reconstruction using Minimum-Norm Estimates and i > have a problem when reading the (filled.mgz) or any other .mgz file after > using Freesurfer and created the files. > This is the ERROR i get: > > > >> mri=ft_read_mri('F:\SUBJECT29_BUENO\Subject29\mri\filled.mgz'); > The system cannot find the path specified. > ERROR: could not open /tmp/tmp7914012.mgh for reading > ERROR: loading F:\SUBJECT29_BUENO\Subject29\mri\filled.mgz as MGH > ??? Attempt to reference field of non-structure array. > Error in ==> ft_read_mri at 248 > ndims = numel(size(tmp.vol)); > > Hope anyone can help me. Thanks! > -------------- next part -------------- An HTML attachment was scrubbed... URL: From jan.schoffelen at donders.ru.nl Fri Jan 13 10:34:05 2012 From: jan.schoffelen at donders.ru.nl (jan-mathijs schoffelen) Date: Fri, 13 Jan 2012 10:34:05 +0100 Subject: [FieldTrip] Problem reading .mgz files In-Reply-To: References: Message-ID: Hi Ion, What operating system are you working on? It looks like windows, and the first error is a path error, where the function is looking at a Linux-style path. This is apparently causing trouble. First you get two errors (starting with ERROR, which are a sign that something went wrong in the low level reading routines), which do not cause matlab to 'crash' directly. Later in the code variables are not what they are expected to be (due to the earlier ERRORs) and this causes a matlab crash (in red). So far this whole pipeline has been tested only on the linux platform. I don't know whether freesurfer (in particular the matlab functions that FieldTrip relies on to read in the .mgz files) runs without problems on windows. Perhaps you first need to find out what causes the first error. It could well be that FieldTrip needs to use a platform specific reading routine here. BW, JM On Jan 13, 2012, at 10:00 AM, Ion Lavado wrote: > Hello, i'm trying source reconstruction using Minimum-Norm Estimates and i have a problem when reading the (filled.mgz) or any other .mgz file after using Freesurfer and created the files. > This is the ERROR i get: > > > >> mri=ft_read_mri('F:\SUBJECT29_BUENO\Subject29\mri\filled.mgz'); > The system cannot find the path specified. > ERROR: could not open /tmp/tmp7914012.mgh for reading > ERROR: loading F:\SUBJECT29_BUENO\Subject29\mri\filled.mgz as MGH > ??? Attempt to reference field of non-structure array. > Error in ==> ft_read_mri at 248 > ndims = numel(size(tmp.vol)); > > Hope anyone can help me. Thanks! > _______________________________________________ > 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 -------------- next part -------------- An HTML attachment was scrubbed... URL: From jm.horschig at donders.ru.nl Fri Jan 13 10:48:56 2012 From: jm.horschig at donders.ru.nl (=?ISO-8859-1?Q?=22J=F6rn_M=2E_Horschig=22?=) Date: Fri, 13 Jan 2012 10:48:56 +0100 Subject: [FieldTrip] How can I calculate phase locking factor in FieldTrip? In-Reply-To: <75DF5877-BB2D-4918-A4C0-2A66F7EDCF8E@npsych.med.kyushu-u.ac.jp> References: <75DF5877-BB2D-4918-A4C0-2A66F7EDCF8E@npsych.med.kyushu-u.ac.jp> Message-ID: <4F0FFE08.4000004@donders.ru.nl> Dear Shogo, As far as I know, there is no built-in function to compute a phase-locking factor in FieldTrip, so I am afraid that you have to program this on your own. However, all values you need can be collected in FieldTrip. You can either apply a Hilbert transform on your data to obtain instanenous phase (set cfg.hilbert='yes' prior to calling /ft_preprocessing/) or get the phase information out from the fourierspectrum (cfg.output='fourier' prior to calling /ft_freqanalysis/). In both case, you should be able to get the phase out by calling the Matlab built-in function /angle()/. Computing the PLF should then be rather straight-forward. Also, maybe this can be of help: http://en.wikipedia.org/wiki/Von_Mises_distribution Hope this helps! Best, Jörn On 1/13/2012 2:49 AM, ?? ?? wrote: > Hi everyone! > > I'm a FieldTrip beginner and I have a question. > I'm sure I can estimate time frequency power with FieldTrip. > But I don't know how I can estimate time-frequency phase locking factor. > phase locking factor is defined as following equation. > Phase-locking(t)=1/N x |?z(t)|, where N is the number of epochs and z(t) refers to the continuous phase of a single trial. > Here, z is a complex value on the unit circle, i.e., z=exp(jq), where q is the phase of an oscillation and j is the imaginary unit (e.g. Tallon-baudry et al., 1996). > Does anyone know how to calculate this phase locking factor with FieldTrip? > Any answer will help me. > > Best regards, > > Shogo Hirano > > Department of Neuropsychiatry > Graduate school of medical sciences > Kyushu University > Fukuoka, Japan > > > _______________________________________________ > 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 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 lavado at gmail.com Fri Jan 13 11:07:46 2012 From: lavado at gmail.com (Ion Lavado) Date: Fri, 13 Jan 2012 11:07:46 +0100 Subject: [FieldTrip] Problem reading .mgz files In-Reply-To: References: Message-ID: Ok, i'm using Windows platform and Linux for generating the freesurfer mri (.mgz) files. So do you think the solution would be running the matlab script with Linux? Or what can i do to change the style path? Best wishes, Ion 2012/1/13 jan-mathijs schoffelen > Hi Ion, > > What operating system are you working on? It looks like windows, and the > first error is a path error, where the function is looking at a Linux-style > path. > > This is apparently causing trouble. First you get two errors (starting > with ERROR, which are a sign that something went wrong in the low level > reading routines), which do not cause matlab to 'crash' directly. Later in > the code variables are not what they are expected to be (due to the earlier > ERRORs) and this causes a matlab crash (in red). > > So far this whole pipeline has been tested only on the linux platform. I > don't know whether freesurfer (in particular the matlab functions that > FieldTrip relies on to read in the .mgz files) runs without problems on > windows. > Perhaps you first need to find out what causes the first error. It could > well be that FieldTrip needs to use a platform specific reading routine > here. > > BW, > > JM > > > > > On Jan 13, 2012, at 10:00 AM, Ion Lavado wrote: > > Hello, i'm trying source reconstruction using Minimum-Norm Estimates and i > have a problem when reading the (filled.mgz) or any other .mgz file after > using Freesurfer and created the files. > This is the ERROR i get: > > > >> mri=ft_read_mri('F:\SUBJECT29_BUENO\Subject29\mri\filled.mgz'); > The system cannot find the path specified. > ERROR: could not open /tmp/tmp7914012.mgh for reading > ERROR: loading F:\SUBJECT29_BUENO\Subject29\mri\filled.mgz as MGH > ??? Attempt to reference field of non-structure array. > Error in ==> ft_read_mri at 248 > ndims = numel(size(tmp.vol)); > > Hope anyone can help me. Thanks! > _______________________________________________ > 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 > > > _______________________________________________ > 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 Fri Jan 13 13:00:54 2012 From: jan.schoffelen at donders.ru.nl (jan-mathijs schoffelen) Date: Fri, 13 Jan 2012 13:00:54 +0100 Subject: [FieldTrip] Problem reading .mgz files In-Reply-To: References: Message-ID: Yes, please use linux. Lines 61-76 in read_mgh (which is in ~/fieldtrip/external/freesurfer) suggest that files with extension .mgz can only be read with linux or MacOS. BW, JM Line On Jan 13, 2012, at 11:07 AM, Ion Lavado wrote: > Ok, i'm using Windows platform and Linux for generating the freesurfer mri (.mgz) files. So do you think the solution would be running the matlab script with Linux? Or what can i do to change the style path? > > Best wishes, > > Ion > > 2012/1/13 jan-mathijs schoffelen > Hi Ion, > > What operating system are you working on? It looks like windows, and the first error is a path error, where the function is looking at a Linux-style path. > > This is apparently causing trouble. First you get two errors (starting with ERROR, which are a sign that something went wrong in the low level reading routines), which do not cause matlab to 'crash' directly. Later in the code variables are not what they are expected to be (due to the earlier ERRORs) and this causes a matlab crash (in red). > > So far this whole pipeline has been tested only on the linux platform. I don't know whether freesurfer (in particular the matlab functions that FieldTrip relies on to read in the .mgz files) runs without problems on windows. > Perhaps you first need to find out what causes the first error. It could well be that FieldTrip needs to use a platform specific reading routine here. > > BW, > > JM > > > > > On Jan 13, 2012, at 10:00 AM, Ion Lavado wrote: > >> Hello, i'm trying source reconstruction using Minimum-Norm Estimates and i have a problem when reading the (filled.mgz) or any other .mgz file after using Freesurfer and created the files. >> This is the ERROR i get: >> >> >> >> mri=ft_read_mri('F:\SUBJECT29_BUENO\Subject29\mri\filled.mgz'); >> The system cannot find the path specified. >> ERROR: could not open /tmp/tmp7914012.mgh for reading >> ERROR: loading F:\SUBJECT29_BUENO\Subject29\mri\filled.mgz as MGH >> ??? Attempt to reference field of non-structure array. >> Error in ==> ft_read_mri at 248 >> ndims = numel(size(tmp.vol)); >> >> Hope anyone can help me. Thanks! >> _______________________________________________ >> 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 > > > _______________________________________________ > 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 -------------- next part -------------- An HTML attachment was scrubbed... URL: From jan.schoffelen at donders.ru.nl Fri Jan 13 13:04:26 2012 From: jan.schoffelen at donders.ru.nl (jan-mathijs schoffelen) Date: Fri, 13 Jan 2012 13:04:26 +0100 Subject: [FieldTrip] Problem reading .mgz files In-Reply-To: References: Message-ID: Sorry, I meant load_mgh rather than read_mgh JM On Jan 13, 2012, at 1:00 PM, jan-mathijs schoffelen wrote: > Yes, please use linux. Lines 61-76 in read_mgh (which is in ~/fieldtrip/external/freesurfer) suggest that files with extension .mgz can only be read with linux or MacOS. > > BW, > > JM > > Line > > On Jan 13, 2012, at 11:07 AM, Ion Lavado wrote: > >> Ok, i'm using Windows platform and Linux for generating the freesurfer mri (.mgz) files. So do you think the solution would be running the matlab script with Linux? Or what can i do to change the style path? >> >> Best wishes, >> >> Ion >> >> 2012/1/13 jan-mathijs schoffelen >> Hi Ion, >> >> What operating system are you working on? It looks like windows, and the first error is a path error, where the function is looking at a Linux-style path. >> >> This is apparently causing trouble. First you get two errors (starting with ERROR, which are a sign that something went wrong in the low level reading routines), which do not cause matlab to 'crash' directly. Later in the code variables are not what they are expected to be (due to the earlier ERRORs) and this causes a matlab crash (in red). >> >> So far this whole pipeline has been tested only on the linux platform. I don't know whether freesurfer (in particular the matlab functions that FieldTrip relies on to read in the .mgz files) runs without problems on windows. >> Perhaps you first need to find out what causes the first error. It could well be that FieldTrip needs to use a platform specific reading routine here. >> >> BW, >> >> JM >> >> >> >> >> On Jan 13, 2012, at 10:00 AM, Ion Lavado wrote: >> >>> Hello, i'm trying source reconstruction using Minimum-Norm Estimates and i have a problem when reading the (filled.mgz) or any other .mgz file after using Freesurfer and created the files. >>> This is the ERROR i get: >>> >>> >>> >> mri=ft_read_mri('F:\SUBJECT29_BUENO\Subject29\mri\filled.mgz'); >>> The system cannot find the path specified. >>> ERROR: could not open /tmp/tmp7914012.mgh for reading >>> ERROR: loading F:\SUBJECT29_BUENO\Subject29\mri\filled.mgz as MGH >>> ??? Attempt to reference field of non-structure array. >>> Error in ==> ft_read_mri at 248 >>> ndims = numel(size(tmp.vol)); >>> >>> Hope anyone can help me. Thanks! >>> _______________________________________________ >>> 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 >> >> >> _______________________________________________ >> 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 > > _______________________________________________ > 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 -------------- next part -------------- An HTML attachment was scrubbed... URL: From lihqih at gmail.com Fri Jan 13 17:58:20 2012 From: lihqih at gmail.com (qi li) Date: Fri, 13 Jan 2012 11:58:20 -0500 Subject: [FieldTrip] ft_redefinetrial problem In-Reply-To: <40F79FF9-A96B-4AEC-97FD-5C78BAC8377B@donders.ru.nl> References: <40F79FF9-A96B-4AEC-97FD-5C78BAC8377B@donders.ru.nl> Message-ID: Hi All, Thanks a lot for your help! The codes look like this cfg=[]; cfg.trl=trial; %user defined 20*3 matrix triggered_trials=ft_redefinetrial(cfg,triggered_trials); cfg = []; cfg.method = 'triangulation'; cfg.neighbours = ft_neighbourselection(cfg, triggered_trials); The error message is 'sen.pnt' not found. I am using 1223 version. Qi On Thu, Jan 12, 2012 at 4:09 PM, jan-mathijs schoffelen < jan.schoffelen at donders.ru.nl> wrote: > Hi guys, > > I agree with Nathan that some additional information would be helpful. The > 'problem' Qi relates to (at least the issue with the hdr.grad) is a change > in the way the sensor-array is defined in FT. A while ago we changed the > .pnt/.ori naming scheme into .chanpos/.coilpos/.coilori to make the > distinction between channels and coils more transparent. There is a thread > on this mailing list about it and more documentation can be found on: > > > http://fieldtrip.fcdonders.nl/faq/how_are_electrodes_magnetometers_or_gradiometers_described > > In general this change should not affect your analysis, unless you are > relying on outdated code, or custom-written code which expects the > .pnt/.ori fields still to be present. > > If you want to chop up your data into short fixed length segment, you > should use ft_redefinetrial with the options: cfg.length and cfg.overlap. > > BW, > > JM > > On Jan 12, 2012, at 10:02 PM, Nathan Weisz wrote: > > Hi Qi, > > providing some code, including some output may actually help … > > I am unaware of ft_redifinetrial altering the contents of your hdr field > (i admit i have never paid attention to it), but even if it did how does > this affect your subsequent analysis steps? e.g. at least to my knowledge, > FT looks for data.grad (instead of data.hdr.grad) e.g. for plotting, source > analysis etc. so if you add your grad info via ft_read_sens, then > everything should be fine … > > otherwise, if the original hdr content is so important, then save it as a > temporary variable and add it to your redefined trial later. > > but perhaps i have totally misunderstood your problem. in that case see > introductory remark on code. > > good luck, > n > > On 12.01.2012, at 17:20, qi li wrote: > > Hi, > > I have a fixed length experiment raw. I apply ft_redefinetrial with > cfg.trl to epoch it into many segments. When this step is done, the > output.hdr.grad has different fields from the input field. More > specifically the pnt and ori field are gone thus cause trouble for the > later analysis.* *I am using 12/23 version, is there a bug or it is > suppose to be so. > > If I only want to separate the long data into segments, which command can > change only the time window while keeping all the other parameters > unchanged? > > Thanks! > > Qi > > > _______________________________________________ > 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 > > > _______________________________________________ > 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 Fri Jan 13 20:12:31 2012 From: jan.schoffelen at donders.ru.nl (jan-mathijs schoffelen) Date: Fri, 13 Jan 2012 20:12:31 +0100 Subject: [FieldTrip] ft_redefinetrial problem In-Reply-To: References: <40F79FF9-A96B-4AEC-97FD-5C78BAC8377B@donders.ru.nl> Message-ID: <440417D5-7D42-4203-92C2-4B1067C46AFE@donders.ru.nl> What is the stack of the error? I.e. in what line of what function (and calling functions) does it occur? Jan-Mathijs On Jan 13, 2012, at 5:58 PM, qi li wrote: > Hi All, > > Thanks a lot for your help! The codes look like this > > cfg=[]; > cfg.trl=trial; %user defined 20*3 matrix > triggered_trials=ft_redefinetrial(cfg,triggered_trials); > > > cfg = []; > cfg.method = 'triangulation'; > cfg.neighbours = ft_neighbourselection(cfg, triggered_trials); > > The error message is 'sen.pnt' not found. I am using 1223 version. > > Qi > > On Thu, Jan 12, 2012 at 4:09 PM, jan-mathijs schoffelen wrote: > Hi guys, > > I agree with Nathan that some additional information would be helpful. The 'problem' Qi relates to (at least the issue with the hdr.grad) is a change in the way the sensor-array is defined in FT. A while ago we changed the .pnt/.ori naming scheme into .chanpos/.coilpos/.coilori to make the distinction between channels and coils more transparent. There is a thread on this mailing list about it and more documentation can be found on: > > http://fieldtrip.fcdonders.nl/faq/how_are_electrodes_magnetometers_or_gradiometers_described > > In general this change should not affect your analysis, unless you are relying on outdated code, or custom-written code which expects the .pnt/.ori fields still to be present. > > If you want to chop up your data into short fixed length segment, you should use ft_redefinetrial with the options: cfg.length and cfg.overlap. > > BW, > > JM > > On Jan 12, 2012, at 10:02 PM, Nathan Weisz wrote: > >> Hi Qi, >> >> providing some code, including some output may actually help … >> >> I am unaware of ft_redifinetrial altering the contents of your hdr field (i admit i have never paid attention to it), but even if it did how does this affect your subsequent analysis steps? e.g. at least to my knowledge, FT looks for data.grad (instead of data.hdr.grad) e.g. for plotting, source analysis etc. so if you add your grad info via ft_read_sens, then everything should be fine … >> >> otherwise, if the original hdr content is so important, then save it as a temporary variable and add it to your redefined trial later. >> >> but perhaps i have totally misunderstood your problem. in that case see introductory remark on code. >> >> good luck, >> n >> >> On 12.01.2012, at 17:20, qi li wrote: >> >>> Hi, >>> >>> I have a fixed length experiment raw. I apply ft_redefinetrial with cfg.trl to epoch it into many segments. When this step is done, the output.hdr.grad has different fields from the input field. More specifically the pnt and ori field are gone thus cause trouble for the later analysis. I am using 12/23 version, is there a bug or it is suppose to be so. >>> >>> If I only want to separate the long data into segments, which command can change only the time window while keeping all the other parameters unchanged? >>> >>> Thanks! >>> >>> Qi >>> >>> >>> _______________________________________________ >>> 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 > > > _______________________________________________ > 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 -------------- next part -------------- An HTML attachment was scrubbed... URL: From lihqih at gmail.com Fri Jan 13 23:26:08 2012 From: lihqih at gmail.com (qi li) Date: Fri, 13 Jan 2012 17:26:08 -0500 Subject: [FieldTrip] ft_redefinetrial problem In-Reply-To: <440417D5-7D42-4203-92C2-4B1067C46AFE@donders.ru.nl> References: <40F79FF9-A96B-4AEC-97FD-5C78BAC8377B@donders.ru.nl> <440417D5-7D42-4203-92C2-4B1067C46AFE@donders.ru.nl> Message-ID: Hi Jan, FYI. The error message is as follows, the input is raw data with 275 channels and 16 trials Using the gradiometer configuration from the dataset. undoing the G3BR balancing Reference to non-existent field 'pnt'. Error in channelposition (line 234) pnt = sens.pnt; Error in ft_neighbourselection (line 110) [sens.pnt, sens.label] = channelposition(sens); Error in onetrialintotrials (line 100) cfg.neighbours = ft_neighbourselection(cfg, triggered_trials); Another similar problem arises when you have done PCA and want to remove some components. You command is as follows, cfg=[]; cfg.topo=comp.topo; cfg.topolabel=comp.topolabel; comp_o=ft_componentanalysis(cfg,data_I4); cfg=[]; cfg.component=[1]; data_I4c=ft_rejectcomponent(cfg,comp_o) Errors pop up, Reference to non-existent field 'invcomp'. Error in ft_rejectcomponent (line 181) [junk, remove] = match_str(comp.label, tmp.balance.invcomp.labelnew); Both error in 1223 version. I hope this information is useful. Thanks! Qi On Fri, Jan 13, 2012 at 2:12 PM, jan-mathijs schoffelen < jan.schoffelen at donders.ru.nl> wrote: > What is the stack of the error? I.e. in what line of what function (and > calling functions) does it occur? > > Jan-Mathijs > > On Jan 13, 2012, at 5:58 PM, qi li wrote: > > Hi All, > > Thanks a lot for your help! The codes look like this > > cfg=[]; > cfg.trl=trial; %user defined 20*3 matrix > triggered_trials=ft_redefinetrial(cfg,triggered_trials); > > > cfg = []; > cfg.method = 'triangulation'; > cfg.neighbours = ft_neighbourselection(cfg, triggered_trials); > > The error message is 'sen.pnt' not found. I am using 1223 version. > > Qi > > On Thu, Jan 12, 2012 at 4:09 PM, jan-mathijs schoffelen < > jan.schoffelen at donders.ru.nl> wrote: > >> Hi guys, >> >> I agree with Nathan that some additional information would be >> helpful. The 'problem' Qi relates to (at least the issue with the hdr.grad) >> is a change in the way the sensor-array is defined in FT. A while ago we >> changed the .pnt/.ori naming scheme into .chanpos/.coilpos/.coilori to make >> the distinction between channels and coils more transparent. There is a >> thread on this mailing list about it and more documentation can be found on: >> >> >> http://fieldtrip.fcdonders.nl/faq/how_are_electrodes_magnetometers_or_gradiometers_described >> >> In general this change should not affect your analysis, unless you are >> relying on outdated code, or custom-written code which expects the >> .pnt/.ori fields still to be present. >> >> If you want to chop up your data into short fixed length segment, you >> should use ft_redefinetrial with the options: cfg.length and cfg.overlap. >> >> BW, >> >> JM >> >> On Jan 12, 2012, at 10:02 PM, Nathan Weisz wrote: >> >> Hi Qi, >> >> providing some code, including some output may actually help … >> >> I am unaware of ft_redifinetrial altering the contents of your hdr field >> (i admit i have never paid attention to it), but even if it did how does >> this affect your subsequent analysis steps? e.g. at least to my knowledge, >> FT looks for data.grad (instead of data.hdr.grad) e.g. for plotting, source >> analysis etc. so if you add your grad info via ft_read_sens, then >> everything should be fine … >> >> otherwise, if the original hdr content is so important, then save it as a >> temporary variable and add it to your redefined trial later. >> >> but perhaps i have totally misunderstood your problem. in that case see >> introductory remark on code. >> >> good luck, >> n >> >> On 12.01.2012, at 17:20, qi li wrote: >> >> Hi, >> >> I have a fixed length experiment raw. I apply ft_redefinetrial with >> cfg.trl to epoch it into many segments. When this step is done, the >> output.hdr.grad has different fields from the input field. More >> specifically the pnt and ori field are gone thus cause trouble for the >> later analysis.* *I am using 12/23 version, is there a bug or it is >> suppose to be so. >> >> If I only want to separate the long data into segments, which command can >> change only the time window while keeping all the other parameters >> unchanged? >> >> Thanks! >> >> Qi >> >> >> _______________________________________________ >> 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 >> >> >> _______________________________________________ >> 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 > > > _______________________________________________ > 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 shhirano at npsych.med.kyushu-u.ac.jp Sat Jan 14 01:30:07 2012 From: shhirano at npsych.med.kyushu-u.ac.jp (=?iso-2022-jp?B?GyRCSj9MbhsoQiAbJEI+PDhjGyhC?=) Date: Sat, 14 Jan 2012 09:30:07 +0900 Subject: [FieldTrip] How can I calculate phase locking factor in FieldTrip? Message-ID: Dear Jörn Thank you for your wonderful advice! I'll try! Best regards, Shogo -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: SpamAssassinReport.txt URL: From jan.schoffelen at donders.ru.nl Sat Jan 14 09:10:13 2012 From: jan.schoffelen at donders.ru.nl (jan-mathijs schoffelen) Date: Sat, 14 Jan 2012 09:10:13 +0100 Subject: [FieldTrip] ft_redefinetrial problem In-Reply-To: References: <40F79FF9-A96B-4AEC-97FD-5C78BAC8377B@donders.ru.nl> <440417D5-7D42-4203-92C2-4B1067C46AFE@donders.ru.nl> Message-ID: <32B29B66-DFA7-4561-BB46-22A08F4E8542@donders.ru.nl> Hi Qi, Ft_neighbourselection has been changed since October 11. The version you are executing is therefore an old one and is not guaranteed to work. Please remove this version of ft_neighbourselection from your path, and try again. The correct version is in fieldtrip/compat/, and you will notice that this is just a backward compatibility wrapper that is pointing to the function ft_prepare_neighbours, which is the one you should actually use. Jan-Mathijs On Jan 13, 2012, at 11:26 PM, qi li wrote: > Hi Jan, > > FYI. The error message is as follows, > > the input is raw data with 275 channels and 16 trials > Using the gradiometer configuration from the dataset. > undoing the G3BR balancing > Reference to non-existent field 'pnt'. > > Error in channelposition (line 234) > pnt = sens.pnt; > > Error in ft_neighbourselection (line 110) > [sens.pnt, sens.label] = channelposition(sens); > > Error in onetrialintotrials (line 100) > cfg.neighbours = ft_neighbourselection(cfg, triggered_trials); > > Another similar problem arises when you have done PCA and want to remove some components. > > You command is as follows, > cfg=[]; > cfg.topo=comp.topo; > cfg.topolabel=comp.topolabel; > comp_o=ft_componentanalysis(cfg,data_I4); > cfg=[]; > cfg.component=[1]; > data_I4c=ft_rejectcomponent(cfg,comp_o) > > Errors pop up, > > Reference to non-existent field 'invcomp'. > > Error in ft_rejectcomponent (line 181) > [junk, remove] = match_str(comp.label, tmp.balance.invcomp.labelnew); > > Both error in 1223 version. > > I hope this information is useful. > > Thanks! > > Qi > > > > On Fri, Jan 13, 2012 at 2:12 PM, jan-mathijs schoffelen wrote: > What is the stack of the error? I.e. in what line of what function (and calling functions) does it occur? > > Jan-Mathijs > > On Jan 13, 2012, at 5:58 PM, qi li wrote: > >> Hi All, >> >> Thanks a lot for your help! The codes look like this >> >> cfg=[]; >> cfg.trl=trial; %user defined 20*3 matrix >> triggered_trials=ft_redefinetrial(cfg,triggered_trials); >> >> >> cfg = []; >> cfg.method = 'triangulation'; >> cfg.neighbours = ft_neighbourselection(cfg, triggered_trials); >> >> The error message is 'sen.pnt' not found. I am using 1223 version. >> >> Qi >> >> On Thu, Jan 12, 2012 at 4:09 PM, jan-mathijs schoffelen wrote: >> Hi guys, >> >> I agree with Nathan that some additional information would be helpful. The 'problem' Qi relates to (at least the issue with the hdr.grad) is a change in the way the sensor-array is defined in FT. A while ago we changed the .pnt/.ori naming scheme into .chanpos/.coilpos/.coilori to make the distinction between channels and coils more transparent. There is a thread on this mailing list about it and more documentation can be found on: >> >> http://fieldtrip.fcdonders.nl/faq/how_are_electrodes_magnetometers_or_gradiometers_described >> >> In general this change should not affect your analysis, unless you are relying on outdated code, or custom-written code which expects the .pnt/.ori fields still to be present. >> >> If you want to chop up your data into short fixed length segment, you should use ft_redefinetrial with the options: cfg.length and cfg.overlap. >> >> BW, >> >> JM >> >> On Jan 12, 2012, at 10:02 PM, Nathan Weisz wrote: >> >>> Hi Qi, >>> >>> providing some code, including some output may actually help … >>> >>> I am unaware of ft_redifinetrial altering the contents of your hdr field (i admit i have never paid attention to it), but even if it did how does this affect your subsequent analysis steps? e.g. at least to my knowledge, FT looks for data.grad (instead of data.hdr.grad) e.g. for plotting, source analysis etc. so if you add your grad info via ft_read_sens, then everything should be fine … >>> >>> otherwise, if the original hdr content is so important, then save it as a temporary variable and add it to your redefined trial later. >>> >>> but perhaps i have totally misunderstood your problem. in that case see introductory remark on code. >>> >>> good luck, >>> n >>> >>> On 12.01.2012, at 17:20, qi li wrote: >>> >>>> Hi, >>>> >>>> I have a fixed length experiment raw. I apply ft_redefinetrial with cfg.trl to epoch it into many segments. When this step is done, the output.hdr.grad has different fields from the input field. More specifically the pnt and ori field are gone thus cause trouble for the later analysis. I am using 12/23 version, is there a bug or it is suppose to be so. >>>> >>>> If I only want to separate the long data into segments, which command can change only the time window while keeping all the other parameters unchanged? >>>> >>>> Thanks! >>>> >>>> Qi >>>> >>>> >>>> _______________________________________________ >>>> 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 >> >> >> _______________________________________________ >> 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 > > > _______________________________________________ > 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 -------------- next part -------------- An HTML attachment was scrubbed... URL: From hamzaf at sabanciuniv.edu Fri Jan 13 15:44:12 2012 From: hamzaf at sabanciuniv.edu (Hamza Fawzi Altakroury (Student)) Date: Fri, 13 Jan 2012 16:44:12 +0200 Subject: [FieldTrip] Simple way to generate cfg Message-ID: Hello, I noticed that almost all your files require a cfg (a structure containing information about the buffer, as I understand). Is there any function to generate these cfg in a simple way. Best, Hamza -- Hamza Fawzi Altakroury Graduate student - MA Faculty of Engineering and Natural Sciences Sabancı University -------------- next part -------------- An HTML attachment was scrubbed... URL: From lihqih at gmail.com Sat Jan 14 18:09:20 2012 From: lihqih at gmail.com (qi li) Date: Sat, 14 Jan 2012 12:09:20 -0500 Subject: [FieldTrip] reject component Message-ID: Hi there, I am having trouble to reject components after ICA/PCA done. Can somebody help on this? My command is as follows, cfg=[]; cfg.topo=comp.topo; cfg.topolabel=comp.topolabel; comp_o=ft_componentanalysis(cfg,data_I4); cfg=[]; cfg.component=[1 3 7]; data_I4c=ft_rejectcomponent(cfg,comp_o) Errors pop up, Reference to non-existent field 'invcomp'. Error in ft_rejectcomponent (line 181) [junk, remove] = match_str(comp.label, tmp.balance.invcomp.labelnew); -------------- next part -------------- An HTML attachment was scrubbed... URL: From politzerahless at gmail.com Mon Jan 16 08:02:29 2012 From: politzerahless at gmail.com (Stephen Politzer-Ahles) Date: Mon, 16 Jan 2012 01:02:29 -0600 Subject: [FieldTrip] Simple way to generate cfg Message-ID: Hello Hamza, For many of the functions, the corresponding tutorial on the wiki has sample code, you can just copy and paste that code (along with the cfg) and edit whatever information you need. Even if there is no tutorial, all the functions have reference pages on the wiki (which you can find by searching for the name of the function) which list all the parameters you can use. If you don't need to specify any information for a particular function, you can create an 'empty' cfg by just typing cfg=[]; before the function. Best, Steve Politzer-Ahles Hello, > > I noticed that almost all your files require a cfg (a structure containing > information about the buffer, as I understand). > > Is there any function to generate these cfg in a simple way. > > Best, > > Hamza > > -- > Hamza Fawzi Altakroury > Graduate student - MA > Faculty of Engineering and Natural Sciences > Sabanc? University > -------------- next part -------------- An HTML attachment was scrubbed... URL: From f.barcelo at uib.es Mon Jan 16 18:21:50 2012 From: f.barcelo at uib.es (Francisco Barcelo) Date: Mon, 16 Jan 2012 18:21:50 +0100 Subject: [FieldTrip] PhD and postdoctoral positions in cognitive electrophysiology in Majorca Message-ID: Dear colleagues, We are looking for a postdoc and a PhD student with EEG or MEG experience to work here in Majorca (pdf files attached). More info at: www.mcst.es With regards, Francisco Barceló -- ><><><><><><><><><><><><><>< Dr. Francisco Barceló Ed. Beatriu de Pinos #12 University of Illes Balears (UIB) Ctra. Valldemossa, km 7.5 E-07122 Palma de Mallorca - Spain Personal: www.mcst.es Lab: www.neuropsicologiaclinica.es Phone: 971 172750 Fax: 971 172309 ResearchID http://www.researcherid.com/rid/B-3629-2011 Job opportunities in Cognitive Neuroscience ><><><><><><><><><><><><><>< -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: ad_postdoc_cognitive_neuroscience.pdf Type: application/pdf Size: 73442 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: ad_PhD_cognitive_neuroscience.pdf Type: application/pdf Size: 72974 bytes Desc: not available URL: From sangita.dandekar at gmail.com Tue Jan 17 19:56:53 2012 From: sangita.dandekar at gmail.com (Sangita Dandekar) Date: Tue, 17 Jan 2012 13:56:53 -0500 Subject: [FieldTrip] non-parametric methods for comparison of power spectra Message-ID: Dear Fieldtrippers, Forgive me if I have overlooked something in the FT documentation, but I was wondering if there are any non-parametric methods for comparison of power spectra in Fieldtrip? When I say 'power spectra' I mean frequency vs power spectrum data without a time component (i.e. not the TFR data structures in Fieldtrip, but what one would get by applying an FFT to a time series and finding the magnitude of the power spectrum as a function of frequency). One (clumsy) way to do this would be to use the framework of FT's timelockstatistics function, but instead of entering channel x time x voltage data for each trial, use channel x frequency x power data for each trial. I think the above should work, but am guessing it will probably be fine for detecting low frequency differences but not as sensitive for differences in the higher frequencies due to the 1/f power spectrum. Is there an alternative method that anyone can suggest? Does the suggested method above sound ok? Maybe log transforming prior to application of the existing timelockstatistics framework? Thanks in advance for any help! Sangi From g.piantoni at nin.knaw.nl Tue Jan 17 22:17:09 2012 From: g.piantoni at nin.knaw.nl (Gio Piantoni) Date: Tue, 17 Jan 2012 22:17:09 +0100 Subject: [FieldTrip] non-parametric methods for comparison of power spectra In-Reply-To: References: Message-ID: Hi Sangita, I think that Fieldtrip can handle your problem just fine, if I understand your point correctly. If you run ft_freqanalysis with 'mtmfft', foilim [0 50] and keeptrials='yes', you'll get a structure with dimension trials x channel x frequency, where each element of the 3d matrix contains power spectra. You can check the .dimord field, which will be 'rpt_chan_freq'. I don't understand your notation "channel x frequency x power data". Do you mean a 'chan_freq' matrix with power data in there? You'll need trials (or subjects) to calculate any parametric or not statistics. You can then use the output of ft_freqanalysis for your statistics. It does not need any tweaking. The 1/f effect is not a problem because you're testing a difference from zero, or a difference between two conditions. So, while the mean over trials becomes smaller in absolute values, the standard error becomes smaller as well in absolute terms, resulting in roughly consistent t-values. In any case, log-transformation might make your power data more normal, so that will probably make your statistic more sound. If this is not clear to you, please include part of your code and we might help you further. Hope this helps, Gio -- Giovanni Piantoni, Ph.D. student Dept. Sleep & Cognition Netherlands Institute for Neuroscience Meibergdreef 47 1105 BA Amsterdam (NL) +31 (0)20 5665492 g.piantoni at nin.knaw.nl www.giovannipiantoni.com On Tue, Jan 17, 2012 at 19:56, Sangita Dandekar wrote: > Dear Fieldtrippers, > > Forgive me if I have overlooked something in the FT documentation, but > I was wondering if there are any non-parametric methods for comparison > of power spectra in Fieldtrip?  When I say 'power spectra' I mean > frequency vs power spectrum data without a time component (i.e. not > the TFR data structures in Fieldtrip, but what one would get by > applying an FFT to a time series and finding the magnitude of the > power spectrum as a function of frequency). > > One (clumsy) way to do this would be to use the framework of FT's > timelockstatistics function, but instead of entering channel x time x > voltage data for each trial, use channel x  frequency x power data for > each trial. > > I think the above should work, but am guessing it will probably be > fine for detecting low frequency differences but not as sensitive for > differences in the higher frequencies due to the 1/f power spectrum. > > Is there an alternative method that anyone can suggest? Does the > suggested method above sound ok?  Maybe log transforming prior to > application of the existing timelockstatistics framework? > > Thanks in advance for any help! > Sangi > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip From stefan.debener at uni-oldenburg.de Wed Jan 18 13:51:35 2012 From: stefan.debener at uni-oldenburg.de (Stefan Debener) Date: Wed, 18 Jan 2012 13:51:35 +0100 Subject: [FieldTrip] 14 Positions on the Neuroscience of Learning and Brain Plasticity Message-ID: <4F16C057.4010209@uni-oldenburg.de> 14 Positions on the neuroscience of learning and brain plasticity PhD / early-Postdoc positions are available to work with International research leaders in top European Universities and market-leading companies in the area of learning and brain plasticity. The European Community Seventh Framework Initial Training Network "Adaptive Brain Computations" (ABC) is a multi-disciplinary research and training programme which aims to integrate the study of learning and brain plasticity to promote wellbeing and advance healthcare interventions. The network takes a multidisciplinary approach, synthesising methods from brain imaging, behavioural science, physiology, and computational modelling to understand brain plasticity. Involvement in the network provides exciting opportunities for high-level research training, international travel and exchange between labs. For more information on ABC, please check: http://cnil.bham.ac.uk/ABC/index.html Eligibility criteria: 1. You should have a background in subjects related to the research including neuroscience, cognitive psychology, computer science, engineering or physics. 2. You should be in the first 4 years of your research career and should not yet have been awarded a PhD. 3. You must not have lived in the same country as the institution to which you are applying for >12 months during the past 3 years. Applications: To apply, please contact the relevant Principal Investigator directly as listed below. Please send CV, personal statement of research background and interests and the name of 3 referees. Professor Stefan Debener (stefan.debener at uni-oldenburg.de ) -- University of Oldenburg, Germany. Expertise: audio-visual integration, sensory deprivation, simultaneous EEG-fMRI Prof. Martin Giese (martin.giese at uni-tuebingen.de ) --Eberhard Karls Universität Tübingen, Germany. Expertise: computational models of motion recognition and learning, stroke rehabilitation Prof. Rainer Goebel (goebel at brainvoyager.com ) -- Brain Innovation, Netherlands. Expertise: brain imaging analysis and visualization, real-time fMRI, neurofeedback Dr. Ingmar Gutberlet (gutberlet at blindsight.de ) -- BlindSight GmbH, Germany Expertise: advanced analysis of EEG/fMRI signals, artefact correction signal integration. Prof. Heidi Johansen-Berg (heidi at fmrib.ox.ac.uk ) -- University of Oxford, UK. Expertise: brain plasticity, stroke recovery, structural and functional brain imaging Prof. Zoe Kourtzi (z.kourtzi at bham.ac.uk ) -- University of Birmingham, UK. Expertise: visual learning, object recognition and categorization, multimodal brain imaging (fMRI, EEG, TMS) Prof. Stefano Panzeri (Stefano.Panzeri at iit.it ) -- Istituto Italiano di Tecnologia, Italy Expertise: neural networks, information theory Professor Pieter Roelfsema (p.roelfsema at nin.knaw.nl ) -- National Institute for Neuroscience, Netherlands Expertise: neural circuits, visual learning and attention, neurophysiology, computational modelling. Prof. Rufin Vogels (rufin.vogels at med.kuleuven.be ) -- Katholieke Universiteit Leuven Expertise: visual perception, perceptual learning, object categorization, neurophysiology -- Prof. Dr. Stefan Debener Neuropsychology Lab Department of Psychology University of Oldenburg D-26111 Oldenburg Germany Office: A7 0-038 Phone: +49-441-798-4271 Fax: +49-441-798-5522 Email: stefan.debener at uni-oldenburg.de -------------- next part -------------- An HTML attachment was scrubbed... URL: From lavado at gmail.com Thu Jan 19 09:25:16 2012 From: lavado at gmail.com (Ion Lavado) Date: Thu, 19 Jan 2012 09:25:16 +0100 Subject: [FieldTrip] Source reconstruction with MNE problem: vol doen's fit sourcespace Message-ID: Hello, i'm trying a source reconstruction of event related fields using minimun-norm estimates and i get a problem with vol and sourcespace. When plot them together the vol doesn't fit the sourcespace. I adjunted in the mail two images where you can see what i get. It looks like that there isn't any problem of coordinate system also the units seem to be ok. I also procesed all the file with freesurfer so i suppose there is no problem with the orig-nomask.mgz. Hope anyone can help me. Thank you very much. Ion -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: 1.JPG Type: image/jpeg Size: 273695 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: 2.JPG Type: image/jpeg Size: 279282 bytes Desc: not available URL: From a.stolk at fcdonders.ru.nl Thu Jan 19 10:23:47 2012 From: a.stolk at fcdonders.ru.nl (Stolk, A.) Date: Thu, 19 Jan 2012 10:23:47 +0100 (CET) Subject: [FieldTrip] Source reconstruction with MNE problem: vol doen's fit sourcespace In-Reply-To: <437783613.742730.1326964902431.JavaMail.root@sculptor.zimbra.ru.nl> Message-ID: <2143371294.742821.1326965027489.JavaMail.root@sculptor.zimbra.ru.nl> Hi Ion, Did you realign your anatomical image to Ta lairach space (and not accidentally to MNI space)  prior to the processing with Freesurfer? http://imaging.mrc-cbu.cam.ac.uk/imaging/FindingCommissures Best regards, Arjen ----- "Ion Lavado" schreef: > Van: "Ion Lavado" > Aan: fieldtrip at donders.ru.nl > Verzonden: Donderdag 19 januari 2012 09:25:16 > Onderwerp: [FieldTrip] Source reconstruction with MNE problem: vol doen's fit        sourcespace > > Hello, i'm trying a source reconstruction of event related fields using minimun-norm estimates and i get a problem with vol and sourcespace. When plot them together the vol doesn't fit the sourcespace. I adjunted in the mail two images where you can see what i get. It looks like that there isn't any problem of coordinate system also the units seem to be ok. I also procesed all the file with freesurfer so i suppose there is no problem with the orig-nomask.mgz. Hope anyone can help me. Thank you very much. > Ion > _______________________________________________ > 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 lihqih at gmail.com Thu Jan 19 17:28:27 2012 From: lihqih at gmail.com (qi li) Date: Thu, 19 Jan 2012 11:28:27 -0500 Subject: [FieldTrip] any function can do the sliding window average Message-ID: Hi, I am wondering if there are any functions can do the sliding window average of the processed epoch-ed data. It should work as a low pass filter. ft_freqanalysis has a sliding window built in for the frequency domain quantities, I am looking for a function working in the time domain. Thanks! Qi From jan.schoffelen at donders.ru.nl Thu Jan 19 17:51:28 2012 From: jan.schoffelen at donders.ru.nl (jan-mathijs schoffelen) Date: Thu, 19 Jan 2012 17:51:28 +0100 Subject: [FieldTrip] any function can do the sliding window average In-Reply-To: References: Message-ID: You can use the option cfg.boxcar in ft_preprocessing Best, Jan-Mathijs On Jan 19, 2012, at 5:28 PM, qi li wrote: > Hi, > > I am wondering if there are any functions can do the sliding window > average of the processed epoch-ed data. It should work as a low pass > filter. ft_freqanalysis has a sliding window built in for the > frequency domain quantities, I am looking for a function working in > the time domain. Thanks! > > Qi > _______________________________________________ > 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 -------------- next part -------------- An HTML attachment was scrubbed... URL: From ghahremani.aida at gmail.com Thu Jan 19 20:01:44 2012 From: ghahremani.aida at gmail.com (aida ghahremani) Date: Thu, 19 Jan 2012 14:01:44 -0500 Subject: [FieldTrip] A problem Message-ID: Dear Fieldtrip group I have the coordinates of the cortex. Would you please help me to locates the sources (dipoles) which best explain the EEG? How I can make their orientations normal to the cortex? Best Ayda On Thu, Jan 19, 2012 at 3:25 AM, wrote: > Send fieldtrip mailing list submissions to > fieldtrip at donders.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 donders.ru.nl > > You can reach the person managing the list at > fieldtrip-owner at donders.ru.nl > > When replying, please edit your Subject line so it is more specific > than "Re: Contents of fieldtrip digest..." > > > Today's Topics: > > 1. Source reconstruction with MNE problem: vol doen's fit > sourcespace (Ion Lavado) > > > ---------------------------------------------------------------------- > > Message: 1 > Date: Thu, 19 Jan 2012 09:25:16 +0100 > From: Ion Lavado > To: fieldtrip at donders.ru.nl > Subject: [FieldTrip] Source reconstruction with MNE problem: vol > doen's fit sourcespace > Message-ID: > > > Content-Type: text/plain; charset="iso-8859-1" > > Hello, i'm trying a source reconstruction of event related fields using > minimun-norm estimates and i get a problem with vol and sourcespace. When > plot them together the vol doesn't fit the sourcespace. I adjunted in the > mail two images where you can see what i get. It looks like that there > isn't any problem of coordinate system also the units seem to be ok. I also > procesed all the file with freesurfer so i suppose there is no problem with > the orig-nomask.mgz. > Hope anyone can help me. Thank you very much. > > Ion > -------------- next part -------------- > An HTML attachment was scrubbed... > URL: < > http://mailman.science.ru.nl/pipermail/fieldtrip/attachments/20120119/fc596f28/attachment.html > > > -------------- next part -------------- > A non-text attachment was scrubbed... > Name: 1.JPG > Type: image/jpeg > Size: 273695 bytes > Desc: not available > URL: < > http://mailman.science.ru.nl/pipermail/fieldtrip/attachments/20120119/fc596f28/attachment.jpe > > > -------------- next part -------------- > A non-text attachment was scrubbed... > Name: 2.JPG > Type: image/jpeg > Size: 279282 bytes > Desc: not available > URL: < > http://mailman.science.ru.nl/pipermail/fieldtrip/attachments/20120119/fc596f28/attachment-0001.jpe > > > > ------------------------------ > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > End of fieldtrip Digest, Vol 14, Issue 27 > ***************************************** > -------------- next part -------------- An HTML attachment was scrubbed... URL: From tara_jacobson at brown.edu Thu Jan 19 22:12:55 2012 From: tara_jacobson at brown.edu (Tara Jacobson) Date: Thu, 19 Jan 2012 16:12:55 -0500 Subject: [FieldTrip] ft_definetrial with .nex files Message-ID: Hello, Does anyone have experience with .nex files? It seems straight forward to be able to define trials using events in the .nex, but ft_definetrial is not recognizing them as events. filename =('11-087_12292011.nex') stim30Hz=[27.25275 159.26715 258.277925 357.2887 489.303075 522.306625 621.317425 786.335425 885.3462 984.356975 1083.36775 1149.3749 1281.3893 1347.396425 1446.40725 1578.4216 1644.4288 1776.443175 1875.45395 1974.464725]; cfg = []; cfg.dataset = filename; cfg.trialdef.triallength=3; cfg.trialdef.eventtype=('Event007'); cfg.trialdef.eventvalue=stim30Hz; cfg=ft_definetrial(cfg); filename = 11-087_12292011.nex Warning: no trialfun was specified, using trialfun_general > In ft_definetrial at 95 evaluating trialfunction 'trialfun_general' reading the events from '11-087_12292011.nex' found 0 events created 676 trials My question is what are the 676 trials if it found no events? Can anyone give me some advice? Thanks very much. -------------- next part -------------- An HTML attachment was scrubbed... URL: From david.m.groppe at gmail.com Fri Jan 20 04:57:22 2012 From: david.m.groppe at gmail.com (David Groppe) Date: Thu, 19 Jan 2012 22:57:22 -0500 Subject: [FieldTrip] MD, DO, or MD/PhD fellowship in epilepsy, brain connectomics, and cognitive neuroscience Message-ID: Fellowship available for work on epilepsy, brain connectomics, and cognitive neuroscience with the Comprehensive Epilepsy Center of the North Shore-LIJ Health System, NY, USA.  This unique fellowship will fund an MD, DO, or MD/PhD to serve as a clinical fellow treating epilepsy patients under the mentorship of a team of experienced epileptologists and to engage in research using neuroimaging and electrophysiology to improve the diagnosis of epilepsy and to further the basic science of human brain function. More specifically, ongoing research projects include: (1) Validation of task-based and resting state fMRI and DTI measures of brain connectivity using electrical stimulation mapping and ECoG (2) Identifying areas of seizure genesis and spread using network analysis of fMRI and ECoG dynamics (3) Investigation of the neuronal dynamics underlying selective attention, language comprehension, visual object identification and auditory stream analysis. For a more detailed description about the lab and representative publications see: http://www.feinsteininstitute.org/Feinstein/Laboratory+for+Multimodal+Human+Brain+Research Candidates should meet the following qualifications: 1) M.D., D.O., or an M.D./Ph.D. degree, 2) Have graduated from or be currently enrolled in a New York state medical school, residency training program or fellowship. 3) Have some background in fMRI, electrophysiology, and/or data analysis using one or more of the following software packages: Matlab, FreeSurfer, FSL, AFNI This is a great opportunity for a physician-scientist to develop both as a clinician and researcher. An ideal candidate would be a neurologist, neurosurgeon or neuroradiologist with an interest in epilepsy, functional neurosurgery or functional brain mapping. This fellowship is part of the New York State ECRIP program, which offers a competitive salary and an opportunity to supplement income with clinical work. Please submit CV and short statement of interest to Dr. Ashesh Mehta at amehta at nshs.edu for more information. -- David Groppe, Ph.D. Postdoctoral Researcher North Shore LIJ Health System New Hyde Park, New York http://www.cogsci.ucsd.edu/~dgroppe/ From tzvetan.popov at uni-konstanz.de Fri Jan 20 09:35:58 2012 From: tzvetan.popov at uni-konstanz.de (Tzvetan Popov) Date: Fri, 20 Jan 2012 09:35:58 +0100 Subject: [FieldTrip] Open postdoctoral position at the University Konstanz, Germany Message-ID: <947A8219-1C38-444E-8B22-EA9D07FB2F68@uni-konstanz.de> Dear colleagues, please forward the message below in case you know of potential candidates. Thank you very much Tzvetan Popov ______________________ Postdoc position (assistant professor level) in Clinical Psychology and Clinical Neuropsychology available at the Department of Psychology, University of Konstanz Closing Date: March 1, 2012 Salary (TVL 13, full-time): Responsibilities The Clinical Psychology & Clinical Neuroscience branch of the department (chairs Brigitte Rockstroh, Thomas Elbert) are involved in BSc and MSc programs on Clinical Psychology (introductory and advanced courses) and Neuropsychology (methods and neuropsychological disorders & rehabilitation). The applicant is expected to teach 2 courses (2 hours weekly) per semester. Major research topics of the group relate to neuromagnetic correlates of cognitive and emotional processing in healthy subjects and patients with schizophrenia and stress-related disorders. The applicant is expected to engage in research in these or related fields, exploiting the facilities of the department. Applicants should have a Diploma/MSc in Psychology and a Ph.D. Applicants with a background in neuroscience or experience in neuroscientific methods are welcome. Applicants should be willing to work in an interdisciplinary environment and in a collaborating team, sharing technical know-how and ideas. Work environment The University of Konstanz is one of the nine Universities of Excellence in Germany. The Clinical & Clinical Neuropsychology group offers MEG- and EEG-labs, including TMS (neuronavigator), and access to a 1.5 T Phillips MRT at a nearby neurological hospital. The group is further related to a research ward at the Center for Psychiatry and runs a trauma-competence center. It is our mission to conduct fundamental research using neuroscientific methods for understanding psychological disorders. Starting from neuroplasticity-research, our mission is further to develop and evaluate treatment and rehabilitation procedures. The department hosts two junior-research groups (Emmy-Noether-Nachwuchsgruppen) and is tightly linked to the junior scientist promotion programs supported by the Excellence initiative. Please submit applications or contact for further information: Prof. Dr. Brigitte Rockstroh +49-7531-884625 – Brigitte.rockstroh at uni-konstanz.de ******************************************* Tzvetan Popov Clinical Psychology University of Konstanz Box 23 78457 Konstanz, GERMANY Phone: 0049-7531-884600 Fax: 0049-7531-884601 Email: tzvetan.popov at uni-konstanz.de ******************************************* -------------- next part -------------- An HTML attachment was scrubbed... URL: From jm.horschig at donders.ru.nl Fri Jan 20 09:48:18 2012 From: jm.horschig at donders.ru.nl (=?ISO-8859-1?Q?=22J=F6rn_M=2E_Horschig=22?=) Date: Fri, 20 Jan 2012 09:48:18 +0100 Subject: [FieldTrip] ft_definetrial with .nex files In-Reply-To: References: Message-ID: <4F192A52.2050808@donders.ru.nl> Dear Tara, you define cfg.trialdef.triallength prior to calling ft_definetrial. This will cause the trialfunction to not look for events, but cut your recorded data into chunks of 3 seconds, independently of the eventtype and -value that you specified. The parameters you probably want to use instead are cfg.trialdef.poststim and .prestim. Triallength is supposed for continuous data without events, e.g. resting state data. Btw, if you specifiy cfg.trialdef.eventtype='?' you will get a list with all events in your data - that way you can make sure that you are specifying the correct types or values (alternatively, you could also use ft_read_event). Hope it helps! Best, Jörn On 1/19/2012 10:12 PM, Tara Jacobson wrote: > Hello, > > Does anyone have experience with .nex files? It seems straight > forward to be able to define trials using events in the .nex, but > ft_definetrial is not recognizing them as events. > > filename =('11-087_12292011.nex') > > > stim30Hz=[27.25275159.26715258.277925357.2887489.303075522.306625621.317425786.335425885.3462984.3569751083.367751149.37491281.38931347.3964251446.407251578.42161644.42881776.4431751875.453951974.464725]; > > cfg = []; > cfg.dataset = filename; > > cfg.trialdef.triallength=3; > cfg.trialdef.eventtype=('Event007'); > cfg.trialdef.eventvalue=stim30Hz; > > cfg=ft_definetrial(cfg); > > filename = > 11-087_12292011.nex > Warning: no trialfun was specified, using trialfun_general > > In ft_definetrial at 95 > evaluating trialfunction 'trialfun_general' > reading the events from '11-087_12292011.nex' > found 0 events > created 676 trials > > My question is what are the 676 trials if it found no events? > > Can anyone give me some advice? > > > Thanks very much. > > > > > _______________________________________________ > 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 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 r.oostenveld at donders.ru.nl Fri Jan 20 10:43:36 2012 From: r.oostenveld at donders.ru.nl (Robert Oostenveld) Date: Fri, 20 Jan 2012 10:43:36 +0100 Subject: [FieldTrip] ft_definetrial with .nex files In-Reply-To: References: Message-ID: <895F6559-E5B6-410F-B6AA-F8407C73E30F@donders.ru.nl> Dear Tara, To add to Jorns suggestion On 19 Jan 2012, at 22:12, Tara Jacobson wrote: > ... > cfg=ft_definetrial(cfg); > > filename = > 11-087_12292011.nex > Warning: no trialfun was specified, using trialfun_general > > In ft_definetrial at 95 > evaluating trialfunction 'trialfun_general' > reading the events from '11-087_12292011.nex' > found 0 events > created 676 trials The line "found 0 events" suggests that ft_read_event (which is called in ft_definetrial) did not find any events in your nex file. I suggest you look into the ft_read_event MATLAB code (and the underlying nex functions) to figure out why it does not detect the triggers in the nex file. best Robert From r.oostenveld at donders.ru.nl Fri Jan 20 10:49:59 2012 From: r.oostenveld at donders.ru.nl (Robert Oostenveld) Date: Fri, 20 Jan 2012 10:49:59 +0100 Subject: [FieldTrip] A problem In-Reply-To: References: Message-ID: Dear Ayda On 19 Jan 2012, at 20:01, aida ghahremani wrote: > I have the coordinates of the cortex. Would you please help me to locates the sources (dipoles) which best explain the EEG? You can pass the cortical sheet to the ft_sourceanalysis function (or to the ft_prepare_leadfield function) to use all vertices of the cortical sheet as dipole locations. This is also the approach used in http://fieldtrip.fcdonders.nl/tutorial/minimumnormestimate#source_model. The vertex positions should be specified as cfg.grid.pos. > How I can make their orientations normal to the cortex? You'll have to determine the dipole orientation at each vertex outside of fieldtrip, but you can use the fieldtrip/forward/private/normals.m to help you with it. If you specify the dipole orientations as cfg.grid.mom, then the leadfield will computed for a dipole in that direction. See line 227 in ft_prepare_leadfield. best Robert From ghahremani.aida at gmail.com Fri Jan 20 19:06:29 2012 From: ghahremani.aida at gmail.com (aida ghahremani) Date: Fri, 20 Jan 2012 13:06:29 -0500 Subject: [FieldTrip] fieldtrip Digest, Vol 14, Issue 31 In-Reply-To: References: Message-ID: Hi Robert Thanks for your kind reply. Best Regards, Ayda On Fri, Jan 20, 2012 at 6:00 AM, wrote: > Send fieldtrip mailing list submissions to > fieldtrip at donders.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 donders.ru.nl > > You can reach the person managing the list at > fieldtrip-owner at donders.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: ft_definetrial with .nex files (J?rn M. Horschig) > 2. Re: ft_definetrial with .nex files (Robert Oostenveld) > 3. Re: A problem (Robert Oostenveld) > > > ---------------------------------------------------------------------- > > Message: 1 > Date: Fri, 20 Jan 2012 09:48:18 +0100 > From: "J?rn M. Horschig" > To: Email discussion list for the FieldTrip project > > Subject: Re: [FieldTrip] ft_definetrial with .nex files > Message-ID: <4F192A52.2050808 at donders.ru.nl> > Content-Type: text/plain; charset="iso-8859-1"; Format="flowed" > > Dear Tara, > > you define cfg.trialdef.triallength prior to calling ft_definetrial. > This will cause the trialfunction to not look for events, but cut your > recorded data into chunks of 3 seconds, independently of the eventtype > and -value that you specified. The parameters you probably want to use > instead are cfg.trialdef.poststim and .prestim. Triallength is supposed > for continuous data without events, e.g. resting state data. > > Btw, if you specifiy cfg.trialdef.eventtype='?' you will get a list with > all events in your data - that way you can make sure that you are > specifying the correct types or values (alternatively, you could also > use ft_read_event). > > Hope it helps! > Best, > J?rn > > On 1/19/2012 10:12 PM, Tara Jacobson wrote: > > Hello, > > > > Does anyone have experience with .nex files? It seems straight > > forward to be able to define trials using events in the .nex, but > > ft_definetrial is not recognizing them as events. > > > > filename =('11-087_12292011.nex') > > > > > > > stim30Hz=[27.25275159.26715258.277925357.2887489.303075522.306625621.317425786.335425885.3462984.3569751083.367751149.37491281.38931347.3964251446.407251578.42161644.42881776.4431751875.453951974.464725]; > > > > cfg = []; > > cfg.dataset = filename; > > > > cfg.trialdef.triallength=3; > > cfg.trialdef.eventtype=('Event007'); > > cfg.trialdef.eventvalue=stim30Hz; > > > > cfg=ft_definetrial(cfg); > > > > filename = > > 11-087_12292011.nex > > Warning: no trialfun was specified, using trialfun_general > > > In ft_definetrial at 95 > > evaluating trialfunction 'trialfun_general' > > reading the events from '11-087_12292011.nex' > > found 0 events > > created 676 trials > > > > My question is what are the 676 trials if it found no events? > > > > Can anyone give me some advice? > > > > > > Thanks very much. > > > > > > > > > > _______________________________________________ > > 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 > > 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/20120120/dbfd9088/attachment-0001.html > > > > ------------------------------ > > Message: 2 > Date: Fri, 20 Jan 2012 10:43:36 +0100 > From: Robert Oostenveld > To: Email discussion list for the FieldTrip project > > Subject: Re: [FieldTrip] ft_definetrial with .nex files > Message-ID: <895F6559-E5B6-410F-B6AA-F8407C73E30F at donders.ru.nl> > Content-Type: text/plain; charset=us-ascii > > Dear Tara, > > To add to Jorns suggestion > > On 19 Jan 2012, at 22:12, Tara Jacobson wrote: > > > ... > > cfg=ft_definetrial(cfg); > > > > filename = > > 11-087_12292011.nex > > Warning: no trialfun was specified, using trialfun_general > > > In ft_definetrial at 95 > > evaluating trialfunction 'trialfun_general' > > reading the events from '11-087_12292011.nex' > > found 0 events > > created 676 trials > > The line "found 0 events" suggests that ft_read_event (which is called in > ft_definetrial) did not find any events in your nex file. I suggest you > look into the ft_read_event MATLAB code (and the underlying nex functions) > to figure out why it does not detect the triggers in the nex file. > > best > Robert > > > > > > ------------------------------ > > Message: 3 > Date: Fri, 20 Jan 2012 10:49:59 +0100 > From: Robert Oostenveld > To: Email discussion list for the FieldTrip project > > Subject: Re: [FieldTrip] A problem > Message-ID: > Content-Type: text/plain; charset=us-ascii > > Dear Ayda > > On 19 Jan 2012, at 20:01, aida ghahremani wrote: > > I have the coordinates of the cortex. Would you please help me to > locates the sources (dipoles) which best explain the EEG? > > You can pass the cortical sheet to the ft_sourceanalysis function (or to > the ft_prepare_leadfield function) to use all vertices of the cortical > sheet as dipole locations. This is also the approach used in > http://fieldtrip.fcdonders.nl/tutorial/minimumnormestimate#source_model. > The vertex positions should be specified as cfg.grid.pos. > > > How I can make their orientations normal to the cortex? > > You'll have to determine the dipole orientation at each vertex outside of > fieldtrip, but you can use the fieldtrip/forward/private/normals.m to help > you with it. If you specify the dipole orientations as cfg.grid.mom, then > the leadfield will computed for a dipole in that direction. See line 227 in > ft_prepare_leadfield. > > best > Robert > > > > ------------------------------ > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > End of fieldtrip Digest, Vol 14, Issue 31 > ***************************************** > -------------- next part -------------- An HTML attachment was scrubbed... URL: From karl.doron at gmail.com Sun Jan 22 05:28:37 2012 From: karl.doron at gmail.com (Karl Doron) Date: Sat, 21 Jan 2012 20:28:37 -0800 Subject: [FieldTrip] axes in ft_connectivityplot Message-ID: Hello, I'm trying to use some of the plot tools for results from ft_connectivityanalysis. Can anyone tell me what the horizontal and vertical axes represent in ft_connectivityplot? The values differ on each plot in the matrix and don't seem to correspond to the data. Also, in ft_topoplotCC, is it possible to weight the line font based on the magnitude of the coherence value? %% step 1 | freq analysis cfg = []; cfg.channel = {'A224', 'A188', 'A189', 'A163', 'A184','A162'}; cfg.method = 'mtmfft'; cfg.output = 'fourier'; cfg.foilim = [8 12]; cfg.toi = 2.35:0.01:2.65; cfg.keeptrials = 'yes'; cfg.keeptapers = 'yes'; cfg.tapsmofrq = 2; cfg.taper = 'dpss'; freq_alpha = ft_freqanalysis(cfg, data_spctrm); %% step 2 | connectivity analysis cfg = []; cfg.method = 'coh'; coh = ft_connectivityanalysis(cfg, freq_alpha); Thanks for any feedback, karl doron UC, Santa Barbara -------------- next part -------------- An HTML attachment was scrubbed... URL: From m.severens at maartenskliniek.nl Mon Jan 23 14:56:10 2012 From: m.severens at maartenskliniek.nl (Severens, Marianne) Date: Mon, 23 Jan 2012 14:56:10 +0100 Subject: [FieldTrip] component variances with runica Message-ID: <70FC3ACFFB46314EBEAF9101EA45F50E06D145F310@smkexch02.maartenskliniek.nl> Dear fieldtrippers I'm doing ICA analysis with fieldtrip (method runica) and I want to know the variance explained by each component. I belief fieldtrip is making use of the EEGlab code to do the runica, and I know that with the runica function it is possible to get these variances as output. Is this also stored somewhere in the fieldtrip data format or is there an other way to get these variances? Thanks for your help! Best, Marianne Severens Disclaimer Vrijgave van de informatie verzonden met dit e-mail bericht is geaccordeerd door de ontvanger en/of zijn behandelend arts. Verstrekking van deze informatie is conform het Privacy reglement van de Sint Maartenskliniek. De informatie is uitsluitend bestemd voor de geadresseerde. Gebruik van deze informatie door anderen dan de geadresseerde is, zonder voorafgaande schriftelijke toestemming van de rechthebbende , verboden. De Sint Maartenskliniek staat niet in voor de juiste en volledige overbrenging van de inhoud van een gezonden e-mail, noch voor de ontvangst daarvan. Sint Maartenskliniek Hengstdal 3, 6574 NA Ubbergen (bij Nijmegen) Telefoon 024-3659 911 Telefax 024-3659 204 KvK nummer 41055111 From karl.doron at gmail.com Tue Jan 24 01:19:38 2012 From: karl.doron at gmail.com (Karl Doron) Date: Mon, 23 Jan 2012 16:19:38 -0800 Subject: [FieldTrip] axes in ft_connectivityplot In-Reply-To: References: Message-ID: Hello, Just to clarify my first question below. In the context of the tutorial on the fieldtrip website, what do the axes in this figure represent? Thanks, karl doron UC, Santa Barbara > Hello, > > I'm trying to use some of the plot tools for results from ft_connectivityanalysis. Can anyone tell me what the horizontal and vertical axes represent in ft_connectivityplot? The values differ on each plot in the matrix and don't seem to correspond to the data. Also, in ft_topoplotCC, is it possible to weight the line font based on the magnitude of the coherence value? > > %% step 1 | freq analysis > > cfg = []; > cfg.channel = {'A224', 'A188', 'A189', 'A163', 'A184','A162'}; > cfg.method = 'mtmfft'; > cfg.output = 'fourier'; > cfg.foilim = [8 12]; > cfg.toi = 2.35:0.01:2.65; > cfg.keeptrials = 'yes'; > cfg.keeptapers = 'yes'; > cfg.tapsmofrq = 2; > cfg.taper = 'dpss'; > > freq_alpha = ft_freqanalysis(cfg, data_spctrm); > > > %% step 2 | connectivity analysis > > cfg = []; > cfg.method = 'coh'; > > coh = ft_connectivityanalysis(cfg, freq_alpha); > > > > Thanks for any feedback, > karl doron > UC, Santa Barbara > > > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From jan.schoffelen at donders.ru.nl Tue Jan 24 08:52:27 2012 From: jan.schoffelen at donders.ru.nl (jan-mathijs schoffelen) Date: Tue, 24 Jan 2012 08:52:27 +0100 Subject: [FieldTrip] axes in ft_connectivityplot In-Reply-To: References: Message-ID: Hi Karl, The subplots represent the magnitude of the connectivity metric (which are typically unit-less) as a function of frequency. Best, Jan-Mathijs On Jan 24, 2012, at 1:19 AM, Karl Doron wrote: > Hello, > > Just to clarify my first question below. In the context of the tutorial on the fieldtrip website, what do the axes in this figure represent? > > Thanks, > karl doron > UC, Santa Barbara > >> Hello, >> >> I'm trying to use some of the plot tools for results from ft_connectivityanalysis. Can anyone tell me what the horizontal and vertical axes represent in ft_connectivityplot? The values differ on each plot in the matrix and don't seem to correspond to the data. Also, in ft_topoplotCC, is it possible to weight the line font based on the magnitude of the coherence value? >> >> %% step 1 | freq analysis >> >> cfg = []; >> cfg.channel = {'A224', 'A188', 'A189', 'A163', 'A184','A162'}; >> cfg.method = 'mtmfft'; >> cfg.output = 'fourier'; >> cfg.foilim = [8 12]; >> cfg.toi = 2.35:0.01:2.65; >> cfg.keeptrials = 'yes'; >> cfg.keeptapers = 'yes'; >> cfg.tapsmofrq = 2; >> cfg.taper = 'dpss'; >> >> freq_alpha = ft_freqanalysis(cfg, data_spctrm); >> >> >> %% step 2 | connectivity analysis >> >> cfg = []; >> cfg.method = 'coh'; >> >> coh = ft_connectivityanalysis(cfg, freq_alpha); >> >> >> >> Thanks for any feedback, >> karl doron >> UC, Santa Barbara >> >> >> >> >> > > _______________________________________________ > 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 -------------- next part -------------- An HTML attachment was scrubbed... URL: From johemart at gmail.com Tue Jan 24 16:15:12 2012 From: johemart at gmail.com (=?ISO-8859-1?Q?Johann_Heinz_Mart=EDnez_Huartos?=) Date: Tue, 24 Jan 2012 16:15:12 +0100 Subject: [FieldTrip] Problem with ft_megplanar! Message-ID: Hi dear fieldtripers. I have a probblem that i dont understand when im using FT_MEGPLANAR. Im wondering if anyone could give me a hand! The thing is that I have several individual data, each with this kind of fields. patient{12} ans = avg: [148x255 double] var: [148x255 double] fsample: 254.3235 time: [1x255 double] dof: [148x255 double] label: {148x1 cell} dimord: 'chan_time' grad: [1x1 struct] cfg: [1x1 struct] And when Im using ft_megplanar as the same way the tutorial described it, like this: cfg = []; cfg.planarmethod = 'sincos'; avgFICplanar = ft_megplanar(cfg, pacientes{12}); Fieldtrip toolbox gives me this kind of errors that I don understand. ??? Reference to non-existent field 'unit'. Error in ==> megplanar_sincos at 37 fprintf('minimum distance between gradiometers is %6.2f %s\n', min(distance(find(distance~=0))), grad.unit); Error in ==> ft_megplanar at 171 montage = megplanar_sincos(cfg, data.grad); Error in ==> STEPHANTEST at 31 avgFICplanar = ft_megplanar(cfg, pacientes{12}); Then, off course, I can use FT_COMBINEPLANAR too. So does anyone knows what could be the error in the data? or it is necesary another field that im not using in this moment? Thanks fellas for this comments -- Atentamente: Johann Martínez. M.Sc. -------------- next part -------------- An HTML attachment was scrubbed... URL: From karch at mpib-berlin.mpg.de Tue Jan 24 23:54:12 2012 From: karch at mpib-berlin.mpg.de (Karch, Julian) Date: Tue, 24 Jan 2012 22:54:12 +0000 Subject: [FieldTrip] Missing resolution Information in *vhdr causes ft_preprocessing to return only NaNs Message-ID: Hi, I'm working on a brainvision EEG dataset which was preprocessed by someone else using Brainvision Analyzer. One part of his preprocessing was to set a new reference. This processing step makes the resolution information in the *vhdr file disappear. Because of that hdr.orig.resolution=NaN for all channels. As result of that the lines calib = diag(hdr.resolution(chanindx)); % using a sparse multiplication speeds it up dat = full(sparse(calib) * dat); in read_brainvision_eeg produce only NaN. This again results in trials which only contain NaNs. I do weekly updates of fieldtrip using svn. Because I'm quite sure if was able to read in, using ft_preprocssing, the excact same dataset, even with the same cfg file, earlier this year I checked the modifications for the last half year or so but I couldn't find any change which could have broken it. My two questions are. How would you handle this problem? Just plug in some random numbers like 0.1 ? Is this an issue with fieldtrip or am I doing something wrong? Were there any changes to the involved functions which could have changed the behavior in that way? Thanks in advance! Best, Julian Julian Karch Research Assistant Center for Lifespan Psychology MPI for Human Development Lentzeallee 94, 14195 Berlin, Germany phone: +49-30-82406-296 fax: +49-30-8249939 web: http://www.mpib-berlin.mpg.de -------------- next part -------------- An HTML attachment was scrubbed... URL: From karl.doron at gmail.com Wed Jan 25 00:52:55 2012 From: karl.doron at gmail.com (Karl Doron) Date: Tue, 24 Jan 2012 15:52:55 -0800 Subject: [FieldTrip] axes in ft_connectivityplot In-Reply-To: References: Message-ID: <791E9D0F-AE12-485E-A422-D6094D884165@gmail.com> Hello, Great! That makes sense. On my second question for ft_topoplotCC, there is a bug using strmatch on lines 191 and 192. You'll likely encounter an error using horzcat at line 199 if the 'exact' argument is not added due to possible comparison of a vector and a scalar, e.g., begindx will find channel A2* when only A2 is needed. begindx = strmatch(beglabel{i}, lay.label,'exact'); endindx = strmatch(endlabel{i}, lay.label,'exact'); Thanks! karl On Jan 23, 2012, at 11:52 PM, jan-mathijs schoffelen wrote: > Hi Karl, > > The subplots represent the magnitude of the connectivity metric (which are typically unit-less) as a function of frequency. > > Best, > > Jan-Mathijs > > On Jan 24, 2012, at 1:19 AM, Karl Doron wrote: > >> Hello, >> >> Just to clarify my first question below. In the context of the tutorial on the fieldtrip website, what do the axes in this figure represent? >> >> Thanks, >> karl doron >> UC, Santa Barbara >> >>> Hello, >>> >>> I'm trying to use some of the plot tools for results from ft_connectivityanalysis. Can anyone tell me what the horizontal and vertical axes represent in ft_connectivityplot? The values differ on each plot in the matrix and don't seem to correspond to the data. Also, in ft_topoplotCC, is it possible to weight the line font based on the magnitude of the coherence value? >>> >>> %% step 1 | freq analysis >>> >>> cfg = []; >>> cfg.channel = {'A224', 'A188', 'A189', 'A163', 'A184','A162'}; >>> cfg.method = 'mtmfft'; >>> cfg.output = 'fourier'; >>> cfg.foilim = [8 12]; >>> cfg.toi = 2.35:0.01:2.65; >>> cfg.keeptrials = 'yes'; >>> cfg.keeptapers = 'yes'; >>> cfg.tapsmofrq = 2; >>> cfg.taper = 'dpss'; >>> >>> freq_alpha = ft_freqanalysis(cfg, data_spctrm); >>> >>> >>> %% step 2 | connectivity analysis >>> >>> cfg = []; >>> cfg.method = 'coh'; >>> >>> coh = ft_connectivityanalysis(cfg, freq_alpha); >>> >>> >>> >>> Thanks for any feedback, >>> karl doron >>> UC, Santa Barbara >>> >>> >>> >>> >>> >> >> _______________________________________________ >> 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 > > _______________________________________________ > 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 Jan 25 09:02:24 2012 From: jan.schoffelen at donders.ru.nl (jan-mathijs schoffelen) Date: Wed, 25 Jan 2012 09:02:24 +0100 Subject: [FieldTrip] axes in ft_connectivityplot In-Reply-To: <791E9D0F-AE12-485E-A422-D6094D884165@gmail.com> References: <791E9D0F-AE12-485E-A422-D6094D884165@gmail.com> Message-ID: <3822E3AE-DF7E-4FA4-ACE1-145A71D481F8@donders.ru.nl> Hi Karl, Thanks for reporting this; we'll look into it and fix it. May I take the opportunity for reminding (or pointing) you to our bugzilla web site: bugzilla.fcdonders.nl. We use this site to file bugs, enhancement requests etc., and use it to keep track of the fixing process. Best, Jan-Mathijs On Jan 25, 2012, at 12:52 AM, Karl Doron wrote: > Hello, > > Great! That makes sense. > > On my second question for ft_topoplotCC, there is a bug using strmatch on lines 191 and 192. You'll likely encounter an error using horzcat at line 199 if the 'exact' argument is not added due to possible comparison of a vector and a scalar, e.g., begindx will find channel A2* when only A2 is needed. > > begindx = strmatch(beglabel{i}, lay.label,'exact'); > endindx = strmatch(endlabel{i}, lay.label,'exact'); > > Thanks! > > karl > > > > On Jan 23, 2012, at 11:52 PM, jan-mathijs schoffelen wrote: > >> Hi Karl, >> >> The subplots represent the magnitude of the connectivity metric (which are typically unit-less) as a function of frequency. >> >> Best, >> >> Jan-Mathijs >> >> On Jan 24, 2012, at 1:19 AM, Karl Doron wrote: >> >>> Hello, >>> >>> Just to clarify my first question below. In the context of the tutorial on the fieldtrip website, what do the axes in this figure represent? >>> >>> Thanks, >>> karl doron >>> UC, Santa Barbara >>> >>>> Hello, >>>> >>>> I'm trying to use some of the plot tools for results from ft_connectivityanalysis. Can anyone tell me what the horizontal and vertical axes represent in ft_connectivityplot? The values differ on each plot in the matrix and don't seem to correspond to the data. Also, in ft_topoplotCC, is it possible to weight the line font based on the magnitude of the coherence value? >>>> >>>> %% step 1 | freq analysis >>>> >>>> cfg = []; >>>> cfg.channel = {'A224', 'A188', 'A189', 'A163', 'A184','A162'}; >>>> cfg.method = 'mtmfft'; >>>> cfg.output = 'fourier'; >>>> cfg.foilim = [8 12]; >>>> cfg.toi = 2.35:0.01:2.65; >>>> cfg.keeptrials = 'yes'; >>>> cfg.keeptapers = 'yes'; >>>> cfg.tapsmofrq = 2; >>>> cfg.taper = 'dpss'; >>>> >>>> freq_alpha = ft_freqanalysis(cfg, data_spctrm); >>>> >>>> >>>> %% step 2 | connectivity analysis >>>> >>>> cfg = []; >>>> cfg.method = 'coh'; >>>> >>>> coh = ft_connectivityanalysis(cfg, freq_alpha); >>>> >>>> >>>> >>>> Thanks for any feedback, >>>> karl doron >>>> UC, Santa Barbara >>>> >>>> >>>> >>>> >>>> >>> >>> _______________________________________________ >>> 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 >> >> _______________________________________________ >> 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 -------------- next part -------------- An HTML attachment was scrubbed... URL: From georchris5 at yahoo.com Wed Jan 25 09:09:10 2012 From: georchris5 at yahoo.com (George Christopoulos) Date: Wed, 25 Jan 2012 00:09:10 -0800 (PST) Subject: [FieldTrip] Research Assistant / EEG specialist Position at Singapore Message-ID: <1327478950.43155.YahooMailNeo@web161901.mail.bf1.yahoo.com> The Decision and Organizational Lab at Nanyang Technological University (PI: George Christopoulos; website https://sites.google.com/site/labdeon/home) seeks a Research Assistant / EEG Technician interested in employing behavioural and experimental methods, cognitive neuroscience and computational approaches to study basic and applied aspects of human cognition. Of particular interest are: * Decision making, learning and cognitive flexibility * Social behaviour (trust, cooperation and competition etc.) * The impact of culture and cultural exposure to human cognition * Applied aspects such as the biology of leadership, managerial decision making and entrepreneurship Facilities: Our lab is a member of the Culture Science Institute and  has easy access to unparalleled and unique to Singapore facilities for behavioural testing, including numerous soundproofed testing rooms, rooms for experimental (group) games, eye-trackers, video recording facilities and equipment for physiological measures and EEG. In addition, the Lab has access to fMRI machines in Singapore and elsewhere. Moreover, we maintain strong connections with laboratories in US, Europe, Japan and China.  The candidate should have experience with EEG (data collection, design, data analysis with FieldTrip, EEGLAB etc.) and excellent computational skills (C++, Matlab, Java). A commitment of two years will be needed / preferred. Please send your CV along with a short research statement (one paragraph) to G. Christopoulos georchris5 [at] yahoo . c o m -------------- next part -------------- An HTML attachment was scrubbed... URL: From georchris5 at yahoo.com Wed Jan 25 09:11:03 2012 From: georchris5 at yahoo.com (George Christopoulos) Date: Wed, 25 Jan 2012 00:11:03 -0800 (PST) Subject: [FieldTrip] Fully supported (Tuition Fees covered; generous stipend) PhD positions at Nanyang Business School In-Reply-To: <1327478319.56162.YahooMailNeo@web161906.mail.bf1.yahoo.com> References: <1327478319.56162.YahooMailNeo@web161906.mail.bf1.yahoo.com> Message-ID: <1327479063.11648.YahooMailNeo@web161902.mail.bf1.yahoo.com> Fully supported (Tuition Fees covered; generous stipend) PhD positions at Nanyang Business School The Decision and Organizational Lab at Nanyang Technological University (PI: George Christopoulos; website https://sites.google.com/site/labdeon/home) seeks PhD student(s) interested in employing behavioural and experimental methods, cognitive neuroscience and computational approaches to study basic and applied aspects of human cognition. Of particular interest are: * Decision making, learning and cognitive flexibility * Social behaviour (trust, cooperation and competition etc.) * The impact of culture and cultural exposure to human cognition * Applied aspects such as the biology of leadership, managerial decision making and entrepreneurship Facilities: Our lab is a member of the Culture Science Institute and  has easy access to unparalleled and unique to Singapore facilities for behavioural testing, including numerous soundproofed testing rooms, rooms for experimental (group) games, eye-trackers, video recording facilities and equipment for physiological measures and EEG. In addition, the Lab has access to fMRI machines in Singapore and elsewhere. Moreover, we maintain strong connections with laboratories in US, Europe, Japan and China.   Graduate studentswill be enrolled in the prestigious Nanyang Business School PhD program, which offers a stipend and excellent training in both behavioural sciences and business processes (details here: http://www.nbsphd.ntu.edu.sg/Pages/Home.aspx). NBS is the leading Business School in Singapore, one of the top in Asia and consistently receives worldwide high rankings in global lists (http://www.nbs.ntu.edu.sg/Pages/Home.aspx). Research-wise the student will be involved in preparing, designing, running and analyzing behavioral and human neuroimaging experiments. Besides the standard coursework, the lab provides hands-on training and support on human neuroimaging and behavioral sciences. The student will be encouraged and supported to present his or her research in conferences and peer-reviewed journals.   Previous exposure to data collection and research (with knowledge of SPPS or other packages), good computational skills (C++, Matlab, Java) are a plus. The candidate will be needed to comply to NBS admission requirements, which include GRE or GMAT scores. Please send your CV along with a short research statement (one paragraph) to G. Christopoulos georchris5 [at] yahoo . c o m -------------- next part -------------- An HTML attachment was scrubbed... URL: From jan.schoffelen at donders.ru.nl Wed Jan 25 10:07:55 2012 From: jan.schoffelen at donders.ru.nl (jan-mathijs schoffelen) Date: Wed, 25 Jan 2012 10:07:55 +0100 Subject: [FieldTrip] axes in ft_connectivityplot In-Reply-To: <791E9D0F-AE12-485E-A422-D6094D884165@gmail.com> References: <791E9D0F-AE12-485E-A422-D6094D884165@gmail.com> Message-ID: Hi Karl, I looked into ft_topoplotCC and I noticed that you are not using an up-to-date version. The current version does not use strmatch, but uses strcmp. This should not cause a problem. Best wishes, Jan-Mathijs On Jan 25, 2012, at 12:52 AM, Karl Doron wrote: > Hello, > > Great! That makes sense. > > On my second question for ft_topoplotCC, there is a bug using strmatch on lines 191 and 192. You'll likely encounter an error using horzcat at line 199 if the 'exact' argument is not added due to possible comparison of a vector and a scalar, e.g., begindx will find channel A2* when only A2 is needed. > > begindx = strmatch(beglabel{i}, lay.label,'exact'); > endindx = strmatch(endlabel{i}, lay.label,'exact'); > > Thanks! > > karl > > > > On Jan 23, 2012, at 11:52 PM, jan-mathijs schoffelen wrote: > >> Hi Karl, >> >> The subplots represent the magnitude of the connectivity metric (which are typically unit-less) as a function of frequency. >> >> Best, >> >> Jan-Mathijs >> >> On Jan 24, 2012, at 1:19 AM, Karl Doron wrote: >> >>> Hello, >>> >>> Just to clarify my first question below. In the context of the tutorial on the fieldtrip website, what do the axes in this figure represent? >>> >>> Thanks, >>> karl doron >>> UC, Santa Barbara >>> >>>> Hello, >>>> >>>> I'm trying to use some of the plot tools for results from ft_connectivityanalysis. Can anyone tell me what the horizontal and vertical axes represent in ft_connectivityplot? The values differ on each plot in the matrix and don't seem to correspond to the data. Also, in ft_topoplotCC, is it possible to weight the line font based on the magnitude of the coherence value? >>>> >>>> %% step 1 | freq analysis >>>> >>>> cfg = []; >>>> cfg.channel = {'A224', 'A188', 'A189', 'A163', 'A184','A162'}; >>>> cfg.method = 'mtmfft'; >>>> cfg.output = 'fourier'; >>>> cfg.foilim = [8 12]; >>>> cfg.toi = 2.35:0.01:2.65; >>>> cfg.keeptrials = 'yes'; >>>> cfg.keeptapers = 'yes'; >>>> cfg.tapsmofrq = 2; >>>> cfg.taper = 'dpss'; >>>> >>>> freq_alpha = ft_freqanalysis(cfg, data_spctrm); >>>> >>>> >>>> %% step 2 | connectivity analysis >>>> >>>> cfg = []; >>>> cfg.method = 'coh'; >>>> >>>> coh = ft_connectivityanalysis(cfg, freq_alpha); >>>> >>>> >>>> >>>> Thanks for any feedback, >>>> karl doron >>>> UC, Santa Barbara >>>> >>>> >>>> >>>> >>>> >>> >>> _______________________________________________ >>> 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 >> >> _______________________________________________ >> 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 -------------- next part -------------- An HTML attachment was scrubbed... URL: From caspervanheck at gmail.com Wed Jan 25 10:09:43 2012 From: caspervanheck at gmail.com (Casper van Heck) Date: Wed, 25 Jan 2012 10:09:43 +0100 Subject: [FieldTrip] Missing resolution Information in *vhdr causes ft_preprocessing to return only NaNs In-Reply-To: References: Message-ID: Julian, It is my understanding that the header file doesn't change at all, since Brainvision Analyzer stores all changes either in the 'history' files or temporary files in the history folder. The *.vhdr and *.eeg (and marker files, if any) should be unchanged after preprocessing. Therefore, resolution information should still be there. Could you check the contents of the header file with notepad? It should say something like this for every channel under "[Channel Infos]": Ch27=Fz,,0.0715,µV Also, you could try to open it with Brainvision Analyzer, and see if that gives an error of sorts. Sincerely, Casper van Heck On Tue, Jan 24, 2012 at 11:54 PM, Karch, Julian wrote: > Hi,**** > > ** ** > > I'm working on a brainvision EEG dataset which was preprocessed by > someone else using Brainvision Analyzer. One part of his preprocessing was > to set a new reference. This processing step makes the resolution > information in the *vhdr file disappear. Because of that > hdr.orig.resolution=NaN for all channels. As result of that the lines**** > > calib = diag(hdr.resolution(chanindx));**** > > % using a sparse multiplication speeds it up**** > > dat = full(sparse(calib) * dat);**** > > in read_brainvision_eeg produce only NaN. This again results in trials > which only contain NaNs.**** > > ** ** > > I do weekly updates of fieldtrip using svn. Because I'm quite sure if was > able to read in, using ft_preprocssing, the excact same dataset, even with > the same cfg file, earlier this year I checked the modifications for the > last half year or so but I couldn't find any change which could have broken > it.**** > > My two questions are. How would you handle this problem? Just plug in some > random numbers like 0.1 ? Is this an issue with fieldtrip or am I doing > something wrong? Were there any changes to the involved functions which > could have changed the behavior in that way?**** > > ** ** > > Thanks in advance!**** > > ** ** > > Best,**** > > ** ** > > Julian**** > > ** ** > > Julian Karch **** > > Research Assistant**** > > ** ** > > Center for Lifespan Psychology**** > > MPI for Human Development**** > > Lentzeallee 94, 14195 Berlin, Germany**** > > phone: +49-30-82406-296**** > > fax: +49-30-8249939**** > > web: http://www.mpib-berlin.mpg.de**** > > ** ** > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > -------------- next part -------------- An HTML attachment was scrubbed... URL: From karch at mpib-berlin.mpg.de Wed Jan 25 13:49:24 2012 From: karch at mpib-berlin.mpg.de (Karch, Julian) Date: Wed, 25 Jan 2012 12:49:24 +0000 Subject: [FieldTrip] Missing resolution Information in *vhdr causes ft_preprocessing to return only NaNs In-Reply-To: References: Message-ID: Hi, thanks for your answer. It seems that I was a little imprecise. Of course the original data set doesn't change but if I export the a data set after setting a new reference in Brainvision Analyzer the header looks like that: Original header real.vhdr =============================== Brain Vision Data Exchange Header File Version 1.0 ; Data created by the Vision Recorder [...] Ch4=Fz,,0.1,µV realnewRef.vhdr =============================== Brain Vision Data Exchange Header File Version 1.0 ; Data created from history path: real/Raw Data/New Reference [...] Ch4=Fz,Avg,,µV This was just a test I did with some random data. I don't have acess to the orginal recording for the data sets I want to read in. The header from them look like Brain Vision Data Exchange Header File Version 1.0 ; Data created from history path: passive3101/Raw Data/Filters/New Reference/Attentive [...] Ch12=Fz,ref new,, Like I said what's really strange that I think I was able to preprocess the exact same data set a couple of month ago. Thanks for your help! Best, Julian Von: fieldtrip-bounces at donders.ru.nl [mailto:fieldtrip-bounces at donders.ru.nl] Im Auftrag von Casper van Heck Gesendet: Wednesday, January 25, 2012 10:10 AM An: Email discussion list for the FieldTrip project Betreff: Re: [FieldTrip] Missing resolution Information in *vhdr causes ft_preprocessing to return only NaNs Julian, It is my understanding that the header file doesn't change at all, since Brainvision Analyzer stores all changes either in the 'history' files or temporary files in the history folder. The *.vhdr and *.eeg (and marker files, if any) should be unchanged after preprocessing. Therefore, resolution information should still be there. Could you check the contents of the header file with notepad? It should say something like this for every channel under "[Channel Infos]": Ch27=Fz,,0.0715,µV Also, you could try to open it with Brainvision Analyzer, and see if that gives an error of sorts. Sincerely, Casper van Heck On Tue, Jan 24, 2012 at 11:54 PM, Karch, Julian > wrote: Hi, I'm working on a brainvision EEG dataset which was preprocessed by someone else using Brainvision Analyzer. One part of his preprocessing was to set a new reference. This processing step makes the resolution information in the *vhdr file disappear. Because of that hdr.orig.resolution=NaN for all channels. As result of that the lines calib = diag(hdr.resolution(chanindx)); % using a sparse multiplication speeds it up dat = full(sparse(calib) * dat); in read_brainvision_eeg produce only NaN. This again results in trials which only contain NaNs. I do weekly updates of fieldtrip using svn. Because I'm quite sure if was able to read in, using ft_preprocssing, the excact same dataset, even with the same cfg file, earlier this year I checked the modifications for the last half year or so but I couldn't find any change which could have broken it. My two questions are. How would you handle this problem? Just plug in some random numbers like 0.1 ? Is this an issue with fieldtrip or am I doing something wrong? Were there any changes to the involved functions which could have changed the behavior in that way? Thanks in advance! Best, Julian Julian Karch Research Assistant Center for Lifespan Psychology MPI for Human Development Lentzeallee 94, 14195 Berlin, Germany phone: +49-30-82406-296 fax: +49-30-8249939 web: http://www.mpib-berlin.mpg.de _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -------------- next part -------------- An HTML attachment was scrubbed... URL: From caspervanheck at gmail.com Wed Jan 25 14:47:26 2012 From: caspervanheck at gmail.com (Casper van Heck) Date: Wed, 25 Jan 2012 14:47:26 +0100 Subject: [FieldTrip] Missing resolution Information in *vhdr causes ft_preprocessing to return only NaNs In-Reply-To: References: Message-ID: Julian, Brainvision Analyzer is somewhat finicky, but I've never seen it do this, and I don't seem to be able to reproduce the problem here. If you can get access to the original datasets, then rereferencing in Fieldtrip might be a solution. And if you can't get the original datasets, then you could try editing the header files to include the resolution. I don't think the resolution should change after rereferencing, so you could simply put the resolution in there. Alternatively, specifying the resolution in hdr.orig.resolution should be possible, perhaps with some editing. Also, since Fieldtrip could open the files earlier, it would stand to reason that it either 'makes up' some values, doesn't need them (which would be odd), or somehow deduces them from other values. However, in my *.vhdr files it specifies the resolution twice, once below [Channel Infos] and once under [Channels], but nothing I can find that defines it any other way. So, I'm guessing Fieldtrip used to make them up, but doesn't anymore. So, placing a resolution in the files or specifying it in Fieldtrip should not be a problem. Ideally, you would want the original resolution, but if that's not known, you could try winging it with a value that seems 'close enough'. Hope this helps, Casper van Heck On Wed, Jan 25, 2012 at 1:49 PM, Karch, Julian wrote: > Hi,**** > > ** ** > > thanks for your answer. It seems that I was a little imprecise. Of course > the original data set doesn't change but if I export the a data set after > setting a new reference in Brainvision Analyzer the header looks like that: > **** > > ** ** > > Original header real.vhdr**** > > ===============================**** > > Brain Vision Data Exchange Header File Version 1.0**** > > ; Data created by the Vision Recorder**** > > [...]**** > > Ch4=Fz,,0.1,µV**** > > ** ** > > realnewRef.vhdr**** > > ===============================**** > > Brain Vision Data Exchange Header File Version 1.0**** > > ; Data created from history path: real/Raw Data/New Reference**** > > [...]**** > > Ch4=Fz,Avg,,µV**** > > ** ** > > This was just a test I did with some random data. I don't have acess to > the orginal recording for the data sets I want to read in. The header from > them look like**** > > Brain Vision Data Exchange Header File Version 1.0**** > > ; Data created from history path: passive3101/Raw Data/Filters/New > Reference/Attentive**** > > [...]**** > > Ch12=Fz,ref new,,**** > > ** ** > > Like I said what's really strange that I think I was able to preprocess > the exact same data set a couple of month ago.**** > > ** ** > > Thanks for your help!**** > > ** ** > > Best,**** > > ** ** > > Julian**** > > ** ** > > ** ** > > ** ** > > ** ** > > *Von:* fieldtrip-bounces at donders.ru.nl [mailto: > fieldtrip-bounces at donders.ru.nl] *Im Auftrag von *Casper van Heck > *Gesendet:* Wednesday, January 25, 2012 10:10 AM > *An:* Email discussion list for the FieldTrip project > *Betreff:* Re: [FieldTrip] Missing resolution Information in *vhdr causes > ft_preprocessing to return only NaNs**** > > ** ** > > Julian,**** > > ** ** > > It is my understanding that the header file doesn't change at all, since > Brainvision Analyzer stores all changes either in the 'history' files or > temporary files in the history folder. The *.vhdr and *.eeg (and marker > files, if any) should be unchanged after preprocessing. Therefore, > resolution information should still be there.**** > > ** ** > > Could you check the contents of the header file with notepad?**** > > It should say something like this for every channel under "[Channel > Infos]":**** > > Ch27=Fz,,0.0715,µV**** > > ** ** > > Also, you could try to open it with Brainvision Analyzer, and see if that > gives an error of sorts.**** > > ** ** > > Sincerely,**** > > ** ** > > Casper van Heck**** > > ** ** > > On Tue, Jan 24, 2012 at 11:54 PM, Karch, Julian > wrote:**** > > Hi,**** > > **** > > I'm working on a brainvision EEG dataset which was preprocessed by > someone else using Brainvision Analyzer. One part of his preprocessing was > to set a new reference. This processing step makes the resolution > information in the *vhdr file disappear. Because of that > hdr.orig.resolution=NaN for all channels. As result of that the lines**** > > calib = diag(hdr.resolution(chanindx));**** > > % using a sparse multiplication speeds it up**** > > dat = full(sparse(calib) * dat);**** > > in read_brainvision_eeg produce only NaN. This again results in trials > which only contain NaNs.**** > > **** > > I do weekly updates of fieldtrip using svn. Because I'm quite sure if was > able to read in, using ft_preprocssing, the excact same dataset, even with > the same cfg file, earlier this year I checked the modifications for the > last half year or so but I couldn't find any change which could have broken > it.**** > > My two questions are. How would you handle this problem? Just plug in some > random numbers like 0.1 ? Is this an issue with fieldtrip or am I doing > something wrong? Were there any changes to the involved functions which > could have changed the behavior in that way?**** > > **** > > Thanks in advance!**** > > **** > > Best,**** > > **** > > Julian**** > > **** > > Julian Karch **** > > Research Assistant**** > > **** > > Center for Lifespan Psychology**** > > MPI for Human Development**** > > Lentzeallee 94, 14195 Berlin, Germany**** > > phone: +49-30-82406-296**** > > fax: +49-30-8249939**** > > web: http://www.mpib-berlin.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 > -------------- next part -------------- An HTML attachment was scrubbed... URL: From karch at mpib-berlin.mpg.de Wed Jan 25 17:30:11 2012 From: karch at mpib-berlin.mpg.de (Karch, Julian) Date: Wed, 25 Jan 2012 16:30:11 +0000 Subject: [FieldTrip] Missing resolution Information in *vhdr causes ft_preprocessing to return only NaNs In-Reply-To: References: Message-ID: Hi, it seems like I solved the problem. If you export your data to the ieee floating point format the resolution entry vanishes. I assume that it is just don't needed anymore as the entries are in micro volt then. This was taken into account by the read_brainvision_eeg function until 12/08/2011. On This day a couple of changes were committed. Leading to the fact that ieee_float_32 data is also multiplied with the resolution ================================================================================================== if strcmpi(hdr.DataFormat, 'binary') && strcmpi(hdr.DataOrientation, 'multiplexed') && any(strcmpi(hdr.BinaryFormat, {'int_16', 'int_32', 'ieee_float_32'})) [...] calib = diag(hdr.resolution); % using a sparse multiplication speeds it up dat = full(sparse(calib) * dat); ============================================================= The pre 12/08/2011 version looks like that ============================================================ elseif strcmpi(hdr.DataFormat, 'binary') && strcmpi(hdr.DataOrientation, 'multiplexed') && strcmpi(hdr.BinaryFormat, 'ieee_float_32') fid = fopen(filename, 'rb', 'ieee-le'); fseek(fid, hdr.NumberOfChannels*4*(begsample-1), 'cof'); [dat, siz] = fread(fid, [hdr.NumberOfChannels, (endsample-begsample+1)], 'float32'); fclose(fid); ========================================================== So ieee data was not multiplied by the resolution. Which is probably the correct behavior. I changed the function such that it doesn't multiply the ieee data with the resolution and it seems work. You can look at it here: http://matlab.nopaste.dk/p4635. The changes are just the if statements in line 67and 81. It would be great if you could incorporate a similar change to the read_brainvision_eeg function. Best, Julian Karch Von: fieldtrip-bounces at donders.ru.nl [mailto:fieldtrip-bounces at donders.ru.nl] Im Auftrag von Casper van Heck Gesendet: Wednesday, January 25, 2012 2:47 PM An: Email discussion list for the FieldTrip project Betreff: Re: [FieldTrip] Missing resolution Information in *vhdr causes ft_preprocessing to return only NaNs Julian, Brainvision Analyzer is somewhat finicky, but I've never seen it do this, and I don't seem to be able to reproduce the problem here. If you can get access to the original datasets, then rereferencing in Fieldtrip might be a solution. And if you can't get the original datasets, then you could try editing the header files to include the resolution. I don't think the resolution should change after rereferencing, so you could simply put the resolution in there. Alternatively, specifying the resolution in hdr.orig.resolution should be possible, perhaps with some editing. Also, since Fieldtrip could open the files earlier, it would stand to reason that it either 'makes up' some values, doesn't need them (which would be odd), or somehow deduces them from other values. However, in my *.vhdr files it specifies the resolution twice, once below [Channel Infos] and once under [Channels], but nothing I can find that defines it any other way. So, I'm guessing Fieldtrip used to make them up, but doesn't anymore. So, placing a resolution in the files or specifying it in Fieldtrip should not be a problem. Ideally, you would want the original resolution, but if that's not known, you could try winging it with a value that seems 'close enough'. Hope this helps, Casper van Heck On Wed, Jan 25, 2012 at 1:49 PM, Karch, Julian > wrote: Hi, thanks for your answer. It seems that I was a little imprecise. Of course the original data set doesn't change but if I export the a data set after setting a new reference in Brainvision Analyzer the header looks like that: Original header real.vhdr =============================== Brain Vision Data Exchange Header File Version 1.0 ; Data created by the Vision Recorder [...] Ch4=Fz,,0.1,µV realnewRef.vhdr =============================== Brain Vision Data Exchange Header File Version 1.0 ; Data created from history path: real/Raw Data/New Reference [...] Ch4=Fz,Avg,,µV This was just a test I did with some random data. I don't have acess to the orginal recording for the data sets I want to read in. The header from them look like Brain Vision Data Exchange Header File Version 1.0 ; Data created from history path: passive3101/Raw Data/Filters/New Reference/Attentive [...] Ch12=Fz,ref new,, Like I said what's really strange that I think I was able to preprocess the exact same data set a couple of month ago. Thanks for your help! Best, Julian Von: fieldtrip-bounces at donders.ru.nl [mailto:fieldtrip-bounces at donders.ru.nl] Im Auftrag von Casper van Heck Gesendet: Wednesday, January 25, 2012 10:10 AM An: Email discussion list for the FieldTrip project Betreff: Re: [FieldTrip] Missing resolution Information in *vhdr causes ft_preprocessing to return only NaNs Julian, It is my understanding that the header file doesn't change at all, since Brainvision Analyzer stores all changes either in the 'history' files or temporary files in the history folder. The *.vhdr and *.eeg (and marker files, if any) should be unchanged after preprocessing. Therefore, resolution information should still be there. Could you check the contents of the header file with notepad? It should say something like this for every channel under "[Channel Infos]": Ch27=Fz,,0.0715,µV Also, you could try to open it with Brainvision Analyzer, and see if that gives an error of sorts. Sincerely, Casper van Heck On Tue, Jan 24, 2012 at 11:54 PM, Karch, Julian > wrote: Hi, I'm working on a brainvision EEG dataset which was preprocessed by someone else using Brainvision Analyzer. One part of his preprocessing was to set a new reference. This processing step makes the resolution information in the *vhdr file disappear. Because of that hdr.orig.resolution=NaN for all channels. As result of that the lines calib = diag(hdr.resolution(chanindx)); % using a sparse multiplication speeds it up dat = full(sparse(calib) * dat); in read_brainvision_eeg produce only NaN. This again results in trials which only contain NaNs. I do weekly updates of fieldtrip using svn. Because I'm quite sure if was able to read in, using ft_preprocssing, the excact same dataset, even with the same cfg file, earlier this year I checked the modifications for the last half year or so but I couldn't find any change which could have broken it. My two questions are. How would you handle this problem? Just plug in some random numbers like 0.1 ? Is this an issue with fieldtrip or am I doing something wrong? Were there any changes to the involved functions which could have changed the behavior in that way? Thanks in advance! Best, Julian Julian Karch Research Assistant Center for Lifespan Psychology MPI for Human Development Lentzeallee 94, 14195 Berlin, Germany phone: +49-30-82406-296 fax: +49-30-8249939 web: http://www.mpib-berlin.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 -------------- next part -------------- An HTML attachment was scrubbed... URL: From lavado at gmail.com Thu Jan 26 13:39:41 2012 From: lavado at gmail.com (Ion Lavado) Date: Thu, 26 Jan 2012 13:39:41 +0100 Subject: [FieldTrip] Source reconstruction with MNE problem: vol doen's fit sourcespace In-Reply-To: <2143371294.742821.1326965027489.JavaMail.root@sculptor.zimbra.ru.nl> References: <437783613.742730.1326964902431.JavaMail.root@sculptor.zimbra.ru.nl> <2143371294.742821.1326965027489.JavaMail.root@sculptor.zimbra.ru.nl> Message-ID: Thank you for your help. I realigned it to Tailarach prior to freesurfer processing. Any idea? Ion 2012/1/19 Stolk, A. > Hi Ion, > > > > Did you realign your anatomical image to Talairach space (and > not accidentally to MNI space) prior to the processing with Freesurfer? > > > > http://imaging.mrc-cbu.cam.ac.uk/imaging/FindingCommissures > > > > Best regards, > > Arjen > > > > > ----- "Ion Lavado" schreef: > > Van: "Ion Lavado" > > Aan: fieldtrip at donders.ru.nl > > Verzonden: Donderdag 19 januari 2012 09:25:16 > > Onderwerp: [FieldTrip] Source reconstruction with MNE problem: vol > doen's fit sourcespace > > > > > Hello, i'm trying a source reconstruction of event related fields using > minimun-norm estimates and i get a problem with vol and sourcespace. When > plot them together the vol doesn't fit the sourcespace. I adjunted in the > mail two images where you can see what i get. It looks like that there > isn't any problem of coordinate system also the units seem to be ok. I also > procesed all the file with freesurfer so i suppose there is no problem with > the orig-nomask.mgz. > > Hope anyone can help me. Thank you very much. > > > > Ion > > > _______________________________________________ > > 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 jpnv2006 at gmail.com Thu Jan 26 13:46:06 2012 From: jpnv2006 at gmail.com (Juan Pablo Neira) Date: Thu, 26 Jan 2012 13:46:06 +0100 Subject: [FieldTrip] EEG Source Reconstruction using mne Message-ID: Hello, I have been working with fieldtrip the last two weeks to do source reconstruction using Minimun Norm Estimation (mne). Now I am analyzing real data (EEG) with individual MRI, it seems I am not having the right solution. So maybe someone can help me with the next questions: 1. How do I define the source space? I would like to have my sources in the whole brain or only in gray matter. When I calculated the source reconstruction (mne method) I had sources outside of the brain. 2. What are the possibilities to calculate or estimate the regularization parameter lambda in the Minimum Norm Estimation (mne) Method? Reading in some mne tutorials, they calculate the noise covariance matrix of the data using ft_timelockanalysis function, and then the ft_sourceanalysis uses this matrix to calculate labda for the mne method. Are there other possibilities? 3. We want to implement Fieldtrip to do the Preprocessing, forward and inverse (mne) calculations. But we have not found exact or close information of the complete task. These are the steps we are performing: - Read the EEG signals - Reject undesired channels - Referencing - Time domain analysis (ft_timelockanalysis) - Read, realign and segment individual MRI - Volume creation: we create the scalp, skull and brain meshes and then use ft_headmodel_bem_openmeeg - EEG sensor positions alignment with the scalp mesh of the volume. - Calculate the leadfield matrix - Finally the Source Analysis (method mne) Are we missing an important step? Best regards, Juan Pablo Neira Vesga University - Clinic Kiel, Germany From a.stolk at fcdonders.ru.nl Thu Jan 26 14:39:24 2012 From: a.stolk at fcdonders.ru.nl (Stolk, A.) Date: Thu, 26 Jan 2012 14:39:24 +0100 (CET) Subject: [FieldTrip] Source reconstruction with MNE problem: vol doen's fit sourcespace In-Reply-To: <804023878.857066.1327584774361.JavaMail.root@sculptor.zimbra.ru.nl> Message-ID: <1886031496.857328.1327585164114.JavaMail.root@sculptor.zimbra.ru.nl> Hi Ion, Could you specify some more details so we can reproduce your bug. Preferably by including a small test script with the same operations applied to the testdata (as in the tutorial) . Best regards, Arjen ----- "Ion Lavado" schreef: > Van: "Ion Lavado" > Aan: "Email discussion list for the FieldTrip project" > Verzonden: Donderdag 26 januari 2012 13:39:41 > Onderwerp: Re: [FieldTrip] Source reconstruction with MNE problem: vol doen's fit sourcespace > > Thank you for your help. I realigned it to Tailarach prior to freesurfer processing. Any idea? > Ion  > > 2012/1/19 Stolk, A. < a.stolk at fcdonders.ru.nl > > > Hi Ion, Did you realign your anatomical image to Talairach space (and not accidentally to MNI space) prior to the processing with Freesurfer? http://imaging.mrc-cbu.cam.ac.uk/imaging/FindingCommissures Best regards, Arjen > ----- "Ion Lavado" < lavado at gmail.com > schreef: > > Van: "Ion Lavado" < lavado at gmail.com > > > Aan: fieldtrip at donders.ru.nl > > Verzonden: Donderdag 19 januari 2012 09:25:16 > > Onderwerp: [FieldTrip] Source reconstruction with MNE problem: vol doen's fit        sourcespace > > > > > Hello, i'm trying a source reconstruction of event related fields using minimun-norm estimates and i get a problem with vol and sourcespace. When plot them together the vol doesn't fit the sourcespace. I adjunted in the mail two images where you can see what i get. It looks like that there isn't any problem of coordinate system also the units seem to be ok. I also procesed all the file with freesurfer so i suppose there is no problem with the orig-nomask.mgz. > Hope anyone can help me. Thank you very much. > > Ion > > _______________________________________________ > > 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 david.m.groppe at gmail.com Thu Jan 26 20:12:34 2012 From: david.m.groppe at gmail.com (David Groppe) Date: Thu, 26 Jan 2012 14:12:34 -0500 Subject: [FieldTrip] MD, DO, or MD/PhD fellowship in epilepsy, brain connectomics, and cognitive neuroscience (revised) Message-ID: Hi All, I apologize for the re-post, but we misstated some of the requirements for the MD, DO, or MD/PhD fellowship in the ad I previously posted. See below for the corrected requirements. much thanks, -David A research fellowship is available for work on epilepsy, brain connectomics and cognitive neuroscience with the Comprehensive Epilepsy Center at the Hofstra North Shore LIJ School of Medicine, in Manhasset, NY.  This unique fellowship will fund an MD, DO, or MD/PhD to serve as a research fellow under the mentorship of a team of experienced physicians and scientists and to engage in research using neuroimaging and electrophysiology to improve the diagnosis and treatment of epilepsy and to further the basic science functional brain mapping. Ongoing research projects include: (1) Validation of task-based and resting state fMRI and DTI measures of brain connectivity using electrical stimulation mapping and ECoG (2) Identifying areas of seizure onset and spread using network analysis of fMRI and ECoG dynamics (3) Investigation of the neuronal dynamics underlying selective attention, language comprehension, visual object identification and auditory stream analysis. For a more detailed description about the lab and representative publications see: http://www.feinsteininstitute.org/Feinstein/Laboratory+for+Multimodal+Human+Brain+Mapping Candidates should meet the following qualifications: 1) M.D., D.O., or an M.D./Ph.D. degree, 2) A United States citizen, national, or permanent resident 3) Have graduated from or be currently enrolled in a residency training program or fellowship. 4) Have some background in fMRI, electrophysiology, and/or data analysis using one or more of the following software packages: Matlab, FreeSurfer, FSL, AFNI This is a great opportunity for a physician-scientist to develop both as a clinician and researcher. An ideal candidate would be a neurologist, neurosurgeon or neuroradiologist with an interest in epilepsy, functional neurosurgery or functional brain mapping. This fellowship is part of the New York State ECRIP program, which offers a competitive salary and an opportunity to supplement income with clinical work Please submit CV and short statement of interest to Dr. Ashesh Mehta at amehta at nshs.edu for more information. -- David Groppe, Ph.D. Postdoctoral Researcher North Shore LIJ Health System New Hyde Park, New York http://www.cogsci.ucsd.edu/~dgroppe/ From lavado at gmail.com Fri Jan 27 09:33:10 2012 From: lavado at gmail.com (Ion Lavado) Date: Fri, 27 Jan 2012 09:33:10 +0100 Subject: [FieldTrip] Source reconstruction with MNE problem: vol doen's fit sourcespace In-Reply-To: <1886031496.857328.1327585164114.JavaMail.root@sculptor.zimbra.ru.nl> References: <804023878.857066.1327584774361.JavaMail.root@sculptor.zimbra.ru.nl> <1886031496.857328.1327585164114.JavaMail.root@sculptor.zimbra.ru.nl> Message-ID: Ok, thank you for your time Arjen. This is what i've done: *%READ AND REALINGN* mri = ft_read_mri('C:\Users\ilavado\Desktop\31_CW1AFMRI_ESG_ENDIKA_SANCHEZ_GOMEZ\1_028_t1_mpr_tra_p2_iso_20110314\31_CW1AFMRI_ESG_ENDIKA_SANCHEZ_GOMEZ_20110314_001_028_t1_mpr_tra_p2_iso.img'); cfg = []; cfg.interactive = 'yes'; cfg.coordsys = 'neuromag'; mri_other = ft_volumerealign(cfg,mri); *%RESLICING* cfg = []; cfg.resolution=1; cfg.dim=[256 256 256]; mrirs = ft_volumereslice(cfg, mri_other); save mrirs; *%SEGMENTATION* load mrirs; cfg = []; cfg.coordsys = 'neuromag'; cfg.output={'skullstrip' 'brain'}; seg = ft_volumesegment(cfg, mrirs) save seg seg; *%REALING TO TALAIRACH* load mrirs; cfg=[]; cfg.method='interactive'; cfg.coordsys = 'neuromag'; mri_tal=ft_volumerealign(cfg,mrirs); *%mrirs o mri_other???* save mri_tal mri_tal seg.transform = mri_tal.transform; cfg = []; cfg.filename = 'Subject29_mri_freesurfer2'; cfg.filetype = 'mgz'; cfg.parameter = 'anatomy'; ft_volumewrite(cfg, mri_tal); cfg.filename = 'Subject29masked2'; ft_volumewrite(cfg, seg); THE I CREATE ALL THE FILES (WITH THE TUTORIAL COMMANDS) WITH FREESURFER with "Subject29masked2.mgz" and "Subject29_mri_freesurfer2.mgz" AND HERE IN THE SOURCE MODEL IS WHERE I GET THE PROBLEM. *%CREATE THE MESH* bnd = ft_read_headshape('29_mri-oct-6-src.fif', 'format', 'mne_source'); figure;ft_plot_mesh(bnd); *%CO-REGISTRATION* mri_norm = ft_read_mri('/home/mlizarazu/public/Exchange/Mikel/Subject29/mri/orig-nomask.mgz'); cfg = []; cfg.method = 'interactive'; mri_norm_ctf = ft_volumerealign(cfg, mri_norm); mri_norm_ctf = ft_convert_units(mri_norm_ctf, 'cm'); T = mri_norm_ctf.transform*inv(mri_norm_ctf.transformorig); bnd = ft_read_headshape('29_mri-oct-6-src.fif', 'format', 'mne_source'); sourcespace = ft_convert_units(bnd, 'cm'); sourcespace = ft_transform_geometry(T, sourcespace); *%VOLUME MODEL* cfg = []; cfg.coordsys = 'spm'; cfg.output = {'brain'}; seg = ft_volumesegment(cfg, mri_norm); cfg = []; vol = ft_prepare_singleshell(cfg,seg); vol.bnd = ft_transform_geometry(T, vol.bnd); *%PLOT* figure;hold on; ft_plot_vol(vol, 'facecolor', 'none');alpha 0.5; ft_plot_mesh(sourcespace_ctf, 'edgecolor', 'none'); camlight When plotting i have the problem that you see in the photos... Hope we can solve this. Thank you. Best whises Ion 2012/1/26 Stolk, A. > Hi Ion, > > > > Could you specify some more details so we can reproduce your bug. > Preferably by including a small test script with the same operations > applied to the testdata (as in the tutorial). > > > > Best regards, > > Arjen > > > ----- "Ion Lavado" schreef: > > Van: "Ion Lavado" > > Aan: "Email discussion list for the FieldTrip project" < > fieldtrip at donders.ru.nl> > > Verzonden: Donderdag 26 januari 2012 13:39:41 > > Onderwerp: Re: [FieldTrip] Source reconstruction with MNE problem: vol > doen's fit sourcespace > > > > > Thank you for your help. I realigned it to Tailarach prior to freesurfer > processing. Any idea? > > > > > Ion > > > > 2012/1/19 Stolk, A. > > >> >> > >> >> Hi Ion, >> >> >> >> Did you realign your anatomical image to Talairach space (and >> not accidentally to MNI space) prior to the processing with Freesurfer? >> >> >> >> http://imaging.mrc-cbu.cam.ac.uk/imaging/FindingCommissures >> >> >> >> Best regards, >> >> Arjen >> >> >> >> >> > ----- "Ion Lavado" schreef: >> > > Van: "Ion Lavado" >> > > Aan: fieldtrip at donders.ru.nl >> > > Verzonden: Donderdag 19 januari 2012 09:25:16 >> > > Onderwerp: [FieldTrip] Source reconstruction with MNE problem: vol >> doen's fit sourcespace >> > >> > > >> > > Hello, i'm trying a source reconstruction of event related fields >> using minimun-norm estimates and i get a problem with vol and sourcespace. >> When plot them together the vol doesn't fit the sourcespace. I adjunted in >> the mail two images where you can see what i get. It looks like that there >> isn't any problem of coordinate system also the units seem to be ok. I also >> procesed all the file with freesurfer so i suppose there is no problem with >> the orig-nomask.mgz. >> >> > >> Hope anyone can help me. Thank you very much. >> >> > > >> Ion >> >> > >> > _______________________________________________ >> > > fieldtrip mailing list >> > > fieldtrip at donders.ru.nl >> > > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip >> >> > _______________________________________________ >> > fieldtrip mailing list >> > fieldtrip at donders.ru.nl >> > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip >> > > > > > > > > _______________________________________________ > > fieldtrip mailing list > > fieldtrip at donders.ru.nl > > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > -------------- next part -------------- An HTML attachment was scrubbed... URL: From lavado at gmail.com Fri Jan 27 10:05:35 2012 From: lavado at gmail.com (Ion Lavado) Date: Fri, 27 Jan 2012 10:05:35 +0100 Subject: [FieldTrip] Source reconstruction with MNE problem: vol doen's fit sourcespace In-Reply-To: References: <804023878.857066.1327584774361.JavaMail.root@sculptor.zimbra.ru.nl> <1886031496.857328.1327585164114.JavaMail.root@sculptor.zimbra.ru.nl> Message-ID: I think the problem is in the first steps, where i used neuromag coordinates... and i have to work in CTF and then to Talairach... i'll try it againg. 2012/1/27 Ion Lavado > Ok, thank you for your time Arjen. This is what i've done: > > > > > > *%READ AND REALINGN* > mri = > ft_read_mri('C:\Users\ilavado\Desktop\31_CW1AFMRI_ESG_ENDIKA_SANCHEZ_GOMEZ\1_028_t1_mpr_tra_p2_iso_20110314\31_CW1AFMRI_ESG_ENDIKA_SANCHEZ_GOMEZ_20110314_001_028_t1_mpr_tra_p2_iso.img'); > cfg = []; > cfg.interactive = 'yes'; > cfg.coordsys = 'neuromag'; > mri_other = ft_volumerealign(cfg,mri); > > *%RESLICING* > cfg = []; > cfg.resolution=1; > cfg.dim=[256 256 256]; > mrirs = ft_volumereslice(cfg, mri_other); > save mrirs; > > *%SEGMENTATION* > load mrirs; > cfg = []; > cfg.coordsys = 'neuromag'; > cfg.output={'skullstrip' 'brain'}; > seg = ft_volumesegment(cfg, mrirs) > save seg seg; > > *%REALING TO TALAIRACH* > load mrirs; > cfg=[]; > cfg.method='interactive'; > cfg.coordsys = 'neuromag'; > mri_tal=ft_volumerealign(cfg,mrirs); *%mrirs o mri_other???* > save mri_tal mri_tal > > > seg.transform = mri_tal.transform; > cfg = []; > cfg.filename = 'Subject29_mri_freesurfer2'; > cfg.filetype = 'mgz'; > cfg.parameter = 'anatomy'; > ft_volumewrite(cfg, mri_tal); > > cfg.filename = 'Subject29masked2'; > ft_volumewrite(cfg, seg); > > > > THE I CREATE ALL THE FILES (WITH THE TUTORIAL COMMANDS) WITH FREESURFER > with "Subject29masked2.mgz" and "Subject29_mri_freesurfer2.mgz" > AND HERE IN THE SOURCE MODEL IS WHERE I GET THE PROBLEM. > > > *%CREATE THE MESH* > bnd = ft_read_headshape('29_mri-oct-6-src.fif', 'format', 'mne_source'); > figure;ft_plot_mesh(bnd); > > > *%CO-REGISTRATION* > mri_norm = > ft_read_mri('/home/mlizarazu/public/Exchange/Mikel/Subject29/mri/orig-nomask.mgz'); > cfg = []; > cfg.method = 'interactive'; > mri_norm_ctf = ft_volumerealign(cfg, mri_norm); > > > mri_norm_ctf = ft_convert_units(mri_norm_ctf, 'cm'); > T = mri_norm_ctf.transform*inv(mri_norm_ctf.transformorig); > bnd = ft_read_headshape('29_mri-oct-6-src.fif', 'format', 'mne_source'); > sourcespace = ft_convert_units(bnd, 'cm'); > sourcespace = ft_transform_geometry(T, sourcespace); > > > *%VOLUME MODEL* > cfg = []; > cfg.coordsys = 'spm'; > cfg.output = {'brain'}; > seg = ft_volumesegment(cfg, mri_norm); > > cfg = []; > vol = ft_prepare_singleshell(cfg,seg); > vol.bnd = ft_transform_geometry(T, vol.bnd); > > *%PLOT* > figure;hold on; > ft_plot_vol(vol, 'facecolor', 'none');alpha 0.5; > ft_plot_mesh(sourcespace_ctf, 'edgecolor', 'none'); camlight > > > > > When plotting i have the problem that you see in the photos... Hope we can > solve this. > > Thank you. > > > > Best whises > > > Ion > > > > > > > > 2012/1/26 Stolk, A. > > Hi Ion, >> >> >> >> Could you specify some more details so we can reproduce your bug. >> Preferably by including a small test script with the same operations >> applied to the testdata (as in the tutorial). >> >> >> >> Best regards, >> >> Arjen >> >> >> ----- "Ion Lavado" schreef: >> > Van: "Ion Lavado" >> > Aan: "Email discussion list for the FieldTrip project" < >> fieldtrip at donders.ru.nl> >> > Verzonden: Donderdag 26 januari 2012 13:39:41 >> > Onderwerp: Re: [FieldTrip] Source reconstruction with MNE problem: vol >> doen's fit sourcespace >> >> > >> > Thank you for your help. I realigned it to Tailarach prior to >> freesurfer processing. Any idea? >> >> >> > >> Ion >> > >> > 2012/1/19 Stolk, A. >> > >>> >>> > >>> >>> Hi Ion, >>> >>> >>> >>> Did you realign your anatomical image to Talairach space (and >>> not accidentally to MNI space) prior to the processing with Freesurfer? >>> >>> >>> >>> http://imaging.mrc-cbu.cam.ac.uk/imaging/FindingCommissures >>> >>> >>> >>> Best regards, >>> >>> Arjen >>> >>> >>> >>> >>> > ----- "Ion Lavado" schreef: >>> > > Van: "Ion Lavado" >>> > > Aan: fieldtrip at donders.ru.nl >>> > > Verzonden: Donderdag 19 januari 2012 09:25:16 >>> > > Onderwerp: [FieldTrip] Source reconstruction with MNE problem: vol >>> doen's fit sourcespace >>> > >>> > > >>> > > Hello, i'm trying a source reconstruction of event related fields >>> using minimun-norm estimates and i get a problem with vol and sourcespace. >>> When plot them together the vol doesn't fit the sourcespace. I adjunted in >>> the mail two images where you can see what i get. It looks like that there >>> isn't any problem of coordinate system also the units seem to be ok. I also >>> procesed all the file with freesurfer so i suppose there is no problem with >>> the orig-nomask.mgz. >>> >>> > >>> Hope anyone can help me. Thank you very much. >>> >>> > > >>> Ion >>> >>> > >>> > _______________________________________________ >>> > > fieldtrip mailing list >>> > > fieldtrip at donders.ru.nl >>> > > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip >>> >>> > _______________________________________________ >>> > fieldtrip mailing list >>> > fieldtrip at donders.ru.nl >>> > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip >>> > >> >> >> > >> >> > _______________________________________________ >> > fieldtrip mailing list >> > fieldtrip at donders.ru.nl >> > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip >> >> _______________________________________________ >> fieldtrip mailing list >> fieldtrip at donders.ru.nl >> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip >> > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From a.stolk at fcdonders.ru.nl Fri Jan 27 10:10:37 2012 From: a.stolk at fcdonders.ru.nl (Stolk, A.) Date: Fri, 27 Jan 2012 10:10:37 +0100 (CET) Subject: [FieldTrip] Source reconstruction with MNE problem: vol doen's fit sourcespace In-Reply-To: <732434275.867549.1327655396459.JavaMail.root@sculptor.zimbra.ru.nl> Message-ID: <1650950033.867568.1327655437024.JavaMail.root@sculptor.zimbra.ru.nl> Hi Ion, Thanks for providing the details. I cannot test run these commands myself as they point to your private dataset and not the example 'Subject01'. However, scanning through the text , it seems to me you have used  the correct lines of code. Perhaps something may have gone wrong with the interactive volumealignment procedures, 3 times in total. Did you manually press the l, r, and n buttons when selecting the left and right ear, and nasion in the first and third interactive alignment steps? And, in contrast, did you press the a, p, and z buttons when  selecting the anterior and posterior commi su res and an inter hemispheric point (see link in previous mail) in the second alignment step? This is the 'realign to talairach' part of the code. Best regards, Arjen ----- "Ion Lavado" schreef: > Van: "Ion Lavado" > Aan: "Email discussion list for the FieldTrip project" > Verzonden: Vrijdag 27 januari 2012 09:33:10 > Onderwerp: Re: [FieldTrip] Source reconstruction with MNE problem: vol doen's fit sourcespace > > Ok, thank you for your time Arjen. This is what i've done: > %READ AND REALINGN > mri = ft_read_mri('C:\Users\ilavado\Desktop\31_CW1AFMRI_ESG_ENDIKA_SANCHEZ_GOMEZ\1_028_t1_mpr_tra_p2_iso_20110314\31_CW1AFMRI_ESG_ENDIKA_SANCHEZ_GOMEZ_20110314_001_028_t1_mpr_tra_p2_iso.img'); > cfg = []; > cfg.interactive    = 'yes'; > cfg.coordsys    = 'neuromag'; > mri_other           = ft_volumerealign(cfg,mri); > %RESLICING > cfg = []; > cfg.resolution=1; > cfg.dim=[256 256 256]; > mrirs = ft_volumereslice(cfg, mri_other); > save mrirs; > %SEGMENTATION > load mrirs; > cfg = []; > cfg.coordsys    = 'neuromag'; > cfg.output={'skullstrip' 'brain'}; > seg   = ft_volumesegment(cfg, mrirs) > save seg seg; > %REALING TO TALAIRACH > load mrirs; > cfg=[]; > cfg.method='interactive'; > cfg.coordsys    = 'neuromag'; > mri_tal=ft_volumerealign(cfg,mrirs);    %mrirs o mri_other??? > save mri_tal mri_tal > seg.transform = mri_tal.transform; > cfg             = []; > cfg.filename    = 'Subject29_mri_freesurfer2'; > cfg.filetype = 'mgz'; > cfg.parameter   = 'anatomy'; > ft_volumewrite(cfg, mri_tal); > cfg.filename    = 'Subject29masked2'; > ft_volumewrite(cfg, seg); > THE I CREATE ALL THE FILES (WITH THE TUTORIAL COMMANDS) WITH FREESURFER with "Subject29masked2.mgz" and "Subject29_mri_freesurfer2.mgz" > AND HERE IN THE SOURCE MODEL IS WHERE I GET THE PROBLEM. > > %CREATE THE MESH > bnd = ft_read_headshape('29_mri-oct-6-src.fif', 'format', 'mne_source'); figure;ft_plot_mesh(bnd); > %CO-REGISTRATION > mri_norm = ft_read_mri('/home/mlizarazu/public/Exchange/Mikel/Subject29/mri/orig-nomask.mgz'); cfg = []; cfg.method = 'interactive'; mri_norm_ctf = ft_volumerealign(cfg, mri_norm); > > mri_norm_ctf = ft_convert_units(mri_norm_ctf, 'cm'); T   = mri_norm_ctf.transform*inv(mri_norm_ctf.transformorig); bnd  = ft_read_headshape('29_mri-oct-6-src.fif', 'format', 'mne_source'); sourcespace = ft_convert_units(bnd, 'cm'); sourcespace = ft_transform_geometry(T, sourcespace); > %VOLUME MODEL > cfg           = []; > cfg.coordsys    = 'spm'; > cfg.output    = {'brain'}; > seg           = ft_volumesegment(cfg, mri_norm); > cfg = []; > vol = ft_prepare_singleshell(cfg,seg); > vol.bnd = ft_transform_geometry(T, vol.bnd); > %PLOT > figure;hold on; > ft_plot_vol(vol, 'facecolor', 'none');alpha 0.5; > ft_plot_mesh(sourcespace_ctf, 'edgecolor', 'none'); camlight > When plotting i have the problem that you see in the photos... Hope we can solve this. > > Thank you. > Best whises > Ion > > 2012/1/26 Stolk, A. < a.stolk at fcdonders.ru.nl > > > Hi Ion, Could you specify some more details so we can reproduce your bug. Preferably by including a small test script with the same operations applied to the testdata (as in the tutorial). Best regards, Arjen > > ----- "Ion Lavado" < lavado at gmail.com > schreef: > > Van: "Ion Lavado" < lavado at gmail.com > > > Aan: "Email discussion list for the FieldTrip project" < fieldtrip at donders.ru.nl > > > Verzonden: Donderdag 26 januari 2012 13:39:41 > > Onderwerp: Re: [FieldTrip] Source reconstruction with MNE problem: vol doen's fit sourcespace > > > > > Thank you for your help. I realigned it to Tailarach prior to freesurfer processing. Any idea? > > > Ion  > > > > 2012/1/19 Stolk, A. < a.stolk at fcdonders.ru.nl > > > > > Hi Ion, Did you realign your anatomical image to Talairach space (and not accidentally to MNI space) prior to the processing with Freesurfer? http://imaging.mrc-cbu.cam.ac.uk/imaging/FindingCommissures Best regards, Arjen > > ----- "Ion Lavado" < lavado at gmail.com > schreef: > > > Van: "Ion Lavado" < lavado at gmail.com > > > > Aan: fieldtrip at donders.ru.nl > > > Verzonden: Donderdag 19 januari 2012 09:25:16 > > > Onderwerp: [FieldTrip] Source reconstruction with MNE problem: vol doen's fit        sourcespace > > > > > > > Hello, i'm trying a source reconstruction of event related fields using minimun-norm estimates and i get a problem with vol and sourcespace. When plot them together the vol doesn't fit the sourcespace. I adjunted in the mail two images where you can see what i get. It looks like that there isn't any problem of coordinate system also the units seem to be ok. I also procesed all the file with freesurfer so i suppose there is no problem with the orig-nomask.mgz. > Hope anyone can help me. Thank you very much. > > > Ion > > > _______________________________________________ > > > 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 > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -------------- next part -------------- An HTML attachment was scrubbed... URL: From m.cardinale at student.maastrichtuniversity.nl Fri Jan 27 12:32:49 2012 From: m.cardinale at student.maastrichtuniversity.nl (Cardinale, Vita (Stud. FPN / Alumni)) Date: Fri, 27 Jan 2012 12:32:49 +0100 Subject: [FieldTrip] (no subject) Message-ID: Dear all, I just started to use FIELDTRIP with going through the tutorial. Already reading in the data from the tutorial is not working as it should. Here is what I get when doing the trial definition for the fully incongruent (FIC) condition from the tutorial “Trigger-based trial selection, Reading and preprocessing the interesting trials”: cfg = []; cfg.dataset = 'Subject01.ds'; cfg.trialdef.eventtype = 'backpanel trigger'; cfg.trialdef.eventvalue = 3; % the value of the stimulus trigger for fully incongruent (FIC). cfg.trialdef.prestim = 1; % in seconds cfg.trialdef.poststim = 2; % in seconds cfg = ft_definetrial(cfg); I get this warning: no trialfun was specified, using trialfun_general > In ft_definetrial at 123 evaluating trialfunction 'trialfun_general' readCTFds: Data set error : size of meg4 file(s) 0 bytes (from dir command) 179071200 bytes (from res4 file) reading the events from 'Subject01.ds\Subject01.res4' readCTFds: Data set error : size of meg4 file(s) 0 bytes (from dir command) 179071200 bytes (from res4 file) When using hdr = ft_read_header('Subject01.ds') or hdr = ft_read_header('Subject01.ds/Subject01.res4') I get this warning: Warning: adding D:\Vita\fieldtrip-20120124\external\ctf toolbox to your Matlab path readCTFds: Data set error : size of meg4 file(s) 0 bytes (from dir command) 179071200 bytes (from res4 file) together with this output: hdr = Fs: 300 nChans: 187 nSamples: 900 nSamplesPre: 300 nTrials: -1 label: {187x1 cell} grad: [1x1 struct] orig: [1x1 struct] chantype: {187x1 cell} chanunit: {187x1 cell} which according to the tutorial should be: hdr = Fs: 300 % sampling frequency nChans: 187 % number of channels nSamples: 900 % number of samples per trial nSamplesPre: 300 % number of pre-trigger samples in each trial nTrials: 266 % number of trials label: {187x1 cell} % cell-array with labels of each channel grad: [1x1 struct] % gradiometer structure orig: [1x1 struct] % additional header information What could go wrong? -------------- next part -------------- An HTML attachment was scrubbed... URL: From eelke.spaak at donders.ru.nl Fri Jan 27 13:27:28 2012 From: eelke.spaak at donders.ru.nl (Eelke Spaak) Date: Fri, 27 Jan 2012 13:27:28 +0100 Subject: [FieldTrip] (no subject) In-Reply-To: References: Message-ID: Dear Vita, On 27 January 2012 12:32, Cardinale, Vita (Stud. FPN / Alumni) wrote: > I get this warning: > > no trialfun was specified, using trialfun_general >> In ft_definetrial at 123 > evaluating trialfunction 'trialfun_general' This means that ft_definetrial is using trialfun_general as the function to determine the trials-of-interest in your data. This is the default if you do not specify cfg.trialfun yourself, and is the proper setting for running the tutorial. So, nothing to worry about here. > > Warning: adding D:\Vita\fieldtrip-20120124\external\ctf toolbox to your > Matlab path > Also as it should be; FT issues warnings whenever a toolbox is automatically added to your path. > readCTFds: Data set error : size of meg4 file(s) >            0 bytes (from dir command) >    179071200 bytes (from res4 file) > > > together with this output: > > > > hdr = > >              Fs: 300 >          nChans: 187 >        nSamples: 900 >     nSamplesPre: 300 >         nTrials: -1 >           label: {187x1 cell} >            grad: [1x1 struct] >            orig: [1x1 struct] >        chantype: {187x1 cell} >        chanunit: {187x1 cell} > > > > which according to the tutorial should be: > > > > hdr = > > > >              Fs: 300           % sampling frequency > >          nChans: 187           % number of channels > >        nSamples: 900           % number of samples per trial > >     nSamplesPre: 300           % number of pre-trigger samples in each trial > >         nTrials: 266           % number of trials > >           label: {187x1 cell}  % cell-array with labels of each channel > >            grad: [1x1 struct]  % gradiometer structure > >            orig: [1x1 struct]  % additional header information > This actually is indicative of a problem. The extra chantype and chanunit fields are fine, they are just new fields that were not present at the time the tutorial was written. The nTrials = -1 issue, together with the "data set error" message you mentioned, means that something is going wrong when reading in the data. The first thing that comes to mind on what causes this is improper directory settings. Since your e-mail was sent through the Donders SMTP server, I am guessing you are located at the DCCN, am I right? You could try specifying the full path to the test dataset: cfg.dataset = '/home/common/matlab/fieldtrip/data/Subject01.ds'; If that still does not work, let us know. Best, Eelke > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip From eelke.spaak at donders.ru.nl Fri Jan 27 13:51:51 2012 From: eelke.spaak at donders.ru.nl (Eelke Spaak) Date: Fri, 27 Jan 2012 13:51:51 +0100 Subject: [FieldTrip] (no subject) In-Reply-To: <4A2FF861-A393-4E73-A3B2-4B6EC00AA1A7@donders.ru.nl> References: <4A2FF861-A393-4E73-A3B2-4B6EC00AA1A7@donders.ru.nl> Message-ID: A PS from the esteemed Dr. Schoffelen: since you are working on a Windows machine, you should specify (again, this is DCCN-specific): cfg.dataset = 'H:/common/matlab/fieldtrip/data/Subject01.ds'; instead of using /home/... On 27 January 2012 13:39, jan-mathijs schoffelen wrote: > ....ze lijkt op een PC te werken. > > Gr, > > JM > > > On Jan 27, 2012, at 1:27 PM, Eelke Spaak wrote: > > Dear Vita, > > On 27 January 2012 12:32, Cardinale, Vita (Stud. FPN / Alumni) > wrote: > > I get this warning: > > > no trialfun was specified, using trialfun_general > > In ft_definetrial at 123 > > evaluating trialfunction 'trialfun_general' > > > This means that ft_definetrial is using trialfun_general as the > function to determine the trials-of-interest in your data. This is the > default if you do not specify cfg.trialfun yourself, and is the proper > setting for running the tutorial. So, nothing to worry about here. > > > Warning: adding D:\Vita\fieldtrip-20120124\external\ctf toolbox to your > > Matlab path > > > > Also as it should be; FT issues warnings whenever a toolbox is > automatically added to your path. > > readCTFds: Data set error : size of meg4 file(s) > >            0 bytes (from dir command) > >    179071200 bytes (from res4 file) > > > > together with this output: > > > > > hdr = > > >              Fs: 300 > >          nChans: 187 > >        nSamples: 900 > >     nSamplesPre: 300 > >         nTrials: -1 > >           label: {187x1 cell} > >            grad: [1x1 struct] > >            orig: [1x1 struct] > >        chantype: {187x1 cell} > >        chanunit: {187x1 cell} > > > > > which according to the tutorial should be: > > > > > hdr = > > > > >              Fs: 300           % sampling frequency > > >          nChans: 187           % number of channels > > >        nSamples: 900           % number of samples per trial > > >     nSamplesPre: 300           % number of pre-trigger samples in each trial > > >         nTrials: 266           % number of trials > > >           label: {187x1 cell}  % cell-array with labels of each channel > > >            grad: [1x1 struct]  % gradiometer structure > > >            orig: [1x1 struct]  % additional header information > > > > This actually is indicative of a problem. The extra chantype and > chanunit fields are fine, they are just new fields that were not > present at the time the tutorial was written. The nTrials = -1 issue, > together with the "data set error" message you mentioned, means that > something is going wrong when reading in the data. > > The first thing that comes to mind on what causes this is improper > directory settings. Since your e-mail was sent through the Donders > SMTP server, I am guessing you are located at the DCCN, am I right? > You could try specifying the full path to the test dataset: > > cfg.dataset = '/home/common/matlab/fieldtrip/data/Subject01.ds'; > > If that still does not work, let us know. > > Best, > Eelke > > > > _______________________________________________ > > 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 > From stephen.whitmarsh at gmail.com Fri Jan 27 14:45:21 2012 From: stephen.whitmarsh at gmail.com (Stephen Whitmarsh) Date: Fri, 27 Jan 2012 14:45:21 +0100 Subject: [FieldTrip] (no subject) In-Reply-To: References: Message-ID: Ouch, was called away and forgot to press send and now Eelke already answered ;-) Ah, well, just for sake of style, here's my 2 cents, i think its just a repetition of Eelke's anwer, which might be consoling by itself... Dear Vita, First of all, you should not be too alarmed at these specific *warnings*: no trialfun was specified, using trialfun_general > In ft_definetrial at 123 evaluating trialfunction 'trialfun_general' Indeed, you have not specified a trialfunction for now (but you will in the near future). This one: Warning: adding D:\Vita\fieldtrip-20120124\external\ctf toolbox to your Matlab path Is just to make you aware what is happening. If FieldTrip knows it needs extra folders added to the path it will try to do so itself (using the function ft_hastoolbox). This is very convenient since it allows you only to add the fieldtrip root folder and not all the subfolders which in some cases might cause conflicts with other matlab toolboxes. You can use the ft_defaults to add only the bare minumum. Then there is the error, which is a concern: readCTFds: Data set error : size of meg4 file(s) 0 bytes (from dir command) 179071200 bytes (from res4 file) Since you are a newbee, I'll ask the obvious question, don't take it personal ;-). It might have been a problem on this side, but its helps to check: Where on the path are you? type 'pwd' to know. Where is the subject.ds folder? if you type 'dir' it should be there. If not, add a path to the cfg.dataset. Perhaps you are *in* the .ds folder. In that case, get out, one branch back! Cheers, stephen On 27 January 2012 12:32, Cardinale, Vita (Stud. FPN / Alumni) wrote: > Dear all, > > I just started to use FIELDTRIP with going through the tutorial. Already > reading in the data from the tutorial is not working as it should. Here is > what I get when doing the trial definition for the fully incongruent (FIC) > condition from the tutorial > > “Trigger-based trial selection, Reading and preprocessing the interesting > trials”: > > > >  cfg                         = []; > >   cfg.dataset                 = 'Subject01.ds'; > >   cfg.trialdef.eventtype      = 'backpanel trigger'; > >   cfg.trialdef.eventvalue     = 3; % the value of the stimulus trigger for > fully incongruent (FIC). > >   cfg.trialdef.prestim        = 1; % in seconds > >   cfg.trialdef.poststim       = 2; % in seconds > > > >   cfg = ft_definetrial(cfg); > > > > I get this warning: > > > > no trialfun was specified, using trialfun_general >> In ft_definetrial at 123 > evaluating trialfunction 'trialfun_general' > > readCTFds: Data set error : size of meg4 file(s) >            0 bytes (from dir command) >    179071200 bytes (from res4 file) > > reading the events from 'Subject01.ds\Subject01.res4' > > readCTFds: Data set error : size of meg4 file(s) >            0 bytes (from dir command) >    179071200 bytes (from res4 file) > > > > When using hdr = ft_read_header('Subject01.ds') or hdr = > ft_read_header('Subject01.ds/Subject01.res4') > > I get this warning: > > > > Warning: adding D:\Vita\fieldtrip-20120124\external\ctf toolbox to your > Matlab path > > readCTFds: Data set error : size of meg4 file(s) >            0 bytes (from dir command) >    179071200 bytes (from res4 file) > > > together with this output: > > > > hdr = > >              Fs: 300 >          nChans: 187 >        nSamples: 900 >     nSamplesPre: 300 >         nTrials: -1 >           label: {187x1 cell} >            grad: [1x1 struct] >            orig: [1x1 struct] >        chantype: {187x1 cell} >        chanunit: {187x1 cell} > > > > which according to the tutorial should be: > > > > hdr = > > > >              Fs: 300           % sampling frequency > >          nChans: 187           % number of channels > >        nSamples: 900           % number of samples per trial > >     nSamplesPre: 300           % number of pre-trigger samples in each trial > >         nTrials: 266           % number of trials > >           label: {187x1 cell}  % cell-array with labels of each channel > >            grad: [1x1 struct]  % gradiometer structure > >            orig: [1x1 struct]  % additional header information > > > > What could go wrong? > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip From Lilla.Magyari at mpi.nl Fri Jan 27 15:17:34 2012 From: Lilla.Magyari at mpi.nl (Magyari, Lilla) Date: Fri, 27 Jan 2012 15:17:34 +0100 Subject: [FieldTrip] Source reconstruction with MNE problem: vol doen's fit sourcespace In-Reply-To: References: <804023878.857066.1327584774361.JavaMail.root@sculptor.zimbra.ru.nl> <1886031496.857328.1327585164114.JavaMail.root@sculptor.zimbra.ru.nl> Message-ID: <4F22B1FE.8090806@mpi.nl> hi Ion, yes, the tutorial script was written and tested in the following way: you have to align your volume to the ctf coordinate system (doesn't matter what was its original coordinate system), then reslice this re-aligned volume, then segment the resliced volume, then re-align to talairach the resliced volume (that has been re-aligned to ctf before). I hope it will work out. Lilla Ion Lavado wrote: > I think the problem is in the first steps, where i used neuromag > coordinates... and i have to work in CTF and then to Talairach... i'll > try it againg. > > 2012/1/27 Ion Lavado > > > Ok, thank you for your time Arjen. This is what i've done: > > > > > > *%READ AND REALINGN* > mri = > ft_read_mri('C:\Users\ilavado\Desktop\31_CW1AFMRI_ESG_ENDIKA_SANCHEZ_GOMEZ\1_028_t1_mpr_tra_p2_iso_20110314\31_CW1AFMRI_ESG_ENDIKA_SANCHEZ_GOMEZ_20110314_001_028_t1_mpr_tra_p2_iso.img'); > cfg = []; > cfg.interactive = 'yes'; > cfg.coordsys = 'neuromag'; > mri_other = ft_volumerealign(cfg,mri); > > *%RESLICING* > cfg = []; > cfg.resolution=1; > cfg.dim=[256 256 256]; > mrirs = ft_volumereslice(cfg, mri_other); > save mrirs; > > *%SEGMENTATION* > load mrirs; > cfg = []; > cfg.coordsys = 'neuromag'; > cfg.output={'skullstrip' 'brain'}; > seg = ft_volumesegment(cfg, mrirs) > save seg seg; > > *%REALING TO TALAIRACH* > load mrirs; > cfg=[]; > cfg.method='interactive'; > cfg.coordsys = 'neuromag'; > mri_tal=ft_volumerealign(cfg,mrirs); *%mrirs o mri_other???* > save mri_tal mri_tal > > > seg.transform = mri_tal.transform; > cfg = []; > cfg.filename = 'Subject29_mri_freesurfer2'; > cfg.filetype = 'mgz'; > cfg.parameter = 'anatomy'; > ft_volumewrite(cfg, mri_tal); > > cfg.filename = 'Subject29masked2'; > ft_volumewrite(cfg, seg); > > > > THE I CREATE ALL THE FILES (WITH THE TUTORIAL COMMANDS) WITH > FREESURFER with "Subject29masked2.mgz" and > "Subject29_mri_freesurfer2.mgz" > AND HERE IN THE SOURCE MODEL IS WHERE I GET THE PROBLEM. > > > *%CREATE THE MESH* > bnd = ft_read_headshape('29_mri-oct-6-src.fif', 'format', 'mne_source'); > figure;ft_plot_mesh(bnd); > > > *%CO-REGISTRATION* > mri_norm = > ft_read_mri('/home/mlizarazu/public/Exchange/Mikel/Subject29/mri/orig-nomask.mgz'); > cfg = []; > cfg.method = 'interactive'; > mri_norm_ctf = ft_volumerealign(cfg, mri_norm); > > > mri_norm_ctf = ft_convert_units(mri_norm_ctf, 'cm'); > T = mri_norm_ctf.transform*inv(mri_norm_ctf.transformorig); > bnd = ft_read_headshape('29_mri-oct-6-src.fif', 'format', > 'mne_source'); > sourcespace = ft_convert_units(bnd, 'cm'); > sourcespace = ft_transform_geometry(T, sourcespace); > > > *%VOLUME MODEL* > cfg = []; > cfg.coordsys = 'spm'; > cfg.output = {'brain'}; > seg = ft_volumesegment(cfg, mri_norm); > > cfg = []; > vol = ft_prepare_singleshell(cfg,seg); > vol.bnd = ft_transform_geometry(T, vol.bnd); > > *%PLOT* > figure;hold on; > ft_plot_vol(vol, 'facecolor', 'none');alpha 0.5; > ft_plot_mesh(sourcespace_ctf, 'edgecolor', 'none'); camlight > > > > > When plotting i have the problem that you see in the photos... Hope > we can solve this. > > Thank you. > > > > Best whises > > > Ion > > > > > > > > 2012/1/26 Stolk, A. > > > Hi Ion, > > > > Could you specify some more details so we can reproduce your > bug. Preferably by including a small test script with the same > operations applied to the testdata (as in the tutorial). > > > > Best regards, > > Arjen > > > ----- "Ion Lavado" > > schreef: > > Van: "Ion Lavado" > > > Aan: "Email discussion list for the FieldTrip project" > > > > Verzonden: Donderdag 26 januari 2012 13:39:41 > > Onderwerp: Re: [FieldTrip] Source reconstruction with MNE > problem: vol doen's fit sourcespace > > > > > Thank you for your help. I realigned it to Tailarach prior to > freesurfer processing. Any idea? > > > > > Ion > > > > 2012/1/19 Stolk, A. > > > > > > > > Hi Ion, > > > > Did you realign your anatomical image to Talairach space > (and not accidentally to MNI space) prior to the processing > with Freesurfer? > > > > http://imaging.mrc-cbu.cam.ac.uk/imaging/FindingCommissures > > > > Best regards, > > Arjen > > > > > > ----- "Ion Lavado" > schreef: > > > Van: "Ion Lavado" > > > > Aan: fieldtrip at donders.ru.nl > > > > Verzonden: Donderdag 19 januari 2012 09:25:16 > > > Onderwerp: [FieldTrip] Source reconstruction with MNE > problem: vol doen's fit sourcespace > > > > > > > > > Hello, i'm trying a source reconstruction of event > related fields using minimun-norm estimates and i get a > problem with vol and sourcespace. When plot them together > the vol doesn't fit the sourcespace. I adjunted in the mail > two images where you can see what i get. It looks like that > there isn't any problem of coordinate system also the units > seem to be ok. I also procesed all the file with freesurfer > so i suppose there is no problem with the orig-nomask.mgz. > > > > Hope anyone can help me. Thank you very much. > > > > > Ion > > > > > _______________________________________________ > > > 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 > > > > > ------------------------------------------------------------------------ > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -- PhD student Language and Cognition Group research assistant Neurobiology of Language Group Max Planck Institute for Psycholinguistics Nijmegen, P.O. Box 310, 6500AH, the Netherlands Phone: 0031 24 3521561 From m.cardinale at student.maastrichtuniversity.nl Fri Jan 27 15:59:04 2012 From: m.cardinale at student.maastrichtuniversity.nl (Cardinale, Vita (Stud. FPN / Alumni)) Date: Fri, 27 Jan 2012 15:59:04 +0100 Subject: [FieldTrip] (no subject) In-Reply-To: References: , Message-ID: Dear Stephen en Eelke, Thank you for your fast answer! It works now :)! Don't worry, I'll take it only a little personal ;)... Thanks, Vita ________________________________________ Von: fieldtrip-bounces at donders.ru.nl [fieldtrip-bounces at donders.ru.nl] im Auftrag von Stephen Whitmarsh [stephen.whitmarsh at gmail.com] Gesendet: Freitag, 27. Januar 2012 14:45 An: Email discussion list for the FieldTrip project Betreff: Re: [FieldTrip] (no subject) Ouch, was called away and forgot to press send and now Eelke already answered ;-) Ah, well, just for sake of style, here's my 2 cents, i think its just a repetition of Eelke's anwer, which might be consoling by itself... Dear Vita, First of all, you should not be too alarmed at these specific *warnings*: no trialfun was specified, using trialfun_general > In ft_definetrial at 123 evaluating trialfunction 'trialfun_general' Indeed, you have not specified a trialfunction for now (but you will in the near future). This one: Warning: adding D:\Vita\fieldtrip-20120124\external\ctf toolbox to your Matlab path Is just to make you aware what is happening. If FieldTrip knows it needs extra folders added to the path it will try to do so itself (using the function ft_hastoolbox). This is very convenient since it allows you only to add the fieldtrip root folder and not all the subfolders which in some cases might cause conflicts with other matlab toolboxes. You can use the ft_defaults to add only the bare minumum. Then there is the error, which is a concern: readCTFds: Data set error : size of meg4 file(s) 0 bytes (from dir command) 179071200 bytes (from res4 file) Since you are a newbee, I'll ask the obvious question, don't take it personal ;-). It might have been a problem on this side, but its helps to check: Where on the path are you? type 'pwd' to know. Where is the subject.ds folder? if you type 'dir' it should be there. If not, add a path to the cfg.dataset. Perhaps you are *in* the .ds folder. In that case, get out, one branch back! Cheers, stephen On 27 January 2012 12:32, Cardinale, Vita (Stud. FPN / Alumni) wrote: > Dear all, > > I just started to use FIELDTRIP with going through the tutorial. Already > reading in the data from the tutorial is not working as it should. Here is > what I get when doing the trial definition for the fully incongruent (FIC) > condition from the tutorial > > “Trigger-based trial selection, Reading and preprocessing the interesting > trials”: > > > > cfg = []; > > cfg.dataset = 'Subject01.ds'; > > cfg.trialdef.eventtype = 'backpanel trigger'; > > cfg.trialdef.eventvalue = 3; % the value of the stimulus trigger for > fully incongruent (FIC). > > cfg.trialdef.prestim = 1; % in seconds > > cfg.trialdef.poststim = 2; % in seconds > > > > cfg = ft_definetrial(cfg); > > > > I get this warning: > > > > no trialfun was specified, using trialfun_general >> In ft_definetrial at 123 > evaluating trialfunction 'trialfun_general' > > readCTFds: Data set error : size of meg4 file(s) > 0 bytes (from dir command) > 179071200 bytes (from res4 file) > > reading the events from 'Subject01.ds\Subject01.res4' > > readCTFds: Data set error : size of meg4 file(s) > 0 bytes (from dir command) > 179071200 bytes (from res4 file) > > > > When using hdr = ft_read_header('Subject01.ds') or hdr = > ft_read_header('Subject01.ds/Subject01.res4') > > I get this warning: > > > > Warning: adding D:\Vita\fieldtrip-20120124\external\ctf toolbox to your > Matlab path > > readCTFds: Data set error : size of meg4 file(s) > 0 bytes (from dir command) > 179071200 bytes (from res4 file) > > > together with this output: > > > > hdr = > > Fs: 300 > nChans: 187 > nSamples: 900 > nSamplesPre: 300 > nTrials: -1 > label: {187x1 cell} > grad: [1x1 struct] > orig: [1x1 struct] > chantype: {187x1 cell} > chanunit: {187x1 cell} > > > > which according to the tutorial should be: > > > > hdr = > > > > Fs: 300 % sampling frequency > > nChans: 187 % number of channels > > nSamples: 900 % number of samples per trial > > nSamplesPre: 300 % number of pre-trigger samples in each trial > > nTrials: 266 % number of trials > > label: {187x1 cell} % cell-array with labels of each channel > > grad: [1x1 struct] % gradiometer structure > > orig: [1x1 struct] % additional header information > > > > What could go wrong? > > > _______________________________________________ > 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 From Ulrich.Pomper at charite.de Fri Jan 27 16:34:58 2012 From: Ulrich.Pomper at charite.de (Pomper, Ulrich) Date: Fri, 27 Jan 2012 16:34:58 +0100 Subject: [FieldTrip] Defining cfg.neighbourdist at source level Message-ID: <4F22C422.4080906@charite.de> Dear list members, I am trying to perform a cluster based permutation test on power values at source level. I managed to run the test using just the time and frequency dimensions (cfg.neighbourdist = []) but I am struggling with the issue of how to define the neighbourdist parameter. I've looked through the tutorial, the FT site as well as through the mailinglist but couldn't find an answer, so I'd really appreciate any hint on this. Thanks a lot, Ulrich -------------- next part -------------- An HTML attachment was scrubbed... URL: From m_wink10 at uni-muenster.de Fri Jan 27 16:42:09 2012 From: m_wink10 at uni-muenster.de (Martin Winkels) Date: Fri, 27 Jan 2012 16:42:09 +0100 Subject: [FieldTrip] Sourcestatistics - Problem Message-ID: Hello, we are working with the ft_sourcestatistics function and we are facing some problems. We got some very well known data, our subjects just have been stimulated left and right hand. We are calculating right vs left hand data. The calculated GrandAVG-data looks very good, you can see this in the attached files. (GAVG_LEFT and GAVG_RIGHT). We got activity in the left and right brain hemisphere, localized at single spot. Now I wanted to calculate a statistic for this subject and I got some weird results. If you look up the file statplot.jpg you can see that the positive cluster looks quite okay but the negative cluster only looks good in the upper right corner but then it is distributed all over the brain till the lower left corner. Based on the GAVG-results this cant be. I also attached the data itself and a script to show the GAVG data as well as the script to calculate the data. I would be very very pleased if somebody could help me with that issue, I've been working on this for a while now. I have uploaded the data to the recommended filehoster: http://www.sendspace.com/filegroup/sJhI%2F5uBRdJI6JGXUjWtPA There are two files that belong together, you can extract them and there will be a .mat structure, the m-files and three pictures. Thanks, Martin I post the code as an attachment to this email: function calc_stat( ~ ) %%UNTITLED2 Summary of this function goes here % Detailed explanation goes here %path to grandAVG mat-file load ('/media/sonja1/MatlabAnalysis/Martin/SEF/sourcestatistics/GrandAVG/grandAVG.mat'); sourcePost = GA_RIGHT; sourcePre = GA_LEFT; %% % configfile for calculating the statistics cfg = []; cfg.channel = {'MEG'}; cfg.latency = [0 1]; cfg.parameter = 'pow'; cfg.dim = sourcePre.dim; cfg_neighb.method = 'template'; cfg.template = 'CTF275_neighb.mat'; cfg.neighbours = ft_prepare_neighbours(cfg_neighb, GA_RIGHT.nei); cfg.method = 'montecarlo'; cfg.statistic = 'depsamplesT'; cfg.correctm = 'cluster'; cfg.tail = 0; % -1, 1 or 0 (default = 0); one-sided or two-sided test cfg.clusteralpha = 0.05; % alpha level of the sample-specific test statistic that will be used for thresholding cfg.clusterstatistic = 'maxsum'; % test statistic that will be evaluated under the permutation distribution. cfg.minnbchan = 2; % minimum number of neighborhood channels that is required for a selected cfg.clustertail = 0; cfg.alpha = 0.025; % alpha level of the permutation test cfg.numrandomization = 100; % number of draws from the permutation distribution nsubj=length(sourcePre.trial); cfg.design(1,:) = [1:nsubj 1:nsubj]; cfg.design(2,:) = [ones(1,nsubj) ones(1,nsubj)*2]; cfg.uvar = 1; % row of design matrix that contains unit variable (in this case: subjects) cfg.ivar = 2; % row of design matrix that contains independent variable (the conditions) stat = ft_sourcestatistics(cfg, sourcePost, sourcePre); %% %Plot the statistics cfg = []; cfg.method = 'ortho'; cfg.interactive = 'yes'; cfg.funparameter = 'stat'; %stat.mask = ones(stat.dim); cfg.maskparameter = 'mask'; %cfg.maskparameter = 'mask'; cfg.funcolorlim = [-10 10]; cfg.opacitymap = 'vdown'; cfg.opacitylim = 'maxabs'; cfg.anatomy = GA_RIGHT.anatomy; stat.anatomy = GA_RIGHT.anatomy; figure ft_sourceplot(cfg, stat) end -------------- next part -------------- An HTML attachment was scrubbed... URL: From akiko.ikkai at gmail.com Fri Jan 27 17:36:36 2012 From: akiko.ikkai at gmail.com (Akiko Ikkai) Date: Fri, 27 Jan 2012 11:36:36 -0500 Subject: [FieldTrip] ft_prepare_bemmodel: vol.mat is NaN Message-ID: Hi, I'm wondering if there has been more conversations on the post "function prepare_bemmodel: resulting BEM system matrix is NaN", dated back to 2/17/2010. I have the same problem and would love to know how to work around it. In short, I'm trying to create a volume conduction model for my EEG data based on subjects' segmented anatomical MRI ('scalp','skull','brain'). ft_prepare_bemmodel creates vol that can be plotted nicely (using ft_plot_vol), but vol.mat is all Nan. I tracked down the error to be originated in ft_prepare_bemmodel, line 162 (20110525 version) C21 = bem_Cij_lin(vol.bnd(2).pnt,vol.bnd(1).pnt,vol.bnd(1).tri, weight,defl(1)); the original post suggests to 1) find where NaN are, 2) check their actual location in vol.bnd(1).pnt and in vol.bnd(1).tri, and then 3) correct the mesh, by removing the collapsed vertex/triangle. I was able to find where NaN are in C21, but am stuck at how to proceed from here. If anyone has suggestions on how I could go from here, it'll be greatly appreciated. Thanks in advance, Akiko -- Akiko Ikkai, Ph.D. Postdoctoral Fellow Department of Psychological and Brain Sciences Johns Hopkins University Ames Hall, 3400 N. Charles St. Baltimore, MD 21218 -------------- next part -------------- An HTML attachment was scrubbed... URL: From smoratti at psi.ucm.es Fri Jan 27 20:59:37 2012 From: smoratti at psi.ucm.es (smoratti at psi.ucm.es) Date: Fri, 27 Jan 2012 20:59:37 +0100 Subject: [FieldTrip] Sourcestatistics - Problem In-Reply-To: References: Message-ID: <6D2A2F2C-D0A2-4D94-9017-5193666EBEC9@psi.ucm.es> Hi Martin, Sometimes it might be useful to decrease the cluster alpha p value (e.g. 0.01). This prevents too much clustering and favors your strong effects. Maybe this helps. 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 27/01/2012, a las 16:42, Martin Winkels escribió: > Hello, > > we are working with the ft_sourcestatistics function and we are facing some problems. > > > We got some very well known data, our subjects just have been stimulated left and right hand. We are calculating right vs left hand data. The calculated GrandAVG-data looks very good, you can see this in the attached files. (GAVG_LEFT and GAVG_RIGHT). We got activity in the left and right brain hemisphere, localized at single spot. > > Now I wanted to calculate a statistic for this subject and I got some weird results. If you look up the file statplot.jpg you can see that the positive cluster looks quite okay but the negative cluster only looks good in the upper right corner but then it is distributed all over the brain till the lower left corner. > > Based on the GAVG-results this cant be. I also attached the data itself and a script to show the GAVG data as well as the script to calculate the data. > > I would be very very pleased if somebody could help me with that issue, I've been working on this for a while now. > > > > I have uploaded the data to the recommended filehoster: > > http://www.sendspace.com/filegroup/sJhI%2F5uBRdJI6JGXUjWtPA > > There are two files that belong together, you can extract them and there will be a .mat structure, the m-files and three pictures. > > > > Thanks, Martin > > I post the code as an attachment to this email: > > function calc_stat( ~ ) > %%UNTITLED2 Summary of this function goes here > % Detailed explanation goes here > > %path to grandAVG mat-file > load ('/media/sonja1/MatlabAnalysis/Martin/SEF/sourcestatistics/GrandAVG/grandAVG.mat'); > sourcePost = GA_RIGHT; > sourcePre = GA_LEFT; > > %% > % configfile for calculating the statistics > cfg = []; > cfg.channel = {'MEG'}; > cfg.latency = [0 1]; > > cfg.parameter = 'pow'; > cfg.dim = sourcePre.dim; > > cfg_neighb.method = 'template'; > cfg.template = 'CTF275_neighb.mat'; > cfg.neighbours = ft_prepare_neighbours(cfg_neighb, GA_RIGHT.nei); > > cfg.method = 'montecarlo'; > cfg.statistic = 'depsamplesT'; > cfg.correctm = 'cluster'; > > cfg.tail = 0; % -1, 1 or 0 (default = 0); one-sided or two-sided test > cfg.clusteralpha = 0.05; % alpha level of the sample-specific test statistic that will be used for thresholding > cfg.clusterstatistic = 'maxsum'; % test statistic that will be evaluated under the permutation distribution. > cfg.minnbchan = 2; % minimum number of neighborhood channels that is required for a selected > cfg.clustertail = 0; > cfg.alpha = 0.025; % alpha level of the permutation test > cfg.numrandomization = 100; % number of draws from the permutation distribution > > > nsubj=length(sourcePre.trial); > cfg.design(1,:) = [1:nsubj 1:nsubj]; > cfg.design(2,:) = [ones(1,nsubj) ones(1,nsubj)*2]; > cfg.uvar = 1; % row of design matrix that contains unit variable (in this case: subjects) > cfg.ivar = 2; % row of design matrix that contains independent variable (the conditions) > > stat = ft_sourcestatistics(cfg, sourcePost, sourcePre); > > %% > %Plot the statistics > cfg = []; > cfg.method = 'ortho'; > cfg.interactive = 'yes'; > cfg.funparameter = 'stat'; > %stat.mask = ones(stat.dim); > cfg.maskparameter = 'mask'; > %cfg.maskparameter = 'mask'; > cfg.funcolorlim = [-10 10]; > > cfg.opacitymap = 'vdown'; > cfg.opacitylim = 'maxabs'; > > > cfg.anatomy = GA_RIGHT.anatomy; > stat.anatomy = GA_RIGHT.anatomy; > > figure > ft_sourceplot(cfg, stat) > > end > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -------------- next part -------------- An HTML attachment was scrubbed... URL: From r.oostenveld at donders.ru.nl Sat Jan 28 16:08:32 2012 From: r.oostenveld at donders.ru.nl (Robert Oostenveld) Date: Sat, 28 Jan 2012 16:08:32 +0100 Subject: [FieldTrip] ft_prepare_bemmodel: vol.mat is NaN In-Reply-To: References: Message-ID: Hi Akiko The triangulated mesh might look nice, but that is not yet a guarantee that it is suitable for BEM computations. Cristiano (CC) has been working on a set of fieldtrip functions to create, manipulate and check surface meshes. Those functions are not yet in fieldtrip, but perhaps this would be the time to give them a try. Could you send us the surfaces that you feed into ft_prepare_bemmodel as a mat file, together with the cfg? Cristiano can then have a look at them with his function, which hopefully will poinpoint the geometrical problem that is causing the numerical issue. best Robert PS see http://fieldtrip.fcdonders.nl/faq/how_should_i_send_example_data_to_the_developers On 27 Jan 2012, at 17:36, Akiko Ikkai wrote: > Hi, > > I'm wondering if there has been more conversations on the post "function prepare_bemmodel: resulting BEM system matrix is NaN", dated back to 2/17/2010. I have the same problem and would love to know how to work around it. In short, I'm trying to create a volume conduction model for my EEG data based on subjects' segmented anatomical MRI ('scalp','skull','brain'). ft_prepare_bemmodel creates vol that can be plotted nicely (using ft_plot_vol), but vol.mat is all Nan. I tracked down the error to be originated in ft_prepare_bemmodel, line 162 (20110525 version) > > C21 = bem_Cij_lin(vol.bnd(2).pnt,vol.bnd(1).pnt,vol.bnd(1).tri, weight,defl(1)); > > the original post suggests to 1) find where NaN are, 2) check their actual location in vol.bnd(1).pnt and in vol.bnd(1).tri, and then 3) correct the mesh, by removing the collapsed vertex/triangle. I was able to find where NaN are in C21, but am stuck at how to proceed from here. > > If anyone has suggestions on how I could go from here, it'll be greatly appreciated. > Thanks in advance, Akiko > > -- > Akiko Ikkai, Ph.D. > Postdoctoral Fellow > Department of Psychological and Brain Sciences > Johns Hopkins University > Ames Hall, 3400 N. Charles St. > Baltimore, MD 21218 > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -------------- next part -------------- An HTML attachment was scrubbed... URL: From m_wink10 at uni-muenster.de Sat Jan 28 16:25:07 2012 From: m_wink10 at uni-muenster.de (Martin Winkels) Date: Sat, 28 Jan 2012 16:25:07 +0100 Subject: [FieldTrip] Sourcestatistics - Problem In-Reply-To: <6D2A2F2C-D0A2-4D94-9017-5193666EBEC9@psi.ucm.es> References: <6D2A2F2C-D0A2-4D94-9017-5193666EBEC9@psi.ucm.es> Message-ID: Hello Stephan, thanks for the answer. It helps, but only a little bit. Do you have any more suggestions? Thanks, Martin On Fri, Jan 27, 2012 at 8:59 PM, smoratti at psi.ucm.es wrote: > Hi Martin, > > Sometimes it might be useful to decrease the cluster alpha p value (e.g. > 0.01). This prevents too much clustering and favors your strong effects. > Maybe this helps. > > 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 27/01/2012, a las 16:42, Martin Winkels escribió: > > Hello, > > we are working with the ft_sourcestatistics function and we are facing > some problems. > > > We got some very well known data, our subjects just have been stimulated > left and right hand. We are calculating right vs left hand data. The > calculated GrandAVG-data looks very good, you can see this in the attached > files. (GAVG_LEFT and GAVG_RIGHT). We got activity in the left and right > brain hemisphere, localized at single spot. > > Now I wanted to calculate a statistic for this subject and I got some > weird results. If you look up the file statplot.jpg you can see that the > positive cluster looks quite okay but the negative cluster only looks good > in the upper right corner but then it is distributed all over the brain > till the lower left corner. > > Based on the GAVG-results this cant be. I also attached the data itself > and a script to show the GAVG data as well as the script to calculate the > data. > > I would be very very pleased if somebody could help me with that issue, > I've been working on this for a while now. > > > > I have uploaded the data to the recommended filehoster: > > http://www.sendspace.com/filegroup/sJhI%2F5uBRdJI6JGXUjWtPA > > There are two files that belong together, you can extract them and there > will be a .mat structure, the m-files and three pictures. > > > > Thanks, Martin > > I post the code as an attachment to this email: > > function calc_stat( ~ ) > %%UNTITLED2 Summary of this function goes here > % Detailed explanation goes here > > %path to grandAVG mat-file > load > ('/media/sonja1/MatlabAnalysis/Martin/SEF/sourcestatistics/GrandAVG/grandAVG.mat'); > > sourcePost = GA_RIGHT; > sourcePre = GA_LEFT; > > %% > % configfile for calculating the statistics > cfg = []; > cfg.channel = {'MEG'}; > cfg.latency = [0 1]; > > cfg.parameter = 'pow'; > cfg.dim = sourcePre.dim; > > cfg_neighb.method = 'template'; > cfg.template = 'CTF275_neighb.mat'; > cfg.neighbours = ft_prepare_neighbours(cfg_neighb, GA_RIGHT.nei); > > cfg.method = 'montecarlo'; > cfg.statistic = 'depsamplesT'; > cfg.correctm = 'cluster'; > > cfg.tail = 0; % -1, 1 or 0 (default = 0); one-sided or > two-sided test > cfg.clusteralpha = 0.05; % alpha level of the sample-specific test > statistic that will be used for thresholding > cfg.clusterstatistic = 'maxsum'; % test statistic that will be evaluated > under the permutation distribution. > cfg.minnbchan = 2; % minimum number of neighborhood channels > that is required for a selected > cfg.clustertail = 0; > cfg.alpha = 0.025; % alpha level of the permutation test > cfg.numrandomization = 100; % number of draws from the permutation > distribution > > > nsubj=length(sourcePre.trial); > cfg.design(1,:) = [1:nsubj 1:nsubj]; > cfg.design(2,:) = [ones(1,nsubj) ones(1,nsubj)*2]; > cfg.uvar = 1; % row of design matrix that contains unit variable > (in this case: subjects) > cfg.ivar = 2; % row of design matrix that contains independent > variable (the conditions) > > stat = ft_sourcestatistics(cfg, sourcePost, sourcePre); > > %% > %Plot the statistics > cfg = []; > cfg.method = 'ortho'; > cfg.interactive = 'yes'; > cfg.funparameter = 'stat'; > %stat.mask = ones(stat.dim); > cfg.maskparameter = 'mask'; > %cfg.maskparameter = 'mask'; > cfg.funcolorlim = [-10 10]; > > cfg.opacitymap = 'vdown'; > cfg.opacitylim = 'maxabs'; > > > cfg.anatomy = GA_RIGHT.anatomy; > stat.anatomy = GA_RIGHT.anatomy; > > figure > ft_sourceplot(cfg, stat) > > end > > > _______________________________________________ > 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 alotof_xd at yahoo.com Sun Jan 29 08:52:37 2012 From: alotof_xd at yahoo.com (alotof eve) Date: Sat, 28 Jan 2012 23:52:37 -0800 (PST) Subject: [FieldTrip] Where can I get 4D layout for MEG result? Message-ID: <1327823557.22249.YahooMailNeo@web125502.mail.ne1.yahoo.com> Hi, everyone, Out MEG is 4D and I checked that we should use 4D248.lay but I cannot find this file. Can anyone tell me where I can download such a file? Thanks Duo -------------- next part -------------- An HTML attachment was scrubbed... URL: From Don.Rojas at ucdenver.edu Sun Jan 29 16:36:58 2012 From: Don.Rojas at ucdenver.edu (Rojas, Don) Date: Sun, 29 Jan 2012 08:36:58 -0700 Subject: [FieldTrip] Where can I get 4D layout for MEG result? In-Reply-To: <1327823557.22249.YahooMailNeo@web125502.mail.ne1.yahoo.com> References: <1327823557.22249.YahooMailNeo@web125502.mail.ne1.yahoo.com> Message-ID: <9DDF9E6E-FFB8-4E56-BE13-B9B5C73735D1@ucdenver.edu> It is in your fieldtrip distribution, in the template/layout/ subdirectory. But you can just use it with any function that takes a layout by specifying: cfg.layout = '4D248.lay' On Jan 29, 2012, at 12:52 AM, alotof eve wrote: Hi, everyone, Out MEG is 4D and I checked that we should use 4D248.lay but I cannot find this file. Can anyone tell me where I can download such a file? Thanks Duo _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip ----------------------- Don Rojas, Ph.D. Associate Professor of Psychiatry U. of Colorado Denver Anschutz Medical Campus Director, UCD Magnetoencephalography Lab 13001 E. 17th Pl F546 Aurora, CO 80045 303-724-4994 -------------- next part -------------- An HTML attachment was scrubbed... URL: From alotof_xd at yahoo.com Mon Jan 30 07:44:01 2012 From: alotof_xd at yahoo.com (alotof eve) Date: Sun, 29 Jan 2012 22:44:01 -0800 (PST) Subject: [FieldTrip] Where can I get 4D layout for MEG result? In-Reply-To: <1327903969.63327.YahooMailNeo@web125501.mail.ne1.yahoo.com> References: <1327823557.22249.YahooMailNeo@web125502.mail.ne1.yahoo.com> <9DDF9E6E-FFB8-4E56-BE13-B9B5C73735D1@ucdenver.edu> <1327903969.63327.YahooMailNeo@web125501.mail.ne1.yahoo.com> Message-ID: <1327905841.32374.YahooMailNeo@web125502.mail.ne1.yahoo.com> ----- Forwarded Message ----- From: alotof eve To: "Rojas, Don" Sent: Sunday, January 29, 2012 10:12 PM Subject: Re: [FieldTrip] Where can I get 4D layout for MEG result? Thank Don. In fact I asked the question because I met problem when I using the layout that I thought it's something wrong. I am doing ica and using: ft_topoplotIC(cfg,comp), then got the error message: reading layout from file 4D248.lay Error using dataread Trouble reading floating point number from file (row 1, field 1) ==> \n Error in textread (line 176) [varargout{1:nlhs}]=dataread('file',varargin{:}); Error in ft_prepare_layout>readlay (line 670) [chNum,X,Y,Width,Height,Lbl,Rem] = textread(filename,'%f %f %f %f %f %q %q'); Error in ft_prepare_layout (line 222)   lay = readlay(cfg.layout); Error in ft_topoplotER (line 433) lay = ft_prepare_layout(cfg, data); Error in ft_topoplotIC (line 116)     ft_topoplotER(cfg, varargin{:}); Can anyone help me on this? Thanks, Duo ________________________________ From: "Rojas, Don" To: alotof eve ; Email discussion list for the FieldTrip project Sent: Sunday, January 29, 2012 7:36 AM Subject: Re: [FieldTrip] Where can I get 4D layout for MEG result? It is in your fieldtrip distribution, in the template/layout/ subdirectory. But you can just use it with any function that takes a layout by specifying: cfg.layout = '4D248.lay' On Jan 29, 2012, at 12:52 AM, alotof eve wrote: Hi, everyone, > > >Out MEG is 4D and I checked that we should use 4D248.lay but I cannot find this file. Can anyone tell me where I can download such a file? > > > >Thanks >Duo_______________________________________________ >fieldtrip mailing list >fieldtrip at donders.ru.nl >http://mailman.science.ru.nl/mailman/listinfo/fieldtrip ----------------------- Don Rojas, Ph.D. Associate Professor of Psychiatry U. of Colorado Denver Anschutz Medical Campus Director, UCD Magnetoencephalography Lab 13001 E. 17th Pl F546 Aurora, CO 80045 303-724-4994 -------------- next part -------------- An HTML attachment was scrubbed... URL: From jm.horschig at donders.ru.nl Mon Jan 30 16:37:02 2012 From: jm.horschig at donders.ru.nl (=?ISO-8859-1?Q?=22J=F6rn_M=2E_Horschig=22?=) Date: Mon, 30 Jan 2012 16:37:02 +0100 Subject: [FieldTrip] Defining cfg.neighbourdist at source level In-Reply-To: <4F22C422.4080906@charite.de> References: <4F22C422.4080906@charite.de> Message-ID: <4F26B91E.2050200@donders.ru.nl> Dear Ulrich, I think you are confusing some things there. cfg.neighbourdist is a setting for defining neighbouring /sensors/, thus it's not applicable for source level statistics (see ft_prepare_neighbours). However, I never did cluster-based permutation test on source-level in FieldTrip, but for me it seems that it just works by taking neighbouring voxels as neighbours. So, you shouldn't need to define anything special for running sourcelevel stats (if I am wrong, someone with more experience should correct me here). But, maybe you meant to write sensor level, but wrote source level - in that case I'd be happy to help. Best, Jörn On 1/27/2012 4:34 PM, Pomper, Ulrich wrote: > Dear list members, > I am trying to perform a cluster based permutation test on power > values at source level. > I managed to run the test using just the time and frequency dimensions > (cfg.neighbourdist = []) > but I am struggling with the issue of how to define the neighbourdist > parameter. > I've looked through the tutorial, the FT site as well as through the > mailinglist but couldn't find an answer, so I'd really appreciate any > hint on this. > > Thanks a lot, > Ulrich > > > > > > _______________________________________________ > 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 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 Ulrich.Pomper at charite.de Mon Jan 30 16:58:58 2012 From: Ulrich.Pomper at charite.de (Pomper, Ulrich) Date: Mon, 30 Jan 2012 16:58:58 +0100 Subject: [FieldTrip] Defining cfg.neighbourdist at source level In-Reply-To: <4F26B91E.2050200@donders.ru.nl> References: <4F22C422.4080906@charite.de> <4F26B91E.2050200@donders.ru.nl> Message-ID: <4F26BE42.5030204@charite.de> Dear Jörn, Thanks for you reply. I did mean source-level, so like you said, I am trying to define the neighbouring voxels for each voxel. As far as I understand, leaving cfg.neighbours blank means that the clustering is done over the time and frequency dimensions only, not over space. The FT help reads: %If you specify an empty neighbourhood structure, clustering will only be done in frequency and time (if available) and not over neighbouring channels. Has anybody done clustering in source space using all three dimensions and could explain how this works? Cheers, Ulrich On 30.01.2012 16:37, "Jörn M. Horschig" wrote: Dear Ulrich, I think you are confusing some things there. cfg.neighbourdist is a setting for defining neighbouring sensors, thus it's not applicable for source level statistics (see ft_prepare_neighbours). However, I never did cluster-based permutation test on source-level in FieldTrip, but for me it seems that it just works by taking neighbouring voxels as neighbours. So, you shouldn't need to define anything special for running sourcelevel stats (if I am wrong, someone with more experience should correct me here). But, maybe you meant to write sensor level, but wrote source level - in that case I'd be happy to help. Best, Jörn On 1/27/2012 4:34 PM, Pomper, Ulrich wrote: Dear list members, I am trying to perform a cluster based permutation test on power values at source level. I managed to run the test using just the time and frequency dimensions (cfg.neighbourdist = []) but I am struggling with the issue of how to define the neighbourdist parameter. I've looked through the tutorial, the FT site as well as through the mailinglist but couldn't find an answer, so I'd really appreciate any hint on this. Thanks a lot, Ulrich _______________________________________________ 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 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 r.oostenveld at donders.ru.nl Tue Jan 31 15:37:52 2012 From: r.oostenveld at donders.ru.nl (Robert Oostenveld) Date: Tue, 31 Jan 2012 15:37:52 +0100 Subject: [FieldTrip] Defining cfg.neighbourdist at source level In-Reply-To: <4F26BE42.5030204@charite.de> References: <4F22C422.4080906@charite.de> <4F26B91E.2050200@donders.ru.nl> <4F26BE42.5030204@charite.de> Message-ID: Dear Ulrich If your source locations are defined on a regular 3D grid that can be represented as volume, then the neighbours are trivial to find and you do not have to specify a structure for the neighbours. If you have done source reconstruction on a 3D folded cortical sheet that is defined by a triangulated surface, then it is also possible to cluster along the surface. I don't know the details for the cortical sheet clustering from the top of my head, if you are interested please let me know and I'll look them up. best Robert On 30 Jan 2012, at 16:58, Pomper, Ulrich wrote: > Dear Jörn, > Thanks for you reply. I did mean source-level, so like you said, I am trying to define the neighbouring voxels for each voxel. > As far as I understand, leaving cfg.neighbours blank means that the clustering is done over the time and frequency dimensions only, not over space. > The FT help reads: > %If you specify an empty neighbourhood structure, clustering will only be done in frequency and time (if available) and not over neighbouring channels. > > Has anybody done clustering in source space using all three dimensions and could explain how this works? > Cheers, > Ulrich > -------------- next part -------------- An HTML attachment was scrubbed... URL: From r.oostenveld at donders.ru.nl Tue Jan 31 15:41:22 2012 From: r.oostenveld at donders.ru.nl (Robert Oostenveld) Date: Tue, 31 Jan 2012 15:41:22 +0100 Subject: [FieldTrip] Where can I get 4D layout for MEG result? In-Reply-To: <1327905841.32374.YahooMailNeo@web125502.mail.ne1.yahoo.com> References: <1327823557.22249.YahooMailNeo@web125502.mail.ne1.yahoo.com> <9DDF9E6E-FFB8-4E56-BE13-B9B5C73735D1@ucdenver.edu> <1327903969.63327.YahooMailNeo@web125501.mail.ne1.yahoo.com> <1327905841.32374.YahooMailNeo@web125502.mail.ne1.yahoo.com> Message-ID: <318F2082-FD54-49BE-96CB-476051C0832B@donders.ru.nl> Dear Duo The error suggests that the layout file is corrupt, DOCTYPE is not a string that should be present in the file. Please open it in a text editor and compare it with the format here http://fieldtrip.fcdonders.nl/faq/what_is_the_format_of_the_layout_file_which_is_used_for_plotting best Robert On 30 Jan 2012, at 7:44, alotof eve wrote: > ----- Forwarded Message ----- > From: alotof eve > To: "Rojas, Don" > Sent: Sunday, January 29, 2012 10:12 PM > Subject: Re: [FieldTrip] Where can I get 4D layout for MEG result? > > Thank Don. In fact I asked the question because I met problem when I using the layout that I thought it's something wrong. > > I am doing ica and using: ft_topoplotIC(cfg,comp), then got the error message: > > reading layout from file 4D248.lay > Error using dataread > Trouble reading floating point number from file (row 1, field 1) ==> \n > > Error in textread (line 176) > [varargout{1:nlhs}]=dataread('file',varargin{:}); > > Error in ft_prepare_layout>readlay (line 670) > [chNum,X,Y,Width,Height,Lbl,Rem] = textread(filename,'%f > %f %f %f %f %q %q'); > > Error in ft_prepare_layout (line 222) > lay = readlay(cfg.layout); > > Error in ft_topoplotER (line 433) > lay = ft_prepare_layout(cfg, data); > > Error in ft_topoplotIC (line 116) > ft_topoplotER(cfg, varargin{:}); > > Can anyone help me on this? > > Thanks, > Duo > From: "Rojas, Don" > To: alotof eve ; Email discussion list for the FieldTrip project > Sent: Sunday, January 29, 2012 7:36 AM > Subject: Re: [FieldTrip] Where can I get 4D layout for MEG result? > > It is in your fieldtrip distribution, in the template/layout/ subdirectory. But you can just use it with any function that takes a layout by specifying: > > cfg.layout = '4D248.lay' > > On Jan 29, 2012, at 12:52 AM, alotof eve wrote: > >> Hi, everyone, >> >> Out MEG is 4D and I checked that we should use 4D248.lay but I cannot find this file. Can anyone tell me where I can download such a file? >> >> Thanks >> Duo >> _______________________________________________ >> fieldtrip mailing list >> fieldtrip at donders.ru.nl >> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > ----------------------- > Don Rojas, Ph.D. > Associate Professor of Psychiatry > U. of Colorado Denver Anschutz Medical Campus > Director, UCD Magnetoencephalography Lab > 13001 E. 17th Pl F546 > Aurora, CO 80045 > 303-724-4994 > > > > > > _______________________________________________ > 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 alotof_xd at yahoo.com Tue Jan 31 19:40:51 2012 From: alotof_xd at yahoo.com (alotof eve) Date: Tue, 31 Jan 2012 10:40:51 -0800 (PST) Subject: [FieldTrip] Where can I get 4D layout for MEG result? In-Reply-To: <318F2082-FD54-49BE-96CB-476051C0832B@donders.ru.nl> References: <1327823557.22249.YahooMailNeo@web125502.mail.ne1.yahoo.com> <9DDF9E6E-FFB8-4E56-BE13-B9B5C73735D1@ucdenver.edu> <1327903969.63327.YahooMailNeo@web125501.mail.ne1.yahoo.com> <1327905841.32374.YahooMailNeo@web125502.mail.ne1.yahoo.com> <318F2082-FD54-49BE-96CB-476051C0832B@donders.ru.nl> Message-ID: <1328035251.88538.YahooMailNeo@web125501.mail.ne1.yahoo.com> Dear Robert, Thank you so much for the suggestion. I compared the file but couldn't get idea yet. The format of 4D248.lay which I am using is like follows: 1 0.23057 -0.26062 3 2.25 A1 2 0.23057 3.8119 3 2.25 A2 3 0.064345 8.2238 3 2.25 A3 4 0.064345 11.957 3 2.25 A4 5 -0.10188 16.0295 3 2.25 A5 6 -3.7588 16.0295 3 2.25 A6 7 -4.0913 11.957 3 2.25 A7 8 -4.2575 8.2238 3 2.25 A8 9 -4.0913 4.1513 3 2.25 A9 10 -4.2575 -0.09093 3 2.25 A10 .... Any more suggestions? Thanks, Duo ________________________________ From: Robert Oostenveld To: Email discussion list for the FieldTrip project Sent: Tuesday, January 31, 2012 6:41 AM Subject: Re: [FieldTrip] Where can I get 4D layout for MEG result? Dear Duo The error suggests that the layout file is corrupt, DOCTYPE is not a string that should be present in the file. Please open it in a text editor and compare it with the format here http://fieldtrip.fcdonders.nl/faq/what_is_the_format_of_the_layout_file_which_is_used_for_plotting best Robert  On 30 Jan 2012, at 7:44, alotof eve wrote: ----- Forwarded Message ----- >From: alotof eve >To: "Rojas, Don" >Sent: Sunday, January 29, 2012 10:12 PM >Subject: Re: [FieldTrip] Where can I get 4D layout for MEG result? > > >Thank Don. In fact I asked the question because I met problem when I using the layout that I thought it's something wrong. > > >I am doing ica and using: ft_topoplotIC(cfg,comp), then got the error message: > > >reading layout from file 4D248.lay >Error using dataread >Trouble reading floating point number from file (row 1, field 1) ==> \n > >Error in textread (line 176) >[varargout{1:nlhs}]=dataread('file',varargin{:}); > >Error in ft_prepare_layout>readlay (line 670) >[chNum,X,Y,Width,Height,Lbl,Rem] = textread(filename,'%f >%f %f %f %f %q %q'); > >Error in ft_prepare_layout (line 222) >  lay = readlay(cfg.layout); > >Error in ft_topoplotER (line 433) >lay = ft_prepare_layout(cfg, data); > >Error in ft_topoplotIC (line 116) >    ft_topoplotER(cfg, varargin{:}); > > >Can anyone help me on this? > > >Thanks, >Duo > > >________________________________ > From: "Rojas, Don" >To: alotof eve ; Email discussion list for the FieldTrip project >Sent: Sunday, January 29, 2012 7:36 AM >Subject: Re: [FieldTrip] Where can I get 4D layout for MEG result? > > >It is in your fieldtrip distribution, in the template/layout/ subdirectory. But you can just use it with any function that takes a layout by specifying: > > >cfg.layout = '4D248.lay' > > >On Jan 29, 2012, at 12:52 AM, alotof eve wrote: > >Hi, everyone, >> >> >>Out MEG is 4D and I checked that we should use 4D248.lay but I cannot find this file. Can anyone tell me where I can download such a file? >> >> >> >>Thanks >>Duo_______________________________________________ >>fieldtrip mailing list >>fieldtrip at donders.ru.nl >>http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > >----------------------- >Don Rojas, Ph.D. >Associate Professor of Psychiatry >U. of Colorado Denver Anschutz Medical Campus >Director, UCD Magnetoencephalography Lab >13001 E. 17th Pl F546 >Aurora, CO 80045 >303-724-4994 > > > > >_______________________________________________ >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 r.oostenveld at donders.ru.nl Tue Jan 31 21:27:44 2012 From: r.oostenveld at donders.ru.nl (Robert Oostenveld) Date: Tue, 31 Jan 2012 21:27:44 +0100 Subject: [FieldTrip] Where can I get 4D layout for MEG result? In-Reply-To: <1328035251.88538.YahooMailNeo@web125501.mail.ne1.yahoo.com> References: <1327823557.22249.YahooMailNeo@web125502.mail.ne1.yahoo.com> <9DDF9E6E-FFB8-4E56-BE13-B9B5C73735D1@ucdenver.edu> <1327903969.63327.YahooMailNeo@web125501.mail.ne1.yahoo.com> <1327905841.32374.YahooMailNeo@web125502.mail.ne1.yahoo.com> <318F2082-FD54-49BE-96CB-476051C0832B@donders.ru.nl> <1328035251.88538.YahooMailNeo@web125501.mail.ne1.yahoo.com> Message-ID: <2D02A28D-D3C2-4727-8CE7-E72E45B1C212@donders.ru.nl> Dear Duo I am not sure whether it is a problem with the FieldTrip code or with your particular computer and dataset. I suggest that you report it on http://bugzilla.fcdonders.nl and that you make the cfg and the comp data structure available. One of us in Nijmegen can then check whether the problem can be reproduced. In reporting it on bugzilla, please include details on your MATLAB and operating system version. We've had problems in the past where MATLAB was not fully compatible with specific language settings when reading text files. best Robert On 31 Jan 2012, at 19:40, alotof eve wrote: > Dear Robert, > > Thank you so much for the suggestion. I compared the file but couldn't get idea yet. The format of 4D248.lay which I am using is like follows: > > 1 0.23057 -0.26062 3 2.25 A1 > 2 0.23057 3.8119 3 2.25 A2 > 3 0.064345 8.2238 3 2.25 A3 > 4 0.064345 11.957 3 2.25 A4 > 5 -0.10188 16.0295 3 2.25 A5 > 6 -3.7588 16.0295 3 2.25 A6 > 7 -4.0913 11.957 3 2.25 A7 > 8 -4.2575 8.2238 3 2.25 A8 > 9 -4.0913 4.1513 3 2.25 A9 > 10 -4.2575 -0.09093 3 2.25 A10 > .... > > Any more suggestions? > > Thanks, > Duo > > From: Robert Oostenveld > To: Email discussion list for the FieldTrip project > Sent: Tuesday, January 31, 2012 6:41 AM > Subject: Re: [FieldTrip] Where can I get 4D layout for MEG result? > > Dear Duo > > The error suggests that the layout file is corrupt, DOCTYPE is not a string that should be present in the file. Please open it in a text editor and compare it with the format here http://fieldtrip.fcdonders.nl/faq/what_is_the_format_of_the_layout_file_which_is_used_for_plotting > > best > Robert > > On 30 Jan 2012, at 7:44, alotof eve wrote: > >> ----- Forwarded Message ----- >> From: alotof eve >> To: "Rojas, Don" >> Sent: Sunday, January 29, 2012 10:12 PM >> Subject: Re: [FieldTrip] Where can I get 4D layout for MEG result? >> >> Thank Don. In fact I asked the question because I met problem when I using the layout that I thought it's something wrong. >> >> I am doing ica and using: ft_topoplotIC(cfg,comp), then got the error message: >> >> reading layout from file 4D248.lay >> Error using dataread >> Trouble reading floating point number from file (row 1, field 1) ==> \n >> >> Error in textread (line 176) >> [varargout{1:nlhs}]=dataread('file',varargin{:}); >> >> Error in ft_prepare_layout>readlay (line 670) >> [chNum,X,Y,Width,Height,Lbl,Rem] = textread(filename,'%f >> %f %f %f %f %q %q'); >> >> Error in ft_prepare_layout (line 222) >> lay = readlay(cfg.layout); >> >> Error in ft_topoplotER (line 433) >> lay = ft_prepare_layout(cfg, data); >> >> Error in ft_topoplotIC (line 116) >> ft_topoplotER(cfg, varargin{:}); >> >> Can anyone help me on this? >> >> Thanks, >> Duo >> From: "Rojas, Don" >> To: alotof eve ; Email discussion list for the FieldTrip project >> Sent: Sunday, January 29, 2012 7:36 AM >> Subject: Re: [FieldTrip] Where can I get 4D layout for MEG result? >> >> It is in your fieldtrip distribution, in the template/layout/ subdirectory. But you can just use it with any function that takes a layout by specifying: >> >> cfg.layout = '4D248.lay' >> >> On Jan 29, 2012, at 12:52 AM, alotof eve wrote: >> >>> Hi, everyone, >>> >>> Out MEG is 4D and I checked that we should use 4D248.lay but I cannot find this file. Can anyone tell me where I can download such a file? >>> >>> Thanks >>> Duo >>> _______________________________________________ >>> fieldtrip mailing list >>> fieldtrip at donders.ru.nl >>> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip >> >> ----------------------- >> Don Rojas, Ph.D. >> Associate Professor of Psychiatry >> U. of Colorado Denver Anschutz Medical Campus >> Director, UCD Magnetoencephalography Lab >> 13001 E. 17th Pl F546 >> Aurora, CO 80045 >> 303-724-4994 >> >> >> >> >> >> _______________________________________________ >> 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 alotof_xd at yahoo.com Tue Jan 31 21:28:31 2012 From: alotof_xd at yahoo.com (alotof eve) Date: Tue, 31 Jan 2012 12:28:31 -0800 (PST) Subject: [FieldTrip] Where can I get 4D layout for MEG result? In-Reply-To: <1328035251.88538.YahooMailNeo@web125501.mail.ne1.yahoo.com> References: <1327823557.22249.YahooMailNeo@web125502.mail.ne1.yahoo.com> <9DDF9E6E-FFB8-4E56-BE13-B9B5C73735D1@ucdenver.edu> <1327903969.63327.YahooMailNeo@web125501.mail.ne1.yahoo.com> <1327905841.32374.YahooMailNeo@web125502.mail.ne1.yahoo.com> <318F2082-FD54-49BE-96CB-476051C0832B@donders.ru.nl> <1328035251.88538.YahooMailNeo@web125501.mail.ne1.yahoo.com> Message-ID: <1328041711.61986.YahooMailNeo@web125503.mail.ne1.yahoo.com> A very strange thing... I tested the other layout, like 'CTF275.lay' using 'ft_layoutplot', it works. However, '4D248.lay' dosen't work on 'ft_layoutplot' with the same error message as before: Error using dataread Trouble reading floating point number from file (row 1, field 1) ==> \n .... Even I rename 'CTF275.lay' to '4D248.lay', it comes the same error message. Any suggestions? Thanks, Duo ________________________________ From: alotof eve To: Email discussion list for the FieldTrip project Sent: Tuesday, January 31, 2012 10:40 AM Subject: Re: [FieldTrip] Where can I get 4D layout for MEG result? Dear Robert, Thank you so much for the suggestion. I compared the file but couldn't get idea yet. The format of 4D248.lay which I am using is like follows: 1 0.23057 -0.26062 3 2.25 A1 2 0.23057 3.8119 3 2.25 A2 3 0.064345 8.2238 3 2.25 A3 4 0.064345 11.957 3 2.25 A4 5 -0.10188 16.0295 3 2.25 A5 6 -3.7588 16.0295 3 2.25 A6 7 -4.0913 11.957 3 2.25 A7 8 -4.2575 8.2238 3 2.25 A8 9 -4.0913 4.1513 3 2.25 A9 10 -4.2575 -0.09093 3 2.25 A10 .... Any more suggestions? Thanks, Duo ________________________________ From: Robert Oostenveld To: Email discussion list for the FieldTrip project Sent: Tuesday, January 31, 2012 6:41 AM Subject: Re: [FieldTrip] Where can I get 4D layout for MEG result? Dear Duo The error suggests that the layout file is corrupt, DOCTYPE is not a string that should be present in the file. Please open it in a text editor and compare it with the format here http://fieldtrip.fcdonders.nl/faq/what_is_the_format_of_the_layout_file_which_is_used_for_plotting best Robert  On 30 Jan 2012, at 7:44, alotof eve wrote: ----- Forwarded Message ----- >From: alotof eve >To: "Rojas, Don" >Sent: Sunday, January 29, 2012 10:12 PM >Subject: Re: [FieldTrip] Where can I get 4D layout for MEG result? > > >Thank Don. In fact I asked the question because I met problem when I using the layout that I thought it's something wrong. > > >I am doing ica and using: ft_topoplotIC(cfg,comp), then got the error message: > > >reading layout from file 4D248.lay >Error using dataread >Trouble reading floating point number from file (row 1, field 1) ==> \n > >Error in textread (line 176) >[varargout{1:nlhs}]=dataread('file',varargin{:}); > >Error in ft_prepare_layout>readlay (line 670) >[chNum,X,Y,Width,Height,Lbl,Rem] = textread(filename,'%f >%f %f %f %f %q %q'); > >Error in ft_prepare_layout (line 222) >  lay = readlay(cfg.layout); > >Error in ft_topoplotER (line 433) >lay = ft_prepare_layout(cfg, data); > >Error in ft_topoplotIC (line 116) >    ft_topoplotER(cfg, varargin{:}); > > >Can anyone help me on this? > > >Thanks, >Duo > > >________________________________ > From: "Rojas, Don" >To: alotof eve ; Email discussion list for the FieldTrip project >Sent: Sunday, January 29, 2012 7:36 AM >Subject: Re: [FieldTrip] Where can I get 4D layout for MEG result? > > >It is in your fieldtrip distribution, in the template/layout/ subdirectory. But you can just use it with any function that takes a layout by specifying: > > >cfg.layout = '4D248.lay' > > >On Jan 29, 2012, at 12:52 AM, alotof eve wrote: > >Hi, everyone, >> >> >>Out MEG is 4D and I checked that we should use 4D248.lay but I cannot find this file. Can anyone tell me where I can download such a file? >> >> >> >>Thanks >>Duo_______________________________________________ >>fieldtrip mailing list >>fieldtrip at donders.ru.nl >>http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > >----------------------- >Don Rojas, Ph.D. >Associate Professor of Psychiatry >U. of Colorado Denver Anschutz Medical Campus >Director, UCD Magnetoencephalography Lab >13001 E. 17th Pl F546 >Aurora, CO 80045 >303-724-4994 > > > > >_______________________________________________ >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 smoratti at psi.ucm.es Tue Jan 31 21:48:04 2012 From: smoratti at psi.ucm.es (smoratti at psi.ucm.es) Date: Tue, 31 Jan 2012 21:48:04 +0100 Subject: [FieldTrip] Defining cfg.neighbourdist at source level In-Reply-To: References: <4F22C422.4080906@charite.de> <4F26B91E.2050200@donders.ru.nl> <4F26BE42.5030204@charite.de> Message-ID: <61FDD8CB-F79B-48A6-BC19-015F778A4945@psi.ucm.es> Dear Robert, To do clustering on a 3D source surface I always had to "trick" field trip and squeezed the 3D source surface data into a ERF structure treating the 3D surface points as sensors. Then by triangulation I found the neighbors. However, if there is a more elegant method implemented in ft_sourcestatistc, I would be very interested to know how to do it. Where can I find some hints on that? 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 31/01/2012, a las 15:37, Robert Oostenveld escribió: > Dear Ulrich > > If your source locations are defined on a regular 3D grid that can be represented as volume, then the neighbours are trivial to find and you do not have to specify a structure for the neighbours. > > If you have done source reconstruction on a 3D folded cortical sheet that is defined by a triangulated surface, then it is also possible to cluster along the surface. I don't know the details for the cortical sheet clustering from the top of my head, if you are interested please let me know and I'll look them up. > > best > Robert > > > > > On 30 Jan 2012, at 16:58, Pomper, Ulrich wrote: > >> Dear Jörn, >> Thanks for you reply. I did mean source-level, so like you said, I am trying to define the neighbouring voxels for each voxel. >> As far as I understand, leaving cfg.neighbours blank means that the clustering is done over the time and frequency dimensions only, not over space. >> The FT help reads: >> %If you specify an empty neighbourhood structure, clustering will only be done in frequency and time (if available) and not over neighbouring channels. >> >> Has anybody done clustering in source space using all three dimensions and could explain how this works? >> Cheers, >> Ulrich >> > > _______________________________________________ > 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 alotof_xd at yahoo.com Tue Jan 31 22:36:27 2012 From: alotof_xd at yahoo.com (alotof eve) Date: Tue, 31 Jan 2012 13:36:27 -0800 (PST) Subject: [FieldTrip] Where can I get 4D layout for MEG result? In-Reply-To: <1328041711.61986.YahooMailNeo@web125503.mail.ne1.yahoo.com> References: <1327823557.22249.YahooMailNeo@web125502.mail.ne1.yahoo.com> <9DDF9E6E-FFB8-4E56-BE13-B9B5C73735D1@ucdenver.edu> <1327903969.63327.YahooMailNeo@web125501.mail.ne1.yahoo.com> <1327905841.32374.YahooMailNeo@web125502.mail.ne1.yahoo.com> <318F2082-FD54-49BE-96CB-476051C0832B@donders.ru.nl> <1328035251.88538.YahooMailNeo@web125501.mail.ne1.yahoo.com> <1328041711.61986.YahooMailNeo@web125503.mail.ne1.yahoo.com> Message-ID: <1328045787.5297.YahooMailNeo@web125503.mail.ne1.yahoo.com> I renamed '4D248.lay' to 'CTF275.lay' then checked with 'ft_layoutplot', it worked. If renamed 'CTF275.lay' to '4d248.lay', 'ft_layoutplot' showed error message. So I think it must be some code error in reading layout file. Any suggestions?  Thanks, Duo ________________________________ From: alotof eve To: Email discussion list for the FieldTrip project Sent: Tuesday, January 31, 2012 12:28 PM Subject: Re: [FieldTrip] Where can I get 4D layout for MEG result? A very strange thing... I tested the other layout, like 'CTF275.lay' using 'ft_layoutplot', it works. However, '4D248.lay' dosen't work on 'ft_layoutplot' with the same error message as before: Error using dataread Trouble reading floating point number from file (row 1, field 1) ==> \n .... Even I rename 'CTF275.lay' to '4D248.lay', it comes the same error message. Any suggestions? Thanks, Duo ________________________________ From: alotof eve To: Email discussion list for the FieldTrip project Sent: Tuesday, January 31, 2012 10:40 AM Subject: Re: [FieldTrip] Where can I get 4D layout for MEG result? Dear Robert, Thank you so much for the suggestion. I compared the file but couldn't get idea yet. The format of 4D248.lay which I am using is like follows: 1 0.23057 -0.26062 3 2.25 A1 2 0.23057 3.8119 3 2.25 A2 3 0.064345 8.2238 3 2.25 A3 4 0.064345 11.957 3 2.25 A4 5 -0.10188 16.0295 3 2.25 A5 6 -3.7588 16.0295 3 2.25 A6 7 -4.0913 11.957 3 2.25 A7 8 -4.2575 8.2238 3 2.25 A8 9 -4.0913 4.1513 3 2.25 A9 10 -4.2575 -0.09093 3 2.25 A10 .... Any more suggestions? Thanks, Duo ________________________________ From: Robert Oostenveld To: Email discussion list for the FieldTrip project Sent: Tuesday, January 31, 2012 6:41 AM Subject: Re: [FieldTrip] Where can I get 4D layout for MEG result? Dear Duo The error suggests that the layout file is corrupt, DOCTYPE is not a string that should be present in the file. Please open it in a text editor and compare it with the format here http://fieldtrip.fcdonders.nl/faq/what_is_the_format_of_the_layout_file_which_is_used_for_plotting best Robert  On 30 Jan 2012, at 7:44, alotof eve wrote: ----- Forwarded Message ----- >From: alotof eve >To: "Rojas, Don" >Sent: Sunday, January 29, 2012 10:12 PM >Subject: Re: [FieldTrip] Where can I get 4D layout for MEG result? > > >Thank Don. In fact I asked the question because I met problem when I using the layout that I thought it's something wrong. > > >I am doing ica and using: ft_topoplotIC(cfg,comp), then got the error message: > > >reading layout from file 4D248.lay >Error using dataread >Trouble reading floating point number from file (row 1, field 1) ==> \n > >Error in textread (line 176) >[varargout{1:nlhs}]=dataread('file',varargin{:}); > >Error in ft_prepare_layout>readlay (line 670) >[chNum,X,Y,Width,Height,Lbl,Rem] = textread(filename,'%f >%f %f %f %f %q %q'); > >Error in ft_prepare_layout (line 222) >  lay = readlay(cfg.layout); > >Error in ft_topoplotER (line 433) >lay = ft_prepare_layout(cfg, data); > >Error in ft_topoplotIC (line 116) >    ft_topoplotER(cfg, varargin{:}); > > >Can anyone help me on this? > > >Thanks, >Duo > > >________________________________ > From: "Rojas, Don" >To: alotof eve ; Email discussion list for the FieldTrip project >Sent: Sunday, January 29, 2012 7:36 AM >Subject: Re: [FieldTrip] Where can I get 4D layout for MEG result? > > >It is in your fieldtrip distribution, in the template/layout/ subdirectory. But you can just use it with any function that takes a layout by specifying: > > >cfg.layout = '4D248.lay' > > >On Jan 29, 2012, at 12:52 AM, alotof eve wrote: > >Hi, everyone, >> >> >>Out MEG is 4D and I checked that we should use 4D248.lay but I cannot find this file. Can anyone tell me where I can download such a file? >> >> >> >>Thanks >>Duo_______________________________________________ >>fieldtrip mailing list >>fieldtrip at donders.ru.nl >>http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > >----------------------- >Don Rojas, Ph.D. >Associate Professor of Psychiatry >U. of Colorado Denver Anschutz Medical Campus >Director, UCD Magnetoencephalography Lab >13001 E. 17th Pl F546 >Aurora, CO 80045 >303-724-4994 > > > > >_______________________________________________ >fieldtrip mailing list >fieldtrip at donders.ru.nl >http://mailman.science.ru.nl/mailman/listinfo/fieldtrip _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -------------- next part -------------- An HTML attachment was scrubbed... URL: From b.reuderink at donders.ru.nl Mon Jan 2 16:27:26 2012 From: b.reuderink at donders.ru.nl (Boris Reuderink) Date: Mon, 2 Jan 2012 16:27:26 +0100 Subject: [FieldTrip] Problem detecting triggers with real time synchronous analysis In-Reply-To: <29E38593-B980-47D1-9E86-E197EF62994E@adamcsnyder.com> References: <29E38593-B980-47D1-9E86-E197EF62994E@adamcsnyder.com> Message-ID: Dear Adam, I took a look at the code for ft_realtime_synchronous, and I have to say I can't see why it should not work with the config you provided. I would like to localize the problem; specifically, I would like to know if it 1) occurs before the data is put in the buffer (i.e. biosemi2ft), or 2) after it is read from the buffer --- assuming it does not happen in the buffer. Could perhaps send me output of biosemi2ft containing the messages regarding the triggers? Even better would be file-dump of the buffer using http://fieldtrip.fcdonders.nl/development/realtime#recording_and_playing_back_online_experiments . @Marcel, is appears you wrote ft_realtime_synchronous. Do you have any clue? Best regards, Boris On Tue, Dec 20, 2011 at 4:54 AM, Adam C. Snyder wrote: > Hello, >     I'm trying to perform a real time synchronous analysis in response to a particular trigger, but it isn't working. Here are some brief details of the setup: we're using BioSemi ActiveTwo, a December 2011 version of FieldTrip and MATLAB 2010b. >     I've managed to get the biosemi2ft executable running, and if I send a trigger through the BioSemi system, the details are noted in the command window. However, within the ft_realtime_synchronous function, the trigger events are not being found. The built-in status updates (e.g., "CMS_IN_RANGE", etc.), in contrast, are picked up by the ft_read_event call within ft_realtime_synchronous function, which adds to my confusion. >     My configurations are something like these: > >          cfg.dataset = 'buffer://localhost:1972'; >          cfg.bcifun = @hello_world; >          cfg.blocksize = 1; >          cfg.trigger = [4 2]; >          cfg.jumptoeof = 'yes'; >          cfg.bufferdata = 'last'; %maybe the name of this option was different -- I'm typing from memory > >     I hope someone can kindly help me to figure this out, and thank you in advance for whatever help you can provide. > > In Science, > > Adam C. Snyder > > Postdoctoral Fellow > Cognitive Neurophysiology Lab > Albert Einstein College of Medicine > Bronx, NY > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip From lavado at gmail.com Mon Jan 2 17:11:51 2012 From: lavado at gmail.com (Ion Lavado) Date: Mon, 2 Jan 2012 17:11:51 +0100 Subject: [FieldTrip] ft_headmodelplot coordinate system origin problem Message-ID: Hello, i'm working with MEG data from Elekta Neuromag. My problem comes when i try to plot the headmodel with the function ft_headmodelplot(cfg). This should plot the head model(volume) + brain grid + sensors. As you can see in the adjunted image, my head volume and grid is not centered and part of the head could not be read by the sensors. Is it possible to modify this so i can center the head in the sensors(helmet)? Thank you very much. Ion Lavado -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: headmodelplot.jpg Type: image/jpeg Size: 18720 bytes Desc: not available URL: From jan.schoffelen at donders.ru.nl Mon Jan 2 17:27:07 2012 From: jan.schoffelen at donders.ru.nl (jan-mathijs schoffelen) Date: Mon, 2 Jan 2012 17:27:07 +0100 Subject: [FieldTrip] ft_headmodelplot coordinate system origin problem In-Reply-To: References: Message-ID: Dear Ion, Are you sure that the sensor positions are defined in the same coordinate system as are the volume conductor model and the source positions? If not, then this is the likely cause of the shift. You can have a look here for more information about the different coordinate systems: http://fieldtrip.fcdonders.nl/faq/how_are_the_different_head_and_mri_coordinate_systems_defined In order to coregister the anatomical mri to the sensor array, you can use ft_volumerealign. Best wishes, Jan-Mathijs On Jan 2, 2012, at 5:11 PM, Ion Lavado wrote: > Hello, i'm working with MEG data from Elekta Neuromag. My problem comes when i try to plot the headmodel with the function ft_headmodelplot(cfg). This should plot the head model(volume) + brain grid + sensors. As you can see in the adjunted image, my head volume and grid is not centered and part of the head could not be read by the sensors. Is it possible to modify this so i can center the head in the sensors(helmet)? > Thank you very much. > > Ion Lavado > _______________________________________________ > 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 -------------- next part -------------- An HTML attachment was scrubbed... URL: From adam at adamcsnyder.com Mon Jan 2 18:48:16 2012 From: adam at adamcsnyder.com (Adam C. Snyder) Date: Mon, 02 Jan 2012 12:48:16 -0500 Subject: [FieldTrip] fieldtrip Digest, Vol 14, Issue 2 In-Reply-To: References: Message-ID: <4F01EDE0.6040900@adamcsnyder.com> Dear Boris, I just wanted to thank you for helping me with this issue. I will gather together the information you requested when I get back to the lab after the New Year's holiday and let you know. Many thanks again! -Adam On 02-Jan-2012 11:12, fieldtrip-request at donders.ru.nl wrote: > Message: 1 > Date: Mon, 2 Jan 2012 16:27:26 +0100 > From: Boris Reuderink > To: Email discussion list for the FieldTrip project > > Cc: "m.vangerven" > Subject: Re: [FieldTrip] Problem detecting triggers with real time > synchronous analysis > Message-ID: > > Content-Type: text/plain; charset=ISO-8859-1 > > Dear Adam, > > I took a look at the code for ft_realtime_synchronous, and I have to > say I can't see why it should not work with the config you provided. I > would like to localize the problem; specifically, I would like to know > if it 1) occurs before the data is put in the buffer (i.e. > biosemi2ft), or 2) after it is read from the buffer --- assuming it > does not happen in the buffer. > > Could perhaps send me output of biosemi2ft containing the messages > regarding the triggers? Even better would be file-dump of the buffer > using http://fieldtrip.fcdonders.nl/development/realtime#recording_and_playing_back_online_experiments > . > > @Marcel, is appears you wrote ft_realtime_synchronous. Do you have any clue? > > Best regards, > > Boris > > On Tue, Dec 20, 2011 at 4:54 AM, Adam C. Snyder wrote: >> Hello, >> ? ? I'm trying to perform a real time synchronous analysis in response to a particular trigger, but it isn't working. Here are some brief details of the setup: we're using BioSemi ActiveTwo, a December 2011 version of FieldTrip and MATLAB 2010b. >> ? ? I've managed to get the biosemi2ft executable running, and if I send a trigger through the BioSemi system, the details are noted in the command window. However, within the ft_realtime_synchronous function, the trigger events are not being found. The built-in status updates (e.g., "CMS_IN_RANGE", etc.), in contrast, are picked up by the ft_read_event call within ft_realtime_synchronous function, which adds to my confusion. >> ? ? My configurations are something like these: >> >> ? ? ? ? ?cfg.dataset = 'buffer://localhost:1972'; >> ? ? ? ? ?cfg.bcifun = @hello_world; >> ? ? ? ? ?cfg.blocksize = 1; >> ? ? ? ? ?cfg.trigger = [4 2]; >> ? ? ? ? ?cfg.jumptoeof = 'yes'; >> ? ? ? ? ?cfg.bufferdata = 'last'; %maybe the name of this option was different -- I'm typing from memory >> >> ? ? I hope someone can kindly help me to figure this out, and thank you in advance for whatever help you can provide. >> >> In Science, >> >> Adam C. Snyder >> >> Postdoctoral Fellow >> Cognitive Neurophysiology Lab >> Albert Einstein College of Medicine >> Bronx, NY >> _______________________________________________ >> fieldtrip mailing list >> fieldtrip at donders.ru.nl >> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip From lavado at gmail.com Tue Jan 3 11:38:25 2012 From: lavado at gmail.com (Ion Lavado) Date: Tue, 3 Jan 2012 11:38:25 +0100 Subject: [FieldTrip] ft_headmodelplot coordinate system origin problem In-Reply-To: References: Message-ID: Thank you for your help Jan. I tried all you told but i continue with my problem. The coordinates for the head (volume) and mri are the same, with the function ft_determine_coordsys i see this. I think that the problem is about the sensor (helmet) origin of coordinates. Please see the images i adjunt here,* the sensors origin is very low*(nearly out of the helmet) and when ploting everything i suppose that every origin align to each other, so that the brain comes a little bit low. Best whishes, Ion 2012/1/2 jan-mathijs schoffelen > Dear Ion, > > Are you sure that the sensor positions are defined in the same coordinate > system as are the volume conductor model and the source positions? If not, > then this is the likely cause of the shift. You can have a look here for > more information about the different coordinate systems: > http://fieldtrip.fcdonders.nl/faq/how_are_the_different_head_and_mri_coordinate_systems_defined > > In order to coregister the anatomical mri to the sensor array, you can use > ft_volumerealign. > > Best wishes, > > Jan-Mathijs > > > On Jan 2, 2012, at 5:11 PM, Ion Lavado wrote: > > Hello, i'm working with MEG data from Elekta Neuromag. My problem comes > when i try to plot the headmodel with the function ft_headmodelplot(cfg). > This should plot the head model(volume) + brain grid + sensors. As you can > see in the adjunted image, my head volume and grid is not centered and part > of the head could not be read by the sensors. Is it possible to modify this > so i can center the head in the sensors(helmet)? > Thank you very much. > > Ion Lavado > _______________________________________________ > 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 > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: helmet.jpg Type: image/jpeg Size: 15093 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: vol.jpg Type: image/jpeg Size: 19456 bytes Desc: not available URL: From jan.schoffelen at donders.ru.nl Tue Jan 3 11:50:27 2012 From: jan.schoffelen at donders.ru.nl (jan-mathijs schoffelen) Date: Tue, 3 Jan 2012 11:50:27 +0100 Subject: [FieldTrip] ft_headmodelplot coordinate system origin problem In-Reply-To: References: Message-ID: <321B871E-53E2-43D8-B397-EA9C73C8B32C@donders.ru.nl> Hi Ion, What is the coordinate system in which the vol and mri are defined? To me it does not look like the neuromag coordinate system, but rather like MNI-space. I would expect the origin to be a bit (~4 cm) lower and a bit more anterior (because the origin is defined on the line going through the pre-auricular points. In the 'vol.jpg' it seems that the origin is in the anterior commissure. Although in principle it shouldn't matter, it is convention to express the coordinates in the MEG-system's coordinate system, i.e. in neuromag space in this case. Therefore I would say that the vol and grid variables need to be adjusted, rather than the sensor positions. As mentioned in my previoius message, this can be achieved by coregistering the anatomy to the neuromag coordinate system using ft_volumerealign. You need to manually identify the locations of the fiducials that define the coordinate system, i.e. the nasion, lpa and rpa. The required cfg is: cfg.interactive = 'yes', cfg.coordsys = 'neuromag'. Once the anatomy is coregistered you can proceed with creating the vol and grid variables. Best, Jan-Mathijs On Jan 3, 2012, at 11:38 AM, Ion Lavado wrote: > Thank you for your help Jan. I tried all you told but i continue with my problem. The coordinates for the head (volume) and mri are the same, with the function ft_determine_coordsys i see this. > I think that the problem is about the sensor (helmet) origin of coordinates. Please see the images i adjunt here, the sensors origin is very low(nearly out of the helmet) and when ploting everything i suppose that every origin align to each other, so that the brain comes a little bit low. > > Best whishes, > > Ion > > 2012/1/2 jan-mathijs schoffelen > Dear Ion, > > Are you sure that the sensor positions are defined in the same coordinate system as are the volume conductor model and the source positions? If not, then this is the likely cause of the shift. You can have a look here for more information about the different coordinate systems: http://fieldtrip.fcdonders.nl/faq/how_are_the_different_head_and_mri_coordinate_systems_defined > > In order to coregister the anatomical mri to the sensor array, you can use ft_volumerealign. > > Best wishes, > > Jan-Mathijs > > > On Jan 2, 2012, at 5:11 PM, Ion Lavado wrote: > >> Hello, i'm working with MEG data from Elekta Neuromag. My problem comes when i try to plot the headmodel with the function ft_headmodelplot(cfg). This should plot the head model(volume) + brain grid + sensors. As you can see in the adjunted image, my head volume and grid is not centered and part of the head could not be read by the sensors. Is it possible to modify this so i can center the head in the sensors(helmet)? >> Thank you very much. >> >> Ion Lavado >> _______________________________________________ >> 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 > > > _______________________________________________ > 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 -------------- next part -------------- An HTML attachment was scrubbed... URL: From lavado at gmail.com Tue Jan 3 12:45:53 2012 From: lavado at gmail.com (Ion Lavado) Date: Tue, 3 Jan 2012 12:45:53 +0100 Subject: [FieldTrip] ft_headmodelplot coordinate system origin problem In-Reply-To: <321B871E-53E2-43D8-B397-EA9C73C8B32C@donders.ru.nl> References: <321B871E-53E2-43D8-B397-EA9C73C8B32C@donders.ru.nl> Message-ID: Hi Jan, I am sorry, I have been trying with your method but now what is incorrect is the segmentation. Here is the script. Maybe you understand better the problem...I am getting crazy. The problem comes from line 53 Thank you very much, Best, Ion 2012/1/3 jan-mathijs schoffelen > Hi Ion, > > What is the coordinate system in which the vol and mri are defined? To me > it does not look like the neuromag coordinate system, but rather like > MNI-space. I would expect the origin to be a bit (~4 cm) lower and a bit > more anterior (because the origin is defined on the line going through the > pre-auricular points. In the 'vol.jpg' it seems that the origin is in the > anterior commissure. Although in principle it shouldn't matter, it is > convention to express the coordinates in the MEG-system's coordinate > system, i.e. in neuromag space in this case. Therefore I would say that the > vol and grid variables need to be adjusted, rather than the sensor > positions. As mentioned in my previoius message, this can be achieved by > coregistering the anatomy to the neuromag coordinate system using > ft_volumerealign. You need to manually identify the locations of the > fiducials that define the coordinate system, i.e. the nasion, lpa and rpa. > The required cfg is: cfg.interactive = 'yes', cfg.coordsys = 'neuromag'. > Once the anatomy is coregistered you can proceed with creating the vol and > grid variables. > > Best, > > Jan-Mathijs > > > On Jan 3, 2012, at 11:38 AM, Ion Lavado wrote: > > Thank you for your help Jan. I tried all you told but i continue with my > problem. The coordinates for the head (volume) and mri are the same, with > the function ft_determine_coordsys i see this. > I think that the problem is about the sensor (helmet) origin of > coordinates. Please see the images i adjunt here,* the sensors origin is > very low*(nearly out of the helmet) and when ploting everything i suppose > that every origin align to each other, so that the brain comes a little bit > low. > > Best whishes, > > Ion > > 2012/1/2 jan-mathijs schoffelen > >> Dear Ion, >> >> Are you sure that the sensor positions are defined in the same coordinate >> system as are the volume conductor model and the source positions? If not, >> then this is the likely cause of the shift. You can have a look here for >> more information about the different coordinate systems: >> http://fieldtrip.fcdonders.nl/faq/how_are_the_different_head_and_mri_coordinate_systems_defined >> >> In order to coregister the anatomical mri to the sensor array, you can >> use ft_volumerealign. >> >> Best wishes, >> >> Jan-Mathijs >> >> >> On Jan 2, 2012, at 5:11 PM, Ion Lavado wrote: >> >> Hello, i'm working with MEG data from Elekta Neuromag. My problem comes >> when i try to plot the headmodel with the function ft_headmodelplot(cfg). >> This should plot the head model(volume) + brain grid + sensors. As you can >> see in the adjunted image, my head volume and grid is not centered and part >> of the head could not be read by the sensors. Is it possible to modify this >> so i can center the head in the sensors(helmet)? >> Thank you very much. >> >> Ion Lavado >> _______________________________________________ >> 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 >> >> >> _______________________________________________ >> 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 > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: script.m Type: application/octet-stream Size: 3977 bytes Desc: not available URL: From jan.schoffelen at donders.ru.nl Tue Jan 3 12:57:27 2012 From: jan.schoffelen at donders.ru.nl (jan-mathijs schoffelen) Date: Tue, 3 Jan 2012 12:57:27 +0100 Subject: [FieldTrip] ft_headmodelplot coordinate system origin problem In-Reply-To: References: <321B871E-53E2-43D8-B397-EA9C73C8B32C@donders.ru.nl> Message-ID: <76760214-3081-465C-8AFB-3E3A52A53C24@donders.ru.nl> Hi Ion, I'd suggest first to have a look at mri_real. How does it look in ft_determine_coordsys? In particular, is the z-axis pointing in the correct direction? JM On Jan 3, 2012, at 12:45 PM, Ion Lavado wrote: > Hi Jan, > I am sorry, I have been trying with your method but now what is incorrect is the segmentation. > Here is the script. Maybe you understand better the problem...I am getting crazy. The problem comes from line 53 > Thank you very much, > Best, > Ion > > > > 2012/1/3 jan-mathijs schoffelen > Hi Ion, > > What is the coordinate system in which the vol and mri are defined? To me it does not look like the neuromag coordinate system, but rather like MNI-space. I would expect the origin to be a bit (~4 cm) lower and a bit more anterior (because the origin is defined on the line going through the pre-auricular points. In the 'vol.jpg' it seems that the origin is in the anterior commissure. Although in principle it shouldn't matter, it is convention to express the coordinates in the MEG-system's coordinate system, i.e. in neuromag space in this case. Therefore I would say that the vol and grid variables need to be adjusted, rather than the sensor positions. As mentioned in my previoius message, this can be achieved by coregistering the anatomy to the neuromag coordinate system using ft_volumerealign. You need to manually identify the locations of the fiducials that define the coordinate system, i.e. the nasion, lpa and rpa. The required cfg is: cfg.interactive = 'yes', cfg.coordsys = 'neuromag'. Once the anatomy is coregistered you can proceed with creating the vol and grid variables. > > Best, > > Jan-Mathijs > > > On Jan 3, 2012, at 11:38 AM, Ion Lavado wrote: > >> Thank you for your help Jan. I tried all you told but i continue with my problem. The coordinates for the head (volume) and mri are the same, with the function ft_determine_coordsys i see this. >> I think that the problem is about the sensor (helmet) origin of coordinates. Please see the images i adjunt here, the sensors origin is very low(nearly out of the helmet) and when ploting everything i suppose that every origin align to each other, so that the brain comes a little bit low. >> >> Best whishes, >> >> Ion >> >> 2012/1/2 jan-mathijs schoffelen >> Dear Ion, >> >> Are you sure that the sensor positions are defined in the same coordinate system as are the volume conductor model and the source positions? If not, then this is the likely cause of the shift. You can have a look here for more information about the different coordinate systems: http://fieldtrip.fcdonders.nl/faq/how_are_the_different_head_and_mri_coordinate_systems_defined >> >> In order to coregister the anatomical mri to the sensor array, you can use ft_volumerealign. >> >> Best wishes, >> >> Jan-Mathijs >> >> >> On Jan 2, 2012, at 5:11 PM, Ion Lavado wrote: >> >>> Hello, i'm working with MEG data from Elekta Neuromag. My problem comes when i try to plot the headmodel with the function ft_headmodelplot(cfg). This should plot the head model(volume) + brain grid + sensors. As you can see in the adjunted image, my head volume and grid is not centered and part of the head could not be read by the sensors. Is it possible to modify this so i can center the head in the sensors(helmet)? >>> Thank you very much. >>> >>> Ion Lavado >>> _______________________________________________ >>> 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 >> >> >> _______________________________________________ >> 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 > > > _______________________________________________ > 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 -------------- next part -------------- An HTML attachment was scrubbed... URL: From lavado at gmail.com Tue Jan 3 13:20:09 2012 From: lavado at gmail.com (Ion Lavado) Date: Tue, 3 Jan 2012 13:20:09 +0100 Subject: [FieldTrip] ft_headmodelplot coordinate system origin problem In-Reply-To: <76760214-3081-465C-8AFB-3E3A52A53C24@donders.ru.nl> References: <321B871E-53E2-43D8-B397-EA9C73C8B32C@donders.ru.nl> <76760214-3081-465C-8AFB-3E3A52A53C24@donders.ru.nl> Message-ID: The Z axis is pointing to the oposite direction (inferior), so i have the mri upside down. How can i change this? When Matlab plots the figure it asks me this: The positive x-axis is pointing towards the right The positive y-axis is pointing towards anterior The positive z-axis is pointing towards superior Do you want to change the anatomical labels for the axes [y, N]? I then mark to change the axis and mark the positive z-axis as (i)inferior, but when plotting again is as the begginig... What do i have to do? Thank you very much Jan. 2012/1/3 jan-mathijs schoffelen > Hi Ion, > > I'd suggest first to have a look at mri_real. How does it look in > ft_determine_coordsys? > In particular, is the z-axis pointing in the correct direction? > > JM > > > On Jan 3, 2012, at 12:45 PM, Ion Lavado wrote: > > Hi Jan, > I am sorry, I have been trying with your method but now what is incorrect > is the segmentation. > Here is the script. Maybe you understand better the problem...I am getting > crazy. The problem comes from line 53 > Thank you very much, > Best, > Ion > > > > 2012/1/3 jan-mathijs schoffelen > >> Hi Ion, >> >> What is the coordinate system in which the vol and mri are defined? To me >> it does not look like the neuromag coordinate system, but rather like >> MNI-space. I would expect the origin to be a bit (~4 cm) lower and a bit >> more anterior (because the origin is defined on the line going through the >> pre-auricular points. In the 'vol.jpg' it seems that the origin is in the >> anterior commissure. Although in principle it shouldn't matter, it is >> convention to express the coordinates in the MEG-system's coordinate >> system, i.e. in neuromag space in this case. Therefore I would say that the >> vol and grid variables need to be adjusted, rather than the sensor >> positions. As mentioned in my previoius message, this can be achieved by >> coregistering the anatomy to the neuromag coordinate system using >> ft_volumerealign. You need to manually identify the locations of the >> fiducials that define the coordinate system, i.e. the nasion, lpa and rpa. >> The required cfg is: cfg.interactive = 'yes', cfg.coordsys = 'neuromag'. >> Once the anatomy is coregistered you can proceed with creating the vol and >> grid variables. >> >> Best, >> >> Jan-Mathijs >> >> >> On Jan 3, 2012, at 11:38 AM, Ion Lavado wrote: >> >> Thank you for your help Jan. I tried all you told but i continue with my >> problem. The coordinates for the head (volume) and mri are the same, with >> the function ft_determine_coordsys i see this. >> I think that the problem is about the sensor (helmet) origin of >> coordinates. Please see the images i adjunt here,* the sensors origin is >> very low*(nearly out of the helmet) and when ploting everything i >> suppose that every origin align to each other, so that the brain comes a >> little bit low. >> >> Best whishes, >> >> Ion >> >> 2012/1/2 jan-mathijs schoffelen >> >>> Dear Ion, >>> >>> Are you sure that the sensor positions are defined in the same >>> coordinate system as are the volume conductor model and the source >>> positions? If not, then this is the likely cause of the shift. You can have >>> a look here for more information about the different coordinate systems: >>> http://fieldtrip.fcdonders.nl/faq/how_are_the_different_head_and_mri_coordinate_systems_defined >>> >>> In order to coregister the anatomical mri to the sensor array, you can >>> use ft_volumerealign. >>> >>> Best wishes, >>> >>> Jan-Mathijs >>> >>> >>> On Jan 2, 2012, at 5:11 PM, Ion Lavado wrote: >>> >>> Hello, i'm working with MEG data from Elekta Neuromag. My problem comes >>> when i try to plot the headmodel with the function ft_headmodelplot(cfg). >>> This should plot the head model(volume) + brain grid + sensors. As you can >>> see in the adjunted image, my head volume and grid is not centered and part >>> of the head could not be read by the sensors. Is it possible to modify this >>> so i can center the head in the sensors(helmet)? >>> Thank you very much. >>> >>> Ion Lavado >>> _______________________________________________ >>> 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 >>> >>> >>> _______________________________________________ >>> 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 >> >> >> _______________________________________________ >> 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 > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > -------------- next part -------------- An HTML attachment was scrubbed... URL: From jan.schoffelen at donders.ru.nl Tue Jan 3 13:37:56 2012 From: jan.schoffelen at donders.ru.nl (jan-mathijs schoffelen) Date: Tue, 3 Jan 2012 13:37:56 +0100 Subject: [FieldTrip] ft_headmodelplot coordinate system origin problem In-Reply-To: References: <321B871E-53E2-43D8-B397-EA9C73C8B32C@donders.ru.nl> <76760214-3081-465C-8AFB-3E3A52A53C24@donders.ru.nl> Message-ID: <1F5462DE-0087-4F8A-AD1B-62B2A334E5FF@donders.ru.nl> Hi Ion, If the positive z-axis (denoted by +Z in the figure that is created by ft_determine_coordsys) is not pointing to the top of the head you made an error in ft_volumerealign and probably exchanged left with right in setting the lpa and rpa locations. This results in the coordinate system being a left-handed one and causes all kind of trouble later on. If this is the case, you need to repeat ft_volumerealign (with the original MRI) and type 'l' where you typed 'r', and the other way around. Ft_volumesegment relies on spm for the segmentation, which relies on the mri-data being defined in a meaningful right-handed coordinate system (which can be either mni-based, or MEG system based). If however the +Z is just pointing downward but the anatomy is 'upside-down' (neck pointing to the ceiling) then the coordinate system is a valid, i.e. a right-handed RAS (right-anterior-superior) coordinate system. If this is the case then I wouldn't know what's going on, because I would suspect that ft_volumesegment Perhaps some other neuromag aficionados could jump to the rescue here? As such ft_determine_coordsys does not change the coordinate system of your mri, it just changes the coordsys field, which helps FieldTrip in the interpretation of the real-world coordinates. The mapping of voxel locations to real-world locations is defined by mri.transform which can be changed by ft_volumerealign. Best wishes, JM On Jan 3, 2012, at 1:20 PM, Ion Lavado wrote: > The Z axis is pointing to the oposite direction (inferior), so i have the mri upside down. How can i change this? When Matlab plots the figure it asks me this: > > The positive x-axis is pointing towards the right > The positive y-axis is pointing towards anterior > The positive z-axis is pointing towards superior > Do you want to change the anatomical labels for the axes [y, N]? > > I then mark to change the axis and mark the positive z-axis as (i)inferior, but when plotting again is as the begginig... What do i have to do? > > Thank you very much Jan. > > > > 2012/1/3 jan-mathijs schoffelen > Hi Ion, > > I'd suggest first to have a look at mri_real. How does it look in ft_determine_coordsys? > In particular, is the z-axis pointing in the correct direction? > > JM > > > On Jan 3, 2012, at 12:45 PM, Ion Lavado wrote: > >> Hi Jan, >> I am sorry, I have been trying with your method but now what is incorrect is the segmentation. >> Here is the script. Maybe you understand better the problem...I am getting crazy. The problem comes from line 53 >> Thank you very much, >> Best, >> Ion >> >> >> >> 2012/1/3 jan-mathijs schoffelen >> Hi Ion, >> >> What is the coordinate system in which the vol and mri are defined? To me it does not look like the neuromag coordinate system, but rather like MNI-space. I would expect the origin to be a bit (~4 cm) lower and a bit more anterior (because the origin is defined on the line going through the pre-auricular points. In the 'vol.jpg' it seems that the origin is in the anterior commissure. Although in principle it shouldn't matter, it is convention to express the coordinates in the MEG-system's coordinate system, i.e. in neuromag space in this case. Therefore I would say that the vol and grid variables need to be adjusted, rather than the sensor positions. As mentioned in my previoius message, this can be achieved by coregistering the anatomy to the neuromag coordinate system using ft_volumerealign. You need to manually identify the locations of the fiducials that define the coordinate system, i.e. the nasion, lpa and rpa. The required cfg is: cfg.interactive = 'yes', cfg.coordsys = 'neuromag'. Once the anatomy is coregistered you can proceed with creating the vol and grid variables. >> >> Best, >> >> Jan-Mathijs >> >> >> On Jan 3, 2012, at 11:38 AM, Ion Lavado wrote: >> >>> Thank you for your help Jan. I tried all you told but i continue with my problem. The coordinates for the head (volume) and mri are the same, with the function ft_determine_coordsys i see this. >>> I think that the problem is about the sensor (helmet) origin of coordinates. Please see the images i adjunt here, the sensors origin is very low(nearly out of the helmet) and when ploting everything i suppose that every origin align to each other, so that the brain comes a little bit low. >>> >>> Best whishes, >>> >>> Ion >>> >>> 2012/1/2 jan-mathijs schoffelen >>> Dear Ion, >>> >>> Are you sure that the sensor positions are defined in the same coordinate system as are the volume conductor model and the source positions? If not, then this is the likely cause of the shift. You can have a look here for more information about the different coordinate systems: http://fieldtrip.fcdonders.nl/faq/how_are_the_different_head_and_mri_coordinate_systems_defined >>> >>> In order to coregister the anatomical mri to the sensor array, you can use ft_volumerealign. >>> >>> Best wishes, >>> >>> Jan-Mathijs >>> >>> >>> On Jan 2, 2012, at 5:11 PM, Ion Lavado wrote: >>> >>>> Hello, i'm working with MEG data from Elekta Neuromag. My problem comes when i try to plot the headmodel with the function ft_headmodelplot(cfg). This should plot the head model(volume) + brain grid + sensors. As you can see in the adjunted image, my head volume and grid is not centered and part of the head could not be read by the sensors. Is it possible to modify this so i can center the head in the sensors(helmet)? >>>> Thank you very much. >>>> >>>> Ion Lavado >>>> _______________________________________________ >>>> 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 >>> >>> >>> _______________________________________________ >>> 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 >> >> >> _______________________________________________ >> 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 > > > _______________________________________________ > 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 -------------- next part -------------- An HTML attachment was scrubbed... URL: From lavado at gmail.com Tue Jan 3 14:22:34 2012 From: lavado at gmail.com (Ion Lavado) Date: Tue, 3 Jan 2012 14:22:34 +0100 Subject: [FieldTrip] ft_headmodelplot coordinate system origin problem In-Reply-To: <1F5462DE-0087-4F8A-AD1B-62B2A334E5FF@donders.ru.nl> References: <321B871E-53E2-43D8-B397-EA9C73C8B32C@donders.ru.nl> <76760214-3081-465C-8AFB-3E3A52A53C24@donders.ru.nl> <1F5462DE-0087-4F8A-AD1B-62B2A334E5FF@donders.ru.nl> Message-ID: Thank you very much Jan! Now everything fits using ft_headmodelplot(cfg). You solved our problem of the week. Just one final problem we have: - we are doing the beamformig source analisys. - our vol, grid and grad fits ok. -we have the sourcePre = ft_sourceanalysis(cfg, freqPre); sourcePost = ft_sourceanalysis(cfg, freqPost); -we then interpolate the data with cfg = []; cfg.downsample = 2; sourcePostInt = ft_sourceinterpolate(cfg, sourcePost , mri_real); - finally we use method SLICE to plot the results: (WITH MRI_REAL) %METHOD SLICE: sourceDiff = sourcePost; sourceDiff.avg.pow = (sourcePost.avg.pow - sourcePre.avg.pow) ./ sourcePre.avg.pow; cfg = [] cfg.downsample = 2; sourceDiffInt = ft_sourceinterpolate(cfg, sourceDiff , mri_real); cfg = []; cfg.method = 'slice'; cfg.interactive = 'yes'; cfg.funparameter = 'avg.pow'; cfg.maskparameter = cfg.funparameter; cfg.funcolorlim = [0 2]; cfg.opacitylim = [0 2]; cfg.opacitymap = 'rampup'; figure('Name', 'SLICE Method') ft_sourceplot(cfg, sourceDiffInt); The problem comes now (not before), that when plotting the result don't fit the mri in the figure. I send you the .jpg so you can see it and try to help us whith this FINAL problem! In the script i send you, the problem i think starts after line 156. You are really kind, and thank you very much for your usefull help. Ion 2012/1/3 jan-mathijs schoffelen > Hi Ion, > > If the positive z-axis (denoted by +Z in the figure that is created by > ft_determine_coordsys) is not pointing to the top of the head you made an > error in ft_volumerealign and probably exchanged left with right in setting > the lpa and rpa locations. This results in the coordinate system being a > left-handed one and causes all kind of trouble later on. If this is the > case, you need to repeat ft_volumerealign (with the original MRI) and type > 'l' where you typed 'r', and the other way around. Ft_volumesegment relies > on spm for the segmentation, which relies on the mri-data being defined in > a meaningful right-handed coordinate system (which can be either mni-based, > or MEG system based). > > If however the +Z is just pointing downward but the anatomy is > 'upside-down' (neck pointing to the ceiling) then the coordinate system is > a valid, i.e. a right-handed RAS (right-anterior-superior) coordinate > system. If this is the case then I wouldn't know what's going on, because I > would suspect that ft_volumesegment Perhaps some other neuromag > aficionados could jump to the rescue here? > > As such ft_determine_coordsys does not change the coordinate system of > your mri, it just changes the coordsys field, which helps FieldTrip in the > interpretation of the real-world coordinates. The mapping of voxel > locations to real-world locations is defined by mri.transform which can be > changed by ft_volumerealign. > > Best wishes, > > JM > > > On Jan 3, 2012, at 1:20 PM, Ion Lavado wrote: > > The Z axis is pointing to the oposite direction (inferior), so i have the > mri upside down. How can i change this? When Matlab plots the figure it > asks me this: > > The positive x-axis is pointing towards the right > The positive y-axis is pointing towards anterior > The positive z-axis is pointing towards superior > Do you want to change the anatomical labels for the axes [y, N]? > > I then mark to change the axis and mark the positive z-axis as > (i)inferior, but when plotting again is as the begginig... What do i have > to do? > > Thank you very much Jan. > > > > 2012/1/3 jan-mathijs schoffelen > >> Hi Ion, >> >> I'd suggest first to have a look at mri_real. How does it look in >> ft_determine_coordsys? >> In particular, is the z-axis pointing in the correct direction? >> >> JM >> >> >> On Jan 3, 2012, at 12:45 PM, Ion Lavado wrote: >> >> Hi Jan, >> I am sorry, I have been trying with your method but now what is incorrect >> is the segmentation. >> Here is the script. Maybe you understand better the problem...I am >> getting crazy. The problem comes from line 53 >> Thank you very much, >> Best, >> Ion >> >> >> >> 2012/1/3 jan-mathijs schoffelen >> >>> Hi Ion, >>> >>> What is the coordinate system in which the vol and mri are defined? To >>> me it does not look like the neuromag coordinate system, but rather like >>> MNI-space. I would expect the origin to be a bit (~4 cm) lower and a bit >>> more anterior (because the origin is defined on the line going through the >>> pre-auricular points. In the 'vol.jpg' it seems that the origin is in the >>> anterior commissure. Although in principle it shouldn't matter, it is >>> convention to express the coordinates in the MEG-system's coordinate >>> system, i.e. in neuromag space in this case. Therefore I would say that the >>> vol and grid variables need to be adjusted, rather than the sensor >>> positions. As mentioned in my previoius message, this can be achieved by >>> coregistering the anatomy to the neuromag coordinate system using >>> ft_volumerealign. You need to manually identify the locations of the >>> fiducials that define the coordinate system, i.e. the nasion, lpa and rpa. >>> The required cfg is: cfg.interactive = 'yes', cfg.coordsys = 'neuromag'. >>> Once the anatomy is coregistered you can proceed with creating the vol and >>> grid variables. >>> >>> Best, >>> >>> Jan-Mathijs >>> >>> >>> On Jan 3, 2012, at 11:38 AM, Ion Lavado wrote: >>> >>> Thank you for your help Jan. I tried all you told but i continue with my >>> problem. The coordinates for the head (volume) and mri are the same, with >>> the function ft_determine_coordsys i see this. >>> I think that the problem is about the sensor (helmet) origin of >>> coordinates. Please see the images i adjunt here,* the sensors origin >>> is very low*(nearly out of the helmet) and when ploting everything i >>> suppose that every origin align to each other, so that the brain comes a >>> little bit low. >>> >>> Best whishes, >>> >>> Ion >>> >>> 2012/1/2 jan-mathijs schoffelen >>> >>>> Dear Ion, >>>> >>>> Are you sure that the sensor positions are defined in the same >>>> coordinate system as are the volume conductor model and the source >>>> positions? If not, then this is the likely cause of the shift. You can have >>>> a look here for more information about the different coordinate systems: >>>> http://fieldtrip.fcdonders.nl/faq/how_are_the_different_head_and_mri_coordinate_systems_defined >>>> >>>> In order to coregister the anatomical mri to the sensor array, you can >>>> use ft_volumerealign. >>>> >>>> Best wishes, >>>> >>>> Jan-Mathijs >>>> >>>> >>>> On Jan 2, 2012, at 5:11 PM, Ion Lavado wrote: >>>> >>>> Hello, i'm working with MEG data from Elekta Neuromag. My problem comes >>>> when i try to plot the headmodel with the function ft_headmodelplot(cfg). >>>> This should plot the head model(volume) + brain grid + sensors. As you can >>>> see in the adjunted image, my head volume and grid is not centered and part >>>> of the head could not be read by the sensors. Is it possible to modify this >>>> so i can center the head in the sensors(helmet)? >>>> Thank you very much. >>>> >>>> Ion Lavado >>>> _______________________________________________ >>>> 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 >>>> >>>> >>>> _______________________________________________ >>>> 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 >>> >>> >>> _______________________________________________ >>> 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 >> >> >> _______________________________________________ >> 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 > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: plot.jpg Type: image/jpeg Size: 24158 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: script.m Type: application/octet-stream Size: 5145 bytes Desc: not available URL: From hamzaf at sabanciuniv.edu Wed Jan 4 07:11:33 2012 From: hamzaf at sabanciuniv.edu (Hamza Fawzi Altakroury (Student)) Date: Wed, 4 Jan 2012 08:11:33 +0200 Subject: [FieldTrip] Reading data while biosemi2ft is running Message-ID: Hello, What is the best function for reading data from *.gdf file in Matlab while "biosemi2ft" is running. Best -- Hamza Fawzi Altakroury Graduate student - MA Faculty of Engineering and Natural Sciences Sabancı University -------------- next part -------------- An HTML attachment was scrubbed... URL: From b.reuderink at donders.ru.nl Wed Jan 4 07:54:31 2012 From: b.reuderink at donders.ru.nl (Boris Reuderink) Date: Wed, 4 Jan 2012 07:54:31 +0100 Subject: [FieldTrip] Reading data while biosemi2ft is running In-Reply-To: References: Message-ID: Hi, What exactly are you trying to achieve by reading from the .gdf file being written? Can't you connect the the FieldTrip buffer that captures biosemi2ft's output? Best, Boris On Wed, Jan 4, 2012 at 7:11 AM, Hamza Fawzi Altakroury (Student) wrote: > Hello, > > What is the best function for reading data from *.gdf file in Matlab while > "biosemi2ft" is running. > > Best > > -- > Hamza Fawzi Altakroury > Graduate student - MA > Faculty of Engineering and Natural Sciences > Sabancı University > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip From hamzaf at sabanciuniv.edu Wed Jan 4 08:13:13 2012 From: hamzaf at sabanciuniv.edu (Hamza Fawzi Altakroury (Student)) Date: Wed, 4 Jan 2012 09:13:13 +0200 Subject: [FieldTrip] Reading data while biosemi2ft is running In-Reply-To: References: Message-ID: Hello, I am trying to do online processing, where the biosemi2ft captures the data puts it in a gdf file, and a function in Matlab reads the file continuously and process it. Or do you recommend me to use another way for online processing? Best On Wed, Jan 4, 2012 at 8:54 AM, Boris Reuderink wrote: > Hi, > > What exactly are you trying to achieve by reading from the .gdf file > being written? > Can't you connect the the FieldTrip buffer that > captures biosemi2ft's output? > > Best, > > Boris > > > On Wed, Jan 4, 2012 at 7:11 AM, Hamza Fawzi Altakroury (Student) > wrote: > > Hello, > > > > What is the best function for reading data from *.gdf file in Matlab > while > > "biosemi2ft" is running. > > > > Best > > > > -- > > Hamza Fawzi Altakroury > > Graduate student - MA > > Faculty of Engineering and Natural Sciences > > Sabancı University > > > > _______________________________________________ > > 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 -- Hamza Fawzi Altakroury Graduate student - MA Faculty of Engineering and Natural Sciences Sabancı University -------------- next part -------------- An HTML attachment was scrubbed... URL: From b.reuderink at donders.ru.nl Wed Jan 4 12:13:07 2012 From: b.reuderink at donders.ru.nl (Boris Reuderink) Date: Wed, 4 Jan 2012 12:13:07 +0100 Subject: [FieldTrip] Reading data while biosemi2ft is running In-Reply-To: References: Message-ID: Then I would definitely recommend to read form the buffer, and not from a file that is being written to disk. Maybe you can find some pointers on this wiki page: http://fieldtrip.fcdonders.nl/getting_started/realtime ? Best regards, Boris On Wed, Jan 4, 2012 at 8:13 AM, Hamza Fawzi Altakroury (Student) wrote: > Hello, > > I am trying to do online processing, where the biosemi2ft captures the data > puts it in a gdf file, and a function in Matlab reads the file continuously > and process it. > > Or do you recommend me to use another way for online processing? > > Best > > > On Wed, Jan 4, 2012 at 8:54 AM, Boris Reuderink > wrote: >> >> Hi, >> >> What exactly are you trying to achieve by reading from the .gdf file >> being written? > > >> >> Can't you connect the the FieldTrip buffer that >> captures biosemi2ft's output? >> >> Best, >> >> Boris >> >> >> On Wed, Jan 4, 2012 at 7:11 AM, Hamza Fawzi Altakroury (Student) >> wrote: >> > Hello, >> > >> > What is the best function for reading data from *.gdf file in Matlab >> > while >> > "biosemi2ft" is running. >> > >> > Best >> > >> > -- >> > Hamza Fawzi Altakroury >> > Graduate student - MA >> > Faculty of Engineering and Natural Sciences >> > Sabancı University >> > >> > _______________________________________________ >> > 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 > > > > > -- > Hamza Fawzi Altakroury > Graduate student - MA > Faculty of Engineering and Natural Sciences > Sabancı University > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip From lihqih at gmail.com Wed Jan 4 16:52:30 2012 From: lihqih at gmail.com (qi li) Date: Wed, 4 Jan 2012 10:52:30 -0500 Subject: [FieldTrip] artifact rejection Message-ID: Hi, I am confused about the plot of the z-score and 'most contribute' channel trial plot in the automatic artifact rejection tutorial. The z-score formula provided in the tutorial is linear to the time course of a particular channel of a specific trial, but the two plots don't look alike. ICA in the tutorial only applies to ECG, can it be applied to remove eye blink and other known artifacts instead of rejecting trials. Thanks! Qi -------------- next part -------------- An HTML attachment was scrubbed... URL: From jm.horschig at donders.ru.nl Thu Jan 5 09:20:25 2012 From: jm.horschig at donders.ru.nl (=?ISO-8859-1?Q?=22J=F6rn_M=2E_Horschig=22?=) Date: Thu, 05 Jan 2012 09:20:25 +0100 Subject: [FieldTrip] artifact rejection In-Reply-To: References: Message-ID: <4F055D49.4020401@donders.ru.nl> Dear Qi, Though I am not sure to what z-score formula you are referring to, I guess you are talking about the 'summary' mode of ft_rejectvisual. Z-scores are computed in different ways here, once across channels and once across time, leading to two different plots. The third plot is an accumulated plot of these two, where colors indicate the strength of the selected measure (e.g. z-score). Thus, in terms of the z-score formula, it is once computed with the average and standard deviation across the time-dimension per channel and once across the channel-dimension per time bin. I hope this clarifies why the two plots don't show the same. ICA can also be applied to eye blinks, for which an example is given in the "Walkthrough" http://fieldtrip.fcdonders.nl/walkthrough#using_ica_for_eye_artifact_removal And of course, ICA can be used for anything else you believe in (e.g. look for papers by Makeig) Best, Jörn On 1/4/2012 4:52 PM, qi li wrote: > Hi, > > I am confused about the plot of the z-score and 'most contribute' > channel trial plot in the automatic artifact rejection tutorial. The > z-score formula provided in the tutorial is linear to the time course > of a particular channel of a specific trial, but the two plots don't > look alike. > > ICA in the tutorial only applies to ECG, can it be applied to remove > eye blink and other known artifacts instead of rejecting trials. > > Thanks! > > Qi > > > > > _______________________________________________ > 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 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 b.reuderink at donders.ru.nl Thu Jan 5 12:19:29 2012 From: b.reuderink at donders.ru.nl (Boris Reuderink) Date: Thu, 5 Jan 2012 12:19:29 +0100 Subject: [FieldTrip] Trigger values in data matrix In-Reply-To: References: Message-ID: Dear Hamza, Could you elaborate on what you mean here? Could you perhaps provide some context, and a minimal working example? Best, Boris On Sunday, December 25, 2011, Hamza Fawzi Altakroury (Student) wrote: > Hello, > > I can't get the real trigger values if use sopen function (or > ft_read_data), even after adding the min value -1.7281e+009 to get a > positive values. > > Note: I plotted the triggers and their proportion is right but I can't get > their exact values, what should I do. > > Best, > > -- > Hamza Fawzi Altakroury > Graduate student - MA > Faculty of Engineering and Natural Sciences > Sabancı University > -------------- next part -------------- An HTML attachment was scrubbed... URL: From jan.schoffelen at donders.ru.nl Thu Jan 5 12:36:05 2012 From: jan.schoffelen at donders.ru.nl (jan-mathijs schoffelen) Date: Thu, 5 Jan 2012 12:36:05 +0100 Subject: [FieldTrip] ft_headmodelplot coordinate system origin problem In-Reply-To: References: <321B871E-53E2-43D8-B397-EA9C73C8B32C@donders.ru.nl> <76760214-3081-465C-8AFB-3E3A52A53C24@donders.ru.nl> <1F5462DE-0087-4F8A-AD1B-62B2A334E5FF@donders.ru.nl> Message-ID: <0F50C0B9-135D-49BA-8024-FD8DC15C0C90@donders.ru.nl> Hi Ion, Did you use the mri with the correct coordinate system (i.e. MEG-based) for the interpolation? JM On Jan 3, 2012, at 2:22 PM, Ion Lavado wrote: > Thank you very much Jan! Now everything fits using ft_headmodelplot(cfg). You solved our problem of the week. > > Just one final problem we have: > > - we are doing the beamformig source analisys. > > - our vol, grid and grad fits ok. > > -we have the sourcePre = ft_sourceanalysis(cfg, freqPre); > sourcePost = ft_sourceanalysis(cfg, freqPost); > > -we then interpolate the data with > > cfg = []; > cfg.downsample = 2; > sourcePostInt = ft_sourceinterpolate(cfg, sourcePost , mri_real); > > - finally we use method SLICE to plot the results: (WITH MRI_REAL) > > %METHOD SLICE: > sourceDiff = sourcePost; > sourceDiff.avg.pow = (sourcePost.avg.pow - sourcePre.avg.pow) ./ sourcePre.avg.pow; > cfg = [] > cfg.downsample = 2; > sourceDiffInt = ft_sourceinterpolate(cfg, sourceDiff , mri_real); > cfg = []; > cfg.method = 'slice'; > cfg.interactive = 'yes'; > cfg.funparameter = 'avg.pow'; > cfg.maskparameter = cfg.funparameter; > cfg.funcolorlim = [0 2]; > cfg.opacitylim = [0 2]; > cfg.opacitymap = 'rampup'; > figure('Name', 'SLICE Method') > ft_sourceplot(cfg, sourceDiffInt); > > > The problem comes now (not before), that when plotting the result don't fit the mri in the figure. I send you the .jpg so you can see it and try to help us whith this FINAL problem! In the script i send you, the problem i think starts after line 156. > > You are really kind, and thank you very much for your usefull help. > > Ion > > > > > > > > > 2012/1/3 jan-mathijs schoffelen > Hi Ion, > > If the positive z-axis (denoted by +Z in the figure that is created by ft_determine_coordsys) is not pointing to the top of the head you made an error in ft_volumerealign and probably exchanged left with right in setting the lpa and rpa locations. This results in the coordinate system being a left-handed one and causes all kind of trouble later on. If this is the case, you need to repeat ft_volumerealign (with the original MRI) and type 'l' where you typed 'r', and the other way around. Ft_volumesegment relies on spm for the segmentation, which relies on the mri-data being defined in a meaningful right-handed coordinate system (which can be either mni-based, or MEG system based). > > If however the +Z is just pointing downward but the anatomy is 'upside-down' (neck pointing to the ceiling) then the coordinate system is a valid, i.e. a right-handed RAS (right-anterior-superior) coordinate system. If this is the case then I wouldn't know what's going on, because I would suspect that ft_volumesegment Perhaps some other neuromag aficionados could jump to the rescue here? > > As such ft_determine_coordsys does not change the coordinate system of your mri, it just changes the coordsys field, which helps FieldTrip in the interpretation of the real-world coordinates. The mapping of voxel locations to real-world locations is defined by mri.transform which can be changed by ft_volumerealign. > > Best wishes, > > JM > > > On Jan 3, 2012, at 1:20 PM, Ion Lavado wrote: > >> The Z axis is pointing to the oposite direction (inferior), so i have the mri upside down. How can i change this? When Matlab plots the figure it asks me this: >> >> The positive x-axis is pointing towards the right >> The positive y-axis is pointing towards anterior >> The positive z-axis is pointing towards superior >> Do you want to change the anatomical labels for the axes [y, N]? >> >> I then mark to change the axis and mark the positive z-axis as (i)inferior, but when plotting again is as the begginig... What do i have to do? >> >> Thank you very much Jan. >> >> >> >> 2012/1/3 jan-mathijs schoffelen >> Hi Ion, >> >> I'd suggest first to have a look at mri_real. How does it look in ft_determine_coordsys? >> In particular, is the z-axis pointing in the correct direction? >> >> JM >> >> >> On Jan 3, 2012, at 12:45 PM, Ion Lavado wrote: >> >>> Hi Jan, >>> I am sorry, I have been trying with your method but now what is incorrect is the segmentation. >>> Here is the script. Maybe you understand better the problem...I am getting crazy. The problem comes from line 53 >>> Thank you very much, >>> Best, >>> Ion >>> >>> >>> >>> 2012/1/3 jan-mathijs schoffelen >>> Hi Ion, >>> >>> What is the coordinate system in which the vol and mri are defined? To me it does not look like the neuromag coordinate system, but rather like MNI-space. I would expect the origin to be a bit (~4 cm) lower and a bit more anterior (because the origin is defined on the line going through the pre-auricular points. In the 'vol.jpg' it seems that the origin is in the anterior commissure. Although in principle it shouldn't matter, it is convention to express the coordinates in the MEG-system's coordinate system, i.e. in neuromag space in this case. Therefore I would say that the vol and grid variables need to be adjusted, rather than the sensor positions. As mentioned in my previoius message, this can be achieved by coregistering the anatomy to the neuromag coordinate system using ft_volumerealign. You need to manually identify the locations of the fiducials that define the coordinate system, i.e. the nasion, lpa and rpa. The required cfg is: cfg.interactive = 'yes', cfg.coordsys = 'neuromag'. Once the anatomy is coregistered you can proceed with creating the vol and grid variables. >>> >>> Best, >>> >>> Jan-Mathijs >>> >>> >>> On Jan 3, 2012, at 11:38 AM, Ion Lavado wrote: >>> >>>> Thank you for your help Jan. I tried all you told but i continue with my problem. The coordinates for the head (volume) and mri are the same, with the function ft_determine_coordsys i see this. >>>> I think that the problem is about the sensor (helmet) origin of coordinates. Please see the images i adjunt here, the sensors origin is very low(nearly out of the helmet) and when ploting everything i suppose that every origin align to each other, so that the brain comes a little bit low. >>>> >>>> Best whishes, >>>> >>>> Ion >>>> >>>> 2012/1/2 jan-mathijs schoffelen >>>> Dear Ion, >>>> >>>> Are you sure that the sensor positions are defined in the same coordinate system as are the volume conductor model and the source positions? If not, then this is the likely cause of the shift. You can have a look here for more information about the different coordinate systems: http://fieldtrip.fcdonders.nl/faq/how_are_the_different_head_and_mri_coordinate_systems_defined >>>> >>>> In order to coregister the anatomical mri to the sensor array, you can use ft_volumerealign. >>>> >>>> Best wishes, >>>> >>>> Jan-Mathijs >>>> >>>> >>>> On Jan 2, 2012, at 5:11 PM, Ion Lavado wrote: >>>> >>>>> Hello, i'm working with MEG data from Elekta Neuromag. My problem comes when i try to plot the headmodel with the function ft_headmodelplot(cfg). This should plot the head model(volume) + brain grid + sensors. As you can see in the adjunted image, my head volume and grid is not centered and part of the head could not be read by the sensors. Is it possible to modify this so i can center the head in the sensors(helmet)? >>>>> Thank you very much. >>>>> >>>>> Ion Lavado >>>>> _______________________________________________ >>>>> 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 >>>> >>>> >>>> _______________________________________________ >>>> 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 >>> >>> >>> _______________________________________________ >>> 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 >> >> >> _______________________________________________ >> 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 > > > _______________________________________________ > 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 -------------- next part -------------- An HTML attachment was scrubbed... URL: From lihqih at gmail.com Thu Jan 5 14:30:22 2012 From: lihqih at gmail.com (qi li) Date: Thu, 5 Jan 2012 08:30:22 -0500 Subject: [FieldTrip] artifact rejection In-Reply-To: <4F055D49.4020401@donders.ru.nl> References: <4F055D49.4020401@donders.ru.nl> Message-ID: Hi Jörn, Thanks a lot! Now it makes sense to me. Best regards, Qi On Thu, Jan 5, 2012 at 3:20 AM, "Jörn M. Horschig" < jm.horschig at donders.ru.nl> wrote: > Dear Qi, > > Though I am not sure to what z-score formula you are referring to, I guess > you are talking about the 'summary' mode of ft_rejectvisual. Z-scores are > computed in different ways here, once across channels and once across time, > leading to two different plots. The third plot is an accumulated plot of > these two, where colors indicate the strength of the selected measure (e.g. > z-score). Thus, in terms of the z-score formula, it is once computed with > the average and standard deviation across the time-dimension per channel > and once across the channel-dimension per time bin. I hope this clarifies > why the two plots don't show the same. > > ICA can also be applied to eye blinks, for which an example is given in > the "Walkthrough" > > http://fieldtrip.fcdonders.nl/walkthrough#using_ica_for_eye_artifact_removal > > And of course, ICA can be used for anything else you believe in (e.g. look > for papers by Makeig) > > Best, > Jörn > > > On 1/4/2012 4:52 PM, qi li wrote: > > Hi, > > I am confused about the plot of the z-score and 'most contribute' channel > trial plot in the automatic artifact rejection tutorial. The z-score > formula provided in the tutorial is linear to the time course of a > particular channel of a specific trial, but the two plots don't look alike. > > ICA in the tutorial only applies to ECG, can it be applied to remove eye > blink and other known artifacts instead of rejecting trials. > > Thanks! > > Qi > > > > > _______________________________________________ > fieldtrip mailing listfieldtrip at donders.ru.nlhttp://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 > > 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 hamzaf at sabanciuniv.edu Thu Jan 5 15:14:00 2012 From: hamzaf at sabanciuniv.edu (Hamza Fawzi Altakroury (Student)) Date: Thu, 5 Jan 2012 16:14:00 +0200 Subject: [FieldTrip] Trigger values in data matrix In-Reply-To: References: Message-ID: Dear Boris I sent that email when I was trying to read from .gdf file (by sread) while it is acquiring the data through biosemi2ft. But it did not work. My question was if I do the following: >> H = sopen('test.gdf'); >> data = sread(H,2048); % I did not here 2048 sample I did not know why. >> data = data'; >> trig = data(1,:); % The status channel >> plot(trig) I am not going to get the trigger values that I desired. Best. On Thu, Jan 5, 2012 at 1:19 PM, Boris Reuderink wrote: > Dear Hamza, > > Could you elaborate on what you mean here? Could you perhaps provide some > context, and a minimal working example? > > Best, > > Boris > > On Sunday, December 25, 2011, Hamza Fawzi Altakroury (Student) wrote: > >> Hello, >> >> I can't get the real trigger values if use sopen function (or >> ft_read_data), even after adding the min value -1.7281e+009 to get a >> positive values. >> >> Note: I plotted the triggers and their proportion is right but I can't >> get their exact values, what should I do. >> >> Best, >> >> -- >> Hamza Fawzi Altakroury >> Graduate student - MA >> Faculty of Engineering and Natural Sciences >> Sabancı University >> > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > -- Hamza Fawzi Altakroury Graduate student - MA Faculty of Engineering and Natural Sciences Sabancı University -------------- next part -------------- An HTML attachment was scrubbed... URL: From b.reuderink at donders.ru.nl Thu Jan 5 15:30:14 2012 From: b.reuderink at donders.ru.nl (Boris Reuderink) Date: Thu, 5 Jan 2012 15:30:14 +0100 Subject: [FieldTrip] Trigger values in data matrix In-Reply-To: References: Message-ID: Dear Hamza, It seems that the sopen and sread functions are not part of the FieldTrip interface. Perhaps you could use ft_read_data [1]? Best, Boris [1] http://fieldtrip.fcdonders.nl/reference/ft_read_data On Thu, Jan 5, 2012 at 3:14 PM, Hamza Fawzi Altakroury (Student) wrote: > Dear Boris > > I sent that email when I was trying to read from .gdf file (by sread) while > it is acquiring the data through biosemi2ft. But it did not work. > > My question was if I do the following: > >>> H = sopen('test.gdf'); >>> data = sread(H,2048);     % I did not here 2048 sample I did not know >>> why. >>> data = data'; >>> trig = data(1,:);               % The status channel >>> plot(trig) > > I am not going to get the trigger values that I desired. > > Best. > > On Thu, Jan 5, 2012 at 1:19 PM, Boris Reuderink > wrote: >> >> Dear Hamza, >> >> Could you elaborate on what you mean here? Could you perhaps provide some >> context, and a minimal working example? >> >> Best, >> >> Boris >> >> On Sunday, December 25, 2011, Hamza Fawzi Altakroury (Student) wrote: >>> >>> Hello, >>> >>> I can't get the real trigger values if use sopen function (or >>> ft_read_data), even after adding the min value -1.7281e+009 to get a >>> positive values. >>> >>> Note: I plotted the triggers and their proportion is right but I can't >>> get their exact values, what should I do. >>> >>> Best, >>> >>> -- >>> Hamza Fawzi Altakroury >>> Graduate student - MA >>> Faculty of Engineering and Natural Sciences >>> Sabancı University >> >> >> _______________________________________________ >> fieldtrip mailing list >> fieldtrip at donders.ru.nl >> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > > > > -- > Hamza Fawzi Altakroury > Graduate student - MA > Faculty of Engineering and Natural Sciences > Sabancı University > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip From Don.Rojas at ucdenver.edu Fri Jan 6 22:12:15 2012 From: Don.Rojas at ucdenver.edu (Rojas, Don) Date: Fri, 6 Jan 2012 14:12:15 -0700 Subject: [FieldTrip] beamformer_sam lambda Message-ID: <6023196E-323C-45C6-BCB2-7CC16204E790@ucdenver.edu> To all, I encountered a problem with the 'sam' method for ft_sourceanalysis. It looks to me that when specifying the configuration option: cfg.sam.lambda = '5%'; i.e., lambda is a percentage, not an actual number, the beamformer_sam routine does not have comparable code as the beamformer_lcmv routine to handle that type of input. I'm wondering if simply inserting the following bit of code between lines 97 and 99 of beamformer_sam, borrowed and edited from beamformer_lcmv, will work: if ~isempty(lambda) && ischar(lambda) && lambda(end)=='%' ratio = sscanf(lambda, '%f%%'); ratio = ratio/100; lambda = ratio * trace(all_cov)/size(all_cov,1); end This seems to work okay in limited tests, but maybe I'm making a mistake here. I'm using a recent svn code version, revision 5097. Best, Don ----------------------- Don Rojas, Ph.D. Associate Professor of Psychiatry U. of Colorado Denver Anschutz Medical Campus Director, UCD Magnetoencephalography Lab 13001 E. 17th Pl F546 Aurora, CO 80045 303-724-4994 -------------- next part -------------- An HTML attachment was scrubbed... URL: From jan.schoffelen at donders.ru.nl Sat Jan 7 09:02:58 2012 From: jan.schoffelen at donders.ru.nl (jan-mathijs schoffelen) Date: Sat, 7 Jan 2012 09:02:58 +0100 Subject: [FieldTrip] beamformer_sam lambda In-Reply-To: <6023196E-323C-45C6-BCB2-7CC16204E790@ucdenver.edu> References: <6023196E-323C-45C6-BCB2-7CC16204E790@ucdenver.edu> Message-ID: <45341A04-A0B9-4717-8863-C13E47854226@donders.ru.nl> Dear Don, At first sight, this makes sense to me, also in the light of consistency across the different algorithms. I'll create a 'bug' out of this and we will discuss it in the group and most likely implement it. Thanks for the notification and best wishes, Jan-Mathijs On Jan 6, 2012, at 10:12 PM, Rojas, Don wrote: > To all, > > I encountered a problem with the 'sam' method for ft_sourceanalysis. It looks to me that when specifying the configuration option: > > cfg.sam.lambda = '5%'; > > i.e., lambda is a percentage, not an actual number, the beamformer_sam routine does not have comparable code as the beamformer_lcmv routine to handle that type of input. I'm wondering if simply inserting the following bit of code between lines 97 and 99 of beamformer_sam, borrowed and edited from beamformer_lcmv, will work: > > if ~isempty(lambda) && ischar(lambda) && lambda(end)=='%' > ratio = sscanf(lambda, '%f%%'); > ratio = ratio/100; > lambda = ratio * trace(all_cov)/size(all_cov,1); > end > > This seems to work okay in limited tests, but maybe I'm making a mistake here. I'm using a recent svn code version, revision 5097. > > Best, > > Don > > > ----------------------- > Don Rojas, Ph.D. > Associate Professor of Psychiatry > U. of Colorado Denver Anschutz Medical Campus > Director, UCD Magnetoencephalography Lab > 13001 E. 17th Pl F546 > Aurora, CO 80045 > 303-724-4994 > > _______________________________________________ > 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 -------------- next part -------------- An HTML attachment was scrubbed... URL: From drivolta81 at gmail.com Mon Jan 9 00:00:57 2012 From: drivolta81 at gmail.com (Davide) Date: Mon, 9 Jan 2012 00:00:57 +0100 Subject: [FieldTrip] Tms artifact removal from eeg data Message-ID: <22A7D4AE-B0CF-4222-BAA9-C44CF588697F@gmail.com> Dear all, I just wish to ask what is a good way to remove tms artifacts from eeg data using fieldtrip. The artifact lasts for around 4-8 ms after the tms pulse. Thanks for your help, Davide Sent from my iPad From mark.noordenbos at gmail.com Mon Jan 9 17:34:52 2012 From: mark.noordenbos at gmail.com (Mark Noordenbos) Date: Mon, 9 Jan 2012 17:34:52 +0100 Subject: [FieldTrip] Plotting mask using ft_singleplotER Message-ID: Hi Fieldtrippers, I was wondering if it is possible to plot a highlighted area under a curve using the 'mask' option of the function ft_singleplotER to indicate time intervals with significant effects. The mask structure was obtained from the timelockstatistics function. I try to plot the mask using the following code: cfgplot=[]; cfgplot.ylim = [-4 2]; cfgplot.maskparameter='mask'; ft_singleplotER(cfgplot, Data); The structure Data contains the following: label: {'Fz'} time: [1x101 double] individual: [1x101 double] dimord: 'chan_time' cfg: [1x1 struct] avg: [1x101 double] mask: [1x101 logical] This results in the following error: ??? Undefined function or variable 'xvector'. Error in ==> ft_singleplotER at 477 maskdatavector = reshape(mean(datmask,1), [1 numel(xvector)]); The variable xvector is not defined in ft_singleplotER. Replacing xvector with datmask, didn't helped. However, this resulted in another error: ??? Error using ==> ft_plot_vector at 105 the dimensions of the highlight should be identical to the dimensions of the data Error in ==> ft_singleplotER at 514 ft_plot_vector(xval, datavector, 'style', cfg.linestyle{i}, 'color', color, ... So my questions are: Is this the right function to highlight significant time intervals under a curve? And, if so, how to do this? Kind Regards, Mark -- Mark Noordenbos, MSc Radboud University Nijmegen Behavioural Science Institute P.O. Box 9104, Room A05.36 6500 HE Nijmegen The Netherlands Email: m.noordenbos at bsi.ru.nl Telephone: +31 24 3612070 Fax: +31 24 3616211 http://www.ru.nl -------------- next part -------------- An HTML attachment was scrubbed... URL: From l.verhagen at fcdonders.ru.nl Mon Jan 9 19:44:01 2012 From: l.verhagen at fcdonders.ru.nl (Verhagen, L. (Lennart)) Date: Mon, 9 Jan 2012 19:44:01 +0100 (CET) Subject: [FieldTrip] Tms artifact removal from eeg data In-Reply-To: <17641A8D-2EF2-4CF9-9A80-C23B43367011@donders.ru.nl> Message-ID: <150077787.882929.1326134641950.JavaMail.root@monoceros.zimbra.ru.nl> Dear Davide, Currently, there is no dedicated processing pipeline available in FieldTrip that will allow you to remove TMS artifacts from EEG data. However, I have been using FieldTrip to analyze TMS-EEG data for the past two years (with success), so I am happy to give you some advice. Please remember that the difference between "good" and "bad" TMS-EEG data will not be made by FieldTrip (or any other analysis package), but by your data acquisition. There are a number of artifacts which are dealt with in different ways: the pulse itself, clipping, ringing step-response of the op-amp, decay of the RC-circuit in the filters of the amplifier, decay of the scalp-electrolyte-electrode circuit, muscle twitch, TMS recharging artifact, auditory evoked response, somatosensory evoked response. 1. Pulse: The data during the pulse (e.g. 0.3 ms) is lost and cannot be recovered. 2. Clipping: Only the Nexstim amplifier is currently theoretically able to hold-and-clamp your data acquisition. In all other amplifiers the signal will go out-of-range ("clip") between 2-6 ms, depending on your setup. In this time-period, your data is lost. Some people like to interpolate their data over the missing values. I personally don't like that. 3. Following the clipping of the data your operational amplifier circuit will be subject to a step-response. This is a characteristic ringing artifact often lasting up to 10 ms. You can put a lot of effort in modeling this artifact (search for "Kalman filter"), but I personally have not seen any modeling/filtering that worked adequately. Therefore many people consider the first 8-10 ms following the TMS pulse as lost. Some interpolate, I replace the values by NaNs. 4. Decay step-response. You are very likely to also observe a decay artifact in some channels, resembling an exponential decay. This decay can last relatively long. In horrible cases even up to 1 second, but a decay lasting 50-150 ms is not uncommon. I have addressed this artifact by developing an constrained iterative fitting algorithm that is capable of modeling four additive exponential decays with different time constants. This worked reasonable well for my data, but has not been tested on data acquired in any other lab (or setup for that matter). If you are interested, and know what you are doing, I could share my code with you (ft_tms_fitexpstepresp). I plan to develop this code (and a tutorial TMS-EEG processing pipeline) together with other TMS-EEG experts at the Donders, into a tested set op mfiles, which will hopefully find their place in the FieldTrip distribution. 5. the muscle twitch is notorious and cannot be easily removed. 6. depending on your TMS machine, you can see a recharging artifact. Sometimes it can be horrendous, other times it is hardly visible or completely absent. The best way to deal with this artifact is to avoid it. Next to replacing values by NaNs and modeling artifacts, I have also used Independent Component Analysis to identify and remove artifacts. Please keep in mind that you can only use ICA if you have already attempted to clean up your data by all other means. TMS artifacts can be quite strong and show non-linear behavior. Therefore the independent components might be overloaded by the extreme variance provided by the TMS pulse alone. I hope I have helped you a bit further. I can imagine that you have more questions. If so, it would be great if you specify them clearly. I could fill a whole new paper will many little tips and tricks, but that would be utterly impractical. By the way, a TMS toolkit focusing on multi-modal TMS (strong emphasis on TMS-EEG) is likely to be organized by the Donders early this summer, so keep an eye out on this mailing list if you are interested. Cheers, Lennart. > From: Davide > Date: 9 January 2012 0:00:57 CET > To: "fieldtrip at donders.ru.nl" > Subject: [FieldTrip] Tms artifact removal from eeg data > Reply-To: Email discussion list for the FieldTrip project > > Dear all, > > I just wish to ask what is a good way to remove tms artifacts from eeg data using fieldtrip. > > The artifact lasts for around 4-8 ms after the tms pulse. > > Thanks for your help, > Davide From drivolta81 at gmail.com Tue Jan 10 10:59:01 2012 From: drivolta81 at gmail.com (Davide Rivolta) Date: Tue, 10 Jan 2012 10:59:01 +0100 Subject: [FieldTrip] Tms artifact removal from eeg data In-Reply-To: <150077787.882929.1326134641950.JavaMail.root@monoceros.zimbra.ru.nl> References: <17641A8D-2EF2-4CF9-9A80-C23B43367011@donders.ru.nl> <150077787.882929.1326134641950.JavaMail.root@monoceros.zimbra.ru.nl> Message-ID: Dear Lennart, Thank you for your reply. It is really useful. Let me play a bit with it and will let you know if I have further problems. Thanks again, Davide On Mon, Jan 9, 2012 at 7:44 PM, Verhagen, L. (Lennart) < l.verhagen at fcdonders.ru.nl> wrote: > Dear Davide, > > Currently, there is no dedicated processing pipeline available in > FieldTrip that will allow you to remove TMS artifacts from EEG data. > However, I have been using FieldTrip to analyze TMS-EEG data for the past > two years (with success), so I am happy to give you some advice. > > Please remember that the difference between "good" and "bad" TMS-EEG data > will not be made by FieldTrip (or any other analysis package), but by your > data acquisition. > > There are a number of artifacts which are dealt with in different ways: > the pulse itself, clipping, ringing step-response of the op-amp, decay of > the RC-circuit in the filters of the amplifier, decay of the > scalp-electrolyte-electrode circuit, muscle twitch, TMS recharging > artifact, auditory evoked response, somatosensory evoked response. > > 1. Pulse: The data during the pulse (e.g. 0.3 ms) is lost and cannot be > recovered. > 2. Clipping: Only the Nexstim amplifier is currently theoretically able to > hold-and-clamp your data acquisition. In all other amplifiers the signal > will go out-of-range ("clip") between 2-6 ms, depending on your setup. In > this time-period, your data is lost. Some people like to interpolate their > data over the missing values. I personally don't like that. > 3. Following the clipping of the data your operational amplifier circuit > will be subject to a step-response. This is a characteristic ringing > artifact often lasting up to 10 ms. You can put a lot of effort in > modeling this artifact (search for "Kalman filter"), but I personally have > not seen any modeling/filtering that worked adequately. Therefore many > people consider the first 8-10 ms following the TMS pulse as lost. Some > interpolate, I replace the values by NaNs. > 4. Decay step-response. You are very likely to also observe a decay > artifact in some channels, resembling an exponential decay. This decay can > last relatively long. In horrible cases even up to 1 second, but a decay > lasting 50-150 ms is not uncommon. I have addressed this artifact by > developing an constrained iterative fitting algorithm that is capable of > modeling four additive exponential decays with different time constants. > This worked reasonable well for my data, but has not been tested on data > acquired in any other lab (or setup for that matter). If you are > interested, and know what you are doing, I could share my code with you > (ft_tms_fitexpstepresp). I plan to develop this code (and a tutorial > TMS-EEG processing pipeline) together with other TMS-EEG experts at the > Donders, into a tested set op mfiles, which will hopefully find their > place in the FieldTrip distribution. > 5. the muscle twitch is notorious and cannot be easily removed. > 6. depending on your TMS machine, you can see a recharging artifact. > Sometimes it can be horrendous, other times it is hardly visible or > completely absent. The best way to deal with this artifact is to avoid it. > > Next to replacing values by NaNs and modeling artifacts, I have also used > Independent Component Analysis to identify and remove artifacts. Please > keep in mind that you can only use ICA if you have already attempted to > clean up your data by all other means. TMS artifacts can be quite strong > and show non-linear behavior. Therefore the independent components might > be overloaded by the extreme variance provided by the TMS pulse alone. > > I hope I have helped you a bit further. I can imagine that you have more > questions. If so, it would be great if you specify them clearly. I could > fill a whole new paper will many little tips and tricks, but that would be > utterly impractical. By the way, a TMS toolkit focusing on multi-modal TMS > (strong emphasis on TMS-EEG) is likely to be organized by the Donders > early this summer, so keep an eye out on this mailing list if you are > interested. > > Cheers, > Lennart. > > > > From: Davide > > Date: 9 January 2012 0:00:57 CET > > To: "fieldtrip at donders.ru.nl" > > Subject: [FieldTrip] Tms artifact removal from eeg data > > Reply-To: Email discussion list for the FieldTrip project > > > > > Dear all, > > > > I just wish to ask what is a good way to remove tms artifacts from eeg > data using fieldtrip. > > > > The artifact lasts for around 4-8 ms after the tms pulse. > > > > Thanks for your help, > > Davide > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > -- Davide Rivolta, PhD -------------- next part -------------- An HTML attachment was scrubbed... URL: From ole.jensen at donders.ru.nl Tue Jan 10 11:23:53 2012 From: ole.jensen at donders.ru.nl (Ole Jensen) Date: Tue, 10 Jan 2012 11:23:53 +0100 Subject: [FieldTrip] Data Analysis Competition at Biomag2012 Message-ID: <4F0C11B9.9050806@donders.ru.nl> Dear colleagues, We are happy to announce the 'Biomag2012 analysis competition'. Please consider participating or encourage students, postdocs and colleagues to take part. See below for details. Best regards, Ole Jensen and Ali Bahramisharif ------ *Biomag2012 analysis competition - distributed representations *The decoding of mental states and neuronal representations from brain imaging data is a research field in rapid development (Spiers HJ, Maguire EA. Decoding human brain activity during real-world experiences. Trends Cogn Sci. 2007 ; Haynes JD, Rees G. Decoding mental states from brain activity in humans. Nat Rev Neurosci. 2006). These decoding approaches have a great potential in MEG research where data are recorded from hundreds of sensors with a millisecond time resolution. In particular cognitive neuroscience could benefit from further development of decoding approaches in order to identify representational specific brain activity._ _The aims of the competition is to: * Promote the development and application of new multivariate analysis techniques for decoding of brain activity * Make the audience aware of novel approaches * Elucidate the pros and cons of different the techniques o Which assumptions are behind a given approach? o What are the limitations? * Attract signal-processing experts from outside the MEG field * Encourage a discussion on the cognitive insight which the techniques can bring about The deadline for submitting results is Aug 17, 2012 Link for details, data etc: http://www.biomag2012.org/content/data-analysis-competition -- Ole Jensen http://www.neuosc.com -------------- next part -------------- An HTML attachment was scrubbed... URL: From jan.schoffelen at donders.ru.nl Tue Jan 10 14:16:35 2012 From: jan.schoffelen at donders.ru.nl (jan-mathijs schoffelen) Date: Tue, 10 Jan 2012 14:16:35 +0100 Subject: [FieldTrip] change in default behavior spectral analysis functions Message-ID: Dear all, I would like to report a slight change in the default behavior of the spectral analysis routines (ft_freqanalysis, and the low level specest_XXX functions). I do not expect that this change has a major effect on your analysis results, but I want you to be aware of the change. The issue at hand is the way in which the low-level spectral analysis routines preprocess the data just prior to taking the fft, and it relates to the following FAQs: http://fieldtrip.fcdonders.nl/faq/why_does_my_tfr_look_strange http://fieldtrip.fcdonders.nl/faq/why_does_my_tfr_look_strange_part_ii As of revision 3752 of ft_freqanalysis (the version information of the function used to generate your data can be obtained from freq.cfg.version) we introduced a default preprocessing step, which entailed the fitting and subtraction of a first order polynome to the time-domain data, prior to fourier transformation. This step was intended to address both abovementioned FAQs, and removes the DC-component and the linear trend. However, after hot and lengthy discussions in the FieldTrip team we decided to change the default behavior into just removing the DC-component. This change will be effective as of revision 5106. Once again, I don't expect this change to have whopping effects on your results, e.g. all of a sudden losing significance or so. If it does, it warrants attention because something funny might be going on in the lower frequency components of your data. If you want to emulate the default behavior of ft_freqanalysis as it existed prior to revision 3752, you need to specify cfg.polyremoval = -1; If you want to emulate the default behavior of ft_freqanalysis as it existed between revision 3752 and revision 5106, you need to specify cfg.polyremoval = 1; The new default is now cfg.polyremoval = 0; Happy computing, Jan-Mathijs 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 From julian.keil at gmail.com Thu Jan 12 15:18:16 2012 From: julian.keil at gmail.com (Julian Keil) Date: Thu, 12 Jan 2012 15:18:16 +0100 Subject: [FieldTrip] Error loading 4D-data Message-ID: <3AF95F5C-5DBB-4BC4-A52A-72637306597C@gmail.com> Hi, I have an error loading a 4D-dataset: ??? SWITCH expression must be a scalar or string constant. Error in ==> read_4d_hdr at 60 switch format Error in ==> ft_read_header at 164 orig = read_4d_hdr(datafile); Error in ==> trialfun_general at 55 hdr = ft_read_header(cfg.headerfile, 'headerformat', cfg.headerformat); Error in ==> ft_definetrial at 166 [trl, event] = feval(cfg.trialfun, cfg); It looks like field trip can't open the header for the datafile as: K>> header.header_data ans = FileType: [] file_type: '' and: K>> header_end header_end = 581365760 K>> header_offset header_offset = 6.4740e+15 However, a dataset from the same subject recorded 5 minutes earlier could be loaded just fine. Does anyone have an idea what is wrong here and maybe how to fix it? Thanks a lot! Julian Dipl. Psych. Julian Keil OBOB-Lab University of Konstanz Department of Psychology P.O. Box D25 78457 Konstanz Germany Tel: ++49 - (0)7531 - 88 42 50 Fax: ++49 - (0)7531 - 88 28 91 Email: julian.keil at uni-konstanz.de Homepage: http://www.uni-konstanz.de/obob -------------- next part -------------- An HTML attachment was scrubbed... URL: From lihqih at gmail.com Thu Jan 12 17:20:24 2012 From: lihqih at gmail.com (qi li) Date: Thu, 12 Jan 2012 11:20:24 -0500 Subject: [FieldTrip] ft_redefinetrial problem Message-ID: Hi, I have a fixed length experiment raw. I apply ft_redefinetrial with cfg.trl to epoch it into many segments. When this step is done, the output.hdr.grad has different fields from the input field. More specifically the pnt and ori field are gone thus cause trouble for the later analysis.* *I am using 12/23 version, is there a bug or it is suppose to be so. If I only want to separate the long data into segments, which command can change only the time window while keeping all the other parameters unchanged? Thanks! Qi -------------- next part -------------- An HTML attachment was scrubbed... URL: From r.oostenveld at donders.ru.nl Thu Jan 12 18:11:36 2012 From: r.oostenveld at donders.ru.nl (Robert Oostenveld) Date: Thu, 12 Jan 2012 18:11:36 +0100 Subject: [FieldTrip] Trigger values in data matrix In-Reply-To: References: Message-ID: <4AD90687-0D23-437B-8388-B872DB82B8D3@donders.ru.nl> Dear Hamza, For the GDF format, the low-level reading function underneath ft_read_data uses the Biosig toolbox (which contains the sopen and sread function) as you already had figured out. The problem with biosig is that it does not have a consistent way of representing the events in a dataset for all data formats that it represents, so the general wrapper around it in fieldtrip cannot get the events. So in short: fieldtrip explicitely recognizes header+data+event, whereas biosig only has header+data as a consistent representaiton of the file content. In your gdf file there is probably a trigger or status channel, which can be used for flank detection. In ft_read_event around line 354 you see the relevant code, where the fieldtrip/fileio/private/read_trigger function is used to read the channel and detect the triggers. I can imagine that the calibration of the trigger/status channel is incorerct, resulting in values that are not integers (as you would expect on a trigger channel). We recently internally discussed the gdf writer linked to the biosemi2ft realtime application. It would be good to have more example data from another system. We don't have a biosemi system ourselves, but a collaborating group in Nijmegen (Peter Desain's lab) has one. They have not yet reported a problem like yours, but it would be good to check. Therefore I suggest that you report it as a bug on bugzilla.fcdonders.nl and upload a problematic example file (see http://fieldtrip.fcdonders.nl/faq/how_should_i_send_example_data_to_the_developers). best Robert On 5 Jan 2012, at 15:14, Hamza Fawzi Altakroury (Student) wrote: > Dear Boris > > I sent that email when I was trying to read from .gdf file (by sread) while it is acquiring the data through biosemi2ft. But it did not work. > > My question was if I do the following: > > >> H = sopen('test.gdf'); > >> data = sread(H,2048); % I did not here 2048 sample I did not know why. > >> data = data'; > >> trig = data(1,:); % The status channel > >> plot(trig) > > I am not going to get the trigger values that I desired. > > Best. > > On Thu, Jan 5, 2012 at 1:19 PM, Boris Reuderink wrote: > Dear Hamza, > > Could you elaborate on what you mean here? Could you perhaps provide some context, and a minimal working example? > > Best, > > Boris > > On Sunday, December 25, 2011, Hamza Fawzi Altakroury (Student) wrote: > Hello, > > I can't get the real trigger values if use sopen function (or ft_read_data), even after adding the min value -1.7281e+009 to get a positive values. > > Note: I plotted the triggers and their proportion is right but I can't get their exact values, what should I do. > > Best, > > -- > Hamza Fawzi Altakroury > Graduate student - MA > Faculty of Engineering and Natural Sciences > Sabancı University > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > > > -- > Hamza Fawzi Altakroury > Graduate student - MA > Faculty of Engineering and Natural Sciences > Sabancı University > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip From stephen.whitmarsh at gmail.com Thu Jan 12 18:30:34 2012 From: stephen.whitmarsh at gmail.com (Stephen Whitmarsh) Date: Thu, 12 Jan 2012 18:30:34 +0100 Subject: [FieldTrip] Trigger values in data matrix In-Reply-To: <4AD90687-0D23-437B-8388-B872DB82B8D3@donders.ru.nl> References: <4AD90687-0D23-437B-8388-B872DB82B8D3@donders.ru.nl> Message-ID: Dear Hamza, For what it's worth: I use Fieldtrip to read GDF data written bybiosemi2ft (64 channel EEG), in the lab Robert mentioned, in the followingway (after installing the biosig toolbox): event  = ft_read_event(cfg.dataset,'headerformat','gdf');value  = [event(find(strcmp('STATUS', {event.type}))).value]';sample = [event(find(strcmp('STATUS', {event.type}))).sample]'; All the best,Stephen On 12 January 2012 18:11, Robert Oostenveld wrote: > Dear Hamza, > > For the GDF format, the low-level reading function underneath ft_read_data uses the Biosig toolbox (which contains the sopen and sread function) as you already had figured out. The problem with biosig is that it does not have a consistent way of representing the events in a dataset for all data formats that it represents, so the general wrapper around it in fieldtrip cannot get the events. So in short: fieldtrip explicitely recognizes header+data+event, whereas biosig only has header+data as a consistent representaiton of the file content. > > In your gdf file there is probably a trigger or status channel, which can be used for flank detection. In ft_read_event around line 354 you see the relevant code, where the fieldtrip/fileio/private/read_trigger function is used to read the channel and detect the triggers. I can imagine that the calibration of the trigger/status channel is incorerct, resulting in values that are not integers (as you would expect on a trigger channel). > > We recently internally discussed the gdf writer linked to the biosemi2ft realtime application. It would be good to have more example data from another system. We don't have a biosemi system ourselves, but a collaborating group in Nijmegen (Peter Desain's lab) has one. They have not yet reported a problem like yours, but it would be good to check. Therefore I suggest that you report it as a bug on bugzilla.fcdonders.nl and upload a problematic example file (see http://fieldtrip.fcdonders.nl/faq/how_should_i_send_example_data_to_the_developers). > > best > Robert > > > > > On 5 Jan 2012, at 15:14, Hamza Fawzi Altakroury (Student) wrote: > >> Dear Boris >> >> I sent that email when I was trying to read from .gdf file (by sread) while it is acquiring the data through biosemi2ft. But it did not work. >> >> My question was if I do the following: >> >> >> H = sopen('test.gdf'); >> >> data = sread(H,2048);     % I did not here 2048 sample I did not know why. >> >> data = data'; >> >> trig = data(1,:);               % The status channel >> >> plot(trig) >> >> I am not going to get the trigger values that I desired. >> >> Best. >> >> On Thu, Jan 5, 2012 at 1:19 PM, Boris Reuderink wrote: >> Dear Hamza, >> >> Could you elaborate on what you mean here? Could you perhaps provide some context, and a minimal working example? >> >> Best, >> >> Boris >> >> On Sunday, December 25, 2011, Hamza Fawzi Altakroury (Student) wrote: >> Hello, >> >> I can't get the real trigger values if use sopen function (or ft_read_data), even after adding the min value -1.7281e+009 to get a positive values. >> >> Note: I plotted the triggers and their proportion is right but I can't get their exact values, what should I do. >> >> Best, >> >> -- >> Hamza Fawzi Altakroury >> Graduate student - MA >> Faculty of Engineering and Natural Sciences >> Sabancı University >> >> _______________________________________________ >> fieldtrip mailing list >> fieldtrip at donders.ru.nl >> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip >> >> >> >> -- >> Hamza Fawzi Altakroury >> Graduate student - MA >> Faculty of Engineering and Natural Sciences >> Sabancı University >> _______________________________________________ >> 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 From nathanweisz at mac.com Thu Jan 12 22:02:19 2012 From: nathanweisz at mac.com (Nathan Weisz) Date: Thu, 12 Jan 2012 22:02:19 +0100 Subject: [FieldTrip] ft_redefinetrial problem In-Reply-To: References: Message-ID: Hi Qi, providing some code, including some output may actually help … I am unaware of ft_redifinetrial altering the contents of your hdr field (i admit i have never paid attention to it), but even if it did how does this affect your subsequent analysis steps? e.g. at least to my knowledge, FT looks for data.grad (instead of data.hdr.grad) e.g. for plotting, source analysis etc. so if you add your grad info via ft_read_sens, then everything should be fine … otherwise, if the original hdr content is so important, then save it as a temporary variable and add it to your redefined trial later. but perhaps i have totally misunderstood your problem. in that case see introductory remark on code. good luck, n On 12.01.2012, at 17:20, qi li wrote: > Hi, > > I have a fixed length experiment raw. I apply ft_redefinetrial with cfg.trl to epoch it into many segments. When this step is done, the output.hdr.grad has different fields from the input field. More specifically the pnt and ori field are gone thus cause trouble for the later analysis. I am using 12/23 version, is there a bug or it is suppose to be so. > > If I only want to separate the long data into segments, which command can change only the time window while keeping all the other parameters unchanged? > > Thanks! > > Qi > > > _______________________________________________ > 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 Jan 12 22:09:51 2012 From: jan.schoffelen at donders.ru.nl (jan-mathijs schoffelen) Date: Thu, 12 Jan 2012 22:09:51 +0100 Subject: [FieldTrip] ft_redefinetrial problem In-Reply-To: References: Message-ID: <40F79FF9-A96B-4AEC-97FD-5C78BAC8377B@donders.ru.nl> Hi guys, I agree with Nathan that some additional information would be helpful. The 'problem' Qi relates to (at least the issue with the hdr.grad) is a change in the way the sensor-array is defined in FT. A while ago we changed the .pnt/.ori naming scheme into .chanpos/.coilpos/.coilori to make the distinction between channels and coils more transparent. There is a thread on this mailing list about it and more documentation can be found on: http://fieldtrip.fcdonders.nl/faq/how_are_electrodes_magnetometers_or_gradiometers_described In general this change should not affect your analysis, unless you are relying on outdated code, or custom-written code which expects the .pnt/.ori fields still to be present. If you want to chop up your data into short fixed length segment, you should use ft_redefinetrial with the options: cfg.length and cfg.overlap. BW, JM On Jan 12, 2012, at 10:02 PM, Nathan Weisz wrote: > Hi Qi, > > providing some code, including some output may actually help … > > I am unaware of ft_redifinetrial altering the contents of your hdr field (i admit i have never paid attention to it), but even if it did how does this affect your subsequent analysis steps? e.g. at least to my knowledge, FT looks for data.grad (instead of data.hdr.grad) e.g. for plotting, source analysis etc. so if you add your grad info via ft_read_sens, then everything should be fine … > > otherwise, if the original hdr content is so important, then save it as a temporary variable and add it to your redefined trial later. > > but perhaps i have totally misunderstood your problem. in that case see introductory remark on code. > > good luck, > n > > On 12.01.2012, at 17:20, qi li wrote: > >> Hi, >> >> I have a fixed length experiment raw. I apply ft_redefinetrial with cfg.trl to epoch it into many segments. When this step is done, the output.hdr.grad has different fields from the input field. More specifically the pnt and ori field are gone thus cause trouble for the later analysis. I am using 12/23 version, is there a bug or it is suppose to be so. >> >> If I only want to separate the long data into segments, which command can change only the time window while keeping all the other parameters unchanged? >> >> Thanks! >> >> Qi >> >> >> _______________________________________________ >> 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 -------------- next part -------------- An HTML attachment was scrubbed... URL: From shhirano at npsych.med.kyushu-u.ac.jp Fri Jan 13 02:49:06 2012 From: shhirano at npsych.med.kyushu-u.ac.jp (=?iso-2022-jp?B?GyRCSj9MbhsoQiAbJEI+PDhjGyhC?=) Date: Fri, 13 Jan 2012 10:49:06 +0900 Subject: [FieldTrip] How can I calculate phase locking factor in FieldTrip? Message-ID: <75DF5877-BB2D-4918-A4C0-2A66F7EDCF8E@npsych.med.kyushu-u.ac.jp> Hi everyone! I'm a FieldTrip beginner and I have a question. I'm sure I can estimate time frequency power with FieldTrip. But I don't know how I can estimate time-frequency phase locking factor. phase locking factor is defined as following equation. Phase-locking(t)=1/N x |Σz(t)|, where N is the number of epochs and z(t) refers to the continuous phase of a single trial. Here, z is a complex value on the unit circle, i.e., z=exp(jq), where q is the phase of an oscillation and j is the imaginary unit (e.g. Tallon-baudry et al., 1996). Does anyone know how to calculate this phase locking factor with FieldTrip? Any answer will help me. Best regards, Shogo Hirano Department of Neuropsychiatry Graduate school of medical sciences Kyushu University Fukuoka, Japan -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: SpamAssassinReport.txt URL: From lavado at gmail.com Fri Jan 13 10:00:17 2012 From: lavado at gmail.com (Ion Lavado) Date: Fri, 13 Jan 2012 10:00:17 +0100 Subject: [FieldTrip] Problem reading .mgz files Message-ID: Hello, i'm trying source reconstruction using Minimum-Norm Estimates and i have a problem when reading the (filled.mgz) or any other .mgz file after using Freesurfer and created the files. This is the ERROR i get: >> mri=ft_read_mri('F:\SUBJECT29_BUENO\Subject29\mri\filled.mgz'); The system cannot find the path specified. ERROR: could not open /tmp/tmp7914012.mgh for reading ERROR: loading F:\SUBJECT29_BUENO\Subject29\mri\filled.mgz as MGH ??? Attempt to reference field of non-structure array. Error in ==> ft_read_mri at 248 ndims = numel(size(tmp.vol)); Hope anyone can help me. Thanks! -------------- next part -------------- An HTML attachment was scrubbed... URL: From lavado at gmail.com Fri Jan 13 10:04:17 2012 From: lavado at gmail.com (Ion Lavado) Date: Fri, 13 Jan 2012 10:04:17 +0100 Subject: [FieldTrip] Problem reading .mgz files In-Reply-To: References: Message-ID: Forget to mention, after this commands on freesurfer: recon-all -talairach -subjid Subject01 recon-all -nuintensitycor -subjid Subject01 recon-all -normalization -subjid Subject01 cp T1.mgz brainmask.mgz recon-all -gcareg -subjid Subject01 recon-all -canorm -subjid Subject01 recon-all -careg -subjid Subject01 recon-all -calabel -subjid Subject01 recon-all -normalization2 -subjid Subject01 recon-all -segmentation -subjid Subject01 recon-all -fill -subjid Subject01 I have the mri folder with the tmp folder in it but it is empty... Thank you. 2012/1/13 Ion Lavado > Hello, i'm trying source reconstruction using Minimum-Norm Estimates and i > have a problem when reading the (filled.mgz) or any other .mgz file after > using Freesurfer and created the files. > This is the ERROR i get: > > > >> mri=ft_read_mri('F:\SUBJECT29_BUENO\Subject29\mri\filled.mgz'); > The system cannot find the path specified. > ERROR: could not open /tmp/tmp7914012.mgh for reading > ERROR: loading F:\SUBJECT29_BUENO\Subject29\mri\filled.mgz as MGH > ??? Attempt to reference field of non-structure array. > Error in ==> ft_read_mri at 248 > ndims = numel(size(tmp.vol)); > > Hope anyone can help me. Thanks! > -------------- next part -------------- An HTML attachment was scrubbed... URL: From jan.schoffelen at donders.ru.nl Fri Jan 13 10:34:05 2012 From: jan.schoffelen at donders.ru.nl (jan-mathijs schoffelen) Date: Fri, 13 Jan 2012 10:34:05 +0100 Subject: [FieldTrip] Problem reading .mgz files In-Reply-To: References: Message-ID: Hi Ion, What operating system are you working on? It looks like windows, and the first error is a path error, where the function is looking at a Linux-style path. This is apparently causing trouble. First you get two errors (starting with ERROR, which are a sign that something went wrong in the low level reading routines), which do not cause matlab to 'crash' directly. Later in the code variables are not what they are expected to be (due to the earlier ERRORs) and this causes a matlab crash (in red). So far this whole pipeline has been tested only on the linux platform. I don't know whether freesurfer (in particular the matlab functions that FieldTrip relies on to read in the .mgz files) runs without problems on windows. Perhaps you first need to find out what causes the first error. It could well be that FieldTrip needs to use a platform specific reading routine here. BW, JM On Jan 13, 2012, at 10:00 AM, Ion Lavado wrote: > Hello, i'm trying source reconstruction using Minimum-Norm Estimates and i have a problem when reading the (filled.mgz) or any other .mgz file after using Freesurfer and created the files. > This is the ERROR i get: > > > >> mri=ft_read_mri('F:\SUBJECT29_BUENO\Subject29\mri\filled.mgz'); > The system cannot find the path specified. > ERROR: could not open /tmp/tmp7914012.mgh for reading > ERROR: loading F:\SUBJECT29_BUENO\Subject29\mri\filled.mgz as MGH > ??? Attempt to reference field of non-structure array. > Error in ==> ft_read_mri at 248 > ndims = numel(size(tmp.vol)); > > Hope anyone can help me. Thanks! > _______________________________________________ > 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 -------------- next part -------------- An HTML attachment was scrubbed... URL: From jm.horschig at donders.ru.nl Fri Jan 13 10:48:56 2012 From: jm.horschig at donders.ru.nl (=?ISO-8859-1?Q?=22J=F6rn_M=2E_Horschig=22?=) Date: Fri, 13 Jan 2012 10:48:56 +0100 Subject: [FieldTrip] How can I calculate phase locking factor in FieldTrip? In-Reply-To: <75DF5877-BB2D-4918-A4C0-2A66F7EDCF8E@npsych.med.kyushu-u.ac.jp> References: <75DF5877-BB2D-4918-A4C0-2A66F7EDCF8E@npsych.med.kyushu-u.ac.jp> Message-ID: <4F0FFE08.4000004@donders.ru.nl> Dear Shogo, As far as I know, there is no built-in function to compute a phase-locking factor in FieldTrip, so I am afraid that you have to program this on your own. However, all values you need can be collected in FieldTrip. You can either apply a Hilbert transform on your data to obtain instanenous phase (set cfg.hilbert='yes' prior to calling /ft_preprocessing/) or get the phase information out from the fourierspectrum (cfg.output='fourier' prior to calling /ft_freqanalysis/). In both case, you should be able to get the phase out by calling the Matlab built-in function /angle()/. Computing the PLF should then be rather straight-forward. Also, maybe this can be of help: http://en.wikipedia.org/wiki/Von_Mises_distribution Hope this helps! Best, Jörn On 1/13/2012 2:49 AM, ?? ?? wrote: > Hi everyone! > > I'm a FieldTrip beginner and I have a question. > I'm sure I can estimate time frequency power with FieldTrip. > But I don't know how I can estimate time-frequency phase locking factor. > phase locking factor is defined as following equation. > Phase-locking(t)=1/N x |?z(t)|, where N is the number of epochs and z(t) refers to the continuous phase of a single trial. > Here, z is a complex value on the unit circle, i.e., z=exp(jq), where q is the phase of an oscillation and j is the imaginary unit (e.g. Tallon-baudry et al., 1996). > Does anyone know how to calculate this phase locking factor with FieldTrip? > Any answer will help me. > > Best regards, > > Shogo Hirano > > Department of Neuropsychiatry > Graduate school of medical sciences > Kyushu University > Fukuoka, Japan > > > _______________________________________________ > 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 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 lavado at gmail.com Fri Jan 13 11:07:46 2012 From: lavado at gmail.com (Ion Lavado) Date: Fri, 13 Jan 2012 11:07:46 +0100 Subject: [FieldTrip] Problem reading .mgz files In-Reply-To: References: Message-ID: Ok, i'm using Windows platform and Linux for generating the freesurfer mri (.mgz) files. So do you think the solution would be running the matlab script with Linux? Or what can i do to change the style path? Best wishes, Ion 2012/1/13 jan-mathijs schoffelen > Hi Ion, > > What operating system are you working on? It looks like windows, and the > first error is a path error, where the function is looking at a Linux-style > path. > > This is apparently causing trouble. First you get two errors (starting > with ERROR, which are a sign that something went wrong in the low level > reading routines), which do not cause matlab to 'crash' directly. Later in > the code variables are not what they are expected to be (due to the earlier > ERRORs) and this causes a matlab crash (in red). > > So far this whole pipeline has been tested only on the linux platform. I > don't know whether freesurfer (in particular the matlab functions that > FieldTrip relies on to read in the .mgz files) runs without problems on > windows. > Perhaps you first need to find out what causes the first error. It could > well be that FieldTrip needs to use a platform specific reading routine > here. > > BW, > > JM > > > > > On Jan 13, 2012, at 10:00 AM, Ion Lavado wrote: > > Hello, i'm trying source reconstruction using Minimum-Norm Estimates and i > have a problem when reading the (filled.mgz) or any other .mgz file after > using Freesurfer and created the files. > This is the ERROR i get: > > > >> mri=ft_read_mri('F:\SUBJECT29_BUENO\Subject29\mri\filled.mgz'); > The system cannot find the path specified. > ERROR: could not open /tmp/tmp7914012.mgh for reading > ERROR: loading F:\SUBJECT29_BUENO\Subject29\mri\filled.mgz as MGH > ??? Attempt to reference field of non-structure array. > Error in ==> ft_read_mri at 248 > ndims = numel(size(tmp.vol)); > > Hope anyone can help me. Thanks! > _______________________________________________ > 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 > > > _______________________________________________ > 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 Fri Jan 13 13:00:54 2012 From: jan.schoffelen at donders.ru.nl (jan-mathijs schoffelen) Date: Fri, 13 Jan 2012 13:00:54 +0100 Subject: [FieldTrip] Problem reading .mgz files In-Reply-To: References: Message-ID: Yes, please use linux. Lines 61-76 in read_mgh (which is in ~/fieldtrip/external/freesurfer) suggest that files with extension .mgz can only be read with linux or MacOS. BW, JM Line On Jan 13, 2012, at 11:07 AM, Ion Lavado wrote: > Ok, i'm using Windows platform and Linux for generating the freesurfer mri (.mgz) files. So do you think the solution would be running the matlab script with Linux? Or what can i do to change the style path? > > Best wishes, > > Ion > > 2012/1/13 jan-mathijs schoffelen > Hi Ion, > > What operating system are you working on? It looks like windows, and the first error is a path error, where the function is looking at a Linux-style path. > > This is apparently causing trouble. First you get two errors (starting with ERROR, which are a sign that something went wrong in the low level reading routines), which do not cause matlab to 'crash' directly. Later in the code variables are not what they are expected to be (due to the earlier ERRORs) and this causes a matlab crash (in red). > > So far this whole pipeline has been tested only on the linux platform. I don't know whether freesurfer (in particular the matlab functions that FieldTrip relies on to read in the .mgz files) runs without problems on windows. > Perhaps you first need to find out what causes the first error. It could well be that FieldTrip needs to use a platform specific reading routine here. > > BW, > > JM > > > > > On Jan 13, 2012, at 10:00 AM, Ion Lavado wrote: > >> Hello, i'm trying source reconstruction using Minimum-Norm Estimates and i have a problem when reading the (filled.mgz) or any other .mgz file after using Freesurfer and created the files. >> This is the ERROR i get: >> >> >> >> mri=ft_read_mri('F:\SUBJECT29_BUENO\Subject29\mri\filled.mgz'); >> The system cannot find the path specified. >> ERROR: could not open /tmp/tmp7914012.mgh for reading >> ERROR: loading F:\SUBJECT29_BUENO\Subject29\mri\filled.mgz as MGH >> ??? Attempt to reference field of non-structure array. >> Error in ==> ft_read_mri at 248 >> ndims = numel(size(tmp.vol)); >> >> Hope anyone can help me. Thanks! >> _______________________________________________ >> 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 > > > _______________________________________________ > 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 -------------- next part -------------- An HTML attachment was scrubbed... URL: From jan.schoffelen at donders.ru.nl Fri Jan 13 13:04:26 2012 From: jan.schoffelen at donders.ru.nl (jan-mathijs schoffelen) Date: Fri, 13 Jan 2012 13:04:26 +0100 Subject: [FieldTrip] Problem reading .mgz files In-Reply-To: References: Message-ID: Sorry, I meant load_mgh rather than read_mgh JM On Jan 13, 2012, at 1:00 PM, jan-mathijs schoffelen wrote: > Yes, please use linux. Lines 61-76 in read_mgh (which is in ~/fieldtrip/external/freesurfer) suggest that files with extension .mgz can only be read with linux or MacOS. > > BW, > > JM > > Line > > On Jan 13, 2012, at 11:07 AM, Ion Lavado wrote: > >> Ok, i'm using Windows platform and Linux for generating the freesurfer mri (.mgz) files. So do you think the solution would be running the matlab script with Linux? Or what can i do to change the style path? >> >> Best wishes, >> >> Ion >> >> 2012/1/13 jan-mathijs schoffelen >> Hi Ion, >> >> What operating system are you working on? It looks like windows, and the first error is a path error, where the function is looking at a Linux-style path. >> >> This is apparently causing trouble. First you get two errors (starting with ERROR, which are a sign that something went wrong in the low level reading routines), which do not cause matlab to 'crash' directly. Later in the code variables are not what they are expected to be (due to the earlier ERRORs) and this causes a matlab crash (in red). >> >> So far this whole pipeline has been tested only on the linux platform. I don't know whether freesurfer (in particular the matlab functions that FieldTrip relies on to read in the .mgz files) runs without problems on windows. >> Perhaps you first need to find out what causes the first error. It could well be that FieldTrip needs to use a platform specific reading routine here. >> >> BW, >> >> JM >> >> >> >> >> On Jan 13, 2012, at 10:00 AM, Ion Lavado wrote: >> >>> Hello, i'm trying source reconstruction using Minimum-Norm Estimates and i have a problem when reading the (filled.mgz) or any other .mgz file after using Freesurfer and created the files. >>> This is the ERROR i get: >>> >>> >>> >> mri=ft_read_mri('F:\SUBJECT29_BUENO\Subject29\mri\filled.mgz'); >>> The system cannot find the path specified. >>> ERROR: could not open /tmp/tmp7914012.mgh for reading >>> ERROR: loading F:\SUBJECT29_BUENO\Subject29\mri\filled.mgz as MGH >>> ??? Attempt to reference field of non-structure array. >>> Error in ==> ft_read_mri at 248 >>> ndims = numel(size(tmp.vol)); >>> >>> Hope anyone can help me. Thanks! >>> _______________________________________________ >>> 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 >> >> >> _______________________________________________ >> 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 > > _______________________________________________ > 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 -------------- next part -------------- An HTML attachment was scrubbed... URL: From lihqih at gmail.com Fri Jan 13 17:58:20 2012 From: lihqih at gmail.com (qi li) Date: Fri, 13 Jan 2012 11:58:20 -0500 Subject: [FieldTrip] ft_redefinetrial problem In-Reply-To: <40F79FF9-A96B-4AEC-97FD-5C78BAC8377B@donders.ru.nl> References: <40F79FF9-A96B-4AEC-97FD-5C78BAC8377B@donders.ru.nl> Message-ID: Hi All, Thanks a lot for your help! The codes look like this cfg=[]; cfg.trl=trial; %user defined 20*3 matrix triggered_trials=ft_redefinetrial(cfg,triggered_trials); cfg = []; cfg.method = 'triangulation'; cfg.neighbours = ft_neighbourselection(cfg, triggered_trials); The error message is 'sen.pnt' not found. I am using 1223 version. Qi On Thu, Jan 12, 2012 at 4:09 PM, jan-mathijs schoffelen < jan.schoffelen at donders.ru.nl> wrote: > Hi guys, > > I agree with Nathan that some additional information would be helpful. The > 'problem' Qi relates to (at least the issue with the hdr.grad) is a change > in the way the sensor-array is defined in FT. A while ago we changed the > .pnt/.ori naming scheme into .chanpos/.coilpos/.coilori to make the > distinction between channels and coils more transparent. There is a thread > on this mailing list about it and more documentation can be found on: > > > http://fieldtrip.fcdonders.nl/faq/how_are_electrodes_magnetometers_or_gradiometers_described > > In general this change should not affect your analysis, unless you are > relying on outdated code, or custom-written code which expects the > .pnt/.ori fields still to be present. > > If you want to chop up your data into short fixed length segment, you > should use ft_redefinetrial with the options: cfg.length and cfg.overlap. > > BW, > > JM > > On Jan 12, 2012, at 10:02 PM, Nathan Weisz wrote: > > Hi Qi, > > providing some code, including some output may actually help … > > I am unaware of ft_redifinetrial altering the contents of your hdr field > (i admit i have never paid attention to it), but even if it did how does > this affect your subsequent analysis steps? e.g. at least to my knowledge, > FT looks for data.grad (instead of data.hdr.grad) e.g. for plotting, source > analysis etc. so if you add your grad info via ft_read_sens, then > everything should be fine … > > otherwise, if the original hdr content is so important, then save it as a > temporary variable and add it to your redefined trial later. > > but perhaps i have totally misunderstood your problem. in that case see > introductory remark on code. > > good luck, > n > > On 12.01.2012, at 17:20, qi li wrote: > > Hi, > > I have a fixed length experiment raw. I apply ft_redefinetrial with > cfg.trl to epoch it into many segments. When this step is done, the > output.hdr.grad has different fields from the input field. More > specifically the pnt and ori field are gone thus cause trouble for the > later analysis.* *I am using 12/23 version, is there a bug or it is > suppose to be so. > > If I only want to separate the long data into segments, which command can > change only the time window while keeping all the other parameters > unchanged? > > Thanks! > > Qi > > > _______________________________________________ > 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 > > > _______________________________________________ > 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 Fri Jan 13 20:12:31 2012 From: jan.schoffelen at donders.ru.nl (jan-mathijs schoffelen) Date: Fri, 13 Jan 2012 20:12:31 +0100 Subject: [FieldTrip] ft_redefinetrial problem In-Reply-To: References: <40F79FF9-A96B-4AEC-97FD-5C78BAC8377B@donders.ru.nl> Message-ID: <440417D5-7D42-4203-92C2-4B1067C46AFE@donders.ru.nl> What is the stack of the error? I.e. in what line of what function (and calling functions) does it occur? Jan-Mathijs On Jan 13, 2012, at 5:58 PM, qi li wrote: > Hi All, > > Thanks a lot for your help! The codes look like this > > cfg=[]; > cfg.trl=trial; %user defined 20*3 matrix > triggered_trials=ft_redefinetrial(cfg,triggered_trials); > > > cfg = []; > cfg.method = 'triangulation'; > cfg.neighbours = ft_neighbourselection(cfg, triggered_trials); > > The error message is 'sen.pnt' not found. I am using 1223 version. > > Qi > > On Thu, Jan 12, 2012 at 4:09 PM, jan-mathijs schoffelen wrote: > Hi guys, > > I agree with Nathan that some additional information would be helpful. The 'problem' Qi relates to (at least the issue with the hdr.grad) is a change in the way the sensor-array is defined in FT. A while ago we changed the .pnt/.ori naming scheme into .chanpos/.coilpos/.coilori to make the distinction between channels and coils more transparent. There is a thread on this mailing list about it and more documentation can be found on: > > http://fieldtrip.fcdonders.nl/faq/how_are_electrodes_magnetometers_or_gradiometers_described > > In general this change should not affect your analysis, unless you are relying on outdated code, or custom-written code which expects the .pnt/.ori fields still to be present. > > If you want to chop up your data into short fixed length segment, you should use ft_redefinetrial with the options: cfg.length and cfg.overlap. > > BW, > > JM > > On Jan 12, 2012, at 10:02 PM, Nathan Weisz wrote: > >> Hi Qi, >> >> providing some code, including some output may actually help … >> >> I am unaware of ft_redifinetrial altering the contents of your hdr field (i admit i have never paid attention to it), but even if it did how does this affect your subsequent analysis steps? e.g. at least to my knowledge, FT looks for data.grad (instead of data.hdr.grad) e.g. for plotting, source analysis etc. so if you add your grad info via ft_read_sens, then everything should be fine … >> >> otherwise, if the original hdr content is so important, then save it as a temporary variable and add it to your redefined trial later. >> >> but perhaps i have totally misunderstood your problem. in that case see introductory remark on code. >> >> good luck, >> n >> >> On 12.01.2012, at 17:20, qi li wrote: >> >>> Hi, >>> >>> I have a fixed length experiment raw. I apply ft_redefinetrial with cfg.trl to epoch it into many segments. When this step is done, the output.hdr.grad has different fields from the input field. More specifically the pnt and ori field are gone thus cause trouble for the later analysis. I am using 12/23 version, is there a bug or it is suppose to be so. >>> >>> If I only want to separate the long data into segments, which command can change only the time window while keeping all the other parameters unchanged? >>> >>> Thanks! >>> >>> Qi >>> >>> >>> _______________________________________________ >>> 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 > > > _______________________________________________ > 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 -------------- next part -------------- An HTML attachment was scrubbed... URL: From lihqih at gmail.com Fri Jan 13 23:26:08 2012 From: lihqih at gmail.com (qi li) Date: Fri, 13 Jan 2012 17:26:08 -0500 Subject: [FieldTrip] ft_redefinetrial problem In-Reply-To: <440417D5-7D42-4203-92C2-4B1067C46AFE@donders.ru.nl> References: <40F79FF9-A96B-4AEC-97FD-5C78BAC8377B@donders.ru.nl> <440417D5-7D42-4203-92C2-4B1067C46AFE@donders.ru.nl> Message-ID: Hi Jan, FYI. The error message is as follows, the input is raw data with 275 channels and 16 trials Using the gradiometer configuration from the dataset. undoing the G3BR balancing Reference to non-existent field 'pnt'. Error in channelposition (line 234) pnt = sens.pnt; Error in ft_neighbourselection (line 110) [sens.pnt, sens.label] = channelposition(sens); Error in onetrialintotrials (line 100) cfg.neighbours = ft_neighbourselection(cfg, triggered_trials); Another similar problem arises when you have done PCA and want to remove some components. You command is as follows, cfg=[]; cfg.topo=comp.topo; cfg.topolabel=comp.topolabel; comp_o=ft_componentanalysis(cfg,data_I4); cfg=[]; cfg.component=[1]; data_I4c=ft_rejectcomponent(cfg,comp_o) Errors pop up, Reference to non-existent field 'invcomp'. Error in ft_rejectcomponent (line 181) [junk, remove] = match_str(comp.label, tmp.balance.invcomp.labelnew); Both error in 1223 version. I hope this information is useful. Thanks! Qi On Fri, Jan 13, 2012 at 2:12 PM, jan-mathijs schoffelen < jan.schoffelen at donders.ru.nl> wrote: > What is the stack of the error? I.e. in what line of what function (and > calling functions) does it occur? > > Jan-Mathijs > > On Jan 13, 2012, at 5:58 PM, qi li wrote: > > Hi All, > > Thanks a lot for your help! The codes look like this > > cfg=[]; > cfg.trl=trial; %user defined 20*3 matrix > triggered_trials=ft_redefinetrial(cfg,triggered_trials); > > > cfg = []; > cfg.method = 'triangulation'; > cfg.neighbours = ft_neighbourselection(cfg, triggered_trials); > > The error message is 'sen.pnt' not found. I am using 1223 version. > > Qi > > On Thu, Jan 12, 2012 at 4:09 PM, jan-mathijs schoffelen < > jan.schoffelen at donders.ru.nl> wrote: > >> Hi guys, >> >> I agree with Nathan that some additional information would be >> helpful. The 'problem' Qi relates to (at least the issue with the hdr.grad) >> is a change in the way the sensor-array is defined in FT. A while ago we >> changed the .pnt/.ori naming scheme into .chanpos/.coilpos/.coilori to make >> the distinction between channels and coils more transparent. There is a >> thread on this mailing list about it and more documentation can be found on: >> >> >> http://fieldtrip.fcdonders.nl/faq/how_are_electrodes_magnetometers_or_gradiometers_described >> >> In general this change should not affect your analysis, unless you are >> relying on outdated code, or custom-written code which expects the >> .pnt/.ori fields still to be present. >> >> If you want to chop up your data into short fixed length segment, you >> should use ft_redefinetrial with the options: cfg.length and cfg.overlap. >> >> BW, >> >> JM >> >> On Jan 12, 2012, at 10:02 PM, Nathan Weisz wrote: >> >> Hi Qi, >> >> providing some code, including some output may actually help … >> >> I am unaware of ft_redifinetrial altering the contents of your hdr field >> (i admit i have never paid attention to it), but even if it did how does >> this affect your subsequent analysis steps? e.g. at least to my knowledge, >> FT looks for data.grad (instead of data.hdr.grad) e.g. for plotting, source >> analysis etc. so if you add your grad info via ft_read_sens, then >> everything should be fine … >> >> otherwise, if the original hdr content is so important, then save it as a >> temporary variable and add it to your redefined trial later. >> >> but perhaps i have totally misunderstood your problem. in that case see >> introductory remark on code. >> >> good luck, >> n >> >> On 12.01.2012, at 17:20, qi li wrote: >> >> Hi, >> >> I have a fixed length experiment raw. I apply ft_redefinetrial with >> cfg.trl to epoch it into many segments. When this step is done, the >> output.hdr.grad has different fields from the input field. More >> specifically the pnt and ori field are gone thus cause trouble for the >> later analysis.* *I am using 12/23 version, is there a bug or it is >> suppose to be so. >> >> If I only want to separate the long data into segments, which command can >> change only the time window while keeping all the other parameters >> unchanged? >> >> Thanks! >> >> Qi >> >> >> _______________________________________________ >> 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 >> >> >> _______________________________________________ >> 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 > > > _______________________________________________ > 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 shhirano at npsych.med.kyushu-u.ac.jp Sat Jan 14 01:30:07 2012 From: shhirano at npsych.med.kyushu-u.ac.jp (=?iso-2022-jp?B?GyRCSj9MbhsoQiAbJEI+PDhjGyhC?=) Date: Sat, 14 Jan 2012 09:30:07 +0900 Subject: [FieldTrip] How can I calculate phase locking factor in FieldTrip? Message-ID: Dear Jörn Thank you for your wonderful advice! I'll try! Best regards, Shogo -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: SpamAssassinReport.txt URL: From jan.schoffelen at donders.ru.nl Sat Jan 14 09:10:13 2012 From: jan.schoffelen at donders.ru.nl (jan-mathijs schoffelen) Date: Sat, 14 Jan 2012 09:10:13 +0100 Subject: [FieldTrip] ft_redefinetrial problem In-Reply-To: References: <40F79FF9-A96B-4AEC-97FD-5C78BAC8377B@donders.ru.nl> <440417D5-7D42-4203-92C2-4B1067C46AFE@donders.ru.nl> Message-ID: <32B29B66-DFA7-4561-BB46-22A08F4E8542@donders.ru.nl> Hi Qi, Ft_neighbourselection has been changed since October 11. The version you are executing is therefore an old one and is not guaranteed to work. Please remove this version of ft_neighbourselection from your path, and try again. The correct version is in fieldtrip/compat/, and you will notice that this is just a backward compatibility wrapper that is pointing to the function ft_prepare_neighbours, which is the one you should actually use. Jan-Mathijs On Jan 13, 2012, at 11:26 PM, qi li wrote: > Hi Jan, > > FYI. The error message is as follows, > > the input is raw data with 275 channels and 16 trials > Using the gradiometer configuration from the dataset. > undoing the G3BR balancing > Reference to non-existent field 'pnt'. > > Error in channelposition (line 234) > pnt = sens.pnt; > > Error in ft_neighbourselection (line 110) > [sens.pnt, sens.label] = channelposition(sens); > > Error in onetrialintotrials (line 100) > cfg.neighbours = ft_neighbourselection(cfg, triggered_trials); > > Another similar problem arises when you have done PCA and want to remove some components. > > You command is as follows, > cfg=[]; > cfg.topo=comp.topo; > cfg.topolabel=comp.topolabel; > comp_o=ft_componentanalysis(cfg,data_I4); > cfg=[]; > cfg.component=[1]; > data_I4c=ft_rejectcomponent(cfg,comp_o) > > Errors pop up, > > Reference to non-existent field 'invcomp'. > > Error in ft_rejectcomponent (line 181) > [junk, remove] = match_str(comp.label, tmp.balance.invcomp.labelnew); > > Both error in 1223 version. > > I hope this information is useful. > > Thanks! > > Qi > > > > On Fri, Jan 13, 2012 at 2:12 PM, jan-mathijs schoffelen wrote: > What is the stack of the error? I.e. in what line of what function (and calling functions) does it occur? > > Jan-Mathijs > > On Jan 13, 2012, at 5:58 PM, qi li wrote: > >> Hi All, >> >> Thanks a lot for your help! The codes look like this >> >> cfg=[]; >> cfg.trl=trial; %user defined 20*3 matrix >> triggered_trials=ft_redefinetrial(cfg,triggered_trials); >> >> >> cfg = []; >> cfg.method = 'triangulation'; >> cfg.neighbours = ft_neighbourselection(cfg, triggered_trials); >> >> The error message is 'sen.pnt' not found. I am using 1223 version. >> >> Qi >> >> On Thu, Jan 12, 2012 at 4:09 PM, jan-mathijs schoffelen wrote: >> Hi guys, >> >> I agree with Nathan that some additional information would be helpful. The 'problem' Qi relates to (at least the issue with the hdr.grad) is a change in the way the sensor-array is defined in FT. A while ago we changed the .pnt/.ori naming scheme into .chanpos/.coilpos/.coilori to make the distinction between channels and coils more transparent. There is a thread on this mailing list about it and more documentation can be found on: >> >> http://fieldtrip.fcdonders.nl/faq/how_are_electrodes_magnetometers_or_gradiometers_described >> >> In general this change should not affect your analysis, unless you are relying on outdated code, or custom-written code which expects the .pnt/.ori fields still to be present. >> >> If you want to chop up your data into short fixed length segment, you should use ft_redefinetrial with the options: cfg.length and cfg.overlap. >> >> BW, >> >> JM >> >> On Jan 12, 2012, at 10:02 PM, Nathan Weisz wrote: >> >>> Hi Qi, >>> >>> providing some code, including some output may actually help … >>> >>> I am unaware of ft_redifinetrial altering the contents of your hdr field (i admit i have never paid attention to it), but even if it did how does this affect your subsequent analysis steps? e.g. at least to my knowledge, FT looks for data.grad (instead of data.hdr.grad) e.g. for plotting, source analysis etc. so if you add your grad info via ft_read_sens, then everything should be fine … >>> >>> otherwise, if the original hdr content is so important, then save it as a temporary variable and add it to your redefined trial later. >>> >>> but perhaps i have totally misunderstood your problem. in that case see introductory remark on code. >>> >>> good luck, >>> n >>> >>> On 12.01.2012, at 17:20, qi li wrote: >>> >>>> Hi, >>>> >>>> I have a fixed length experiment raw. I apply ft_redefinetrial with cfg.trl to epoch it into many segments. When this step is done, the output.hdr.grad has different fields from the input field. More specifically the pnt and ori field are gone thus cause trouble for the later analysis. I am using 12/23 version, is there a bug or it is suppose to be so. >>>> >>>> If I only want to separate the long data into segments, which command can change only the time window while keeping all the other parameters unchanged? >>>> >>>> Thanks! >>>> >>>> Qi >>>> >>>> >>>> _______________________________________________ >>>> 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 >> >> >> _______________________________________________ >> 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 > > > _______________________________________________ > 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 -------------- next part -------------- An HTML attachment was scrubbed... URL: From hamzaf at sabanciuniv.edu Fri Jan 13 15:44:12 2012 From: hamzaf at sabanciuniv.edu (Hamza Fawzi Altakroury (Student)) Date: Fri, 13 Jan 2012 16:44:12 +0200 Subject: [FieldTrip] Simple way to generate cfg Message-ID: Hello, I noticed that almost all your files require a cfg (a structure containing information about the buffer, as I understand). Is there any function to generate these cfg in a simple way. Best, Hamza -- Hamza Fawzi Altakroury Graduate student - MA Faculty of Engineering and Natural Sciences Sabancı University -------------- next part -------------- An HTML attachment was scrubbed... URL: From lihqih at gmail.com Sat Jan 14 18:09:20 2012 From: lihqih at gmail.com (qi li) Date: Sat, 14 Jan 2012 12:09:20 -0500 Subject: [FieldTrip] reject component Message-ID: Hi there, I am having trouble to reject components after ICA/PCA done. Can somebody help on this? My command is as follows, cfg=[]; cfg.topo=comp.topo; cfg.topolabel=comp.topolabel; comp_o=ft_componentanalysis(cfg,data_I4); cfg=[]; cfg.component=[1 3 7]; data_I4c=ft_rejectcomponent(cfg,comp_o) Errors pop up, Reference to non-existent field 'invcomp'. Error in ft_rejectcomponent (line 181) [junk, remove] = match_str(comp.label, tmp.balance.invcomp.labelnew); -------------- next part -------------- An HTML attachment was scrubbed... URL: From politzerahless at gmail.com Mon Jan 16 08:02:29 2012 From: politzerahless at gmail.com (Stephen Politzer-Ahles) Date: Mon, 16 Jan 2012 01:02:29 -0600 Subject: [FieldTrip] Simple way to generate cfg Message-ID: Hello Hamza, For many of the functions, the corresponding tutorial on the wiki has sample code, you can just copy and paste that code (along with the cfg) and edit whatever information you need. Even if there is no tutorial, all the functions have reference pages on the wiki (which you can find by searching for the name of the function) which list all the parameters you can use. If you don't need to specify any information for a particular function, you can create an 'empty' cfg by just typing cfg=[]; before the function. Best, Steve Politzer-Ahles Hello, > > I noticed that almost all your files require a cfg (a structure containing > information about the buffer, as I understand). > > Is there any function to generate these cfg in a simple way. > > Best, > > Hamza > > -- > Hamza Fawzi Altakroury > Graduate student - MA > Faculty of Engineering and Natural Sciences > Sabanc? University > -------------- next part -------------- An HTML attachment was scrubbed... URL: From f.barcelo at uib.es Mon Jan 16 18:21:50 2012 From: f.barcelo at uib.es (Francisco Barcelo) Date: Mon, 16 Jan 2012 18:21:50 +0100 Subject: [FieldTrip] PhD and postdoctoral positions in cognitive electrophysiology in Majorca Message-ID: Dear colleagues, We are looking for a postdoc and a PhD student with EEG or MEG experience to work here in Majorca (pdf files attached). More info at: www.mcst.es With regards, Francisco Barceló -- ><><><><><><><><><><><><><>< Dr. Francisco Barceló Ed. Beatriu de Pinos #12 University of Illes Balears (UIB) Ctra. Valldemossa, km 7.5 E-07122 Palma de Mallorca - Spain Personal: www.mcst.es Lab: www.neuropsicologiaclinica.es Phone: 971 172750 Fax: 971 172309 ResearchID http://www.researcherid.com/rid/B-3629-2011 Job opportunities in Cognitive Neuroscience ><><><><><><><><><><><><><>< -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: ad_postdoc_cognitive_neuroscience.pdf Type: application/pdf Size: 73442 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: ad_PhD_cognitive_neuroscience.pdf Type: application/pdf Size: 72974 bytes Desc: not available URL: From sangita.dandekar at gmail.com Tue Jan 17 19:56:53 2012 From: sangita.dandekar at gmail.com (Sangita Dandekar) Date: Tue, 17 Jan 2012 13:56:53 -0500 Subject: [FieldTrip] non-parametric methods for comparison of power spectra Message-ID: Dear Fieldtrippers, Forgive me if I have overlooked something in the FT documentation, but I was wondering if there are any non-parametric methods for comparison of power spectra in Fieldtrip? When I say 'power spectra' I mean frequency vs power spectrum data without a time component (i.e. not the TFR data structures in Fieldtrip, but what one would get by applying an FFT to a time series and finding the magnitude of the power spectrum as a function of frequency). One (clumsy) way to do this would be to use the framework of FT's timelockstatistics function, but instead of entering channel x time x voltage data for each trial, use channel x frequency x power data for each trial. I think the above should work, but am guessing it will probably be fine for detecting low frequency differences but not as sensitive for differences in the higher frequencies due to the 1/f power spectrum. Is there an alternative method that anyone can suggest? Does the suggested method above sound ok? Maybe log transforming prior to application of the existing timelockstatistics framework? Thanks in advance for any help! Sangi From g.piantoni at nin.knaw.nl Tue Jan 17 22:17:09 2012 From: g.piantoni at nin.knaw.nl (Gio Piantoni) Date: Tue, 17 Jan 2012 22:17:09 +0100 Subject: [FieldTrip] non-parametric methods for comparison of power spectra In-Reply-To: References: Message-ID: Hi Sangita, I think that Fieldtrip can handle your problem just fine, if I understand your point correctly. If you run ft_freqanalysis with 'mtmfft', foilim [0 50] and keeptrials='yes', you'll get a structure with dimension trials x channel x frequency, where each element of the 3d matrix contains power spectra. You can check the .dimord field, which will be 'rpt_chan_freq'. I don't understand your notation "channel x frequency x power data". Do you mean a 'chan_freq' matrix with power data in there? You'll need trials (or subjects) to calculate any parametric or not statistics. You can then use the output of ft_freqanalysis for your statistics. It does not need any tweaking. The 1/f effect is not a problem because you're testing a difference from zero, or a difference between two conditions. So, while the mean over trials becomes smaller in absolute values, the standard error becomes smaller as well in absolute terms, resulting in roughly consistent t-values. In any case, log-transformation might make your power data more normal, so that will probably make your statistic more sound. If this is not clear to you, please include part of your code and we might help you further. Hope this helps, Gio -- Giovanni Piantoni, Ph.D. student Dept. Sleep & Cognition Netherlands Institute for Neuroscience Meibergdreef 47 1105 BA Amsterdam (NL) +31 (0)20 5665492 g.piantoni at nin.knaw.nl www.giovannipiantoni.com On Tue, Jan 17, 2012 at 19:56, Sangita Dandekar wrote: > Dear Fieldtrippers, > > Forgive me if I have overlooked something in the FT documentation, but > I was wondering if there are any non-parametric methods for comparison > of power spectra in Fieldtrip?  When I say 'power spectra' I mean > frequency vs power spectrum data without a time component (i.e. not > the TFR data structures in Fieldtrip, but what one would get by > applying an FFT to a time series and finding the magnitude of the > power spectrum as a function of frequency). > > One (clumsy) way to do this would be to use the framework of FT's > timelockstatistics function, but instead of entering channel x time x > voltage data for each trial, use channel x  frequency x power data for > each trial. > > I think the above should work, but am guessing it will probably be > fine for detecting low frequency differences but not as sensitive for > differences in the higher frequencies due to the 1/f power spectrum. > > Is there an alternative method that anyone can suggest? Does the > suggested method above sound ok?  Maybe log transforming prior to > application of the existing timelockstatistics framework? > > Thanks in advance for any help! > Sangi > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip From stefan.debener at uni-oldenburg.de Wed Jan 18 13:51:35 2012 From: stefan.debener at uni-oldenburg.de (Stefan Debener) Date: Wed, 18 Jan 2012 13:51:35 +0100 Subject: [FieldTrip] 14 Positions on the Neuroscience of Learning and Brain Plasticity Message-ID: <4F16C057.4010209@uni-oldenburg.de> 14 Positions on the neuroscience of learning and brain plasticity PhD / early-Postdoc positions are available to work with International research leaders in top European Universities and market-leading companies in the area of learning and brain plasticity. The European Community Seventh Framework Initial Training Network "Adaptive Brain Computations" (ABC) is a multi-disciplinary research and training programme which aims to integrate the study of learning and brain plasticity to promote wellbeing and advance healthcare interventions. The network takes a multidisciplinary approach, synthesising methods from brain imaging, behavioural science, physiology, and computational modelling to understand brain plasticity. Involvement in the network provides exciting opportunities for high-level research training, international travel and exchange between labs. For more information on ABC, please check: http://cnil.bham.ac.uk/ABC/index.html Eligibility criteria: 1. You should have a background in subjects related to the research including neuroscience, cognitive psychology, computer science, engineering or physics. 2. You should be in the first 4 years of your research career and should not yet have been awarded a PhD. 3. You must not have lived in the same country as the institution to which you are applying for >12 months during the past 3 years. Applications: To apply, please contact the relevant Principal Investigator directly as listed below. Please send CV, personal statement of research background and interests and the name of 3 referees. Professor Stefan Debener (stefan.debener at uni-oldenburg.de ) -- University of Oldenburg, Germany. Expertise: audio-visual integration, sensory deprivation, simultaneous EEG-fMRI Prof. Martin Giese (martin.giese at uni-tuebingen.de ) --Eberhard Karls Universität Tübingen, Germany. Expertise: computational models of motion recognition and learning, stroke rehabilitation Prof. Rainer Goebel (goebel at brainvoyager.com ) -- Brain Innovation, Netherlands. Expertise: brain imaging analysis and visualization, real-time fMRI, neurofeedback Dr. Ingmar Gutberlet (gutberlet at blindsight.de ) -- BlindSight GmbH, Germany Expertise: advanced analysis of EEG/fMRI signals, artefact correction signal integration. Prof. Heidi Johansen-Berg (heidi at fmrib.ox.ac.uk ) -- University of Oxford, UK. Expertise: brain plasticity, stroke recovery, structural and functional brain imaging Prof. Zoe Kourtzi (z.kourtzi at bham.ac.uk ) -- University of Birmingham, UK. Expertise: visual learning, object recognition and categorization, multimodal brain imaging (fMRI, EEG, TMS) Prof. Stefano Panzeri (Stefano.Panzeri at iit.it ) -- Istituto Italiano di Tecnologia, Italy Expertise: neural networks, information theory Professor Pieter Roelfsema (p.roelfsema at nin.knaw.nl ) -- National Institute for Neuroscience, Netherlands Expertise: neural circuits, visual learning and attention, neurophysiology, computational modelling. Prof. Rufin Vogels (rufin.vogels at med.kuleuven.be ) -- Katholieke Universiteit Leuven Expertise: visual perception, perceptual learning, object categorization, neurophysiology -- Prof. Dr. Stefan Debener Neuropsychology Lab Department of Psychology University of Oldenburg D-26111 Oldenburg Germany Office: A7 0-038 Phone: +49-441-798-4271 Fax: +49-441-798-5522 Email: stefan.debener at uni-oldenburg.de -------------- next part -------------- An HTML attachment was scrubbed... URL: From lavado at gmail.com Thu Jan 19 09:25:16 2012 From: lavado at gmail.com (Ion Lavado) Date: Thu, 19 Jan 2012 09:25:16 +0100 Subject: [FieldTrip] Source reconstruction with MNE problem: vol doen's fit sourcespace Message-ID: Hello, i'm trying a source reconstruction of event related fields using minimun-norm estimates and i get a problem with vol and sourcespace. When plot them together the vol doesn't fit the sourcespace. I adjunted in the mail two images where you can see what i get. It looks like that there isn't any problem of coordinate system also the units seem to be ok. I also procesed all the file with freesurfer so i suppose there is no problem with the orig-nomask.mgz. Hope anyone can help me. Thank you very much. Ion -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: 1.JPG Type: image/jpeg Size: 273695 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: 2.JPG Type: image/jpeg Size: 279282 bytes Desc: not available URL: From a.stolk at fcdonders.ru.nl Thu Jan 19 10:23:47 2012 From: a.stolk at fcdonders.ru.nl (Stolk, A.) Date: Thu, 19 Jan 2012 10:23:47 +0100 (CET) Subject: [FieldTrip] Source reconstruction with MNE problem: vol doen's fit sourcespace In-Reply-To: <437783613.742730.1326964902431.JavaMail.root@sculptor.zimbra.ru.nl> Message-ID: <2143371294.742821.1326965027489.JavaMail.root@sculptor.zimbra.ru.nl> Hi Ion, Did you realign your anatomical image to Ta lairach space (and not accidentally to MNI space)  prior to the processing with Freesurfer? http://imaging.mrc-cbu.cam.ac.uk/imaging/FindingCommissures Best regards, Arjen ----- "Ion Lavado" schreef: > Van: "Ion Lavado" > Aan: fieldtrip at donders.ru.nl > Verzonden: Donderdag 19 januari 2012 09:25:16 > Onderwerp: [FieldTrip] Source reconstruction with MNE problem: vol doen's fit        sourcespace > > Hello, i'm trying a source reconstruction of event related fields using minimun-norm estimates and i get a problem with vol and sourcespace. When plot them together the vol doesn't fit the sourcespace. I adjunted in the mail two images where you can see what i get. It looks like that there isn't any problem of coordinate system also the units seem to be ok. I also procesed all the file with freesurfer so i suppose there is no problem with the orig-nomask.mgz. Hope anyone can help me. Thank you very much. > Ion > _______________________________________________ > 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 lihqih at gmail.com Thu Jan 19 17:28:27 2012 From: lihqih at gmail.com (qi li) Date: Thu, 19 Jan 2012 11:28:27 -0500 Subject: [FieldTrip] any function can do the sliding window average Message-ID: Hi, I am wondering if there are any functions can do the sliding window average of the processed epoch-ed data. It should work as a low pass filter. ft_freqanalysis has a sliding window built in for the frequency domain quantities, I am looking for a function working in the time domain. Thanks! Qi From jan.schoffelen at donders.ru.nl Thu Jan 19 17:51:28 2012 From: jan.schoffelen at donders.ru.nl (jan-mathijs schoffelen) Date: Thu, 19 Jan 2012 17:51:28 +0100 Subject: [FieldTrip] any function can do the sliding window average In-Reply-To: References: Message-ID: You can use the option cfg.boxcar in ft_preprocessing Best, Jan-Mathijs On Jan 19, 2012, at 5:28 PM, qi li wrote: > Hi, > > I am wondering if there are any functions can do the sliding window > average of the processed epoch-ed data. It should work as a low pass > filter. ft_freqanalysis has a sliding window built in for the > frequency domain quantities, I am looking for a function working in > the time domain. Thanks! > > Qi > _______________________________________________ > 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 -------------- next part -------------- An HTML attachment was scrubbed... URL: From ghahremani.aida at gmail.com Thu Jan 19 20:01:44 2012 From: ghahremani.aida at gmail.com (aida ghahremani) Date: Thu, 19 Jan 2012 14:01:44 -0500 Subject: [FieldTrip] A problem Message-ID: Dear Fieldtrip group I have the coordinates of the cortex. Would you please help me to locates the sources (dipoles) which best explain the EEG? How I can make their orientations normal to the cortex? Best Ayda On Thu, Jan 19, 2012 at 3:25 AM, wrote: > Send fieldtrip mailing list submissions to > fieldtrip at donders.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 donders.ru.nl > > You can reach the person managing the list at > fieldtrip-owner at donders.ru.nl > > When replying, please edit your Subject line so it is more specific > than "Re: Contents of fieldtrip digest..." > > > Today's Topics: > > 1. Source reconstruction with MNE problem: vol doen's fit > sourcespace (Ion Lavado) > > > ---------------------------------------------------------------------- > > Message: 1 > Date: Thu, 19 Jan 2012 09:25:16 +0100 > From: Ion Lavado > To: fieldtrip at donders.ru.nl > Subject: [FieldTrip] Source reconstruction with MNE problem: vol > doen's fit sourcespace > Message-ID: > > > Content-Type: text/plain; charset="iso-8859-1" > > Hello, i'm trying a source reconstruction of event related fields using > minimun-norm estimates and i get a problem with vol and sourcespace. When > plot them together the vol doesn't fit the sourcespace. I adjunted in the > mail two images where you can see what i get. It looks like that there > isn't any problem of coordinate system also the units seem to be ok. I also > procesed all the file with freesurfer so i suppose there is no problem with > the orig-nomask.mgz. > Hope anyone can help me. Thank you very much. > > Ion > -------------- next part -------------- > An HTML attachment was scrubbed... > URL: < > http://mailman.science.ru.nl/pipermail/fieldtrip/attachments/20120119/fc596f28/attachment.html > > > -------------- next part -------------- > A non-text attachment was scrubbed... > Name: 1.JPG > Type: image/jpeg > Size: 273695 bytes > Desc: not available > URL: < > http://mailman.science.ru.nl/pipermail/fieldtrip/attachments/20120119/fc596f28/attachment.jpe > > > -------------- next part -------------- > A non-text attachment was scrubbed... > Name: 2.JPG > Type: image/jpeg > Size: 279282 bytes > Desc: not available > URL: < > http://mailman.science.ru.nl/pipermail/fieldtrip/attachments/20120119/fc596f28/attachment-0001.jpe > > > > ------------------------------ > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > End of fieldtrip Digest, Vol 14, Issue 27 > ***************************************** > -------------- next part -------------- An HTML attachment was scrubbed... URL: From tara_jacobson at brown.edu Thu Jan 19 22:12:55 2012 From: tara_jacobson at brown.edu (Tara Jacobson) Date: Thu, 19 Jan 2012 16:12:55 -0500 Subject: [FieldTrip] ft_definetrial with .nex files Message-ID: Hello, Does anyone have experience with .nex files? It seems straight forward to be able to define trials using events in the .nex, but ft_definetrial is not recognizing them as events. filename =('11-087_12292011.nex') stim30Hz=[27.25275 159.26715 258.277925 357.2887 489.303075 522.306625 621.317425 786.335425 885.3462 984.356975 1083.36775 1149.3749 1281.3893 1347.396425 1446.40725 1578.4216 1644.4288 1776.443175 1875.45395 1974.464725]; cfg = []; cfg.dataset = filename; cfg.trialdef.triallength=3; cfg.trialdef.eventtype=('Event007'); cfg.trialdef.eventvalue=stim30Hz; cfg=ft_definetrial(cfg); filename = 11-087_12292011.nex Warning: no trialfun was specified, using trialfun_general > In ft_definetrial at 95 evaluating trialfunction 'trialfun_general' reading the events from '11-087_12292011.nex' found 0 events created 676 trials My question is what are the 676 trials if it found no events? Can anyone give me some advice? Thanks very much. -------------- next part -------------- An HTML attachment was scrubbed... URL: From david.m.groppe at gmail.com Fri Jan 20 04:57:22 2012 From: david.m.groppe at gmail.com (David Groppe) Date: Thu, 19 Jan 2012 22:57:22 -0500 Subject: [FieldTrip] MD, DO, or MD/PhD fellowship in epilepsy, brain connectomics, and cognitive neuroscience Message-ID: Fellowship available for work on epilepsy, brain connectomics, and cognitive neuroscience with the Comprehensive Epilepsy Center of the North Shore-LIJ Health System, NY, USA.  This unique fellowship will fund an MD, DO, or MD/PhD to serve as a clinical fellow treating epilepsy patients under the mentorship of a team of experienced epileptologists and to engage in research using neuroimaging and electrophysiology to improve the diagnosis of epilepsy and to further the basic science of human brain function. More specifically, ongoing research projects include: (1) Validation of task-based and resting state fMRI and DTI measures of brain connectivity using electrical stimulation mapping and ECoG (2) Identifying areas of seizure genesis and spread using network analysis of fMRI and ECoG dynamics (3) Investigation of the neuronal dynamics underlying selective attention, language comprehension, visual object identification and auditory stream analysis. For a more detailed description about the lab and representative publications see: http://www.feinsteininstitute.org/Feinstein/Laboratory+for+Multimodal+Human+Brain+Research Candidates should meet the following qualifications: 1) M.D., D.O., or an M.D./Ph.D. degree, 2) Have graduated from or be currently enrolled in a New York state medical school, residency training program or fellowship. 3) Have some background in fMRI, electrophysiology, and/or data analysis using one or more of the following software packages: Matlab, FreeSurfer, FSL, AFNI This is a great opportunity for a physician-scientist to develop both as a clinician and researcher. An ideal candidate would be a neurologist, neurosurgeon or neuroradiologist with an interest in epilepsy, functional neurosurgery or functional brain mapping. This fellowship is part of the New York State ECRIP program, which offers a competitive salary and an opportunity to supplement income with clinical work. Please submit CV and short statement of interest to Dr. Ashesh Mehta at amehta at nshs.edu for more information. -- David Groppe, Ph.D. Postdoctoral Researcher North Shore LIJ Health System New Hyde Park, New York http://www.cogsci.ucsd.edu/~dgroppe/ From tzvetan.popov at uni-konstanz.de Fri Jan 20 09:35:58 2012 From: tzvetan.popov at uni-konstanz.de (Tzvetan Popov) Date: Fri, 20 Jan 2012 09:35:58 +0100 Subject: [FieldTrip] Open postdoctoral position at the University Konstanz, Germany Message-ID: <947A8219-1C38-444E-8B22-EA9D07FB2F68@uni-konstanz.de> Dear colleagues, please forward the message below in case you know of potential candidates. Thank you very much Tzvetan Popov ______________________ Postdoc position (assistant professor level) in Clinical Psychology and Clinical Neuropsychology available at the Department of Psychology, University of Konstanz Closing Date: March 1, 2012 Salary (TVL 13, full-time): Responsibilities The Clinical Psychology & Clinical Neuroscience branch of the department (chairs Brigitte Rockstroh, Thomas Elbert) are involved in BSc and MSc programs on Clinical Psychology (introductory and advanced courses) and Neuropsychology (methods and neuropsychological disorders & rehabilitation). The applicant is expected to teach 2 courses (2 hours weekly) per semester. Major research topics of the group relate to neuromagnetic correlates of cognitive and emotional processing in healthy subjects and patients with schizophrenia and stress-related disorders. The applicant is expected to engage in research in these or related fields, exploiting the facilities of the department. Applicants should have a Diploma/MSc in Psychology and a Ph.D. Applicants with a background in neuroscience or experience in neuroscientific methods are welcome. Applicants should be willing to work in an interdisciplinary environment and in a collaborating team, sharing technical know-how and ideas. Work environment The University of Konstanz is one of the nine Universities of Excellence in Germany. The Clinical & Clinical Neuropsychology group offers MEG- and EEG-labs, including TMS (neuronavigator), and access to a 1.5 T Phillips MRT at a nearby neurological hospital. The group is further related to a research ward at the Center for Psychiatry and runs a trauma-competence center. It is our mission to conduct fundamental research using neuroscientific methods for understanding psychological disorders. Starting from neuroplasticity-research, our mission is further to develop and evaluate treatment and rehabilitation procedures. The department hosts two junior-research groups (Emmy-Noether-Nachwuchsgruppen) and is tightly linked to the junior scientist promotion programs supported by the Excellence initiative. Please submit applications or contact for further information: Prof. Dr. Brigitte Rockstroh +49-7531-884625 – Brigitte.rockstroh at uni-konstanz.de ******************************************* Tzvetan Popov Clinical Psychology University of Konstanz Box 23 78457 Konstanz, GERMANY Phone: 0049-7531-884600 Fax: 0049-7531-884601 Email: tzvetan.popov at uni-konstanz.de ******************************************* -------------- next part -------------- An HTML attachment was scrubbed... URL: From jm.horschig at donders.ru.nl Fri Jan 20 09:48:18 2012 From: jm.horschig at donders.ru.nl (=?ISO-8859-1?Q?=22J=F6rn_M=2E_Horschig=22?=) Date: Fri, 20 Jan 2012 09:48:18 +0100 Subject: [FieldTrip] ft_definetrial with .nex files In-Reply-To: References: Message-ID: <4F192A52.2050808@donders.ru.nl> Dear Tara, you define cfg.trialdef.triallength prior to calling ft_definetrial. This will cause the trialfunction to not look for events, but cut your recorded data into chunks of 3 seconds, independently of the eventtype and -value that you specified. The parameters you probably want to use instead are cfg.trialdef.poststim and .prestim. Triallength is supposed for continuous data without events, e.g. resting state data. Btw, if you specifiy cfg.trialdef.eventtype='?' you will get a list with all events in your data - that way you can make sure that you are specifying the correct types or values (alternatively, you could also use ft_read_event). Hope it helps! Best, Jörn On 1/19/2012 10:12 PM, Tara Jacobson wrote: > Hello, > > Does anyone have experience with .nex files? It seems straight > forward to be able to define trials using events in the .nex, but > ft_definetrial is not recognizing them as events. > > filename =('11-087_12292011.nex') > > > stim30Hz=[27.25275159.26715258.277925357.2887489.303075522.306625621.317425786.335425885.3462984.3569751083.367751149.37491281.38931347.3964251446.407251578.42161644.42881776.4431751875.453951974.464725]; > > cfg = []; > cfg.dataset = filename; > > cfg.trialdef.triallength=3; > cfg.trialdef.eventtype=('Event007'); > cfg.trialdef.eventvalue=stim30Hz; > > cfg=ft_definetrial(cfg); > > filename = > 11-087_12292011.nex > Warning: no trialfun was specified, using trialfun_general > > In ft_definetrial at 95 > evaluating trialfunction 'trialfun_general' > reading the events from '11-087_12292011.nex' > found 0 events > created 676 trials > > My question is what are the 676 trials if it found no events? > > Can anyone give me some advice? > > > Thanks very much. > > > > > _______________________________________________ > 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 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 r.oostenveld at donders.ru.nl Fri Jan 20 10:43:36 2012 From: r.oostenveld at donders.ru.nl (Robert Oostenveld) Date: Fri, 20 Jan 2012 10:43:36 +0100 Subject: [FieldTrip] ft_definetrial with .nex files In-Reply-To: References: Message-ID: <895F6559-E5B6-410F-B6AA-F8407C73E30F@donders.ru.nl> Dear Tara, To add to Jorns suggestion On 19 Jan 2012, at 22:12, Tara Jacobson wrote: > ... > cfg=ft_definetrial(cfg); > > filename = > 11-087_12292011.nex > Warning: no trialfun was specified, using trialfun_general > > In ft_definetrial at 95 > evaluating trialfunction 'trialfun_general' > reading the events from '11-087_12292011.nex' > found 0 events > created 676 trials The line "found 0 events" suggests that ft_read_event (which is called in ft_definetrial) did not find any events in your nex file. I suggest you look into the ft_read_event MATLAB code (and the underlying nex functions) to figure out why it does not detect the triggers in the nex file. best Robert From r.oostenveld at donders.ru.nl Fri Jan 20 10:49:59 2012 From: r.oostenveld at donders.ru.nl (Robert Oostenveld) Date: Fri, 20 Jan 2012 10:49:59 +0100 Subject: [FieldTrip] A problem In-Reply-To: References: Message-ID: Dear Ayda On 19 Jan 2012, at 20:01, aida ghahremani wrote: > I have the coordinates of the cortex. Would you please help me to locates the sources (dipoles) which best explain the EEG? You can pass the cortical sheet to the ft_sourceanalysis function (or to the ft_prepare_leadfield function) to use all vertices of the cortical sheet as dipole locations. This is also the approach used in http://fieldtrip.fcdonders.nl/tutorial/minimumnormestimate#source_model. The vertex positions should be specified as cfg.grid.pos. > How I can make their orientations normal to the cortex? You'll have to determine the dipole orientation at each vertex outside of fieldtrip, but you can use the fieldtrip/forward/private/normals.m to help you with it. If you specify the dipole orientations as cfg.grid.mom, then the leadfield will computed for a dipole in that direction. See line 227 in ft_prepare_leadfield. best Robert From ghahremani.aida at gmail.com Fri Jan 20 19:06:29 2012 From: ghahremani.aida at gmail.com (aida ghahremani) Date: Fri, 20 Jan 2012 13:06:29 -0500 Subject: [FieldTrip] fieldtrip Digest, Vol 14, Issue 31 In-Reply-To: References: Message-ID: Hi Robert Thanks for your kind reply. Best Regards, Ayda On Fri, Jan 20, 2012 at 6:00 AM, wrote: > Send fieldtrip mailing list submissions to > fieldtrip at donders.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 donders.ru.nl > > You can reach the person managing the list at > fieldtrip-owner at donders.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: ft_definetrial with .nex files (J?rn M. Horschig) > 2. Re: ft_definetrial with .nex files (Robert Oostenveld) > 3. Re: A problem (Robert Oostenveld) > > > ---------------------------------------------------------------------- > > Message: 1 > Date: Fri, 20 Jan 2012 09:48:18 +0100 > From: "J?rn M. Horschig" > To: Email discussion list for the FieldTrip project > > Subject: Re: [FieldTrip] ft_definetrial with .nex files > Message-ID: <4F192A52.2050808 at donders.ru.nl> > Content-Type: text/plain; charset="iso-8859-1"; Format="flowed" > > Dear Tara, > > you define cfg.trialdef.triallength prior to calling ft_definetrial. > This will cause the trialfunction to not look for events, but cut your > recorded data into chunks of 3 seconds, independently of the eventtype > and -value that you specified. The parameters you probably want to use > instead are cfg.trialdef.poststim and .prestim. Triallength is supposed > for continuous data without events, e.g. resting state data. > > Btw, if you specifiy cfg.trialdef.eventtype='?' you will get a list with > all events in your data - that way you can make sure that you are > specifying the correct types or values (alternatively, you could also > use ft_read_event). > > Hope it helps! > Best, > J?rn > > On 1/19/2012 10:12 PM, Tara Jacobson wrote: > > Hello, > > > > Does anyone have experience with .nex files? It seems straight > > forward to be able to define trials using events in the .nex, but > > ft_definetrial is not recognizing them as events. > > > > filename =('11-087_12292011.nex') > > > > > > > stim30Hz=[27.25275159.26715258.277925357.2887489.303075522.306625621.317425786.335425885.3462984.3569751083.367751149.37491281.38931347.3964251446.407251578.42161644.42881776.4431751875.453951974.464725]; > > > > cfg = []; > > cfg.dataset = filename; > > > > cfg.trialdef.triallength=3; > > cfg.trialdef.eventtype=('Event007'); > > cfg.trialdef.eventvalue=stim30Hz; > > > > cfg=ft_definetrial(cfg); > > > > filename = > > 11-087_12292011.nex > > Warning: no trialfun was specified, using trialfun_general > > > In ft_definetrial at 95 > > evaluating trialfunction 'trialfun_general' > > reading the events from '11-087_12292011.nex' > > found 0 events > > created 676 trials > > > > My question is what are the 676 trials if it found no events? > > > > Can anyone give me some advice? > > > > > > Thanks very much. > > > > > > > > > > _______________________________________________ > > 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 > > 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/20120120/dbfd9088/attachment-0001.html > > > > ------------------------------ > > Message: 2 > Date: Fri, 20 Jan 2012 10:43:36 +0100 > From: Robert Oostenveld > To: Email discussion list for the FieldTrip project > > Subject: Re: [FieldTrip] ft_definetrial with .nex files > Message-ID: <895F6559-E5B6-410F-B6AA-F8407C73E30F at donders.ru.nl> > Content-Type: text/plain; charset=us-ascii > > Dear Tara, > > To add to Jorns suggestion > > On 19 Jan 2012, at 22:12, Tara Jacobson wrote: > > > ... > > cfg=ft_definetrial(cfg); > > > > filename = > > 11-087_12292011.nex > > Warning: no trialfun was specified, using trialfun_general > > > In ft_definetrial at 95 > > evaluating trialfunction 'trialfun_general' > > reading the events from '11-087_12292011.nex' > > found 0 events > > created 676 trials > > The line "found 0 events" suggests that ft_read_event (which is called in > ft_definetrial) did not find any events in your nex file. I suggest you > look into the ft_read_event MATLAB code (and the underlying nex functions) > to figure out why it does not detect the triggers in the nex file. > > best > Robert > > > > > > ------------------------------ > > Message: 3 > Date: Fri, 20 Jan 2012 10:49:59 +0100 > From: Robert Oostenveld > To: Email discussion list for the FieldTrip project > > Subject: Re: [FieldTrip] A problem > Message-ID: > Content-Type: text/plain; charset=us-ascii > > Dear Ayda > > On 19 Jan 2012, at 20:01, aida ghahremani wrote: > > I have the coordinates of the cortex. Would you please help me to > locates the sources (dipoles) which best explain the EEG? > > You can pass the cortical sheet to the ft_sourceanalysis function (or to > the ft_prepare_leadfield function) to use all vertices of the cortical > sheet as dipole locations. This is also the approach used in > http://fieldtrip.fcdonders.nl/tutorial/minimumnormestimate#source_model. > The vertex positions should be specified as cfg.grid.pos. > > > How I can make their orientations normal to the cortex? > > You'll have to determine the dipole orientation at each vertex outside of > fieldtrip, but you can use the fieldtrip/forward/private/normals.m to help > you with it. If you specify the dipole orientations as cfg.grid.mom, then > the leadfield will computed for a dipole in that direction. See line 227 in > ft_prepare_leadfield. > > best > Robert > > > > ------------------------------ > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > End of fieldtrip Digest, Vol 14, Issue 31 > ***************************************** > -------------- next part -------------- An HTML attachment was scrubbed... URL: From karl.doron at gmail.com Sun Jan 22 05:28:37 2012 From: karl.doron at gmail.com (Karl Doron) Date: Sat, 21 Jan 2012 20:28:37 -0800 Subject: [FieldTrip] axes in ft_connectivityplot Message-ID: Hello, I'm trying to use some of the plot tools for results from ft_connectivityanalysis. Can anyone tell me what the horizontal and vertical axes represent in ft_connectivityplot? The values differ on each plot in the matrix and don't seem to correspond to the data. Also, in ft_topoplotCC, is it possible to weight the line font based on the magnitude of the coherence value? %% step 1 | freq analysis cfg = []; cfg.channel = {'A224', 'A188', 'A189', 'A163', 'A184','A162'}; cfg.method = 'mtmfft'; cfg.output = 'fourier'; cfg.foilim = [8 12]; cfg.toi = 2.35:0.01:2.65; cfg.keeptrials = 'yes'; cfg.keeptapers = 'yes'; cfg.tapsmofrq = 2; cfg.taper = 'dpss'; freq_alpha = ft_freqanalysis(cfg, data_spctrm); %% step 2 | connectivity analysis cfg = []; cfg.method = 'coh'; coh = ft_connectivityanalysis(cfg, freq_alpha); Thanks for any feedback, karl doron UC, Santa Barbara -------------- next part -------------- An HTML attachment was scrubbed... URL: From m.severens at maartenskliniek.nl Mon Jan 23 14:56:10 2012 From: m.severens at maartenskliniek.nl (Severens, Marianne) Date: Mon, 23 Jan 2012 14:56:10 +0100 Subject: [FieldTrip] component variances with runica Message-ID: <70FC3ACFFB46314EBEAF9101EA45F50E06D145F310@smkexch02.maartenskliniek.nl> Dear fieldtrippers I'm doing ICA analysis with fieldtrip (method runica) and I want to know the variance explained by each component. I belief fieldtrip is making use of the EEGlab code to do the runica, and I know that with the runica function it is possible to get these variances as output. Is this also stored somewhere in the fieldtrip data format or is there an other way to get these variances? Thanks for your help! Best, Marianne Severens Disclaimer Vrijgave van de informatie verzonden met dit e-mail bericht is geaccordeerd door de ontvanger en/of zijn behandelend arts. Verstrekking van deze informatie is conform het Privacy reglement van de Sint Maartenskliniek. De informatie is uitsluitend bestemd voor de geadresseerde. Gebruik van deze informatie door anderen dan de geadresseerde is, zonder voorafgaande schriftelijke toestemming van de rechthebbende , verboden. De Sint Maartenskliniek staat niet in voor de juiste en volledige overbrenging van de inhoud van een gezonden e-mail, noch voor de ontvangst daarvan. Sint Maartenskliniek Hengstdal 3, 6574 NA Ubbergen (bij Nijmegen) Telefoon 024-3659 911 Telefax 024-3659 204 KvK nummer 41055111 From karl.doron at gmail.com Tue Jan 24 01:19:38 2012 From: karl.doron at gmail.com (Karl Doron) Date: Mon, 23 Jan 2012 16:19:38 -0800 Subject: [FieldTrip] axes in ft_connectivityplot In-Reply-To: References: Message-ID: Hello, Just to clarify my first question below. In the context of the tutorial on the fieldtrip website, what do the axes in this figure represent? Thanks, karl doron UC, Santa Barbara > Hello, > > I'm trying to use some of the plot tools for results from ft_connectivityanalysis. Can anyone tell me what the horizontal and vertical axes represent in ft_connectivityplot? The values differ on each plot in the matrix and don't seem to correspond to the data. Also, in ft_topoplotCC, is it possible to weight the line font based on the magnitude of the coherence value? > > %% step 1 | freq analysis > > cfg = []; > cfg.channel = {'A224', 'A188', 'A189', 'A163', 'A184','A162'}; > cfg.method = 'mtmfft'; > cfg.output = 'fourier'; > cfg.foilim = [8 12]; > cfg.toi = 2.35:0.01:2.65; > cfg.keeptrials = 'yes'; > cfg.keeptapers = 'yes'; > cfg.tapsmofrq = 2; > cfg.taper = 'dpss'; > > freq_alpha = ft_freqanalysis(cfg, data_spctrm); > > > %% step 2 | connectivity analysis > > cfg = []; > cfg.method = 'coh'; > > coh = ft_connectivityanalysis(cfg, freq_alpha); > > > > Thanks for any feedback, > karl doron > UC, Santa Barbara > > > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From jan.schoffelen at donders.ru.nl Tue Jan 24 08:52:27 2012 From: jan.schoffelen at donders.ru.nl (jan-mathijs schoffelen) Date: Tue, 24 Jan 2012 08:52:27 +0100 Subject: [FieldTrip] axes in ft_connectivityplot In-Reply-To: References: Message-ID: Hi Karl, The subplots represent the magnitude of the connectivity metric (which are typically unit-less) as a function of frequency. Best, Jan-Mathijs On Jan 24, 2012, at 1:19 AM, Karl Doron wrote: > Hello, > > Just to clarify my first question below. In the context of the tutorial on the fieldtrip website, what do the axes in this figure represent? > > Thanks, > karl doron > UC, Santa Barbara > >> Hello, >> >> I'm trying to use some of the plot tools for results from ft_connectivityanalysis. Can anyone tell me what the horizontal and vertical axes represent in ft_connectivityplot? The values differ on each plot in the matrix and don't seem to correspond to the data. Also, in ft_topoplotCC, is it possible to weight the line font based on the magnitude of the coherence value? >> >> %% step 1 | freq analysis >> >> cfg = []; >> cfg.channel = {'A224', 'A188', 'A189', 'A163', 'A184','A162'}; >> cfg.method = 'mtmfft'; >> cfg.output = 'fourier'; >> cfg.foilim = [8 12]; >> cfg.toi = 2.35:0.01:2.65; >> cfg.keeptrials = 'yes'; >> cfg.keeptapers = 'yes'; >> cfg.tapsmofrq = 2; >> cfg.taper = 'dpss'; >> >> freq_alpha = ft_freqanalysis(cfg, data_spctrm); >> >> >> %% step 2 | connectivity analysis >> >> cfg = []; >> cfg.method = 'coh'; >> >> coh = ft_connectivityanalysis(cfg, freq_alpha); >> >> >> >> Thanks for any feedback, >> karl doron >> UC, Santa Barbara >> >> >> >> >> > > _______________________________________________ > 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 -------------- next part -------------- An HTML attachment was scrubbed... URL: From johemart at gmail.com Tue Jan 24 16:15:12 2012 From: johemart at gmail.com (=?ISO-8859-1?Q?Johann_Heinz_Mart=EDnez_Huartos?=) Date: Tue, 24 Jan 2012 16:15:12 +0100 Subject: [FieldTrip] Problem with ft_megplanar! Message-ID: Hi dear fieldtripers. I have a probblem that i dont understand when im using FT_MEGPLANAR. Im wondering if anyone could give me a hand! The thing is that I have several individual data, each with this kind of fields. patient{12} ans = avg: [148x255 double] var: [148x255 double] fsample: 254.3235 time: [1x255 double] dof: [148x255 double] label: {148x1 cell} dimord: 'chan_time' grad: [1x1 struct] cfg: [1x1 struct] And when Im using ft_megplanar as the same way the tutorial described it, like this: cfg = []; cfg.planarmethod = 'sincos'; avgFICplanar = ft_megplanar(cfg, pacientes{12}); Fieldtrip toolbox gives me this kind of errors that I don understand. ??? Reference to non-existent field 'unit'. Error in ==> megplanar_sincos at 37 fprintf('minimum distance between gradiometers is %6.2f %s\n', min(distance(find(distance~=0))), grad.unit); Error in ==> ft_megplanar at 171 montage = megplanar_sincos(cfg, data.grad); Error in ==> STEPHANTEST at 31 avgFICplanar = ft_megplanar(cfg, pacientes{12}); Then, off course, I can use FT_COMBINEPLANAR too. So does anyone knows what could be the error in the data? or it is necesary another field that im not using in this moment? Thanks fellas for this comments -- Atentamente: Johann Martínez. M.Sc. -------------- next part -------------- An HTML attachment was scrubbed... URL: From karch at mpib-berlin.mpg.de Tue Jan 24 23:54:12 2012 From: karch at mpib-berlin.mpg.de (Karch, Julian) Date: Tue, 24 Jan 2012 22:54:12 +0000 Subject: [FieldTrip] Missing resolution Information in *vhdr causes ft_preprocessing to return only NaNs Message-ID: Hi, I'm working on a brainvision EEG dataset which was preprocessed by someone else using Brainvision Analyzer. One part of his preprocessing was to set a new reference. This processing step makes the resolution information in the *vhdr file disappear. Because of that hdr.orig.resolution=NaN for all channels. As result of that the lines calib = diag(hdr.resolution(chanindx)); % using a sparse multiplication speeds it up dat = full(sparse(calib) * dat); in read_brainvision_eeg produce only NaN. This again results in trials which only contain NaNs. I do weekly updates of fieldtrip using svn. Because I'm quite sure if was able to read in, using ft_preprocssing, the excact same dataset, even with the same cfg file, earlier this year I checked the modifications for the last half year or so but I couldn't find any change which could have broken it. My two questions are. How would you handle this problem? Just plug in some random numbers like 0.1 ? Is this an issue with fieldtrip or am I doing something wrong? Were there any changes to the involved functions which could have changed the behavior in that way? Thanks in advance! Best, Julian Julian Karch Research Assistant Center for Lifespan Psychology MPI for Human Development Lentzeallee 94, 14195 Berlin, Germany phone: +49-30-82406-296 fax: +49-30-8249939 web: http://www.mpib-berlin.mpg.de -------------- next part -------------- An HTML attachment was scrubbed... URL: From karl.doron at gmail.com Wed Jan 25 00:52:55 2012 From: karl.doron at gmail.com (Karl Doron) Date: Tue, 24 Jan 2012 15:52:55 -0800 Subject: [FieldTrip] axes in ft_connectivityplot In-Reply-To: References: Message-ID: <791E9D0F-AE12-485E-A422-D6094D884165@gmail.com> Hello, Great! That makes sense. On my second question for ft_topoplotCC, there is a bug using strmatch on lines 191 and 192. You'll likely encounter an error using horzcat at line 199 if the 'exact' argument is not added due to possible comparison of a vector and a scalar, e.g., begindx will find channel A2* when only A2 is needed. begindx = strmatch(beglabel{i}, lay.label,'exact'); endindx = strmatch(endlabel{i}, lay.label,'exact'); Thanks! karl On Jan 23, 2012, at 11:52 PM, jan-mathijs schoffelen wrote: > Hi Karl, > > The subplots represent the magnitude of the connectivity metric (which are typically unit-less) as a function of frequency. > > Best, > > Jan-Mathijs > > On Jan 24, 2012, at 1:19 AM, Karl Doron wrote: > >> Hello, >> >> Just to clarify my first question below. In the context of the tutorial on the fieldtrip website, what do the axes in this figure represent? >> >> Thanks, >> karl doron >> UC, Santa Barbara >> >>> Hello, >>> >>> I'm trying to use some of the plot tools for results from ft_connectivityanalysis. Can anyone tell me what the horizontal and vertical axes represent in ft_connectivityplot? The values differ on each plot in the matrix and don't seem to correspond to the data. Also, in ft_topoplotCC, is it possible to weight the line font based on the magnitude of the coherence value? >>> >>> %% step 1 | freq analysis >>> >>> cfg = []; >>> cfg.channel = {'A224', 'A188', 'A189', 'A163', 'A184','A162'}; >>> cfg.method = 'mtmfft'; >>> cfg.output = 'fourier'; >>> cfg.foilim = [8 12]; >>> cfg.toi = 2.35:0.01:2.65; >>> cfg.keeptrials = 'yes'; >>> cfg.keeptapers = 'yes'; >>> cfg.tapsmofrq = 2; >>> cfg.taper = 'dpss'; >>> >>> freq_alpha = ft_freqanalysis(cfg, data_spctrm); >>> >>> >>> %% step 2 | connectivity analysis >>> >>> cfg = []; >>> cfg.method = 'coh'; >>> >>> coh = ft_connectivityanalysis(cfg, freq_alpha); >>> >>> >>> >>> Thanks for any feedback, >>> karl doron >>> UC, Santa Barbara >>> >>> >>> >>> >>> >> >> _______________________________________________ >> 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 > > _______________________________________________ > 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 Jan 25 09:02:24 2012 From: jan.schoffelen at donders.ru.nl (jan-mathijs schoffelen) Date: Wed, 25 Jan 2012 09:02:24 +0100 Subject: [FieldTrip] axes in ft_connectivityplot In-Reply-To: <791E9D0F-AE12-485E-A422-D6094D884165@gmail.com> References: <791E9D0F-AE12-485E-A422-D6094D884165@gmail.com> Message-ID: <3822E3AE-DF7E-4FA4-ACE1-145A71D481F8@donders.ru.nl> Hi Karl, Thanks for reporting this; we'll look into it and fix it. May I take the opportunity for reminding (or pointing) you to our bugzilla web site: bugzilla.fcdonders.nl. We use this site to file bugs, enhancement requests etc., and use it to keep track of the fixing process. Best, Jan-Mathijs On Jan 25, 2012, at 12:52 AM, Karl Doron wrote: > Hello, > > Great! That makes sense. > > On my second question for ft_topoplotCC, there is a bug using strmatch on lines 191 and 192. You'll likely encounter an error using horzcat at line 199 if the 'exact' argument is not added due to possible comparison of a vector and a scalar, e.g., begindx will find channel A2* when only A2 is needed. > > begindx = strmatch(beglabel{i}, lay.label,'exact'); > endindx = strmatch(endlabel{i}, lay.label,'exact'); > > Thanks! > > karl > > > > On Jan 23, 2012, at 11:52 PM, jan-mathijs schoffelen wrote: > >> Hi Karl, >> >> The subplots represent the magnitude of the connectivity metric (which are typically unit-less) as a function of frequency. >> >> Best, >> >> Jan-Mathijs >> >> On Jan 24, 2012, at 1:19 AM, Karl Doron wrote: >> >>> Hello, >>> >>> Just to clarify my first question below. In the context of the tutorial on the fieldtrip website, what do the axes in this figure represent? >>> >>> Thanks, >>> karl doron >>> UC, Santa Barbara >>> >>>> Hello, >>>> >>>> I'm trying to use some of the plot tools for results from ft_connectivityanalysis. Can anyone tell me what the horizontal and vertical axes represent in ft_connectivityplot? The values differ on each plot in the matrix and don't seem to correspond to the data. Also, in ft_topoplotCC, is it possible to weight the line font based on the magnitude of the coherence value? >>>> >>>> %% step 1 | freq analysis >>>> >>>> cfg = []; >>>> cfg.channel = {'A224', 'A188', 'A189', 'A163', 'A184','A162'}; >>>> cfg.method = 'mtmfft'; >>>> cfg.output = 'fourier'; >>>> cfg.foilim = [8 12]; >>>> cfg.toi = 2.35:0.01:2.65; >>>> cfg.keeptrials = 'yes'; >>>> cfg.keeptapers = 'yes'; >>>> cfg.tapsmofrq = 2; >>>> cfg.taper = 'dpss'; >>>> >>>> freq_alpha = ft_freqanalysis(cfg, data_spctrm); >>>> >>>> >>>> %% step 2 | connectivity analysis >>>> >>>> cfg = []; >>>> cfg.method = 'coh'; >>>> >>>> coh = ft_connectivityanalysis(cfg, freq_alpha); >>>> >>>> >>>> >>>> Thanks for any feedback, >>>> karl doron >>>> UC, Santa Barbara >>>> >>>> >>>> >>>> >>>> >>> >>> _______________________________________________ >>> 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 >> >> _______________________________________________ >> 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 -------------- next part -------------- An HTML attachment was scrubbed... URL: From georchris5 at yahoo.com Wed Jan 25 09:09:10 2012 From: georchris5 at yahoo.com (George Christopoulos) Date: Wed, 25 Jan 2012 00:09:10 -0800 (PST) Subject: [FieldTrip] Research Assistant / EEG specialist Position at Singapore Message-ID: <1327478950.43155.YahooMailNeo@web161901.mail.bf1.yahoo.com> The Decision and Organizational Lab at Nanyang Technological University (PI: George Christopoulos; website https://sites.google.com/site/labdeon/home) seeks a Research Assistant / EEG Technician interested in employing behavioural and experimental methods, cognitive neuroscience and computational approaches to study basic and applied aspects of human cognition. Of particular interest are: * Decision making, learning and cognitive flexibility * Social behaviour (trust, cooperation and competition etc.) * The impact of culture and cultural exposure to human cognition * Applied aspects such as the biology of leadership, managerial decision making and entrepreneurship Facilities: Our lab is a member of the Culture Science Institute and  has easy access to unparalleled and unique to Singapore facilities for behavioural testing, including numerous soundproofed testing rooms, rooms for experimental (group) games, eye-trackers, video recording facilities and equipment for physiological measures and EEG. In addition, the Lab has access to fMRI machines in Singapore and elsewhere. Moreover, we maintain strong connections with laboratories in US, Europe, Japan and China.  The candidate should have experience with EEG (data collection, design, data analysis with FieldTrip, EEGLAB etc.) and excellent computational skills (C++, Matlab, Java). A commitment of two years will be needed / preferred. Please send your CV along with a short research statement (one paragraph) to G. Christopoulos georchris5 [at] yahoo . c o m -------------- next part -------------- An HTML attachment was scrubbed... URL: From georchris5 at yahoo.com Wed Jan 25 09:11:03 2012 From: georchris5 at yahoo.com (George Christopoulos) Date: Wed, 25 Jan 2012 00:11:03 -0800 (PST) Subject: [FieldTrip] Fully supported (Tuition Fees covered; generous stipend) PhD positions at Nanyang Business School In-Reply-To: <1327478319.56162.YahooMailNeo@web161906.mail.bf1.yahoo.com> References: <1327478319.56162.YahooMailNeo@web161906.mail.bf1.yahoo.com> Message-ID: <1327479063.11648.YahooMailNeo@web161902.mail.bf1.yahoo.com> Fully supported (Tuition Fees covered; generous stipend) PhD positions at Nanyang Business School The Decision and Organizational Lab at Nanyang Technological University (PI: George Christopoulos; website https://sites.google.com/site/labdeon/home) seeks PhD student(s) interested in employing behavioural and experimental methods, cognitive neuroscience and computational approaches to study basic and applied aspects of human cognition. Of particular interest are: * Decision making, learning and cognitive flexibility * Social behaviour (trust, cooperation and competition etc.) * The impact of culture and cultural exposure to human cognition * Applied aspects such as the biology of leadership, managerial decision making and entrepreneurship Facilities: Our lab is a member of the Culture Science Institute and  has easy access to unparalleled and unique to Singapore facilities for behavioural testing, including numerous soundproofed testing rooms, rooms for experimental (group) games, eye-trackers, video recording facilities and equipment for physiological measures and EEG. In addition, the Lab has access to fMRI machines in Singapore and elsewhere. Moreover, we maintain strong connections with laboratories in US, Europe, Japan and China.   Graduate studentswill be enrolled in the prestigious Nanyang Business School PhD program, which offers a stipend and excellent training in both behavioural sciences and business processes (details here: http://www.nbsphd.ntu.edu.sg/Pages/Home.aspx). NBS is the leading Business School in Singapore, one of the top in Asia and consistently receives worldwide high rankings in global lists (http://www.nbs.ntu.edu.sg/Pages/Home.aspx). Research-wise the student will be involved in preparing, designing, running and analyzing behavioral and human neuroimaging experiments. Besides the standard coursework, the lab provides hands-on training and support on human neuroimaging and behavioral sciences. The student will be encouraged and supported to present his or her research in conferences and peer-reviewed journals.   Previous exposure to data collection and research (with knowledge of SPPS or other packages), good computational skills (C++, Matlab, Java) are a plus. The candidate will be needed to comply to NBS admission requirements, which include GRE or GMAT scores. Please send your CV along with a short research statement (one paragraph) to G. Christopoulos georchris5 [at] yahoo . c o m -------------- next part -------------- An HTML attachment was scrubbed... URL: From jan.schoffelen at donders.ru.nl Wed Jan 25 10:07:55 2012 From: jan.schoffelen at donders.ru.nl (jan-mathijs schoffelen) Date: Wed, 25 Jan 2012 10:07:55 +0100 Subject: [FieldTrip] axes in ft_connectivityplot In-Reply-To: <791E9D0F-AE12-485E-A422-D6094D884165@gmail.com> References: <791E9D0F-AE12-485E-A422-D6094D884165@gmail.com> Message-ID: Hi Karl, I looked into ft_topoplotCC and I noticed that you are not using an up-to-date version. The current version does not use strmatch, but uses strcmp. This should not cause a problem. Best wishes, Jan-Mathijs On Jan 25, 2012, at 12:52 AM, Karl Doron wrote: > Hello, > > Great! That makes sense. > > On my second question for ft_topoplotCC, there is a bug using strmatch on lines 191 and 192. You'll likely encounter an error using horzcat at line 199 if the 'exact' argument is not added due to possible comparison of a vector and a scalar, e.g., begindx will find channel A2* when only A2 is needed. > > begindx = strmatch(beglabel{i}, lay.label,'exact'); > endindx = strmatch(endlabel{i}, lay.label,'exact'); > > Thanks! > > karl > > > > On Jan 23, 2012, at 11:52 PM, jan-mathijs schoffelen wrote: > >> Hi Karl, >> >> The subplots represent the magnitude of the connectivity metric (which are typically unit-less) as a function of frequency. >> >> Best, >> >> Jan-Mathijs >> >> On Jan 24, 2012, at 1:19 AM, Karl Doron wrote: >> >>> Hello, >>> >>> Just to clarify my first question below. In the context of the tutorial on the fieldtrip website, what do the axes in this figure represent? >>> >>> Thanks, >>> karl doron >>> UC, Santa Barbara >>> >>>> Hello, >>>> >>>> I'm trying to use some of the plot tools for results from ft_connectivityanalysis. Can anyone tell me what the horizontal and vertical axes represent in ft_connectivityplot? The values differ on each plot in the matrix and don't seem to correspond to the data. Also, in ft_topoplotCC, is it possible to weight the line font based on the magnitude of the coherence value? >>>> >>>> %% step 1 | freq analysis >>>> >>>> cfg = []; >>>> cfg.channel = {'A224', 'A188', 'A189', 'A163', 'A184','A162'}; >>>> cfg.method = 'mtmfft'; >>>> cfg.output = 'fourier'; >>>> cfg.foilim = [8 12]; >>>> cfg.toi = 2.35:0.01:2.65; >>>> cfg.keeptrials = 'yes'; >>>> cfg.keeptapers = 'yes'; >>>> cfg.tapsmofrq = 2; >>>> cfg.taper = 'dpss'; >>>> >>>> freq_alpha = ft_freqanalysis(cfg, data_spctrm); >>>> >>>> >>>> %% step 2 | connectivity analysis >>>> >>>> cfg = []; >>>> cfg.method = 'coh'; >>>> >>>> coh = ft_connectivityanalysis(cfg, freq_alpha); >>>> >>>> >>>> >>>> Thanks for any feedback, >>>> karl doron >>>> UC, Santa Barbara >>>> >>>> >>>> >>>> >>>> >>> >>> _______________________________________________ >>> 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 >> >> _______________________________________________ >> 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 -------------- next part -------------- An HTML attachment was scrubbed... URL: From caspervanheck at gmail.com Wed Jan 25 10:09:43 2012 From: caspervanheck at gmail.com (Casper van Heck) Date: Wed, 25 Jan 2012 10:09:43 +0100 Subject: [FieldTrip] Missing resolution Information in *vhdr causes ft_preprocessing to return only NaNs In-Reply-To: References: Message-ID: Julian, It is my understanding that the header file doesn't change at all, since Brainvision Analyzer stores all changes either in the 'history' files or temporary files in the history folder. The *.vhdr and *.eeg (and marker files, if any) should be unchanged after preprocessing. Therefore, resolution information should still be there. Could you check the contents of the header file with notepad? It should say something like this for every channel under "[Channel Infos]": Ch27=Fz,,0.0715,µV Also, you could try to open it with Brainvision Analyzer, and see if that gives an error of sorts. Sincerely, Casper van Heck On Tue, Jan 24, 2012 at 11:54 PM, Karch, Julian wrote: > Hi,**** > > ** ** > > I'm working on a brainvision EEG dataset which was preprocessed by > someone else using Brainvision Analyzer. One part of his preprocessing was > to set a new reference. This processing step makes the resolution > information in the *vhdr file disappear. Because of that > hdr.orig.resolution=NaN for all channels. As result of that the lines**** > > calib = diag(hdr.resolution(chanindx));**** > > % using a sparse multiplication speeds it up**** > > dat = full(sparse(calib) * dat);**** > > in read_brainvision_eeg produce only NaN. This again results in trials > which only contain NaNs.**** > > ** ** > > I do weekly updates of fieldtrip using svn. Because I'm quite sure if was > able to read in, using ft_preprocssing, the excact same dataset, even with > the same cfg file, earlier this year I checked the modifications for the > last half year or so but I couldn't find any change which could have broken > it.**** > > My two questions are. How would you handle this problem? Just plug in some > random numbers like 0.1 ? Is this an issue with fieldtrip or am I doing > something wrong? Were there any changes to the involved functions which > could have changed the behavior in that way?**** > > ** ** > > Thanks in advance!**** > > ** ** > > Best,**** > > ** ** > > Julian**** > > ** ** > > Julian Karch **** > > Research Assistant**** > > ** ** > > Center for Lifespan Psychology**** > > MPI for Human Development**** > > Lentzeallee 94, 14195 Berlin, Germany**** > > phone: +49-30-82406-296**** > > fax: +49-30-8249939**** > > web: http://www.mpib-berlin.mpg.de**** > > ** ** > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > -------------- next part -------------- An HTML attachment was scrubbed... URL: From karch at mpib-berlin.mpg.de Wed Jan 25 13:49:24 2012 From: karch at mpib-berlin.mpg.de (Karch, Julian) Date: Wed, 25 Jan 2012 12:49:24 +0000 Subject: [FieldTrip] Missing resolution Information in *vhdr causes ft_preprocessing to return only NaNs In-Reply-To: References: Message-ID: Hi, thanks for your answer. It seems that I was a little imprecise. Of course the original data set doesn't change but if I export the a data set after setting a new reference in Brainvision Analyzer the header looks like that: Original header real.vhdr =============================== Brain Vision Data Exchange Header File Version 1.0 ; Data created by the Vision Recorder [...] Ch4=Fz,,0.1,µV realnewRef.vhdr =============================== Brain Vision Data Exchange Header File Version 1.0 ; Data created from history path: real/Raw Data/New Reference [...] Ch4=Fz,Avg,,µV This was just a test I did with some random data. I don't have acess to the orginal recording for the data sets I want to read in. The header from them look like Brain Vision Data Exchange Header File Version 1.0 ; Data created from history path: passive3101/Raw Data/Filters/New Reference/Attentive [...] Ch12=Fz,ref new,, Like I said what's really strange that I think I was able to preprocess the exact same data set a couple of month ago. Thanks for your help! Best, Julian Von: fieldtrip-bounces at donders.ru.nl [mailto:fieldtrip-bounces at donders.ru.nl] Im Auftrag von Casper van Heck Gesendet: Wednesday, January 25, 2012 10:10 AM An: Email discussion list for the FieldTrip project Betreff: Re: [FieldTrip] Missing resolution Information in *vhdr causes ft_preprocessing to return only NaNs Julian, It is my understanding that the header file doesn't change at all, since Brainvision Analyzer stores all changes either in the 'history' files or temporary files in the history folder. The *.vhdr and *.eeg (and marker files, if any) should be unchanged after preprocessing. Therefore, resolution information should still be there. Could you check the contents of the header file with notepad? It should say something like this for every channel under "[Channel Infos]": Ch27=Fz,,0.0715,µV Also, you could try to open it with Brainvision Analyzer, and see if that gives an error of sorts. Sincerely, Casper van Heck On Tue, Jan 24, 2012 at 11:54 PM, Karch, Julian > wrote: Hi, I'm working on a brainvision EEG dataset which was preprocessed by someone else using Brainvision Analyzer. One part of his preprocessing was to set a new reference. This processing step makes the resolution information in the *vhdr file disappear. Because of that hdr.orig.resolution=NaN for all channels. As result of that the lines calib = diag(hdr.resolution(chanindx)); % using a sparse multiplication speeds it up dat = full(sparse(calib) * dat); in read_brainvision_eeg produce only NaN. This again results in trials which only contain NaNs. I do weekly updates of fieldtrip using svn. Because I'm quite sure if was able to read in, using ft_preprocssing, the excact same dataset, even with the same cfg file, earlier this year I checked the modifications for the last half year or so but I couldn't find any change which could have broken it. My two questions are. How would you handle this problem? Just plug in some random numbers like 0.1 ? Is this an issue with fieldtrip or am I doing something wrong? Were there any changes to the involved functions which could have changed the behavior in that way? Thanks in advance! Best, Julian Julian Karch Research Assistant Center for Lifespan Psychology MPI for Human Development Lentzeallee 94, 14195 Berlin, Germany phone: +49-30-82406-296 fax: +49-30-8249939 web: http://www.mpib-berlin.mpg.de _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -------------- next part -------------- An HTML attachment was scrubbed... URL: From caspervanheck at gmail.com Wed Jan 25 14:47:26 2012 From: caspervanheck at gmail.com (Casper van Heck) Date: Wed, 25 Jan 2012 14:47:26 +0100 Subject: [FieldTrip] Missing resolution Information in *vhdr causes ft_preprocessing to return only NaNs In-Reply-To: References: Message-ID: Julian, Brainvision Analyzer is somewhat finicky, but I've never seen it do this, and I don't seem to be able to reproduce the problem here. If you can get access to the original datasets, then rereferencing in Fieldtrip might be a solution. And if you can't get the original datasets, then you could try editing the header files to include the resolution. I don't think the resolution should change after rereferencing, so you could simply put the resolution in there. Alternatively, specifying the resolution in hdr.orig.resolution should be possible, perhaps with some editing. Also, since Fieldtrip could open the files earlier, it would stand to reason that it either 'makes up' some values, doesn't need them (which would be odd), or somehow deduces them from other values. However, in my *.vhdr files it specifies the resolution twice, once below [Channel Infos] and once under [Channels], but nothing I can find that defines it any other way. So, I'm guessing Fieldtrip used to make them up, but doesn't anymore. So, placing a resolution in the files or specifying it in Fieldtrip should not be a problem. Ideally, you would want the original resolution, but if that's not known, you could try winging it with a value that seems 'close enough'. Hope this helps, Casper van Heck On Wed, Jan 25, 2012 at 1:49 PM, Karch, Julian wrote: > Hi,**** > > ** ** > > thanks for your answer. It seems that I was a little imprecise. Of course > the original data set doesn't change but if I export the a data set after > setting a new reference in Brainvision Analyzer the header looks like that: > **** > > ** ** > > Original header real.vhdr**** > > ===============================**** > > Brain Vision Data Exchange Header File Version 1.0**** > > ; Data created by the Vision Recorder**** > > [...]**** > > Ch4=Fz,,0.1,µV**** > > ** ** > > realnewRef.vhdr**** > > ===============================**** > > Brain Vision Data Exchange Header File Version 1.0**** > > ; Data created from history path: real/Raw Data/New Reference**** > > [...]**** > > Ch4=Fz,Avg,,µV**** > > ** ** > > This was just a test I did with some random data. I don't have acess to > the orginal recording for the data sets I want to read in. The header from > them look like**** > > Brain Vision Data Exchange Header File Version 1.0**** > > ; Data created from history path: passive3101/Raw Data/Filters/New > Reference/Attentive**** > > [...]**** > > Ch12=Fz,ref new,,**** > > ** ** > > Like I said what's really strange that I think I was able to preprocess > the exact same data set a couple of month ago.**** > > ** ** > > Thanks for your help!**** > > ** ** > > Best,**** > > ** ** > > Julian**** > > ** ** > > ** ** > > ** ** > > ** ** > > *Von:* fieldtrip-bounces at donders.ru.nl [mailto: > fieldtrip-bounces at donders.ru.nl] *Im Auftrag von *Casper van Heck > *Gesendet:* Wednesday, January 25, 2012 10:10 AM > *An:* Email discussion list for the FieldTrip project > *Betreff:* Re: [FieldTrip] Missing resolution Information in *vhdr causes > ft_preprocessing to return only NaNs**** > > ** ** > > Julian,**** > > ** ** > > It is my understanding that the header file doesn't change at all, since > Brainvision Analyzer stores all changes either in the 'history' files or > temporary files in the history folder. The *.vhdr and *.eeg (and marker > files, if any) should be unchanged after preprocessing. Therefore, > resolution information should still be there.**** > > ** ** > > Could you check the contents of the header file with notepad?**** > > It should say something like this for every channel under "[Channel > Infos]":**** > > Ch27=Fz,,0.0715,µV**** > > ** ** > > Also, you could try to open it with Brainvision Analyzer, and see if that > gives an error of sorts.**** > > ** ** > > Sincerely,**** > > ** ** > > Casper van Heck**** > > ** ** > > On Tue, Jan 24, 2012 at 11:54 PM, Karch, Julian > wrote:**** > > Hi,**** > > **** > > I'm working on a brainvision EEG dataset which was preprocessed by > someone else using Brainvision Analyzer. One part of his preprocessing was > to set a new reference. This processing step makes the resolution > information in the *vhdr file disappear. Because of that > hdr.orig.resolution=NaN for all channels. As result of that the lines**** > > calib = diag(hdr.resolution(chanindx));**** > > % using a sparse multiplication speeds it up**** > > dat = full(sparse(calib) * dat);**** > > in read_brainvision_eeg produce only NaN. This again results in trials > which only contain NaNs.**** > > **** > > I do weekly updates of fieldtrip using svn. Because I'm quite sure if was > able to read in, using ft_preprocssing, the excact same dataset, even with > the same cfg file, earlier this year I checked the modifications for the > last half year or so but I couldn't find any change which could have broken > it.**** > > My two questions are. How would you handle this problem? Just plug in some > random numbers like 0.1 ? Is this an issue with fieldtrip or am I doing > something wrong? Were there any changes to the involved functions which > could have changed the behavior in that way?**** > > **** > > Thanks in advance!**** > > **** > > Best,**** > > **** > > Julian**** > > **** > > Julian Karch **** > > Research Assistant**** > > **** > > Center for Lifespan Psychology**** > > MPI for Human Development**** > > Lentzeallee 94, 14195 Berlin, Germany**** > > phone: +49-30-82406-296**** > > fax: +49-30-8249939**** > > web: http://www.mpib-berlin.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 > -------------- next part -------------- An HTML attachment was scrubbed... URL: From karch at mpib-berlin.mpg.de Wed Jan 25 17:30:11 2012 From: karch at mpib-berlin.mpg.de (Karch, Julian) Date: Wed, 25 Jan 2012 16:30:11 +0000 Subject: [FieldTrip] Missing resolution Information in *vhdr causes ft_preprocessing to return only NaNs In-Reply-To: References: Message-ID: Hi, it seems like I solved the problem. If you export your data to the ieee floating point format the resolution entry vanishes. I assume that it is just don't needed anymore as the entries are in micro volt then. This was taken into account by the read_brainvision_eeg function until 12/08/2011. On This day a couple of changes were committed. Leading to the fact that ieee_float_32 data is also multiplied with the resolution ================================================================================================== if strcmpi(hdr.DataFormat, 'binary') && strcmpi(hdr.DataOrientation, 'multiplexed') && any(strcmpi(hdr.BinaryFormat, {'int_16', 'int_32', 'ieee_float_32'})) [...] calib = diag(hdr.resolution); % using a sparse multiplication speeds it up dat = full(sparse(calib) * dat); ============================================================= The pre 12/08/2011 version looks like that ============================================================ elseif strcmpi(hdr.DataFormat, 'binary') && strcmpi(hdr.DataOrientation, 'multiplexed') && strcmpi(hdr.BinaryFormat, 'ieee_float_32') fid = fopen(filename, 'rb', 'ieee-le'); fseek(fid, hdr.NumberOfChannels*4*(begsample-1), 'cof'); [dat, siz] = fread(fid, [hdr.NumberOfChannels, (endsample-begsample+1)], 'float32'); fclose(fid); ========================================================== So ieee data was not multiplied by the resolution. Which is probably the correct behavior. I changed the function such that it doesn't multiply the ieee data with the resolution and it seems work. You can look at it here: http://matlab.nopaste.dk/p4635. The changes are just the if statements in line 67and 81. It would be great if you could incorporate a similar change to the read_brainvision_eeg function. Best, Julian Karch Von: fieldtrip-bounces at donders.ru.nl [mailto:fieldtrip-bounces at donders.ru.nl] Im Auftrag von Casper van Heck Gesendet: Wednesday, January 25, 2012 2:47 PM An: Email discussion list for the FieldTrip project Betreff: Re: [FieldTrip] Missing resolution Information in *vhdr causes ft_preprocessing to return only NaNs Julian, Brainvision Analyzer is somewhat finicky, but I've never seen it do this, and I don't seem to be able to reproduce the problem here. If you can get access to the original datasets, then rereferencing in Fieldtrip might be a solution. And if you can't get the original datasets, then you could try editing the header files to include the resolution. I don't think the resolution should change after rereferencing, so you could simply put the resolution in there. Alternatively, specifying the resolution in hdr.orig.resolution should be possible, perhaps with some editing. Also, since Fieldtrip could open the files earlier, it would stand to reason that it either 'makes up' some values, doesn't need them (which would be odd), or somehow deduces them from other values. However, in my *.vhdr files it specifies the resolution twice, once below [Channel Infos] and once under [Channels], but nothing I can find that defines it any other way. So, I'm guessing Fieldtrip used to make them up, but doesn't anymore. So, placing a resolution in the files or specifying it in Fieldtrip should not be a problem. Ideally, you would want the original resolution, but if that's not known, you could try winging it with a value that seems 'close enough'. Hope this helps, Casper van Heck On Wed, Jan 25, 2012 at 1:49 PM, Karch, Julian > wrote: Hi, thanks for your answer. It seems that I was a little imprecise. Of course the original data set doesn't change but if I export the a data set after setting a new reference in Brainvision Analyzer the header looks like that: Original header real.vhdr =============================== Brain Vision Data Exchange Header File Version 1.0 ; Data created by the Vision Recorder [...] Ch4=Fz,,0.1,µV realnewRef.vhdr =============================== Brain Vision Data Exchange Header File Version 1.0 ; Data created from history path: real/Raw Data/New Reference [...] Ch4=Fz,Avg,,µV This was just a test I did with some random data. I don't have acess to the orginal recording for the data sets I want to read in. The header from them look like Brain Vision Data Exchange Header File Version 1.0 ; Data created from history path: passive3101/Raw Data/Filters/New Reference/Attentive [...] Ch12=Fz,ref new,, Like I said what's really strange that I think I was able to preprocess the exact same data set a couple of month ago. Thanks for your help! Best, Julian Von: fieldtrip-bounces at donders.ru.nl [mailto:fieldtrip-bounces at donders.ru.nl] Im Auftrag von Casper van Heck Gesendet: Wednesday, January 25, 2012 10:10 AM An: Email discussion list for the FieldTrip project Betreff: Re: [FieldTrip] Missing resolution Information in *vhdr causes ft_preprocessing to return only NaNs Julian, It is my understanding that the header file doesn't change at all, since Brainvision Analyzer stores all changes either in the 'history' files or temporary files in the history folder. The *.vhdr and *.eeg (and marker files, if any) should be unchanged after preprocessing. Therefore, resolution information should still be there. Could you check the contents of the header file with notepad? It should say something like this for every channel under "[Channel Infos]": Ch27=Fz,,0.0715,µV Also, you could try to open it with Brainvision Analyzer, and see if that gives an error of sorts. Sincerely, Casper van Heck On Tue, Jan 24, 2012 at 11:54 PM, Karch, Julian > wrote: Hi, I'm working on a brainvision EEG dataset which was preprocessed by someone else using Brainvision Analyzer. One part of his preprocessing was to set a new reference. This processing step makes the resolution information in the *vhdr file disappear. Because of that hdr.orig.resolution=NaN for all channels. As result of that the lines calib = diag(hdr.resolution(chanindx)); % using a sparse multiplication speeds it up dat = full(sparse(calib) * dat); in read_brainvision_eeg produce only NaN. This again results in trials which only contain NaNs. I do weekly updates of fieldtrip using svn. Because I'm quite sure if was able to read in, using ft_preprocssing, the excact same dataset, even with the same cfg file, earlier this year I checked the modifications for the last half year or so but I couldn't find any change which could have broken it. My two questions are. How would you handle this problem? Just plug in some random numbers like 0.1 ? Is this an issue with fieldtrip or am I doing something wrong? Were there any changes to the involved functions which could have changed the behavior in that way? Thanks in advance! Best, Julian Julian Karch Research Assistant Center for Lifespan Psychology MPI for Human Development Lentzeallee 94, 14195 Berlin, Germany phone: +49-30-82406-296 fax: +49-30-8249939 web: http://www.mpib-berlin.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 -------------- next part -------------- An HTML attachment was scrubbed... URL: From lavado at gmail.com Thu Jan 26 13:39:41 2012 From: lavado at gmail.com (Ion Lavado) Date: Thu, 26 Jan 2012 13:39:41 +0100 Subject: [FieldTrip] Source reconstruction with MNE problem: vol doen's fit sourcespace In-Reply-To: <2143371294.742821.1326965027489.JavaMail.root@sculptor.zimbra.ru.nl> References: <437783613.742730.1326964902431.JavaMail.root@sculptor.zimbra.ru.nl> <2143371294.742821.1326965027489.JavaMail.root@sculptor.zimbra.ru.nl> Message-ID: Thank you for your help. I realigned it to Tailarach prior to freesurfer processing. Any idea? Ion 2012/1/19 Stolk, A. > Hi Ion, > > > > Did you realign your anatomical image to Talairach space (and > not accidentally to MNI space) prior to the processing with Freesurfer? > > > > http://imaging.mrc-cbu.cam.ac.uk/imaging/FindingCommissures > > > > Best regards, > > Arjen > > > > > ----- "Ion Lavado" schreef: > > Van: "Ion Lavado" > > Aan: fieldtrip at donders.ru.nl > > Verzonden: Donderdag 19 januari 2012 09:25:16 > > Onderwerp: [FieldTrip] Source reconstruction with MNE problem: vol > doen's fit sourcespace > > > > > Hello, i'm trying a source reconstruction of event related fields using > minimun-norm estimates and i get a problem with vol and sourcespace. When > plot them together the vol doesn't fit the sourcespace. I adjunted in the > mail two images where you can see what i get. It looks like that there > isn't any problem of coordinate system also the units seem to be ok. I also > procesed all the file with freesurfer so i suppose there is no problem with > the orig-nomask.mgz. > > Hope anyone can help me. Thank you very much. > > > > Ion > > > _______________________________________________ > > 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 jpnv2006 at gmail.com Thu Jan 26 13:46:06 2012 From: jpnv2006 at gmail.com (Juan Pablo Neira) Date: Thu, 26 Jan 2012 13:46:06 +0100 Subject: [FieldTrip] EEG Source Reconstruction using mne Message-ID: Hello, I have been working with fieldtrip the last two weeks to do source reconstruction using Minimun Norm Estimation (mne). Now I am analyzing real data (EEG) with individual MRI, it seems I am not having the right solution. So maybe someone can help me with the next questions: 1. How do I define the source space? I would like to have my sources in the whole brain or only in gray matter. When I calculated the source reconstruction (mne method) I had sources outside of the brain. 2. What are the possibilities to calculate or estimate the regularization parameter lambda in the Minimum Norm Estimation (mne) Method? Reading in some mne tutorials, they calculate the noise covariance matrix of the data using ft_timelockanalysis function, and then the ft_sourceanalysis uses this matrix to calculate labda for the mne method. Are there other possibilities? 3. We want to implement Fieldtrip to do the Preprocessing, forward and inverse (mne) calculations. But we have not found exact or close information of the complete task. These are the steps we are performing: - Read the EEG signals - Reject undesired channels - Referencing - Time domain analysis (ft_timelockanalysis) - Read, realign and segment individual MRI - Volume creation: we create the scalp, skull and brain meshes and then use ft_headmodel_bem_openmeeg - EEG sensor positions alignment with the scalp mesh of the volume. - Calculate the leadfield matrix - Finally the Source Analysis (method mne) Are we missing an important step? Best regards, Juan Pablo Neira Vesga University - Clinic Kiel, Germany From a.stolk at fcdonders.ru.nl Thu Jan 26 14:39:24 2012 From: a.stolk at fcdonders.ru.nl (Stolk, A.) Date: Thu, 26 Jan 2012 14:39:24 +0100 (CET) Subject: [FieldTrip] Source reconstruction with MNE problem: vol doen's fit sourcespace In-Reply-To: <804023878.857066.1327584774361.JavaMail.root@sculptor.zimbra.ru.nl> Message-ID: <1886031496.857328.1327585164114.JavaMail.root@sculptor.zimbra.ru.nl> Hi Ion, Could you specify some more details so we can reproduce your bug. Preferably by including a small test script with the same operations applied to the testdata (as in the tutorial) . Best regards, Arjen ----- "Ion Lavado" schreef: > Van: "Ion Lavado" > Aan: "Email discussion list for the FieldTrip project" > Verzonden: Donderdag 26 januari 2012 13:39:41 > Onderwerp: Re: [FieldTrip] Source reconstruction with MNE problem: vol doen's fit sourcespace > > Thank you for your help. I realigned it to Tailarach prior to freesurfer processing. Any idea? > Ion  > > 2012/1/19 Stolk, A. < a.stolk at fcdonders.ru.nl > > > Hi Ion, Did you realign your anatomical image to Talairach space (and not accidentally to MNI space) prior to the processing with Freesurfer? http://imaging.mrc-cbu.cam.ac.uk/imaging/FindingCommissures Best regards, Arjen > ----- "Ion Lavado" < lavado at gmail.com > schreef: > > Van: "Ion Lavado" < lavado at gmail.com > > > Aan: fieldtrip at donders.ru.nl > > Verzonden: Donderdag 19 januari 2012 09:25:16 > > Onderwerp: [FieldTrip] Source reconstruction with MNE problem: vol doen's fit        sourcespace > > > > > Hello, i'm trying a source reconstruction of event related fields using minimun-norm estimates and i get a problem with vol and sourcespace. When plot them together the vol doesn't fit the sourcespace. I adjunted in the mail two images where you can see what i get. It looks like that there isn't any problem of coordinate system also the units seem to be ok. I also procesed all the file with freesurfer so i suppose there is no problem with the orig-nomask.mgz. > Hope anyone can help me. Thank you very much. > > Ion > > _______________________________________________ > > 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 david.m.groppe at gmail.com Thu Jan 26 20:12:34 2012 From: david.m.groppe at gmail.com (David Groppe) Date: Thu, 26 Jan 2012 14:12:34 -0500 Subject: [FieldTrip] MD, DO, or MD/PhD fellowship in epilepsy, brain connectomics, and cognitive neuroscience (revised) Message-ID: Hi All, I apologize for the re-post, but we misstated some of the requirements for the MD, DO, or MD/PhD fellowship in the ad I previously posted. See below for the corrected requirements. much thanks, -David A research fellowship is available for work on epilepsy, brain connectomics and cognitive neuroscience with the Comprehensive Epilepsy Center at the Hofstra North Shore LIJ School of Medicine, in Manhasset, NY.  This unique fellowship will fund an MD, DO, or MD/PhD to serve as a research fellow under the mentorship of a team of experienced physicians and scientists and to engage in research using neuroimaging and electrophysiology to improve the diagnosis and treatment of epilepsy and to further the basic science functional brain mapping. Ongoing research projects include: (1) Validation of task-based and resting state fMRI and DTI measures of brain connectivity using electrical stimulation mapping and ECoG (2) Identifying areas of seizure onset and spread using network analysis of fMRI and ECoG dynamics (3) Investigation of the neuronal dynamics underlying selective attention, language comprehension, visual object identification and auditory stream analysis. For a more detailed description about the lab and representative publications see: http://www.feinsteininstitute.org/Feinstein/Laboratory+for+Multimodal+Human+Brain+Mapping Candidates should meet the following qualifications: 1) M.D., D.O., or an M.D./Ph.D. degree, 2) A United States citizen, national, or permanent resident 3) Have graduated from or be currently enrolled in a residency training program or fellowship. 4) Have some background in fMRI, electrophysiology, and/or data analysis using one or more of the following software packages: Matlab, FreeSurfer, FSL, AFNI This is a great opportunity for a physician-scientist to develop both as a clinician and researcher. An ideal candidate would be a neurologist, neurosurgeon or neuroradiologist with an interest in epilepsy, functional neurosurgery or functional brain mapping. This fellowship is part of the New York State ECRIP program, which offers a competitive salary and an opportunity to supplement income with clinical work Please submit CV and short statement of interest to Dr. Ashesh Mehta at amehta at nshs.edu for more information. -- David Groppe, Ph.D. Postdoctoral Researcher North Shore LIJ Health System New Hyde Park, New York http://www.cogsci.ucsd.edu/~dgroppe/ From lavado at gmail.com Fri Jan 27 09:33:10 2012 From: lavado at gmail.com (Ion Lavado) Date: Fri, 27 Jan 2012 09:33:10 +0100 Subject: [FieldTrip] Source reconstruction with MNE problem: vol doen's fit sourcespace In-Reply-To: <1886031496.857328.1327585164114.JavaMail.root@sculptor.zimbra.ru.nl> References: <804023878.857066.1327584774361.JavaMail.root@sculptor.zimbra.ru.nl> <1886031496.857328.1327585164114.JavaMail.root@sculptor.zimbra.ru.nl> Message-ID: Ok, thank you for your time Arjen. This is what i've done: *%READ AND REALINGN* mri = ft_read_mri('C:\Users\ilavado\Desktop\31_CW1AFMRI_ESG_ENDIKA_SANCHEZ_GOMEZ\1_028_t1_mpr_tra_p2_iso_20110314\31_CW1AFMRI_ESG_ENDIKA_SANCHEZ_GOMEZ_20110314_001_028_t1_mpr_tra_p2_iso.img'); cfg = []; cfg.interactive = 'yes'; cfg.coordsys = 'neuromag'; mri_other = ft_volumerealign(cfg,mri); *%RESLICING* cfg = []; cfg.resolution=1; cfg.dim=[256 256 256]; mrirs = ft_volumereslice(cfg, mri_other); save mrirs; *%SEGMENTATION* load mrirs; cfg = []; cfg.coordsys = 'neuromag'; cfg.output={'skullstrip' 'brain'}; seg = ft_volumesegment(cfg, mrirs) save seg seg; *%REALING TO TALAIRACH* load mrirs; cfg=[]; cfg.method='interactive'; cfg.coordsys = 'neuromag'; mri_tal=ft_volumerealign(cfg,mrirs); *%mrirs o mri_other???* save mri_tal mri_tal seg.transform = mri_tal.transform; cfg = []; cfg.filename = 'Subject29_mri_freesurfer2'; cfg.filetype = 'mgz'; cfg.parameter = 'anatomy'; ft_volumewrite(cfg, mri_tal); cfg.filename = 'Subject29masked2'; ft_volumewrite(cfg, seg); THE I CREATE ALL THE FILES (WITH THE TUTORIAL COMMANDS) WITH FREESURFER with "Subject29masked2.mgz" and "Subject29_mri_freesurfer2.mgz" AND HERE IN THE SOURCE MODEL IS WHERE I GET THE PROBLEM. *%CREATE THE MESH* bnd = ft_read_headshape('29_mri-oct-6-src.fif', 'format', 'mne_source'); figure;ft_plot_mesh(bnd); *%CO-REGISTRATION* mri_norm = ft_read_mri('/home/mlizarazu/public/Exchange/Mikel/Subject29/mri/orig-nomask.mgz'); cfg = []; cfg.method = 'interactive'; mri_norm_ctf = ft_volumerealign(cfg, mri_norm); mri_norm_ctf = ft_convert_units(mri_norm_ctf, 'cm'); T = mri_norm_ctf.transform*inv(mri_norm_ctf.transformorig); bnd = ft_read_headshape('29_mri-oct-6-src.fif', 'format', 'mne_source'); sourcespace = ft_convert_units(bnd, 'cm'); sourcespace = ft_transform_geometry(T, sourcespace); *%VOLUME MODEL* cfg = []; cfg.coordsys = 'spm'; cfg.output = {'brain'}; seg = ft_volumesegment(cfg, mri_norm); cfg = []; vol = ft_prepare_singleshell(cfg,seg); vol.bnd = ft_transform_geometry(T, vol.bnd); *%PLOT* figure;hold on; ft_plot_vol(vol, 'facecolor', 'none');alpha 0.5; ft_plot_mesh(sourcespace_ctf, 'edgecolor', 'none'); camlight When plotting i have the problem that you see in the photos... Hope we can solve this. Thank you. Best whises Ion 2012/1/26 Stolk, A. > Hi Ion, > > > > Could you specify some more details so we can reproduce your bug. > Preferably by including a small test script with the same operations > applied to the testdata (as in the tutorial). > > > > Best regards, > > Arjen > > > ----- "Ion Lavado" schreef: > > Van: "Ion Lavado" > > Aan: "Email discussion list for the FieldTrip project" < > fieldtrip at donders.ru.nl> > > Verzonden: Donderdag 26 januari 2012 13:39:41 > > Onderwerp: Re: [FieldTrip] Source reconstruction with MNE problem: vol > doen's fit sourcespace > > > > > Thank you for your help. I realigned it to Tailarach prior to freesurfer > processing. Any idea? > > > > > Ion > > > > 2012/1/19 Stolk, A. > > >> >> > >> >> Hi Ion, >> >> >> >> Did you realign your anatomical image to Talairach space (and >> not accidentally to MNI space) prior to the processing with Freesurfer? >> >> >> >> http://imaging.mrc-cbu.cam.ac.uk/imaging/FindingCommissures >> >> >> >> Best regards, >> >> Arjen >> >> >> >> >> > ----- "Ion Lavado" schreef: >> > > Van: "Ion Lavado" >> > > Aan: fieldtrip at donders.ru.nl >> > > Verzonden: Donderdag 19 januari 2012 09:25:16 >> > > Onderwerp: [FieldTrip] Source reconstruction with MNE problem: vol >> doen's fit sourcespace >> > >> > > >> > > Hello, i'm trying a source reconstruction of event related fields >> using minimun-norm estimates and i get a problem with vol and sourcespace. >> When plot them together the vol doesn't fit the sourcespace. I adjunted in >> the mail two images where you can see what i get. It looks like that there >> isn't any problem of coordinate system also the units seem to be ok. I also >> procesed all the file with freesurfer so i suppose there is no problem with >> the orig-nomask.mgz. >> >> > >> Hope anyone can help me. Thank you very much. >> >> > > >> Ion >> >> > >> > _______________________________________________ >> > > fieldtrip mailing list >> > > fieldtrip at donders.ru.nl >> > > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip >> >> > _______________________________________________ >> > fieldtrip mailing list >> > fieldtrip at donders.ru.nl >> > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip >> > > > > > > > > _______________________________________________ > > fieldtrip mailing list > > fieldtrip at donders.ru.nl > > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > -------------- next part -------------- An HTML attachment was scrubbed... URL: From lavado at gmail.com Fri Jan 27 10:05:35 2012 From: lavado at gmail.com (Ion Lavado) Date: Fri, 27 Jan 2012 10:05:35 +0100 Subject: [FieldTrip] Source reconstruction with MNE problem: vol doen's fit sourcespace In-Reply-To: References: <804023878.857066.1327584774361.JavaMail.root@sculptor.zimbra.ru.nl> <1886031496.857328.1327585164114.JavaMail.root@sculptor.zimbra.ru.nl> Message-ID: I think the problem is in the first steps, where i used neuromag coordinates... and i have to work in CTF and then to Talairach... i'll try it againg. 2012/1/27 Ion Lavado > Ok, thank you for your time Arjen. This is what i've done: > > > > > > *%READ AND REALINGN* > mri = > ft_read_mri('C:\Users\ilavado\Desktop\31_CW1AFMRI_ESG_ENDIKA_SANCHEZ_GOMEZ\1_028_t1_mpr_tra_p2_iso_20110314\31_CW1AFMRI_ESG_ENDIKA_SANCHEZ_GOMEZ_20110314_001_028_t1_mpr_tra_p2_iso.img'); > cfg = []; > cfg.interactive = 'yes'; > cfg.coordsys = 'neuromag'; > mri_other = ft_volumerealign(cfg,mri); > > *%RESLICING* > cfg = []; > cfg.resolution=1; > cfg.dim=[256 256 256]; > mrirs = ft_volumereslice(cfg, mri_other); > save mrirs; > > *%SEGMENTATION* > load mrirs; > cfg = []; > cfg.coordsys = 'neuromag'; > cfg.output={'skullstrip' 'brain'}; > seg = ft_volumesegment(cfg, mrirs) > save seg seg; > > *%REALING TO TALAIRACH* > load mrirs; > cfg=[]; > cfg.method='interactive'; > cfg.coordsys = 'neuromag'; > mri_tal=ft_volumerealign(cfg,mrirs); *%mrirs o mri_other???* > save mri_tal mri_tal > > > seg.transform = mri_tal.transform; > cfg = []; > cfg.filename = 'Subject29_mri_freesurfer2'; > cfg.filetype = 'mgz'; > cfg.parameter = 'anatomy'; > ft_volumewrite(cfg, mri_tal); > > cfg.filename = 'Subject29masked2'; > ft_volumewrite(cfg, seg); > > > > THE I CREATE ALL THE FILES (WITH THE TUTORIAL COMMANDS) WITH FREESURFER > with "Subject29masked2.mgz" and "Subject29_mri_freesurfer2.mgz" > AND HERE IN THE SOURCE MODEL IS WHERE I GET THE PROBLEM. > > > *%CREATE THE MESH* > bnd = ft_read_headshape('29_mri-oct-6-src.fif', 'format', 'mne_source'); > figure;ft_plot_mesh(bnd); > > > *%CO-REGISTRATION* > mri_norm = > ft_read_mri('/home/mlizarazu/public/Exchange/Mikel/Subject29/mri/orig-nomask.mgz'); > cfg = []; > cfg.method = 'interactive'; > mri_norm_ctf = ft_volumerealign(cfg, mri_norm); > > > mri_norm_ctf = ft_convert_units(mri_norm_ctf, 'cm'); > T = mri_norm_ctf.transform*inv(mri_norm_ctf.transformorig); > bnd = ft_read_headshape('29_mri-oct-6-src.fif', 'format', 'mne_source'); > sourcespace = ft_convert_units(bnd, 'cm'); > sourcespace = ft_transform_geometry(T, sourcespace); > > > *%VOLUME MODEL* > cfg = []; > cfg.coordsys = 'spm'; > cfg.output = {'brain'}; > seg = ft_volumesegment(cfg, mri_norm); > > cfg = []; > vol = ft_prepare_singleshell(cfg,seg); > vol.bnd = ft_transform_geometry(T, vol.bnd); > > *%PLOT* > figure;hold on; > ft_plot_vol(vol, 'facecolor', 'none');alpha 0.5; > ft_plot_mesh(sourcespace_ctf, 'edgecolor', 'none'); camlight > > > > > When plotting i have the problem that you see in the photos... Hope we can > solve this. > > Thank you. > > > > Best whises > > > Ion > > > > > > > > 2012/1/26 Stolk, A. > > Hi Ion, >> >> >> >> Could you specify some more details so we can reproduce your bug. >> Preferably by including a small test script with the same operations >> applied to the testdata (as in the tutorial). >> >> >> >> Best regards, >> >> Arjen >> >> >> ----- "Ion Lavado" schreef: >> > Van: "Ion Lavado" >> > Aan: "Email discussion list for the FieldTrip project" < >> fieldtrip at donders.ru.nl> >> > Verzonden: Donderdag 26 januari 2012 13:39:41 >> > Onderwerp: Re: [FieldTrip] Source reconstruction with MNE problem: vol >> doen's fit sourcespace >> >> > >> > Thank you for your help. I realigned it to Tailarach prior to >> freesurfer processing. Any idea? >> >> >> > >> Ion >> > >> > 2012/1/19 Stolk, A. >> > >>> >>> > >>> >>> Hi Ion, >>> >>> >>> >>> Did you realign your anatomical image to Talairach space (and >>> not accidentally to MNI space) prior to the processing with Freesurfer? >>> >>> >>> >>> http://imaging.mrc-cbu.cam.ac.uk/imaging/FindingCommissures >>> >>> >>> >>> Best regards, >>> >>> Arjen >>> >>> >>> >>> >>> > ----- "Ion Lavado" schreef: >>> > > Van: "Ion Lavado" >>> > > Aan: fieldtrip at donders.ru.nl >>> > > Verzonden: Donderdag 19 januari 2012 09:25:16 >>> > > Onderwerp: [FieldTrip] Source reconstruction with MNE problem: vol >>> doen's fit sourcespace >>> > >>> > > >>> > > Hello, i'm trying a source reconstruction of event related fields >>> using minimun-norm estimates and i get a problem with vol and sourcespace. >>> When plot them together the vol doesn't fit the sourcespace. I adjunted in >>> the mail two images where you can see what i get. It looks like that there >>> isn't any problem of coordinate system also the units seem to be ok. I also >>> procesed all the file with freesurfer so i suppose there is no problem with >>> the orig-nomask.mgz. >>> >>> > >>> Hope anyone can help me. Thank you very much. >>> >>> > > >>> Ion >>> >>> > >>> > _______________________________________________ >>> > > fieldtrip mailing list >>> > > fieldtrip at donders.ru.nl >>> > > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip >>> >>> > _______________________________________________ >>> > fieldtrip mailing list >>> > fieldtrip at donders.ru.nl >>> > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip >>> > >> >> >> > >> >> > _______________________________________________ >> > fieldtrip mailing list >> > fieldtrip at donders.ru.nl >> > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip >> >> _______________________________________________ >> fieldtrip mailing list >> fieldtrip at donders.ru.nl >> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip >> > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From a.stolk at fcdonders.ru.nl Fri Jan 27 10:10:37 2012 From: a.stolk at fcdonders.ru.nl (Stolk, A.) Date: Fri, 27 Jan 2012 10:10:37 +0100 (CET) Subject: [FieldTrip] Source reconstruction with MNE problem: vol doen's fit sourcespace In-Reply-To: <732434275.867549.1327655396459.JavaMail.root@sculptor.zimbra.ru.nl> Message-ID: <1650950033.867568.1327655437024.JavaMail.root@sculptor.zimbra.ru.nl> Hi Ion, Thanks for providing the details. I cannot test run these commands myself as they point to your private dataset and not the example 'Subject01'. However, scanning through the text , it seems to me you have used  the correct lines of code. Perhaps something may have gone wrong with the interactive volumealignment procedures, 3 times in total. Did you manually press the l, r, and n buttons when selecting the left and right ear, and nasion in the first and third interactive alignment steps? And, in contrast, did you press the a, p, and z buttons when  selecting the anterior and posterior commi su res and an inter hemispheric point (see link in previous mail) in the second alignment step? This is the 'realign to talairach' part of the code. Best regards, Arjen ----- "Ion Lavado" schreef: > Van: "Ion Lavado" > Aan: "Email discussion list for the FieldTrip project" > Verzonden: Vrijdag 27 januari 2012 09:33:10 > Onderwerp: Re: [FieldTrip] Source reconstruction with MNE problem: vol doen's fit sourcespace > > Ok, thank you for your time Arjen. This is what i've done: > %READ AND REALINGN > mri = ft_read_mri('C:\Users\ilavado\Desktop\31_CW1AFMRI_ESG_ENDIKA_SANCHEZ_GOMEZ\1_028_t1_mpr_tra_p2_iso_20110314\31_CW1AFMRI_ESG_ENDIKA_SANCHEZ_GOMEZ_20110314_001_028_t1_mpr_tra_p2_iso.img'); > cfg = []; > cfg.interactive    = 'yes'; > cfg.coordsys    = 'neuromag'; > mri_other           = ft_volumerealign(cfg,mri); > %RESLICING > cfg = []; > cfg.resolution=1; > cfg.dim=[256 256 256]; > mrirs = ft_volumereslice(cfg, mri_other); > save mrirs; > %SEGMENTATION > load mrirs; > cfg = []; > cfg.coordsys    = 'neuromag'; > cfg.output={'skullstrip' 'brain'}; > seg   = ft_volumesegment(cfg, mrirs) > save seg seg; > %REALING TO TALAIRACH > load mrirs; > cfg=[]; > cfg.method='interactive'; > cfg.coordsys    = 'neuromag'; > mri_tal=ft_volumerealign(cfg,mrirs);    %mrirs o mri_other??? > save mri_tal mri_tal > seg.transform = mri_tal.transform; > cfg             = []; > cfg.filename    = 'Subject29_mri_freesurfer2'; > cfg.filetype = 'mgz'; > cfg.parameter   = 'anatomy'; > ft_volumewrite(cfg, mri_tal); > cfg.filename    = 'Subject29masked2'; > ft_volumewrite(cfg, seg); > THE I CREATE ALL THE FILES (WITH THE TUTORIAL COMMANDS) WITH FREESURFER with "Subject29masked2.mgz" and "Subject29_mri_freesurfer2.mgz" > AND HERE IN THE SOURCE MODEL IS WHERE I GET THE PROBLEM. > > %CREATE THE MESH > bnd = ft_read_headshape('29_mri-oct-6-src.fif', 'format', 'mne_source'); figure;ft_plot_mesh(bnd); > %CO-REGISTRATION > mri_norm = ft_read_mri('/home/mlizarazu/public/Exchange/Mikel/Subject29/mri/orig-nomask.mgz'); cfg = []; cfg.method = 'interactive'; mri_norm_ctf = ft_volumerealign(cfg, mri_norm); > > mri_norm_ctf = ft_convert_units(mri_norm_ctf, 'cm'); T   = mri_norm_ctf.transform*inv(mri_norm_ctf.transformorig); bnd  = ft_read_headshape('29_mri-oct-6-src.fif', 'format', 'mne_source'); sourcespace = ft_convert_units(bnd, 'cm'); sourcespace = ft_transform_geometry(T, sourcespace); > %VOLUME MODEL > cfg           = []; > cfg.coordsys    = 'spm'; > cfg.output    = {'brain'}; > seg           = ft_volumesegment(cfg, mri_norm); > cfg = []; > vol = ft_prepare_singleshell(cfg,seg); > vol.bnd = ft_transform_geometry(T, vol.bnd); > %PLOT > figure;hold on; > ft_plot_vol(vol, 'facecolor', 'none');alpha 0.5; > ft_plot_mesh(sourcespace_ctf, 'edgecolor', 'none'); camlight > When plotting i have the problem that you see in the photos... Hope we can solve this. > > Thank you. > Best whises > Ion > > 2012/1/26 Stolk, A. < a.stolk at fcdonders.ru.nl > > > Hi Ion, Could you specify some more details so we can reproduce your bug. Preferably by including a small test script with the same operations applied to the testdata (as in the tutorial). Best regards, Arjen > > ----- "Ion Lavado" < lavado at gmail.com > schreef: > > Van: "Ion Lavado" < lavado at gmail.com > > > Aan: "Email discussion list for the FieldTrip project" < fieldtrip at donders.ru.nl > > > Verzonden: Donderdag 26 januari 2012 13:39:41 > > Onderwerp: Re: [FieldTrip] Source reconstruction with MNE problem: vol doen's fit sourcespace > > > > > Thank you for your help. I realigned it to Tailarach prior to freesurfer processing. Any idea? > > > Ion  > > > > 2012/1/19 Stolk, A. < a.stolk at fcdonders.ru.nl > > > > > Hi Ion, Did you realign your anatomical image to Talairach space (and not accidentally to MNI space) prior to the processing with Freesurfer? http://imaging.mrc-cbu.cam.ac.uk/imaging/FindingCommissures Best regards, Arjen > > ----- "Ion Lavado" < lavado at gmail.com > schreef: > > > Van: "Ion Lavado" < lavado at gmail.com > > > > Aan: fieldtrip at donders.ru.nl > > > Verzonden: Donderdag 19 januari 2012 09:25:16 > > > Onderwerp: [FieldTrip] Source reconstruction with MNE problem: vol doen's fit        sourcespace > > > > > > > Hello, i'm trying a source reconstruction of event related fields using minimun-norm estimates and i get a problem with vol and sourcespace. When plot them together the vol doesn't fit the sourcespace. I adjunted in the mail two images where you can see what i get. It looks like that there isn't any problem of coordinate system also the units seem to be ok. I also procesed all the file with freesurfer so i suppose there is no problem with the orig-nomask.mgz. > Hope anyone can help me. Thank you very much. > > > Ion > > > _______________________________________________ > > > 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 > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -------------- next part -------------- An HTML attachment was scrubbed... URL: From m.cardinale at student.maastrichtuniversity.nl Fri Jan 27 12:32:49 2012 From: m.cardinale at student.maastrichtuniversity.nl (Cardinale, Vita (Stud. FPN / Alumni)) Date: Fri, 27 Jan 2012 12:32:49 +0100 Subject: [FieldTrip] (no subject) Message-ID: Dear all, I just started to use FIELDTRIP with going through the tutorial. Already reading in the data from the tutorial is not working as it should. Here is what I get when doing the trial definition for the fully incongruent (FIC) condition from the tutorial “Trigger-based trial selection, Reading and preprocessing the interesting trials”: cfg = []; cfg.dataset = 'Subject01.ds'; cfg.trialdef.eventtype = 'backpanel trigger'; cfg.trialdef.eventvalue = 3; % the value of the stimulus trigger for fully incongruent (FIC). cfg.trialdef.prestim = 1; % in seconds cfg.trialdef.poststim = 2; % in seconds cfg = ft_definetrial(cfg); I get this warning: no trialfun was specified, using trialfun_general > In ft_definetrial at 123 evaluating trialfunction 'trialfun_general' readCTFds: Data set error : size of meg4 file(s) 0 bytes (from dir command) 179071200 bytes (from res4 file) reading the events from 'Subject01.ds\Subject01.res4' readCTFds: Data set error : size of meg4 file(s) 0 bytes (from dir command) 179071200 bytes (from res4 file) When using hdr = ft_read_header('Subject01.ds') or hdr = ft_read_header('Subject01.ds/Subject01.res4') I get this warning: Warning: adding D:\Vita\fieldtrip-20120124\external\ctf toolbox to your Matlab path readCTFds: Data set error : size of meg4 file(s) 0 bytes (from dir command) 179071200 bytes (from res4 file) together with this output: hdr = Fs: 300 nChans: 187 nSamples: 900 nSamplesPre: 300 nTrials: -1 label: {187x1 cell} grad: [1x1 struct] orig: [1x1 struct] chantype: {187x1 cell} chanunit: {187x1 cell} which according to the tutorial should be: hdr = Fs: 300 % sampling frequency nChans: 187 % number of channels nSamples: 900 % number of samples per trial nSamplesPre: 300 % number of pre-trigger samples in each trial nTrials: 266 % number of trials label: {187x1 cell} % cell-array with labels of each channel grad: [1x1 struct] % gradiometer structure orig: [1x1 struct] % additional header information What could go wrong? -------------- next part -------------- An HTML attachment was scrubbed... URL: From eelke.spaak at donders.ru.nl Fri Jan 27 13:27:28 2012 From: eelke.spaak at donders.ru.nl (Eelke Spaak) Date: Fri, 27 Jan 2012 13:27:28 +0100 Subject: [FieldTrip] (no subject) In-Reply-To: References: Message-ID: Dear Vita, On 27 January 2012 12:32, Cardinale, Vita (Stud. FPN / Alumni) wrote: > I get this warning: > > no trialfun was specified, using trialfun_general >> In ft_definetrial at 123 > evaluating trialfunction 'trialfun_general' This means that ft_definetrial is using trialfun_general as the function to determine the trials-of-interest in your data. This is the default if you do not specify cfg.trialfun yourself, and is the proper setting for running the tutorial. So, nothing to worry about here. > > Warning: adding D:\Vita\fieldtrip-20120124\external\ctf toolbox to your > Matlab path > Also as it should be; FT issues warnings whenever a toolbox is automatically added to your path. > readCTFds: Data set error : size of meg4 file(s) >            0 bytes (from dir command) >    179071200 bytes (from res4 file) > > > together with this output: > > > > hdr = > >              Fs: 300 >          nChans: 187 >        nSamples: 900 >     nSamplesPre: 300 >         nTrials: -1 >           label: {187x1 cell} >            grad: [1x1 struct] >            orig: [1x1 struct] >        chantype: {187x1 cell} >        chanunit: {187x1 cell} > > > > which according to the tutorial should be: > > > > hdr = > > > >              Fs: 300           % sampling frequency > >          nChans: 187           % number of channels > >        nSamples: 900           % number of samples per trial > >     nSamplesPre: 300           % number of pre-trigger samples in each trial > >         nTrials: 266           % number of trials > >           label: {187x1 cell}  % cell-array with labels of each channel > >            grad: [1x1 struct]  % gradiometer structure > >            orig: [1x1 struct]  % additional header information > This actually is indicative of a problem. The extra chantype and chanunit fields are fine, they are just new fields that were not present at the time the tutorial was written. The nTrials = -1 issue, together with the "data set error" message you mentioned, means that something is going wrong when reading in the data. The first thing that comes to mind on what causes this is improper directory settings. Since your e-mail was sent through the Donders SMTP server, I am guessing you are located at the DCCN, am I right? You could try specifying the full path to the test dataset: cfg.dataset = '/home/common/matlab/fieldtrip/data/Subject01.ds'; If that still does not work, let us know. Best, Eelke > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip From eelke.spaak at donders.ru.nl Fri Jan 27 13:51:51 2012 From: eelke.spaak at donders.ru.nl (Eelke Spaak) Date: Fri, 27 Jan 2012 13:51:51 +0100 Subject: [FieldTrip] (no subject) In-Reply-To: <4A2FF861-A393-4E73-A3B2-4B6EC00AA1A7@donders.ru.nl> References: <4A2FF861-A393-4E73-A3B2-4B6EC00AA1A7@donders.ru.nl> Message-ID: A PS from the esteemed Dr. Schoffelen: since you are working on a Windows machine, you should specify (again, this is DCCN-specific): cfg.dataset = 'H:/common/matlab/fieldtrip/data/Subject01.ds'; instead of using /home/... On 27 January 2012 13:39, jan-mathijs schoffelen wrote: > ....ze lijkt op een PC te werken. > > Gr, > > JM > > > On Jan 27, 2012, at 1:27 PM, Eelke Spaak wrote: > > Dear Vita, > > On 27 January 2012 12:32, Cardinale, Vita (Stud. FPN / Alumni) > wrote: > > I get this warning: > > > no trialfun was specified, using trialfun_general > > In ft_definetrial at 123 > > evaluating trialfunction 'trialfun_general' > > > This means that ft_definetrial is using trialfun_general as the > function to determine the trials-of-interest in your data. This is the > default if you do not specify cfg.trialfun yourself, and is the proper > setting for running the tutorial. So, nothing to worry about here. > > > Warning: adding D:\Vita\fieldtrip-20120124\external\ctf toolbox to your > > Matlab path > > > > Also as it should be; FT issues warnings whenever a toolbox is > automatically added to your path. > > readCTFds: Data set error : size of meg4 file(s) > >            0 bytes (from dir command) > >    179071200 bytes (from res4 file) > > > > together with this output: > > > > > hdr = > > >              Fs: 300 > >          nChans: 187 > >        nSamples: 900 > >     nSamplesPre: 300 > >         nTrials: -1 > >           label: {187x1 cell} > >            grad: [1x1 struct] > >            orig: [1x1 struct] > >        chantype: {187x1 cell} > >        chanunit: {187x1 cell} > > > > > which according to the tutorial should be: > > > > > hdr = > > > > >              Fs: 300           % sampling frequency > > >          nChans: 187           % number of channels > > >        nSamples: 900           % number of samples per trial > > >     nSamplesPre: 300           % number of pre-trigger samples in each trial > > >         nTrials: 266           % number of trials > > >           label: {187x1 cell}  % cell-array with labels of each channel > > >            grad: [1x1 struct]  % gradiometer structure > > >            orig: [1x1 struct]  % additional header information > > > > This actually is indicative of a problem. The extra chantype and > chanunit fields are fine, they are just new fields that were not > present at the time the tutorial was written. The nTrials = -1 issue, > together with the "data set error" message you mentioned, means that > something is going wrong when reading in the data. > > The first thing that comes to mind on what causes this is improper > directory settings. Since your e-mail was sent through the Donders > SMTP server, I am guessing you are located at the DCCN, am I right? > You could try specifying the full path to the test dataset: > > cfg.dataset = '/home/common/matlab/fieldtrip/data/Subject01.ds'; > > If that still does not work, let us know. > > Best, > Eelke > > > > _______________________________________________ > > 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 > From stephen.whitmarsh at gmail.com Fri Jan 27 14:45:21 2012 From: stephen.whitmarsh at gmail.com (Stephen Whitmarsh) Date: Fri, 27 Jan 2012 14:45:21 +0100 Subject: [FieldTrip] (no subject) In-Reply-To: References: Message-ID: Ouch, was called away and forgot to press send and now Eelke already answered ;-) Ah, well, just for sake of style, here's my 2 cents, i think its just a repetition of Eelke's anwer, which might be consoling by itself... Dear Vita, First of all, you should not be too alarmed at these specific *warnings*: no trialfun was specified, using trialfun_general > In ft_definetrial at 123 evaluating trialfunction 'trialfun_general' Indeed, you have not specified a trialfunction for now (but you will in the near future). This one: Warning: adding D:\Vita\fieldtrip-20120124\external\ctf toolbox to your Matlab path Is just to make you aware what is happening. If FieldTrip knows it needs extra folders added to the path it will try to do so itself (using the function ft_hastoolbox). This is very convenient since it allows you only to add the fieldtrip root folder and not all the subfolders which in some cases might cause conflicts with other matlab toolboxes. You can use the ft_defaults to add only the bare minumum. Then there is the error, which is a concern: readCTFds: Data set error : size of meg4 file(s) 0 bytes (from dir command) 179071200 bytes (from res4 file) Since you are a newbee, I'll ask the obvious question, don't take it personal ;-). It might have been a problem on this side, but its helps to check: Where on the path are you? type 'pwd' to know. Where is the subject.ds folder? if you type 'dir' it should be there. If not, add a path to the cfg.dataset. Perhaps you are *in* the .ds folder. In that case, get out, one branch back! Cheers, stephen On 27 January 2012 12:32, Cardinale, Vita (Stud. FPN / Alumni) wrote: > Dear all, > > I just started to use FIELDTRIP with going through the tutorial. Already > reading in the data from the tutorial is not working as it should. Here is > what I get when doing the trial definition for the fully incongruent (FIC) > condition from the tutorial > > “Trigger-based trial selection, Reading and preprocessing the interesting > trials”: > > > >  cfg                         = []; > >   cfg.dataset                 = 'Subject01.ds'; > >   cfg.trialdef.eventtype      = 'backpanel trigger'; > >   cfg.trialdef.eventvalue     = 3; % the value of the stimulus trigger for > fully incongruent (FIC). > >   cfg.trialdef.prestim        = 1; % in seconds > >   cfg.trialdef.poststim       = 2; % in seconds > > > >   cfg = ft_definetrial(cfg); > > > > I get this warning: > > > > no trialfun was specified, using trialfun_general >> In ft_definetrial at 123 > evaluating trialfunction 'trialfun_general' > > readCTFds: Data set error : size of meg4 file(s) >            0 bytes (from dir command) >    179071200 bytes (from res4 file) > > reading the events from 'Subject01.ds\Subject01.res4' > > readCTFds: Data set error : size of meg4 file(s) >            0 bytes (from dir command) >    179071200 bytes (from res4 file) > > > > When using hdr = ft_read_header('Subject01.ds') or hdr = > ft_read_header('Subject01.ds/Subject01.res4') > > I get this warning: > > > > Warning: adding D:\Vita\fieldtrip-20120124\external\ctf toolbox to your > Matlab path > > readCTFds: Data set error : size of meg4 file(s) >            0 bytes (from dir command) >    179071200 bytes (from res4 file) > > > together with this output: > > > > hdr = > >              Fs: 300 >          nChans: 187 >        nSamples: 900 >     nSamplesPre: 300 >         nTrials: -1 >           label: {187x1 cell} >            grad: [1x1 struct] >            orig: [1x1 struct] >        chantype: {187x1 cell} >        chanunit: {187x1 cell} > > > > which according to the tutorial should be: > > > > hdr = > > > >              Fs: 300           % sampling frequency > >          nChans: 187           % number of channels > >        nSamples: 900           % number of samples per trial > >     nSamplesPre: 300           % number of pre-trigger samples in each trial > >         nTrials: 266           % number of trials > >           label: {187x1 cell}  % cell-array with labels of each channel > >            grad: [1x1 struct]  % gradiometer structure > >            orig: [1x1 struct]  % additional header information > > > > What could go wrong? > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip From Lilla.Magyari at mpi.nl Fri Jan 27 15:17:34 2012 From: Lilla.Magyari at mpi.nl (Magyari, Lilla) Date: Fri, 27 Jan 2012 15:17:34 +0100 Subject: [FieldTrip] Source reconstruction with MNE problem: vol doen's fit sourcespace In-Reply-To: References: <804023878.857066.1327584774361.JavaMail.root@sculptor.zimbra.ru.nl> <1886031496.857328.1327585164114.JavaMail.root@sculptor.zimbra.ru.nl> Message-ID: <4F22B1FE.8090806@mpi.nl> hi Ion, yes, the tutorial script was written and tested in the following way: you have to align your volume to the ctf coordinate system (doesn't matter what was its original coordinate system), then reslice this re-aligned volume, then segment the resliced volume, then re-align to talairach the resliced volume (that has been re-aligned to ctf before). I hope it will work out. Lilla Ion Lavado wrote: > I think the problem is in the first steps, where i used neuromag > coordinates... and i have to work in CTF and then to Talairach... i'll > try it againg. > > 2012/1/27 Ion Lavado > > > Ok, thank you for your time Arjen. This is what i've done: > > > > > > *%READ AND REALINGN* > mri = > ft_read_mri('C:\Users\ilavado\Desktop\31_CW1AFMRI_ESG_ENDIKA_SANCHEZ_GOMEZ\1_028_t1_mpr_tra_p2_iso_20110314\31_CW1AFMRI_ESG_ENDIKA_SANCHEZ_GOMEZ_20110314_001_028_t1_mpr_tra_p2_iso.img'); > cfg = []; > cfg.interactive = 'yes'; > cfg.coordsys = 'neuromag'; > mri_other = ft_volumerealign(cfg,mri); > > *%RESLICING* > cfg = []; > cfg.resolution=1; > cfg.dim=[256 256 256]; > mrirs = ft_volumereslice(cfg, mri_other); > save mrirs; > > *%SEGMENTATION* > load mrirs; > cfg = []; > cfg.coordsys = 'neuromag'; > cfg.output={'skullstrip' 'brain'}; > seg = ft_volumesegment(cfg, mrirs) > save seg seg; > > *%REALING TO TALAIRACH* > load mrirs; > cfg=[]; > cfg.method='interactive'; > cfg.coordsys = 'neuromag'; > mri_tal=ft_volumerealign(cfg,mrirs); *%mrirs o mri_other???* > save mri_tal mri_tal > > > seg.transform = mri_tal.transform; > cfg = []; > cfg.filename = 'Subject29_mri_freesurfer2'; > cfg.filetype = 'mgz'; > cfg.parameter = 'anatomy'; > ft_volumewrite(cfg, mri_tal); > > cfg.filename = 'Subject29masked2'; > ft_volumewrite(cfg, seg); > > > > THE I CREATE ALL THE FILES (WITH THE TUTORIAL COMMANDS) WITH > FREESURFER with "Subject29masked2.mgz" and > "Subject29_mri_freesurfer2.mgz" > AND HERE IN THE SOURCE MODEL IS WHERE I GET THE PROBLEM. > > > *%CREATE THE MESH* > bnd = ft_read_headshape('29_mri-oct-6-src.fif', 'format', 'mne_source'); > figure;ft_plot_mesh(bnd); > > > *%CO-REGISTRATION* > mri_norm = > ft_read_mri('/home/mlizarazu/public/Exchange/Mikel/Subject29/mri/orig-nomask.mgz'); > cfg = []; > cfg.method = 'interactive'; > mri_norm_ctf = ft_volumerealign(cfg, mri_norm); > > > mri_norm_ctf = ft_convert_units(mri_norm_ctf, 'cm'); > T = mri_norm_ctf.transform*inv(mri_norm_ctf.transformorig); > bnd = ft_read_headshape('29_mri-oct-6-src.fif', 'format', > 'mne_source'); > sourcespace = ft_convert_units(bnd, 'cm'); > sourcespace = ft_transform_geometry(T, sourcespace); > > > *%VOLUME MODEL* > cfg = []; > cfg.coordsys = 'spm'; > cfg.output = {'brain'}; > seg = ft_volumesegment(cfg, mri_norm); > > cfg = []; > vol = ft_prepare_singleshell(cfg,seg); > vol.bnd = ft_transform_geometry(T, vol.bnd); > > *%PLOT* > figure;hold on; > ft_plot_vol(vol, 'facecolor', 'none');alpha 0.5; > ft_plot_mesh(sourcespace_ctf, 'edgecolor', 'none'); camlight > > > > > When plotting i have the problem that you see in the photos... Hope > we can solve this. > > Thank you. > > > > Best whises > > > Ion > > > > > > > > 2012/1/26 Stolk, A. > > > Hi Ion, > > > > Could you specify some more details so we can reproduce your > bug. Preferably by including a small test script with the same > operations applied to the testdata (as in the tutorial). > > > > Best regards, > > Arjen > > > ----- "Ion Lavado" > > schreef: > > Van: "Ion Lavado" > > > Aan: "Email discussion list for the FieldTrip project" > > > > Verzonden: Donderdag 26 januari 2012 13:39:41 > > Onderwerp: Re: [FieldTrip] Source reconstruction with MNE > problem: vol doen's fit sourcespace > > > > > Thank you for your help. I realigned it to Tailarach prior to > freesurfer processing. Any idea? > > > > > Ion > > > > 2012/1/19 Stolk, A. > > > > > > > > Hi Ion, > > > > Did you realign your anatomical image to Talairach space > (and not accidentally to MNI space) prior to the processing > with Freesurfer? > > > > http://imaging.mrc-cbu.cam.ac.uk/imaging/FindingCommissures > > > > Best regards, > > Arjen > > > > > > ----- "Ion Lavado" > schreef: > > > Van: "Ion Lavado" > > > > Aan: fieldtrip at donders.ru.nl > > > > Verzonden: Donderdag 19 januari 2012 09:25:16 > > > Onderwerp: [FieldTrip] Source reconstruction with MNE > problem: vol doen's fit sourcespace > > > > > > > > > Hello, i'm trying a source reconstruction of event > related fields using minimun-norm estimates and i get a > problem with vol and sourcespace. When plot them together > the vol doesn't fit the sourcespace. I adjunted in the mail > two images where you can see what i get. It looks like that > there isn't any problem of coordinate system also the units > seem to be ok. I also procesed all the file with freesurfer > so i suppose there is no problem with the orig-nomask.mgz. > > > > Hope anyone can help me. Thank you very much. > > > > > Ion > > > > > _______________________________________________ > > > 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 > > > > > ------------------------------------------------------------------------ > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -- PhD student Language and Cognition Group research assistant Neurobiology of Language Group Max Planck Institute for Psycholinguistics Nijmegen, P.O. Box 310, 6500AH, the Netherlands Phone: 0031 24 3521561 From m.cardinale at student.maastrichtuniversity.nl Fri Jan 27 15:59:04 2012 From: m.cardinale at student.maastrichtuniversity.nl (Cardinale, Vita (Stud. FPN / Alumni)) Date: Fri, 27 Jan 2012 15:59:04 +0100 Subject: [FieldTrip] (no subject) In-Reply-To: References: , Message-ID: Dear Stephen en Eelke, Thank you for your fast answer! It works now :)! Don't worry, I'll take it only a little personal ;)... Thanks, Vita ________________________________________ Von: fieldtrip-bounces at donders.ru.nl [fieldtrip-bounces at donders.ru.nl] im Auftrag von Stephen Whitmarsh [stephen.whitmarsh at gmail.com] Gesendet: Freitag, 27. Januar 2012 14:45 An: Email discussion list for the FieldTrip project Betreff: Re: [FieldTrip] (no subject) Ouch, was called away and forgot to press send and now Eelke already answered ;-) Ah, well, just for sake of style, here's my 2 cents, i think its just a repetition of Eelke's anwer, which might be consoling by itself... Dear Vita, First of all, you should not be too alarmed at these specific *warnings*: no trialfun was specified, using trialfun_general > In ft_definetrial at 123 evaluating trialfunction 'trialfun_general' Indeed, you have not specified a trialfunction for now (but you will in the near future). This one: Warning: adding D:\Vita\fieldtrip-20120124\external\ctf toolbox to your Matlab path Is just to make you aware what is happening. If FieldTrip knows it needs extra folders added to the path it will try to do so itself (using the function ft_hastoolbox). This is very convenient since it allows you only to add the fieldtrip root folder and not all the subfolders which in some cases might cause conflicts with other matlab toolboxes. You can use the ft_defaults to add only the bare minumum. Then there is the error, which is a concern: readCTFds: Data set error : size of meg4 file(s) 0 bytes (from dir command) 179071200 bytes (from res4 file) Since you are a newbee, I'll ask the obvious question, don't take it personal ;-). It might have been a problem on this side, but its helps to check: Where on the path are you? type 'pwd' to know. Where is the subject.ds folder? if you type 'dir' it should be there. If not, add a path to the cfg.dataset. Perhaps you are *in* the .ds folder. In that case, get out, one branch back! Cheers, stephen On 27 January 2012 12:32, Cardinale, Vita (Stud. FPN / Alumni) wrote: > Dear all, > > I just started to use FIELDTRIP with going through the tutorial. Already > reading in the data from the tutorial is not working as it should. Here is > what I get when doing the trial definition for the fully incongruent (FIC) > condition from the tutorial > > “Trigger-based trial selection, Reading and preprocessing the interesting > trials”: > > > > cfg = []; > > cfg.dataset = 'Subject01.ds'; > > cfg.trialdef.eventtype = 'backpanel trigger'; > > cfg.trialdef.eventvalue = 3; % the value of the stimulus trigger for > fully incongruent (FIC). > > cfg.trialdef.prestim = 1; % in seconds > > cfg.trialdef.poststim = 2; % in seconds > > > > cfg = ft_definetrial(cfg); > > > > I get this warning: > > > > no trialfun was specified, using trialfun_general >> In ft_definetrial at 123 > evaluating trialfunction 'trialfun_general' > > readCTFds: Data set error : size of meg4 file(s) > 0 bytes (from dir command) > 179071200 bytes (from res4 file) > > reading the events from 'Subject01.ds\Subject01.res4' > > readCTFds: Data set error : size of meg4 file(s) > 0 bytes (from dir command) > 179071200 bytes (from res4 file) > > > > When using hdr = ft_read_header('Subject01.ds') or hdr = > ft_read_header('Subject01.ds/Subject01.res4') > > I get this warning: > > > > Warning: adding D:\Vita\fieldtrip-20120124\external\ctf toolbox to your > Matlab path > > readCTFds: Data set error : size of meg4 file(s) > 0 bytes (from dir command) > 179071200 bytes (from res4 file) > > > together with this output: > > > > hdr = > > Fs: 300 > nChans: 187 > nSamples: 900 > nSamplesPre: 300 > nTrials: -1 > label: {187x1 cell} > grad: [1x1 struct] > orig: [1x1 struct] > chantype: {187x1 cell} > chanunit: {187x1 cell} > > > > which according to the tutorial should be: > > > > hdr = > > > > Fs: 300 % sampling frequency > > nChans: 187 % number of channels > > nSamples: 900 % number of samples per trial > > nSamplesPre: 300 % number of pre-trigger samples in each trial > > nTrials: 266 % number of trials > > label: {187x1 cell} % cell-array with labels of each channel > > grad: [1x1 struct] % gradiometer structure > > orig: [1x1 struct] % additional header information > > > > What could go wrong? > > > _______________________________________________ > 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 From Ulrich.Pomper at charite.de Fri Jan 27 16:34:58 2012 From: Ulrich.Pomper at charite.de (Pomper, Ulrich) Date: Fri, 27 Jan 2012 16:34:58 +0100 Subject: [FieldTrip] Defining cfg.neighbourdist at source level Message-ID: <4F22C422.4080906@charite.de> Dear list members, I am trying to perform a cluster based permutation test on power values at source level. I managed to run the test using just the time and frequency dimensions (cfg.neighbourdist = []) but I am struggling with the issue of how to define the neighbourdist parameter. I've looked through the tutorial, the FT site as well as through the mailinglist but couldn't find an answer, so I'd really appreciate any hint on this. Thanks a lot, Ulrich -------------- next part -------------- An HTML attachment was scrubbed... URL: From m_wink10 at uni-muenster.de Fri Jan 27 16:42:09 2012 From: m_wink10 at uni-muenster.de (Martin Winkels) Date: Fri, 27 Jan 2012 16:42:09 +0100 Subject: [FieldTrip] Sourcestatistics - Problem Message-ID: Hello, we are working with the ft_sourcestatistics function and we are facing some problems. We got some very well known data, our subjects just have been stimulated left and right hand. We are calculating right vs left hand data. The calculated GrandAVG-data looks very good, you can see this in the attached files. (GAVG_LEFT and GAVG_RIGHT). We got activity in the left and right brain hemisphere, localized at single spot. Now I wanted to calculate a statistic for this subject and I got some weird results. If you look up the file statplot.jpg you can see that the positive cluster looks quite okay but the negative cluster only looks good in the upper right corner but then it is distributed all over the brain till the lower left corner. Based on the GAVG-results this cant be. I also attached the data itself and a script to show the GAVG data as well as the script to calculate the data. I would be very very pleased if somebody could help me with that issue, I've been working on this for a while now. I have uploaded the data to the recommended filehoster: http://www.sendspace.com/filegroup/sJhI%2F5uBRdJI6JGXUjWtPA There are two files that belong together, you can extract them and there will be a .mat structure, the m-files and three pictures. Thanks, Martin I post the code as an attachment to this email: function calc_stat( ~ ) %%UNTITLED2 Summary of this function goes here % Detailed explanation goes here %path to grandAVG mat-file load ('/media/sonja1/MatlabAnalysis/Martin/SEF/sourcestatistics/GrandAVG/grandAVG.mat'); sourcePost = GA_RIGHT; sourcePre = GA_LEFT; %% % configfile for calculating the statistics cfg = []; cfg.channel = {'MEG'}; cfg.latency = [0 1]; cfg.parameter = 'pow'; cfg.dim = sourcePre.dim; cfg_neighb.method = 'template'; cfg.template = 'CTF275_neighb.mat'; cfg.neighbours = ft_prepare_neighbours(cfg_neighb, GA_RIGHT.nei); cfg.method = 'montecarlo'; cfg.statistic = 'depsamplesT'; cfg.correctm = 'cluster'; cfg.tail = 0; % -1, 1 or 0 (default = 0); one-sided or two-sided test cfg.clusteralpha = 0.05; % alpha level of the sample-specific test statistic that will be used for thresholding cfg.clusterstatistic = 'maxsum'; % test statistic that will be evaluated under the permutation distribution. cfg.minnbchan = 2; % minimum number of neighborhood channels that is required for a selected cfg.clustertail = 0; cfg.alpha = 0.025; % alpha level of the permutation test cfg.numrandomization = 100; % number of draws from the permutation distribution nsubj=length(sourcePre.trial); cfg.design(1,:) = [1:nsubj 1:nsubj]; cfg.design(2,:) = [ones(1,nsubj) ones(1,nsubj)*2]; cfg.uvar = 1; % row of design matrix that contains unit variable (in this case: subjects) cfg.ivar = 2; % row of design matrix that contains independent variable (the conditions) stat = ft_sourcestatistics(cfg, sourcePost, sourcePre); %% %Plot the statistics cfg = []; cfg.method = 'ortho'; cfg.interactive = 'yes'; cfg.funparameter = 'stat'; %stat.mask = ones(stat.dim); cfg.maskparameter = 'mask'; %cfg.maskparameter = 'mask'; cfg.funcolorlim = [-10 10]; cfg.opacitymap = 'vdown'; cfg.opacitylim = 'maxabs'; cfg.anatomy = GA_RIGHT.anatomy; stat.anatomy = GA_RIGHT.anatomy; figure ft_sourceplot(cfg, stat) end -------------- next part -------------- An HTML attachment was scrubbed... URL: From akiko.ikkai at gmail.com Fri Jan 27 17:36:36 2012 From: akiko.ikkai at gmail.com (Akiko Ikkai) Date: Fri, 27 Jan 2012 11:36:36 -0500 Subject: [FieldTrip] ft_prepare_bemmodel: vol.mat is NaN Message-ID: Hi, I'm wondering if there has been more conversations on the post "function prepare_bemmodel: resulting BEM system matrix is NaN", dated back to 2/17/2010. I have the same problem and would love to know how to work around it. In short, I'm trying to create a volume conduction model for my EEG data based on subjects' segmented anatomical MRI ('scalp','skull','brain'). ft_prepare_bemmodel creates vol that can be plotted nicely (using ft_plot_vol), but vol.mat is all Nan. I tracked down the error to be originated in ft_prepare_bemmodel, line 162 (20110525 version) C21 = bem_Cij_lin(vol.bnd(2).pnt,vol.bnd(1).pnt,vol.bnd(1).tri, weight,defl(1)); the original post suggests to 1) find where NaN are, 2) check their actual location in vol.bnd(1).pnt and in vol.bnd(1).tri, and then 3) correct the mesh, by removing the collapsed vertex/triangle. I was able to find where NaN are in C21, but am stuck at how to proceed from here. If anyone has suggestions on how I could go from here, it'll be greatly appreciated. Thanks in advance, Akiko -- Akiko Ikkai, Ph.D. Postdoctoral Fellow Department of Psychological and Brain Sciences Johns Hopkins University Ames Hall, 3400 N. Charles St. Baltimore, MD 21218 -------------- next part -------------- An HTML attachment was scrubbed... URL: From smoratti at psi.ucm.es Fri Jan 27 20:59:37 2012 From: smoratti at psi.ucm.es (smoratti at psi.ucm.es) Date: Fri, 27 Jan 2012 20:59:37 +0100 Subject: [FieldTrip] Sourcestatistics - Problem In-Reply-To: References: Message-ID: <6D2A2F2C-D0A2-4D94-9017-5193666EBEC9@psi.ucm.es> Hi Martin, Sometimes it might be useful to decrease the cluster alpha p value (e.g. 0.01). This prevents too much clustering and favors your strong effects. Maybe this helps. 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 27/01/2012, a las 16:42, Martin Winkels escribió: > Hello, > > we are working with the ft_sourcestatistics function and we are facing some problems. > > > We got some very well known data, our subjects just have been stimulated left and right hand. We are calculating right vs left hand data. The calculated GrandAVG-data looks very good, you can see this in the attached files. (GAVG_LEFT and GAVG_RIGHT). We got activity in the left and right brain hemisphere, localized at single spot. > > Now I wanted to calculate a statistic for this subject and I got some weird results. If you look up the file statplot.jpg you can see that the positive cluster looks quite okay but the negative cluster only looks good in the upper right corner but then it is distributed all over the brain till the lower left corner. > > Based on the GAVG-results this cant be. I also attached the data itself and a script to show the GAVG data as well as the script to calculate the data. > > I would be very very pleased if somebody could help me with that issue, I've been working on this for a while now. > > > > I have uploaded the data to the recommended filehoster: > > http://www.sendspace.com/filegroup/sJhI%2F5uBRdJI6JGXUjWtPA > > There are two files that belong together, you can extract them and there will be a .mat structure, the m-files and three pictures. > > > > Thanks, Martin > > I post the code as an attachment to this email: > > function calc_stat( ~ ) > %%UNTITLED2 Summary of this function goes here > % Detailed explanation goes here > > %path to grandAVG mat-file > load ('/media/sonja1/MatlabAnalysis/Martin/SEF/sourcestatistics/GrandAVG/grandAVG.mat'); > sourcePost = GA_RIGHT; > sourcePre = GA_LEFT; > > %% > % configfile for calculating the statistics > cfg = []; > cfg.channel = {'MEG'}; > cfg.latency = [0 1]; > > cfg.parameter = 'pow'; > cfg.dim = sourcePre.dim; > > cfg_neighb.method = 'template'; > cfg.template = 'CTF275_neighb.mat'; > cfg.neighbours = ft_prepare_neighbours(cfg_neighb, GA_RIGHT.nei); > > cfg.method = 'montecarlo'; > cfg.statistic = 'depsamplesT'; > cfg.correctm = 'cluster'; > > cfg.tail = 0; % -1, 1 or 0 (default = 0); one-sided or two-sided test > cfg.clusteralpha = 0.05; % alpha level of the sample-specific test statistic that will be used for thresholding > cfg.clusterstatistic = 'maxsum'; % test statistic that will be evaluated under the permutation distribution. > cfg.minnbchan = 2; % minimum number of neighborhood channels that is required for a selected > cfg.clustertail = 0; > cfg.alpha = 0.025; % alpha level of the permutation test > cfg.numrandomization = 100; % number of draws from the permutation distribution > > > nsubj=length(sourcePre.trial); > cfg.design(1,:) = [1:nsubj 1:nsubj]; > cfg.design(2,:) = [ones(1,nsubj) ones(1,nsubj)*2]; > cfg.uvar = 1; % row of design matrix that contains unit variable (in this case: subjects) > cfg.ivar = 2; % row of design matrix that contains independent variable (the conditions) > > stat = ft_sourcestatistics(cfg, sourcePost, sourcePre); > > %% > %Plot the statistics > cfg = []; > cfg.method = 'ortho'; > cfg.interactive = 'yes'; > cfg.funparameter = 'stat'; > %stat.mask = ones(stat.dim); > cfg.maskparameter = 'mask'; > %cfg.maskparameter = 'mask'; > cfg.funcolorlim = [-10 10]; > > cfg.opacitymap = 'vdown'; > cfg.opacitylim = 'maxabs'; > > > cfg.anatomy = GA_RIGHT.anatomy; > stat.anatomy = GA_RIGHT.anatomy; > > figure > ft_sourceplot(cfg, stat) > > end > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -------------- next part -------------- An HTML attachment was scrubbed... URL: From r.oostenveld at donders.ru.nl Sat Jan 28 16:08:32 2012 From: r.oostenveld at donders.ru.nl (Robert Oostenveld) Date: Sat, 28 Jan 2012 16:08:32 +0100 Subject: [FieldTrip] ft_prepare_bemmodel: vol.mat is NaN In-Reply-To: References: Message-ID: Hi Akiko The triangulated mesh might look nice, but that is not yet a guarantee that it is suitable for BEM computations. Cristiano (CC) has been working on a set of fieldtrip functions to create, manipulate and check surface meshes. Those functions are not yet in fieldtrip, but perhaps this would be the time to give them a try. Could you send us the surfaces that you feed into ft_prepare_bemmodel as a mat file, together with the cfg? Cristiano can then have a look at them with his function, which hopefully will poinpoint the geometrical problem that is causing the numerical issue. best Robert PS see http://fieldtrip.fcdonders.nl/faq/how_should_i_send_example_data_to_the_developers On 27 Jan 2012, at 17:36, Akiko Ikkai wrote: > Hi, > > I'm wondering if there has been more conversations on the post "function prepare_bemmodel: resulting BEM system matrix is NaN", dated back to 2/17/2010. I have the same problem and would love to know how to work around it. In short, I'm trying to create a volume conduction model for my EEG data based on subjects' segmented anatomical MRI ('scalp','skull','brain'). ft_prepare_bemmodel creates vol that can be plotted nicely (using ft_plot_vol), but vol.mat is all Nan. I tracked down the error to be originated in ft_prepare_bemmodel, line 162 (20110525 version) > > C21 = bem_Cij_lin(vol.bnd(2).pnt,vol.bnd(1).pnt,vol.bnd(1).tri, weight,defl(1)); > > the original post suggests to 1) find where NaN are, 2) check their actual location in vol.bnd(1).pnt and in vol.bnd(1).tri, and then 3) correct the mesh, by removing the collapsed vertex/triangle. I was able to find where NaN are in C21, but am stuck at how to proceed from here. > > If anyone has suggestions on how I could go from here, it'll be greatly appreciated. > Thanks in advance, Akiko > > -- > Akiko Ikkai, Ph.D. > Postdoctoral Fellow > Department of Psychological and Brain Sciences > Johns Hopkins University > Ames Hall, 3400 N. Charles St. > Baltimore, MD 21218 > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -------------- next part -------------- An HTML attachment was scrubbed... URL: From m_wink10 at uni-muenster.de Sat Jan 28 16:25:07 2012 From: m_wink10 at uni-muenster.de (Martin Winkels) Date: Sat, 28 Jan 2012 16:25:07 +0100 Subject: [FieldTrip] Sourcestatistics - Problem In-Reply-To: <6D2A2F2C-D0A2-4D94-9017-5193666EBEC9@psi.ucm.es> References: <6D2A2F2C-D0A2-4D94-9017-5193666EBEC9@psi.ucm.es> Message-ID: Hello Stephan, thanks for the answer. It helps, but only a little bit. Do you have any more suggestions? Thanks, Martin On Fri, Jan 27, 2012 at 8:59 PM, smoratti at psi.ucm.es wrote: > Hi Martin, > > Sometimes it might be useful to decrease the cluster alpha p value (e.g. > 0.01). This prevents too much clustering and favors your strong effects. > Maybe this helps. > > 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 27/01/2012, a las 16:42, Martin Winkels escribió: > > Hello, > > we are working with the ft_sourcestatistics function and we are facing > some problems. > > > We got some very well known data, our subjects just have been stimulated > left and right hand. We are calculating right vs left hand data. The > calculated GrandAVG-data looks very good, you can see this in the attached > files. (GAVG_LEFT and GAVG_RIGHT). We got activity in the left and right > brain hemisphere, localized at single spot. > > Now I wanted to calculate a statistic for this subject and I got some > weird results. If you look up the file statplot.jpg you can see that the > positive cluster looks quite okay but the negative cluster only looks good > in the upper right corner but then it is distributed all over the brain > till the lower left corner. > > Based on the GAVG-results this cant be. I also attached the data itself > and a script to show the GAVG data as well as the script to calculate the > data. > > I would be very very pleased if somebody could help me with that issue, > I've been working on this for a while now. > > > > I have uploaded the data to the recommended filehoster: > > http://www.sendspace.com/filegroup/sJhI%2F5uBRdJI6JGXUjWtPA > > There are two files that belong together, you can extract them and there > will be a .mat structure, the m-files and three pictures. > > > > Thanks, Martin > > I post the code as an attachment to this email: > > function calc_stat( ~ ) > %%UNTITLED2 Summary of this function goes here > % Detailed explanation goes here > > %path to grandAVG mat-file > load > ('/media/sonja1/MatlabAnalysis/Martin/SEF/sourcestatistics/GrandAVG/grandAVG.mat'); > > sourcePost = GA_RIGHT; > sourcePre = GA_LEFT; > > %% > % configfile for calculating the statistics > cfg = []; > cfg.channel = {'MEG'}; > cfg.latency = [0 1]; > > cfg.parameter = 'pow'; > cfg.dim = sourcePre.dim; > > cfg_neighb.method = 'template'; > cfg.template = 'CTF275_neighb.mat'; > cfg.neighbours = ft_prepare_neighbours(cfg_neighb, GA_RIGHT.nei); > > cfg.method = 'montecarlo'; > cfg.statistic = 'depsamplesT'; > cfg.correctm = 'cluster'; > > cfg.tail = 0; % -1, 1 or 0 (default = 0); one-sided or > two-sided test > cfg.clusteralpha = 0.05; % alpha level of the sample-specific test > statistic that will be used for thresholding > cfg.clusterstatistic = 'maxsum'; % test statistic that will be evaluated > under the permutation distribution. > cfg.minnbchan = 2; % minimum number of neighborhood channels > that is required for a selected > cfg.clustertail = 0; > cfg.alpha = 0.025; % alpha level of the permutation test > cfg.numrandomization = 100; % number of draws from the permutation > distribution > > > nsubj=length(sourcePre.trial); > cfg.design(1,:) = [1:nsubj 1:nsubj]; > cfg.design(2,:) = [ones(1,nsubj) ones(1,nsubj)*2]; > cfg.uvar = 1; % row of design matrix that contains unit variable > (in this case: subjects) > cfg.ivar = 2; % row of design matrix that contains independent > variable (the conditions) > > stat = ft_sourcestatistics(cfg, sourcePost, sourcePre); > > %% > %Plot the statistics > cfg = []; > cfg.method = 'ortho'; > cfg.interactive = 'yes'; > cfg.funparameter = 'stat'; > %stat.mask = ones(stat.dim); > cfg.maskparameter = 'mask'; > %cfg.maskparameter = 'mask'; > cfg.funcolorlim = [-10 10]; > > cfg.opacitymap = 'vdown'; > cfg.opacitylim = 'maxabs'; > > > cfg.anatomy = GA_RIGHT.anatomy; > stat.anatomy = GA_RIGHT.anatomy; > > figure > ft_sourceplot(cfg, stat) > > end > > > _______________________________________________ > 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 alotof_xd at yahoo.com Sun Jan 29 08:52:37 2012 From: alotof_xd at yahoo.com (alotof eve) Date: Sat, 28 Jan 2012 23:52:37 -0800 (PST) Subject: [FieldTrip] Where can I get 4D layout for MEG result? Message-ID: <1327823557.22249.YahooMailNeo@web125502.mail.ne1.yahoo.com> Hi, everyone, Out MEG is 4D and I checked that we should use 4D248.lay but I cannot find this file. Can anyone tell me where I can download such a file? Thanks Duo -------------- next part -------------- An HTML attachment was scrubbed... URL: From Don.Rojas at ucdenver.edu Sun Jan 29 16:36:58 2012 From: Don.Rojas at ucdenver.edu (Rojas, Don) Date: Sun, 29 Jan 2012 08:36:58 -0700 Subject: [FieldTrip] Where can I get 4D layout for MEG result? In-Reply-To: <1327823557.22249.YahooMailNeo@web125502.mail.ne1.yahoo.com> References: <1327823557.22249.YahooMailNeo@web125502.mail.ne1.yahoo.com> Message-ID: <9DDF9E6E-FFB8-4E56-BE13-B9B5C73735D1@ucdenver.edu> It is in your fieldtrip distribution, in the template/layout/ subdirectory. But you can just use it with any function that takes a layout by specifying: cfg.layout = '4D248.lay' On Jan 29, 2012, at 12:52 AM, alotof eve wrote: Hi, everyone, Out MEG is 4D and I checked that we should use 4D248.lay but I cannot find this file. Can anyone tell me where I can download such a file? Thanks Duo _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip ----------------------- Don Rojas, Ph.D. Associate Professor of Psychiatry U. of Colorado Denver Anschutz Medical Campus Director, UCD Magnetoencephalography Lab 13001 E. 17th Pl F546 Aurora, CO 80045 303-724-4994 -------------- next part -------------- An HTML attachment was scrubbed... URL: From alotof_xd at yahoo.com Mon Jan 30 07:44:01 2012 From: alotof_xd at yahoo.com (alotof eve) Date: Sun, 29 Jan 2012 22:44:01 -0800 (PST) Subject: [FieldTrip] Where can I get 4D layout for MEG result? In-Reply-To: <1327903969.63327.YahooMailNeo@web125501.mail.ne1.yahoo.com> References: <1327823557.22249.YahooMailNeo@web125502.mail.ne1.yahoo.com> <9DDF9E6E-FFB8-4E56-BE13-B9B5C73735D1@ucdenver.edu> <1327903969.63327.YahooMailNeo@web125501.mail.ne1.yahoo.com> Message-ID: <1327905841.32374.YahooMailNeo@web125502.mail.ne1.yahoo.com> ----- Forwarded Message ----- From: alotof eve To: "Rojas, Don" Sent: Sunday, January 29, 2012 10:12 PM Subject: Re: [FieldTrip] Where can I get 4D layout for MEG result? Thank Don. In fact I asked the question because I met problem when I using the layout that I thought it's something wrong. I am doing ica and using: ft_topoplotIC(cfg,comp), then got the error message: reading layout from file 4D248.lay Error using dataread Trouble reading floating point number from file (row 1, field 1) ==> \n Error in textread (line 176) [varargout{1:nlhs}]=dataread('file',varargin{:}); Error in ft_prepare_layout>readlay (line 670) [chNum,X,Y,Width,Height,Lbl,Rem] = textread(filename,'%f %f %f %f %f %q %q'); Error in ft_prepare_layout (line 222)   lay = readlay(cfg.layout); Error in ft_topoplotER (line 433) lay = ft_prepare_layout(cfg, data); Error in ft_topoplotIC (line 116)     ft_topoplotER(cfg, varargin{:}); Can anyone help me on this? Thanks, Duo ________________________________ From: "Rojas, Don" To: alotof eve ; Email discussion list for the FieldTrip project Sent: Sunday, January 29, 2012 7:36 AM Subject: Re: [FieldTrip] Where can I get 4D layout for MEG result? It is in your fieldtrip distribution, in the template/layout/ subdirectory. But you can just use it with any function that takes a layout by specifying: cfg.layout = '4D248.lay' On Jan 29, 2012, at 12:52 AM, alotof eve wrote: Hi, everyone, > > >Out MEG is 4D and I checked that we should use 4D248.lay but I cannot find this file. Can anyone tell me where I can download such a file? > > > >Thanks >Duo_______________________________________________ >fieldtrip mailing list >fieldtrip at donders.ru.nl >http://mailman.science.ru.nl/mailman/listinfo/fieldtrip ----------------------- Don Rojas, Ph.D. Associate Professor of Psychiatry U. of Colorado Denver Anschutz Medical Campus Director, UCD Magnetoencephalography Lab 13001 E. 17th Pl F546 Aurora, CO 80045 303-724-4994 -------------- next part -------------- An HTML attachment was scrubbed... URL: From jm.horschig at donders.ru.nl Mon Jan 30 16:37:02 2012 From: jm.horschig at donders.ru.nl (=?ISO-8859-1?Q?=22J=F6rn_M=2E_Horschig=22?=) Date: Mon, 30 Jan 2012 16:37:02 +0100 Subject: [FieldTrip] Defining cfg.neighbourdist at source level In-Reply-To: <4F22C422.4080906@charite.de> References: <4F22C422.4080906@charite.de> Message-ID: <4F26B91E.2050200@donders.ru.nl> Dear Ulrich, I think you are confusing some things there. cfg.neighbourdist is a setting for defining neighbouring /sensors/, thus it's not applicable for source level statistics (see ft_prepare_neighbours). However, I never did cluster-based permutation test on source-level in FieldTrip, but for me it seems that it just works by taking neighbouring voxels as neighbours. So, you shouldn't need to define anything special for running sourcelevel stats (if I am wrong, someone with more experience should correct me here). But, maybe you meant to write sensor level, but wrote source level - in that case I'd be happy to help. Best, Jörn On 1/27/2012 4:34 PM, Pomper, Ulrich wrote: > Dear list members, > I am trying to perform a cluster based permutation test on power > values at source level. > I managed to run the test using just the time and frequency dimensions > (cfg.neighbourdist = []) > but I am struggling with the issue of how to define the neighbourdist > parameter. > I've looked through the tutorial, the FT site as well as through the > mailinglist but couldn't find an answer, so I'd really appreciate any > hint on this. > > Thanks a lot, > Ulrich > > > > > > _______________________________________________ > 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 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 Ulrich.Pomper at charite.de Mon Jan 30 16:58:58 2012 From: Ulrich.Pomper at charite.de (Pomper, Ulrich) Date: Mon, 30 Jan 2012 16:58:58 +0100 Subject: [FieldTrip] Defining cfg.neighbourdist at source level In-Reply-To: <4F26B91E.2050200@donders.ru.nl> References: <4F22C422.4080906@charite.de> <4F26B91E.2050200@donders.ru.nl> Message-ID: <4F26BE42.5030204@charite.de> Dear Jörn, Thanks for you reply. I did mean source-level, so like you said, I am trying to define the neighbouring voxels for each voxel. As far as I understand, leaving cfg.neighbours blank means that the clustering is done over the time and frequency dimensions only, not over space. The FT help reads: %If you specify an empty neighbourhood structure, clustering will only be done in frequency and time (if available) and not over neighbouring channels. Has anybody done clustering in source space using all three dimensions and could explain how this works? Cheers, Ulrich On 30.01.2012 16:37, "Jörn M. Horschig" wrote: Dear Ulrich, I think you are confusing some things there. cfg.neighbourdist is a setting for defining neighbouring sensors, thus it's not applicable for source level statistics (see ft_prepare_neighbours). However, I never did cluster-based permutation test on source-level in FieldTrip, but for me it seems that it just works by taking neighbouring voxels as neighbours. So, you shouldn't need to define anything special for running sourcelevel stats (if I am wrong, someone with more experience should correct me here). But, maybe you meant to write sensor level, but wrote source level - in that case I'd be happy to help. Best, Jörn On 1/27/2012 4:34 PM, Pomper, Ulrich wrote: Dear list members, I am trying to perform a cluster based permutation test on power values at source level. I managed to run the test using just the time and frequency dimensions (cfg.neighbourdist = []) but I am struggling with the issue of how to define the neighbourdist parameter. I've looked through the tutorial, the FT site as well as through the mailinglist but couldn't find an answer, so I'd really appreciate any hint on this. Thanks a lot, Ulrich _______________________________________________ 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 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 r.oostenveld at donders.ru.nl Tue Jan 31 15:37:52 2012 From: r.oostenveld at donders.ru.nl (Robert Oostenveld) Date: Tue, 31 Jan 2012 15:37:52 +0100 Subject: [FieldTrip] Defining cfg.neighbourdist at source level In-Reply-To: <4F26BE42.5030204@charite.de> References: <4F22C422.4080906@charite.de> <4F26B91E.2050200@donders.ru.nl> <4F26BE42.5030204@charite.de> Message-ID: Dear Ulrich If your source locations are defined on a regular 3D grid that can be represented as volume, then the neighbours are trivial to find and you do not have to specify a structure for the neighbours. If you have done source reconstruction on a 3D folded cortical sheet that is defined by a triangulated surface, then it is also possible to cluster along the surface. I don't know the details for the cortical sheet clustering from the top of my head, if you are interested please let me know and I'll look them up. best Robert On 30 Jan 2012, at 16:58, Pomper, Ulrich wrote: > Dear Jörn, > Thanks for you reply. I did mean source-level, so like you said, I am trying to define the neighbouring voxels for each voxel. > As far as I understand, leaving cfg.neighbours blank means that the clustering is done over the time and frequency dimensions only, not over space. > The FT help reads: > %If you specify an empty neighbourhood structure, clustering will only be done in frequency and time (if available) and not over neighbouring channels. > > Has anybody done clustering in source space using all three dimensions and could explain how this works? > Cheers, > Ulrich > -------------- next part -------------- An HTML attachment was scrubbed... URL: From r.oostenveld at donders.ru.nl Tue Jan 31 15:41:22 2012 From: r.oostenveld at donders.ru.nl (Robert Oostenveld) Date: Tue, 31 Jan 2012 15:41:22 +0100 Subject: [FieldTrip] Where can I get 4D layout for MEG result? In-Reply-To: <1327905841.32374.YahooMailNeo@web125502.mail.ne1.yahoo.com> References: <1327823557.22249.YahooMailNeo@web125502.mail.ne1.yahoo.com> <9DDF9E6E-FFB8-4E56-BE13-B9B5C73735D1@ucdenver.edu> <1327903969.63327.YahooMailNeo@web125501.mail.ne1.yahoo.com> <1327905841.32374.YahooMailNeo@web125502.mail.ne1.yahoo.com> Message-ID: <318F2082-FD54-49BE-96CB-476051C0832B@donders.ru.nl> Dear Duo The error suggests that the layout file is corrupt, DOCTYPE is not a string that should be present in the file. Please open it in a text editor and compare it with the format here http://fieldtrip.fcdonders.nl/faq/what_is_the_format_of_the_layout_file_which_is_used_for_plotting best Robert On 30 Jan 2012, at 7:44, alotof eve wrote: > ----- Forwarded Message ----- > From: alotof eve > To: "Rojas, Don" > Sent: Sunday, January 29, 2012 10:12 PM > Subject: Re: [FieldTrip] Where can I get 4D layout for MEG result? > > Thank Don. In fact I asked the question because I met problem when I using the layout that I thought it's something wrong. > > I am doing ica and using: ft_topoplotIC(cfg,comp), then got the error message: > > reading layout from file 4D248.lay > Error using dataread > Trouble reading floating point number from file (row 1, field 1) ==> \n > > Error in textread (line 176) > [varargout{1:nlhs}]=dataread('file',varargin{:}); > > Error in ft_prepare_layout>readlay (line 670) > [chNum,X,Y,Width,Height,Lbl,Rem] = textread(filename,'%f > %f %f %f %f %q %q'); > > Error in ft_prepare_layout (line 222) > lay = readlay(cfg.layout); > > Error in ft_topoplotER (line 433) > lay = ft_prepare_layout(cfg, data); > > Error in ft_topoplotIC (line 116) > ft_topoplotER(cfg, varargin{:}); > > Can anyone help me on this? > > Thanks, > Duo > From: "Rojas, Don" > To: alotof eve ; Email discussion list for the FieldTrip project > Sent: Sunday, January 29, 2012 7:36 AM > Subject: Re: [FieldTrip] Where can I get 4D layout for MEG result? > > It is in your fieldtrip distribution, in the template/layout/ subdirectory. But you can just use it with any function that takes a layout by specifying: > > cfg.layout = '4D248.lay' > > On Jan 29, 2012, at 12:52 AM, alotof eve wrote: > >> Hi, everyone, >> >> Out MEG is 4D and I checked that we should use 4D248.lay but I cannot find this file. Can anyone tell me where I can download such a file? >> >> Thanks >> Duo >> _______________________________________________ >> fieldtrip mailing list >> fieldtrip at donders.ru.nl >> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > ----------------------- > Don Rojas, Ph.D. > Associate Professor of Psychiatry > U. of Colorado Denver Anschutz Medical Campus > Director, UCD Magnetoencephalography Lab > 13001 E. 17th Pl F546 > Aurora, CO 80045 > 303-724-4994 > > > > > > _______________________________________________ > 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 alotof_xd at yahoo.com Tue Jan 31 19:40:51 2012 From: alotof_xd at yahoo.com (alotof eve) Date: Tue, 31 Jan 2012 10:40:51 -0800 (PST) Subject: [FieldTrip] Where can I get 4D layout for MEG result? In-Reply-To: <318F2082-FD54-49BE-96CB-476051C0832B@donders.ru.nl> References: <1327823557.22249.YahooMailNeo@web125502.mail.ne1.yahoo.com> <9DDF9E6E-FFB8-4E56-BE13-B9B5C73735D1@ucdenver.edu> <1327903969.63327.YahooMailNeo@web125501.mail.ne1.yahoo.com> <1327905841.32374.YahooMailNeo@web125502.mail.ne1.yahoo.com> <318F2082-FD54-49BE-96CB-476051C0832B@donders.ru.nl> Message-ID: <1328035251.88538.YahooMailNeo@web125501.mail.ne1.yahoo.com> Dear Robert, Thank you so much for the suggestion. I compared the file but couldn't get idea yet. The format of 4D248.lay which I am using is like follows: 1 0.23057 -0.26062 3 2.25 A1 2 0.23057 3.8119 3 2.25 A2 3 0.064345 8.2238 3 2.25 A3 4 0.064345 11.957 3 2.25 A4 5 -0.10188 16.0295 3 2.25 A5 6 -3.7588 16.0295 3 2.25 A6 7 -4.0913 11.957 3 2.25 A7 8 -4.2575 8.2238 3 2.25 A8 9 -4.0913 4.1513 3 2.25 A9 10 -4.2575 -0.09093 3 2.25 A10 .... Any more suggestions? Thanks, Duo ________________________________ From: Robert Oostenveld To: Email discussion list for the FieldTrip project Sent: Tuesday, January 31, 2012 6:41 AM Subject: Re: [FieldTrip] Where can I get 4D layout for MEG result? Dear Duo The error suggests that the layout file is corrupt, DOCTYPE is not a string that should be present in the file. Please open it in a text editor and compare it with the format here http://fieldtrip.fcdonders.nl/faq/what_is_the_format_of_the_layout_file_which_is_used_for_plotting best Robert  On 30 Jan 2012, at 7:44, alotof eve wrote: ----- Forwarded Message ----- >From: alotof eve >To: "Rojas, Don" >Sent: Sunday, January 29, 2012 10:12 PM >Subject: Re: [FieldTrip] Where can I get 4D layout for MEG result? > > >Thank Don. In fact I asked the question because I met problem when I using the layout that I thought it's something wrong. > > >I am doing ica and using: ft_topoplotIC(cfg,comp), then got the error message: > > >reading layout from file 4D248.lay >Error using dataread >Trouble reading floating point number from file (row 1, field 1) ==> \n > >Error in textread (line 176) >[varargout{1:nlhs}]=dataread('file',varargin{:}); > >Error in ft_prepare_layout>readlay (line 670) >[chNum,X,Y,Width,Height,Lbl,Rem] = textread(filename,'%f >%f %f %f %f %q %q'); > >Error in ft_prepare_layout (line 222) >  lay = readlay(cfg.layout); > >Error in ft_topoplotER (line 433) >lay = ft_prepare_layout(cfg, data); > >Error in ft_topoplotIC (line 116) >    ft_topoplotER(cfg, varargin{:}); > > >Can anyone help me on this? > > >Thanks, >Duo > > >________________________________ > From: "Rojas, Don" >To: alotof eve ; Email discussion list for the FieldTrip project >Sent: Sunday, January 29, 2012 7:36 AM >Subject: Re: [FieldTrip] Where can I get 4D layout for MEG result? > > >It is in your fieldtrip distribution, in the template/layout/ subdirectory. But you can just use it with any function that takes a layout by specifying: > > >cfg.layout = '4D248.lay' > > >On Jan 29, 2012, at 12:52 AM, alotof eve wrote: > >Hi, everyone, >> >> >>Out MEG is 4D and I checked that we should use 4D248.lay but I cannot find this file. Can anyone tell me where I can download such a file? >> >> >> >>Thanks >>Duo_______________________________________________ >>fieldtrip mailing list >>fieldtrip at donders.ru.nl >>http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > >----------------------- >Don Rojas, Ph.D. >Associate Professor of Psychiatry >U. of Colorado Denver Anschutz Medical Campus >Director, UCD Magnetoencephalography Lab >13001 E. 17th Pl F546 >Aurora, CO 80045 >303-724-4994 > > > > >_______________________________________________ >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 r.oostenveld at donders.ru.nl Tue Jan 31 21:27:44 2012 From: r.oostenveld at donders.ru.nl (Robert Oostenveld) Date: Tue, 31 Jan 2012 21:27:44 +0100 Subject: [FieldTrip] Where can I get 4D layout for MEG result? In-Reply-To: <1328035251.88538.YahooMailNeo@web125501.mail.ne1.yahoo.com> References: <1327823557.22249.YahooMailNeo@web125502.mail.ne1.yahoo.com> <9DDF9E6E-FFB8-4E56-BE13-B9B5C73735D1@ucdenver.edu> <1327903969.63327.YahooMailNeo@web125501.mail.ne1.yahoo.com> <1327905841.32374.YahooMailNeo@web125502.mail.ne1.yahoo.com> <318F2082-FD54-49BE-96CB-476051C0832B@donders.ru.nl> <1328035251.88538.YahooMailNeo@web125501.mail.ne1.yahoo.com> Message-ID: <2D02A28D-D3C2-4727-8CE7-E72E45B1C212@donders.ru.nl> Dear Duo I am not sure whether it is a problem with the FieldTrip code or with your particular computer and dataset. I suggest that you report it on http://bugzilla.fcdonders.nl and that you make the cfg and the comp data structure available. One of us in Nijmegen can then check whether the problem can be reproduced. In reporting it on bugzilla, please include details on your MATLAB and operating system version. We've had problems in the past where MATLAB was not fully compatible with specific language settings when reading text files. best Robert On 31 Jan 2012, at 19:40, alotof eve wrote: > Dear Robert, > > Thank you so much for the suggestion. I compared the file but couldn't get idea yet. The format of 4D248.lay which I am using is like follows: > > 1 0.23057 -0.26062 3 2.25 A1 > 2 0.23057 3.8119 3 2.25 A2 > 3 0.064345 8.2238 3 2.25 A3 > 4 0.064345 11.957 3 2.25 A4 > 5 -0.10188 16.0295 3 2.25 A5 > 6 -3.7588 16.0295 3 2.25 A6 > 7 -4.0913 11.957 3 2.25 A7 > 8 -4.2575 8.2238 3 2.25 A8 > 9 -4.0913 4.1513 3 2.25 A9 > 10 -4.2575 -0.09093 3 2.25 A10 > .... > > Any more suggestions? > > Thanks, > Duo > > From: Robert Oostenveld > To: Email discussion list for the FieldTrip project > Sent: Tuesday, January 31, 2012 6:41 AM > Subject: Re: [FieldTrip] Where can I get 4D layout for MEG result? > > Dear Duo > > The error suggests that the layout file is corrupt, DOCTYPE is not a string that should be present in the file. Please open it in a text editor and compare it with the format here http://fieldtrip.fcdonders.nl/faq/what_is_the_format_of_the_layout_file_which_is_used_for_plotting > > best > Robert > > On 30 Jan 2012, at 7:44, alotof eve wrote: > >> ----- Forwarded Message ----- >> From: alotof eve >> To: "Rojas, Don" >> Sent: Sunday, January 29, 2012 10:12 PM >> Subject: Re: [FieldTrip] Where can I get 4D layout for MEG result? >> >> Thank Don. In fact I asked the question because I met problem when I using the layout that I thought it's something wrong. >> >> I am doing ica and using: ft_topoplotIC(cfg,comp), then got the error message: >> >> reading layout from file 4D248.lay >> Error using dataread >> Trouble reading floating point number from file (row 1, field 1) ==> \n >> >> Error in textread (line 176) >> [varargout{1:nlhs}]=dataread('file',varargin{:}); >> >> Error in ft_prepare_layout>readlay (line 670) >> [chNum,X,Y,Width,Height,Lbl,Rem] = textread(filename,'%f >> %f %f %f %f %q %q'); >> >> Error in ft_prepare_layout (line 222) >> lay = readlay(cfg.layout); >> >> Error in ft_topoplotER (line 433) >> lay = ft_prepare_layout(cfg, data); >> >> Error in ft_topoplotIC (line 116) >> ft_topoplotER(cfg, varargin{:}); >> >> Can anyone help me on this? >> >> Thanks, >> Duo >> From: "Rojas, Don" >> To: alotof eve ; Email discussion list for the FieldTrip project >> Sent: Sunday, January 29, 2012 7:36 AM >> Subject: Re: [FieldTrip] Where can I get 4D layout for MEG result? >> >> It is in your fieldtrip distribution, in the template/layout/ subdirectory. But you can just use it with any function that takes a layout by specifying: >> >> cfg.layout = '4D248.lay' >> >> On Jan 29, 2012, at 12:52 AM, alotof eve wrote: >> >>> Hi, everyone, >>> >>> Out MEG is 4D and I checked that we should use 4D248.lay but I cannot find this file. Can anyone tell me where I can download such a file? >>> >>> Thanks >>> Duo >>> _______________________________________________ >>> fieldtrip mailing list >>> fieldtrip at donders.ru.nl >>> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip >> >> ----------------------- >> Don Rojas, Ph.D. >> Associate Professor of Psychiatry >> U. of Colorado Denver Anschutz Medical Campus >> Director, UCD Magnetoencephalography Lab >> 13001 E. 17th Pl F546 >> Aurora, CO 80045 >> 303-724-4994 >> >> >> >> >> >> _______________________________________________ >> 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 alotof_xd at yahoo.com Tue Jan 31 21:28:31 2012 From: alotof_xd at yahoo.com (alotof eve) Date: Tue, 31 Jan 2012 12:28:31 -0800 (PST) Subject: [FieldTrip] Where can I get 4D layout for MEG result? In-Reply-To: <1328035251.88538.YahooMailNeo@web125501.mail.ne1.yahoo.com> References: <1327823557.22249.YahooMailNeo@web125502.mail.ne1.yahoo.com> <9DDF9E6E-FFB8-4E56-BE13-B9B5C73735D1@ucdenver.edu> <1327903969.63327.YahooMailNeo@web125501.mail.ne1.yahoo.com> <1327905841.32374.YahooMailNeo@web125502.mail.ne1.yahoo.com> <318F2082-FD54-49BE-96CB-476051C0832B@donders.ru.nl> <1328035251.88538.YahooMailNeo@web125501.mail.ne1.yahoo.com> Message-ID: <1328041711.61986.YahooMailNeo@web125503.mail.ne1.yahoo.com> A very strange thing... I tested the other layout, like 'CTF275.lay' using 'ft_layoutplot', it works. However, '4D248.lay' dosen't work on 'ft_layoutplot' with the same error message as before: Error using dataread Trouble reading floating point number from file (row 1, field 1) ==> \n .... Even I rename 'CTF275.lay' to '4D248.lay', it comes the same error message. Any suggestions? Thanks, Duo ________________________________ From: alotof eve To: Email discussion list for the FieldTrip project Sent: Tuesday, January 31, 2012 10:40 AM Subject: Re: [FieldTrip] Where can I get 4D layout for MEG result? Dear Robert, Thank you so much for the suggestion. I compared the file but couldn't get idea yet. The format of 4D248.lay which I am using is like follows: 1 0.23057 -0.26062 3 2.25 A1 2 0.23057 3.8119 3 2.25 A2 3 0.064345 8.2238 3 2.25 A3 4 0.064345 11.957 3 2.25 A4 5 -0.10188 16.0295 3 2.25 A5 6 -3.7588 16.0295 3 2.25 A6 7 -4.0913 11.957 3 2.25 A7 8 -4.2575 8.2238 3 2.25 A8 9 -4.0913 4.1513 3 2.25 A9 10 -4.2575 -0.09093 3 2.25 A10 .... Any more suggestions? Thanks, Duo ________________________________ From: Robert Oostenveld To: Email discussion list for the FieldTrip project Sent: Tuesday, January 31, 2012 6:41 AM Subject: Re: [FieldTrip] Where can I get 4D layout for MEG result? Dear Duo The error suggests that the layout file is corrupt, DOCTYPE is not a string that should be present in the file. Please open it in a text editor and compare it with the format here http://fieldtrip.fcdonders.nl/faq/what_is_the_format_of_the_layout_file_which_is_used_for_plotting best Robert  On 30 Jan 2012, at 7:44, alotof eve wrote: ----- Forwarded Message ----- >From: alotof eve >To: "Rojas, Don" >Sent: Sunday, January 29, 2012 10:12 PM >Subject: Re: [FieldTrip] Where can I get 4D layout for MEG result? > > >Thank Don. In fact I asked the question because I met problem when I using the layout that I thought it's something wrong. > > >I am doing ica and using: ft_topoplotIC(cfg,comp), then got the error message: > > >reading layout from file 4D248.lay >Error using dataread >Trouble reading floating point number from file (row 1, field 1) ==> \n > >Error in textread (line 176) >[varargout{1:nlhs}]=dataread('file',varargin{:}); > >Error in ft_prepare_layout>readlay (line 670) >[chNum,X,Y,Width,Height,Lbl,Rem] = textread(filename,'%f >%f %f %f %f %q %q'); > >Error in ft_prepare_layout (line 222) >  lay = readlay(cfg.layout); > >Error in ft_topoplotER (line 433) >lay = ft_prepare_layout(cfg, data); > >Error in ft_topoplotIC (line 116) >    ft_topoplotER(cfg, varargin{:}); > > >Can anyone help me on this? > > >Thanks, >Duo > > >________________________________ > From: "Rojas, Don" >To: alotof eve ; Email discussion list for the FieldTrip project >Sent: Sunday, January 29, 2012 7:36 AM >Subject: Re: [FieldTrip] Where can I get 4D layout for MEG result? > > >It is in your fieldtrip distribution, in the template/layout/ subdirectory. But you can just use it with any function that takes a layout by specifying: > > >cfg.layout = '4D248.lay' > > >On Jan 29, 2012, at 12:52 AM, alotof eve wrote: > >Hi, everyone, >> >> >>Out MEG is 4D and I checked that we should use 4D248.lay but I cannot find this file. Can anyone tell me where I can download such a file? >> >> >> >>Thanks >>Duo_______________________________________________ >>fieldtrip mailing list >>fieldtrip at donders.ru.nl >>http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > >----------------------- >Don Rojas, Ph.D. >Associate Professor of Psychiatry >U. of Colorado Denver Anschutz Medical Campus >Director, UCD Magnetoencephalography Lab >13001 E. 17th Pl F546 >Aurora, CO 80045 >303-724-4994 > > > > >_______________________________________________ >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 smoratti at psi.ucm.es Tue Jan 31 21:48:04 2012 From: smoratti at psi.ucm.es (smoratti at psi.ucm.es) Date: Tue, 31 Jan 2012 21:48:04 +0100 Subject: [FieldTrip] Defining cfg.neighbourdist at source level In-Reply-To: References: <4F22C422.4080906@charite.de> <4F26B91E.2050200@donders.ru.nl> <4F26BE42.5030204@charite.de> Message-ID: <61FDD8CB-F79B-48A6-BC19-015F778A4945@psi.ucm.es> Dear Robert, To do clustering on a 3D source surface I always had to "trick" field trip and squeezed the 3D source surface data into a ERF structure treating the 3D surface points as sensors. Then by triangulation I found the neighbors. However, if there is a more elegant method implemented in ft_sourcestatistc, I would be very interested to know how to do it. Where can I find some hints on that? 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 31/01/2012, a las 15:37, Robert Oostenveld escribió: > Dear Ulrich > > If your source locations are defined on a regular 3D grid that can be represented as volume, then the neighbours are trivial to find and you do not have to specify a structure for the neighbours. > > If you have done source reconstruction on a 3D folded cortical sheet that is defined by a triangulated surface, then it is also possible to cluster along the surface. I don't know the details for the cortical sheet clustering from the top of my head, if you are interested please let me know and I'll look them up. > > best > Robert > > > > > On 30 Jan 2012, at 16:58, Pomper, Ulrich wrote: > >> Dear Jörn, >> Thanks for you reply. I did mean source-level, so like you said, I am trying to define the neighbouring voxels for each voxel. >> As far as I understand, leaving cfg.neighbours blank means that the clustering is done over the time and frequency dimensions only, not over space. >> The FT help reads: >> %If you specify an empty neighbourhood structure, clustering will only be done in frequency and time (if available) and not over neighbouring channels. >> >> Has anybody done clustering in source space using all three dimensions and could explain how this works? >> Cheers, >> Ulrich >> > > _______________________________________________ > 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 alotof_xd at yahoo.com Tue Jan 31 22:36:27 2012 From: alotof_xd at yahoo.com (alotof eve) Date: Tue, 31 Jan 2012 13:36:27 -0800 (PST) Subject: [FieldTrip] Where can I get 4D layout for MEG result? In-Reply-To: <1328041711.61986.YahooMailNeo@web125503.mail.ne1.yahoo.com> References: <1327823557.22249.YahooMailNeo@web125502.mail.ne1.yahoo.com> <9DDF9E6E-FFB8-4E56-BE13-B9B5C73735D1@ucdenver.edu> <1327903969.63327.YahooMailNeo@web125501.mail.ne1.yahoo.com> <1327905841.32374.YahooMailNeo@web125502.mail.ne1.yahoo.com> <318F2082-FD54-49BE-96CB-476051C0832B@donders.ru.nl> <1328035251.88538.YahooMailNeo@web125501.mail.ne1.yahoo.com> <1328041711.61986.YahooMailNeo@web125503.mail.ne1.yahoo.com> Message-ID: <1328045787.5297.YahooMailNeo@web125503.mail.ne1.yahoo.com> I renamed '4D248.lay' to 'CTF275.lay' then checked with 'ft_layoutplot', it worked. If renamed 'CTF275.lay' to '4d248.lay', 'ft_layoutplot' showed error message. So I think it must be some code error in reading layout file. Any suggestions?  Thanks, Duo ________________________________ From: alotof eve To: Email discussion list for the FieldTrip project Sent: Tuesday, January 31, 2012 12:28 PM Subject: Re: [FieldTrip] Where can I get 4D layout for MEG result? A very strange thing... I tested the other layout, like 'CTF275.lay' using 'ft_layoutplot', it works. However, '4D248.lay' dosen't work on 'ft_layoutplot' with the same error message as before: Error using dataread Trouble reading floating point number from file (row 1, field 1) ==> \n .... Even I rename 'CTF275.lay' to '4D248.lay', it comes the same error message. Any suggestions? Thanks, Duo ________________________________ From: alotof eve To: Email discussion list for the FieldTrip project Sent: Tuesday, January 31, 2012 10:40 AM Subject: Re: [FieldTrip] Where can I get 4D layout for MEG result? Dear Robert, Thank you so much for the suggestion. I compared the file but couldn't get idea yet. The format of 4D248.lay which I am using is like follows: 1 0.23057 -0.26062 3 2.25 A1 2 0.23057 3.8119 3 2.25 A2 3 0.064345 8.2238 3 2.25 A3 4 0.064345 11.957 3 2.25 A4 5 -0.10188 16.0295 3 2.25 A5 6 -3.7588 16.0295 3 2.25 A6 7 -4.0913 11.957 3 2.25 A7 8 -4.2575 8.2238 3 2.25 A8 9 -4.0913 4.1513 3 2.25 A9 10 -4.2575 -0.09093 3 2.25 A10 .... Any more suggestions? Thanks, Duo ________________________________ From: Robert Oostenveld To: Email discussion list for the FieldTrip project Sent: Tuesday, January 31, 2012 6:41 AM Subject: Re: [FieldTrip] Where can I get 4D layout for MEG result? Dear Duo The error suggests that the layout file is corrupt, DOCTYPE is not a string that should be present in the file. Please open it in a text editor and compare it with the format here http://fieldtrip.fcdonders.nl/faq/what_is_the_format_of_the_layout_file_which_is_used_for_plotting best Robert  On 30 Jan 2012, at 7:44, alotof eve wrote: ----- Forwarded Message ----- >From: alotof eve >To: "Rojas, Don" >Sent: Sunday, January 29, 2012 10:12 PM >Subject: Re: [FieldTrip] Where can I get 4D layout for MEG result? > > >Thank Don. In fact I asked the question because I met problem when I using the layout that I thought it's something wrong. > > >I am doing ica and using: ft_topoplotIC(cfg,comp), then got the error message: > > >reading layout from file 4D248.lay >Error using dataread >Trouble reading floating point number from file (row 1, field 1) ==> \n > >Error in textread (line 176) >[varargout{1:nlhs}]=dataread('file',varargin{:}); > >Error in ft_prepare_layout>readlay (line 670) >[chNum,X,Y,Width,Height,Lbl,Rem] = textread(filename,'%f >%f %f %f %f %q %q'); > >Error in ft_prepare_layout (line 222) >  lay = readlay(cfg.layout); > >Error in ft_topoplotER (line 433) >lay = ft_prepare_layout(cfg, data); > >Error in ft_topoplotIC (line 116) >    ft_topoplotER(cfg, varargin{:}); > > >Can anyone help me on this? > > >Thanks, >Duo > > >________________________________ > From: "Rojas, Don" >To: alotof eve ; Email discussion list for the FieldTrip project >Sent: Sunday, January 29, 2012 7:36 AM >Subject: Re: [FieldTrip] Where can I get 4D layout for MEG result? > > >It is in your fieldtrip distribution, in the template/layout/ subdirectory. But you can just use it with any function that takes a layout by specifying: > > >cfg.layout = '4D248.lay' > > >On Jan 29, 2012, at 12:52 AM, alotof eve wrote: > >Hi, everyone, >> >> >>Out MEG is 4D and I checked that we should use 4D248.lay but I cannot find this file. Can anyone tell me where I can download such a file? >> >> >> >>Thanks >>Duo_______________________________________________ >>fieldtrip mailing list >>fieldtrip at donders.ru.nl >>http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > >----------------------- >Don Rojas, Ph.D. >Associate Professor of Psychiatry >U. of Colorado Denver Anschutz Medical Campus >Director, UCD Magnetoencephalography Lab >13001 E. 17th Pl F546 >Aurora, CO 80045 >303-724-4994 > > > > >_______________________________________________ >fieldtrip mailing list >fieldtrip at donders.ru.nl >http://mailman.science.ru.nl/mailman/listinfo/fieldtrip _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -------------- next part -------------- An HTML attachment was scrubbed... URL: From b.reuderink at donders.ru.nl Mon Jan 2 16:27:26 2012 From: b.reuderink at donders.ru.nl (Boris Reuderink) Date: Mon, 2 Jan 2012 16:27:26 +0100 Subject: [FieldTrip] Problem detecting triggers with real time synchronous analysis In-Reply-To: <29E38593-B980-47D1-9E86-E197EF62994E@adamcsnyder.com> References: <29E38593-B980-47D1-9E86-E197EF62994E@adamcsnyder.com> Message-ID: Dear Adam, I took a look at the code for ft_realtime_synchronous, and I have to say I can't see why it should not work with the config you provided. I would like to localize the problem; specifically, I would like to know if it 1) occurs before the data is put in the buffer (i.e. biosemi2ft), or 2) after it is read from the buffer --- assuming it does not happen in the buffer. Could perhaps send me output of biosemi2ft containing the messages regarding the triggers? Even better would be file-dump of the buffer using http://fieldtrip.fcdonders.nl/development/realtime#recording_and_playing_back_online_experiments . @Marcel, is appears you wrote ft_realtime_synchronous. Do you have any clue? Best regards, Boris On Tue, Dec 20, 2011 at 4:54 AM, Adam C. Snyder wrote: > Hello, >     I'm trying to perform a real time synchronous analysis in response to a particular trigger, but it isn't working. Here are some brief details of the setup: we're using BioSemi ActiveTwo, a December 2011 version of FieldTrip and MATLAB 2010b. >     I've managed to get the biosemi2ft executable running, and if I send a trigger through the BioSemi system, the details are noted in the command window. However, within the ft_realtime_synchronous function, the trigger events are not being found. The built-in status updates (e.g., "CMS_IN_RANGE", etc.), in contrast, are picked up by the ft_read_event call within ft_realtime_synchronous function, which adds to my confusion. >     My configurations are something like these: > >          cfg.dataset = 'buffer://localhost:1972'; >          cfg.bcifun = @hello_world; >          cfg.blocksize = 1; >          cfg.trigger = [4 2]; >          cfg.jumptoeof = 'yes'; >          cfg.bufferdata = 'last'; %maybe the name of this option was different -- I'm typing from memory > >     I hope someone can kindly help me to figure this out, and thank you in advance for whatever help you can provide. > > In Science, > > Adam C. Snyder > > Postdoctoral Fellow > Cognitive Neurophysiology Lab > Albert Einstein College of Medicine > Bronx, NY > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip From lavado at gmail.com Mon Jan 2 17:11:51 2012 From: lavado at gmail.com (Ion Lavado) Date: Mon, 2 Jan 2012 17:11:51 +0100 Subject: [FieldTrip] ft_headmodelplot coordinate system origin problem Message-ID: Hello, i'm working with MEG data from Elekta Neuromag. My problem comes when i try to plot the headmodel with the function ft_headmodelplot(cfg). This should plot the head model(volume) + brain grid + sensors. As you can see in the adjunted image, my head volume and grid is not centered and part of the head could not be read by the sensors. Is it possible to modify this so i can center the head in the sensors(helmet)? Thank you very much. Ion Lavado -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: headmodelplot.jpg Type: image/jpeg Size: 18720 bytes Desc: not available URL: From jan.schoffelen at donders.ru.nl Mon Jan 2 17:27:07 2012 From: jan.schoffelen at donders.ru.nl (jan-mathijs schoffelen) Date: Mon, 2 Jan 2012 17:27:07 +0100 Subject: [FieldTrip] ft_headmodelplot coordinate system origin problem In-Reply-To: References: Message-ID: Dear Ion, Are you sure that the sensor positions are defined in the same coordinate system as are the volume conductor model and the source positions? If not, then this is the likely cause of the shift. You can have a look here for more information about the different coordinate systems: http://fieldtrip.fcdonders.nl/faq/how_are_the_different_head_and_mri_coordinate_systems_defined In order to coregister the anatomical mri to the sensor array, you can use ft_volumerealign. Best wishes, Jan-Mathijs On Jan 2, 2012, at 5:11 PM, Ion Lavado wrote: > Hello, i'm working with MEG data from Elekta Neuromag. My problem comes when i try to plot the headmodel with the function ft_headmodelplot(cfg). This should plot the head model(volume) + brain grid + sensors. As you can see in the adjunted image, my head volume and grid is not centered and part of the head could not be read by the sensors. Is it possible to modify this so i can center the head in the sensors(helmet)? > Thank you very much. > > Ion Lavado > _______________________________________________ > 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 -------------- next part -------------- An HTML attachment was scrubbed... URL: From adam at adamcsnyder.com Mon Jan 2 18:48:16 2012 From: adam at adamcsnyder.com (Adam C. Snyder) Date: Mon, 02 Jan 2012 12:48:16 -0500 Subject: [FieldTrip] fieldtrip Digest, Vol 14, Issue 2 In-Reply-To: References: Message-ID: <4F01EDE0.6040900@adamcsnyder.com> Dear Boris, I just wanted to thank you for helping me with this issue. I will gather together the information you requested when I get back to the lab after the New Year's holiday and let you know. Many thanks again! -Adam On 02-Jan-2012 11:12, fieldtrip-request at donders.ru.nl wrote: > Message: 1 > Date: Mon, 2 Jan 2012 16:27:26 +0100 > From: Boris Reuderink > To: Email discussion list for the FieldTrip project > > Cc: "m.vangerven" > Subject: Re: [FieldTrip] Problem detecting triggers with real time > synchronous analysis > Message-ID: > > Content-Type: text/plain; charset=ISO-8859-1 > > Dear Adam, > > I took a look at the code for ft_realtime_synchronous, and I have to > say I can't see why it should not work with the config you provided. I > would like to localize the problem; specifically, I would like to know > if it 1) occurs before the data is put in the buffer (i.e. > biosemi2ft), or 2) after it is read from the buffer --- assuming it > does not happen in the buffer. > > Could perhaps send me output of biosemi2ft containing the messages > regarding the triggers? Even better would be file-dump of the buffer > using http://fieldtrip.fcdonders.nl/development/realtime#recording_and_playing_back_online_experiments > . > > @Marcel, is appears you wrote ft_realtime_synchronous. Do you have any clue? > > Best regards, > > Boris > > On Tue, Dec 20, 2011 at 4:54 AM, Adam C. Snyder wrote: >> Hello, >> ? ? I'm trying to perform a real time synchronous analysis in response to a particular trigger, but it isn't working. Here are some brief details of the setup: we're using BioSemi ActiveTwo, a December 2011 version of FieldTrip and MATLAB 2010b. >> ? ? I've managed to get the biosemi2ft executable running, and if I send a trigger through the BioSemi system, the details are noted in the command window. However, within the ft_realtime_synchronous function, the trigger events are not being found. The built-in status updates (e.g., "CMS_IN_RANGE", etc.), in contrast, are picked up by the ft_read_event call within ft_realtime_synchronous function, which adds to my confusion. >> ? ? My configurations are something like these: >> >> ? ? ? ? ?cfg.dataset = 'buffer://localhost:1972'; >> ? ? ? ? ?cfg.bcifun = @hello_world; >> ? ? ? ? ?cfg.blocksize = 1; >> ? ? ? ? ?cfg.trigger = [4 2]; >> ? ? ? ? ?cfg.jumptoeof = 'yes'; >> ? ? ? ? ?cfg.bufferdata = 'last'; %maybe the name of this option was different -- I'm typing from memory >> >> ? ? I hope someone can kindly help me to figure this out, and thank you in advance for whatever help you can provide. >> >> In Science, >> >> Adam C. Snyder >> >> Postdoctoral Fellow >> Cognitive Neurophysiology Lab >> Albert Einstein College of Medicine >> Bronx, NY >> _______________________________________________ >> fieldtrip mailing list >> fieldtrip at donders.ru.nl >> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip From lavado at gmail.com Tue Jan 3 11:38:25 2012 From: lavado at gmail.com (Ion Lavado) Date: Tue, 3 Jan 2012 11:38:25 +0100 Subject: [FieldTrip] ft_headmodelplot coordinate system origin problem In-Reply-To: References: Message-ID: Thank you for your help Jan. I tried all you told but i continue with my problem. The coordinates for the head (volume) and mri are the same, with the function ft_determine_coordsys i see this. I think that the problem is about the sensor (helmet) origin of coordinates. Please see the images i adjunt here,* the sensors origin is very low*(nearly out of the helmet) and when ploting everything i suppose that every origin align to each other, so that the brain comes a little bit low. Best whishes, Ion 2012/1/2 jan-mathijs schoffelen > Dear Ion, > > Are you sure that the sensor positions are defined in the same coordinate > system as are the volume conductor model and the source positions? If not, > then this is the likely cause of the shift. You can have a look here for > more information about the different coordinate systems: > http://fieldtrip.fcdonders.nl/faq/how_are_the_different_head_and_mri_coordinate_systems_defined > > In order to coregister the anatomical mri to the sensor array, you can use > ft_volumerealign. > > Best wishes, > > Jan-Mathijs > > > On Jan 2, 2012, at 5:11 PM, Ion Lavado wrote: > > Hello, i'm working with MEG data from Elekta Neuromag. My problem comes > when i try to plot the headmodel with the function ft_headmodelplot(cfg). > This should plot the head model(volume) + brain grid + sensors. As you can > see in the adjunted image, my head volume and grid is not centered and part > of the head could not be read by the sensors. Is it possible to modify this > so i can center the head in the sensors(helmet)? > Thank you very much. > > Ion Lavado > _______________________________________________ > 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 > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: helmet.jpg Type: image/jpeg Size: 15093 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: vol.jpg Type: image/jpeg Size: 19456 bytes Desc: not available URL: From jan.schoffelen at donders.ru.nl Tue Jan 3 11:50:27 2012 From: jan.schoffelen at donders.ru.nl (jan-mathijs schoffelen) Date: Tue, 3 Jan 2012 11:50:27 +0100 Subject: [FieldTrip] ft_headmodelplot coordinate system origin problem In-Reply-To: References: Message-ID: <321B871E-53E2-43D8-B397-EA9C73C8B32C@donders.ru.nl> Hi Ion, What is the coordinate system in which the vol and mri are defined? To me it does not look like the neuromag coordinate system, but rather like MNI-space. I would expect the origin to be a bit (~4 cm) lower and a bit more anterior (because the origin is defined on the line going through the pre-auricular points. In the 'vol.jpg' it seems that the origin is in the anterior commissure. Although in principle it shouldn't matter, it is convention to express the coordinates in the MEG-system's coordinate system, i.e. in neuromag space in this case. Therefore I would say that the vol and grid variables need to be adjusted, rather than the sensor positions. As mentioned in my previoius message, this can be achieved by coregistering the anatomy to the neuromag coordinate system using ft_volumerealign. You need to manually identify the locations of the fiducials that define the coordinate system, i.e. the nasion, lpa and rpa. The required cfg is: cfg.interactive = 'yes', cfg.coordsys = 'neuromag'. Once the anatomy is coregistered you can proceed with creating the vol and grid variables. Best, Jan-Mathijs On Jan 3, 2012, at 11:38 AM, Ion Lavado wrote: > Thank you for your help Jan. I tried all you told but i continue with my problem. The coordinates for the head (volume) and mri are the same, with the function ft_determine_coordsys i see this. > I think that the problem is about the sensor (helmet) origin of coordinates. Please see the images i adjunt here, the sensors origin is very low(nearly out of the helmet) and when ploting everything i suppose that every origin align to each other, so that the brain comes a little bit low. > > Best whishes, > > Ion > > 2012/1/2 jan-mathijs schoffelen > Dear Ion, > > Are you sure that the sensor positions are defined in the same coordinate system as are the volume conductor model and the source positions? If not, then this is the likely cause of the shift. You can have a look here for more information about the different coordinate systems: http://fieldtrip.fcdonders.nl/faq/how_are_the_different_head_and_mri_coordinate_systems_defined > > In order to coregister the anatomical mri to the sensor array, you can use ft_volumerealign. > > Best wishes, > > Jan-Mathijs > > > On Jan 2, 2012, at 5:11 PM, Ion Lavado wrote: > >> Hello, i'm working with MEG data from Elekta Neuromag. My problem comes when i try to plot the headmodel with the function ft_headmodelplot(cfg). This should plot the head model(volume) + brain grid + sensors. As you can see in the adjunted image, my head volume and grid is not centered and part of the head could not be read by the sensors. Is it possible to modify this so i can center the head in the sensors(helmet)? >> Thank you very much. >> >> Ion Lavado >> _______________________________________________ >> 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 > > > _______________________________________________ > 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 -------------- next part -------------- An HTML attachment was scrubbed... URL: From lavado at gmail.com Tue Jan 3 12:45:53 2012 From: lavado at gmail.com (Ion Lavado) Date: Tue, 3 Jan 2012 12:45:53 +0100 Subject: [FieldTrip] ft_headmodelplot coordinate system origin problem In-Reply-To: <321B871E-53E2-43D8-B397-EA9C73C8B32C@donders.ru.nl> References: <321B871E-53E2-43D8-B397-EA9C73C8B32C@donders.ru.nl> Message-ID: Hi Jan, I am sorry, I have been trying with your method but now what is incorrect is the segmentation. Here is the script. Maybe you understand better the problem...I am getting crazy. The problem comes from line 53 Thank you very much, Best, Ion 2012/1/3 jan-mathijs schoffelen > Hi Ion, > > What is the coordinate system in which the vol and mri are defined? To me > it does not look like the neuromag coordinate system, but rather like > MNI-space. I would expect the origin to be a bit (~4 cm) lower and a bit > more anterior (because the origin is defined on the line going through the > pre-auricular points. In the 'vol.jpg' it seems that the origin is in the > anterior commissure. Although in principle it shouldn't matter, it is > convention to express the coordinates in the MEG-system's coordinate > system, i.e. in neuromag space in this case. Therefore I would say that the > vol and grid variables need to be adjusted, rather than the sensor > positions. As mentioned in my previoius message, this can be achieved by > coregistering the anatomy to the neuromag coordinate system using > ft_volumerealign. You need to manually identify the locations of the > fiducials that define the coordinate system, i.e. the nasion, lpa and rpa. > The required cfg is: cfg.interactive = 'yes', cfg.coordsys = 'neuromag'. > Once the anatomy is coregistered you can proceed with creating the vol and > grid variables. > > Best, > > Jan-Mathijs > > > On Jan 3, 2012, at 11:38 AM, Ion Lavado wrote: > > Thank you for your help Jan. I tried all you told but i continue with my > problem. The coordinates for the head (volume) and mri are the same, with > the function ft_determine_coordsys i see this. > I think that the problem is about the sensor (helmet) origin of > coordinates. Please see the images i adjunt here,* the sensors origin is > very low*(nearly out of the helmet) and when ploting everything i suppose > that every origin align to each other, so that the brain comes a little bit > low. > > Best whishes, > > Ion > > 2012/1/2 jan-mathijs schoffelen > >> Dear Ion, >> >> Are you sure that the sensor positions are defined in the same coordinate >> system as are the volume conductor model and the source positions? If not, >> then this is the likely cause of the shift. You can have a look here for >> more information about the different coordinate systems: >> http://fieldtrip.fcdonders.nl/faq/how_are_the_different_head_and_mri_coordinate_systems_defined >> >> In order to coregister the anatomical mri to the sensor array, you can >> use ft_volumerealign. >> >> Best wishes, >> >> Jan-Mathijs >> >> >> On Jan 2, 2012, at 5:11 PM, Ion Lavado wrote: >> >> Hello, i'm working with MEG data from Elekta Neuromag. My problem comes >> when i try to plot the headmodel with the function ft_headmodelplot(cfg). >> This should plot the head model(volume) + brain grid + sensors. As you can >> see in the adjunted image, my head volume and grid is not centered and part >> of the head could not be read by the sensors. Is it possible to modify this >> so i can center the head in the sensors(helmet)? >> Thank you very much. >> >> Ion Lavado >> _______________________________________________ >> 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 >> >> >> _______________________________________________ >> 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 > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: script.m Type: application/octet-stream Size: 3977 bytes Desc: not available URL: From jan.schoffelen at donders.ru.nl Tue Jan 3 12:57:27 2012 From: jan.schoffelen at donders.ru.nl (jan-mathijs schoffelen) Date: Tue, 3 Jan 2012 12:57:27 +0100 Subject: [FieldTrip] ft_headmodelplot coordinate system origin problem In-Reply-To: References: <321B871E-53E2-43D8-B397-EA9C73C8B32C@donders.ru.nl> Message-ID: <76760214-3081-465C-8AFB-3E3A52A53C24@donders.ru.nl> Hi Ion, I'd suggest first to have a look at mri_real. How does it look in ft_determine_coordsys? In particular, is the z-axis pointing in the correct direction? JM On Jan 3, 2012, at 12:45 PM, Ion Lavado wrote: > Hi Jan, > I am sorry, I have been trying with your method but now what is incorrect is the segmentation. > Here is the script. Maybe you understand better the problem...I am getting crazy. The problem comes from line 53 > Thank you very much, > Best, > Ion > > > > 2012/1/3 jan-mathijs schoffelen > Hi Ion, > > What is the coordinate system in which the vol and mri are defined? To me it does not look like the neuromag coordinate system, but rather like MNI-space. I would expect the origin to be a bit (~4 cm) lower and a bit more anterior (because the origin is defined on the line going through the pre-auricular points. In the 'vol.jpg' it seems that the origin is in the anterior commissure. Although in principle it shouldn't matter, it is convention to express the coordinates in the MEG-system's coordinate system, i.e. in neuromag space in this case. Therefore I would say that the vol and grid variables need to be adjusted, rather than the sensor positions. As mentioned in my previoius message, this can be achieved by coregistering the anatomy to the neuromag coordinate system using ft_volumerealign. You need to manually identify the locations of the fiducials that define the coordinate system, i.e. the nasion, lpa and rpa. The required cfg is: cfg.interactive = 'yes', cfg.coordsys = 'neuromag'. Once the anatomy is coregistered you can proceed with creating the vol and grid variables. > > Best, > > Jan-Mathijs > > > On Jan 3, 2012, at 11:38 AM, Ion Lavado wrote: > >> Thank you for your help Jan. I tried all you told but i continue with my problem. The coordinates for the head (volume) and mri are the same, with the function ft_determine_coordsys i see this. >> I think that the problem is about the sensor (helmet) origin of coordinates. Please see the images i adjunt here, the sensors origin is very low(nearly out of the helmet) and when ploting everything i suppose that every origin align to each other, so that the brain comes a little bit low. >> >> Best whishes, >> >> Ion >> >> 2012/1/2 jan-mathijs schoffelen >> Dear Ion, >> >> Are you sure that the sensor positions are defined in the same coordinate system as are the volume conductor model and the source positions? If not, then this is the likely cause of the shift. You can have a look here for more information about the different coordinate systems: http://fieldtrip.fcdonders.nl/faq/how_are_the_different_head_and_mri_coordinate_systems_defined >> >> In order to coregister the anatomical mri to the sensor array, you can use ft_volumerealign. >> >> Best wishes, >> >> Jan-Mathijs >> >> >> On Jan 2, 2012, at 5:11 PM, Ion Lavado wrote: >> >>> Hello, i'm working with MEG data from Elekta Neuromag. My problem comes when i try to plot the headmodel with the function ft_headmodelplot(cfg). This should plot the head model(volume) + brain grid + sensors. As you can see in the adjunted image, my head volume and grid is not centered and part of the head could not be read by the sensors. Is it possible to modify this so i can center the head in the sensors(helmet)? >>> Thank you very much. >>> >>> Ion Lavado >>> _______________________________________________ >>> 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 >> >> >> _______________________________________________ >> 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 > > > _______________________________________________ > 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 -------------- next part -------------- An HTML attachment was scrubbed... URL: From lavado at gmail.com Tue Jan 3 13:20:09 2012 From: lavado at gmail.com (Ion Lavado) Date: Tue, 3 Jan 2012 13:20:09 +0100 Subject: [FieldTrip] ft_headmodelplot coordinate system origin problem In-Reply-To: <76760214-3081-465C-8AFB-3E3A52A53C24@donders.ru.nl> References: <321B871E-53E2-43D8-B397-EA9C73C8B32C@donders.ru.nl> <76760214-3081-465C-8AFB-3E3A52A53C24@donders.ru.nl> Message-ID: The Z axis is pointing to the oposite direction (inferior), so i have the mri upside down. How can i change this? When Matlab plots the figure it asks me this: The positive x-axis is pointing towards the right The positive y-axis is pointing towards anterior The positive z-axis is pointing towards superior Do you want to change the anatomical labels for the axes [y, N]? I then mark to change the axis and mark the positive z-axis as (i)inferior, but when plotting again is as the begginig... What do i have to do? Thank you very much Jan. 2012/1/3 jan-mathijs schoffelen > Hi Ion, > > I'd suggest first to have a look at mri_real. How does it look in > ft_determine_coordsys? > In particular, is the z-axis pointing in the correct direction? > > JM > > > On Jan 3, 2012, at 12:45 PM, Ion Lavado wrote: > > Hi Jan, > I am sorry, I have been trying with your method but now what is incorrect > is the segmentation. > Here is the script. Maybe you understand better the problem...I am getting > crazy. The problem comes from line 53 > Thank you very much, > Best, > Ion > > > > 2012/1/3 jan-mathijs schoffelen > >> Hi Ion, >> >> What is the coordinate system in which the vol and mri are defined? To me >> it does not look like the neuromag coordinate system, but rather like >> MNI-space. I would expect the origin to be a bit (~4 cm) lower and a bit >> more anterior (because the origin is defined on the line going through the >> pre-auricular points. In the 'vol.jpg' it seems that the origin is in the >> anterior commissure. Although in principle it shouldn't matter, it is >> convention to express the coordinates in the MEG-system's coordinate >> system, i.e. in neuromag space in this case. Therefore I would say that the >> vol and grid variables need to be adjusted, rather than the sensor >> positions. As mentioned in my previoius message, this can be achieved by >> coregistering the anatomy to the neuromag coordinate system using >> ft_volumerealign. You need to manually identify the locations of the >> fiducials that define the coordinate system, i.e. the nasion, lpa and rpa. >> The required cfg is: cfg.interactive = 'yes', cfg.coordsys = 'neuromag'. >> Once the anatomy is coregistered you can proceed with creating the vol and >> grid variables. >> >> Best, >> >> Jan-Mathijs >> >> >> On Jan 3, 2012, at 11:38 AM, Ion Lavado wrote: >> >> Thank you for your help Jan. I tried all you told but i continue with my >> problem. The coordinates for the head (volume) and mri are the same, with >> the function ft_determine_coordsys i see this. >> I think that the problem is about the sensor (helmet) origin of >> coordinates. Please see the images i adjunt here,* the sensors origin is >> very low*(nearly out of the helmet) and when ploting everything i >> suppose that every origin align to each other, so that the brain comes a >> little bit low. >> >> Best whishes, >> >> Ion >> >> 2012/1/2 jan-mathijs schoffelen >> >>> Dear Ion, >>> >>> Are you sure that the sensor positions are defined in the same >>> coordinate system as are the volume conductor model and the source >>> positions? If not, then this is the likely cause of the shift. You can have >>> a look here for more information about the different coordinate systems: >>> http://fieldtrip.fcdonders.nl/faq/how_are_the_different_head_and_mri_coordinate_systems_defined >>> >>> In order to coregister the anatomical mri to the sensor array, you can >>> use ft_volumerealign. >>> >>> Best wishes, >>> >>> Jan-Mathijs >>> >>> >>> On Jan 2, 2012, at 5:11 PM, Ion Lavado wrote: >>> >>> Hello, i'm working with MEG data from Elekta Neuromag. My problem comes >>> when i try to plot the headmodel with the function ft_headmodelplot(cfg). >>> This should plot the head model(volume) + brain grid + sensors. As you can >>> see in the adjunted image, my head volume and grid is not centered and part >>> of the head could not be read by the sensors. Is it possible to modify this >>> so i can center the head in the sensors(helmet)? >>> Thank you very much. >>> >>> Ion Lavado >>> _______________________________________________ >>> 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 >>> >>> >>> _______________________________________________ >>> 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 >> >> >> _______________________________________________ >> 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 > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > -------------- next part -------------- An HTML attachment was scrubbed... URL: From jan.schoffelen at donders.ru.nl Tue Jan 3 13:37:56 2012 From: jan.schoffelen at donders.ru.nl (jan-mathijs schoffelen) Date: Tue, 3 Jan 2012 13:37:56 +0100 Subject: [FieldTrip] ft_headmodelplot coordinate system origin problem In-Reply-To: References: <321B871E-53E2-43D8-B397-EA9C73C8B32C@donders.ru.nl> <76760214-3081-465C-8AFB-3E3A52A53C24@donders.ru.nl> Message-ID: <1F5462DE-0087-4F8A-AD1B-62B2A334E5FF@donders.ru.nl> Hi Ion, If the positive z-axis (denoted by +Z in the figure that is created by ft_determine_coordsys) is not pointing to the top of the head you made an error in ft_volumerealign and probably exchanged left with right in setting the lpa and rpa locations. This results in the coordinate system being a left-handed one and causes all kind of trouble later on. If this is the case, you need to repeat ft_volumerealign (with the original MRI) and type 'l' where you typed 'r', and the other way around. Ft_volumesegment relies on spm for the segmentation, which relies on the mri-data being defined in a meaningful right-handed coordinate system (which can be either mni-based, or MEG system based). If however the +Z is just pointing downward but the anatomy is 'upside-down' (neck pointing to the ceiling) then the coordinate system is a valid, i.e. a right-handed RAS (right-anterior-superior) coordinate system. If this is the case then I wouldn't know what's going on, because I would suspect that ft_volumesegment Perhaps some other neuromag aficionados could jump to the rescue here? As such ft_determine_coordsys does not change the coordinate system of your mri, it just changes the coordsys field, which helps FieldTrip in the interpretation of the real-world coordinates. The mapping of voxel locations to real-world locations is defined by mri.transform which can be changed by ft_volumerealign. Best wishes, JM On Jan 3, 2012, at 1:20 PM, Ion Lavado wrote: > The Z axis is pointing to the oposite direction (inferior), so i have the mri upside down. How can i change this? When Matlab plots the figure it asks me this: > > The positive x-axis is pointing towards the right > The positive y-axis is pointing towards anterior > The positive z-axis is pointing towards superior > Do you want to change the anatomical labels for the axes [y, N]? > > I then mark to change the axis and mark the positive z-axis as (i)inferior, but when plotting again is as the begginig... What do i have to do? > > Thank you very much Jan. > > > > 2012/1/3 jan-mathijs schoffelen > Hi Ion, > > I'd suggest first to have a look at mri_real. How does it look in ft_determine_coordsys? > In particular, is the z-axis pointing in the correct direction? > > JM > > > On Jan 3, 2012, at 12:45 PM, Ion Lavado wrote: > >> Hi Jan, >> I am sorry, I have been trying with your method but now what is incorrect is the segmentation. >> Here is the script. Maybe you understand better the problem...I am getting crazy. The problem comes from line 53 >> Thank you very much, >> Best, >> Ion >> >> >> >> 2012/1/3 jan-mathijs schoffelen >> Hi Ion, >> >> What is the coordinate system in which the vol and mri are defined? To me it does not look like the neuromag coordinate system, but rather like MNI-space. I would expect the origin to be a bit (~4 cm) lower and a bit more anterior (because the origin is defined on the line going through the pre-auricular points. In the 'vol.jpg' it seems that the origin is in the anterior commissure. Although in principle it shouldn't matter, it is convention to express the coordinates in the MEG-system's coordinate system, i.e. in neuromag space in this case. Therefore I would say that the vol and grid variables need to be adjusted, rather than the sensor positions. As mentioned in my previoius message, this can be achieved by coregistering the anatomy to the neuromag coordinate system using ft_volumerealign. You need to manually identify the locations of the fiducials that define the coordinate system, i.e. the nasion, lpa and rpa. The required cfg is: cfg.interactive = 'yes', cfg.coordsys = 'neuromag'. Once the anatomy is coregistered you can proceed with creating the vol and grid variables. >> >> Best, >> >> Jan-Mathijs >> >> >> On Jan 3, 2012, at 11:38 AM, Ion Lavado wrote: >> >>> Thank you for your help Jan. I tried all you told but i continue with my problem. The coordinates for the head (volume) and mri are the same, with the function ft_determine_coordsys i see this. >>> I think that the problem is about the sensor (helmet) origin of coordinates. Please see the images i adjunt here, the sensors origin is very low(nearly out of the helmet) and when ploting everything i suppose that every origin align to each other, so that the brain comes a little bit low. >>> >>> Best whishes, >>> >>> Ion >>> >>> 2012/1/2 jan-mathijs schoffelen >>> Dear Ion, >>> >>> Are you sure that the sensor positions are defined in the same coordinate system as are the volume conductor model and the source positions? If not, then this is the likely cause of the shift. You can have a look here for more information about the different coordinate systems: http://fieldtrip.fcdonders.nl/faq/how_are_the_different_head_and_mri_coordinate_systems_defined >>> >>> In order to coregister the anatomical mri to the sensor array, you can use ft_volumerealign. >>> >>> Best wishes, >>> >>> Jan-Mathijs >>> >>> >>> On Jan 2, 2012, at 5:11 PM, Ion Lavado wrote: >>> >>>> Hello, i'm working with MEG data from Elekta Neuromag. My problem comes when i try to plot the headmodel with the function ft_headmodelplot(cfg). This should plot the head model(volume) + brain grid + sensors. As you can see in the adjunted image, my head volume and grid is not centered and part of the head could not be read by the sensors. Is it possible to modify this so i can center the head in the sensors(helmet)? >>>> Thank you very much. >>>> >>>> Ion Lavado >>>> _______________________________________________ >>>> 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 >>> >>> >>> _______________________________________________ >>> 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 >> >> >> _______________________________________________ >> 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 > > > _______________________________________________ > 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 -------------- next part -------------- An HTML attachment was scrubbed... URL: From lavado at gmail.com Tue Jan 3 14:22:34 2012 From: lavado at gmail.com (Ion Lavado) Date: Tue, 3 Jan 2012 14:22:34 +0100 Subject: [FieldTrip] ft_headmodelplot coordinate system origin problem In-Reply-To: <1F5462DE-0087-4F8A-AD1B-62B2A334E5FF@donders.ru.nl> References: <321B871E-53E2-43D8-B397-EA9C73C8B32C@donders.ru.nl> <76760214-3081-465C-8AFB-3E3A52A53C24@donders.ru.nl> <1F5462DE-0087-4F8A-AD1B-62B2A334E5FF@donders.ru.nl> Message-ID: Thank you very much Jan! Now everything fits using ft_headmodelplot(cfg). You solved our problem of the week. Just one final problem we have: - we are doing the beamformig source analisys. - our vol, grid and grad fits ok. -we have the sourcePre = ft_sourceanalysis(cfg, freqPre); sourcePost = ft_sourceanalysis(cfg, freqPost); -we then interpolate the data with cfg = []; cfg.downsample = 2; sourcePostInt = ft_sourceinterpolate(cfg, sourcePost , mri_real); - finally we use method SLICE to plot the results: (WITH MRI_REAL) %METHOD SLICE: sourceDiff = sourcePost; sourceDiff.avg.pow = (sourcePost.avg.pow - sourcePre.avg.pow) ./ sourcePre.avg.pow; cfg = [] cfg.downsample = 2; sourceDiffInt = ft_sourceinterpolate(cfg, sourceDiff , mri_real); cfg = []; cfg.method = 'slice'; cfg.interactive = 'yes'; cfg.funparameter = 'avg.pow'; cfg.maskparameter = cfg.funparameter; cfg.funcolorlim = [0 2]; cfg.opacitylim = [0 2]; cfg.opacitymap = 'rampup'; figure('Name', 'SLICE Method') ft_sourceplot(cfg, sourceDiffInt); The problem comes now (not before), that when plotting the result don't fit the mri in the figure. I send you the .jpg so you can see it and try to help us whith this FINAL problem! In the script i send you, the problem i think starts after line 156. You are really kind, and thank you very much for your usefull help. Ion 2012/1/3 jan-mathijs schoffelen > Hi Ion, > > If the positive z-axis (denoted by +Z in the figure that is created by > ft_determine_coordsys) is not pointing to the top of the head you made an > error in ft_volumerealign and probably exchanged left with right in setting > the lpa and rpa locations. This results in the coordinate system being a > left-handed one and causes all kind of trouble later on. If this is the > case, you need to repeat ft_volumerealign (with the original MRI) and type > 'l' where you typed 'r', and the other way around. Ft_volumesegment relies > on spm for the segmentation, which relies on the mri-data being defined in > a meaningful right-handed coordinate system (which can be either mni-based, > or MEG system based). > > If however the +Z is just pointing downward but the anatomy is > 'upside-down' (neck pointing to the ceiling) then the coordinate system is > a valid, i.e. a right-handed RAS (right-anterior-superior) coordinate > system. If this is the case then I wouldn't know what's going on, because I > would suspect that ft_volumesegment Perhaps some other neuromag > aficionados could jump to the rescue here? > > As such ft_determine_coordsys does not change the coordinate system of > your mri, it just changes the coordsys field, which helps FieldTrip in the > interpretation of the real-world coordinates. The mapping of voxel > locations to real-world locations is defined by mri.transform which can be > changed by ft_volumerealign. > > Best wishes, > > JM > > > On Jan 3, 2012, at 1:20 PM, Ion Lavado wrote: > > The Z axis is pointing to the oposite direction (inferior), so i have the > mri upside down. How can i change this? When Matlab plots the figure it > asks me this: > > The positive x-axis is pointing towards the right > The positive y-axis is pointing towards anterior > The positive z-axis is pointing towards superior > Do you want to change the anatomical labels for the axes [y, N]? > > I then mark to change the axis and mark the positive z-axis as > (i)inferior, but when plotting again is as the begginig... What do i have > to do? > > Thank you very much Jan. > > > > 2012/1/3 jan-mathijs schoffelen > >> Hi Ion, >> >> I'd suggest first to have a look at mri_real. How does it look in >> ft_determine_coordsys? >> In particular, is the z-axis pointing in the correct direction? >> >> JM >> >> >> On Jan 3, 2012, at 12:45 PM, Ion Lavado wrote: >> >> Hi Jan, >> I am sorry, I have been trying with your method but now what is incorrect >> is the segmentation. >> Here is the script. Maybe you understand better the problem...I am >> getting crazy. The problem comes from line 53 >> Thank you very much, >> Best, >> Ion >> >> >> >> 2012/1/3 jan-mathijs schoffelen >> >>> Hi Ion, >>> >>> What is the coordinate system in which the vol and mri are defined? To >>> me it does not look like the neuromag coordinate system, but rather like >>> MNI-space. I would expect the origin to be a bit (~4 cm) lower and a bit >>> more anterior (because the origin is defined on the line going through the >>> pre-auricular points. In the 'vol.jpg' it seems that the origin is in the >>> anterior commissure. Although in principle it shouldn't matter, it is >>> convention to express the coordinates in the MEG-system's coordinate >>> system, i.e. in neuromag space in this case. Therefore I would say that the >>> vol and grid variables need to be adjusted, rather than the sensor >>> positions. As mentioned in my previoius message, this can be achieved by >>> coregistering the anatomy to the neuromag coordinate system using >>> ft_volumerealign. You need to manually identify the locations of the >>> fiducials that define the coordinate system, i.e. the nasion, lpa and rpa. >>> The required cfg is: cfg.interactive = 'yes', cfg.coordsys = 'neuromag'. >>> Once the anatomy is coregistered you can proceed with creating the vol and >>> grid variables. >>> >>> Best, >>> >>> Jan-Mathijs >>> >>> >>> On Jan 3, 2012, at 11:38 AM, Ion Lavado wrote: >>> >>> Thank you for your help Jan. I tried all you told but i continue with my >>> problem. The coordinates for the head (volume) and mri are the same, with >>> the function ft_determine_coordsys i see this. >>> I think that the problem is about the sensor (helmet) origin of >>> coordinates. Please see the images i adjunt here,* the sensors origin >>> is very low*(nearly out of the helmet) and when ploting everything i >>> suppose that every origin align to each other, so that the brain comes a >>> little bit low. >>> >>> Best whishes, >>> >>> Ion >>> >>> 2012/1/2 jan-mathijs schoffelen >>> >>>> Dear Ion, >>>> >>>> Are you sure that the sensor positions are defined in the same >>>> coordinate system as are the volume conductor model and the source >>>> positions? If not, then this is the likely cause of the shift. You can have >>>> a look here for more information about the different coordinate systems: >>>> http://fieldtrip.fcdonders.nl/faq/how_are_the_different_head_and_mri_coordinate_systems_defined >>>> >>>> In order to coregister the anatomical mri to the sensor array, you can >>>> use ft_volumerealign. >>>> >>>> Best wishes, >>>> >>>> Jan-Mathijs >>>> >>>> >>>> On Jan 2, 2012, at 5:11 PM, Ion Lavado wrote: >>>> >>>> Hello, i'm working with MEG data from Elekta Neuromag. My problem comes >>>> when i try to plot the headmodel with the function ft_headmodelplot(cfg). >>>> This should plot the head model(volume) + brain grid + sensors. As you can >>>> see in the adjunted image, my head volume and grid is not centered and part >>>> of the head could not be read by the sensors. Is it possible to modify this >>>> so i can center the head in the sensors(helmet)? >>>> Thank you very much. >>>> >>>> Ion Lavado >>>> _______________________________________________ >>>> 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 >>>> >>>> >>>> _______________________________________________ >>>> 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 >>> >>> >>> _______________________________________________ >>> 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 >> >> >> _______________________________________________ >> 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 > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: plot.jpg Type: image/jpeg Size: 24158 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: script.m Type: application/octet-stream Size: 5145 bytes Desc: not available URL: From hamzaf at sabanciuniv.edu Wed Jan 4 07:11:33 2012 From: hamzaf at sabanciuniv.edu (Hamza Fawzi Altakroury (Student)) Date: Wed, 4 Jan 2012 08:11:33 +0200 Subject: [FieldTrip] Reading data while biosemi2ft is running Message-ID: Hello, What is the best function for reading data from *.gdf file in Matlab while "biosemi2ft" is running. Best -- Hamza Fawzi Altakroury Graduate student - MA Faculty of Engineering and Natural Sciences Sabancı University -------------- next part -------------- An HTML attachment was scrubbed... URL: From b.reuderink at donders.ru.nl Wed Jan 4 07:54:31 2012 From: b.reuderink at donders.ru.nl (Boris Reuderink) Date: Wed, 4 Jan 2012 07:54:31 +0100 Subject: [FieldTrip] Reading data while biosemi2ft is running In-Reply-To: References: Message-ID: Hi, What exactly are you trying to achieve by reading from the .gdf file being written? Can't you connect the the FieldTrip buffer that captures biosemi2ft's output? Best, Boris On Wed, Jan 4, 2012 at 7:11 AM, Hamza Fawzi Altakroury (Student) wrote: > Hello, > > What is the best function for reading data from *.gdf file in Matlab while > "biosemi2ft" is running. > > Best > > -- > Hamza Fawzi Altakroury > Graduate student - MA > Faculty of Engineering and Natural Sciences > Sabancı University > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip From hamzaf at sabanciuniv.edu Wed Jan 4 08:13:13 2012 From: hamzaf at sabanciuniv.edu (Hamza Fawzi Altakroury (Student)) Date: Wed, 4 Jan 2012 09:13:13 +0200 Subject: [FieldTrip] Reading data while biosemi2ft is running In-Reply-To: References: Message-ID: Hello, I am trying to do online processing, where the biosemi2ft captures the data puts it in a gdf file, and a function in Matlab reads the file continuously and process it. Or do you recommend me to use another way for online processing? Best On Wed, Jan 4, 2012 at 8:54 AM, Boris Reuderink wrote: > Hi, > > What exactly are you trying to achieve by reading from the .gdf file > being written? > Can't you connect the the FieldTrip buffer that > captures biosemi2ft's output? > > Best, > > Boris > > > On Wed, Jan 4, 2012 at 7:11 AM, Hamza Fawzi Altakroury (Student) > wrote: > > Hello, > > > > What is the best function for reading data from *.gdf file in Matlab > while > > "biosemi2ft" is running. > > > > Best > > > > -- > > Hamza Fawzi Altakroury > > Graduate student - MA > > Faculty of Engineering and Natural Sciences > > Sabancı University > > > > _______________________________________________ > > 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 -- Hamza Fawzi Altakroury Graduate student - MA Faculty of Engineering and Natural Sciences Sabancı University -------------- next part -------------- An HTML attachment was scrubbed... URL: From b.reuderink at donders.ru.nl Wed Jan 4 12:13:07 2012 From: b.reuderink at donders.ru.nl (Boris Reuderink) Date: Wed, 4 Jan 2012 12:13:07 +0100 Subject: [FieldTrip] Reading data while biosemi2ft is running In-Reply-To: References: Message-ID: Then I would definitely recommend to read form the buffer, and not from a file that is being written to disk. Maybe you can find some pointers on this wiki page: http://fieldtrip.fcdonders.nl/getting_started/realtime ? Best regards, Boris On Wed, Jan 4, 2012 at 8:13 AM, Hamza Fawzi Altakroury (Student) wrote: > Hello, > > I am trying to do online processing, where the biosemi2ft captures the data > puts it in a gdf file, and a function in Matlab reads the file continuously > and process it. > > Or do you recommend me to use another way for online processing? > > Best > > > On Wed, Jan 4, 2012 at 8:54 AM, Boris Reuderink > wrote: >> >> Hi, >> >> What exactly are you trying to achieve by reading from the .gdf file >> being written? > > >> >> Can't you connect the the FieldTrip buffer that >> captures biosemi2ft's output? >> >> Best, >> >> Boris >> >> >> On Wed, Jan 4, 2012 at 7:11 AM, Hamza Fawzi Altakroury (Student) >> wrote: >> > Hello, >> > >> > What is the best function for reading data from *.gdf file in Matlab >> > while >> > "biosemi2ft" is running. >> > >> > Best >> > >> > -- >> > Hamza Fawzi Altakroury >> > Graduate student - MA >> > Faculty of Engineering and Natural Sciences >> > Sabancı University >> > >> > _______________________________________________ >> > 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 > > > > > -- > Hamza Fawzi Altakroury > Graduate student - MA > Faculty of Engineering and Natural Sciences > Sabancı University > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip From lihqih at gmail.com Wed Jan 4 16:52:30 2012 From: lihqih at gmail.com (qi li) Date: Wed, 4 Jan 2012 10:52:30 -0500 Subject: [FieldTrip] artifact rejection Message-ID: Hi, I am confused about the plot of the z-score and 'most contribute' channel trial plot in the automatic artifact rejection tutorial. The z-score formula provided in the tutorial is linear to the time course of a particular channel of a specific trial, but the two plots don't look alike. ICA in the tutorial only applies to ECG, can it be applied to remove eye blink and other known artifacts instead of rejecting trials. Thanks! Qi -------------- next part -------------- An HTML attachment was scrubbed... URL: From jm.horschig at donders.ru.nl Thu Jan 5 09:20:25 2012 From: jm.horschig at donders.ru.nl (=?ISO-8859-1?Q?=22J=F6rn_M=2E_Horschig=22?=) Date: Thu, 05 Jan 2012 09:20:25 +0100 Subject: [FieldTrip] artifact rejection In-Reply-To: References: Message-ID: <4F055D49.4020401@donders.ru.nl> Dear Qi, Though I am not sure to what z-score formula you are referring to, I guess you are talking about the 'summary' mode of ft_rejectvisual. Z-scores are computed in different ways here, once across channels and once across time, leading to two different plots. The third plot is an accumulated plot of these two, where colors indicate the strength of the selected measure (e.g. z-score). Thus, in terms of the z-score formula, it is once computed with the average and standard deviation across the time-dimension per channel and once across the channel-dimension per time bin. I hope this clarifies why the two plots don't show the same. ICA can also be applied to eye blinks, for which an example is given in the "Walkthrough" http://fieldtrip.fcdonders.nl/walkthrough#using_ica_for_eye_artifact_removal And of course, ICA can be used for anything else you believe in (e.g. look for papers by Makeig) Best, Jörn On 1/4/2012 4:52 PM, qi li wrote: > Hi, > > I am confused about the plot of the z-score and 'most contribute' > channel trial plot in the automatic artifact rejection tutorial. The > z-score formula provided in the tutorial is linear to the time course > of a particular channel of a specific trial, but the two plots don't > look alike. > > ICA in the tutorial only applies to ECG, can it be applied to remove > eye blink and other known artifacts instead of rejecting trials. > > Thanks! > > Qi > > > > > _______________________________________________ > 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 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 b.reuderink at donders.ru.nl Thu Jan 5 12:19:29 2012 From: b.reuderink at donders.ru.nl (Boris Reuderink) Date: Thu, 5 Jan 2012 12:19:29 +0100 Subject: [FieldTrip] Trigger values in data matrix In-Reply-To: References: Message-ID: Dear Hamza, Could you elaborate on what you mean here? Could you perhaps provide some context, and a minimal working example? Best, Boris On Sunday, December 25, 2011, Hamza Fawzi Altakroury (Student) wrote: > Hello, > > I can't get the real trigger values if use sopen function (or > ft_read_data), even after adding the min value -1.7281e+009 to get a > positive values. > > Note: I plotted the triggers and their proportion is right but I can't get > their exact values, what should I do. > > Best, > > -- > Hamza Fawzi Altakroury > Graduate student - MA > Faculty of Engineering and Natural Sciences > Sabancı University > -------------- next part -------------- An HTML attachment was scrubbed... URL: From jan.schoffelen at donders.ru.nl Thu Jan 5 12:36:05 2012 From: jan.schoffelen at donders.ru.nl (jan-mathijs schoffelen) Date: Thu, 5 Jan 2012 12:36:05 +0100 Subject: [FieldTrip] ft_headmodelplot coordinate system origin problem In-Reply-To: References: <321B871E-53E2-43D8-B397-EA9C73C8B32C@donders.ru.nl> <76760214-3081-465C-8AFB-3E3A52A53C24@donders.ru.nl> <1F5462DE-0087-4F8A-AD1B-62B2A334E5FF@donders.ru.nl> Message-ID: <0F50C0B9-135D-49BA-8024-FD8DC15C0C90@donders.ru.nl> Hi Ion, Did you use the mri with the correct coordinate system (i.e. MEG-based) for the interpolation? JM On Jan 3, 2012, at 2:22 PM, Ion Lavado wrote: > Thank you very much Jan! Now everything fits using ft_headmodelplot(cfg). You solved our problem of the week. > > Just one final problem we have: > > - we are doing the beamformig source analisys. > > - our vol, grid and grad fits ok. > > -we have the sourcePre = ft_sourceanalysis(cfg, freqPre); > sourcePost = ft_sourceanalysis(cfg, freqPost); > > -we then interpolate the data with > > cfg = []; > cfg.downsample = 2; > sourcePostInt = ft_sourceinterpolate(cfg, sourcePost , mri_real); > > - finally we use method SLICE to plot the results: (WITH MRI_REAL) > > %METHOD SLICE: > sourceDiff = sourcePost; > sourceDiff.avg.pow = (sourcePost.avg.pow - sourcePre.avg.pow) ./ sourcePre.avg.pow; > cfg = [] > cfg.downsample = 2; > sourceDiffInt = ft_sourceinterpolate(cfg, sourceDiff , mri_real); > cfg = []; > cfg.method = 'slice'; > cfg.interactive = 'yes'; > cfg.funparameter = 'avg.pow'; > cfg.maskparameter = cfg.funparameter; > cfg.funcolorlim = [0 2]; > cfg.opacitylim = [0 2]; > cfg.opacitymap = 'rampup'; > figure('Name', 'SLICE Method') > ft_sourceplot(cfg, sourceDiffInt); > > > The problem comes now (not before), that when plotting the result don't fit the mri in the figure. I send you the .jpg so you can see it and try to help us whith this FINAL problem! In the script i send you, the problem i think starts after line 156. > > You are really kind, and thank you very much for your usefull help. > > Ion > > > > > > > > > 2012/1/3 jan-mathijs schoffelen > Hi Ion, > > If the positive z-axis (denoted by +Z in the figure that is created by ft_determine_coordsys) is not pointing to the top of the head you made an error in ft_volumerealign and probably exchanged left with right in setting the lpa and rpa locations. This results in the coordinate system being a left-handed one and causes all kind of trouble later on. If this is the case, you need to repeat ft_volumerealign (with the original MRI) and type 'l' where you typed 'r', and the other way around. Ft_volumesegment relies on spm for the segmentation, which relies on the mri-data being defined in a meaningful right-handed coordinate system (which can be either mni-based, or MEG system based). > > If however the +Z is just pointing downward but the anatomy is 'upside-down' (neck pointing to the ceiling) then the coordinate system is a valid, i.e. a right-handed RAS (right-anterior-superior) coordinate system. If this is the case then I wouldn't know what's going on, because I would suspect that ft_volumesegment Perhaps some other neuromag aficionados could jump to the rescue here? > > As such ft_determine_coordsys does not change the coordinate system of your mri, it just changes the coordsys field, which helps FieldTrip in the interpretation of the real-world coordinates. The mapping of voxel locations to real-world locations is defined by mri.transform which can be changed by ft_volumerealign. > > Best wishes, > > JM > > > On Jan 3, 2012, at 1:20 PM, Ion Lavado wrote: > >> The Z axis is pointing to the oposite direction (inferior), so i have the mri upside down. How can i change this? When Matlab plots the figure it asks me this: >> >> The positive x-axis is pointing towards the right >> The positive y-axis is pointing towards anterior >> The positive z-axis is pointing towards superior >> Do you want to change the anatomical labels for the axes [y, N]? >> >> I then mark to change the axis and mark the positive z-axis as (i)inferior, but when plotting again is as the begginig... What do i have to do? >> >> Thank you very much Jan. >> >> >> >> 2012/1/3 jan-mathijs schoffelen >> Hi Ion, >> >> I'd suggest first to have a look at mri_real. How does it look in ft_determine_coordsys? >> In particular, is the z-axis pointing in the correct direction? >> >> JM >> >> >> On Jan 3, 2012, at 12:45 PM, Ion Lavado wrote: >> >>> Hi Jan, >>> I am sorry, I have been trying with your method but now what is incorrect is the segmentation. >>> Here is the script. Maybe you understand better the problem...I am getting crazy. The problem comes from line 53 >>> Thank you very much, >>> Best, >>> Ion >>> >>> >>> >>> 2012/1/3 jan-mathijs schoffelen >>> Hi Ion, >>> >>> What is the coordinate system in which the vol and mri are defined? To me it does not look like the neuromag coordinate system, but rather like MNI-space. I would expect the origin to be a bit (~4 cm) lower and a bit more anterior (because the origin is defined on the line going through the pre-auricular points. In the 'vol.jpg' it seems that the origin is in the anterior commissure. Although in principle it shouldn't matter, it is convention to express the coordinates in the MEG-system's coordinate system, i.e. in neuromag space in this case. Therefore I would say that the vol and grid variables need to be adjusted, rather than the sensor positions. As mentioned in my previoius message, this can be achieved by coregistering the anatomy to the neuromag coordinate system using ft_volumerealign. You need to manually identify the locations of the fiducials that define the coordinate system, i.e. the nasion, lpa and rpa. The required cfg is: cfg.interactive = 'yes', cfg.coordsys = 'neuromag'. Once the anatomy is coregistered you can proceed with creating the vol and grid variables. >>> >>> Best, >>> >>> Jan-Mathijs >>> >>> >>> On Jan 3, 2012, at 11:38 AM, Ion Lavado wrote: >>> >>>> Thank you for your help Jan. I tried all you told but i continue with my problem. The coordinates for the head (volume) and mri are the same, with the function ft_determine_coordsys i see this. >>>> I think that the problem is about the sensor (helmet) origin of coordinates. Please see the images i adjunt here, the sensors origin is very low(nearly out of the helmet) and when ploting everything i suppose that every origin align to each other, so that the brain comes a little bit low. >>>> >>>> Best whishes, >>>> >>>> Ion >>>> >>>> 2012/1/2 jan-mathijs schoffelen >>>> Dear Ion, >>>> >>>> Are you sure that the sensor positions are defined in the same coordinate system as are the volume conductor model and the source positions? If not, then this is the likely cause of the shift. You can have a look here for more information about the different coordinate systems: http://fieldtrip.fcdonders.nl/faq/how_are_the_different_head_and_mri_coordinate_systems_defined >>>> >>>> In order to coregister the anatomical mri to the sensor array, you can use ft_volumerealign. >>>> >>>> Best wishes, >>>> >>>> Jan-Mathijs >>>> >>>> >>>> On Jan 2, 2012, at 5:11 PM, Ion Lavado wrote: >>>> >>>>> Hello, i'm working with MEG data from Elekta Neuromag. My problem comes when i try to plot the headmodel with the function ft_headmodelplot(cfg). This should plot the head model(volume) + brain grid + sensors. As you can see in the adjunted image, my head volume and grid is not centered and part of the head could not be read by the sensors. Is it possible to modify this so i can center the head in the sensors(helmet)? >>>>> Thank you very much. >>>>> >>>>> Ion Lavado >>>>> _______________________________________________ >>>>> 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 >>>> >>>> >>>> _______________________________________________ >>>> 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 >>> >>> >>> _______________________________________________ >>> 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 >> >> >> _______________________________________________ >> 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 > > > _______________________________________________ > 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 -------------- next part -------------- An HTML attachment was scrubbed... URL: From lihqih at gmail.com Thu Jan 5 14:30:22 2012 From: lihqih at gmail.com (qi li) Date: Thu, 5 Jan 2012 08:30:22 -0500 Subject: [FieldTrip] artifact rejection In-Reply-To: <4F055D49.4020401@donders.ru.nl> References: <4F055D49.4020401@donders.ru.nl> Message-ID: Hi Jörn, Thanks a lot! Now it makes sense to me. Best regards, Qi On Thu, Jan 5, 2012 at 3:20 AM, "Jörn M. Horschig" < jm.horschig at donders.ru.nl> wrote: > Dear Qi, > > Though I am not sure to what z-score formula you are referring to, I guess > you are talking about the 'summary' mode of ft_rejectvisual. Z-scores are > computed in different ways here, once across channels and once across time, > leading to two different plots. The third plot is an accumulated plot of > these two, where colors indicate the strength of the selected measure (e.g. > z-score). Thus, in terms of the z-score formula, it is once computed with > the average and standard deviation across the time-dimension per channel > and once across the channel-dimension per time bin. I hope this clarifies > why the two plots don't show the same. > > ICA can also be applied to eye blinks, for which an example is given in > the "Walkthrough" > > http://fieldtrip.fcdonders.nl/walkthrough#using_ica_for_eye_artifact_removal > > And of course, ICA can be used for anything else you believe in (e.g. look > for papers by Makeig) > > Best, > Jörn > > > On 1/4/2012 4:52 PM, qi li wrote: > > Hi, > > I am confused about the plot of the z-score and 'most contribute' channel > trial plot in the automatic artifact rejection tutorial. The z-score > formula provided in the tutorial is linear to the time course of a > particular channel of a specific trial, but the two plots don't look alike. > > ICA in the tutorial only applies to ECG, can it be applied to remove eye > blink and other known artifacts instead of rejecting trials. > > Thanks! > > Qi > > > > > _______________________________________________ > fieldtrip mailing listfieldtrip at donders.ru.nlhttp://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 > > 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 hamzaf at sabanciuniv.edu Thu Jan 5 15:14:00 2012 From: hamzaf at sabanciuniv.edu (Hamza Fawzi Altakroury (Student)) Date: Thu, 5 Jan 2012 16:14:00 +0200 Subject: [FieldTrip] Trigger values in data matrix In-Reply-To: References: Message-ID: Dear Boris I sent that email when I was trying to read from .gdf file (by sread) while it is acquiring the data through biosemi2ft. But it did not work. My question was if I do the following: >> H = sopen('test.gdf'); >> data = sread(H,2048); % I did not here 2048 sample I did not know why. >> data = data'; >> trig = data(1,:); % The status channel >> plot(trig) I am not going to get the trigger values that I desired. Best. On Thu, Jan 5, 2012 at 1:19 PM, Boris Reuderink wrote: > Dear Hamza, > > Could you elaborate on what you mean here? Could you perhaps provide some > context, and a minimal working example? > > Best, > > Boris > > On Sunday, December 25, 2011, Hamza Fawzi Altakroury (Student) wrote: > >> Hello, >> >> I can't get the real trigger values if use sopen function (or >> ft_read_data), even after adding the min value -1.7281e+009 to get a >> positive values. >> >> Note: I plotted the triggers and their proportion is right but I can't >> get their exact values, what should I do. >> >> Best, >> >> -- >> Hamza Fawzi Altakroury >> Graduate student - MA >> Faculty of Engineering and Natural Sciences >> Sabancı University >> > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > -- Hamza Fawzi Altakroury Graduate student - MA Faculty of Engineering and Natural Sciences Sabancı University -------------- next part -------------- An HTML attachment was scrubbed... URL: From b.reuderink at donders.ru.nl Thu Jan 5 15:30:14 2012 From: b.reuderink at donders.ru.nl (Boris Reuderink) Date: Thu, 5 Jan 2012 15:30:14 +0100 Subject: [FieldTrip] Trigger values in data matrix In-Reply-To: References: Message-ID: Dear Hamza, It seems that the sopen and sread functions are not part of the FieldTrip interface. Perhaps you could use ft_read_data [1]? Best, Boris [1] http://fieldtrip.fcdonders.nl/reference/ft_read_data On Thu, Jan 5, 2012 at 3:14 PM, Hamza Fawzi Altakroury (Student) wrote: > Dear Boris > > I sent that email when I was trying to read from .gdf file (by sread) while > it is acquiring the data through biosemi2ft. But it did not work. > > My question was if I do the following: > >>> H = sopen('test.gdf'); >>> data = sread(H,2048);     % I did not here 2048 sample I did not know >>> why. >>> data = data'; >>> trig = data(1,:);               % The status channel >>> plot(trig) > > I am not going to get the trigger values that I desired. > > Best. > > On Thu, Jan 5, 2012 at 1:19 PM, Boris Reuderink > wrote: >> >> Dear Hamza, >> >> Could you elaborate on what you mean here? Could you perhaps provide some >> context, and a minimal working example? >> >> Best, >> >> Boris >> >> On Sunday, December 25, 2011, Hamza Fawzi Altakroury (Student) wrote: >>> >>> Hello, >>> >>> I can't get the real trigger values if use sopen function (or >>> ft_read_data), even after adding the min value -1.7281e+009 to get a >>> positive values. >>> >>> Note: I plotted the triggers and their proportion is right but I can't >>> get their exact values, what should I do. >>> >>> Best, >>> >>> -- >>> Hamza Fawzi Altakroury >>> Graduate student - MA >>> Faculty of Engineering and Natural Sciences >>> Sabancı University >> >> >> _______________________________________________ >> fieldtrip mailing list >> fieldtrip at donders.ru.nl >> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > > > > -- > Hamza Fawzi Altakroury > Graduate student - MA > Faculty of Engineering and Natural Sciences > Sabancı University > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip From Don.Rojas at ucdenver.edu Fri Jan 6 22:12:15 2012 From: Don.Rojas at ucdenver.edu (Rojas, Don) Date: Fri, 6 Jan 2012 14:12:15 -0700 Subject: [FieldTrip] beamformer_sam lambda Message-ID: <6023196E-323C-45C6-BCB2-7CC16204E790@ucdenver.edu> To all, I encountered a problem with the 'sam' method for ft_sourceanalysis. It looks to me that when specifying the configuration option: cfg.sam.lambda = '5%'; i.e., lambda is a percentage, not an actual number, the beamformer_sam routine does not have comparable code as the beamformer_lcmv routine to handle that type of input. I'm wondering if simply inserting the following bit of code between lines 97 and 99 of beamformer_sam, borrowed and edited from beamformer_lcmv, will work: if ~isempty(lambda) && ischar(lambda) && lambda(end)=='%' ratio = sscanf(lambda, '%f%%'); ratio = ratio/100; lambda = ratio * trace(all_cov)/size(all_cov,1); end This seems to work okay in limited tests, but maybe I'm making a mistake here. I'm using a recent svn code version, revision 5097. Best, Don ----------------------- Don Rojas, Ph.D. Associate Professor of Psychiatry U. of Colorado Denver Anschutz Medical Campus Director, UCD Magnetoencephalography Lab 13001 E. 17th Pl F546 Aurora, CO 80045 303-724-4994 -------------- next part -------------- An HTML attachment was scrubbed... URL: From jan.schoffelen at donders.ru.nl Sat Jan 7 09:02:58 2012 From: jan.schoffelen at donders.ru.nl (jan-mathijs schoffelen) Date: Sat, 7 Jan 2012 09:02:58 +0100 Subject: [FieldTrip] beamformer_sam lambda In-Reply-To: <6023196E-323C-45C6-BCB2-7CC16204E790@ucdenver.edu> References: <6023196E-323C-45C6-BCB2-7CC16204E790@ucdenver.edu> Message-ID: <45341A04-A0B9-4717-8863-C13E47854226@donders.ru.nl> Dear Don, At first sight, this makes sense to me, also in the light of consistency across the different algorithms. I'll create a 'bug' out of this and we will discuss it in the group and most likely implement it. Thanks for the notification and best wishes, Jan-Mathijs On Jan 6, 2012, at 10:12 PM, Rojas, Don wrote: > To all, > > I encountered a problem with the 'sam' method for ft_sourceanalysis. It looks to me that when specifying the configuration option: > > cfg.sam.lambda = '5%'; > > i.e., lambda is a percentage, not an actual number, the beamformer_sam routine does not have comparable code as the beamformer_lcmv routine to handle that type of input. I'm wondering if simply inserting the following bit of code between lines 97 and 99 of beamformer_sam, borrowed and edited from beamformer_lcmv, will work: > > if ~isempty(lambda) && ischar(lambda) && lambda(end)=='%' > ratio = sscanf(lambda, '%f%%'); > ratio = ratio/100; > lambda = ratio * trace(all_cov)/size(all_cov,1); > end > > This seems to work okay in limited tests, but maybe I'm making a mistake here. I'm using a recent svn code version, revision 5097. > > Best, > > Don > > > ----------------------- > Don Rojas, Ph.D. > Associate Professor of Psychiatry > U. of Colorado Denver Anschutz Medical Campus > Director, UCD Magnetoencephalography Lab > 13001 E. 17th Pl F546 > Aurora, CO 80045 > 303-724-4994 > > _______________________________________________ > 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 -------------- next part -------------- An HTML attachment was scrubbed... URL: From drivolta81 at gmail.com Mon Jan 9 00:00:57 2012 From: drivolta81 at gmail.com (Davide) Date: Mon, 9 Jan 2012 00:00:57 +0100 Subject: [FieldTrip] Tms artifact removal from eeg data Message-ID: <22A7D4AE-B0CF-4222-BAA9-C44CF588697F@gmail.com> Dear all, I just wish to ask what is a good way to remove tms artifacts from eeg data using fieldtrip. The artifact lasts for around 4-8 ms after the tms pulse. Thanks for your help, Davide Sent from my iPad From mark.noordenbos at gmail.com Mon Jan 9 17:34:52 2012 From: mark.noordenbos at gmail.com (Mark Noordenbos) Date: Mon, 9 Jan 2012 17:34:52 +0100 Subject: [FieldTrip] Plotting mask using ft_singleplotER Message-ID: Hi Fieldtrippers, I was wondering if it is possible to plot a highlighted area under a curve using the 'mask' option of the function ft_singleplotER to indicate time intervals with significant effects. The mask structure was obtained from the timelockstatistics function. I try to plot the mask using the following code: cfgplot=[]; cfgplot.ylim = [-4 2]; cfgplot.maskparameter='mask'; ft_singleplotER(cfgplot, Data); The structure Data contains the following: label: {'Fz'} time: [1x101 double] individual: [1x101 double] dimord: 'chan_time' cfg: [1x1 struct] avg: [1x101 double] mask: [1x101 logical] This results in the following error: ??? Undefined function or variable 'xvector'. Error in ==> ft_singleplotER at 477 maskdatavector = reshape(mean(datmask,1), [1 numel(xvector)]); The variable xvector is not defined in ft_singleplotER. Replacing xvector with datmask, didn't helped. However, this resulted in another error: ??? Error using ==> ft_plot_vector at 105 the dimensions of the highlight should be identical to the dimensions of the data Error in ==> ft_singleplotER at 514 ft_plot_vector(xval, datavector, 'style', cfg.linestyle{i}, 'color', color, ... So my questions are: Is this the right function to highlight significant time intervals under a curve? And, if so, how to do this? Kind Regards, Mark -- Mark Noordenbos, MSc Radboud University Nijmegen Behavioural Science Institute P.O. Box 9104, Room A05.36 6500 HE Nijmegen The Netherlands Email: m.noordenbos at bsi.ru.nl Telephone: +31 24 3612070 Fax: +31 24 3616211 http://www.ru.nl -------------- next part -------------- An HTML attachment was scrubbed... URL: From l.verhagen at fcdonders.ru.nl Mon Jan 9 19:44:01 2012 From: l.verhagen at fcdonders.ru.nl (Verhagen, L. (Lennart)) Date: Mon, 9 Jan 2012 19:44:01 +0100 (CET) Subject: [FieldTrip] Tms artifact removal from eeg data In-Reply-To: <17641A8D-2EF2-4CF9-9A80-C23B43367011@donders.ru.nl> Message-ID: <150077787.882929.1326134641950.JavaMail.root@monoceros.zimbra.ru.nl> Dear Davide, Currently, there is no dedicated processing pipeline available in FieldTrip that will allow you to remove TMS artifacts from EEG data. However, I have been using FieldTrip to analyze TMS-EEG data for the past two years (with success), so I am happy to give you some advice. Please remember that the difference between "good" and "bad" TMS-EEG data will not be made by FieldTrip (or any other analysis package), but by your data acquisition. There are a number of artifacts which are dealt with in different ways: the pulse itself, clipping, ringing step-response of the op-amp, decay of the RC-circuit in the filters of the amplifier, decay of the scalp-electrolyte-electrode circuit, muscle twitch, TMS recharging artifact, auditory evoked response, somatosensory evoked response. 1. Pulse: The data during the pulse (e.g. 0.3 ms) is lost and cannot be recovered. 2. Clipping: Only the Nexstim amplifier is currently theoretically able to hold-and-clamp your data acquisition. In all other amplifiers the signal will go out-of-range ("clip") between 2-6 ms, depending on your setup. In this time-period, your data is lost. Some people like to interpolate their data over the missing values. I personally don't like that. 3. Following the clipping of the data your operational amplifier circuit will be subject to a step-response. This is a characteristic ringing artifact often lasting up to 10 ms. You can put a lot of effort in modeling this artifact (search for "Kalman filter"), but I personally have not seen any modeling/filtering that worked adequately. Therefore many people consider the first 8-10 ms following the TMS pulse as lost. Some interpolate, I replace the values by NaNs. 4. Decay step-response. You are very likely to also observe a decay artifact in some channels, resembling an exponential decay. This decay can last relatively long. In horrible cases even up to 1 second, but a decay lasting 50-150 ms is not uncommon. I have addressed this artifact by developing an constrained iterative fitting algorithm that is capable of modeling four additive exponential decays with different time constants. This worked reasonable well for my data, but has not been tested on data acquired in any other lab (or setup for that matter). If you are interested, and know what you are doing, I could share my code with you (ft_tms_fitexpstepresp). I plan to develop this code (and a tutorial TMS-EEG processing pipeline) together with other TMS-EEG experts at the Donders, into a tested set op mfiles, which will hopefully find their place in the FieldTrip distribution. 5. the muscle twitch is notorious and cannot be easily removed. 6. depending on your TMS machine, you can see a recharging artifact. Sometimes it can be horrendous, other times it is hardly visible or completely absent. The best way to deal with this artifact is to avoid it. Next to replacing values by NaNs and modeling artifacts, I have also used Independent Component Analysis to identify and remove artifacts. Please keep in mind that you can only use ICA if you have already attempted to clean up your data by all other means. TMS artifacts can be quite strong and show non-linear behavior. Therefore the independent components might be overloaded by the extreme variance provided by the TMS pulse alone. I hope I have helped you a bit further. I can imagine that you have more questions. If so, it would be great if you specify them clearly. I could fill a whole new paper will many little tips and tricks, but that would be utterly impractical. By the way, a TMS toolkit focusing on multi-modal TMS (strong emphasis on TMS-EEG) is likely to be organized by the Donders early this summer, so keep an eye out on this mailing list if you are interested. Cheers, Lennart. > From: Davide > Date: 9 January 2012 0:00:57 CET > To: "fieldtrip at donders.ru.nl" > Subject: [FieldTrip] Tms artifact removal from eeg data > Reply-To: Email discussion list for the FieldTrip project > > Dear all, > > I just wish to ask what is a good way to remove tms artifacts from eeg data using fieldtrip. > > The artifact lasts for around 4-8 ms after the tms pulse. > > Thanks for your help, > Davide From drivolta81 at gmail.com Tue Jan 10 10:59:01 2012 From: drivolta81 at gmail.com (Davide Rivolta) Date: Tue, 10 Jan 2012 10:59:01 +0100 Subject: [FieldTrip] Tms artifact removal from eeg data In-Reply-To: <150077787.882929.1326134641950.JavaMail.root@monoceros.zimbra.ru.nl> References: <17641A8D-2EF2-4CF9-9A80-C23B43367011@donders.ru.nl> <150077787.882929.1326134641950.JavaMail.root@monoceros.zimbra.ru.nl> Message-ID: Dear Lennart, Thank you for your reply. It is really useful. Let me play a bit with it and will let you know if I have further problems. Thanks again, Davide On Mon, Jan 9, 2012 at 7:44 PM, Verhagen, L. (Lennart) < l.verhagen at fcdonders.ru.nl> wrote: > Dear Davide, > > Currently, there is no dedicated processing pipeline available in > FieldTrip that will allow you to remove TMS artifacts from EEG data. > However, I have been using FieldTrip to analyze TMS-EEG data for the past > two years (with success), so I am happy to give you some advice. > > Please remember that the difference between "good" and "bad" TMS-EEG data > will not be made by FieldTrip (or any other analysis package), but by your > data acquisition. > > There are a number of artifacts which are dealt with in different ways: > the pulse itself, clipping, ringing step-response of the op-amp, decay of > the RC-circuit in the filters of the amplifier, decay of the > scalp-electrolyte-electrode circuit, muscle twitch, TMS recharging > artifact, auditory evoked response, somatosensory evoked response. > > 1. Pulse: The data during the pulse (e.g. 0.3 ms) is lost and cannot be > recovered. > 2. Clipping: Only the Nexstim amplifier is currently theoretically able to > hold-and-clamp your data acquisition. In all other amplifiers the signal > will go out-of-range ("clip") between 2-6 ms, depending on your setup. In > this time-period, your data is lost. Some people like to interpolate their > data over the missing values. I personally don't like that. > 3. Following the clipping of the data your operational amplifier circuit > will be subject to a step-response. This is a characteristic ringing > artifact often lasting up to 10 ms. You can put a lot of effort in > modeling this artifact (search for "Kalman filter"), but I personally have > not seen any modeling/filtering that worked adequately. Therefore many > people consider the first 8-10 ms following the TMS pulse as lost. Some > interpolate, I replace the values by NaNs. > 4. Decay step-response. You are very likely to also observe a decay > artifact in some channels, resembling an exponential decay. This decay can > last relatively long. In horrible cases even up to 1 second, but a decay > lasting 50-150 ms is not uncommon. I have addressed this artifact by > developing an constrained iterative fitting algorithm that is capable of > modeling four additive exponential decays with different time constants. > This worked reasonable well for my data, but has not been tested on data > acquired in any other lab (or setup for that matter). If you are > interested, and know what you are doing, I could share my code with you > (ft_tms_fitexpstepresp). I plan to develop this code (and a tutorial > TMS-EEG processing pipeline) together with other TMS-EEG experts at the > Donders, into a tested set op mfiles, which will hopefully find their > place in the FieldTrip distribution. > 5. the muscle twitch is notorious and cannot be easily removed. > 6. depending on your TMS machine, you can see a recharging artifact. > Sometimes it can be horrendous, other times it is hardly visible or > completely absent. The best way to deal with this artifact is to avoid it. > > Next to replacing values by NaNs and modeling artifacts, I have also used > Independent Component Analysis to identify and remove artifacts. Please > keep in mind that you can only use ICA if you have already attempted to > clean up your data by all other means. TMS artifacts can be quite strong > and show non-linear behavior. Therefore the independent components might > be overloaded by the extreme variance provided by the TMS pulse alone. > > I hope I have helped you a bit further. I can imagine that you have more > questions. If so, it would be great if you specify them clearly. I could > fill a whole new paper will many little tips and tricks, but that would be > utterly impractical. By the way, a TMS toolkit focusing on multi-modal TMS > (strong emphasis on TMS-EEG) is likely to be organized by the Donders > early this summer, so keep an eye out on this mailing list if you are > interested. > > Cheers, > Lennart. > > > > From: Davide > > Date: 9 January 2012 0:00:57 CET > > To: "fieldtrip at donders.ru.nl" > > Subject: [FieldTrip] Tms artifact removal from eeg data > > Reply-To: Email discussion list for the FieldTrip project > > > > > Dear all, > > > > I just wish to ask what is a good way to remove tms artifacts from eeg > data using fieldtrip. > > > > The artifact lasts for around 4-8 ms after the tms pulse. > > > > Thanks for your help, > > Davide > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > -- Davide Rivolta, PhD -------------- next part -------------- An HTML attachment was scrubbed... URL: From ole.jensen at donders.ru.nl Tue Jan 10 11:23:53 2012 From: ole.jensen at donders.ru.nl (Ole Jensen) Date: Tue, 10 Jan 2012 11:23:53 +0100 Subject: [FieldTrip] Data Analysis Competition at Biomag2012 Message-ID: <4F0C11B9.9050806@donders.ru.nl> Dear colleagues, We are happy to announce the 'Biomag2012 analysis competition'. Please consider participating or encourage students, postdocs and colleagues to take part. See below for details. Best regards, Ole Jensen and Ali Bahramisharif ------ *Biomag2012 analysis competition - distributed representations *The decoding of mental states and neuronal representations from brain imaging data is a research field in rapid development (Spiers HJ, Maguire EA. Decoding human brain activity during real-world experiences. Trends Cogn Sci. 2007 ; Haynes JD, Rees G. Decoding mental states from brain activity in humans. Nat Rev Neurosci. 2006). These decoding approaches have a great potential in MEG research where data are recorded from hundreds of sensors with a millisecond time resolution. In particular cognitive neuroscience could benefit from further development of decoding approaches in order to identify representational specific brain activity._ _The aims of the competition is to: * Promote the development and application of new multivariate analysis techniques for decoding of brain activity * Make the audience aware of novel approaches * Elucidate the pros and cons of different the techniques o Which assumptions are behind a given approach? o What are the limitations? * Attract signal-processing experts from outside the MEG field * Encourage a discussion on the cognitive insight which the techniques can bring about The deadline for submitting results is Aug 17, 2012 Link for details, data etc: http://www.biomag2012.org/content/data-analysis-competition -- Ole Jensen http://www.neuosc.com -------------- next part -------------- An HTML attachment was scrubbed... URL: From jan.schoffelen at donders.ru.nl Tue Jan 10 14:16:35 2012 From: jan.schoffelen at donders.ru.nl (jan-mathijs schoffelen) Date: Tue, 10 Jan 2012 14:16:35 +0100 Subject: [FieldTrip] change in default behavior spectral analysis functions Message-ID: Dear all, I would like to report a slight change in the default behavior of the spectral analysis routines (ft_freqanalysis, and the low level specest_XXX functions). I do not expect that this change has a major effect on your analysis results, but I want you to be aware of the change. The issue at hand is the way in which the low-level spectral analysis routines preprocess the data just prior to taking the fft, and it relates to the following FAQs: http://fieldtrip.fcdonders.nl/faq/why_does_my_tfr_look_strange http://fieldtrip.fcdonders.nl/faq/why_does_my_tfr_look_strange_part_ii As of revision 3752 of ft_freqanalysis (the version information of the function used to generate your data can be obtained from freq.cfg.version) we introduced a default preprocessing step, which entailed the fitting and subtraction of a first order polynome to the time-domain data, prior to fourier transformation. This step was intended to address both abovementioned FAQs, and removes the DC-component and the linear trend. However, after hot and lengthy discussions in the FieldTrip team we decided to change the default behavior into just removing the DC-component. This change will be effective as of revision 5106. Once again, I don't expect this change to have whopping effects on your results, e.g. all of a sudden losing significance or so. If it does, it warrants attention because something funny might be going on in the lower frequency components of your data. If you want to emulate the default behavior of ft_freqanalysis as it existed prior to revision 3752, you need to specify cfg.polyremoval = -1; If you want to emulate the default behavior of ft_freqanalysis as it existed between revision 3752 and revision 5106, you need to specify cfg.polyremoval = 1; The new default is now cfg.polyremoval = 0; Happy computing, Jan-Mathijs 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 From julian.keil at gmail.com Thu Jan 12 15:18:16 2012 From: julian.keil at gmail.com (Julian Keil) Date: Thu, 12 Jan 2012 15:18:16 +0100 Subject: [FieldTrip] Error loading 4D-data Message-ID: <3AF95F5C-5DBB-4BC4-A52A-72637306597C@gmail.com> Hi, I have an error loading a 4D-dataset: ??? SWITCH expression must be a scalar or string constant. Error in ==> read_4d_hdr at 60 switch format Error in ==> ft_read_header at 164 orig = read_4d_hdr(datafile); Error in ==> trialfun_general at 55 hdr = ft_read_header(cfg.headerfile, 'headerformat', cfg.headerformat); Error in ==> ft_definetrial at 166 [trl, event] = feval(cfg.trialfun, cfg); It looks like field trip can't open the header for the datafile as: K>> header.header_data ans = FileType: [] file_type: '' and: K>> header_end header_end = 581365760 K>> header_offset header_offset = 6.4740e+15 However, a dataset from the same subject recorded 5 minutes earlier could be loaded just fine. Does anyone have an idea what is wrong here and maybe how to fix it? Thanks a lot! Julian Dipl. Psych. Julian Keil OBOB-Lab University of Konstanz Department of Psychology P.O. Box D25 78457 Konstanz Germany Tel: ++49 - (0)7531 - 88 42 50 Fax: ++49 - (0)7531 - 88 28 91 Email: julian.keil at uni-konstanz.de Homepage: http://www.uni-konstanz.de/obob -------------- next part -------------- An HTML attachment was scrubbed... URL: From lihqih at gmail.com Thu Jan 12 17:20:24 2012 From: lihqih at gmail.com (qi li) Date: Thu, 12 Jan 2012 11:20:24 -0500 Subject: [FieldTrip] ft_redefinetrial problem Message-ID: Hi, I have a fixed length experiment raw. I apply ft_redefinetrial with cfg.trl to epoch it into many segments. When this step is done, the output.hdr.grad has different fields from the input field. More specifically the pnt and ori field are gone thus cause trouble for the later analysis.* *I am using 12/23 version, is there a bug or it is suppose to be so. If I only want to separate the long data into segments, which command can change only the time window while keeping all the other parameters unchanged? Thanks! Qi -------------- next part -------------- An HTML attachment was scrubbed... URL: From r.oostenveld at donders.ru.nl Thu Jan 12 18:11:36 2012 From: r.oostenveld at donders.ru.nl (Robert Oostenveld) Date: Thu, 12 Jan 2012 18:11:36 +0100 Subject: [FieldTrip] Trigger values in data matrix In-Reply-To: References: Message-ID: <4AD90687-0D23-437B-8388-B872DB82B8D3@donders.ru.nl> Dear Hamza, For the GDF format, the low-level reading function underneath ft_read_data uses the Biosig toolbox (which contains the sopen and sread function) as you already had figured out. The problem with biosig is that it does not have a consistent way of representing the events in a dataset for all data formats that it represents, so the general wrapper around it in fieldtrip cannot get the events. So in short: fieldtrip explicitely recognizes header+data+event, whereas biosig only has header+data as a consistent representaiton of the file content. In your gdf file there is probably a trigger or status channel, which can be used for flank detection. In ft_read_event around line 354 you see the relevant code, where the fieldtrip/fileio/private/read_trigger function is used to read the channel and detect the triggers. I can imagine that the calibration of the trigger/status channel is incorerct, resulting in values that are not integers (as you would expect on a trigger channel). We recently internally discussed the gdf writer linked to the biosemi2ft realtime application. It would be good to have more example data from another system. We don't have a biosemi system ourselves, but a collaborating group in Nijmegen (Peter Desain's lab) has one. They have not yet reported a problem like yours, but it would be good to check. Therefore I suggest that you report it as a bug on bugzilla.fcdonders.nl and upload a problematic example file (see http://fieldtrip.fcdonders.nl/faq/how_should_i_send_example_data_to_the_developers). best Robert On 5 Jan 2012, at 15:14, Hamza Fawzi Altakroury (Student) wrote: > Dear Boris > > I sent that email when I was trying to read from .gdf file (by sread) while it is acquiring the data through biosemi2ft. But it did not work. > > My question was if I do the following: > > >> H = sopen('test.gdf'); > >> data = sread(H,2048); % I did not here 2048 sample I did not know why. > >> data = data'; > >> trig = data(1,:); % The status channel > >> plot(trig) > > I am not going to get the trigger values that I desired. > > Best. > > On Thu, Jan 5, 2012 at 1:19 PM, Boris Reuderink wrote: > Dear Hamza, > > Could you elaborate on what you mean here? Could you perhaps provide some context, and a minimal working example? > > Best, > > Boris > > On Sunday, December 25, 2011, Hamza Fawzi Altakroury (Student) wrote: > Hello, > > I can't get the real trigger values if use sopen function (or ft_read_data), even after adding the min value -1.7281e+009 to get a positive values. > > Note: I plotted the triggers and their proportion is right but I can't get their exact values, what should I do. > > Best, > > -- > Hamza Fawzi Altakroury > Graduate student - MA > Faculty of Engineering and Natural Sciences > Sabancı University > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > > > -- > Hamza Fawzi Altakroury > Graduate student - MA > Faculty of Engineering and Natural Sciences > Sabancı University > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip From stephen.whitmarsh at gmail.com Thu Jan 12 18:30:34 2012 From: stephen.whitmarsh at gmail.com (Stephen Whitmarsh) Date: Thu, 12 Jan 2012 18:30:34 +0100 Subject: [FieldTrip] Trigger values in data matrix In-Reply-To: <4AD90687-0D23-437B-8388-B872DB82B8D3@donders.ru.nl> References: <4AD90687-0D23-437B-8388-B872DB82B8D3@donders.ru.nl> Message-ID: Dear Hamza, For what it's worth: I use Fieldtrip to read GDF data written bybiosemi2ft (64 channel EEG), in the lab Robert mentioned, in the followingway (after installing the biosig toolbox): event  = ft_read_event(cfg.dataset,'headerformat','gdf');value  = [event(find(strcmp('STATUS', {event.type}))).value]';sample = [event(find(strcmp('STATUS', {event.type}))).sample]'; All the best,Stephen On 12 January 2012 18:11, Robert Oostenveld wrote: > Dear Hamza, > > For the GDF format, the low-level reading function underneath ft_read_data uses the Biosig toolbox (which contains the sopen and sread function) as you already had figured out. The problem with biosig is that it does not have a consistent way of representing the events in a dataset for all data formats that it represents, so the general wrapper around it in fieldtrip cannot get the events. So in short: fieldtrip explicitely recognizes header+data+event, whereas biosig only has header+data as a consistent representaiton of the file content. > > In your gdf file there is probably a trigger or status channel, which can be used for flank detection. In ft_read_event around line 354 you see the relevant code, where the fieldtrip/fileio/private/read_trigger function is used to read the channel and detect the triggers. I can imagine that the calibration of the trigger/status channel is incorerct, resulting in values that are not integers (as you would expect on a trigger channel). > > We recently internally discussed the gdf writer linked to the biosemi2ft realtime application. It would be good to have more example data from another system. We don't have a biosemi system ourselves, but a collaborating group in Nijmegen (Peter Desain's lab) has one. They have not yet reported a problem like yours, but it would be good to check. Therefore I suggest that you report it as a bug on bugzilla.fcdonders.nl and upload a problematic example file (see http://fieldtrip.fcdonders.nl/faq/how_should_i_send_example_data_to_the_developers). > > best > Robert > > > > > On 5 Jan 2012, at 15:14, Hamza Fawzi Altakroury (Student) wrote: > >> Dear Boris >> >> I sent that email when I was trying to read from .gdf file (by sread) while it is acquiring the data through biosemi2ft. But it did not work. >> >> My question was if I do the following: >> >> >> H = sopen('test.gdf'); >> >> data = sread(H,2048);     % I did not here 2048 sample I did not know why. >> >> data = data'; >> >> trig = data(1,:);               % The status channel >> >> plot(trig) >> >> I am not going to get the trigger values that I desired. >> >> Best. >> >> On Thu, Jan 5, 2012 at 1:19 PM, Boris Reuderink wrote: >> Dear Hamza, >> >> Could you elaborate on what you mean here? Could you perhaps provide some context, and a minimal working example? >> >> Best, >> >> Boris >> >> On Sunday, December 25, 2011, Hamza Fawzi Altakroury (Student) wrote: >> Hello, >> >> I can't get the real trigger values if use sopen function (or ft_read_data), even after adding the min value -1.7281e+009 to get a positive values. >> >> Note: I plotted the triggers and their proportion is right but I can't get their exact values, what should I do. >> >> Best, >> >> -- >> Hamza Fawzi Altakroury >> Graduate student - MA >> Faculty of Engineering and Natural Sciences >> Sabancı University >> >> _______________________________________________ >> fieldtrip mailing list >> fieldtrip at donders.ru.nl >> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip >> >> >> >> -- >> Hamza Fawzi Altakroury >> Graduate student - MA >> Faculty of Engineering and Natural Sciences >> Sabancı University >> _______________________________________________ >> 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 From nathanweisz at mac.com Thu Jan 12 22:02:19 2012 From: nathanweisz at mac.com (Nathan Weisz) Date: Thu, 12 Jan 2012 22:02:19 +0100 Subject: [FieldTrip] ft_redefinetrial problem In-Reply-To: References: Message-ID: Hi Qi, providing some code, including some output may actually help … I am unaware of ft_redifinetrial altering the contents of your hdr field (i admit i have never paid attention to it), but even if it did how does this affect your subsequent analysis steps? e.g. at least to my knowledge, FT looks for data.grad (instead of data.hdr.grad) e.g. for plotting, source analysis etc. so if you add your grad info via ft_read_sens, then everything should be fine … otherwise, if the original hdr content is so important, then save it as a temporary variable and add it to your redefined trial later. but perhaps i have totally misunderstood your problem. in that case see introductory remark on code. good luck, n On 12.01.2012, at 17:20, qi li wrote: > Hi, > > I have a fixed length experiment raw. I apply ft_redefinetrial with cfg.trl to epoch it into many segments. When this step is done, the output.hdr.grad has different fields from the input field. More specifically the pnt and ori field are gone thus cause trouble for the later analysis. I am using 12/23 version, is there a bug or it is suppose to be so. > > If I only want to separate the long data into segments, which command can change only the time window while keeping all the other parameters unchanged? > > Thanks! > > Qi > > > _______________________________________________ > 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 Jan 12 22:09:51 2012 From: jan.schoffelen at donders.ru.nl (jan-mathijs schoffelen) Date: Thu, 12 Jan 2012 22:09:51 +0100 Subject: [FieldTrip] ft_redefinetrial problem In-Reply-To: References: Message-ID: <40F79FF9-A96B-4AEC-97FD-5C78BAC8377B@donders.ru.nl> Hi guys, I agree with Nathan that some additional information would be helpful. The 'problem' Qi relates to (at least the issue with the hdr.grad) is a change in the way the sensor-array is defined in FT. A while ago we changed the .pnt/.ori naming scheme into .chanpos/.coilpos/.coilori to make the distinction between channels and coils more transparent. There is a thread on this mailing list about it and more documentation can be found on: http://fieldtrip.fcdonders.nl/faq/how_are_electrodes_magnetometers_or_gradiometers_described In general this change should not affect your analysis, unless you are relying on outdated code, or custom-written code which expects the .pnt/.ori fields still to be present. If you want to chop up your data into short fixed length segment, you should use ft_redefinetrial with the options: cfg.length and cfg.overlap. BW, JM On Jan 12, 2012, at 10:02 PM, Nathan Weisz wrote: > Hi Qi, > > providing some code, including some output may actually help … > > I am unaware of ft_redifinetrial altering the contents of your hdr field (i admit i have never paid attention to it), but even if it did how does this affect your subsequent analysis steps? e.g. at least to my knowledge, FT looks for data.grad (instead of data.hdr.grad) e.g. for plotting, source analysis etc. so if you add your grad info via ft_read_sens, then everything should be fine … > > otherwise, if the original hdr content is so important, then save it as a temporary variable and add it to your redefined trial later. > > but perhaps i have totally misunderstood your problem. in that case see introductory remark on code. > > good luck, > n > > On 12.01.2012, at 17:20, qi li wrote: > >> Hi, >> >> I have a fixed length experiment raw. I apply ft_redefinetrial with cfg.trl to epoch it into many segments. When this step is done, the output.hdr.grad has different fields from the input field. More specifically the pnt and ori field are gone thus cause trouble for the later analysis. I am using 12/23 version, is there a bug or it is suppose to be so. >> >> If I only want to separate the long data into segments, which command can change only the time window while keeping all the other parameters unchanged? >> >> Thanks! >> >> Qi >> >> >> _______________________________________________ >> 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 -------------- next part -------------- An HTML attachment was scrubbed... URL: From shhirano at npsych.med.kyushu-u.ac.jp Fri Jan 13 02:49:06 2012 From: shhirano at npsych.med.kyushu-u.ac.jp (=?iso-2022-jp?B?GyRCSj9MbhsoQiAbJEI+PDhjGyhC?=) Date: Fri, 13 Jan 2012 10:49:06 +0900 Subject: [FieldTrip] How can I calculate phase locking factor in FieldTrip? Message-ID: <75DF5877-BB2D-4918-A4C0-2A66F7EDCF8E@npsych.med.kyushu-u.ac.jp> Hi everyone! I'm a FieldTrip beginner and I have a question. I'm sure I can estimate time frequency power with FieldTrip. But I don't know how I can estimate time-frequency phase locking factor. phase locking factor is defined as following equation. Phase-locking(t)=1/N x |Σz(t)|, where N is the number of epochs and z(t) refers to the continuous phase of a single trial. Here, z is a complex value on the unit circle, i.e., z=exp(jq), where q is the phase of an oscillation and j is the imaginary unit (e.g. Tallon-baudry et al., 1996). Does anyone know how to calculate this phase locking factor with FieldTrip? Any answer will help me. Best regards, Shogo Hirano Department of Neuropsychiatry Graduate school of medical sciences Kyushu University Fukuoka, Japan -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: SpamAssassinReport.txt URL: From lavado at gmail.com Fri Jan 13 10:00:17 2012 From: lavado at gmail.com (Ion Lavado) Date: Fri, 13 Jan 2012 10:00:17 +0100 Subject: [FieldTrip] Problem reading .mgz files Message-ID: Hello, i'm trying source reconstruction using Minimum-Norm Estimates and i have a problem when reading the (filled.mgz) or any other .mgz file after using Freesurfer and created the files. This is the ERROR i get: >> mri=ft_read_mri('F:\SUBJECT29_BUENO\Subject29\mri\filled.mgz'); The system cannot find the path specified. ERROR: could not open /tmp/tmp7914012.mgh for reading ERROR: loading F:\SUBJECT29_BUENO\Subject29\mri\filled.mgz as MGH ??? Attempt to reference field of non-structure array. Error in ==> ft_read_mri at 248 ndims = numel(size(tmp.vol)); Hope anyone can help me. Thanks! -------------- next part -------------- An HTML attachment was scrubbed... URL: From lavado at gmail.com Fri Jan 13 10:04:17 2012 From: lavado at gmail.com (Ion Lavado) Date: Fri, 13 Jan 2012 10:04:17 +0100 Subject: [FieldTrip] Problem reading .mgz files In-Reply-To: References: Message-ID: Forget to mention, after this commands on freesurfer: recon-all -talairach -subjid Subject01 recon-all -nuintensitycor -subjid Subject01 recon-all -normalization -subjid Subject01 cp T1.mgz brainmask.mgz recon-all -gcareg -subjid Subject01 recon-all -canorm -subjid Subject01 recon-all -careg -subjid Subject01 recon-all -calabel -subjid Subject01 recon-all -normalization2 -subjid Subject01 recon-all -segmentation -subjid Subject01 recon-all -fill -subjid Subject01 I have the mri folder with the tmp folder in it but it is empty... Thank you. 2012/1/13 Ion Lavado > Hello, i'm trying source reconstruction using Minimum-Norm Estimates and i > have a problem when reading the (filled.mgz) or any other .mgz file after > using Freesurfer and created the files. > This is the ERROR i get: > > > >> mri=ft_read_mri('F:\SUBJECT29_BUENO\Subject29\mri\filled.mgz'); > The system cannot find the path specified. > ERROR: could not open /tmp/tmp7914012.mgh for reading > ERROR: loading F:\SUBJECT29_BUENO\Subject29\mri\filled.mgz as MGH > ??? Attempt to reference field of non-structure array. > Error in ==> ft_read_mri at 248 > ndims = numel(size(tmp.vol)); > > Hope anyone can help me. Thanks! > -------------- next part -------------- An HTML attachment was scrubbed... URL: From jan.schoffelen at donders.ru.nl Fri Jan 13 10:34:05 2012 From: jan.schoffelen at donders.ru.nl (jan-mathijs schoffelen) Date: Fri, 13 Jan 2012 10:34:05 +0100 Subject: [FieldTrip] Problem reading .mgz files In-Reply-To: References: Message-ID: Hi Ion, What operating system are you working on? It looks like windows, and the first error is a path error, where the function is looking at a Linux-style path. This is apparently causing trouble. First you get two errors (starting with ERROR, which are a sign that something went wrong in the low level reading routines), which do not cause matlab to 'crash' directly. Later in the code variables are not what they are expected to be (due to the earlier ERRORs) and this causes a matlab crash (in red). So far this whole pipeline has been tested only on the linux platform. I don't know whether freesurfer (in particular the matlab functions that FieldTrip relies on to read in the .mgz files) runs without problems on windows. Perhaps you first need to find out what causes the first error. It could well be that FieldTrip needs to use a platform specific reading routine here. BW, JM On Jan 13, 2012, at 10:00 AM, Ion Lavado wrote: > Hello, i'm trying source reconstruction using Minimum-Norm Estimates and i have a problem when reading the (filled.mgz) or any other .mgz file after using Freesurfer and created the files. > This is the ERROR i get: > > > >> mri=ft_read_mri('F:\SUBJECT29_BUENO\Subject29\mri\filled.mgz'); > The system cannot find the path specified. > ERROR: could not open /tmp/tmp7914012.mgh for reading > ERROR: loading F:\SUBJECT29_BUENO\Subject29\mri\filled.mgz as MGH > ??? Attempt to reference field of non-structure array. > Error in ==> ft_read_mri at 248 > ndims = numel(size(tmp.vol)); > > Hope anyone can help me. Thanks! > _______________________________________________ > 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 -------------- next part -------------- An HTML attachment was scrubbed... URL: From jm.horschig at donders.ru.nl Fri Jan 13 10:48:56 2012 From: jm.horschig at donders.ru.nl (=?ISO-8859-1?Q?=22J=F6rn_M=2E_Horschig=22?=) Date: Fri, 13 Jan 2012 10:48:56 +0100 Subject: [FieldTrip] How can I calculate phase locking factor in FieldTrip? In-Reply-To: <75DF5877-BB2D-4918-A4C0-2A66F7EDCF8E@npsych.med.kyushu-u.ac.jp> References: <75DF5877-BB2D-4918-A4C0-2A66F7EDCF8E@npsych.med.kyushu-u.ac.jp> Message-ID: <4F0FFE08.4000004@donders.ru.nl> Dear Shogo, As far as I know, there is no built-in function to compute a phase-locking factor in FieldTrip, so I am afraid that you have to program this on your own. However, all values you need can be collected in FieldTrip. You can either apply a Hilbert transform on your data to obtain instanenous phase (set cfg.hilbert='yes' prior to calling /ft_preprocessing/) or get the phase information out from the fourierspectrum (cfg.output='fourier' prior to calling /ft_freqanalysis/). In both case, you should be able to get the phase out by calling the Matlab built-in function /angle()/. Computing the PLF should then be rather straight-forward. Also, maybe this can be of help: http://en.wikipedia.org/wiki/Von_Mises_distribution Hope this helps! Best, Jörn On 1/13/2012 2:49 AM, ?? ?? wrote: > Hi everyone! > > I'm a FieldTrip beginner and I have a question. > I'm sure I can estimate time frequency power with FieldTrip. > But I don't know how I can estimate time-frequency phase locking factor. > phase locking factor is defined as following equation. > Phase-locking(t)=1/N x |?z(t)|, where N is the number of epochs and z(t) refers to the continuous phase of a single trial. > Here, z is a complex value on the unit circle, i.e., z=exp(jq), where q is the phase of an oscillation and j is the imaginary unit (e.g. Tallon-baudry et al., 1996). > Does anyone know how to calculate this phase locking factor with FieldTrip? > Any answer will help me. > > Best regards, > > Shogo Hirano > > Department of Neuropsychiatry > Graduate school of medical sciences > Kyushu University > Fukuoka, Japan > > > _______________________________________________ > 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 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 lavado at gmail.com Fri Jan 13 11:07:46 2012 From: lavado at gmail.com (Ion Lavado) Date: Fri, 13 Jan 2012 11:07:46 +0100 Subject: [FieldTrip] Problem reading .mgz files In-Reply-To: References: Message-ID: Ok, i'm using Windows platform and Linux for generating the freesurfer mri (.mgz) files. So do you think the solution would be running the matlab script with Linux? Or what can i do to change the style path? Best wishes, Ion 2012/1/13 jan-mathijs schoffelen > Hi Ion, > > What operating system are you working on? It looks like windows, and the > first error is a path error, where the function is looking at a Linux-style > path. > > This is apparently causing trouble. First you get two errors (starting > with ERROR, which are a sign that something went wrong in the low level > reading routines), which do not cause matlab to 'crash' directly. Later in > the code variables are not what they are expected to be (due to the earlier > ERRORs) and this causes a matlab crash (in red). > > So far this whole pipeline has been tested only on the linux platform. I > don't know whether freesurfer (in particular the matlab functions that > FieldTrip relies on to read in the .mgz files) runs without problems on > windows. > Perhaps you first need to find out what causes the first error. It could > well be that FieldTrip needs to use a platform specific reading routine > here. > > BW, > > JM > > > > > On Jan 13, 2012, at 10:00 AM, Ion Lavado wrote: > > Hello, i'm trying source reconstruction using Minimum-Norm Estimates and i > have a problem when reading the (filled.mgz) or any other .mgz file after > using Freesurfer and created the files. > This is the ERROR i get: > > > >> mri=ft_read_mri('F:\SUBJECT29_BUENO\Subject29\mri\filled.mgz'); > The system cannot find the path specified. > ERROR: could not open /tmp/tmp7914012.mgh for reading > ERROR: loading F:\SUBJECT29_BUENO\Subject29\mri\filled.mgz as MGH > ??? Attempt to reference field of non-structure array. > Error in ==> ft_read_mri at 248 > ndims = numel(size(tmp.vol)); > > Hope anyone can help me. Thanks! > _______________________________________________ > 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 > > > _______________________________________________ > 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 Fri Jan 13 13:00:54 2012 From: jan.schoffelen at donders.ru.nl (jan-mathijs schoffelen) Date: Fri, 13 Jan 2012 13:00:54 +0100 Subject: [FieldTrip] Problem reading .mgz files In-Reply-To: References: Message-ID: Yes, please use linux. Lines 61-76 in read_mgh (which is in ~/fieldtrip/external/freesurfer) suggest that files with extension .mgz can only be read with linux or MacOS. BW, JM Line On Jan 13, 2012, at 11:07 AM, Ion Lavado wrote: > Ok, i'm using Windows platform and Linux for generating the freesurfer mri (.mgz) files. So do you think the solution would be running the matlab script with Linux? Or what can i do to change the style path? > > Best wishes, > > Ion > > 2012/1/13 jan-mathijs schoffelen > Hi Ion, > > What operating system are you working on? It looks like windows, and the first error is a path error, where the function is looking at a Linux-style path. > > This is apparently causing trouble. First you get two errors (starting with ERROR, which are a sign that something went wrong in the low level reading routines), which do not cause matlab to 'crash' directly. Later in the code variables are not what they are expected to be (due to the earlier ERRORs) and this causes a matlab crash (in red). > > So far this whole pipeline has been tested only on the linux platform. I don't know whether freesurfer (in particular the matlab functions that FieldTrip relies on to read in the .mgz files) runs without problems on windows. > Perhaps you first need to find out what causes the first error. It could well be that FieldTrip needs to use a platform specific reading routine here. > > BW, > > JM > > > > > On Jan 13, 2012, at 10:00 AM, Ion Lavado wrote: > >> Hello, i'm trying source reconstruction using Minimum-Norm Estimates and i have a problem when reading the (filled.mgz) or any other .mgz file after using Freesurfer and created the files. >> This is the ERROR i get: >> >> >> >> mri=ft_read_mri('F:\SUBJECT29_BUENO\Subject29\mri\filled.mgz'); >> The system cannot find the path specified. >> ERROR: could not open /tmp/tmp7914012.mgh for reading >> ERROR: loading F:\SUBJECT29_BUENO\Subject29\mri\filled.mgz as MGH >> ??? Attempt to reference field of non-structure array. >> Error in ==> ft_read_mri at 248 >> ndims = numel(size(tmp.vol)); >> >> Hope anyone can help me. Thanks! >> _______________________________________________ >> 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 > > > _______________________________________________ > 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 -------------- next part -------------- An HTML attachment was scrubbed... URL: From jan.schoffelen at donders.ru.nl Fri Jan 13 13:04:26 2012 From: jan.schoffelen at donders.ru.nl (jan-mathijs schoffelen) Date: Fri, 13 Jan 2012 13:04:26 +0100 Subject: [FieldTrip] Problem reading .mgz files In-Reply-To: References: Message-ID: Sorry, I meant load_mgh rather than read_mgh JM On Jan 13, 2012, at 1:00 PM, jan-mathijs schoffelen wrote: > Yes, please use linux. Lines 61-76 in read_mgh (which is in ~/fieldtrip/external/freesurfer) suggest that files with extension .mgz can only be read with linux or MacOS. > > BW, > > JM > > Line > > On Jan 13, 2012, at 11:07 AM, Ion Lavado wrote: > >> Ok, i'm using Windows platform and Linux for generating the freesurfer mri (.mgz) files. So do you think the solution would be running the matlab script with Linux? Or what can i do to change the style path? >> >> Best wishes, >> >> Ion >> >> 2012/1/13 jan-mathijs schoffelen >> Hi Ion, >> >> What operating system are you working on? It looks like windows, and the first error is a path error, where the function is looking at a Linux-style path. >> >> This is apparently causing trouble. First you get two errors (starting with ERROR, which are a sign that something went wrong in the low level reading routines), which do not cause matlab to 'crash' directly. Later in the code variables are not what they are expected to be (due to the earlier ERRORs) and this causes a matlab crash (in red). >> >> So far this whole pipeline has been tested only on the linux platform. I don't know whether freesurfer (in particular the matlab functions that FieldTrip relies on to read in the .mgz files) runs without problems on windows. >> Perhaps you first need to find out what causes the first error. It could well be that FieldTrip needs to use a platform specific reading routine here. >> >> BW, >> >> JM >> >> >> >> >> On Jan 13, 2012, at 10:00 AM, Ion Lavado wrote: >> >>> Hello, i'm trying source reconstruction using Minimum-Norm Estimates and i have a problem when reading the (filled.mgz) or any other .mgz file after using Freesurfer and created the files. >>> This is the ERROR i get: >>> >>> >>> >> mri=ft_read_mri('F:\SUBJECT29_BUENO\Subject29\mri\filled.mgz'); >>> The system cannot find the path specified. >>> ERROR: could not open /tmp/tmp7914012.mgh for reading >>> ERROR: loading F:\SUBJECT29_BUENO\Subject29\mri\filled.mgz as MGH >>> ??? Attempt to reference field of non-structure array. >>> Error in ==> ft_read_mri at 248 >>> ndims = numel(size(tmp.vol)); >>> >>> Hope anyone can help me. Thanks! >>> _______________________________________________ >>> 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 >> >> >> _______________________________________________ >> 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 > > _______________________________________________ > 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 -------------- next part -------------- An HTML attachment was scrubbed... URL: From lihqih at gmail.com Fri Jan 13 17:58:20 2012 From: lihqih at gmail.com (qi li) Date: Fri, 13 Jan 2012 11:58:20 -0500 Subject: [FieldTrip] ft_redefinetrial problem In-Reply-To: <40F79FF9-A96B-4AEC-97FD-5C78BAC8377B@donders.ru.nl> References: <40F79FF9-A96B-4AEC-97FD-5C78BAC8377B@donders.ru.nl> Message-ID: Hi All, Thanks a lot for your help! The codes look like this cfg=[]; cfg.trl=trial; %user defined 20*3 matrix triggered_trials=ft_redefinetrial(cfg,triggered_trials); cfg = []; cfg.method = 'triangulation'; cfg.neighbours = ft_neighbourselection(cfg, triggered_trials); The error message is 'sen.pnt' not found. I am using 1223 version. Qi On Thu, Jan 12, 2012 at 4:09 PM, jan-mathijs schoffelen < jan.schoffelen at donders.ru.nl> wrote: > Hi guys, > > I agree with Nathan that some additional information would be helpful. The > 'problem' Qi relates to (at least the issue with the hdr.grad) is a change > in the way the sensor-array is defined in FT. A while ago we changed the > .pnt/.ori naming scheme into .chanpos/.coilpos/.coilori to make the > distinction between channels and coils more transparent. There is a thread > on this mailing list about it and more documentation can be found on: > > > http://fieldtrip.fcdonders.nl/faq/how_are_electrodes_magnetometers_or_gradiometers_described > > In general this change should not affect your analysis, unless you are > relying on outdated code, or custom-written code which expects the > .pnt/.ori fields still to be present. > > If you want to chop up your data into short fixed length segment, you > should use ft_redefinetrial with the options: cfg.length and cfg.overlap. > > BW, > > JM > > On Jan 12, 2012, at 10:02 PM, Nathan Weisz wrote: > > Hi Qi, > > providing some code, including some output may actually help … > > I am unaware of ft_redifinetrial altering the contents of your hdr field > (i admit i have never paid attention to it), but even if it did how does > this affect your subsequent analysis steps? e.g. at least to my knowledge, > FT looks for data.grad (instead of data.hdr.grad) e.g. for plotting, source > analysis etc. so if you add your grad info via ft_read_sens, then > everything should be fine … > > otherwise, if the original hdr content is so important, then save it as a > temporary variable and add it to your redefined trial later. > > but perhaps i have totally misunderstood your problem. in that case see > introductory remark on code. > > good luck, > n > > On 12.01.2012, at 17:20, qi li wrote: > > Hi, > > I have a fixed length experiment raw. I apply ft_redefinetrial with > cfg.trl to epoch it into many segments. When this step is done, the > output.hdr.grad has different fields from the input field. More > specifically the pnt and ori field are gone thus cause trouble for the > later analysis.* *I am using 12/23 version, is there a bug or it is > suppose to be so. > > If I only want to separate the long data into segments, which command can > change only the time window while keeping all the other parameters > unchanged? > > Thanks! > > Qi > > > _______________________________________________ > 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 > > > _______________________________________________ > 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 Fri Jan 13 20:12:31 2012 From: jan.schoffelen at donders.ru.nl (jan-mathijs schoffelen) Date: Fri, 13 Jan 2012 20:12:31 +0100 Subject: [FieldTrip] ft_redefinetrial problem In-Reply-To: References: <40F79FF9-A96B-4AEC-97FD-5C78BAC8377B@donders.ru.nl> Message-ID: <440417D5-7D42-4203-92C2-4B1067C46AFE@donders.ru.nl> What is the stack of the error? I.e. in what line of what function (and calling functions) does it occur? Jan-Mathijs On Jan 13, 2012, at 5:58 PM, qi li wrote: > Hi All, > > Thanks a lot for your help! The codes look like this > > cfg=[]; > cfg.trl=trial; %user defined 20*3 matrix > triggered_trials=ft_redefinetrial(cfg,triggered_trials); > > > cfg = []; > cfg.method = 'triangulation'; > cfg.neighbours = ft_neighbourselection(cfg, triggered_trials); > > The error message is 'sen.pnt' not found. I am using 1223 version. > > Qi > > On Thu, Jan 12, 2012 at 4:09 PM, jan-mathijs schoffelen wrote: > Hi guys, > > I agree with Nathan that some additional information would be helpful. The 'problem' Qi relates to (at least the issue with the hdr.grad) is a change in the way the sensor-array is defined in FT. A while ago we changed the .pnt/.ori naming scheme into .chanpos/.coilpos/.coilori to make the distinction between channels and coils more transparent. There is a thread on this mailing list about it and more documentation can be found on: > > http://fieldtrip.fcdonders.nl/faq/how_are_electrodes_magnetometers_or_gradiometers_described > > In general this change should not affect your analysis, unless you are relying on outdated code, or custom-written code which expects the .pnt/.ori fields still to be present. > > If you want to chop up your data into short fixed length segment, you should use ft_redefinetrial with the options: cfg.length and cfg.overlap. > > BW, > > JM > > On Jan 12, 2012, at 10:02 PM, Nathan Weisz wrote: > >> Hi Qi, >> >> providing some code, including some output may actually help … >> >> I am unaware of ft_redifinetrial altering the contents of your hdr field (i admit i have never paid attention to it), but even if it did how does this affect your subsequent analysis steps? e.g. at least to my knowledge, FT looks for data.grad (instead of data.hdr.grad) e.g. for plotting, source analysis etc. so if you add your grad info via ft_read_sens, then everything should be fine … >> >> otherwise, if the original hdr content is so important, then save it as a temporary variable and add it to your redefined trial later. >> >> but perhaps i have totally misunderstood your problem. in that case see introductory remark on code. >> >> good luck, >> n >> >> On 12.01.2012, at 17:20, qi li wrote: >> >>> Hi, >>> >>> I have a fixed length experiment raw. I apply ft_redefinetrial with cfg.trl to epoch it into many segments. When this step is done, the output.hdr.grad has different fields from the input field. More specifically the pnt and ori field are gone thus cause trouble for the later analysis. I am using 12/23 version, is there a bug or it is suppose to be so. >>> >>> If I only want to separate the long data into segments, which command can change only the time window while keeping all the other parameters unchanged? >>> >>> Thanks! >>> >>> Qi >>> >>> >>> _______________________________________________ >>> 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 > > > _______________________________________________ > 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 -------------- next part -------------- An HTML attachment was scrubbed... URL: From lihqih at gmail.com Fri Jan 13 23:26:08 2012 From: lihqih at gmail.com (qi li) Date: Fri, 13 Jan 2012 17:26:08 -0500 Subject: [FieldTrip] ft_redefinetrial problem In-Reply-To: <440417D5-7D42-4203-92C2-4B1067C46AFE@donders.ru.nl> References: <40F79FF9-A96B-4AEC-97FD-5C78BAC8377B@donders.ru.nl> <440417D5-7D42-4203-92C2-4B1067C46AFE@donders.ru.nl> Message-ID: Hi Jan, FYI. The error message is as follows, the input is raw data with 275 channels and 16 trials Using the gradiometer configuration from the dataset. undoing the G3BR balancing Reference to non-existent field 'pnt'. Error in channelposition (line 234) pnt = sens.pnt; Error in ft_neighbourselection (line 110) [sens.pnt, sens.label] = channelposition(sens); Error in onetrialintotrials (line 100) cfg.neighbours = ft_neighbourselection(cfg, triggered_trials); Another similar problem arises when you have done PCA and want to remove some components. You command is as follows, cfg=[]; cfg.topo=comp.topo; cfg.topolabel=comp.topolabel; comp_o=ft_componentanalysis(cfg,data_I4); cfg=[]; cfg.component=[1]; data_I4c=ft_rejectcomponent(cfg,comp_o) Errors pop up, Reference to non-existent field 'invcomp'. Error in ft_rejectcomponent (line 181) [junk, remove] = match_str(comp.label, tmp.balance.invcomp.labelnew); Both error in 1223 version. I hope this information is useful. Thanks! Qi On Fri, Jan 13, 2012 at 2:12 PM, jan-mathijs schoffelen < jan.schoffelen at donders.ru.nl> wrote: > What is the stack of the error? I.e. in what line of what function (and > calling functions) does it occur? > > Jan-Mathijs > > On Jan 13, 2012, at 5:58 PM, qi li wrote: > > Hi All, > > Thanks a lot for your help! The codes look like this > > cfg=[]; > cfg.trl=trial; %user defined 20*3 matrix > triggered_trials=ft_redefinetrial(cfg,triggered_trials); > > > cfg = []; > cfg.method = 'triangulation'; > cfg.neighbours = ft_neighbourselection(cfg, triggered_trials); > > The error message is 'sen.pnt' not found. I am using 1223 version. > > Qi > > On Thu, Jan 12, 2012 at 4:09 PM, jan-mathijs schoffelen < > jan.schoffelen at donders.ru.nl> wrote: > >> Hi guys, >> >> I agree with Nathan that some additional information would be >> helpful. The 'problem' Qi relates to (at least the issue with the hdr.grad) >> is a change in the way the sensor-array is defined in FT. A while ago we >> changed the .pnt/.ori naming scheme into .chanpos/.coilpos/.coilori to make >> the distinction between channels and coils more transparent. There is a >> thread on this mailing list about it and more documentation can be found on: >> >> >> http://fieldtrip.fcdonders.nl/faq/how_are_electrodes_magnetometers_or_gradiometers_described >> >> In general this change should not affect your analysis, unless you are >> relying on outdated code, or custom-written code which expects the >> .pnt/.ori fields still to be present. >> >> If you want to chop up your data into short fixed length segment, you >> should use ft_redefinetrial with the options: cfg.length and cfg.overlap. >> >> BW, >> >> JM >> >> On Jan 12, 2012, at 10:02 PM, Nathan Weisz wrote: >> >> Hi Qi, >> >> providing some code, including some output may actually help … >> >> I am unaware of ft_redifinetrial altering the contents of your hdr field >> (i admit i have never paid attention to it), but even if it did how does >> this affect your subsequent analysis steps? e.g. at least to my knowledge, >> FT looks for data.grad (instead of data.hdr.grad) e.g. for plotting, source >> analysis etc. so if you add your grad info via ft_read_sens, then >> everything should be fine … >> >> otherwise, if the original hdr content is so important, then save it as a >> temporary variable and add it to your redefined trial later. >> >> but perhaps i have totally misunderstood your problem. in that case see >> introductory remark on code. >> >> good luck, >> n >> >> On 12.01.2012, at 17:20, qi li wrote: >> >> Hi, >> >> I have a fixed length experiment raw. I apply ft_redefinetrial with >> cfg.trl to epoch it into many segments. When this step is done, the >> output.hdr.grad has different fields from the input field. More >> specifically the pnt and ori field are gone thus cause trouble for the >> later analysis.* *I am using 12/23 version, is there a bug or it is >> suppose to be so. >> >> If I only want to separate the long data into segments, which command can >> change only the time window while keeping all the other parameters >> unchanged? >> >> Thanks! >> >> Qi >> >> >> _______________________________________________ >> 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 >> >> >> _______________________________________________ >> 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 > > > _______________________________________________ > 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 shhirano at npsych.med.kyushu-u.ac.jp Sat Jan 14 01:30:07 2012 From: shhirano at npsych.med.kyushu-u.ac.jp (=?iso-2022-jp?B?GyRCSj9MbhsoQiAbJEI+PDhjGyhC?=) Date: Sat, 14 Jan 2012 09:30:07 +0900 Subject: [FieldTrip] How can I calculate phase locking factor in FieldTrip? Message-ID: Dear Jörn Thank you for your wonderful advice! I'll try! Best regards, Shogo -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: SpamAssassinReport.txt URL: From jan.schoffelen at donders.ru.nl Sat Jan 14 09:10:13 2012 From: jan.schoffelen at donders.ru.nl (jan-mathijs schoffelen) Date: Sat, 14 Jan 2012 09:10:13 +0100 Subject: [FieldTrip] ft_redefinetrial problem In-Reply-To: References: <40F79FF9-A96B-4AEC-97FD-5C78BAC8377B@donders.ru.nl> <440417D5-7D42-4203-92C2-4B1067C46AFE@donders.ru.nl> Message-ID: <32B29B66-DFA7-4561-BB46-22A08F4E8542@donders.ru.nl> Hi Qi, Ft_neighbourselection has been changed since October 11. The version you are executing is therefore an old one and is not guaranteed to work. Please remove this version of ft_neighbourselection from your path, and try again. The correct version is in fieldtrip/compat/, and you will notice that this is just a backward compatibility wrapper that is pointing to the function ft_prepare_neighbours, which is the one you should actually use. Jan-Mathijs On Jan 13, 2012, at 11:26 PM, qi li wrote: > Hi Jan, > > FYI. The error message is as follows, > > the input is raw data with 275 channels and 16 trials > Using the gradiometer configuration from the dataset. > undoing the G3BR balancing > Reference to non-existent field 'pnt'. > > Error in channelposition (line 234) > pnt = sens.pnt; > > Error in ft_neighbourselection (line 110) > [sens.pnt, sens.label] = channelposition(sens); > > Error in onetrialintotrials (line 100) > cfg.neighbours = ft_neighbourselection(cfg, triggered_trials); > > Another similar problem arises when you have done PCA and want to remove some components. > > You command is as follows, > cfg=[]; > cfg.topo=comp.topo; > cfg.topolabel=comp.topolabel; > comp_o=ft_componentanalysis(cfg,data_I4); > cfg=[]; > cfg.component=[1]; > data_I4c=ft_rejectcomponent(cfg,comp_o) > > Errors pop up, > > Reference to non-existent field 'invcomp'. > > Error in ft_rejectcomponent (line 181) > [junk, remove] = match_str(comp.label, tmp.balance.invcomp.labelnew); > > Both error in 1223 version. > > I hope this information is useful. > > Thanks! > > Qi > > > > On Fri, Jan 13, 2012 at 2:12 PM, jan-mathijs schoffelen wrote: > What is the stack of the error? I.e. in what line of what function (and calling functions) does it occur? > > Jan-Mathijs > > On Jan 13, 2012, at 5:58 PM, qi li wrote: > >> Hi All, >> >> Thanks a lot for your help! The codes look like this >> >> cfg=[]; >> cfg.trl=trial; %user defined 20*3 matrix >> triggered_trials=ft_redefinetrial(cfg,triggered_trials); >> >> >> cfg = []; >> cfg.method = 'triangulation'; >> cfg.neighbours = ft_neighbourselection(cfg, triggered_trials); >> >> The error message is 'sen.pnt' not found. I am using 1223 version. >> >> Qi >> >> On Thu, Jan 12, 2012 at 4:09 PM, jan-mathijs schoffelen wrote: >> Hi guys, >> >> I agree with Nathan that some additional information would be helpful. The 'problem' Qi relates to (at least the issue with the hdr.grad) is a change in the way the sensor-array is defined in FT. A while ago we changed the .pnt/.ori naming scheme into .chanpos/.coilpos/.coilori to make the distinction between channels and coils more transparent. There is a thread on this mailing list about it and more documentation can be found on: >> >> http://fieldtrip.fcdonders.nl/faq/how_are_electrodes_magnetometers_or_gradiometers_described >> >> In general this change should not affect your analysis, unless you are relying on outdated code, or custom-written code which expects the .pnt/.ori fields still to be present. >> >> If you want to chop up your data into short fixed length segment, you should use ft_redefinetrial with the options: cfg.length and cfg.overlap. >> >> BW, >> >> JM >> >> On Jan 12, 2012, at 10:02 PM, Nathan Weisz wrote: >> >>> Hi Qi, >>> >>> providing some code, including some output may actually help … >>> >>> I am unaware of ft_redifinetrial altering the contents of your hdr field (i admit i have never paid attention to it), but even if it did how does this affect your subsequent analysis steps? e.g. at least to my knowledge, FT looks for data.grad (instead of data.hdr.grad) e.g. for plotting, source analysis etc. so if you add your grad info via ft_read_sens, then everything should be fine … >>> >>> otherwise, if the original hdr content is so important, then save it as a temporary variable and add it to your redefined trial later. >>> >>> but perhaps i have totally misunderstood your problem. in that case see introductory remark on code. >>> >>> good luck, >>> n >>> >>> On 12.01.2012, at 17:20, qi li wrote: >>> >>>> Hi, >>>> >>>> I have a fixed length experiment raw. I apply ft_redefinetrial with cfg.trl to epoch it into many segments. When this step is done, the output.hdr.grad has different fields from the input field. More specifically the pnt and ori field are gone thus cause trouble for the later analysis. I am using 12/23 version, is there a bug or it is suppose to be so. >>>> >>>> If I only want to separate the long data into segments, which command can change only the time window while keeping all the other parameters unchanged? >>>> >>>> Thanks! >>>> >>>> Qi >>>> >>>> >>>> _______________________________________________ >>>> 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 >> >> >> _______________________________________________ >> 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 > > > _______________________________________________ > 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 -------------- next part -------------- An HTML attachment was scrubbed... URL: From hamzaf at sabanciuniv.edu Fri Jan 13 15:44:12 2012 From: hamzaf at sabanciuniv.edu (Hamza Fawzi Altakroury (Student)) Date: Fri, 13 Jan 2012 16:44:12 +0200 Subject: [FieldTrip] Simple way to generate cfg Message-ID: Hello, I noticed that almost all your files require a cfg (a structure containing information about the buffer, as I understand). Is there any function to generate these cfg in a simple way. Best, Hamza -- Hamza Fawzi Altakroury Graduate student - MA Faculty of Engineering and Natural Sciences Sabancı University -------------- next part -------------- An HTML attachment was scrubbed... URL: From lihqih at gmail.com Sat Jan 14 18:09:20 2012 From: lihqih at gmail.com (qi li) Date: Sat, 14 Jan 2012 12:09:20 -0500 Subject: [FieldTrip] reject component Message-ID: Hi there, I am having trouble to reject components after ICA/PCA done. Can somebody help on this? My command is as follows, cfg=[]; cfg.topo=comp.topo; cfg.topolabel=comp.topolabel; comp_o=ft_componentanalysis(cfg,data_I4); cfg=[]; cfg.component=[1 3 7]; data_I4c=ft_rejectcomponent(cfg,comp_o) Errors pop up, Reference to non-existent field 'invcomp'. Error in ft_rejectcomponent (line 181) [junk, remove] = match_str(comp.label, tmp.balance.invcomp.labelnew); -------------- next part -------------- An HTML attachment was scrubbed... URL: From politzerahless at gmail.com Mon Jan 16 08:02:29 2012 From: politzerahless at gmail.com (Stephen Politzer-Ahles) Date: Mon, 16 Jan 2012 01:02:29 -0600 Subject: [FieldTrip] Simple way to generate cfg Message-ID: Hello Hamza, For many of the functions, the corresponding tutorial on the wiki has sample code, you can just copy and paste that code (along with the cfg) and edit whatever information you need. Even if there is no tutorial, all the functions have reference pages on the wiki (which you can find by searching for the name of the function) which list all the parameters you can use. If you don't need to specify any information for a particular function, you can create an 'empty' cfg by just typing cfg=[]; before the function. Best, Steve Politzer-Ahles Hello, > > I noticed that almost all your files require a cfg (a structure containing > information about the buffer, as I understand). > > Is there any function to generate these cfg in a simple way. > > Best, > > Hamza > > -- > Hamza Fawzi Altakroury > Graduate student - MA > Faculty of Engineering and Natural Sciences > Sabanc? University > -------------- next part -------------- An HTML attachment was scrubbed... URL: From f.barcelo at uib.es Mon Jan 16 18:21:50 2012 From: f.barcelo at uib.es (Francisco Barcelo) Date: Mon, 16 Jan 2012 18:21:50 +0100 Subject: [FieldTrip] PhD and postdoctoral positions in cognitive electrophysiology in Majorca Message-ID: Dear colleagues, We are looking for a postdoc and a PhD student with EEG or MEG experience to work here in Majorca (pdf files attached). More info at: www.mcst.es With regards, Francisco Barceló -- ><><><><><><><><><><><><><>< Dr. Francisco Barceló Ed. Beatriu de Pinos #12 University of Illes Balears (UIB) Ctra. Valldemossa, km 7.5 E-07122 Palma de Mallorca - Spain Personal: www.mcst.es Lab: www.neuropsicologiaclinica.es Phone: 971 172750 Fax: 971 172309 ResearchID http://www.researcherid.com/rid/B-3629-2011 Job opportunities in Cognitive Neuroscience ><><><><><><><><><><><><><>< -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: ad_postdoc_cognitive_neuroscience.pdf Type: application/pdf Size: 73442 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: ad_PhD_cognitive_neuroscience.pdf Type: application/pdf Size: 72974 bytes Desc: not available URL: From sangita.dandekar at gmail.com Tue Jan 17 19:56:53 2012 From: sangita.dandekar at gmail.com (Sangita Dandekar) Date: Tue, 17 Jan 2012 13:56:53 -0500 Subject: [FieldTrip] non-parametric methods for comparison of power spectra Message-ID: Dear Fieldtrippers, Forgive me if I have overlooked something in the FT documentation, but I was wondering if there are any non-parametric methods for comparison of power spectra in Fieldtrip? When I say 'power spectra' I mean frequency vs power spectrum data without a time component (i.e. not the TFR data structures in Fieldtrip, but what one would get by applying an FFT to a time series and finding the magnitude of the power spectrum as a function of frequency). One (clumsy) way to do this would be to use the framework of FT's timelockstatistics function, but instead of entering channel x time x voltage data for each trial, use channel x frequency x power data for each trial. I think the above should work, but am guessing it will probably be fine for detecting low frequency differences but not as sensitive for differences in the higher frequencies due to the 1/f power spectrum. Is there an alternative method that anyone can suggest? Does the suggested method above sound ok? Maybe log transforming prior to application of the existing timelockstatistics framework? Thanks in advance for any help! Sangi From g.piantoni at nin.knaw.nl Tue Jan 17 22:17:09 2012 From: g.piantoni at nin.knaw.nl (Gio Piantoni) Date: Tue, 17 Jan 2012 22:17:09 +0100 Subject: [FieldTrip] non-parametric methods for comparison of power spectra In-Reply-To: References: Message-ID: Hi Sangita, I think that Fieldtrip can handle your problem just fine, if I understand your point correctly. If you run ft_freqanalysis with 'mtmfft', foilim [0 50] and keeptrials='yes', you'll get a structure with dimension trials x channel x frequency, where each element of the 3d matrix contains power spectra. You can check the .dimord field, which will be 'rpt_chan_freq'. I don't understand your notation "channel x frequency x power data". Do you mean a 'chan_freq' matrix with power data in there? You'll need trials (or subjects) to calculate any parametric or not statistics. You can then use the output of ft_freqanalysis for your statistics. It does not need any tweaking. The 1/f effect is not a problem because you're testing a difference from zero, or a difference between two conditions. So, while the mean over trials becomes smaller in absolute values, the standard error becomes smaller as well in absolute terms, resulting in roughly consistent t-values. In any case, log-transformation might make your power data more normal, so that will probably make your statistic more sound. If this is not clear to you, please include part of your code and we might help you further. Hope this helps, Gio -- Giovanni Piantoni, Ph.D. student Dept. Sleep & Cognition Netherlands Institute for Neuroscience Meibergdreef 47 1105 BA Amsterdam (NL) +31 (0)20 5665492 g.piantoni at nin.knaw.nl www.giovannipiantoni.com On Tue, Jan 17, 2012 at 19:56, Sangita Dandekar wrote: > Dear Fieldtrippers, > > Forgive me if I have overlooked something in the FT documentation, but > I was wondering if there are any non-parametric methods for comparison > of power spectra in Fieldtrip?  When I say 'power spectra' I mean > frequency vs power spectrum data without a time component (i.e. not > the TFR data structures in Fieldtrip, but what one would get by > applying an FFT to a time series and finding the magnitude of the > power spectrum as a function of frequency). > > One (clumsy) way to do this would be to use the framework of FT's > timelockstatistics function, but instead of entering channel x time x > voltage data for each trial, use channel x  frequency x power data for > each trial. > > I think the above should work, but am guessing it will probably be > fine for detecting low frequency differences but not as sensitive for > differences in the higher frequencies due to the 1/f power spectrum. > > Is there an alternative method that anyone can suggest? Does the > suggested method above sound ok?  Maybe log transforming prior to > application of the existing timelockstatistics framework? > > Thanks in advance for any help! > Sangi > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip From stefan.debener at uni-oldenburg.de Wed Jan 18 13:51:35 2012 From: stefan.debener at uni-oldenburg.de (Stefan Debener) Date: Wed, 18 Jan 2012 13:51:35 +0100 Subject: [FieldTrip] 14 Positions on the Neuroscience of Learning and Brain Plasticity Message-ID: <4F16C057.4010209@uni-oldenburg.de> 14 Positions on the neuroscience of learning and brain plasticity PhD / early-Postdoc positions are available to work with International research leaders in top European Universities and market-leading companies in the area of learning and brain plasticity. The European Community Seventh Framework Initial Training Network "Adaptive Brain Computations" (ABC) is a multi-disciplinary research and training programme which aims to integrate the study of learning and brain plasticity to promote wellbeing and advance healthcare interventions. The network takes a multidisciplinary approach, synthesising methods from brain imaging, behavioural science, physiology, and computational modelling to understand brain plasticity. Involvement in the network provides exciting opportunities for high-level research training, international travel and exchange between labs. For more information on ABC, please check: http://cnil.bham.ac.uk/ABC/index.html Eligibility criteria: 1. You should have a background in subjects related to the research including neuroscience, cognitive psychology, computer science, engineering or physics. 2. You should be in the first 4 years of your research career and should not yet have been awarded a PhD. 3. You must not have lived in the same country as the institution to which you are applying for >12 months during the past 3 years. Applications: To apply, please contact the relevant Principal Investigator directly as listed below. Please send CV, personal statement of research background and interests and the name of 3 referees. Professor Stefan Debener (stefan.debener at uni-oldenburg.de ) -- University of Oldenburg, Germany. Expertise: audio-visual integration, sensory deprivation, simultaneous EEG-fMRI Prof. Martin Giese (martin.giese at uni-tuebingen.de ) --Eberhard Karls Universität Tübingen, Germany. Expertise: computational models of motion recognition and learning, stroke rehabilitation Prof. Rainer Goebel (goebel at brainvoyager.com ) -- Brain Innovation, Netherlands. Expertise: brain imaging analysis and visualization, real-time fMRI, neurofeedback Dr. Ingmar Gutberlet (gutberlet at blindsight.de ) -- BlindSight GmbH, Germany Expertise: advanced analysis of EEG/fMRI signals, artefact correction signal integration. Prof. Heidi Johansen-Berg (heidi at fmrib.ox.ac.uk ) -- University of Oxford, UK. Expertise: brain plasticity, stroke recovery, structural and functional brain imaging Prof. Zoe Kourtzi (z.kourtzi at bham.ac.uk ) -- University of Birmingham, UK. Expertise: visual learning, object recognition and categorization, multimodal brain imaging (fMRI, EEG, TMS) Prof. Stefano Panzeri (Stefano.Panzeri at iit.it ) -- Istituto Italiano di Tecnologia, Italy Expertise: neural networks, information theory Professor Pieter Roelfsema (p.roelfsema at nin.knaw.nl ) -- National Institute for Neuroscience, Netherlands Expertise: neural circuits, visual learning and attention, neurophysiology, computational modelling. Prof. Rufin Vogels (rufin.vogels at med.kuleuven.be ) -- Katholieke Universiteit Leuven Expertise: visual perception, perceptual learning, object categorization, neurophysiology -- Prof. Dr. Stefan Debener Neuropsychology Lab Department of Psychology University of Oldenburg D-26111 Oldenburg Germany Office: A7 0-038 Phone: +49-441-798-4271 Fax: +49-441-798-5522 Email: stefan.debener at uni-oldenburg.de -------------- next part -------------- An HTML attachment was scrubbed... URL: From lavado at gmail.com Thu Jan 19 09:25:16 2012 From: lavado at gmail.com (Ion Lavado) Date: Thu, 19 Jan 2012 09:25:16 +0100 Subject: [FieldTrip] Source reconstruction with MNE problem: vol doen's fit sourcespace Message-ID: Hello, i'm trying a source reconstruction of event related fields using minimun-norm estimates and i get a problem with vol and sourcespace. When plot them together the vol doesn't fit the sourcespace. I adjunted in the mail two images where you can see what i get. It looks like that there isn't any problem of coordinate system also the units seem to be ok. I also procesed all the file with freesurfer so i suppose there is no problem with the orig-nomask.mgz. Hope anyone can help me. Thank you very much. Ion -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: 1.JPG Type: image/jpeg Size: 273695 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: 2.JPG Type: image/jpeg Size: 279282 bytes Desc: not available URL: From a.stolk at fcdonders.ru.nl Thu Jan 19 10:23:47 2012 From: a.stolk at fcdonders.ru.nl (Stolk, A.) Date: Thu, 19 Jan 2012 10:23:47 +0100 (CET) Subject: [FieldTrip] Source reconstruction with MNE problem: vol doen's fit sourcespace In-Reply-To: <437783613.742730.1326964902431.JavaMail.root@sculptor.zimbra.ru.nl> Message-ID: <2143371294.742821.1326965027489.JavaMail.root@sculptor.zimbra.ru.nl> Hi Ion, Did you realign your anatomical image to Ta lairach space (and not accidentally to MNI space)  prior to the processing with Freesurfer? http://imaging.mrc-cbu.cam.ac.uk/imaging/FindingCommissures Best regards, Arjen ----- "Ion Lavado" schreef: > Van: "Ion Lavado" > Aan: fieldtrip at donders.ru.nl > Verzonden: Donderdag 19 januari 2012 09:25:16 > Onderwerp: [FieldTrip] Source reconstruction with MNE problem: vol doen's fit        sourcespace > > Hello, i'm trying a source reconstruction of event related fields using minimun-norm estimates and i get a problem with vol and sourcespace. When plot them together the vol doesn't fit the sourcespace. I adjunted in the mail two images where you can see what i get. It looks like that there isn't any problem of coordinate system also the units seem to be ok. I also procesed all the file with freesurfer so i suppose there is no problem with the orig-nomask.mgz. Hope anyone can help me. Thank you very much. > Ion > _______________________________________________ > 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 lihqih at gmail.com Thu Jan 19 17:28:27 2012 From: lihqih at gmail.com (qi li) Date: Thu, 19 Jan 2012 11:28:27 -0500 Subject: [FieldTrip] any function can do the sliding window average Message-ID: Hi, I am wondering if there are any functions can do the sliding window average of the processed epoch-ed data. It should work as a low pass filter. ft_freqanalysis has a sliding window built in for the frequency domain quantities, I am looking for a function working in the time domain. Thanks! Qi From jan.schoffelen at donders.ru.nl Thu Jan 19 17:51:28 2012 From: jan.schoffelen at donders.ru.nl (jan-mathijs schoffelen) Date: Thu, 19 Jan 2012 17:51:28 +0100 Subject: [FieldTrip] any function can do the sliding window average In-Reply-To: References: Message-ID: You can use the option cfg.boxcar in ft_preprocessing Best, Jan-Mathijs On Jan 19, 2012, at 5:28 PM, qi li wrote: > Hi, > > I am wondering if there are any functions can do the sliding window > average of the processed epoch-ed data. It should work as a low pass > filter. ft_freqanalysis has a sliding window built in for the > frequency domain quantities, I am looking for a function working in > the time domain. Thanks! > > Qi > _______________________________________________ > 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 -------------- next part -------------- An HTML attachment was scrubbed... URL: From ghahremani.aida at gmail.com Thu Jan 19 20:01:44 2012 From: ghahremani.aida at gmail.com (aida ghahremani) Date: Thu, 19 Jan 2012 14:01:44 -0500 Subject: [FieldTrip] A problem Message-ID: Dear Fieldtrip group I have the coordinates of the cortex. Would you please help me to locates the sources (dipoles) which best explain the EEG? How I can make their orientations normal to the cortex? Best Ayda On Thu, Jan 19, 2012 at 3:25 AM, wrote: > Send fieldtrip mailing list submissions to > fieldtrip at donders.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 donders.ru.nl > > You can reach the person managing the list at > fieldtrip-owner at donders.ru.nl > > When replying, please edit your Subject line so it is more specific > than "Re: Contents of fieldtrip digest..." > > > Today's Topics: > > 1. Source reconstruction with MNE problem: vol doen's fit > sourcespace (Ion Lavado) > > > ---------------------------------------------------------------------- > > Message: 1 > Date: Thu, 19 Jan 2012 09:25:16 +0100 > From: Ion Lavado > To: fieldtrip at donders.ru.nl > Subject: [FieldTrip] Source reconstruction with MNE problem: vol > doen's fit sourcespace > Message-ID: > > > Content-Type: text/plain; charset="iso-8859-1" > > Hello, i'm trying a source reconstruction of event related fields using > minimun-norm estimates and i get a problem with vol and sourcespace. When > plot them together the vol doesn't fit the sourcespace. I adjunted in the > mail two images where you can see what i get. It looks like that there > isn't any problem of coordinate system also the units seem to be ok. I also > procesed all the file with freesurfer so i suppose there is no problem with > the orig-nomask.mgz. > Hope anyone can help me. Thank you very much. > > Ion > -------------- next part -------------- > An HTML attachment was scrubbed... > URL: < > http://mailman.science.ru.nl/pipermail/fieldtrip/attachments/20120119/fc596f28/attachment.html > > > -------------- next part -------------- > A non-text attachment was scrubbed... > Name: 1.JPG > Type: image/jpeg > Size: 273695 bytes > Desc: not available > URL: < > http://mailman.science.ru.nl/pipermail/fieldtrip/attachments/20120119/fc596f28/attachment.jpe > > > -------------- next part -------------- > A non-text attachment was scrubbed... > Name: 2.JPG > Type: image/jpeg > Size: 279282 bytes > Desc: not available > URL: < > http://mailman.science.ru.nl/pipermail/fieldtrip/attachments/20120119/fc596f28/attachment-0001.jpe > > > > ------------------------------ > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > End of fieldtrip Digest, Vol 14, Issue 27 > ***************************************** > -------------- next part -------------- An HTML attachment was scrubbed... URL: From tara_jacobson at brown.edu Thu Jan 19 22:12:55 2012 From: tara_jacobson at brown.edu (Tara Jacobson) Date: Thu, 19 Jan 2012 16:12:55 -0500 Subject: [FieldTrip] ft_definetrial with .nex files Message-ID: Hello, Does anyone have experience with .nex files? It seems straight forward to be able to define trials using events in the .nex, but ft_definetrial is not recognizing them as events. filename =('11-087_12292011.nex') stim30Hz=[27.25275 159.26715 258.277925 357.2887 489.303075 522.306625 621.317425 786.335425 885.3462 984.356975 1083.36775 1149.3749 1281.3893 1347.396425 1446.40725 1578.4216 1644.4288 1776.443175 1875.45395 1974.464725]; cfg = []; cfg.dataset = filename; cfg.trialdef.triallength=3; cfg.trialdef.eventtype=('Event007'); cfg.trialdef.eventvalue=stim30Hz; cfg=ft_definetrial(cfg); filename = 11-087_12292011.nex Warning: no trialfun was specified, using trialfun_general > In ft_definetrial at 95 evaluating trialfunction 'trialfun_general' reading the events from '11-087_12292011.nex' found 0 events created 676 trials My question is what are the 676 trials if it found no events? Can anyone give me some advice? Thanks very much. -------------- next part -------------- An HTML attachment was scrubbed... URL: From david.m.groppe at gmail.com Fri Jan 20 04:57:22 2012 From: david.m.groppe at gmail.com (David Groppe) Date: Thu, 19 Jan 2012 22:57:22 -0500 Subject: [FieldTrip] MD, DO, or MD/PhD fellowship in epilepsy, brain connectomics, and cognitive neuroscience Message-ID: Fellowship available for work on epilepsy, brain connectomics, and cognitive neuroscience with the Comprehensive Epilepsy Center of the North Shore-LIJ Health System, NY, USA.  This unique fellowship will fund an MD, DO, or MD/PhD to serve as a clinical fellow treating epilepsy patients under the mentorship of a team of experienced epileptologists and to engage in research using neuroimaging and electrophysiology to improve the diagnosis of epilepsy and to further the basic science of human brain function. More specifically, ongoing research projects include: (1) Validation of task-based and resting state fMRI and DTI measures of brain connectivity using electrical stimulation mapping and ECoG (2) Identifying areas of seizure genesis and spread using network analysis of fMRI and ECoG dynamics (3) Investigation of the neuronal dynamics underlying selective attention, language comprehension, visual object identification and auditory stream analysis. For a more detailed description about the lab and representative publications see: http://www.feinsteininstitute.org/Feinstein/Laboratory+for+Multimodal+Human+Brain+Research Candidates should meet the following qualifications: 1) M.D., D.O., or an M.D./Ph.D. degree, 2) Have graduated from or be currently enrolled in a New York state medical school, residency training program or fellowship. 3) Have some background in fMRI, electrophysiology, and/or data analysis using one or more of the following software packages: Matlab, FreeSurfer, FSL, AFNI This is a great opportunity for a physician-scientist to develop both as a clinician and researcher. An ideal candidate would be a neurologist, neurosurgeon or neuroradiologist with an interest in epilepsy, functional neurosurgery or functional brain mapping. This fellowship is part of the New York State ECRIP program, which offers a competitive salary and an opportunity to supplement income with clinical work. Please submit CV and short statement of interest to Dr. Ashesh Mehta at amehta at nshs.edu for more information. -- David Groppe, Ph.D. Postdoctoral Researcher North Shore LIJ Health System New Hyde Park, New York http://www.cogsci.ucsd.edu/~dgroppe/ From tzvetan.popov at uni-konstanz.de Fri Jan 20 09:35:58 2012 From: tzvetan.popov at uni-konstanz.de (Tzvetan Popov) Date: Fri, 20 Jan 2012 09:35:58 +0100 Subject: [FieldTrip] Open postdoctoral position at the University Konstanz, Germany Message-ID: <947A8219-1C38-444E-8B22-EA9D07FB2F68@uni-konstanz.de> Dear colleagues, please forward the message below in case you know of potential candidates. Thank you very much Tzvetan Popov ______________________ Postdoc position (assistant professor level) in Clinical Psychology and Clinical Neuropsychology available at the Department of Psychology, University of Konstanz Closing Date: March 1, 2012 Salary (TVL 13, full-time): Responsibilities The Clinical Psychology & Clinical Neuroscience branch of the department (chairs Brigitte Rockstroh, Thomas Elbert) are involved in BSc and MSc programs on Clinical Psychology (introductory and advanced courses) and Neuropsychology (methods and neuropsychological disorders & rehabilitation). The applicant is expected to teach 2 courses (2 hours weekly) per semester. Major research topics of the group relate to neuromagnetic correlates of cognitive and emotional processing in healthy subjects and patients with schizophrenia and stress-related disorders. The applicant is expected to engage in research in these or related fields, exploiting the facilities of the department. Applicants should have a Diploma/MSc in Psychology and a Ph.D. Applicants with a background in neuroscience or experience in neuroscientific methods are welcome. Applicants should be willing to work in an interdisciplinary environment and in a collaborating team, sharing technical know-how and ideas. Work environment The University of Konstanz is one of the nine Universities of Excellence in Germany. The Clinical & Clinical Neuropsychology group offers MEG- and EEG-labs, including TMS (neuronavigator), and access to a 1.5 T Phillips MRT at a nearby neurological hospital. The group is further related to a research ward at the Center for Psychiatry and runs a trauma-competence center. It is our mission to conduct fundamental research using neuroscientific methods for understanding psychological disorders. Starting from neuroplasticity-research, our mission is further to develop and evaluate treatment and rehabilitation procedures. The department hosts two junior-research groups (Emmy-Noether-Nachwuchsgruppen) and is tightly linked to the junior scientist promotion programs supported by the Excellence initiative. Please submit applications or contact for further information: Prof. Dr. Brigitte Rockstroh +49-7531-884625 – Brigitte.rockstroh at uni-konstanz.de ******************************************* Tzvetan Popov Clinical Psychology University of Konstanz Box 23 78457 Konstanz, GERMANY Phone: 0049-7531-884600 Fax: 0049-7531-884601 Email: tzvetan.popov at uni-konstanz.de ******************************************* -------------- next part -------------- An HTML attachment was scrubbed... URL: From jm.horschig at donders.ru.nl Fri Jan 20 09:48:18 2012 From: jm.horschig at donders.ru.nl (=?ISO-8859-1?Q?=22J=F6rn_M=2E_Horschig=22?=) Date: Fri, 20 Jan 2012 09:48:18 +0100 Subject: [FieldTrip] ft_definetrial with .nex files In-Reply-To: References: Message-ID: <4F192A52.2050808@donders.ru.nl> Dear Tara, you define cfg.trialdef.triallength prior to calling ft_definetrial. This will cause the trialfunction to not look for events, but cut your recorded data into chunks of 3 seconds, independently of the eventtype and -value that you specified. The parameters you probably want to use instead are cfg.trialdef.poststim and .prestim. Triallength is supposed for continuous data without events, e.g. resting state data. Btw, if you specifiy cfg.trialdef.eventtype='?' you will get a list with all events in your data - that way you can make sure that you are specifying the correct types or values (alternatively, you could also use ft_read_event). Hope it helps! Best, Jörn On 1/19/2012 10:12 PM, Tara Jacobson wrote: > Hello, > > Does anyone have experience with .nex files? It seems straight > forward to be able to define trials using events in the .nex, but > ft_definetrial is not recognizing them as events. > > filename =('11-087_12292011.nex') > > > stim30Hz=[27.25275159.26715258.277925357.2887489.303075522.306625621.317425786.335425885.3462984.3569751083.367751149.37491281.38931347.3964251446.407251578.42161644.42881776.4431751875.453951974.464725]; > > cfg = []; > cfg.dataset = filename; > > cfg.trialdef.triallength=3; > cfg.trialdef.eventtype=('Event007'); > cfg.trialdef.eventvalue=stim30Hz; > > cfg=ft_definetrial(cfg); > > filename = > 11-087_12292011.nex > Warning: no trialfun was specified, using trialfun_general > > In ft_definetrial at 95 > evaluating trialfunction 'trialfun_general' > reading the events from '11-087_12292011.nex' > found 0 events > created 676 trials > > My question is what are the 676 trials if it found no events? > > Can anyone give me some advice? > > > Thanks very much. > > > > > _______________________________________________ > 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 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 r.oostenveld at donders.ru.nl Fri Jan 20 10:43:36 2012 From: r.oostenveld at donders.ru.nl (Robert Oostenveld) Date: Fri, 20 Jan 2012 10:43:36 +0100 Subject: [FieldTrip] ft_definetrial with .nex files In-Reply-To: References: Message-ID: <895F6559-E5B6-410F-B6AA-F8407C73E30F@donders.ru.nl> Dear Tara, To add to Jorns suggestion On 19 Jan 2012, at 22:12, Tara Jacobson wrote: > ... > cfg=ft_definetrial(cfg); > > filename = > 11-087_12292011.nex > Warning: no trialfun was specified, using trialfun_general > > In ft_definetrial at 95 > evaluating trialfunction 'trialfun_general' > reading the events from '11-087_12292011.nex' > found 0 events > created 676 trials The line "found 0 events" suggests that ft_read_event (which is called in ft_definetrial) did not find any events in your nex file. I suggest you look into the ft_read_event MATLAB code (and the underlying nex functions) to figure out why it does not detect the triggers in the nex file. best Robert From r.oostenveld at donders.ru.nl Fri Jan 20 10:49:59 2012 From: r.oostenveld at donders.ru.nl (Robert Oostenveld) Date: Fri, 20 Jan 2012 10:49:59 +0100 Subject: [FieldTrip] A problem In-Reply-To: References: Message-ID: Dear Ayda On 19 Jan 2012, at 20:01, aida ghahremani wrote: > I have the coordinates of the cortex. Would you please help me to locates the sources (dipoles) which best explain the EEG? You can pass the cortical sheet to the ft_sourceanalysis function (or to the ft_prepare_leadfield function) to use all vertices of the cortical sheet as dipole locations. This is also the approach used in http://fieldtrip.fcdonders.nl/tutorial/minimumnormestimate#source_model. The vertex positions should be specified as cfg.grid.pos. > How I can make their orientations normal to the cortex? You'll have to determine the dipole orientation at each vertex outside of fieldtrip, but you can use the fieldtrip/forward/private/normals.m to help you with it. If you specify the dipole orientations as cfg.grid.mom, then the leadfield will computed for a dipole in that direction. See line 227 in ft_prepare_leadfield. best Robert From ghahremani.aida at gmail.com Fri Jan 20 19:06:29 2012 From: ghahremani.aida at gmail.com (aida ghahremani) Date: Fri, 20 Jan 2012 13:06:29 -0500 Subject: [FieldTrip] fieldtrip Digest, Vol 14, Issue 31 In-Reply-To: References: Message-ID: Hi Robert Thanks for your kind reply. Best Regards, Ayda On Fri, Jan 20, 2012 at 6:00 AM, wrote: > Send fieldtrip mailing list submissions to > fieldtrip at donders.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 donders.ru.nl > > You can reach the person managing the list at > fieldtrip-owner at donders.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: ft_definetrial with .nex files (J?rn M. Horschig) > 2. Re: ft_definetrial with .nex files (Robert Oostenveld) > 3. Re: A problem (Robert Oostenveld) > > > ---------------------------------------------------------------------- > > Message: 1 > Date: Fri, 20 Jan 2012 09:48:18 +0100 > From: "J?rn M. Horschig" > To: Email discussion list for the FieldTrip project > > Subject: Re: [FieldTrip] ft_definetrial with .nex files > Message-ID: <4F192A52.2050808 at donders.ru.nl> > Content-Type: text/plain; charset="iso-8859-1"; Format="flowed" > > Dear Tara, > > you define cfg.trialdef.triallength prior to calling ft_definetrial. > This will cause the trialfunction to not look for events, but cut your > recorded data into chunks of 3 seconds, independently of the eventtype > and -value that you specified. The parameters you probably want to use > instead are cfg.trialdef.poststim and .prestim. Triallength is supposed > for continuous data without events, e.g. resting state data. > > Btw, if you specifiy cfg.trialdef.eventtype='?' you will get a list with > all events in your data - that way you can make sure that you are > specifying the correct types or values (alternatively, you could also > use ft_read_event). > > Hope it helps! > Best, > J?rn > > On 1/19/2012 10:12 PM, Tara Jacobson wrote: > > Hello, > > > > Does anyone have experience with .nex files? It seems straight > > forward to be able to define trials using events in the .nex, but > > ft_definetrial is not recognizing them as events. > > > > filename =('11-087_12292011.nex') > > > > > > > stim30Hz=[27.25275159.26715258.277925357.2887489.303075522.306625621.317425786.335425885.3462984.3569751083.367751149.37491281.38931347.3964251446.407251578.42161644.42881776.4431751875.453951974.464725]; > > > > cfg = []; > > cfg.dataset = filename; > > > > cfg.trialdef.triallength=3; > > cfg.trialdef.eventtype=('Event007'); > > cfg.trialdef.eventvalue=stim30Hz; > > > > cfg=ft_definetrial(cfg); > > > > filename = > > 11-087_12292011.nex > > Warning: no trialfun was specified, using trialfun_general > > > In ft_definetrial at 95 > > evaluating trialfunction 'trialfun_general' > > reading the events from '11-087_12292011.nex' > > found 0 events > > created 676 trials > > > > My question is what are the 676 trials if it found no events? > > > > Can anyone give me some advice? > > > > > > Thanks very much. > > > > > > > > > > _______________________________________________ > > 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 > > 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/20120120/dbfd9088/attachment-0001.html > > > > ------------------------------ > > Message: 2 > Date: Fri, 20 Jan 2012 10:43:36 +0100 > From: Robert Oostenveld > To: Email discussion list for the FieldTrip project > > Subject: Re: [FieldTrip] ft_definetrial with .nex files > Message-ID: <895F6559-E5B6-410F-B6AA-F8407C73E30F at donders.ru.nl> > Content-Type: text/plain; charset=us-ascii > > Dear Tara, > > To add to Jorns suggestion > > On 19 Jan 2012, at 22:12, Tara Jacobson wrote: > > > ... > > cfg=ft_definetrial(cfg); > > > > filename = > > 11-087_12292011.nex > > Warning: no trialfun was specified, using trialfun_general > > > In ft_definetrial at 95 > > evaluating trialfunction 'trialfun_general' > > reading the events from '11-087_12292011.nex' > > found 0 events > > created 676 trials > > The line "found 0 events" suggests that ft_read_event (which is called in > ft_definetrial) did not find any events in your nex file. I suggest you > look into the ft_read_event MATLAB code (and the underlying nex functions) > to figure out why it does not detect the triggers in the nex file. > > best > Robert > > > > > > ------------------------------ > > Message: 3 > Date: Fri, 20 Jan 2012 10:49:59 +0100 > From: Robert Oostenveld > To: Email discussion list for the FieldTrip project > > Subject: Re: [FieldTrip] A problem > Message-ID: > Content-Type: text/plain; charset=us-ascii > > Dear Ayda > > On 19 Jan 2012, at 20:01, aida ghahremani wrote: > > I have the coordinates of the cortex. Would you please help me to > locates the sources (dipoles) which best explain the EEG? > > You can pass the cortical sheet to the ft_sourceanalysis function (or to > the ft_prepare_leadfield function) to use all vertices of the cortical > sheet as dipole locations. This is also the approach used in > http://fieldtrip.fcdonders.nl/tutorial/minimumnormestimate#source_model. > The vertex positions should be specified as cfg.grid.pos. > > > How I can make their orientations normal to the cortex? > > You'll have to determine the dipole orientation at each vertex outside of > fieldtrip, but you can use the fieldtrip/forward/private/normals.m to help > you with it. If you specify the dipole orientations as cfg.grid.mom, then > the leadfield will computed for a dipole in that direction. See line 227 in > ft_prepare_leadfield. > > best > Robert > > > > ------------------------------ > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > End of fieldtrip Digest, Vol 14, Issue 31 > ***************************************** > -------------- next part -------------- An HTML attachment was scrubbed... URL: From karl.doron at gmail.com Sun Jan 22 05:28:37 2012 From: karl.doron at gmail.com (Karl Doron) Date: Sat, 21 Jan 2012 20:28:37 -0800 Subject: [FieldTrip] axes in ft_connectivityplot Message-ID: Hello, I'm trying to use some of the plot tools for results from ft_connectivityanalysis. Can anyone tell me what the horizontal and vertical axes represent in ft_connectivityplot? The values differ on each plot in the matrix and don't seem to correspond to the data. Also, in ft_topoplotCC, is it possible to weight the line font based on the magnitude of the coherence value? %% step 1 | freq analysis cfg = []; cfg.channel = {'A224', 'A188', 'A189', 'A163', 'A184','A162'}; cfg.method = 'mtmfft'; cfg.output = 'fourier'; cfg.foilim = [8 12]; cfg.toi = 2.35:0.01:2.65; cfg.keeptrials = 'yes'; cfg.keeptapers = 'yes'; cfg.tapsmofrq = 2; cfg.taper = 'dpss'; freq_alpha = ft_freqanalysis(cfg, data_spctrm); %% step 2 | connectivity analysis cfg = []; cfg.method = 'coh'; coh = ft_connectivityanalysis(cfg, freq_alpha); Thanks for any feedback, karl doron UC, Santa Barbara -------------- next part -------------- An HTML attachment was scrubbed... URL: From m.severens at maartenskliniek.nl Mon Jan 23 14:56:10 2012 From: m.severens at maartenskliniek.nl (Severens, Marianne) Date: Mon, 23 Jan 2012 14:56:10 +0100 Subject: [FieldTrip] component variances with runica Message-ID: <70FC3ACFFB46314EBEAF9101EA45F50E06D145F310@smkexch02.maartenskliniek.nl> Dear fieldtrippers I'm doing ICA analysis with fieldtrip (method runica) and I want to know the variance explained by each component. I belief fieldtrip is making use of the EEGlab code to do the runica, and I know that with the runica function it is possible to get these variances as output. Is this also stored somewhere in the fieldtrip data format or is there an other way to get these variances? Thanks for your help! Best, Marianne Severens Disclaimer Vrijgave van de informatie verzonden met dit e-mail bericht is geaccordeerd door de ontvanger en/of zijn behandelend arts. Verstrekking van deze informatie is conform het Privacy reglement van de Sint Maartenskliniek. De informatie is uitsluitend bestemd voor de geadresseerde. Gebruik van deze informatie door anderen dan de geadresseerde is, zonder voorafgaande schriftelijke toestemming van de rechthebbende , verboden. De Sint Maartenskliniek staat niet in voor de juiste en volledige overbrenging van de inhoud van een gezonden e-mail, noch voor de ontvangst daarvan. Sint Maartenskliniek Hengstdal 3, 6574 NA Ubbergen (bij Nijmegen) Telefoon 024-3659 911 Telefax 024-3659 204 KvK nummer 41055111 From karl.doron at gmail.com Tue Jan 24 01:19:38 2012 From: karl.doron at gmail.com (Karl Doron) Date: Mon, 23 Jan 2012 16:19:38 -0800 Subject: [FieldTrip] axes in ft_connectivityplot In-Reply-To: References: Message-ID: Hello, Just to clarify my first question below. In the context of the tutorial on the fieldtrip website, what do the axes in this figure represent? Thanks, karl doron UC, Santa Barbara > Hello, > > I'm trying to use some of the plot tools for results from ft_connectivityanalysis. Can anyone tell me what the horizontal and vertical axes represent in ft_connectivityplot? The values differ on each plot in the matrix and don't seem to correspond to the data. Also, in ft_topoplotCC, is it possible to weight the line font based on the magnitude of the coherence value? > > %% step 1 | freq analysis > > cfg = []; > cfg.channel = {'A224', 'A188', 'A189', 'A163', 'A184','A162'}; > cfg.method = 'mtmfft'; > cfg.output = 'fourier'; > cfg.foilim = [8 12]; > cfg.toi = 2.35:0.01:2.65; > cfg.keeptrials = 'yes'; > cfg.keeptapers = 'yes'; > cfg.tapsmofrq = 2; > cfg.taper = 'dpss'; > > freq_alpha = ft_freqanalysis(cfg, data_spctrm); > > > %% step 2 | connectivity analysis > > cfg = []; > cfg.method = 'coh'; > > coh = ft_connectivityanalysis(cfg, freq_alpha); > > > > Thanks for any feedback, > karl doron > UC, Santa Barbara > > > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From jan.schoffelen at donders.ru.nl Tue Jan 24 08:52:27 2012 From: jan.schoffelen at donders.ru.nl (jan-mathijs schoffelen) Date: Tue, 24 Jan 2012 08:52:27 +0100 Subject: [FieldTrip] axes in ft_connectivityplot In-Reply-To: References: Message-ID: Hi Karl, The subplots represent the magnitude of the connectivity metric (which are typically unit-less) as a function of frequency. Best, Jan-Mathijs On Jan 24, 2012, at 1:19 AM, Karl Doron wrote: > Hello, > > Just to clarify my first question below. In the context of the tutorial on the fieldtrip website, what do the axes in this figure represent? > > Thanks, > karl doron > UC, Santa Barbara > >> Hello, >> >> I'm trying to use some of the plot tools for results from ft_connectivityanalysis. Can anyone tell me what the horizontal and vertical axes represent in ft_connectivityplot? The values differ on each plot in the matrix and don't seem to correspond to the data. Also, in ft_topoplotCC, is it possible to weight the line font based on the magnitude of the coherence value? >> >> %% step 1 | freq analysis >> >> cfg = []; >> cfg.channel = {'A224', 'A188', 'A189', 'A163', 'A184','A162'}; >> cfg.method = 'mtmfft'; >> cfg.output = 'fourier'; >> cfg.foilim = [8 12]; >> cfg.toi = 2.35:0.01:2.65; >> cfg.keeptrials = 'yes'; >> cfg.keeptapers = 'yes'; >> cfg.tapsmofrq = 2; >> cfg.taper = 'dpss'; >> >> freq_alpha = ft_freqanalysis(cfg, data_spctrm); >> >> >> %% step 2 | connectivity analysis >> >> cfg = []; >> cfg.method = 'coh'; >> >> coh = ft_connectivityanalysis(cfg, freq_alpha); >> >> >> >> Thanks for any feedback, >> karl doron >> UC, Santa Barbara >> >> >> >> >> > > _______________________________________________ > 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 -------------- next part -------------- An HTML attachment was scrubbed... URL: From johemart at gmail.com Tue Jan 24 16:15:12 2012 From: johemart at gmail.com (=?ISO-8859-1?Q?Johann_Heinz_Mart=EDnez_Huartos?=) Date: Tue, 24 Jan 2012 16:15:12 +0100 Subject: [FieldTrip] Problem with ft_megplanar! Message-ID: Hi dear fieldtripers. I have a probblem that i dont understand when im using FT_MEGPLANAR. Im wondering if anyone could give me a hand! The thing is that I have several individual data, each with this kind of fields. patient{12} ans = avg: [148x255 double] var: [148x255 double] fsample: 254.3235 time: [1x255 double] dof: [148x255 double] label: {148x1 cell} dimord: 'chan_time' grad: [1x1 struct] cfg: [1x1 struct] And when Im using ft_megplanar as the same way the tutorial described it, like this: cfg = []; cfg.planarmethod = 'sincos'; avgFICplanar = ft_megplanar(cfg, pacientes{12}); Fieldtrip toolbox gives me this kind of errors that I don understand. ??? Reference to non-existent field 'unit'. Error in ==> megplanar_sincos at 37 fprintf('minimum distance between gradiometers is %6.2f %s\n', min(distance(find(distance~=0))), grad.unit); Error in ==> ft_megplanar at 171 montage = megplanar_sincos(cfg, data.grad); Error in ==> STEPHANTEST at 31 avgFICplanar = ft_megplanar(cfg, pacientes{12}); Then, off course, I can use FT_COMBINEPLANAR too. So does anyone knows what could be the error in the data? or it is necesary another field that im not using in this moment? Thanks fellas for this comments -- Atentamente: Johann Martínez. M.Sc. -------------- next part -------------- An HTML attachment was scrubbed... URL: From karch at mpib-berlin.mpg.de Tue Jan 24 23:54:12 2012 From: karch at mpib-berlin.mpg.de (Karch, Julian) Date: Tue, 24 Jan 2012 22:54:12 +0000 Subject: [FieldTrip] Missing resolution Information in *vhdr causes ft_preprocessing to return only NaNs Message-ID: Hi, I'm working on a brainvision EEG dataset which was preprocessed by someone else using Brainvision Analyzer. One part of his preprocessing was to set a new reference. This processing step makes the resolution information in the *vhdr file disappear. Because of that hdr.orig.resolution=NaN for all channels. As result of that the lines calib = diag(hdr.resolution(chanindx)); % using a sparse multiplication speeds it up dat = full(sparse(calib) * dat); in read_brainvision_eeg produce only NaN. This again results in trials which only contain NaNs. I do weekly updates of fieldtrip using svn. Because I'm quite sure if was able to read in, using ft_preprocssing, the excact same dataset, even with the same cfg file, earlier this year I checked the modifications for the last half year or so but I couldn't find any change which could have broken it. My two questions are. How would you handle this problem? Just plug in some random numbers like 0.1 ? Is this an issue with fieldtrip or am I doing something wrong? Were there any changes to the involved functions which could have changed the behavior in that way? Thanks in advance! Best, Julian Julian Karch Research Assistant Center for Lifespan Psychology MPI for Human Development Lentzeallee 94, 14195 Berlin, Germany phone: +49-30-82406-296 fax: +49-30-8249939 web: http://www.mpib-berlin.mpg.de -------------- next part -------------- An HTML attachment was scrubbed... URL: From karl.doron at gmail.com Wed Jan 25 00:52:55 2012 From: karl.doron at gmail.com (Karl Doron) Date: Tue, 24 Jan 2012 15:52:55 -0800 Subject: [FieldTrip] axes in ft_connectivityplot In-Reply-To: References: Message-ID: <791E9D0F-AE12-485E-A422-D6094D884165@gmail.com> Hello, Great! That makes sense. On my second question for ft_topoplotCC, there is a bug using strmatch on lines 191 and 192. You'll likely encounter an error using horzcat at line 199 if the 'exact' argument is not added due to possible comparison of a vector and a scalar, e.g., begindx will find channel A2* when only A2 is needed. begindx = strmatch(beglabel{i}, lay.label,'exact'); endindx = strmatch(endlabel{i}, lay.label,'exact'); Thanks! karl On Jan 23, 2012, at 11:52 PM, jan-mathijs schoffelen wrote: > Hi Karl, > > The subplots represent the magnitude of the connectivity metric (which are typically unit-less) as a function of frequency. > > Best, > > Jan-Mathijs > > On Jan 24, 2012, at 1:19 AM, Karl Doron wrote: > >> Hello, >> >> Just to clarify my first question below. In the context of the tutorial on the fieldtrip website, what do the axes in this figure represent? >> >> Thanks, >> karl doron >> UC, Santa Barbara >> >>> Hello, >>> >>> I'm trying to use some of the plot tools for results from ft_connectivityanalysis. Can anyone tell me what the horizontal and vertical axes represent in ft_connectivityplot? The values differ on each plot in the matrix and don't seem to correspond to the data. Also, in ft_topoplotCC, is it possible to weight the line font based on the magnitude of the coherence value? >>> >>> %% step 1 | freq analysis >>> >>> cfg = []; >>> cfg.channel = {'A224', 'A188', 'A189', 'A163', 'A184','A162'}; >>> cfg.method = 'mtmfft'; >>> cfg.output = 'fourier'; >>> cfg.foilim = [8 12]; >>> cfg.toi = 2.35:0.01:2.65; >>> cfg.keeptrials = 'yes'; >>> cfg.keeptapers = 'yes'; >>> cfg.tapsmofrq = 2; >>> cfg.taper = 'dpss'; >>> >>> freq_alpha = ft_freqanalysis(cfg, data_spctrm); >>> >>> >>> %% step 2 | connectivity analysis >>> >>> cfg = []; >>> cfg.method = 'coh'; >>> >>> coh = ft_connectivityanalysis(cfg, freq_alpha); >>> >>> >>> >>> Thanks for any feedback, >>> karl doron >>> UC, Santa Barbara >>> >>> >>> >>> >>> >> >> _______________________________________________ >> 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 > > _______________________________________________ > 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 Jan 25 09:02:24 2012 From: jan.schoffelen at donders.ru.nl (jan-mathijs schoffelen) Date: Wed, 25 Jan 2012 09:02:24 +0100 Subject: [FieldTrip] axes in ft_connectivityplot In-Reply-To: <791E9D0F-AE12-485E-A422-D6094D884165@gmail.com> References: <791E9D0F-AE12-485E-A422-D6094D884165@gmail.com> Message-ID: <3822E3AE-DF7E-4FA4-ACE1-145A71D481F8@donders.ru.nl> Hi Karl, Thanks for reporting this; we'll look into it and fix it. May I take the opportunity for reminding (or pointing) you to our bugzilla web site: bugzilla.fcdonders.nl. We use this site to file bugs, enhancement requests etc., and use it to keep track of the fixing process. Best, Jan-Mathijs On Jan 25, 2012, at 12:52 AM, Karl Doron wrote: > Hello, > > Great! That makes sense. > > On my second question for ft_topoplotCC, there is a bug using strmatch on lines 191 and 192. You'll likely encounter an error using horzcat at line 199 if the 'exact' argument is not added due to possible comparison of a vector and a scalar, e.g., begindx will find channel A2* when only A2 is needed. > > begindx = strmatch(beglabel{i}, lay.label,'exact'); > endindx = strmatch(endlabel{i}, lay.label,'exact'); > > Thanks! > > karl > > > > On Jan 23, 2012, at 11:52 PM, jan-mathijs schoffelen wrote: > >> Hi Karl, >> >> The subplots represent the magnitude of the connectivity metric (which are typically unit-less) as a function of frequency. >> >> Best, >> >> Jan-Mathijs >> >> On Jan 24, 2012, at 1:19 AM, Karl Doron wrote: >> >>> Hello, >>> >>> Just to clarify my first question below. In the context of the tutorial on the fieldtrip website, what do the axes in this figure represent? >>> >>> Thanks, >>> karl doron >>> UC, Santa Barbara >>> >>>> Hello, >>>> >>>> I'm trying to use some of the plot tools for results from ft_connectivityanalysis. Can anyone tell me what the horizontal and vertical axes represent in ft_connectivityplot? The values differ on each plot in the matrix and don't seem to correspond to the data. Also, in ft_topoplotCC, is it possible to weight the line font based on the magnitude of the coherence value? >>>> >>>> %% step 1 | freq analysis >>>> >>>> cfg = []; >>>> cfg.channel = {'A224', 'A188', 'A189', 'A163', 'A184','A162'}; >>>> cfg.method = 'mtmfft'; >>>> cfg.output = 'fourier'; >>>> cfg.foilim = [8 12]; >>>> cfg.toi = 2.35:0.01:2.65; >>>> cfg.keeptrials = 'yes'; >>>> cfg.keeptapers = 'yes'; >>>> cfg.tapsmofrq = 2; >>>> cfg.taper = 'dpss'; >>>> >>>> freq_alpha = ft_freqanalysis(cfg, data_spctrm); >>>> >>>> >>>> %% step 2 | connectivity analysis >>>> >>>> cfg = []; >>>> cfg.method = 'coh'; >>>> >>>> coh = ft_connectivityanalysis(cfg, freq_alpha); >>>> >>>> >>>> >>>> Thanks for any feedback, >>>> karl doron >>>> UC, Santa Barbara >>>> >>>> >>>> >>>> >>>> >>> >>> _______________________________________________ >>> 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 >> >> _______________________________________________ >> 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 -------------- next part -------------- An HTML attachment was scrubbed... URL: From georchris5 at yahoo.com Wed Jan 25 09:09:10 2012 From: georchris5 at yahoo.com (George Christopoulos) Date: Wed, 25 Jan 2012 00:09:10 -0800 (PST) Subject: [FieldTrip] Research Assistant / EEG specialist Position at Singapore Message-ID: <1327478950.43155.YahooMailNeo@web161901.mail.bf1.yahoo.com> The Decision and Organizational Lab at Nanyang Technological University (PI: George Christopoulos; website https://sites.google.com/site/labdeon/home) seeks a Research Assistant / EEG Technician interested in employing behavioural and experimental methods, cognitive neuroscience and computational approaches to study basic and applied aspects of human cognition. Of particular interest are: * Decision making, learning and cognitive flexibility * Social behaviour (trust, cooperation and competition etc.) * The impact of culture and cultural exposure to human cognition * Applied aspects such as the biology of leadership, managerial decision making and entrepreneurship Facilities: Our lab is a member of the Culture Science Institute and  has easy access to unparalleled and unique to Singapore facilities for behavioural testing, including numerous soundproofed testing rooms, rooms for experimental (group) games, eye-trackers, video recording facilities and equipment for physiological measures and EEG. In addition, the Lab has access to fMRI machines in Singapore and elsewhere. Moreover, we maintain strong connections with laboratories in US, Europe, Japan and China.  The candidate should have experience with EEG (data collection, design, data analysis with FieldTrip, EEGLAB etc.) and excellent computational skills (C++, Matlab, Java). A commitment of two years will be needed / preferred. Please send your CV along with a short research statement (one paragraph) to G. Christopoulos georchris5 [at] yahoo . c o m -------------- next part -------------- An HTML attachment was scrubbed... URL: From georchris5 at yahoo.com Wed Jan 25 09:11:03 2012 From: georchris5 at yahoo.com (George Christopoulos) Date: Wed, 25 Jan 2012 00:11:03 -0800 (PST) Subject: [FieldTrip] Fully supported (Tuition Fees covered; generous stipend) PhD positions at Nanyang Business School In-Reply-To: <1327478319.56162.YahooMailNeo@web161906.mail.bf1.yahoo.com> References: <1327478319.56162.YahooMailNeo@web161906.mail.bf1.yahoo.com> Message-ID: <1327479063.11648.YahooMailNeo@web161902.mail.bf1.yahoo.com> Fully supported (Tuition Fees covered; generous stipend) PhD positions at Nanyang Business School The Decision and Organizational Lab at Nanyang Technological University (PI: George Christopoulos; website https://sites.google.com/site/labdeon/home) seeks PhD student(s) interested in employing behavioural and experimental methods, cognitive neuroscience and computational approaches to study basic and applied aspects of human cognition. Of particular interest are: * Decision making, learning and cognitive flexibility * Social behaviour (trust, cooperation and competition etc.) * The impact of culture and cultural exposure to human cognition * Applied aspects such as the biology of leadership, managerial decision making and entrepreneurship Facilities: Our lab is a member of the Culture Science Institute and  has easy access to unparalleled and unique to Singapore facilities for behavioural testing, including numerous soundproofed testing rooms, rooms for experimental (group) games, eye-trackers, video recording facilities and equipment for physiological measures and EEG. In addition, the Lab has access to fMRI machines in Singapore and elsewhere. Moreover, we maintain strong connections with laboratories in US, Europe, Japan and China.   Graduate studentswill be enrolled in the prestigious Nanyang Business School PhD program, which offers a stipend and excellent training in both behavioural sciences and business processes (details here: http://www.nbsphd.ntu.edu.sg/Pages/Home.aspx). NBS is the leading Business School in Singapore, one of the top in Asia and consistently receives worldwide high rankings in global lists (http://www.nbs.ntu.edu.sg/Pages/Home.aspx). Research-wise the student will be involved in preparing, designing, running and analyzing behavioral and human neuroimaging experiments. Besides the standard coursework, the lab provides hands-on training and support on human neuroimaging and behavioral sciences. The student will be encouraged and supported to present his or her research in conferences and peer-reviewed journals.   Previous exposure to data collection and research (with knowledge of SPPS or other packages), good computational skills (C++, Matlab, Java) are a plus. The candidate will be needed to comply to NBS admission requirements, which include GRE or GMAT scores. Please send your CV along with a short research statement (one paragraph) to G. Christopoulos georchris5 [at] yahoo . c o m -------------- next part -------------- An HTML attachment was scrubbed... URL: From jan.schoffelen at donders.ru.nl Wed Jan 25 10:07:55 2012 From: jan.schoffelen at donders.ru.nl (jan-mathijs schoffelen) Date: Wed, 25 Jan 2012 10:07:55 +0100 Subject: [FieldTrip] axes in ft_connectivityplot In-Reply-To: <791E9D0F-AE12-485E-A422-D6094D884165@gmail.com> References: <791E9D0F-AE12-485E-A422-D6094D884165@gmail.com> Message-ID: Hi Karl, I looked into ft_topoplotCC and I noticed that you are not using an up-to-date version. The current version does not use strmatch, but uses strcmp. This should not cause a problem. Best wishes, Jan-Mathijs On Jan 25, 2012, at 12:52 AM, Karl Doron wrote: > Hello, > > Great! That makes sense. > > On my second question for ft_topoplotCC, there is a bug using strmatch on lines 191 and 192. You'll likely encounter an error using horzcat at line 199 if the 'exact' argument is not added due to possible comparison of a vector and a scalar, e.g., begindx will find channel A2* when only A2 is needed. > > begindx = strmatch(beglabel{i}, lay.label,'exact'); > endindx = strmatch(endlabel{i}, lay.label,'exact'); > > Thanks! > > karl > > > > On Jan 23, 2012, at 11:52 PM, jan-mathijs schoffelen wrote: > >> Hi Karl, >> >> The subplots represent the magnitude of the connectivity metric (which are typically unit-less) as a function of frequency. >> >> Best, >> >> Jan-Mathijs >> >> On Jan 24, 2012, at 1:19 AM, Karl Doron wrote: >> >>> Hello, >>> >>> Just to clarify my first question below. In the context of the tutorial on the fieldtrip website, what do the axes in this figure represent? >>> >>> Thanks, >>> karl doron >>> UC, Santa Barbara >>> >>>> Hello, >>>> >>>> I'm trying to use some of the plot tools for results from ft_connectivityanalysis. Can anyone tell me what the horizontal and vertical axes represent in ft_connectivityplot? The values differ on each plot in the matrix and don't seem to correspond to the data. Also, in ft_topoplotCC, is it possible to weight the line font based on the magnitude of the coherence value? >>>> >>>> %% step 1 | freq analysis >>>> >>>> cfg = []; >>>> cfg.channel = {'A224', 'A188', 'A189', 'A163', 'A184','A162'}; >>>> cfg.method = 'mtmfft'; >>>> cfg.output = 'fourier'; >>>> cfg.foilim = [8 12]; >>>> cfg.toi = 2.35:0.01:2.65; >>>> cfg.keeptrials = 'yes'; >>>> cfg.keeptapers = 'yes'; >>>> cfg.tapsmofrq = 2; >>>> cfg.taper = 'dpss'; >>>> >>>> freq_alpha = ft_freqanalysis(cfg, data_spctrm); >>>> >>>> >>>> %% step 2 | connectivity analysis >>>> >>>> cfg = []; >>>> cfg.method = 'coh'; >>>> >>>> coh = ft_connectivityanalysis(cfg, freq_alpha); >>>> >>>> >>>> >>>> Thanks for any feedback, >>>> karl doron >>>> UC, Santa Barbara >>>> >>>> >>>> >>>> >>>> >>> >>> _______________________________________________ >>> 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 >> >> _______________________________________________ >> 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 -------------- next part -------------- An HTML attachment was scrubbed... URL: From caspervanheck at gmail.com Wed Jan 25 10:09:43 2012 From: caspervanheck at gmail.com (Casper van Heck) Date: Wed, 25 Jan 2012 10:09:43 +0100 Subject: [FieldTrip] Missing resolution Information in *vhdr causes ft_preprocessing to return only NaNs In-Reply-To: References: Message-ID: Julian, It is my understanding that the header file doesn't change at all, since Brainvision Analyzer stores all changes either in the 'history' files or temporary files in the history folder. The *.vhdr and *.eeg (and marker files, if any) should be unchanged after preprocessing. Therefore, resolution information should still be there. Could you check the contents of the header file with notepad? It should say something like this for every channel under "[Channel Infos]": Ch27=Fz,,0.0715,µV Also, you could try to open it with Brainvision Analyzer, and see if that gives an error of sorts. Sincerely, Casper van Heck On Tue, Jan 24, 2012 at 11:54 PM, Karch, Julian wrote: > Hi,**** > > ** ** > > I'm working on a brainvision EEG dataset which was preprocessed by > someone else using Brainvision Analyzer. One part of his preprocessing was > to set a new reference. This processing step makes the resolution > information in the *vhdr file disappear. Because of that > hdr.orig.resolution=NaN for all channels. As result of that the lines**** > > calib = diag(hdr.resolution(chanindx));**** > > % using a sparse multiplication speeds it up**** > > dat = full(sparse(calib) * dat);**** > > in read_brainvision_eeg produce only NaN. This again results in trials > which only contain NaNs.**** > > ** ** > > I do weekly updates of fieldtrip using svn. Because I'm quite sure if was > able to read in, using ft_preprocssing, the excact same dataset, even with > the same cfg file, earlier this year I checked the modifications for the > last half year or so but I couldn't find any change which could have broken > it.**** > > My two questions are. How would you handle this problem? Just plug in some > random numbers like 0.1 ? Is this an issue with fieldtrip or am I doing > something wrong? Were there any changes to the involved functions which > could have changed the behavior in that way?**** > > ** ** > > Thanks in advance!**** > > ** ** > > Best,**** > > ** ** > > Julian**** > > ** ** > > Julian Karch **** > > Research Assistant**** > > ** ** > > Center for Lifespan Psychology**** > > MPI for Human Development**** > > Lentzeallee 94, 14195 Berlin, Germany**** > > phone: +49-30-82406-296**** > > fax: +49-30-8249939**** > > web: http://www.mpib-berlin.mpg.de**** > > ** ** > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > -------------- next part -------------- An HTML attachment was scrubbed... URL: From karch at mpib-berlin.mpg.de Wed Jan 25 13:49:24 2012 From: karch at mpib-berlin.mpg.de (Karch, Julian) Date: Wed, 25 Jan 2012 12:49:24 +0000 Subject: [FieldTrip] Missing resolution Information in *vhdr causes ft_preprocessing to return only NaNs In-Reply-To: References: Message-ID: Hi, thanks for your answer. It seems that I was a little imprecise. Of course the original data set doesn't change but if I export the a data set after setting a new reference in Brainvision Analyzer the header looks like that: Original header real.vhdr =============================== Brain Vision Data Exchange Header File Version 1.0 ; Data created by the Vision Recorder [...] Ch4=Fz,,0.1,µV realnewRef.vhdr =============================== Brain Vision Data Exchange Header File Version 1.0 ; Data created from history path: real/Raw Data/New Reference [...] Ch4=Fz,Avg,,µV This was just a test I did with some random data. I don't have acess to the orginal recording for the data sets I want to read in. The header from them look like Brain Vision Data Exchange Header File Version 1.0 ; Data created from history path: passive3101/Raw Data/Filters/New Reference/Attentive [...] Ch12=Fz,ref new,, Like I said what's really strange that I think I was able to preprocess the exact same data set a couple of month ago. Thanks for your help! Best, Julian Von: fieldtrip-bounces at donders.ru.nl [mailto:fieldtrip-bounces at donders.ru.nl] Im Auftrag von Casper van Heck Gesendet: Wednesday, January 25, 2012 10:10 AM An: Email discussion list for the FieldTrip project Betreff: Re: [FieldTrip] Missing resolution Information in *vhdr causes ft_preprocessing to return only NaNs Julian, It is my understanding that the header file doesn't change at all, since Brainvision Analyzer stores all changes either in the 'history' files or temporary files in the history folder. The *.vhdr and *.eeg (and marker files, if any) should be unchanged after preprocessing. Therefore, resolution information should still be there. Could you check the contents of the header file with notepad? It should say something like this for every channel under "[Channel Infos]": Ch27=Fz,,0.0715,µV Also, you could try to open it with Brainvision Analyzer, and see if that gives an error of sorts. Sincerely, Casper van Heck On Tue, Jan 24, 2012 at 11:54 PM, Karch, Julian > wrote: Hi, I'm working on a brainvision EEG dataset which was preprocessed by someone else using Brainvision Analyzer. One part of his preprocessing was to set a new reference. This processing step makes the resolution information in the *vhdr file disappear. Because of that hdr.orig.resolution=NaN for all channels. As result of that the lines calib = diag(hdr.resolution(chanindx)); % using a sparse multiplication speeds it up dat = full(sparse(calib) * dat); in read_brainvision_eeg produce only NaN. This again results in trials which only contain NaNs. I do weekly updates of fieldtrip using svn. Because I'm quite sure if was able to read in, using ft_preprocssing, the excact same dataset, even with the same cfg file, earlier this year I checked the modifications for the last half year or so but I couldn't find any change which could have broken it. My two questions are. How would you handle this problem? Just plug in some random numbers like 0.1 ? Is this an issue with fieldtrip or am I doing something wrong? Were there any changes to the involved functions which could have changed the behavior in that way? Thanks in advance! Best, Julian Julian Karch Research Assistant Center for Lifespan Psychology MPI for Human Development Lentzeallee 94, 14195 Berlin, Germany phone: +49-30-82406-296 fax: +49-30-8249939 web: http://www.mpib-berlin.mpg.de _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -------------- next part -------------- An HTML attachment was scrubbed... URL: From caspervanheck at gmail.com Wed Jan 25 14:47:26 2012 From: caspervanheck at gmail.com (Casper van Heck) Date: Wed, 25 Jan 2012 14:47:26 +0100 Subject: [FieldTrip] Missing resolution Information in *vhdr causes ft_preprocessing to return only NaNs In-Reply-To: References: Message-ID: Julian, Brainvision Analyzer is somewhat finicky, but I've never seen it do this, and I don't seem to be able to reproduce the problem here. If you can get access to the original datasets, then rereferencing in Fieldtrip might be a solution. And if you can't get the original datasets, then you could try editing the header files to include the resolution. I don't think the resolution should change after rereferencing, so you could simply put the resolution in there. Alternatively, specifying the resolution in hdr.orig.resolution should be possible, perhaps with some editing. Also, since Fieldtrip could open the files earlier, it would stand to reason that it either 'makes up' some values, doesn't need them (which would be odd), or somehow deduces them from other values. However, in my *.vhdr files it specifies the resolution twice, once below [Channel Infos] and once under [Channels], but nothing I can find that defines it any other way. So, I'm guessing Fieldtrip used to make them up, but doesn't anymore. So, placing a resolution in the files or specifying it in Fieldtrip should not be a problem. Ideally, you would want the original resolution, but if that's not known, you could try winging it with a value that seems 'close enough'. Hope this helps, Casper van Heck On Wed, Jan 25, 2012 at 1:49 PM, Karch, Julian wrote: > Hi,**** > > ** ** > > thanks for your answer. It seems that I was a little imprecise. Of course > the original data set doesn't change but if I export the a data set after > setting a new reference in Brainvision Analyzer the header looks like that: > **** > > ** ** > > Original header real.vhdr**** > > ===============================**** > > Brain Vision Data Exchange Header File Version 1.0**** > > ; Data created by the Vision Recorder**** > > [...]**** > > Ch4=Fz,,0.1,µV**** > > ** ** > > realnewRef.vhdr**** > > ===============================**** > > Brain Vision Data Exchange Header File Version 1.0**** > > ; Data created from history path: real/Raw Data/New Reference**** > > [...]**** > > Ch4=Fz,Avg,,µV**** > > ** ** > > This was just a test I did with some random data. I don't have acess to > the orginal recording for the data sets I want to read in. The header from > them look like**** > > Brain Vision Data Exchange Header File Version 1.0**** > > ; Data created from history path: passive3101/Raw Data/Filters/New > Reference/Attentive**** > > [...]**** > > Ch12=Fz,ref new,,**** > > ** ** > > Like I said what's really strange that I think I was able to preprocess > the exact same data set a couple of month ago.**** > > ** ** > > Thanks for your help!**** > > ** ** > > Best,**** > > ** ** > > Julian**** > > ** ** > > ** ** > > ** ** > > ** ** > > *Von:* fieldtrip-bounces at donders.ru.nl [mailto: > fieldtrip-bounces at donders.ru.nl] *Im Auftrag von *Casper van Heck > *Gesendet:* Wednesday, January 25, 2012 10:10 AM > *An:* Email discussion list for the FieldTrip project > *Betreff:* Re: [FieldTrip] Missing resolution Information in *vhdr causes > ft_preprocessing to return only NaNs**** > > ** ** > > Julian,**** > > ** ** > > It is my understanding that the header file doesn't change at all, since > Brainvision Analyzer stores all changes either in the 'history' files or > temporary files in the history folder. The *.vhdr and *.eeg (and marker > files, if any) should be unchanged after preprocessing. Therefore, > resolution information should still be there.**** > > ** ** > > Could you check the contents of the header file with notepad?**** > > It should say something like this for every channel under "[Channel > Infos]":**** > > Ch27=Fz,,0.0715,µV**** > > ** ** > > Also, you could try to open it with Brainvision Analyzer, and see if that > gives an error of sorts.**** > > ** ** > > Sincerely,**** > > ** ** > > Casper van Heck**** > > ** ** > > On Tue, Jan 24, 2012 at 11:54 PM, Karch, Julian > wrote:**** > > Hi,**** > > **** > > I'm working on a brainvision EEG dataset which was preprocessed by > someone else using Brainvision Analyzer. One part of his preprocessing was > to set a new reference. This processing step makes the resolution > information in the *vhdr file disappear. Because of that > hdr.orig.resolution=NaN for all channels. As result of that the lines**** > > calib = diag(hdr.resolution(chanindx));**** > > % using a sparse multiplication speeds it up**** > > dat = full(sparse(calib) * dat);**** > > in read_brainvision_eeg produce only NaN. This again results in trials > which only contain NaNs.**** > > **** > > I do weekly updates of fieldtrip using svn. Because I'm quite sure if was > able to read in, using ft_preprocssing, the excact same dataset, even with > the same cfg file, earlier this year I checked the modifications for the > last half year or so but I couldn't find any change which could have broken > it.**** > > My two questions are. How would you handle this problem? Just plug in some > random numbers like 0.1 ? Is this an issue with fieldtrip or am I doing > something wrong? Were there any changes to the involved functions which > could have changed the behavior in that way?**** > > **** > > Thanks in advance!**** > > **** > > Best,**** > > **** > > Julian**** > > **** > > Julian Karch **** > > Research Assistant**** > > **** > > Center for Lifespan Psychology**** > > MPI for Human Development**** > > Lentzeallee 94, 14195 Berlin, Germany**** > > phone: +49-30-82406-296**** > > fax: +49-30-8249939**** > > web: http://www.mpib-berlin.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 > -------------- next part -------------- An HTML attachment was scrubbed... URL: From karch at mpib-berlin.mpg.de Wed Jan 25 17:30:11 2012 From: karch at mpib-berlin.mpg.de (Karch, Julian) Date: Wed, 25 Jan 2012 16:30:11 +0000 Subject: [FieldTrip] Missing resolution Information in *vhdr causes ft_preprocessing to return only NaNs In-Reply-To: References: Message-ID: Hi, it seems like I solved the problem. If you export your data to the ieee floating point format the resolution entry vanishes. I assume that it is just don't needed anymore as the entries are in micro volt then. This was taken into account by the read_brainvision_eeg function until 12/08/2011. On This day a couple of changes were committed. Leading to the fact that ieee_float_32 data is also multiplied with the resolution ================================================================================================== if strcmpi(hdr.DataFormat, 'binary') && strcmpi(hdr.DataOrientation, 'multiplexed') && any(strcmpi(hdr.BinaryFormat, {'int_16', 'int_32', 'ieee_float_32'})) [...] calib = diag(hdr.resolution); % using a sparse multiplication speeds it up dat = full(sparse(calib) * dat); ============================================================= The pre 12/08/2011 version looks like that ============================================================ elseif strcmpi(hdr.DataFormat, 'binary') && strcmpi(hdr.DataOrientation, 'multiplexed') && strcmpi(hdr.BinaryFormat, 'ieee_float_32') fid = fopen(filename, 'rb', 'ieee-le'); fseek(fid, hdr.NumberOfChannels*4*(begsample-1), 'cof'); [dat, siz] = fread(fid, [hdr.NumberOfChannels, (endsample-begsample+1)], 'float32'); fclose(fid); ========================================================== So ieee data was not multiplied by the resolution. Which is probably the correct behavior. I changed the function such that it doesn't multiply the ieee data with the resolution and it seems work. You can look at it here: http://matlab.nopaste.dk/p4635. The changes are just the if statements in line 67and 81. It would be great if you could incorporate a similar change to the read_brainvision_eeg function. Best, Julian Karch Von: fieldtrip-bounces at donders.ru.nl [mailto:fieldtrip-bounces at donders.ru.nl] Im Auftrag von Casper van Heck Gesendet: Wednesday, January 25, 2012 2:47 PM An: Email discussion list for the FieldTrip project Betreff: Re: [FieldTrip] Missing resolution Information in *vhdr causes ft_preprocessing to return only NaNs Julian, Brainvision Analyzer is somewhat finicky, but I've never seen it do this, and I don't seem to be able to reproduce the problem here. If you can get access to the original datasets, then rereferencing in Fieldtrip might be a solution. And if you can't get the original datasets, then you could try editing the header files to include the resolution. I don't think the resolution should change after rereferencing, so you could simply put the resolution in there. Alternatively, specifying the resolution in hdr.orig.resolution should be possible, perhaps with some editing. Also, since Fieldtrip could open the files earlier, it would stand to reason that it either 'makes up' some values, doesn't need them (which would be odd), or somehow deduces them from other values. However, in my *.vhdr files it specifies the resolution twice, once below [Channel Infos] and once under [Channels], but nothing I can find that defines it any other way. So, I'm guessing Fieldtrip used to make them up, but doesn't anymore. So, placing a resolution in the files or specifying it in Fieldtrip should not be a problem. Ideally, you would want the original resolution, but if that's not known, you could try winging it with a value that seems 'close enough'. Hope this helps, Casper van Heck On Wed, Jan 25, 2012 at 1:49 PM, Karch, Julian > wrote: Hi, thanks for your answer. It seems that I was a little imprecise. Of course the original data set doesn't change but if I export the a data set after setting a new reference in Brainvision Analyzer the header looks like that: Original header real.vhdr =============================== Brain Vision Data Exchange Header File Version 1.0 ; Data created by the Vision Recorder [...] Ch4=Fz,,0.1,µV realnewRef.vhdr =============================== Brain Vision Data Exchange Header File Version 1.0 ; Data created from history path: real/Raw Data/New Reference [...] Ch4=Fz,Avg,,µV This was just a test I did with some random data. I don't have acess to the orginal recording for the data sets I want to read in. The header from them look like Brain Vision Data Exchange Header File Version 1.0 ; Data created from history path: passive3101/Raw Data/Filters/New Reference/Attentive [...] Ch12=Fz,ref new,, Like I said what's really strange that I think I was able to preprocess the exact same data set a couple of month ago. Thanks for your help! Best, Julian Von: fieldtrip-bounces at donders.ru.nl [mailto:fieldtrip-bounces at donders.ru.nl] Im Auftrag von Casper van Heck Gesendet: Wednesday, January 25, 2012 10:10 AM An: Email discussion list for the FieldTrip project Betreff: Re: [FieldTrip] Missing resolution Information in *vhdr causes ft_preprocessing to return only NaNs Julian, It is my understanding that the header file doesn't change at all, since Brainvision Analyzer stores all changes either in the 'history' files or temporary files in the history folder. The *.vhdr and *.eeg (and marker files, if any) should be unchanged after preprocessing. Therefore, resolution information should still be there. Could you check the contents of the header file with notepad? It should say something like this for every channel under "[Channel Infos]": Ch27=Fz,,0.0715,µV Also, you could try to open it with Brainvision Analyzer, and see if that gives an error of sorts. Sincerely, Casper van Heck On Tue, Jan 24, 2012 at 11:54 PM, Karch, Julian > wrote: Hi, I'm working on a brainvision EEG dataset which was preprocessed by someone else using Brainvision Analyzer. One part of his preprocessing was to set a new reference. This processing step makes the resolution information in the *vhdr file disappear. Because of that hdr.orig.resolution=NaN for all channels. As result of that the lines calib = diag(hdr.resolution(chanindx)); % using a sparse multiplication speeds it up dat = full(sparse(calib) * dat); in read_brainvision_eeg produce only NaN. This again results in trials which only contain NaNs. I do weekly updates of fieldtrip using svn. Because I'm quite sure if was able to read in, using ft_preprocssing, the excact same dataset, even with the same cfg file, earlier this year I checked the modifications for the last half year or so but I couldn't find any change which could have broken it. My two questions are. How would you handle this problem? Just plug in some random numbers like 0.1 ? Is this an issue with fieldtrip or am I doing something wrong? Were there any changes to the involved functions which could have changed the behavior in that way? Thanks in advance! Best, Julian Julian Karch Research Assistant Center for Lifespan Psychology MPI for Human Development Lentzeallee 94, 14195 Berlin, Germany phone: +49-30-82406-296 fax: +49-30-8249939 web: http://www.mpib-berlin.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 -------------- next part -------------- An HTML attachment was scrubbed... URL: From lavado at gmail.com Thu Jan 26 13:39:41 2012 From: lavado at gmail.com (Ion Lavado) Date: Thu, 26 Jan 2012 13:39:41 +0100 Subject: [FieldTrip] Source reconstruction with MNE problem: vol doen's fit sourcespace In-Reply-To: <2143371294.742821.1326965027489.JavaMail.root@sculptor.zimbra.ru.nl> References: <437783613.742730.1326964902431.JavaMail.root@sculptor.zimbra.ru.nl> <2143371294.742821.1326965027489.JavaMail.root@sculptor.zimbra.ru.nl> Message-ID: Thank you for your help. I realigned it to Tailarach prior to freesurfer processing. Any idea? Ion 2012/1/19 Stolk, A. > Hi Ion, > > > > Did you realign your anatomical image to Talairach space (and > not accidentally to MNI space) prior to the processing with Freesurfer? > > > > http://imaging.mrc-cbu.cam.ac.uk/imaging/FindingCommissures > > > > Best regards, > > Arjen > > > > > ----- "Ion Lavado" schreef: > > Van: "Ion Lavado" > > Aan: fieldtrip at donders.ru.nl > > Verzonden: Donderdag 19 januari 2012 09:25:16 > > Onderwerp: [FieldTrip] Source reconstruction with MNE problem: vol > doen's fit sourcespace > > > > > Hello, i'm trying a source reconstruction of event related fields using > minimun-norm estimates and i get a problem with vol and sourcespace. When > plot them together the vol doesn't fit the sourcespace. I adjunted in the > mail two images where you can see what i get. It looks like that there > isn't any problem of coordinate system also the units seem to be ok. I also > procesed all the file with freesurfer so i suppose there is no problem with > the orig-nomask.mgz. > > Hope anyone can help me. Thank you very much. > > > > Ion > > > _______________________________________________ > > 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 jpnv2006 at gmail.com Thu Jan 26 13:46:06 2012 From: jpnv2006 at gmail.com (Juan Pablo Neira) Date: Thu, 26 Jan 2012 13:46:06 +0100 Subject: [FieldTrip] EEG Source Reconstruction using mne Message-ID: Hello, I have been working with fieldtrip the last two weeks to do source reconstruction using Minimun Norm Estimation (mne). Now I am analyzing real data (EEG) with individual MRI, it seems I am not having the right solution. So maybe someone can help me with the next questions: 1. How do I define the source space? I would like to have my sources in the whole brain or only in gray matter. When I calculated the source reconstruction (mne method) I had sources outside of the brain. 2. What are the possibilities to calculate or estimate the regularization parameter lambda in the Minimum Norm Estimation (mne) Method? Reading in some mne tutorials, they calculate the noise covariance matrix of the data using ft_timelockanalysis function, and then the ft_sourceanalysis uses this matrix to calculate labda for the mne method. Are there other possibilities? 3. We want to implement Fieldtrip to do the Preprocessing, forward and inverse (mne) calculations. But we have not found exact or close information of the complete task. These are the steps we are performing: - Read the EEG signals - Reject undesired channels - Referencing - Time domain analysis (ft_timelockanalysis) - Read, realign and segment individual MRI - Volume creation: we create the scalp, skull and brain meshes and then use ft_headmodel_bem_openmeeg - EEG sensor positions alignment with the scalp mesh of the volume. - Calculate the leadfield matrix - Finally the Source Analysis (method mne) Are we missing an important step? Best regards, Juan Pablo Neira Vesga University - Clinic Kiel, Germany From a.stolk at fcdonders.ru.nl Thu Jan 26 14:39:24 2012 From: a.stolk at fcdonders.ru.nl (Stolk, A.) Date: Thu, 26 Jan 2012 14:39:24 +0100 (CET) Subject: [FieldTrip] Source reconstruction with MNE problem: vol doen's fit sourcespace In-Reply-To: <804023878.857066.1327584774361.JavaMail.root@sculptor.zimbra.ru.nl> Message-ID: <1886031496.857328.1327585164114.JavaMail.root@sculptor.zimbra.ru.nl> Hi Ion, Could you specify some more details so we can reproduce your bug. Preferably by including a small test script with the same operations applied to the testdata (as in the tutorial) . Best regards, Arjen ----- "Ion Lavado" schreef: > Van: "Ion Lavado" > Aan: "Email discussion list for the FieldTrip project" > Verzonden: Donderdag 26 januari 2012 13:39:41 > Onderwerp: Re: [FieldTrip] Source reconstruction with MNE problem: vol doen's fit sourcespace > > Thank you for your help. I realigned it to Tailarach prior to freesurfer processing. Any idea? > Ion  > > 2012/1/19 Stolk, A. < a.stolk at fcdonders.ru.nl > > > Hi Ion, Did you realign your anatomical image to Talairach space (and not accidentally to MNI space) prior to the processing with Freesurfer? http://imaging.mrc-cbu.cam.ac.uk/imaging/FindingCommissures Best regards, Arjen > ----- "Ion Lavado" < lavado at gmail.com > schreef: > > Van: "Ion Lavado" < lavado at gmail.com > > > Aan: fieldtrip at donders.ru.nl > > Verzonden: Donderdag 19 januari 2012 09:25:16 > > Onderwerp: [FieldTrip] Source reconstruction with MNE problem: vol doen's fit        sourcespace > > > > > Hello, i'm trying a source reconstruction of event related fields using minimun-norm estimates and i get a problem with vol and sourcespace. When plot them together the vol doesn't fit the sourcespace. I adjunted in the mail two images where you can see what i get. It looks like that there isn't any problem of coordinate system also the units seem to be ok. I also procesed all the file with freesurfer so i suppose there is no problem with the orig-nomask.mgz. > Hope anyone can help me. Thank you very much. > > Ion > > _______________________________________________ > > 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 david.m.groppe at gmail.com Thu Jan 26 20:12:34 2012 From: david.m.groppe at gmail.com (David Groppe) Date: Thu, 26 Jan 2012 14:12:34 -0500 Subject: [FieldTrip] MD, DO, or MD/PhD fellowship in epilepsy, brain connectomics, and cognitive neuroscience (revised) Message-ID: Hi All, I apologize for the re-post, but we misstated some of the requirements for the MD, DO, or MD/PhD fellowship in the ad I previously posted. See below for the corrected requirements. much thanks, -David A research fellowship is available for work on epilepsy, brain connectomics and cognitive neuroscience with the Comprehensive Epilepsy Center at the Hofstra North Shore LIJ School of Medicine, in Manhasset, NY.  This unique fellowship will fund an MD, DO, or MD/PhD to serve as a research fellow under the mentorship of a team of experienced physicians and scientists and to engage in research using neuroimaging and electrophysiology to improve the diagnosis and treatment of epilepsy and to further the basic science functional brain mapping. Ongoing research projects include: (1) Validation of task-based and resting state fMRI and DTI measures of brain connectivity using electrical stimulation mapping and ECoG (2) Identifying areas of seizure onset and spread using network analysis of fMRI and ECoG dynamics (3) Investigation of the neuronal dynamics underlying selective attention, language comprehension, visual object identification and auditory stream analysis. For a more detailed description about the lab and representative publications see: http://www.feinsteininstitute.org/Feinstein/Laboratory+for+Multimodal+Human+Brain+Mapping Candidates should meet the following qualifications: 1) M.D., D.O., or an M.D./Ph.D. degree, 2) A United States citizen, national, or permanent resident 3) Have graduated from or be currently enrolled in a residency training program or fellowship. 4) Have some background in fMRI, electrophysiology, and/or data analysis using one or more of the following software packages: Matlab, FreeSurfer, FSL, AFNI This is a great opportunity for a physician-scientist to develop both as a clinician and researcher. An ideal candidate would be a neurologist, neurosurgeon or neuroradiologist with an interest in epilepsy, functional neurosurgery or functional brain mapping. This fellowship is part of the New York State ECRIP program, which offers a competitive salary and an opportunity to supplement income with clinical work Please submit CV and short statement of interest to Dr. Ashesh Mehta at amehta at nshs.edu for more information. -- David Groppe, Ph.D. Postdoctoral Researcher North Shore LIJ Health System New Hyde Park, New York http://www.cogsci.ucsd.edu/~dgroppe/ From lavado at gmail.com Fri Jan 27 09:33:10 2012 From: lavado at gmail.com (Ion Lavado) Date: Fri, 27 Jan 2012 09:33:10 +0100 Subject: [FieldTrip] Source reconstruction with MNE problem: vol doen's fit sourcespace In-Reply-To: <1886031496.857328.1327585164114.JavaMail.root@sculptor.zimbra.ru.nl> References: <804023878.857066.1327584774361.JavaMail.root@sculptor.zimbra.ru.nl> <1886031496.857328.1327585164114.JavaMail.root@sculptor.zimbra.ru.nl> Message-ID: Ok, thank you for your time Arjen. This is what i've done: *%READ AND REALINGN* mri = ft_read_mri('C:\Users\ilavado\Desktop\31_CW1AFMRI_ESG_ENDIKA_SANCHEZ_GOMEZ\1_028_t1_mpr_tra_p2_iso_20110314\31_CW1AFMRI_ESG_ENDIKA_SANCHEZ_GOMEZ_20110314_001_028_t1_mpr_tra_p2_iso.img'); cfg = []; cfg.interactive = 'yes'; cfg.coordsys = 'neuromag'; mri_other = ft_volumerealign(cfg,mri); *%RESLICING* cfg = []; cfg.resolution=1; cfg.dim=[256 256 256]; mrirs = ft_volumereslice(cfg, mri_other); save mrirs; *%SEGMENTATION* load mrirs; cfg = []; cfg.coordsys = 'neuromag'; cfg.output={'skullstrip' 'brain'}; seg = ft_volumesegment(cfg, mrirs) save seg seg; *%REALING TO TALAIRACH* load mrirs; cfg=[]; cfg.method='interactive'; cfg.coordsys = 'neuromag'; mri_tal=ft_volumerealign(cfg,mrirs); *%mrirs o mri_other???* save mri_tal mri_tal seg.transform = mri_tal.transform; cfg = []; cfg.filename = 'Subject29_mri_freesurfer2'; cfg.filetype = 'mgz'; cfg.parameter = 'anatomy'; ft_volumewrite(cfg, mri_tal); cfg.filename = 'Subject29masked2'; ft_volumewrite(cfg, seg); THE I CREATE ALL THE FILES (WITH THE TUTORIAL COMMANDS) WITH FREESURFER with "Subject29masked2.mgz" and "Subject29_mri_freesurfer2.mgz" AND HERE IN THE SOURCE MODEL IS WHERE I GET THE PROBLEM. *%CREATE THE MESH* bnd = ft_read_headshape('29_mri-oct-6-src.fif', 'format', 'mne_source'); figure;ft_plot_mesh(bnd); *%CO-REGISTRATION* mri_norm = ft_read_mri('/home/mlizarazu/public/Exchange/Mikel/Subject29/mri/orig-nomask.mgz'); cfg = []; cfg.method = 'interactive'; mri_norm_ctf = ft_volumerealign(cfg, mri_norm); mri_norm_ctf = ft_convert_units(mri_norm_ctf, 'cm'); T = mri_norm_ctf.transform*inv(mri_norm_ctf.transformorig); bnd = ft_read_headshape('29_mri-oct-6-src.fif', 'format', 'mne_source'); sourcespace = ft_convert_units(bnd, 'cm'); sourcespace = ft_transform_geometry(T, sourcespace); *%VOLUME MODEL* cfg = []; cfg.coordsys = 'spm'; cfg.output = {'brain'}; seg = ft_volumesegment(cfg, mri_norm); cfg = []; vol = ft_prepare_singleshell(cfg,seg); vol.bnd = ft_transform_geometry(T, vol.bnd); *%PLOT* figure;hold on; ft_plot_vol(vol, 'facecolor', 'none');alpha 0.5; ft_plot_mesh(sourcespace_ctf, 'edgecolor', 'none'); camlight When plotting i have the problem that you see in the photos... Hope we can solve this. Thank you. Best whises Ion 2012/1/26 Stolk, A. > Hi Ion, > > > > Could you specify some more details so we can reproduce your bug. > Preferably by including a small test script with the same operations > applied to the testdata (as in the tutorial). > > > > Best regards, > > Arjen > > > ----- "Ion Lavado" schreef: > > Van: "Ion Lavado" > > Aan: "Email discussion list for the FieldTrip project" < > fieldtrip at donders.ru.nl> > > Verzonden: Donderdag 26 januari 2012 13:39:41 > > Onderwerp: Re: [FieldTrip] Source reconstruction with MNE problem: vol > doen's fit sourcespace > > > > > Thank you for your help. I realigned it to Tailarach prior to freesurfer > processing. Any idea? > > > > > Ion > > > > 2012/1/19 Stolk, A. > > >> >> > >> >> Hi Ion, >> >> >> >> Did you realign your anatomical image to Talairach space (and >> not accidentally to MNI space) prior to the processing with Freesurfer? >> >> >> >> http://imaging.mrc-cbu.cam.ac.uk/imaging/FindingCommissures >> >> >> >> Best regards, >> >> Arjen >> >> >> >> >> > ----- "Ion Lavado" schreef: >> > > Van: "Ion Lavado" >> > > Aan: fieldtrip at donders.ru.nl >> > > Verzonden: Donderdag 19 januari 2012 09:25:16 >> > > Onderwerp: [FieldTrip] Source reconstruction with MNE problem: vol >> doen's fit sourcespace >> > >> > > >> > > Hello, i'm trying a source reconstruction of event related fields >> using minimun-norm estimates and i get a problem with vol and sourcespace. >> When plot them together the vol doesn't fit the sourcespace. I adjunted in >> the mail two images where you can see what i get. It looks like that there >> isn't any problem of coordinate system also the units seem to be ok. I also >> procesed all the file with freesurfer so i suppose there is no problem with >> the orig-nomask.mgz. >> >> > >> Hope anyone can help me. Thank you very much. >> >> > > >> Ion >> >> > >> > _______________________________________________ >> > > fieldtrip mailing list >> > > fieldtrip at donders.ru.nl >> > > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip >> >> > _______________________________________________ >> > fieldtrip mailing list >> > fieldtrip at donders.ru.nl >> > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip >> > > > > > > > > _______________________________________________ > > fieldtrip mailing list > > fieldtrip at donders.ru.nl > > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > -------------- next part -------------- An HTML attachment was scrubbed... URL: From lavado at gmail.com Fri Jan 27 10:05:35 2012 From: lavado at gmail.com (Ion Lavado) Date: Fri, 27 Jan 2012 10:05:35 +0100 Subject: [FieldTrip] Source reconstruction with MNE problem: vol doen's fit sourcespace In-Reply-To: References: <804023878.857066.1327584774361.JavaMail.root@sculptor.zimbra.ru.nl> <1886031496.857328.1327585164114.JavaMail.root@sculptor.zimbra.ru.nl> Message-ID: I think the problem is in the first steps, where i used neuromag coordinates... and i have to work in CTF and then to Talairach... i'll try it againg. 2012/1/27 Ion Lavado > Ok, thank you for your time Arjen. This is what i've done: > > > > > > *%READ AND REALINGN* > mri = > ft_read_mri('C:\Users\ilavado\Desktop\31_CW1AFMRI_ESG_ENDIKA_SANCHEZ_GOMEZ\1_028_t1_mpr_tra_p2_iso_20110314\31_CW1AFMRI_ESG_ENDIKA_SANCHEZ_GOMEZ_20110314_001_028_t1_mpr_tra_p2_iso.img'); > cfg = []; > cfg.interactive = 'yes'; > cfg.coordsys = 'neuromag'; > mri_other = ft_volumerealign(cfg,mri); > > *%RESLICING* > cfg = []; > cfg.resolution=1; > cfg.dim=[256 256 256]; > mrirs = ft_volumereslice(cfg, mri_other); > save mrirs; > > *%SEGMENTATION* > load mrirs; > cfg = []; > cfg.coordsys = 'neuromag'; > cfg.output={'skullstrip' 'brain'}; > seg = ft_volumesegment(cfg, mrirs) > save seg seg; > > *%REALING TO TALAIRACH* > load mrirs; > cfg=[]; > cfg.method='interactive'; > cfg.coordsys = 'neuromag'; > mri_tal=ft_volumerealign(cfg,mrirs); *%mrirs o mri_other???* > save mri_tal mri_tal > > > seg.transform = mri_tal.transform; > cfg = []; > cfg.filename = 'Subject29_mri_freesurfer2'; > cfg.filetype = 'mgz'; > cfg.parameter = 'anatomy'; > ft_volumewrite(cfg, mri_tal); > > cfg.filename = 'Subject29masked2'; > ft_volumewrite(cfg, seg); > > > > THE I CREATE ALL THE FILES (WITH THE TUTORIAL COMMANDS) WITH FREESURFER > with "Subject29masked2.mgz" and "Subject29_mri_freesurfer2.mgz" > AND HERE IN THE SOURCE MODEL IS WHERE I GET THE PROBLEM. > > > *%CREATE THE MESH* > bnd = ft_read_headshape('29_mri-oct-6-src.fif', 'format', 'mne_source'); > figure;ft_plot_mesh(bnd); > > > *%CO-REGISTRATION* > mri_norm = > ft_read_mri('/home/mlizarazu/public/Exchange/Mikel/Subject29/mri/orig-nomask.mgz'); > cfg = []; > cfg.method = 'interactive'; > mri_norm_ctf = ft_volumerealign(cfg, mri_norm); > > > mri_norm_ctf = ft_convert_units(mri_norm_ctf, 'cm'); > T = mri_norm_ctf.transform*inv(mri_norm_ctf.transformorig); > bnd = ft_read_headshape('29_mri-oct-6-src.fif', 'format', 'mne_source'); > sourcespace = ft_convert_units(bnd, 'cm'); > sourcespace = ft_transform_geometry(T, sourcespace); > > > *%VOLUME MODEL* > cfg = []; > cfg.coordsys = 'spm'; > cfg.output = {'brain'}; > seg = ft_volumesegment(cfg, mri_norm); > > cfg = []; > vol = ft_prepare_singleshell(cfg,seg); > vol.bnd = ft_transform_geometry(T, vol.bnd); > > *%PLOT* > figure;hold on; > ft_plot_vol(vol, 'facecolor', 'none');alpha 0.5; > ft_plot_mesh(sourcespace_ctf, 'edgecolor', 'none'); camlight > > > > > When plotting i have the problem that you see in the photos... Hope we can > solve this. > > Thank you. > > > > Best whises > > > Ion > > > > > > > > 2012/1/26 Stolk, A. > > Hi Ion, >> >> >> >> Could you specify some more details so we can reproduce your bug. >> Preferably by including a small test script with the same operations >> applied to the testdata (as in the tutorial). >> >> >> >> Best regards, >> >> Arjen >> >> >> ----- "Ion Lavado" schreef: >> > Van: "Ion Lavado" >> > Aan: "Email discussion list for the FieldTrip project" < >> fieldtrip at donders.ru.nl> >> > Verzonden: Donderdag 26 januari 2012 13:39:41 >> > Onderwerp: Re: [FieldTrip] Source reconstruction with MNE problem: vol >> doen's fit sourcespace >> >> > >> > Thank you for your help. I realigned it to Tailarach prior to >> freesurfer processing. Any idea? >> >> >> > >> Ion >> > >> > 2012/1/19 Stolk, A. >> > >>> >>> > >>> >>> Hi Ion, >>> >>> >>> >>> Did you realign your anatomical image to Talairach space (and >>> not accidentally to MNI space) prior to the processing with Freesurfer? >>> >>> >>> >>> http://imaging.mrc-cbu.cam.ac.uk/imaging/FindingCommissures >>> >>> >>> >>> Best regards, >>> >>> Arjen >>> >>> >>> >>> >>> > ----- "Ion Lavado" schreef: >>> > > Van: "Ion Lavado" >>> > > Aan: fieldtrip at donders.ru.nl >>> > > Verzonden: Donderdag 19 januari 2012 09:25:16 >>> > > Onderwerp: [FieldTrip] Source reconstruction with MNE problem: vol >>> doen's fit sourcespace >>> > >>> > > >>> > > Hello, i'm trying a source reconstruction of event related fields >>> using minimun-norm estimates and i get a problem with vol and sourcespace. >>> When plot them together the vol doesn't fit the sourcespace. I adjunted in >>> the mail two images where you can see what i get. It looks like that there >>> isn't any problem of coordinate system also the units seem to be ok. I also >>> procesed all the file with freesurfer so i suppose there is no problem with >>> the orig-nomask.mgz. >>> >>> > >>> Hope anyone can help me. Thank you very much. >>> >>> > > >>> Ion >>> >>> > >>> > _______________________________________________ >>> > > fieldtrip mailing list >>> > > fieldtrip at donders.ru.nl >>> > > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip >>> >>> > _______________________________________________ >>> > fieldtrip mailing list >>> > fieldtrip at donders.ru.nl >>> > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip >>> > >> >> >> > >> >> > _______________________________________________ >> > fieldtrip mailing list >> > fieldtrip at donders.ru.nl >> > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip >> >> _______________________________________________ >> fieldtrip mailing list >> fieldtrip at donders.ru.nl >> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip >> > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From a.stolk at fcdonders.ru.nl Fri Jan 27 10:10:37 2012 From: a.stolk at fcdonders.ru.nl (Stolk, A.) Date: Fri, 27 Jan 2012 10:10:37 +0100 (CET) Subject: [FieldTrip] Source reconstruction with MNE problem: vol doen's fit sourcespace In-Reply-To: <732434275.867549.1327655396459.JavaMail.root@sculptor.zimbra.ru.nl> Message-ID: <1650950033.867568.1327655437024.JavaMail.root@sculptor.zimbra.ru.nl> Hi Ion, Thanks for providing the details. I cannot test run these commands myself as they point to your private dataset and not the example 'Subject01'. However, scanning through the text , it seems to me you have used  the correct lines of code. Perhaps something may have gone wrong with the interactive volumealignment procedures, 3 times in total. Did you manually press the l, r, and n buttons when selecting the left and right ear, and nasion in the first and third interactive alignment steps? And, in contrast, did you press the a, p, and z buttons when  selecting the anterior and posterior commi su res and an inter hemispheric point (see link in previous mail) in the second alignment step? This is the 'realign to talairach' part of the code. Best regards, Arjen ----- "Ion Lavado" schreef: > Van: "Ion Lavado" > Aan: "Email discussion list for the FieldTrip project" > Verzonden: Vrijdag 27 januari 2012 09:33:10 > Onderwerp: Re: [FieldTrip] Source reconstruction with MNE problem: vol doen's fit sourcespace > > Ok, thank you for your time Arjen. This is what i've done: > %READ AND REALINGN > mri = ft_read_mri('C:\Users\ilavado\Desktop\31_CW1AFMRI_ESG_ENDIKA_SANCHEZ_GOMEZ\1_028_t1_mpr_tra_p2_iso_20110314\31_CW1AFMRI_ESG_ENDIKA_SANCHEZ_GOMEZ_20110314_001_028_t1_mpr_tra_p2_iso.img'); > cfg = []; > cfg.interactive    = 'yes'; > cfg.coordsys    = 'neuromag'; > mri_other           = ft_volumerealign(cfg,mri); > %RESLICING > cfg = []; > cfg.resolution=1; > cfg.dim=[256 256 256]; > mrirs = ft_volumereslice(cfg, mri_other); > save mrirs; > %SEGMENTATION > load mrirs; > cfg = []; > cfg.coordsys    = 'neuromag'; > cfg.output={'skullstrip' 'brain'}; > seg   = ft_volumesegment(cfg, mrirs) > save seg seg; > %REALING TO TALAIRACH > load mrirs; > cfg=[]; > cfg.method='interactive'; > cfg.coordsys    = 'neuromag'; > mri_tal=ft_volumerealign(cfg,mrirs);    %mrirs o mri_other??? > save mri_tal mri_tal > seg.transform = mri_tal.transform; > cfg             = []; > cfg.filename    = 'Subject29_mri_freesurfer2'; > cfg.filetype = 'mgz'; > cfg.parameter   = 'anatomy'; > ft_volumewrite(cfg, mri_tal); > cfg.filename    = 'Subject29masked2'; > ft_volumewrite(cfg, seg); > THE I CREATE ALL THE FILES (WITH THE TUTORIAL COMMANDS) WITH FREESURFER with "Subject29masked2.mgz" and "Subject29_mri_freesurfer2.mgz" > AND HERE IN THE SOURCE MODEL IS WHERE I GET THE PROBLEM. > > %CREATE THE MESH > bnd = ft_read_headshape('29_mri-oct-6-src.fif', 'format', 'mne_source'); figure;ft_plot_mesh(bnd); > %CO-REGISTRATION > mri_norm = ft_read_mri('/home/mlizarazu/public/Exchange/Mikel/Subject29/mri/orig-nomask.mgz'); cfg = []; cfg.method = 'interactive'; mri_norm_ctf = ft_volumerealign(cfg, mri_norm); > > mri_norm_ctf = ft_convert_units(mri_norm_ctf, 'cm'); T   = mri_norm_ctf.transform*inv(mri_norm_ctf.transformorig); bnd  = ft_read_headshape('29_mri-oct-6-src.fif', 'format', 'mne_source'); sourcespace = ft_convert_units(bnd, 'cm'); sourcespace = ft_transform_geometry(T, sourcespace); > %VOLUME MODEL > cfg           = []; > cfg.coordsys    = 'spm'; > cfg.output    = {'brain'}; > seg           = ft_volumesegment(cfg, mri_norm); > cfg = []; > vol = ft_prepare_singleshell(cfg,seg); > vol.bnd = ft_transform_geometry(T, vol.bnd); > %PLOT > figure;hold on; > ft_plot_vol(vol, 'facecolor', 'none');alpha 0.5; > ft_plot_mesh(sourcespace_ctf, 'edgecolor', 'none'); camlight > When plotting i have the problem that you see in the photos... Hope we can solve this. > > Thank you. > Best whises > Ion > > 2012/1/26 Stolk, A. < a.stolk at fcdonders.ru.nl > > > Hi Ion, Could you specify some more details so we can reproduce your bug. Preferably by including a small test script with the same operations applied to the testdata (as in the tutorial). Best regards, Arjen > > ----- "Ion Lavado" < lavado at gmail.com > schreef: > > Van: "Ion Lavado" < lavado at gmail.com > > > Aan: "Email discussion list for the FieldTrip project" < fieldtrip at donders.ru.nl > > > Verzonden: Donderdag 26 januari 2012 13:39:41 > > Onderwerp: Re: [FieldTrip] Source reconstruction with MNE problem: vol doen's fit sourcespace > > > > > Thank you for your help. I realigned it to Tailarach prior to freesurfer processing. Any idea? > > > Ion  > > > > 2012/1/19 Stolk, A. < a.stolk at fcdonders.ru.nl > > > > > Hi Ion, Did you realign your anatomical image to Talairach space (and not accidentally to MNI space) prior to the processing with Freesurfer? http://imaging.mrc-cbu.cam.ac.uk/imaging/FindingCommissures Best regards, Arjen > > ----- "Ion Lavado" < lavado at gmail.com > schreef: > > > Van: "Ion Lavado" < lavado at gmail.com > > > > Aan: fieldtrip at donders.ru.nl > > > Verzonden: Donderdag 19 januari 2012 09:25:16 > > > Onderwerp: [FieldTrip] Source reconstruction with MNE problem: vol doen's fit        sourcespace > > > > > > > Hello, i'm trying a source reconstruction of event related fields using minimun-norm estimates and i get a problem with vol and sourcespace. When plot them together the vol doesn't fit the sourcespace. I adjunted in the mail two images where you can see what i get. It looks like that there isn't any problem of coordinate system also the units seem to be ok. I also procesed all the file with freesurfer so i suppose there is no problem with the orig-nomask.mgz. > Hope anyone can help me. Thank you very much. > > > Ion > > > _______________________________________________ > > > 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 > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -------------- next part -------------- An HTML attachment was scrubbed... URL: From m.cardinale at student.maastrichtuniversity.nl Fri Jan 27 12:32:49 2012 From: m.cardinale at student.maastrichtuniversity.nl (Cardinale, Vita (Stud. FPN / Alumni)) Date: Fri, 27 Jan 2012 12:32:49 +0100 Subject: [FieldTrip] (no subject) Message-ID: Dear all, I just started to use FIELDTRIP with going through the tutorial. Already reading in the data from the tutorial is not working as it should. Here is what I get when doing the trial definition for the fully incongruent (FIC) condition from the tutorial “Trigger-based trial selection, Reading and preprocessing the interesting trials”: cfg = []; cfg.dataset = 'Subject01.ds'; cfg.trialdef.eventtype = 'backpanel trigger'; cfg.trialdef.eventvalue = 3; % the value of the stimulus trigger for fully incongruent (FIC). cfg.trialdef.prestim = 1; % in seconds cfg.trialdef.poststim = 2; % in seconds cfg = ft_definetrial(cfg); I get this warning: no trialfun was specified, using trialfun_general > In ft_definetrial at 123 evaluating trialfunction 'trialfun_general' readCTFds: Data set error : size of meg4 file(s) 0 bytes (from dir command) 179071200 bytes (from res4 file) reading the events from 'Subject01.ds\Subject01.res4' readCTFds: Data set error : size of meg4 file(s) 0 bytes (from dir command) 179071200 bytes (from res4 file) When using hdr = ft_read_header('Subject01.ds') or hdr = ft_read_header('Subject01.ds/Subject01.res4') I get this warning: Warning: adding D:\Vita\fieldtrip-20120124\external\ctf toolbox to your Matlab path readCTFds: Data set error : size of meg4 file(s) 0 bytes (from dir command) 179071200 bytes (from res4 file) together with this output: hdr = Fs: 300 nChans: 187 nSamples: 900 nSamplesPre: 300 nTrials: -1 label: {187x1 cell} grad: [1x1 struct] orig: [1x1 struct] chantype: {187x1 cell} chanunit: {187x1 cell} which according to the tutorial should be: hdr = Fs: 300 % sampling frequency nChans: 187 % number of channels nSamples: 900 % number of samples per trial nSamplesPre: 300 % number of pre-trigger samples in each trial nTrials: 266 % number of trials label: {187x1 cell} % cell-array with labels of each channel grad: [1x1 struct] % gradiometer structure orig: [1x1 struct] % additional header information What could go wrong? -------------- next part -------------- An HTML attachment was scrubbed... URL: From eelke.spaak at donders.ru.nl Fri Jan 27 13:27:28 2012 From: eelke.spaak at donders.ru.nl (Eelke Spaak) Date: Fri, 27 Jan 2012 13:27:28 +0100 Subject: [FieldTrip] (no subject) In-Reply-To: References: Message-ID: Dear Vita, On 27 January 2012 12:32, Cardinale, Vita (Stud. FPN / Alumni) wrote: > I get this warning: > > no trialfun was specified, using trialfun_general >> In ft_definetrial at 123 > evaluating trialfunction 'trialfun_general' This means that ft_definetrial is using trialfun_general as the function to determine the trials-of-interest in your data. This is the default if you do not specify cfg.trialfun yourself, and is the proper setting for running the tutorial. So, nothing to worry about here. > > Warning: adding D:\Vita\fieldtrip-20120124\external\ctf toolbox to your > Matlab path > Also as it should be; FT issues warnings whenever a toolbox is automatically added to your path. > readCTFds: Data set error : size of meg4 file(s) >            0 bytes (from dir command) >    179071200 bytes (from res4 file) > > > together with this output: > > > > hdr = > >              Fs: 300 >          nChans: 187 >        nSamples: 900 >     nSamplesPre: 300 >         nTrials: -1 >           label: {187x1 cell} >            grad: [1x1 struct] >            orig: [1x1 struct] >        chantype: {187x1 cell} >        chanunit: {187x1 cell} > > > > which according to the tutorial should be: > > > > hdr = > > > >              Fs: 300           % sampling frequency > >          nChans: 187           % number of channels > >        nSamples: 900           % number of samples per trial > >     nSamplesPre: 300           % number of pre-trigger samples in each trial > >         nTrials: 266           % number of trials > >           label: {187x1 cell}  % cell-array with labels of each channel > >            grad: [1x1 struct]  % gradiometer structure > >            orig: [1x1 struct]  % additional header information > This actually is indicative of a problem. The extra chantype and chanunit fields are fine, they are just new fields that were not present at the time the tutorial was written. The nTrials = -1 issue, together with the "data set error" message you mentioned, means that something is going wrong when reading in the data. The first thing that comes to mind on what causes this is improper directory settings. Since your e-mail was sent through the Donders SMTP server, I am guessing you are located at the DCCN, am I right? You could try specifying the full path to the test dataset: cfg.dataset = '/home/common/matlab/fieldtrip/data/Subject01.ds'; If that still does not work, let us know. Best, Eelke > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip From eelke.spaak at donders.ru.nl Fri Jan 27 13:51:51 2012 From: eelke.spaak at donders.ru.nl (Eelke Spaak) Date: Fri, 27 Jan 2012 13:51:51 +0100 Subject: [FieldTrip] (no subject) In-Reply-To: <4A2FF861-A393-4E73-A3B2-4B6EC00AA1A7@donders.ru.nl> References: <4A2FF861-A393-4E73-A3B2-4B6EC00AA1A7@donders.ru.nl> Message-ID: A PS from the esteemed Dr. Schoffelen: since you are working on a Windows machine, you should specify (again, this is DCCN-specific): cfg.dataset = 'H:/common/matlab/fieldtrip/data/Subject01.ds'; instead of using /home/... On 27 January 2012 13:39, jan-mathijs schoffelen wrote: > ....ze lijkt op een PC te werken. > > Gr, > > JM > > > On Jan 27, 2012, at 1:27 PM, Eelke Spaak wrote: > > Dear Vita, > > On 27 January 2012 12:32, Cardinale, Vita (Stud. FPN / Alumni) > wrote: > > I get this warning: > > > no trialfun was specified, using trialfun_general > > In ft_definetrial at 123 > > evaluating trialfunction 'trialfun_general' > > > This means that ft_definetrial is using trialfun_general as the > function to determine the trials-of-interest in your data. This is the > default if you do not specify cfg.trialfun yourself, and is the proper > setting for running the tutorial. So, nothing to worry about here. > > > Warning: adding D:\Vita\fieldtrip-20120124\external\ctf toolbox to your > > Matlab path > > > > Also as it should be; FT issues warnings whenever a toolbox is > automatically added to your path. > > readCTFds: Data set error : size of meg4 file(s) > >            0 bytes (from dir command) > >    179071200 bytes (from res4 file) > > > > together with this output: > > > > > hdr = > > >              Fs: 300 > >          nChans: 187 > >        nSamples: 900 > >     nSamplesPre: 300 > >         nTrials: -1 > >           label: {187x1 cell} > >            grad: [1x1 struct] > >            orig: [1x1 struct] > >        chantype: {187x1 cell} > >        chanunit: {187x1 cell} > > > > > which according to the tutorial should be: > > > > > hdr = > > > > >              Fs: 300           % sampling frequency > > >          nChans: 187           % number of channels > > >        nSamples: 900           % number of samples per trial > > >     nSamplesPre: 300           % number of pre-trigger samples in each trial > > >         nTrials: 266           % number of trials > > >           label: {187x1 cell}  % cell-array with labels of each channel > > >            grad: [1x1 struct]  % gradiometer structure > > >            orig: [1x1 struct]  % additional header information > > > > This actually is indicative of a problem. The extra chantype and > chanunit fields are fine, they are just new fields that were not > present at the time the tutorial was written. The nTrials = -1 issue, > together with the "data set error" message you mentioned, means that > something is going wrong when reading in the data. > > The first thing that comes to mind on what causes this is improper > directory settings. Since your e-mail was sent through the Donders > SMTP server, I am guessing you are located at the DCCN, am I right? > You could try specifying the full path to the test dataset: > > cfg.dataset = '/home/common/matlab/fieldtrip/data/Subject01.ds'; > > If that still does not work, let us know. > > Best, > Eelke > > > > _______________________________________________ > > 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 > From stephen.whitmarsh at gmail.com Fri Jan 27 14:45:21 2012 From: stephen.whitmarsh at gmail.com (Stephen Whitmarsh) Date: Fri, 27 Jan 2012 14:45:21 +0100 Subject: [FieldTrip] (no subject) In-Reply-To: References: Message-ID: Ouch, was called away and forgot to press send and now Eelke already answered ;-) Ah, well, just for sake of style, here's my 2 cents, i think its just a repetition of Eelke's anwer, which might be consoling by itself... Dear Vita, First of all, you should not be too alarmed at these specific *warnings*: no trialfun was specified, using trialfun_general > In ft_definetrial at 123 evaluating trialfunction 'trialfun_general' Indeed, you have not specified a trialfunction for now (but you will in the near future). This one: Warning: adding D:\Vita\fieldtrip-20120124\external\ctf toolbox to your Matlab path Is just to make you aware what is happening. If FieldTrip knows it needs extra folders added to the path it will try to do so itself (using the function ft_hastoolbox). This is very convenient since it allows you only to add the fieldtrip root folder and not all the subfolders which in some cases might cause conflicts with other matlab toolboxes. You can use the ft_defaults to add only the bare minumum. Then there is the error, which is a concern: readCTFds: Data set error : size of meg4 file(s) 0 bytes (from dir command) 179071200 bytes (from res4 file) Since you are a newbee, I'll ask the obvious question, don't take it personal ;-). It might have been a problem on this side, but its helps to check: Where on the path are you? type 'pwd' to know. Where is the subject.ds folder? if you type 'dir' it should be there. If not, add a path to the cfg.dataset. Perhaps you are *in* the .ds folder. In that case, get out, one branch back! Cheers, stephen On 27 January 2012 12:32, Cardinale, Vita (Stud. FPN / Alumni) wrote: > Dear all, > > I just started to use FIELDTRIP with going through the tutorial. Already > reading in the data from the tutorial is not working as it should. Here is > what I get when doing the trial definition for the fully incongruent (FIC) > condition from the tutorial > > “Trigger-based trial selection, Reading and preprocessing the interesting > trials”: > > > >  cfg                         = []; > >   cfg.dataset                 = 'Subject01.ds'; > >   cfg.trialdef.eventtype      = 'backpanel trigger'; > >   cfg.trialdef.eventvalue     = 3; % the value of the stimulus trigger for > fully incongruent (FIC). > >   cfg.trialdef.prestim        = 1; % in seconds > >   cfg.trialdef.poststim       = 2; % in seconds > > > >   cfg = ft_definetrial(cfg); > > > > I get this warning: > > > > no trialfun was specified, using trialfun_general >> In ft_definetrial at 123 > evaluating trialfunction 'trialfun_general' > > readCTFds: Data set error : size of meg4 file(s) >            0 bytes (from dir command) >    179071200 bytes (from res4 file) > > reading the events from 'Subject01.ds\Subject01.res4' > > readCTFds: Data set error : size of meg4 file(s) >            0 bytes (from dir command) >    179071200 bytes (from res4 file) > > > > When using hdr = ft_read_header('Subject01.ds') or hdr = > ft_read_header('Subject01.ds/Subject01.res4') > > I get this warning: > > > > Warning: adding D:\Vita\fieldtrip-20120124\external\ctf toolbox to your > Matlab path > > readCTFds: Data set error : size of meg4 file(s) >            0 bytes (from dir command) >    179071200 bytes (from res4 file) > > > together with this output: > > > > hdr = > >              Fs: 300 >          nChans: 187 >        nSamples: 900 >     nSamplesPre: 300 >         nTrials: -1 >           label: {187x1 cell} >            grad: [1x1 struct] >            orig: [1x1 struct] >        chantype: {187x1 cell} >        chanunit: {187x1 cell} > > > > which according to the tutorial should be: > > > > hdr = > > > >              Fs: 300           % sampling frequency > >          nChans: 187           % number of channels > >        nSamples: 900           % number of samples per trial > >     nSamplesPre: 300           % number of pre-trigger samples in each trial > >         nTrials: 266           % number of trials > >           label: {187x1 cell}  % cell-array with labels of each channel > >            grad: [1x1 struct]  % gradiometer structure > >            orig: [1x1 struct]  % additional header information > > > > What could go wrong? > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip From Lilla.Magyari at mpi.nl Fri Jan 27 15:17:34 2012 From: Lilla.Magyari at mpi.nl (Magyari, Lilla) Date: Fri, 27 Jan 2012 15:17:34 +0100 Subject: [FieldTrip] Source reconstruction with MNE problem: vol doen's fit sourcespace In-Reply-To: References: <804023878.857066.1327584774361.JavaMail.root@sculptor.zimbra.ru.nl> <1886031496.857328.1327585164114.JavaMail.root@sculptor.zimbra.ru.nl> Message-ID: <4F22B1FE.8090806@mpi.nl> hi Ion, yes, the tutorial script was written and tested in the following way: you have to align your volume to the ctf coordinate system (doesn't matter what was its original coordinate system), then reslice this re-aligned volume, then segment the resliced volume, then re-align to talairach the resliced volume (that has been re-aligned to ctf before). I hope it will work out. Lilla Ion Lavado wrote: > I think the problem is in the first steps, where i used neuromag > coordinates... and i have to work in CTF and then to Talairach... i'll > try it againg. > > 2012/1/27 Ion Lavado > > > Ok, thank you for your time Arjen. This is what i've done: > > > > > > *%READ AND REALINGN* > mri = > ft_read_mri('C:\Users\ilavado\Desktop\31_CW1AFMRI_ESG_ENDIKA_SANCHEZ_GOMEZ\1_028_t1_mpr_tra_p2_iso_20110314\31_CW1AFMRI_ESG_ENDIKA_SANCHEZ_GOMEZ_20110314_001_028_t1_mpr_tra_p2_iso.img'); > cfg = []; > cfg.interactive = 'yes'; > cfg.coordsys = 'neuromag'; > mri_other = ft_volumerealign(cfg,mri); > > *%RESLICING* > cfg = []; > cfg.resolution=1; > cfg.dim=[256 256 256]; > mrirs = ft_volumereslice(cfg, mri_other); > save mrirs; > > *%SEGMENTATION* > load mrirs; > cfg = []; > cfg.coordsys = 'neuromag'; > cfg.output={'skullstrip' 'brain'}; > seg = ft_volumesegment(cfg, mrirs) > save seg seg; > > *%REALING TO TALAIRACH* > load mrirs; > cfg=[]; > cfg.method='interactive'; > cfg.coordsys = 'neuromag'; > mri_tal=ft_volumerealign(cfg,mrirs); *%mrirs o mri_other???* > save mri_tal mri_tal > > > seg.transform = mri_tal.transform; > cfg = []; > cfg.filename = 'Subject29_mri_freesurfer2'; > cfg.filetype = 'mgz'; > cfg.parameter = 'anatomy'; > ft_volumewrite(cfg, mri_tal); > > cfg.filename = 'Subject29masked2'; > ft_volumewrite(cfg, seg); > > > > THE I CREATE ALL THE FILES (WITH THE TUTORIAL COMMANDS) WITH > FREESURFER with "Subject29masked2.mgz" and > "Subject29_mri_freesurfer2.mgz" > AND HERE IN THE SOURCE MODEL IS WHERE I GET THE PROBLEM. > > > *%CREATE THE MESH* > bnd = ft_read_headshape('29_mri-oct-6-src.fif', 'format', 'mne_source'); > figure;ft_plot_mesh(bnd); > > > *%CO-REGISTRATION* > mri_norm = > ft_read_mri('/home/mlizarazu/public/Exchange/Mikel/Subject29/mri/orig-nomask.mgz'); > cfg = []; > cfg.method = 'interactive'; > mri_norm_ctf = ft_volumerealign(cfg, mri_norm); > > > mri_norm_ctf = ft_convert_units(mri_norm_ctf, 'cm'); > T = mri_norm_ctf.transform*inv(mri_norm_ctf.transformorig); > bnd = ft_read_headshape('29_mri-oct-6-src.fif', 'format', > 'mne_source'); > sourcespace = ft_convert_units(bnd, 'cm'); > sourcespace = ft_transform_geometry(T, sourcespace); > > > *%VOLUME MODEL* > cfg = []; > cfg.coordsys = 'spm'; > cfg.output = {'brain'}; > seg = ft_volumesegment(cfg, mri_norm); > > cfg = []; > vol = ft_prepare_singleshell(cfg,seg); > vol.bnd = ft_transform_geometry(T, vol.bnd); > > *%PLOT* > figure;hold on; > ft_plot_vol(vol, 'facecolor', 'none');alpha 0.5; > ft_plot_mesh(sourcespace_ctf, 'edgecolor', 'none'); camlight > > > > > When plotting i have the problem that you see in the photos... Hope > we can solve this. > > Thank you. > > > > Best whises > > > Ion > > > > > > > > 2012/1/26 Stolk, A. > > > Hi Ion, > > > > Could you specify some more details so we can reproduce your > bug. Preferably by including a small test script with the same > operations applied to the testdata (as in the tutorial). > > > > Best regards, > > Arjen > > > ----- "Ion Lavado" > > schreef: > > Van: "Ion Lavado" > > > Aan: "Email discussion list for the FieldTrip project" > > > > Verzonden: Donderdag 26 januari 2012 13:39:41 > > Onderwerp: Re: [FieldTrip] Source reconstruction with MNE > problem: vol doen's fit sourcespace > > > > > Thank you for your help. I realigned it to Tailarach prior to > freesurfer processing. Any idea? > > > > > Ion > > > > 2012/1/19 Stolk, A. > > > > > > > > Hi Ion, > > > > Did you realign your anatomical image to Talairach space > (and not accidentally to MNI space) prior to the processing > with Freesurfer? > > > > http://imaging.mrc-cbu.cam.ac.uk/imaging/FindingCommissures > > > > Best regards, > > Arjen > > > > > > ----- "Ion Lavado" > schreef: > > > Van: "Ion Lavado" > > > > Aan: fieldtrip at donders.ru.nl > > > > Verzonden: Donderdag 19 januari 2012 09:25:16 > > > Onderwerp: [FieldTrip] Source reconstruction with MNE > problem: vol doen's fit sourcespace > > > > > > > > > Hello, i'm trying a source reconstruction of event > related fields using minimun-norm estimates and i get a > problem with vol and sourcespace. When plot them together > the vol doesn't fit the sourcespace. I adjunted in the mail > two images where you can see what i get. It looks like that > there isn't any problem of coordinate system also the units > seem to be ok. I also procesed all the file with freesurfer > so i suppose there is no problem with the orig-nomask.mgz. > > > > Hope anyone can help me. Thank you very much. > > > > > Ion > > > > > _______________________________________________ > > > 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 > > > > > ------------------------------------------------------------------------ > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -- PhD student Language and Cognition Group research assistant Neurobiology of Language Group Max Planck Institute for Psycholinguistics Nijmegen, P.O. Box 310, 6500AH, the Netherlands Phone: 0031 24 3521561 From m.cardinale at student.maastrichtuniversity.nl Fri Jan 27 15:59:04 2012 From: m.cardinale at student.maastrichtuniversity.nl (Cardinale, Vita (Stud. FPN / Alumni)) Date: Fri, 27 Jan 2012 15:59:04 +0100 Subject: [FieldTrip] (no subject) In-Reply-To: References: , Message-ID: Dear Stephen en Eelke, Thank you for your fast answer! It works now :)! Don't worry, I'll take it only a little personal ;)... Thanks, Vita ________________________________________ Von: fieldtrip-bounces at donders.ru.nl [fieldtrip-bounces at donders.ru.nl] im Auftrag von Stephen Whitmarsh [stephen.whitmarsh at gmail.com] Gesendet: Freitag, 27. Januar 2012 14:45 An: Email discussion list for the FieldTrip project Betreff: Re: [FieldTrip] (no subject) Ouch, was called away and forgot to press send and now Eelke already answered ;-) Ah, well, just for sake of style, here's my 2 cents, i think its just a repetition of Eelke's anwer, which might be consoling by itself... Dear Vita, First of all, you should not be too alarmed at these specific *warnings*: no trialfun was specified, using trialfun_general > In ft_definetrial at 123 evaluating trialfunction 'trialfun_general' Indeed, you have not specified a trialfunction for now (but you will in the near future). This one: Warning: adding D:\Vita\fieldtrip-20120124\external\ctf toolbox to your Matlab path Is just to make you aware what is happening. If FieldTrip knows it needs extra folders added to the path it will try to do so itself (using the function ft_hastoolbox). This is very convenient since it allows you only to add the fieldtrip root folder and not all the subfolders which in some cases might cause conflicts with other matlab toolboxes. You can use the ft_defaults to add only the bare minumum. Then there is the error, which is a concern: readCTFds: Data set error : size of meg4 file(s) 0 bytes (from dir command) 179071200 bytes (from res4 file) Since you are a newbee, I'll ask the obvious question, don't take it personal ;-). It might have been a problem on this side, but its helps to check: Where on the path are you? type 'pwd' to know. Where is the subject.ds folder? if you type 'dir' it should be there. If not, add a path to the cfg.dataset. Perhaps you are *in* the .ds folder. In that case, get out, one branch back! Cheers, stephen On 27 January 2012 12:32, Cardinale, Vita (Stud. FPN / Alumni) wrote: > Dear all, > > I just started to use FIELDTRIP with going through the tutorial. Already > reading in the data from the tutorial is not working as it should. Here is > what I get when doing the trial definition for the fully incongruent (FIC) > condition from the tutorial > > “Trigger-based trial selection, Reading and preprocessing the interesting > trials”: > > > > cfg = []; > > cfg.dataset = 'Subject01.ds'; > > cfg.trialdef.eventtype = 'backpanel trigger'; > > cfg.trialdef.eventvalue = 3; % the value of the stimulus trigger for > fully incongruent (FIC). > > cfg.trialdef.prestim = 1; % in seconds > > cfg.trialdef.poststim = 2; % in seconds > > > > cfg = ft_definetrial(cfg); > > > > I get this warning: > > > > no trialfun was specified, using trialfun_general >> In ft_definetrial at 123 > evaluating trialfunction 'trialfun_general' > > readCTFds: Data set error : size of meg4 file(s) > 0 bytes (from dir command) > 179071200 bytes (from res4 file) > > reading the events from 'Subject01.ds\Subject01.res4' > > readCTFds: Data set error : size of meg4 file(s) > 0 bytes (from dir command) > 179071200 bytes (from res4 file) > > > > When using hdr = ft_read_header('Subject01.ds') or hdr = > ft_read_header('Subject01.ds/Subject01.res4') > > I get this warning: > > > > Warning: adding D:\Vita\fieldtrip-20120124\external\ctf toolbox to your > Matlab path > > readCTFds: Data set error : size of meg4 file(s) > 0 bytes (from dir command) > 179071200 bytes (from res4 file) > > > together with this output: > > > > hdr = > > Fs: 300 > nChans: 187 > nSamples: 900 > nSamplesPre: 300 > nTrials: -1 > label: {187x1 cell} > grad: [1x1 struct] > orig: [1x1 struct] > chantype: {187x1 cell} > chanunit: {187x1 cell} > > > > which according to the tutorial should be: > > > > hdr = > > > > Fs: 300 % sampling frequency > > nChans: 187 % number of channels > > nSamples: 900 % number of samples per trial > > nSamplesPre: 300 % number of pre-trigger samples in each trial > > nTrials: 266 % number of trials > > label: {187x1 cell} % cell-array with labels of each channel > > grad: [1x1 struct] % gradiometer structure > > orig: [1x1 struct] % additional header information > > > > What could go wrong? > > > _______________________________________________ > 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 From Ulrich.Pomper at charite.de Fri Jan 27 16:34:58 2012 From: Ulrich.Pomper at charite.de (Pomper, Ulrich) Date: Fri, 27 Jan 2012 16:34:58 +0100 Subject: [FieldTrip] Defining cfg.neighbourdist at source level Message-ID: <4F22C422.4080906@charite.de> Dear list members, I am trying to perform a cluster based permutation test on power values at source level. I managed to run the test using just the time and frequency dimensions (cfg.neighbourdist = []) but I am struggling with the issue of how to define the neighbourdist parameter. I've looked through the tutorial, the FT site as well as through the mailinglist but couldn't find an answer, so I'd really appreciate any hint on this. Thanks a lot, Ulrich -------------- next part -------------- An HTML attachment was scrubbed... URL: From m_wink10 at uni-muenster.de Fri Jan 27 16:42:09 2012 From: m_wink10 at uni-muenster.de (Martin Winkels) Date: Fri, 27 Jan 2012 16:42:09 +0100 Subject: [FieldTrip] Sourcestatistics - Problem Message-ID: Hello, we are working with the ft_sourcestatistics function and we are facing some problems. We got some very well known data, our subjects just have been stimulated left and right hand. We are calculating right vs left hand data. The calculated GrandAVG-data looks very good, you can see this in the attached files. (GAVG_LEFT and GAVG_RIGHT). We got activity in the left and right brain hemisphere, localized at single spot. Now I wanted to calculate a statistic for this subject and I got some weird results. If you look up the file statplot.jpg you can see that the positive cluster looks quite okay but the negative cluster only looks good in the upper right corner but then it is distributed all over the brain till the lower left corner. Based on the GAVG-results this cant be. I also attached the data itself and a script to show the GAVG data as well as the script to calculate the data. I would be very very pleased if somebody could help me with that issue, I've been working on this for a while now. I have uploaded the data to the recommended filehoster: http://www.sendspace.com/filegroup/sJhI%2F5uBRdJI6JGXUjWtPA There are two files that belong together, you can extract them and there will be a .mat structure, the m-files and three pictures. Thanks, Martin I post the code as an attachment to this email: function calc_stat( ~ ) %%UNTITLED2 Summary of this function goes here % Detailed explanation goes here %path to grandAVG mat-file load ('/media/sonja1/MatlabAnalysis/Martin/SEF/sourcestatistics/GrandAVG/grandAVG.mat'); sourcePost = GA_RIGHT; sourcePre = GA_LEFT; %% % configfile for calculating the statistics cfg = []; cfg.channel = {'MEG'}; cfg.latency = [0 1]; cfg.parameter = 'pow'; cfg.dim = sourcePre.dim; cfg_neighb.method = 'template'; cfg.template = 'CTF275_neighb.mat'; cfg.neighbours = ft_prepare_neighbours(cfg_neighb, GA_RIGHT.nei); cfg.method = 'montecarlo'; cfg.statistic = 'depsamplesT'; cfg.correctm = 'cluster'; cfg.tail = 0; % -1, 1 or 0 (default = 0); one-sided or two-sided test cfg.clusteralpha = 0.05; % alpha level of the sample-specific test statistic that will be used for thresholding cfg.clusterstatistic = 'maxsum'; % test statistic that will be evaluated under the permutation distribution. cfg.minnbchan = 2; % minimum number of neighborhood channels that is required for a selected cfg.clustertail = 0; cfg.alpha = 0.025; % alpha level of the permutation test cfg.numrandomization = 100; % number of draws from the permutation distribution nsubj=length(sourcePre.trial); cfg.design(1,:) = [1:nsubj 1:nsubj]; cfg.design(2,:) = [ones(1,nsubj) ones(1,nsubj)*2]; cfg.uvar = 1; % row of design matrix that contains unit variable (in this case: subjects) cfg.ivar = 2; % row of design matrix that contains independent variable (the conditions) stat = ft_sourcestatistics(cfg, sourcePost, sourcePre); %% %Plot the statistics cfg = []; cfg.method = 'ortho'; cfg.interactive = 'yes'; cfg.funparameter = 'stat'; %stat.mask = ones(stat.dim); cfg.maskparameter = 'mask'; %cfg.maskparameter = 'mask'; cfg.funcolorlim = [-10 10]; cfg.opacitymap = 'vdown'; cfg.opacitylim = 'maxabs'; cfg.anatomy = GA_RIGHT.anatomy; stat.anatomy = GA_RIGHT.anatomy; figure ft_sourceplot(cfg, stat) end -------------- next part -------------- An HTML attachment was scrubbed... URL: From akiko.ikkai at gmail.com Fri Jan 27 17:36:36 2012 From: akiko.ikkai at gmail.com (Akiko Ikkai) Date: Fri, 27 Jan 2012 11:36:36 -0500 Subject: [FieldTrip] ft_prepare_bemmodel: vol.mat is NaN Message-ID: Hi, I'm wondering if there has been more conversations on the post "function prepare_bemmodel: resulting BEM system matrix is NaN", dated back to 2/17/2010. I have the same problem and would love to know how to work around it. In short, I'm trying to create a volume conduction model for my EEG data based on subjects' segmented anatomical MRI ('scalp','skull','brain'). ft_prepare_bemmodel creates vol that can be plotted nicely (using ft_plot_vol), but vol.mat is all Nan. I tracked down the error to be originated in ft_prepare_bemmodel, line 162 (20110525 version) C21 = bem_Cij_lin(vol.bnd(2).pnt,vol.bnd(1).pnt,vol.bnd(1).tri, weight,defl(1)); the original post suggests to 1) find where NaN are, 2) check their actual location in vol.bnd(1).pnt and in vol.bnd(1).tri, and then 3) correct the mesh, by removing the collapsed vertex/triangle. I was able to find where NaN are in C21, but am stuck at how to proceed from here. If anyone has suggestions on how I could go from here, it'll be greatly appreciated. Thanks in advance, Akiko -- Akiko Ikkai, Ph.D. Postdoctoral Fellow Department of Psychological and Brain Sciences Johns Hopkins University Ames Hall, 3400 N. Charles St. Baltimore, MD 21218 -------------- next part -------------- An HTML attachment was scrubbed... URL: From smoratti at psi.ucm.es Fri Jan 27 20:59:37 2012 From: smoratti at psi.ucm.es (smoratti at psi.ucm.es) Date: Fri, 27 Jan 2012 20:59:37 +0100 Subject: [FieldTrip] Sourcestatistics - Problem In-Reply-To: References: Message-ID: <6D2A2F2C-D0A2-4D94-9017-5193666EBEC9@psi.ucm.es> Hi Martin, Sometimes it might be useful to decrease the cluster alpha p value (e.g. 0.01). This prevents too much clustering and favors your strong effects. Maybe this helps. 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 27/01/2012, a las 16:42, Martin Winkels escribió: > Hello, > > we are working with the ft_sourcestatistics function and we are facing some problems. > > > We got some very well known data, our subjects just have been stimulated left and right hand. We are calculating right vs left hand data. The calculated GrandAVG-data looks very good, you can see this in the attached files. (GAVG_LEFT and GAVG_RIGHT). We got activity in the left and right brain hemisphere, localized at single spot. > > Now I wanted to calculate a statistic for this subject and I got some weird results. If you look up the file statplot.jpg you can see that the positive cluster looks quite okay but the negative cluster only looks good in the upper right corner but then it is distributed all over the brain till the lower left corner. > > Based on the GAVG-results this cant be. I also attached the data itself and a script to show the GAVG data as well as the script to calculate the data. > > I would be very very pleased if somebody could help me with that issue, I've been working on this for a while now. > > > > I have uploaded the data to the recommended filehoster: > > http://www.sendspace.com/filegroup/sJhI%2F5uBRdJI6JGXUjWtPA > > There are two files that belong together, you can extract them and there will be a .mat structure, the m-files and three pictures. > > > > Thanks, Martin > > I post the code as an attachment to this email: > > function calc_stat( ~ ) > %%UNTITLED2 Summary of this function goes here > % Detailed explanation goes here > > %path to grandAVG mat-file > load ('/media/sonja1/MatlabAnalysis/Martin/SEF/sourcestatistics/GrandAVG/grandAVG.mat'); > sourcePost = GA_RIGHT; > sourcePre = GA_LEFT; > > %% > % configfile for calculating the statistics > cfg = []; > cfg.channel = {'MEG'}; > cfg.latency = [0 1]; > > cfg.parameter = 'pow'; > cfg.dim = sourcePre.dim; > > cfg_neighb.method = 'template'; > cfg.template = 'CTF275_neighb.mat'; > cfg.neighbours = ft_prepare_neighbours(cfg_neighb, GA_RIGHT.nei); > > cfg.method = 'montecarlo'; > cfg.statistic = 'depsamplesT'; > cfg.correctm = 'cluster'; > > cfg.tail = 0; % -1, 1 or 0 (default = 0); one-sided or two-sided test > cfg.clusteralpha = 0.05; % alpha level of the sample-specific test statistic that will be used for thresholding > cfg.clusterstatistic = 'maxsum'; % test statistic that will be evaluated under the permutation distribution. > cfg.minnbchan = 2; % minimum number of neighborhood channels that is required for a selected > cfg.clustertail = 0; > cfg.alpha = 0.025; % alpha level of the permutation test > cfg.numrandomization = 100; % number of draws from the permutation distribution > > > nsubj=length(sourcePre.trial); > cfg.design(1,:) = [1:nsubj 1:nsubj]; > cfg.design(2,:) = [ones(1,nsubj) ones(1,nsubj)*2]; > cfg.uvar = 1; % row of design matrix that contains unit variable (in this case: subjects) > cfg.ivar = 2; % row of design matrix that contains independent variable (the conditions) > > stat = ft_sourcestatistics(cfg, sourcePost, sourcePre); > > %% > %Plot the statistics > cfg = []; > cfg.method = 'ortho'; > cfg.interactive = 'yes'; > cfg.funparameter = 'stat'; > %stat.mask = ones(stat.dim); > cfg.maskparameter = 'mask'; > %cfg.maskparameter = 'mask'; > cfg.funcolorlim = [-10 10]; > > cfg.opacitymap = 'vdown'; > cfg.opacitylim = 'maxabs'; > > > cfg.anatomy = GA_RIGHT.anatomy; > stat.anatomy = GA_RIGHT.anatomy; > > figure > ft_sourceplot(cfg, stat) > > end > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -------------- next part -------------- An HTML attachment was scrubbed... URL: From r.oostenveld at donders.ru.nl Sat Jan 28 16:08:32 2012 From: r.oostenveld at donders.ru.nl (Robert Oostenveld) Date: Sat, 28 Jan 2012 16:08:32 +0100 Subject: [FieldTrip] ft_prepare_bemmodel: vol.mat is NaN In-Reply-To: References: Message-ID: Hi Akiko The triangulated mesh might look nice, but that is not yet a guarantee that it is suitable for BEM computations. Cristiano (CC) has been working on a set of fieldtrip functions to create, manipulate and check surface meshes. Those functions are not yet in fieldtrip, but perhaps this would be the time to give them a try. Could you send us the surfaces that you feed into ft_prepare_bemmodel as a mat file, together with the cfg? Cristiano can then have a look at them with his function, which hopefully will poinpoint the geometrical problem that is causing the numerical issue. best Robert PS see http://fieldtrip.fcdonders.nl/faq/how_should_i_send_example_data_to_the_developers On 27 Jan 2012, at 17:36, Akiko Ikkai wrote: > Hi, > > I'm wondering if there has been more conversations on the post "function prepare_bemmodel: resulting BEM system matrix is NaN", dated back to 2/17/2010. I have the same problem and would love to know how to work around it. In short, I'm trying to create a volume conduction model for my EEG data based on subjects' segmented anatomical MRI ('scalp','skull','brain'). ft_prepare_bemmodel creates vol that can be plotted nicely (using ft_plot_vol), but vol.mat is all Nan. I tracked down the error to be originated in ft_prepare_bemmodel, line 162 (20110525 version) > > C21 = bem_Cij_lin(vol.bnd(2).pnt,vol.bnd(1).pnt,vol.bnd(1).tri, weight,defl(1)); > > the original post suggests to 1) find where NaN are, 2) check their actual location in vol.bnd(1).pnt and in vol.bnd(1).tri, and then 3) correct the mesh, by removing the collapsed vertex/triangle. I was able to find where NaN are in C21, but am stuck at how to proceed from here. > > If anyone has suggestions on how I could go from here, it'll be greatly appreciated. > Thanks in advance, Akiko > > -- > Akiko Ikkai, Ph.D. > Postdoctoral Fellow > Department of Psychological and Brain Sciences > Johns Hopkins University > Ames Hall, 3400 N. Charles St. > Baltimore, MD 21218 > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -------------- next part -------------- An HTML attachment was scrubbed... URL: From m_wink10 at uni-muenster.de Sat Jan 28 16:25:07 2012 From: m_wink10 at uni-muenster.de (Martin Winkels) Date: Sat, 28 Jan 2012 16:25:07 +0100 Subject: [FieldTrip] Sourcestatistics - Problem In-Reply-To: <6D2A2F2C-D0A2-4D94-9017-5193666EBEC9@psi.ucm.es> References: <6D2A2F2C-D0A2-4D94-9017-5193666EBEC9@psi.ucm.es> Message-ID: Hello Stephan, thanks for the answer. It helps, but only a little bit. Do you have any more suggestions? Thanks, Martin On Fri, Jan 27, 2012 at 8:59 PM, smoratti at psi.ucm.es wrote: > Hi Martin, > > Sometimes it might be useful to decrease the cluster alpha p value (e.g. > 0.01). This prevents too much clustering and favors your strong effects. > Maybe this helps. > > 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 27/01/2012, a las 16:42, Martin Winkels escribió: > > Hello, > > we are working with the ft_sourcestatistics function and we are facing > some problems. > > > We got some very well known data, our subjects just have been stimulated > left and right hand. We are calculating right vs left hand data. The > calculated GrandAVG-data looks very good, you can see this in the attached > files. (GAVG_LEFT and GAVG_RIGHT). We got activity in the left and right > brain hemisphere, localized at single spot. > > Now I wanted to calculate a statistic for this subject and I got some > weird results. If you look up the file statplot.jpg you can see that the > positive cluster looks quite okay but the negative cluster only looks good > in the upper right corner but then it is distributed all over the brain > till the lower left corner. > > Based on the GAVG-results this cant be. I also attached the data itself > and a script to show the GAVG data as well as the script to calculate the > data. > > I would be very very pleased if somebody could help me with that issue, > I've been working on this for a while now. > > > > I have uploaded the data to the recommended filehoster: > > http://www.sendspace.com/filegroup/sJhI%2F5uBRdJI6JGXUjWtPA > > There are two files that belong together, you can extract them and there > will be a .mat structure, the m-files and three pictures. > > > > Thanks, Martin > > I post the code as an attachment to this email: > > function calc_stat( ~ ) > %%UNTITLED2 Summary of this function goes here > % Detailed explanation goes here > > %path to grandAVG mat-file > load > ('/media/sonja1/MatlabAnalysis/Martin/SEF/sourcestatistics/GrandAVG/grandAVG.mat'); > > sourcePost = GA_RIGHT; > sourcePre = GA_LEFT; > > %% > % configfile for calculating the statistics > cfg = []; > cfg.channel = {'MEG'}; > cfg.latency = [0 1]; > > cfg.parameter = 'pow'; > cfg.dim = sourcePre.dim; > > cfg_neighb.method = 'template'; > cfg.template = 'CTF275_neighb.mat'; > cfg.neighbours = ft_prepare_neighbours(cfg_neighb, GA_RIGHT.nei); > > cfg.method = 'montecarlo'; > cfg.statistic = 'depsamplesT'; > cfg.correctm = 'cluster'; > > cfg.tail = 0; % -1, 1 or 0 (default = 0); one-sided or > two-sided test > cfg.clusteralpha = 0.05; % alpha level of the sample-specific test > statistic that will be used for thresholding > cfg.clusterstatistic = 'maxsum'; % test statistic that will be evaluated > under the permutation distribution. > cfg.minnbchan = 2; % minimum number of neighborhood channels > that is required for a selected > cfg.clustertail = 0; > cfg.alpha = 0.025; % alpha level of the permutation test > cfg.numrandomization = 100; % number of draws from the permutation > distribution > > > nsubj=length(sourcePre.trial); > cfg.design(1,:) = [1:nsubj 1:nsubj]; > cfg.design(2,:) = [ones(1,nsubj) ones(1,nsubj)*2]; > cfg.uvar = 1; % row of design matrix that contains unit variable > (in this case: subjects) > cfg.ivar = 2; % row of design matrix that contains independent > variable (the conditions) > > stat = ft_sourcestatistics(cfg, sourcePost, sourcePre); > > %% > %Plot the statistics > cfg = []; > cfg.method = 'ortho'; > cfg.interactive = 'yes'; > cfg.funparameter = 'stat'; > %stat.mask = ones(stat.dim); > cfg.maskparameter = 'mask'; > %cfg.maskparameter = 'mask'; > cfg.funcolorlim = [-10 10]; > > cfg.opacitymap = 'vdown'; > cfg.opacitylim = 'maxabs'; > > > cfg.anatomy = GA_RIGHT.anatomy; > stat.anatomy = GA_RIGHT.anatomy; > > figure > ft_sourceplot(cfg, stat) > > end > > > _______________________________________________ > 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 alotof_xd at yahoo.com Sun Jan 29 08:52:37 2012 From: alotof_xd at yahoo.com (alotof eve) Date: Sat, 28 Jan 2012 23:52:37 -0800 (PST) Subject: [FieldTrip] Where can I get 4D layout for MEG result? Message-ID: <1327823557.22249.YahooMailNeo@web125502.mail.ne1.yahoo.com> Hi, everyone, Out MEG is 4D and I checked that we should use 4D248.lay but I cannot find this file. Can anyone tell me where I can download such a file? Thanks Duo -------------- next part -------------- An HTML attachment was scrubbed... URL: From Don.Rojas at ucdenver.edu Sun Jan 29 16:36:58 2012 From: Don.Rojas at ucdenver.edu (Rojas, Don) Date: Sun, 29 Jan 2012 08:36:58 -0700 Subject: [FieldTrip] Where can I get 4D layout for MEG result? In-Reply-To: <1327823557.22249.YahooMailNeo@web125502.mail.ne1.yahoo.com> References: <1327823557.22249.YahooMailNeo@web125502.mail.ne1.yahoo.com> Message-ID: <9DDF9E6E-FFB8-4E56-BE13-B9B5C73735D1@ucdenver.edu> It is in your fieldtrip distribution, in the template/layout/ subdirectory. But you can just use it with any function that takes a layout by specifying: cfg.layout = '4D248.lay' On Jan 29, 2012, at 12:52 AM, alotof eve wrote: Hi, everyone, Out MEG is 4D and I checked that we should use 4D248.lay but I cannot find this file. Can anyone tell me where I can download such a file? Thanks Duo _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip ----------------------- Don Rojas, Ph.D. Associate Professor of Psychiatry U. of Colorado Denver Anschutz Medical Campus Director, UCD Magnetoencephalography Lab 13001 E. 17th Pl F546 Aurora, CO 80045 303-724-4994 -------------- next part -------------- An HTML attachment was scrubbed... URL: From alotof_xd at yahoo.com Mon Jan 30 07:44:01 2012 From: alotof_xd at yahoo.com (alotof eve) Date: Sun, 29 Jan 2012 22:44:01 -0800 (PST) Subject: [FieldTrip] Where can I get 4D layout for MEG result? In-Reply-To: <1327903969.63327.YahooMailNeo@web125501.mail.ne1.yahoo.com> References: <1327823557.22249.YahooMailNeo@web125502.mail.ne1.yahoo.com> <9DDF9E6E-FFB8-4E56-BE13-B9B5C73735D1@ucdenver.edu> <1327903969.63327.YahooMailNeo@web125501.mail.ne1.yahoo.com> Message-ID: <1327905841.32374.YahooMailNeo@web125502.mail.ne1.yahoo.com> ----- Forwarded Message ----- From: alotof eve To: "Rojas, Don" Sent: Sunday, January 29, 2012 10:12 PM Subject: Re: [FieldTrip] Where can I get 4D layout for MEG result? Thank Don. In fact I asked the question because I met problem when I using the layout that I thought it's something wrong. I am doing ica and using: ft_topoplotIC(cfg,comp), then got the error message: reading layout from file 4D248.lay Error using dataread Trouble reading floating point number from file (row 1, field 1) ==> \n Error in textread (line 176) [varargout{1:nlhs}]=dataread('file',varargin{:}); Error in ft_prepare_layout>readlay (line 670) [chNum,X,Y,Width,Height,Lbl,Rem] = textread(filename,'%f %f %f %f %f %q %q'); Error in ft_prepare_layout (line 222)   lay = readlay(cfg.layout); Error in ft_topoplotER (line 433) lay = ft_prepare_layout(cfg, data); Error in ft_topoplotIC (line 116)     ft_topoplotER(cfg, varargin{:}); Can anyone help me on this? Thanks, Duo ________________________________ From: "Rojas, Don" To: alotof eve ; Email discussion list for the FieldTrip project Sent: Sunday, January 29, 2012 7:36 AM Subject: Re: [FieldTrip] Where can I get 4D layout for MEG result? It is in your fieldtrip distribution, in the template/layout/ subdirectory. But you can just use it with any function that takes a layout by specifying: cfg.layout = '4D248.lay' On Jan 29, 2012, at 12:52 AM, alotof eve wrote: Hi, everyone, > > >Out MEG is 4D and I checked that we should use 4D248.lay but I cannot find this file. Can anyone tell me where I can download such a file? > > > >Thanks >Duo_______________________________________________ >fieldtrip mailing list >fieldtrip at donders.ru.nl >http://mailman.science.ru.nl/mailman/listinfo/fieldtrip ----------------------- Don Rojas, Ph.D. Associate Professor of Psychiatry U. of Colorado Denver Anschutz Medical Campus Director, UCD Magnetoencephalography Lab 13001 E. 17th Pl F546 Aurora, CO 80045 303-724-4994 -------------- next part -------------- An HTML attachment was scrubbed... URL: From jm.horschig at donders.ru.nl Mon Jan 30 16:37:02 2012 From: jm.horschig at donders.ru.nl (=?ISO-8859-1?Q?=22J=F6rn_M=2E_Horschig=22?=) Date: Mon, 30 Jan 2012 16:37:02 +0100 Subject: [FieldTrip] Defining cfg.neighbourdist at source level In-Reply-To: <4F22C422.4080906@charite.de> References: <4F22C422.4080906@charite.de> Message-ID: <4F26B91E.2050200@donders.ru.nl> Dear Ulrich, I think you are confusing some things there. cfg.neighbourdist is a setting for defining neighbouring /sensors/, thus it's not applicable for source level statistics (see ft_prepare_neighbours). However, I never did cluster-based permutation test on source-level in FieldTrip, but for me it seems that it just works by taking neighbouring voxels as neighbours. So, you shouldn't need to define anything special for running sourcelevel stats (if I am wrong, someone with more experience should correct me here). But, maybe you meant to write sensor level, but wrote source level - in that case I'd be happy to help. Best, Jörn On 1/27/2012 4:34 PM, Pomper, Ulrich wrote: > Dear list members, > I am trying to perform a cluster based permutation test on power > values at source level. > I managed to run the test using just the time and frequency dimensions > (cfg.neighbourdist = []) > but I am struggling with the issue of how to define the neighbourdist > parameter. > I've looked through the tutorial, the FT site as well as through the > mailinglist but couldn't find an answer, so I'd really appreciate any > hint on this. > > Thanks a lot, > Ulrich > > > > > > _______________________________________________ > 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 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 Ulrich.Pomper at charite.de Mon Jan 30 16:58:58 2012 From: Ulrich.Pomper at charite.de (Pomper, Ulrich) Date: Mon, 30 Jan 2012 16:58:58 +0100 Subject: [FieldTrip] Defining cfg.neighbourdist at source level In-Reply-To: <4F26B91E.2050200@donders.ru.nl> References: <4F22C422.4080906@charite.de> <4F26B91E.2050200@donders.ru.nl> Message-ID: <4F26BE42.5030204@charite.de> Dear Jörn, Thanks for you reply. I did mean source-level, so like you said, I am trying to define the neighbouring voxels for each voxel. As far as I understand, leaving cfg.neighbours blank means that the clustering is done over the time and frequency dimensions only, not over space. The FT help reads: %If you specify an empty neighbourhood structure, clustering will only be done in frequency and time (if available) and not over neighbouring channels. Has anybody done clustering in source space using all three dimensions and could explain how this works? Cheers, Ulrich On 30.01.2012 16:37, "Jörn M. Horschig" wrote: Dear Ulrich, I think you are confusing some things there. cfg.neighbourdist is a setting for defining neighbouring sensors, thus it's not applicable for source level statistics (see ft_prepare_neighbours). However, I never did cluster-based permutation test on source-level in FieldTrip, but for me it seems that it just works by taking neighbouring voxels as neighbours. So, you shouldn't need to define anything special for running sourcelevel stats (if I am wrong, someone with more experience should correct me here). But, maybe you meant to write sensor level, but wrote source level - in that case I'd be happy to help. Best, Jörn On 1/27/2012 4:34 PM, Pomper, Ulrich wrote: Dear list members, I am trying to perform a cluster based permutation test on power values at source level. I managed to run the test using just the time and frequency dimensions (cfg.neighbourdist = []) but I am struggling with the issue of how to define the neighbourdist parameter. I've looked through the tutorial, the FT site as well as through the mailinglist but couldn't find an answer, so I'd really appreciate any hint on this. Thanks a lot, Ulrich _______________________________________________ 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 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 r.oostenveld at donders.ru.nl Tue Jan 31 15:37:52 2012 From: r.oostenveld at donders.ru.nl (Robert Oostenveld) Date: Tue, 31 Jan 2012 15:37:52 +0100 Subject: [FieldTrip] Defining cfg.neighbourdist at source level In-Reply-To: <4F26BE42.5030204@charite.de> References: <4F22C422.4080906@charite.de> <4F26B91E.2050200@donders.ru.nl> <4F26BE42.5030204@charite.de> Message-ID: Dear Ulrich If your source locations are defined on a regular 3D grid that can be represented as volume, then the neighbours are trivial to find and you do not have to specify a structure for the neighbours. If you have done source reconstruction on a 3D folded cortical sheet that is defined by a triangulated surface, then it is also possible to cluster along the surface. I don't know the details for the cortical sheet clustering from the top of my head, if you are interested please let me know and I'll look them up. best Robert On 30 Jan 2012, at 16:58, Pomper, Ulrich wrote: > Dear Jörn, > Thanks for you reply. I did mean source-level, so like you said, I am trying to define the neighbouring voxels for each voxel. > As far as I understand, leaving cfg.neighbours blank means that the clustering is done over the time and frequency dimensions only, not over space. > The FT help reads: > %If you specify an empty neighbourhood structure, clustering will only be done in frequency and time (if available) and not over neighbouring channels. > > Has anybody done clustering in source space using all three dimensions and could explain how this works? > Cheers, > Ulrich > -------------- next part -------------- An HTML attachment was scrubbed... URL: From r.oostenveld at donders.ru.nl Tue Jan 31 15:41:22 2012 From: r.oostenveld at donders.ru.nl (Robert Oostenveld) Date: Tue, 31 Jan 2012 15:41:22 +0100 Subject: [FieldTrip] Where can I get 4D layout for MEG result? In-Reply-To: <1327905841.32374.YahooMailNeo@web125502.mail.ne1.yahoo.com> References: <1327823557.22249.YahooMailNeo@web125502.mail.ne1.yahoo.com> <9DDF9E6E-FFB8-4E56-BE13-B9B5C73735D1@ucdenver.edu> <1327903969.63327.YahooMailNeo@web125501.mail.ne1.yahoo.com> <1327905841.32374.YahooMailNeo@web125502.mail.ne1.yahoo.com> Message-ID: <318F2082-FD54-49BE-96CB-476051C0832B@donders.ru.nl> Dear Duo The error suggests that the layout file is corrupt, DOCTYPE is not a string that should be present in the file. Please open it in a text editor and compare it with the format here http://fieldtrip.fcdonders.nl/faq/what_is_the_format_of_the_layout_file_which_is_used_for_plotting best Robert On 30 Jan 2012, at 7:44, alotof eve wrote: > ----- Forwarded Message ----- > From: alotof eve > To: "Rojas, Don" > Sent: Sunday, January 29, 2012 10:12 PM > Subject: Re: [FieldTrip] Where can I get 4D layout for MEG result? > > Thank Don. In fact I asked the question because I met problem when I using the layout that I thought it's something wrong. > > I am doing ica and using: ft_topoplotIC(cfg,comp), then got the error message: > > reading layout from file 4D248.lay > Error using dataread > Trouble reading floating point number from file (row 1, field 1) ==> \n > > Error in textread (line 176) > [varargout{1:nlhs}]=dataread('file',varargin{:}); > > Error in ft_prepare_layout>readlay (line 670) > [chNum,X,Y,Width,Height,Lbl,Rem] = textread(filename,'%f > %f %f %f %f %q %q'); > > Error in ft_prepare_layout (line 222) > lay = readlay(cfg.layout); > > Error in ft_topoplotER (line 433) > lay = ft_prepare_layout(cfg, data); > > Error in ft_topoplotIC (line 116) > ft_topoplotER(cfg, varargin{:}); > > Can anyone help me on this? > > Thanks, > Duo > From: "Rojas, Don" > To: alotof eve ; Email discussion list for the FieldTrip project > Sent: Sunday, January 29, 2012 7:36 AM > Subject: Re: [FieldTrip] Where can I get 4D layout for MEG result? > > It is in your fieldtrip distribution, in the template/layout/ subdirectory. But you can just use it with any function that takes a layout by specifying: > > cfg.layout = '4D248.lay' > > On Jan 29, 2012, at 12:52 AM, alotof eve wrote: > >> Hi, everyone, >> >> Out MEG is 4D and I checked that we should use 4D248.lay but I cannot find this file. Can anyone tell me where I can download such a file? >> >> Thanks >> Duo >> _______________________________________________ >> fieldtrip mailing list >> fieldtrip at donders.ru.nl >> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > ----------------------- > Don Rojas, Ph.D. > Associate Professor of Psychiatry > U. of Colorado Denver Anschutz Medical Campus > Director, UCD Magnetoencephalography Lab > 13001 E. 17th Pl F546 > Aurora, CO 80045 > 303-724-4994 > > > > > > _______________________________________________ > 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 alotof_xd at yahoo.com Tue Jan 31 19:40:51 2012 From: alotof_xd at yahoo.com (alotof eve) Date: Tue, 31 Jan 2012 10:40:51 -0800 (PST) Subject: [FieldTrip] Where can I get 4D layout for MEG result? In-Reply-To: <318F2082-FD54-49BE-96CB-476051C0832B@donders.ru.nl> References: <1327823557.22249.YahooMailNeo@web125502.mail.ne1.yahoo.com> <9DDF9E6E-FFB8-4E56-BE13-B9B5C73735D1@ucdenver.edu> <1327903969.63327.YahooMailNeo@web125501.mail.ne1.yahoo.com> <1327905841.32374.YahooMailNeo@web125502.mail.ne1.yahoo.com> <318F2082-FD54-49BE-96CB-476051C0832B@donders.ru.nl> Message-ID: <1328035251.88538.YahooMailNeo@web125501.mail.ne1.yahoo.com> Dear Robert, Thank you so much for the suggestion. I compared the file but couldn't get idea yet. The format of 4D248.lay which I am using is like follows: 1 0.23057 -0.26062 3 2.25 A1 2 0.23057 3.8119 3 2.25 A2 3 0.064345 8.2238 3 2.25 A3 4 0.064345 11.957 3 2.25 A4 5 -0.10188 16.0295 3 2.25 A5 6 -3.7588 16.0295 3 2.25 A6 7 -4.0913 11.957 3 2.25 A7 8 -4.2575 8.2238 3 2.25 A8 9 -4.0913 4.1513 3 2.25 A9 10 -4.2575 -0.09093 3 2.25 A10 .... Any more suggestions? Thanks, Duo ________________________________ From: Robert Oostenveld To: Email discussion list for the FieldTrip project Sent: Tuesday, January 31, 2012 6:41 AM Subject: Re: [FieldTrip] Where can I get 4D layout for MEG result? Dear Duo The error suggests that the layout file is corrupt, DOCTYPE is not a string that should be present in the file. Please open it in a text editor and compare it with the format here http://fieldtrip.fcdonders.nl/faq/what_is_the_format_of_the_layout_file_which_is_used_for_plotting best Robert  On 30 Jan 2012, at 7:44, alotof eve wrote: ----- Forwarded Message ----- >From: alotof eve >To: "Rojas, Don" >Sent: Sunday, January 29, 2012 10:12 PM >Subject: Re: [FieldTrip] Where can I get 4D layout for MEG result? > > >Thank Don. In fact I asked the question because I met problem when I using the layout that I thought it's something wrong. > > >I am doing ica and using: ft_topoplotIC(cfg,comp), then got the error message: > > >reading layout from file 4D248.lay >Error using dataread >Trouble reading floating point number from file (row 1, field 1) ==> \n > >Error in textread (line 176) >[varargout{1:nlhs}]=dataread('file',varargin{:}); > >Error in ft_prepare_layout>readlay (line 670) >[chNum,X,Y,Width,Height,Lbl,Rem] = textread(filename,'%f >%f %f %f %f %q %q'); > >Error in ft_prepare_layout (line 222) >  lay = readlay(cfg.layout); > >Error in ft_topoplotER (line 433) >lay = ft_prepare_layout(cfg, data); > >Error in ft_topoplotIC (line 116) >    ft_topoplotER(cfg, varargin{:}); > > >Can anyone help me on this? > > >Thanks, >Duo > > >________________________________ > From: "Rojas, Don" >To: alotof eve ; Email discussion list for the FieldTrip project >Sent: Sunday, January 29, 2012 7:36 AM >Subject: Re: [FieldTrip] Where can I get 4D layout for MEG result? > > >It is in your fieldtrip distribution, in the template/layout/ subdirectory. But you can just use it with any function that takes a layout by specifying: > > >cfg.layout = '4D248.lay' > > >On Jan 29, 2012, at 12:52 AM, alotof eve wrote: > >Hi, everyone, >> >> >>Out MEG is 4D and I checked that we should use 4D248.lay but I cannot find this file. Can anyone tell me where I can download such a file? >> >> >> >>Thanks >>Duo_______________________________________________ >>fieldtrip mailing list >>fieldtrip at donders.ru.nl >>http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > >----------------------- >Don Rojas, Ph.D. >Associate Professor of Psychiatry >U. of Colorado Denver Anschutz Medical Campus >Director, UCD Magnetoencephalography Lab >13001 E. 17th Pl F546 >Aurora, CO 80045 >303-724-4994 > > > > >_______________________________________________ >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 r.oostenveld at donders.ru.nl Tue Jan 31 21:27:44 2012 From: r.oostenveld at donders.ru.nl (Robert Oostenveld) Date: Tue, 31 Jan 2012 21:27:44 +0100 Subject: [FieldTrip] Where can I get 4D layout for MEG result? In-Reply-To: <1328035251.88538.YahooMailNeo@web125501.mail.ne1.yahoo.com> References: <1327823557.22249.YahooMailNeo@web125502.mail.ne1.yahoo.com> <9DDF9E6E-FFB8-4E56-BE13-B9B5C73735D1@ucdenver.edu> <1327903969.63327.YahooMailNeo@web125501.mail.ne1.yahoo.com> <1327905841.32374.YahooMailNeo@web125502.mail.ne1.yahoo.com> <318F2082-FD54-49BE-96CB-476051C0832B@donders.ru.nl> <1328035251.88538.YahooMailNeo@web125501.mail.ne1.yahoo.com> Message-ID: <2D02A28D-D3C2-4727-8CE7-E72E45B1C212@donders.ru.nl> Dear Duo I am not sure whether it is a problem with the FieldTrip code or with your particular computer and dataset. I suggest that you report it on http://bugzilla.fcdonders.nl and that you make the cfg and the comp data structure available. One of us in Nijmegen can then check whether the problem can be reproduced. In reporting it on bugzilla, please include details on your MATLAB and operating system version. We've had problems in the past where MATLAB was not fully compatible with specific language settings when reading text files. best Robert On 31 Jan 2012, at 19:40, alotof eve wrote: > Dear Robert, > > Thank you so much for the suggestion. I compared the file but couldn't get idea yet. The format of 4D248.lay which I am using is like follows: > > 1 0.23057 -0.26062 3 2.25 A1 > 2 0.23057 3.8119 3 2.25 A2 > 3 0.064345 8.2238 3 2.25 A3 > 4 0.064345 11.957 3 2.25 A4 > 5 -0.10188 16.0295 3 2.25 A5 > 6 -3.7588 16.0295 3 2.25 A6 > 7 -4.0913 11.957 3 2.25 A7 > 8 -4.2575 8.2238 3 2.25 A8 > 9 -4.0913 4.1513 3 2.25 A9 > 10 -4.2575 -0.09093 3 2.25 A10 > .... > > Any more suggestions? > > Thanks, > Duo > > From: Robert Oostenveld > To: Email discussion list for the FieldTrip project > Sent: Tuesday, January 31, 2012 6:41 AM > Subject: Re: [FieldTrip] Where can I get 4D layout for MEG result? > > Dear Duo > > The error suggests that the layout file is corrupt, DOCTYPE is not a string that should be present in the file. Please open it in a text editor and compare it with the format here http://fieldtrip.fcdonders.nl/faq/what_is_the_format_of_the_layout_file_which_is_used_for_plotting > > best > Robert > > On 30 Jan 2012, at 7:44, alotof eve wrote: > >> ----- Forwarded Message ----- >> From: alotof eve >> To: "Rojas, Don" >> Sent: Sunday, January 29, 2012 10:12 PM >> Subject: Re: [FieldTrip] Where can I get 4D layout for MEG result? >> >> Thank Don. In fact I asked the question because I met problem when I using the layout that I thought it's something wrong. >> >> I am doing ica and using: ft_topoplotIC(cfg,comp), then got the error message: >> >> reading layout from file 4D248.lay >> Error using dataread >> Trouble reading floating point number from file (row 1, field 1) ==> \n >> >> Error in textread (line 176) >> [varargout{1:nlhs}]=dataread('file',varargin{:}); >> >> Error in ft_prepare_layout>readlay (line 670) >> [chNum,X,Y,Width,Height,Lbl,Rem] = textread(filename,'%f >> %f %f %f %f %q %q'); >> >> Error in ft_prepare_layout (line 222) >> lay = readlay(cfg.layout); >> >> Error in ft_topoplotER (line 433) >> lay = ft_prepare_layout(cfg, data); >> >> Error in ft_topoplotIC (line 116) >> ft_topoplotER(cfg, varargin{:}); >> >> Can anyone help me on this? >> >> Thanks, >> Duo >> From: "Rojas, Don" >> To: alotof eve ; Email discussion list for the FieldTrip project >> Sent: Sunday, January 29, 2012 7:36 AM >> Subject: Re: [FieldTrip] Where can I get 4D layout for MEG result? >> >> It is in your fieldtrip distribution, in the template/layout/ subdirectory. But you can just use it with any function that takes a layout by specifying: >> >> cfg.layout = '4D248.lay' >> >> On Jan 29, 2012, at 12:52 AM, alotof eve wrote: >> >>> Hi, everyone, >>> >>> Out MEG is 4D and I checked that we should use 4D248.lay but I cannot find this file. Can anyone tell me where I can download such a file? >>> >>> Thanks >>> Duo >>> _______________________________________________ >>> fieldtrip mailing list >>> fieldtrip at donders.ru.nl >>> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip >> >> ----------------------- >> Don Rojas, Ph.D. >> Associate Professor of Psychiatry >> U. of Colorado Denver Anschutz Medical Campus >> Director, UCD Magnetoencephalography Lab >> 13001 E. 17th Pl F546 >> Aurora, CO 80045 >> 303-724-4994 >> >> >> >> >> >> _______________________________________________ >> 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 alotof_xd at yahoo.com Tue Jan 31 21:28:31 2012 From: alotof_xd at yahoo.com (alotof eve) Date: Tue, 31 Jan 2012 12:28:31 -0800 (PST) Subject: [FieldTrip] Where can I get 4D layout for MEG result? In-Reply-To: <1328035251.88538.YahooMailNeo@web125501.mail.ne1.yahoo.com> References: <1327823557.22249.YahooMailNeo@web125502.mail.ne1.yahoo.com> <9DDF9E6E-FFB8-4E56-BE13-B9B5C73735D1@ucdenver.edu> <1327903969.63327.YahooMailNeo@web125501.mail.ne1.yahoo.com> <1327905841.32374.YahooMailNeo@web125502.mail.ne1.yahoo.com> <318F2082-FD54-49BE-96CB-476051C0832B@donders.ru.nl> <1328035251.88538.YahooMailNeo@web125501.mail.ne1.yahoo.com> Message-ID: <1328041711.61986.YahooMailNeo@web125503.mail.ne1.yahoo.com> A very strange thing... I tested the other layout, like 'CTF275.lay' using 'ft_layoutplot', it works. However, '4D248.lay' dosen't work on 'ft_layoutplot' with the same error message as before: Error using dataread Trouble reading floating point number from file (row 1, field 1) ==> \n .... Even I rename 'CTF275.lay' to '4D248.lay', it comes the same error message. Any suggestions? Thanks, Duo ________________________________ From: alotof eve To: Email discussion list for the FieldTrip project Sent: Tuesday, January 31, 2012 10:40 AM Subject: Re: [FieldTrip] Where can I get 4D layout for MEG result? Dear Robert, Thank you so much for the suggestion. I compared the file but couldn't get idea yet. The format of 4D248.lay which I am using is like follows: 1 0.23057 -0.26062 3 2.25 A1 2 0.23057 3.8119 3 2.25 A2 3 0.064345 8.2238 3 2.25 A3 4 0.064345 11.957 3 2.25 A4 5 -0.10188 16.0295 3 2.25 A5 6 -3.7588 16.0295 3 2.25 A6 7 -4.0913 11.957 3 2.25 A7 8 -4.2575 8.2238 3 2.25 A8 9 -4.0913 4.1513 3 2.25 A9 10 -4.2575 -0.09093 3 2.25 A10 .... Any more suggestions? Thanks, Duo ________________________________ From: Robert Oostenveld To: Email discussion list for the FieldTrip project Sent: Tuesday, January 31, 2012 6:41 AM Subject: Re: [FieldTrip] Where can I get 4D layout for MEG result? Dear Duo The error suggests that the layout file is corrupt, DOCTYPE is not a string that should be present in the file. Please open it in a text editor and compare it with the format here http://fieldtrip.fcdonders.nl/faq/what_is_the_format_of_the_layout_file_which_is_used_for_plotting best Robert  On 30 Jan 2012, at 7:44, alotof eve wrote: ----- Forwarded Message ----- >From: alotof eve >To: "Rojas, Don" >Sent: Sunday, January 29, 2012 10:12 PM >Subject: Re: [FieldTrip] Where can I get 4D layout for MEG result? > > >Thank Don. In fact I asked the question because I met problem when I using the layout that I thought it's something wrong. > > >I am doing ica and using: ft_topoplotIC(cfg,comp), then got the error message: > > >reading layout from file 4D248.lay >Error using dataread >Trouble reading floating point number from file (row 1, field 1) ==> \n > >Error in textread (line 176) >[varargout{1:nlhs}]=dataread('file',varargin{:}); > >Error in ft_prepare_layout>readlay (line 670) >[chNum,X,Y,Width,Height,Lbl,Rem] = textread(filename,'%f >%f %f %f %f %q %q'); > >Error in ft_prepare_layout (line 222) >  lay = readlay(cfg.layout); > >Error in ft_topoplotER (line 433) >lay = ft_prepare_layout(cfg, data); > >Error in ft_topoplotIC (line 116) >    ft_topoplotER(cfg, varargin{:}); > > >Can anyone help me on this? > > >Thanks, >Duo > > >________________________________ > From: "Rojas, Don" >To: alotof eve ; Email discussion list for the FieldTrip project >Sent: Sunday, January 29, 2012 7:36 AM >Subject: Re: [FieldTrip] Where can I get 4D layout for MEG result? > > >It is in your fieldtrip distribution, in the template/layout/ subdirectory. But you can just use it with any function that takes a layout by specifying: > > >cfg.layout = '4D248.lay' > > >On Jan 29, 2012, at 12:52 AM, alotof eve wrote: > >Hi, everyone, >> >> >>Out MEG is 4D and I checked that we should use 4D248.lay but I cannot find this file. Can anyone tell me where I can download such a file? >> >> >> >>Thanks >>Duo_______________________________________________ >>fieldtrip mailing list >>fieldtrip at donders.ru.nl >>http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > >----------------------- >Don Rojas, Ph.D. >Associate Professor of Psychiatry >U. of Colorado Denver Anschutz Medical Campus >Director, UCD Magnetoencephalography Lab >13001 E. 17th Pl F546 >Aurora, CO 80045 >303-724-4994 > > > > >_______________________________________________ >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 smoratti at psi.ucm.es Tue Jan 31 21:48:04 2012 From: smoratti at psi.ucm.es (smoratti at psi.ucm.es) Date: Tue, 31 Jan 2012 21:48:04 +0100 Subject: [FieldTrip] Defining cfg.neighbourdist at source level In-Reply-To: References: <4F22C422.4080906@charite.de> <4F26B91E.2050200@donders.ru.nl> <4F26BE42.5030204@charite.de> Message-ID: <61FDD8CB-F79B-48A6-BC19-015F778A4945@psi.ucm.es> Dear Robert, To do clustering on a 3D source surface I always had to "trick" field trip and squeezed the 3D source surface data into a ERF structure treating the 3D surface points as sensors. Then by triangulation I found the neighbors. However, if there is a more elegant method implemented in ft_sourcestatistc, I would be very interested to know how to do it. Where can I find some hints on that? 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 31/01/2012, a las 15:37, Robert Oostenveld escribió: > Dear Ulrich > > If your source locations are defined on a regular 3D grid that can be represented as volume, then the neighbours are trivial to find and you do not have to specify a structure for the neighbours. > > If you have done source reconstruction on a 3D folded cortical sheet that is defined by a triangulated surface, then it is also possible to cluster along the surface. I don't know the details for the cortical sheet clustering from the top of my head, if you are interested please let me know and I'll look them up. > > best > Robert > > > > > On 30 Jan 2012, at 16:58, Pomper, Ulrich wrote: > >> Dear Jörn, >> Thanks for you reply. I did mean source-level, so like you said, I am trying to define the neighbouring voxels for each voxel. >> As far as I understand, leaving cfg.neighbours blank means that the clustering is done over the time and frequency dimensions only, not over space. >> The FT help reads: >> %If you specify an empty neighbourhood structure, clustering will only be done in frequency and time (if available) and not over neighbouring channels. >> >> Has anybody done clustering in source space using all three dimensions and could explain how this works? >> Cheers, >> Ulrich >> > > _______________________________________________ > 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 alotof_xd at yahoo.com Tue Jan 31 22:36:27 2012 From: alotof_xd at yahoo.com (alotof eve) Date: Tue, 31 Jan 2012 13:36:27 -0800 (PST) Subject: [FieldTrip] Where can I get 4D layout for MEG result? In-Reply-To: <1328041711.61986.YahooMailNeo@web125503.mail.ne1.yahoo.com> References: <1327823557.22249.YahooMailNeo@web125502.mail.ne1.yahoo.com> <9DDF9E6E-FFB8-4E56-BE13-B9B5C73735D1@ucdenver.edu> <1327903969.63327.YahooMailNeo@web125501.mail.ne1.yahoo.com> <1327905841.32374.YahooMailNeo@web125502.mail.ne1.yahoo.com> <318F2082-FD54-49BE-96CB-476051C0832B@donders.ru.nl> <1328035251.88538.YahooMailNeo@web125501.mail.ne1.yahoo.com> <1328041711.61986.YahooMailNeo@web125503.mail.ne1.yahoo.com> Message-ID: <1328045787.5297.YahooMailNeo@web125503.mail.ne1.yahoo.com> I renamed '4D248.lay' to 'CTF275.lay' then checked with 'ft_layoutplot', it worked. If renamed 'CTF275.lay' to '4d248.lay', 'ft_layoutplot' showed error message. So I think it must be some code error in reading layout file. Any suggestions?  Thanks, Duo ________________________________ From: alotof eve To: Email discussion list for the FieldTrip project Sent: Tuesday, January 31, 2012 12:28 PM Subject: Re: [FieldTrip] Where can I get 4D layout for MEG result? A very strange thing... I tested the other layout, like 'CTF275.lay' using 'ft_layoutplot', it works. However, '4D248.lay' dosen't work on 'ft_layoutplot' with the same error message as before: Error using dataread Trouble reading floating point number from file (row 1, field 1) ==> \n .... Even I rename 'CTF275.lay' to '4D248.lay', it comes the same error message. Any suggestions? Thanks, Duo ________________________________ From: alotof eve To: Email discussion list for the FieldTrip project Sent: Tuesday, January 31, 2012 10:40 AM Subject: Re: [FieldTrip] Where can I get 4D layout for MEG result? Dear Robert, Thank you so much for the suggestion. I compared the file but couldn't get idea yet. The format of 4D248.lay which I am using is like follows: 1 0.23057 -0.26062 3 2.25 A1 2 0.23057 3.8119 3 2.25 A2 3 0.064345 8.2238 3 2.25 A3 4 0.064345 11.957 3 2.25 A4 5 -0.10188 16.0295 3 2.25 A5 6 -3.7588 16.0295 3 2.25 A6 7 -4.0913 11.957 3 2.25 A7 8 -4.2575 8.2238 3 2.25 A8 9 -4.0913 4.1513 3 2.25 A9 10 -4.2575 -0.09093 3 2.25 A10 .... Any more suggestions? Thanks, Duo ________________________________ From: Robert Oostenveld To: Email discussion list for the FieldTrip project Sent: Tuesday, January 31, 2012 6:41 AM Subject: Re: [FieldTrip] Where can I get 4D layout for MEG result? Dear Duo The error suggests that the layout file is corrupt, DOCTYPE is not a string that should be present in the file. Please open it in a text editor and compare it with the format here http://fieldtrip.fcdonders.nl/faq/what_is_the_format_of_the_layout_file_which_is_used_for_plotting best Robert  On 30 Jan 2012, at 7:44, alotof eve wrote: ----- Forwarded Message ----- >From: alotof eve >To: "Rojas, Don" >Sent: Sunday, January 29, 2012 10:12 PM >Subject: Re: [FieldTrip] Where can I get 4D layout for MEG result? > > >Thank Don. In fact I asked the question because I met problem when I using the layout that I thought it's something wrong. > > >I am doing ica and using: ft_topoplotIC(cfg,comp), then got the error message: > > >reading layout from file 4D248.lay >Error using dataread >Trouble reading floating point number from file (row 1, field 1) ==> \n > >Error in textread (line 176) >[varargout{1:nlhs}]=dataread('file',varargin{:}); > >Error in ft_prepare_layout>readlay (line 670) >[chNum,X,Y,Width,Height,Lbl,Rem] = textread(filename,'%f >%f %f %f %f %q %q'); > >Error in ft_prepare_layout (line 222) >  lay = readlay(cfg.layout); > >Error in ft_topoplotER (line 433) >lay = ft_prepare_layout(cfg, data); > >Error in ft_topoplotIC (line 116) >    ft_topoplotER(cfg, varargin{:}); > > >Can anyone help me on this? > > >Thanks, >Duo > > >________________________________ > From: "Rojas, Don" >To: alotof eve ; Email discussion list for the FieldTrip project >Sent: Sunday, January 29, 2012 7:36 AM >Subject: Re: [FieldTrip] Where can I get 4D layout for MEG result? > > >It is in your fieldtrip distribution, in the template/layout/ subdirectory. But you can just use it with any function that takes a layout by specifying: > > >cfg.layout = '4D248.lay' > > >On Jan 29, 2012, at 12:52 AM, alotof eve wrote: > >Hi, everyone, >> >> >>Out MEG is 4D and I checked that we should use 4D248.lay but I cannot find this file. Can anyone tell me where I can download such a file? >> >> >> >>Thanks >>Duo_______________________________________________ >>fieldtrip mailing list >>fieldtrip at donders.ru.nl >>http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > >----------------------- >Don Rojas, Ph.D. >Associate Professor of Psychiatry >U. of Colorado Denver Anschutz Medical Campus >Director, UCD Magnetoencephalography Lab >13001 E. 17th Pl F546 >Aurora, CO 80045 >303-724-4994 > > > > >_______________________________________________ >fieldtrip mailing list >fieldtrip at donders.ru.nl >http://mailman.science.ru.nl/mailman/listinfo/fieldtrip _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -------------- next part -------------- An HTML attachment was scrubbed... URL: