Skip to content

Open Planck, CSFD, and Lenz2017 maps with memory mapping#69

Open
hombit wants to merge 1 commit intogregreen:masterfrom
hombit:healpix-fits-mmap
Open

Open Planck, CSFD, and Lenz2017 maps with memory mapping#69
hombit wants to merge 1 commit intogregreen:masterfrom
hombit:healpix-fits-mmap

Conversation

@hombit
Copy link
Copy Markdown
Contributor

@hombit hombit commented Apr 20, 2026

I've found that in multiple pipelines the RAM pressure is significantly high, especially if running stuff in parallel. See, e.g., SNAD Viewer, which we run on a virtual machine with just 8GB of RAM, or LightCurveLynx, which has to duplicate dust maps when using multiprocessing.

This may be solved by using memory mapping instead of loading the data into memory. When I was looking for low-hanging fruits for those changes, I found that CSFD is really easy to change for using memory mapping: just changing .flatten() to .raven() prevents memory copying.

Similar changes are applied to HEALPixFITSQuery. I've also moved dtype casting and scaling from the constructor to .query(), so no memory copy happening for Planck and Lenz2017. I've run benchmarks and found no difference in .query() performance for both scalar and 10,000-element input.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant