Skip to content

Commit

Permalink
Fixed quadrature weight units in curvedsky.map2alm_cyl for partial sk…
Browse files Browse the repository at this point in the history
…y coverage. Also added support for google collab notebook in enplot
  • Loading branch information
amaurea committed Aug 3, 2023
1 parent 5b40a1f commit 4cc18a5
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion pixell/curvedsky.py
Original file line number Diff line number Diff line change
Expand Up @@ -749,7 +749,7 @@ def map2alm_cyl(map, alm=None, ainfo=None, minfo=None, lmax=None, spin=[0,2], we
ny = map.shape[-2]+np.sum(minfo.ypad)
weights = ducc0.sht.experimental.get_gridweights(minfo.ducc_geo.name, ny)
weights = weights[minfo.ypad[0]:len(weights)-minfo.ypad[1]]
weights/= map.shape[-1]
weights/= minfo.ducc_geo.nx

Check warning on line 752 in pixell/curvedsky.py

View check run for this annotation

Codecov / codecov/patch

pixell/curvedsky.py#L752

Added line #L752 was not covered by tests
else:
weights = map.pixsizemap(separable=True, broadcastable=True)[:,0]
weights = weights.astype(map.dtype)
Expand Down
2 changes: 1 addition & 1 deletion pixell/enplot.py
Original file line number Diff line number Diff line change
Expand Up @@ -952,7 +952,7 @@ def show(img, title=None, method="auto"):
# do. Try them one by one in priority order
try:
# Only use ipython for graphical notebooks
if "ZMQ" in get_ipython().__class__.__name__:
if get_ipython().__class__.__name__ in ["ZMQInteractiveShell", "Shell"]:

Check warning on line 955 in pixell/enplot.py

View check run for this annotation

Codecov / codecov/patch

pixell/enplot.py#L955

Added line #L955 was not covered by tests
return show_ipython(img, title=title)
except (ImportError, NameError): pass
try: return show_tk(img, title=title)
Expand Down

0 comments on commit 4cc18a5

Please sign in to comment.