Commit 505845455556a74bb39dcf1704f88aaf015b31b5

Authored by Jürgen Knödlseder
1 parent c18ea7b0

Retrieve times in UTC

modules/comscripts/compulbin.py
... ... @@ -260,12 +260,17 @@ class compulbin(ctools.csobservation):
260 260 num_arm_too_large += 1
261 261 continue
262 262  
263   - # Convert event time to Solar System Barycentre time
  263 + # Convert event time to Solar System Barycentre time. Note
  264 + # that the time correction includes an UTC_TO_TT conversion
  265 + # term, but this terms has already applied when setting the
  266 + # GTime object. Hence if time is read as time.mjd() the
  267 + # correction would be applied twice, yet reading the time as
  268 + # time.mjd('UTC') will remove the correation again.
264 269 tdelta = obs.bvcs().tdelta(ephemeris.dir(), event.time())
265 270 time = event.time() + tdelta
266 271  
267 272 # Compute pulsar phase
268   - phase = ephemeris.phase(time)
  273 + phase = ephemeris.phase(time, 'UTC')
269 274  
270 275 # Fill event in phase bin
271 276 ibin = int(phase / self._phasebin)
... ...