LSSTDESC/healsparse

Bug: realize_geom raises ValueError if a region is smaller than a pixel

Opened this issue · 0 comments

The following code raises a ValueError:

import numpy as np
import healsparse as hsp

m = healsparse.HealSparseMap.make_empty(32, 4096, dtype=np.uint8)
reg = hsp.Circle(ra=100.0, dec=50.4, radius=1./3600., value=1)
hsp.realize_geom([reg], m)

ValueError: Shape mismatch: cannot set an array of values to a zero-length list of pixels.