weac.parser.plotting.force_penetration_layers module

Shared four-panel penetration-resistance / density / layer plots.

class weac.parser.plotting.force_penetration_layers.ForcePenetrationProfile(*args, **kwargs)[source]

Bases: Protocol

Profile from SMP or SnowScope (resistance–depth signal plus derived density).

depth_mm: ndarray
penetration_resistance_kPa: ndarray
density_kg_m3: ndarray
density_method: str
__init__(*args, **kwargs)
weac.parser.plotting.force_penetration_layers.plot_force_penetration_layers(profile, layers, *, slope_angle_deg=0.0, depth_axis='plumb', title=None, layer_label='layers', save_path=None, show=True, figsize=(13.0, 6.5))[source]

Plot penetration resistance, density, slope-normal density, and layers on a depth axis.

Parameters:
  • profile (ForcePenetrationProfile) – SMPProfile or SnowScopeProfile (must expose depth_mm, penetration_resistance_kPa, density_kg_m3, density_method).

  • layers (list[Layer]) – WEAC layers ordered surface -> ground (from extract_layers). Layer.h is slope-normal, so the reconstructed staircase is drawn on the slope-normal axis (panels 3-4). For a plumb profile, pass the same slope_angle_deg used to extract the layers so the slope-normal density panel and the staircase share one axis. The staircase bottom overshoots the last sample by one cell because the binning helpers repeat the final sample spacing (an intentional part of their cell model, see layer_binning).

  • slope_angle_deg (float) – Slope angle [deg] for a plumb profile; sets the cos(phi) compression of the slope-normal depth axis. Ignored when depth_axis is "slope-normal" (must stay 0).

  • depth_axis (Literal['plumb', 'slope-normal']) – "plumb" (SnowScope) compresses panels 3-4 by cos(phi). "slope-normal" (SMP) uses the recorded depth as the slope-normal axis with no further scaling.

  • title (str | None) – Figure suptitle; defaults to the density method name.

  • layer_label (str) – Legend/title label for the segmented panel.

  • save_path (str | Path | None) – If given, save the figure (PNG) to this path.

  • show (bool) – Call plt.show() before returning (default True).

  • figsize (tuple[float, float]) – Figure size in inches.

Returns:

The created Figure.

Return type:

Figure