From 582e7832131119342c1ca9fb11b30dc9b8421c48 Mon Sep 17 00:00:00 2001
From: Peter Powers <pmpowers@usgs.gov>
Date: Wed, 11 Dec 2024 10:33:11 -0700
Subject: [PATCH] cleanup

---
 .../nshmp/gmm/AbrahamsonEtAl_2014.java        |  2 +-
 .../nshmp/gmm/UsgsPrviBackbone2025.java       | 38 +++++++++++++++++++
 2 files changed, 39 insertions(+), 1 deletion(-)

diff --git a/src/main/java/gov/usgs/earthquake/nshmp/gmm/AbrahamsonEtAl_2014.java b/src/main/java/gov/usgs/earthquake/nshmp/gmm/AbrahamsonEtAl_2014.java
index 431dc1d6..bdcc6fab 100644
--- a/src/main/java/gov/usgs/earthquake/nshmp/gmm/AbrahamsonEtAl_2014.java
+++ b/src/main/java/gov/usgs/earthquake/nshmp/gmm/AbrahamsonEtAl_2014.java
@@ -410,7 +410,7 @@ public class AbrahamsonEtAl_2014 implements GroundMotionModel {
    * relative to a hard rock site condition ln(SA[Vs30=1180]). This method is
    * exposed for use in other GMM aleatory variability models.
    */
-  public static final double get_dAmp(
+  static final double get_dAmp(
       double b,
       double c,
       double vLin,
diff --git a/src/main/java/gov/usgs/earthquake/nshmp/gmm/UsgsPrviBackbone2025.java b/src/main/java/gov/usgs/earthquake/nshmp/gmm/UsgsPrviBackbone2025.java
index 850c0b21..c54f7813 100644
--- a/src/main/java/gov/usgs/earthquake/nshmp/gmm/UsgsPrviBackbone2025.java
+++ b/src/main/java/gov/usgs/earthquake/nshmp/gmm/UsgsPrviBackbone2025.java
@@ -266,6 +266,7 @@ public abstract class UsgsPrviBackbone2025 implements GroundMotionModel {
       double φSS = calcPhiSS(in.Mw, c);
       double φSqNga = φSS * φSS + c.φs2sNga * c.φs2sNga;
       double φSqPrvi = φSS * φSS + c.φs2sPrvi * c.φs2sPrvi;
+
       double φNlNgaSq = calcPhiNonLinSq(φSqNga, dAmp_p1);
       double φNlPrviSq = calcPhiNonLinSq(φSqPrvi, dAmp_p1);
 
@@ -275,6 +276,43 @@ public abstract class UsgsPrviBackbone2025 implements GroundMotionModel {
       return new double[] { σNga, σPrvi };
     }
 
+    // sigma sleuthing TODO clean
+    // @Override
+    // double[] calcSigmas(GmmInput in) {
+    // Coefficients c = super.coeffs;
+    // double Ï„ = calcTau(in.Mw, c);
+    // System.out.println("Ï„: " + Ï„);
+    // double saRock = calcSaRock(in);
+    // double dAmp_p1 = AbrahamsonEtAl_2014.get_dAmp(c.bnl, c.cnl, c.vlin,
+    // in.vs30, saRock) + 1.0;
+    // double Ï„nl = Ï„ * dAmp_p1;
+    // System.out.println("Ï„nl: " + Ï„nl);
+    // double φSS = calcPhiSS(in.Mw, c);
+    // double φSqNga = φSS * φSS + c.φs2sNga * c.φs2sNga;
+    // double φSqPrvi = φSS * φSS + c.φs2sPrvi * c.φs2sPrvi;
+    // System.out.println("φSS: " + φSS);
+    // System.out.println("c.φs2sNga: " + c.φs2sNga);
+    // System.out.println("c.φs2sPrvi: " + c.φs2sPrvi);
+    // double φNlNgaSq = calcPhiNonLinSq(φSqNga, dAmp_p1);
+    // double φNlPrviSq = calcPhiNonLinSq(φSqPrvi, dAmp_p1);
+    //
+    // System.out.println("φNlNga: " + sqrt(φNlNgaSq));
+    // System.out.println("φNlPrvi: " + sqrt(φNlPrviSq));
+    //
+    // double σNga = sqrt(τnl * τnl + φNlNgaSq);
+    // double σPrvi = sqrt(τnl * τnl + φNlPrviSq);
+    //
+    // System.out.println("σNga: " + σNga);
+    // System.out.println("σPrvi: " + σPrvi);
+    //
+    // System.out.println("--- no nonlin ---");
+    //
+    // System.out.println("σNga: " + sqrt(τ * τ + φSqNga));
+    // System.out.println("σPrvi: " + sqrt(τ * τ + φSqPrvi));
+    //
+    // return new double[] { σNga, σPrvi };
+    // }
+
     private double calcSaRock(GmmInput in) {
       // ASK Vs30 rock = 1180 m/s
       // Also disable basin term.
-- 
GitLab