Reading in Neuroscan files

Monika Mellem monikamellem at GMAIL.COM
Mon Jun 30 13:21:33 CEST 2008


I have noticed some things when reading in both Neuroscan .eeg and .cnt files.

1) When reading a Neuroscan .eeg file, read_event.m seems to put either
"accept" or "reject" into the field event.value.  According to how
event.field is used later on, it should be putting the trigger values in
this field which are in tmp.sweep.type.  I modified the code as shown below.

At line 885:
  event(end).value = tmp.sweep.type;
rather than
  event(end).value = 'accept';

This line of code is within an if statement (if tmp.sweep.accept), and I'm
not sure how the else statement should be modified if a trial/sweep should
be rejected.

2) When reading in a Neuroscan .cnt file, read_header.m puts some bad
channel labels into hdr.label using what it gets from the read_ns_cnt.m file
(around line 564).  Whatever is in orig.chan.names starts with the correct
channels (about 10 of them) and then has blank values or odd characters for
the rest of the channel labels.  As a quick fix for just the channel labels,
I just took the channel labels that read_ns_hdr.m finds and substituted them
into hdr.label.  See below.  This doesn't fix the underlying problem in
read_ns_cnt.m though which seems to be with the variables chandat and
r.chan.names (lines 140-141).

orig = read_ns_hdr(filename);
hdr.label = orig.label;
hdr.orig.chan.names = orig.label;

Monika Mellem

The aim of this list is to facilitate the discussion between users of the FieldTrip  toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also and

More information about the fieldtrip mailing list