def test_svm_profiles_plotting(self): vs30 = 256 # m/s z1 = 200 # m svm = SVM(vs30, z1=z1, show_fig=False) svm.get_discretized_profile(fixed_thk=20, show_fig=True) svm.get_discretized_profile(Vs_increment=1, show_fig=True) svm.get_discretized_profile(Vs_increment=100, show_fig=True) svm.get_randomized_profile(show_fig=True)
def test_get_randomized_profile(self): svm = SVM(target_Vs30=256, z1=100, show_fig=False) random_profile = svm.get_randomized_profile(show_fig=False) self.assertTrue(isinstance(random_profile, Vs_Profile)) if svm.has_bedrock_Vs: # bedrock Vs must match self.assertTrue(svm.bedrock_Vs == random_profile.vs_profile[-1, 1]) self.assertTrue(random_profile.vs_profile[-1, 0] == 0) # Use iteration to pick compliant randomized Vs profile random_profile = svm.get_randomized_profile(show_fig=True, vs30_z1_compliance=True, verbose=True)