Here, self.utcs is an array of type 'datetime64[ms]', and offset is an array of floating point numbers giving seconds, which requires a conversion to a time delta. However, the conversion to 'timedelta64[s]' strips of the fraction of seconds. In order to stay at the same precision level, the conversion to a time delta should be changed to (1000*offsets).astype('timedelta64[ms]').
The following lines introduce a larger rounding error than necessary: https://github.com/pytroll/pygac/blob/5c59f2be9437ad7bfc0005038f45f8416d10828d/pygac/pod_reader.py#L436-L437
Here,
self.utcs
is an array of type'datetime64[ms]'
, and offset is an array of floating point numbers giving seconds, which requires a conversion to a time delta. However, the conversion to'timedelta64[s]'
strips of the fraction of seconds. In order to stay at the same precision level, the conversion to a time delta should be changed to(1000*offsets).astype('timedelta64[ms]')
.