Skip to content
Snippets Groups Projects

Compare revisions

Changes are shown as if the source revision was being merged into the target revision. Learn more about comparing revisions.

Source

Select target project
No results found

Target

Select target project
  • ghsc/nshmp/nshmp-lib
1 result
Show changes
Commits on Source (13)
Showing
with 213 additions and 289 deletions
...@@ -50,11 +50,11 @@ import gov.usgs.earthquake.nshmp.tree.LogicTree; ...@@ -50,11 +50,11 @@ import gov.usgs.earthquake.nshmp.tree.LogicTree;
* <p><b>Component:</b> RotD50 (average horizontal) * <p><b>Component:</b> RotD50 (average horizontal)
* *
* @author U.S. Geological Survey * @author U.S. Geological Survey
* @see Gmm#ASK_14_BASE
* @see Gmm#ASK_14 * @see Gmm#ASK_14
* @see Gmm#ASK_14_BASIN * @see Gmm#ASK_14_BASIN
* @see Gmm#ASK_14_CYBERSHAKE * @see Gmm#ASK_14_CYBERSHAKE
* @see Gmm#ASK_14_CYBERSHAKE_ON * @see Gmm#ASK_14_VS30_MEASURED
*
*/ */
public class AbrahamsonEtAl_2014 implements GroundMotionModel { public class AbrahamsonEtAl_2014 implements GroundMotionModel {
...@@ -341,17 +341,16 @@ public class AbrahamsonEtAl_2014 implements GroundMotionModel { ...@@ -341,17 +341,16 @@ public class AbrahamsonEtAl_2014 implements GroundMotionModel {
// -- Equation 9 // -- Equation 9
private static final double getV1(Imt imt) { private static final double getV1(Imt imt) {
Double T = imt.period(); if (imt.isSA()) {
if (T == null) { double T = imt.period();
return 1500.0; if (T >= 3.0) {
} return 800.0;
if (T >= 3.0) { }
return 800.0; if (T > 0.5) {
} return exp(-0.35 * log(T / 0.5) + log(1500.0));
if (T > 0.5) { }
return exp(-0.35 * log(T / 0.5) + log(1500.0));
} }
return 1500.0; return 1500.0; // PGA, PGV and low period SA
} }
// used for interpolation in calcSoilTerm(), below // used for interpolation in calcSoilTerm(), below
......
...@@ -47,10 +47,10 @@ import gov.usgs.earthquake.nshmp.tree.LogicTree; ...@@ -47,10 +47,10 @@ import gov.usgs.earthquake.nshmp.tree.LogicTree;
* <p><b>Component:</b> RotD50 (average horizontal) * <p><b>Component:</b> RotD50 (average horizontal)
* *
* @author U.S. Geological Survey * @author U.S. Geological Survey
* @see Gmm#BSSA_14_BASE
* @see Gmm#BSSA_14 * @see Gmm#BSSA_14
* @see Gmm#BSSA_14_BASIN * @see Gmm#BSSA_14_BASIN
* @see Gmm#BSSA_14_CYBERSHAKE * @see Gmm#BSSA_14_CYBERSHAKE
* @see Gmm#BSSA_14_CYBERSHAKE_ON
*/ */
public class BooreEtAl_2014 implements GroundMotionModel { public class BooreEtAl_2014 implements GroundMotionModel {
...@@ -195,7 +195,7 @@ public class BooreEtAl_2014 implements GroundMotionModel { ...@@ -195,7 +195,7 @@ public class BooreEtAl_2014 implements GroundMotionModel {
// Basin depth term -- Equations 9, 10 , 11 // Basin depth term -- Equations 9, 10 , 11
double Fdz1 = 0.0; double Fdz1 = 0.0;
if (c.imt.isSA() && c.imt.period() >= 0.65) { if (c.imt.isSA() && c.imt.period() >= 0.65) { // TODO is PGV a concern here?
double DZ1 = calcDeltaZ1(c.imt, in.z1p0, vs30); double DZ1 = calcDeltaZ1(c.imt, in.z1p0, vs30);
Fdz1 = cybershake Fdz1 = cybershake
? ((DZ1 <= c.dz1cy) ? c.f6cy * DZ1 : c.f7cy) + CY_CSIM ? ((DZ1 <= c.dz1cy) ? c.f6cy * DZ1 : c.f7cy) + CY_CSIM
......
...@@ -269,7 +269,7 @@ class CombinedGmm implements GroundMotionModel { ...@@ -269,7 +269,7 @@ class CombinedGmm implements GroundMotionModel {
static final String NAME = CombinedGmm.NAME + "Active Crust 2014 (4.1)"; static final String NAME = CombinedGmm.NAME + "Active Crust 2014 (4.1)";
static final Constraints CONSTRAINTS = CampbellBozorgnia_2014.CONSTRAINTS; static final Constraints CONSTRAINTS = CampbellBozorgnia_2014.CONSTRAINTS;
static final CoefficientContainer COEFFS = CampbellBozorgnia_2014.COEFFS; static final CoefficientContainer COEFFS = Idriss_2014.COEFFS;
ActiveCrust2014_4p1(Imt imt) { ActiveCrust2014_4p1(Imt imt) {
super(imt, ACTIVE_CRUST_2014_4P1); super(imt, ACTIVE_CRUST_2014_4P1);
......
...@@ -116,7 +116,7 @@ public final class GmmUtils { ...@@ -116,7 +116,7 @@ public final class GmmUtils {
*/ */
static double ceusMeanClip(Imt imt, double μ) { static double ceusMeanClip(Imt imt, double μ) {
// ln(1.5) = 0.405; ln(3.0) = 1.099 // ln(1.5) = 0.405; ln(3.0) = 1.099
if (imt == Imt.PGA || imt.period() <= 0.01) { if (imt == Imt.PGA || imt == Imt.PGV || imt.period() <= 0.01) {
return Math.min(0.405, μ); return Math.min(0.405, μ);
} }
if (imt.period() < 0.5) { if (imt.period() < 0.5) {
......
...@@ -132,8 +132,12 @@ public class Idriss_2014 implements GroundMotionModel { ...@@ -132,8 +132,12 @@ public class Idriss_2014 implements GroundMotionModel {
// Aleatory uncertainty model // Aleatory uncertainty model
private static final double calcStdDev(Coefficients c, double Mw) { private static final double calcStdDev(Coefficients c, double Mw) {
double s1 = 0.035; double s1 = 0.035;
Double T = c.imt.period(); if (c.imt.isSA()) {
s1 *= (T == null || T <= 0.05) ? log(0.05) : (T < 3.0) ? log(T) : log(3d); double T = c.imt.period();
s1 *= (T <= 0.05) ? log(0.05) : (T < 3.0) ? log(T) : log(3.0);
} else {
s1 *= log(0.05);
}
double s2 = 0.06; double s2 = 0.06;
s2 *= (Mw <= 5.0) ? 5.0 : (Mw < 7.5) ? Mw : 7.5; s2 *= (Mw <= 5.0) ? 5.0 : (Mw < 7.5) ? Mw : 7.5;
return 1.18 + s1 - s2; return 1.18 + s1 - s2;
......
...@@ -2,14 +2,10 @@ package gov.usgs.earthquake.nshmp.gmm; ...@@ -2,14 +2,10 @@ package gov.usgs.earthquake.nshmp.gmm;
import static com.google.common.math.DoubleMath.fuzzyEquals; import static com.google.common.math.DoubleMath.fuzzyEquals;
import java.text.DecimalFormat;
import java.util.Collection;
import java.util.EnumSet; import java.util.EnumSet;
import java.util.List; import java.util.OptionalDouble;
import java.util.Set; import java.util.Set;
import com.google.common.collect.Lists;
/** /**
* Intesity measure type (Imt) identifiers. {@code SA0P1} stands for spectal * Intesity measure type (Imt) identifiers. {@code SA0P1} stands for spectal
* acceleration of 0.1 seconds. * acceleration of 0.1 seconds.
...@@ -73,7 +69,16 @@ public enum Imt { ...@@ -73,7 +69,16 @@ public enum Imt {
SA7P5, SA7P5,
SA10P0; SA10P0;
private static final DecimalFormat SA_FORMAT = new DecimalFormat("0.00#"); private final OptionalDouble period;
private Imt() {
if (ordinal() < 10) {
period = OptionalDouble.empty();
} else {
String valStr = name().substring(2).replace("P", ".");
period = OptionalDouble.of(Double.parseDouble(valStr));
}
}
@Override @Override
public String toString() { public String toString() {
...@@ -99,7 +104,7 @@ public enum Imt { ...@@ -99,7 +104,7 @@ public enum Imt {
case DS595: case DS595:
return "Significant Duration 5-95%"; return "Significant Duration 5-95%";
default: default:
return SA_FORMAT.format(period()) + " Second Spectral Acceleration"; return period() + " s Spectral Acceleration";
} }
} }
...@@ -134,36 +139,21 @@ public enum Imt { ...@@ -134,36 +139,21 @@ public enum Imt {
} }
/** /**
* Returns the corresponding period or frequency for this {@code Imt} if it * Returns the corresponding period for this {@code Imt} if it represents a
* represents a spectral acceleration. * spectral acceleration and throws an {@code UnsupportedOperationException}
* otherwise. Rather than trying to catch the exception, users should call
* {@link #isSA()} to check validity of this {@code Imt} before calling this
* method.
* *
* @return the period for this {@code Imt} if it represents a spectral * @return the period for this {@code Imt} if it represents a spectral
* acceleration; null otherwise * acceleration
*/ * @throws UnsupportedOperationException if this {@code Imt} is not a spectral
public Double period() { * acceleration
if (ordinal() < 10) {
return null;
}
String valStr = name().substring(2).replace("P", ".");
return Double.parseDouble(valStr);
}
/**
* Returns the {@code List} of periods for the supplied {@code Imt}s. The
* result will be sorted according to the iteration order of the supplied
* {@code Collection}. Any non spectral acceleration {@code Imt}s will have
* null values in the returned {@code List}.
*
* @param imts to list periods for
* @return a {@code List} of spectral periods
* @see #saImts()
*/ */
public static List<Double> periods(Collection<Imt> imts) { public double period() {
List<Double> periodList = Lists.newArrayListWithCapacity(imts.size()); return period.orElseThrow(
for (Imt imt : imts) { () -> new UnsupportedOperationException(
periodList.add(imt.period()); name() + " is not a SA IMT."));
}
return periodList;
} }
/** /**
...@@ -177,9 +167,8 @@ public enum Imt { ...@@ -177,9 +167,8 @@ public enum Imt {
*/ */
public static Imt fromPeriod(double period) { public static Imt fromPeriod(double period) {
for (Imt imt : Imt.values()) { for (Imt imt : Imt.values()) {
if (imt.name().startsWith("SA")) { if (imt.isSA()) {
double saPeriod = imt.period(); if (fuzzyEquals(imt.period(), period, 0.000001)) {
if (fuzzyEquals(saPeriod, period, 0.000001)) {
return imt; return imt;
} }
} }
...@@ -200,16 +189,17 @@ public enum Imt { ...@@ -200,16 +189,17 @@ public enum Imt {
if (this == PGA) { if (this == PGA) {
return 100; return 100;
} }
if (this.isSA()) { if (isSA()) {
return 1.0 / period(); return 1.0 / period();
} }
throw new UnsupportedOperationException("frequency() supports PGA and SA IMTs only"); throw new UnsupportedOperationException("frequency() supports PGA and SA IMTs only");
} }
/** /**
* Returns true if this Imt is some flavor of spectral acceleration. * Returns true if this {@code Imt} represents a spectral acceleration.
* *
* @return {@code true} if this is a spectral period, {@code false} otherwise * @return {@code true} if this is a spectral acceleration {@code Imt},
* {@code false} otherwise
*/ */
public boolean isSA() { public boolean isSA() {
return ordinal() > 9; return ordinal() > 9;
...@@ -221,7 +211,7 @@ public enum Imt { ...@@ -221,7 +211,7 @@ public enum Imt {
* @return the set of spectral acceleration IMTs * @return the set of spectral acceleration IMTs
*/ */
public static Set<Imt> saImts() { public static Set<Imt> saImts() {
return EnumSet.complementOf(EnumSet.range(PGA, AI)); return EnumSet.range(SA0P01, SA10P0);
} }
/** /**
...@@ -248,5 +238,4 @@ public enum Imt { ...@@ -248,5 +238,4 @@ public enum Imt {
SA1P0, SA1P5, SA2P0, SA3P0, SA4P0, SA5P0, SA7P5, SA1P0, SA1P5, SA2P0, SA3P0, SA4P0, SA5P0, SA7P5,
SA10P0); SA10P0);
} }
} }
...@@ -13,7 +13,7 @@ import static java.lang.Math.exp; ...@@ -13,7 +13,7 @@ import static java.lang.Math.exp;
import static java.lang.Math.log; import static java.lang.Math.log;
import static java.lang.Math.min; import static java.lang.Math.min;
import static java.lang.Math.sqrt; import static java.lang.Math.sqrt;
import static java.util.stream.Collectors.toMap; import static java.util.stream.Collectors.toUnmodifiableMap;
import java.io.IOException; import java.io.IOException;
import java.net.URL; import java.net.URL;
...@@ -197,11 +197,11 @@ public abstract class NgaEast implements GroundMotionModel { ...@@ -197,11 +197,11 @@ public abstract class NgaEast implements GroundMotionModel {
.stream() .stream()
.skip(1) .skip(1)
.map(line -> Text.splitToList(line, Delimiter.COMMA)) .map(line -> Text.splitToList(line, Delimiter.COMMA))
.collect(toMap( .collect(toUnmodifiableMap(
entry -> entry.get(0), e -> e.get(0),
entry -> Double.valueOf(entry.get(1)))); e -> Double.valueOf(e.get(1))));
checkWeights(wtMap.values()); checkWeights(wtMap.values());
return Map.copyOf(wtMap); return wtMap;
} catch (IOException ioe) { } catch (IOException ioe) {
throw new RuntimeException(ioe); throw new RuntimeException(ioe);
...@@ -556,15 +556,26 @@ public abstract class NgaEast implements GroundMotionModel { ...@@ -556,15 +556,26 @@ public abstract class NgaEast implements GroundMotionModel {
static final String NAME = NgaEast.NAME + " Seed Tree (2018)"; static final String NAME = NgaEast.NAME + " Seed Tree (2018)";
static final String SEED_PREFIX = "NGA_EAST_SEED_"; static final String SEED_PREFIX = "NGA_EAST_SEED_";
static final String SP16_ID = "SP16"; static final String SP16_ID = "SP16";
static final Set<Gmm> noPgvSeeds = EnumSet.of( static final Set<Gmm> NO_PGV_SEEDS = EnumSet.of(
Gmm.NGA_EAST_SEED_PEER_GP, Gmm.NGA_EAST_SEED_GRAIZER, // not used
Gmm.NGA_EAST_SEED_GRAIZER16, Gmm.NGA_EAST_SEED_GRAIZER16,
Gmm.NGA_EAST_SEED_GRAIZER17, Gmm.NGA_EAST_SEED_GRAIZER17,
Gmm.NGA_EAST_SEED_PEER_EX, // not used
Gmm.NGA_EAST_SEED_PEER_GP,
Gmm.NGA_EAST_SEED_PZCT15_M1SS, Gmm.NGA_EAST_SEED_PZCT15_M1SS,
Gmm.NGA_EAST_SEED_PZCT15_M2ES); Gmm.NGA_EAST_SEED_PZCT15_M2ES);
static final Set<String> NO_PGV_IDS = Set.of(
"Graizer",
"Graizer16",
"Graizer17",
"PEER_EX",
"PEER_GP",
"PZCT15_M1SS",
"PZCT15_M2ES");
/* Valid Seed IDs for table based models; skips SP16 */ /* Valid Seed IDs for table based models; skips SP16 */
static final List<String> SEED_TABLE_IDS; // size = 13 static final List<String> SEED_TABLE_IDS; // size = 13
static final List<String> SEED_TABLE_IDS_PGV; // size = 8
/* All Gmms */ /* All Gmms */
static final List<Gmm> GMMS; // pgv helper, size = 14 static final List<Gmm> GMMS; // pgv helper, size = 14
...@@ -581,6 +592,7 @@ public abstract class NgaEast implements GroundMotionModel { ...@@ -581,6 +592,7 @@ public abstract class NgaEast implements GroundMotionModel {
static { static {
List<String> tableIds = new ArrayList<>(); // valid IDs for tables List<String> tableIds = new ArrayList<>(); // valid IDs for tables
List<String> tableIdsPgv = new ArrayList<>(); // valid IDs for PGV tables
List<Gmm> gmms = new ArrayList<>(); List<Gmm> gmms = new ArrayList<>();
List<String> μIds = new ArrayList<>(); List<String> μIds = new ArrayList<>();
List<Double> μWts = new ArrayList<>(); List<Double> μWts = new ArrayList<>();
...@@ -588,12 +600,16 @@ public abstract class NgaEast implements GroundMotionModel { ...@@ -588,12 +600,16 @@ public abstract class NgaEast implements GroundMotionModel {
String seedId = e.getKey(); String seedId = e.getKey();
if (!seedId.equals(SP16_ID)) { if (!seedId.equals(SP16_ID)) {
tableIds.add(seedId); tableIds.add(seedId);
if (!NO_PGV_IDS.contains(seedId)) {
tableIdsPgv.add(seedId);
}
} }
gmms.add(Gmm.valueOf(SEED_PREFIX + e.getKey().toUpperCase())); gmms.add(Gmm.valueOf(SEED_PREFIX + e.getKey().toUpperCase()));
μIds.add("Seed (" + seedId + ")"); μIds.add("Seed (" + seedId + ")");
μWts.add(e.getValue()); μWts.add(e.getValue());
}); });
SEED_TABLE_IDS = List.copyOf(tableIds); SEED_TABLE_IDS = List.copyOf(tableIds);
SEED_TABLE_IDS_PGV = List.copyOf(tableIdsPgv);
GMMS = List.copyOf(gmms); GMMS = List.copyOf(gmms);
MEAN_IDS = μIds.toArray(new String[μIds.size()]); MEAN_IDS = μIds.toArray(new String[μIds.size()]);
MEAN_WTS = μWts.stream() MEAN_WTS = μWts.stream()
...@@ -615,9 +631,10 @@ public abstract class NgaEast implements GroundMotionModel { ...@@ -615,9 +631,10 @@ public abstract class NgaEast implements GroundMotionModel {
} }
private static Map<Gmm, GroundMotionTable> getImtTables(Imt imt) { private static Map<Gmm, GroundMotionTable> getImtTables(Imt imt) {
return GroundMotionTables.getNgaEastSeeds(SEED_TABLE_IDS, imt) List<String> ids = (imt == Imt.PGV) ? SEED_TABLE_IDS_PGV : SEED_TABLE_IDS;
return GroundMotionTables.getNgaEastSeeds(ids, imt)
.entrySet().stream() .entrySet().stream()
.collect(toMap( .collect(toUnmodifiableMap(
e -> Gmm.valueOf(SEED_PREFIX + e.getKey().toUpperCase()), e -> Gmm.valueOf(SEED_PREFIX + e.getKey().toUpperCase()),
Entry::getValue)); Entry::getValue));
} }
...@@ -633,7 +650,7 @@ public abstract class NgaEast implements GroundMotionModel { ...@@ -633,7 +650,7 @@ public abstract class NgaEast implements GroundMotionModel {
double μPga = exp(sp16pga.calcMeanRock(in.Mw, in.rJB)); double μPga = exp(sp16pga.calcMeanRock(in.Mw, in.rJB));
SiteTerm fSite = siteAmp.calc(μPga, in.vs30); SiteTerm fSite = siteAmp.calc(μPga, in.vs30);
μs[i] = fSite.apply(μ); μs[i] = fSite.apply(μ);
} else if (imt == Imt.PGV && noPgvSeeds.contains(seed)) { } else if (imt == Imt.PGV && NO_PGV_SEEDS.contains(seed)) {
// site is included when calling individual seed // site is included when calling individual seed
μs[i] = UsgsPgvSupport.calcAB20Pgv(seed, in).mean(); μs[i] = UsgsPgvSupport.calcAB20Pgv(seed, in).mean();
} else { } else {
...@@ -688,7 +705,7 @@ public abstract class NgaEast implements GroundMotionModel { ...@@ -688,7 +705,7 @@ public abstract class NgaEast implements GroundMotionModel {
if (seed == Gmm.NGA_EAST_SEED_SP16) { if (seed == Gmm.NGA_EAST_SEED_SP16) {
μ = sp16.calcMeanRock(in.Mw, in.rJB); μ = sp16.calcMeanRock(in.Mw, in.rJB);
μPga = sp16pga.calcMeanRock(in.Mw, in.rJB); μPga = sp16pga.calcMeanRock(in.Mw, in.rJB);
} else if (imt == Imt.PGV && noPgvSeeds.contains(seed)) { } else if (imt == Imt.PGV && NO_PGV_SEEDS.contains(seed)) {
// note rock input; TODO this doesn't really work as the PGV // note rock input; TODO this doesn't really work as the PGV
// is conditioned on vs30 so site should already be applied // is conditioned on vs30 so site should already be applied
μ = UsgsPgvSupport.calcAB20Pgv(seed, inRock).mean(); μ = UsgsPgvSupport.calcAB20Pgv(seed, inRock).mean();
...@@ -766,10 +783,24 @@ public abstract class NgaEast implements GroundMotionModel { ...@@ -766,10 +783,24 @@ public abstract class NgaEast implements GroundMotionModel {
public LogicTree<GroundMotion> calc(GmmInput in) { public LogicTree<GroundMotion> calc(GmmInput in) {
double σEpri = sigmaEpri(in.Mw); double σEpri = sigmaEpri(in.Mw);
double σPanel = sigmaPanel(in.Mw, in.vs30); double σPanel = sigmaPanel(in.Mw, in.vs30);
Position p = table.position(in.rRup, in.Mw); // PGV fails if 'table' used; all seeds support PGA natively
Position p = pgaTable.position(in.rRup, in.Mw);
double μPga = exp(pgaTable.get(p)); double μPga = exp(pgaTable.get(p));
SiteTerm fSite = siteAmp.calc(μPga, in.vs30); SiteTerm fSite = siteAmp.calc(μPga, in.vs30);
double μ = fSite.apply(table.get(p));
Gmm seedGmm = Gmm.valueOf(UsgsSeeds_2018.SEED_PREFIX + id.toUpperCase());
GmmInput inRock = GmmInput.builder().fromCopy(in).vs30(3000).build();
double μ = (imt == Imt.PGV && UsgsSeeds_2018.NO_PGV_SEEDS.contains(seedGmm))
? UsgsPgvSupport.calcAB20Pgv(seedGmm, inRock).mean()
: table.get(p);
μ = fSite.apply(μ);
/*
* TODO the order of operations for PGV for individual seeds is consistent
* with seed 2023 but not seed 2018 and needs to be rechecked. Conditional
* PGV is dependent on vs30; should we realy be using the consitional
* model with vs30=3000
*/
double σ = Maths.srssWeighted( double σ = Maths.srssWeighted(
new double[] { σEpri, σPanel }, new double[] { σEpri, σPanel },
SIGMA_WTS); SIGMA_WTS);
......
...@@ -186,7 +186,7 @@ public class UsgsDampingScaling { ...@@ -186,7 +186,7 @@ public class UsgsDampingScaling {
public double factor(Imt imt, double Mw, double rRup, double dampingRatio) { public double factor(Imt imt, double Mw, double rRup, double dampingRatio) {
checkArgument(coeffs.containsKey(imt), "Unsupported IMT: %s", imt.name()); checkArgument(coeffs.containsKey(imt), "Unsupported IMT: %s", imt.name());
checkInRange(DAMPING_RATIO_RANGE, "Damping ratio", dampingRatio); checkInRange(DAMPING_RATIO_RANGE, "Damping ratio", dampingRatio);
return (dampingRatio != 5.0) ? calcFactor(imt, Mw, rRup, dampingRatio) : 00; return (dampingRatio != 5.0) ? calcFactor(imt, Mw, rRup, dampingRatio) : 0;
// double lnDSF = 0.0; // double lnDSF = 0.0;
// if (dampingRatio != 5.0) { // if (dampingRatio != 5.0) {
// if (imt.period() > 5.0 && // if (imt.period() > 5.0 &&
...@@ -204,7 +204,7 @@ public class UsgsDampingScaling { ...@@ -204,7 +204,7 @@ public class UsgsDampingScaling {
} }
double calcFactor(Imt imt, double Mw, double rRup, double dampingRatio) { double calcFactor(Imt imt, double Mw, double rRup, double dampingRatio) {
return (imt.period() > 5.0) return (imt.isSA() && imt.period() > 5.0)
? calclnDsflongPeriod(imt, Mw, rRup, dampingRatio) ? calclnDsflongPeriod(imt, Mw, rRup, dampingRatio)
: calclnDsf(imt, Mw, rRup, dampingRatio); : calclnDsf(imt, Mw, rRup, dampingRatio);
} }
......
...@@ -138,6 +138,7 @@ class UsgsPgvSupport { ...@@ -138,6 +138,7 @@ class UsgsPgvSupport {
* @return ScalarGroundMotion for target T(PGV) * @return ScalarGroundMotion for target T(PGV)
*/ */
static GroundMotion calcSaGroundMotion(Gmm gmm, GmmInput in) { static GroundMotion calcSaGroundMotion(Gmm gmm, GmmInput in) {
// TODO use list
Set<Imt> saImts = gmm.responseSpectrumImts(); Set<Imt> saImts = gmm.responseSpectrumImts();
// need to verify that this Set is being returned with ascending // need to verify that this Set is being returned with ascending
// iteration order; that is, when we loop over them // iteration order; that is, when we loop over them
......
T,a1_lo,a2_lo,b1_lo,b2_lo,a1_hi,a2_hi,b1_hi,b2_hi,a3,xi,gamma,phi T, a1_lo, a2_lo, b1_lo, b2_lo, a1_hi, a2_hi, b1_hi, b2_hi, a3, xi, gamma, phi
0.01,7.0887,0.2058,2.9935,-0.2287,9.0138,-0.0794,2.9935,-0.2287,0.0589,-0.854,-0.0027,0.08 0.01, 7.0887, 0.2058, 2.9935, -0.2287, 9.0138, -0.0794, 2.9935, -0.2287, 0.0589, -0.854, -0.0027, 0.08
0.02,7.1157,0.2058,2.9935,-0.2287,9.0408,-0.0794,2.9935,-0.2287,0.0589,-0.854,-0.0027,0.08 0.02, 7.1157, 0.2058, 2.9935, -0.2287, 9.0408, -0.0794, 2.9935, -0.2287, 0.0589, -0.854, -0.0027, 0.08
0.03,7.2087,0.2058,2.9935,-0.2287,9.1338,-0.0794,2.9935,-0.2287,0.0589,-0.854,-0.0027,0.08 0.03, 7.2087, 0.2058, 2.9935, -0.2287, 9.1338, -0.0794, 2.9935, -0.2287, 0.0589, -0.854, -0.0027, 0.08
0.05,6.2638,0.0625,2.8664,-0.2418,7.9837,-0.1923,2.7995,-0.2319,0.0417,-0.631,-0.0061,0.08 0.05, 6.2638, 0.0625, 2.8664, -0.2418, 7.9837, -0.1923, 2.7995, -0.2319, 0.0417, -0.631, -0.0061, 0.08
0.075,5.9051,0.1128,2.9406,-0.2513,7.756,-0.1614,2.8143,-0.2326,0.0527,-0.591,-0.0056,0.08 0.075, 5.9051, 0.1128, 2.9406, -0.2513, 7.7560, -0.1614, 2.8143, -0.2326, 0.0527, -0.591, -0.0056, 0.08
0.1,7.5791,0.0848,3.019,-0.2516,9.4252,-0.1887,2.8131,-0.2211,0.0442,-0.757,-0.0042,0.08 0.1, 7.5791, 0.0848, 3.0190, -0.2516, 9.4252, -0.1887, 2.8131, -0.2211, 0.0442, -0.757, -0.0042, 0.08
0.15,8.019,0.1713,2.7871,-0.2236,9.6242,-0.0665,2.4091,-0.1676,0.0329,-0.911,-0.0046,0.08 0.15, 8.0190, 0.1713, 2.7871, -0.2236, 9.6242, -0.0665, 2.4091, -0.1676, 0.0329, -0.911, -0.0046, 0.08
0.2,9.2812,0.1041,2.8611,-0.2229,11.13,-0.1698,2.4938,-0.1685,0.0188,-0.998,-0.003,0.08 0.2, 9.2812, 0.1041, 2.8611, -0.2229, 11.1300, -0.1698, 2.4938, -0.1685, 0.0188, -0.998, -0.0030, 0.08
0.25,9.5804,0.0875,2.8289,-0.22,11.3629,-0.1766,2.3773,-0.1531,0.0095,-1.042,-0.0028,0.08 0.25, 9.5804, 0.0875, 2.8289, -0.2200, 11.3629, -0.1766, 2.3773, -0.1531, 0.0095, -1.042, -0.0028, 0.08
0.3,9.8912,0.0003,2.8423,-0.2284,11.7818,-0.2798,2.3772,-0.1595,-0.0039,-1.03,-0.0029,0.08 0.3, 9.8912, 0.0003, 2.8423, -0.2284, 11.7818, -0.2798, 2.3772, -0.1595, -0.0039, -1.030, -0.0029, 0.08
0.4,9.5342,0.0027,2.83,-0.2318,11.6097,-0.3048,2.3413,-0.1594,-0.0133,-1.019,-0.0028,0.08 0.4, 9.5342, 0.0027, 2.8300, -0.2318, 11.6097, -0.3048, 2.3413, -0.1594, -0.0133, -1.019, -0.0028, 0.08
0.5,9.2142,0.0399,2.856,-0.2337,11.4484,-0.2911,2.3477,-0.1584,-0.0224,-1.023,-0.0021,0.08 0.5, 9.2142, 0.0399, 2.8560, -0.2337, 11.4484, -0.2911, 2.3477, -0.1584, -0.0224, -1.023, -0.0021, 0.08
0.75,8.3517,0.0689,2.7544,-0.2392,10.9065,-0.3097,2.2042,-0.1577,-0.0267,-1.056,-0.0029,0.08 0.75, 8.3517, 0.0689, 2.7544, -0.2392, 10.9065, -0.3097, 2.2042, -0.1577, -0.0267, -1.056, -0.0029, 0.08
1,7.0453,0.16,2.7339,-0.2398,9.8565,-0.2565,2.1493,-0.1532,-0.0198,-1.009,-0.0032,0.06 1, 7.0453, 0.1600, 2.7339, -0.2398, 9.8565, -0.2565, 2.1493, -0.1532, -0.0198, -1.009, -0.0032, 0.06
1.5,5.1307,0.2429,2.68,-0.2417,8.3363,-0.232,2.0408,-0.147,-0.0367,-0.898,-0.0033,0.04 1.5, 5.1307, 0.2429, 2.6800, -0.2417, 8.3363, -0.2320, 2.0408, -0.1470, -0.0367, -0.898, -0.0033, 0.04
2,3.361,0.3966,2.6837,-0.245,6.8656,-0.1226,2.0013,-0.1439,-0.0291,-0.851,-0.0032,0.02 2, 3.3610, 0.3966, 2.6837, -0.2450, 6.8656, -0.1226, 2.0013, -0.1439, -0.0291, -0.851, -0.0032, 0.02
3,0.1784,0.756,2.6907,-0.2389,4.1178,0.1724,1.9408,-0.1278,-0.0214,-0.761,-0.0031,0.02 3, 0.1784, 0.7560, 2.6907, -0.2389, 4.1178, 0.1724, 1.9408, -0.1278, -0.0214, -0.761, -0.0031, 0.02
4,-2.4301,0.9283,2.5782,-0.2514,1.8102,0.3001,1.7763,-0.1326,-0.024,-0.675,-0.0051,0 4, -2.4301, 0.9283, 2.5782, -0.2514, 1.8102, 0.3001, 1.7763, -0.1326, -0.0240, -0.675, -0.0051, 0
5,-4.357,1.1209,2.5468,-0.2541,0.0977,0.4609,1.703,-0.1291,-0.0202,-0.629,-0.0059,0 5, -4.3570, 1.1209, 2.5468, -0.2541, 0.0977, 0.4609, 1.7030, -0.1291, -0.0202, -0.629, -0.0059, 0
7.5,-7.8275,1.4016,2.4478,-0.2593,-3.0563,0.6948,1.5212,-0.122,-0.0219,-0.531,-0.0057,0 7.5, -7.8275, 1.4016, 2.4478, -0.2593, -3.0563, 0.6948, 1.5212, -0.1220, -0.0219, -0.531, -0.0057, 0
10,-9.2857,1.5574,2.3922,-0.2586,-4.4387,0.8393,1.4195,-0.1145,-0.0035,-0.586,-0.0061,0 10, -9.2857, 1.5574, 2.3922, -0.2586, -4.4387, 0.8393, 1.4195, -0.1145, -0.0035, -0.586, -0.0061, 0
PGA,7.0887,0.2058,2.9935,-0.2287,9.0138,-0.0794,2.9935,-0.2287,0.0589,-0.854,-0.0027,0.08 PGA, 7.0887, 0.2058, 2.9935, -0.2287, 9.0138, -0.0794, 2.9935, -0.2287, 0.0589, -0.854, -0.0027, 0.08
...@@ -34,42 +34,6 @@ r/m,4.0,4.5,5.0,5.5,6.0,6.5,7.0,7.5,7.8,8.0,8.2 ...@@ -34,42 +34,6 @@ r/m,4.0,4.5,5.0,5.5,6.0,6.5,7.0,7.5,7.8,8.0,8.2
1000.0,2.97502E-06,1.01218E-05,2.82001E-05,7.33766E-05,0.000182456,0.00040579,0.000764371,0.001275443,0.001675791,0.001991504,0.002353001 1000.0,2.97502E-06,1.01218E-05,2.82001E-05,7.33766E-05,0.000182456,0.00040579,0.000764371,0.001275443,0.001675791,0.001991504,0.002353001
1200.0,1.14102E-06,4.09336E-06,1.20251E-05,3.29922E-05,8.65025E-05,0.000202856,0.000402911,0.000708897,0.000961507,0.001167134,0.001408538 1200.0,1.14102E-06,4.09336E-06,1.20251E-05,3.29922E-05,8.65025E-05,0.000202856,0.000402911,0.000708897,0.000961507,0.001167134,0.001408538
1500.0,2.85012E-07,1.10707E-06,3.52134E-06,1.04606E-05,2.96961E-05,7.54024E-05,0.000162155,0.000308909,0.000439456,0.000550674,0.000686045 1500.0,2.85012E-07,1.10707E-06,3.52134E-06,1.04606E-05,2.96961E-05,7.54024E-05,0.000162155,0.000308909,0.000439456,0.000550674,0.000686045
PGV
r\m,4,4.5,5,5.5,6,6.5,7,7.5,7.8,8,8.2
0,7.707664349,13.27072367,22.52388491,37.67514497,50.41764053,64.36349852,85.04439053,114.8154083,121.5373876,126.4842618,131.5702669
1,5.339157988,9.665206361,16.3212247,25.69696183,34.3933784,42.78578225,56.56780266,77.67227663,84.11597574,88.81037426,93.71992811
5,1.457756228,3.331287249,6.950436657,12.98877589,20.0210074,27.43615651,38.61494941,55.74011775,61.73515651,66.14205769,70.80275562
10,0.674803843,1.567018402,3.412150414,6.768425089,12.02040503,18.99848876,28.48390947,41.95774053,49.79036657,55.61760355,61.96699172
15,0.374942269,0.890156751,1.999680266,4.17545287,7.970485858,13.77150547,21.54202485,32.5164503,40.00971361,45.47003254,51.55691006
20,0.234300607,0.570452012,1.341359763,2.900124704,5.823169231,10.51187781,17.04112278,26.61342308,33.7095355,39.2022929,44.91676923
25,0.168219837,0.418437692,0.986660488,2.169929586,4.446295266,8.16066287,13.62476775,22.54829882,29.13213166,34.60920562,40.98299822
30,0.130755464,0.326453314,0.775799941,1.712559615,3.540666568,6.594925592,11.50380281,19.44388018,25.7829571,30.91992012,36.96534675
40,0.084606854,0.21635932,0.526180873,1.191645,2.475414941,4.625759024,8.45751997,15.22727959,20.35568935,24.56219822,29.71744941
50,0.059117497,0.15500003,0.38541787,0.893077278,1.872115976,3.529267751,6.736000148,12.96362825,17.16728402,20.66299704,24.86460237
60,0.048886744,0.129393145,0.325088861,0.761715636,1.617228107,3.073141864,5.895560947,11.40280444,15.35408343,18.73181509,22.82340118
70,0.041115485,0.109911414,0.279018092,0.661825666,1.422145237,2.733924556,5.250720414,10.40221036,14.11685754,17.21826553,20.98787544
80,0.035204072,0.095320541,0.244825163,0.586305962,1.280567781,2.478747041,4.844250296,9.686435059,13.12127322,16.0290858,19.57081716
90,0.031339694,0.085311062,0.220564157,0.532609053,1.173067485,2.299773521,4.507038905,9.073156065,12.28096686,14.93154379,18.15655873
100,0.028193074,0.077186157,0.200832204,0.488295044,1.091764083,2.149968047,4.239144379,8.553141864,11.5033784,14.00290503,17.04687396
110,0.025760404,0.070753161,0.184999867,0.456116361,1.025155991,2.053804586,4.098048669,8.198609024,11.01552973,13.39149482,16.28801686
120,0.023418339,0.065311833,0.17292676,0.428619482,0.981007618,1.973779438,3.913797189,7.889311391,10.57609024,12.85428935,15.63151568
130,0.021422706,0.060036726,0.159826036,0.401797145,0.923849275,1.844078846,3.652998077,7.346865385,9.885104586,12.06163299,14.71902352
140,0.019436627,0.055392756,0.149491527,0.377716036,0.862276805,1.727284024,3.418099852,6.864659467,9.285601479,11.34831257,13.86946139
150,0.017882064,0.051205386,0.138890678,0.355740444,0.815972722,1.664211834,3.318667012,6.691384024,9.046443343,11.08526553,13.58102678
175,0.014085025,0.041129623,0.113695167,0.294761287,0.693225015,1.437015932,2.899418047,5.920155769,7.987146598,9.721223373,11.84265266
200,0.011320745,0.033541484,0.093466598,0.243588314,0.583195991,1.227201257,2.482196302,5.070241124,6.834999556,8.344338609,10.19973121
250,0.007865832,0.023567451,0.066488052,0.173818595,0.422838506,0.911390547,1.848406065,3.885357988,5.591306509,6.931175296,8.536424349
300,0.005816911,0.017431254,0.049377058,0.130438962,0.324356879,0.706769926,1.50817321,3.298248669,4.536776627,5.612775296,6.950557544
350,0.004365451,0.013226741,0.03798679,0.105516836,0.260806583,0.574072781,1.243391169,2.799627515,3.881401923,4.889190237,6.155121953
400,0.003196295,0.010316375,0.031109201,0.087395777,0.217036095,0.475852263,1.057407411,2.419163609,3.43393787,4.330218195,5.45835355
450,0.00244578,0.007960661,0.024261874,0.068559737,0.172305518,0.390697219,0.878221391,2.016736331,2.906477959,3.78559068,4.924527751
500,0.001907148,0.006256142,0.019205963,0.054733589,0.141762006,0.324928964,0.737643166,1.705952145,2.560752219,3.345977811,4.367282041
600,0.001210346,0.004079536,0.012858441,0.037745889,0.10117838,0.24279108,0.569708817,1.353650237,1.982036302,2.549912426,3.280613166
700,0.000808939,0.00279329,0.00903226,0.027351012,0.072845679,0.174659991,0.418943107,1.013540547,1.560637396,2.073211006,2.752580414
800,0.000554628,0.001965966,0.006544776,0.020579812,0.05649383,0.141388095,0.342384527,0.824782959,1.276243536,1.700876257,2.265870355
1000,0.000305265,0.001121663,0.003898465,0.012943702,0.037522571,0.101660926,0.280026885,0.783337382,1.347668047,1.933406553,2.744457604
1200,0.000155097,0.000590834,0.002140645,0.007530107,0.022016277,0.06020646,0.168403393,0.475456908,0.835316509,1.215303284,1.771799246
1500,7.02526E-05,0.000276743,0.001047907,0.003957514,0.012165541,0.035334733,0.105171384,0.316921086,0.60860355,0.944208595,1.473147651
SA0P01 SA0P01
r/m,4.0,4.5,5.0,5.5,6.0,6.5,7.0,7.5,7.8,8.0,8.2 r/m,4.0,4.5,5.0,5.5,6.0,6.5,7.0,7.5,7.8,8.0,8.2
0.01,0.133521443,0.194305529,0.288125821,0.441010971,0.68358768,0.983575514,1.230327832,1.389948906,1.454068157,1.488312879,1.517392836 0.01,0.133521443,0.194305529,0.288125821,0.441010971,0.68358768,0.983575514,1.230327832,1.389948906,1.454068157,1.488312879,1.517392836
......
...@@ -34,42 +34,6 @@ r/m,4.0,4.5,5.0,5.5,6.0,6.5,7.0,7.5,7.8,8.0,8.2 ...@@ -34,42 +34,6 @@ r/m,4.0,4.5,5.0,5.5,6.0,6.5,7.0,7.5,7.8,8.0,8.2
1000.0,1.41466E-06,5.87819E-06,1.87293E-05,5.28735E-05,0.000136656,0.00030493,0.000559507,0.000887034,0.001118538,0.0012883,0.001470951 1000.0,1.41466E-06,5.87819E-06,1.87293E-05,5.28735E-05,0.000136656,0.00030493,0.000559507,0.000887034,0.001118538,0.0012883,0.001470951
1200.0,3.92079E-07,1.78574E-06,6.15551E-06,1.86037E-05,5.10398E-05,0.000120048,0.000230834,0.000381623,0.000492466,0.000575567,0.000666473 1200.0,3.92079E-07,1.78574E-06,6.15551E-06,1.86037E-05,5.10398E-05,0.000120048,0.000230834,0.000381623,0.000492466,0.000575567,0.000666473
1500.0,5.8664E-08,3.06608E-07,1.18922E-06,3.98112E-06,1.19448E-05,3.04033E-05,6.27121E-05,0.0001104,0.000147485,0.000176194,0.000208366 1500.0,5.8664E-08,3.06608E-07,1.18922E-06,3.98112E-06,1.19448E-05,3.04033E-05,6.27121E-05,0.0001104,0.000147485,0.000176194,0.000208366
PGV
r\m,4,4.5,5,5.5,6,6.5,7,7.5,7.8,8,8.2
0,7.707664349,13.27072367,22.52388491,37.67514497,50.41764053,64.36349852,85.04439053,114.8154083,121.5373876,126.4842618,131.5702669
1,5.339157988,9.665206361,16.3212247,25.69696183,34.3933784,42.78578225,56.56780266,77.67227663,84.11597574,88.81037426,93.71992811
5,1.457756228,3.331287249,6.950436657,12.98877589,20.0210074,27.43615651,38.61494941,55.74011775,61.73515651,66.14205769,70.80275562
10,0.674803843,1.567018402,3.412150414,6.768425089,12.02040503,18.99848876,28.48390947,41.95774053,49.79036657,55.61760355,61.96699172
15,0.374942269,0.890156751,1.999680266,4.17545287,7.970485858,13.77150547,21.54202485,32.5164503,40.00971361,45.47003254,51.55691006
20,0.234300607,0.570452012,1.341359763,2.900124704,5.823169231,10.51187781,17.04112278,26.61342308,33.7095355,39.2022929,44.91676923
25,0.168219837,0.418437692,0.986660488,2.169929586,4.446295266,8.16066287,13.62476775,22.54829882,29.13213166,34.60920562,40.98299822
30,0.130755464,0.326453314,0.775799941,1.712559615,3.540666568,6.594925592,11.50380281,19.44388018,25.7829571,30.91992012,36.96534675
40,0.084606854,0.21635932,0.526180873,1.191645,2.475414941,4.625759024,8.45751997,15.22727959,20.35568935,24.56219822,29.71744941
50,0.059117497,0.15500003,0.38541787,0.893077278,1.872115976,3.529267751,6.736000148,12.96362825,17.16728402,20.66299704,24.86460237
60,0.048886744,0.129393145,0.325088861,0.761715636,1.617228107,3.073141864,5.895560947,11.40280444,15.35408343,18.73181509,22.82340118
70,0.041115485,0.109911414,0.279018092,0.661825666,1.422145237,2.733924556,5.250720414,10.40221036,14.11685754,17.21826553,20.98787544
80,0.035204072,0.095320541,0.244825163,0.586305962,1.280567781,2.478747041,4.844250296,9.686435059,13.12127322,16.0290858,19.57081716
90,0.031339694,0.085311062,0.220564157,0.532609053,1.173067485,2.299773521,4.507038905,9.073156065,12.28096686,14.93154379,18.15655873
100,0.028193074,0.077186157,0.200832204,0.488295044,1.091764083,2.149968047,4.239144379,8.553141864,11.5033784,14.00290503,17.04687396
110,0.025760404,0.070753161,0.184999867,0.456116361,1.025155991,2.053804586,4.098048669,8.198609024,11.01552973,13.39149482,16.28801686
120,0.023418339,0.065311833,0.17292676,0.428619482,0.981007618,1.973779438,3.913797189,7.889311391,10.57609024,12.85428935,15.63151568
130,0.021422706,0.060036726,0.159826036,0.401797145,0.923849275,1.844078846,3.652998077,7.346865385,9.885104586,12.06163299,14.71902352
140,0.019436627,0.055392756,0.149491527,0.377716036,0.862276805,1.727284024,3.418099852,6.864659467,9.285601479,11.34831257,13.86946139
150,0.017882064,0.051205386,0.138890678,0.355740444,0.815972722,1.664211834,3.318667012,6.691384024,9.046443343,11.08526553,13.58102678
175,0.014085025,0.041129623,0.113695167,0.294761287,0.693225015,1.437015932,2.899418047,5.920155769,7.987146598,9.721223373,11.84265266
200,0.011320745,0.033541484,0.093466598,0.243588314,0.583195991,1.227201257,2.482196302,5.070241124,6.834999556,8.344338609,10.19973121
250,0.007865832,0.023567451,0.066488052,0.173818595,0.422838506,0.911390547,1.848406065,3.885357988,5.591306509,6.931175296,8.536424349
300,0.005816911,0.017431254,0.049377058,0.130438962,0.324356879,0.706769926,1.50817321,3.298248669,4.536776627,5.612775296,6.950557544
350,0.004365451,0.013226741,0.03798679,0.105516836,0.260806583,0.574072781,1.243391169,2.799627515,3.881401923,4.889190237,6.155121953
400,0.003196295,0.010316375,0.031109201,0.087395777,0.217036095,0.475852263,1.057407411,2.419163609,3.43393787,4.330218195,5.45835355
450,0.00244578,0.007960661,0.024261874,0.068559737,0.172305518,0.390697219,0.878221391,2.016736331,2.906477959,3.78559068,4.924527751
500,0.001907148,0.006256142,0.019205963,0.054733589,0.141762006,0.324928964,0.737643166,1.705952145,2.560752219,3.345977811,4.367282041
600,0.001210346,0.004079536,0.012858441,0.037745889,0.10117838,0.24279108,0.569708817,1.353650237,1.982036302,2.549912426,3.280613166
700,0.000808939,0.00279329,0.00903226,0.027351012,0.072845679,0.174659991,0.418943107,1.013540547,1.560637396,2.073211006,2.752580414
800,0.000554628,0.001965966,0.006544776,0.020579812,0.05649383,0.141388095,0.342384527,0.824782959,1.276243536,1.700876257,2.265870355
1000,0.000305265,0.001121663,0.003898465,0.012943702,0.037522571,0.101660926,0.280026885,0.783337382,1.347668047,1.933406553,2.744457604
1200,0.000155097,0.000590834,0.002140645,0.007530107,0.022016277,0.06020646,0.168403393,0.475456908,0.835316509,1.215303284,1.771799246
1500,7.02526E-05,0.000276743,0.001047907,0.003957514,0.012165541,0.035334733,0.105171384,0.316921086,0.60860355,0.944208595,1.473147651
SA0P01 SA0P01
r/m,4.0,4.5,5.0,5.5,6.0,6.5,7.0,7.5,7.8,8.0,8.2 r/m,4.0,4.5,5.0,5.5,6.0,6.5,7.0,7.5,7.8,8.0,8.2
0.01,0.192564807,0.280228205,0.41553669,0.636028939,0.98587492,1.418519338,1.774386551,2.004591836,2.097063985,2.146451134,2.188389544 0.01,0.192564807,0.280228205,0.41553669,0.636028939,0.98587492,1.418519338,1.774386551,2.004591836,2.097063985,2.146451134,2.188389544
......
...@@ -34,42 +34,6 @@ r\m,4.0,4.5,5.0,5.5,6.0,6.5,7.0,7.5,7.8,8.0,8.2 ...@@ -34,42 +34,6 @@ r\m,4.0,4.5,5.0,5.5,6.0,6.5,7.0,7.5,7.8,8.0,8.2
1000.0,5.9854E-6,1.5069E-5,3.3112E-5,8.1437E-5,1.8226E-4,4.1225E-4,8.1769E-4,0.0014155,0.0018374,0.0021296,0.0024186 1000.0,5.9854E-6,1.5069E-5,3.3112E-5,8.1437E-5,1.8226E-4,4.1225E-4,8.1769E-4,0.0014155,0.0018374,0.0021296,0.0024186
1200.0,2.0341E-6,5.3062E-6,1.2302E-5,2.97E-5,7.6519E-5,1.7801E-4,3.6565E-4,6.4452E-4,8.3852E-4,9.7033E-4,0.0010979 1200.0,2.0341E-6,5.3062E-6,1.2302E-5,2.97E-5,7.6519E-5,1.7801E-4,3.6565E-4,6.4452E-4,8.3852E-4,9.7033E-4,0.0010979
1500.0,4.2022E-7,1.181E-6,2.6871E-6,7.7345E-6,2.0753E-5,5.17E-5,1.1236E-4,2.0348E-4,2.6522E-4,3.0571E-4,3.4309E-4 1500.0,4.2022E-7,1.181E-6,2.6871E-6,7.7345E-6,2.0753E-5,5.17E-5,1.1236E-4,2.0348E-4,2.6522E-4,3.0571E-4,3.4309E-4
PGV
r\m,4,4.5,5,5.5,6,6.5,7,7.5,7.8,8,8.2
0,7.707664349,13.27072367,22.52388491,37.67514497,50.41764053,64.36349852,85.04439053,114.8154083,121.5373876,126.4842618,131.5702669
1,5.339157988,9.665206361,16.3212247,25.69696183,34.3933784,42.78578225,56.56780266,77.67227663,84.11597574,88.81037426,93.71992811
5,1.457756228,3.331287249,6.950436657,12.98877589,20.0210074,27.43615651,38.61494941,55.74011775,61.73515651,66.14205769,70.80275562
10,0.674803843,1.567018402,3.412150414,6.768425089,12.02040503,18.99848876,28.48390947,41.95774053,49.79036657,55.61760355,61.96699172
15,0.374942269,0.890156751,1.999680266,4.17545287,7.970485858,13.77150547,21.54202485,32.5164503,40.00971361,45.47003254,51.55691006
20,0.234300607,0.570452012,1.341359763,2.900124704,5.823169231,10.51187781,17.04112278,26.61342308,33.7095355,39.2022929,44.91676923
25,0.168219837,0.418437692,0.986660488,2.169929586,4.446295266,8.16066287,13.62476775,22.54829882,29.13213166,34.60920562,40.98299822
30,0.130755464,0.326453314,0.775799941,1.712559615,3.540666568,6.594925592,11.50380281,19.44388018,25.7829571,30.91992012,36.96534675
40,0.084606854,0.21635932,0.526180873,1.191645,2.475414941,4.625759024,8.45751997,15.22727959,20.35568935,24.56219822,29.71744941
50,0.059117497,0.15500003,0.38541787,0.893077278,1.872115976,3.529267751,6.736000148,12.96362825,17.16728402,20.66299704,24.86460237
60,0.048886744,0.129393145,0.325088861,0.761715636,1.617228107,3.073141864,5.895560947,11.40280444,15.35408343,18.73181509,22.82340118
70,0.041115485,0.109911414,0.279018092,0.661825666,1.422145237,2.733924556,5.250720414,10.40221036,14.11685754,17.21826553,20.98787544
80,0.035204072,0.095320541,0.244825163,0.586305962,1.280567781,2.478747041,4.844250296,9.686435059,13.12127322,16.0290858,19.57081716
90,0.031339694,0.085311062,0.220564157,0.532609053,1.173067485,2.299773521,4.507038905,9.073156065,12.28096686,14.93154379,18.15655873
100,0.028193074,0.077186157,0.200832204,0.488295044,1.091764083,2.149968047,4.239144379,8.553141864,11.5033784,14.00290503,17.04687396
110,0.025760404,0.070753161,0.184999867,0.456116361,1.025155991,2.053804586,4.098048669,8.198609024,11.01552973,13.39149482,16.28801686
120,0.023418339,0.065311833,0.17292676,0.428619482,0.981007618,1.973779438,3.913797189,7.889311391,10.57609024,12.85428935,15.63151568
130,0.021422706,0.060036726,0.159826036,0.401797145,0.923849275,1.844078846,3.652998077,7.346865385,9.885104586,12.06163299,14.71902352
140,0.019436627,0.055392756,0.149491527,0.377716036,0.862276805,1.727284024,3.418099852,6.864659467,9.285601479,11.34831257,13.86946139
150,0.017882064,0.051205386,0.138890678,0.355740444,0.815972722,1.664211834,3.318667012,6.691384024,9.046443343,11.08526553,13.58102678
175,0.014085025,0.041129623,0.113695167,0.294761287,0.693225015,1.437015932,2.899418047,5.920155769,7.987146598,9.721223373,11.84265266
200,0.011320745,0.033541484,0.093466598,0.243588314,0.583195991,1.227201257,2.482196302,5.070241124,6.834999556,8.344338609,10.19973121
250,0.007865832,0.023567451,0.066488052,0.173818595,0.422838506,0.911390547,1.848406065,3.885357988,5.591306509,6.931175296,8.536424349
300,0.005816911,0.017431254,0.049377058,0.130438962,0.324356879,0.706769926,1.50817321,3.298248669,4.536776627,5.612775296,6.950557544
350,0.004365451,0.013226741,0.03798679,0.105516836,0.260806583,0.574072781,1.243391169,2.799627515,3.881401923,4.889190237,6.155121953
400,0.003196295,0.010316375,0.031109201,0.087395777,0.217036095,0.475852263,1.057407411,2.419163609,3.43393787,4.330218195,5.45835355
450,0.00244578,0.007960661,0.024261874,0.068559737,0.172305518,0.390697219,0.878221391,2.016736331,2.906477959,3.78559068,4.924527751
500,0.001907148,0.006256142,0.019205963,0.054733589,0.141762006,0.324928964,0.737643166,1.705952145,2.560752219,3.345977811,4.367282041
600,0.001210346,0.004079536,0.012858441,0.037745889,0.10117838,0.24279108,0.569708817,1.353650237,1.982036302,2.549912426,3.280613166
700,0.000808939,0.00279329,0.00903226,0.027351012,0.072845679,0.174659991,0.418943107,1.013540547,1.560637396,2.073211006,2.752580414
800,0.000554628,0.001965966,0.006544776,0.020579812,0.05649383,0.141388095,0.342384527,0.824782959,1.276243536,1.700876257,2.265870355
1000,0.000305265,0.001121663,0.003898465,0.012943702,0.037522571,0.101660926,0.280026885,0.783337382,1.347668047,1.933406553,2.744457604
1200,0.000155097,0.000590834,0.002140645,0.007530107,0.022016277,0.06020646,0.168403393,0.475456908,0.835316509,1.215303284,1.771799246
1500,7.02526E-05,0.000276743,0.001047907,0.003957514,0.012165541,0.035334733,0.105171384,0.316921086,0.60860355,0.944208595,1.473147651
SA0P01 SA0P01
r\m,4.0,4.5,5.0,5.5,6.0,6.5,7.0,7.5,7.8,8.0,8.2 r\m,4.0,4.5,5.0,5.5,6.0,6.5,7.0,7.5,7.8,8.0,8.2
0.0,0.46851,0.69925,0.86089,1.0263,1.1547,1.2269,1.2326,1.1703,1.1058,1.0536,0.92821 0.0,0.46851,0.69925,0.86089,1.0263,1.1547,1.2269,1.2326,1.1703,1.1058,1.0536,0.92821
......
...@@ -34,42 +34,6 @@ r\m,4.0,4.5,5.0,5.5,6.0,6.5,7.0,7.5,7.8,8.0,8.2 ...@@ -34,42 +34,6 @@ r\m,4.0,4.5,5.0,5.5,6.0,6.5,7.0,7.5,7.8,8.0,8.2
1000.0,1.2744E-6,4.0514E-6,1.1785E-5,3.0844E-5,7.3452E-5,1.5933E-4,3.1666E-4,5.743E-4,7.8556E-4,9.5043E-4,0.0011332 1000.0,1.2744E-6,4.0514E-6,1.1785E-5,3.0844E-5,7.3452E-5,1.5933E-4,3.1666E-4,5.743E-4,7.8556E-4,9.5043E-4,0.0011332
1200.0,3.1566E-7,1.0114E-6,2.9569E-6,7.8885E-6,1.9204E-5,4.2663E-5,8.6484E-5,1.5998E-4,2.2144E-4,2.7004E-4,3.2452E-4 1200.0,3.1566E-7,1.0114E-6,2.9569E-6,7.8885E-6,1.9204E-5,4.2663E-5,8.6484E-5,1.5998E-4,2.2144E-4,2.7004E-4,3.2452E-4
1500.0,3.9641E-8,1.3012E-7,3.8974E-7,1.0653E-6,2.6569E-6,6.0469E-6,1.2558E-5,2.3799E-5,3.3425E-5,4.0664E-5,4.8468E-5 1500.0,3.9641E-8,1.3012E-7,3.8974E-7,1.0653E-6,2.6569E-6,6.0469E-6,1.2558E-5,2.3799E-5,3.3425E-5,4.0664E-5,4.8468E-5
PGV
r\m,4,4.5,5,5.5,6,6.5,7,7.5,7.8,8,8.2
0,7.707664349,13.27072367,22.52388491,37.67514497,50.41764053,64.36349852,85.04439053,114.8154083,121.5373876,126.4842618,131.5702669
1,5.339157988,9.665206361,16.3212247,25.69696183,34.3933784,42.78578225,56.56780266,77.67227663,84.11597574,88.81037426,93.71992811
5,1.457756228,3.331287249,6.950436657,12.98877589,20.0210074,27.43615651,38.61494941,55.74011775,61.73515651,66.14205769,70.80275562
10,0.674803843,1.567018402,3.412150414,6.768425089,12.02040503,18.99848876,28.48390947,41.95774053,49.79036657,55.61760355,61.96699172
15,0.374942269,0.890156751,1.999680266,4.17545287,7.970485858,13.77150547,21.54202485,32.5164503,40.00971361,45.47003254,51.55691006
20,0.234300607,0.570452012,1.341359763,2.900124704,5.823169231,10.51187781,17.04112278,26.61342308,33.7095355,39.2022929,44.91676923
25,0.168219837,0.418437692,0.986660488,2.169929586,4.446295266,8.16066287,13.62476775,22.54829882,29.13213166,34.60920562,40.98299822
30,0.130755464,0.326453314,0.775799941,1.712559615,3.540666568,6.594925592,11.50380281,19.44388018,25.7829571,30.91992012,36.96534675
40,0.084606854,0.21635932,0.526180873,1.191645,2.475414941,4.625759024,8.45751997,15.22727959,20.35568935,24.56219822,29.71744941
50,0.059117497,0.15500003,0.38541787,0.893077278,1.872115976,3.529267751,6.736000148,12.96362825,17.16728402,20.66299704,24.86460237
60,0.048886744,0.129393145,0.325088861,0.761715636,1.617228107,3.073141864,5.895560947,11.40280444,15.35408343,18.73181509,22.82340118
70,0.041115485,0.109911414,0.279018092,0.661825666,1.422145237,2.733924556,5.250720414,10.40221036,14.11685754,17.21826553,20.98787544
80,0.035204072,0.095320541,0.244825163,0.586305962,1.280567781,2.478747041,4.844250296,9.686435059,13.12127322,16.0290858,19.57081716
90,0.031339694,0.085311062,0.220564157,0.532609053,1.173067485,2.299773521,4.507038905,9.073156065,12.28096686,14.93154379,18.15655873
100,0.028193074,0.077186157,0.200832204,0.488295044,1.091764083,2.149968047,4.239144379,8.553141864,11.5033784,14.00290503,17.04687396
110,0.025760404,0.070753161,0.184999867,0.456116361,1.025155991,2.053804586,4.098048669,8.198609024,11.01552973,13.39149482,16.28801686
120,0.023418339,0.065311833,0.17292676,0.428619482,0.981007618,1.973779438,3.913797189,7.889311391,10.57609024,12.85428935,15.63151568
130,0.021422706,0.060036726,0.159826036,0.401797145,0.923849275,1.844078846,3.652998077,7.346865385,9.885104586,12.06163299,14.71902352
140,0.019436627,0.055392756,0.149491527,0.377716036,0.862276805,1.727284024,3.418099852,6.864659467,9.285601479,11.34831257,13.86946139
150,0.017882064,0.051205386,0.138890678,0.355740444,0.815972722,1.664211834,3.318667012,6.691384024,9.046443343,11.08526553,13.58102678
175,0.014085025,0.041129623,0.113695167,0.294761287,0.693225015,1.437015932,2.899418047,5.920155769,7.987146598,9.721223373,11.84265266
200,0.011320745,0.033541484,0.093466598,0.243588314,0.583195991,1.227201257,2.482196302,5.070241124,6.834999556,8.344338609,10.19973121
250,0.007865832,0.023567451,0.066488052,0.173818595,0.422838506,0.911390547,1.848406065,3.885357988,5.591306509,6.931175296,8.536424349
300,0.005816911,0.017431254,0.049377058,0.130438962,0.324356879,0.706769926,1.50817321,3.298248669,4.536776627,5.612775296,6.950557544
350,0.004365451,0.013226741,0.03798679,0.105516836,0.260806583,0.574072781,1.243391169,2.799627515,3.881401923,4.889190237,6.155121953
400,0.003196295,0.010316375,0.031109201,0.087395777,0.217036095,0.475852263,1.057407411,2.419163609,3.43393787,4.330218195,5.45835355
450,0.00244578,0.007960661,0.024261874,0.068559737,0.172305518,0.390697219,0.878221391,2.016736331,2.906477959,3.78559068,4.924527751
500,0.001907148,0.006256142,0.019205963,0.054733589,0.141762006,0.324928964,0.737643166,1.705952145,2.560752219,3.345977811,4.367282041
600,0.001210346,0.004079536,0.012858441,0.037745889,0.10117838,0.24279108,0.569708817,1.353650237,1.982036302,2.549912426,3.280613166
700,0.000808939,0.00279329,0.00903226,0.027351012,0.072845679,0.174659991,0.418943107,1.013540547,1.560637396,2.073211006,2.752580414
800,0.000554628,0.001965966,0.006544776,0.020579812,0.05649383,0.141388095,0.342384527,0.824782959,1.276243536,1.700876257,2.265870355
1000,0.000305265,0.001121663,0.003898465,0.012943702,0.037522571,0.101660926,0.280026885,0.783337382,1.347668047,1.933406553,2.744457604
1200,0.000155097,0.000590834,0.002140645,0.007530107,0.022016277,0.06020646,0.168403393,0.475456908,0.835316509,1.215303284,1.771799246
1500,7.02526E-05,0.000276743,0.001047907,0.003957514,0.012165541,0.035334733,0.105171384,0.316921086,0.60860355,0.944208595,1.473147651
SA0P01 SA0P01
r\m,4.0,4.5,5.0,5.5,6.0,6.5,7.0,7.5,7.8,8.0,8.2 r\m,4.0,4.5,5.0,5.5,6.0,6.5,7.0,7.5,7.8,8.0,8.2
0.0,0.77822,1.2031,1.6996,2.194,2.5879,2.7894,2.8026,2.8026,2.8026,2.8026,2.8026 0.0,0.77822,1.2031,1.6996,2.194,2.5879,2.7894,2.8026,2.8026,2.8026,2.8026,2.8026
......
...@@ -34,42 +34,6 @@ r\m,4.0,4.5,5.0,5.5,6.0,6.5,7.0,7.5,7.8,8.0,8.2 ...@@ -34,42 +34,6 @@ r\m,4.0,4.5,5.0,5.5,6.0,6.5,7.0,7.5,7.8,8.0,8.2
1000.0,1.2444E-6,4.045E-6,1.2128E-5,3.2906E-5,8.1301E-5,1.8291E-4,3.7859E-4,7.1743E-4,0.0010087,0.0012437,0.0015117 1000.0,1.2444E-6,4.045E-6,1.2128E-5,3.2906E-5,8.1301E-5,1.8291E-4,3.7859E-4,7.1743E-4,0.0010087,0.0012437,0.0015117
1200.0,3.04E-7,1.0072E-6,3.0524E-6,8.463E-6,2.1465E-5,4.9802E-5,1.0571E-4,2.0525E-4,2.9283E-4,3.6457E-4,4.4745E-4 1200.0,3.04E-7,1.0072E-6,3.0524E-6,8.463E-6,2.1465E-5,4.9802E-5,1.0571E-4,2.0525E-4,2.9283E-4,3.6457E-4,4.4745E-4
1500.0,3.7928E-8,1.2946E-7,4.0421E-7,1.1546E-6,3.0169E-6,7.2115E-6,1.5769E-5,3.1545E-5,4.5817E-5,5.7725E-5,7.0999E-5 1500.0,3.7928E-8,1.2946E-7,4.0421E-7,1.1546E-6,3.0169E-6,7.2115E-6,1.5769E-5,3.1545E-5,4.5817E-5,5.7725E-5,7.0999E-5
PGV
r\m,4,4.5,5,5.5,6,6.5,7,7.5,7.8,8,8.2
0,7.707664349,13.27072367,22.52388491,37.67514497,50.41764053,64.36349852,85.04439053,114.8154083,121.5373876,126.4842618,131.5702669
1,5.339157988,9.665206361,16.3212247,25.69696183,34.3933784,42.78578225,56.56780266,77.67227663,84.11597574,88.81037426,93.71992811
5,1.457756228,3.331287249,6.950436657,12.98877589,20.0210074,27.43615651,38.61494941,55.74011775,61.73515651,66.14205769,70.80275562
10,0.674803843,1.567018402,3.412150414,6.768425089,12.02040503,18.99848876,28.48390947,41.95774053,49.79036657,55.61760355,61.96699172
15,0.374942269,0.890156751,1.999680266,4.17545287,7.970485858,13.77150547,21.54202485,32.5164503,40.00971361,45.47003254,51.55691006
20,0.234300607,0.570452012,1.341359763,2.900124704,5.823169231,10.51187781,17.04112278,26.61342308,33.7095355,39.2022929,44.91676923
25,0.168219837,0.418437692,0.986660488,2.169929586,4.446295266,8.16066287,13.62476775,22.54829882,29.13213166,34.60920562,40.98299822
30,0.130755464,0.326453314,0.775799941,1.712559615,3.540666568,6.594925592,11.50380281,19.44388018,25.7829571,30.91992012,36.96534675
40,0.084606854,0.21635932,0.526180873,1.191645,2.475414941,4.625759024,8.45751997,15.22727959,20.35568935,24.56219822,29.71744941
50,0.059117497,0.15500003,0.38541787,0.893077278,1.872115976,3.529267751,6.736000148,12.96362825,17.16728402,20.66299704,24.86460237
60,0.048886744,0.129393145,0.325088861,0.761715636,1.617228107,3.073141864,5.895560947,11.40280444,15.35408343,18.73181509,22.82340118
70,0.041115485,0.109911414,0.279018092,0.661825666,1.422145237,2.733924556,5.250720414,10.40221036,14.11685754,17.21826553,20.98787544
80,0.035204072,0.095320541,0.244825163,0.586305962,1.280567781,2.478747041,4.844250296,9.686435059,13.12127322,16.0290858,19.57081716
90,0.031339694,0.085311062,0.220564157,0.532609053,1.173067485,2.299773521,4.507038905,9.073156065,12.28096686,14.93154379,18.15655873
100,0.028193074,0.077186157,0.200832204,0.488295044,1.091764083,2.149968047,4.239144379,8.553141864,11.5033784,14.00290503,17.04687396
110,0.025760404,0.070753161,0.184999867,0.456116361,1.025155991,2.053804586,4.098048669,8.198609024,11.01552973,13.39149482,16.28801686
120,0.023418339,0.065311833,0.17292676,0.428619482,0.981007618,1.973779438,3.913797189,7.889311391,10.57609024,12.85428935,15.63151568
130,0.021422706,0.060036726,0.159826036,0.401797145,0.923849275,1.844078846,3.652998077,7.346865385,9.885104586,12.06163299,14.71902352
140,0.019436627,0.055392756,0.149491527,0.377716036,0.862276805,1.727284024,3.418099852,6.864659467,9.285601479,11.34831257,13.86946139
150,0.017882064,0.051205386,0.138890678,0.355740444,0.815972722,1.664211834,3.318667012,6.691384024,9.046443343,11.08526553,13.58102678
175,0.014085025,0.041129623,0.113695167,0.294761287,0.693225015,1.437015932,2.899418047,5.920155769,7.987146598,9.721223373,11.84265266
200,0.011320745,0.033541484,0.093466598,0.243588314,0.583195991,1.227201257,2.482196302,5.070241124,6.834999556,8.344338609,10.19973121
250,0.007865832,0.023567451,0.066488052,0.173818595,0.422838506,0.911390547,1.848406065,3.885357988,5.591306509,6.931175296,8.536424349
300,0.005816911,0.017431254,0.049377058,0.130438962,0.324356879,0.706769926,1.50817321,3.298248669,4.536776627,5.612775296,6.950557544
350,0.004365451,0.013226741,0.03798679,0.105516836,0.260806583,0.574072781,1.243391169,2.799627515,3.881401923,4.889190237,6.155121953
400,0.003196295,0.010316375,0.031109201,0.087395777,0.217036095,0.475852263,1.057407411,2.419163609,3.43393787,4.330218195,5.45835355
450,0.00244578,0.007960661,0.024261874,0.068559737,0.172305518,0.390697219,0.878221391,2.016736331,2.906477959,3.78559068,4.924527751
500,0.001907148,0.006256142,0.019205963,0.054733589,0.141762006,0.324928964,0.737643166,1.705952145,2.560752219,3.345977811,4.367282041
600,0.001210346,0.004079536,0.012858441,0.037745889,0.10117838,0.24279108,0.569708817,1.353650237,1.982036302,2.549912426,3.280613166
700,0.000808939,0.00279329,0.00903226,0.027351012,0.072845679,0.174659991,0.418943107,1.013540547,1.560637396,2.073211006,2.752580414
800,0.000554628,0.001965966,0.006544776,0.020579812,0.05649383,0.141388095,0.342384527,0.824782959,1.276243536,1.700876257,2.265870355
1000,0.000305265,0.001121663,0.003898465,0.012943702,0.037522571,0.101660926,0.280026885,0.783337382,1.347668047,1.933406553,2.744457604
1200,0.000155097,0.000590834,0.002140645,0.007530107,0.022016277,0.06020646,0.168403393,0.475456908,0.835316509,1.215303284,1.771799246
1500,7.02526E-05,0.000276743,0.001047907,0.003957514,0.012165541,0.035334733,0.105171384,0.316921086,0.60860355,0.944208595,1.473147651
SA0P01 SA0P01
r\m,4.0,4.5,5.0,5.5,6.0,6.5,7.0,7.5,7.8,8.0,8.2 r\m,4.0,4.5,5.0,5.5,6.0,6.5,7.0,7.5,7.8,8.0,8.2
0.0,0.4458,0.76497,1.1989,1.7161,2.2435,2.6789,2.9215,2.9488,2.9488,2.9488,2.9488 0.0,0.4458,0.76497,1.1989,1.7161,2.2435,2.6789,2.9215,2.9488,2.9488,2.9488,2.9488
......
...@@ -10,16 +10,33 @@ import static gov.usgs.earthquake.nshmp.gmm.Imt.PGA; ...@@ -10,16 +10,33 @@ import static gov.usgs.earthquake.nshmp.gmm.Imt.PGA;
import static gov.usgs.earthquake.nshmp.gmm.Imt.PGD; import static gov.usgs.earthquake.nshmp.gmm.Imt.PGD;
import static gov.usgs.earthquake.nshmp.gmm.Imt.PGV; import static gov.usgs.earthquake.nshmp.gmm.Imt.PGV;
import static gov.usgs.earthquake.nshmp.gmm.Imt.SA0P01; import static gov.usgs.earthquake.nshmp.gmm.Imt.SA0P01;
import static gov.usgs.earthquake.nshmp.gmm.Imt.SA0P02;
import static gov.usgs.earthquake.nshmp.gmm.Imt.SA0P03;
import static gov.usgs.earthquake.nshmp.gmm.Imt.SA0P05;
import static gov.usgs.earthquake.nshmp.gmm.Imt.SA0P075;
import static gov.usgs.earthquake.nshmp.gmm.Imt.SA0P1;
import static gov.usgs.earthquake.nshmp.gmm.Imt.SA0P15;
import static gov.usgs.earthquake.nshmp.gmm.Imt.SA0P2;
import static gov.usgs.earthquake.nshmp.gmm.Imt.SA0P25;
import static gov.usgs.earthquake.nshmp.gmm.Imt.SA0P3;
import static gov.usgs.earthquake.nshmp.gmm.Imt.SA0P4;
import static gov.usgs.earthquake.nshmp.gmm.Imt.SA0P5;
import static gov.usgs.earthquake.nshmp.gmm.Imt.SA0P75;
import static gov.usgs.earthquake.nshmp.gmm.Imt.SA10P0; import static gov.usgs.earthquake.nshmp.gmm.Imt.SA10P0;
import static gov.usgs.earthquake.nshmp.gmm.Imt.SA1P0; import static gov.usgs.earthquake.nshmp.gmm.Imt.SA1P0;
import static gov.usgs.earthquake.nshmp.gmm.Imt.SA1P5;
import static gov.usgs.earthquake.nshmp.gmm.Imt.SA2P0;
import static gov.usgs.earthquake.nshmp.gmm.Imt.SA3P0;
import static gov.usgs.earthquake.nshmp.gmm.Imt.SA4P0;
import static gov.usgs.earthquake.nshmp.gmm.Imt.SA5P0;
import static gov.usgs.earthquake.nshmp.gmm.Imt.SA7P5;
import static gov.usgs.earthquake.nshmp.gmm.Imt.SI; import static gov.usgs.earthquake.nshmp.gmm.Imt.SI;
import static org.junit.jupiter.api.Assertions.assertEquals; import static org.junit.jupiter.api.Assertions.assertEquals;
import static org.junit.jupiter.api.Assertions.assertFalse;
import static org.junit.jupiter.api.Assertions.assertThrows; import static org.junit.jupiter.api.Assertions.assertThrows;
import java.util.EnumSet; import java.util.EnumSet;
import java.util.List;
import java.util.Set; import java.util.Set;
import java.util.stream.Collectors;
import org.junit.jupiter.api.Test; import org.junit.jupiter.api.Test;
...@@ -43,7 +60,7 @@ class ImtTest { ...@@ -43,7 +60,7 @@ class ImtTest {
assertEquals(CAV.toString(), "Cumulative Absolute Velocity"); assertEquals(CAV.toString(), "Cumulative Absolute Velocity");
assertEquals(DS575.toString(), "Significant Duration 5-75%"); assertEquals(DS575.toString(), "Significant Duration 5-75%");
assertEquals(DS595.toString(), "Significant Duration 5-95%"); assertEquals(DS595.toString(), "Significant Duration 5-95%");
assertEquals(SA1P0.toString(), "1.00 Second Spectral Acceleration"); assertEquals(SA1P0.toString(), "1.0 s Spectral Acceleration");
} }
@Test @Test
...@@ -62,17 +79,27 @@ class ImtTest { ...@@ -62,17 +79,27 @@ class ImtTest {
} }
@Test @Test
void testPeriods() { void testPeriod() {
Set<Imt> imts = EnumSet.range(SA0P01, SA10P0); assertEquals(0.2, SA0P2.period());
List<Double> expected = imts.stream() assertThrows(UnsupportedOperationException.class, () -> {
.map(Imt::period) PGV.period();
.collect(Collectors.toList()); });
assertEquals(expected, Imt.periods(imts)); }
@Test
void testFromPeriod() {
assertEquals(SA0P2, Imt.fromPeriod(0.2));
assertThrows(IllegalArgumentException.class, () -> { assertThrows(IllegalArgumentException.class, () -> {
Imt.fromPeriod(0.1234); Imt.fromPeriod(0.1234);
}); });
}
@Test
void testFrequency() {
assertEquals(100, PGA.frequency());
assertEquals(5.0, SA0P2.frequency());
assertEquals(3.3333, SA0P3.frequency(), 0.0001);
assertEquals(0.1, SA10P0.frequency());
assertThrows(UnsupportedOperationException.class, () -> { assertThrows(UnsupportedOperationException.class, () -> {
PGV.frequency(); PGV.frequency();
}); });
...@@ -80,9 +107,19 @@ class ImtTest { ...@@ -80,9 +107,19 @@ class ImtTest {
@Test @Test
void testSaImts() { void testSaImts() {
// underlying method is complement of non-SA Imts
// which are listed first in the enum
assertEquals(Imt.saImts(), EnumSet.range(SA0P01, SA10P0)); assertEquals(Imt.saImts(), EnumSet.range(SA0P01, SA10P0));
assertFalse(Imt.saImts().contains(PGV));
}
@Test
void testMprs() {
Set<Imt> mprsImts = EnumSet.of(
PGA,
SA0P01, SA0P02, SA0P03, SA0P05, SA0P075,
SA0P1, SA0P15, SA0P2, SA0P25, SA0P3, SA0P4, SA0P5, SA0P75,
SA1P0, SA1P5, SA2P0, SA3P0, SA4P0, SA5P0, SA7P5,
SA10P0);
assertEquals(mprsImts, Imt.mprsImts());
} }
} }
package gov.usgs.earthquake.nshmp.gmm;
import static org.junit.jupiter.api.Assertions.assertDoesNotThrow;
import java.util.ArrayList;
import java.util.EnumSet;
import java.util.List;
import java.util.Set;
import java.util.stream.Stream;
import org.junit.jupiter.params.ParameterizedTest;
import org.junit.jupiter.params.provider.Arguments;
import org.junit.jupiter.params.provider.MethodSource;
class InstanceTest {
/*
* Intantiates all supported IMTs for all GMMs and runs a test calculation.
*/
private static GmmInput GMM_INPUT = GmmInput.builder().withDefaults().build();
@ParameterizedTest
@MethodSource("gmmImtPairs")
public void testInstances(Gmm gmm, Imt imt) {
assertDoesNotThrow(() -> {
GroundMotionModel instance = gmm.instance(imt);
instance.calc(GMM_INPUT);
});
}
private static Stream<Arguments> gmmImtPairs() {
List<Arguments> argsList = new ArrayList<>();
Set<Gmm> gmms = EnumSet.allOf(Gmm.class);
for (Gmm gmm : gmms) {
Set<Imt> imts = gmm.supportedImts();
for (Imt imt : imts) {
argsList.add(Arguments.of(gmm, imt));
}
}
return argsList.stream();
}
}