From c76f9bf4e6a37cafb09b64e845168d5a26fc27d7 Mon Sep 17 00:00:00 2001 From: Andrew Moodie Date: Tue, 25 Jun 2024 15:22:41 -0500 Subject: [PATCH] cleanup with example. --- deltametrics/plan.py | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/deltametrics/plan.py b/deltametrics/plan.py index 28af80ab..f903f88b 100644 --- a/deltametrics/plan.py +++ b/deltametrics/plan.py @@ -1658,7 +1658,7 @@ def _compute_angles_between(test_set_points, query_set_points, numviews): x = diff[:, 0] y = diff[:, 1] - angles = np.arctan2(y, x) # DROP angles0 after debug + angles = np.arctan2(y, x) angles = np.sort(angles) * 180.0 / np.pi dangles = np.zeros_like(angles) @@ -1733,6 +1733,21 @@ def shaw_opening_angle_method( Flattened values corresponding to the 'sea' angle detected for each 'look' of the opening angle method. The 'sea' region is the convex hull which envelops the shoreline as well as the delta interior. + + Examples + -------- + + .. plot:: + :include-source: + + golfcube = dm.sample_data.golf() + EM = dm.mask.ElevationMask(golfcube["eta"][-1, :, :], elevation_threshold=0) + + OAM = dm.plan.shaw_opening_angle_method(np.logical_not(EM.mask)) + + fig, ax = plt.subplots() + ax.imshow(OAM, vmin=0, vmax=180) + plt.show() """ # Dev notes: #