ECGWaveForm#

class torch_ecg.utils.ECGWaveForm(name: str, onset: float | int, offset: float | int, peak: float | int, duration: float | int)[source]#

Bases: object

Dataclass for ECG waveform information.

name#

Name of the wave, e.g. “N”, “p”, “t”, etc.

Type:

str

onset#

Onset index of the wave, nan for unknown/unannotated onset.

Type:

float or int

offset#

Offset index of the wave, nan for unknown/unannotated offset.

Type:

float or int

peak#

Peak index of the wave, nan for unknown/unannotated peak.

Type:

float or int

duration#

Suration of the wave, with units in milliseconds, nan for unknown/unannotated duration.

Type:

float or int

TODO

Add fs field to indicate the sampling rate of the waveform, and make duration a property computed from fs, onset, and offset.

property duration_: float | int#

Duration of the wave, with units in number of samples.