SmartSpectra C++ SDK
Measure human vitals from video with SmartSpectra C++ SDK.
Loading...
Searching...
No Matches
plot_metrics Namespace Reference

Functions

Dict[str, Any] load_metrics_summary (Path file_path)
Tuple[npt.NDArray[np.float64], npt.NDArray[np.float64]] extract_series_data (Dict[str, Any] series_dict, str series_name)
npt.NDArray[np.float64] compute_timestamp_diffs (npt.NDArray[np.float64] timestamps)
npt.NDArray[np.float64] compute_zscore (npt.NDArray[np.float64] values)
None plot_metrics (Dict[str, Any] summary, Optional[str] session_id)
int main ()

Detailed Description

Metrics Plotting Utility

This script loads and visualizes metrics data from the JSON summary file produced by
the redis_ipc_metrics_saving_client.py script (using MetricsCollector).

Plots:
1. Edge EDA (electrodermal activity)
2. Edge upper breathing trace
3. Core phasic blood pressure
4. Core upper breathing trace
5. Combined z-scores of all metrics
6. Edge upper breathing timestamp differences

All plots are displayed as subplots in a single figure.

Function Documentation

◆ compute_timestamp_diffs()

npt.NDArray[np.float64] plot_metrics.compute_timestamp_diffs ( npt.NDArray[np.float64] timestamps)
Compute differences between consecutive timestamps

◆ compute_zscore()

npt.NDArray[np.float64] plot_metrics.compute_zscore ( npt.NDArray[np.float64] values)
Compute z-score normalization of values

◆ extract_series_data()

Tuple[npt.NDArray[np.float64], npt.NDArray[np.float64]] plot_metrics.extract_series_data ( Dict[str, Any] series_dict,
str series_name )
Extract timestamps and values from a series in struct-of-arrays format

◆ load_metrics_summary()

Dict[str, Any] plot_metrics.load_metrics_summary ( Path file_path)
Load metrics summary JSON file produced by MetricsCollector

◆ plot_metrics()

None plot_metrics.plot_metrics ( Dict[str, Any] summary,
Optional[str] session_id )
Create a figure with all metric plots as subplots