map_geometric_data_df 方法用于将地质数据集(scalar_field_data、orientations、surface_points 和 interfaces)转换为 pandas 数据帧形式,便于后续使用。
def map_geometric_data_df(
self,
scalar_field_data: Union[None, np.ndarray] = None,
orientations: Union[None, np.ndarray] = None,
surface_points: Union[None, np.ndarray] = None,
interfaces: Union[None, np.ndarray] = None
) -> Dict[str, pd.DataFrame]:
pass
scalar_field_data:二维 numpy 数组型的标量场数据,默认为 None。orientations:二维 numpy 数组型的方向数据,默认为 None。surface_points:二维 numpy 数组型的表面点数据,默认为 None。interfaces:二维 numpy 数组型的界面数据,默认为 None。地质数据集 (建立了 scalar_field_data、orientations、surface_points 和 interfaces 四个数据集的空间对象) 经过转换后的 pandas 数据表格。import gempy as gp
# 导入地质数据的文件路径
geo_data = gp.create_data('path/to/my/file')
# 创建模型
model = gp.create_model('My Model')
# 将地质数据集映射为数据帧
geometric_data = model.map_geometric_data_df(
scalar_field_data=geo_data.grid.scalar_field,
orientations=geo_data.structure_data.orientations,
surface_points=geo_data.surface_points.df,
interfaces=geo_data.interfaces.df
)