@@ -1156,7 +1156,6 @@ def test_local_exceedance_intensity(self):
11561156 """Test local exceedance frequencies with lin lin interpolation"""
11571157 haz = dummy_hazard ()
11581158 haz .intensity = sparse .csr_matrix ([[1.0 , 3.0 , 1.0 ], [2.0 , 3.0 , 0.0 ]])
1159- haz .intensity_thres = 0.5
11601159 haz .frequency = np .full (2 , 1.0 )
11611160 return_period = np .array ([0.5 , 2.0 / 3.0 , 1.0 ])
11621161 # first centroid has intensities 1,2 with cum frequencies 2,1
@@ -1180,17 +1179,19 @@ def test_local_exceedance_intensity_methods(self):
11801179 haz .intensity = sparse .csr_matrix (
11811180 [[0 , 0 , 1e1 ], [0.2 , 1e1 , 1e2 ], [1e3 , 1e3 , 1e3 ]]
11821181 )
1183- haz . intensity_thres = 0.5
1182+ min_intensity = 0.5
11841183 haz .frequency = np .array ([1.0 , 0.1 , 0.01 ])
1185- return_period = (1000 , 30 , 0.1 )
1184+ return_periods = (1000 , 30 , 0.1 )
11861185 # first centroid has intensities 1e3 with frequencies .01, cum freq .01
11871186 # second centroid has intensities 1e1, 1e3 with cum frequencies .1, .01, cum freq .11, .01
11881187 # third centroid has intensities 1e1, 1e2, 1e3 with cum frequencies 1., .1, .01, cum freq 1.11, .11, .01
11891188 # testing at frequencies .001, .033, 10.
11901189
11911190 # test stepfunction
11921191 inten_stats , _ , _ = haz .local_exceedance_intensity (
1193- return_periods = (1000 , 30 , 0.1 ), method = "stepfunction"
1192+ return_periods = return_periods ,
1193+ method = "stepfunction" ,
1194+ min_intensity = min_intensity ,
11941195 )
11951196 np .testing .assert_allclose (
11961197 inten_stats .values [:, 1 :].astype (float ),
@@ -1199,7 +1200,9 @@ def test_local_exceedance_intensity_methods(self):
11991200
12001201 # test log log extrapolation
12011202 inten_stats , _ , _ = haz .local_exceedance_intensity (
1202- return_periods = (1000 , 30 , 0.1 ), method = "extrapolate"
1203+ return_periods = return_periods ,
1204+ method = "extrapolate" ,
1205+ min_intensity = min_intensity ,
12031206 )
12041207 np .testing .assert_allclose (
12051208 inten_stats .values [:, 1 :].astype (float ),
@@ -1209,7 +1212,9 @@ def test_local_exceedance_intensity_methods(self):
12091212
12101213 # test log log interpolation and extrapolation with constant
12111214 inten_stats , _ , _ = haz .local_exceedance_intensity (
1212- return_periods = (1000 , 30 , 0.1 ), method = "extrapolate_constant"
1215+ return_periods = return_periods ,
1216+ method = "extrapolate_constant" ,
1217+ min_intensity = min_intensity ,
12131218 )
12141219 np .testing .assert_allclose (
12151220 inten_stats .values [:, 1 :].astype (float ),
@@ -1219,7 +1224,7 @@ def test_local_exceedance_intensity_methods(self):
12191224
12201225 # test log log interpolation and no extrapolation
12211226 inten_stats , _ , _ = haz .local_exceedance_intensity (
1222- return_periods = ( 1000 , 30 , 0.1 )
1227+ return_periods = return_periods , min_intensity = min_intensity
12231228 )
12241229 np .testing .assert_allclose (
12251230 inten_stats .values [:, 1 :].astype (float ),
@@ -1235,6 +1240,7 @@ def test_local_exceedance_intensity_methods(self):
12351240 log_frequency = False ,
12361241 log_intensity = False ,
12371242 method = "extrapolate_constant" ,
1243+ min_intensity = min_intensity ,
12381244 )
12391245 np .testing .assert_allclose (
12401246 inten_stats .values [:, 1 :].astype (float ),
@@ -1270,7 +1276,6 @@ def test_local_return_period_methods(self):
12701276 haz .intensity = sparse .csr_matrix (
12711277 [[0 , 0 , 1e1 ], [0.0 , 1e1 , 1e2 ], [1e3 , 1e3 , 1e3 ]]
12721278 )
1273- haz .intensity_thres = 0.5
12741279 haz .frequency = np .array ([1.0 , 0.1 , 0.01 ])
12751280 # first centroid has intensities 1e3 with frequencies .01, cum freq .01
12761281 # second centroid has intensities 1e1, 1e3 with cum frequencies .1, .01, cum freq .11, .01
0 commit comments