Next: SORTANN(1) Up: WFDB Applications Guide Previous: SKEWEDIT(1)On This Page


snip - copy an excerpt of a WFDB record


snip -i input-record -n new-record [ options ]


snip copies the signal files (and, optionally, annotation files) of the specified input-record, and generates a header file, thereby creating the specified new-record. snip is usually used to extract an excerpt of its input-record, using the -f and -t options (see below) to specify the segment to be copied.

The program xform(1) can also perform this task, but offers additional flexibility (it can scale the signals, resample them at a different frequency, rearrange them, select subsets of them, or reformat them); snip is faster than xform, however.

Options are:

-a annotator
Copy the specified annotator as well as the signal files. Two or more annotator arguments, separated by spaces, can follow -a. An annotator supplied via the standard input may be specified using ‘-’, but only immediately after -a; in this case only, annotations are copied to the standard output.
-f time
Begin at the specified time in the input record (default: the beginning of the record).
Print a usage summary.
-l duration
Snip a segment of the specified duration (hh:mm:ss or snnnn; overrides -t if given).
Preserve segments of multi-segment input, if possible.
-O format
Write output in the specified format. See header(5) for a list of available formats (16, 80, 212, ...). If this option is omitted, snip uses a format that best fits the ADC resolution of the samples.
Suppress output of info strings in the output header file.
-t time
Process until the specified time in the input record (default: continue to the end of the record).


It may be necessary to set and export the shell variable WFDB (see setwfdb(1) ).


output annotation file
output signal file
output header file

See Also

setwfdb(1) , xform(1) , header(5)


George B. Moody (


Table of Contents

Up: WFDB Applications Guide

Please e-mail your comments and suggestions to, or post them to:

MIT Room E25-505A
77 Massachusetts Avenue
Cambridge, MA 02139 USA

Updated 26 January 2018