Skip to content
Snippets Groups Projects
Commit 72d4a437 authored by Altekruse, Jason Morgan's avatar Altekruse, Jason Morgan
Browse files

clean up for merge - comment out Gmm enum definition and test case. model is...

clean up for merge - comment out Gmm enum definition and test case. model is incomplete and requires feedback from author
parent 6c6ea740
No related branches found
No related tags found
1 merge request!237Graizer GMM
......@@ -250,12 +250,12 @@ public enum Gmm {
SadighEtAl_1997.COEFFS_BC_HI,
SadighEtAl_1997.CONSTRAINTS),
/** @see Grazier_2018 */
GRAIZER_2018(
Graizer_2018.class,
Graizer_2018.NAME,
Graizer_2018.COEFFS,
Graizer_2018.CONSTRAINTS),
// /** @see Grazier_2018 */
// GRAIZER_2018(
// Graizer_2018.class,
// Graizer_2018.NAME,
// Graizer_2018.COEFFS,
// Graizer_2018.CONSTRAINTS),
/* Subduction Interface and Slab WUS 2008 2014 2018, AK 2007 */
......
......@@ -21,6 +21,7 @@ import static java.lang.Math.sqrt;
import java.util.Map;
import com.google.common.annotations.Beta;
import com.google.common.collect.Range;
import gov.usgs.earthquake.nshmp.Faults;
......@@ -28,10 +29,8 @@ import gov.usgs.earthquake.nshmp.gmm.GmmInput.Constraints;
import gov.usgs.earthquake.nshmp.tree.LogicTree;
/**
*
* TODO:
*
*
* * is Q_SA, for G3, defined by Eq. 8?
*
* * coefficients c21 and c22 are not defined in G18 or GK16 papers.
......@@ -44,7 +43,7 @@ import gov.usgs.earthquake.nshmp.tree.LogicTree;
* monotonic), so use the set of 16 periods in Table 1 and Matlab
*
* * Attempt to compute values in Table S1 and/or S2 using the manual regression
* code blocks in Matlab
* code blocks in Matlab (so far, the matlab code does not reproduce the tables)
*
*
* Implementation of the GK17 ground motion model for shallow crustal
......@@ -72,8 +71,9 @@ import gov.usgs.earthquake.nshmp.tree.LogicTree;
* <p><b>Component:</b> RotD50 average horizontal components
*
* @author U.S. Geological Survey
* @see Gmm#GK_17
* @see Gmm#GRAIZER_2018
*/
@Beta
public final class Graizer_2018 implements GroundMotionModel {
public static void main(String[] args) {
......
package gov.usgs.earthquake.nshmp.gmm;
import static gov.usgs.earthquake.nshmp.gmm.Gmm.GRAIZER_2018;
import java.io.IOException;
import java.util.EnumSet;
import java.util.Set;
import java.util.stream.Stream;
import org.junit.jupiter.api.extension.ExtensionContext;
import org.junit.jupiter.params.ParameterizedTest;
import org.junit.jupiter.params.provider.Arguments;
import org.junit.jupiter.params.provider.ArgumentsProvider;
import org.junit.jupiter.params.provider.ArgumentsSource;
public class Graizer18Test implements ArgumentsProvider {
private static String GMM_INPUTS = "/gmm/graizer_2018_inputs.csv";
private static String GMM_RESULTS = "/gmm/graizer_2018_results.csv";
@ParameterizedTest(name = "({index}) {0} {2} {1}")
@ArgumentsSource(Graizer18Test.class)
void test(int index, Gmm gmm, Imt imt, double exMedian, double exSigma, String inputs) {
GmmTest.test(index, gmm, imt, exMedian, exSigma, inputs);
}
@Override
public Stream<? extends Arguments> provideArguments(ExtensionContext context) throws Exception {
return GmmTest.loadResults(GMM_RESULTS, GMM_INPUTS);
}
/* Result generation sets */
private static Set<Gmm> gmms = EnumSet.of(GRAIZER_2018);
public static void main(String[] args) throws IOException {
GmmTest.generateResults(gmms, Imt.mprsImts(), GMM_INPUTS, GMM_RESULTS);
}
}
// package gov.usgs.earthquake.nshmp.gmm;
//
// import static gov.usgs.earthquake.nshmp.gmm.Gmm.GRAIZER_2018;
//
// import java.io.IOException;
// import java.util.EnumSet;
// import java.util.Set;
// import java.util.stream.Stream;
//
// import org.junit.jupiter.api.extension.ExtensionContext;
// import org.junit.jupiter.params.provider.Arguments;
// import org.junit.jupiter.params.provider.ArgumentsProvider;
//
// public class Graizer18Test implements ArgumentsProvider {
//
// private static String GMM_INPUTS = "/gmm/graizer_2018_inputs.csv";
// private static String GMM_RESULTS = "/gmm/graizer_2018_results.csv";
//
// // @ParameterizedTest(name = "({index}) {0} {2} {1}")
// // @ArgumentsSource(Graizer18Test.class)
// // void test(int index, Gmm gmm, Imt imt, double exMedian, double exSigma,
// // String inputs) {
// // GmmTest.test(index, gmm, imt, exMedian, exSigma, inputs);
// // }
//
// @Override
// public Stream<? extends Arguments> provideArguments(ExtensionContext context)
// throws Exception {
// return GmmTest.loadResults(GMM_RESULTS, GMM_INPUTS);
// }
//
// /* Result generation sets */
// private static Set<Gmm> gmms = EnumSet.of(GRAIZER_2018);
//
// public static void main(String[] args) throws IOException {
// GmmTest.generateResults(gmms, Imt.mprsImts(), GMM_INPUTS, GMM_RESULTS);
// }
//
// }
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment