GNS-Science / nzshm-opensha

renamed successor to old nshm-nz-opensha , all python history removed to new nzshm-runzi repo
MIT License
0 stars 2 forks source link

[301] Create DownDip connectedness constraint #302

Closed voj closed 5 months ago

voj commented 5 months ago

Fixes #301

This adds a connectedness constraint to the DownDipPermutationStrategy. It ensures that during rupture generation we drop any subduction ruptures that are disconnected, i.e. have a gap in them.

I have also pulled the constraints into their own DownDipConstraints file to make it easier to understand both them and the DownDipPermutationStrategy. This allowed for more focussed testing of the DownDipConstraints. Unit tests now ask directly, "does this rupture satisfy the constraint?" rather than looking at all the permutations that the DownDipPermutationStrategy generates.

If the output of the connectedness constraint is negated, then we can use it to generate a rupture set that contains exactly those disconnected ruptures that have been included in the NZSHM22 Puysegur rupture set.

I strongly suggest ignoring whitespace when looking at the changes. Screenshot 2024-03-18 114527