SPECIFICATION OF HEADERINFORMATION OF EEG-Files
-----------------------------------------------
$Id: header.txt,v 1.22 2006/08/31 17:30:49 schloegl Exp $
Copyright (C) Alois Schloegl 2003-2005,2006 <
[email protected]>
This is part of the BIOSIG-toolbox http://biosig.sf.net/
CONTENT:
=========
(A1) Basic header definition (common for all file formats) for versions 2 (experimental)
(A2) Basic header definition (common for all file formats) for versions 1.xx (stable)
(B) Header definition for data acquisition
(C) Header definition of EDF/BDF/GDF/SDF-Files
(A1)========== Basic header definition V2.xx ================================
ToDo: interface for
(a) continuous equidistant sampleing
(b) triggered (epoched) equidistant sampling
(c) non-equidistant (sparse) sampling (of single and multiple channels)
Name_of_field type description
-------------------------------------------------------------------------
HDR.TYPE string type of data format,
HDR.VERSION string [OPTIONAL] depends on data format
HDR.FileName full filename
HDR.FILE # file handling information
FILE.Path path
FILE.Name filename
FILE.Ext extension
FILE.OPEN status: 0 (close), 1 (read), 2(write),3(rewrite header when SCLOSE)
FILE.POS position of the file handle (units depend on data format)
FILE.PERMISSION 'r': read; 'w': write; 'z': on-the-fly (de-)compression
FILE.stdout output stream
FILE.stderr error stream
FILE.size [optional]
HDR.T0 float[1..6] start time, [yyyy mm dd hh MM ss.cc] see HELP CLOCK
HDR.NS integer number of channels visible to outside
HDR.intern.NS integer number of channels in data file
HDR.SampleRate integer sampling frequency in [Hz]
HDR.intern.NRec integer number of records or blocks; 1 for continous data
HDR.intern.SPR integer samples per record
HDR.intern.Dur float Duration (in [s]) of block length
HDR.Length integer total number of samples
HDR.intern.Calib Matrix for all kind of rereferencing, depends on scaling factors as well as input argument
HDR.intern.InChanSelect input channel selection, # read from Raw-data
HDR.EVENT # two versions are possible. Version 1:
EVENT.SampleRate uint24 how many units [sample] give one second
EVENT.POS uint32 Position of event [in samples]
EVENT.TYP uint16 Type of event/marker/annotation according to table biosig/t200/eventcodes.txt
# or Version 3:
EVENT.SampleRate uint24 how many units [sample] give one second
EVENT.POS uint32 Position of event [in samples]
EVENT.TYP uint16 Type of event/marker/annotation according to table biosig/t200/eventcodes.txt
EVENT.CHN uint16 associated channel; is zero if event applies to no specific or all channels
EVENT.DUR uint32 event duration in samples
EVENT.VAL (*) use for sparse (non-equidistant) sample values). The type corresponds to GDFTYP of the respective channel.
and must not exceed 32 bits (4 bytes). Currently, only integer types are supported.
# [OPTIONAL]
EVENT.CodeDesc text description of Eventtypes
EVENT.CodeIndex int corresponding index
HDR.ELEC.
ELEC.XYZ float electrode positions
HDR.intern.Label char-array all channels
HDR.Label char-array e.g. '+C3a - C3p ' for selected channels
HDR.intern.LeadIdCode uint16 Lead identification label according to SCP or FEF standard
HDR.LeadIdCode uint16 Lead identification label according to SCP or FEF standard
HDR.intern.PhysDim string physical dimension e.g. 'uV'
HDR.PhysDim string physical dimension e.g. 'uV'
HDR.intern.PhysDimCode uint16 Code of physical dimension according to "File Exchange Format for Vital Signs - Annex A "
HDR.PhysDimCode uint16 Code of physical dimension according to "File Exchange Format for Vital Signs - Annex A "
HDR.intern.PhysMax float physical maximum (for calibration)
HDR.intern.DigMax integer digital maximum (for calibration)
HDR.intern.PhysMin float physical minimum (for calibration)
HDR.intern.DigMin integer digital minimum (for calibration)
HDR.intern.Bits integer number of bits used
HDR.intern.THRESHOLD numeric digital minimum and maximum (for saturation detection);
a third column indicates the encoding of missing data;
HDR.intern.CHANTYP ascii guess for signal type
HDR.FLAG.TRIGGERED int 0=no, 1=yes (epoched)
HDR.FLAG.REFERENCE string COM, CAR: common average reference; LOC,LAR local average ref; LAP Laplacian derivation, WGT weighted average
HDR.FLAG.UCAL int 0: data is calibrated (scaled), 1: data is not calibrated (scaled)
HDR.FLAG.OVERFLOWDETECTION int 1: automated overflow detection if HDR.THRESHOLD is available; 0: no overflow detection
HDR.Classlabel int 0: left, 1: right, etc.
HDR.ArtifactSelection int [OPTIONAL] 0: ok, 1: artifact
HDR.TriggerOffset samples [OPTIONAL] Offset time between TriggerOnset and begin of trial
HDR.Filter % filter information, usually for each channel separatily
Filter.LowPass float [Hz]
Filter.HighPass float [Hz]
Filter.Notch float [Hz] NaN: unknown, -1(<0): off
HDR.internal.Filter struct filters for all channels
HDR.internal.PreFilt string [OPTIONAL] filter setting - used by GDF, BDF, EDF
HDR.ID.Doctor Identification of doctor
HDR.ID.Hospital Identification of Hospital
HDR.Patient # contains patient information [OPTIONAL]
Patient.Name Name of Patient: should not be used because of privacy protection
Patient.Id Patient identification code as used in hospital
Patient.Age Age of Patient
Patient.Sex Patient Gender 0: unknown, 1: male, 2: female
Patient.Handedness Patient Handedness 0:unknown, 1: right, 2:left, 3: equal
Patient.Medication Medication
Patient.Classification Classification of Patient
Patient.Height height in centimeters [cm]
Patient.Weight weight in kilogram [kg]
Patient.BMI Body mass index
Patient.Headsize 3xfloat32 Distance Nasion-Inion, distance A1-A2, Circumference of head
Patient.Birthday [Y M D h m s]: approx. Birthday, to calculate patient's age.
Patient.Impairment.Heart 0: unknown 1: NO 2: YES 3: pacemaker
Patient.Impairment.Visual 0: unknown 1: NO 2: YES 3: corrected (with visual aid)
Patient.Smoking 0: unknown 1: NO 2: YES
Patient.AlcoholAbuse 0: unknown 1: NO 2: YES
Patient.DrugAbuse 0: unknown 1: NO 2: YES
HDR.REC.LOC 16 byte Latitude, Longitude and Altitude 3 x INT32 according to RFC1876
HDR.REC.IPaddr 4(6)xuint8 IP address of recording system
# HDR.REC.Reference reference (monopolar | CAR | LAR | Laplacian | Linked ears | weighted )
HDR.REC.Impedance NS*uint8 Electrode Impedance round(log2(Z[Ohm])*8) Z can be reconstructed with < 10% error
HDR.intern.Impedance NS*uint8 Electrode Impedance round(log2(Z[Ohm])*8) Z can be reconstructed with < 10% error
HDR.intern.XYZ 3xNSxfloat32 electrode position in cartesion coordinates
HDR.ELEC.XYZ 3xNSxfloat32 electrode position in cartesion coordinates
HDR.ELEC.REF 3xfloat32 position of reference electrode
HDR.ELEC.GND 3xfloat32 position of ground electrode
HDR.intern.AS # provides some internal information
AS.MAXSPR least common multiple samplerate
AS.bpb bytes per block
AS.spb samples per block
AS.bi cumulative index
AS.SampleRate samplerate of each channel
AS.EVENTTABLEPOS position of eventtable
(A2)========== Basic header definition V1.xx ================================
Name_of_field type description
-------------------------------------------------------------------------
HDR.TYPE string type of data format,
HDR.VERSION string [OPTIONAL] depends on data format
HDR.FileName full filename
HDR.FILE # file handling information
FILE.Path path
FILE.Name filename