|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Risk Targeted Ground Motion - API Documentation
|
|
|
|
|
|
|
|
This page describes the process for creating a request and also defines the terms used in the response output. Additionally some examples are provided to help get you started.
|
|
|
|
Request API
|
|
|
|
|
|
|
|
http://earthquake.usgs.gov/hazards/apps/rtgm_calculator/service/x0,x1,...xN/y0,y1,...yN[/callback]
|
|
|
|
|
|
|
|
x0,x1,...,xN
|
|
|
|
Comma-separated (no spaces) list of spectral acceleration values for the hazard curve. Note: You must specify the same number of y-values and x-values.
|
|
|
|
y0,y1,...,yN
|
|
|
|
Comma-separated (no spaces) list of annual frequency of exceedance values for the hazard curve. Note: You must specify the same number of y-values and x-values.
|
|
|
|
callback
|
|
|
|
Optional. If specified, the JSONP callback to call when the response is returned. This is useful for application developers. Note: If this parameter is specified, the response content-type header is changed from “application/json” to “text/javascript”
|
|
|
|
|
|
|
|
Note: All input hazard curve data must be adjusted with max-direction factors by the user before using the data in this application.
|
|
|
|
Response API
|
|
|
|
|
|
|
|
{
|
|
|
|
status: Response Code,
|
|
|
|
rtgm: {
|
|
|
|
rtgm: Risk-targeted Ground Motion,
|
|
|
|
uhgm: Uniform Hazard Ground Motion,
|
|
|
|
riskCoefficient: Risk Coefficient,
|
|
|
|
upsampledHazardCurve: {
|
|
|
|
xs: Spectral Response Acceleration,
|
|
|
|
ys: Annual Frequency of Exceedance
|
|
|
|
},
|
|
|
|
iterations: [
|
|
|
|
{
|
|
|
|
cdf: Conditional Collapse Probability,
|
|
|
|
pdf: Conditional Collapse Frequency Density,
|
|
|
|
integrand: Annual Collapse Frequency Density,
|
|
|
|
integral: 50-Year Collapse Probability
|
|
|
|
}
|
|
|
|
,…
|
|
|
|
],
|
|
|
|
originalHCMin: Minimum input SA value,
|
|
|
|
originalHCMax: Maximum input SA value
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
status
|
|
|
|
Integer
|
|
|
|
The HTTP Response Code for the request. A response of 200 indicates a successful request. Any other response code indicates an error.
|
|
|
|
rtgm
|
|
|
|
Number
|
|
|
|
Risk Target Ground Motion
|
|
|
|
uhgm
|
|
|
|
Number
|
|
|
|
Uniform Hazard Ground Motion
|
|
|
|
riskCoefficient
|
|
|
|
Number
|
|
|
|
RTGM divided by UHGM is equal to the Risk Coefficient (RTGM / UHGM = RiskCoefficient)
|
|
|
|
xs
|
|
|
|
Array of Numbers
|
|
|
|
Spectral response acceleration values upsampled from the input x-values. Upsampling may involve extrapolation at either (or both) end(s) of the hazard curve. Interpolated and extrapolated values are computed using linear interpolation in logarithmic space.
|
|
|
|
ys
|
|
|
|
Array of Numbers
|
|
|
|
Annual frequency of exceedance values upsampled from the input y-values. Upsampling may involve extrapolation at either (or both) end(s) of the hazard curve. Interpolated and extrapolated values are computed using linear interpolation in logarithmic space.
|
|
|
|
cdf
|
|
|
|
Array of Numbers
|
|
|
|
Conditional Collapse Probability. Data in this array correspond the the upsampled hazard curve x-values.
|
|
|
|
pdf
|
|
|
|
Array of Numbers
|
|
|
|
Conditional Collapse Probability Density. Data in this array correspond the the upsampled hazard curve x-values.
|
|
|
|
integrand
|
|
|
|
Array of Numbers
|
|
|
|
Annual Collapse Frequency Density. Data in this array correspond the the upsampled hazard curve x-values.
|
|
|
|
integral
|
|
|
|
Array of Numbers
|
|
|
|
50-Year Collapse Probability. Data in this array correspond the the upsampled hazard curve x-values.
|
|
|
|
originalHCMin
|
|
|
|
Number
|
|
|
|
The smallest input spectral response acceleration value. This is useful for determining if a resulting spectral acceleration value in the upsampled hazard curve is based on extrapolation.
|
|
|
|
originalHCMax
|
|
|
|
Number
|
|
|
|
The largest input spectral response acceleration value. This is useful for determining if a resulting spectral acceleration value in the upsampled hazard curve is based on extrapolation.
|
|
|
|
|
|
|
|
Examples
|
|
|
|
|
|
|
|
Example 1: JSON request, no callback is specified. Note the content-type header in the response.
|
|
|
|
http://earthquake.usgs.gov/hazards/apps/rtgm_calculator/service/0.01,0.1,0.2,0.3,0.4,0.5,0.6,0.7,0.8,0.9,1,1.1,1.2,1.4,1.7,2/0.5696,0.088335,0.02925,0.01229725,0.00564925,0.00275075,0.001385175,0.000733875,0.0003984225,0.0002205625,0.0001235975,6.881825E-5,3.82493775E-5,1.13329875E-5,1.34645E-6,6.4884E-8
|
|
|
|
Example 2: JSONP request, a callback is specified. Note the content-type header in the response. The response for this request is wrapped in the specified javascript callback.
|
|
|
|
http://earthquake.usgs.gov/hazards/apps/rtgm_calculator/service/0.01,0.1,0.2,0.3,0.4,0.5,0.6,0.7,0.8,0.9,1,1.1,1.2,1.4,1.7,2/0.5739,0.09486,0.032775,0.0143475,0.00689675,0.00349925,0.001878025,0.0010358,0.00059415,0.00034517,0.0002041625,0.00012253,7.213325E-5,2.5567215E-5,4.81976025E-6,7.196E-7/processData
|
|
|
|
|