Skip to content

Commit

Permalink
Merge pull request #18 from spacetelescope/sl_medfilt_bug
Browse files Browse the repository at this point in the history
v0.8.3:  scipy.signal.medfilt compatibility
  • Loading branch information
sean-lockwood authored Oct 15, 2024
2 parents ba344aa + 3a562cf commit 5993385
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -60,9 +60,9 @@
# built documents.
#
# The short X.Y version.
version = '0.8.2'
version = '0.8.3'
# The full version, including alpha/beta/rc tags.
release = '0.8.2'
release = '0.8.3'

# The language for content autogenerated by Sphinx. Refer to documentation
# for a list of supported languages.
Expand Down
2 changes: 1 addition & 1 deletion refstis/refbias.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ def flag_hot_pixels(refbias_name):
"""

with fits.open(refbias_name, mode='update') as refbias_hdu:
smooth_bias = medfilt(refbias_hdu[('sci', 1)].data, (3, 15))
smooth_bias = medfilt(np.array(refbias_hdu[('sci', 1)].data, dtype=np.float32), (3, 15))

smooth_bias_mean, smooth_bias_med, smooth_bias_std = sigma_clipped_stats(smooth_bias, sigma=3, maxiters=30)
bias_mean, bias_median, bias_std = sigma_clipped_stats(refbias_hdu[('sci', 1)].data, sigma=3, maxiters=30)
Expand Down
2 changes: 1 addition & 1 deletion refstis/weekdark.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ def create_superdark(crj_filename, basedark):
zerodark,
0.0)

basedark_med = medfilt(basedark_hdu[('sci', 1)].data, (5, 5))
basedark_med = medfilt(np.array(basedark_hdu[('sci', 1)].data, dtype=np.float32), (5, 5))
only_dark = np.where(basedark_hdu[('sci', 1)].data >= p_five_sigma,
basedark_med,
basedark_hdu[('sci', 1)].data)
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

setup(
name = 'refstis',
version = '0.8.2',
version = '0.8.3',
description = 'Pipeline to create STIS CCD superdarks and superbiases',
author = 'Allyssa Riley, Sean Lockwood, Justin Ely',
author_email = 'https://hsthelp.stsci.edu',
Expand Down

0 comments on commit 5993385

Please sign in to comment.