def create_surface_points(create_surfaces, create_series): # # Data # #### SurfacePoints # These two DataFrames (df from now on) will contain the individual information of each point at an interface or # orientation. Some properties of this table are mapped from the *df* below. surfaces = create_surfaces surface_points = gp.SurfacePoints(surfaces) print(surface_points) surface_points.set_surface_points(pn.DataFrame(np.random.rand( 6, 3)), ['foo', 'foo5', 'lala', 'foo5', 'lala', 'feeeee']) print(surface_points) surface_points.map_data_from_surfaces(surfaces, 'series') print(surface_points) surface_points.map_data_from_surfaces(surfaces, 'id') print(surface_points) surface_points.map_data_from_series(create_series, 'order_series') print(surface_points) surface_points.sort_table() print(surface_points) return surface_points
def test_read_surface_points(): surface_points = gp.SurfacePoints() surface_points.read_surface_points(os.pardir + "/input_data/FabLessPoints_Points.csv", inplace=True) # Test setting series series = gp.Series(series_distribution={"fault": 'MainFault', "Rest": ('SecondaryReservoir', 'Seal3', 'Reservoir', 'Overlying'), }) surface_points.map_data_from_series(series, 'id') return surface_points