bd-j / forcepho

Generative modeling galaxy photometry for JWST
https://forcepho.readthedocs.io
19 stars 4 forks source link

Speed up Sersic splines #34

Open bd-j opened 5 years ago

bd-j commented 5 years ago

Right now generating a proposal for a single source (even for the GPU) involves evaluating several bicubic splines and their derivatives using a loop over scipy.SmoothBivariateSpline objects in the CPU code. This is expensive (~150 microseconds for ten Sersic radii) and should be sped up to make sure proposals can be generated fast enough for the CPU.

bd-j commented 2 years ago

might be worth looking at RectBivariateSpline instead of SmoothBivariateSpline cc @stacchella

bd-j commented 2 years ago

We now use RectBivariateSpline which has better behavior. Timing tests compared to the pixel computation kernel remain to be done.