[obspy-users] Data converters: I have my seismic data and now wish to write to SAC

Tycho Aussie tychoaussie at gmail.com
Thu Aug 15 17:42:34 CEST 2013

Hello everyone,
I've been quietly learning Python and I'm working on some data converters
that I need to use with some Russian data. The data is written in a
variation of Symmetric Research's .DAT binary format called .OUT , so it
needs converting so I can use some other tools besides waveform viewer.

I've imported the data into my Python code, and have the binary data for
all four channels (time, Z, N, E) loaded into an array. I've called in the
header information and have station names, channel names, a start time, a
verified sample rate, GPS tics, station channel gain, etcetera now
available in my program. I can probably also call up from an index the
station coordinates and embed them if necessary.

I'm at the stage where I wish to roll all these arrays, calculated
variables, and dictionaries into a series of SAC files. What I haven't
found within the ObsPy documentation is how to go about creating a new SAC
file when one hasn't yet been read. There's plenty of information on how to
read a pre-existing sac file, and how to write it out again, but what I
need to know is how to generate one from scratch.

-- I'm stuck on this one - and hoping there's an easy method of creating
the SAC wrapper around my existing data, like, declaring some sort of
structure called SAC, and then filling it with my data fields.

Daniel Burk, Michigan State University
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.swapbytes.de/pipermail/obspy-users/attachments/20130815/79dd17b9/attachment.html>

More information about the obspy-users mailing list