From 6b12a128d1d4d89081f5763c4637ce776b65e423 Mon Sep 17 00:00:00 2001 From: Pascal Audet Date: Tue, 1 Apr 2025 11:35:17 +1300 Subject: [PATCH 1/4] created v0.1.0 --- orientpy/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/orientpy/__init__.py b/orientpy/__init__.py index 7d468b2..246d940 100644 --- a/orientpy/__init__.py +++ b/orientpy/__init__.py @@ -1,4 +1,4 @@ -__version__ = '0.0.2' +__version__ = '0.1.0' __author__ = 'Pascal Audet' From d457cfdb362af4a99764c6faea05006186563fd7 Mon Sep 17 00:00:00 2001 From: Pascal Audet Date: Tue, 1 Apr 2025 11:35:43 +1300 Subject: [PATCH 2/4] updated scripts and docs --- docs/scripts.rst | 31 ++++++++++++++++++++++++------- orientpy/scripts/bng_calc_auto.py | 24 ++++++++++++------------ orientpy/scripts/dl_calc.py | 24 ++++++++++++------------ 3 files changed, 48 insertions(+), 31 deletions(-) diff --git a/docs/scripts.rst b/docs/scripts.rst index 0809f1b..2252066 100644 --- a/docs/scripts.rst +++ b/docs/scripts.rst @@ -85,15 +85,21 @@ Usage catalogue. Options include: BGR, ETH, GEONET, GFZ, INGV, IPGP, IRIS, KOERI, LMU, NCEDC, NEIP, NERIES, ODC, ORFEUS, RESIF, SCEDC, USGS, USP. [Default IRIS] + --cat_url CAT_URL Specify the obspy base_url server address (and port if + needed) to open for the catalogue client. Overrides + any settings to cat_client. [Default None] --waveform-source WF_CLIENT Specify the server to connect to for the waveform data. Options include: BGR, ETH, GEONET, GFZ, INGV, IPGP, IRIS, KOERI, LMU, NCEDC, NEIP, NERIES, ODC, ORFEUS, RESIF, SCEDC, USGS, USP. [Default IRIS] - -U USERAUTH, --User-Auth USERAUTH + --wf_url WF_URL Specify the obspy base_url server address (and port if + needed) to open for the waveform client. Overrides any + settings to wf_client. [Default None] + -U USERAUTH, --user-auth USERAUTH Enter your Authentification Username and Password for - the waveform server (--User- - Auth='username:authpassword') to access and download + the waveform server (--user- + auth='username:authpassword') to access and download restricted data. [Default no user and password] Station Selection Parameters: @@ -101,6 +107,8 @@ Usage --keys STKEYS Specify list of Station Keys in the database to process. + --Zcomp ZCOMP Specify the Vertical Component Channel Identifier. + [Default Z]. -c NAMECONV, --coord-system NAMECONV Coordinate system specification of instrument. (0) Attempt Autodetect between 1 and 2; (1) HZ, HN, HE; @@ -278,15 +286,21 @@ Usage catalogue. Options include: BGR, ETH, GEONET, GFZ, INGV, IPGP, IRIS, KOERI, LMU, NCEDC, NEIP, NERIES, ODC, ORFEUS, RESIF, SCEDC, USGS, USP. [Default IRIS] + --cat_url CAT_URL Specify the obspy base_url server address (and port if + needed) to open for the catalogue client. Overrides + any settings to cat_client. [Default None] --waveform-source WF_CLIENT Specify the server to connect to for the waveform data. Options include: BGR, ETH, GEONET, GFZ, INGV, IPGP, IRIS, KOERI, LMU, NCEDC, NEIP, NERIES, ODC, ORFEUS, RESIF, SCEDC, USGS, USP. [Default IRIS] - -U USERAUTH, --User-Auth USERAUTH + --wf_url WF_URL Specify the obspy base_url server address (and port if + needed) to open for the waveform client. Overrides any + settings to wf_client. [Default None] + -U USERAUTH, --user-auth USERAUTH Enter your Authentification Username and Password for - the waveform server (--User- - Auth='username:authpassword') to access and download + the waveform server (--user- + auth='username:authpassword') to access and download restricted data. [Default no user and password] Station Selection Parameters: @@ -294,11 +308,14 @@ Usage --keys STKEYS Specify list of Station Keys in the database to process. + --Zcomp ZCOMP Specify the Vertical Component Channel Identifier. + [Default Z]. -c NAMECONV, --coord-system NAMECONV Coordinate system specification of instrument. (0) Attempt Autodetect between 1 and 2; (1) HZ, HN, HE; (2) Left Handed: HZ, H2 90 CW H1; (3) Right Handed: - HZ, H2 90 CCW H1. [Default 2] + HZ, H2 90 CCW H1 (4) Left Handed Numeric: H3, H2 90 CW + H1 [Default 2] Timing Parameters: Parameters associated with event timing and window length. diff --git a/orientpy/scripts/bng_calc_auto.py b/orientpy/scripts/bng_calc_auto.py index a6c0bd8..afdad64 100755 --- a/orientpy/scripts/bng_calc_auto.py +++ b/orientpy/scripts/bng_calc_auto.py @@ -135,13 +135,13 @@ def get_bng_calc_arguments(argv=None): "[Default None]") Svparm.add_argument( "-U", - "--User-Auth", + "--user-auth", action="store", type=str, - dest="UserAuth", + dest="userauth", default="", help="Enter your Authentification Username and Password for the " + - "waveform server (--User-Auth='username:authpassword') to access " + + "waveform server (--user-auth='username:authpassword') to access " + "and download restricted data. [Default no user and password]") # Station Selection Parameters @@ -320,16 +320,16 @@ def get_bng_calc_arguments(argv=None): args.endT = None # Parse User Authentification - if not len(args.UserAuth) == 0: - tt = args.UserAuth.split(':') + if not len(args.userauth) == 0: + tt = args.userauth.split(':') if not len(tt) == 2: parser.error( "Error: Incorrect Username and Password Strings " + "for User Authentification") else: - args.UserAuth = tt + args.userauth = tt else: - args.UserAuth = [] + args.userauth = [] # Parse Local Data directories if len(args.localdata) > 0: @@ -396,7 +396,7 @@ def main(args=None): # Establish client for waveforms if args.verb > 1: print(" Establishing Waveform Client...") - if len(args.UserAuth) == 0: + if len(args.userauth) == 0: if args.wf_url is not None: wf_client = Client(base_url=args.wf_url) else: @@ -404,12 +404,12 @@ def main(args=None): else: if args.wf_url is not None: wf_client = Client(base_url=args.wf_url, - user=args.UserAuth[0], - password=args.UserAuth[1]) + user=args.userauth[0], + password=args.userauth[1]) else: wf_client = Client(args.wf_client, - user=args.UserAuth[0], - password=args.UserAuth[1]) + user=args.userauth[0], + password=args.userauth[1]) if args.verb > 1: print(" Done") print(" ") diff --git a/orientpy/scripts/dl_calc.py b/orientpy/scripts/dl_calc.py index 7394959..6997b74 100755 --- a/orientpy/scripts/dl_calc.py +++ b/orientpy/scripts/dl_calc.py @@ -135,13 +135,13 @@ def get_dl_calc_arguments(argv=None): "[Default None]") Svparm.add_argument( "-U", - "--User-Auth", + "--user-auth", action="store", type=str, - dest="UserAuth", + dest="userauth", default="", help="Enter your Authentification Username and Password for the " + - "waveform server (--User-Auth='username:authpassword') to access " + + "waveform server (--user-auth='username:authpassword') to access " + "and download restricted data. [Default no user and password]") # Station Selection Parameters @@ -276,16 +276,16 @@ def get_dl_calc_arguments(argv=None): args.endT = None # Parse User Authentification - if not len(args.UserAuth) == 0: - tt = args.UserAuth.split(':') + if not len(args.userauth) == 0: + tt = args.userauth.split(':') if not len(tt) == 2: parser.error( "Error: Incorrect Username and Password Strings " + "for User Authentification") else: - args.UserAuth = tt + args.userauth = tt else: - args.UserAuth = [] + args.userauth = [] # Parse Local Data directories if len(args.localdata) > 0: @@ -334,7 +334,7 @@ def main(args=None): # Establish client for waveforms if args.verb > 1: print(" Establishing Waveform Client...") - if len(args.UserAuth) == 0: + if len(args.userauth) == 0: if args.wf_url is not None: wf_client = Client(base_url=args.wf_url) else: @@ -342,12 +342,12 @@ def main(args=None): else: if args.wf_url is not None: wf_client = Client(base_url=args.wf_url, - user=args.UserAuth[0], - password=args.UserAuth[1]) + user=args.userauth[0], + password=args.userauth[1]) else: wf_client = Client(args.wf_client, - user=args.UserAuth[0], - password=args.UserAuth[1]) + user=args.userauth[0], + password=args.userauth[1]) if args.verb > 1: print(" Done") print(" ") From 7dc9488a32f850df5d3b9c1adc883ba3701a5a4c Mon Sep 17 00:00:00 2001 From: Pascal Audet Date: Tue, 1 Apr 2025 11:39:55 +1300 Subject: [PATCH 3/4] fixed zcomp arg to lower case --- orientpy/scripts/bng_calc_auto.py | 2 +- orientpy/scripts/dl_calc.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/orientpy/scripts/bng_calc_auto.py b/orientpy/scripts/bng_calc_auto.py index afdad64..ad2eb64 100755 --- a/orientpy/scripts/bng_calc_auto.py +++ b/orientpy/scripts/bng_calc_auto.py @@ -155,7 +155,7 @@ def get_bng_calc_arguments(argv=None): default="", help="Specify list of Station Keys in the database to process.") stparm.add_argument( - "--Zcomp", + "--zcomp", dest="zcomp", type=str, default='Z', diff --git a/orientpy/scripts/dl_calc.py b/orientpy/scripts/dl_calc.py index 6997b74..160f19f 100755 --- a/orientpy/scripts/dl_calc.py +++ b/orientpy/scripts/dl_calc.py @@ -155,7 +155,7 @@ def get_dl_calc_arguments(argv=None): default="", help="Specify list of Station Keys in the database to process.") stparm.add_argument( - "--Zcomp", + "--zcomp", dest="zcomp", type=str, default='Z', From 830bf0b5dfa8af5376375cf92134082a450214b2 Mon Sep 17 00:00:00 2001 From: Pascal Audet Date: Tue, 1 Apr 2025 11:41:17 +1300 Subject: [PATCH 4/4] fixed scripts docs --- docs/scripts.rst | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/scripts.rst b/docs/scripts.rst index 2252066..e52eb62 100644 --- a/docs/scripts.rst +++ b/docs/scripts.rst @@ -107,7 +107,7 @@ Usage --keys STKEYS Specify list of Station Keys in the database to process. - --Zcomp ZCOMP Specify the Vertical Component Channel Identifier. + --zcomp ZCOMP Specify the Vertical Component Channel Identifier. [Default Z]. -c NAMECONV, --coord-system NAMECONV Coordinate system specification of instrument. (0) @@ -308,7 +308,7 @@ Usage --keys STKEYS Specify list of Station Keys in the database to process. - --Zcomp ZCOMP Specify the Vertical Component Channel Identifier. + --zcomp ZCOMP Specify the Vertical Component Channel Identifier. [Default Z]. -c NAMECONV, --coord-system NAMECONV Coordinate system specification of instrument. (0)