header_table {EGM} | R Documentation |
Header Table
Description
header_table()
modifies the data.table
class to work with
header data. The header data is read in from a similar format as to that of
WFDB files and should be compatible/interchangeable when writing out to disk.
The details extensively cover the type of data that is input. Generally, this
function is called by read_*_header()
functions and will generally not be
called by the end-user.
Usage
header_table(
record_name = character(),
number_of_channels = integer(),
frequency = 250,
samples = integer(),
start_time = strptime(Sys.time(), "%Y-%m-%d %H:%M:%OSn"),
ADC_saturation = integer(),
file_name = character(),
storage_format = 16L,
ADC_gain = 200L,
ADC_baseline = ADC_zero,
ADC_units = "mV",
ADC_resolution = 12L,
ADC_zero = 0L,
initial_value = ADC_zero,
checksum = 0L,
blocksize = 0L,
label = character(),
info_strings = list(),
additional_gain = 1,
low_pass = integer(),
high_pass = integer(),
color = "#000000",
scale = integer()
)
is_header_table(x)
Arguments
record_name |
A |
number_of_channels |
An |
frequency |
A |
samples |
An |
start_time |
The |
ADC_saturation |
An |
file_name |
A |
storage_format |
An |
ADC_gain |
An |
ADC_baseline |
An |
ADC_units |
A |
ADC_resolution |
An |
ADC_zero |
An |
initial_value |
An |
checksum |
An |
blocksize |
An |
label |
A |
info_strings |
A |
additional_gain |
A |
low_pass |
An |
high_pass |
An |
color |
A |
scale |
An |
x |
A |
Details
The header_table
object is relatively complex in that it directly
deals with properties of the signal, and allows compatibility with WFDB
files and other raw header files for other signal objects. It can be written
out using write_wfdb()
.
Value
A header_table
object that is an extension of the data.table
class. This contains an adaptation of the function arguments, allowing for
compatibility with the WFDB class.
Header file structure
There are three components to the header file:
-
Record line that contains the following information, in the order documented, however pieces may be missing based on different parameters. From left to right...
Record name
Number of signals: represents number of segments/channels
Sampling frequency (optional)
Number of samples (optional)
Time: in HH:MM:SS format (optional)
Date: in DD/MM/YYYY (optional)
-
Signal specification lines contains specifications for individual signals, and there must be as many signal lines as there are reported by the above record line. From left to right....
File name: usually *.dat
Format
integer
: represents storage type, e.g. 8-bit or 16-bitADC gain: ADC units per physical unit (optional)
Baseline: corresponds to 0 physical units, sep = '*(0)" (optional)
Units: with '/' as a field separator e.g '*/mV' (optional)
ADC resolution
integer
: bits, usually 8 or 16 (optional)ADC zero: represents middle of ADC input range (optional)
Initial value (optional)
Checksum (optional)
Block size (optional)
Description: text or label information (optional)
-
Info strings are unstructured lines that contains information about the record. Usually are descriptive. Starts with initial '#' without preceding white space at beginning of line.