From 6ca3a4e1b1110d4750e73b548227deeeab89a6f8 Mon Sep 17 00:00:00 2001 From: William Joye Date: Sat, 11 Nov 2017 15:32:47 -0500 Subject: update AST WCS --- tksao/frame/base.C | 1 + tksao/frame/fitsimage.C | 131 ++++++++++++++++++++++++++++++++++++++++++++++-- 2 files changed, 128 insertions(+), 4 deletions(-) diff --git a/tksao/frame/base.C b/tksao/frame/base.C index 40148cd..79f5802 100644 --- a/tksao/frame/base.C +++ b/tksao/frame/base.C @@ -642,6 +642,7 @@ Matrix Base::calcAlignWCS(FitsImage* fits1, FitsImage* fits2, Coord::CoordSystem sys1, Coord::CoordSystem sys2, Coord::SkyFrame sky) { + cerr << '*'; if ((!fits1 || !fits2) || (fits1 == fits2) || !(fits1->hasWCS(sys1)) || !(fits2->hasWCS(sys2))) return Matrix(); diff --git a/tksao/frame/fitsimage.C b/tksao/frame/fitsimage.C index b87c4be..9b3d99f 100644 --- a/tksao/frame/fitsimage.C +++ b/tksao/frame/fitsimage.C @@ -4005,10 +4005,11 @@ Vector FitsImage::wcsTran(AstFrameSet* ast, Vector& in, int forward) void FitsImage::wcsTran(AstFrameSet* ast, int npoint, Vector* in, int forward, Vector* out) { - double xin[npoint]; - double yin[npoint]; - double xout[npoint]; - double yout[npoint]; + double* xin = double[npoint]; + double* yin = double[npoint]; + double* xout = double[npoint]; + double* yout = double[npoint]; + for (int ii=0; iislice(2) : 0; + } + astTranP(ast, npoint, 3, (const double**)ptr_in, forward, 3, ptr_out); + for (int kk=0; kkslice(2) : 0; + ptr_in[3][kk] = forward ? context_->slice(3) : 0; + } + astTranP(ast, npoint, 4, (const double**)ptr_in, forward, 4, ptr_out); + for (int kk=0; kk