plot_signals_from_challenge_results#

pepbench.plotting.plot_signals_from_challenge_results(datapoint: BasePepDatasetWithAnnotations, pep_results_per_sample: DataFrame, *, collapse: bool = False, normalize_time: bool = False, heartbeat_subset: Sequence[int] | None = None, add_pep: bool = False, **kwargs: Any) tuple[Figure, Sequence[Axes]][source]#

Plot signals annotated with labels from challenge-style results.

Parameters:
datapointBasePepDatasetWithAnnotations

Dataset containing ECG/ICG traces.

pep_results_per_sampleclass:~pandas.DataFrame

Challenge-format per-sample results containing predicted and reference labels for Q-peaks and B-points.

collapsebool, optional

If True, plot ECG and ICG on a single axis. Default: False.

normalize_timebool, optional

If True, convert time index to seconds. Default: False.

heartbeat_subsetSequence[int] | None, optional

Subset of heartbeat indices to plot. Default: None.

add_pepbool, optional

If True, overlay computed PEP rectangles for reference and estimated labels.

**kwargsAny

Additional plotting options.

Returns:
(fig, axs)tuple[

Figure, Axes | Sequence[Axes] ] Figure and axis (or axes) with challenge labels and optional PEP overlays.

Notes

This function converts the challenge table into per-heartbeat label arrays using pepbench.plotting._utils._get_labels_from_challenge_results and then adds markers/PEP rectangles using the low-level helpers.