Fix Version/s: None
Sprint:Alert Production X16 - 5
Time TAN-SIP for our code and for AST, in order to get a sense of the performance impact of switching to AST for our WCS implementation.
- relates to
DM-4157 Provide a recommendation for how to manage Wcs in LSST
I discovered a subtle error with now time/iteration was computed (which I noticed when the value did not stabilize as I increased the number of iterations) that I solved by separately casting nIter and CLOCKS_PER_SEC, so I propagated that change to the rest of the afw timing code. Clearly a central routine would be best, and it should probably go into utils. But that's for another day.
I attached a zip archive containing the AST timing code and instructions for building it.
Looks good. Thanks so much for doing this on short notice.
There's a fair bit of AST code overhead, but otherwise, this is pretty understandable. It certainly suggests that we want a nice C++ interface layer over AST (e.g. "blah.data() gets old fast!).
It's probably fine to keep code in here. It requires some effort to run, and the readme and build file are necessary, so it's too much for a gist. We just needed it to demonstrate this particular aspect of the project, so I think we're good.
Nothing to merge: code is an attachment here, results are in a comment, and summary in DMTN-010.
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
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.