Пример #1
0
 def __init__(self, **kwargs):
     """
     Instantiates the class with additional terms controlling both the
     epistemic uncertainty in the median and the preferred aleatory
     uncertainty model ('global', 'cena_constant', 'cena'), and the quantile
     of the epistemic uncertainty model (float in the range 0 to 1, or None)
     """
     super().__init__(**kwargs)
     self.epsilon = kwargs.get("epsilon", 0.0)
     self.tau_model = kwargs.get("tau_model", "global")
     self.phi_model = kwargs.get("phi_model", "global")
     self.ergodic = kwargs.get("ergodic", True)
     self.tau_quantile = kwargs.get("tau_quantile", None)
     self.phi_ss_quantile = kwargs.get("phi_ss_quantile", None)
     self.site_epsilon = kwargs.get("site_epsilon", 0.0)
     self.PHI_S2SS = None
     # define the standard deviation model from the NGA East aleatory
     # uncertainty model according to the calibrations specified by the user
     # setup tau
     self.TAU = get_tau_at_quantile(TAU_SETUP[self.tau_model]["MEAN"],
                                    TAU_SETUP[self.tau_model]["STD"],
                                    self.tau_quantile)
     # setup phi
     self.PHI_SS = get_phi_ss_at_quantile(PHI_SETUP[self.phi_model],
                                          self.phi_ss_quantile)
Пример #2
0
 def _setup_standard_deviations(self):
     """
     Defines the standard deviation model from the NGA East aleatory
     uncertainty model according to the calibrations specified by the user
     """
     # setup tau
     self.TAU = get_tau_at_quantile(TAU_SETUP[self.tau_model]["MEAN"],
                                    TAU_SETUP[self.tau_model]["STD"],
                                    self.tau_quantile)
     # setup phi
     self.PHI_SS = get_phi_ss_at_quantile(PHI_SETUP[self.phi_model],
                                          self.phi_ss_quantile)
Пример #3
0
 def _setup_standard_deviations(self, fle):
     # setup tau
     self.TAU = get_tau_at_quantile(TAU_SETUP[self.tau_model]["MEAN"],
                                    TAU_SETUP[self.tau_model]["STD"],
                                    self.tau_quantile)
     # setup phi
     self.PHI_SS = get_phi_ss_at_quantile(PHI_SETUP[self.phi_model],
                                          self.phi_ss_quantile)
     # if required setup phis2ss
     if self.ergodic:
         self.PHI_S2SS = get_phi_s2ss_at_quantile(
             PHI_S2SS_MODEL[self.phi_s2ss_model], self.phi_s2ss_quantile)
Пример #4
0
def _setup_standard_deviations(gsim):
    # setup tau
    gsim.TAU = get_tau_at_quantile(TAU_SETUP[gsim.tau_model]["MEAN"],
                                   TAU_SETUP[gsim.tau_model]["STD"],
                                   gsim.tau_quantile)
    # setup phi
    PHI_SETUP['global_linear'] = gsim.COEFFS_PHI_SS_GLOBAL_LINEAR
    gsim.PHI_SS = get_phi_ss_at_quantile_ACME(PHI_SETUP[gsim.phi_model],
                                              gsim.phi_ss_quantile)
    # if required setup phis2ss
    if gsim.ergodic:
        if gsim.phi_s2ss_model == 'cena':
            gsim.PHI_S2SS = get_phi_s2ss_at_quantile(
                PHI_S2SS_MODEL[gsim.phi_s2ss_model], gsim.phi_s2ss_quantile)
        elif gsim.phi_s2ss_model == 'brb':
            gsim.PHI_S2SS = gsim.COEFFS_PHI_S2SS_BRB
        else:
            opts = "'cena', 'brb', or 'None'"
            raise ValueError('phi_s2ss_model can be {}'.format(opts))