require.mx('mxjs/seismic/gutenberg-richter.js');
Gutenberg-Richter relationship tools.
Status | Name |
---|---|
determineGRRelationship
(
TypedArray magnitudes,
Object settings
)
Determine the Gutenberg-Richter relationship from an array of magnitudes, using the survival function to determine mmin, b, and N_at_mmin. The
|
|
GRRelationship determineGRRelationshipFromMagnitudesAndMmin
(
TypedArray magnitudes,
Number mmin
)
Determine the Gutenberg-Richter relationship from an array of magnitudes and a given
|
|
Object determineVarsFromMagnitudesAndMmin
(
TypedArray magnitudes,
Number mmin
)
Determine some variables for the Gutenberg-Richter relationship, from an array of magnitudes and a given
|
|
getGRRelationship
(
Object variables
)
Get a Gutenberg-Richter relationship object for the given variables. Variables should be an object containing the following properties:
|
|
getGRRelationshipFromJSONString
(
String JSONString
)
Get a Gutenberg-Richter relationship object from the given JSON string. |
|
plotGRlines
(
Table plot,
Object variables,
Object user_inputs
)
The plot table requires the following output columns:
The variables object requires the following properties:
The user_inputs object supports the following properties:
|
|
toFMVariables
(
Object variables
)
|
Determine the Gutenberg-Richter relationship from an array of magnitudes, using the survival function to determine mmin, b, and N_at_mmin. The
settings
object supports the following properties:
survival_resolution
{Number} (optional) defaults to 0.1.mref
{Number} reference magnitude to use for the survival function.floor_number
{Number}floor_fraction
{Number}mmin_lower_limit
{Number}mmin_upper_limit
{Number}mmax
{Number} if passed, will be added to the resulting GRRelationship
so that truncated distribution methods can be used.TypedArray
magnitudes Object
settings Determine the Gutenberg-Richter relationship from an array of magnitudes and a given
mmin
. This function calculates the b-value and N_at_mmin directly from the given
mmin
.
TypedArray
magnitudes Number
mmin GRRelationship
GRrel - the resulting GRRelationship
object. If the relationship could not be determined (magnitudes were empty, or the b-value could not be determined), then nothing is returned.Determine some variables for the Gutenberg-Richter relationship, from an array of magnitudes and a given
mmin
. This function calculates the b-value using the formula `b=1/(ln (10)(bar (Ml)-M_min))`.
TypedArray
magnitudes Number
mmin Object
vars - an object containing the following properties: N_at_mmin
, b
, and Mmean
. If the b-value could not be determined (i.e. the divisor in the above equation was zero), then b
will be NaN
. If the magnitudes array had no elements, then no object is returned.Get a Gutenberg-Richter relationship object for the given variables. Variables should be an object containing the following properties:
mmin
Minimum magnitude (typically determined by the survival function).mmax
Maximum magnitude (estimate that was used by the survival function).beta
(optional) may be specified instead of the b-value.b
(optional) may be specified instead of beta - typically determined by the survival function.N_at_mmin
Number of events with magnitude >= mmin, typically determined by the survival function (Min Index).Object
variables Get a Gutenberg-Richter relationship object from the given JSON string.
Parameters:String
JSONString The plot table requires the following output columns:
Resolution: {
Prob: Number,
NEvent_Count: Number,
MagClosenessThreshold: Number
},
Probability_Lines: Number
Parameters:
Parameters:
Object
variables
Status | Name |
---|
Status | Name |
---|---|
Member |
Number N_at_mmin
|
Member |
Number a
calculated from |
Member |
Number b
|
Member |
Number beta
|
Member |
Number delta_b
calculated from |
Member |
Number mmax
|
Member |
Number mmin
|
Number calculateNAtML
(
Number ↓ML
)
Calculate the expected N at a given M L, using the formula `N=10^(a-bM_L)`. |
|
CDF
(
Number m
)
Untruncated GR relationship CDF (FGR).
|
|
complementaryCDF
(
Number m
)
Untruncated GR survival function (SGR). |
|
Object getVariables
(
)
|
|
PDF
(
Number m
)
Untruncated GR relationship PDF (probability density function).
|
|
survivalFunction
(
Number m
)
Alias for complementaryCDF. |
|
String toJSONString
(
)
Get a JSON string that can be used to recreate this G-R relationship object using the
|
|
truncatedCDF
(
Number m
)
Truncated GR relationship CDF (FGRT), requires
|
|
truncatedComplementaryCDF
(
Number m
)
Truncated GR survival function (SGRT), requires
|
|
truncatedPDF
(
Number m
)
Truncated GR relationship PDF, requires
|
|
truncatedSurvivalFunction
(
Number m
)
Alias for truncatedComplementaryCDF. |
|
truncatedXmaxCDF
(
Number m
)
CDF of maximum event (FmaxGRT), requires
|
|
truncatedXmaxPDF
(
Number m
)
PDF of maximum event, required
|
Untruncated GR relationship CDF (FGR).
`F(m) = {(0,if m < m_min),(1-exp[-beta(m-m_min)],if m >= m_min):}`
Number
m - magnitude to calculate the CDF for.Untruncated GR survival function (SGR).
Parameters:Number
m - magnitude to calculate the 1-CDF for.Parameters:
Object
variables - An object containing the variables that define this G-R relationship.Untruncated GR relationship PDF (probability density function).
`f(m) = {(0,if m < m_min),(beta exp[-beta(m-m_min)],if m >= m_min):}`
Number
m - magnitude to calculate the PDF for.Alias for complementaryCDF.
Parameters:Number
m - magnitude to calculate the 1-CDF for.Get a JSON string that can be used to recreate this G-R relationship object using the
getGRRelationshipFromJSONString
function.
String
JSON - A JSON string containing the variables that define this G-R relationship.Truncated GR relationship CDF (FGRT), requires
mmax
.
`F(m) = {(0,if m < m_min),((1-exp[-beta(m-m_min)])/(1-exp[-beta(m_max-m_min)]),if m_min <= m <= m_max),(1,if m > m_max):}`
Number
m - magnitude to calculate the truncated CDF for.Truncated GR survival function (SGRT), requires
mmax
.
Number
m - magnitude to calculate the truncated 1-CDF for.Truncated GR relationship PDF, requires
mmax
.
`f(m) = {(0,if m < m_min or m > m_max),((beta exp[-beta(m-m_min)])/(1-exp[-beta(m_max-m_min)]),if m_min <= m <= m_max):}`
Number
m - magnitude to calculate the truncated PDF for.Alias for truncatedComplementaryCDF.
Parameters:Number
m - magnitude to calculate the truncated 1-CDF for.CDF of maximum event (FmaxGRT), requires
mmax
and
N_at_mmin
. This function uses the following formula, where `N = text{N_at_mmin}`.
`text{truncatedXmaxCDF}(m) = N * text{truncatedCDF}(m)^N`
Number
m - magnitude to calculate for.PDF of maximum event, required
mmax
and
N_at_mmin
. This function uses the following formula, where `N = text{N_at_mmin}`.
`text{truncatedXmaxPDF}(m) = N * text{truncatedCDF}(m)^(N-1) * text{truncatedPDF}(m)`
Number
m - magnitude to calculate for.