Back to the main page.
Bug 1618 - Problem with a BV variant
Status | CLOSED FIXED |
Reported | 2012-07-27 17:01:00 +0200 |
Modified | 2019-08-10 12:28:18 +0200 |
Product: | FieldTrip |
Component: | fileio |
Version: | unspecified |
Hardware: | PC |
Operating System: | Windows |
Importance: | P3 normal |
Assigned to: | |
URL: | |
Tags: | |
Depends on: | |
Blocks: | |
See also: |
Vladimir Litvak - 2012-07-27 17:01:21 +0200
Created attachment 295 data example Hi, I got the attached dataset from a user. When trying to convert it I get NaNs as the data. It comes down to line 50 in read_brainvision_vhdr which sets the resolution to NaN and then these NaNs are multiplied with the data. I could fix it to some extent by changing this line to: hdr.resolution(i) = 1; But why should it be NaN in the first place? Vladimir
Jan-Mathijs Schoffelen - 2012-07-30 09:58:19 +0200
Good question. Perhaps Robert intended the output to be explicitly meaningless when the resolution field is absent. What about indeed changing NaN to 1 and perhaps throw a warning?
Vladimir Litvak - 2012-07-30 12:00:01 +0200
I think a principled fix would involve the 'units' field. If there is a resolution field it should be set if not then it should be 'unknown'. But I'd make sure why Robert put that NaN there. Maybe there is some other reason. Vladimir
Boris Reuderink - 2012-08-23 12:49:37 +0200
Added test case and fixed in SVN revision 6402.
Boris Reuderink - 2012-08-23 12:50:51 +0200
I have added a warning for a missing resolution field. @Robert, was there a reason why NaN was used in the first place? Anything we missed here?
Robert Oostenveld - 2012-08-23 14:08:17 +0200
(In reply to comment #4) I think I implemented it with nan to ensure that it would get detected in case the resolution was not specified in the vhdr file, and because I would not know when that specific case might happen. So catching the special case worked out ;-) You guys have now though of it and considered the actual case where the resolution is not known. Hence I think that your solution will be fine in general.
Vladimir Litvak - 2012-08-23 14:12:55 +0200
Yes, that's definitely a good way to get someone's attention ;-)
Boris Reuderink - 2012-11-02 13:29:55 +0100
I am no longer working on FieldTrip. Hence, I donate all my bugs to the joint development user.
Jim Herring - 2014-01-23 09:37:50 +0100
*** Bug 1310 has been marked as a duplicate of this bug. ***