cds-astro / mocpy

Python library to easily create and manipulate MOCs (Multi-Order Coverage maps)
https://cds-astro.github.io/mocpy/
BSD 3-Clause "New" or "Revised" License
60 stars 33 forks source link

`from_healpix_cells` no longer allows HEALPix cells with index 0 #157

Closed smcguire-cmu closed 4 months ago

smcguire-cmu commented 4 months ago

In the latest release we noticed that creating a MOC with the from_healpix_cells method removes pixels with index 0, raising the warning The list of indices contain negative values. I believe this is a bug introduced with #149.

Reproducing code:

MOC.from_healpix_cells(np.array([0]), np.array([0]), 0)

mocpy Version: '0.16.0'

ManonMarchand commented 4 months ago

Ouch, that's a very nasty one. Releasing a bugfix version as soon as #158 is merged and the tests pass. Thanks a lot for reporting.

ManonMarchand commented 4 months ago

version 0.16.1 is out, thanks again for the bug report!!

smcguire-cmu commented 4 months ago

Thanks for the quick fix!