/
armenia_2016_test.py
104 lines (85 loc) · 3.65 KB
/
armenia_2016_test.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
# -*- coding: utf-8 -*-
# vim: tabstop=4 shiftwidth=4 softtabstop=4
#
# Copyright (C) 2015-2021 GEM Foundation
#
# OpenQuake is free software: you can redistribute it and/or modify it
# under the terms of the GNU Affero General Public License as published
# by the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# OpenQuake is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Affero General Public License for more details.
#
# You should have received a copy of the GNU Affero General Public License
# along with OpenQuake. If not, see <http://www.gnu.org/licenses/>.
"""
Implements the set of tests for the adjustments of a selected set of
Ground Motion Prediction Equations proposed for application to PSHA in
Armenia
Each of the test tables is generated from the original GMPE tables, which are
subsequently modified using the adjustment factors presented in the module
openquake.hazardlib.gsim.armenia_2016
"""
from openquake.hazardlib.gsim.armenia_2016 import (AkkarEtAlRjb2014Armenia,
BindiEtAl2014RjbArmenia,
BooreEtAl2014LowQArmenia,
CauzziEtAl2014Armenia,
ChiouYoungs2014Armenia,
KaleEtAl2015Armenia,
KothaEtAl2016Armenia)
from openquake.hazardlib.tests.gsim.utils import BaseGSIMTestCase
# Discrepency percentages to be applied to all tests
MEAN_DISCREP = 0.01
class AkkarEtAlRjb2014ArmeniaTestCase(BaseGSIMTestCase):
"""
Tests the Armenia calibrated adjustment of the Akkar et al. (2014)
GMPE
"""
GSIM_CLASS = AkkarEtAlRjb2014Armenia
MEAN_FILE = "armenia_2016/AKKAR14_ARMENIA_MEAN.csv"
def test_mean(self):
self.check(self.MEAN_FILE,
max_discrep_percentage=MEAN_DISCREP)
class BindiEtAl2014RjbArmeniaTestCase(AkkarEtAlRjb2014ArmeniaTestCase):
"""
Tests the Armenia calibrated adjustment of the Bindi et al. (2014)
GMPE
"""
GSIM_CLASS = BindiEtAl2014RjbArmenia
MEAN_FILE = "armenia_2016/BINDI14_ARMENIA_MEAN.csv"
class BooreEtAl2014LowQArmeniaTestCase(AkkarEtAlRjb2014ArmeniaTestCase):
"""
Tests the Armenia calibrated adjustment of the Boore et al. (2014) Low Q
GMPE
"""
GSIM_CLASS = BooreEtAl2014LowQArmenia
MEAN_FILE = "armenia_2016/BSSA14LOWQ_ARMENIA_MEAN.csv"
class CauzziEtAl2014ArmeniaTestCase(AkkarEtAlRjb2014ArmeniaTestCase):
"""
Tests the Armenia calibrated adjustment of the Cauzzi et al. (2014) GMPE
"""
GSIM_CLASS = CauzziEtAl2014Armenia
MEAN_FILE = "armenia_2016/CAUZZI14_ARMENIA_MEAN.csv"
class ChiouYoungs2014ArmeniaTestCase(AkkarEtAlRjb2014ArmeniaTestCase):
"""
Tests the Armenia calibrated adjustment of the Chiou & Youngs (2014) GMPE
"""
GSIM_CLASS = ChiouYoungs2014Armenia
MEAN_FILE = "armenia_2016/CY14_ARMENIA_MEAN.csv"
class KaleEtAl2015ArmeniaTestCase(AkkarEtAlRjb2014ArmeniaTestCase):
"""
Tests the Armenia calibrated adjustment of the Kale et al. (2015) Turkey
GMPE
"""
GSIM_CLASS = KaleEtAl2015Armenia
MEAN_FILE = "armenia_2016/KALE15_ARMENIA_MEAN.csv"
class KothaEtAl2016ArmeniaTestCase(AkkarEtAlRjb2014ArmeniaTestCase):
"""
Tests the Armenia calibrated adjustment of the Kotha et al. (2016) Turkey
GMPE
"""
GSIM_CLASS = KothaEtAl2016Armenia
MEAN_FILE = "armenia_2016/KOTHA16_ARMENIA_MEAN.csv"