WFDB headers


WFDB refers to a software package originally developed by MIT for viewing, analyzing, and creating recordings of physiologic signals. It is described at This package uses header files to specify the format and attributes of signal files. EMGlab recognizes a subset of WFDB header specifications.

There should be a header file for each "record." In EMG terms, a "record" refers to the results of a single contraction. This can be a single EMG signal, multiple EMG signals recorded simultaneously from different electrodes, or a combination of EMG signals and other types of signals, such as force. (We will refer to multiple signals as multiple channels of data.) Multiple signals can be in the same or in different data files. For EMGlab, all multiple channels of data must have the same sampling rate.

The header file for EMGlab is a text file that contains a record line, one signal line for each channel of data, and optional comment lines.A full description can be found on the web site (


The record line contains the following fields:

record name: a string of characters that identifies the record.

number of channels: an integer greater than zero.

sampling rate: an integer or floating-point number, interpreted as samples per second.

Each signal line contains the following fields:

file name: the name of the file containing the signal. The signals from different channels can be stored in the same file, but they do not have to be. File name should either contain an absolute path name or refer to a file in the same directory as the header file or in the Matlab path.

format: an integer that specifies the storage format:

16 means 16-bit little-endian integer (the format used on PCs)

61 means 16-bit big-endian integer (the format used on Macs)

byte offset: [optional]. If present, this field must be preceded by a "+" sign and must follow immediately after the format field with no intervening spaces. This field is an integer that tells how many bytes to skip over from the start of the file to get to the first sample of this signal.

ADC gain: [optional]. This is a floating point number that specifies the number of A/D units that correspond to one physical unit. If absent, EMGlab will plot signal amplitude in A/D units.

units: [optional]. If present, this field must be preceded by a "/" sign and follow immediately after the ADC gain field with no intervening spaces. This is a string that specifies the physical units of the signal.

Comment lines must start with the "#" character. For files that will be shared on the EMGlab website, we recommend that comments have the following form:

# item: value

where "item" indicates the type of information and "value" specifies the information. We suggest that the following documentary information should be included. Items taking default values (shown in brackets) can be omitted.

# source: [natural] or synthetic

# species: [human] or (other species)

# gender: m or f

# age: (in years)

# diagnosis: [normal] or (type of disorder)

# muscle: (name of muscle)

# protocol: (e.g., isometric ramp contraction)

# level: (level of contraction)

# electrode: (type of recording electrode)

# high-pass filter: (analog high-pass filter)

# low-pass filter: (analog anti-alias filter)

# contributor: (name of contributor)

# date: (date on which the signal was recorded)

# identifier: (this uniquely identifies the record in the contributor's data base)

# contact: email address for contacting the contributor

# remarks:

Note that neither the header file, nor the signal files, nor the file names may contain any information that would reveal the identity of a particular human subject.

Veterans Affairs Palo Alto Rehabilitation Research and Development Center
National Institute of Neurological Disorders and Stroke