Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
N
nshmp-haz
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
ghsc
National Seismic Hazard Model Project
nshmp-haz
Commits
44d2b876
Commit
44d2b876
authored
8 years ago
by
Powers, Peter M.
Committed by
GitHub
8 years ago
Browse files
Options
Downloads
Plain Diff
Merge pull request #206 from pmpowers-usgs/deagg-gmm-bug-205
Fix for deagg failures
parents
632d8548
61a97efc
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/org/opensha2/calc/Deaggregator.java
+11
-6
11 additions, 6 deletions
src/org/opensha2/calc/Deaggregator.java
with
11 additions
and
6 deletions
src/org/opensha2/calc/Deaggregator.java
+
11
−
6
View file @
44d2b876
...
@@ -157,15 +157,20 @@ final class Deaggregator {
...
@@ -157,15 +157,20 @@ final class Deaggregator {
for
(
Entry
<
Gmm
,
DeaggDataset
.
Builder
>
entry
:
datasetBuilders
.
entrySet
())
{
for
(
Entry
<
Gmm
,
DeaggDataset
.
Builder
>
entry
:
datasetBuilders
.
entrySet
())
{
/*
/*
* Scale, skipping clusters that do not contribute as their attendant
* Due to Gmm variations with distance, cluster curves for some GMMs may
* sources will also not contribute and 0/0 will yield NaNs.
* not have been calculated. Skip non-participating clusters (curve will
* be absent). Scale to total cluster rate. Builder rate > 0.0 check
* assures no 0/0 --> NaN and is necessary for curves that are present
* but that end below the target deagg iml.
*/
*/
Gmm
gmm
=
entry
.
getKey
();
Gmm
gmm
=
entry
.
getKey
();
DeaggDataset
.
Builder
clusterBuilder
=
entry
.
getValue
();
DeaggDataset
.
Builder
clusterBuilder
=
entry
.
getValue
();
XySequence
clusterCurve
=
clusterCurves
.
get
(
gmm
);
if
(
clusterCurves
.
containsKey
(
gmm
))
{
double
clusterRate
=
Deaggregation
.
RATE_INTERPOLATER
.
findY
(
clusterCurve
,
iml
);
XySequence
clusterCurve
=
clusterCurves
.
get
(
gmm
);
if
(
clusterBuilder
.
rate
()
>
0.0
)
{
double
clusterRate
=
Deaggregation
.
RATE_INTERPOLATER
.
findY
(
clusterCurve
,
iml
);
clusterBuilder
.
multiply
(
clusterRate
/
clusterBuilder
.
rate
());
if
(
clusterBuilder
.
rate
()
>
0.0
)
{
clusterBuilder
.
multiply
(
clusterRate
/
clusterBuilder
.
rate
());
}
}
}
/* Swap parents. */
/* Swap parents. */
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment