|
| 1 | +package gov.usgs.earthquake.nshmp.gmm; |
| 2 | + |
| 3 | +import static gov.usgs.earthquake.nshmp.gmm.Gmm.NGA_EAST_USGS; |
| 4 | +import static gov.usgs.earthquake.nshmp.gmm.Gmm.NGA_EAST_USGS_SEEDS; |
| 5 | +import static gov.usgs.earthquake.nshmp.gmm.Imt.PGA; |
| 6 | +import static gov.usgs.earthquake.nshmp.gmm.Imt.SA0P02; |
| 7 | +import static gov.usgs.earthquake.nshmp.gmm.Imt.SA0P1; |
| 8 | +import static gov.usgs.earthquake.nshmp.gmm.Imt.SA0P2; |
| 9 | +import static gov.usgs.earthquake.nshmp.gmm.Imt.SA1P0; |
| 10 | +import static gov.usgs.earthquake.nshmp.gmm.Imt.SA3P0; |
| 11 | +import static gov.usgs.earthquake.nshmp.gmm.Imt.SA5P0; |
| 12 | +import static gov.usgs.earthquake.nshmp.gmm.Imt.SA10P0; |
| 13 | + |
| 14 | +import java.io.IOException; |
| 15 | +import java.util.Collection; |
| 16 | +import java.util.EnumSet; |
| 17 | +import java.util.Set; |
| 18 | + |
| 19 | +import org.junit.runner.RunWith; |
| 20 | +import org.junit.runners.Parameterized; |
| 21 | +import org.junit.runners.Parameterized.Parameters; |
| 22 | + |
| 23 | +@SuppressWarnings("javadoc") |
| 24 | +@RunWith(Parameterized.class) |
| 25 | +public class NgaEast extends GmmTest { |
| 26 | + |
| 27 | + private static String GMM_INPUTS = "nga-east-inputs.csv"; |
| 28 | + private static String GMM_RESULTS = "nga-east-results.csv"; |
| 29 | + |
| 30 | + @Parameters(name = "{index}: {0} {2} {1}") |
| 31 | + public static Collection<Object[]> data() throws IOException { |
| 32 | + return loadResults(GMM_RESULTS); |
| 33 | + } |
| 34 | + |
| 35 | + public NgaEast(int index, Gmm gmm, Imt imt, double exMedian, double exSigma) { |
| 36 | + super(index, gmm, imt, exMedian, exSigma, GMM_INPUTS); |
| 37 | + } |
| 38 | + |
| 39 | + /* Result generation sets */ |
| 40 | + private static Set<Gmm> gmms = EnumSet.of(NGA_EAST_USGS, NGA_EAST_USGS_SEEDS); |
| 41 | + private static Set<Imt> imts = EnumSet.of(PGA, SA0P02, SA0P1, SA0P2, SA1P0, SA3P0, SA5P0, SA10P0); |
| 42 | + |
| 43 | + public static void main(String[] args) throws IOException { |
| 44 | + GmmTest.generateResults(gmms, imts, GMM_INPUTS, GMM_RESULTS); |
| 45 | + } |
| 46 | + |
| 47 | +} |
0 commit comments