org.opensha.sha.calc.disaggregation
Interface DisaggregationCalculatorAPI

All Known Implementing Classes:
DisaggregationCalculator

public interface DisaggregationCalculatorAPI

Title: DisaggregationCalculatorAPI

Description: This class defines interface for Disaggregation calculator. Implementation of this interface disaggregates a hazard curve based on the input parameters imr, site and eqkRupforecast. See Bazzurro and Cornell (1999, Bull. Seism. Soc. Am., 89, pp. 501-520) for a complete discussion of disaggregation. The Dbar computed here is for rupture distance.

Version:
1.0
Author:
: Nitin Gupta

Method Summary
 boolean disaggregate(double iml, Site site, java.util.Map<TectonicRegionType,ScalarIMR> imrMap, AbstractERF eqkRupForecast, ParameterList calcParams)
          this function performs the disaggregation.
 boolean disaggregate(double iml, Site site, ScalarIMR imr, AbstractERF eqkRupForecast, ParameterList calcParams)
          this function performs the disaggregation.
 boolean done()
          Checks to see if disaggregation calculation for the selected site have been completed.
 java.lang.String getBinData()
          Returns the Bin Data in the String format
 int getCurrRuptures()
          gets the number of current rupture being processed
 java.lang.String getDisaggregationPlotUsingServlet(java.lang.String metadata)
          Creates the disaggregation plot using the GMT and return Disaggregation plot image web address as the URL string.
 java.lang.String getDisaggregationSourceInfo()
          Returns the disaggregated source list with following info ( in each line) 1)Source Id as given by OpenSHA 2)Name of the Source 3)Rate Contributed by that source 4)Percentage Contribution of the source in Hazard at the site.
 java.lang.String getMeanAndModeInfo()
           
 int getTotRuptures()
          gets the total number of ruptures
 void setDistanceRange(double[] distBinEdges)
          Setting up custom distance bins
 void setDistanceRange(double minDist, int numDist, double deltaDist)
          Setting up the Distance Range
 void setMagRange(double minMag, int numMags, double deltaMag)
          Setting up the Mag Range
 void setMaxZAxisForPlot(double zMax)
          Sets the Max Z Axis Range value fro the plotting purposes
 void setNumSourcestoShow(int numSources)
          Sets the number of sources to be shown in the Disaggregation.
 void setShowDistances(boolean showDistances)
          Enables/disables calculation and display of source distances in source data list.
 

Method Detail

setMaxZAxisForPlot

void setMaxZAxisForPlot(double zMax)
Sets the Max Z Axis Range value fro the plotting purposes

Parameters:
zMax -

disaggregate

boolean disaggregate(double iml,
                     Site site,
                     ScalarIMR imr,
                     AbstractERF eqkRupForecast,
                     ParameterList calcParams)
this function performs the disaggregation. Returns true if it was succesfully able to disaggregate above a given IML else return false

Parameters:
iml: - the intensity measure level to disaggregate
site: - site parameter
imr: - selected IMR object
eqkRupForecast: - selected Earthquake rup forecast
calcParams: - calculation parameters from the HazardCurveCalculator
Returns:
boolean

disaggregate

boolean disaggregate(double iml,
                     Site site,
                     java.util.Map<TectonicRegionType,ScalarIMR> imrMap,
                     AbstractERF eqkRupForecast,
                     ParameterList calcParams)
this function performs the disaggregation. Returns true if it was succesfully able to disaggregate above a given IML else return false

Parameters:
iml: - the intensity measure level to disaggregate
site: - site parameter
imrMap: - mapping of tectonic regions to IMR objects
eqkRupForecast: - selected Earthquake rup forecast
calcParams: - calculation parameters from the HazardCurveCalculator
Returns:
boolean

setNumSourcestoShow

void setNumSourcestoShow(int numSources)
Sets the number of sources to be shown in the Disaggregation.

Parameters:
numSources - int

setShowDistances

void setShowDistances(boolean showDistances)
Enables/disables calculation and display of source distances in source data list.

Parameters:
showDistances -

getDisaggregationSourceInfo

java.lang.String getDisaggregationSourceInfo()
Returns the disaggregated source list with following info ( in each line) 1)Source Id as given by OpenSHA 2)Name of the Source 3)Rate Contributed by that source 4)Percentage Contribution of the source in Hazard at the site.

Returns:
String

getCurrRuptures

int getCurrRuptures()
gets the number of current rupture being processed

Returns:

getTotRuptures

int getTotRuptures()
gets the total number of ruptures

Returns:

done

boolean done()
Checks to see if disaggregation calculation for the selected site have been completed.

Returns:

getDisaggregationPlotUsingServlet

java.lang.String getDisaggregationPlotUsingServlet(java.lang.String metadata)
Creates the disaggregation plot using the GMT and return Disaggregation plot image web address as the URL string.

Parameters:
metadata - String
Returns:
String

setMagRange

void setMagRange(double minMag,
                 int numMags,
                 double deltaMag)
Setting up the Mag Range

Parameters:
minMag - double
numMags - int
deltaMag - double

setDistanceRange

void setDistanceRange(double minDist,
                      int numDist,
                      double deltaDist)
Setting up the Distance Range

Parameters:
minDist - double
numDist - int
deltaDist - double

setDistanceRange

void setDistanceRange(double[] distBinEdges)
Setting up custom distance bins

Parameters:
distBinEdges - - a double array of the distance-bin edges (in correct order, from low to high)

getBinData

java.lang.String getBinData()
Returns the Bin Data in the String format

Returns:
String

getMeanAndModeInfo

java.lang.String getMeanAndModeInfo()
Returns:
resultant disaggregation in a String format.