pycsamt.ai.plot.compare#

Side-by-side true vs predicted 1-D resistivity profile panels.

plot_compare() is the primary entry point. Each panel shows:

  • Predicted model (solid, purple, EM_COLORS['pred'])

  • True model (dashed, green, EM_COLORS['true'])

  • Shaded difference band (alpha = 0.15)

  • Per-site RMSE annotation

Usage#

>>> from pycsamt.ai.plot.compare import plot_compare
>>> fig = plot_compare(true_models, pred_models, n_cols=5)
>>> fig.savefig("comparison.png", dpi=300)

Functions

plot_compare(true_models, pred_models, *[, ...])

Multi-panel comparison of true and predicted 1-D resistivity profiles.

plot_profile_pair(true_model, pred_model, *)

Plot a single true/predicted resistivity–depth pair on ax.

pycsamt.ai.plot.compare.plot_compare(true_models, pred_models, *, n_cols=5, max_sites=20, depth_max=None, log_scale=True, show_rmse=True, site_labels=None, figsize_per_panel=(2.2, 4.0), title=None, style=True)[source]#

Multi-panel comparison of true and predicted 1-D resistivity profiles.

Parameters:
  • true_models (list of LayeredModel or ndarray (n_sites, n_params)) – Ground-truth models.

  • pred_models (list of LayeredModel or ndarray (n_sites, n_params)) – Network-predicted models (same order as true_models).

  • n_cols (int) – Number of columns in the panel grid.

  • max_sites (int) – Maximum number of sites to plot (first max_sites are used).

  • depth_max (float or None) – Maximum depth axis value [m].

  • log_scale (bool) – Log₁₀ x-axis for resistivity.

  • show_rmse (bool) – Annotate each panel with per-site log₁₀(ρ) RMSE.

  • site_labels (list of str or None) – Panel titles (default: 'Site 0', 'Site 1', …).

  • figsize_per_panel ((w, h)) – Size of each individual panel in inches.

  • title (str or None) – Figure suptitle.

  • style (bool) – Apply EMStyle.

Returns:

fig

Return type:

Figure

pycsamt.ai.plot.compare.plot_profile_pair(true_model, pred_model, *, ax=None, depth_max=None, log_scale=True, show_rmse=True, legend=True, style=True)[source]#

Plot a single true/predicted resistivity–depth pair on ax.

Parameters:
Returns:

ax

Return type:

Axes