Skip to content

Commit

Permalink
updates for 22.8
Browse files Browse the repository at this point in the history
  • Loading branch information
Kevin Milner committed Nov 7, 2024
1 parent d3b4e08 commit 55c9ac0
Showing 1 changed file with 30 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
import java.io.File;
import java.io.IOException;
import java.sql.SQLException;
import java.text.DecimalFormat;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collection;
Expand Down Expand Up @@ -350,6 +351,8 @@ public static void main(String[] args) throws IOException, SQLException {
List<CyberShakeStudy> studies = new ArrayList<>();
List<Vs30_Source> vs30s = new ArrayList<>();

// if non-null, subsets will be include below and above this split
Double vs30Split = null;
ZScoreHistPlot.D = true;

// studies.add(CyberShakeStudy.STUDY_18_9_RSQSIM_2740);
Expand Down Expand Up @@ -409,9 +412,12 @@ public static void main(String[] args) throws IOException, SQLException {

studies.add(CyberShakeStudy.STUDY_24_8_LF);
// vs30s.add(Vs30_Source.Simulation);
vs30s.add(Vs30_Source.Thompson2020);
vs30s.add(Vs30_Source.Thompson2020); vs30Split = 400d;

AttenRelRef primaryGMPE = AttenRelRef.ASK_2014; // this one will include highlight sites
// this one will include highlight sites
// AttenRelRef primaryGMPE = AttenRelRef.ASK_2014;
// AttenRelRef primaryGMPE = AttenRelRef.NGAWest_2014_AVG_NOIDRISS;
AttenRelRef primaryGMPE = null;
// AttenRelRef[] gmpeRefs = { AttenRelRef.NGAWest_2014_AVG_NOIDRISS, AttenRelRef.ASK_2014,
// AttenRelRef.BSSA_2014, AttenRelRef.CB_2014, AttenRelRef.CY_2014 };
// AttenRelRef[] gmpeRefs = { AttenRelRef.NGAWest_2014_AVG_NOIDRISS, AttenRelRef.ASK_2014 };
Expand Down Expand Up @@ -456,6 +462,11 @@ public static void main(String[] args) throws IOException, SQLException {
boolean replotCurves = false;
boolean replotResiduals = true;

// boolean replotScatters = false;
// boolean replotZScores = true;
// boolean replotCurves = false;
// boolean replotResiduals = false;

IMT[] rotDIMTs = null;
if (rotDPeriods != null) {
rotDIMTs = new IMT[rotDPeriods.length];
Expand Down Expand Up @@ -561,14 +572,31 @@ public static void main(String[] args) throws IOException, SQLException {

List<Site> vs500_sites = new ArrayList<>();
Map<String, Site> siteNamesMap = new HashMap<>();
List<Site> belowSplitSites = vs30Split == null ? null : new ArrayList<>();
List<Site> aboveSplitSites = vs30Split == null ? null : new ArrayList<>();
for (Site site : comp.sites) {
siteNamesMap.put(site.getName(), site);
double vs30 = site.getParameter(Double.class, Vs30_Param.NAME).getValue();
if ((float)vs30 == 500f)
vs500_sites.add(site);
if (vs30Split != null) {
if ((float)vs30 <= vs30Split.floatValue())
belowSplitSites.add(site);
else
aboveSplitSites.add(site);
}
}
if (!vs500_sites.isEmpty())
comp.addSiteBundle(vs500_sites, "Vs30=500");
if (vs30Split != null) {
System.out.println("Found "+belowSplitSites.size()+" sites below and "+aboveSplitSites.size()
+" sites above Vs30Split="+vs30Split);
if (!belowSplitSites.isEmpty() && !aboveSplitSites.isEmpty()) {
DecimalFormat oDF = new DecimalFormat("0.#");
comp.addSiteBundle(belowSplitSites, "Vs30<="+oDF.format(vs30Split));
comp.addSiteBundle(aboveSplitSites, "Vs30>"+oDF.format(vs30Split));
}
}
// List<BBP_Site> csLABBPsites = RSQSimBBP_Config.getCyberShakeVs500LASites();
// List<Site> csLAsites = new ArrayList<>();
// for (BBP_Site b : csLABBPsites)
Expand Down

0 comments on commit 55c9ac0

Please sign in to comment.