pvtend.classify_tilt

pvtend.classify_tilt(xline: ndarray, yline: ndarray, xa: float, xb: float, n_samp: int = 200, min_points: int = 10, slope_threshold: float = 0.15) tuple[str, float][source]

Classify a bay as AWB or CWB using centerline tilt slope.

Slope < -threshold -> AWB; slope > +threshold -> CWB; |slope| <= threshold -> UNK (neutral). Default threshold = 0.15 (consistent with ESSOAr preprint).

Parameters:
  • xline – Contour trace coordinates.

  • yline – Contour trace coordinates.

  • xa – x-interval of the bay.

  • xb – x-interval of the bay.

  • n_samp – Number of sample meridians.

  • min_points – Minimum valid sample points for envelope.

  • slope_threshold – Dead-zone half-width (default 0.15).

Returns:

(wb_type, slope) where wb_type in {“AWB”, “CWB”, “UNK”}.