Changes for page FDSN Guide
Last modified by robert on 2025/03/24 12:02
Summary
-
Page properties (1 modified, 0 added, 0 removed)
Details
- Page properties
-
- Content
-
... ... @@ -4,17 +4,8 @@ 4 4 5 5 = [[How to Install ObsPy>>url:https://github.com/obspy/obspy/wiki#installation]] = 6 6 7 -= FDSN Tools =7 += [[Seed-Vault>>https://github.com/AuScope/seed-vault]] = 8 8 9 -(% class="wikigeneratedid" id="HSeed-Vault" %) 10 -[[Seed-Vault>>https://github.com/AuScope/seed-vault]] 11 - 12 -[[PyWeed>>https://github.com/iris-edu/pyweed]] 13 - 14 -[[ObsPy get_waveforms_bulk>>https://docs.obspy.org/packages/autogen/obspy.clients.fdsn.client.Client.get_waveforms_bulk.html]] 15 - 16 -[[IRISfetch.m>>https://ds.iris.edu/ds/nodes/dmc/software/downloads/irisfetch.m/]] 17 - 18 18 = Connecting to an FDSN Server = 19 19 20 20 == How to connect to AusPass with & without authenticated access == ... ... @@ -36,51 +36,24 @@ 36 36 37 37 = Station Metadata = 38 38 39 -Information such as site locations, sensor and data logger types, response information, etc are in the station metadata. This can be accessed [[directly>>http://auspass.edu.au/fdsnws/station/1/builder]]or via the[[ObsPy get_stations>>https://docs.obspy.org/packages/autogen/obspy.clients.fdsn.client.Client.get_stations.html]] code.30 +Information such as site locations, sensor and data logger types, response information, etc are in the station metadata. This can be accessed directly(link) or via the obspy get_stations (link) tool. 40 40 41 41 42 -== How to download event, station, instrument response==33 +== Sub-paragraph == 43 43 35 +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. 44 44 45 -{{code language="python"}} 46 -import obspy 47 -from obspy.clients.fdsn import Client 37 +=== Sub-sub paragraph === 48 48 49 -# Use AusPass client for station, waveform, and earthquake information 50 -client = Client("AUSPASS") 39 +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. 51 51 52 52 53 -# Download station information for AUMTC station in S1 network at the response level 54 -inv = client.get_stations(network="S1", station="AUMTC", location="*", 55 - channel="*", level="response") 56 - 57 -# Inventory metadata is stored in a Inventory > Network > Station > Channel hierarchy 58 - 59 -print(inv) #inventory level 60 - 61 -print(inv[0]) # network level (the first network in the inventory) 62 - 63 -print(inv[0][0]) # station level (the first station of the first network in the inventory) 64 - 65 -print(inv[0][0][0]) # channel level (the first channel of the first station of the first network in the inventoy) 66 - 67 -# you can also select items directly 68 - 69 -print(inv.select(station='AUMTC',channel='HHZ')[0][0][0]) 70 - 71 -# instrument response is attached to a channel object 72 - 73 -response = inv.select(station='AUMTC',channel='HHZ')[0][0][0].response 74 -{{/code}} 75 - 76 76 = Waveform Data = 77 77 78 -Waveform data (e.g. the actual seismic data) can be accessed [[directly>>https://auspass.edu.au/fdsnws/dataselect/1/builder]]or via[[ObsPy's get_waveforms>>https://docs.obspy.org/packages/autogen/obspy.clients.fdsn.client.Client.get_waveforms.html]] code. It can also be accessed via various tools such as seed-vault, pyweed, etc (add links).44 +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). 79 79 80 -== Downloadingand Storingdata ==46 +== How to download waveform data == 81 81 82 -=== How to download waveform data === 83 - 84 84 {{code language="python"}} 85 85 from obspy import UTCDateTime 86 86 from obspy.clients.fdsn import Client ... ... @@ -102,75 +102,9 @@ 102 102 print("Downloaded and saved the MiniSEED file.") 103 103 {{/code}} 104 104 105 -== =How todownload a LOT of waveformdata===69 +== How to remove instrument response == 106 106 107 107 {{code language="python"}} 108 -from obspy import UTCDateTime 109 -from obspy.clients.fdsn import Client 110 -import datetime 111 - 112 -# Initialize client and set parameters 113 -client = Client("IRIS") 114 -start_date = UTCDateTime("2023-07-01") 115 -end_date = UTCDateTime("2023-07-02") 116 -network = "S1" 117 -station = "AUMTS" 118 -channel = "BHZ" 119 - 120 -# Loop to download data one day at a time 121 -while start_date <= end_date: 122 - next_date = start_date + datetime.timedelta(days=1) 123 - try: 124 - st = client.get_waveforms(network, station, "*", channel, start_date, next_date) 125 - st.write(f"{start_date.date}.mseed", format="MSEED") 126 - except: 127 - print(f"Failed for {start_date} to {next_date}") 128 - start_date = next_date 129 -{{/code}} 130 - 131 -=== How to store and archive waveform data in SeisComP Data Structure (SDS) === 132 - 133 -{{code language="python"}} 134 -import os 135 -from obspy import UTCDateTime, read 136 -from obspy.clients.fdsn import Client 137 - 138 -# Initialize the client 139 -client = Client("AUSPASS") # Replace with the correct client endpoint if different 140 - 141 -# Define event time and time window 142 -event_time = UTCDateTime("2021-09-21T23:15:53") 143 -starttime = event_time - 600 # 10 minutes before the event 144 -endtime = event_time + 1800 # 30 minutes after the event 145 - 146 -# Download the waveform data 147 -st = client.get_waveforms(network="S1", station="AUMTS", location="*", channel="*", starttime=starttime, endtime=endtime) 148 - 149 -# Create SDS structure: ROOT/YEAR/NET/STA/CHAN.TYPE/NET.STA.LOC.CHAN.YEAR.DAY 150 -sds_root = "." # Replace with your desired directory 151 - 152 -for tr in st: 153 - net = tr.stats.network 154 - sta = tr.stats.station 155 - loc = tr.stats.location 156 - chan = tr.stats.channel 157 - year = str(tr.stats.starttime.year) 158 - jday = str(tr.stats.starttime.julday).zfill(3) 159 - 160 - sds_path = os.path.join(sds_root, year, net, sta, f"{chan}.D", f"{net}.{sta}.{loc}.{chan}.{year}.{jday}") 161 - 162 - # Create directories if they don't exist 163 - os.makedirs(os.path.dirname(sds_path), exist_ok=True) 164 - 165 - # Save the trace as a MiniSEED file 166 - tr.write(sds_path, format="MSEED") 167 -{{/code}} 168 - 169 -== Common Data Operations == 170 - 171 -=== How to remove instrument response === 172 - 173 -{{code language="python"}} 174 174 from obspy import read 175 175 from obspy.core.util import AttribDict 176 176 ... ... @@ -192,7 +192,7 @@ 192 192 st.write("Woodspoint_2021_corrected.mseed", format="MSEED") 193 193 {{/code}} 194 194 195 -== =How to apply a bandpass filter ===93 +== How to apply a bandpass filter == 196 196 197 197 {{code language="python"}} 198 198 from obspy import read ... ... @@ -212,7 +212,7 @@ 212 212 st.write("Woodspoint_2021_filtered.mseed", format="MSEED") 213 213 {{/code}} 214 214 215 -== =How to slice a waveform ===113 +== How to slice a waveform == 216 216 217 217 {{code language="python"}} 218 218 from obspy import read, UTCDateTime, Stream # Importing Stream here ... ... @@ -234,7 +234,7 @@ 234 234 sliced_st.write("Woodspoint_2021_filtered_sliced.mseed", format="MSEED") 235 235 {{/code}} 236 236 237 -== =How to save a waveform ===135 +== How to save a waveform == 238 238 239 239 {{code language="python"}} 240 240 # Save the sliced file as MiniSEED ... ... @@ -244,7 +244,7 @@ 244 244 sliced_st.write("Woodspoint_2021_filtered_sliced.sac", format="SAC") 245 245 {{/code}} 246 246 247 -== =How to convert miniSEEDtoSAC===145 +== How to convert miniseed to sac == 248 248 249 249 {{code language="python"}} 250 250 from obspy import read ... ... @@ -259,9 +259,9 @@ 259 259 tr.write("Woodspoint_2021.sac", format="SAC") 260 260 {{/code}} 261 261 160 + 262 262 = Earthquake Data = 263 263 264 -Earthquake data can be accessed [[directly>>https://auspass.edu.au/fdsnws/event/1/builder]] or via [[ObsPy's get_events>>https://docs.obspy.org/packages/autogen/obspy.clients.fdsn.client.Client.get_events.html]] code 265 265 266 266 == How to download an Earthquake Catalog == 267 267