Closed marxide closed 4 years ago
Thanks for the PR. I'll check with my tests and merge if all looks fine.
Code checked and indeed a lot faster. nside 4096, 10000 random pixels is now 15 ms instead of 1s!
You've removed the check for wrapping at 360 deg, which was necessary earlier. I confirmed that is doesn't break anything because we sanitize polygons that are split at the outer meridians or poles downstream.
Thanks for your help!
I found the
skymapper.healpix.getHealpixVertices
function to be quite a major bottleneck in my plotting code. I've attempted rewriting it to pass all the pixel values to the appropriate healpy functions instead of iterating over each pixel. The speedup in my case is very significant.It produces the same results for what I'm doing, but I haven't rigorously tested if it will do the same thing for all cases. The plots I'm making use a background all-sky healpix map, and plot many survey footprints all over the sky so I feel it's a reasonable test. I welcome others to please test it too.