Plot ectopic beats#
# Author: Nicolas Legrand <nicolas.legrand@cfin.au.dk>
# Licence: Apache-2.0
from systole.plots import plot_ectopic
Visualizing ectopic subspace from RR time series#
from systole import import_rr
# Import PPG recording as numpy array
rr = import_rr().rr.to_numpy()
plot_ectopic(rr, input_type="rr_ms")
<Axes: title={'center': 'Subspace 1 \n (ectopic beats detection)'}, xlabel='Subspace $S_{11}$', ylabel='Subspace $S_{12}$'>
Visualizing ectopic subspace from the artefact dictionary generated by :py:func:systole.detection.rr_artefacts()#
from systole.detection import rr_artefacts
# Use the rr_artefacts function to find ectopic beats
artefacts = rr_artefacts(rr)
plot_ectopic(artefacts=artefacts)
<Axes: title={'center': 'Subspace 1 \n (ectopic beats detection)'}, xlabel='Subspace $S_{11}$', ylabel='Subspace $S_{12}$'>
Using Bokeh as plotting backend#
from bokeh.io import output_notebook
from bokeh.plotting import show
from systole.detection import rr_artefacts
output_notebook()
# Use the rr_artefacts function to find ectopic beats
artefacts = rr_artefacts(rr)
show(
plot_ectopic(artefacts=artefacts, backend="bokeh")
)