Skip to content

Commit

Permalink
satdet.detsat fix for scipy.stats.mode (#196)
Browse files Browse the repository at this point in the history
* set keepdims=True in scipy.stats.mode to avoid error in some situations

* removed unused import
  • Loading branch information
dvstark authored Feb 5, 2024
1 parent 7716703 commit ba0c642
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion acstools/satdet.py
Original file line number Diff line number Diff line change
Expand Up @@ -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]
Expand Down

0 comments on commit ba0c642

Please sign in to comment.