EDR File Structure

WinEDR

Data Files > EDR File Structure

The EDR data file is designed to store up to 12 channels of 16 bit integer binary records of digitised analogue signals, the associated scaling information required to reconstitute actual signal levels.

EDR files consists of a 2048 byte header block at the beginning of the file which contains a list of ASCII-format keywords, detailing the number of records in the file, record size, scaling factors etc. It is followed by the data block containing the digitised A/D samples.

Header Block

The header block contains the information needed to allow a program to determine the number of channels, samples etc. in the file. It is usually the first block to be read when a file is opened. File parameters are stored as ASCII text in the form of keywords, one word per line, as follows

KEY= <value> <cr> <lf>

where <value> is a number or text depending on the parameter and <cr> <lf> are the carriage return and line feed characters.

A typical header block (from a file with 2 channels) contains the following keywords.

VER=6.4 <cr><lf>                      EDR file version number
NC=2 <cr><lf>                      No. of analogue input channels
NP=102400 <cr><lf>          No. of A/D samples in data block
NBH=2048 <cr><lf>          No. of bytes in file header block
AD=5.0000 <cr> <lf>          A/D converter upper limit of voltage range (V)
ADCMAX=4095 <cr><lf>          Maximum A/D sample value
DT=.1600 <cr><lf>          A/D sampling interval (s)

YN0=Im <cr> <lf>                      Channel 0 name (n=0 .. NC-1)
YU0=nA <cr> <lf>                      Channel 0 units
YCF0=0.0001 <cr> <lf>          Channel 0 calibration factor V/units
YAG0=10.0 <cr> <lf>          Channel 0 gain factor
YZ0=1024 <cr> <lf>          Channel 0 zero level (A/D bits)
YO0=0 <cr> <lf>                      Channel 0 offset into sample group in data block

YN1=Im <cr> <lf>                      Channel 1 name (n=0 .. NC-1)
YU1=nA <cr> <lf>                       Channel 1 units
YCF1=0.01 <cr> <lf>          Channel 1 calibration factor V/units
YAG1=1.0 <cr> <lf>          Channel 1 gain factor
YZ1=1024 <cr> <lf>          Channel 1 zero level (A/D bits)
YO1=1 <cr> <lf>                      Channel 1 offset into sample group in data block

TU=ms <cr> <lf>               Time units
ID=  Cell 1 <cr> <lf>          Experiment identification line

BAK=T1 <cr> <lf>          BAK=T indicates a .BAK file exist

 

Event detector parameters

DETCH=0 <cr><lf>          Event detector channel

DETRS=1024 <cr><lf>          No. samples in event detector record

DETYT=500 <cr><lf>          Event detector amplitude threshold (A/D units)

DETTT=5E-3 <cr><lf>          Event detector.time threshold (s)

DETDD=5-E2 <cr><lf>          Event detector dead time (s)

DETBA=5E-2 <cr><lf>          Event detector.baseline averaging time (s)

DETPT=10.0 <cr><lf>          Event detector pretrigger percentage

 

Single-channel analysis parameters

VARRS=1024 <cr><lf>          No. samples in variance record

VAROV=0 <cr><lf>          Percentage overlap of variance records

VARTR=0.0005 <cr><lf>          MEPC rise time (MEPC freq. analysis) (s)

VARTD=0.005 <cr><lf>          MEPC decay time (MEPC freq. analysis) (s)

UNITC=1.0 <cr><lf>          Single channel current

DWTTH=50 <cr><lf>          Transition detection threshold (%)

Note. It should not be assumed that the keywords will follow any particular order.

Data block

The data block contains the digitised signals, stored in the form of 16 bit binary integers. Each A/D sample takes up 2 bytes of space. The size of the data block is determined by the number of channels and number of samples per channels in the record

          A.2

If there is more than one A/D input channel, samples are interleaved within the data block. For example, for 2 channels,

Y01 Y11 Y02 Y12 ..... Y0nsamples Y1nsamples          A.3

Different laboratory interfaces supported by WinEDR return multi-channel A/D samples in different orders. The channel interleaving order for a data file is specified by the YOn= channel keyword in the file header block.

Scaling from A/D unit to physical units

The calibrated signal level (ycal) in the appropriate channel units can be reconstructed (for channel n) using information stored in the header block, using,

where AD is the maximum positive limit of the A/D converter voltage range, ADCMAX is maximum A/D sample value, YCFn is the channel calibration factor, YAGn amplifier gain and YZn zero level.