|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.opensha.sha.calc.HazardCurveCalculator
public class HazardCurveCalculator
Title: HazardCurveCalculator
Description: This class calculates the Hazard curve based on the input parameters imr, site and eqkRupforecast or eqkRupture (for probabilistic or deterministic, respectively)
Copyright: Copyright (c) 2002
Company:
| Field Summary | |
|---|---|
protected static String |
C
|
protected int |
currRuptures
|
protected static boolean |
D
|
protected int |
numSources
|
protected int |
sourceIndex
|
protected int |
totRuptures
|
| Constructor Summary | |
|---|---|
HazardCurveCalculator()
creates the HazardCurveCalculator object |
|
| Method Summary | |
|---|---|
ParameterList |
getAdjustableParams()
Get the adjustable parameter list of calculation parameters |
ListIterator<Parameter<?>> |
getAdjustableParamsIterator()
Get iterator for the adjustable parameters |
DiscretizedFunc |
getAnnualizedRates(DiscretizedFunc hazFunction,
double years)
Returns the Annualized Rates for the Hazard Curves |
DiscretizedFunc |
getAverageEventSetHazardCurve(DiscretizedFunc hazFunction,
Site site,
ScalarIMR imr,
ERF eqkRupForecast)
This function computes an average hazard curve from a number of stochastic event sets for the given Site, IMR, eqkRupForecast, where the number of event-set realizations is specified as the value in numStochEventSetRealizationsParam. |
int |
getCurrRuptures()
gets the current rupture that is being processed |
DiscretizedFunc |
getEventSetHazardCurve(DiscretizedFunc hazFunction,
Site site,
ScalarIMR imr,
List<EqkRupture> eqkRupList,
boolean updateCurrRuptures)
This function computes a hazard curve for the given Site, IMR, and event set (eqkRupList), where it is assumed that each of the events occur (probability of each is 1.0). |
DiscretizedFunc |
getHazardCurve(DiscretizedFunc hazFunction,
Site site,
Map<TectonicRegionType,ScalarIMR> imrMap,
ERF eqkRupForecast)
This function computes a hazard curve for the given Site, imrMap, ERF, and discretized function, where the latter supplies the x-axis values (the IMLs) for the computation, and the result (probability) is placed in the y-axis values of this function. |
DiscretizedFunc |
getHazardCurve(DiscretizedFunc hazFunction,
Site site,
ScalarIMR imr,
EqkRupture rupture)
This computes the "deterministic" exceedance curve for the given Site, IMR, and ProbEqkrupture (conditioned on the event actually occurring). |
DiscretizedFunc |
getHazardCurve(DiscretizedFunc hazFunction,
Site site,
ScalarIMR imr,
ERF eqkRupForecast)
This function computes a hazard curve for the given Site, IMR, ERF, and discretized function, where the latter supplies the x-axis values (the IMLs) for the computation, and the result (probability) is placed in the y-axis values of this function. |
ArbitrarilyDiscretizedFunc |
getMagDistCutoffFunc()
This gets the mag-dist filter function (distance on x-axis and mag on y-axis), returning null if the includeMagDistFilterParam has been set to false. |
double |
getMaxSourceDistance()
This is a direct way of getting the distance cutoff from that parameter |
PtSrcDistCorr.Type |
getPtSrcDistCorrType()
This gets the type of point-source distance correction that is desired (see the class PtSrcDistCorr for options) |
int |
getTotRuptures()
gets the total number of ruptures. |
protected void |
initDiscretizeValues(DiscretizedFunc arb,
double val)
Initialize the prob as 1 for the Hazard function |
static void |
main(String[] args)
|
void |
parameterChangeWarning(ParameterChangeWarningEvent event)
Function that must be implemented by all Listeners for ParameterChangeWarnEvents. |
void |
setAdjustableParams(ParameterList paramList)
This was created so new instances of this calculator could be given pointers to a set of parameter that already exist. |
void |
setIncludeMagDistCutoff(boolean include)
Sets the IncludeMagDistFilterParam parameter, which determines if the
magnitude/distance filter is used in calculation. |
void |
setMagDistCutoffFunc(ArbitrarilyDiscretizedFunc magDistfunc)
This sets the mag-dist filter function (distance on x-axis and mag on y-axis), and also sets the value of includeMagDistFilterParam as true |
void |
setMaxSourceDistance(double distance)
This sets the maximum distance of sources to be considered in the calculation. |
void |
setNumStochEventSetRealizations(int numRealizations)
Set the number of stochastic event set realizations for average event set hazard curve calculation. |
void |
setPtSrcDistCorrType(PtSrcDistCorr.Type type)
This sets the type of point-source distance correction that is desired (see the class PtSrcDistCorr for options) |
void |
stopCalc()
stops the Hazard Curve calculations. |
void |
testEventSetHazardCurve(int numIterations)
This tests whether the average over many curves from getEventSetCurve equals what is given by getHazardCurve. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected static final String C
protected static final boolean D
protected int currRuptures
protected int totRuptures
protected int sourceIndex
protected int numSources
| Constructor Detail |
|---|
public HazardCurveCalculator()
| Method Detail |
|---|
public void setPtSrcDistCorrType(PtSrcDistCorr.Type type)
HazardCurveCalculatorAPI
setPtSrcDistCorrType in interface HazardCurveCalculatorAPIpublic PtSrcDistCorr.Type getPtSrcDistCorrType()
HazardCurveCalculatorAPI
getPtSrcDistCorrType in interface HazardCurveCalculatorAPIpublic void setMaxSourceDistance(double distance)
HazardCurveCalculatorAPI
setMaxSourceDistance in interface HazardCurveCalculatorAPIpublic void setNumStochEventSetRealizations(int numRealizations)
HazardCurveCalculatorAPINumStochasticEventSetsParam
parameter.
setNumStochEventSetRealizations in interface HazardCurveCalculatorAPInumRealizations - number of stochastic event set realizationspublic double getMaxSourceDistance()
HazardCurveCalculatorAPI
getMaxSourceDistance in interface HazardCurveCalculatorAPIpublic void setMagDistCutoffFunc(ArbitrarilyDiscretizedFunc magDistfunc)
HazardCurveCalculatorAPI
setMagDistCutoffFunc in interface HazardCurveCalculatorAPImagDistfunc - function to setpublic void setIncludeMagDistCutoff(boolean include)
HazardCurveCalculatorAPIIncludeMagDistFilterParam parameter, which determines if the
magnitude/distance filter is used in calculation.
setIncludeMagDistCutoff in interface HazardCurveCalculatorAPIinclude - if true, the magnitude/distance filter is includedpublic ArbitrarilyDiscretizedFunc getMagDistCutoffFunc()
HazardCurveCalculatorAPI
getMagDistCutoffFunc in interface HazardCurveCalculatorAPI
public DiscretizedFunc getAnnualizedRates(DiscretizedFunc hazFunction,
double years)
HazardCurveCalculatorAPI
getAnnualizedRates in interface HazardCurveCalculatorAPIhazFunction - Discretized Hazard Function
public DiscretizedFunc getHazardCurve(DiscretizedFunc hazFunction,
Site site,
ScalarIMR imr,
ERF eqkRupForecast)
HazardCurveCalculatorAPI
getHazardCurve in interface HazardCurveCalculatorAPI
public DiscretizedFunc getHazardCurve(DiscretizedFunc hazFunction,
Site site,
Map<TectonicRegionType,ScalarIMR> imrMap,
ERF eqkRupForecast)
HazardCurveCalculatorAPIimrMap parameter.
If the mapping only contains a single IMR, then that IMR will be used for all sources.
Otherwise, if a mapping exists for the source's tectonic region type (TRT), then the IMR
from that mapping will be used for that source. If no mapping exists, a NullPointerException
will be thrown.
Once the IMR is selected, it's TRT paramter can be set by the soruce, depending
on the SetTRTinIMR_FromSourceParam param and NonSupportedTRT_OptionsParam
param. If SetTRTinIMR_FromSourceParam is true, then the IMR's TRT param will be set by
the source (otherwise it will be left unchanged). If it is to be set, but the source's TRT is not
supported by the IMR, then NonSupportedTRT_OptionsParam is used.
getHazardCurve in interface HazardCurveCalculatorAPIimrMap - this Map
specifies which IMR to use with each tectonic region.eqkRupForecast - selected Earthquake rup forecast
hazFunction param.
public DiscretizedFunc getAverageEventSetHazardCurve(DiscretizedFunc hazFunction,
Site site,
ScalarIMR imr,
ERF eqkRupForecast)
HazardCurveCalculatorAPI
getAverageEventSetHazardCurve in interface HazardCurveCalculatorAPIhazFunction - This function is where the hazard curve is placedsite - site objectimr - selected IMR objecteqkRupForecast - selected Earthquake rup forecast
hazFunction param.
public DiscretizedFunc getEventSetHazardCurve(DiscretizedFunc hazFunction,
Site site,
ScalarIMR imr,
List<EqkRupture> eqkRupList,
boolean updateCurrRuptures)
HazardCurveCalculatorAPI
getEventSetHazardCurve in interface HazardCurveCalculatorAPIhazFunction - This function is where the hazard curve is placedsite - site objectimr - selected IMR objectupdateCurrRuptures - tells whether to update current ruptures (for the getCurrRuptures() method used for progress bars)
hazFunction param.
public DiscretizedFunc getHazardCurve(DiscretizedFunc hazFunction,
Site site,
ScalarIMR imr,
EqkRupture rupture)
HazardCurveCalculatorAPI
getHazardCurve in interface HazardCurveCalculatorAPIhazFunction - This function is where the deterministic hazard curve is placedsite - site objectimr - selected IMR objectrupture - Single Earthquake Rupture
hazFunction param.public int getCurrRuptures()
HazardCurveCalculatorAPI
getCurrRuptures in interface HazardCurveCalculatorAPIpublic int getTotRuptures()
HazardCurveCalculatorAPI
getTotRuptures in interface HazardCurveCalculatorAPIpublic void stopCalc()
HazardCurveCalculatorAPI
stopCalc in interface HazardCurveCalculatorAPI
protected void initDiscretizeValues(DiscretizedFunc arb,
double val)
arb - public ParameterList getAdjustableParams()
HazardCurveCalculatorAPI
getAdjustableParams in interface HazardCurveCalculatorAPIpublic void setAdjustableParams(ParameterList paramList)
HazardCurveCalculatorAPI
setAdjustableParams in interface HazardCurveCalculatorAPIparamList - parameters to be setpublic ListIterator<Parameter<?>> getAdjustableParamsIterator()
HazardCurveCalculatorAPI
getAdjustableParamsIterator in interface HazardCurveCalculatorAPIpublic void testEventSetHazardCurve(int numIterations)
public void parameterChangeWarning(ParameterChangeWarningEvent event)
ParameterChangeWarningListener
parameterChangeWarning in interface ParameterChangeWarningListenerevent - The Event which triggered this function callpublic static void main(String[] args)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||