sidescanpy.viz.analysis#
Plots for the analysis results in sidescanpy.analysis.
Each function renders one result (or a dataset, where the plot is of the
data itself), draws into caller-supplied axes when given, returns
(fig, ax) or (fig, axes) and never saves a file. Figure-level
decorations (suptitle, tight_layout) are only applied when the
function created the figure. TVG / range-decay plots live in
sidescanpy.viz.tvg.
2026 rshomberg@uri.edu
Contents
Dual-panel histogram: linear scale (left) and |
|
The |
|
One representative ping (default: the middle one), port and starboard side by side. |
|
Overlaid before/after histograms (linear + log scale) of what |
|
One ping across the full swath (port mirrored to negative sample index). |
|
Cross-track profile zoomed around nadir. |
|
Cross-track-vs-ping waterfall of |
|
Side-view beam-geometry diagram above the same ping's backscatter profile, sharing one x-axis. |
|
Median and std-dev vs. range, with the usable-range boundary marked. |
|
Altitude and pitch vs. ping index with each segment boundary marked and excluded spans shaded, for reviewing |
|
Heading, pitch/roll, altitude/depth/heave vs. ping number, plus the lon/lat track colored by ping number. |
|
Draw proposal boxes onto an image already shown in |
- sidescanpy.viz.analysis.plot_value_histograms(ds, value_var='backscatter_intensity', *, bins=100, axes=None, title=None)#
Dual-panel histogram: linear scale (left) and
log10(|x|)scale (right).
- sidescanpy.viz.analysis.plot_units_distribution(ds, value_var='backscatter_intensity', *, bins=100, axes=None)#
The
plot_value_histograms()view titled for a units call (infer_unitsreads the value-range signature this shows).
- sidescanpy.viz.analysis.plot_sample_ping(ds, value_var='backscatter_intensity', *, ping_idx=None, axes=None)#
One representative ping (default: the middle one), port and starboard side by side.
- sidescanpy.viz.analysis.plot_outlier_comparison(ds, result, value_var='backscatter_intensity', *, bins=100, linear_xlim_percentile=99.5, axes=None)#
Overlaid before/after histograms (linear + log scale) of what
reject_range_outliersdiscarded fromvalue_var.Each panel uses one shared set of bin edges for both populations. The linear panel is capped at the “before” population’s
linear_xlim_percentileso a few extreme values cannot squash the bulk; the count beyond the cap is annotated.
- sidescanpy.viz.analysis.plot_cross_track_profile(ds, value_var='backscatter_intensity', *, ping_idx=None, ax=None)#
One ping across the full swath (port mirrored to negative sample index).
- sidescanpy.viz.analysis.plot_nadir_zoom(ds, value_var='backscatter_intensity', *, nadir=None, nadir_n_samples=50, ping_idx=None, zoom_factor=2, ax=None)#
Cross-track profile zoomed around nadir.
Without
nadir(ananalyze_nadir()result) the window isnadir_n_samples * zoom_factor. With it, the window widens to the detected boundaries, which are marked: altitude (dotted, the vehicle altitude in sample units) and first bottom return (dashed). Everything from nadir out to the first bottom return is shaded as “water column returns”.
- sidescanpy.viz.analysis.plot_nadir_waterfall(ds, value_var='backscatter_intensity', *, nadir=None, ax=None, ping_offset=0, **waterfall_kwargs)#
Cross-track-vs-ping waterfall of
value_var(viaplot_waterfall()), withnadir’s altitude (dotted) and first bottom return (solid) traced on both sides when given.ping_offsetshifts both the image and the traced boundaries, so a slice of a larger survey can show absolute ping numbers.
- sidescanpy.viz.analysis.plot_beam_geometry(ds, result, value_var='backscatter_intensity', range_var='across_track_m', *, axes=None)#
Side-view beam-geometry diagram above the same ping’s backscatter profile, sharing one x-axis.
Top: towfish, seafloor at the ping’s altitude, the near edge (solid, from the first bottom return) and far edge (dashed, from the usable range), with the illuminated wedge shaded. Bottom:
value_varvs.range_varwith the same edges marked.
- sidescanpy.viz.analysis.plot_usable_range(result, *, axes=None)#
Median and std-dev vs. range, with the usable-range boundary marked.
- sidescanpy.viz.analysis.plot_segments_overview(ds, segments, *, axes=None)#
Altitude and pitch vs. ping index with each segment boundary marked and excluded spans shaded, for reviewing
find_segments()output.
Heading, pitch/roll, altitude/depth/heave vs. ping number, plus the lon/lat track colored by ping number.
The heading panel shades the [0,360) and [-180,180) conventions and, given
result(summarize_navigation()), marks points outside both.ping_offsetmakes the x-axis read absolute ping numbers.axesis(heading, attitude, vertical, track).
- sidescanpy.viz.analysis.plot_shadow_proposals(proposals, *, ax, window=None, channel=None, min_score=0.0, cmap='autumn', linewidth=0.8)#
Draw proposal boxes onto an image already shown in
ax.With
window(theNativeWindowof a chip or tile shown withimshow), boxes are mapped to image pixels. Without it,axis taken to show one channel in native coordinates (x = sample position, y = ping position) and only thatchannel’s proposals (default 0) are drawn. Box colour follows the score throughcmap; proposals belowmin_scoreare skipped.