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
Admin message
Maintenance scheduled for Thursday, April 10, from 5 PM to 6 PM ET.
Show more breadcrumbs
ghsc
National Seismic Hazard Model Project
nshmp-haz
Commits
f13ada7f
Commit
f13ada7f
authored
9 years ago
by
Powers, Peter M.
Browse files
Options
Downloads
Patches
Plain Diff
exceedance model notes
parent
70f899db
No related branches found
Branches containing commit
No related tags found
Tags containing commit
1 merge request
!57
Deagg and dependency updates
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/org/opensha2/calc/ExceedanceModel.java
+9
-2
9 additions, 2 deletions
src/org/opensha2/calc/ExceedanceModel.java
with
9 additions
and
2 deletions
src/org/opensha2/calc/ExceedanceModel.java
+
9
−
2
View file @
f13ada7f
...
...
@@ -3,6 +3,8 @@ package org.opensha2.calc;
import
static
java
.
lang
.
Math
.
exp
;
import
static
java
.
lang
.
Math
.
log
;
import
static
java
.
lang
.
Math
.
min
;
import
static
java
.
lang
.
Math
.
sqrt
;
import
static
java
.
lang
.
Math
.
PI
;
import
static
org
.
opensha2
.
gmm
.
Imt
.
PGA
;
import
static
org
.
opensha2
.
gmm
.
Imt
.
PGV
;
import
static
org
.
opensha2
.
gmm
.
Imt
.
SA0P75
;
...
...
@@ -106,7 +108,7 @@ public enum ExceedanceModel {
/*
* This is messy for now; TODO need to figure out the best way to pass in
* fixed sigmas. The peer models below simply set a value internally as
* dicated by the test cases that use
h
tese models.
* dicated by the test cases that use t
h
ese models.
*/
PEER_MIXTURE_REFERENCE
{
@Override
double
exceedance
(
double
μ
,
double
σ
,
double
n
,
Imt
imt
,
double
value
)
{
...
...
@@ -200,7 +202,8 @@ public enum ExceedanceModel {
*/
abstract
XySequence
exceedance
(
double
μ
,
double
σ
,
double
n
,
Imt
imt
,
XySequence
sequence
);
private
static
final
double
SQRT_2
=
Math
.
sqrt
(
2
);
private
static
final
double
SQRT_2
=
sqrt
(
2
);
private
static
final
double
SQRT_2PI
=
sqrt
(
2
*
PI
);
/*
* Step function.
...
...
@@ -217,6 +220,10 @@ public enum ExceedanceModel {
private
static
double
ccdFn
(
double
μ
,
double
σ
,
double
value
)
{
return
(
1.0
+
erf
((
μ
-
value
)
/
(
σ
*
SQRT_2
)))
*
0.5
;
}
private
static
double
probFn
(
double
μ
,
double
σ
,
double
x
)
{
return
exp
((
μ
-
x
)
*
(
x
-
μ
)
/
(
2
*
σ
*
σ
))
/
(
σ
*
SQRT_2PI
);
}
/*
* Bounded complementary cumulative distribution. Compute the probability
...
...
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