|
18 | 18 |
|
19 | 19 |
|
20 | 20 | def mktemplates( |
21 | | - network_code='GEONET', plot=True, publicIDs=None): |
| 21 | + network_code='GEONET', plot=True, public_ids=None): |
22 | 22 | """Functional wrapper to make templates""" |
23 | | - publicIDs = publicIDs or [ |
| 23 | + public_ids = public_ids or [ |
24 | 24 | '2016p008122', '2016p008353', '2016p008155', '2016p008194'] |
25 | 25 | client = Client(network_code) |
26 | 26 | # We want to download a few events from an earthquake sequence, these are |
27 | 27 | # identified by publiID numbers, given as arguments |
28 | 28 |
|
29 | 29 | catalog = Catalog() |
30 | | - for publicID in publicIDs: |
| 30 | + for public_id in public_ids: |
31 | 31 | try: |
32 | 32 | catalog += client.get_events( |
33 | | - eventid=publicID, includearrivals=True) |
| 33 | + eventid=public_id, includearrivals=True) |
34 | 34 | except TypeError: |
35 | 35 | # Cope with some FDSN services not implementing includearrivals |
36 | | - catalog += client.get_events(eventid=publicID) |
| 36 | + catalog += client.get_events(eventid=public_id) |
37 | 37 |
|
38 | 38 | # Lets plot the catalog to see what we have |
39 | 39 | if plot: |
@@ -78,4 +78,4 @@ def mktemplates( |
78 | 78 | net_code = sys.argv[1] |
79 | 79 | idlist = list(sys.argv)[2:] |
80 | 80 | print(idlist) |
81 | | - mktemplates(net_code, idlist) |
| 81 | + mktemplates(network_code=net_code, public_ids=idlist) |
0 commit comments