Back to the main page.
Bug 2319 - Documentation for ft_definetrial out of date
Status | CLOSED FIXED |
Reported | 2013-10-12 13:23:00 +0200 |
Modified | 2014-01-15 14:46:45 +0100 |
Product: | FieldTrip |
Component: | documentation |
Version: | unspecified |
Hardware: | PC |
Operating System: | Windows |
Importance: | P3 trivial |
Assigned to: | Jan-Mathijs Schoffelen |
URL: | |
Tags: | |
Depends on: | |
Blocks: | |
See also: |
- 2013-10-12 13:23:45 +0200
The current documentation (on the wiki and in in my version of Fieldtrip, 20130515) says: " The trial definition "trl" is an Nx3 matrix, N is the number of trials. The first column contains the sample-indices of the begin of each trial relative to the begin of the raw data, the second column contains the sample-indices of the end of each trial, and the third column contains the offset of the trigger with respect to the trial." But in the version of ft I am using (again,20130515), 'trl' is actually an Nx4 matrix. The fourth column seems to be the event type. For example, I have BrainVision data, with four kinds of events (labeled 1, 2, 4, and 8) and when I read the .vhdr file, the fourth column of my trial definition consists of those numbers.
Jan-Mathijs Schoffelen - 2013-11-24 09:37:50 +0100
Fair enough. Dear spa268, could you update the wiki accordingly and give us a suggestion as to how you would like to see the documentation in the m-file updated? Indeed the fourth column contains the trigger code that defined the given epoch. Note, that this behavior is specific to the use of ft_trialfun_general
- 2013-11-24 10:22:11 +0100
(In reply to comment #1) Thanks for your reply. I didn't want to change the reference documentation on the wiki because it seems like it's meant to be the same as the documentation in the .m file that comes up with "help ft_definetrial"? I don't know what the behavior is when using a different trialfun, but maybe it would be sufficient to just add the following after the part that I quoted above: "If the trialfun is ft_trialfun_general, then the "trl" matrix will contain a fourth column indicating the trigger code that defined each trial." Does that seem right? Best, Steve
Jan-Mathijs Schoffelen - 2013-11-24 11:52:03 +0100
Hi Steve, Good point about the wiki documentation. I did not realize that you refer to the function's help, that indeed is copied one-to-one into the wiki. I will update the documentation in the m-file as per your suggestion (more or less). I saw that there is already some docu referring to the >3d column in the trl-matrix in the current FT-code, and will add some explicit notes about the fourth column when using ft_trialfun_general. At some point in the future you may want to check the function to see whether it matches your expectations. Thanks for your input.
Jan-Mathijs Schoffelen - 2013-11-24 11:52:17 +0100
documentation changed in revision 8841