|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.opensha.commons.util.FaultUtils
public final class FaultUtils
Title: FaultUtils
Description: Collection of static utilities used in conjunction with strike, dip and rake angles of faults. These functions are assertion functions, in that they validate the angles as valid strike, dip, and rake angles, and return true or false if valid.
| Field Summary | |
|---|---|
protected static String |
C
Class name used for debug strings |
protected static boolean |
D
boolean that indicates if print out debug statements |
| Constructor Summary | |
|---|---|
FaultUtils()
|
|
| Method Summary | |
|---|---|
static void |
assertValidDepth(double depth)
This makes sure that a depth on the fault is a positive number |
static void |
assertValidDip(double dip)
Checks that the dip angle fits within the definition |
static void |
assertValidRake(double rake)
Checks that the rake angle fits within the definition |
static void |
assertValidSeisUpperAndLower(double upperSeis,
double lowerSeis)
This makes sure that a depth on the fault is a positive number |
static void |
assertValidStrike(double strike)
Checks that the strike angle fits within the definition |
static double |
getAngleAverage(List<Double> angles)
Averages angles dealing with any -180/180 or 0/360 cut issues. |
static ArrayList<FaultTrace> |
getEqualLengthSubsectionTraces(FaultTrace faultTrace,
double maxSubSectionLen)
This subdivides the given fault trace into sub-traces that have the length as given (or less). |
static ArrayList<FaultTrace> |
getEqualLengthSubsectionTraces(FaultTrace faultTrace,
double maxSubSectionLen,
int minSubSections)
This subdivides the given fault trace into sub-traces that have the length as given (or less). |
static double |
getInRakeRange(double angle)
Returns the given angle in the range -180 <= rake <= 180 |
static double |
getLengthBasedAngleAverage(List<Location> locs,
List<Double> angles)
Returns an average of the given angles scaled by the distances between the corresponding locations. |
static double |
getScaledAngleAverage(List<Double> scalars,
List<Double> angles)
Returns an average of the given angles scaled by the given scalars. |
static double[] |
getSlipVector(double[] strikeDipRake)
Calculates a slip vector from strike, dip, and rake information provided. |
static void |
plotTraces(ArrayList<FaultTrace> traces)
This is a quick plot of the traces |
static FaultTrace |
resampleTrace(FaultTrace trace,
int num)
This resamples the trace into num subsections of equal length (final number of points in trace is num+1). |
| 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
| Constructor Detail |
|---|
public FaultUtils()
| Method Detail |
|---|
public static void assertValidStrike(double strike)
throws InvalidRangeException
0 <= strike <= 360
strike - Angle to validate
InvalidRangeException - Thrown if not valid angle
public static void assertValidDip(double dip)
throws InvalidRangeException
0 <= dip <= 90
dip - Angle to validate
InvalidRangeException - Thrown if not valid angle
public static void assertValidDepth(double depth)
throws InvalidRangeException
depth -
InvalidRangeException
public static void assertValidSeisUpperAndLower(double upperSeis,
double lowerSeis)
throws InvalidRangeException
depth -
InvalidRangeException
public static void assertValidRake(double rake)
throws InvalidRangeException
-180 <= rake <= 180
rake - Angle to validate
InvalidRangeException - Thrown if not valid anglepublic static double getInRakeRange(double angle)
-180 <= rake <= 180
angle -
public static ArrayList<FaultTrace> getEqualLengthSubsectionTraces(FaultTrace faultTrace,
double maxSubSectionLen)
faultTrace - maxSubSectionLen - Maximum length of each subsection
public static ArrayList<FaultTrace> getEqualLengthSubsectionTraces(FaultTrace faultTrace,
double maxSubSectionLen,
int minSubSections)
faultTrace - maxSubSectionLen - Maximum length of each subsectionminSubSections - minimum number of sub sections to generate
public static FaultTrace resampleTrace(FaultTrace trace,
int num)
trace - num - - number of subsections
public static void plotTraces(ArrayList<FaultTrace> traces)
traces -
public static double getLengthBasedAngleAverage(List<Location> locs,
List<Double> angles)
locs - locations for distance scalingangles - angles in degrees corresponding to each pair of locations
public static double getScaledAngleAverage(List<Double> scalars,
List<Double> angles)
scalars - scalar weights for each angle (does not need to be normalized)angles - angles in degrees corresponding to each pair of locations
public static double getAngleAverage(List<Double> angles)
angles -
public static double[] getSlipVector(double[] strikeDipRake)
strike - dip - rake -
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||