require.mx('mxjs/seismic/hazard/mmax/combined.js');
Interface to various MUL estimation methods.
Status | Name |
---|---|
Constant |
Object METHODS
a dictionary containing all the |
Constant |
Array METHODS_ARRAY
an array containing all the |
EventInfo readEventInformation
(
Function ↓read_Magnitude,
Number ↓begin,
Number ↓end,
Object ↓settings
)
Read event magnitudes into an
|
|
Array runMethods
(
EventInfo ↓eventInfo,
Object ↓settings,
Array ↓methodIDs
)
Run MUL estimation methods on an
|
Read event magnitudes into an
EventInfo
object, which can be used with the various MUL estimation methods. The
settings
object supports the following properties:
sortedDescending
{Bool} are the magnitudes already sorted in descending order? If so, we'll avoid internally re-sorting them.Function
↓read_Magnitude - function to read the event magnitude.Number
↓begin - row to begin reading.Number
↓end - row to end reading (this row is not included).Object
↓settings - settings object.EventInfo
eventInfo Run MUL estimation methods on an
EventInfo
object. The following properties are recognised by the
settings
object, though not all properties are needed by all methods:
desiredAccuracy
{Number} Desired accuracy.maxIterations
{Number} Maximum number of iterations.maxMmax
{Number} Max M Max.stdDevMMaxObs
{Number} Standard Deviation of Observed MMax observed.C80RMax
{Number} Number of events used in the Cook 1980 and Order Statistics methods.EventInfo
↓eventInfo - event information (from readEventInformation
).Object
↓settings - settings for the various estimation methods.Array
↓methodIDs - (optional) an array of Method
IDs to use. If this is not provided, then all methods will be used.Array
results - an array containing one value for every estimation method used. Each value is an object with the following properties: method
, the Method
object used; mmax
the estimated MUL; and stddev
the Std. Deviation.A complete example of using the code:
const LibEstimateMUL = require.mx('mxjs/seismic/hazard/mmax/combined.js');
// Read event information (already sorted in descending order)
const eventInfo = LibMULEstimate.readEventInformation(
Events.read_magnitude, 0, Events.size(), { sortedDescending: true });
// Run all methods on the event information
const results = LibMULEstimate.runMethods(eventInfo, {
desiredAccuracy: 0.05,
maxIterations: 1,
maxMmax: 6,
stdDevMMaxObs: 0.2,
C80RMax: 5
});
results.forEach(function(result, i) {
print("method " + result.method.name + " (id " + result.method.id + ")");
print(" mmax = " + result.mmax + ", stddev = " + result.stddev);
});
Status | Name |
---|---|
Member |
Number id
this method's ID |
Member |
String name
this method's name |
Object calculate
(
EventInfo eventInfo,
Object settings
)
Use this method to estimate the MUL from a collection of events. |