Back to the main page.

Bug 2894 - Error while reading Neuromag data - no data in this range

Status CLOSED INVALID
Reported 2015-05-08 17:41:00 +0200
Modified 2019-08-10 12:30:47 +0200
Product: FieldTrip
Component: fileio
Version: unspecified
Hardware: PC
Operating System: Linux
Importance: P5 normal
Assigned to:
URL:
Tags:
Depends on:
Blocks:
See also:

Lev - 2015-05-08 17:41:22 +0200

Hi all, I'm trying to read in Neuromag .fif data for preprocessing using the code below, and I get an error that there is "no data in this range". Reading in the data directly using ft_read_data works fine. Thanks for your help! CODE: clear all; % set fieldtrip path and initialize addpath '/home/lt114/bin/fieldtrip/fieldtrip-20150507' ft_defaults cfg = []; cfg.dataset = '/home/lt114/rewatt/meg_data/01/ATT_1_sbj_01_1.fif'; cfg.trialfun = 'ft_trialfun_general'; % this is the default cfg.trialdef.eventvalue = [101:136]; cfg.trialdef.prestim = -1.5; cfg.trialdef.poststim = 0.5; cfg.trialdef.eventtype = 'STI101'; cfg = ft_definetrial(cfg); cfg = ft_preprocessing(cfg); ERROR MSG: Error using fiff_read_raw_segment (line 76) No data in this range Error in ft_read_data (line 980) dat = fiff_read_raw_segment(hdr.orig.raw,begsample+hdr.orig.raw.first_samp-1,endsample+hdr.orig.raw.first_samp-1,chanindx); Error in ft_preprocessing (line 563) dat = ft_read_data(cfg.datafile, 'header', hdr, 'begsample', begsample, 'endsample', endsample, 'chanindx', rawindx, 'checkboundary', strcmp(cfg.continuous, 'no'), 'dataformat', cfg.dataformat) Error in ft_bug_script (line 18) cfg = ft_preprocessing(cfg);


Lev - 2015-05-08 17:46:23 +0200

Sorry, the prestim shouldn't have a minus, all is fixed now.


Robert Oostenveld - 2019-08-10 12:30:47 +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.