public class ResponseSpectra extends Object
In addition to a main() method, several utility methods are
provided for different target users. For instance
groundMotion(Gmm, Imt, GmmInput) and
spectrum(Gmm, GmmInput) are convenient for use within Matlab as they
return simple data container objects that are automatically converted to
Matlab structs and arrays. spectra(Set, GmmInput, boolean) returns a
more complex result and is for use with web services.
| Modifier and Type | Class and Description |
|---|---|
static class |
ResponseSpectra.MultiResult
The result of calling
spectra(Set, GmmInput, boolean). |
static class |
ResponseSpectra.Result
The result produced by calling
spectrum(Gmm, GmmInput). |
| Constructor and Description |
|---|
ResponseSpectra() |
| Modifier and Type | Method and Description |
|---|---|
static double[] |
groundMotion(Gmm model,
Imt imt,
GmmInput source)
Compute the median ground motion and its standard deviation for a specified
GroundMotionModel, intensity measure type (Imt ), and
source and site parameterization (GmmInput). |
static void |
main(String[] args)
Entry point for computing deterministic response spectra from the command
line.
|
static ResponseSpectra.MultiResult |
spectra(Set<Gmm> gmms,
GmmInput input,
boolean commonImts)
Compute the spectra of ground motions and their standard deviations for
multiple models and a source.
|
static ResponseSpectra.Result |
spectrum(Gmm model,
GmmInput input)
Compute a spectrum of ground motions and their standard deviations for a
specified
GroundMotionModel and source and site parameterization (
GmmInput). |
public static double[] groundMotion(Gmm model, Imt imt, GmmInput source)
GroundMotionModel, intensity measure type (Imt ), and
source and site parameterization (GmmInput).
enum types are identified in matlab as e.g. Gmm.ASK_14.
model - to useimt - intensity measure type (e.g. PGA, SA1P00)source - and site parameterizationpublic static ResponseSpectra.Result spectrum(Gmm model, GmmInput input)
GroundMotionModel and source and site parameterization (
GmmInput). All spectral periods supported by the model are
returned.
This method is intended for use with Matlab, which converts
Result to a struct automatically.
enum types are identified in matlab as e.g. Gmm.ASK_14.
model - to useinput - source and site parameterizationpublic static ResponseSpectra.MultiResult spectra(Set<Gmm> gmms, GmmInput input, boolean commonImts)
Gmms specified, or for every spectral acceleration
supported by each Gmm. PGA is included in the results with a
spectral period of 0.001s.gmms - GroundMotionModels to useinput - source and site parameterizationcommonImts - true if only ground motions corresponding to the
spectral accelerations common to all gmms should be
computed; false if all spectral accelerations supported by
each gmm should be used.ResponseSpectra.MultiResult data containerpublic static void main(String[] args)
java -cp nshmp-haz.jar org.opensha.programs.DeterministicSpectra ... ... ASK_14 6.5 10.0 10.3 10.0 90.0 14.0 0.5 7.5 0.0 760.0 true NaN NaN
args - [Gmm mag rJB rRup rX dip width zTop zHyp rake vs30 vsInf z1p0 z2p5]