pygimli.physics.traveltime

Refraction seismics or first arrival traveltime calculations.

Overview

Functions

createGradientModel2D(data, mesh, vTop, vBot) Create 2D velocity gradient model.
createRAData(sensors[, shotdistance]) Create a refraction data container.
drawFirstPicks(ax, data[, tt, plotva, marker]) Naming convention.
drawTravelTimeData(ax, data[, t])
Draw first arrival traveltime data into mpl ax a.
drawVA(ax, data[, usePos]) Naming convention.
fastMarch(mesh, downwind, times, upT, downT) Do one front marching.

Classes

Refraction([data, verbose, debug, fatray, …]) Manager for refraction seismics (traveltime tomography)
RefractionNLayer([offset, nlay, vbase, verbose]) Forward operator for 1D Refraction seismic with layered model.
RefractionNLayerFix1stLayer([offset, nlay, …]) FOP for 1D Refraction seismic with layered model (e.g.
Tomography([data, tcorr, name]) Traveltime tomography for tomographic (e.g.

Functions

createGradientModel2D

pygimli.physics.traveltime.createGradientModel2D(data, mesh, vTop, vBot)[source]

Create 2D velocity gradient model.

Creates a smooth, linear, starting model that takes the slope of the topography into account. This is done by fitting a straight line and using the distance to that as the depth value. Known as “The Marcus method”

Parameters:
data : pygimli DataContainer

The topography list is in here.

mesh : pygimli.Mesh

The parametric mesh used for the inversion

vTop : float

The velocity at the surface of the mesh

vBot : float

The velocity at the bottom of the mesh

Returns:
model : pygimli Vector, length M

A numpy array with slowness values that can be used to start the inversion.

createRAData

pygimli.physics.traveltime.createRAData(sensors, shotdistance=1)[source]

Create a refraction data container.

Default data container for shot and geophon at every sensor position. Predefined sensor indices’s ‘s’ as shot position and ‘g’ as geophon position.

Parameters:
sensors : ndarray | R3Vector

Geophon and shot positions (same)

Returns:
data : DataContainer

Data container with predefined sensor indieces ‘s’ and ‘g’ for

Examples using pygimli.physics.traveltime.createRAData

drawFirstPicks

pygimli.physics.traveltime.drawFirstPicks(ax, data, tt=None, plotva=False, marker='x-')[source]

Naming convention. drawFOO(ax, … )

drawTravelTimeData

pygimli.physics.traveltime.drawTravelTimeData(ax, data, t=None)[source]
Draw first arrival traveltime data into mpl ax a. data of type
ef DataContainer must contain sensorIdx ‘s’ and ‘g’
and thus being numbered internally [0..n)

drawVA

pygimli.physics.traveltime.drawVA(ax, data, usePos=True)[source]

Naming convention. drawFOO(ax, … )

fastMarch

pygimli.physics.traveltime.fastMarch(mesh, downwind, times, upT, downT)[source]

Do one front marching.

Examples using pygimli.physics.traveltime.fastMarch

Classes

Refraction

class pygimli.physics.traveltime.Refraction(data=None, verbose=True, debug=False, fatray=False, frequency=1000.0, **kwargs)[source]

Manager for refraction seismics (traveltime tomography)

TODO Document main members and use default MethodeManager interface e.g., self.inv, self.fop, self.paraDomain, self.mesh, self.data

Methods

apparentData() Convert data into apparent data.
checkData() Check data
createApparentData(data) Create apparent slowness for given data.
createArgParser([dataSuffix]) Create default argument parser.
createData(sensors, scheme) Create an empty data set.
createFOP([verbose, usefmm, fatray]) Create default forward operator for Traveltime modelling.
createFOP_([verbose]) Create forward operator working on refined mesh.
createInv(fop[, verbose, doSave]) Create default inversion instance for Traveltime inversion.
createInv_(fop[, verbose, dosave]) Create inversion instance, data- and model transformations.
createMesh([depth, quality, paraDX, …]) Create (inversion) mesh using createParaDomain2D
dataToken() Token name for the data in a DataContainer.
dataVals(data) Return pure data values from a given DataContainer.
drawApparentVelocities(ax, data[, t]) Plot data in for of apparent velocity image.
drawTravelTimeData(ax, data[, t]) Plot travel time data as lines and points.
estimateError([data, absoluteError, …]) Estimate error composed of an absolute and a relative part
getDepth() return a (a-priori guessed) depth of investigation
getMidpoint([data]) Return vector of offsets (in m) between shot and receiver.
getModel() Return velocity vector.
getOffset([data, full]) Return vector of offsets (in m) between shot and receiver.
invert([data, t, err, mesh]) Run actual inversion.
loadData(filename) Load data from file.
makeJacobianPDF([ind]) Make multipage Jacobian PDF.
model() Return the actual model.
paraDomain() Return parameter domain mesh.
rayCoverage() return ray coverage
relErrorVals(data) Return pure data values from a given DataContainer.
saveFigures([name, ext]) save all existing figures to files
saveResult([folder, size]) Save the results in the specified folder.
setData(data) Set data container (holding s and g indices and t floats).
setDataContainer(data) Set data container from outside.
setDataToken(token) Set the token name to identity the data in a DataContainer.
setMesh(mesh[, refine, secNodes]) Set mesh.
setVerbose(verbose) Make the class verbose (put output to the console)
show(data[, values, axes, cMin, cMax, colorBar]) Forward the visualization.
showCoverage([ax, name]) shows the ray coverage in logscale
showData([data, response, ax, name]) Show data as travel time curves (optionally with response)
showMesh([ax, name]) show mesh in given ax or in a new figure
showModel([ax, vals]) WRITEME
showRayPaths([model, ax]) Show ray paths for model or last model for which the Jacobian was calculated.
showResult([val, ax, cMin, cMax, logScale, …]) Show resulting velocity vector.
showResultAndFit([name]) show two vertical subplots with result and data (with response)
showVA([data, t, name, pseudosection, …]) Show apparent velocity as image plot.
simulate(mesh, slowness, scheme[, verbose]) Simulate a traveltime measurement.
standardizedCoverage() return standardized coverage vector (0|1) using neighbor info
useFMM([fmm]) Define whether to use Fast Marching Method (FMM).
useFatray([fatray, frequency]) Define whether to use Fatray jacobian computation.
__init__(data=None, verbose=True, debug=False, fatray=False, frequency=1000.0, **kwargs)[source]

Init function with optional data load

apparentData()

Convert data into apparent data.

checkData()[source]

Check data

w.r.t. shot/geophone identity and zero/negative traveltimes, plus check y/z sensor positions

createApparentData(data)[source]

Create apparent slowness for given data.

static createArgParser(dataSuffix='dat')

Create default argument parser.

Create default argument parser for the following options:

-Q, –quiet

-R, –robustData: options.robustData

-B, –blockyModel: options.blockyModel

-l, –lambda: options.lam

-i, –maxIter: options.maxIter

—depth: options.depth

createData(sensors, scheme)

Create an empty data set.

static createFOP(verbose=False, usefmm=False, fatray=False)[source]

Create default forward operator for Traveltime modelling.

usefmm forces Fast Marching Method, otherwise Dijkstra is used.

createFOP_(verbose=False)

Create forward operator working on refined mesh.

createInv(fop, verbose=True, doSave=False)[source]

Create default inversion instance for Traveltime inversion.

createInv_(fop, verbose=True, dosave=False)

Create inversion instance, data- and model transformations.

createMesh(depth=None, quality=34.3, paraDX=1, boundary=0, paraBoundary=0, secNodes=3, apply=True, **kwargs)[source]

Create (inversion) mesh using createParaDomain2D

Parameters:
depth : float, optional

maximum depth, 0 (default) means maximum offset / 3.

paraDX : float

relative distance for refinement nodes between two sensors e.g., 0 or 1 means no refinement e.g., 0.5 means 1 additional node between two neighboring sensors e.g., 0.33 means 2 additional equidistant nodes between two sensors

boundary : float, optional

boundary width to be appended for domain prolongation in absolute para domain width. values < 0 force the boundary to be 4 times para domain width.

paraBoundary : float, optional

margin for parameter domain in sensor distances (default 2)

quality : float, optional

mesh quality (smallest angle allowed)

apply : bool, optional

set mesh property of the underlying forward operator

secNodes : int (1)

Amount of secondary nodes to improve accuracy of the forward solution.

**kwargs: Additional keyword arguments passed to

pygimli.meshtools.createParaMeshPLC

dataToken()

Token name for the data in a DataContainer.

dataVals(data)[source]

Return pure data values from a given DataContainer.

static drawApparentVelocities(ax, data, t=None, **kwargs)[source]

Plot data in for of apparent velocity image.

static drawTravelTimeData(ax, data, t=None)[source]

Plot travel time data as lines and points.

static estimateError(data=None, absoluteError=0.001, relativeError=0.001)[source]

Estimate error composed of an absolute and a relative part

Parameters:
absoluteError : float

absolute error of traveltimes (usually in s)

relativeError : float

relative error of traveltimes in 1 (e.g. 0.01 is 1%)

Returns:
err : array
getDepth()[source]

return a (a-priori guessed) depth of investigation

getMidpoint(data=None)[source]

Return vector of offsets (in m) between shot and receiver.

getModel()[source]

Return velocity vector.

getOffset(data=None, full=False)[source]

Return vector of offsets (in m) between shot and receiver.

invert(data=None, t=None, err=None, mesh=None, **kwargs)[source]

Run actual inversion.

Values for result/response are stored in the class members velocity/response

Parameters:
useGradient : bool

Create gradient for starting model from vtop to vbottom.

vtop, vbottom : float

starting (gradient) model velocities on top/at bottom of the mesh

lam : float

regularization parameter describing the strength of smoothness

zWeight : float

relative weight for purely vertical boundaries

maxIter : int

Maximum number of iterations

startModel : array

Slowness starting model for the inversion

loadData(filename)[source]

Load data from file.

makeJacobianPDF(ind=None)[source]

Make multipage Jacobian PDF.

model()

Return the actual model.

paraDomain()[source]

Return parameter domain mesh.

rayCoverage()[source]

return ray coverage

relErrorVals(data)[source]

Return pure data values from a given DataContainer.

saveFigures(name=None, ext='pdf')[source]

save all existing figures to files

saveResult(folder=None, size=(16, 10), **kwargs)[source]

Save the results in the specified folder.

Saved items are:
Inverted profile Velocity vector Coverage vector Standardized coverage vector Mesh (bms and vtk with results)
setData(data)[source]

Set data container (holding s and g indices and t floats).

setDataContainer(data)[source]

Set data container from outside.

setDataToken(token)

Set the token name to identity the data in a DataContainer.

setMesh(mesh, refine=False, secNodes=1)[source]

Set mesh. To be removed from class once derived from MeshManager.

Parameters:
secNodes : int (1)

Number of secondary nodes to improve accuracy of the forward solution.

setVerbose(verbose)

Make the class verbose (put output to the console)

show(data, values=None, axes=None, cMin=None, cMax=None, colorBar=1, **kwargs)

Forward the visualization.

showCoverage(ax=None, name='coverage', **kwargs)[source]

shows the ray coverage in logscale

showData(data=None, response=None, ax=None, name='data')[source]

Show data as travel time curves (optionally with response)

Parameters:
data : pyGIMLi data Container [self.dataContainer]

data to show with points

response : array

response vector to draw with lines

ax : maxplotlib axes

axis to plot into, if not given, a new figure is created

showMesh(ax=None, name='mesh')[source]

show mesh in given ax or in a new figure

showModel(ax=None, vals=None, **kwargs)[source]

WRITEME

showRayPaths(model=None, ax=None, **kwargs)[source]

Show ray paths for model or last model for which the Jacobian was calculated.

Parameters:
model : array

Velocity model for which to calculate and visualize ray paths (the default is model for last Jacobian calculation in self.velocity).

ax : matplotlib.axes

Axes for the plot (the default is None).

**kwargs : type

Additional arguments passed to LineCollection (alpha, linewidths, color, linestyles).

Returns:
ax : matplotlib.axes object
cb : matplotlib.colorbar object (only if model is provided)

Examples

>>> # No reason to import matplotlib
>>> import pygimli as pg
>>> from pygimli.physics import Refraction
>>> from pygimli.physics.traveltime import createRAData
>>>
>>> x, y = 8, 6
>>> mesh = pg.createGrid(x, y)
>>> data = createRAData([(0,0)] + [(x, i) for i in range(y)], shotdistance=y+1)
>>> data.set("t", pg.RVector(data.size(), 1.0))
>>> rst = Refraction()
>>> rst.setDataContainer(data)
Data: Sensors: 7 data: 6
>>> rst.setMesh(mesh, 5)
>>> ax, cb = rst.showRayPaths()

(png, pdf)

../../_images/pygimli-physics-traveltime-1.png
showResult(val=None, ax=None, cMin=None, cMax=None, logScale=False, rays=False, name='result', **kwargs)[source]

Show resulting velocity vector.

Parameters:
val : result array [self.velocity]

field to show, usually the velocity vector

ax : matplotlib.axes

axes to plot into, if not give a new one-axis figure is created

cMin/cMax : float

minimum and maximum values for ranging colorbar

logScale : bool [False]

use logarithmic scale

rays : bool [False]

Show ray paths as well.

Returns:
ax : maxplotlib axes
cb : matplotlib color bar object
Other Parameters:
 
useCoverage : bool [True]

use standardized (0 or 1) ray coverage as alpha-shading

label : str

label to write on colorbar

orientaton : str

color bar orientation

nLevs : int [7]

number of level values for color bar

**kwargs : keyword arguments passed to the show function
showResultAndFit(name='resultfit', **kwargs)[source]

show two vertical subplots with result and data (with response)

showVA(data=None, t=None, name='va', pseudosection=False, squeeze=True, full=True, ax=None, cmap=None, **kwargs)[source]

Show apparent velocity as image plot.

TODO showXXX commands need to return ax and cbar .. if there is one

static simulate(mesh, slowness, scheme, verbose=False, **kwargs)[source]

Simulate a traveltime measurement.

Perform the forward task for a given mesh, a slowness distribution (per cell) and return data (traveltime) for a measurement scheme. This is a static method since it does not interfere with the managers inversion approaches.

Parameters:
mesh : GIMLI::Mesh

Mesh to calculate for.

slowness : array(mesh.cellCount()) | array(N, mesh.cellCount())

slowness distribution for the given mesh cells can be:

  • a single array of len mesh.cellCount()
  • a matrix of N slowness distributions of len mesh.cellCount()
  • a res map as [[marker0, res0], [marker1, res1], …]
scheme : GIMLI::DataContainer

data measurement scheme

verbose : boolean

Be verbose.

Returns:
t : array(N, data.size()) | DataContainer

The resulting simulated travel time values. Either one column array or matrix in case of slowness matrix. A DataContainer is return if noisify set to True.

Other Parameters:
 
noisify : boolean

add normal distributed noise based on scheme(‘err’)

standardizedCoverage()[source]

return standardized coverage vector (0|1) using neighbor info

useFMM(fmm=True)[source]

Define whether to use Fast Marching Method (FMM).

Note that this method is more accurate but currently a lot slower!

useFatray(fatray=True, frequency=300.0)[source]

Define whether to use Fatray jacobian computation.

RefractionNLayer

class pygimli.physics.traveltime.RefractionNLayer(offset=0, nlay=3, vbase=1100, verbose=True)[source]

Forward operator for 1D Refraction seismic with layered model.

Methods

__call__((object)arg1, (object)model) C++ signature : GIMLI::Vector<double> __call__(GIMLI::ModellingBase {lvalue},GIMLI::Vector<double>)
clearConstraints((object)arg1) C++ signature : void* clearConstraints(GIMLI::ModellingBase {lvalue})
clearJacobian((object)arg1) C++ signature : void* clearJacobian(GIMLI::ModellingBase {lvalue})
constraints((object)arg1) C++ signature : GIMLI::MatrixBase* constraints(GIMLI::ModellingBase {lvalue})
constraintsRef((object)arg1) C++ signature : GIMLI::SparseMapMatrix<double, unsigned long> {lvalue} constraintsRef(GIMLI::ModellingBase {lvalue})
createConstraints((object)arg1) C++ signature : void* createConstraints(GIMLI::ModellingBase {lvalue})
createDefaultStartModel((object)arg1) C++ signature : GIMLI::Vector<double> createDefaultStartModel(GIMLI::ModellingBase {lvalue})
createJacobian((object)arg1, (object)model) C++ signature : void* createJacobian(GIMLI::ModellingBase {lvalue},GIMLI::Vector<double>)
createMappedModel((object)arg1, …) Read only extrapolation of model values given per cell marker to values given per cell.
createRefinedForwardMesh((object)arg1 [, …) C++ signature : void* createRefinedForwardMesh(GIMLI::ModellingBase {lvalue} [,bool=True [,bool=False]])
createStartModel((object)arg1) C++ signature : GIMLI::Vector<double> createStartModel(GIMLI::ModellingBase {lvalue})
createStartVector((object)arg1) DEPRECATED use createStartModel
data((object)arg1) Return the associated data container.
deleteMesh((object)arg1) Delete the actual mesh.
initConstraints((object)arg1) C++ signature : void* initConstraints(GIMLI::ModellingBase {lvalue})
initJacobian((object)arg1) C++ signature : void* initJacobian(GIMLI::ModellingBase {lvalue})
initRegionManager((object)arg1) C++ signature : void* initRegionManager(GIMLI::ModellingBase {lvalue})
jacobian((object)arg1) Return the pointer to the Jacobian matrix associated with this forward operator.
jacobianRef((object)arg1) C++ signature : GIMLI::Matrix<double> {lvalue} jacobianRef(GIMLI::ModellingBase {lvalue})
mapModel((object)arg1, (object)model [, …) C++ signature : void* mapModel(GIMLI::ModellingBase {lvalue},GIMLI::Vector<double> [,double=0])
mesh((object)arg1) C++ signature : GIMLI::Mesh* mesh(GIMLI::ModellingBase {lvalue})
multiThreadJacobian((object)arg1) Return number of threads used for Jacobian generation.
region((object)arg1, (object)marker) Syntactic sugar for this->regionManager().region(marker).
regionManager((object)arg1) C++ signature : GIMLI::RegionManager regionManager(GIMLI::ModellingBase {lvalue})
regionManagerRef((object)arg1) C++ signature : GIMLI::RegionManager {lvalue} regionManagerRef(GIMLI::ModellingBase {lvalue})
response(model) Return forward response f(m).
response_mt((object)arg1, (object)model [, …) C++ signature : GIMLI::Vector<double> response_mt(GIMLI::ModellingBase {lvalue},GIMLI::Vector<double> [,unsigned long=0])
setConstraints((object)arg1, (object)C) C++ signature : void* setConstraints(GIMLI::ModellingBase {lvalue},GIMLI::MatrixBase*)
setData((object)arg1, (object)data) Change the associated data container
setJacobian((object)arg1, (object)J) C++ signature : void* setJacobian(GIMLI::ModellingBase {lvalue},GIMLI::MatrixBase*)
setMesh((object)arg1, (object)mesh [, …) Set new mesh to the forward operator, optionally hold region parameter for the new mesh (i.e.
setMultiThreadJacobian((object)arg1, …) Set number of threads used for brute force Jacobian generation.
setRegionManager((object)arg1, (object)reg) C++ signature : void* setRegionManager(GIMLI::ModellingBase {lvalue},GIMLI::RegionManager*)
setStartModel((object)arg1, (object)startModel) C++ signature : void* setStartModel(GIMLI::ModellingBase {lvalue},GIMLI::Vector<double>)
setThreadCount((object)arg1, (object)nThreads) Set the maximum number of allowed threads for MT calculation.
setVerbose((object)arg1, (object)verbose) Set verbose state.
solution((object)arg1) C++ signature : GIMLI::Matrix<double> solution(GIMLI::ModellingBase {lvalue})
startModel((object)arg1) C++ signature : GIMLI::Vector<double> startModel(GIMLI::ModellingBase {lvalue})
thkVel(model) Return thickness and velocity vectors from model.
threadCount((object)arg1) Return the maximum number of allowed threads for MT calculation
verbose((object)arg1) Get verbose state.
createJacobian_mt  
responses  
__init__(offset=0, nlay=3, vbase=1100, verbose=True)[source]

Init forward operator. Model are velocity increases.

Parameters:
offset : iterable

vector of offsets between shot and geophone

nlay : int

number of layers

vbase : float

base velocity (all values are above)

clearConstraints((object)arg1) → object :
C++ signature :
void* clearConstraints(GIMLI::ModellingBase {lvalue})

clearConstraints( (object)arg1) -> object :

C++ signature :
void* clearConstraints(ModellingBase_wrapper {lvalue})
clearJacobian((object)arg1) → object :
C++ signature :
void* clearJacobian(GIMLI::ModellingBase {lvalue})

clearJacobian( (object)arg1) -> object :

C++ signature :
void* clearJacobian(ModellingBase_wrapper {lvalue})
constraints((object)arg1) → object :
C++ signature :
GIMLI::MatrixBase* constraints(GIMLI::ModellingBase {lvalue})

constraints( (object)arg1) -> object :

C++ signature :
GIMLI::MatrixBase* constraints(ModellingBase_wrapper {lvalue})

constraints( (object)arg1) -> object :

C++ signature :
GIMLI::MatrixBase* constraints(GIMLI::ModellingBase {lvalue})

constraints( (object)arg1) -> object :

C++ signature :
GIMLI::MatrixBase* constraints(ModellingBase_wrapper {lvalue})
constraintsRef((object)arg1) → object :
C++ signature :
GIMLI::SparseMapMatrix<double, unsigned long> {lvalue} constraintsRef(GIMLI::ModellingBase {lvalue})

constraintsRef( (object)arg1) -> object :

C++ signature :
GIMLI::SparseMapMatrix<double, unsigned long> {lvalue} constraintsRef(GIMLI::ModellingBase {lvalue})
createConstraints((object)arg1) → object :
C++ signature :
void* createConstraints(GIMLI::ModellingBase {lvalue})

createConstraints( (object)arg1) -> object :

C++ signature :
void* createConstraints(ModellingBase_wrapper {lvalue})
createDefaultStartModel((object)arg1) → object :
C++ signature :
GIMLI::Vector<double> createDefaultStartModel(GIMLI::ModellingBase {lvalue})

createDefaultStartModel( (object)arg1) -> object :

C++ signature :
GIMLI::Vector<double> createDefaultStartModel(ModellingBase_wrapper {lvalue})
createJacobian((object)arg1, (object)model) → object :
C++ signature :
void* createJacobian(GIMLI::ModellingBase {lvalue},GIMLI::Vector<double>)

createJacobian( (object)arg1, (object)model) -> object :

C++ signature :
void* createJacobian(ModellingBase_wrapper {lvalue},GIMLI::Vector<double>)

createJacobian( (object)arg1, (object)model, (object)resp) -> object :

C++ signature :
void* createJacobian(GIMLI::ModellingBase {lvalue},GIMLI::Vector<double>,GIMLI::Vector<double>)

createJacobian( (object)arg1, (object)model, (object)resp) -> object :

C++ signature :
void* createJacobian(ModellingBase_wrapper {lvalue},GIMLI::Vector<double>,GIMLI::Vector<double>)
createJacobian_mt(model, resp)
createMappedModel((object)arg1, (object)model[, (object)background=-1]) → object :

Read only extrapolation of model values given per cell marker to values given per cell. Exterior values will be set to background or prolongated for background = -1.

C++ signature :
GIMLI::Vector<double> createMappedModel(GIMLI::ModellingBase {lvalue},GIMLI::Vector<double> [,double=-1])
createRefinedForwardMesh((object)arg1[, (object)refine=True[, (object)pRefine=False]]) → object :
C++ signature :
void* createRefinedForwardMesh(GIMLI::ModellingBase {lvalue} [,bool=True [,bool=False]])
createStartModel((object)arg1) → object :
C++ signature :
GIMLI::Vector<double> createStartModel(GIMLI::ModellingBase {lvalue})
createStartVector((object)arg1) → object :

DEPRECATED use createStartModel

C++ signature :
GIMLI::Vector<double> createStartVector(GIMLI::ModellingBase {lvalue})
data((object)arg1) → object :

Return the associated data container.

C++ signature :
GIMLI::DataContainer {lvalue} data(GIMLI::ModellingBase {lvalue})
deleteMesh((object)arg1) → object :

Delete the actual mesh.

C++ signature :
void* deleteMesh(GIMLI::ModellingBase {lvalue})
initConstraints((object)arg1) → object :
C++ signature :
void* initConstraints(GIMLI::ModellingBase {lvalue})

initConstraints( (object)arg1) -> object :

C++ signature :
void* initConstraints(ModellingBase_wrapper {lvalue})
initJacobian((object)arg1) → object :
C++ signature :
void* initJacobian(GIMLI::ModellingBase {lvalue})

initJacobian( (object)arg1) -> object :

C++ signature :
void* initJacobian(ModellingBase_wrapper {lvalue})
initRegionManager((object)arg1) → object :
C++ signature :
void* initRegionManager(GIMLI::ModellingBase {lvalue})
jacobian((object)arg1) → object :

Return the pointer to the Jacobian matrix associated with this forward operator.

C++ signature :
GIMLI::MatrixBase* jacobian(GIMLI::ModellingBase {lvalue})
jacobian( (object)arg1) -> object :

Return the pointer to the Jacobian matrix associated with this forward operator.

C++ signature :
GIMLI::MatrixBase* jacobian(GIMLI::ModellingBase {lvalue})
jacobianRef((object)arg1) → object :
C++ signature :
GIMLI::Matrix<double> {lvalue} jacobianRef(GIMLI::ModellingBase {lvalue})

jacobianRef( (object)arg1) -> object :

C++ signature :
GIMLI::Matrix<double> {lvalue} jacobianRef(GIMLI::ModellingBase {lvalue})
mapModel((object)arg1, (object)model[, (object)background=0]) → object :
C++ signature :
void* mapModel(GIMLI::ModellingBase {lvalue},GIMLI::Vector<double> [,double=0])
mesh((object)arg1) → object :
C++ signature :
GIMLI::Mesh* mesh(GIMLI::ModellingBase {lvalue})
multiThreadJacobian((object)arg1) → object :

Return number of threads used for Jacobian generation.

C++ signature :
unsigned long multiThreadJacobian(GIMLI::ModellingBase {lvalue})
region((object)arg1, (object)marker) → object :

Syntactic sugar for this->regionManager().region(marker).

C++ signature :
GIMLI::Region* region(GIMLI::ModellingBase {lvalue},int)
regionManager((object)arg1) → object :
C++ signature :
GIMLI::RegionManager regionManager(GIMLI::ModellingBase {lvalue})

regionManager( (object)arg1) -> object :

C++ signature :
GIMLI::RegionManager {lvalue} regionManager(GIMLI::ModellingBase {lvalue})
regionManagerRef((object)arg1) → object :
C++ signature :
GIMLI::RegionManager {lvalue} regionManagerRef(GIMLI::ModellingBase {lvalue})
response(model)[source]

Return forward response f(m).

response_mt((object)arg1, (object)model[, (object)i=0]) → object :
C++ signature :
GIMLI::Vector<double> response_mt(GIMLI::ModellingBase {lvalue},GIMLI::Vector<double> [,unsigned long=0])

response_mt( (object)arg1, (object)model [, (object)i=0]) -> object :

C++ signature :
GIMLI::Vector<double> response_mt(ModellingBase_wrapper {lvalue},GIMLI::Vector<double> [,unsigned long=0])
responses(models, respos)
setConstraints((object)arg1, (object)C) → object :
C++ signature :
void* setConstraints(GIMLI::ModellingBase {lvalue},GIMLI::MatrixBase*)

setConstraints( (object)arg1, (object)C) -> object :

C++ signature :
void* setConstraints(ModellingBase_wrapper {lvalue},GIMLI::MatrixBase*)
setData((object)arg1, (object)data) → object :

Change the associated data container

C++ signature :
void* setData(GIMLI::ModellingBase {lvalue},GIMLI::DataContainer {lvalue})
setJacobian((object)arg1, (object)J) → object :
C++ signature :
void* setJacobian(GIMLI::ModellingBase {lvalue},GIMLI::MatrixBase*)

setJacobian( (object)arg1, (object)J) -> object :

C++ signature :
void* setJacobian(ModellingBase_wrapper {lvalue},GIMLI::MatrixBase*)
setMesh((object)arg1, (object)mesh [, (object)ignoreRegionManager=False]) -> object : Set new mesh to the forward operator, optionally hold region parameter for the new mesh (i.e. for roll a long)

Set new mesh to the forward operator, optionally hold region parameter for the new mesh (i.e. for roll a long)

C++ signature :
void* setMesh(GIMLI::ModellingBase {lvalue},GIMLI::Mesh [,bool=False])
setMultiThreadJacobian((object)arg1, (object)nThreads) → object :

Set number of threads used for brute force Jacobian generation. 1 is default. If nThreads is greater than 1 you need to implement response_mt with a read only response function. Maybe its worth set the single setThreadCount to 1 than, that you dont find yourself in a threading overkill.

C++ signature :
void* setMultiThreadJacobian(GIMLI::ModellingBase {lvalue},unsigned long)
setRegionManager((object)arg1, (object)reg) → object :
C++ signature :
void* setRegionManager(GIMLI::ModellingBase {lvalue},GIMLI::RegionManager*)
setStartModel((object)arg1, (object)startModel) → object :
C++ signature :
void* setStartModel(GIMLI::ModellingBase {lvalue},GIMLI::Vector<double>)

setStartModel( (object)arg1, (object)startModel) -> object :

C++ signature :
void* setStartModel(ModellingBase_wrapper {lvalue},GIMLI::Vector<double>)
setThreadCount((object)arg1, (object)nThreads) → object :

Set the maximum number of allowed threads for MT calculation. Have to be greater than 0. Will also set ENV(OPENBLAS_NUM_THREADS) .. if used.

C++ signature :
void* setThreadCount(GIMLI::ModellingBase {lvalue},unsigned long)
setVerbose((object)arg1, (object)verbose) → object :

Set verbose state.

C++ signature :
void* setVerbose(GIMLI::ModellingBase {lvalue},bool)
solution((object)arg1) → object :
C++ signature :
GIMLI::Matrix<double> solution(GIMLI::ModellingBase {lvalue})
startModel((object)arg1) → object :
C++ signature :
GIMLI::Vector<double> startModel(GIMLI::ModellingBase {lvalue})

startModel( (object)arg1) -> object :

C++ signature :
GIMLI::Vector<double> startModel(ModellingBase_wrapper {lvalue})
thkVel(model)[source]

Return thickness and velocity vectors from model.

threadCount((object)arg1) → object :

Return the maximum number of allowed threads for MT calculation

C++ signature :
unsigned long threadCount(GIMLI::ModellingBase {lvalue})
verbose((object)arg1) → object :

Get verbose state.

C++ signature :
bool verbose(GIMLI::ModellingBase {lvalue})

verbose( (object)arg1) -> object :

C++ signature :
bool verbose(GIMLI::ModellingBase {lvalue})

RefractionNLayerFix1stLayer

class pygimli.physics.traveltime.RefractionNLayerFix1stLayer(offset=0, nlay=3, v0=1465, d0=200, muteDirect=0, verbose=True)[source]

FOP for 1D Refraction seismic with layered model (e.g. water layer).

Methods

__call__((object)arg1, (object)model) C++ signature : GIMLI::Vector<double> __call__(GIMLI::ModellingBase {lvalue},GIMLI::Vector<double>)
clearConstraints((object)arg1) C++ signature : void* clearConstraints(GIMLI::ModellingBase {lvalue})
clearJacobian((object)arg1) C++ signature : void* clearJacobian(GIMLI::ModellingBase {lvalue})
constraints((object)arg1) C++ signature : GIMLI::MatrixBase* constraints(GIMLI::ModellingBase {lvalue})
constraintsRef((object)arg1) C++ signature : GIMLI::SparseMapMatrix<double, unsigned long> {lvalue} constraintsRef(GIMLI::ModellingBase {lvalue})
createConstraints((object)arg1) C++ signature : void* createConstraints(GIMLI::ModellingBase {lvalue})
createDefaultStartModel((object)arg1) C++ signature : GIMLI::Vector<double> createDefaultStartModel(GIMLI::ModellingBase {lvalue})
createJacobian((object)arg1, (object)model) C++ signature : void* createJacobian(GIMLI::ModellingBase {lvalue},GIMLI::Vector<double>)
createMappedModel((object)arg1, …) Read only extrapolation of model values given per cell marker to values given per cell.
createRefinedForwardMesh((object)arg1 [, …) C++ signature : void* createRefinedForwardMesh(GIMLI::ModellingBase {lvalue} [,bool=True [,bool=False]])
createStartModel((object)arg1) C++ signature : GIMLI::Vector<double> createStartModel(GIMLI::ModellingBase {lvalue})
createStartVector((object)arg1) DEPRECATED use createStartModel
data((object)arg1) Return the associated data container.
deleteMesh((object)arg1) Delete the actual mesh.
initConstraints((object)arg1) C++ signature : void* initConstraints(GIMLI::ModellingBase {lvalue})
initJacobian((object)arg1) C++ signature : void* initJacobian(GIMLI::ModellingBase {lvalue})
initRegionManager((object)arg1) C++ signature : void* initRegionManager(GIMLI::ModellingBase {lvalue})
jacobian((object)arg1) Return the pointer to the Jacobian matrix associated with this forward operator.
jacobianRef((object)arg1) C++ signature : GIMLI::Matrix<double> {lvalue} jacobianRef(GIMLI::ModellingBase {lvalue})
mapModel((object)arg1, (object)model [, …) C++ signature : void* mapModel(GIMLI::ModellingBase {lvalue},GIMLI::Vector<double> [,double=0])
mesh((object)arg1) C++ signature : GIMLI::Mesh* mesh(GIMLI::ModellingBase {lvalue})
multiThreadJacobian((object)arg1) Return number of threads used for Jacobian generation.
region((object)arg1, (object)marker) Syntactic sugar for this->regionManager().region(marker).
regionManager((object)arg1) C++ signature : GIMLI::RegionManager regionManager(GIMLI::ModellingBase {lvalue})
regionManagerRef((object)arg1) C++ signature : GIMLI::RegionManager {lvalue} regionManagerRef(GIMLI::ModellingBase {lvalue})
response(model) Return forward response f(m).
response_mt((object)arg1, (object)model [, …) C++ signature : GIMLI::Vector<double> response_mt(GIMLI::ModellingBase {lvalue},GIMLI::Vector<double> [,unsigned long=0])
setConstraints((object)arg1, (object)C) C++ signature : void* setConstraints(GIMLI::ModellingBase {lvalue},GIMLI::MatrixBase*)
setData((object)arg1, (object)data) Change the associated data container
setJacobian((object)arg1, (object)J) C++ signature : void* setJacobian(GIMLI::ModellingBase {lvalue},GIMLI::MatrixBase*)
setMesh((object)arg1, (object)mesh [, …) Set new mesh to the forward operator, optionally hold region parameter for the new mesh (i.e.
setMultiThreadJacobian((object)arg1, …) Set number of threads used for brute force Jacobian generation.
setRegionManager((object)arg1, (object)reg) C++ signature : void* setRegionManager(GIMLI::ModellingBase {lvalue},GIMLI::RegionManager*)
setStartModel((object)arg1, (object)startModel) C++ signature : void* setStartModel(GIMLI::ModellingBase {lvalue},GIMLI::Vector<double>)
setThreadCount((object)arg1, (object)nThreads) Set the maximum number of allowed threads for MT calculation.
setVerbose((object)arg1, (object)verbose) Set verbose state.
solution((object)arg1) C++ signature : GIMLI::Matrix<double> solution(GIMLI::ModellingBase {lvalue})
startModel((object)arg1) C++ signature : GIMLI::Vector<double> startModel(GIMLI::ModellingBase {lvalue})
thkVel(model) Return thickness and velocity vectors from model.
threadCount((object)arg1) Return the maximum number of allowed threads for MT calculation
verbose((object)arg1) Get verbose state.
createJacobian_mt  
responses  
__init__(offset=0, nlay=3, v0=1465, d0=200, muteDirect=0, verbose=True)[source]

Init forward operator for velocity increases with fixed 1st layer.

Parameters:
offset : iterable

vector of offsets between shot and geophone

nlay : int

number of layers

v0 : float

first layer velocity (at the same time base velocity)

d0 : float

depth of first layer

clearConstraints((object)arg1) → object :
C++ signature :
void* clearConstraints(GIMLI::ModellingBase {lvalue})

clearConstraints( (object)arg1) -> object :

C++ signature :
void* clearConstraints(ModellingBase_wrapper {lvalue})
clearJacobian((object)arg1) → object :
C++ signature :
void* clearJacobian(GIMLI::ModellingBase {lvalue})

clearJacobian( (object)arg1) -> object :

C++ signature :
void* clearJacobian(ModellingBase_wrapper {lvalue})
constraints((object)arg1) → object :
C++ signature :
GIMLI::MatrixBase* constraints(GIMLI::ModellingBase {lvalue})

constraints( (object)arg1) -> object :

C++ signature :
GIMLI::MatrixBase* constraints(ModellingBase_wrapper {lvalue})

constraints( (object)arg1) -> object :

C++ signature :
GIMLI::MatrixBase* constraints(GIMLI::ModellingBase {lvalue})

constraints( (object)arg1) -> object :

C++ signature :
GIMLI::MatrixBase* constraints(ModellingBase_wrapper {lvalue})
constraintsRef((object)arg1) → object :
C++ signature :
GIMLI::SparseMapMatrix<double, unsigned long> {lvalue} constraintsRef(GIMLI::ModellingBase {lvalue})

constraintsRef( (object)arg1) -> object :

C++ signature :
GIMLI::SparseMapMatrix<double, unsigned long> {lvalue} constraintsRef(GIMLI::ModellingBase {lvalue})
createConstraints((object)arg1) → object :
C++ signature :
void* createConstraints(GIMLI::ModellingBase {lvalue})

createConstraints( (object)arg1) -> object :

C++ signature :
void* createConstraints(ModellingBase_wrapper {lvalue})
createDefaultStartModel((object)arg1) → object :
C++ signature :
GIMLI::Vector<double> createDefaultStartModel(GIMLI::ModellingBase {lvalue})

createDefaultStartModel( (object)arg1) -> object :

C++ signature :
GIMLI::Vector<double> createDefaultStartModel(ModellingBase_wrapper {lvalue})
createJacobian((object)arg1, (object)model) → object :
C++ signature :
void* createJacobian(GIMLI::ModellingBase {lvalue},GIMLI::Vector<double>)

createJacobian( (object)arg1, (object)model) -> object :

C++ signature :
void* createJacobian(ModellingBase_wrapper {lvalue},GIMLI::Vector<double>)

createJacobian( (object)arg1, (object)model, (object)resp) -> object :

C++ signature :
void* createJacobian(GIMLI::ModellingBase {lvalue},GIMLI::Vector<double>,GIMLI::Vector<double>)

createJacobian( (object)arg1, (object)model, (object)resp) -> object :

C++ signature :
void* createJacobian(ModellingBase_wrapper {lvalue},GIMLI::Vector<double>,GIMLI::Vector<double>)
createJacobian_mt(model, resp)
createMappedModel((object)arg1, (object)model[, (object)background=-1]) → object :

Read only extrapolation of model values given per cell marker to values given per cell. Exterior values will be set to background or prolongated for background = -1.

C++ signature :
GIMLI::Vector<double> createMappedModel(GIMLI::ModellingBase {lvalue},GIMLI::Vector<double> [,double=-1])
createRefinedForwardMesh((object)arg1[, (object)refine=True[, (object)pRefine=False]]) → object :
C++ signature :
void* createRefinedForwardMesh(GIMLI::ModellingBase {lvalue} [,bool=True [,bool=False]])
createStartModel((object)arg1) → object :
C++ signature :
GIMLI::Vector<double> createStartModel(GIMLI::ModellingBase {lvalue})
createStartVector((object)arg1) → object :

DEPRECATED use createStartModel

C++ signature :
GIMLI::Vector<double> createStartVector(GIMLI::ModellingBase {lvalue})
data((object)arg1) → object :

Return the associated data container.

C++ signature :
GIMLI::DataContainer {lvalue} data(GIMLI::ModellingBase {lvalue})
deleteMesh((object)arg1) → object :

Delete the actual mesh.

C++ signature :
void* deleteMesh(GIMLI::ModellingBase {lvalue})
initConstraints((object)arg1) → object :
C++ signature :
void* initConstraints(GIMLI::ModellingBase {lvalue})

initConstraints( (object)arg1) -> object :

C++ signature :
void* initConstraints(ModellingBase_wrapper {lvalue})
initJacobian((object)arg1) → object :
C++ signature :
void* initJacobian(GIMLI::ModellingBase {lvalue})

initJacobian( (object)arg1) -> object :

C++ signature :
void* initJacobian(ModellingBase_wrapper {lvalue})
initRegionManager((object)arg1) → object :
C++ signature :
void* initRegionManager(GIMLI::ModellingBase {lvalue})
jacobian((object)arg1) → object :

Return the pointer to the Jacobian matrix associated with this forward operator.

C++ signature :
GIMLI::MatrixBase* jacobian(GIMLI::ModellingBase {lvalue})
jacobian( (object)arg1) -> object :

Return the pointer to the Jacobian matrix associated with this forward operator.

C++ signature :
GIMLI::MatrixBase* jacobian(GIMLI::ModellingBase {lvalue})
jacobianRef((object)arg1) → object :
C++ signature :
GIMLI::Matrix<double> {lvalue} jacobianRef(GIMLI::ModellingBase {lvalue})

jacobianRef( (object)arg1) -> object :

C++ signature :
GIMLI::Matrix<double> {lvalue} jacobianRef(GIMLI::ModellingBase {lvalue})
mapModel((object)arg1, (object)model[, (object)background=0]) → object :
C++ signature :
void* mapModel(GIMLI::ModellingBase {lvalue},GIMLI::Vector<double> [,double=0])
mesh((object)arg1) → object :
C++ signature :
GIMLI::Mesh* mesh(GIMLI::ModellingBase {lvalue})
multiThreadJacobian((object)arg1) → object :

Return number of threads used for Jacobian generation.

C++ signature :
unsigned long multiThreadJacobian(GIMLI::ModellingBase {lvalue})
region((object)arg1, (object)marker) → object :

Syntactic sugar for this->regionManager().region(marker).

C++ signature :
GIMLI::Region* region(GIMLI::ModellingBase {lvalue},int)
regionManager((object)arg1) → object :
C++ signature :
GIMLI::RegionManager regionManager(GIMLI::ModellingBase {lvalue})

regionManager( (object)arg1) -> object :

C++ signature :
GIMLI::RegionManager {lvalue} regionManager(GIMLI::ModellingBase {lvalue})
regionManagerRef((object)arg1) → object :
C++ signature :
GIMLI::RegionManager {lvalue} regionManagerRef(GIMLI::ModellingBase {lvalue})
response(model)[source]

Return forward response f(m).

response_mt((object)arg1, (object)model[, (object)i=0]) → object :
C++ signature :
GIMLI::Vector<double> response_mt(GIMLI::ModellingBase {lvalue},GIMLI::Vector<double> [,unsigned long=0])

response_mt( (object)arg1, (object)model [, (object)i=0]) -> object :

C++ signature :
GIMLI::Vector<double> response_mt(ModellingBase_wrapper {lvalue},GIMLI::Vector<double> [,unsigned long=0])
responses(models, respos)
setConstraints((object)arg1, (object)C) → object :
C++ signature :
void* setConstraints(GIMLI::ModellingBase {lvalue},GIMLI::MatrixBase*)

setConstraints( (object)arg1, (object)C) -> object :

C++ signature :
void* setConstraints(ModellingBase_wrapper {lvalue},GIMLI::MatrixBase*)
setData((object)arg1, (object)data) → object :

Change the associated data container

C++ signature :
void* setData(GIMLI::ModellingBase {lvalue},GIMLI::DataContainer {lvalue})
setJacobian((object)arg1, (object)J) → object :
C++ signature :
void* setJacobian(GIMLI::ModellingBase {lvalue},GIMLI::MatrixBase*)

setJacobian( (object)arg1, (object)J) -> object :

C++ signature :
void* setJacobian(ModellingBase_wrapper {lvalue},GIMLI::MatrixBase*)
setMesh((object)arg1, (object)mesh [, (object)ignoreRegionManager=False]) -> object : Set new mesh to the forward operator, optionally hold region parameter for the new mesh (i.e. for roll a long)

Set new mesh to the forward operator, optionally hold region parameter for the new mesh (i.e. for roll a long)

C++ signature :
void* setMesh(GIMLI::ModellingBase {lvalue},GIMLI::Mesh [,bool=False])
setMultiThreadJacobian((object)arg1, (object)nThreads) → object :

Set number of threads used for brute force Jacobian generation. 1 is default. If nThreads is greater than 1 you need to implement response_mt with a read only response function. Maybe its worth set the single setThreadCount to 1 than, that you dont find yourself in a threading overkill.

C++ signature :
void* setMultiThreadJacobian(GIMLI::ModellingBase {lvalue},unsigned long)
setRegionManager((object)arg1, (object)reg) → object :
C++ signature :
void* setRegionManager(GIMLI::ModellingBase {lvalue},GIMLI::RegionManager*)
setStartModel((object)arg1, (object)startModel) → object :
C++ signature :
void* setStartModel(GIMLI::ModellingBase {lvalue},GIMLI::Vector<double>)

setStartModel( (object)arg1, (object)startModel) -> object :

C++ signature :
void* setStartModel(ModellingBase_wrapper {lvalue},GIMLI::Vector<double>)
setThreadCount((object)arg1, (object)nThreads) → object :

Set the maximum number of allowed threads for MT calculation. Have to be greater than 0. Will also set ENV(OPENBLAS_NUM_THREADS) .. if used.

C++ signature :
void* setThreadCount(GIMLI::ModellingBase {lvalue},unsigned long)
setVerbose((object)arg1, (object)verbose) → object :

Set verbose state.

C++ signature :
void* setVerbose(GIMLI::ModellingBase {lvalue},bool)
solution((object)arg1) → object :
C++ signature :
GIMLI::Matrix<double> solution(GIMLI::ModellingBase {lvalue})
startModel((object)arg1) → object :
C++ signature :
GIMLI::Vector<double> startModel(GIMLI::ModellingBase {lvalue})

startModel( (object)arg1) -> object :

C++ signature :
GIMLI::Vector<double> startModel(ModellingBase_wrapper {lvalue})
thkVel(model)[source]

Return thickness and velocity vectors from model.

threadCount((object)arg1) → object :

Return the maximum number of allowed threads for MT calculation

C++ signature :
unsigned long threadCount(GIMLI::ModellingBase {lvalue})
verbose((object)arg1) → object :

Get verbose state.

C++ signature :
bool verbose(GIMLI::ModellingBase {lvalue})

verbose( (object)arg1) -> object :

C++ signature :
bool verbose(GIMLI::ModellingBase {lvalue})

Tomography

class pygimli.physics.traveltime.Tomography(data=None, tcorr=0, name='new', **kwargs)[source]

Traveltime tomography for tomographic (e.g. crosshole) measurements

Methods

apparentData() Convert data into apparent data.
checkData() Check data
createApparentData(data) Create apparent slowness for given data.
createArgParser([dataSuffix]) Create default argument parser.
createData(sensors, scheme) Create an empty data set.
createFOP([verbose, usefmm, fatray]) Create default forward operator for Traveltime modelling.
createFOP_([verbose]) Create forward operator working on refined mesh.
createInv(fop[, verbose, doSave]) Create default inversion instance for Traveltime inversion.
createInv_(fop[, verbose, dosave]) Create inversion instance, data- and model transformations.
createMesh([quality, maxarea, addpoints]) Create (inversion) mesh by circumventing PLC
createStartModel() create (gradient) starting model with vtop/vbottom bounds
dataToken() Token name for the data in a DataContainer.
dataVals(data) Return pure data values from a given DataContainer.
drawApparentVelocities(ax, data[, t]) Plot data in for of apparent velocity image.
drawTravelTimeData(ax, data[, t]) Plot travel time data as lines and points.
estimateError([data, absoluteError, …]) Estimate error composed of an absolute and a relative part
getDepth() return a (a-priori guessed) depth of investigation
getMidpoint([data]) Return vector of offsets (in m) between shot and receiver.
getModel() Return velocity vector.
getOffset([data, full]) Return vector of offsets (in m) between shot and receiver.
getVA([t]) return apparent velocity
invert([data, t, err, mesh]) Run actual inversion.
loadData(filename) Load data from file.
makeJacobianPDF([ind]) Make multipage Jacobian PDF.
model() Return the actual model.
offset() return shot-geophone distance
paraDomain() Return parameter domain mesh.
rayCoverage() return ray coverage
relErrorVals(data) Return pure data values from a given DataContainer.
saveFigures([name, ext]) save all existing figures to files
saveResult([folder, size]) Save the results in the specified folder.
setData(data) Set data container (holding s and g indices and t floats).
setDataContainer(data) Set data container from outside.
setDataToken(token) Set the token name to identity the data in a DataContainer.
setMesh(mesh[, refine, secNodes]) Set mesh.
setVerbose(verbose) Make the class verbose (put output to the console)
show(data[, values, axes, cMin, cMax, colorBar]) Forward the visualization.
showCoverage([ax, name]) shows the ray coverage in logscale
showData([data, response, ax, name]) Show data as travel time curves (optionally with response)
showMesh([ax, name]) show mesh in given ax or in a new figure
showModel([ax, vals]) WRITEME
showRayPaths([model, ax]) Show ray paths for model or last model for which the Jacobian was calculated.
showResult([val, ax, cMin, cMax, logScale, …]) Show resulting velocity vector.
showResultAndFit([name]) show two vertical subplots with result and data (with response)
showVA([t, ax, usepos, name, squeeze]) show apparent velocity as image plot
showVAold([vals, ax, usepos, name]) show apparent velocity as image plot (old style)
simulate(mesh, slowness, scheme[, verbose]) Simulate a traveltime measurement.
standardizedCoverage() return standardized coverage vector (0|1) using neighbor info
useFMM([fmm]) Define whether to use Fast Marching Method (FMM).
useFatray([fatray, frequency]) Define whether to use Fatray jacobian computation.
__init__(data=None, tcorr=0, name='new', **kwargs)[source]

Init function with optional data load

Parameters:
data : pg.DataContainer or string
tcorr : float [0]

correct travel times by common shift

name : str [data if being string, otherwise ‘new’]

basename for saving Figures, results etc.

ndig : int [2]

number of digits to round positions (e.g. 2=cm), alternatively:

roundto : float [0]

unit spacing to round positions on

apparentData()

Convert data into apparent data.

checkData()

Check data

w.r.t. shot/geophone identity and zero/negative traveltimes, plus check y/z sensor positions

createApparentData(data)

Create apparent slowness for given data.

static createArgParser(dataSuffix='dat')

Create default argument parser.

Create default argument parser for the following options:

-Q, –quiet

-R, –robustData: options.robustData

-B, –blockyModel: options.blockyModel

-l, –lambda: options.lam

-i, –maxIter: options.maxIter

—depth: options.depth

createData(sensors, scheme)

Create an empty data set.

static createFOP(verbose=False, usefmm=False, fatray=False)

Create default forward operator for Traveltime modelling.

usefmm forces Fast Marching Method, otherwise Dijkstra is used.

createFOP_(verbose=False)

Create forward operator working on refined mesh.

createInv(fop, verbose=True, doSave=False)

Create default inversion instance for Traveltime inversion.

createInv_(fop, verbose=True, dosave=False)

Create inversion instance, data- and model transformations.

createMesh(quality=34.6, maxarea=0.1, addpoints=None)[source]

Create (inversion) mesh by circumventing PLC

createStartModel()[source]

create (gradient) starting model with vtop/vbottom bounds

dataToken()

Token name for the data in a DataContainer.

dataVals(data)

Return pure data values from a given DataContainer.

static drawApparentVelocities(ax, data, t=None, **kwargs)

Plot data in for of apparent velocity image.

static drawTravelTimeData(ax, data, t=None)

Plot travel time data as lines and points.

static estimateError(data=None, absoluteError=0.001, relativeError=0.001)

Estimate error composed of an absolute and a relative part

Parameters:
absoluteError : float

absolute error of traveltimes (usually in s)

relativeError : float

relative error of traveltimes in 1 (e.g. 0.01 is 1%)

Returns:
err : array
getDepth()

return a (a-priori guessed) depth of investigation

getMidpoint(data=None)

Return vector of offsets (in m) between shot and receiver.

getModel()

Return velocity vector.

getOffset(data=None, full=False)

Return vector of offsets (in m) between shot and receiver.

getVA(t=None)[source]

return apparent velocity

invert(data=None, t=None, err=None, mesh=None, **kwargs)

Run actual inversion.

Values for result/response are stored in the class members velocity/response

Parameters:
useGradient : bool

Create gradient for starting model from vtop to vbottom.

vtop, vbottom : float

starting (gradient) model velocities on top/at bottom of the mesh

lam : float

regularization parameter describing the strength of smoothness

zWeight : float

relative weight for purely vertical boundaries

maxIter : int

Maximum number of iterations

startModel : array

Slowness starting model for the inversion

loadData(filename)

Load data from file.

makeJacobianPDF(ind=None)

Make multipage Jacobian PDF.

model()

Return the actual model.

offset()[source]

return shot-geophone distance

paraDomain()

Return parameter domain mesh.

rayCoverage()

return ray coverage

relErrorVals(data)

Return pure data values from a given DataContainer.

saveFigures(name=None, ext='pdf')

save all existing figures to files

saveResult(folder=None, size=(16, 10), **kwargs)

Save the results in the specified folder.

Saved items are:
Inverted profile Velocity vector Coverage vector Standardized coverage vector Mesh (bms and vtk with results)
setData(data)

Set data container (holding s and g indices and t floats).

setDataContainer(data)

Set data container from outside.

setDataToken(token)

Set the token name to identity the data in a DataContainer.

setMesh(mesh, refine=False, secNodes=1)

Set mesh. To be removed from class once derived from MeshManager.

Parameters:
secNodes : int (1)

Number of secondary nodes to improve accuracy of the forward solution.

setVerbose(verbose)

Make the class verbose (put output to the console)

show(data, values=None, axes=None, cMin=None, cMax=None, colorBar=1, **kwargs)

Forward the visualization.

showCoverage(ax=None, name='coverage', **kwargs)

shows the ray coverage in logscale

showData(data=None, response=None, ax=None, name='data')

Show data as travel time curves (optionally with response)

Parameters:
data : pyGIMLi data Container [self.dataContainer]

data to show with points

response : array

response vector to draw with lines

ax : maxplotlib axes

axis to plot into, if not given, a new figure is created

showMesh(ax=None, name='mesh')

show mesh in given ax or in a new figure

showModel(ax=None, vals=None, **kwargs)

WRITEME

showRayPaths(model=None, ax=None, **kwargs)

Show ray paths for model or last model for which the Jacobian was calculated.

Parameters:
model : array

Velocity model for which to calculate and visualize ray paths (the default is model for last Jacobian calculation in self.velocity).

ax : matplotlib.axes

Axes for the plot (the default is None).

**kwargs : type

Additional arguments passed to LineCollection (alpha, linewidths, color, linestyles).

Returns:
ax : matplotlib.axes object
cb : matplotlib.colorbar object (only if model is provided)

Examples

>>> # No reason to import matplotlib
>>> import pygimli as pg
>>> from pygimli.physics import Refraction
>>> from pygimli.physics.traveltime import createRAData
>>>
>>> x, y = 8, 6
>>> mesh = pg.createGrid(x, y)
>>> data = createRAData([(0,0)] + [(x, i) for i in range(y)], shotdistance=y+1)
>>> data.set("t", pg.RVector(data.size(), 1.0))
>>> rst = Refraction()
>>> rst.setDataContainer(data)
Data: Sensors: 7 data: 6
>>> rst.setMesh(mesh, 5)
>>> ax, cb = rst.showRayPaths()

(png, pdf)

../../_images/pygimli-physics-traveltime-2.png
showResult(val=None, ax=None, cMin=None, cMax=None, logScale=False, rays=False, name='result', **kwargs)

Show resulting velocity vector.

Parameters:
val : result array [self.velocity]

field to show, usually the velocity vector

ax : matplotlib.axes

axes to plot into, if not give a new one-axis figure is created

cMin/cMax : float

minimum and maximum values for ranging colorbar

logScale : bool [False]

use logarithmic scale

rays : bool [False]

Show ray paths as well.

Returns:
ax : maxplotlib axes
cb : matplotlib color bar object
Other Parameters:
 
useCoverage : bool [True]

use standardized (0 or 1) ray coverage as alpha-shading

label : str

label to write on colorbar

orientaton : str

color bar orientation

nLevs : int [7]

number of level values for color bar

**kwargs : keyword arguments passed to the show function
showResultAndFit(name='resultfit', **kwargs)

show two vertical subplots with result and data (with response)

showVA(t=None, ax=None, usepos=True, name='va', squeeze=True)[source]

show apparent velocity as image plot

showVAold(vals=None, ax=None, usepos=True, name='va')[source]

show apparent velocity as image plot (old style)

static simulate(mesh, slowness, scheme, verbose=False, **kwargs)

Simulate a traveltime measurement.

Perform the forward task for a given mesh, a slowness distribution (per cell) and return data (traveltime) for a measurement scheme. This is a static method since it does not interfere with the managers inversion approaches.

Parameters:
mesh : GIMLI::Mesh

Mesh to calculate for.

slowness : array(mesh.cellCount()) | array(N, mesh.cellCount())

slowness distribution for the given mesh cells can be:

  • a single array of len mesh.cellCount()
  • a matrix of N slowness distributions of len mesh.cellCount()
  • a res map as [[marker0, res0], [marker1, res1], …]
scheme : GIMLI::DataContainer

data measurement scheme

verbose : boolean

Be verbose.

Returns:
t : array(N, data.size()) | DataContainer

The resulting simulated travel time values. Either one column array or matrix in case of slowness matrix. A DataContainer is return if noisify set to True.

Other Parameters:
 
noisify : boolean

add normal distributed noise based on scheme(‘err’)

standardizedCoverage()

return standardized coverage vector (0|1) using neighbor info

useFMM(fmm=True)

Define whether to use Fast Marching Method (FMM).

Note that this method is more accurate but currently a lot slower!

useFatray(fatray=True, frequency=300.0)

Define whether to use Fatray jacobian computation.



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