summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorWilliam Joye <wjoye@cfa.harvard.edu>2017-11-28 20:52:54 (GMT)
committerWilliam Joye <wjoye@cfa.harvard.edu>2017-11-28 20:52:54 (GMT)
commitb2cc5ad648b5d1365539621eb0f66941bbc54fbf (patch)
treeb37a7c7810389ddcc4e055b711a5054076e8e5a7
parentafaa3e2a8eab1a073f560e2ebedde31b7d07850f (diff)
downloadblt-b2cc5ad648b5d1365539621eb0f66941bbc54fbf.zip
blt-b2cc5ad648b5d1365539621eb0f66941bbc54fbf.tar.gz
blt-b2cc5ad648b5d1365539621eb0f66941bbc54fbf.tar.bz2
update AST WCS
-rw-r--r--tksao/frame/fitsimage.C4
-rw-r--r--tksao/frame/fitsmap.C31
2 files changed, 13 insertions, 22 deletions
diff --git a/tksao/frame/fitsimage.C b/tksao/frame/fitsimage.C
index 6313302..8bbb4ce 100644
--- a/tksao/frame/fitsimage.C
+++ b/tksao/frame/fitsimage.C
@@ -3368,10 +3368,10 @@ double FitsImage::getWCSDist(Vector aa, Vector bb, Coord::CoordSystem sys)
if (wcsIsASkyFrame(newast_)) {
aa *= M_PI/180.;
bb *= M_PI/180.;
- rr = wcsDistance(newast_, aa.v, bb.v) *180./M_PI;
+ rr = wcsDistance(newast_, aa, bb) *180./M_PI;
}
else
- rr = wcsDistance(newast_, aa.v, bb.v);
+ rr = wcsDistance(newast_, aa, bb);
return rr;
}
diff --git a/tksao/frame/fitsmap.C b/tksao/frame/fitsmap.C
index 01b2fa9..9dac991 100644
--- a/tksao/frame/fitsmap.C
+++ b/tksao/frame/fitsmap.C
@@ -179,36 +179,27 @@ double FitsImage::mapLenFromRef(double dd, Coord::CoordSystem sys,
setWCSSkyFrame(newast_, Coord::FK5);
maperr =0;
- Vector cc = center();
- double xx[2], wxx[2];
- xx[0] = cc[0];
- xx[1] = cc[0];
- double yy[2], wyy[2];
- yy[0] = cc[1];
- yy[1] = cc[1]+dd;
- wcsTran(newast_,2,xx,yy,1,wxx,wyy);
-
- double pt0[3];
- pt0[0] = wxx[0];
- pt0[1] = wyy[0];
- double pt1[3];
- pt1[0] = wxx[1];
- pt1[1] = wyy[1];
- double out = wcsDistance(newast_,pt0,pt1);
+ Vector in[2];
+ Vector out[2];
+ in[0] = center();
+ in[1] = center()+Vector(0,dd);
+ wcsTran(newast_, 2, in, 1, out);
+ double dd = wcsDistance(newast_,out[0],out[1]);
+
if (wcsIsASkyFrame(newast_)) {
- out = radToDeg(out);
+ dd = radToDeg(dd);
switch (dist) {
case Coord::DEGREE:
break;
case Coord::ARCMIN:
- out *= 60.;
+ dd *= 60.;
break;
case Coord::ARCSEC:
- out *= 60.*60.;
+ dd *= 60.*60.;
break;
}
}
- return out;
+ return dd;
}
}