diff options
author | William Joye <wjoye@cfa.harvard.edu> | 2017-03-03 17:51:34 (GMT) |
---|---|---|
committer | William Joye <wjoye@cfa.harvard.edu> | 2017-03-03 17:51:34 (GMT) |
commit | 57b2b895c60eae69eb3b47e4dffcf4a2d67dbb3d (patch) | |
tree | fcd0ed1c879db3cf937f7eeecf58930590db6452 | |
parent | af793ca38cfa47dc964e1fa04fe4830988f21f51 (diff) | |
download | blt-57b2b895c60eae69eb3b47e4dffcf4a2d67dbb3d.zip blt-57b2b895c60eae69eb3b47e4dffcf4a2d67dbb3d.tar.gz blt-57b2b895c60eae69eb3b47e4dffcf4a2d67dbb3d.tar.bz2 |
fix position angle for linear WCS
-rw-r--r-- | tksao/frame/frmap.C | 32 |
1 files changed, 8 insertions, 24 deletions
diff --git a/tksao/frame/frmap.C b/tksao/frame/frmap.C index feb267a..42c467e 100644 --- a/tksao/frame/frmap.C +++ b/tksao/frame/frmap.C @@ -6,7 +6,8 @@ #include "framebase.h" #include "fitsimage.h" -double Base::mapAngleFromRef(double angle, Coord::CoordSystem sys, Coord::SkyFrame sky) +double Base::mapAngleFromRef(double angle, Coord::CoordSystem sys, + Coord::SkyFrame sky) { double rr = angle; FitsImage* ptr = currentContext->cfits; @@ -20,23 +21,15 @@ double Base::mapAngleFromRef(double angle, Coord::CoordSystem sys, Coord::SkyFra case Coord::AMPLIFIER: break; default: - switch (ptr->getWCSOrientation(sys,sky)) { - case Coord::NORMAL: - rr += ptr->getWCSRotation(sys,sky); - break; - case Coord::XX: - rr = -(angle + ptr->getWCSRotation(sys,sky) + M_PI); - break; - case Coord::YY: - case Coord::XY: - break; - } + rr += ptr->getWCSRotation(sys,sky); + break; } return zeroTWOPI(rr); } -double Base::mapAngleToRef(double angle, Coord::CoordSystem sys, Coord::SkyFrame sky) +double Base::mapAngleToRef(double angle, Coord::CoordSystem sys, + Coord::SkyFrame sky) { double rr = angle; FitsImage* ptr = currentContext->cfits; @@ -50,17 +43,8 @@ double Base::mapAngleToRef(double angle, Coord::CoordSystem sys, Coord::SkyFrame case Coord::AMPLIFIER: break; default: - switch (ptr->getWCSOrientation(sys,sky)) { - case Coord::NORMAL: - rr -= ptr->getWCSRotation(sys,sky); - break; - case Coord::XX: - rr = -(angle + ptr->getWCSRotation(sys,sky) + M_PI); - break; - case Coord::YY: - case Coord::XY: - break; - } + rr -= ptr->getWCSRotation(sys,sky); + break; } return zeroTWOPI(rr); |