[obspy-users] sac B and E values

andrealphus andrealphus at gmail.com
Wed Mar 1 21:22:01 CET 2017


Anyone know a quick and dirty way to time shift sac B and E values? I need
to take data that currently ranges from 0:T and change the header so that
it reflects data ranging from -T/2:+T/2

Unfortunatly,

trace=obspy.read(file)[0]
mid=(trace.stats.sac.e-trace.stats.sac.b)//2
trace.stats.sac.b=-mid
trace.stats.sac.e=mid
trace.write(file,format="SAC")

doesnt work, as it looks like trace.write calculates the B and E values??

suggestions? (besides doing it in sac with cuterr and fillz)

thanks!
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.swapbytes.de/pipermail/obspy-users/attachments/20170301/29004221/attachment.html>


More information about the obspy-users mailing list