sidescanpy.viz.targets#

Survey track + scan-lines with target catalog positions overlaid.

Builds on viz/track.py’s plot_track_and_scanlines (with the track from sidescanpy.processing.build_survey_track), adding a scatter of target positions (a list of sidescanpy.core.target.Target) projected into the same CRS as the track. Kept in its own module rather than folded into viz/track.py because it needs core.target.Target — matches the existing viz/contact_sheet.py precedent of keeping that dependency isolated from the modules that don’t need it.

2026 rshomberg@uri.edu

Contents

plot_target_position_scatter

Plain lat/lon scatter of every target with a resolved position — no track/scanlines context, just a standalone QA plot.

plot_track_with_targets

Plot a survey track + scan-lines (see plot_track_and_scanlines) with target catalog positions scattered on top, each annotated with its target_id.

sidescanpy.viz.targets.plot_target_position_scatter(targets, *, title=None)#

Plain lat/lon scatter of every target with a resolved position — no track/scanlines context, just a standalone QA plot. Returns None if no target has both latitude/longitude set.

Promoted from the near-identical scatter block duplicated in both format’s own target-catalog-reading step (JSF’s Discover catalog already carries position; Klein’s .tgt needs it resolved externally first — see sidescanpy.io.sdf.targets).

sidescanpy.viz.targets.plot_track_with_targets(track, targets, *, crs=None, fig=None, ax=None, show_land=False, show_locator=False)#

Plot a survey track + scan-lines (see plot_track_and_scanlines) with target catalog positions scattered on top, each annotated with its target_id.

Parameters:
trackSurveyTrack

As returned by sidescanpy.processing.build_survey_track.

targetslist[Target]

Targets with .latitude/.longitude set; targets missing either are silently excluded from the scatter (matches the source script’s behavior — a target with only native ping/ sample position and no georeferenced lat/lon can’t be plotted here).

crspyproj.CRS, optional

Defaults to an auto-selected UTM zone from the track’s centroid.

fig, axoptional

Existing figure/axes to draw into.

show_land, show_locatorbool, default False

See plot_track_and_scanlines. Note: show_land fixes the view to the track/scan-line extent (plus a margin) — a target cataloged well outside that extent would be plotted but fall outside the visible view. Not expected in practice (a cataloged target is normally inside the swath that found it), not specially handled here.

Returns:
fig, ax