Skip to content

Commit

Permalink
Fix Coverage calculation (#443)
Browse files Browse the repository at this point in the history
Co-authored-by: Robert Stein <[email protected]>
  • Loading branch information
JannisNe and robertdstein authored Jul 31, 2024
1 parent 46c0ee8 commit 7dd120a
Show file tree
Hide file tree
Showing 4 changed files with 1,338 additions and 1,340 deletions.
10 changes: 6 additions & 4 deletions nuztf/neutrino_scanner.py
Original file line number Diff line number Diff line change
Expand Up @@ -222,10 +222,12 @@ def unpack_skymap(self, skymap=None, output_nside: None | int = None):

center_ra = np.radians(np.mean([self.ra_max, self.ra_min]))
center_dec = np.radians(np.mean([self.dec_max, self.dec_min]))
rad = (
np.radians(max(self.ra_max - self.ra_min, self.dec_max - self.dec_min))
/ 2.0
)
# Take the larger of the two sides and convert to radians
# To make sure to include all pixels until the edge of the rectangle, we have to devide by sqrt(2)
# (not 2 as previously done here!)
rad = np.radians(
max(self.ra_max - self.ra_min, self.dec_max - self.dec_min)
) / np.sqrt(2)

nearish_pixels = list(
hp.query_disc(
Expand Down
Loading

0 comments on commit 7dd120a

Please sign in to comment.