Details
-
Type:
Story
-
Status: In Progress
-
Resolution: Unresolved
-
Fix Version/s: None
-
Component/s: sphgeom
-
Labels:
-
Story Points:10
-
Epic Link:
-
Team:Data Release Production
-
Urgent?:No
Description
Our sphgeom provides a nice generic interface for spherical pixelizations, with implementations for HTM, Q3C, and a custom modification of Q3C. By delegating the work to the public HEALPix C++ library, we could easily add HEALPix to the mix, and write downstream mask manipulation code without assuming a particular pixelization. It'd also give us an easy way to compare the performance of different pixelizations.
The HEALPix C++ library is packaged by conda-forge as healpix_cxx, and at least right now it installs without any trouble into our environment. When this ticket is nearing completion we can RFC getting that into our standard installs. We should then either make HEALPix an optional dependency of sphgeom or (probably better) put a new subclass of sphgeom::Pixelization in a new package that depends on both HEALPix and sphgeom; we want to make sure the current sphgeom functionality continues to be available without additional dependencies.
It looks like the tricky part of implementing that new Pixelization will be determining whether the pixel method can just return a sphgeom::ConvexPolygon with the four vertices of the pixel (i.e. under what conditions do the non-geodesic HEALPix boundaries extend beyond the geodesic boundaries of a ConvexPolygon with the same vertices instead lying completely within them?). I've only taken a quick glance, but it looks like the HEALPix library includes routines for directly implementing all of Pixelization's other virtual methods.
Attachments
Issue Links
- is blocked by
-
DM-33162 Fix conda feedstocks for healpix_cxx
- Done
I'm starting this now, in my 20% time, because it looks fun and I'd like a bit of a break from butler/python (in my 20% time, or whatever fraction of that I can actually carve out these days).
Here's my plan:
There is of course a HEALPix C++ library as well, and we could replace steps 2-3 with one that uses that implements the Region and Pixelization interfaces in a downstream C++ package. This would get this up and running faster, but I have heard rumblings that there are problems with its region intersections that the CDS Rust implementation does not have. More importantly, steps 2-3 are what makes this look fun to me.
If this effort doesn't converge before having HEALPix in sphgeom becomes a higher priority for LSST, we can go back to trying to do this completely in C++. All the work in Step 1 carries over directly, and this design should even let someone have multiple HEALPix sphgeom implementations installed at the same time.