SMC format in obspy

Hi,

just a quick question: what is the best way to import .smc files into obspy?
(according to http://docs.obspy.org/packages/autogen/obspy.core.stream.read.html it is not natively supported)

Hi John,

you're right, ObsPy has no support for that format (I assume it's the
one described here: http://nsmp.wr.usgs.gov/smcfmt.html?)

It seems it's a plain ascii format so reading the data should be
trivial. On the other hand the format seems to be pretty diverse
metadata wise (and various different types of data sets are described
there), so depending on how much of the metadata you want to parse it
could get a bit more time consuming to implement.

Have you got code already to read the time series of those files into
Python?

Do you plan to implement it yourself and just need help to mold it into
the ObsPy structure?

best,
Tobias

Hi Tobias,

Thanks for your answer! Yes it is the file format from the national strong motion project.

No, unfortunately I don’t have code yet but currently I don’t need the meta data so I might just try export the time series by hand for now. However, if I get motivated enough and get some useful script going I’ll definitely contact you.
I just thought I ask because there seems to be lot of data in this format out there so I thought someone might have already done the work.

Best

Dear John,

However, if I get motivated enough and get some useful script going I'll
definitely contact you.

ObsPy already supports all kind of ASCII formats - for extra motivation you may want to look into the following read methods :slight_smile:

IRIS SLIST/TSPAIR
https://github.com/obspy/obspy/blob/master/obspy/core/ascii.py

or

Seismic Handler ASCII
https://github.com/obspy/obspy/blob/master/obspy/sh/core.py#L94-L222

Cheers,
Robert