Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DM-38973: Call to np.percentile in overscan.py leads to numpy warnings with 1.23 #259

Merged
merged 1 commit into from
May 2, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
3 changes: 2 additions & 1 deletion python/lsst/ip/isr/overscan.py
Original file line number Diff line number Diff line change
Expand Up @@ -617,7 +617,8 @@ def maskOutliers(self, imageArray):
maskedArray : `numpy.ma.masked_array`
Masked image marking outliers.
"""
lq, median, uq = np.percentile(imageArray, [25.0, 50.0, 75.0], axis=1)
lq, median, uq = np.percentile(np.ma.getdata(imageArray),
[25.0, 50.0, 75.0], axis=1)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I was worried that this wouldn't work if it wasn't a masked array, but it does, so great!

axisMedians = median
axisStdev = 0.74*(uq - lq) # robust stdev

Expand Down