summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorWilliam Joye <wjoye@cfa.harvard.edu>2017-10-18 19:46:54 (GMT)
committerWilliam Joye <wjoye@cfa.harvard.edu>2017-10-18 19:46:54 (GMT)
commitf03af1feeb3c57cc7d17c5d983e623f0d3b8d6d2 (patch)
tree6d258cf3001b2ea57207dc279d114d6d75e461a5
parent206af4e225fe64489f3724d07af469ad91603e35 (diff)
downloadblt-f03af1feeb3c57cc7d17c5d983e623f0d3b8d6d2.zip
blt-f03af1feeb3c57cc7d17c5d983e623f0d3b8d6d2.tar.gz
blt-f03af1feeb3c57cc7d17c5d983e623f0d3b8d6d2.tar.bz2
update to new AST WCS
-rw-r--r--tksao/frame/grid25d.C20
-rw-r--r--tksao/frame/grid2d.C14
-rw-r--r--tksao/frame/grid3d.C22
3 files changed, 28 insertions, 28 deletions
diff --git a/tksao/frame/grid25d.C b/tksao/frame/grid25d.C
index 4044989..6cec692 100644
--- a/tksao/frame/grid25d.C
+++ b/tksao/frame/grid25d.C
@@ -66,29 +66,29 @@ int Grid25d::doit(RenderMode rm)
AstFrame *df = astFrame(2, "Domain=DATA");
// Get 2D SkyFrame
- AstFrameSet* wcs = (AstFrameSet*)astCopy(fits->getAST(system_));
- if (fits->astWCSIsASkyFrame(astGetFrame(wcs, AST__CURRENT)))
- fits->setAstWCSSkyFrame(wcs, sky_);
- // astShow(wcs);
+ AstFrameSet* ast = (AstFrameSet*)astCopy(fits->getAST(system_));
+ if (fits->astWCSIsASkyFrame(astGetFrame(ast, AST__CURRENT)))
+ fits->setAstWCSSkyFrame(ast, sky_);
+ // astShow(ast);
// Record the index of the current Frame
- int isky = astGetI(wcs, "Current");
+ int isky = astGetI(ast, "Current");
// Add the new DATA Frame into the FrameSet, using the ShiftMap to
// connect it to the existing IMAGE Frame.
- astAddFrame(wcs, AST__BASE, sm, df);
+ astAddFrame(ast, AST__BASE, sm, df);
// The above call to astAddFrame will have changed the current Frame
// in the FrameSet to be the new DATA Frame. First record the index of
// the DATA Frame, and then re-instate the original current Frame (i.e.
// the SKY Frame).
- int idata = astGetI(wcs, "Current");
- astSetI(wcs, "Current", isky);
+ int idata = astGetI(ast, "Current");
+ astSetI(ast, "Current", isky);
// make the DATA Frame the new base Frame
- astSetI(wcs, "Base", idata);
+ astSetI(ast, "Base", idata);
- frameSet = wcs;
+ frameSet = ast;
}
}
diff --git a/tksao/frame/grid2d.C b/tksao/frame/grid2d.C
index 95a6b49..bc4925a 100644
--- a/tksao/frame/grid2d.C
+++ b/tksao/frame/grid2d.C
@@ -68,25 +68,25 @@ int Grid2d::doit(RenderMode rm)
break;
default:
{
- AstFrameSet* wcsfs = (AstFrameSet*)astCopy(fits->getAST(system_));
+ AstFrameSet* ast = (AstFrameSet*)astCopy(fits->getAST(system_));
#ifndef NEWWCS
// set desired skyformat
- if (fits->astWCSIsASkyFrame(astGetFrame(wcsfs, AST__CURRENT)))
- fits->setAstWCSSkyFrame(wcsfs, sky_);
+ if (fits->astWCSIsASkyFrame(astGetFrame(ast, AST__CURRENT)))
+ fits->setAstWCSSkyFrame(ast, sky_);
// add wcs to frameset
// this will link frame 2 of frameset to frame 3 wcs with unitMap
// set the current of frameset to last
- astInvert(wcsfs);
- astAddFrame(frameSet,2,astUnitMap(2,""),wcsfs);
+ astInvert(ast);
+ astAddFrame(frameSet,2,astUnitMap(2,""),ast);
astSetI(frameSet,"current",astGetI(frameSet,"nframe"));
#else
// add wcs to frameset
// this will link frameset to wcs with unitMap
- astInvert(wcsfs);
- astAddFrame(frameSet,2,astUnitMap(2,""),wcsfs);
+ astInvert(ast);
+ astAddFrame(frameSet,2,astUnitMap(2,""),ast);
fits->setAstWCSSystem(frameSet,system_);
fits->setAstWCSSkyFrame(frameSet,sky_);
#endif
diff --git a/tksao/frame/grid3d.C b/tksao/frame/grid3d.C
index 3edfc1f..d3f83ba 100644
--- a/tksao/frame/grid3d.C
+++ b/tksao/frame/grid3d.C
@@ -99,26 +99,26 @@ int Grid3d::doit(RenderMode rm)
AstFrame *df = astFrame(2, "Domain=DATA");
// Get 2D SkyFrame
- AstFrameSet* wcs = (AstFrameSet*)astCopy(fits->getAST(system_));
- if (fits->astWCSIsASkyFrame(astGetFrame(wcs, AST__CURRENT)))
- fits->setAstWCSSkyFrame(wcs, sky_);
+ AstFrameSet* ast = (AstFrameSet*)astCopy(fits->getAST(system_));
+ if (fits->astWCSIsASkyFrame(astGetFrame(ast, AST__CURRENT)))
+ fits->setAstWCSSkyFrame(ast, sky_);
// Record the index of the current Frame
- int isky = astGetI(wcs, "Current");
+ int isky = astGetI(ast, "Current");
// Add the new DATA Frame into the FrameSet, using the ShiftMap to
// connect it to the existing IMAGE Frame.
- astAddFrame(wcs, AST__BASE, sm, df);
+ astAddFrame(ast, AST__BASE, sm, df);
// The above call to astAddFrame will have changed the current Frame
// in the FrameSet to be the new DATA Frame. First record the index of
// the DATA Frame, and then re-instate the original current Frame (i.e.
// the SKY Frame).
- int idata = astGetI(wcs, "Current");
- astSetI(wcs, "Current", isky);
+ int idata = astGetI(ast, "Current");
+ astSetI(ast, "Current", isky);
// make the DATA Frame the new base Frame
- astSetI(wcs, "Base", idata);
+ astSetI(ast, "Base", idata);
// Create two 1D Frames and a 1D Mapping describing the third axis
AstFrame* zbase = astFrame(1,"");
@@ -134,9 +134,9 @@ int Grid3d::doit(RenderMode rm)
// Use astGetFrame and astGetMapping to get the base and current
// Frames from the 2D FrameSet, and the base->current Mapping.
- AstFrame* wcsbase = (AstFrame*)astGetFrame(wcs,AST__BASE);
- AstFrame* wcscurr = (AstFrame*)astGetFrame(wcs,AST__CURRENT);
- AstMapping* wcsmap = (AstMapping*)astGetMapping(wcs,AST__BASE,AST__CURRENT);
+ AstFrame* wcsbase = (AstFrame*)astGetFrame(ast,AST__BASE);
+ AstFrame* wcscurr = (AstFrame*)astGetFrame(ast,AST__CURRENT);
+ AstMapping* wcsmap = (AstMapping*)astGetMapping(ast,AST__BASE,AST__CURRENT);
// Combine the 2D and 1D base Frames into a 3D CmpFrame
// Likewise, combine the 2D and 1D current Frames into a 3D CmpFrame
AstCmpFrame* cmpwcsbase = astCmpFrame(wcsbase,zbase,"");