Tools

Mesh manipulation

meshConvert

Usage: convertMesh [options] mesh|mod|vtk

Options:
  --version             show program's version number and exit
  -h, --help            show this help message and exit
  -v, --verbose         be verbose
  -V, --outVTK          export VTK format
  -P, --P2mesh          create quadratic (P2) mesh
  --outBoundaryVTU      export mesh boundary in VTU format
  -B, --outBMS          export GIMLi internal Binary Mesh (BMS) Format
  --outBMS2             export GIMLi internal Binary Mesh (BMS) v2 Format
  -m, --outMidCellAscii
                        Export simple xy[z]r[i] data. xy[z] are 2d[3d] cell
                        center coordinates. r are resistivity and i optional
                        ip-data values. Import data with the names r and i.
  -d DATA, --data=DATA  data file with optional name or modificator. This
                        option can appended multiple. e.g.: -d data.vector
                        (adds the data from file data.vector) -d
                        data.vector:Data (adds the data from file data.vector
                        and name it Data  -d data.vector:Data:Log10 (adds the
                        data from filedata.vector, name it Data and stores
                        log10(data) -d data.vector:Data:Log10:1e-4 (adds the
                        data fromfile data.vector, name it Data and stores
                        log10(data) with droptolerance 1e-4 for neg. data
  -o File, --output=File
                        Filename for the resulting export. Suffix may define
                        fileformat (.bms|.vtk)
  -r ROTATE, --rotate=ROTATE
                        rotate the mesh, "x,y,z"
  -s SCALE, --scale=SCALE
                        scale the mesh "x,y,z"
  -t TRANSLATE, --translate=TRANSLATE
                        translate the mesh. "x,y,z"
  --interpolateCoords=File
                        Interpolate a 2D mesh into 3D Coordinates.File is a 3
                        or 4-column-ascii-file (dx x y [z])
  --interpolateMesh=File
                        Interpolate all data of this mesh into a mesh given by
                        File. File is a bms|mod|vtk

meshMerge

usage: meshMerge [-h] [-v] [--debug] [-o OUTFILENAME] meshes [meshes ...]

Merge two meshes

positional arguments:
  meshes          Files to be merge. If there are more then 2 files, e.g.,
                  called with wildcard (*.vtk), the file matches the
                  outFileName will be excluded.

optional arguments:
  -h, --help      show this help message and exit
  -v, --verbose   Be verbose
  --debug         debug mode
  -o OUTFILENAME  Filename for the resulting mesh.

createParameterMesh

usage: createParameterMesh [-h] [-v] [-o File] [-d DIMENSION]
                           [--paraDX PARADX] [--paraDepth PARADEPTH] [--grid]
                           [--paraDZ PARADZ] [--nLayers NLAYERS]
                           [--paraBoundary PARABOUNDARY] [--show]
                           dataFileName

Create GIMLi parameter mesh for a given datafile

positional arguments:
  dataFileName

optional arguments:
  -h, --help            show this help message and exit
  -v, --verbose         be verbose
  -o File, --output File
                        File name for mesh. Default [datafile].bms
  -d DIMENSION, --dimension DIMENSION
                        Dimension of the mesh
  --paraDX PARADX       Horizontal distance between sensors, relative
                        regarding sensor distance
  --paraDepth PARADEPTH
                        Maximum depth [m] for parametric domain, 0[default]
                        means 0.4 * max sensor range
  --grid                Use a regular grid for parameter domain
  --paraDZ PARADZ       Vertical distance to the first depth layer, relative
                        regarding sensor distance. For --grid only
  --nLayers NLAYERS     Number of depth layers [default=11] for --grid
  --paraBoundary PARABOUNDARY
                        Parameter domain boundary in profile distance
  --show                Show the mesh in new window.

pyCreateSurface

Usage: pyCreateSurface [options] data|topo-xyz-list

Options:
  -h, --help     show this help message and exit
  -v, --verbose  be verbose

recountPara

Usage: recountPara [options] mesh

Options:
  -h, --help            show this help message and exit
  -v, --verbose         be verbose
  -o File, --output=File
                        filename for the resulting mesh
  -p File, --paramesh=File
                        name for reference parameter mesh

Data manipulation

datamerge

usage: dataMerge [-h] [-v] [-o File] [-s SNAP] [-B] project

A project file defines how multiple data files can be imported and
merged.
A list of row entries for each data file to merge. The data will not be
sorted, i.e., the sensor positions will be in the same order than the
list entries are. However, sensors on the same positions (with
tolerance snapping) will be merged.
You can also give just one data file if you want just a spatial
transformation of the data.

The currently supported formats are:

dataFilename
dataFilename interpolationFilename
dataFilename startx endx
dataFilename startx starty endx endy
dataFilename x1 y1 x2 y2 x3 y3 ...

You can comment out a row by adding a leading '#'

interpolationFilename is a 3-column-ascii-file (dx x y)

positional arguments:
  project

optional arguments:
  -h, --help            show this help message and exit
  -v, --verbose         Be verbose.
  -o File, --output File
                        Filename for the resulting data file.
  -s SNAP, --snap SNAP  Snap coordinates to gridsize
  -B, --bert            Use BERT sensor indices (a b m n)

Visualisation

pytripatch

Generic two-dimensional mesh/model viewer:

Usage: pytripatch [options] mesh|mod

Options:
  --version             show program's version number and exit
  -h, --help            show this help message and exit
  -v, --verbose         be verbose
  -S, --silent          set viewer silent mode
  -L, --linear          set linear color scale
  -C, --contour         Create contourplot instead of simple patch
  -B, --b2r             Use blue-white-red color scale
  -E, --drawEdges       Force draw all edges independent on marker
  -i INTERPERC, --interperc=INTERPERC
                        interpecentile
  -n NUMBER, --number=NUMBER
                        number from bmat
  -m File, --cmap=File  Use custom color map name. http://matplotlib.org/examp
                        les/color/colormaps_reference.html
  -d File, --data=File  data file
  -o File, --output=File
                        filename for the resulting picture. Suffix define
                        fileformat (.pdf|.png|.svg)
  -c File, --constraintMat=File
                        show mesh constraints connections
  -e File, --electrodes=File
                        Show electrodes from datafile as black dots
  --check               Check the mesh consistency and show free, unassigned,
                        nodes, if there are any.
  --cellBrowser         Open an interactive cell browser for the model.
  --cMin=CMIN           minimum colour
  --cMax=CMAX           maximum colour
  --coverage=File       coverage vector
  --covThreshold=COVTHRESHOLD
                        coverage threshold value [0.4]
  --cWeight=File        constraint weight vector
  --no-cbar             show colorbar
  --cbar-only           show colorbar only
  --label=String        Label to be displayed on colorbar. Resistivity or
                        Velocity is set automatically.
  --xLabel=String       Label to the x-axis.
  --yLabel=String       Label to the y-axis.
  --title=TITLE         draw title
  --aspect=ASPECT       set aspect ratio 'auto' or 'equal' [equal]
  --xlim=XLIM           set x limits for plot (: separated)
  --ylim=YLIM           set y limits for plot (: separated)
  --reverseX            Reverse the x axis
  --xOffset=XOFFSET     set x-coordinate offset for first electrode [0.0]
  --zOffset=ZOFFSET     set z-coordinate offset for first electrode [0.0]
  --interfaceLineWidth=INTERFACETHICKNESS
                        Set drawing line width for interface lines [2]
  --maxDepth=MAXDEPTH   limit z-coordinate to maximum depth
  --sensorDiameter=SENSORDIAMETER
                        absolute sensor marker size (default distance/8)
  --outSize=OUTSIZE     set the x:y pixel for the resulting figure file
  --dpi=DPI             set the dpi for pixel output or preview
  --publish=PUBLISH     set output style for publishing dim:paperSize:margin:w
                        Scale:hScale:Fontsize:scale:wOffset:hOffset, e.g.,
                        w:a4:5:0.5:0.2:9:2:0.05:0.1 (size:a4 width -5cm*0.5 +
                        9pt font scale all by 2)

Examples

  • Show a 2d mesh only
pytripatch mesh.bms
  • Color the mesh based on data. Data can be a file with a list of values i.e., one data for each cell.
pytripatch -d data.txt mesh.bms
  • Color the mesh based on data. Data can be a string of a data vector shipped with the GIMLI::Mesh see GIMLI::Mesh::addExportData() and binary format v2. Or internal attributes like attribute or marker
pytripatch --data=marker mesh.bms


2018 - GIMLi Development Team
Created using Bootstrap, Sphinx and pyGIMLi 1.0.9+87.g68804698 on Dec 16, 2018.