Changes for page FDSN Guide

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

From version 1.1
edited by robert
on 2025/03/24 10:00
Change comment: There is no comment for this version
To version 1.5
edited by robert
on 2025/03/24 10:08
Change comment: There is no comment for this version

Summary

Details

Page properties
Content
... ... @@ -2,13 +2,33 @@
2 2  {{toc/}}
3 3  {{/box}}
4 4  
5 += [[How to Install ObsPy>>url:https://github.com/obspy/obspy/wiki#installation]] =
6 +
7 += [[Seed-Vault>>https://github.com/AuScope/seed-vault]] =
8 +
5 5  = Connecting to an FDSN Server =
6 6  
11 +== How to connect to AusPass with & without authenticated access ==
12 +
13 +
14 +{{code language="python"}}
15 +import obspy
16 +from obspy.clients.fdsn import Client
17 +
18 +# Initialize FDSN client for AusPass
19 +
20 +# For open access data, no username or password is required.
21 +client = Client('AUSPASS')
22 +
23 +# To access restricted data, supply your username and password
24 +# Replace 'Z1' and '12345' with your actual credentials
25 +client = Client('AUSPASS', user='Z1', password='12345')
26 +{{/code}}
27 +
7 7  = Station Metadata =
8 8  
9 9  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.
10 10  
11 -
12 12  
13 13  == Sub-paragraph ==
14 14  
... ... @@ -23,8 +23,59 @@
23 23  
24 24  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.
25 25  
26 -== Sub-paragraph ==
27 27  
28 -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.
29 -
30 30  = Earthquake Data =
48 +
49 +== How to download an Earthquake Catalog ==
50 +
51 +{{code language="python"}}
52 +from obspy.clients.fdsn import Client
53 +from obspy import UTCDateTime
54 +
55 +# Initialize the AusPass FDSN client
56 +client = Client("AUSPASS")
57 +
58 +# Define the time range for the earthquake catalog
59 +start_time = UTCDateTime("2021-08-01")
60 +end_time = UTCDateTime("2022-01-01") # End of year
61 +
62 +# Define the geographic region (latitude and longitude for Woodspoint, Victoria, Australia)
63 +latitude = -37.47
64 +longitude = 146.10
65 +max_radius = 5 # in degrees
66 +
67 +# Download the earthquake catalog
68 +catalog = client.get_events(starttime=start_time, endtime=end_time,
69 + minmagnitude=2, latitude=latitude, longitude=longitude,
70 + maxradius=max_radius)
71 +
72 +# Save the catalog to a file (e.g., QuakeML format)
73 +catalog.write("Woodspoint_earthquakes.xml", format="QUAKEML")
74 +{{/code}}
75 +
76 +== How to plot (Global) Earthquakes ==
77 +
78 +{{code language="python"}}
79 +from obspy import UTCDateTime
80 +from obspy.clients.fdsn import Client
81 +
82 +# Initialize FDSN client to connect to the IRIS data center
83 +client = Client("IRIS")
84 +
85 +# Set the time range for fetching earthquake data
86 +# Start time: January 1, 2023
87 +# End time: Current time
88 +starttime = UTCDateTime("2023-01-01")
89 +endtime = UTCDateTime()
90 +
91 +# Fetch earthquake events with a minimum magnitude of 7
92 +catalog = client.get_events(starttime=starttime, endtime=endtime, minmagnitude=7)
93 +#client.get_events(). This function returns a Catalog object that contains a list of Event objects.
94 +#Each Event object, in turn, has an Origins attribute that contains the depth information
95 +
96 +# Plot the fetched earthquake data using an orthographic projection
97 +catalog.plot(projection="ortho", title="Global Earthquakes with Magnitude >= 7 since 2023")
98 +#catalog.plot(), ObsPy automatically uses the depth information to color the events in the plot
99 +{{/code}}
100 +
101 +