summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorWilliam Joye <wjoye@cfa.harvard.edu>2017-03-03 18:25:17 (GMT)
committerWilliam Joye <wjoye@cfa.harvard.edu>2017-03-03 18:25:17 (GMT)
commitf95dcfdc178c324c8b92e257a9001240c4d15cda (patch)
tree52e9b5bfb872bfbb4f3c80b2ce2b7ea95281c91c
parent57b2b895c60eae69eb3b47e4dffcf4a2d67dbb3d (diff)
downloadblt-f95dcfdc178c324c8b92e257a9001240c4d15cda.zip
blt-f95dcfdc178c324c8b92e257a9001240c4d15cda.tar.gz
blt-f95dcfdc178c324c8b92e257a9001240c4d15cda.tar.bz2
No longer use DATE or EPOCH to determine date of observation if MJD-OBS or DATE-OBS is not present
-rw-r--r--ds9/doc/release/r7.0.html2
-rw-r--r--tksao/frame/fitsimage.C6
2 files changed, 6 insertions, 2 deletions
diff --git a/ds9/doc/release/r7.0.html b/ds9/doc/release/r7.0.html
index d3c7bde..eb408d7 100644
--- a/ds9/doc/release/r7.0.html
+++ b/ds9/doc/release/r7.0.html
@@ -769,6 +769,8 @@
<li><tt>02.04.2017 WINDOWS: complete new distribution package.</tt></li>
<li><tt>02.06.2017 WINDOWS: enabled pthreads suppport.</tt></li>
<li><tt>02.07.2017 TCLIIS: added support for windows WINSOCK2.</tt></li>
+ <li><tt>03.03.2017 WCS: fixed a problem with position angle of regions in case of WCS linear.</tt></li>
+ <li><tt>03.03.2017 WCS: No longer use DATE or EPOCH to determine date of observation if MJD-OBS or DATE-OBS is not present.</tt></li>
<li><tt><b>xx.xx.2017 RELEASE version 7.6b1</b></tt></li>
</ol>
</ol>
diff --git a/tksao/frame/fitsimage.C b/tksao/frame/fitsimage.C
index 4e73214..213872c 100644
--- a/tksao/frame/fitsimage.C
+++ b/tksao/frame/fitsimage.C
@@ -3731,8 +3731,10 @@ void FitsImage::wcs2ast(int ww, FitsHead* hd, FitsHead* prim, void* chan)
// from wcssub/wcsinit.c line 800
// wcs[ww]->epoch = 1900.0 + (mjd - 15019.81352) / 365.242198781;
- putFitsCard(chan, "MJD-OBS",
- (wcs_[ww]->epoch-1900)*365.242198781+15019.81352);
+ // only set if MJD-OBS or DATE-OBS is present
+ if (hd->find("MJD-OBS") || hd->find("DATE-OBS"))
+ putFitsCard(chan, "MJD-OBS",
+ (wcs_[ww]->epoch-1900)*365.242198781+15019.81352);
ostringstream radesys;
radesys << "RADESYS" << alt << ends;