From 5fb6599c18ad808b5f8e03bb776761fc2aaa2ac6 Mon Sep 17 00:00:00 2001
From: Peter Powers <pmpowers@usgs.gov>
Date: Fri, 4 Feb 2022 10:02:14 -0700
Subject: [PATCH] removed damping sigma flag

---
 .../usgs/earthquake/nshmp/calc/CalcConfig.java | 18 ++----------------
 .../nshmp/gmm/RezaeianDamping_2014.java        |  2 +-
 .../resources/calc/calc-config-defaults.json   |  1 -
 .../earthquake/nshmp/calc/CalcConfigTests.java |  3 ---
 .../resources/calc/calc-config-extends.json    |  1 -
 5 files changed, 3 insertions(+), 22 deletions(-)

diff --git a/src/main/java/gov/usgs/earthquake/nshmp/calc/CalcConfig.java b/src/main/java/gov/usgs/earthquake/nshmp/calc/CalcConfig.java
index 78b49a29..39e0b3e1 100644
--- a/src/main/java/gov/usgs/earthquake/nshmp/calc/CalcConfig.java
+++ b/src/main/java/gov/usgs/earthquake/nshmp/calc/CalcConfig.java
@@ -213,8 +213,8 @@ public final class CalcConfig {
      * will apply a damping scale factor (DSF) to adjust the 5% damped spectral
      * ordinates predicted by GMMs.
      *
-     * <p><b>Default:</b> {@code 5.0%}<br><b>Range:</b> {@code 0.5%} to
-     * {@code 30.0%}
+     * <p><b>Default:</b> {@code 0.05} (5.0%)<br><b>Range:</b> {@code 0.5%} to
+     * {@code 30.0%} (0.005 to 0.3)
      *
      * <p><b>Note:</b> At this time, the damping scaling factor (DSF) model
      * (Rezaeian et al., 2014) is only applicable to active continental crust
@@ -225,13 +225,6 @@ public final class CalcConfig {
      */
     public final double gmmDampingRatio;
 
-    /**
-     * Whether or not {@link GroundMotionModel} (GMM) sigmas are also modified
-     * according to the Rezaeian et al. (2014) model when applying damping
-     * scaling factors (DSF).
-     */
-    public final boolean gmmDampingSigma;
-
     /**
      * The value format for hazard curves.
      *
@@ -253,7 +246,6 @@ public final class CalcConfig {
       this.sourceTypes = b.sourceTypes;
       this.vs30s = b.vs30s;
       this.gmmDampingRatio = b.gmmDampingRatio;
-      this.gmmDampingSigma = b.gmmDampingSigma;
       this.valueFormat = b.valueFormat;
 
       this.customImls = b.customImls;
@@ -295,7 +287,6 @@ public final class CalcConfig {
       Set<SourceType> sourceTypes;
       Set<Double> vs30s;
       Double gmmDampingRatio;
-      Boolean gmmDampingSigma;
       ValueFormat valueFormat;
       Map<Imt, double[]> customImls;
       Map<Imt, XySequence> curveMap;
@@ -314,7 +305,6 @@ public final class CalcConfig {
             RezaeianDamping_2014.DAMPING_RATIO_RANGE,
             "gmmDampingRatio",
             gmmDampingRatio);
-        checkNotNull(gmmDampingSigma);
         checkNotNull(valueFormat);
         checkNotNull(customImls);
         return new Hazard(this);
@@ -328,7 +318,6 @@ public final class CalcConfig {
         this.sourceTypes = that.sourceTypes;
         this.vs30s = that.vs30s;
         this.gmmDampingRatio = that.gmmDampingRatio;
-        this.gmmDampingSigma = that.gmmDampingSigma;
         this.valueFormat = that.valueFormat;
         this.customImls = that.customImls;
       }
@@ -352,9 +341,6 @@ public final class CalcConfig {
         if (that.vs30s != null) {
           this.vs30s = that.vs30s;
         }
-        if (that.gmmDampingSigma != null) {
-          this.gmmDampingSigma = that.gmmDampingSigma;
-        }
         if (that.gmmDampingRatio != null) {
           this.gmmDampingRatio = that.gmmDampingRatio;
         }
diff --git a/src/main/java/gov/usgs/earthquake/nshmp/gmm/RezaeianDamping_2014.java b/src/main/java/gov/usgs/earthquake/nshmp/gmm/RezaeianDamping_2014.java
index 212c4dfe..ef957225 100644
--- a/src/main/java/gov/usgs/earthquake/nshmp/gmm/RezaeianDamping_2014.java
+++ b/src/main/java/gov/usgs/earthquake/nshmp/gmm/RezaeianDamping_2014.java
@@ -145,7 +145,7 @@ public class RezaeianDamping_2014 {
 
   RezaeianDamping_2014(CalcConfig config) {
     dampingRatio = config.hazard.gmmDampingRatio * 100.0;
-    updateSigma = config.hazard.gmmDampingSigma;
+    updateSigma = false; // config.hazard.gmmDampingSigma;
   }
 
   /**
diff --git a/src/main/resources/calc/calc-config-defaults.json b/src/main/resources/calc/calc-config-defaults.json
index 61385f53..fe907c32 100644
--- a/src/main/resources/calc/calc-config-defaults.json
+++ b/src/main/resources/calc/calc-config-defaults.json
@@ -13,7 +13,6 @@
     "sourceTypes": [],
     "vs30s": [],
     "gmmDampingRatio": 0.05,
-    "gmmDampingSigma": false,
     "gmmSigmaReduction": 0.15,
     "valueFormat": "ANNUAL_RATE",
     "customImls": {}
diff --git a/src/test/java/gov/usgs/earthquake/nshmp/calc/CalcConfigTests.java b/src/test/java/gov/usgs/earthquake/nshmp/calc/CalcConfigTests.java
index 72c5e5c0..9886fdef 100644
--- a/src/test/java/gov/usgs/earthquake/nshmp/calc/CalcConfigTests.java
+++ b/src/test/java/gov/usgs/earthquake/nshmp/calc/CalcConfigTests.java
@@ -128,7 +128,6 @@ class CalcConfigTests {
     assertEquals(EnumSet.noneOf(TectonicSetting.class), def.tectonicSettings);
     assertEquals(EnumSet.noneOf(SourceType.class), def.tectonicSettings);
     assertEquals(0.05, def.gmmDampingRatio);
-    assertEquals(false, def.gmmDampingSigma);
     assertEquals(ValueFormat.ANNUAL_RATE, def.valueFormat);
 
     Map<Imt, XySequence> imlMap = def.modelCurves();
@@ -250,7 +249,6 @@ class CalcConfigTests {
     assertEquals(EnumSet.of(FAULT, ZONE, SLAB), def.sourceTypes);
     assertEquals(Set.of(260.0, 760.0), def.vs30s);
     assertEquals(0.03, def.gmmDampingRatio);
-    assertEquals(true, def.gmmDampingSigma);
     assertEquals(ValueFormat.POISSON_PROBABILITY, def.valueFormat);
 
     assertArrayEquals(
@@ -265,7 +263,6 @@ class CalcConfigTests {
     assertEquals(EnumSet.noneOf(SourceType.class), def.tectonicSettings);
     assertEquals(Set.of(), def.vs30s);
     assertEquals(0.05, def.gmmDampingRatio);
-    assertEquals(false, def.gmmDampingSigma);
     assertEquals(ValueFormat.ANNUAL_RATE, def.valueFormat);
   }
 
diff --git a/src/test/resources/calc/calc-config-extends.json b/src/test/resources/calc/calc-config-extends.json
index f0c4be1d..f1f535f8 100644
--- a/src/test/resources/calc/calc-config-extends.json
+++ b/src/test/resources/calc/calc-config-extends.json
@@ -9,7 +9,6 @@
     "sourceTypes": [ "FAULT", "ZONE", "SLAB" ],
     "vs30s": [ 260, 760 ],
     "gmmDampingRatio": 0.03,
-    "gmmDampingSigma": true,
     "valueFormat": "POISSON_PROBABILITY",
     "customImls": {
       "PGA": [0.0025, 0.0075, 0.0169, 0.0380, 0.0854, 0.192, 0.432, 0.973, 2.19, 4.92]
-- 
GitLab