obspy.io.sac.sactrace.SACTrace.reftime

property SACTrace.reftime

Get or set the SAC header reference time as a UTCDateTime instance.

reftime is not an attribute, but is constructed and dismantled each time directly to/from the SAC “nz”-time fields.

Setting a new reftime shifts all non-null relative time headers accordingly. It accepts a UTCDateTime object, from which time shifts are calculated.

..rubric:: notes

The reftime you supply will be robbed of its remainder microseconds, which are then pushed into the relative time header shifts. This means that the reftime you observe after you set it here may not exactly match the reftime you supplied; it may be remainder microseconds earlier. Nor will the iztype reference header value be exactly zero; it will be equal to remainder microseconds (as seconds).