Back to the main page.

Bug 2333 - Bug in ft_read_data

Status CLOSED FIXED
Reported 2013-10-23 16:35:00 +0200
Modified 2014-02-24 10:56:35 +0100
Product: FieldTrip
Component: fileio
Version: unspecified
Hardware: PC
Operating System: Linux
Importance: P3 normal
Assigned to: Robert Oostenveld
URL:
Tags:
Depends on:
Blocks:
See also:

Federico - 2013-10-23 16:35:26 +0200

Hello everyone, I am working with a MNE file ('.fif'), and I wanted to convert it in an appropiate format in Fieldtrip, so I followed this tutorial : http://fieldtrip.fcdonders.nl/getting_started/neuromag The first step worked withouth problem, but when I tried to use ft_read_data, the next error appeared: Reference to non-existent field 'iscontinuous'. Error in ft_read_data (line 898) Going into that line , we can see if (hdr.orig.iscontinuous) dat = fiff_read_raw_segment(hdr.orig.raw,begsample+hdr.orig.raw.first_samp-1,endsample+hdr.orig.raw.first_samp-1,chanindx); dimord = 'chans_samples'; elseif (hdr.orig.isaverage) So, it seemed that there were no iscontinous, so looking into ft_read_header, if we go to the line 1413-1419 , we have the following: % remember the original header details hdr.orig = info; % these are useful to know in ft_read_event hdr.info.isaverage = isaverage; hdr.info.iscontinuous = iscontinuous; If we compare it, we can see that iscontinuous has different references, orig and info, so what I did is change in ft_read_data orig for info, and it worked. Just wanted to inform you all. Regards!


Robert Oostenveld - 2013-10-23 16:40:25 +0200

merde, my bad! I made that change only 1 or two days ago (renamed orig into info), and apparently did not think well enough about the consequences.


Robert Oostenveld - 2013-10-23 16:44:40 +0200

I just fixed it (hopefully) mac001> svn commit ft_read_header.m Sending ft_read_header.m Transmitting file data . Committed revision 8628. You can get the latest version from http://code.google.com/p/fieldtrip/source/browse/trunk/fileio/ft_read_header.m and it will be in this evening release. Let me test it, and then I'll close the bug.


Robert Oostenveld - 2013-10-23 16:46:11 +0200

it worked on a test dataset I had on my computer. Hope it also works for you, if not: please reopen this bug. Thanks for reporting!


Federico - 2013-10-23 16:47:24 +0200

Okay, sure! It's a pleassure !


Robert Oostenveld - 2014-02-24 10:56:35 +0100

I closed several bugs at once that all have been resolved for some time. If you disagree, please reopen.