map2loop.m2l_export

map2loop.m2l_export.ElementToPandas(loopFilename, element, loopCompoundType)

ElementToPandas - Exports one element of the loop project file to a pandas dataframe

Parameters

loopFilename: string

The filename of the loop project file

element: string

The name of the element to extract

loopCompoundType: numpy.compoundType

The numpy data structure that the element is stored in

Returns

pandas dataframe


map2loop.m2l_export.loop2LoopStructural(m2l_directory)

create a model from a map2loop directory

[extended_summary]

Parameters

m2l_directorystring

path to the map2loop directory

map2loop.m2l_export.loop2gempy(*args, **kwargs)

Calculate the model using gempy as backend. At the moment there is not support for finite faults since gempy does not

accept passing the ellipsoid parameters directly.

Parameters
  • (str) (vtk_path) – path of contacts file

  • orientations_file – path of orientations file

  • bbox – model bounding box

  • groups_file – path of groups file

  • model_base – z value ofbase of model

  • model_top – z value of top of model

  • dtm_reproj_file – path of dtm file

  • faults_contact – path of contacts file with fault data

  • faults_orientations – path of orientations file with fault data

  • faults_rel_matrix – bool matrix describing the interaction between groups. Rows offset columns

  • faults_groups_rel – bool matrix describing the interaction between faults and features

  • faults_faults_rel – bool matrix describing the interaction between faults and faults

  • model_name – name of the model

  • (bool) (vtk) – Default True. Whether or not compute the model

  • (bool) – Default False. Whether or not visualize the model

  • (str) – Default None. Path of vtk output directory

  • (dict) (plot_3d_kwargs) – kwargs for gempy.plot_3d

Returns

gempy.Project

map2loop.m2l_export.loop2gempy__(test_data_name: str, tmp_path: str, vtk_path: str, orientations_file: str, contacts_file: str, groups_file: str, bbox: tuple, model_base: float, model_top: float, vtk: bool, dtm_reproj_file: Optional[str] = None, va=None, verbose: bool = False, compute: bool = True)
Parameters
  • test_data_name

  • tmp_path

  • vtk_path

  • orientations_file

  • contacts_file

  • groups_file

  • bbox

  • model_base

  • model_top

  • vtk

  • dtm_reproj_file

  • va – vertical anisotropy. Factor by which all Z coordinates are multiplied by

  • verbose

  • compute

Returns

map2loop.m2l_export.rand_cmap(nlabels, type='bright', first_color_black=True, last_color_black=False, verbose=True)

Creates a random colormap to be used together with matplotlib. Useful for segmentation tasks :param nlabels: Number of labels (size of colormap) :param type: ‘bright’ for strong colors, ‘soft’ for pastel colors :param first_color_black: Option to use first color as black, True or False :param last_color_black: Option to use last color as black, True or False :param verbose: Prints the number of labels and shows the colormap. True or False :return: colormap for matplotlib