-
Notifications
You must be signed in to change notification settings - Fork 8
Expand file tree
/
Copy pathexample.py
More file actions
27 lines (21 loc) · 1.36 KB
/
example.py
File metadata and controls
27 lines (21 loc) · 1.36 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
from obspy import UTCDateTime
from waveform_collection import gather_waveforms, gather_waveforms_bulk
# Time window of data to gather for first two examples
STARTTIME = UTCDateTime(2019, 9, 22, 6)
ENDTIME = UTCDateTime(2019, 9, 22, 6, 10)
#%% Example 1 - Gather all infrasound records from Dillingham infrasound array
st = gather_waveforms(source='IRIS', network='AV', station='DLL',
location='*', channel='*', starttime=STARTTIME,
endtime=ENDTIME)
#%% Example 2 - Gather all BHN channel seismic records from within a 200 km radius of Iliamna volcano, Alaska
st_bulk = gather_waveforms_bulk(lon_0=-153.0918, lat_0=60.0319, max_radius=200,
starttime=STARTTIME, endtime=ENDTIME,
channel='BHN', n_jobs=7)
# gather_waveforms_bulk can also be run in parallel, faster for ~>1 day of data
#%% Example 3 - Gather 10 days of 3-component seismic data from SSLS in parallel using 6 cores.
STARTTIME = UTCDateTime(2023, 9, 1)
ENDTIME = UTCDateTime(2023, 9, 11) # 10 days
# The parallel feature is best used to improve the speed when gathering especially long periods of data (days to months).
st_long = gather_waveforms(source='IRIS', network='AV', station='SSLS',
location='*', channel='BH*', starttime=STARTTIME,
endtime=ENDTIME, n_jobs=6)