esheldon / esutil

A variety of python utilities focusing on numerical, scientific, and astrophysical computing
GNU General Public License v2.0
35 stars 19 forks source link

BUG fix lazy inverse computation #69

Closed beckermr closed 3 years ago

beckermr commented 3 years ago

This PR fixes a bug where upon read the lazy inverse was being marked as computed even if it was not.

closes #68

beckermr commented 3 years ago

cc @esheldon for review!

erykoff commented 3 years ago

I'm trying to follow what triggers this and what's the manifestation of the bug...

beckermr commented 3 years ago

Just plug any DECam finalcut image into the WCS class and try to get the inverse with find=False.

beckermr commented 3 years ago

The manifestation is that the output coordinates in x,y are manifestly incorrect. It always returns crpix!

erykoff commented 3 years ago

And with this change it will Raise instead?

beckermr commented 3 years ago

Nope. It correctly computes the inverse lazily and returns the right coordinates.

erykoff commented 3 years ago

Then I clearly completely misunderstood the original code. So this is fine.