Back to the main page.
Bug 3412 - imotions2fieldtrip fixtime = 'squash' not robust for missing values
Status | ASSIGNED |
Reported | 2018-02-03 04:41:00 +0100 |
Modified | 2018-02-05 22:23:15 +0100 |
Product: | FieldTrip |
Component: | core |
Version: | unspecified |
Hardware: | PC |
Operating System: | Mac OS |
Importance: | P1 normal |
Assigned to: | Robert Oostenveld |
URL: | |
Tags: | |
Depends on: | |
Blocks: | |
See also: |
Ingrid Nieuwenhuis - 2018-02-03 04:41:23 +0100
Created attachment 856 squash when reading in a data file that has missing values in the channel columns, the data read in does not show NaNs, but a number. The fixtime = 'interpolate' inplementation is acting correctly.
Ingrid Nieuwenhuis - 2018-02-03 05:27:40 +0100
Created attachment 857 interpolate
Robert Oostenveld - 2018-02-03 18:13:57 +0100
Created attachment 858 test file I cannot reproduce it. See attached file and this code. filename = 'testfile.txt'; data1 = imotions2fieldtrip(filename, 'fixtime', 'squash'); data2 = imotions2fieldtrip(filename, 'fixtime', 'interpolate'); figure; plot(data1.time{1}, data1.trial{1}, 'x') figure; plot(data2.time{1}, data2.trial{1}, 'x')
Robert Oostenveld - 2018-02-03 18:15:27 +0100
(In reply to Robert Oostenveld from comment #2) this is the test file. It has one timestamp with a partial missing value, and one with a complete missing value -------- #Study : xxx #Date : xxx #Version : xxx #TestRunDate : xxx #Tracker : xxx StudyName Timestamp TestValue test 20170308_172640001 1 test 20170308_172640001 1 test 20170308_172640001 1 test 20170308_172640002 2 test 20170308_172640002 2 test 20170308_172640002 test 20170308_172640003 3 test 20170308_172640003 3 test 20170308_172640003 3 test 20170308_172640004 test 20170308_172640004 test 20170308_172640004 test 20170308_172640005 5 test 20170308_172640005 5 test 20170308_172640005 5 --------
Robert Oostenveld - 2018-02-05 22:21:41 +0100
with a test file the problem was identified not to be due to the squashing itself, but due to the interpolation on a regular time axis. The particular dataset did not have identical timestamps, but did have some datapoints closer to each other than others, and some further apart than others. Squash interpolates it on a linear time axis where the dT is the median difference between subsequent samples. To allow a more accurate (but annoying) representation of the data, I now also implemented fixtime=no.