ps2ff.integration_loops

ps2ff.integration_loops.mag_dist_loop(conf, iP=None, filename=None, M=None, Repi=None)[source]

This function loops over M and R, calling rjb_inner_loop and writes out progress information.

Parameters:
  • conf (ConfigObj) – The configuration info. See ps2ff/data/configspec.conf.
  • iP (int) – Multiple process index.
  • filename (str) – Output file name.
  • M (numpy.ndarray) – Earthquake magnitudes.
  • Repi (numpy.ndarray) – Epicentral distances (km).
ps2ff.integration_loops.rjb_inner_loop(M, Repi, conf)[source]

This function evaluates the Rjb mean and var integral for a single M/R pair, looping over:

  • dip
  • dx, dy (location of hypocenter on fault)
  • theta (angle to fault)
  • epsilon (dummy variable for L/W/A integration)

We do this so that parallizaiton is simple: this function can be forked onto different cores.

Parameters:
  • M (float) – Earthquake magnitude.
  • Repi (float) – Epicentral distance (km).
  • conf (ConfigObj) – The configuration info. See ps2ff/data/configspec.conf.
Returns:

Rjb variance, mean Rjb.

Return type:

tuple

ps2ff.integration_loops.rrup_inner_loop(M, Repi, conf)[source]

This function evaluates the Rrup mean and var integral for a single M/R pair, looping over:

  • dip
  • dx, dy (location of hypocenter on fault)
  • theta (angle to fault)
  • epsilon (dummy variable for L/W/A integration)

We do this so that parallizaiton is simple: this function can be forked onto different cores.

Parameters:
  • M (float) – Earthquake magnitude.
  • Repi (float) – Epicentral distance (km).
  • conf (ConfigObj) – The configuration info. See ps2ff/data/configspec.conf.
Returns:

Rjb variance, mean Rjb.

Return type:

tuple

ps2ff.integration_loops.single_event_inner_loop(conf, Repi, theta=0, ntheta=73)[source]
Parameters:
  • conf (ConfigObj) – The configuration info. See ps2ff/data/configspec.conf.
  • Repi (float) – Epicentral distance (km).
  • theta (float) – Source-to-site angle (radians).
  • ntheta (int) – Number of integration steps for theta; used if bytheta is False.
Returns:

Rrup variance, Rrup mean, Rjb variance, Rjb mean

Return type:

tuple

ps2ff.integration_loops.single_event_loop(conf, iP=0, rjb_filename='junk', rrup_filename='junk', M=6.0, Repi=None)[source]
Parameters:
  • conf (ConfigObj) – The configuration info. See ps2ff/data/configspec.conf.
  • iP (int) – Multiple process index.
  • rjb_filename (str) – Output file name for Rjb results.
  • rrup_filename (str) – Output file name for Rrup results.
  • M (float) – Earthquake magnitude.
  • Repi (float) – Epicentral distance (km).