Module: cardiac

Cardiac analysis nodes.

These nodes analyze cardiac data, for instance from ECG or PPG sensors.

HeartRate

Calculate the heart rate from the detected R peaks in QRS complexes.

The input of this node should be the peak times in the instance axis of the stream with the name of "-peaks", such as that returned as the output of the RDetection node. The heart rate is calculated considering the last "window_length" (seconds or events, depending on "window_length_unit"). The output packet has a stream named "-hr" (*- preserved from the input stream name, replacing only peaks), which contains a block with a TimeAxis with irregular rate and a FeatureAxis with feature-name "HR".

More Info...

Version 0.8.0

Ports/Properties

  • 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.

    • verbose name: Metadata
    • default value: {}
    • port type: DictPort
    • value type: dict (can be None)
  • data
    Data to process.

    • verbose name: Data
    • default value: None
    • port type: DataPort
    • value type: Packet (can be None)
    • data direction: INOUT
  • window_length_unit
    Unit in which the window length is given.

    • verbose name: Unit Of Measurement For Window Length
    • default value: seconds
    • port type: EnumPort
    • value type: object (can be None)
  • window_length
    Sliding window length (beats or seconds). 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 (Beats Or Sec)
    • default value: 10
    • port type: FloatPort
    • value type: float (can be None)
  • window_shift
    Shift window length (beats or 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 (Beats Or Sec)
    • default value: 3
    • port type: FloatPort
    • value type: float (can be None)
  • override_axes
    Replace the incoming instance axis with a TimeAxis, add an additional len=1 FeatureAxis: "HR", and drop has_markers from the chunk properties if Present. If False then the incoming axes will be unchanged. Note that the default value (currently True) may change to False in the future so you should set this parameter explicitly in your scripts and pipelines.

    • verbose name: Override Axes
    • default value: True
    • port type: BoolPort
    • value type: bool (can be None)
  • field_name
    The name of the new instance axis field or FeatureAxis name if using override_axes.

    • verbose name: Field Name
    • default value: HR
    • port type: StringPort
    • value type: str (can be None)

HeartRateVariability

This node calculates heart rate variability (HRV) from the detected R peaks in QRS complexes.

The input to this node should be the output from the RDetection node, or a similarly prepared marker stream with its name terminating in "-peaks" and the instance times being the timestamps of detected heart beats. The HRV statistics are calculated considering the history of events in the past "window_length". The following Seven time-domain heart variability features will be calculated and placed in a feature axis of a new stream. - RRI (ms): R peak-to-peak interval. - SDNN (ms): the standard deviation of peak intervals - RMSSD (ms): root mean square of successive peak interval differences - SDSD (ms): standard deviation of successive peak interval differences - NN50 (#): the number of pairs of adjacent peak intervals that differ more than 50 ms - pNN50 (%): the percentage of adjacent peal interval differences that differ from each other more than 50 ms - NN20 (#): the number of pairs of adjacent peak intervals that differ more than 20 ms - pNN20 (%), the percentage of adjacent peak interval differences that differ from each other more than 20 ms The detected heart rate variability parameters will be placed in a feature axis of a new stream. The name of the input stream "xxx-peaks" will be used and the output stream name will be "xxx-hrv".

More Info...

Version 1.1.8

Ports/Properties

  • 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.

    • verbose name: Metadata
    • default value: {}
    • port type: DictPort
    • value type: dict (can be None)
  • data
    Data to process.

    • verbose name: Data
    • default value: None
    • port type: DataPort
    • value type: Packet (can be None)
    • data direction: INOUT
  • window_length_unit
    Unit in which the window length is given.

    • verbose name: Unit Of Measurement For Window Length
    • default value: seconds
    • port type: EnumPort
    • value type: object (can be None)
  • window_length
    Sliding window length (beats or seconds). A history of events spanning this duration (or this many events) will be used to calculate heart rate variability statistics.

    • verbose name: Processing Sliding Window Length (Beats Or Sec)
    • default value: 300
    • port type: FloatPort
    • value type: float (can be None)
  • wait_full_buffer
    Wait for the full sliding window buffer to be filled before calculating and outputting HRV statistics.

    • verbose name: Wait For Full Buffer
    • default value: False
    • port type: BoolPort
    • value type: bool (can be None)
  • window_shift

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

    • verbose name: Calculate Sdnn
    • default value: True
    • port type: BoolPort
    • value type: bool (can be None)
  • calculate_rmssd

    • verbose name: Calculate Rmssd
    • default value: True
    • port type: BoolPort
    • value type: bool (can be None)
  • calculate_sdsd

    • verbose name: Calculate Sdsd
    • default value: True
    • port type: BoolPort
    • value type: bool (can be None)
  • calculate_nn50

    • verbose name: Calculate Nn50
    • default value: True
    • port type: BoolPort
    • value type: bool (can be None)
  • calculate_pnn50

    • verbose name: Calculate Pnn50
    • default value: True
    • port type: BoolPort
    • value type: bool (can be None)
  • calculate_nn20

    • verbose name: Calculate Nn20
    • default value: True
    • port type: BoolPort
    • value type: bool (can be None)
  • calculate_pnn20

    • verbose name: Calculate Pnn20
    • default value: True
    • port type: BoolPort
    • value type: bool (can be None)
  • override_axes
    Replace the incoming instance axis with a TimeAxis, add an additional len=1 FeatureAxis: "RR", and drop has_markers from the chunk properties if Present. If False then the incoming axes will be unchanged. Note that the default value (currently True) may change to False in the future so you should set this parameter explicitly in your scripts and pipelines.

    • verbose name: Override Axes
    • default value: True
    • port type: BoolPort
    • value type: bool (can be None)

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/PPG data in one channel. The time of the detected peaks will be placed in an instance axis of a new stream with the name of input stream appended by "-peaks". For example, if the name of input stream is "ecg", the new stream that contains the R peaks is called "ecg-peaks". The values (amplitudes) of the input signal at the peak times are also saved in the data of the new stream.

More Info...

Version 1.1.1

Ports/Properties

  • 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.

    • verbose name: Metadata
    • default value: {}
    • port type: DictPort
    • value type: dict (can be None)
  • 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 (Sec)
    • default value: 7
    • port type: FloatPort
    • value type: float (can be None)
  • win_shift
    Shift window length in second. 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 (Sec)
    • 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 (Between 0 And 1)
    • default value: 0.4
    • port type: FloatPort
    • value type: float (can be None)
  • max_heartrate
    This is the maximum heart rate (beats per minutes) that the program assumes exists in the data.

    • verbose name: Maximum Heart Rate (Bpm)
    • default value: 240
    • port type: FloatPort
    • value type: float (can be None)
  • win_ave
    Window length in seconds to be used to smooth the input data.

    • verbose name: Average Window Length (Seconds)
    • default value: 0.15
    • port type: FloatPort
    • value type: float (can be None)
  • win_median
    Window length in seconds to be used to find median.

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

RespRate

Calculate the respiration rate from a detected R peak.

This node requires two streams on its input. One of the required streams is the ECG time series (can have any name). The other stream is the R detected peaks as events in an InstanceAxis and its name must end with '-peaks'. These two streams can be found in the output of the RDetection node. The output is the respiration calculated from the previous "window_length" (seconds or beats) data stored in the buffer, with a FeatureAxis with a single feature named "RR" and a TimeAxis with an irregular rate (one event per beat). The output stream name will be the same as the input stream, replacing the "-peaks" with "-resp-rate".

More Info...

Version 0.9.0

Ports/Properties

  • 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.

    • verbose name: Metadata
    • default value: {}
    • port type: DictPort
    • value type: dict (can be None)
  • data
    Data to process.

    • verbose name: Data
    • default value: None
    • port type: DataPort
    • value type: Packet (can be None)
    • data direction: INOUT
  • window_length_unit
    Unit in which the window length is given.

    • verbose name: Unit Of Measurement For Window Length
    • default value: seconds
    • port type: EnumPort
    • value type: object (can be None)
  • window_length
    Sliding window length (beats or seconds). 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 (Beats Or Sec)
    • default value: 60
    • port type: FloatPort
    • value type: float (can be None)
  • wait_full_buffer
    Wait for the full window buffer as specified above before outputting Respiration Rate values

    • verbose name: Wait For Full Buffer
    • default value: False
    • port type: BoolPort
    • value type: bool (can be None)
  • window_shift
    Shift window length (beats or 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 an overlap between two consecutive processing windows. If the 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 (Beats Or Sec)
    • default value: 1
    • port type: FloatPort
    • value type: float (can be None)
  • minimum_respiration_rate
    minimum respiration rate (respiration per minute). The minimum respiration rate should be set here.

    • verbose name: Minimum Respiration Rate (Respiration Per Minute)
    • default value: 10
    • port type: FloatPort
    • value type: float (can be None)
  • maximum_respiration_rate
    maximum respiration rate (respiration per minute). The maximum respiration rate should be set here.

    • verbose name: Maximum Respiration Rate (Respiration Per Minute)
    • default value: 28
    • port type: FloatPort
    • value type: float (can be None)
  • smooth_it
    Smooth the calculated respiration rate output. If this box is not checked, there might be sudden changes in the calculated respiration rate.

    • verbose name: Smooth It
    • default value: True
    • port type: BoolPort
    • value type: bool (can be None)
  • override_axes
    Replace the incoming instance axis with a TimeAxis, add an additional len=1 FeatureAxis: "RR", and drop has_markers from the chunk properties if present. If False then the incoming axes will be unchanged. Note that the default value (currently True) may change to False in the future so you should set this parameter explicitly in your scripts and pipelines.

    • verbose name: Override Axes
    • default value: True
    • port type: BoolPort
    • value type: bool (can be None)
  • field_name
    The name of the new instance axis field or FeatureAxis name if using override_axes.

    • verbose name: Field Name
    • default value: RR
    • port type: StringPort
    • value type: str (can be None)