Jammy2211 / PyAutoGalaxy

PyAutoGalaxy: Open-Source Multiwavelength Galaxy Structure & Morphology
https://pyautogalaxy.readthedocs.io/
MIT License
28 stars 14 forks source link

Feature/jax remove preload #197

Closed Jammy2211 closed 3 weeks ago

Jammy2211 commented 1 month ago

The source code uses a technique called "preloading", whereby it stores various arrays in memory which do not change during a lens model fit. For example, if all lens light parameters are fixed, the lens light emission does not change and it can be stored in memory (including with PSF convolution) in order to speed up the likelihood function.

However, this introduces a lot of code complexity and has caused strange bugs in the past. My hope is that with JAX the speed will be so fast preloading is pointless.

This PR removes preloading from the source code, which should simplify JAX development.