diff options
author | William Joye <wjoye@cfa.harvard.edu> | 2018-07-31 20:30:23 (GMT) |
---|---|---|
committer | William Joye <wjoye@cfa.harvard.edu> | 2018-07-31 20:30:23 (GMT) |
commit | 2448f79ab6c9f7305b7c13dc7009bac4515d4d1c (patch) | |
tree | f43044cac241b9df54550b5c0816c6324d59ef65 | |
parent | 7990845e615977f407f88e6324abf5349438a2a8 (diff) | |
download | blt-2448f79ab6c9f7305b7c13dc7009bac4515d4d1c.zip blt-2448f79ab6c9f7305b7c13dc7009bac4515d4d1c.tar.gz blt-2448f79ab6c9f7305b7c13dc7009bac4515d4d1c.tar.bz2 |
fix issue with rotation angle wcs which is flipx
-rw-r--r-- | tksao/frame/frmap.C | 32 |
1 files changed, 20 insertions, 12 deletions
diff --git a/tksao/frame/frmap.C b/tksao/frame/frmap.C index 4e8fca5..844c5e1 100644 --- a/tksao/frame/frmap.C +++ b/tksao/frame/frmap.C @@ -21,14 +21,18 @@ double Base::mapAngleFromRef(double angle, Coord::CoordSystem sys, case Coord::AMPLIFIER: break; default: - Coord::Orientation oo = keyContext->fits->getWCSOrientation(sys, sky); - if (oo==Coord::XX) - rr = -(angle + ptr->getWCSRotation(sys,sky) + M_PI); - else + switch (keyContext->fits->getWCSOrientation(sys,sky)) { + case Coord::NORMAL: rr += ptr->getWCSRotation(sys,sky); - break; + break; + case Coord::XX: + rr = -(angle + ptr->getWCSRotation(sys,sky) + M_PI); + break; + case Coord::YY: + case Coord::XY: + break; + } } - return zeroTWOPI(rr); } @@ -47,14 +51,18 @@ double Base::mapAngleToRef(double angle, Coord::CoordSystem sys, case Coord::AMPLIFIER: break; default: - Coord::Orientation oo = keyContext->fits->getWCSOrientation(sys, sky); - if (oo==Coord::XX) - rr = -(angle + ptr->getWCSRotation(sys,sky) + M_PI); - else + switch (keyContext->fits->getWCSOrientation(sys,sky)) { + case Coord::NORMAL: rr -= ptr->getWCSRotation(sys,sky); - break; + break; + case Coord::XX: + rr = -(angle + ptr->getWCSRotation(sys,sky) + M_PI); + break; + case Coord::YY: + case Coord::XY: + break; + } } - return zeroTWOPI(rr); } |