Skip to content

← cardiac package

RDetection

Detect R peaks in QRS complexes in ECG time series and peaks in PPG time series base on a modified version of the Pan-Tompkin algorithm.

It can also detect peaks in PPG signals. The input stream should contain ECG or PPG data in a single channel. (If your data has multiple ECG channels, use the Mean node before this one to average them.) The time of the detected peaks will be placed in an instance axis of a new stream with the name of the input stream appended by "-peaks" (i.e., eee-peaks). The values (amplitudes) of the input signal at the peak times are also saved in the data tensor of the new stream. This node is typically followed with either the HeartRate, HeartRateVariability or RespirationRate nodes, all of which can take in its output. More Info... Version 1.2.0

Ports/Properties

data

Data to process.

  • verbose name: Data
  • default value: None
  • port type: DataPort
  • value type: Packet (can be None)
  • data direction: INOUT

win_processing

Sliding window length in second. If the length of data is more than this length, the data will be segmented into this processing window. If the length of data is less than this window, the data will be buffered to get more data.

  • verbose name: Processing Sliding Window Length
  • default value: 7
  • port type: FloatPort
  • value type: float (can be None)

win_shift

Shift window length in seconds. The processing window is shifted by this length. Therefore, it should be less than or equal to the processing window. If it is less than the processing window, there will be overlap between two consecutive processing windows. If shift window is the same as the processing window, then there will be no overlap between two consecutive processing windows.

  • verbose name: Shift Window Length
  • default value: 1
  • port type: FloatPort
  • value type: float (can be None)

sensitivity_threshold

The peaks with an amplitude less than the average amplitude in the processing window multiplied by this value (between 0 and 1) will not be detected. In a noisy data recording, decreasing this value decreases false positive rate. In a clean data recording, increasing this value reduces false negative rate.

  • verbose name: Sensitivity
  • default value: 0.4
  • port type: FloatPort
  • value type: float (can be None)

max_heartrate

This is the maximum heart rate (beats per minute) that is assumed to exist in the data.

  • verbose name: Max Heart Rate
  • default value: 240
  • port type: FloatPort
  • value type: float (can be None)

win_ave

Window length in seconds used to smooth the incoming data before detection.

  • verbose name: Smoothing Window Length
  • default value: 0.15
  • port type: FloatPort
  • value type: float (can be None)

win_median

Window length in seconds to be used to find the median of the incoming data.

  • verbose name: Median Window Length
  • default value: 0.055
  • port type: FloatPort
  • value type: float (can be None)

set_breakpoint

Set a breakpoint on this node. If this is enabled, your debugger (if one is attached) will trigger a breakpoint.

  • verbose name: Set Breakpoint (Debug Only)
  • default value: False
  • port type: BoolPort
  • value type: bool (can be None)

metadata

User-definable meta-data associated with the node. Usually reserved for technical purposes.

  • verbose name: Metadata
  • default value: {}
  • port type: DictPort
  • value type: dict (can be None)