diff options
author | William Joye <wjoye@cfa.harvard.edu> | 2017-11-07 22:16:25 (GMT) |
---|---|---|
committer | William Joye <wjoye@cfa.harvard.edu> | 2017-11-07 22:16:25 (GMT) |
commit | c9317f007a12735ffc792c652bd080930c84209d (patch) | |
tree | 30b5d21d8e965ecdf72648cff2bcc01377b923dc /tksao | |
parent | 04fb45e31aec48db7a4700661a64c3ff6ddce115 (diff) | |
download | blt-c9317f007a12735ffc792c652bd080930c84209d.zip blt-c9317f007a12735ffc792c652bd080930c84209d.tar.gz blt-c9317f007a12735ffc792c652bd080930c84209d.tar.bz2 |
update AST WCS
Diffstat (limited to 'tksao')
-rw-r--r-- | tksao/frame/fitsmap.C | 18 |
1 files changed, 7 insertions, 11 deletions
diff --git a/tksao/frame/fitsmap.C b/tksao/frame/fitsmap.C index a138302..6f666f3 100644 --- a/tksao/frame/fitsmap.C +++ b/tksao/frame/fitsmap.C @@ -274,7 +274,6 @@ Vector FitsImage::mapLenToRef(const Vector& vv, Coord::CoordSystem sys, double FitsImage::mapLenToRef(double dd, Coord::CoordSystem sys, Coord::DistFormat dist) { - cerr << '*'; switch (sys) { case Coord::IMAGE: return dd*imageToRef[1].length(); @@ -292,14 +291,11 @@ double FitsImage::mapLenToRef(double dd, Coord::CoordSystem sys, } astClearStatus; // just to make sure - astBegin; + setAstWCSSystem(newast_, sys); maperr =0; - AstFrameSet* ast = (AstFrameSet*)astCopy(newast_); - setAstWCSSystem(ast, sys); - double rdd = dd; - if (astWCSIsASkyFrame(ast)) { + if (astWCSIsASkyFrame(newast_)) { rdd = degToRad(dd); switch (dist) { case Coord::DEGREE: @@ -315,7 +311,7 @@ double FitsImage::mapLenToRef(double dd, Coord::CoordSystem sys, Vector cc = center(); Vector wcc; - astWCSTran(ast,1,cc.v,cc.v+1,1,wcc.v,wcc.v+1); + astWCSTran(newast_,1,cc.v,cc.v+1,1,wcc.v,wcc.v+1); double wxx[2], xx[2]; wxx[0] = wcc[0]; @@ -323,7 +319,7 @@ double FitsImage::mapLenToRef(double dd, Coord::CoordSystem sys, double wyy[2], yy[2]; wyy[0] = wcc[1]; wyy[1] = wcc[1]+rdd; - astWCSTran(ast,2,wxx,wyy,0,xx,yy); + astWCSTran(newast_,2,wxx,wyy,0,xx,yy); double pt0[2]; pt0[0] = xx[0]; @@ -332,9 +328,9 @@ double FitsImage::mapLenToRef(double dd, Coord::CoordSystem sys, pt1[0] = xx[1]; pt1[1] = yy[1]; - astInvert(ast); - double out = astDistance(ast,pt0,pt1); - astEnd; // now, clean up memory + astInvert(newast_); + double out = astDistance(newast_,pt0,pt1); + astInvert(newast_); return out; } |