Skip to content

Commit

Permalink
BUGFIX: make sure to include all pixels in the rectangle
Browse files Browse the repository at this point in the history
  • Loading branch information
JannisNe committed Jul 23, 2024
1 parent 15829b4 commit fad3aef
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions nuztf/neutrino_scanner.py
Original file line number Diff line number Diff line change
Expand Up @@ -222,10 +222,10 @@ 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

0 comments on commit fad3aef

Please sign in to comment.