diff --git a/ChangeLog b/ChangeLog index c7596a2..86f164c 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,4 +1,4 @@ -2014-07-22 Juergen Knoedlseder +2014-07-29 Juergen Knoedlseder * Version 0.9.0 released ======================== @@ -11,6 +11,7 @@ Add GCTAExposure and GCTAMeanPsf classes Add ts attribute to GModel and use it in GModelSky models Add manipulation methods to GCTAResponseTable + Read/write altitude and azimuth attributes of CTA data Refactor CTA response class, add GCTAResponseCube class Implement CTA cube-style analysis Optimize CTA binned and cube-style analysis diff --git a/NEWS b/NEWS index 1bfaeca..49fa928 100644 --- a/NEWS +++ b/NEWS @@ -2,7 +2,7 @@ New Features and Important Changes in GammaLib 00-09-00 Author(s) : Juergen Knoedlseder -22 July 2014 +29 July 2014 1. Introduction @@ -238,6 +238,11 @@ actually used to define class codes for GCTASourceCube so that dynamic type casting can be avoided. Dynamic type casting is time consuming, and to speed-up response computation, using class codes is more efficient. +The ALT_PNT and AZ_PNT attributes are now read from CTA data and used to set the +zenith and azimuth angles in the GCTAPointing structure. As well, the information +in GCTAPointing is now used to set the ALT_PNT and AZ_PNT attributes upon writing +a dataset. + 21. COMPTEL interface --------------------- diff --git a/inst/cta/src/GCTAObservation.cpp b/inst/cta/src/GCTAObservation.cpp index 716ccca..88a75c6 100644 --- a/inst/cta/src/GCTAObservation.cpp +++ b/inst/cta/src/GCTAObservation.cpp @@ -973,7 +973,7 @@ void GCTAObservation::read_attributes(const GFitsHDU& hdu) GSkyDir pnt; pnt.radec_deg(ra_pnt, dec_pnt); m_pointing.dir(pnt); - m_pointing.zenith(90.-alt); + m_pointing.zenith(90.0-alt); m_pointing.azimuth(az); // Return @@ -994,6 +994,8 @@ void GCTAObservation::write_attributes(GFitsHDU& hdu) const // Compute some attributes double ra_pnt = m_pointing.dir().ra_deg(); double dec_pnt = m_pointing.dir().dec_deg(); + double alt = 90.0 - m_pointing.zenith(); + double az = m_pointing.azimuth(); double tstart = events()->tstart().convert(timeref); double tstop = events()->tstop().convert(timeref); double telapse = events()->gti().telapse(); @@ -1025,8 +1027,8 @@ void GCTAObservation::write_attributes(GFitsHDU& hdu) const hdu.card("DEC_OBJ", dec_obj(), "[deg] Target Declination"); hdu.card("RA_PNT", ra_pnt, "[deg] Pointing Right Ascension"); hdu.card("DEC_PNT", dec_pnt, "[deg] Pointing Declination"); - hdu.card("ALT_PNT", 0.0, "[deg] Average altitude of pointing"); - hdu.card("AZ_PNT", 0.0, "[deg] Average azimuth of pointing"); + hdu.card("ALT_PNT", alt, "[deg] Average altitude of pointing"); + hdu.card("AZ_PNT", az, "[deg] Average azimuth of pointing"); hdu.card("RADECSYS", "FK5", "Coordinate system"); hdu.card("EQUINOX", 2000.0, "Epoch"); hdu.card("CONV_DEP", 0.0, "Convergence depth of telescopes");