I added examples/timeWcs.cc. I wrote a similar routine for AST but can't commit it because AST is not part of our stack. Here are the timings, using an image with a TAN-SIP header: calexp-849375-12.fits generated by validate_drp master, commit c1ea4c0, examples/runCfhtQuick.sh. This is on an unloaded 2012 MacBook Pro.
All transforms are performed in two steps: pixel to sky, then sky back to pixel. The maximum observed error in
*** LSST ***
|
Timing 10000 iterations of pixel->sky->pixel of the WCS found in test1.fits
|
2.2471 usec per iteration; max round trip error = (5.02994e-05, 0.000158473) pixels
|
|
*** AST ***
|
Transform each point in a separate call, using the full frameset;
|
this is primarily slow due to per-call overhead; but it is also
|
recommended to use a simplified mapping instead of the full frameset
|
Timing 10000 iterations of pixel->sky->pixel of the WCS found in test1.fits
|
timeWcs; nIter=10000; doSimplify=0
|
178.174 usec per iteration; max round trip error = (2.51598e-05, 7.64924e-05) pixels
|
|
Transform each point separately, using a simplified mapping extracted from
|
the frameset; this is slow due to per-call overhead
|
timeWcs; nIter=10000; doSimplify=1
|
88.9025 usec per iteration; max round trip error = (2.51598e-05, 7.64924e-05) pixels
|
|
Transform all points in a single call on the full frameset;
|
this is fast , but one can do even better using a simplified mapping
|
timeWcsVectorize; nIter=10000; doSimplify=0
|
0.9136 usec per iteration; max round trip error = (2.51598e-05, 7.64924e-05) pixels
|
|
Transform all points in a single call on a simplified mapping;
|
this is the recommended approach when speed is important;
|
timeWcsVectorize; nIter=10000; doSimplify=1
|
0.8953 usec per iteration; max round trip error = (2.51598e-05, 7.64924e-05) pixels
|
Further improvements to AST for warping are expected due to the ability to eliminate unused portions of transformations. Our present warping code (and this timing tests) first transforms pixel1 to sky, then sky to pixel2. However, this can be simplified to pixel1 to focal plane to pixel2 (avoiding going to sky and back again). That further improvement can be measured, but AST is clearly already faster than our current code, further work is not needed to prove that AST is fast enough.
I added examples/timeWcs.cc. I wrote a similar routine for AST but can't commit it because AST is not part of our stack. Here are the timings, using an image with a TAN-SIP header: calexp-849375-12.fits generated by validate_drp master, commit c1ea4c0, examples/runCfhtQuick.sh. This is on an unloaded 2012 MacBook Pro.
All transforms are performed in two steps: pixel to sky, then sky back to pixel. The maximum observed error in
*** LSST ***
Timing 10000 iterations of pixel->sky->pixel of the WCS found in test1.fits
2.2471 usec per iteration; max round trip error = (5.02994e-05, 0.000158473) pixels
*** AST ***
Transform each point in a separate call, using the full frameset;
this is primarily slow due to per-call overhead; but it is also
recommended to use a simplified mapping instead of the full frameset
Timing 10000 iterations of pixel->sky->pixel of the WCS found in test1.fits
timeWcs; nIter=10000; doSimplify=0
178.174 usec per iteration; max round trip error = (2.51598e-05, 7.64924e-05) pixels
Transform each point separately, using a simplified mapping extracted from
the frameset; this is slow due to per-call overhead
timeWcs; nIter=10000; doSimplify=1
88.9025 usec per iteration; max round trip error = (2.51598e-05, 7.64924e-05) pixels
Transform all points in a single call on the full frameset;
this is fast , but one can do even better using a simplified mapping
timeWcsVectorize; nIter=10000; doSimplify=0
0.9136 usec per iteration; max round trip error = (2.51598e-05, 7.64924e-05) pixels
Transform all points in a single call on a simplified mapping;
this is the recommended approach when speed is important;
timeWcsVectorize; nIter=10000; doSimplify=1
0.8953 usec per iteration; max round trip error = (2.51598e-05, 7.64924e-05) pixels
Further improvements to AST for warping are expected due to the ability to eliminate unused portions of transformations. Our present warping code (and this timing tests) first transforms pixel1 to sky, then sky to pixel2. However, this can be simplified to pixel1 to focal plane to pixel2 (avoiding going to sky and back again). That further improvement can be measured, but AST is clearly already faster than our current code, further work is not needed to prove that AST is fast enough.