From r.oostenveld at FCDONDERS.RU.NL Fri Dec 3 14:58:19 2004 From: r.oostenveld at FCDONDERS.RU.NL (Robert Oostenveld) Date: Fri, 3 Dec 2004 14:58:19 +0100 Subject: Fwd: dipolesimulation Message-ID: Hi Teresa, Let me answer your questions one by one. I'll also forward this message to the fieldtrip list, since other people might be interested in this as well. On Thu, 2 Dec 2004, Teresa Montez wrote: > > To simulate CTF data with the dipolesimulation what should I use as: > > elec.pnt > elec.label This defines electrode positions (pnt) and labels. For simulation CTF MEG data you do not have to specify this. > grad.pnt > grad.ori > grad.tra > grad.label This defines a gradiometer array, as explained in the faq on the homepage. You can define your own array with magnetometers and/or gradiometers. But you mention that you want to simulate CTF data, so I suggest that you use a gradiometer from one of your CTF recordings. If you do hdr = read_fcdc_header('Experiment_blabla.ds/Experiment_blabla.res4') i.e. read the CTF res4 file which actually contains the header information, then hdr will contain the field grad: hdr.grad.pnt (location of coils) hdr.grad.ori (orientation of coils) hdr.grad.tra (how to combine the coils in gradiometers) hdr.grad.label (labels of the gradiometers) > Maybe add some examples to the answer you have in the FAQ section of > the fieldtrip site. We are aware that we have to work on the tutorials, and I'll remember also to make a dipolesimulation tutorial. Right now we still have the problem that we cannot make the tutorial datasets available since the webserver does not allow us to put up large files, but that is also being looked into. > For the headmodel I am using > > cfg.vol.r = 5 > cfg.vol.o = [0, 0, 0] > > as defined in the function MEGplanar help. In the tutorial pdfs there > is mention to some .hdm files: is it possible to send me examples? > Maybe also for the electrodes and gradiometers. You'll probably have plenty of CTF headmodel files yourself, search your CTF datasets for files with the extension *.hdm. In CTF you can make them with the MRIViewer, and/or by using the CTF localSpheres program. I have attached two example files (you can look at them with any ascii editor), but remember that a localSpheres headmodel belongs to a specific dataset: the spheres and gradiometers are matched for that specific dataset and you cannot use the localspheres file for another dataset/session. To specify a headmodel from a file, you should use the field cfg.hdmfile, the field cfg.vol is used to specify a headmodel that is already in matlab memory (i.e. a manually created one). > The relative noise should be defined as 0.1 (corresponding to 10% of > the simulated signal)? And for the absolute noise, what are “defaults” > values for MEG data (units)? The "relative noise" is added to the data by computing the RMS value of the simulated dipole activity ands then adding gaussian noise with unit variance to each channel multiplied by cfg.relnoise times the RMS value. The "absolute noise" is added to teh data by multiplying gausian white noise with unit variance multiplied by cfg.absnoise. There are no defaults there. Meaningfull values depend on the size of your dipole signal, and that depends on the size of the dipole moment. Furthermore, it all depends on the units of the dipole, gradiometers and volume model (i.e. cm or m). Fieldtrip is ignorant for these units, and therefore it is not feasible to give a prior estimate of the size (in T or fT) of the simulated data. I suggest that you first compute the simulated data with no noise, look at the signals using the plain Matlab plot() function and then decide how much noise you want to add. > How to define a dipole that would have different strength in each > trial? That is done by specifying cfg.dip.signal (as oppsed to specifying cfg.dip.frequency/phase). This cfg.dip.signal can be a cell-array, with each cell being a vector representing the strength of the dipole in that specific trial. I.e. for trl=1:Ntrials cfg.dip.signal{trl} = randn(1, Nsamples); end will make Ntrials, each having Nsamples and with a random strength for the dipole. > Thanks for your time, > Teresa best regards, Robert From chinawu2003 at YAHOO.COM Fri Dec 3 17:30:57 2004 From: chinawu2003 at YAHOO.COM (Bin Wu) Date: Fri, 3 Dec 2004 08:30:57 -0800 Subject: Virtual Channel In-Reply-To: <6336DF7E-4533-11D9-9C3A-000D936F1522@fcdonders.ru.nl> Message-ID: Dear Experts, Could you please help me out for the following two questions? Thanks a lot. 1. How to read virtual channels data with FieldTrip codes? 2. Why there are different extreme value localizations with axial gradiometer and planar gradiometer respectively for a given magetic dipole source? As I understand, the localizations of extreme values are also fixed in space if the source is fixed no matter what sensor one uses to pick up the output signals (just like EEG). But why the extreme are at each side of the fixed dipole for axial gradiometer, but is just above the dipole source for planar gradiometer. Thanks, Bin __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com From Jan.Schoffelen at FCDONDERS.RU.NL Tue Dec 7 09:38:43 2004 From: Jan.Schoffelen at FCDONDERS.RU.NL (J.M. Schoffelen) Date: Tue, 7 Dec 2004 09:38:43 +0100 Subject: Virtual Channel In-Reply-To: <20041203163057.38526.qmail@web50906.mail.yahoo.com> Message-ID: Dear Bin, Here are some answers to your questions: 1. How to read virtual channels data with FieldTrip codes? Provided you have your virtual-channel data in a file-format that fieldtrip can handle, it would not be too difficult to read them in. As far as I know, for example in CTF-datasets, virtual channels are saved along with the raw data, and they are given a specific label, which you can use when you read in the data in preprocessing: cfg.channel = {'name of virtual channel'}; On the other hand, you can create your own virtual channels within fieldtrip by using the 'lcmv'-option in the sourceanalysis-function. 2. Why there are different extreme value localizations with axial gradiometer and planar gradiometer respectively for a given magetic dipole source? As I understand, the localizations of extreme values are also fixed in space if the source is fixed no matter what sensor one uses to pick up the output signals (just like EEG). But why the extreme are at each side of the fixed dipole for axial gradiometer, but is just above the dipole source for planar gradiometer. There is actually a very big difference between what a planar gradiometer picks up as compared to an axial gradiometer! Imagine a horizontal wire through which is passed an electrical current. This generates a cilindrical magnetic field around the wire, according to the right hand rule. A gradiometer-array above the wire picks up this magnetic field. An axial gradiometer array is most sensitive to a magnetic field perpendicular to the surface, so it will 'give the highest signal' on both sides of the wire (=dipole), which are of opposite sign. On the other hand, a planar gradiometer is most sensitive to a magnetic field parallel to the surface, so it will 'give the highest signal' right above the wire. More info might be found on: http://butler.cc.tut.fi/~malmivuo/bem/bembook/ and http://butler.cc.tut.fi/~malmivuo/bem/bembook/14/14.htm#02/ Yours, Jan-Mathijs From ali.mazaheri at FCDONDERS.KUN.NL Sun Dec 12 21:38:10 2004 From: ali.mazaheri at FCDONDERS.KUN.NL (Ali Mazaheri) Date: Sun, 12 Dec 2004 21:38:10 +0100 Subject: selecting specific triggers Message-ID: Dear Collegues, a really simple question... I want to select trials that are based on a quite a simple conditional sequence of triggers. for example I want to define hits as trigger 7 followed by a 64 ( which is a response) within a duration of 300ms after the onset of trigger 7. and I want to define misses as trigger 7 that is not followed by a 64 How can I set this up. I know that it should be relativly easy and in the documentation there is mention of a definetrial function and a trialfun.. but no example to follow. or perhaps my brain has become worn out due to the festive season and alcholic beverages served at parties around this time. regardless any help would be greatly appreciated. kind regards ali From Jan.Schoffelen at FCDONDERS.RU.NL Mon Dec 13 09:27:23 2004 From: Jan.Schoffelen at FCDONDERS.RU.NL (J.M. Schoffelen) Date: Mon, 13 Dec 2004 09:27:23 +0100 Subject: selecting specific triggers In-Reply-To: Message-ID: Dear ali, Try the following function for the hits. The quiz is to adjust it yourself to detect the misses. JM PS: use cfg.trialfun = 'trigger2trial_ali'; -----Original Message----- From: FieldTrip discussion list [mailto:FIELDTRIP at NIC.SURFNET.NL] On Behalf Of Ali Mazaheri Sent: Sunday, December 12, 2004 9:38 PM To: FIELDTRIP at NIC.SURFNET.NL Subject: [FIELDTRIP] selecting specific triggers Dear Collegues, a really simple question... I want to select trials that are based on a quite a simple conditional sequence of triggers. for example I want to define hits as trigger 7 followed by a 64 ( which is a response) within a duration of 300ms after the onset of trigger 7. and I want to define misses as trigger 7 that is not followed by a 64 How can I set this up. I know that it should be relativly easy and in the documentation there is mention of a definetrial function and a trialfun.. but no example to follow. or perhaps my brain has become worn out due to the festive season and alcholic beverages served at parties around this time. regardless any help would be greatly appreciated. kind regards ali -------------- next part -------------- A non-text attachment was scrubbed... Name: trigger2trial_ali.m Type: application/octet-stream Size: 598 bytes Desc: not available URL: From Jan.Schoffelen at FCDONDERS.RU.NL Mon Dec 13 15:06:53 2004 From: Jan.Schoffelen at FCDONDERS.RU.NL (J.M. Schoffelen) Date: Mon, 13 Dec 2004 15:06:53 +0100 Subject: thanks.. but one more.... In-Reply-To: <00cd01c4e11a$c9f3bd90$df020d0a@fcdonders.nl> Message-ID: What about taking as trlbegin = indx(j) - xxxx; trlend = indx(j+1) + yyyy; jm PS: the quiz now is to appropriately choose your xxxx, and yyyy. Happy computing! -------------- next part -------------- An HTML attachment was scrubbed... URL: From r.oostenveld at FCDONDERS.RU.NL Fri Dec 3 14:58:19 2004 From: r.oostenveld at FCDONDERS.RU.NL (Robert Oostenveld) Date: Fri, 3 Dec 2004 14:58:19 +0100 Subject: Fwd: dipolesimulation Message-ID: Hi Teresa, Let me answer your questions one by one. I'll also forward this message to the fieldtrip list, since other people might be interested in this as well. On Thu, 2 Dec 2004, Teresa Montez wrote: > > To simulate CTF data with the dipolesimulation what should I use as: > > elec.pnt > elec.label This defines electrode positions (pnt) and labels. For simulation CTF MEG data you do not have to specify this. > grad.pnt > grad.ori > grad.tra > grad.label This defines a gradiometer array, as explained in the faq on the homepage. You can define your own array with magnetometers and/or gradiometers. But you mention that you want to simulate CTF data, so I suggest that you use a gradiometer from one of your CTF recordings. If you do hdr = read_fcdc_header('Experiment_blabla.ds/Experiment_blabla.res4') i.e. read the CTF res4 file which actually contains the header information, then hdr will contain the field grad: hdr.grad.pnt (location of coils) hdr.grad.ori (orientation of coils) hdr.grad.tra (how to combine the coils in gradiometers) hdr.grad.label (labels of the gradiometers) > Maybe add some examples to the answer you have in the FAQ section of > the fieldtrip site. We are aware that we have to work on the tutorials, and I'll remember also to make a dipolesimulation tutorial. Right now we still have the problem that we cannot make the tutorial datasets available since the webserver does not allow us to put up large files, but that is also being looked into. > For the headmodel I am using > > cfg.vol.r = 5 > cfg.vol.o = [0, 0, 0] > > as defined in the function MEGplanar help. In the tutorial pdfs there > is mention to some .hdm files: is it possible to send me examples? > Maybe also for the electrodes and gradiometers. You'll probably have plenty of CTF headmodel files yourself, search your CTF datasets for files with the extension *.hdm. In CTF you can make them with the MRIViewer, and/or by using the CTF localSpheres program. I have attached two example files (you can look at them with any ascii editor), but remember that a localSpheres headmodel belongs to a specific dataset: the spheres and gradiometers are matched for that specific dataset and you cannot use the localspheres file for another dataset/session. To specify a headmodel from a file, you should use the field cfg.hdmfile, the field cfg.vol is used to specify a headmodel that is already in matlab memory (i.e. a manually created one). > The relative noise should be defined as 0.1 (corresponding to 10% of > the simulated signal)? And for the absolute noise, what are “defaults” > values for MEG data (units)? The "relative noise" is added to the data by computing the RMS value of the simulated dipole activity ands then adding gaussian noise with unit variance to each channel multiplied by cfg.relnoise times the RMS value. The "absolute noise" is added to teh data by multiplying gausian white noise with unit variance multiplied by cfg.absnoise. There are no defaults there. Meaningfull values depend on the size of your dipole signal, and that depends on the size of the dipole moment. Furthermore, it all depends on the units of the dipole, gradiometers and volume model (i.e. cm or m). Fieldtrip is ignorant for these units, and therefore it is not feasible to give a prior estimate of the size (in T or fT) of the simulated data. I suggest that you first compute the simulated data with no noise, look at the signals using the plain Matlab plot() function and then decide how much noise you want to add. > How to define a dipole that would have different strength in each > trial? That is done by specifying cfg.dip.signal (as oppsed to specifying cfg.dip.frequency/phase). This cfg.dip.signal can be a cell-array, with each cell being a vector representing the strength of the dipole in that specific trial. I.e. for trl=1:Ntrials cfg.dip.signal{trl} = randn(1, Nsamples); end will make Ntrials, each having Nsamples and with a random strength for the dipole. > Thanks for your time, > Teresa best regards, Robert From chinawu2003 at YAHOO.COM Fri Dec 3 17:30:57 2004 From: chinawu2003 at YAHOO.COM (Bin Wu) Date: Fri, 3 Dec 2004 08:30:57 -0800 Subject: Virtual Channel In-Reply-To: <6336DF7E-4533-11D9-9C3A-000D936F1522@fcdonders.ru.nl> Message-ID: Dear Experts, Could you please help me out for the following two questions? Thanks a lot. 1. How to read virtual channels data with FieldTrip codes? 2. Why there are different extreme value localizations with axial gradiometer and planar gradiometer respectively for a given magetic dipole source? As I understand, the localizations of extreme values are also fixed in space if the source is fixed no matter what sensor one uses to pick up the output signals (just like EEG). But why the extreme are at each side of the fixed dipole for axial gradiometer, but is just above the dipole source for planar gradiometer. Thanks, Bin __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com From Jan.Schoffelen at FCDONDERS.RU.NL Tue Dec 7 09:38:43 2004 From: Jan.Schoffelen at FCDONDERS.RU.NL (J.M. Schoffelen) Date: Tue, 7 Dec 2004 09:38:43 +0100 Subject: Virtual Channel In-Reply-To: <20041203163057.38526.qmail@web50906.mail.yahoo.com> Message-ID: Dear Bin, Here are some answers to your questions: 1. How to read virtual channels data with FieldTrip codes? Provided you have your virtual-channel data in a file-format that fieldtrip can handle, it would not be too difficult to read them in. As far as I know, for example in CTF-datasets, virtual channels are saved along with the raw data, and they are given a specific label, which you can use when you read in the data in preprocessing: cfg.channel = {'name of virtual channel'}; On the other hand, you can create your own virtual channels within fieldtrip by using the 'lcmv'-option in the sourceanalysis-function. 2. Why there are different extreme value localizations with axial gradiometer and planar gradiometer respectively for a given magetic dipole source? As I understand, the localizations of extreme values are also fixed in space if the source is fixed no matter what sensor one uses to pick up the output signals (just like EEG). But why the extreme are at each side of the fixed dipole for axial gradiometer, but is just above the dipole source for planar gradiometer. There is actually a very big difference between what a planar gradiometer picks up as compared to an axial gradiometer! Imagine a horizontal wire through which is passed an electrical current. This generates a cilindrical magnetic field around the wire, according to the right hand rule. A gradiometer-array above the wire picks up this magnetic field. An axial gradiometer array is most sensitive to a magnetic field perpendicular to the surface, so it will 'give the highest signal' on both sides of the wire (=dipole), which are of opposite sign. On the other hand, a planar gradiometer is most sensitive to a magnetic field parallel to the surface, so it will 'give the highest signal' right above the wire. More info might be found on: http://butler.cc.tut.fi/~malmivuo/bem/bembook/ and http://butler.cc.tut.fi/~malmivuo/bem/bembook/14/14.htm#02/ Yours, Jan-Mathijs From ali.mazaheri at FCDONDERS.KUN.NL Sun Dec 12 21:38:10 2004 From: ali.mazaheri at FCDONDERS.KUN.NL (Ali Mazaheri) Date: Sun, 12 Dec 2004 21:38:10 +0100 Subject: selecting specific triggers Message-ID: Dear Collegues, a really simple question... I want to select trials that are based on a quite a simple conditional sequence of triggers. for example I want to define hits as trigger 7 followed by a 64 ( which is a response) within a duration of 300ms after the onset of trigger 7. and I want to define misses as trigger 7 that is not followed by a 64 How can I set this up. I know that it should be relativly easy and in the documentation there is mention of a definetrial function and a trialfun.. but no example to follow. or perhaps my brain has become worn out due to the festive season and alcholic beverages served at parties around this time. regardless any help would be greatly appreciated. kind regards ali From Jan.Schoffelen at FCDONDERS.RU.NL Mon Dec 13 09:27:23 2004 From: Jan.Schoffelen at FCDONDERS.RU.NL (J.M. Schoffelen) Date: Mon, 13 Dec 2004 09:27:23 +0100 Subject: selecting specific triggers In-Reply-To: Message-ID: Dear ali, Try the following function for the hits. The quiz is to adjust it yourself to detect the misses. JM PS: use cfg.trialfun = 'trigger2trial_ali'; -----Original Message----- From: FieldTrip discussion list [mailto:FIELDTRIP at NIC.SURFNET.NL] On Behalf Of Ali Mazaheri Sent: Sunday, December 12, 2004 9:38 PM To: FIELDTRIP at NIC.SURFNET.NL Subject: [FIELDTRIP] selecting specific triggers Dear Collegues, a really simple question... I want to select trials that are based on a quite a simple conditional sequence of triggers. for example I want to define hits as trigger 7 followed by a 64 ( which is a response) within a duration of 300ms after the onset of trigger 7. and I want to define misses as trigger 7 that is not followed by a 64 How can I set this up. I know that it should be relativly easy and in the documentation there is mention of a definetrial function and a trialfun.. but no example to follow. or perhaps my brain has become worn out due to the festive season and alcholic beverages served at parties around this time. regardless any help would be greatly appreciated. kind regards ali -------------- next part -------------- A non-text attachment was scrubbed... Name: trigger2trial_ali.m Type: application/octet-stream Size: 598 bytes Desc: not available URL: From Jan.Schoffelen at FCDONDERS.RU.NL Mon Dec 13 15:06:53 2004 From: Jan.Schoffelen at FCDONDERS.RU.NL (J.M. Schoffelen) Date: Mon, 13 Dec 2004 15:06:53 +0100 Subject: thanks.. but one more.... In-Reply-To: <00cd01c4e11a$c9f3bd90$df020d0a@fcdonders.nl> Message-ID: What about taking as trlbegin = indx(j) - xxxx; trlend = indx(j+1) + yyyy; jm PS: the quiz now is to appropriately choose your xxxx, and yyyy. Happy computing! -------------- next part -------------- An HTML attachment was scrubbed... URL: From r.oostenveld at FCDONDERS.RU.NL Fri Dec 3 14:58:19 2004 From: r.oostenveld at FCDONDERS.RU.NL (Robert Oostenveld) Date: Fri, 3 Dec 2004 14:58:19 +0100 Subject: Fwd: dipolesimulation Message-ID: Hi Teresa, Let me answer your questions one by one. I'll also forward this message to the fieldtrip list, since other people might be interested in this as well. On Thu, 2 Dec 2004, Teresa Montez wrote: > > To simulate CTF data with the dipolesimulation what should I use as: > > elec.pnt > elec.label This defines electrode positions (pnt) and labels. For simulation CTF MEG data you do not have to specify this. > grad.pnt > grad.ori > grad.tra > grad.label This defines a gradiometer array, as explained in the faq on the homepage. You can define your own array with magnetometers and/or gradiometers. But you mention that you want to simulate CTF data, so I suggest that you use a gradiometer from one of your CTF recordings. If you do hdr = read_fcdc_header('Experiment_blabla.ds/Experiment_blabla.res4') i.e. read the CTF res4 file which actually contains the header information, then hdr will contain the field grad: hdr.grad.pnt (location of coils) hdr.grad.ori (orientation of coils) hdr.grad.tra (how to combine the coils in gradiometers) hdr.grad.label (labels of the gradiometers) > Maybe add some examples to the answer you have in the FAQ section of > the fieldtrip site. We are aware that we have to work on the tutorials, and I'll remember also to make a dipolesimulation tutorial. Right now we still have the problem that we cannot make the tutorial datasets available since the webserver does not allow us to put up large files, but that is also being looked into. > For the headmodel I am using > > cfg.vol.r = 5 > cfg.vol.o = [0, 0, 0] > > as defined in the function MEGplanar help. In the tutorial pdfs there > is mention to some .hdm files: is it possible to send me examples? > Maybe also for the electrodes and gradiometers. You'll probably have plenty of CTF headmodel files yourself, search your CTF datasets for files with the extension *.hdm. In CTF you can make them with the MRIViewer, and/or by using the CTF localSpheres program. I have attached two example files (you can look at them with any ascii editor), but remember that a localSpheres headmodel belongs to a specific dataset: the spheres and gradiometers are matched for that specific dataset and you cannot use the localspheres file for another dataset/session. To specify a headmodel from a file, you should use the field cfg.hdmfile, the field cfg.vol is used to specify a headmodel that is already in matlab memory (i.e. a manually created one). > The relative noise should be defined as 0.1 (corresponding to 10% of > the simulated signal)? And for the absolute noise, what are “defaults” > values for MEG data (units)? The "relative noise" is added to the data by computing the RMS value of the simulated dipole activity ands then adding gaussian noise with unit variance to each channel multiplied by cfg.relnoise times the RMS value. The "absolute noise" is added to teh data by multiplying gausian white noise with unit variance multiplied by cfg.absnoise. There are no defaults there. Meaningfull values depend on the size of your dipole signal, and that depends on the size of the dipole moment. Furthermore, it all depends on the units of the dipole, gradiometers and volume model (i.e. cm or m). Fieldtrip is ignorant for these units, and therefore it is not feasible to give a prior estimate of the size (in T or fT) of the simulated data. I suggest that you first compute the simulated data with no noise, look at the signals using the plain Matlab plot() function and then decide how much noise you want to add. > How to define a dipole that would have different strength in each > trial? That is done by specifying cfg.dip.signal (as oppsed to specifying cfg.dip.frequency/phase). This cfg.dip.signal can be a cell-array, with each cell being a vector representing the strength of the dipole in that specific trial. I.e. for trl=1:Ntrials cfg.dip.signal{trl} = randn(1, Nsamples); end will make Ntrials, each having Nsamples and with a random strength for the dipole. > Thanks for your time, > Teresa best regards, Robert From chinawu2003 at YAHOO.COM Fri Dec 3 17:30:57 2004 From: chinawu2003 at YAHOO.COM (Bin Wu) Date: Fri, 3 Dec 2004 08:30:57 -0800 Subject: Virtual Channel In-Reply-To: <6336DF7E-4533-11D9-9C3A-000D936F1522@fcdonders.ru.nl> Message-ID: Dear Experts, Could you please help me out for the following two questions? Thanks a lot. 1. How to read virtual channels data with FieldTrip codes? 2. Why there are different extreme value localizations with axial gradiometer and planar gradiometer respectively for a given magetic dipole source? As I understand, the localizations of extreme values are also fixed in space if the source is fixed no matter what sensor one uses to pick up the output signals (just like EEG). But why the extreme are at each side of the fixed dipole for axial gradiometer, but is just above the dipole source for planar gradiometer. Thanks, Bin __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com From Jan.Schoffelen at FCDONDERS.RU.NL Tue Dec 7 09:38:43 2004 From: Jan.Schoffelen at FCDONDERS.RU.NL (J.M. Schoffelen) Date: Tue, 7 Dec 2004 09:38:43 +0100 Subject: Virtual Channel In-Reply-To: <20041203163057.38526.qmail@web50906.mail.yahoo.com> Message-ID: Dear Bin, Here are some answers to your questions: 1. How to read virtual channels data with FieldTrip codes? Provided you have your virtual-channel data in a file-format that fieldtrip can handle, it would not be too difficult to read them in. As far as I know, for example in CTF-datasets, virtual channels are saved along with the raw data, and they are given a specific label, which you can use when you read in the data in preprocessing: cfg.channel = {'name of virtual channel'}; On the other hand, you can create your own virtual channels within fieldtrip by using the 'lcmv'-option in the sourceanalysis-function. 2. Why there are different extreme value localizations with axial gradiometer and planar gradiometer respectively for a given magetic dipole source? As I understand, the localizations of extreme values are also fixed in space if the source is fixed no matter what sensor one uses to pick up the output signals (just like EEG). But why the extreme are at each side of the fixed dipole for axial gradiometer, but is just above the dipole source for planar gradiometer. There is actually a very big difference between what a planar gradiometer picks up as compared to an axial gradiometer! Imagine a horizontal wire through which is passed an electrical current. This generates a cilindrical magnetic field around the wire, according to the right hand rule. A gradiometer-array above the wire picks up this magnetic field. An axial gradiometer array is most sensitive to a magnetic field perpendicular to the surface, so it will 'give the highest signal' on both sides of the wire (=dipole), which are of opposite sign. On the other hand, a planar gradiometer is most sensitive to a magnetic field parallel to the surface, so it will 'give the highest signal' right above the wire. More info might be found on: http://butler.cc.tut.fi/~malmivuo/bem/bembook/ and http://butler.cc.tut.fi/~malmivuo/bem/bembook/14/14.htm#02/ Yours, Jan-Mathijs From ali.mazaheri at FCDONDERS.KUN.NL Sun Dec 12 21:38:10 2004 From: ali.mazaheri at FCDONDERS.KUN.NL (Ali Mazaheri) Date: Sun, 12 Dec 2004 21:38:10 +0100 Subject: selecting specific triggers Message-ID: Dear Collegues, a really simple question... I want to select trials that are based on a quite a simple conditional sequence of triggers. for example I want to define hits as trigger 7 followed by a 64 ( which is a response) within a duration of 300ms after the onset of trigger 7. and I want to define misses as trigger 7 that is not followed by a 64 How can I set this up. I know that it should be relativly easy and in the documentation there is mention of a definetrial function and a trialfun.. but no example to follow. or perhaps my brain has become worn out due to the festive season and alcholic beverages served at parties around this time. regardless any help would be greatly appreciated. kind regards ali From Jan.Schoffelen at FCDONDERS.RU.NL Mon Dec 13 09:27:23 2004 From: Jan.Schoffelen at FCDONDERS.RU.NL (J.M. Schoffelen) Date: Mon, 13 Dec 2004 09:27:23 +0100 Subject: selecting specific triggers In-Reply-To: Message-ID: Dear ali, Try the following function for the hits. The quiz is to adjust it yourself to detect the misses. JM PS: use cfg.trialfun = 'trigger2trial_ali'; -----Original Message----- From: FieldTrip discussion list [mailto:FIELDTRIP at NIC.SURFNET.NL] On Behalf Of Ali Mazaheri Sent: Sunday, December 12, 2004 9:38 PM To: FIELDTRIP at NIC.SURFNET.NL Subject: [FIELDTRIP] selecting specific triggers Dear Collegues, a really simple question... I want to select trials that are based on a quite a simple conditional sequence of triggers. for example I want to define hits as trigger 7 followed by a 64 ( which is a response) within a duration of 300ms after the onset of trigger 7. and I want to define misses as trigger 7 that is not followed by a 64 How can I set this up. I know that it should be relativly easy and in the documentation there is mention of a definetrial function and a trialfun.. but no example to follow. or perhaps my brain has become worn out due to the festive season and alcholic beverages served at parties around this time. regardless any help would be greatly appreciated. kind regards ali -------------- next part -------------- A non-text attachment was scrubbed... Name: trigger2trial_ali.m Type: application/octet-stream Size: 598 bytes Desc: not available URL: From Jan.Schoffelen at FCDONDERS.RU.NL Mon Dec 13 15:06:53 2004 From: Jan.Schoffelen at FCDONDERS.RU.NL (J.M. Schoffelen) Date: Mon, 13 Dec 2004 15:06:53 +0100 Subject: thanks.. but one more.... In-Reply-To: <00cd01c4e11a$c9f3bd90$df020d0a@fcdonders.nl> Message-ID: What about taking as trlbegin = indx(j) - xxxx; trlend = indx(j+1) + yyyy; jm PS: the quiz now is to appropriately choose your xxxx, and yyyy. Happy computing! -------------- next part -------------- An HTML attachment was scrubbed... URL: From r.oostenveld at FCDONDERS.RU.NL Fri Dec 3 14:58:19 2004 From: r.oostenveld at FCDONDERS.RU.NL (Robert Oostenveld) Date: Fri, 3 Dec 2004 14:58:19 +0100 Subject: Fwd: dipolesimulation Message-ID: Hi Teresa, Let me answer your questions one by one. I'll also forward this message to the fieldtrip list, since other people might be interested in this as well. On Thu, 2 Dec 2004, Teresa Montez wrote: > > To simulate CTF data with the dipolesimulation what should I use as: > > elec.pnt > elec.label This defines electrode positions (pnt) and labels. For simulation CTF MEG data you do not have to specify this. > grad.pnt > grad.ori > grad.tra > grad.label This defines a gradiometer array, as explained in the faq on the homepage. You can define your own array with magnetometers and/or gradiometers. But you mention that you want to simulate CTF data, so I suggest that you use a gradiometer from one of your CTF recordings. If you do hdr = read_fcdc_header('Experiment_blabla.ds/Experiment_blabla.res4') i.e. read the CTF res4 file which actually contains the header information, then hdr will contain the field grad: hdr.grad.pnt (location of coils) hdr.grad.ori (orientation of coils) hdr.grad.tra (how to combine the coils in gradiometers) hdr.grad.label (labels of the gradiometers) > Maybe add some examples to the answer you have in the FAQ section of > the fieldtrip site. We are aware that we have to work on the tutorials, and I'll remember also to make a dipolesimulation tutorial. Right now we still have the problem that we cannot make the tutorial datasets available since the webserver does not allow us to put up large files, but that is also being looked into. > For the headmodel I am using > > cfg.vol.r = 5 > cfg.vol.o = [0, 0, 0] > > as defined in the function MEGplanar help. In the tutorial pdfs there > is mention to some .hdm files: is it possible to send me examples? > Maybe also for the electrodes and gradiometers. You'll probably have plenty of CTF headmodel files yourself, search your CTF datasets for files with the extension *.hdm. In CTF you can make them with the MRIViewer, and/or by using the CTF localSpheres program. I have attached two example files (you can look at them with any ascii editor), but remember that a localSpheres headmodel belongs to a specific dataset: the spheres and gradiometers are matched for that specific dataset and you cannot use the localspheres file for another dataset/session. To specify a headmodel from a file, you should use the field cfg.hdmfile, the field cfg.vol is used to specify a headmodel that is already in matlab memory (i.e. a manually created one). > The relative noise should be defined as 0.1 (corresponding to 10% of > the simulated signal)? And for the absolute noise, what are “defaults” > values for MEG data (units)? The "relative noise" is added to the data by computing the RMS value of the simulated dipole activity ands then adding gaussian noise with unit variance to each channel multiplied by cfg.relnoise times the RMS value. The "absolute noise" is added to teh data by multiplying gausian white noise with unit variance multiplied by cfg.absnoise. There are no defaults there. Meaningfull values depend on the size of your dipole signal, and that depends on the size of the dipole moment. Furthermore, it all depends on the units of the dipole, gradiometers and volume model (i.e. cm or m). Fieldtrip is ignorant for these units, and therefore it is not feasible to give a prior estimate of the size (in T or fT) of the simulated data. I suggest that you first compute the simulated data with no noise, look at the signals using the plain Matlab plot() function and then decide how much noise you want to add. > How to define a dipole that would have different strength in each > trial? That is done by specifying cfg.dip.signal (as oppsed to specifying cfg.dip.frequency/phase). This cfg.dip.signal can be a cell-array, with each cell being a vector representing the strength of the dipole in that specific trial. I.e. for trl=1:Ntrials cfg.dip.signal{trl} = randn(1, Nsamples); end will make Ntrials, each having Nsamples and with a random strength for the dipole. > Thanks for your time, > Teresa best regards, Robert From chinawu2003 at YAHOO.COM Fri Dec 3 17:30:57 2004 From: chinawu2003 at YAHOO.COM (Bin Wu) Date: Fri, 3 Dec 2004 08:30:57 -0800 Subject: Virtual Channel In-Reply-To: <6336DF7E-4533-11D9-9C3A-000D936F1522@fcdonders.ru.nl> Message-ID: Dear Experts, Could you please help me out for the following two questions? Thanks a lot. 1. How to read virtual channels data with FieldTrip codes? 2. Why there are different extreme value localizations with axial gradiometer and planar gradiometer respectively for a given magetic dipole source? As I understand, the localizations of extreme values are also fixed in space if the source is fixed no matter what sensor one uses to pick up the output signals (just like EEG). But why the extreme are at each side of the fixed dipole for axial gradiometer, but is just above the dipole source for planar gradiometer. Thanks, Bin __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com From Jan.Schoffelen at FCDONDERS.RU.NL Tue Dec 7 09:38:43 2004 From: Jan.Schoffelen at FCDONDERS.RU.NL (J.M. Schoffelen) Date: Tue, 7 Dec 2004 09:38:43 +0100 Subject: Virtual Channel In-Reply-To: <20041203163057.38526.qmail@web50906.mail.yahoo.com> Message-ID: Dear Bin, Here are some answers to your questions: 1. How to read virtual channels data with FieldTrip codes? Provided you have your virtual-channel data in a file-format that fieldtrip can handle, it would not be too difficult to read them in. As far as I know, for example in CTF-datasets, virtual channels are saved along with the raw data, and they are given a specific label, which you can use when you read in the data in preprocessing: cfg.channel = {'name of virtual channel'}; On the other hand, you can create your own virtual channels within fieldtrip by using the 'lcmv'-option in the sourceanalysis-function. 2. Why there are different extreme value localizations with axial gradiometer and planar gradiometer respectively for a given magetic dipole source? As I understand, the localizations of extreme values are also fixed in space if the source is fixed no matter what sensor one uses to pick up the output signals (just like EEG). But why the extreme are at each side of the fixed dipole for axial gradiometer, but is just above the dipole source for planar gradiometer. There is actually a very big difference between what a planar gradiometer picks up as compared to an axial gradiometer! Imagine a horizontal wire through which is passed an electrical current. This generates a cilindrical magnetic field around the wire, according to the right hand rule. A gradiometer-array above the wire picks up this magnetic field. An axial gradiometer array is most sensitive to a magnetic field perpendicular to the surface, so it will 'give the highest signal' on both sides of the wire (=dipole), which are of opposite sign. On the other hand, a planar gradiometer is most sensitive to a magnetic field parallel to the surface, so it will 'give the highest signal' right above the wire. More info might be found on: http://butler.cc.tut.fi/~malmivuo/bem/bembook/ and http://butler.cc.tut.fi/~malmivuo/bem/bembook/14/14.htm#02/ Yours, Jan-Mathijs From ali.mazaheri at FCDONDERS.KUN.NL Sun Dec 12 21:38:10 2004 From: ali.mazaheri at FCDONDERS.KUN.NL (Ali Mazaheri) Date: Sun, 12 Dec 2004 21:38:10 +0100 Subject: selecting specific triggers Message-ID: Dear Collegues, a really simple question... I want to select trials that are based on a quite a simple conditional sequence of triggers. for example I want to define hits as trigger 7 followed by a 64 ( which is a response) within a duration of 300ms after the onset of trigger 7. and I want to define misses as trigger 7 that is not followed by a 64 How can I set this up. I know that it should be relativly easy and in the documentation there is mention of a definetrial function and a trialfun.. but no example to follow. or perhaps my brain has become worn out due to the festive season and alcholic beverages served at parties around this time. regardless any help would be greatly appreciated. kind regards ali From Jan.Schoffelen at FCDONDERS.RU.NL Mon Dec 13 09:27:23 2004 From: Jan.Schoffelen at FCDONDERS.RU.NL (J.M. Schoffelen) Date: Mon, 13 Dec 2004 09:27:23 +0100 Subject: selecting specific triggers In-Reply-To: Message-ID: Dear ali, Try the following function for the hits. The quiz is to adjust it yourself to detect the misses. JM PS: use cfg.trialfun = 'trigger2trial_ali'; -----Original Message----- From: FieldTrip discussion list [mailto:FIELDTRIP at NIC.SURFNET.NL] On Behalf Of Ali Mazaheri Sent: Sunday, December 12, 2004 9:38 PM To: FIELDTRIP at NIC.SURFNET.NL Subject: [FIELDTRIP] selecting specific triggers Dear Collegues, a really simple question... I want to select trials that are based on a quite a simple conditional sequence of triggers. for example I want to define hits as trigger 7 followed by a 64 ( which is a response) within a duration of 300ms after the onset of trigger 7. and I want to define misses as trigger 7 that is not followed by a 64 How can I set this up. I know that it should be relativly easy and in the documentation there is mention of a definetrial function and a trialfun.. but no example to follow. or perhaps my brain has become worn out due to the festive season and alcholic beverages served at parties around this time. regardless any help would be greatly appreciated. kind regards ali -------------- next part -------------- A non-text attachment was scrubbed... Name: trigger2trial_ali.m Type: application/octet-stream Size: 598 bytes Desc: not available URL: From Jan.Schoffelen at FCDONDERS.RU.NL Mon Dec 13 15:06:53 2004 From: Jan.Schoffelen at FCDONDERS.RU.NL (J.M. Schoffelen) Date: Mon, 13 Dec 2004 15:06:53 +0100 Subject: thanks.. but one more.... In-Reply-To: <00cd01c4e11a$c9f3bd90$df020d0a@fcdonders.nl> Message-ID: What about taking as trlbegin = indx(j) - xxxx; trlend = indx(j+1) + yyyy; jm PS: the quiz now is to appropriately choose your xxxx, and yyyy. Happy computing! -------------- next part -------------- An HTML attachment was scrubbed... URL: