Skip to content

Commit

Permalink
update docstrings
Browse files Browse the repository at this point in the history
  • Loading branch information
braingram committed Jul 26, 2024
1 parent aa64f1d commit 2112773
Showing 1 changed file with 14 additions and 1 deletion.
15 changes: 14 additions & 1 deletion src/stcal/outlier_detection/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,15 @@ def compute_weight_threshold(weight, maskpt):


def _abs_deriv(array):
"""Take the absolute derivate of a numpy array."""
"""
Do not use this function.
Take the absolute derivative of a numpy array.
This function assumes off-edge pixel values are 0
and leads to erroneous derivative values and should
likely not be used.
"""
tmp = np.zeros(array.shape, dtype=np.float64)
out = np.zeros(array.shape, dtype=np.float64)

Expand All @@ -103,6 +111,11 @@ def _abs_deriv(array):


def _absolute_subtract(array, tmp, out):
"""
Do not use this function.
A helper function for _abs_deriv.
"""
tmp = np.abs(array - tmp)
out = np.maximum(tmp, out)
tmp = tmp * 0.
Expand Down

0 comments on commit 2112773

Please sign in to comment.