pyserep.visualization

pyserep.visualization — FRF plots, mode shape plots, dashboards.

pyserep.visualization.plot_dof_selector_comparison(comparison: dict, save_path: str | None = None, show: bool = False) None[source]

Bar chart comparing κ values of all four DOF selectors.

Parameters:

comparison (dict) – Output of compare_dof_selectors().

pyserep.visualization.plot_frf_comparison(results: PipelineResults, save_path: str | None = None, show: bool = False, dpi: int = 150) None[source]

Four-panel FRF comparison figure.

Panel 1: FRF magnitude (dB re 1 m/N) — ROM vs reference Panel 2: FRF phase (degrees) — ROM vs reference Panel 3: Percentage FRF error (log scale) Panel 4: Eigenvalue preservation error per mode

Gap regions between selective bands are shaded grey.

Parameters:
pyserep.visualization.plot_frf_overlay(frf_result: FRFResult, title: str = 'FRF Overlay', save_path: str | None = None, show: bool = False) None[source]

Simple FRF magnitude overlay — ROM vs reference, single figure.

Useful for quick inspection without a full PipelineResults object.

pyserep.visualization.plot_mac_matrix(mac_matrix: ndarray, labels: List[str] | None = None, save_path: str | None = None, show: bool = False) None[source]

Plot the MAC matrix as a colour map.

Parameters:
  • mac_matrix (np.ndarray, shape (m, m))

  • labels (list of str, optional)

  • save_path (optional)

  • show (optional)

pyserep.visualization.plot_mode_shapes(phi: ndarray, freqs_hz: ndarray, mode_indices: ndarray, master_dofs: ndarray | None = None, n_cols: int = 4, save_path: str | None = None, show: bool = False) None[source]

Plot mode shape amplitudes for the selected modes.

Shows the full-DOF modal amplitude profile for each selected mode. Master DOFs are highlighted with red markers if provided.

Parameters:
  • phi (np.ndarray, shape (N, n_modes))

  • freqs_hz (np.ndarray)

  • mode_indices (np.ndarray of int)

  • master_dofs (np.ndarray of int, optional)

  • n_cols (int)

  • save_path (optional)

  • show (optional)

pyserep.visualization.plot_performance_dashboard(results: PipelineResults, save_path: str | None = None, show: bool = False) None[source]

6-panel performance dashboard.

Panels: 1. Mode selection cascade (bar chart: how many modes each step passes) 2. Selected mode frequency distribution 3. Eigenvalue error per mode 4. DOF reduction summary (pie chart) 5. Timing breakdown (bar chart) 6. FLOP comparison ROM vs reference