Back to the main page.
Bug 1132 - check that ft_datatype_sens is consistently used and replaced by ft_checkdata/-config where possible
Status | CLOSED FIXED |
Reported | 2011-11-09 15:09:00 +0100 |
Modified | 2012-08-23 14:02:11 +0200 |
Product: | FieldTrip |
Component: | core |
Version: | unspecified |
Hardware: | PC |
Operating System: | Windows |
Importance: | P1 normal |
Assigned to: | Jörn M. Horschig |
URL: | |
Tags: | |
Depends on: | |
Blocks: | |
See also: |
Jörn M. Horschig - 2011-11-09 15:09:45 +0100
While going through some bugs, I realized that in many functions ft_datatype_sens is being called where it is not really necessary, e.g. because ft_checkdata was called before, which is doing the same call already. Currently, I am checking all functions now that call ft_datatype_sens and see whether it is really necessary to call this. Before comitting, I will extensively test all functions that I changed, so it might take a while until this makes it's way into the repository. Questions for the more experienced: (1) I assume that all ft_XXX functions and all functions that are *not* in a private folder can be called by the user. This means, that all functions *in* a private folder should *not* have a direct call to ft_datatype_sens, because this will be dealt with in the main ft_XXX functions. Is this correct? (2) prepare_brain_surface does seem to have no dependencies (i.e. is called from no other function), but it is in the private directory. Que? Also, this is the only function that calls head_surf. Are these two necessary? (3) Further, I assume that functions like ft_read_header and ft_read_data already return .grad (or whatever) in the new style, meaning that a call to ft_read_header does not need an additional call to ft_datatype_sens? (4) who can I bother with a list of functions that I changed, in order to reduce the amount of time I need to spend on debugging/getting put down by the maillist?
Jörn M. Horschig - 2011-11-09 15:19:23 +0100
(5) why is ft_read_sens calling ft_datatype_sens? Shouldn't ft_read_sens automatically contain the correct way of defining sensor information?
Jan-Mathijs Schoffelen - 2011-11-09 16:37:38 +0100
@ your last comment: ideally, yes. But having it this way for the time being can keep the low level reading routines as they are.
Jörn M. Horschig - 2011-11-23 10:19:54 +0100
Fixed I kept ft_datatype_sens in for these functions that can get sens as an input argument (ft_prepare_sourcemodel and plotting/ft_plot_sens)
Jörn M. Horschig - 2011-11-23 10:20:31 +0100
oh, but please still notice this question: (2) prepare_brain_surface does seem to have no dependencies (i.e. is called from no other function), but it is in the private directory. Que? Also, this is the only function that calls head_surf. Are these two necessary?