pycsamt.ai.plot.section#

2-D resistivity section and pseudo-section visualisation.

All functions respect the EMStyle publication conventions and return Figure or Axes objects for downstream composition.

Functions

plot_pseudo_section(rho_a_2d, *[, freqs, ...])

Apparent-resistivity or phase pseudo-section plot.

plot_section(rho_2d, *[, depths, stations, ...])

Plot a 2-D resistivity section.

plot_section_pair(true_2d, pred_2d, *[, ...])

Side-by-side comparison of true and predicted 2-D resistivity sections.

pycsamt.ai.plot.section.plot_section(rho_2d, *, depths=None, stations=None, depth_max=2000.0, station_spacing=1.0, log_scale=True, vmin=None, vmax=None, cmap=None, title='', xlabel='Station', ylabel='Depth (m)', show_sites=True, figsize=None, ax=None, style=True)[source]#

Plot a 2-D resistivity section.

Parameters:
  • rho_2d (ndarray, shape (n_depth, n_stations)) – Resistivity or log₁₀(ρ) 2-D model.

  • depths (ndarray (n_depth,) or None) – Depth values in metres. Default: linear 0 → depth_max.

  • stations (ndarray (n_stations,) or None) – Station positions (arbitrary units).

  • depth_max (float) – Maximum depth used when depths is None.

  • station_spacing (float) – Station interval when stations is None.

  • log_scale (bool) – Apply log₁₀ transform before plotting. Set False if rho_2d already contains log₁₀(ρ).

  • vmin (float or None) – Colour scale limits.

  • vmax (float or None) – Colour scale limits.

  • cmap (str or None) – Matplotlib colormap name. Defaults to 'RdYlBu_r'.

  • title (str)

  • xlabel (str)

  • ylabel (str)

  • show_sites (bool) – Draw site-marker triangles at the surface.

  • figsize ((width, height) or None)

  • ax (Axes or None)

  • style (bool) – Apply EMStyle context.

Returns:

fig

Return type:

Figure

pycsamt.ai.plot.section.plot_section_pair(true_2d, pred_2d, *, depths=None, stations=None, depth_max=2000.0, station_spacing=1.0, log_scale=True, vmin=None, vmax=None, cmap=None, show_difference=True, figsize=None, style=True)[source]#

Side-by-side comparison of true and predicted 2-D resistivity sections.

Optionally shows the absolute difference (show_difference=True).

Parameters:
Returns:

fig

Return type:

Figure

pycsamt.ai.plot.section.plot_pseudo_section(rho_a_2d, *, freqs=None, stations=None, station_spacing=1.0, log_freq=True, log_rho=True, vmin=None, vmax=None, cmap=None, component='xy', title='', figsize=None, ax=None, style=True)[source]#

Apparent-resistivity or phase pseudo-section plot.

Parameters:
  • rho_a_2d (ndarray (n_freqs, n_stations)) – Apparent resistivity or phase values.

  • freqs (ndarray (n_freqs,) or None) – Frequencies in Hz.

  • stations (ndarray (n_stations,) or None) – Station positions.

  • station_spacing (float)

  • log_freq (bool) – Use log₁₀(period) for the y-axis.

  • log_rho (bool) – Apply log₁₀ transform to the data.

  • vmin (float or None)

  • vmax (float or None)

  • cmap (str or None)

  • component (str) – Label for the colour bar (e.g. 'xy', 'yx', 'phase_xy').

  • title (str)

  • figsize ((width, height) or None)

  • ax (Axes or None)

  • style (bool)

Returns:

fig

Return type:

Figure