Commit b54b46450a031eb02ecb78183ebf4ac254e0f6d0
1 parent
e2f6c0c0
Write ALT_PNT and AZ_PNT attributes to CTA event file or counts cube headers.
Showing
3 changed files
with
13 additions
and
5 deletions
ChangeLog
| 1 | -2014-07-22 Juergen Knoedlseder <jurgen.knodlseder@irap.omp.eu> | |
| 1 | +2014-07-29 Juergen Knoedlseder <jurgen.knodlseder@irap.omp.eu> | |
| 2 | 2 | |
| 3 | 3 | * Version 0.9.0 released |
| 4 | 4 | ======================== |
| ... | ... | @@ -11,6 +11,7 @@ |
| 11 | 11 | Add GCTAExposure and GCTAMeanPsf classes |
| 12 | 12 | Add ts attribute to GModel and use it in GModelSky models |
| 13 | 13 | Add manipulation methods to GCTAResponseTable |
| 14 | + Read/write altitude and azimuth attributes of CTA data | |
| 14 | 15 | Refactor CTA response class, add GCTAResponseCube class |
| 15 | 16 | Implement CTA cube-style analysis |
| 16 | 17 | Optimize CTA binned and cube-style analysis | ... | ... |
NEWS
| ... | ... | @@ -2,7 +2,7 @@ New Features and Important Changes in GammaLib 00-09-00 |
| 2 | 2 | |
| 3 | 3 | Author(s) : Juergen Knoedlseder |
| 4 | 4 | |
| 5 | -22 July 2014 | |
| 5 | +29 July 2014 | |
| 6 | 6 | |
| 7 | 7 | |
| 8 | 8 | 1. Introduction |
| ... | ... | @@ -238,6 +238,11 @@ actually used to define class codes for GCTASourceCube so that dynamic type |
| 238 | 238 | casting can be avoided. Dynamic type casting is time consuming, and to speed-up |
| 239 | 239 | response computation, using class codes is more efficient. |
| 240 | 240 | |
| 241 | +The ALT_PNT and AZ_PNT attributes are now read from CTA data and used to set the | |
| 242 | +zenith and azimuth angles in the GCTAPointing structure. As well, the information | |
| 243 | +in GCTAPointing is now used to set the ALT_PNT and AZ_PNT attributes upon writing | |
| 244 | +a dataset. | |
| 245 | + | |
| 241 | 246 | |
| 242 | 247 | 21. COMPTEL interface |
| 243 | 248 | --------------------- | ... | ... |
inst/cta/src/GCTAObservation.cpp
| ... | ... | @@ -973,7 +973,7 @@ void GCTAObservation::read_attributes(const GFitsHDU& hdu) |
| 973 | 973 | GSkyDir pnt; |
| 974 | 974 | pnt.radec_deg(ra_pnt, dec_pnt); |
| 975 | 975 | m_pointing.dir(pnt); |
| 976 | - m_pointing.zenith(90.-alt); | |
| 976 | + m_pointing.zenith(90.0-alt); | |
| 977 | 977 | m_pointing.azimuth(az); |
| 978 | 978 | |
| 979 | 979 | // Return |
| ... | ... | @@ -994,6 +994,8 @@ void GCTAObservation::write_attributes(GFitsHDU& hdu) const |
| 994 | 994 | // Compute some attributes |
| 995 | 995 | double ra_pnt = m_pointing.dir().ra_deg(); |
| 996 | 996 | double dec_pnt = m_pointing.dir().dec_deg(); |
| 997 | + double alt = 90.0 - m_pointing.zenith(); | |
| 998 | + double az = m_pointing.azimuth(); | |
| 997 | 999 | double tstart = events()->tstart().convert(timeref); |
| 998 | 1000 | double tstop = events()->tstop().convert(timeref); |
| 999 | 1001 | double telapse = events()->gti().telapse(); |
| ... | ... | @@ -1025,8 +1027,8 @@ void GCTAObservation::write_attributes(GFitsHDU& hdu) const |
| 1025 | 1027 | hdu.card("DEC_OBJ", dec_obj(), "[deg] Target Declination"); |
| 1026 | 1028 | hdu.card("RA_PNT", ra_pnt, "[deg] Pointing Right Ascension"); |
| 1027 | 1029 | hdu.card("DEC_PNT", dec_pnt, "[deg] Pointing Declination"); |
| 1028 | - hdu.card("ALT_PNT", 0.0, "[deg] Average altitude of pointing"); | |
| 1029 | - hdu.card("AZ_PNT", 0.0, "[deg] Average azimuth of pointing"); | |
| 1030 | + hdu.card("ALT_PNT", alt, "[deg] Average altitude of pointing"); | |
| 1031 | + hdu.card("AZ_PNT", az, "[deg] Average azimuth of pointing"); | |
| 1030 | 1032 | hdu.card("RADECSYS", "FK5", "Coordinate system"); |
| 1031 | 1033 | hdu.card("EQUINOX", 2000.0, "Epoch"); |
| 1032 | 1034 | hdu.card("CONV_DEP", 0.0, "Convergence depth of telescopes"); | ... | ... |