Hello guys,
I need some help on the relation between the header variables 'starttime' and 'nztime/kztime' (SAC)
kztime/nztime is the SAC header variable for 'reference time', i.e. an absolute time value, all other time values in the header (b for begin of file, e for end of file, o for event origin time etc etc) are then given relative to it in seconds. When writing a SAC file from a MiniSEED (via read and Trace.write), it seems that the 'starttime' value of the MiniSEED header is set as kztime, b then is 0 and e is npts*delta... My problem now is that I have different files for the same event (different stations), each centered around a predicted phase arrival --> different starting times for all the files. But I have a program that requires the same kztime header values in the SAC file for all traces belonging to the same event.
What I now did is the following: I first wrote the SAC files, then accessed their headers and set starttime to the event's origin time and changed the other timing variables accordingly. Result: when looking at the file headers, 'starttime' is now uniform But: my program still reports different kztime values for my files
So...questions: - can I in some way directly access kztime and nztime? (when I look at trace.stats I only see 'starttime', which seems to be derived from it) - could it be that when I change the 'starttime' header entry and write the file again, this only affects nztime (integer format) and not kztime (alphanumeric)?
Thanks in advance for any advice, Christian
该提问来源于开源项目:obspy/obspy