예제 #1
0
    def get_mean_and_stddevs(self, sites, rup, dists, imt, stddev_types):
        """
        See :meth:`superclass method
        <.base.GroundShakingIntensityModel.get_mean_and_stddevs>`
        for spec of input and result values.
        """
        # extract faulting style and rock adjustment coefficients for the
        # given imt
        C_ADJ = self.COEFFS_FS_ROCK[imt]

        mean, stddevs = super().get_mean_and_stddevs(sites, rup, dists, imt,
                                                     stddev_types)

        # apply faulting style and rock adjustment factor for mean and std
        mean = np.log(
            np.exp(mean) * _compute_faulting_style_term(
                C_ADJ['Frss'], self.CONSTS_FS['pR'], self.CONSTS_FS['Fnss'],
                self.CONSTS_FS['pN'], rup.rake) * C_ADJ['AFrock'])
        stddevs = np.array(stddevs)

        return mean, stddevs
예제 #2
0
    def compute(self, ctx: np.recarray, imts, mean, sig, tau, phi):
        """
        See :meth:`superclass method
        <.base.GroundShakingIntensityModel.compute>`
        for spec of input and result values.
        """
        for m, imt in enumerate(imts):
            C = self.COEFFS[imt]
            mean[m] = _compute_mean(C, ctx.mag, ctx.rjb)

            # Compute total standard deviation, equations 5 and 6, page 48

            # aleatory uncertainty
            sigma_ale_m = np.interp(ctx.mag, [5.0, 5.5, 8.0],
                                    [C['m50'], C['m55'], C['m80']])
            sigma_ale_rjb = np.interp(ctx.rjb, [5.0, 20.0],
                                      [C['r5'], C['r20']])
            sigma_ale = np.sqrt(sigma_ale_m**2 + sigma_ale_rjb**2)

            # epistemic uncertainty
            if imt.period < 1:
                sigma_epi = 0.36 + 0.07 * (ctx.mag - 6)
            else:
                sigma_epi = 0.34 + 0.06 * (ctx.mag - 6)
            sig[m] = np.sqrt(sigma_ale**2 + sigma_epi**2)

            # apply decay factor for 3 and 4 seconds (not originally supported
            # by the equations)
            if imt.period == 3.0:
                mean[m] /= 0.612
            if imt.period == 4.0:
                mean[m] /= 0.559

            if self.CONSTS_FS:  # fault style and rock adjustement in SHARE
                C_ADJ = self.COEFFS_FS_ROCK[imt]
                mean[m] = np.log(
                    np.exp(mean[m]) * (_compute_faulting_style_term(
                        C_ADJ['Frss'], self.CONSTS_FS['pR'],
                        self.CONSTS_FS['Fnss'], self.CONSTS_FS['pN'], ctx.rake)
                                       * C_ADJ['AFrock']))
예제 #3
0
    def get_mean_and_stddevs(self, sites, rup, dists, imt, stddev_types):
        """
        See :meth:`superclass method
        <.base.GroundShakingIntensityModel.get_mean_and_stddevs>`
        for spec of input and result values.
        """
        # extract faulting style and rock adjustment coefficients for the
        # given imt
        C_ADJ = self.COEFFS_FS_ROCK[imt]

        mean, stddevs = super(ToroEtAl2002SHARE, self).\
            get_mean_and_stddevs(sites, rup, dists, imt, stddev_types)

        # apply faulting style and rock adjustment factor for mean and std
        mean = np.log(np.exp(mean) *
                      _compute_faulting_style_term(C_ADJ['Frss'],
                                                   self.CONSTS_FS['pR'],
                                                   self.CONSTS_FS['Fnss'],
                                                   self.CONSTS_FS['pN'],
                                                   rup.rake) * C_ADJ['AFrock'])
        stddevs = np.array(stddevs)

        return mean, stddevs