rdsamp - read WFDB signal files
rdsamp -r record [ options ... ]
rdsamp reads signal files for the specified record and writes
the samples as decimal numbers on the standard output. If no options are
provided, rdsamp starts at the beginning of the record and prints all samples.
By default, each line of output contains the sample number and samples
from each signal, beginning with channel 0, separated by tabs.
- Produce output in CSV (comma-separated value) format (default: write output
in tab-separated columns).
- -f time
- Begin at the specified time. By default,
rdsamp starts at the beginning of the record.
- Print a usage summary.
- Read the signal files in high-resolution mode (default: standard mode). These
modes are identical for ordinary records. For multifrequency records, the
standard decimation of oversampled signals to the frame rate is suppressed
in high-resolution mode (rather, all other signals are resampled at the
highest sampling frequency).
- -l interval
- Limit the amount of output to the
specified time interval (in standard time format; default: no limit).
If both -l and -t are used, rdsamp stops at the earlier of the two limits.
- Print times in seconds and milliseconds, and values in physical units.
By default, rdsamp prints times in sample intervals and values in A/D
- Same as -p, but yields higher precision in the sample values (8
decimal places rather than 3).
- A single character can be attached to either
-p or -P to choose the
- format for the printed times in the first column of
output. The choices are:
- -pd (or -Pd)
- Print time of day and date if known,
as [hh:mm:ss DD/MM/YYYY]. The base time and date must appear in the header
file for the record; otherwise, this format is equivalent to "e" format
- -pe (or -Pe)
- Print the elapsed time from the beginning of the record,
- -ph (or -Ph)
- Print the elapsed time in hours.
- -pm (or -Pm)
the elapsed time in minutes.
- -ps (or -Ps)
- Print the elapsed time in seconds.
This is the default format when using -p or -P.
- -pS (or -PS)
- Print the elapsed
time in sample intervals.
- -s signal-list
- Print only the signals named in the
signal-list (one or more input signal numbers or names, separated by spaces;
default: print all signals). This option may be used to re-order or duplicate
- -S signal
- Search for the first valid sample of the specified signal
(a signal name or number) at or following the time specified with -f (or
the beginning of the record if the -f option is not present), and begin
printing at that time.
- -t time
- Stop at the specified time. By default, rdsamp
stops at the end of the record.
- Print column headings (signal names on
the first line, units on the second). The names of some signals are too
wide to fit in the columns; such names are shortened by omitting the initial
characters (since names of related signals often differ only at the end,
this helps to make the columns identifiable). Names of units are shortened
when necessary by omitting the final characters, since the initial characters
are usually most important for distinguishing different units.
output in WFDB-XML format (same as the CSV format produced using the -c option,
but wrapped within an XML header and trailer). This format is recognized
and parsed automatically by wrsamp.
It may be necessary to set
and export the shell variable WFDB (see setwfdb(1)
is provided in the app directory of the WFDB Software Package. Run make
in that directory to compile and install it if it have not been installed
The PhysioNet ATM (http://physionet.org/cgi-bin/ATM) provides web
access to rdsamp (select Show samples as text from the Toolbox).
George B. Moody (email@example.com)
Table of Contents
Up: WFDB Applications Guide
Please e-mail your comments and suggestions to firstname.lastname@example.org, or post them to:PhysioNet
MIT Room E25-505A
77 Massachusetts Avenue
Cambridge, MA 02139 USA
Updated 8 March 2019