diff --git a/heracles/catalog/filters.py b/heracles/catalog/filters.py index 7483bce..11aff14 100644 --- a/heracles/catalog/filters.py +++ b/heracles/catalog/filters.py @@ -91,6 +91,8 @@ def __call__(self, page): from healpy import ang2pix lon, lat = self._lonlat + good_entry = np.isfiniten(lon) & np.isfinite(lat) + lon, lat = lon[good_entry], lat[good_entry] ipix = ang2pix(self._nside, page[lon], page[lat], lonlat=True) exclude = np.where(self._footprint[ipix] == 0)[0] page.delete(exclude)