⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 header.txt

📁 matlab数字信号处理工具箱
💻 TXT
字号:

SPECIFICATION OF HEADERINFORMATION OF EEG-Files
-----------------------------------------------


Date: 20 Feb 2003
(C) Alois Schloegl <a.schloegl@ieee.org>
Version 1.0 (0.10 for testing)
$Revision: 1.7 $
$Id


CONTENT:
=========
(A)  Basic header definition (common for all file formats)
(B)  Header definition for data acquisition
(C)  Header definition of EDF/BDF/GDF/SDF-Files 



(A)========== Basic header definition ================================

Name_of_field		type		description
-------------------------------------------------------------------------
HDR.TYPE		string		type of data format,  
HDR.VERSION		string		(depends on data format)

HDR.FileName				full filename
HDR.FILE.Path				path 
HDR.FILE.Name				filename
HDR.FILE.Ext				extension
HDR.FILE.OPEN				status: 0 (close), 1 (read), 2(write),3(rewrite header when SCLOSE)
HDR.FILE.POS				position of the file handle (units depend on data format)
HDR.FILE.stdout				output stream
HDR.FILE.stderr				error stream 
HDR.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
HDR.SampleRate		integer		sampling frequency in [Hz]
HDR.NRec		integer		number of records or blocks; 1 for continous data 
HDR.SPR			integer		samples per record  
HDR.Dur			float		Duration (in [s]) of minimal block length

HDR.Calib		 		Matrix for all kind of rereferencing, depends on scaling factors as well as input argument arg2
HDR.InChanSelect			input channel selection, # read from Raw-data 

HDR.EVENT.N				number of events
HDR.EVENT.POS		uint32		Position of event 
HDR.EVENT.TYP		uint16		Type of event
HDR.EVENT.CHN		uint16		channel event [optional]
HDR.EVENT.DUR		uint32		event duration [optional]

HDR.PreFilt		string		filter setting
HDR.Label		char-array	e.g. '+C3a - C3p  '
HDR.PhysDim		string		physical dimension e.g. 'uV'
HDR.PhysMax		float		physical maximum
HDR.DigMax		integer		digital maximum
HDR.PhysMin		float		physical minimum 
HDR.DigMin		integer		digital minimum  

HDR.FLAG.TRIGGERED	int		0=no, 1=yes
HDR.FLAG.REFERENCE	string          COM, CAR: common average reference; LOC,LAR local average ref; LAP Laplacian derivation, WGT weighted average
	
HDR.Classlabel		int		0: left, 1: right, etc. 
HDR.ArtifactSelection	int		0: ok, 1: artifact 
HDR.TriggerOffset       samples         Offset time between TriggerOnset and beginn of trial

HDR.Filter.LowPass	float		[Hz]
HDR.Filter.HighPass	float		[Hz]
HDR.Filter.Notch 	int8		0=Off, 1=ON

HDR.ID.Doctor				Identification of doctor
HDR.ID.Hospital				Identification of Hospital
HDR.Patient.Name			Name of Patient 
HDR.Patient.Age				Age of Patient
HDR.Patient.Sex				Patient Gender
HDR.Patient.Handedness			Patient Handedness
HDR.Patient.Medication			Medication
HDR.Patient.Classification		Classification of Patient

HDR.AS.MAXSPR				least common multiple samplerate
HDR.AS.bpb				bytes per block
HDR.AS.spb				samples per block
HDR.AS.bi				cumulative index
HDR.AS.EVENTTABLEPOS                    position of eventtable   


(B)======= FOR DATA ACQUISITION (T100) ONLY  =======================

Name_of_field		type		example
-------------------------------------------------------------------------
HDR.T100.Version	string		'BCI 0.10' testing state of RS's data aquisition module 
					'BCI 1.00' testing state of RS's data aquisition module 
HDR.T100.AmpSens	float		Sensitivity of g.Tec-Amplifier 
HDR.T100.Range		float		Maximum physical value in DAQ
HDR.T100.Bits		integer		Number of bits in ADC

HDR.T100.DAQ_ID		<any>		z.B. "NI 9876"
HDR.T100.AmpName	string		z.B. "g.tec: Ser.No: 01234567"
HDR.Filter.LowPass	float		[Hz]
HDR.Filter.HighPass	float		[Hz]
HDR.Filter.Notch 	int8		0=Off, 1=On

HDR.T0			float[1..6]	[yyyy mm dd hh MM ss.cc] see HELP CLOCK  
HDR.NS			Integer		number of channels
HDR.SampleRate		Integer		sampling frequency in [Hz]

HDR.Label		char-array	z.B. '+C3a - C3p  '
HDR.PhysDim		char-array	'uV    '

-------------------------------------------------------------------------




(C) ================== Header of EDF-files ========================

This documents is based on the EDF-header as defined in the "EDF/GDF toolbox for Matlab"                                                            
It will be used as template to define the header information based on different formats   
                                                         
=================|=====|===============================|=======================================
 field name       level  type and size                   text	
=================|=1234|===============================|=======================================
EDF.
   .FILE.
      .FID	     *	file identifier		
 	.OPEN		2 | 1 | 0    			set to 1 by EDFOPEN and set to 0 by EDFCLOSE
 	.Ext		char(n)				file extension, usually 'edf' or 'rec'
 	.Name         #	char(n)				file name
 	.Path        	char(n)				path 
 	.POS	     *	int					Position in EDF-Blocks
    .FileName           char(n)				full file name, including path,filename and extension
    .VERSION	     *	char(8) 				EDF field: Version
    .PID              # char(n)			      EDF field: patient ID
    .RID              # char(n)                       EDF field: recording ID 
    .T0                 int(6) [yyyy mm dd hh MM ss]	EDF field: startdatetime of recording
    .HeadLen         *  int					EDF field: Header Length
    .NRec            *  int                     	EDF field: number of records
    .Dur             *  float                       	EDF field: Duration of record
    .NS		     *# int                      	EDF field: number of channels                               
    .Label	      #	char array [NS,:]         	EDF field: Label
    .Transducer       #	char array [NS,80]        	EDF field: Transducer
    .PhysDim          #	char array [NS,:]         	EDF field: physical dimension
    .PhysMin         *  float array [NS,1]        	EDF field: physical minimum
    .PhysMax         *  float array [NS,1]        	EDF field: physical maximum
    .DigMin          *  int array  [NS,1]         	EDF field: digital minimum
    .DigMax          *  int array  [NS,1]         	EDF field: digital maximum
    .PreFilt	      #	char array [NS,80]        	EDF field: Pre-filtering
    .SPR	     *	int array  [NS,1]         	EDF field: Samples per Record 
    .GDFTYP 	     *	int [NS]				defines datatype of the channel  
    .Cal	      #	float array [NS,1]        
    .Off              # float array [NS,1]         
    .Calib			float array [1+NS,NS]      
    .SampleRate	      #	float array [NS,1]         
    .Chan_Select        bool array [NS,1]          
    .ChanTyp            char array [1,EDF.NS]		indicates EEG, EOG, ECG, EMG, channel
    .AS.                					undocumented
       .bpb             int
       .spb             int
       .bi              int array [1+NS,1]      
       .GDFbi           int array [1+NS,1]      
       .INFO		char array
       .Method		char array
       .Date		int(6)
=================|=====|===============================|=======================================
EDF.AS.startrec		record number at beginning of last gdfread(...)
EDF.AS.numrec		number of records loaded with last gdfread(...)

EDF.SIE	-----------	fields for Version 0.50 and higher
EDF.SIE.RS		switch for Resampling (0 = none)
EDF.SIE.RR		switch for Calibration and ReReferinzing (0 = none)
EDF.SIE.TH		Overflow detection (1=yes)
EDF.SIE.RAW		Raw EDF format (1, each column contains one block)
EDF.SIE.AFIR		apply AFIR (1=yes)

EDF.SIE.InChanSelect	input channel selection, # read from Raw-EDF input file
EDF.SIE.ChanSelect	(output) channel selection, 

EDF.SIE.ReRefMx		ReReferenzing Matrix
EDF.SIE.REG		Regression Matrix


EDF.AFIR	-----------	fields for Adaptive Filter for ECG minimization

=================|=====|===============================|=======================================
     
#  level 4, application  exported, always available in all future version (strict definition).
*  level 3, transport	EDF/GDF specific properties, useful for lower level EDF access,
   level 2, access	matlab specific fields, only used within the EDF toolbox, can change ithout further notices.
   level 1, low level	Binary representation as defined in the EDF specification,         
                              
Status of this document: Finished, not proofread yet.
(C) 1998 by Alois Schloegl
13.Nov.1998

This document holds at least for Version 3 of the "EDF toolbox for the use with Matlab". 
All fields are case sensitive.

"not supported" means, you can not rely on that field.
char(n) is a char array, string
The types int, float, bool, are always stored in double. 
                                                                                       
The definition holds for Version #3.00 - #3.08 (current). Level 1,2 fields might change without further notice. 
Further changes will be added at the end of this document. There should be none.


AMENDMENTS:
=) Changes due to the consideration of GDF:
The definition above holds for the "EDF/GDF toolbox for Matlab" Ver 0.40, too.
The following changes were performed. 

=================|=====|===============================|=======================================
 field name       level  type and size                   text	
=================|=1234|===============================|=======================================
~ (modified) 11:09 05.08.99 V0.56 
 	.POS	     *	int					Position in EDF-Blocks

+ (added) 11:09 12.05.99 V0.46 
EDF.AS.startrec    	int				
EDF.AS.numrec		int				

* (changed)
EDF.FILE.OPEN	 	2 | 1 | 0    			set to 0,1 and 2 by EDFCLOSE, EDFOPEN(.,'r') and EDFOPEN(.,'w'), respectively

+ (added)
EDF.GDFTYP 	     *	int [NS]			defines datatype of the channel  
EDF.AS.bpb              int				bytes per block
EDF.AS.GDFbi            int				bytes per block

- (removed)
    .sPhysMin		char array [NS,8]         	EDF field: physical minimum (8*ASCII)
    .sPhysMax  		char array [NS,8]         	EDF field: physical maximum (8*ASCII)
=================|=====|===============================|=======================================

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -