Skip to content

Commit ea6625b

Browse files
authored
Merge pull request #26 from nfsi-canada/v003
Version 0.1.0
2 parents 2ba62cc + 830bf0b commit ea6625b

File tree

4 files changed

+51
-34
lines changed

4 files changed

+51
-34
lines changed

docs/scripts.rst

+24-7
Original file line numberDiff line numberDiff line change
@@ -85,22 +85,30 @@ Usage
8585
catalogue. Options include: BGR, ETH, GEONET, GFZ,
8686
INGV, IPGP, IRIS, KOERI, LMU, NCEDC, NEIP, NERIES,
8787
ODC, ORFEUS, RESIF, SCEDC, USGS, USP. [Default IRIS]
88+
--cat_url CAT_URL Specify the obspy base_url server address (and port if
89+
needed) to open for the catalogue client. Overrides
90+
any settings to cat_client. [Default None]
8891
--waveform-source WF_CLIENT
8992
Specify the server to connect to for the waveform
9093
data. Options include: BGR, ETH, GEONET, GFZ, INGV,
9194
IPGP, IRIS, KOERI, LMU, NCEDC, NEIP, NERIES, ODC,
9295
ORFEUS, RESIF, SCEDC, USGS, USP. [Default IRIS]
93-
-U USERAUTH, --User-Auth USERAUTH
96+
--wf_url WF_URL Specify the obspy base_url server address (and port if
97+
needed) to open for the waveform client. Overrides any
98+
settings to wf_client. [Default None]
99+
-U USERAUTH, --user-auth USERAUTH
94100
Enter your Authentification Username and Password for
95-
the waveform server (--User-
96-
Auth='username:authpassword') to access and download
101+
the waveform server (--user-
102+
auth='username:authpassword') to access and download
97103
restricted data. [Default no user and password]
98104
99105
Station Selection Parameters:
100106
Parameters to select a specific station.
101107
102108
--keys STKEYS Specify list of Station Keys in the database to
103109
process.
110+
--zcomp ZCOMP Specify the Vertical Component Channel Identifier.
111+
[Default Z].
104112
-c NAMECONV, --coord-system NAMECONV
105113
Coordinate system specification of instrument. (0)
106114
Attempt Autodetect between 1 and 2; (1) HZ, HN, HE;
@@ -278,27 +286,36 @@ Usage
278286
catalogue. Options include: BGR, ETH, GEONET, GFZ,
279287
INGV, IPGP, IRIS, KOERI, LMU, NCEDC, NEIP, NERIES,
280288
ODC, ORFEUS, RESIF, SCEDC, USGS, USP. [Default IRIS]
289+
--cat_url CAT_URL Specify the obspy base_url server address (and port if
290+
needed) to open for the catalogue client. Overrides
291+
any settings to cat_client. [Default None]
281292
--waveform-source WF_CLIENT
282293
Specify the server to connect to for the waveform
283294
data. Options include: BGR, ETH, GEONET, GFZ, INGV,
284295
IPGP, IRIS, KOERI, LMU, NCEDC, NEIP, NERIES, ODC,
285296
ORFEUS, RESIF, SCEDC, USGS, USP. [Default IRIS]
286-
-U USERAUTH, --User-Auth USERAUTH
297+
--wf_url WF_URL Specify the obspy base_url server address (and port if
298+
needed) to open for the waveform client. Overrides any
299+
settings to wf_client. [Default None]
300+
-U USERAUTH, --user-auth USERAUTH
287301
Enter your Authentification Username and Password for
288-
the waveform server (--User-
289-
Auth='username:authpassword') to access and download
302+
the waveform server (--user-
303+
auth='username:authpassword') to access and download
290304
restricted data. [Default no user and password]
291305
292306
Station Selection Parameters:
293307
Parameters to select a specific station.
294308
295309
--keys STKEYS Specify list of Station Keys in the database to
296310
process.
311+
--zcomp ZCOMP Specify the Vertical Component Channel Identifier.
312+
[Default Z].
297313
-c NAMECONV, --coord-system NAMECONV
298314
Coordinate system specification of instrument. (0)
299315
Attempt Autodetect between 1 and 2; (1) HZ, HN, HE;
300316
(2) Left Handed: HZ, H2 90 CW H1; (3) Right Handed:
301-
HZ, H2 90 CCW H1. [Default 2]
317+
HZ, H2 90 CCW H1 (4) Left Handed Numeric: H3, H2 90 CW
318+
H1 [Default 2]
302319
303320
Timing Parameters:
304321
Parameters associated with event timing and window length.

orientpy/__init__.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
__version__ = '0.0.2'
1+
__version__ = '0.1.0'
22

33
__author__ = 'Pascal Audet'
44

orientpy/scripts/bng_calc_auto.py

+13-13
Original file line numberDiff line numberDiff line change
@@ -135,13 +135,13 @@ def get_bng_calc_arguments(argv=None):
135135
"[Default None]")
136136
Svparm.add_argument(
137137
"-U",
138-
"--User-Auth",
138+
"--user-auth",
139139
action="store",
140140
type=str,
141-
dest="UserAuth",
141+
dest="userauth",
142142
default="",
143143
help="Enter your Authentification Username and Password for the " +
144-
"waveform server (--User-Auth='username:authpassword') to access " +
144+
"waveform server (--user-auth='username:authpassword') to access " +
145145
"and download restricted data. [Default no user and password]")
146146

147147
# Station Selection Parameters
@@ -155,7 +155,7 @@ def get_bng_calc_arguments(argv=None):
155155
default="",
156156
help="Specify list of Station Keys in the database to process.")
157157
stparm.add_argument(
158-
"--Zcomp",
158+
"--zcomp",
159159
dest="zcomp",
160160
type=str,
161161
default='Z',
@@ -320,16 +320,16 @@ def get_bng_calc_arguments(argv=None):
320320
args.endT = None
321321

322322
# Parse User Authentification
323-
if not len(args.UserAuth) == 0:
324-
tt = args.UserAuth.split(':')
323+
if not len(args.userauth) == 0:
324+
tt = args.userauth.split(':')
325325
if not len(tt) == 2:
326326
parser.error(
327327
"Error: Incorrect Username and Password Strings " +
328328
"for User Authentification")
329329
else:
330-
args.UserAuth = tt
330+
args.userauth = tt
331331
else:
332-
args.UserAuth = []
332+
args.userauth = []
333333

334334
# Parse Local Data directories
335335
if len(args.localdata) > 0:
@@ -396,20 +396,20 @@ def main(args=None):
396396
# Establish client for waveforms
397397
if args.verb > 1:
398398
print(" Establishing Waveform Client...")
399-
if len(args.UserAuth) == 0:
399+
if len(args.userauth) == 0:
400400
if args.wf_url is not None:
401401
wf_client = Client(base_url=args.wf_url)
402402
else:
403403
wf_client = Client(args.wf_client)
404404
else:
405405
if args.wf_url is not None:
406406
wf_client = Client(base_url=args.wf_url,
407-
user=args.UserAuth[0],
408-
password=args.UserAuth[1])
407+
user=args.userauth[0],
408+
password=args.userauth[1])
409409
else:
410410
wf_client = Client(args.wf_client,
411-
user=args.UserAuth[0],
412-
password=args.UserAuth[1])
411+
user=args.userauth[0],
412+
password=args.userauth[1])
413413
if args.verb > 1:
414414
print(" Done")
415415
print(" ")

orientpy/scripts/dl_calc.py

+13-13
Original file line numberDiff line numberDiff line change
@@ -135,13 +135,13 @@ def get_dl_calc_arguments(argv=None):
135135
"[Default None]")
136136
Svparm.add_argument(
137137
"-U",
138-
"--User-Auth",
138+
"--user-auth",
139139
action="store",
140140
type=str,
141-
dest="UserAuth",
141+
dest="userauth",
142142
default="",
143143
help="Enter your Authentification Username and Password for the " +
144-
"waveform server (--User-Auth='username:authpassword') to access " +
144+
"waveform server (--user-auth='username:authpassword') to access " +
145145
"and download restricted data. [Default no user and password]")
146146

147147
# Station Selection Parameters
@@ -155,7 +155,7 @@ def get_dl_calc_arguments(argv=None):
155155
default="",
156156
help="Specify list of Station Keys in the database to process.")
157157
stparm.add_argument(
158-
"--Zcomp",
158+
"--zcomp",
159159
dest="zcomp",
160160
type=str,
161161
default='Z',
@@ -276,16 +276,16 @@ def get_dl_calc_arguments(argv=None):
276276
args.endT = None
277277

278278
# Parse User Authentification
279-
if not len(args.UserAuth) == 0:
280-
tt = args.UserAuth.split(':')
279+
if not len(args.userauth) == 0:
280+
tt = args.userauth.split(':')
281281
if not len(tt) == 2:
282282
parser.error(
283283
"Error: Incorrect Username and Password Strings " +
284284
"for User Authentification")
285285
else:
286-
args.UserAuth = tt
286+
args.userauth = tt
287287
else:
288-
args.UserAuth = []
288+
args.userauth = []
289289

290290
# Parse Local Data directories
291291
if len(args.localdata) > 0:
@@ -334,20 +334,20 @@ def main(args=None):
334334
# Establish client for waveforms
335335
if args.verb > 1:
336336
print(" Establishing Waveform Client...")
337-
if len(args.UserAuth) == 0:
337+
if len(args.userauth) == 0:
338338
if args.wf_url is not None:
339339
wf_client = Client(base_url=args.wf_url)
340340
else:
341341
wf_client = Client(args.wf_client)
342342
else:
343343
if args.wf_url is not None:
344344
wf_client = Client(base_url=args.wf_url,
345-
user=args.UserAuth[0],
346-
password=args.UserAuth[1])
345+
user=args.userauth[0],
346+
password=args.userauth[1])
347347
else:
348348
wf_client = Client(args.wf_client,
349-
user=args.UserAuth[0],
350-
password=args.UserAuth[1])
349+
user=args.userauth[0],
350+
password=args.userauth[1])
351351
if args.verb > 1:
352352
print(" Done")
353353
print(" ")

0 commit comments

Comments
 (0)