summaryrefslogtreecommitdiffstats
path: root/tksao/frame
diff options
context:
space:
mode:
authorWilliam Joye <wjoye@cfa.harvard.edu>2017-11-28 21:34:06 (GMT)
committerWilliam Joye <wjoye@cfa.harvard.edu>2017-11-28 21:34:06 (GMT)
commitbc6a31d369f8094fed302dbee42a84da506efc44 (patch)
tree8645b0f075a2d457dbfb07fb2ea9b3634cf84f0e /tksao/frame
parent0f44609a6041ff465d840c063bb247293ada6f33 (diff)
downloadblt-bc6a31d369f8094fed302dbee42a84da506efc44.zip
blt-bc6a31d369f8094fed302dbee42a84da506efc44.tar.gz
blt-bc6a31d369f8094fed302dbee42a84da506efc44.tar.bz2
update AST WCS
Diffstat (limited to 'tksao/frame')
-rw-r--r--tksao/frame/fitsimage.C14
-rw-r--r--tksao/frame/fitsimage.h4
2 files changed, 7 insertions, 11 deletions
diff --git a/tksao/frame/fitsimage.C b/tksao/frame/fitsimage.C
index a0efce5..f1c0cb5 100644
--- a/tksao/frame/fitsimage.C
+++ b/tksao/frame/fitsimage.C
@@ -3331,7 +3331,7 @@ Vector FitsImage::wcs2pix(Vector in, Coord::CoordSystem sys,
#endif
#ifndef NEWWCS
-double FitsImage::getWCSDist(Vector a, Vector b, Coord::CoordSystem sys)
+double FitsImage::getWCSDist(Vector aa, Vector bb, Coord::CoordSystem sys)
{
int ss = sys-Coord::WCS;
if (!(ss>=0 && ast_ && ast_[ss]))
@@ -3341,12 +3341,12 @@ double FitsImage::getWCSDist(Vector a, Vector b, Coord::CoordSystem sys)
double rr=0;
if (wcsIsASkyFrame(ast_[ss])) {
- Vector aa = a*M_PI/180.;
- Vector bb = b*M_PI/180.;
- rr = wcsDistance(ast_[ss], aa.v, bb.v) *180./M_PI;
+ aa *= M_PI/180.;
+ bb *= M_PI/180.;
+ rr = wcsDistance(ast_[ss], aa, bb) *180./M_PI;
}
else
- rr = wcsDistance(ast_[ss], a.v, b.v);
+ rr = wcsDistance(ast_[ss], aa, bb);
return rr;
}
@@ -4222,9 +4222,9 @@ void FitsImage::wcsTran(AstFrameSet* ast, int npoint,
#endif
#ifndef NEWWCS
-double FitsImage::wcsDistance(AstFrameSet* ast, double* point1, double* point2)
+double FitsImage::wcsDistance(AstFrameSet* ast, Vector vv1, Vector vv2)
{
- return astDistance(ast, point1, point2);
+ return astDistance(ast, vv1.v, vv2.v);
}
#else
double FitsImage::wcsDistance(AstFrameSet* ast, Vector vv1, Vector vv2)
diff --git a/tksao/frame/fitsimage.h b/tksao/frame/fitsimage.h
index ab41b9a..0a72d72 100644
--- a/tksao/frame/fitsimage.h
+++ b/tksao/frame/fitsimage.h
@@ -401,11 +401,7 @@ class FitsImage {
int wcsIsASkyFrame(AstFrameSet*);
Vector wcsTran(AstFrameSet*, Vector, int);
void wcsTran(AstFrameSet*, int, Vector*, int, Vector*);
-#ifndef NEWWCS
- double wcsDistance(AstFrameSet*, double*, double*);
-#else
double wcsDistance(AstFrameSet*, Vector, Vector);
-#endif
#ifdef NEWWCS
void wcsTran(AstFrameSet*, int, const double*, const double*, int,
double*, double*);