@@ -80,110 +80,89 @@ def search(starttime=None,
80
80
host = None ,
81
81
enable_limit = False ,
82
82
verbose = False ):
83
- """Search the ComCat database for events matching input criteria.
83
+ """
84
+
85
+ Search the ComCat database for events matching input criteria.
84
86
This search function is a wrapper around the ComCat Web API described here:
85
87
https://earthquake.usgs.gov/fdsnws/event/1/
86
88
Some of the search parameters described there are NOT implemented here, usually because they do not
87
89
apply to GeoJSON search results, which we are getting here and parsing into Python data structures.
88
90
This function returns a list of SummaryEvent objects, described elsewhere in this package.
89
- Usage:
90
- TODO: Show usage information.
91
+
91
92
Args:
92
- starttime (datetime):
93
- Python datetime - Limit to events on or after the specified start time.
94
- endtime (datetime):
95
- Python datetime - Limit to events on or before the specified end time.
96
- updatedafter (datetime):
97
- Python datetime - Limit to events updated after the specified time.
98
- minlatitude (float):
99
- Limit to events with a latitude larger than the specified minimum.
100
- maxlatitude (float):
101
- Limit to events with a latitude smaller than the specified maximum.
102
- minlongitude (float):
103
- Limit to events with a longitude larger than the specified minimum.
104
- maxlongitude (float):
105
- Limit to events with a longitude smaller than the specified maximum.
106
- latitude (float):
107
- Specify the latitude to be used for a radius search.
108
- longitude (float):
109
- Specify the longitude to be used for a radius search.
110
- maxradiuskm (float):
111
- Limit to events within the specified maximum number of kilometers
93
+ starttime (datetime): Limit to events on or after the specified start time.
94
+ endtime (datetime): Limit to events on or before the specified end time.
95
+ updatedafter (datetime): Limit to events updated after the specified time.
96
+ minlatitude (float): Limit to events with a latitude larger than the specified minimum.
97
+ maxlatitude (float): Limit to events with a latitude smaller than the specified maximum.
98
+ minlongitude (float): Limit to events with a longitude larger than the specified minimum.
99
+ maxlongitude (float): Limit to events with a longitude smaller than the specified maximum.
100
+ latitude (float): Specify the latitude to be used for a radius search.
101
+ longitude (float): Specify the longitude to be used for a radius search.
102
+ maxradiuskm (float): Limit to events within the specified maximum number of kilometers
112
103
from the geographic point defined by the latitude and longitude parameters.
113
- maxradius (float):
114
- Limit to events within the specified maximum number of degrees
104
+ maxradius (float): Limit to events within the specified maximum number of degrees
115
105
from the geographic point defined by the latitude and longitude parameters.
116
- catalog (str):
117
- Limit to events from a specified catalog.
118
- contributor (str):
119
- Limit to events contributed by a specified contributor.
120
- limit (int):
121
- Limit the results to the specified number of events.
122
- NOTE, this will be throttled by this Python API to the supported Web API limit of 20,000.
123
- maxdepth (float):
124
- Limit to events with depth less than the specified maximum.
125
- maxmagnitude (float):
126
- Limit to events with a magnitude smaller than the specified maximum.
127
- mindepth (float):
128
- Limit to events with depth more than the specified minimum.
129
- minmagnitude (float):
130
- Limit to events with a magnitude larger than the specified minimum.
131
- offset (int):
132
- Return results starting at the event count specified, starting at 1.
133
- orderby (str):
134
- Order the results. The allowed values are:
135
- - time order by origin descending time
136
- - time-asc order by origin ascending time
137
- - magnitude order by descending magnitude
138
- - magnitude-asc order by ascending magnitude
139
- alertlevel (str):
140
- Limit to events with a specific PAGER alert level. The allowed values are:
141
- - green Limit to events with PAGER alert level "green".
142
- - yellow Limit to events with PAGER alert level "yellow".
143
- - orange Limit to events with PAGER alert level "orange".
144
- - red Limit to events with PAGER alert level "red".
145
- eventtype (str):
146
- Limit to events of a specific type. NOTE: "earthquake" will filter non-earthquake events.
147
- maxcdi (float):
148
- Maximum value for Maximum Community Determined Intensity reported by DYFI.
149
- maxgap (float):
150
- Limit to events with no more than this azimuthal gap.
151
- maxmmi (float):
152
- Maximum value for Maximum Modified Mercalli Intensity reported by ShakeMap.
153
- maxsig (float):
154
- Limit to events with no more than this significance.
155
- mincdi (float):
156
- Minimum value for Maximum Community Determined Intensity reported by DYFI.
157
- minfelt (int):
158
- Limit to events with this many DYFI responses.
159
- mingap (float):
160
- Limit to events with no less than this azimuthal gap.
161
- minsig (float):
162
- Limit to events with no less than this significance.
163
- producttype (str):
164
- Limit to events that have this type of product associated. Example producttypes:
165
- - moment-tensor
166
- - focal-mechanism
167
- - shakemap
168
- - losspager
169
- - dyfi
170
- productcode (str):
171
- Return the event that is associated with the productcode.
172
- The event will be returned even if the productcode is not
173
- the preferred code for the event. Example productcodes:
174
- - nn00458749
175
- - at00ndf1fr
176
- reviewstatus (str):
177
- Limit to events with a specific review status. The different review statuses are:
178
- - automatic Limit to events with review status "automatic".
179
- - reviewed Limit to events with review status "reviewed".
180
- host (str):
181
- Replace default ComCat host (earthquake.usgs.gov) with a custom host.
106
+ catalog (str): Limit to events from a specified catalog.
107
+ contributor (str): Limit to events contributed by a specified contributor.
108
+ limit (int): Limit the results to the specified number of events.
109
+ NOTE: this will be throttled by this Python API to the supported Web API limit of 20,000.
110
+ maxdepth (float): Limit to events with depth less than the specified maximum.
111
+ maxmagnitude (float): Limit to events with a magnitude smaller than the specified maximum.
112
+ mindepth (float): Limit to events with depth more than the specified minimum.
113
+ minmagnitude (float): Limit to events with a magnitude larger than the specified minimum.
114
+ offset (int): Return results starting at the event count specified, starting at 1.
115
+ orderby (str): Order the results. The allowed values are:
116
+
117
+ - `time`: order by origin descending time
118
+ - `time-asc`: order by origin ascending time
119
+ - `magnitude`: order by descending magnitude
120
+ - `magnitude-asc`: order by ascending magnitude
121
+
122
+ alertlevel (str): Limit to events with a specific PAGER alert level. The allowed values are:
123
+
124
+ - `green`: Limit to events with PAGER alert level "green".
125
+ - `yellow`: Limit to events with PAGER alert level "yellow".
126
+ - `orange`: Limit to events with PAGER alert level "orange".
127
+ - `red`: Limit to events with PAGER alert level "red".
128
+
129
+ eventtype (str): Limit to events of a specific type. NOTE: "earthquake" will filter non-earthquake events.
130
+ maxcdi (float): Maximum value for Maximum Community Determined Intensity reported by DYFI.
131
+ maxgap (float): Limit to events with no more than this azimuthal gap.
132
+ maxmmi (float): Maximum value for Maximum Modified Mercalli Intensity reported by ShakeMap.
133
+ maxsig (float): Limit to events with no more than this significance.
134
+ mincdi (float): Minimum value for Maximum Community Determined Intensity reported by DYFI.
135
+ minfelt (int): Limit to events with this many DYFI responses.
136
+ mingap (float): Limit to events with no less than this azimuthal gap.
137
+ minsig (float): Limit to events with no less than this significance.
138
+ producttype (str): Limit to events that have this type of product associated. Example product types:
139
+
140
+ - `moment-tensor`
141
+ - `focal-mechanism`
142
+ - `shakemap`
143
+ - `losspager`
144
+ - `dyfi`
145
+
146
+ productcode (str): Return the event that is associated with the product code.
147
+ The event will be returned even if the product code is not
148
+ the preferred code for the event. Example product codes:
149
+
150
+ - `nn00458749`
151
+ - `at00ndf1fr`
152
+
153
+ reviewstatus (str): Limit to events with a specific review status. The different review statuses are:
154
+
155
+ - `automatic`: Limit to events with review status "automatic".
156
+ - `reviewed`: Limit to events with review status "reviewed".
157
+
158
+ host (str): Replace default ComCat host (earthquake.usgs.gov) with a custom host.
182
159
enable_limit (bool): Enable 20,000 event search limit. Will turn off searching
183
160
in segments, which is meant to safely avoid that limit.
184
161
Use only when you are certain your search will be small.
162
+
185
163
Returns:
186
164
list: List of SummaryEvent() objects.
165
+
187
166
"""
188
167
# getting the inputargs must be the first line of the method!
189
168
inputargs = locals ().copy ()
0 commit comments