Skip to content

Commit 86559ab

Browse files
authored
Merge pull request #10428 from gem/fix_dist_idx_mfs
[WIP] correction to indexing to get fault-to-site distance for multifault disagg by source
2 parents afb3958 + f7d961d commit 86559ab

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

openquake/hazardlib/source/multi_fault.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -276,7 +276,7 @@ def _set_rupids_by_tag(src, allrids, dists, s2i):
276276
for tag, idxs in src.faults.items():
277277
fids = U32([s2i[idx] for idx in idxs])
278278
rid = np.argmin(dists[fids])
279-
closest.append((dists[rid], tag, fids))
279+
closest.append((dists[fids][rid], tag, fids))
280280

281281
# build dictionary src.rupids_by_tag with the indices of
282282
# ruptures belonging to each fault source; care is taken
@@ -301,6 +301,7 @@ def _set_rupids_by_tag(src, allrids, dists, s2i):
301301
src.rupids_by_tag['off_rupids'] = off_rupids
302302

303303

304+
304305
# NB: as side effect delete _rupture_idxs,
305306
# add .hdf5path and possibly .rupids_by_tag
306307
def save_and_split(mfsources, sectiondict, hdf5path, site1=None,

0 commit comments

Comments
 (0)