org.opensha.sha.calc
Class ScenarioShakeMapCalculator

java.lang.Object
  extended by org.opensha.sha.calc.ScenarioShakeMapCalculator

public class ScenarioShakeMapCalculator
extends Object

Title: ScenarioShakeMapCalculator

Description: This class calculates the Scenario Shake Map Data using the based on the PropagationEffectParam input parameters imr, site and eqkRupforecast

Version:
1.0
Author:
: Nitin Gupta

Field Summary
protected static String C
           
protected static boolean D
           
 
Constructor Summary
ScenarioShakeMapCalculator()
           
 
Method Summary
 boolean done()
           
 ParameterList getAdjustableParams()
           
 int getCurrentSite()
           
 int getNumSites()
           
 GeoDataSet getScenarioShakeMapData(ArrayList<AttenuationRelationship> selectedAttenRels, ArrayList<Double> attenRelWts, Iterable<Site> sites, EqkRupture rupture, boolean isProbAtIML, double value)
          Does the ScenarioShakeMap data calculation on the user's local system.
 String getScenarioShakeMapDataUsingServer(ArrayList selectedAttenRels, ArrayList attenRelWts, String griddedRegionSitesFile, EqkRupture rupture, boolean isProbAtIML, double value, String selectedIMT)
          Does the ScenarioShakeMap data calculation on the server.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

C

protected static final String C
See Also:
Constant Field Values

D

protected static final boolean D
See Also:
Constant Field Values
Constructor Detail

ScenarioShakeMapCalculator

public ScenarioShakeMapCalculator()
Method Detail

getScenarioShakeMapData

public GeoDataSet getScenarioShakeMapData(ArrayList<AttenuationRelationship> selectedAttenRels,
                                          ArrayList<Double> attenRelWts,
                                          Iterable<Site> sites,
                                          EqkRupture rupture,
                                          boolean isProbAtIML,
                                          double value)
                                   throws ParameterException
Does the ScenarioShakeMap data calculation on the user's local system. This function computes a Scenario ShakeMap Data for the given Region, IMR, and ERF. The computed data in the form of X, Y and Z is place XYZ_DataSetAPI object.

Parameters:
selectedAttenRels - : ArrayList for the selected AttenuationRelationships
attenRelWts - : Relative Wts for all the selected AttenuationRelationship models.
griddedRegionSites - : Gridded Region Object
rupture - : selected EarthquakeRupture Object.
isProbAtIML - : if true the prob at the specified IML value (next param) will be computed; if false the IML at the specified Prob value (next param) will be computed.
value - : the IML or Prob to compute the map for.
Returns:
the XYZ_DataSetAPI : ArbDiscretized XYZ dataset
Throws:
ParameterException

getScenarioShakeMapDataUsingServer

public String getScenarioShakeMapDataUsingServer(ArrayList selectedAttenRels,
                                                 ArrayList attenRelWts,
                                                 String griddedRegionSitesFile,
                                                 EqkRupture rupture,
                                                 boolean isProbAtIML,
                                                 double value,
                                                 String selectedIMT)
                                          throws ParameterException
Does the ScenarioShakeMap data calculation on the server. This function computes a Scenario ShakeMap Data for the given Region, IMR, and ERF. The computed data in the form of X, Y and Z is place XYZ_DataSetAPI object. The computation is performed by the server to save the processor memory. It opens the connection with the servlet hosted on gravity.usc.edu , which does the calculation for the it and return back the result to it.

Parameters:
selectedAttenRels - : ArrayList for the selected AttenuationRelationships
attenRelWts - : Relative Wts for all the selected AttenuationRelationship models.
griddedRegionSites - : Gridded Region Object
rupture - : selected EarthquakeRupture Object.
isProbAtIML - : if true the prob at the specified IML value (next param) will be computed; if false the IML at the specified Prob value (next param) will be computed.
value - : the IML or Prob to compute the map for.
Returns:
the String : Absolute path to ArbDiscretized XYZ dataset file on the server
Throws:
ParameterException

getNumSites

public int getNumSites()
Returns:
the total number of sites in the region

getCurrentSite

public int getCurrentSite()
Returns:
the current site being processed

done

public boolean done()
Returns:
true if calculations for all the sites are done else return false.

getAdjustableParams

public ParameterList getAdjustableParams()
Returns:
the list of adjustable parameters.