org.opensha.sha.cybershake.calc
Class HazardCurveComputation

java.lang.Object
  extended by org.opensha.sha.cybershake.calc.HazardCurveComputation

public class HazardCurveComputation
extends Object


Field Summary
static double CONVERSION_TO_G
           
 
Constructor Summary
HazardCurveComputation(DBAccess db)
           
 
Method Summary
 DiscretizedFunc computeDeterministicCurve(ArrayList<Double> xVals, CybershakeRun run, int srcId, int rupId, CybershakeIM imType)
          Computes the Hazard Curve at the given run
 DiscretizedFunc computeDeterministicCurve(ArrayList<Double> imlVals, int runID, int srcId, int rupId, CybershakeIM imType)
          Computes the Hazard Curve at the given runID
 DiscretizedFunc computeDeterministicCurve(ArrayList<Double> imlVals, String site, int erfId, int sgtVariation, int rvid, int velModelID, int srcId, int rupId, CybershakeIM imType)
          Computes the Hazard Curve at the given site
 DiscretizedFunc computeHazardCurve(ArrayList<Double> imlVals, int runID, CybershakeIM imType)
          Computes the Hazard Curve at the given site
 DiscretizedFunc computeHazardCurve(ArrayList<Double> imlVals, String site, int erfId, int sgtVariation, int rvid, int velModelID, CybershakeIM imType)
          Computes the Hazard Curve at the given site
 DiscretizedFunc computeHazardCurve(ArrayList<Double> imlVals, String site, String erfName, int sgtVariation, int rvid, int velModelID, CybershakeIM imType)
          Computes the Hazard Curve at the given site
 DiscretizedFunc computeHazardCurve(List<Double> xVals, CybershakeRun run, CybershakeIM imType)
          Computes the Hazard Curve at the given site
 DiscretizedFunc computeHazardCurve(List<Double> xVals, CybershakeRun run, CybershakeIM imType, List<Integer> srcIdList)
           
 PeakAmplitudesFromDBAPI getPeakAmpsAccessor()
           
 ArrayList<CybershakeIM> getSupportedSA_PeriodStrings()
           
 ArrayList<CybershakeIM> getSupportedSA_PeriodStrings(int runID)
           
static void handleRupture(List<Double> xVals, List<Double> imVals, DiscretizedFunc hazardFunc, double qkProb)
           
static void handleRupture(List<Double> xVals, List<Double> imVals, DiscretizedFunc hazardFunc, double qkProb, int sourceID, int rupID, RuptureVariationProbabilityModifier rupProbVarMod, RuptureVariationProbabilityModifier rupVarAdditionProbMod, CybershakeRun run, CybershakeIM im)
           
static DiscretizedFunc setIMLProbs(List<Double> imlVals, DiscretizedFunc hazFunc, ArbitrarilyDiscretizedFunc normalizedFunc, double rupProb)
           
 void setPeakAmpsAccessor(PeakAmplitudesFromDBAPI peakAmplitudes)
          This can be used to override the internal peak amplitudes accessor with, for example, a cached version.
 void setRupProbModifier(RuptureProbabilityModifier rupProbMod)
          This can be used to modify individual rupture probabilities
 void setRupVarAdditionProbModifier(RuptureVariationProbabilityModifier rupVarProbMod)
          This can be used to add additional probability to individual rupture variations of a rupture such as in a short term forecast.
 void setRupVarProbModifier(RuptureVariationProbabilityModifier rupVarProbMod)
          This can be used to modify the probability of each individual rupture variation
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

CONVERSION_TO_G

public static final double CONVERSION_TO_G
See Also:
Constant Field Values
Constructor Detail

HazardCurveComputation

public HazardCurveComputation(DBAccess db)
Method Detail

setPeakAmpsAccessor

public void setPeakAmpsAccessor(PeakAmplitudesFromDBAPI peakAmplitudes)
This can be used to override the internal peak amplitudes accessor with, for example, a cached version.

Parameters:
peakAmplitudes -

setRupProbModifier

public void setRupProbModifier(RuptureProbabilityModifier rupProbMod)
This can be used to modify individual rupture probabilities

Parameters:
rupProbMod -

setRupVarProbModifier

public void setRupVarProbModifier(RuptureVariationProbabilityModifier rupVarProbMod)
This can be used to modify the probability of each individual rupture variation

Parameters:
rupVarProbMod -

setRupVarAdditionProbModifier

public void setRupVarAdditionProbModifier(RuptureVariationProbabilityModifier rupVarProbMod)
This can be used to add additional probability to individual rupture variations of a rupture such as in a short term forecast. The added RV probabilities will be handled as an additional rupture rather than modifying the empirical exeedence distribution for the given rupture

Parameters:
rupVarProbMod -

getSupportedSA_PeriodStrings

public ArrayList<CybershakeIM> getSupportedSA_PeriodStrings()
Returns:
the List of supported Peak amplitudes

getSupportedSA_PeriodStrings

public ArrayList<CybershakeIM> getSupportedSA_PeriodStrings(int runID)
Returns:
the List of supported Peak amplitudes for a given site, ERF ID, SGT Var ID, and Rup Var ID

computeDeterministicCurve

public DiscretizedFunc computeDeterministicCurve(ArrayList<Double> imlVals,
                                                 String site,
                                                 int erfId,
                                                 int sgtVariation,
                                                 int rvid,
                                                 int velModelID,
                                                 int srcId,
                                                 int rupId,
                                                 CybershakeIM imType)
Computes the Hazard Curve at the given site

Parameters:
imlVals -
site -
erfName -
srcId -
rupId -
imType -

computeDeterministicCurve

public DiscretizedFunc computeDeterministicCurve(ArrayList<Double> imlVals,
                                                 int runID,
                                                 int srcId,
                                                 int rupId,
                                                 CybershakeIM imType)
Computes the Hazard Curve at the given runID

Parameters:
imlVals -
runID -
srcId -
rupId -
imType -

computeDeterministicCurve

public DiscretizedFunc computeDeterministicCurve(ArrayList<Double> xVals,
                                                 CybershakeRun run,
                                                 int srcId,
                                                 int rupId,
                                                 CybershakeIM imType)
Computes the Hazard Curve at the given run

Parameters:
imlVals -
run -
srcId -
rupId -
imType -

computeHazardCurve

public DiscretizedFunc computeHazardCurve(ArrayList<Double> imlVals,
                                          String site,
                                          String erfName,
                                          int sgtVariation,
                                          int rvid,
                                          int velModelID,
                                          CybershakeIM imType)
Computes the Hazard Curve at the given site

Parameters:
imlVals -
site -
erfName -
imType -

computeHazardCurve

public DiscretizedFunc computeHazardCurve(ArrayList<Double> imlVals,
                                          String site,
                                          int erfId,
                                          int sgtVariation,
                                          int rvid,
                                          int velModelID,
                                          CybershakeIM imType)
Computes the Hazard Curve at the given site

Parameters:
imlVals -
site -
erfName -
imType -

computeHazardCurve

public DiscretizedFunc computeHazardCurve(ArrayList<Double> imlVals,
                                          int runID,
                                          CybershakeIM imType)
Computes the Hazard Curve at the given site

Parameters:
imlVals -
site -
erfName -
imType -

computeHazardCurve

public DiscretizedFunc computeHazardCurve(List<Double> xVals,
                                          CybershakeRun run,
                                          CybershakeIM imType)
Computes the Hazard Curve at the given site

Parameters:
imlVals -
site -
erfName -
imType -

computeHazardCurve

public DiscretizedFunc computeHazardCurve(List<Double> xVals,
                                          CybershakeRun run,
                                          CybershakeIM imType,
                                          List<Integer> srcIdList)

handleRupture

public static void handleRupture(List<Double> xVals,
                                 List<Double> imVals,
                                 DiscretizedFunc hazardFunc,
                                 double qkProb,
                                 int sourceID,
                                 int rupID,
                                 RuptureVariationProbabilityModifier rupProbVarMod,
                                 RuptureVariationProbabilityModifier rupVarAdditionProbMod,
                                 CybershakeRun run,
                                 CybershakeIM im)

handleRupture

public static void handleRupture(List<Double> xVals,
                                 List<Double> imVals,
                                 DiscretizedFunc hazardFunc,
                                 double qkProb)

setIMLProbs

public static DiscretizedFunc setIMLProbs(List<Double> imlVals,
                                          DiscretizedFunc hazFunc,
                                          ArbitrarilyDiscretizedFunc normalizedFunc,
                                          double rupProb)

getPeakAmpsAccessor

public PeakAmplitudesFromDBAPI getPeakAmpsAccessor()