Skip to content

Commit 2cff073

Browse files
committed
DAS-2456 Add comments to clrify the updates to the function
1 parent 116a202 commit 2cff073

1 file changed

Lines changed: 7 additions & 1 deletion

File tree

hoss/projection_utilities.py

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -555,21 +555,27 @@ def remove_points_outside_grid_extents(
555555
556556
"""
557557
tolerance = 1e-9
558-
558+
# This gets the mask of points within the granule extent.
559+
# The individual extents are checked to make sure the points are within
560+
# all 4 extents
559561
mask = np.logical_and.reduce(
560562
[
563+
# points >= x_min allowing for a tolerance level
561564
np.logical_or(
562565
finite_x > granule_extent["x_min"],
563566
np.isclose(finite_x, granule_extent["x_min"], atol=tolerance),
564567
),
568+
# points <= x_max allowing for a tolerance level
565569
np.logical_or(
566570
finite_x < granule_extent["x_max"],
567571
np.isclose(finite_x, granule_extent["x_max"], atol=tolerance),
568572
),
573+
# points >= y_min allowing for a tolerance level
569574
np.logical_or(
570575
finite_y > granule_extent["y_min"],
571576
np.isclose(finite_y, granule_extent["y_min"], atol=tolerance),
572577
),
578+
# points <= y_max allowing for a tolerance level
573579
np.logical_or(
574580
finite_y < granule_extent["y_max"],
575581
np.isclose(finite_y, granule_extent["y_max"], atol=tolerance),

0 commit comments

Comments
 (0)