diff options
author | William Joye <wjoye@cfa.harvard.edu> | 2017-11-28 21:25:23 (GMT) |
---|---|---|
committer | William Joye <wjoye@cfa.harvard.edu> | 2017-11-28 21:25:23 (GMT) |
commit | 0f44609a6041ff465d840c063bb247293ada6f33 (patch) | |
tree | 73e23c70d6743396e11365db9b445aab14453903 | |
parent | 920ad35c65d71e5161e54c3f9a779d812ae69764 (diff) | |
download | blt-0f44609a6041ff465d840c063bb247293ada6f33.zip blt-0f44609a6041ff465d840c063bb247293ada6f33.tar.gz blt-0f44609a6041ff465d840c063bb247293ada6f33.tar.bz2 |
update AST WCS
-rw-r--r-- | tksao/frame/fitsimage.C | 42 | ||||
-rw-r--r-- | tksao/frame/fitsimage.h | 5 |
2 files changed, 4 insertions, 43 deletions
diff --git a/tksao/frame/fitsimage.C b/tksao/frame/fitsimage.C index 7eaeb08..a0efce5 100644 --- a/tksao/frame/fitsimage.C +++ b/tksao/frame/fitsimage.C @@ -4227,48 +4227,6 @@ double FitsImage::wcsDistance(AstFrameSet* ast, double* point1, double* point2) return astDistance(ast, point1, point2); } #else -double FitsImage::wcsDistance(AstFrameSet* ast, double* point1, double* point2) -{ - int naxes = astGetI(ast,"Naxes"); - switch (naxes) { - case 1: - // error - break; - case 2: - return astDistance(ast, point1, point2); - case 3: - { - double ptr1[3]; - ptr1[0] = point1[0]; - ptr1[1] = point1[1]; - ptr1[2] = 0; - double ptr2[3]; - ptr2[0] = point2[0]; - ptr2[1] = point2[1]; - ptr2[2] = 0; - - return astDistance(ast, ptr1, ptr2); - } - case 4: - { - double ptr1[4]; - ptr1[0] = point1[0]; - ptr1[1] = point1[1]; - ptr1[2] = 0; - ptr1[3] = 0; - double ptr2[4]; - ptr2[0] = point2[0]; - ptr2[1] = point2[1]; - ptr2[2] = 0; - ptr2[3] = 0; - - return astDistance(ast, ptr1, ptr2); - } - } - - return 0; -} - double FitsImage::wcsDistance(AstFrameSet* ast, Vector vv1, Vector vv2) { int naxes = astGetI(ast,"Naxes"); diff --git a/tksao/frame/fitsimage.h b/tksao/frame/fitsimage.h index 4bd6f1b..ab41b9a 100644 --- a/tksao/frame/fitsimage.h +++ b/tksao/frame/fitsimage.h @@ -401,11 +401,14 @@ 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*); - double wcsDistance(AstFrameSet*, Vector, Vector); double wcsAngle(AstFrameSet*, Vector*); double wcsAxAngle(AstFrameSet*, Vector*); #endif |