diff options
author | William Joye <wjoye@cfa.harvard.edu> | 2018-09-24 15:39:06 (GMT) |
---|---|---|
committer | William Joye <wjoye@cfa.harvard.edu> | 2018-09-24 15:39:06 (GMT) |
commit | ddf4f1207d7a299ba642f5226b90e168fa0628b4 (patch) | |
tree | d419c42d34f737cce18bf80dc4868dfd1987a908 /tksao | |
parent | d331c7c46a40ab9e2d85358b3e7cf416dfe8b258 (diff) | |
download | blt-ddf4f1207d7a299ba642f5226b90e168fa0628b4.zip blt-ddf4f1207d7a299ba642f5226b90e168fa0628b4.tar.gz blt-ddf4f1207d7a299ba642f5226b90e168fa0628b4.tar.bz2 |
BIN: use old style Einstein WCS keywords if present
Diffstat (limited to 'tksao')
-rw-r--r-- | tksao/fitsy++/hist.C | 63 |
1 files changed, 63 insertions, 0 deletions
diff --git a/tksao/fitsy++/hist.C b/tksao/fitsy++/hist.C index 39a1d16..c9eec73 100644 --- a/tksao/fitsy++/hist.C +++ b/tksao/fitsy++/hist.C @@ -633,6 +633,69 @@ void FitsHist::initWCS(FitsFile* fits, Matrix& mm, Vector block) if (!head_->find("RADESYS")) mapWCSString(srcHead, w, "RADESYS", "RADE"); } + + // and finally, check for old Einstein type WCS + char key[8]; + + // CTYPEx + strcpy(key,"CTYPE1"); + if (srcHead->find(key)) { + char* str = srcHead->getString(key); + head_->appendString(key, str, NULL); + } + strcpy(key,"CTYPE2"); + if (srcHead->find(key)) { + char* str = srcHead->getString(key); + head_->appendString(key, str, NULL); + } + + // CRVALx + strcpy(key,"CRVAL1"); + if (srcHead->find(key)) { + float cc = srcHead->getReal(key, 0); + head_->appendReal(key, cc, 10, NULL); + } + strcpy(key,key); + if (srcHead->find(key)) { + float cc = srcHead->getReal(key, 0); + head_->appendReal(key, cc, 10, NULL); + } + + //CRPIXx + strcpy(key,"CRPIX1"); + if (srcHead->find(key)) { + float cc = srcHead->getReal(key, 0); + head_->appendReal(key, cc, 10, NULL); + } + strcpy(key,"CRPIX2"); + if (srcHead->find(key)) { + float cc = srcHead->getReal(key, 0); + head_->appendReal(key, cc, 10, NULL); + } + + // CDELTx + strcpy(key,"CDELT1"); + if (srcHead->find(key)) { + float cc = srcHead->getReal(key, 0); + head_->appendReal(key, cc, 10, NULL); + } + strcpy(key,"CDELT2"); + if (srcHead->find(key)) { + float cc = srcHead->getReal(key, 0); + head_->appendReal(key, cc, 10, NULL); + } + + // CROTAx + strcpy(key,"CROTA1"); + if (srcHead->find(key)) { + float cc = srcHead->getReal(key, 0); + head_->appendReal(key, cc, 10, NULL); + } + strcpy(key,"CROTA2"); + if (srcHead->find(key)) { + float cc = srcHead->getReal(key, 0); + head_->appendReal(key, cc, 10, NULL); + } } FitsHistNext::FitsHistNext(FitsFile* prev) |