ps2ff.magnitude_scaling

ps2ff.magnitude_scaling.compute_epsilon(neps, trunc)[source]

Compute midpoints and probabilities of epsilon bins.

Parameters:
  • neps (int) – The number of steps to integrate from -trunc to +trunc. Larger numbers increase the accuracy of the result, but take longer to run.
  • trunc (float) – For the integration in area (or length and width), trunc is the truncation of the normal distribution (in units of sigma).
Returns:

epsilon midpoints, their probabilities, bin width.

Return type:

tuple

ps2ff.magnitude_scaling.dimensions_from_magnitude(M, rup_dim_model, neps, trunc, mech=<Mechanism.A: 'A'>)[source]

Compute dimensions of rupture from magnitude for a specified magnitude scaling relation.

Parameters:
  • M (float) – Magnitude.
  • rup_dim_model (MagScaling enum) – Specifies the model for compputing the rupture dimensions from magnitude.
  • neps (int) – The number of steps to integrate from -trunc to +trunc. Larger numbers increase the accuracy of the result, but take longer to run.
  • trunc (float) – For the integration in area (or length and width), trunc is the truncation of the normal distribution (in units of sigma).
  • mech (Mechanism enum) – Optional string indicating earthquake mechanism, used by some of the models.
Returns:

A tuple containing the following, noting that some of these will be empty if the selected model does not provide them:

  • length: rupture length (km).
  • sig_length: standard deviation of rupture length.
  • W: rupture width (km).
  • sigw: standard devation of rupture width.
  • A: rupture area (km).
  • siga: standard deivaiton of rupture area.

Return type:

tuple