Skip to content

Commit

Permalink
Merge pull request #6 from Mulan-94/fixing-5
Browse files Browse the repository at this point in the history
Fixing 5
  • Loading branch information
Mulan-94 authored Apr 7, 2023
2 parents b6fb921 + e97b916 commit edb0a21
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 5 deletions.
5 changes: 5 additions & 0 deletions HISTORY.rst
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
=======
History
=======
0.1.7 (2023-04-07)
------------------
* Return stimela as a dependency
* Allow NaN values while dealing with interpolations, issue #5


0.1.6 (2022-12-16)
------------------
Expand Down
2 changes: 1 addition & 1 deletion setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
python-casacore
psutil
numpy
scabha
stimela==2.0rc4
# include_package_data = False

# a key named with a single asterisk (*) below refers to all packages
Expand Down
2 changes: 1 addition & 1 deletion smops/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@

__author__ = AUTHOR = """L Andati"""
__email__ = EMAIL = '[email protected]'
__version__ = VERSION = '0.1.6'
__version__ = VERSION = '0.1.7'
6 changes: 3 additions & 3 deletions smops/smooth.py
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,8 @@ def interp_cube(model, wsums, infreqs, outfreqs, ref_freq, spectral_poly_order):
mask = np.any(model, axis=0)
beta = model*mask
beta = beta.reshape(nband, -1)

beta = np.ma.masked_invalid(beta)
beta.fill_value = np.nan

if spectral_poly_order > infreqs.size:
raise ValueError(f"spectral-poly-order can't be larger than nband ({nband})")
Expand All @@ -210,8 +211,7 @@ def interp_cube(model, wsums, infreqs, outfreqs, ref_freq, spectral_poly_order):
xfit[:, i-1] = (whigh**i - wlow**i)/(i*wdiff)



dirty_comps = np.dot(xfit.T, wsums*beta)
dirty_comps = np.ma.dot(xfit.T, wsums*beta)
hess_comps = xfit.T.dot(wsums*xfit)

comps = da.from_array(
Expand Down

0 comments on commit edb0a21

Please sign in to comment.