summaryrefslogtreecommitdiffstats
path: root/tksao
diff options
context:
space:
mode:
authorWilliam Joye <wjoye@cfa.harvard.edu>2019-05-10 18:34:01 (GMT)
committerWilliam Joye <wjoye@cfa.harvard.edu>2019-05-10 18:34:01 (GMT)
commit06d01d959a8c62d4781f19985e775017a9f00540 (patch)
tree94fe32a76399be787746c3c403cca2076a253e29 /tksao
parent7e6e2d4a36d4b577783a0e923c64543cc60b589f (diff)
downloadblt-06d01d959a8c62d4781f19985e775017a9f00540.zip
blt-06d01d959a8c62d4781f19985e775017a9f00540.tar.gz
blt-06d01d959a8c62d4781f19985e775017a9f00540.tar.bz2
check for AST WCS first
Diffstat (limited to 'tksao')
-rw-r--r--tksao/frame/fitsimage.C28
1 files changed, 15 insertions, 13 deletions
diff --git a/tksao/frame/fitsimage.C b/tksao/frame/fitsimage.C
index 73a9e1d..dfbcb7f 100644
--- a/tksao/frame/fitsimage.C
+++ b/tksao/frame/fitsimage.C
@@ -3105,19 +3105,21 @@ void FitsImage::scanWCS(FitsHead* hd)
astBegin;
int nframes = astGetI(ast_, "Nframe");
- // wcs_[]
- // since we have ast_
- wcs_[0] =1;
- wcsNaxes_[0] = astGetI(ast_,"Naxes");
-
- // fill out wcs_ array
- for (int kk=0; kk<nframes; kk++) {
- AstFrameSet* ff = (AstFrameSet*)astGetFrame(ast_,kk+1);
- const char* id = astGetC(ff, "Ident");
- if (id && *id) {
- int jj = (*id == ' ') ? 0 : *id-'@';
- wcs_[jj] = 1;
- wcsNaxes_[jj] = astGetI(ff,"Naxes");
+ // special case for AST native encoding
+ if (findKeyword("BEGAST_A")) {
+ wcs_[0] =1;
+ wcsNaxes_[0] = astGetI(ast_,"Naxes");
+ }
+ else {
+ // fill out wcs_ array
+ for (int kk=0; kk<nframes; kk++) {
+ AstFrameSet* ff = (AstFrameSet*)astGetFrame(ast_,kk+1);
+ const char* id = astGetC(ff, "Ident");
+ if (id && *id) {
+ int jj = (*id == ' ') ? 0 : *id-'@';
+ wcs_[jj] = 1;
+ wcsNaxes_[jj] = astGetI(ff,"Naxes");
+ }
}
}