Skip to content

Commit

Permalink
Restored step**2
Browse files Browse the repository at this point in the history
  • Loading branch information
Michele Simionato committed Jan 23, 2025
1 parent 9dd2e72 commit 9406eb4
Show file tree
Hide file tree
Showing 15 changed files with 604 additions and 602 deletions.
2 changes: 2 additions & 0 deletions openquake/hazardlib/contexts.py
Original file line number Diff line number Diff line change
Expand Up @@ -1311,6 +1311,8 @@ def estimate_weight(self, src, srcfilter, multiplier=1):
weight = src.dt * src.num_ruptures / self.num_rups
if src.code == b'F': # avoid over-weight in the USA model
weight /= 3.
elif src.code == b'N': # increase weight in SAM
weight *= 3.
return weight or EPS, int(esites)

def set_weight(self, sources, srcfilter, multiplier=1, mon=Monitor()):
Expand Down
2 changes: 1 addition & 1 deletion openquake/hazardlib/source/non_parametric.py
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ def iter_ruptures(self, **kwargs):
rupture.NonParametricProbabilisticRupture`.
"""
step = kwargs.get('step', 1)
for rup, pmf in self.data[::step*2]:
for rup, pmf in self.data[::step**2]:
yield NonParametricProbabilisticRupture(
rup.mag, rup.rake, self.tectonic_region_type,
rup.hypocenter, rup.surface, pmf,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
#,,,,,,,,,,,,,,,,,,,,,,"generated_by='OpenQuake engine 3.20.0-git6a5db97d59', start_date='2024-06-03T09:36:08', checksum=2596980115, kind='mean', investigation_time=1.0, imt='PGA'"
#,,,,,,,,,,,,,,,,,,,,,,"generated_by='OpenQuake engine 3.23.0-git9dd2e721c7', start_date='2025-01-23T16:20:41', checksum=2596980115, kind='mean', investigation_time=1.0, imt='PGA'"
lon,lat,depth,poe-0.0050000,poe-0.0070015,poe-0.0098041,poe-0.0137286,poe-0.0192240,poe-0.0269192,poe-0.0376948,poe-0.0527836,poe-0.0739125,poe-0.1034991,poe-0.1449289,poe-0.2029427,poe-0.2841789,poe-0.3979333,poe-0.5572227,poe-0.7802743,poe-1.0926116,poe-1.5299748,poe-2.1424109,poe-3.0000000
86.00000,37.00000,0.00000,7.374808E-03,7.295492E-03,7.047556E-03,6.460672E-03,5.408785E-03,3.980057E-03,2.508767E-03,1.354287E-03,6.518317E-04,3.017292E-04,1.394043E-04,6.289418E-05,2.645243E-05,8.490015E-06,1.870199E-06,4.648973E-08,0.000000E+00,0.000000E+00,0.000000E+00,0.000000E+00
86.00000,37.00000,0.00000,7.374879E-03,7.295492E-03,7.047564E-03,6.460645E-03,5.408832E-03,3.980094E-03,2.508750E-03,1.354306E-03,6.518767E-04,3.018127E-04,1.394127E-04,6.294250E-05,2.646446E-05,8.523464E-06,1.907349E-06,5.960464E-08,0.000000E+00,0.000000E+00,0.000000E+00,0.000000E+00
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
#,,,,,,,,,,,,,,,,,,,,,,"generated_by='OpenQuake engine 3.20.0-git6a5db97d59', start_date='2024-06-03T09:36:05', checksum=3148637684, kind='mean', investigation_time=1.0, imt='PGA'"
#,,,,,,,,,,,,,,,,,,,,,,"generated_by='OpenQuake engine 3.23.0-git9dd2e721c7', start_date='2025-01-23T16:20:43', checksum=3148637684, kind='mean', investigation_time=1.0, imt='PGA'"
lon,lat,depth,poe-0.0050000,poe-0.0070015,poe-0.0098041,poe-0.0137286,poe-0.0192240,poe-0.0269192,poe-0.0376948,poe-0.0527836,poe-0.0739125,poe-0.1034991,poe-0.1449289,poe-0.2029427,poe-0.2841789,poe-0.3979333,poe-0.5572227,poe-0.7802743,poe-1.0926116,poe-1.5299748,poe-2.1424109,poe-3.0000000
-89.83000,35.82000,0.00000,7.197409E-04,7.197409E-04,7.197409E-04,7.197409E-04,7.197409E-04,7.197406E-04,7.197299E-04,7.195583E-04,7.180371E-04,7.096042E-04,6.790786E-04,6.047827E-04,4.793603E-04,3.271342E-04,1.890527E-04,9.182092E-05,3.724621E-05,1.217236E-05,2.927064E-06,3.248160E-07
-89.83000,35.82000,0.00000,7.197792E-04,7.197792E-04,7.197792E-04,7.197792E-04,7.197792E-04,7.197792E-04,7.197197E-04,7.196601E-04,7.180514E-04,7.095906E-04,6.790241E-04,6.047208E-04,4.793458E-04,3.271450E-04,1.889982E-04,9.178927E-05,3.719300E-05,1.215932E-05,2.980230E-06,2.980232E-07
82 changes: 41 additions & 41 deletions openquake/qa_tests_data/disagg/case_8/expected/Mag_Dist-0.csv
Original file line number Diff line number Diff line change
@@ -1,42 +1,42 @@
#,,,,,"generated_by='OpenQuake engine 3.18.0-gitabf2de85b8', start_date='2023-10-03T06:09:10', checksum=3058618827, investigation_time=1.0, mag_bin_edges=[5.6, 6.0, 6.4, 6.8, 7.0, 7.2], dist_bin_edges=[0, 25, 50, 75, 100, 125, 150, 175, 200], lon_bin_edges=[-1.79864, 1.79864], lat_bin_edges=[-1.79864, 1.79864], eps_bin_edges=[-6.0, 6.0], tectonic_region_types=['Active Shallow Crust'], lon=0.0, lat=0.0, weights=[1.0], rlz_ids=[0]"
#,,,,,"generated_by='OpenQuake engine 3.23.0-git9dd2e721c7', start_date='2025-01-23T16:21:02', checksum=3058618827, investigation_time=1.0, mag_bin_edges=[5.6, 6.0, 6.4, 6.8, 7.0, 7.2], dist_bin_edges=[0, 25, 50, 75, 100, 125, 150, 175, 200], lon_bin_edges=[-1.79864, 1.79864], lat_bin_edges=[-1.79864, 1.79864], eps_bin_edges=[-6.0, 6.0], tectonic_region_types=['Active Shallow Crust'], lon=0.0, lat=0.0, weights=[1.0], rlz_ids=[0]"
imt,iml,poe,mag,dist,rlz0
SA(0.1),1.83113E+00,2.10500E-03,5.80000E+00,1.25000E+01,0.00000E+00
SA(0.1),1.83113E+00,2.10500E-03,5.80000E+00,3.75000E+01,8.04267E-09
SA(0.1),1.83113E+00,2.10500E-03,5.80000E+00,6.25000E+01,0.00000E+00
SA(0.1),1.83113E+00,2.10500E-03,5.80000E+00,8.75000E+01,0.00000E+00
SA(0.1),1.83113E+00,2.10500E-03,5.80000E+00,1.12500E+02,0.00000E+00
SA(0.1),1.83113E+00,2.10500E-03,5.80000E+00,1.37500E+02,0.00000E+00
SA(0.1),1.83113E+00,2.10500E-03,5.80000E+00,1.62500E+02,0.00000E+00
SA(0.1),1.83113E+00,2.10500E-03,5.80000E+00,1.87500E+02,0.00000E+00
SA(0.1),1.83113E+00,2.10500E-03,6.20000E+00,1.25000E+01,0.00000E+00
SA(0.1),1.83113E+00,2.10500E-03,6.20000E+00,3.75000E+01,0.00000E+00
SA(0.1),1.83113E+00,2.10500E-03,6.20000E+00,6.25000E+01,0.00000E+00
SA(0.1),1.83113E+00,2.10500E-03,6.20000E+00,8.75000E+01,0.00000E+00
SA(0.1),1.83113E+00,2.10500E-03,6.20000E+00,1.12500E+02,0.00000E+00
SA(0.1),1.83113E+00,2.10500E-03,6.20000E+00,1.37500E+02,0.00000E+00
SA(0.1),1.83113E+00,2.10500E-03,6.20000E+00,1.62500E+02,0.00000E+00
SA(0.1),1.83113E+00,2.10500E-03,6.20000E+00,1.87500E+02,0.00000E+00
SA(0.1),1.83113E+00,2.10500E-03,6.60000E+00,1.25000E+01,2.10654E-03
SA(0.1),1.83113E+00,2.10500E-03,6.60000E+00,3.75000E+01,0.00000E+00
SA(0.1),1.83113E+00,2.10500E-03,6.60000E+00,6.25000E+01,0.00000E+00
SA(0.1),1.83113E+00,2.10500E-03,6.60000E+00,8.75000E+01,0.00000E+00
SA(0.1),1.83113E+00,2.10500E-03,6.60000E+00,1.12500E+02,0.00000E+00
SA(0.1),1.83113E+00,2.10500E-03,6.60000E+00,1.37500E+02,0.00000E+00
SA(0.1),1.83113E+00,2.10500E-03,6.60000E+00,1.62500E+02,0.00000E+00
SA(0.1),1.83113E+00,2.10500E-03,6.60000E+00,1.87500E+02,0.00000E+00
SA(0.1),1.83113E+00,2.10500E-03,6.90000E+00,1.25000E+01,0.00000E+00
SA(0.1),1.83113E+00,2.10500E-03,6.90000E+00,3.75000E+01,2.06684E-06
SA(0.1),1.83113E+00,2.10500E-03,6.90000E+00,6.25000E+01,0.00000E+00
SA(0.1),1.83113E+00,2.10500E-03,6.90000E+00,8.75000E+01,0.00000E+00
SA(0.1),1.83113E+00,2.10500E-03,6.90000E+00,1.12500E+02,0.00000E+00
SA(0.1),1.83113E+00,2.10500E-03,6.90000E+00,1.37500E+02,0.00000E+00
SA(0.1),1.83113E+00,2.10500E-03,6.90000E+00,1.62500E+02,0.00000E+00
SA(0.1),1.83113E+00,2.10500E-03,6.90000E+00,1.87500E+02,0.00000E+00
SA(0.1),1.83113E+00,2.10500E-03,7.10000E+00,1.25000E+01,0.00000E+00
SA(0.1),1.83113E+00,2.10500E-03,7.10000E+00,3.75000E+01,0.00000E+00
SA(0.1),1.83113E+00,2.10500E-03,7.10000E+00,6.25000E+01,0.00000E+00
SA(0.1),1.83113E+00,2.10500E-03,7.10000E+00,8.75000E+01,0.00000E+00
SA(0.1),1.83113E+00,2.10500E-03,7.10000E+00,1.12500E+02,0.00000E+00
SA(0.1),1.83113E+00,2.10500E-03,7.10000E+00,1.37500E+02,0.00000E+00
SA(0.1),1.83113E+00,2.10500E-03,7.10000E+00,1.62500E+02,0.00000E+00
SA(0.1),1.83113E+00,2.10500E-03,7.10000E+00,1.87500E+02,0.00000E+00
SA(0.1),1.83114E+00,2.10500E-03,5.80000E+00,1.25000E+01,0.00000E+00
SA(0.1),1.83114E+00,2.10500E-03,5.80000E+00,3.75000E+01,8.04234E-09
SA(0.1),1.83114E+00,2.10500E-03,5.80000E+00,6.25000E+01,0.00000E+00
SA(0.1),1.83114E+00,2.10500E-03,5.80000E+00,8.75000E+01,0.00000E+00
SA(0.1),1.83114E+00,2.10500E-03,5.80000E+00,1.12500E+02,0.00000E+00
SA(0.1),1.83114E+00,2.10500E-03,5.80000E+00,1.37500E+02,0.00000E+00
SA(0.1),1.83114E+00,2.10500E-03,5.80000E+00,1.62500E+02,0.00000E+00
SA(0.1),1.83114E+00,2.10500E-03,5.80000E+00,1.87500E+02,0.00000E+00
SA(0.1),1.83114E+00,2.10500E-03,6.20000E+00,1.25000E+01,0.00000E+00
SA(0.1),1.83114E+00,2.10500E-03,6.20000E+00,3.75000E+01,0.00000E+00
SA(0.1),1.83114E+00,2.10500E-03,6.20000E+00,6.25000E+01,0.00000E+00
SA(0.1),1.83114E+00,2.10500E-03,6.20000E+00,8.75000E+01,0.00000E+00
SA(0.1),1.83114E+00,2.10500E-03,6.20000E+00,1.12500E+02,0.00000E+00
SA(0.1),1.83114E+00,2.10500E-03,6.20000E+00,1.37500E+02,0.00000E+00
SA(0.1),1.83114E+00,2.10500E-03,6.20000E+00,1.62500E+02,0.00000E+00
SA(0.1),1.83114E+00,2.10500E-03,6.20000E+00,1.87500E+02,0.00000E+00
SA(0.1),1.83114E+00,2.10500E-03,6.60000E+00,1.25000E+01,2.10650E-03
SA(0.1),1.83114E+00,2.10500E-03,6.60000E+00,3.75000E+01,0.00000E+00
SA(0.1),1.83114E+00,2.10500E-03,6.60000E+00,6.25000E+01,0.00000E+00
SA(0.1),1.83114E+00,2.10500E-03,6.60000E+00,8.75000E+01,0.00000E+00
SA(0.1),1.83114E+00,2.10500E-03,6.60000E+00,1.12500E+02,0.00000E+00
SA(0.1),1.83114E+00,2.10500E-03,6.60000E+00,1.37500E+02,0.00000E+00
SA(0.1),1.83114E+00,2.10500E-03,6.60000E+00,1.62500E+02,0.00000E+00
SA(0.1),1.83114E+00,2.10500E-03,6.60000E+00,1.87500E+02,0.00000E+00
SA(0.1),1.83114E+00,2.10500E-03,6.90000E+00,1.25000E+01,0.00000E+00
SA(0.1),1.83114E+00,2.10500E-03,6.90000E+00,3.75000E+01,2.06676E-06
SA(0.1),1.83114E+00,2.10500E-03,6.90000E+00,6.25000E+01,0.00000E+00
SA(0.1),1.83114E+00,2.10500E-03,6.90000E+00,8.75000E+01,0.00000E+00
SA(0.1),1.83114E+00,2.10500E-03,6.90000E+00,1.12500E+02,0.00000E+00
SA(0.1),1.83114E+00,2.10500E-03,6.90000E+00,1.37500E+02,0.00000E+00
SA(0.1),1.83114E+00,2.10500E-03,6.90000E+00,1.62500E+02,0.00000E+00
SA(0.1),1.83114E+00,2.10500E-03,6.90000E+00,1.87500E+02,0.00000E+00
SA(0.1),1.83114E+00,2.10500E-03,7.10000E+00,1.25000E+01,0.00000E+00
SA(0.1),1.83114E+00,2.10500E-03,7.10000E+00,3.75000E+01,0.00000E+00
SA(0.1),1.83114E+00,2.10500E-03,7.10000E+00,6.25000E+01,0.00000E+00
SA(0.1),1.83114E+00,2.10500E-03,7.10000E+00,8.75000E+01,0.00000E+00
SA(0.1),1.83114E+00,2.10500E-03,7.10000E+00,1.12500E+02,0.00000E+00
SA(0.1),1.83114E+00,2.10500E-03,7.10000E+00,1.37500E+02,0.00000E+00
SA(0.1),1.83114E+00,2.10500E-03,7.10000E+00,1.62500E+02,0.00000E+00
SA(0.1),1.83114E+00,2.10500E-03,7.10000E+00,1.87500E+02,0.00000E+00
Loading

0 comments on commit 9406eb4

Please sign in to comment.