5.13. sac_util¶
Part of the EQcorrscan package: tools to convert SAC headers to obspy event objects.
Note
This functionality is not supported for obspy versions below 1.0.0 as references times are not read in by SACIO, which are needed for defining pick times.
copyright: | Calum Chamberlain, Chet Hopp. |
---|---|
license: | GNU Lesser General Public License, Version 3 (https://www.gnu.org/copyleft/lesser.html) |
-
sac_util.
sactoevent
(st, debug=0)[source]¶ Function to convert SAC headers (picks only) to obspy event class. Picks are taken from header values a, t[0-9].
Parameters: st (obspy.core.Stream) – Stream of waveforms including SAC headers. Pram debug: Debug level, larger number = more output. Returns: obspy.core.Event Note
This functionality is not supported for obspy versions below 1.0.0 as references times are not read in by SACIO, which are needed for defining pick times.
Note
Takes the event origin information from the first trace in the stream - to ensure this works as you expect, please populate the evla, evlo, evdp and nzyear, nzjday, nzhour, nzmin, nzsec, nzmsec for all traces with the same values.