def test_no_fold_frame(): mdata = pd.concat([data[:100], data[data['feature_name'] == 's1']]) model = GeologicalModel(boundary_points[0, :], boundary_points[1, :]) model.set_model_data(mdata) fold_frame = model.create_and_add_fold_frame('s1', nelements=10000) stratigraphy = model.create_and_add_folded_foliation( 's0', # fold_frame, nelements=10000, # av_fold_axis=True fold_axis=[-6.51626577e-06, -5.00013645e-01, -8.66017526e-01], limb_wl=1)
def test_average_fold_axis(): mdata = pd.concat([data[:100], data[data["feature_name"] == "s1"]]) model = GeologicalModel(boundary_points[0, :], boundary_points[1, :]) model.set_model_data(mdata) fold_frame = model.create_and_add_fold_frame("s1", nelements=10000) stratigraphy = model.create_and_add_folded_foliation( "s0", fold_frame, nelements=10000, av_fold_axis=True # fold_axis=[-6.51626577e-06, -5.00013645e-01, -8.66017526e-01], # limb_wl=1 )
# folded foliation to be parallel to the plane of the axial foliation # shown in B and C. # mdata = pd.concat([data[:npoints],data[data['feature_name']=='s1']]) model = GeologicalModel(boundary_points[0,:],boundary_points[1,:]) model.set_model_data(mdata) fold_frame = model.create_and_add_fold_frame('s1', interpolatortype='PLI', nelements=10000,buffer=0.5, solver='pyamg', damp=True ) stratigraphy = model.create_and_add_folded_foliation('s0', fold_frame, nelements=10000, fold_axis=[-6.51626577e-06, -5.00013645e-01, -8.66017526e-01], # limb_wl=1 buffer=0.5 ) viewer = LavaVuModelViewer(model,background="white") # viewer.add_scalar_field(model.bounding_box,(38,55,30), # 'box', # paint_with=stratigraphy, # cmap='prism') viewer.add_isosurface(fold_frame[0], colour='blue', # isovalue=0.4, alpha=0.5) viewer.add_data(stratigraphy) # viewer.add_isosurface(fold_frame[1],colour='green',alpha=0.5) # viewer.add_vector_field(fold_frame[0],locations=fold_frame[0].get_interpolator().support.barycentre)
# fig, ax = plt.subplots(1,2,figsize=(10,5)) # x = np.linspace(s2[0].min(),s2[0].max(),1000) # ax[0].plot(x,s1['fold'].fold_limb_rotation(x)) # ax[0].plot(s1['fold'].fold_limb_rotation.fold_frame_coordinate,s1['fold'].fold_limb_rotation.rotation_angle,'bo') # ax[1].plot(s1['limb_svariogram'].lags,s1['limb_svariogram'].variogram,'bo') ###################################################################### # Modelling S0 # ~~~~~~~~~~~~ # s0 = model.create_and_add_folded_foliation('s0', limb_wl=1., av_fold_axis=True, nelements=50000, buffer=0.2, damp=True, solver='lu' ) viewer = LavaVuModelViewer(model) viewer.add_scalar_field(s0, cmap='tab20') viewer.rotate([-69.11979675292969, 15.704944610595703, 6.00014591217041]) viewer.display() ###################################################################### # S1/S0 S-Plots # ~~~~~~~~~~~~~ # s1_s0_splot = RotationAnglePlotter(s0)