From 0f44609a6041ff465d840c063bb247293ada6f33 Mon Sep 17 00:00:00 2001 From: William Joye Date: Tue, 28 Nov 2017 16:25:23 -0500 Subject: update AST WCS --- tksao/frame/fitsimage.C | 42 ------------------------------------------ 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 -- cgit v0.12