Q330S' mseed

Hi Mohamed,

please post further questions on the users mailing list (see our
homepage), we need to rely on the community helping itself and other
people might be interested in the answers or already had the same
problem. And please also work your way through the Tutorial, there is a
lot that can help (also for your question).

The answer depends a lot on how you want your time information to look like.

With savetxt you have to put the time information in one array together
with the data, e.g.

t1 = tr.stats.starttime.getTimeStamp()
t2 = (tr.stats.endtime + tr.stats.delta).getTimeStamp()
times = np.arange(t1, t2, tr.stats.delta)
mydata = np.vstack((times, tr.data)).T
np.savetxt(f, mydata, fmt="%.6f %f")

I do not see the point in saving the time for every sample, though. You
can also try format "SH_ASC"

tr.write("filename", format="SH_ASC")

best,
Tobias

boubacar wrote: