gempy
gempy.core.model.Project
gempy.core.model.Project.add_featuresgempy.core.model.Project.add_orientationsgempy.core.model.Project.add_seriesgempy.core.model.Project.add_surface_pointsgempy.core.model.Project.add_surface_valuesgempy.core.model.Project.add_surfacesgempy.core.model.Project.delete_featuresgempy.core.model.Project.delete_orientationsgempy.core.model.Project.delete_seriesgempy.core.model.Project.delete_surface_pointsgempy.core.model.Project.delete_surface_points_basementgempy.core.model.Project.delete_surface_valuesgempy.core.model.Project.delete_surfacesgempy.core.model.Project.get_active_gridsgempy.core.model.Project.get_additional_datagempy.core.model.Project.get_datagempy.core.model.Project.load_model_picklegempy.core.model.Project.map_geometric_data_dfgempy.core.model.Project.map_series_to_surfacesgempy.core.model.Project.map_stack_to_surfacesgempy.core.model.Project.modify_kriging_parametersgempy.core.model.Project.modify_optionsgempy.core.model.Project.modify_order_featuresgempy.core.model.Project.modify_order_seriesgempy.core.model.Project.modify_order_surfacesgempy.core.model.Project.modify_orientationsgempy.core.model.Project.modify_rescaling_parametersgempy.core.model.Project.modify_surface_pointsgempy.core.model.Project.modify_surface_valuesgempy.core.model.Project.new_modelgempy.core.model.Project.read_datagempy.core.model.Project.rename_featuresgempy.core.model.Project.rename_seriesgempy.core.model.Project.rename_surfacesgempy.core.model.Project.rename_featuresgempy.core.model.Project.reorder_seriesgempy.core.model.Project.save_modelgempy.core.model.Project.savel_model_picklegempy.core.model.Project.save_solutiongempy.core.model.Project.set_active_gridgempy.core.model.Project.set_bottom_relationgempy.core.model.Project.set_centered_gridgempy.core.model.Project.set_custom_gridgempy.core.model.Project.set_default_orientationgempy.core.model.Project.set_default_surface_pointgempy.core.model.Project.set_default_surfacesgempy.core.model.Project.set_extentgempy.core.model.Project.set_fault_objectgempy.core.model.Project.set_fault_relationgempy.core.model.Project.set_grid_objectgempy.core.model.Project.set_is_faultgempy.core.model.Project.set_is_finite_faultgempy.core.model.Project.set_orientationsgempy.core.model.Project.set_orientations_objectgempy.core.model.Project.set_regular_gridgempy.core.model.Project.set_section_gridgempy.core.model.Project.set_series_objectgempy.core.model.Project.set_surface_order_from_solutiongempy.core.model.Project.set_surface_pointsgempy.core.model.Project.set_surface_points_objectgempy.core.model.Project.set_surface_valuesgempy.core.model.Project.set_surfaces_objectgempy.core.model.Project.set_theano_functiongempy.core.model.Project.set_theano_graphgempy.core.model.Project.set_topographygempy.core.model.Project.update_additional_datagempy.core.model.Project.update_from_gridgempy.core.model.Project.update_from_seriesgempy.core.model.Project.update_from_surfacesgempy.core.model.Project.update_structuregempy.core.model.Project.update_to_interpolatorgempy.core.model.Project.additional_datagempy.core.model.Project.faultsgempy.core.model.Project.gridgempy.core.model.Project.interpolatorgempy.core.model.Project.orientationsgempy.core.model.Project.rescalinggempy.core.model.Project.seriesgempy.core.model.Project.stackgempy.core.model.Project.surface_pointsgempy.core.model.Project.surfaces
gempy.core.model.ImplicitCoKriging
gempy.core.model.ImplicitCoKriging.add_featuresgempy.core.model.ImplicitCoKriging.add_orientationsgempy.core.model.ImplicitCoKriging.add_seriesgempy.core.model.ImplicitCoKriging.add_surface_pointsgempy.core.model.ImplicitCoKriging.add_surface_valuesgempy.core.model.ImplicitCoKriging.add_surfacesgempy.core.model.ImplicitCoKriging.delete_featuresgempy.core.model.ImplicitCoKriging.delete_orientationsgempy.core.model.ImplicitCoKriging.delete_seriesgempy.core.model.ImplicitCoKriging.delete_surface_pointsgempy.core.model.ImplicitCoKriging.delete_surface_points_basementgempy.core.model.ImplicitCoKriging.delete_surface_valuesgempy.core.model.ImplicitCoKriging.delete_surfacesgempy.core.model.ImplicitCoKriging.get_active_gridsgempy.core.model.ImplicitCoKriging.map_geometric_data_dfgempy.core.model.ImplicitCoKriging.map_series_to_surfacesgempy.core.model.ImplicitCoKriging.map_stack_to_surfacesgempy.core.model.ImplicitCoKriging.modify_kriging_parametersgempy.core.model.ImplicitCoKriging.modify_optionsgempy.core.model.ImplicitCoKriging.modify_order_featuresgempy.core.model.ImplicitCoKriging.modify_order_seriesgempy.core.model.ImplicitCoKriging.modify_order_surfacesgempy.core.model.ImplicitCoKriging.modify_orientationsgempy.core.model.ImplicitCoKriging.modify_rescaling_parametersgempy.core.model.ImplicitCoKriging.modify_surface_pointsgempy.core.model.ImplicitCoKriging.modify_surface_valuesgempy.core.model.ImplicitCoKriging.rename_featuresgempy.core.model.ImplicitCoKriging.rename_seriesgempy.core.model.ImplicitCoKriging.rename_surfacesgempy.core.model.ImplicitCoKriging.reorder_featuresgempy.core.model.ImplicitCoKriging.reorder_seriesgempy.core.model.ImplicitCoKriging.set_active_gridgempy.core.model.ImplicitCoKriging.set_bottom_relationgempy.core.model.ImplicitCoKriging.set_centered_gridgempy.core.model.ImplicitCoKriging.set_custom_gridgempy.core.model.ImplicitCoKriging.set_default_orientationgempy.core.model.ImplicitCoKriging.set_default_surface_pointgempy.core.model.ImplicitCoKriging.set_default_surfacesgempy.core.model.ImplicitCoKriging.set_extentgempy.core.model.ImplicitCoKriging.set_fault_objectgempy.core.model.ImplicitCoKriging.set_fault_relationgempy.core.model.ImplicitCoKriging.set_grid_objectgempy.core.model.ImplicitCoKriging.set_is_faultgempy.core.model.ImplicitCoKriging.set_is_finite_faultgempy.core.model.ImplicitCoKriging.set_orientationsgempy.core.model.ImplicitCoKriging.set_orientations_objectgempy.core.model.ImplicitCoKriging.set_regular_gridgempy.core.model.ImplicitCoKriging.set_section_gridgempy.core.model.ImplicitCoKriging.set_series_objectgempy.core.model.ImplicitCoKriging.set_surface_order_from_solutiongempy.core.model.ImplicitCoKriging.set_surface_pointsgempy.core.model.ImplicitCoKriging.set_surface_points_objectgempy.core.model.ImplicitCoKriging.set_surface_valuesgempy.core.model.ImplicitCoKriging.set_surfaces_objectgempy.core.model.ImplicitCoKriging.set_theano_functiongempy.core.model.ImplicitCoKriging.set_theano_graphgempy.core.model.ImplicitCoKriging.set_topographygempy.core.model.ImplicitCoKriging.update_additional_datagempy.core.model.ImplicitCoKriging.update_from_gridgempy.core.model.ImplicitCoKriging.update_from_seriesgempy.core.model.ImplicitCoKriging.update_from_surfacesgempy.core.model.ImplicitCoKriging.update_structuregempy.core.model.ImplicitCoKriging.update_to_interpolatorgempy.core.model.ImplicitCoKriging.additional_datagempy.core.model.ImplicitCoKriging.faultsgempy.core.model.ImplicitCoKriging.gridgempy.core.model.ImplicitCoKriging.interpolatorgempy.core.model.ImplicitCoKriging.orientationsgempy.core.model.ImplicitCoKriging.rescalinggempy.core.model.ImplicitCoKriging.seriesgempy.core.model.ImplicitCoKriging.stackgempy.core.model.ImplicitCoKriging.surface_pointsgempy.core.model.ImplicitCoKriging.surfaces
gempy.core.data_modules.stack.Stack
gempy.core.data_modules.stack.Series
gempy.core.data_modules.stack.Faults
gempy.core.data.Surfaces
gempy.core.data.Structure
gempy.core.data.KrigingParameters
gempy.core.data.Options
gempy.core.data.AdditionalData
gempy.core.data.Grid
gempy.core.grid_modules.grid_types.RegularGrid
gempy.core.grid_modules.grid_types.CustomGrid
gempy.core.grid_modules.topography.Topography
gempy.core.grid_modules.grid_types.Sections
gempy.core.grid_modules.grid_types.CenteredGrid
gempy.core.data_modules.geometric_data.SurfacePoints
gempy.core.data_modules.geometric_data.Orientations
gempy.core.interpolator.InterpolatorModel
gempy.core.interpolator.InterpolatorModel.calculate_Vgempy.core.interpolator.InterpolatorModel.calculate_tzgempy.core.interpolator.InterpolatorModel.compile_th_fn_geogempy.core.interpolator.InterpolatorModel.crate_theano_graphgempy.core.interpolator.InterpolatorModel.get_python_input_blockgempy.core.interpolator.InterpolatorModel.modify_results_matrices_progempy.core.interpolator.InterpolatorModel.modify_results_weightsgempy.core.interpolator.InterpolatorModel.print_theano_sharedgempy.core.interpolator.InterpolatorModel.remove_series_without_datagempy.core.interpolator.InterpolatorModel.reset_flow_control_initial_resultsgempy.core.interpolator.InterpolatorModel.set_all_shared_parametersgempy.core.interpolator.InterpolatorModel.set_flow_controlgempy.core.interpolator.InterpolatorModel.set_initial_resultsgempy.core.interpolator.InterpolatorModel.set_initial_results_matricesgempy.core.interpolator.InterpolatorModel.set_theano_graphgempy.core.interpolator.InterpolatorModel.set_theano_shared_Vs_kernelgempy.core.interpolator.InterpolatorModel.set_theano_shared_fault_relationgempy.core.interpolator.InterpolatorModel.set_theano_shared_faultsgempy.core.interpolator.InterpolatorModel.set_theano_shared_gravitygempy.core.interpolator.InterpolatorModel.set_theano_shared_gridgempy.core.interpolator.InterpolatorModel.set_theano_shared_is_faultgempy.core.interpolator.InterpolatorModel.set_theano_shared_is_finitegempy.core.interpolator.InterpolatorModel.set_theano_shared_kriginggempy.core.interpolator.InterpolatorModel.set_theano_shared_l0_l1gempy.core.interpolator.InterpolatorModel.set_theano_shared_loopgempy.core.interpolator.InterpolatorModel.set_theano_shared_magnetic_ctsgempy.core.interpolator.InterpolatorModel.set_theano_shared_magneticsgempy.core.interpolator.InterpolatorModel.set_theano_shared_nuggetsgempy.core.interpolator.InterpolatorModel.set_theano_shared_onlap_erodegempy.core.interpolator.InterpolatorModel.set_theano_shared_pos_densitygempy.core.interpolator.InterpolatorModel.set_theano_shared_pos_magneticsgempy.core.interpolator.InterpolatorModel.set_theano_shared_relationsgempy.core.interpolator.InterpolatorModel.set_theano_shared_structuregempy.core.interpolator.InterpolatorModel.set_theano_shared_structure_surfacesgempy.core.interpolator.InterpolatorModel.set_theano_shared_topologygempy.core.interpolator.InterpolatorModel.set_theano_shared_tz_kernelgempy.core.interpolator.InterpolatorModel.set_theano_shared_weights
gempy.core.interpolator.InterpolatorGravity
gempy.core.solution.Solution

load_random_hills

该函数用于产生具有随机高度的山丘地形,并将其作为地形添加到地质模型中。

输入参数

  • extent (tuple):包含四个浮点数的元组,表示 x 和 y 轴上的模型边界(km)。
  • resolution (tuple):包含两个整数的元组,表示模型的 x 和 y 轴上的单元格数量。
  • surface_name (str, 可选):地形面的名称。默认值为“surface”。
  • new_dataframe (bool, 可选):如果为 True,则创建一个新的地质数据框 (GDF) 并将结果保存在其中。默认值为 False。
  • seed (int, 可选):随机种子值。可以使用它来重复上次运行产生的结果。默认值为 None,表示使用随机种子。

输出参数

  • 一个包含随机山丘地形的 Gempy 地质模型。

功能描述

load_random_hills 函数使用 Perlin 噪声生成随机山丘的高度地形,并将其作为地表面添加到 Gempy 地质模型中。Perlin 噪声是一种能够生成平滑随机地形的方法,可以使用各种语言实现。

load_random_hills 在使用 Perlin 噪声生成地形数据时,会基于下列参数生成 Perlin 噪声:

  • scale_factor:值越大,山丘地形的长度和宽度越大,而且视觉效果上的细节越少。默认值为 10.0。
  • octaves:值越大,随机地形的视觉细节越多。默认值为 6。
  • lacunarity:值越大,随机地形呈现出更多刻面。(?)默认值为 2.0。
  • persistance:值越小,随机地形将更过于平滑,短波高度较低;值越大,随机地形呈现出更多突出的山峰。(?) 默认值为 0.5。

示例

from gempy.core.grid_modules.topography import Topography
import matplotlib.pyplot as plt

E = (0, 10, 0, 10)     # 模型边界
R = (50, 50)           # 模型分辨率
T = Topography()       # 创建 Topography 实例
T.load_random_hills(extent=E, resolution=R, 
                    scale_factor=20, octaves=8, 
                    lacunarity=2.5, persistance=0.45)

model = T.create_surface_points() # 获得地质模型
T.plot_topography(model) # 绘制地形图
plt.show() # 显示地形图

该片段使用 load_random_hills 来生成随机地形,并使用 create_surface_points 获取地质数据框。最后使用 plot_topographyplt.show() 函数显示地形图。

异常

  • 无异常抛出。