geometry_profile.transform_grid_to_reference_frame_jitted:

REPEATS x20 (divided by 20 to give time per call)
sub-grid size = 4 (16 sub-pixels)

ELLIPTICAL ORIGINAL:

lsst_solution: 0.0011623263359069823
euclid_solution: 0.0038586854934692383
hst_solution: 0.014220154285430909
hst_up_solution: 0.040692710876464845
ao_solution: 0.48831058740615846

SPHERICAL ORIGINAL:

lsst_solution: 8.448362350463868e-05
euclid_solution: 0.00029778480529785156
hst_solution: 0.0010726809501647948
hst_up_solution: 0.002870357036590576
ao_solution: 0.03976395130157471

ELLIPTICAL JITTED:

lsst_solution: 0.0007831215858459473
euclid_solution: 0.003097641468048096
hst_solution: 0.01265544891357422
hst_up_solution: 0.03579049110412598
ao_solution: 0.34360289573669434

SPHERICAL JITTED:

lsst_solution: 1.3887882232666016e-05
euclid_solution: 5.3715705871582034e-05
hst_solution: 0.00039167404174804686
hst_up_solution: 0.0010483503341674806
ao_solution: 0.030873847007751466

Spherical is a lot faster than elliptical, because of the removal of rotations by an angle phi.

The jitted cases are faster that the non-jitted, but the speed up is minor.


The run-times of the AO case are not manageable regardless, considering we call this function for every profile.
Even the hst_up run-times are problematic for a large number of galaxies / profiles.

It is important to remember that we can significantly reduce the calls to this function for both light and
mass profiles by:

light-profiles and mass-profiles - Setup an adaptive sub-pixel grid, with the majority of pixels (away from the centre)
having just 1 central sub-pixel.

mass-profiles - Use the interpolation defleciton angle grid (provided the interpolation itself isn't super slow...)


A non-ideal speed-up nwould be to move the coordinate transforms into the jitted light profile intensity / mass profile
deflection calculations.


Can the jitted function I've written be sped up anymore? Im not sure how but one to revist maybe.