Change request #2295

Use CTA time reference in obsutils for observation creation

Added by Knödlseder Jürgen almost 7 years ago. Updated almost 7 years ago.

Status:ClosedStart date:01/09/2018
Priority:NormalDue date:
Assigned To:Knödlseder Jürgen% Done:

100%

Category:-
Target version:1.5.0
Duration:

Description

So far, the following code produces an observation with a reference time at the GammaLib time reference:

>>> import gammalib
>>> import ctools
>>> from cscripts import obsutils
>>> obs = obsutils.set_obs(gammalib.GSkyDir(),0.0,1800.0,1.0,1.0,100.0,5.0,'South_50h','prod2','')
>>> print(obs.gti())
=== GGti ===
 Number of intervals .......: 1
 Ontime ....................: 1800 sec
 Elapsed time ..............: 1800 sec
 MJD range .................: 55197.0007660185 - 55197.0215993519 s (TT)
 UTC range .................: 2010-01-01T00:00:00 - 2010-01-01T00:30:00 s (TT)
 Reference MJD .............: 55197.0007660185

Instead, the CTA reference time should be used.


Recurrence

No recurrence.

History

#1 Updated by Knödlseder Jürgen almost 7 years ago

  • Status changed from New to Pull request
  • % Done changed from 0 to 100

The GTI time reference is now set to the CTA time reference in GCTAEventList, GCTAEventCube and GCTACubeExposure.

Furthermore, the CTA time reference has been introduced as a constant in ctools, accessible via ctools::time_reference in C++ and ctools.time_reference under Python. The ctools::time_reference() method has been removed, the time reference is no longer a property of a ctool.

The time reference is now used in obsutils to set an observation with the CTA time reference. The above code gives now:

>>> print(obs.gti())
=== GGti ===
 Number of intervals .......: 1
 Ontime ....................: 1800 sec
 Elapsed time ..............: 1800 sec
 MJD range .................: 51544.5 - 51544.5208333333 s (TT)
 UTC range .................: 2000-01-01T11:58:56 - 2000-01-01T12:28:56 s (TT)
 Reference MJD .............: 51544.5

#2 Updated by Knödlseder Jürgen almost 7 years ago

  • Status changed from Pull request to Closed

Merged into devel.

Also available in: Atom PDF