Example #1
0
 def _get_phi(self, imt, mag, sites, num_sites):
     """
     Returns the within-event standard deviation (phi). If the ergodic
     model is chosen the "global" phi_s2s model of Stewart et al. (2019)
     is used.
     """
     phi = get_phi_ss(imt, mag, self.PHI_SS)
     if self.ergodic:
         phi_s2s = get_stewart_2019_phis2s(imt, sites.vs30)
         phi = np.sqrt(phi**2. + phi_s2s**2.)
     return phi
Example #2
0
def get_stddevs(ergodic, tau_model, TAU, PHI_SS, imt, ctx):
    """
    Returns the standard deviations for either the ergodic or
    non-ergodic models
    """
    phi = get_phi_ss(imt, ctx.mag, PHI_SS)
    if ergodic:
        phi_s2s = get_stewart_2019_phis2s(imt, ctx.vs30)
        phi = np.sqrt(phi**2. + phi_s2s**2.)
    tau = TAU_EXECUTION[tau_model](imt, ctx.mag, TAU)
    sigma = np.sqrt(tau**2. + phi**2.)
    return [sigma, tau, phi]