Closed thespacedoctor closed 2 years ago
In the end I switched from a bspline surface fit to nearest-neighbour (cubic spline) interpolation seeded with a grid of wavelength and slit-position.
The 2D wavelength/slit-position/order image maps are now generated 6-8 times faster (10-12 mins down to ~90sec) and are 100 times more accurate.
This task is by far the most CPU-intensive and slowest section of the pipeline reduction cascade. 2 ideas to speed up the (currently brute force iteration) the code:
Solution 1 might be a quick win, so trying this first.