Changes for page FDSN Guide

Last modified by robert on 2025/03/24 12:02

From version 4.1
edited by robert
on 2025/03/24 10:36
Change comment: There is no comment for this version
To version 2.4
edited by robert
on 2025/03/24 10:30
Change comment: There is no comment for this version

Summary

Details

Page properties
Content
... ... @@ -43,7 +43,9 @@
43 43  
44 44  # Download station information for AUMTC station in S1 network at the response level
45 45  inv = client.get_stations(network="S1", station="AUMTC", location="*",
46 - channel="*", level="response")
46 + channel="*", starttime=event_time - 60,
47 + endtime=event_time + 1000, level="response")
48 +print(inv)
47 47  
48 48  # Inventory metadata is stored in a Inventory > Network > Station > Channel hierarchy
49 49  
... ... @@ -64,14 +64,18 @@
64 64  response = inv.select(station='AUMTC',channel='HHZ')[0][0][0].response
65 65  {{/code}}
66 66  
69 +
70 +=== Sub-sub paragraph ===
71 +
72 +Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
73 +
74 +
67 67  = Waveform Data =
68 68  
69 69  Waveform data (e.g. the actual seismic data) can be accessed directly (link) or via obspy's get_waveforms (link) tool. It can also be accessed via various tools such as seed-vault, pyweed, etc (add links).
70 70  
71 -== Downloading and Storing data ==
79 +== How to download waveform data ==
72 72  
73 -=== How to download waveform data ===
74 -
75 75  {{code language="python"}}
76 76  from obspy import UTCDateTime
77 77  from obspy.clients.fdsn import Client
... ... @@ -93,75 +93,9 @@
93 93  print("Downloaded and saved the MiniSEED file.")
94 94  {{/code}}
95 95  
96 -=== How to download a LOT of waveform data ===
102 +== How to remove instrument response ==
97 97  
98 98  {{code language="python"}}
99 -from obspy import UTCDateTime
100 -from obspy.clients.fdsn import Client
101 -import datetime
102 -
103 -# Initialize client and set parameters
104 -client = Client("IRIS")
105 -start_date = UTCDateTime("2023-07-01")
106 -end_date = UTCDateTime("2023-07-02")
107 -network = "S1"
108 -station = "AUMTS"
109 -channel = "BHZ"
110 -
111 -# Loop to download data one day at a time
112 -while start_date <= end_date:
113 - next_date = start_date + datetime.timedelta(days=1)
114 - try:
115 - st = client.get_waveforms(network, station, "*", channel, start_date, next_date)
116 - st.write(f"{start_date.date}.mseed", format="MSEED")
117 - except:
118 - print(f"Failed for {start_date} to {next_date}")
119 - start_date = next_date
120 -{{/code}}
121 -
122 -=== How to store and archive waveform data in SeisComP Data Structure (SDS) ===
123 -
124 -{{code language="python"}}
125 -import os
126 -from obspy import UTCDateTime, read
127 -from obspy.clients.fdsn import Client
128 -
129 -# Initialize the client
130 -client = Client("AUSPASS") # Replace with the correct client endpoint if different
131 -
132 -# Define event time and time window
133 -event_time = UTCDateTime("2021-09-21T23:15:53")
134 -starttime = event_time - 600 # 10 minutes before the event
135 -endtime = event_time + 1800 # 30 minutes after the event
136 -
137 -# Download the waveform data
138 -st = client.get_waveforms(network="S1", station="AUMTS", location="*", channel="*", starttime=starttime, endtime=endtime)
139 -
140 -# Create SDS structure: ROOT/YEAR/NET/STA/CHAN.TYPE/NET.STA.LOC.CHAN.YEAR.DAY
141 -sds_root = "." # Replace with your desired directory
142 -
143 -for tr in st:
144 - net = tr.stats.network
145 - sta = tr.stats.station
146 - loc = tr.stats.location
147 - chan = tr.stats.channel
148 - year = str(tr.stats.starttime.year)
149 - jday = str(tr.stats.starttime.julday).zfill(3)
150 -
151 - sds_path = os.path.join(sds_root, year, net, sta, f"{chan}.D", f"{net}.{sta}.{loc}.{chan}.{year}.{jday}")
152 -
153 - # Create directories if they don't exist
154 - os.makedirs(os.path.dirname(sds_path), exist_ok=True)
155 -
156 - # Save the trace as a MiniSEED file
157 - tr.write(sds_path, format="MSEED")
158 -{{/code}}
159 -
160 -== Common Data Operations ==
161 -
162 -=== How to remove instrument response ===
163 -
164 -{{code language="python"}}
165 165  from obspy import read
166 166  from obspy.core.util import AttribDict
167 167  
... ... @@ -183,7 +183,7 @@
183 183  st.write("Woodspoint_2021_corrected.mseed", format="MSEED")
184 184  {{/code}}
185 185  
186 -=== How to apply a bandpass filter ===
126 +== How to apply a bandpass filter ==
187 187  
188 188  {{code language="python"}}
189 189  from obspy import read
... ... @@ -203,7 +203,7 @@
203 203  st.write("Woodspoint_2021_filtered.mseed", format="MSEED")
204 204  {{/code}}
205 205  
206 -=== How to slice a waveform ===
146 +== How to slice a waveform ==
207 207  
208 208  {{code language="python"}}
209 209  from obspy import read, UTCDateTime, Stream # Importing Stream here
... ... @@ -225,7 +225,7 @@
225 225  sliced_st.write("Woodspoint_2021_filtered_sliced.mseed", format="MSEED")
226 226  {{/code}}
227 227  
228 -=== How to save a waveform ===
168 +== How to save a waveform ==
229 229  
230 230  {{code language="python"}}
231 231  # Save the sliced file as MiniSEED
... ... @@ -235,7 +235,7 @@
235 235  sliced_st.write("Woodspoint_2021_filtered_sliced.sac", format="SAC")
236 236  {{/code}}
237 237  
238 -=== How to convert miniSEED to SAC ===
178 +== How to convert miniseed to sac ==
239 239  
240 240  {{code language="python"}}
241 241  from obspy import read
... ... @@ -253,7 +253,6 @@
253 253  
254 254  = Earthquake Data =
255 255  
256 -Earthquake data can be accessed directly or via ObsPy's get_events code
257 257  
258 258  == How to download an Earthquake Catalog ==
259 259  
... ... @@ -335,4 +335,3 @@
335 335  catalog.plot(projection="local", title="Australia Earthquakes", resolution="i")
336 336  {{/code}}
337 337  
338 -