Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
e50df40
Do not test notebook compilation
xgarrido Jul 17, 2023
0520c79
change binary to more general window argument
thibautlouis Jul 19, 2023
b3b7b75
add option for dtype for pixwin
thibautlouis Jul 25, 2023
d7bda67
Fix unit test (before upgrading to pixell 0.19)
xgarrido Jul 25, 2023
cc5e013
Bump pypa/cibuildwheel from 2.14.1 to 2.15.0
dependabot[bot] Aug 14, 2023
4d0c5a1
Bump actions/checkout from 3 to 4
dependabot[bot] Sep 4, 2023
84c9c53
update healpix to car projection
adrien-laposta Sep 6, 2023
1a87f66
new version
thibautlouis Sep 6, 2023
48a0aaf
Set all mask pixel to one before computing distance
xgarrido Sep 14, 2023
ec28808
let's revive unit test
xgarrido Sep 15, 2023
085db51
increase verbosity
xgarrido Sep 15, 2023
19da662
Merge branch 'master' into fix-testing
xgarrido Sep 15, 2023
22639d0
let's try to install ducc from sources
xgarrido Sep 15, 2023
38cf0cf
uninstall first
xgarrido Sep 15, 2023
979fc2c
try setting optimization to none for macos
xgarrido Sep 15, 2023
8c0ac42
Update testing.yml
xgarrido Oct 3, 2023
c22dd24
Update testing.yml
xgarrido Oct 3, 2023
da1f047
Set OMP_NUM_THREADS to zero (and not to None which is the default)
xgarrido Oct 4, 2023
8fc60dc
Update testing.yml
xgarrido Oct 4, 2023
e20c566
Update given new version of pixell
xgarrido Oct 5, 2023
1d5ccb8
Fix version syntax
xgarrido Oct 5, 2023
398bdf4
Let's try latest numpy version
xgarrido Oct 15, 2023
b95127d
exclude buggy version of numpy (1.26.0 does not compile properly the …
xgarrido Oct 25, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions .github/workflows/testing.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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: |
Expand All @@ -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'
Expand Down
12 changes: 6 additions & 6 deletions pspy/sph_tools.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand All @@ -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
Expand Down
4 changes: 2 additions & 2 deletions pspy/tests/test_so_spectra.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand All @@ -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"]
Expand Down
4 changes: 2 additions & 2 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down