From f95dcfdc178c324c8b92e257a9001240c4d15cda Mon Sep 17 00:00:00 2001 From: William Joye Date: Fri, 3 Mar 2017 13:25:17 -0500 Subject: No longer use DATE or EPOCH to determine date of observation if MJD-OBS or DATE-OBS is not present --- ds9/doc/release/r7.0.html | 2 ++ tksao/frame/fitsimage.C | 6 ++++-- 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 @@
  • 02.04.2017 WINDOWS: complete new distribution package.
  • 02.06.2017 WINDOWS: enabled pthreads suppport.
  • 02.07.2017 TCLIIS: added support for windows WINSOCK2.
  • +
  • 03.03.2017 WCS: fixed a problem with position angle of regions in case of WCS linear.
  • +
  • 03.03.2017 WCS: No longer use DATE or EPOCH to determine date of observation if MJD-OBS or DATE-OBS is not present.
  • xx.xx.2017 RELEASE version 7.6b1
  • 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; -- cgit v0.12