Seismic Data Processing in Python
Contents
1 Obtaining Seismic Data Using Obspy
1.1 Basic usage
|
|
You can set attach_response
as True
if you want to
download instrument response. However, the internet service may
go wrong when you download data of many stations. Fortunately,
python offers us the exception handling to deal with this situation.
For instance, the following python codes give you a very simple
example to fix it.
1.2 Fix internet service issue
|
|
1.3 Seismic data management center
Change the data center code if you want to download data from other organizations. These centers are
|
|
Codes of data service centers
:
|
|
1.4 Other data center(s)
However, seismic data in Australian seismic network are not included in the above data centers,
and here we show you to retrieve seismic data from AusPass.
|
|
1.5 Active source data PH5
For controlled (active) source seismic experiment data, you can request from PH5WS. Here we show you how to obtain active source seismic data using Obspy. For more details, you can find them from https://github.com/PIC-IRIS/PH5/wiki/PH5-Web-Services-Shot-Gather.
|
|
1.6 The Swiss Seismological Service (SED)
Using standard FDSN web service for the SED, we can directly download seismic data from the data center SED
. For example, we download whole-day BHZ
seismic data recorded by the station ACB
of network CH
:
|
|
The wildcard *
, of course, can be supported by this style, and here we retrieve whole-day BHZ
seismic data recorded by all stations of the network CH
:
|
|
2 Remove Instrument Response
stream ( or trace).remove_response(pre_filt=[f1, f2, f3, f4], output='DISP')
The parameter output
defines the output physical quantity.
DISP
: displacement in meters;
VEL
: velocity in meters per second;
ACC
: acceleration in meters per squared seconds.
You can set the 4 corner frequencies in parameter pre_filt
if you want to
do pre-filtering on your data, but be careful when you choose frequencies that
are not over Nyquist frequency.
3 Get Information about Stations
|
|
The parameter level
defines what kind of returning information.
network
: network code;
station
: station code;
channel
: channel code;
response
: instrument response.
Usually, we set level
as response
to download instrument response
for the later data processing.
4 Solution to Empty sac attribution of SAC
This problem caused by that there is no attribution in trace.stats
.
You can use AttribDict
to add the sac
field to trace.stats
.
Here, we suppose that you have a trace (abbreviated to tr
).
|
|
5 Calculating the distance between given two points
Supposing that you’ve installed the package geopy
in your python.
|
|
Bibliography
Author Geophydog
LastMod 2020-09-19