Skip to content

Commit

Permalink
BUG(maps): fix accidental revert
Browse files Browse the repository at this point in the history
The changes from 1292566 were accidentally reverted by 2aef719.
  • Loading branch information
ntessore committed Sep 21, 2023
1 parent f950c5f commit bbb741c
Showing 1 changed file with 8 additions and 6 deletions.
14 changes: 8 additions & 6 deletions heracles/maps.py
Original file line number Diff line number Diff line change
Expand Up @@ -399,9 +399,10 @@ def mapper(page: "CatalogPage") -> None:

_map_real(wht, val, ipix, w, v)

ngal += page.size
wmean += (w - wmean).sum() / ngal
var += ((w * v) ** 2 - var).sum() / ngal
if page.size:
ngal += page.size
wmean += (w - wmean).sum() / ngal
var += ((w * v) ** 2 - var).sum() / ngal

# the mapper function is yield-ed to be applied over the catalogue
yield mapper
Expand Down Expand Up @@ -552,9 +553,10 @@ def mapper(page: "CatalogPage") -> None:

_map_complex(wht, val, ipix, w, re, im)

ngal += page.size
wmean += (w - wmean).sum() / ngal
var += ((w * re) ** 2 + (w * im) ** 2 - var).sum() / ngal
if page.size:
ngal += page.size
wmean += (w - wmean).sum() / ngal
var += ((w * re) ** 2 + (w * im) ** 2 - var).sum() / ngal

# the mapper function is yield-ed to be applied over the catalogue
yield mapper
Expand Down

0 comments on commit bbb741c

Please sign in to comment.