org.opensha.sha.earthquake.rupForecastImpl.WGCEP_UCERF_2_Final.analysis
Class ProbabilityDistHistogramPlotter

java.lang.Object
  extended by org.opensha.sha.earthquake.rupForecastImpl.WGCEP_UCERF_2_Final.analysis.ProbabilityDistHistogramPlotter

public class ProbabilityDistHistogramPlotter
extends java.lang.Object

This class generates excel sheets for probability contribution of each A-Fault source and some B-Faults (San Gregorio Connected, Greenville Connected, Green Valley Connected, Mount Diablo Thrust) in different regions (WG02, NoCal, SoCal, RELM) and for different durations. The method generateProbContributionsExcelSheet() is used to make excel sheets. The generated excel sheets can then be used to make histogram plots and other plots for UCERF2 report. A detailed explanation for generating the excel sheets and figures for UCERF2 report was emailed to Ned. Since various excel sheets were generated, I ran this program multiple times on Mac Server. Every time I ran this program, I called generateProbContributionsExcelSheet() with different parameters. Please see the main() for different parameters which were passed to generateProbContributionsExcelSheet().

Author:
vipingupta

Field Summary
static java.lang.String A_FAULTS
           
static java.lang.String B_FAULTS
           
static java.lang.String BACKGROUND
           
static java.lang.String C_ZONES
           
static java.lang.String NON_CA_B_FAULTS
           
static java.lang.String TOTAL
           
 
Constructor Summary
ProbabilityDistHistogramPlotter()
           
 
Method Summary
 void addMinMaxAvgSheet(java.lang.String inputFileName)
          It reads the input file as created by generateProbContributionsExcelSheet() method and adds an additional sheet with min, max, mean for each column.
 void generateProbContributionsExcelSheet(boolean isTimeDependent, double duration, java.lang.String fileName, Region region)
          Make probability contribution excel sheet from various branches for a given region and duration.
 java.util.ArrayList getCurveFunctionList()
           
 java.util.ArrayList<PlotCurveCharacterstics> getPlottingFeatures()
           
 double getUserMaxX()
           
 double getUserMaxY()
           
 double getUserMinX()
           
 double getUserMinY()
           
 java.lang.String getXAxisLabel()
           
 boolean getXLog()
           
 java.lang.String getYAxisLabel()
           
 boolean getYLog()
           
 boolean isCustomAxis()
           
static void main(java.lang.String[] args)
           
 void mkHistogramSheet(java.lang.String inputFileName, java.lang.String outputFileName)
          It reads the input file as created by generateProbContributionsExcelSheet() method and generates min, max, mean and a histogram function for each column in the sheet.
 void plotAperiodicity_ComparisonProbPlot(double mag, java.lang.String fileName, java.lang.String sourceType)
          Plot Aperiodicity histograms for aperiodicity values: 0.3, 0.5, 0.7
 void plotAprioiMoBal_ComparisonPlot(double mag, java.lang.String fileName, java.lang.String sourceType)
          Plot Apriori and MoBal comparison histograms.
 void plotEmpiricalBPT_ComparisonProbPlot(double mag, java.lang.String fileName, java.lang.String sourceType)
          Plot stacked histograms for BPT vs Empirical plots
 void plotHistogramsForMagAndSource(double minMag, java.lang.String fileName, java.lang.String sourceType)
          Plot Histogram for a particular source or total prob
 void plotMagAreaComparisonProbPlot(double mag, java.lang.String fileName, java.lang.String sourceType)
          Plot stacked histograms for Ellsworth B and Hans-Bakun 2002 Magnitude Area Relationship
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

A_FAULTS

public static final java.lang.String A_FAULTS
See Also:
Constant Field Values

B_FAULTS

public static final java.lang.String B_FAULTS
See Also:
Constant Field Values

NON_CA_B_FAULTS

public static final java.lang.String NON_CA_B_FAULTS
See Also:
Constant Field Values

C_ZONES

public static final java.lang.String C_ZONES
See Also:
Constant Field Values

BACKGROUND

public static final java.lang.String BACKGROUND
See Also:
Constant Field Values

TOTAL

public static final java.lang.String TOTAL
See Also:
Constant Field Values
Constructor Detail

ProbabilityDistHistogramPlotter

public ProbabilityDistHistogramPlotter()
Method Detail

generateProbContributionsExcelSheet

public void generateProbContributionsExcelSheet(boolean isTimeDependent,
                                                double duration,
                                                java.lang.String fileName,
                                                Region region)
Make probability contribution excel sheet from various branches for a given region and duration.

Parameters:
minMag -

plotMagAreaComparisonProbPlot

public void plotMagAreaComparisonProbPlot(double mag,
                                          java.lang.String fileName,
                                          java.lang.String sourceType)
Plot stacked histograms for Ellsworth B and Hans-Bakun 2002 Magnitude Area Relationship

Parameters:
fileName -

plotAperiodicity_ComparisonProbPlot

public void plotAperiodicity_ComparisonProbPlot(double mag,
                                                java.lang.String fileName,
                                                java.lang.String sourceType)
Plot Aperiodicity histograms for aperiodicity values: 0.3, 0.5, 0.7

Parameters:
fileName -

plotAprioiMoBal_ComparisonPlot

public void plotAprioiMoBal_ComparisonPlot(double mag,
                                           java.lang.String fileName,
                                           java.lang.String sourceType)
Plot Apriori and MoBal comparison histograms.

Parameters:
fileName -

plotEmpiricalBPT_ComparisonProbPlot

public void plotEmpiricalBPT_ComparisonProbPlot(double mag,
                                                java.lang.String fileName,
                                                java.lang.String sourceType)
Plot stacked histograms for BPT vs Empirical plots

Parameters:
fileName -

addMinMaxAvgSheet

public void addMinMaxAvgSheet(java.lang.String inputFileName)
It reads the input file as created by generateProbContributionsExcelSheet() method and adds an additional sheet with min, max, mean for each column.

Parameters:
inputFileName -

mkHistogramSheet

public void mkHistogramSheet(java.lang.String inputFileName,
                             java.lang.String outputFileName)
It reads the input file as created by generateProbContributionsExcelSheet() method and generates min, max, mean and a histogram function for each column in the sheet. These values are then saved in a separate excel sheet

Parameters:
inputFileName -
outputFileName -

plotHistogramsForMagAndSource

public void plotHistogramsForMagAndSource(double minMag,
                                          java.lang.String fileName,
                                          java.lang.String sourceType)
Plot Histogram for a particular source or total prob

Parameters:
minMag -
fileName -
sourceType - It can be A_Faults, B_Faults, Non_CA_B_Faults, C-Zones, Background, Total. These are constant values as defined in this class

getCurveFunctionList

public java.util.ArrayList getCurveFunctionList()

getXLog

public boolean getXLog()

getYLog

public boolean getYLog()

getXAxisLabel

public java.lang.String getXAxisLabel()

getYAxisLabel

public java.lang.String getYAxisLabel()

getPlottingFeatures

public java.util.ArrayList<PlotCurveCharacterstics> getPlottingFeatures()

isCustomAxis

public boolean isCustomAxis()

getUserMinX

public double getUserMinX()

getUserMaxX

public double getUserMaxX()

getUserMinY

public double getUserMinY()

getUserMaxY

public double getUserMaxY()

main

public static void main(java.lang.String[] args)