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
e882b8e6
Commit
e882b8e6
authored
2 years ago
by
Clayton, Brandon Scott
Browse files
Options
Downloads
Plain Diff
Merge branch 'issue-527' into 'main'
Resolves - Make bounds on IML values available Closes
#527
See merge request
!643
parents
cde6a729
3d5bb66c
No related branches found
Branches containing commit
No related tags found
Tags containing commit
2 merge requests
!644
Production Release | nshmp-haz
,
!643
Resolves - Make bounds on IML values available
Pipeline
#154030
passed
2 years ago
Stage: build
Stage: trigger
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/main/java/gov/usgs/earthquake/nshmp/www/hazard/DisaggService.java
+36
-7
36 additions, 7 deletions
...a/gov/usgs/earthquake/nshmp/www/hazard/DisaggService.java
with
36 additions
and
7 deletions
src/main/java/gov/usgs/earthquake/nshmp/www/hazard/DisaggService.java
+
36
−
7
View file @
e882b8e6
...
...
@@ -34,7 +34,7 @@ import gov.usgs.earthquake.nshmp.www.ResponseMetadata;
import
gov.usgs.earthquake.nshmp.www.ServletUtil
;
import
gov.usgs.earthquake.nshmp.www.ServletUtil.Server
;
import
gov.usgs.earthquake.nshmp.www.hazard.HazardService.BaseRequest
;
import
gov.usgs.earthquake.nshmp.www.
hazard.HazardService.Metadata
;
import
gov.usgs.earthquake.nshmp.www.
meta.DoubleParameter
;
import
gov.usgs.earthquake.nshmp.www.meta.Parameter
;
import
io.micronaut.http.HttpRequest
;
...
...
@@ -263,15 +263,15 @@ public final class DisaggService {
}
static
final
class
Response
{
final
Response
.
Metadata
metadata
;
final
ResponseMetadata
metadata
;
final
List
<
ImtDisagg
>
disaggs
;
Response
(
Response
.
Metadata
metadata
,
List
<
ImtDisagg
>
disaggs
)
{
Response
(
ResponseMetadata
metadata
,
List
<
ImtDisagg
>
disaggs
)
{
this
.
metadata
=
metadata
;
this
.
disaggs
=
disaggs
;
}
public
Response
.
Metadata
getMetadata
()
{
public
ResponseMetadata
getMetadata
()
{
return
metadata
;
}
...
...
@@ -279,14 +279,14 @@ public final class DisaggService {
return
disaggs
;
}
private
static
final
class
Metadata
{
private
static
final
class
Response
Metadata
{
final
Server
server
;
final
String
rlabel
=
"Closest Distance, rRup (km)"
;
final
String
mlabel
=
"Magnitude (Mw)"
;
final
String
εlabel
=
"% Contribution to Hazard"
;
final
Object
εbins
;
Metadata
(
Server
server
,
Object
εbins
)
{
Response
Metadata
(
Server
server
,
Object
εbins
)
{
this
.
server
=
server
;
this
.
εbins
=
εbins
;
}
...
...
@@ -361,7 +361,7 @@ public final class DisaggService {
var
server
=
ServletUtil
.
serverData
(
ServletUtil
.
THREAD_COUNT
,
timer
);
return
new
Response
(
new
Response
.
Metadata
(
server
,
disagg
.
εBins
()),
new
ResponseMetadata
(
server
,
disagg
.
εBins
()),
disaggs
);
}
}
...
...
@@ -386,4 +386,33 @@ public final class DisaggService {
return
data
;
}
}
private
static
class
Metadata
extends
HazardService
.
Metadata
{
final
DoubleParameter
iml
;
final
DoubleParameter
returnPeriod
;
Metadata
(
HazardModel
model
)
{
super
(
model
);
iml
=
new
DoubleParameter
(
"Intensity Measure Level"
,
""
,
imlRange
.
lowerEndpoint
(),
imlRange
.
upperEndpoint
());
returnPeriod
=
new
DoubleParameter
(
"Return Period"
,
"yr"
,
rpRange
.
lowerEndpoint
(),
rpRange
.
upperEndpoint
());
}
public
DoubleParameter
getIml
()
{
return
iml
;
}
public
DoubleParameter
getReturnPeriod
()
{
return
returnPeriod
;
}
}
}
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