Segmentation of electrical signal by wave specifications
Usage
segmentation(
object,
by = "sinus",
pad = "before",
pad_length = 0L,
center = NULL
)
segment_by_sinus(object)
pad_sequence(object, pad, pad_length)
center_sequence(object, center, pad_length)
Arguments
- object
Object of the
egm
class, which includes header, signal information, and annotation information.- by
A
character
string naming waveform type to segment by. Options include the following:sinus = Will call
segment_by_sinus()
onegm
object
- pad
character
String to specify which side of sequence to pad (or both). Options includec("before", "after", "both")
.Default is before. If center is being used, then the this argument is ignored.
- pad_length
Offers padding of the segmented beats to a maximum length, as an
integer
. The default is 0L, which means no padding will be applied. Ifpad > 0
then will add the baseline value (specified within the header of the signal) to either before or after the signal. You can also choose tocenter
the sequence, which will also only occur ifpad > 0
. I.e., ifpad = 500
then each segmented object will be increased TO a max length of500
. If the maximum size is larger than the padding size, then a warning will be issued and the sequence will be truncated.- center
A single Roman alphabetic letter
character
that utilizes the annotations given in theegm
object to center the sequence. This is found under the type variable in the annotation table.For example, if sinus waveforms were annotated as
c("P", "R", "T")
at their peak, then could center around R. This will only occur ifpad > 0L
. This is case-insensitive. The amount of padding will be determined by the pad_length argument
Value
Returns a list of egm
objects. Each item is a segmentation of an
egm
, using the selected channels (if available). It will attempt to
optimize and pick the best annotations to help create consistencies between
the signal channels as possible.
Details
Requires a 12-lead ECG that has been digitized, and input as an
egm
object. This object must have an annotation file associated with it
that contains demarcation annotations. Please see below for approaches based
on the annotation type. Current, the following are supported:
sinus = supports using ecgpuwave as the annotator
Sinus beat segmentation
Identify individual sinus beats on surface ECG and extract as individual
beats, returning a list of sinus beats in the form of the egm
class. a
consistent P, R, and T wave amongst all channels. If a channel
does not have, for example, a visible T wave, it will still label it as
information gained from other channels. This is based off of the algorithm
from the annotation tool named ecgpuwave
. Please see read_annotation()
for further details.