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 )
def average_axis(): data, bb = load_laurent2016() model = GeologicalModel(bb[0, :], bb[1, :]) model.set_model_data(data) s2 = model.create_and_add_fold_frame("s2", nelements=10000) s1 = model.create_and_add_folded_fold_frame( "s1", limb_wl=0.4, av_fold_axis=True, nelements=50000 ) s0 = model.create_and_add_folded_fold_frame( "s0", limb_wl=1.0, av_fold_axis=True, nelements=50000 )
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ # # The rotation angles can be calculated for observations of the folded # foliation and assocaited lineations. For example, the fold axis rotation # angle is found by calculating the angle between the gradient of the fold # axis direction field and the intersection lineations shown in A). The # fold limb rotation angle is found by finding the the angle to rotate the # 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],
newdata = pd.DataFrame([[5923.504395,4748.135254,3588.621094,'s2',1.0]],columns=['X','Y','Z','feature_name','val']) data = pd.concat([data,newdata],sort=False) rotation = [-69.11979675292969, 15.704944610595703, 6.00014591217041] ###################################################################### # Modelling S2 # ~~~~~~~~~~~~ # model = GeologicalModel(bb[0,:],bb[1,:]) model.set_model_data(data) s2 = model.create_and_add_fold_frame('s2', nelements=10000, buffer=0.5, solver='lu', damp=True) viewer = LavaVuModelViewer(model) viewer.add_scalar_field(s2[0], cmap='prism') viewer.add_isosurface(s2[0], slices=[0,1]) viewer.add_data(s2[0]) viewer.rotate(rotation) viewer.display() ###################################################################### # Modelling S1