svank / remove_starfield

Python code for estimating and removing a starfield from a set of celestial images
https://svank.github.io/remove_starfield/
GNU General Public License v3.0
2 stars 2 forks source link

Allow custom number of processes for multiprocessing #7

Closed jmbhughes closed 2 months ago

jmbhughes commented 2 months ago

I was processing some data and noticed that the code always uses the default number of processes (which is the number of CPUs ). We want to change this for PUNCH so we can constrain CPU usage. It should be as simple as letting the user pass in a process count and setting it here when the pool is made.

https://github.com/svank/remove_starfield/blob/beb2c3b0d30bc47e721ca315355d9b6fe5d0c382/remove_starfield/core.py#L201

As a fun showcase, here's what happens when you have a big server and don't set the number... you have a ton of processes running around.

Screenshot 2024-08-25 at 15 24 17

svank commented 2 months ago

Why on earth do you have swap space with that much RAM?

Fixed in 3b9846b09391f254723b558c198203b9cb9582e5