diff --git a/HISTORY.rst b/HISTORY.rst index 27e2bef..4df820b 100644 --- a/HISTORY.rst +++ b/HISTORY.rst @@ -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) ------------------ diff --git a/setup.cfg b/setup.cfg index 4eca1c1..38052e8 100644 --- a/setup.cfg +++ b/setup.cfg @@ -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 diff --git a/smops/__init__.py b/smops/__init__.py index 58b8614..acb7880 100644 --- a/smops/__init__.py +++ b/smops/__init__.py @@ -2,4 +2,4 @@ __author__ = AUTHOR = """L Andati""" __email__ = EMAIL = 'landati@duck.com' -__version__ = VERSION = '0.1.6' +__version__ = VERSION = '0.1.7' diff --git a/smops/smooth.py b/smops/smooth.py index f47b2d5..cee5ecd 100644 --- a/smops/smooth.py +++ b/smops/smooth.py @@ -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})") @@ -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(