PhaseAssociator/phase_associator_wrapper.py

62 lines
2.7 KiB
Python
Raw Permalink Normal View History

2024-12-08 14:57:01 +01:00
# -----------------
# Copyright © 2024 ACK Cyfronet AGH, Poland.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
# This work was partially funded by DT-GEO Project.
# -----------------
import sys
import argparse
from PyOctoPhaseAssociation import main as phaseassoc
def main(argv):
raise ValueError("Test error from branch experimental-test-live-code-editing")
2024-12-08 14:57:01 +01:00
parser = argparse.ArgumentParser()
parser.add_argument("qml_picks", help="Path to input file of type 'quakeml_seismogram_picks'")
parser.add_argument("inventory", nargs='+', help="Paths to input files of type 'inventory'")
parser.add_argument("--velocity_model", help="Path to input file of type 'velocity_model'", type=str,
required=False)
parser.add_argument("--lat_min", type=float)
parser.add_argument("--lat_max", type=float)
parser.add_argument("--lon_min", type=float)
parser.add_argument("--lon_max", type=float)
parser.add_argument("--z_min", type=float)
parser.add_argument("--z_max", type=float)
parser.add_argument("--grid_hor_extent", type=float, default=None, required=False)
parser.add_argument("--grid_spacing", type=float, default=None, required=False)
parser.add_argument("--p_vel_const", type=float, default=None, required=False)
parser.add_argument("--s_vel_const", type=float, default=None, required=False)
parser.add_argument("--n_picks", type=int, default=4, required=False)
parser.add_argument("--n_p_picks", type=int, default=0, required=False)
parser.add_argument("--n_s_picks", type=int, default=0, required=False)
parser.add_argument("--n_p_s_picks", type=int, default=0, required=False)
parser.add_argument("--time_before", type=float, default=10, required=False)
parser.add_argument("--tolerance", type=float, default=1, required=False)
parser.add_argument("--assoc_cut_dist", type=float, default=250, required=False)
parser.add_argument("--pick_match_tolerance", type=float, default=0.5, required=False)
parser.add_argument("--p_hint", type=str, default="P", required=False)
parser.add_argument("--s_hint", type=str, default="S", required=False)
args = parser.parse_args()
phaseassoc(**vars(args))
return
if __name__ == '__main__':
main(sys.argv)