Back to the main page.

Bug 3407 - imotion files can have spaces in column name

Status CLOSED FIXED
Reported 2018-01-31 04:33:00 +0100
Modified 2019-08-10 12:37:26 +0200
Product: FieldTrip
Component: core
Version: unspecified
Hardware: PC
Operating System: Mac OS
Importance: P5 normal
Assigned to: Robert Oostenveld
URL:
Tags:
Depends on:
Blocks:
See also:

Ingrid Nieuwenhuis - 2018-01-31 04:33:04 +0100

imotion data can have column name like 'Joy Evidence' or 'Joy Intensity'. Now imotion2fieldtrip reads this as 2 separate columns "Joy" and "Evidence". And then the second Joy does not appear.


Robert Oostenveld - 2018-01-31 22:40:00 +0100

that might explain why I see some values in one of the datasets consistently as nan, probably the column values are shifted relative to the header.


Robert Oostenveld - 2018-01-31 22:43:06 +0100

can you check line 57 in fieldtrip/private/read_imotions_txt.m, where the line with the labels is split into pieces? dat.Labels = tokenize(aline{headerline}); should probably be dat.Labels = tokenize(aline{headline}, '\t'); to make sure it is split on tabs, not on any whitespace (which I suspect to be the default).


Ingrid Nieuwenhuis - 2018-02-03 01:41:31 +0100

it's working now!


Robert Oostenveld - 2019-08-10 12:37:26 +0200

This closes a whole series of bugs that have been resolved (either FIXED/WONTFIX/INVALID) for quite some time. If you disagree, please file a new issue on https://github.com/fieldtrip/fieldtrip/issues.