pynrc.nrc_utils.nproc_use_convolve¶
- pynrc.nrc_utils.nproc_use_convolve(fov_pix, oversample, npsf=None)[source]¶
Attempt to estimate a reasonable number of processes to use for multiple simultaneous convolve_fft calculations.
Here we attempt to estimate how many such calculations can happen in parallel without swapping to disk, with a mixture of empiricism and conservatism. One really does not want to end up swapping to disk with huge arrays.
NOTE: Requires psutil package. Otherwise defaults to mp.cpu_count() / 2
- Parameters
fov_pix (int) – Square size in detector-sampled pixels of final PSF image.
oversample (int) – The optical system that we will be calculating for.
npsf (int) – Number of PSFs. Sets maximum # of processes.