From ba0c64292cede62d730ece0cc23bd2435423afda Mon Sep 17 00:00:00 2001 From: dvstark Date: Mon, 5 Feb 2024 15:43:28 -0500 Subject: [PATCH] satdet.detsat fix for scipy.stats.mode (#196) * set keepdims=True in scipy.stats.mode to avoid error in some situations * removed unused import --- acstools/satdet.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/acstools/satdet.py b/acstools/satdet.py index cdda407..e6b4d4f 100644 --- a/acstools/satdet.py +++ b/acstools/satdet.py @@ -285,7 +285,7 @@ def _detsat_one(filename, ext, sigma=2.0, low_thresh=0.1, h_thresh=0.5, trail_angle = trail_angle[mask] result = result[mask] - ang, num = stats.mode(round_angle) + ang, num = stats.mode(round_angle, keepdims=True) # do the filtering truth = round_angle == ang[0]