summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--ds9/doc/release/r8.0.html1
-rw-r--r--tksao/fitsy++/hist.C63
2 files changed, 64 insertions, 0 deletions
diff --git a/ds9/doc/release/r8.0.html b/ds9/doc/release/r8.0.html
index e5a4b44..7aa693e 100644
--- a/ds9/doc/release/r8.0.html
+++ b/ds9/doc/release/r8.0.html
@@ -80,6 +80,7 @@ incorrectly calculating an index into the data cube.</tt></li>
<li><tt>09.21.2018 GUI: use unicode for deg symbol in infobox, previous char caused conflicts with Chinese Language.</tt></li>
<li><tt>09.21.2018 AST: updated to version 8.6.3.</tt></li>
<li><tt>09.21.2018 TKBLT: updated to version 3.2.11.</tt></li>
+<li><tt>09.24.2018 BIN: use old style Einstein WCS keywords if present.</tt></li>
<li><tt><b>09.25.2018 RELEASE version 8.0rc3</b></tt></li>
</ol>
</div>
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)