pub fn compare_profile(
sim_y_m: &[f64],
sim_depth_m: &[f64],
published: &[(f64, f64)],
tolerance: f64,
) -> Result<ProfileComparison, String>Expand description
Compare a simulated profile with published points.
sim_y_m and sim_depth_m are the lateral coordinate of the column
centres (relative to the beam centre) and the depth of the surface there
(increasing y); published holds (y, depth) pairs, m, in the same
frame. The simulation is interpolated linearly; a published point outside
the simulated range is an error, never extrapolated. The metric is the
RMS depth difference over the published depth maximum; the tolerance is
the caller’s, with nothing fitted: a gap is reported, not removed.