public final class Mfds extends Object
| Modifier and Type | Field and Description |
|---|---|
static Range<Double> |
TIMESPAN_RANGE
Supported timespans for Poisson probabilities:
[1..10000] years. |
| Modifier and Type | Method and Description |
|---|---|
static Converter<Double,Double> |
annualRateToProbabilityConverter()
Return a converter between annual rate and Poisson probability over a
1-year time span.
|
static Converter<Double,Double> |
annualRateToProbabilityConverter(double timespan)
Return a converter between annual rate and Poisson probability over the
specified time span.
|
static XySequence |
combine(IncrementalMfd... mfds)
Deprecated.
|
static double |
grRate(double a,
double b,
double M)
Returns the Gutenberg Richter event rate for the supplied a- and b-values
and magnitude.
|
static double |
incrRate(double a,
double b,
double mMin)
Computes the Gutenberg-Richter incremental rate at the supplied magnitude.
|
static int |
magCount(double mMin,
double mMax,
double dMag)
Determines the number of magnitude bins for the supplied arguments.
|
static gov.usgs.earthquake.nshmp.mfd.GaussianMfd |
newGaussianMFD(double mean,
double sigma,
int size,
double cumRate,
boolean floats)
Creates a new
GaussianMfd that is doubly-truncated at
2*sigma. |
static gov.usgs.earthquake.nshmp.mfd.GaussianMfd |
newGaussianMoBalancedMFD(double mean,
double sigma,
int size,
double moRate,
boolean floats)
Creates a new moment-balanced
GaussianMfd that is doubly-truncated
at 2*sigma. |
static gov.usgs.earthquake.nshmp.mfd.GutenbergRichterMfd |
newGutenbergRichterMFD(double min,
double delta,
int size,
double b,
double cumRate)
Creates a new
GutenbergRichterMfd. |
static gov.usgs.earthquake.nshmp.mfd.GutenbergRichterMfd |
newGutenbergRichterMoBalancedMFD(double min,
double delta,
int size,
double b,
double moRate)
Creates a new moment-balanced
GutenbergRichterMfd. |
static IncrementalMfd |
newIncrementalMFD(double[] mags,
double[] rates)
Creates a new
IncrementalMfd with the supplied magnitudes and
rates. |
static IncrementalMfd |
newSingleMFD(double mag,
double cumRate,
boolean floats)
Creates a new single magnitude
IncrementalMfd. |
static IncrementalMfd |
newSingleMoBalancedMFD(double mag,
double moRate,
boolean floats)
Creates a new single magnitude moment-balanced
IncrementalMfd. |
static IncrementalMfd |
newTaperedGutenbergRichterMFD(double min,
double delta,
int size,
double a,
double b,
double corner,
double weight) |
static double |
probToRate(double P,
double timespan)
Given the Poisson probability of the occurence of some event over a
specified time period, method returns the annual rate of occurrence of that
event.
|
static double |
rateToProb(double rate,
double timespan)
Given an observed annual rate of occurrence of some event (in num/yr),
method returns the Poisson probability of occurence over the specified time
period.
|
static XySequence |
toCumulative(XySequence incremental) |
static XySequence |
toMutableSequence(IncrementalMfd mfd)
Convert an
IncrementalMfd to a mutable XySequence. |
static XySequence |
toSequence(IncrementalMfd mfd)
Convert an
IncrementalMfd to an immutable XySequence. |
static double |
totalMoRate(double mMin,
int nMag,
double dMag,
double a,
double b)
Computes total moment rate as done by NSHMP code from supplied magnitude
info and the Gutenberg-Richter a- and b-values.
|
public static IncrementalMfd newSingleMFD(double mag, double cumRate, boolean floats)
IncrementalMfd.mag - for MFDcumRate - total cumulative event rate for lone magnitude binfloats - true if ruptures referencing this mfd should float;
false otherwiseIncrementalMfdpublic static IncrementalMfd newSingleMoBalancedMFD(double mag, double moRate, boolean floats)
IncrementalMfd.mag - for MFDmoRate - total moment rate of lone magnitude binfloats - true if ruptures referencing this mfd should float;
false otherwiseIncrementalMfdpublic static IncrementalMfd newIncrementalMFD(double[] mags, double[] rates)
IncrementalMfd with the supplied magnitudes and
rates. For the MFD returned, IncrementalMfd.floats() always returns
true.
NOTE: This method expects evenly spaced magnitudes; if they are not, results are undefined.
mags - for MFDrates - for MFDIncrementalMfdpublic static gov.usgs.earthquake.nshmp.mfd.GaussianMfd newGaussianMFD(double mean,
double sigma,
int size,
double cumRate,
boolean floats)
GaussianMfd that is doubly-truncated at
2*sigma.mean - magnitudesigma - standard deviationsize - number of magnitude bins inclusive of min and max magnitudescumRate - total cumulative ratefloats - true if ruptures referencing this mfd should float;
false otherwiseGaussianMfdpublic static gov.usgs.earthquake.nshmp.mfd.GaussianMfd newGaussianMoBalancedMFD(double mean,
double sigma,
int size,
double moRate,
boolean floats)
GaussianMfd that is doubly-truncated
at 2*sigma. For the MFD returned, IncrementalMfd.floats()
always returns false.mean - magnitudesigma - standard deviationsize - number of magnitude bins inclusive of min and max magnitudesmoRate - total moment ratefloats - true if ruptures referencing this mfd should float;
false otherwiseGaussianMfdpublic static gov.usgs.earthquake.nshmp.mfd.GutenbergRichterMfd newGutenbergRichterMFD(double min,
double delta,
int size,
double b,
double cumRate)
GutenbergRichterMfd. For the MFD returned,
IncrementalMfd.floats() always returns true.min - magnitudedelta - magnitudesize - number of magnitude bins inclusive of min and max magnitudesb - value (slope of GR relation)cumRate - total cumulative rateGutenbergRichterMfdpublic static gov.usgs.earthquake.nshmp.mfd.GutenbergRichterMfd newGutenbergRichterMoBalancedMFD(double min,
double delta,
int size,
double b,
double moRate)
GutenbergRichterMfd. For the MFD
returned, IncrementalMfd.floats() always returns true.min - magnitudedelta - magnitudesize - number of magnitude bins inclusive of min and max magnitudesb - value (slope of GR relation)moRate - total moment rateGutenbergRichterMfdpublic static IncrementalMfd newTaperedGutenbergRichterMFD(double min, double delta, int size, double a, double b, double corner, double weight)
public static double totalMoRate(double mMin,
int nMag,
double dMag,
double a,
double b)
mMin - minimum magnitude (after adding dMag/2)nMag - number of magnitudesdMag - magnitude bin widtha - value (incremental and defined wrt dMag for M0)b - valuepublic static double grRate(double a,
double b,
double M)
a - value (log10 rate of M=0 events)b - valueM - magnitude of interestM eventspublic static double incrRate(double a,
double b,
double mMin)
N(M) = a*(10^-bm).
TODO is this confusing? the NSHMP stores a-values in different ways [a A]
where a = log10(A); should users just supply grRate() witha - value (incremental and defined wrt dMag for M0)b - valuemMin - minimum magnitude of distributionpublic static int magCount(double mMin,
double mMax,
double dMag)
mMax - mMin, and the result of this
method is used to build a Gutenberg-Richter MFD, the maximum magnitude of
the MFD may not equal the mMax supplied here.mMin - minimum magnitude to considermMax - maximum magnitude to considerdMag - magnitude deltapublic static double rateToProb(double rate,
double timespan)
rate - (annual) of occurence of some eventtimespan - of interesttimepublic static double probToRate(double P,
double timespan)
P - the Poisson probability of an event's occurrencetimespan - of interestpublic static Converter<Double,Double> annualRateToProbabilityConverter()
public static Converter<Double,Double> annualRateToProbabilityConverter(double timespan)
public static XySequence toSequence(IncrementalMfd mfd)
IncrementalMfd to an immutable XySequence.mfd - to convertIncrementalMfd.public static XySequence toMutableSequence(IncrementalMfd mfd)
IncrementalMfd to a mutable XySequence.mfd - to convertIncrementalMfd.@Deprecated public static XySequence combine(IncrementalMfd... mfds)
mfds into a single sequence.mfds - public static XySequence toCumulative(XySequence incremental)