[installation] Init with inital config for global

This commit is contained in:
2025-10-30 15:08:17 +01:00
commit 7640b452ed
3678 changed files with 2200095 additions and 0 deletions

View File

@ -0,0 +1,36 @@
#!/usr/bin/env python3
############################################################################
# Copyright (C) 2024 by gempa GmbH #
# #
# All Rights Reserved. #
# #
# NOTICE: All information contained herein is, and remains #
# the property of gempa GmbH and its suppliers, if any. The intellectual #
# and technical concepts contained herein are proprietary to gempa GmbH #
# and its suppliers. #
# Dissemination of this information or reproduction of this material #
# is strictly forbidden unless prior written permission is obtained #
# from gempa GmbH. #
############################################################################
import numpy as np
from gempa import CAPS
def calculateAbsPerc(grid, percentile=99.9):
grid_array = np.array(grid)
result = np.percentile(np.abs(grid_array), percentile)
return result
def parseTime(s):
formats = ["%F", "%F %T", "%F %T.%Z", "%FT%T", "%FT%T.%Z"]
for fmt in formats:
time = CAPS.Time.FromString(s, fmt)
if time.valid():
return time
return None