ISEPOS-2364 initial application code
This commit is contained in:
57
src/shf_wrapper.py
Normal file
57
src/shf_wrapper.py
Normal file
@@ -0,0 +1,57 @@
|
||||
# -----------------
|
||||
# Copyright © 2025 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 seismic_hazard_forecasting import main as shf
|
||||
|
||||
|
||||
def main(argv):
|
||||
parser = argparse.ArgumentParser()
|
||||
|
||||
parser.add_argument("catalog", help="Path to input file of type 'catalog'")
|
||||
parser.add_argument("--mc_file", help="Path to input file of type 'mccalc_output'", type=str, default=None, required=False)
|
||||
parser.add_argument("--pdf_file", help="Path to input file of type 'PDF'", type=str, default=None, required=False)
|
||||
parser.add_argument("--m_file", help="Path to input file of type 'm'", type=str, default=None, required=False)
|
||||
|
||||
parser.add_argument("--m_select", type=bool)
|
||||
parser.add_argument("--mag_label", type=str, default=None, required=False)
|
||||
parser.add_argument("--mc", type=float, default=None, required=False)
|
||||
parser.add_argument("--m_max", type=float, default=None, required=False)
|
||||
parser.add_argument("--m_kde_method", type=str)
|
||||
parser.add_argument("--xy_select", type=bool)
|
||||
parser.add_argument("--grid_dim", type=int)
|
||||
parser.add_argument("--xy_win_method", type=bool)
|
||||
parser.add_argument("--rate_select", type=bool)
|
||||
parser.add_argument("--time_win_duration", type=float)
|
||||
parser.add_argument("--forecast_select", type=bool)
|
||||
parser.add_argument("--custom_rate", type=float, default=None, required=False)
|
||||
parser.add_argument("--forecast_len", type=float)
|
||||
parser.add_argument("--time_unit", type=str)
|
||||
parser.add_argument("--model", type=str)
|
||||
parser.add_argument("--products_string", type=str)
|
||||
parser.add_argument("--verbose", type=bool)
|
||||
|
||||
args = parser.parse_args()
|
||||
shf(**vars(args))
|
||||
return
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
main(sys.argv)
|
Reference in New Issue
Block a user