From 7990845e615977f407f88e6324abf5349438a2a8 Mon Sep 17 00:00:00 2001 From: William Joye Date: Tue, 31 Jul 2018 16:21:09 -0400 Subject: fix issue with rotation angle wcs which is flipx --- tksao/frame/frmap.C | 22 ++++++++-------------- 1 file changed, 8 insertions(+), 14 deletions(-) diff --git a/tksao/frame/frmap.C b/tksao/frame/frmap.C index c1f5f27..4e8fca5 100644 --- a/tksao/frame/frmap.C +++ b/tksao/frame/frmap.C @@ -21,14 +21,11 @@ double Base::mapAngleFromRef(double angle, Coord::CoordSystem sys, case Coord::AMPLIFIER: break; default: - if (hasWCSCel(sys)) + Coord::Orientation oo = keyContext->fits->getWCSOrientation(sys, sky); + if (oo==Coord::XX) + rr = -(angle + ptr->getWCSRotation(sys,sky) + M_PI); + else rr += ptr->getWCSRotation(sys,sky); - else { - Coord::Orientation oo = keyContext->fits->getWCSOrientation(sys, sky); - if (oo==Coord::XX) { - rr = -(angle + ptr->getWCSRotation(sys,sky) + M_PI); - } - } break; } @@ -50,14 +47,11 @@ double Base::mapAngleToRef(double angle, Coord::CoordSystem sys, case Coord::AMPLIFIER: break; default: - if (hasWCSCel(sys)) + Coord::Orientation oo = keyContext->fits->getWCSOrientation(sys, sky); + if (oo==Coord::XX) + rr = -(angle + ptr->getWCSRotation(sys,sky) + M_PI); + else rr -= ptr->getWCSRotation(sys,sky); - else { - Coord::Orientation oo = keyContext->fits->getWCSOrientation(sys, sky); - if (oo==Coord::XX) { - rr = -(angle + ptr->getWCSRotation(sys,sky) + M_PI); - } - } break; } -- cgit v0.12