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)
           
static DiscretizedFunc setIMLProbs(List<Double> imlVals, DiscretizedFunc hazFunc, ArbitrarilyDiscretizedFunc normalizedFunc, double rupProb)
           
 void setPeakAmpsAccessor(PeakAmplitudesFromDBAPI peakAmplitudes)
           
 void setRupProbModifier(RuptureProbabilityModifier rupProbMod)
           
 void setRupVarProbModifier(RuptureVariationProbabilityModifier rupVarProbMod)
           
 
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)

setRupProbModifier

public void setRupProbModifier(RuptureProbabilityModifier rupProbMod)

setRupVarProbModifier

public void setRupVarProbModifier(RuptureVariationProbabilityModifier 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)

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()