diff --git a/.github/workflows/testing.yml b/.github/workflows/testing.yml index 4bb23a4..8b78e67 100644 --- a/.github/workflows/testing.yml +++ b/.github/workflows/testing.yml @@ -34,7 +34,6 @@ jobs: python -m pip install --upgrade pip wheel python -m pip install numpy pytest pytest-cov python -m pip install -e . - python -m pip install pixell==0.17.3 - name: Install extra dependencies (camb) run: | @@ -58,7 +57,7 @@ jobs: if: matrix.os == 'ubuntu-latest' run: | python -m pip install jupyter - # jupyter nbconvert --to notebook --execute notebooks/tutorial_io.ipynb + jupyter nbconvert --to notebook --execute notebooks/tutorial_io.ipynb - name: Comparing pspy to NaMaster if: matrix.os == 'ubuntu-latest' diff --git a/pspy/sph_tools.py b/pspy/sph_tools.py index 09fc757..20ef63f 100644 --- a/pspy/sph_tools.py +++ b/pspy/sph_tools.py @@ -3,12 +3,12 @@ """ import healpy as hp import numpy as np - from pixell import curvedsky, enmap + from pspy import so_window -def map2alm(map, niter, lmax, theta_range=None, dtype=np.complex128, tweak=True): +def map2alm(map, niter, lmax, theta_range=None, dtype=np.complex128): """Map2alm transform (for healpix or CAR). Parameters @@ -43,18 +43,18 @@ def map2alm(map, niter, lmax, theta_range=None, dtype=np.complex128, tweak=True) theta_max=theta_range[1]) elif map.pixel=="CAR": - alm = curvedsky.map2alm(map.data, lmax=lmax, tweak=tweak) + alm = curvedsky.map2alm(map.data, lmax=lmax) if niter != 0: map_copy = map.copy() for _ in range(niter): - alm += curvedsky.map2alm(map.data-curvedsky.alm2map(alm, map_copy.data), lmax=lmax, tweak=tweak) + alm += curvedsky.map2alm(map.data-curvedsky.alm2map(alm, map_copy.data), lmax=lmax) else: raise ValueError("Map is neither a CAR nor a HEALPIX") alm = alm.astype(dtype) return alm -def alm2map(alms, template, tweak=True): +def alm2map(alms, template): """alm2map transform (for healpix and CAR). Parameters @@ -72,7 +72,7 @@ def alm2map(alms, template, tweak=True): if map_from_alm.pixel == "HEALPIX": map_from_alm.data = curvedsky.alm2map_healpix(alms, map_from_alm.data, spin=spin) elif map_from_alm.pixel == "CAR": - map_from_alm.data = curvedsky.alm2map(alms, map_from_alm.data, spin=spin, tweak=tweak) + map_from_alm.data = curvedsky.alm2map(alms, map_from_alm.data, spin=spin) else: raise ValueError("Map is neither a CAR nor a HEALPIX") return map_from_alm diff --git a/pspy/tests/test_so_spectra.py b/pspy/tests/test_so_spectra.py index 0e498b4..ce9622f 100644 --- a/pspy/tests/test_so_spectra.py +++ b/pspy/tests/test_so_spectra.py @@ -12,7 +12,7 @@ class SOSpectraTests(unittest.TestCase): - def setUp(self, verbose=False): + def setUp(self, verbose=True): with open(os.path.join(data_dir, "test_data.pkl"), "rb") as f: self.reference = pickle.load(f) @@ -34,7 +34,7 @@ def compare(self, ref, current, msg=""): else: self.assertTrue(True, f"Data type {type(ref)} are not compared!") - def test_spectra(self, verbose=False): + def test_spectra(self, verbose=True): kinds = ["car", "healpix"] # do not test window function due to mismatch in distance computation # datas = ["cmb", "window", "mbb_inv", "bbl", "spectra"] diff --git a/setup.py b/setup.py index 9bbc346..0245aab 100644 --- a/setup.py +++ b/setup.py @@ -62,11 +62,11 @@ entry_points={}, ext_modules=[mcm, cov], install_requires=[ - "numpy>=1.20", + "numpy>=1.20,!=1.26.0", "healpy", "pyFFTW", "pillow", # this one should be installed by pixell - "pixell>=0.7.0", + "pixell>=0.20.3", ], packages=find_packages(), include_package_data=True,