sidescanpy.processing.sample_axis#

Absolute sample coordinate and per-ping sample spacing helpers.

Converters write an integer sample coordinate counted in sample intervals from the transmit, so slant range is sample x interval. 0 is normally the first recorded sample of the ping; a JSF starting depth (window offset) moves the first recorded sample to that offset. Range math must use that absolute index, not the local position along the (possibly sliced) sample axis, so that slicing leading samples never changes the computed ranges.

2026 rshomberg@uri.edu

Contents

DEFAULT_SOUND_VEL_MS

Fallback sound velocity (m/s) for NaN / non-positive per-ping values.

invalid_sound_vel_warning_suppressed

Silence the invalid-sound_vel_ms warning inside the block.

sample_index

Absolute sample index of every position along ds's sample axis.

sample_interval_m

Per-ping slant-range spacing of one sample, c / (2 * fs), shape (ping,).

sidescanpy.processing.sample_axis.DEFAULT_SOUND_VEL_MS = 1500.0#

Fallback sound velocity (m/s) for NaN / non-positive per-ping values.

sidescanpy.processing.sample_axis.invalid_sound_vel_warning_suppressed()#

Silence the invalid-sound_vel_ms warning inside the block.

For callers that process one channel in pieces (ping chunks): they warn once for the whole channel themselves instead of once per piece.

sidescanpy.processing.sample_axis.sample_index(ds)#

Absolute sample index of every position along ds’s sample axis.

Returns the sample coordinate as float64 when present, else arange(n_samples) (assumes the axis starts at the first recorded sample).

sidescanpy.processing.sample_axis.sample_interval_m(ds)#

Per-ping slant-range spacing of one sample, c / (2 * fs), shape (ping,).

NaN or non-positive sound_vel_ms falls back to DEFAULT_SOUND_VEL_MS with a warning.