Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[WIP] correction to indexing to get fault-to-site distance for multifault disagg by source #10428

Merged
merged 1 commit into from
Mar 8, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion openquake/hazardlib/source/multi_fault.py
Original file line number Diff line number Diff line change
Expand Up @@ -276,7 +276,7 @@ def _set_rupids_by_tag(src, allrids, dists, s2i):
for tag, idxs in src.faults.items():
fids = U32([s2i[idx] for idx in idxs])
rid = np.argmin(dists[fids])
closest.append((dists[rid], tag, fids))
closest.append((dists[fids][rid], tag, fids))

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



# NB: as side effect delete _rupture_idxs,
# add .hdf5path and possibly .rupids_by_tag
def save_and_split(mfsources, sectiondict, hdf5path, site1=None,
Expand Down