def setUp(self): hsmpl = 4 vsmpl = 2 idl = False alg = False # Create the surface of each section path = os.path.join(BASE_DATA_PATH, 'profiles00') prf, _ = kst._read_profiles(path) sfc_a = KiteSurface.from_profiles(prf, vsmpl, hsmpl, idl, alg) path = os.path.join(BASE_DATA_PATH, 'profiles01') prf, _ = kst._read_profiles(path) sfc_b = KiteSurface.from_profiles(prf, vsmpl, hsmpl, idl, alg) path = os.path.join(BASE_DATA_PATH, 'profiles02') prf, _ = kst._read_profiles(path) sfc_c = KiteSurface.from_profiles(prf, vsmpl, hsmpl, idl, alg) # Sections list sections = { "0": FaultSection('0', sfc_a), "1": FaultSection('1', sfc_b), "2": FaultSection('2', sfc_c) } # Rupture indexes rup_idxs = [['0'], ['1'], ['2'], ['0', '1'], ['0', '2'], ['1', '2'], ['0', '1', '2']] # Magnitudes rup_mags = [5.8, 5.8, 5.8, 6.2, 6.2, 6.2, 6.5] rakes = [90.0, 90.0, 90.0, 90.0, 90.0, 90.0, 90.0] # Occurrence probabilities of occurrence pmfs = [ PMF([[0.90, 0], [0.10, 1]]), PMF([[0.90, 0], [0.10, 1]]), PMF([[0.90, 0], [0.10, 1]]), PMF([[0.90, 0], [0.10, 1]]), PMF([[0.90, 0], [0.10, 1]]), PMF([[0.90, 0], [0.10, 1]]), PMF([[0.90, 0], [0.10, 1]]) ] self.sections = sections self.rup_idxs = rup_idxs self.pmfs = pmfs self.mags = rup_mags self.rakes = rakes
def setUp(self): path = os.path.join(BASE_DATA_PATH, 'profiles08') hsmpl = 2 vsmpl = 2 idl = False alg = False # Read the profiles with prefix cs_50. These profiles dip toward # north prf, _ = _read_profiles(path, 'cs_50') srfc50 = KiteSurface.from_profiles(prf, vsmpl, hsmpl, idl, alg) # Read the profiles with prefix cs_52. These profiles dip toward # north. This section is west to the section defined by cs_50 prf, _ = _read_profiles(path, 'cs_51') srfc51 = KiteSurface.from_profiles(prf, vsmpl, hsmpl, idl, alg) clo = [] cla = [] step = 0.01 for lo in np.arange(-71.8, -69, step): tlo = [] tla = [] for la in np.arange(19.25, 20.25, step): tlo.append(lo) tla.append(la) clo.append(tlo) cla.append(tla) self.clo = np.array(clo) self.cla = np.array(cla) mesh = Mesh(lons=self.clo.flatten(), lats=self.cla.flatten()) # Define multisurface and mesh of sites self.srfc50 = srfc50 self.srfc51 = srfc51 self.msrf = MultiSurface([srfc50, srfc51]) self.mesh = mesh self.los = [ self.msrf.surfaces[0].mesh.lons, self.msrf.surfaces[1].mesh.lons ] self.las = [ self.msrf.surfaces[0].mesh.lats, self.msrf.surfaces[1].mesh.lats ]
def setUp(self): path = os.path.join(BASE_DATA_PATH, 'profiles08') hsmpl = 5 vsmpl = 5 idl = False alg = False prf, _ = _read_profiles(path, 'cs_50') srfc50 = KiteSurface.from_profiles(prf, vsmpl, hsmpl, idl, alg) prf, _ = _read_profiles(path, 'cs_51') srfc51 = KiteSurface.from_profiles(prf, vsmpl, hsmpl, idl, alg) coo = [] step = 0.5 for lo in np.arange(-74, -68, step): for la in np.arange(17, 20, step): coo.append([lo, la]) coo = np.array(coo) mesh = Mesh(coo[:, 0], coo[:, 1]) # Define multisurface and mesh of sites self.msrf = MultiSurface([srfc50, srfc51]) self.mesh = mesh