From werkle at MPIB-BERLIN.MPG.DE Tue Jan 3 16:00:52 2006 From: werkle at MPIB-BERLIN.MPG.DE (Markus Werkle-Bergner) Date: Tue, 3 Jan 2006 16:00:52 +0100 Subject: Filter ERPs for Display In-Reply-To: Message-ID: Dear all, I would like to use a filter before displaying ERPs with fieldtrip. Is there a possibility to just apply a lp-filter to averaged ERP, without going back to preprocessing? Best regards, Markus From r.oostenveld at FCDONDERS.RU.NL Tue Jan 3 17:21:21 2006 From: r.oostenveld at FCDONDERS.RU.NL (Robert Oostenveld) Date: Tue, 3 Jan 2006 17:21:21 +0100 Subject: Filter ERPs for Display In-Reply-To: <43BA91A4.8040102@mpib-berlin.mpg.de> Message-ID: Dear Markus, On 3-jan-2006, at 16:00, Markus Werkle-Bergner wrote: > I would like to use a filter before displaying ERPs with fieldtrip. > Is there a possibility to just apply a lp-filter to averaged ERP, > without going back to preprocessing? Yes, you can use an undocumented option of TIMELOCKANALYSIS, or actually two: First, the timelockanalysis function is designed for raw data (from preprocessing) but will also accept the output of timelockanalysis as its input (instead of raw). And second, timelockanalysis has the same options for filtering as preprocessing has. So you should be able to do something like cfg = [] cfg = ... raw = preprocessing(cfg) cfg = [] avg = timelockanalysis(cfg) figure; plot(avg.time, avg.avg, 'r'); cfg = [] cfg.lpfilter = 'yes' cfg.lpfreq = 30 avg_filt = timelockanalysis(cfg) hold on; plot(avg_filt.time, avg_filt.avg, 'b'); and then you should get a figure with the filtered and unfiltered data plotted over each other. best, Robert PS the reason sofar for keeping it as an undocumented feature is that we prefer people to do the filtering on the raw data, and use filterpadding (i.e. read some extra data on both sides, apply the filter and then throw away the signal at the edges). This is implemented in preprocessing where the continuous data is available from the original file, but this type of padding can of course not be done any more on the ERP. From r.oostenveld at FCDONDERS.RU.NL Thu Jan 12 16:01:07 2006 From: r.oostenveld at FCDONDERS.RU.NL (Robert Oostenveld) Date: Thu, 12 Jan 2006 16:01:07 +0100 Subject: update: volume functions Message-ID: Dear fieldtrip users, I have updated the functions that operate on functional and on anatomical volumes, and maybe even more important for you, I have also changed the name of some of the functions. Most functions that work on anatomical/functional volume data (i.e. MRI and beamformer source reconstructions) now are named volumeXXX.m. That makes it easier to find them (type "volume" and press a few times tab in Matlab), and also makes it more clear that they belong together. The affected functions are old name -> new name downsamplevolume -> volumedownsample normalisevolume -> volumenormalise segmentvolume -> volumesegment sourcewrite -> volumewrite bvwrite -> volumewrite Furthermore, the new volumewrite function now also supports exporting co-registered anatomical and functional volume data to BrainVoyager format. For backward compatibility with your existing scripts (and with the slightly outdated fieldtrip tutorials), the old functions still exist. They will give a warning message if you use them, and then call the new replacement function. Please adjust your scripts to the new function names. The new functions will be included in the next daily ftp release, which means that you can download them tomorrow. If you encounter any difficulties, please let us now through the fieldtrip mailing list. best regards, Robert From r.oostenveld at FCDONDERS.RU.NL Tue Jan 17 13:28:20 2006 From: r.oostenveld at FCDONDERS.RU.NL (Robert Oostenveld) Date: Tue, 17 Jan 2006 13:28:20 +0100 Subject: update: artifact detection Message-ID: Dear Fieldtrip users, I have updated the artifact detection functions (artiact_xxx, where xxx=jump, eog and muscle). Each of these three functions was already based on the same underlying idea, namely to filter and preprocess the data, then z-transform the result, cummulate the z-values over channels and finally look for z-values that are larger than the cutoff level. To reflect this similarity, I have created a new function: artifact_zvalue. Each of the artifact_jump, eog and muscle functions now sets some default values and then calls artifact_zvalue. That facilitates the maintenance and ensures that all functions behave the same regarding graphical feedback. From now on, you can also visually verify the trial definition and the detected artifacts in rejectartifact, using cfg.artfctdef.feedback=yes. Most important for you to know is that: 1) the new functions should be largely backward compatible. The filtering and preprocessing computations were only marginally changed, so the outcome should be almost the same. 2) the padding has been better defined. I will also write an artifact detection tutorial that explains these padding values better. 3) the new artifact detections functions (for jump, eog and muscle) now only will work on continuous and pseudo-continuous data. Jumps in the data at the trial boundaries for non-continous data are not dealt with and will mess up the result so --if you want to use them on trial-based data-- you are responsible yourself for configuring the padding options correctly. 4) the old functions are still available, with the name artifact_xxx_old (where xxx=jump, eog and muscle). If you want to use them, you should specify cfg.artifact.type={'eog_old', ...} and call the rejectartifact function. The idea (which I will describe in the upcoming "artifact tutorial") is that you do not use cfg.rejectjump/muscle/eog=yes any more in the preprocessing cfg structure, but that you do the following steps seperately: cfg = something to start with... cfg = definetrial(cfg) cfg = artifact_eog(cfg) cfg = artifact_eog(cfg) cfg = artifact_jump(cfg) cfg = artifact_muscle(cfg) cfg = rejectartifact(cfg) data = preprocessing(cfg) The fieldtrip version on home/common (inside the FCDC) will be updated this afternoon. The fieldtrip version on the ftp server (outside the FCDC) will be updated this evening. Since it is a large change in the fieldtrip code, bugs might have crept in. Please be extra cautious the upcoming time and report unusual behaviour. Sorry for the inconvenience that this may result in. best regards, Robert ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Robert Oostenveld, PhD F.C. Donders Centre for Cognitive Neuroimaging Radboud University Nijmegen phone: +31-24-3619695 http://www.ru.nl/fcdonders/ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ From muthuraman10 at HOTMAIL.COM Wed Jan 18 11:44:58 2006 From: muthuraman10 at HOTMAIL.COM (Muthuraman Muthuraman) Date: Wed, 18 Jan 2006 10:44:58 +0000 Subject: query on loading CNT files Message-ID: hello I would like to use fieldtrip to analyse EEG recordings how to load CNT files which contains the data how can i load the data and do the analysis with regards muthuraman From r.oostenveld at FCDONDERS.RU.NL Wed Jan 18 21:20:37 2006 From: r.oostenveld at FCDONDERS.RU.NL (Robert Oostenveld) Date: Wed, 18 Jan 2006 21:20:37 +0100 Subject: query on loading CNT files In-Reply-To: Message-ID: Dear Muthuraman All analyses start by calling the PREPROCESSING function, which reads the data segments of interest into memory. Prior to that, you should call DEFINETRIAL to determine the data segments of interest (usually based on the triggers present in the datafile). Please see the help of those two functions (type "help function_name" on the matlab command line) or look at http://www2.ru.nl/fcdonders/fieldtrip/ reference.html best regards Robert On 18-jan-2006, at 11:44, Muthuraman Muthuraman wrote: > hello > > I would like to use fieldtrip to analyse EEG recordings > how to load CNT files which contains the data > how can i load the data and do the analysis > > > with regards > muthuraman > ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Robert Oostenveld, PhD F.C. Donders Centre for Cognitive Neuroimaging Radboud University Nijmegen phone: +31-24-3619695 http://www.ru.nl/fcdonders/ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ From muthuraman10 at HOTMAIL.COM Tue Jan 24 11:46:57 2006 From: muthuraman10 at HOTMAIL.COM (Muthuraman Muthuraman) Date: Tue, 24 Jan 2006 10:46:57 +0000 Subject: query on loading CNT files In-Reply-To: <2DEC8B92-587B-4CFF-8A5D-A0B8E3833510@fcdonders.ru.nl> Message-ID: hello I am beginner with field trip as in the previous mail i have asked about the query on loading CNT files and according to the reply i need to call the function DEFINETRAIL in the function DEFINETRAIL i have to use the READ_FCDC_EVENT to find the events in the data which gave warnings i have attached in the mail what were exactly the steps carried out for the EEG analysis 'pd_mof_tr0_o_0307.cnt' is the file which contains the data >>headerfile='pd_mof_tr0_o_0307.cnt'; >>[hdr] = read_fcdc_header(headerfile); Loading file pd_mof_tr0_o_0307.cnt ... >>hdr hdr = Fs: 1000 nChans: 64 nSamples: 172040 nSamplesPre: 0 nTrials: 1 label: {1x64 cell} >>datafile='pd_mof_tr0_o_0307.cnt';begsample=1;endsample=172;chanindx=64;continuous=1; >>[dat] = read_fcdc_data(datafile, hdr, begsample, endsample, chanindx, >>continuous); Loading file pd_mof_tr0_o_0307.cnt ... done >>filename='pd_mof_tr0_o_0307.cnt'; >>[event] = read_fcdc_event(filename) Warning: handling of event structure has not been fully tested for Neuroscan *.cnt files >In C:\muthu\work\fieldtrip-20060118\read_fcdc_event.m at line 414 Loading file pd_mof_tr0_o_0307.cnt ... done Warning: no events found in pd_mof_tr0_o_0307.cnt >In C:\muthu\work\fieldtrip-20060118\read_fcdc_event.m at line 620 event = [] Thanking you with regards muthuraman >From: Robert Oostenveld >Reply-To: FieldTrip discussion list >To: FIELDTRIP at NIC.SURFNET.NL >Subject: Re: [FIELDTRIP] query on loading CNT files >Date: Wed, 18 Jan 2006 21:20:37 +0100 > >Dear Muthuraman > >All analyses start by calling the PREPROCESSING function, which reads the >data segments of interest into memory. Prior to that, you should call >DEFINETRIAL to determine the data segments of interest (usually based on >the triggers present in the datafile). Please see the help of those two >functions (type "help function_name" on the matlab command line) or look >at http://www2.ru.nl/fcdonders/fieldtrip/ reference.html > >best regards >Robert > > >On 18-jan-2006, at 11:44, Muthuraman Muthuraman wrote: > >>hello >> >>I would like to use fieldtrip to analyse EEG recordings >>how to load CNT files which contains the data >>how can i load the data and do the analysis >> >> >>with regards >>muthuraman >> > > >~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ >Robert Oostenveld, PhD >F.C. Donders Centre for Cognitive Neuroimaging >Radboud University Nijmegen >phone: +31-24-3619695 >http://www.ru.nl/fcdonders/ >~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ From r.oostenveld at FCDONDERS.RU.NL Tue Jan 24 13:54:16 2006 From: r.oostenveld at FCDONDERS.RU.NL (Robert Oostenveld) Date: Tue, 24 Jan 2006 13:54:16 +0100 Subject: query on loading CNT files In-Reply-To: Message-ID: The relevant warning seems to be > Warning: no events found in pd_mof_tr0_o_0307.cnt That means that the low level code used to read the CNT file does not find any triggers in your datafile. That either means that the low level reading function (private/read_ns_cnt.m) has a bug, or that your data does not contain any triggers. If it does not contain triggers (i.e. if there are no trials in the data), you should make your own cfg.trl field prior to calling PREPROCESSING and skip preprocessing. The documentation of DEFINETRIAL explains what cfg.trl means. I suggest that you try something like hdr = read_fcdc_header(headerfile); cfg.trl = []; for i=1:floor(hdr.nSamples/hdr.Fs) cfg.trl(i,1) = (i-1)*hdr.Fs + 1; % begin sample of each trial cfg.trl(i,2) = (i )*hdr.Fs; % end sample cfg.trl(i,3) = 0; % offset, i.e. relative location of the time axis end data = preprocessing(cfg); This segments your continuous data in trials of one second length. best, Robert On 24-jan-2006, at 11:46, Muthuraman Muthuraman wrote: > hello > > I am beginner with field trip > as in the previous mail i have asked about the query on loading CNT > files > and according to the reply i need to call the function DEFINETRAIL > in the function DEFINETRAIL i have to use the READ_FCDC_EVENT to > find the events in the data > which gave warnings > > i have attached in the mail what were exactly the steps carried out > for the EEG analysis > > 'pd_mof_tr0_o_0307.cnt' is the file which contains the data > > > >>headerfile='pd_mof_tr0_o_0307.cnt'; >>> [hdr] = read_fcdc_header(headerfile); > Loading file pd_mof_tr0_o_0307.cnt ... >>> hdr > > hdr = > > Fs: 1000 > nChans: 64 > nSamples: 172040 > nSamplesPre: 0 > nTrials: 1 > label: {1x64 cell} > >>> datafile='pd_mof_tr0_o_0307.cnt';begsample=1;endsample=172;chanindx= >>> 64;continuous=1; >>> [dat] = read_fcdc_data(datafile, hdr, begsample, endsample, >>> chanindx, continuous); > Loading file pd_mof_tr0_o_0307.cnt ... > done >>> filename='pd_mof_tr0_o_0307.cnt'; >>> [event] = read_fcdc_event(filename) > Warning: handling of event structure has not been fully tested for > Neuroscan *.cnt files >> In C:\muthu\work\fieldtrip-20060118\read_fcdc_event.m at line 414 > Loading file pd_mof_tr0_o_0307.cnt ... > done > Warning: no events found in pd_mof_tr0_o_0307.cnt >> In C:\muthu\work\fieldtrip-20060118\read_fcdc_event.m at line 620 > > event = > > [] > > > Thanking you > with regards > muthuraman > >> From: Robert Oostenveld >> Reply-To: FieldTrip discussion list >> To: FIELDTRIP at NIC.SURFNET.NL >> Subject: Re: [FIELDTRIP] query on loading CNT files >> Date: Wed, 18 Jan 2006 21:20:37 +0100 >> >> Dear Muthuraman >> >> All analyses start by calling the PREPROCESSING function, which >> reads the data segments of interest into memory. Prior to that, >> you should call DEFINETRIAL to determine the data segments of >> interest (usually based on the triggers present in the datafile). >> Please see the help of those two functions (type "help >> function_name" on the matlab command line) or look at http:// >> www2.ru.nl/fcdonders/fieldtrip/ reference.html >> >> best regards >> Robert >> >> >> On 18-jan-2006, at 11:44, Muthuraman Muthuraman wrote: >> >>> hello >>> >>> I would like to use fieldtrip to analyse EEG recordings >>> how to load CNT files which contains the data >>> how can i load the data and do the analysis >>> >>> >>> with regards >>> muthuraman >>> >> >> >> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ >> Robert Oostenveld, PhD >> F.C. Donders Centre for Cognitive Neuroimaging >> Radboud University Nijmegen >> phone: +31-24-3619695 >> http://www.ru.nl/fcdonders/ >> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ > From werkle at MPIB-BERLIN.MPG.DE Tue Jan 3 16:00:52 2006 From: werkle at MPIB-BERLIN.MPG.DE (Markus Werkle-Bergner) Date: Tue, 3 Jan 2006 16:00:52 +0100 Subject: Filter ERPs for Display In-Reply-To: Message-ID: Dear all, I would like to use a filter before displaying ERPs with fieldtrip. Is there a possibility to just apply a lp-filter to averaged ERP, without going back to preprocessing? Best regards, Markus From r.oostenveld at FCDONDERS.RU.NL Tue Jan 3 17:21:21 2006 From: r.oostenveld at FCDONDERS.RU.NL (Robert Oostenveld) Date: Tue, 3 Jan 2006 17:21:21 +0100 Subject: Filter ERPs for Display In-Reply-To: <43BA91A4.8040102@mpib-berlin.mpg.de> Message-ID: Dear Markus, On 3-jan-2006, at 16:00, Markus Werkle-Bergner wrote: > I would like to use a filter before displaying ERPs with fieldtrip. > Is there a possibility to just apply a lp-filter to averaged ERP, > without going back to preprocessing? Yes, you can use an undocumented option of TIMELOCKANALYSIS, or actually two: First, the timelockanalysis function is designed for raw data (from preprocessing) but will also accept the output of timelockanalysis as its input (instead of raw). And second, timelockanalysis has the same options for filtering as preprocessing has. So you should be able to do something like cfg = [] cfg = ... raw = preprocessing(cfg) cfg = [] avg = timelockanalysis(cfg) figure; plot(avg.time, avg.avg, 'r'); cfg = [] cfg.lpfilter = 'yes' cfg.lpfreq = 30 avg_filt = timelockanalysis(cfg) hold on; plot(avg_filt.time, avg_filt.avg, 'b'); and then you should get a figure with the filtered and unfiltered data plotted over each other. best, Robert PS the reason sofar for keeping it as an undocumented feature is that we prefer people to do the filtering on the raw data, and use filterpadding (i.e. read some extra data on both sides, apply the filter and then throw away the signal at the edges). This is implemented in preprocessing where the continuous data is available from the original file, but this type of padding can of course not be done any more on the ERP. From r.oostenveld at FCDONDERS.RU.NL Thu Jan 12 16:01:07 2006 From: r.oostenveld at FCDONDERS.RU.NL (Robert Oostenveld) Date: Thu, 12 Jan 2006 16:01:07 +0100 Subject: update: volume functions Message-ID: Dear fieldtrip users, I have updated the functions that operate on functional and on anatomical volumes, and maybe even more important for you, I have also changed the name of some of the functions. Most functions that work on anatomical/functional volume data (i.e. MRI and beamformer source reconstructions) now are named volumeXXX.m. That makes it easier to find them (type "volume" and press a few times tab in Matlab), and also makes it more clear that they belong together. The affected functions are old name -> new name downsamplevolume -> volumedownsample normalisevolume -> volumenormalise segmentvolume -> volumesegment sourcewrite -> volumewrite bvwrite -> volumewrite Furthermore, the new volumewrite function now also supports exporting co-registered anatomical and functional volume data to BrainVoyager format. For backward compatibility with your existing scripts (and with the slightly outdated fieldtrip tutorials), the old functions still exist. They will give a warning message if you use them, and then call the new replacement function. Please adjust your scripts to the new function names. The new functions will be included in the next daily ftp release, which means that you can download them tomorrow. If you encounter any difficulties, please let us now through the fieldtrip mailing list. best regards, Robert From r.oostenveld at FCDONDERS.RU.NL Tue Jan 17 13:28:20 2006 From: r.oostenveld at FCDONDERS.RU.NL (Robert Oostenveld) Date: Tue, 17 Jan 2006 13:28:20 +0100 Subject: update: artifact detection Message-ID: Dear Fieldtrip users, I have updated the artifact detection functions (artiact_xxx, where xxx=jump, eog and muscle). Each of these three functions was already based on the same underlying idea, namely to filter and preprocess the data, then z-transform the result, cummulate the z-values over channels and finally look for z-values that are larger than the cutoff level. To reflect this similarity, I have created a new function: artifact_zvalue. Each of the artifact_jump, eog and muscle functions now sets some default values and then calls artifact_zvalue. That facilitates the maintenance and ensures that all functions behave the same regarding graphical feedback. From now on, you can also visually verify the trial definition and the detected artifacts in rejectartifact, using cfg.artfctdef.feedback=yes. Most important for you to know is that: 1) the new functions should be largely backward compatible. The filtering and preprocessing computations were only marginally changed, so the outcome should be almost the same. 2) the padding has been better defined. I will also write an artifact detection tutorial that explains these padding values better. 3) the new artifact detections functions (for jump, eog and muscle) now only will work on continuous and pseudo-continuous data. Jumps in the data at the trial boundaries for non-continous data are not dealt with and will mess up the result so --if you want to use them on trial-based data-- you are responsible yourself for configuring the padding options correctly. 4) the old functions are still available, with the name artifact_xxx_old (where xxx=jump, eog and muscle). If you want to use them, you should specify cfg.artifact.type={'eog_old', ...} and call the rejectartifact function. The idea (which I will describe in the upcoming "artifact tutorial") is that you do not use cfg.rejectjump/muscle/eog=yes any more in the preprocessing cfg structure, but that you do the following steps seperately: cfg = something to start with... cfg = definetrial(cfg) cfg = artifact_eog(cfg) cfg = artifact_eog(cfg) cfg = artifact_jump(cfg) cfg = artifact_muscle(cfg) cfg = rejectartifact(cfg) data = preprocessing(cfg) The fieldtrip version on home/common (inside the FCDC) will be updated this afternoon. The fieldtrip version on the ftp server (outside the FCDC) will be updated this evening. Since it is a large change in the fieldtrip code, bugs might have crept in. Please be extra cautious the upcoming time and report unusual behaviour. Sorry for the inconvenience that this may result in. best regards, Robert ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Robert Oostenveld, PhD F.C. Donders Centre for Cognitive Neuroimaging Radboud University Nijmegen phone: +31-24-3619695 http://www.ru.nl/fcdonders/ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ From muthuraman10 at HOTMAIL.COM Wed Jan 18 11:44:58 2006 From: muthuraman10 at HOTMAIL.COM (Muthuraman Muthuraman) Date: Wed, 18 Jan 2006 10:44:58 +0000 Subject: query on loading CNT files Message-ID: hello I would like to use fieldtrip to analyse EEG recordings how to load CNT files which contains the data how can i load the data and do the analysis with regards muthuraman From r.oostenveld at FCDONDERS.RU.NL Wed Jan 18 21:20:37 2006 From: r.oostenveld at FCDONDERS.RU.NL (Robert Oostenveld) Date: Wed, 18 Jan 2006 21:20:37 +0100 Subject: query on loading CNT files In-Reply-To: Message-ID: Dear Muthuraman All analyses start by calling the PREPROCESSING function, which reads the data segments of interest into memory. Prior to that, you should call DEFINETRIAL to determine the data segments of interest (usually based on the triggers present in the datafile). Please see the help of those two functions (type "help function_name" on the matlab command line) or look at http://www2.ru.nl/fcdonders/fieldtrip/ reference.html best regards Robert On 18-jan-2006, at 11:44, Muthuraman Muthuraman wrote: > hello > > I would like to use fieldtrip to analyse EEG recordings > how to load CNT files which contains the data > how can i load the data and do the analysis > > > with regards > muthuraman > ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Robert Oostenveld, PhD F.C. Donders Centre for Cognitive Neuroimaging Radboud University Nijmegen phone: +31-24-3619695 http://www.ru.nl/fcdonders/ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ From muthuraman10 at HOTMAIL.COM Tue Jan 24 11:46:57 2006 From: muthuraman10 at HOTMAIL.COM (Muthuraman Muthuraman) Date: Tue, 24 Jan 2006 10:46:57 +0000 Subject: query on loading CNT files In-Reply-To: <2DEC8B92-587B-4CFF-8A5D-A0B8E3833510@fcdonders.ru.nl> Message-ID: hello I am beginner with field trip as in the previous mail i have asked about the query on loading CNT files and according to the reply i need to call the function DEFINETRAIL in the function DEFINETRAIL i have to use the READ_FCDC_EVENT to find the events in the data which gave warnings i have attached in the mail what were exactly the steps carried out for the EEG analysis 'pd_mof_tr0_o_0307.cnt' is the file which contains the data >>headerfile='pd_mof_tr0_o_0307.cnt'; >>[hdr] = read_fcdc_header(headerfile); Loading file pd_mof_tr0_o_0307.cnt ... >>hdr hdr = Fs: 1000 nChans: 64 nSamples: 172040 nSamplesPre: 0 nTrials: 1 label: {1x64 cell} >>datafile='pd_mof_tr0_o_0307.cnt';begsample=1;endsample=172;chanindx=64;continuous=1; >>[dat] = read_fcdc_data(datafile, hdr, begsample, endsample, chanindx, >>continuous); Loading file pd_mof_tr0_o_0307.cnt ... done >>filename='pd_mof_tr0_o_0307.cnt'; >>[event] = read_fcdc_event(filename) Warning: handling of event structure has not been fully tested for Neuroscan *.cnt files >In C:\muthu\work\fieldtrip-20060118\read_fcdc_event.m at line 414 Loading file pd_mof_tr0_o_0307.cnt ... done Warning: no events found in pd_mof_tr0_o_0307.cnt >In C:\muthu\work\fieldtrip-20060118\read_fcdc_event.m at line 620 event = [] Thanking you with regards muthuraman >From: Robert Oostenveld >Reply-To: FieldTrip discussion list >To: FIELDTRIP at NIC.SURFNET.NL >Subject: Re: [FIELDTRIP] query on loading CNT files >Date: Wed, 18 Jan 2006 21:20:37 +0100 > >Dear Muthuraman > >All analyses start by calling the PREPROCESSING function, which reads the >data segments of interest into memory. Prior to that, you should call >DEFINETRIAL to determine the data segments of interest (usually based on >the triggers present in the datafile). Please see the help of those two >functions (type "help function_name" on the matlab command line) or look >at http://www2.ru.nl/fcdonders/fieldtrip/ reference.html > >best regards >Robert > > >On 18-jan-2006, at 11:44, Muthuraman Muthuraman wrote: > >>hello >> >>I would like to use fieldtrip to analyse EEG recordings >>how to load CNT files which contains the data >>how can i load the data and do the analysis >> >> >>with regards >>muthuraman >> > > >~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ >Robert Oostenveld, PhD >F.C. Donders Centre for Cognitive Neuroimaging >Radboud University Nijmegen >phone: +31-24-3619695 >http://www.ru.nl/fcdonders/ >~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ From r.oostenveld at FCDONDERS.RU.NL Tue Jan 24 13:54:16 2006 From: r.oostenveld at FCDONDERS.RU.NL (Robert Oostenveld) Date: Tue, 24 Jan 2006 13:54:16 +0100 Subject: query on loading CNT files In-Reply-To: Message-ID: The relevant warning seems to be > Warning: no events found in pd_mof_tr0_o_0307.cnt That means that the low level code used to read the CNT file does not find any triggers in your datafile. That either means that the low level reading function (private/read_ns_cnt.m) has a bug, or that your data does not contain any triggers. If it does not contain triggers (i.e. if there are no trials in the data), you should make your own cfg.trl field prior to calling PREPROCESSING and skip preprocessing. The documentation of DEFINETRIAL explains what cfg.trl means. I suggest that you try something like hdr = read_fcdc_header(headerfile); cfg.trl = []; for i=1:floor(hdr.nSamples/hdr.Fs) cfg.trl(i,1) = (i-1)*hdr.Fs + 1; % begin sample of each trial cfg.trl(i,2) = (i )*hdr.Fs; % end sample cfg.trl(i,3) = 0; % offset, i.e. relative location of the time axis end data = preprocessing(cfg); This segments your continuous data in trials of one second length. best, Robert On 24-jan-2006, at 11:46, Muthuraman Muthuraman wrote: > hello > > I am beginner with field trip > as in the previous mail i have asked about the query on loading CNT > files > and according to the reply i need to call the function DEFINETRAIL > in the function DEFINETRAIL i have to use the READ_FCDC_EVENT to > find the events in the data > which gave warnings > > i have attached in the mail what were exactly the steps carried out > for the EEG analysis > > 'pd_mof_tr0_o_0307.cnt' is the file which contains the data > > > >>headerfile='pd_mof_tr0_o_0307.cnt'; >>> [hdr] = read_fcdc_header(headerfile); > Loading file pd_mof_tr0_o_0307.cnt ... >>> hdr > > hdr = > > Fs: 1000 > nChans: 64 > nSamples: 172040 > nSamplesPre: 0 > nTrials: 1 > label: {1x64 cell} > >>> datafile='pd_mof_tr0_o_0307.cnt';begsample=1;endsample=172;chanindx= >>> 64;continuous=1; >>> [dat] = read_fcdc_data(datafile, hdr, begsample, endsample, >>> chanindx, continuous); > Loading file pd_mof_tr0_o_0307.cnt ... > done >>> filename='pd_mof_tr0_o_0307.cnt'; >>> [event] = read_fcdc_event(filename) > Warning: handling of event structure has not been fully tested for > Neuroscan *.cnt files >> In C:\muthu\work\fieldtrip-20060118\read_fcdc_event.m at line 414 > Loading file pd_mof_tr0_o_0307.cnt ... > done > Warning: no events found in pd_mof_tr0_o_0307.cnt >> In C:\muthu\work\fieldtrip-20060118\read_fcdc_event.m at line 620 > > event = > > [] > > > Thanking you > with regards > muthuraman > >> From: Robert Oostenveld >> Reply-To: FieldTrip discussion list >> To: FIELDTRIP at NIC.SURFNET.NL >> Subject: Re: [FIELDTRIP] query on loading CNT files >> Date: Wed, 18 Jan 2006 21:20:37 +0100 >> >> Dear Muthuraman >> >> All analyses start by calling the PREPROCESSING function, which >> reads the data segments of interest into memory. Prior to that, >> you should call DEFINETRIAL to determine the data segments of >> interest (usually based on the triggers present in the datafile). >> Please see the help of those two functions (type "help >> function_name" on the matlab command line) or look at http:// >> www2.ru.nl/fcdonders/fieldtrip/ reference.html >> >> best regards >> Robert >> >> >> On 18-jan-2006, at 11:44, Muthuraman Muthuraman wrote: >> >>> hello >>> >>> I would like to use fieldtrip to analyse EEG recordings >>> how to load CNT files which contains the data >>> how can i load the data and do the analysis >>> >>> >>> with regards >>> muthuraman >>> >> >> >> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ >> Robert Oostenveld, PhD >> F.C. Donders Centre for Cognitive Neuroimaging >> Radboud University Nijmegen >> phone: +31-24-3619695 >> http://www.ru.nl/fcdonders/ >> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ > From werkle at MPIB-BERLIN.MPG.DE Tue Jan 3 16:00:52 2006 From: werkle at MPIB-BERLIN.MPG.DE (Markus Werkle-Bergner) Date: Tue, 3 Jan 2006 16:00:52 +0100 Subject: Filter ERPs for Display In-Reply-To: Message-ID: Dear all, I would like to use a filter before displaying ERPs with fieldtrip. Is there a possibility to just apply a lp-filter to averaged ERP, without going back to preprocessing? Best regards, Markus From r.oostenveld at FCDONDERS.RU.NL Tue Jan 3 17:21:21 2006 From: r.oostenveld at FCDONDERS.RU.NL (Robert Oostenveld) Date: Tue, 3 Jan 2006 17:21:21 +0100 Subject: Filter ERPs for Display In-Reply-To: <43BA91A4.8040102@mpib-berlin.mpg.de> Message-ID: Dear Markus, On 3-jan-2006, at 16:00, Markus Werkle-Bergner wrote: > I would like to use a filter before displaying ERPs with fieldtrip. > Is there a possibility to just apply a lp-filter to averaged ERP, > without going back to preprocessing? Yes, you can use an undocumented option of TIMELOCKANALYSIS, or actually two: First, the timelockanalysis function is designed for raw data (from preprocessing) but will also accept the output of timelockanalysis as its input (instead of raw). And second, timelockanalysis has the same options for filtering as preprocessing has. So you should be able to do something like cfg = [] cfg = ... raw = preprocessing(cfg) cfg = [] avg = timelockanalysis(cfg) figure; plot(avg.time, avg.avg, 'r'); cfg = [] cfg.lpfilter = 'yes' cfg.lpfreq = 30 avg_filt = timelockanalysis(cfg) hold on; plot(avg_filt.time, avg_filt.avg, 'b'); and then you should get a figure with the filtered and unfiltered data plotted over each other. best, Robert PS the reason sofar for keeping it as an undocumented feature is that we prefer people to do the filtering on the raw data, and use filterpadding (i.e. read some extra data on both sides, apply the filter and then throw away the signal at the edges). This is implemented in preprocessing where the continuous data is available from the original file, but this type of padding can of course not be done any more on the ERP. From r.oostenveld at FCDONDERS.RU.NL Thu Jan 12 16:01:07 2006 From: r.oostenveld at FCDONDERS.RU.NL (Robert Oostenveld) Date: Thu, 12 Jan 2006 16:01:07 +0100 Subject: update: volume functions Message-ID: Dear fieldtrip users, I have updated the functions that operate on functional and on anatomical volumes, and maybe even more important for you, I have also changed the name of some of the functions. Most functions that work on anatomical/functional volume data (i.e. MRI and beamformer source reconstructions) now are named volumeXXX.m. That makes it easier to find them (type "volume" and press a few times tab in Matlab), and also makes it more clear that they belong together. The affected functions are old name -> new name downsamplevolume -> volumedownsample normalisevolume -> volumenormalise segmentvolume -> volumesegment sourcewrite -> volumewrite bvwrite -> volumewrite Furthermore, the new volumewrite function now also supports exporting co-registered anatomical and functional volume data to BrainVoyager format. For backward compatibility with your existing scripts (and with the slightly outdated fieldtrip tutorials), the old functions still exist. They will give a warning message if you use them, and then call the new replacement function. Please adjust your scripts to the new function names. The new functions will be included in the next daily ftp release, which means that you can download them tomorrow. If you encounter any difficulties, please let us now through the fieldtrip mailing list. best regards, Robert From r.oostenveld at FCDONDERS.RU.NL Tue Jan 17 13:28:20 2006 From: r.oostenveld at FCDONDERS.RU.NL (Robert Oostenveld) Date: Tue, 17 Jan 2006 13:28:20 +0100 Subject: update: artifact detection Message-ID: Dear Fieldtrip users, I have updated the artifact detection functions (artiact_xxx, where xxx=jump, eog and muscle). Each of these three functions was already based on the same underlying idea, namely to filter and preprocess the data, then z-transform the result, cummulate the z-values over channels and finally look for z-values that are larger than the cutoff level. To reflect this similarity, I have created a new function: artifact_zvalue. Each of the artifact_jump, eog and muscle functions now sets some default values and then calls artifact_zvalue. That facilitates the maintenance and ensures that all functions behave the same regarding graphical feedback. From now on, you can also visually verify the trial definition and the detected artifacts in rejectartifact, using cfg.artfctdef.feedback=yes. Most important for you to know is that: 1) the new functions should be largely backward compatible. The filtering and preprocessing computations were only marginally changed, so the outcome should be almost the same. 2) the padding has been better defined. I will also write an artifact detection tutorial that explains these padding values better. 3) the new artifact detections functions (for jump, eog and muscle) now only will work on continuous and pseudo-continuous data. Jumps in the data at the trial boundaries for non-continous data are not dealt with and will mess up the result so --if you want to use them on trial-based data-- you are responsible yourself for configuring the padding options correctly. 4) the old functions are still available, with the name artifact_xxx_old (where xxx=jump, eog and muscle). If you want to use them, you should specify cfg.artifact.type={'eog_old', ...} and call the rejectartifact function. The idea (which I will describe in the upcoming "artifact tutorial") is that you do not use cfg.rejectjump/muscle/eog=yes any more in the preprocessing cfg structure, but that you do the following steps seperately: cfg = something to start with... cfg = definetrial(cfg) cfg = artifact_eog(cfg) cfg = artifact_eog(cfg) cfg = artifact_jump(cfg) cfg = artifact_muscle(cfg) cfg = rejectartifact(cfg) data = preprocessing(cfg) The fieldtrip version on home/common (inside the FCDC) will be updated this afternoon. The fieldtrip version on the ftp server (outside the FCDC) will be updated this evening. Since it is a large change in the fieldtrip code, bugs might have crept in. Please be extra cautious the upcoming time and report unusual behaviour. Sorry for the inconvenience that this may result in. best regards, Robert ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Robert Oostenveld, PhD F.C. Donders Centre for Cognitive Neuroimaging Radboud University Nijmegen phone: +31-24-3619695 http://www.ru.nl/fcdonders/ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ From muthuraman10 at HOTMAIL.COM Wed Jan 18 11:44:58 2006 From: muthuraman10 at HOTMAIL.COM (Muthuraman Muthuraman) Date: Wed, 18 Jan 2006 10:44:58 +0000 Subject: query on loading CNT files Message-ID: hello I would like to use fieldtrip to analyse EEG recordings how to load CNT files which contains the data how can i load the data and do the analysis with regards muthuraman From r.oostenveld at FCDONDERS.RU.NL Wed Jan 18 21:20:37 2006 From: r.oostenveld at FCDONDERS.RU.NL (Robert Oostenveld) Date: Wed, 18 Jan 2006 21:20:37 +0100 Subject: query on loading CNT files In-Reply-To: Message-ID: Dear Muthuraman All analyses start by calling the PREPROCESSING function, which reads the data segments of interest into memory. Prior to that, you should call DEFINETRIAL to determine the data segments of interest (usually based on the triggers present in the datafile). Please see the help of those two functions (type "help function_name" on the matlab command line) or look at http://www2.ru.nl/fcdonders/fieldtrip/ reference.html best regards Robert On 18-jan-2006, at 11:44, Muthuraman Muthuraman wrote: > hello > > I would like to use fieldtrip to analyse EEG recordings > how to load CNT files which contains the data > how can i load the data and do the analysis > > > with regards > muthuraman > ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Robert Oostenveld, PhD F.C. Donders Centre for Cognitive Neuroimaging Radboud University Nijmegen phone: +31-24-3619695 http://www.ru.nl/fcdonders/ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ From muthuraman10 at HOTMAIL.COM Tue Jan 24 11:46:57 2006 From: muthuraman10 at HOTMAIL.COM (Muthuraman Muthuraman) Date: Tue, 24 Jan 2006 10:46:57 +0000 Subject: query on loading CNT files In-Reply-To: <2DEC8B92-587B-4CFF-8A5D-A0B8E3833510@fcdonders.ru.nl> Message-ID: hello I am beginner with field trip as in the previous mail i have asked about the query on loading CNT files and according to the reply i need to call the function DEFINETRAIL in the function DEFINETRAIL i have to use the READ_FCDC_EVENT to find the events in the data which gave warnings i have attached in the mail what were exactly the steps carried out for the EEG analysis 'pd_mof_tr0_o_0307.cnt' is the file which contains the data >>headerfile='pd_mof_tr0_o_0307.cnt'; >>[hdr] = read_fcdc_header(headerfile); Loading file pd_mof_tr0_o_0307.cnt ... >>hdr hdr = Fs: 1000 nChans: 64 nSamples: 172040 nSamplesPre: 0 nTrials: 1 label: {1x64 cell} >>datafile='pd_mof_tr0_o_0307.cnt';begsample=1;endsample=172;chanindx=64;continuous=1; >>[dat] = read_fcdc_data(datafile, hdr, begsample, endsample, chanindx, >>continuous); Loading file pd_mof_tr0_o_0307.cnt ... done >>filename='pd_mof_tr0_o_0307.cnt'; >>[event] = read_fcdc_event(filename) Warning: handling of event structure has not been fully tested for Neuroscan *.cnt files >In C:\muthu\work\fieldtrip-20060118\read_fcdc_event.m at line 414 Loading file pd_mof_tr0_o_0307.cnt ... done Warning: no events found in pd_mof_tr0_o_0307.cnt >In C:\muthu\work\fieldtrip-20060118\read_fcdc_event.m at line 620 event = [] Thanking you with regards muthuraman >From: Robert Oostenveld >Reply-To: FieldTrip discussion list >To: FIELDTRIP at NIC.SURFNET.NL >Subject: Re: [FIELDTRIP] query on loading CNT files >Date: Wed, 18 Jan 2006 21:20:37 +0100 > >Dear Muthuraman > >All analyses start by calling the PREPROCESSING function, which reads the >data segments of interest into memory. Prior to that, you should call >DEFINETRIAL to determine the data segments of interest (usually based on >the triggers present in the datafile). Please see the help of those two >functions (type "help function_name" on the matlab command line) or look >at http://www2.ru.nl/fcdonders/fieldtrip/ reference.html > >best regards >Robert > > >On 18-jan-2006, at 11:44, Muthuraman Muthuraman wrote: > >>hello >> >>I would like to use fieldtrip to analyse EEG recordings >>how to load CNT files which contains the data >>how can i load the data and do the analysis >> >> >>with regards >>muthuraman >> > > >~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ >Robert Oostenveld, PhD >F.C. Donders Centre for Cognitive Neuroimaging >Radboud University Nijmegen >phone: +31-24-3619695 >http://www.ru.nl/fcdonders/ >~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ From r.oostenveld at FCDONDERS.RU.NL Tue Jan 24 13:54:16 2006 From: r.oostenveld at FCDONDERS.RU.NL (Robert Oostenveld) Date: Tue, 24 Jan 2006 13:54:16 +0100 Subject: query on loading CNT files In-Reply-To: Message-ID: The relevant warning seems to be > Warning: no events found in pd_mof_tr0_o_0307.cnt That means that the low level code used to read the CNT file does not find any triggers in your datafile. That either means that the low level reading function (private/read_ns_cnt.m) has a bug, or that your data does not contain any triggers. If it does not contain triggers (i.e. if there are no trials in the data), you should make your own cfg.trl field prior to calling PREPROCESSING and skip preprocessing. The documentation of DEFINETRIAL explains what cfg.trl means. I suggest that you try something like hdr = read_fcdc_header(headerfile); cfg.trl = []; for i=1:floor(hdr.nSamples/hdr.Fs) cfg.trl(i,1) = (i-1)*hdr.Fs + 1; % begin sample of each trial cfg.trl(i,2) = (i )*hdr.Fs; % end sample cfg.trl(i,3) = 0; % offset, i.e. relative location of the time axis end data = preprocessing(cfg); This segments your continuous data in trials of one second length. best, Robert On 24-jan-2006, at 11:46, Muthuraman Muthuraman wrote: > hello > > I am beginner with field trip > as in the previous mail i have asked about the query on loading CNT > files > and according to the reply i need to call the function DEFINETRAIL > in the function DEFINETRAIL i have to use the READ_FCDC_EVENT to > find the events in the data > which gave warnings > > i have attached in the mail what were exactly the steps carried out > for the EEG analysis > > 'pd_mof_tr0_o_0307.cnt' is the file which contains the data > > > >>headerfile='pd_mof_tr0_o_0307.cnt'; >>> [hdr] = read_fcdc_header(headerfile); > Loading file pd_mof_tr0_o_0307.cnt ... >>> hdr > > hdr = > > Fs: 1000 > nChans: 64 > nSamples: 172040 > nSamplesPre: 0 > nTrials: 1 > label: {1x64 cell} > >>> datafile='pd_mof_tr0_o_0307.cnt';begsample=1;endsample=172;chanindx= >>> 64;continuous=1; >>> [dat] = read_fcdc_data(datafile, hdr, begsample, endsample, >>> chanindx, continuous); > Loading file pd_mof_tr0_o_0307.cnt ... > done >>> filename='pd_mof_tr0_o_0307.cnt'; >>> [event] = read_fcdc_event(filename) > Warning: handling of event structure has not been fully tested for > Neuroscan *.cnt files >> In C:\muthu\work\fieldtrip-20060118\read_fcdc_event.m at line 414 > Loading file pd_mof_tr0_o_0307.cnt ... > done > Warning: no events found in pd_mof_tr0_o_0307.cnt >> In C:\muthu\work\fieldtrip-20060118\read_fcdc_event.m at line 620 > > event = > > [] > > > Thanking you > with regards > muthuraman > >> From: Robert Oostenveld >> Reply-To: FieldTrip discussion list >> To: FIELDTRIP at NIC.SURFNET.NL >> Subject: Re: [FIELDTRIP] query on loading CNT files >> Date: Wed, 18 Jan 2006 21:20:37 +0100 >> >> Dear Muthuraman >> >> All analyses start by calling the PREPROCESSING function, which >> reads the data segments of interest into memory. Prior to that, >> you should call DEFINETRIAL to determine the data segments of >> interest (usually based on the triggers present in the datafile). >> Please see the help of those two functions (type "help >> function_name" on the matlab command line) or look at http:// >> www2.ru.nl/fcdonders/fieldtrip/ reference.html >> >> best regards >> Robert >> >> >> On 18-jan-2006, at 11:44, Muthuraman Muthuraman wrote: >> >>> hello >>> >>> I would like to use fieldtrip to analyse EEG recordings >>> how to load CNT files which contains the data >>> how can i load the data and do the analysis >>> >>> >>> with regards >>> muthuraman >>> >> >> >> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ >> Robert Oostenveld, PhD >> F.C. Donders Centre for Cognitive Neuroimaging >> Radboud University Nijmegen >> phone: +31-24-3619695 >> http://www.ru.nl/fcdonders/ >> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ >