summaryrefslogtreecommitdiffstats
path: root/tksao/frame/fitsimage.C
diff options
context:
space:
mode:
Diffstat (limited to 'tksao/frame/fitsimage.C')
-rw-r--r--tksao/frame/fitsimage.C21
1 files changed, 19 insertions, 2 deletions
diff --git a/tksao/frame/fitsimage.C b/tksao/frame/fitsimage.C
index be7b449..b6b0a1a 100644
--- a/tksao/frame/fitsimage.C
+++ b/tksao/frame/fitsimage.C
@@ -2778,7 +2778,16 @@ Vector FitsImage::pix2wcs(const Vector& in, Coord::CoordSystem sys,
astNorm(ast_, out.v);
astEnd;
- return hasWCSCel(sys) ? radToDeg(out) : out;
+
+ if (hasWCSCel(sys)) {
+ int id = sys-Coord::WCS;
+ if (wcsCelLon_[id] == 1 || wcsCelLat_[id] == 1)
+ out[0] = radToDeg(out[0]);
+ if (wcsCelLon_[id] == 2 || wcsCelLat_[id] == 2)
+ out[1] = radToDeg(out[1]);
+ }
+
+ return out;
}
VectorStr FitsImage::pix2wcs(const Vector& in, Coord::CoordSystem sys,
@@ -2823,7 +2832,15 @@ Vector3d FitsImage::pix2wcs(const Vector3d& in, Coord::CoordSystem sys,
astNorm(ast_, out.v);
astEnd;
- return hasWCSCel(sys) ? radToDeg(out) : out;
+ if (hasWCSCel(sys)) {
+ int id = sys-Coord::WCS;
+ if (wcsCelLon_[id] == 1 || wcsCelLat_[id] == 1)
+ out[0] = radToDeg(out[0]);
+ if (wcsCelLon_[id] == 2 || wcsCelLat_[id] == 2)
+ out[1] = radToDeg(out[1]);
+ }
+
+ return out;
}
VectorStr3d FitsImage::pix2wcs(const Vector3d& in, Coord::CoordSystem sys,