summaryrefslogtreecommitdiffstats
path: root/tksao
diff options
context:
space:
mode:
Diffstat (limited to 'tksao')
-rw-r--r--tksao/frame/grid25d.C11
-rw-r--r--tksao/frame/grid2d.C10
-rw-r--r--tksao/frame/grid3d.C10
3 files changed, 15 insertions, 16 deletions
diff --git a/tksao/frame/grid25d.C b/tksao/frame/grid25d.C
index 3268eba..fbf0f28 100644
--- a/tksao/frame/grid25d.C
+++ b/tksao/frame/grid25d.C
@@ -36,11 +36,6 @@ int Grid25d::doit(RenderMode rm)
if (!fits)
return 1;
-#ifdef NEWWCS
- if (!fits->astInv())
- return 1;
-#endif
-
astClearStatus; // just to make sure
astBegin; // start memory management
@@ -62,12 +57,16 @@ int Grid25d::doit(RenderMode rm)
break;
default:
{
-
// set desired skyformat
#ifndef NEWWCS
AstFrameSet* ast = (AstFrameSet*)astCopy(fits->getAST(system_));
fits->setWCSSkyFrame(ast, sky_);
#else
+ if (!fits->astInv()) {
+ astEnd; // now, clean up memory
+ return 1;
+ }
+
fits->setWCSSkyFrame(system_, sky_);
AstFrameSet* ast = fits->wcsCopy();
diff --git a/tksao/frame/grid2d.C b/tksao/frame/grid2d.C
index 26c89d6..f89917f 100644
--- a/tksao/frame/grid2d.C
+++ b/tksao/frame/grid2d.C
@@ -36,11 +36,6 @@ int Grid2d::doit(RenderMode rm)
if (!fits)
return 1;
-#ifdef NEWWCS
- if (!fits->astInv())
- return 1;
-#endif
-
astClearStatus; // just to make sure
astBegin; // start memory management
@@ -68,6 +63,11 @@ int Grid2d::doit(RenderMode rm)
AstFrameSet* ast = (AstFrameSet*)astCopy(fits->getAST(system_));
fits->setWCSSkyFrame(ast, sky_);
#else
+ if (!fits->astInv()) {
+ astEnd; // now, clean up memory
+ return 1;
+ }
+
fits->setWCSSkyFrame(system_, sky_);
AstFrameSet* ast = fits->wcsCopy();
diff --git a/tksao/frame/grid3d.C b/tksao/frame/grid3d.C
index 72342c8..8db3f09 100644
--- a/tksao/frame/grid3d.C
+++ b/tksao/frame/grid3d.C
@@ -66,11 +66,6 @@ int Grid3d::doit(RenderMode rm)
if (!fits)
return 1;
-#ifdef NEWWCS
- if (!fits->astInv())
- return 1;
-#endif
-
astClearStatus; // just to make sure
astBegin; // start memory management
@@ -113,6 +108,11 @@ int Grid3d::doit(RenderMode rm)
ast = astFrameSet(cmpwcsbase,"");
astAddFrame(ast, AST__CURRENT, cmpwcsmap, cmpwcscurr);
#else
+ if (!fits->astInv()) {
+ astEnd; // now, clean up memory
+ return 1;
+ }
+
fits->setWCSSkyFrame(system_, sky_);
AstFrameSet* ast = fits->wcsCopy();