summaryrefslogtreecommitdiffstats
path: root/tksao/frame
diff options
context:
space:
mode:
authorWilliam Joye <wjoye@cfa.harvard.edu>2017-09-06 18:16:58 (GMT)
committerWilliam Joye <wjoye@cfa.harvard.edu>2017-09-06 18:16:58 (GMT)
commit7b9cd64ed086d32461b379ee50e37b1de0e81492 (patch)
tree289ff7c3bc88d30818db27c72e2d849311b63cc6 /tksao/frame
parent7f667e7d34054d73211887849f5569f97b6f736b (diff)
downloadblt-7b9cd64ed086d32461b379ee50e37b1de0e81492.zip
blt-7b9cd64ed086d32461b379ee50e37b1de0e81492.tar.gz
blt-7b9cd64ed086d32461b379ee50e37b1de0e81492.tar.bz2
new AST support
Diffstat (limited to 'tksao/frame')
-rw-r--r--tksao/frame/fitsimage.C27
-rw-r--r--tksao/frame/fitsimage.h2
2 files changed, 29 insertions, 0 deletions
diff --git a/tksao/frame/fitsimage.C b/tksao/frame/fitsimage.C
index 36dbe1a..005ad75 100644
--- a/tksao/frame/fitsimage.C
+++ b/tksao/frame/fitsimage.C
@@ -1099,7 +1099,9 @@ void FitsImage::initWCS()
for (int ii=0; ii<MULTWCSA; ii++)
ast_[ii] = ptr->ast_[ii];
+#ifndef NEWWCS
initWCSPhysical();
+#endif
manageWCS_ =0;
return;
}
@@ -1235,7 +1237,9 @@ void FitsImage::initWCS()
}
}
+#ifndef NEWWCS
initWCSPhysical();
+#endif
if (DebugWCS) {
for (int ii=0; ii<MULTWCS; ii++) {
@@ -1258,6 +1262,7 @@ void FitsImage::initWCS()
}
}
+#ifndef NEWWCS
void FitsImage::initWCSPhysical()
{
// now see if we have a 'physical' wcs, if so, set LTMV keywords
@@ -1283,6 +1288,7 @@ void FitsImage::initWCSPhysical()
}
}
}
+#endif
void FitsImage::initWCS0(const Vector& pix)
{
@@ -3289,6 +3295,7 @@ int FitsImage::hasWCS(Coord::CoordSystem sys)
return (sys>=Coord::WCS && ast_ && ast_[ii]) ? 1 : 0;
}
+#ifndef NEWWCS
int FitsImage::hasWCSEqu(Coord::CoordSystem sys)
{
astClearStatus;
@@ -3320,6 +3327,26 @@ int FitsImage::hasWCSEqu(Coord::CoordSystem sys)
return 0;
}
+#else
+int FitsImage::hasWCSEqu(Coord::CoordSystem sys)
+{
+ astClearStatus;
+
+ int ii = sys-Coord::WCS;
+ if (ii>=0 && ast_ && ast_[ii])
+ if (astIsASkyFrame(astGetFrame(ast_[ii], AST__CURRENT))) {
+ // check for xLON/xLAT and xxLN/xxLT
+ // but GLON/GLAT is ok
+ const char* str = astGetC(ast_[ii], "System");
+ if (!strncmp(str,"Unknown",7))
+ return 0;
+ return 1;
+ }
+
+ return 0;
+}
+
+#endif
int FitsImage::hasWCSCel(Coord::CoordSystem sys)
{
diff --git a/tksao/frame/fitsimage.h b/tksao/frame/fitsimage.h
index 3122f46..3a6e902 100644
--- a/tksao/frame/fitsimage.h
+++ b/tksao/frame/fitsimage.h
@@ -129,7 +129,9 @@ class FitsImage {
void initBin();
void initHPX();
void initWCS();
+#ifndef NEWWCS
void initWCSPhysical();
+#endif
Vector getHistCenter();
char* root(const char*);