pygimli.physics.SIP

Spectral induced polarization (SIP) measurements and fittings.

Overview

Functions

ColeColeRho(f, rho, m, tau, c[, a])

Frequency-domain Cole-Cole impedance model after Pelton et al.

ColeColeSigma(f, sigma, m, tau, c[, a])

Complex-valued conductivity Cole-Cole model

drawAmplitudeSpectrum(ax, freq, amp[, …])

Show amplitude spectrum (resistivity as a function of f).

drawPhaseSpectrum(ax, freq, phi[, ylabel, …])

Show phase spectrum (-phi as a function of f).

showSpectrum(freq, amp, phi[, nrows, ylog, axs])

Show amplitude and phase spectra in two subplots.

tauRhoToTauSigma(tRho, m, c)

Convert \(\tau_{\rho}\) to \(\tau_{\sigma}\) for Cole-Cole-Model.

Classes

ColeColePhi(f[, verbose])

Cole-Cole model with EM term after Pelton et al.

DoubleColeColePhi(f[, verbose])

Double Cole-Cole model with EM term after Pelton et al.

SIPSpectrum([filename, unify, onlydown, f, …])

SIP spectrum data analysis.

Functions

ColeColeRho

pygimli.physics.SIP.ColeColeRho(f, rho, m, tau, c, a=1)[source]

Frequency-domain Cole-Cole impedance model after Pelton et al. (1978)

Frequency-domain Cole-Cole impedance model after Pelton et al. (1978) [PWH+78]

\[\begin{split}Z(\omega) & = \rho_0\left[1 - m \left(1 - \frac{1}{1+(\text{i}\omega\tau)^c}\right)\right] \\ \quad \text{with}\quad m & = \frac{1}{1+\frac{\rho_0}{\rho_1}} \quad \text{and}\quad \omega =2\pi f\end{split}\]
  • \(Z(\omega)\) - Complex impedance per 1A current injection

  • \(f\) - Frequency

  • \(\rho_0\) – Background resistivity states the unblocked pore path

  • \(\rho_1\) – Resistance of the solution in the blocked pore passages

  • \(m\) – Chargeability after Seigel (1959) [Sei59] as being the ratio of voltage immediately after, to the voltage immediately before cessation of an infinitely long charging current.

  • \(\tau\) – ‘Time constant’ relaxation time [s] for 1/e decay

  • \(c\) - Rate of charge accumulation. Cole-Cole exponent typically [0.1 .. 0.6]

Examples

>>> # no need to import matplotlib. pygimli's show does
>>> import numpy as np
>>> import pygimli as pg
>>> from pygimli.physics.SIP import ColeColeRho
>>> f = np.logspace(-2, 5, 100)
>>> m = np.linspace(0.1, 0.9, 5)
>>> tau = 0.01
>>> fImMin = 1/(tau*2*np.pi)
>>> fig, axs = pg.plt.subplots(1, 2)
>>> ax1 = axs[0]
>>> ax2 = axs[0].twinx()
>>> ax3 = axs[1]
>>> ax4 = axs[1].twinx()
>>> for i in range(len(m)):
...     Z = ColeColeRho(f, rho=1, m=m[i], tau=tau, c=0.5)
...     _= ax1.loglog(f, np.abs(Z), color='black')
...     _= ax2.loglog(f, -np.angle(Z)*1000, color='b')
...     _= ax3.loglog(f, Z.real, color='g')
...     _= ax4.semilogx(f, Z.imag, color='r')
...     _= ax4.plot([fImMin, fImMin], [-0.2, 0.], color='r')
>>> _= ax4.text(fImMin, -0.1, r"$f($min($Z''$))=$\frac{1}{2*\pi\tau}$", color='r')
>>> _= ax4.text(0.1, -0.17, r"$f($min[$Z''$])=$\frac{1}{2\pi\tau}$", color='r')
>>> _= ax1.set_ylabel('Amplitude $|Z(f)|$', color='black')
>>> _= ax1.set_xlabel('Frequency $f$ [Hz]')
>>> _= ax1.set_ylim(1e-2, 1)
>>> _= ax2.set_ylabel(r'- Phase $\varphi$ [mrad]', color='b')
>>> _= ax2.set_ylim(1, 1e3)
>>> _= ax3.set_ylabel('re $Z(f)$', color='g')
>>> _= ax4.set_ylabel('im $Z(f)$', color='r')
>>> _= ax3.set_xlabel('Frequency $f$ [Hz]')
>>> _= ax3.set_ylim(1e-2, 1)
>>> _= ax4.set_ylim(-0.2, 0)
>>> pg.plt.show()

()

../../_images/pygimli-physics-SIP-1.png

Examples using pygimli.physics.SIP.ColeColeRho

ColeColeSigma

pygimli.physics.SIP.ColeColeSigma(f, sigma, m, tau, c, a=1)[source]

Complex-valued conductivity Cole-Cole model

drawAmplitudeSpectrum

pygimli.physics.SIP.drawAmplitudeSpectrum(ax, freq, amp, ylabel='$\\rho$ ($\\Omega$m)', grid=True, marker='+', ylog=True, **kwargs)[source]

Show amplitude spectrum (resistivity as a function of f).

drawPhaseSpectrum

pygimli.physics.SIP.drawPhaseSpectrum(ax, freq, phi, ylabel='$-\\phi$ (mrad)', grid=True, marker='+', ylog=False, **kwargs)[source]

Show phase spectrum (-phi as a function of f).

showSpectrum

pygimli.physics.SIP.showSpectrum(freq, amp, phi, nrows=2, ylog=None, axs=None, **kwargs)[source]

Show amplitude and phase spectra in two subplots.

tauRhoToTauSigma

pygimli.physics.SIP.tauRhoToTauSigma(tRho, m, c)[source]

Convert \(\tau_{\rho}\) to \(\tau_{\sigma}\) for Cole-Cole-Model.

\[\tau_{\sigma} = \tau_{\rho}/(1-m)^{\frac{1}{c}}\]

Examples

>>> import numpy as np
>>> import pygimli as pg
>>> from pygimli.physics.SIP import *
>>> tr = 1.
>>> Z = ColeColeRho(1e5, rho=10.0, m=0.5, tau=tr, c=0.5)
>>> ts = tauRhoToTauSigma(tr, m=0.5, c=0.5)
>>> S = ColeColeSigma(1e5, sigma=0.1, m=0.5, tau=ts, c=0.5)
>>> abs(1.0/S - Z) < 1e-12
True
>>> np.angle(1.0/S / Z) < 1e-12
True

Classes

ColeColePhi

class pygimli.physics.SIP.ColeColePhi(f, verbose=False)[source]

Cole-Cole model with EM term after Pelton et al. (1978)

Modelling operator for the Frequency Domain Cole-Cole impedance model using pygimli.physics.SIP.ColeColeRho after Pelton et al. (1978) [PWH+78]

  • \(\textbf{m} =\{ m, \tau, c\}\)

    Modelling parameter for the Cole-Cole model with \(\rho_0 = 1\)

  • \(\textbf{d} =\{\varphi_i(f_i)\}\)

    Modelling eesponse for all given frequencies as negative phase angles \(\varphi(f) = -tan^{-1}\frac{\text{Im}\,Z(f)}{\text{Re}\,Z(f)}\) and \(Z(f, \rho_0=1, m, \tau, c) =\) Cole-Cole impedance.

Methods

__call__(arg1, model)

C++ signature :

clearConstraints(arg1)

C++ signature :

clearJacobian(arg1)

C++ signature :

constraints(arg1)

C++ signature :

constraintsRef(arg1)

C++ signature :

createConstraints(arg1)

C++ signature :

createDefaultStartModel(arg1)

C++ signature :

createJacobian(arg1, model)

C++ signature :

createJacobian_mt(model, resp)

createMappedModel(arg1, model [[, background])

Read only extrapolation of model values given per cell marker to values given per cell.

createRefinedForwardMesh(arg1 [[, refine, …])

C++ signature :

createStartModel(arg1)

C++ signature :

createStartVector(arg1)

DEPRECATED use createStartModel

data(arg1)

Return the associated data container.

deleteMesh(arg1)

Delete the actual mesh.

initConstraints(arg1)

C++ signature :

initJacobian(arg1)

C++ signature :

initRegionManager(arg1)

C++ signature :

jacobian(arg1)

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

jacobianRef(arg1)

C++ signature :

mapModel(arg1, model [[, background])

C++ signature :

mesh(arg1)

C++ signature :

multiThreadJacobian(arg1)

Return number of threads used for Jacobian generation.

region(arg1, marker)

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

regionManager(arg1)

C++ signature :

regionManagerRef(arg1)

C++ signature :

response(par)

Phase angle of the model.

response_mt(arg1, model [[, i])

C++ signature :

responses(models, respos)

setConstraints(arg1, C)

C++ signature :

setData(arg1, data)

Change the associated data container

setJacobian(arg1, J)

C++ signature :

setMesh(arg1, mesh [[, ignoreRegionManager])

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

setMultiThreadJacobian(arg1, nThreads)

Set number of threads used for brute force Jacobian generation.

setRegionManager(arg1, reg)

C++ signature :

setStartModel(arg1, startModel)

C++ signature :

setThreadCount(arg1, nThreads)

Set the maximum number of allowed threads for MT calculation.

setVerbose(arg1, verbose)

Set verbose state.

solution(arg1)

C++ signature :

startModel(arg1)

C++ signature :

threadCount(arg1)

Return the maximum number of allowed threads for MT calculation

verbose(arg1)

Get verbose state.

__init__(f, verbose=False)[source]

Setup class by specifying the frequency.

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(par)[source]

Phase angle of the model.

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})

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})

DoubleColeColePhi

class pygimli.physics.SIP.DoubleColeColePhi(f, verbose=False)[source]

Double Cole-Cole model with EM term after Pelton et al. (1978)

Modelling operator for the Frequency Domain Cole-Cole impedance model using pygimli.physics.SIP.ColeColeRho after Pelton et al. (1978) [PWH+78]

  • \(\textbf{m} =\{ m_1, \tau_1, c_1, m_2, \tau_2, c_2\}\)

    Modelling parameter for the Cole-Cole model with \(\rho_0 = 1\)

  • \(\textbf{d} =\{\varphi_i(f_i)\}\)

    Modelling Response for all given frequencies as negative phase angles \(\varphi(f) = \varphi_1(Z_1(f))+\varphi_2(Z_2(f)) = -tan^{-1}\frac{\text{Im}\,(Z_1Z_2)}{\text{Re}\,(Z_1Z_2)}\) and \(Z_1(f, \rho_0=1, m_1, \tau_1, c_1)\) and \(Z_2(f, \rho_0=1, m_2, \tau_2, c_2)\) ColeCole impedances.

Methods

__call__(arg1, model)

C++ signature :

clearConstraints(arg1)

C++ signature :

clearJacobian(arg1)

C++ signature :

constraints(arg1)

C++ signature :

constraintsRef(arg1)

C++ signature :

createConstraints(arg1)

C++ signature :

createDefaultStartModel(arg1)

C++ signature :

createJacobian(arg1, model)

C++ signature :

createJacobian_mt(model, resp)

createMappedModel(arg1, model [[, background])

Read only extrapolation of model values given per cell marker to values given per cell.

createRefinedForwardMesh(arg1 [[, refine, …])

C++ signature :

createStartModel(arg1)

C++ signature :

createStartVector(arg1)

DEPRECATED use createStartModel

data(arg1)

Return the associated data container.

deleteMesh(arg1)

Delete the actual mesh.

initConstraints(arg1)

C++ signature :

initJacobian(arg1)

C++ signature :

initRegionManager(arg1)

C++ signature :

jacobian(arg1)

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

jacobianRef(arg1)

C++ signature :

mapModel(arg1, model [[, background])

C++ signature :

mesh(arg1)

C++ signature :

multiThreadJacobian(arg1)

Return number of threads used for Jacobian generation.

region(arg1, marker)

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

regionManager(arg1)

C++ signature :

regionManagerRef(arg1)

C++ signature :

response(par)

phase angle of the model

response_mt(arg1, model [[, i])

C++ signature :

responses(models, respos)

setConstraints(arg1, C)

C++ signature :

setData(arg1, data)

Change the associated data container

setJacobian(arg1, J)

C++ signature :

setMesh(arg1, mesh [[, ignoreRegionManager])

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

setMultiThreadJacobian(arg1, nThreads)

Set number of threads used for brute force Jacobian generation.

setRegionManager(arg1, reg)

C++ signature :

setStartModel(arg1, startModel)

C++ signature :

setThreadCount(arg1, nThreads)

Set the maximum number of allowed threads for MT calculation.

setVerbose(arg1, verbose)

Set verbose state.

solution(arg1)

C++ signature :

startModel(arg1)

C++ signature :

threadCount(arg1)

Return the maximum number of allowed threads for MT calculation

verbose(arg1)

Get verbose state.

__init__(f, verbose=False)[source]

Setup class by specifying the frequency.

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(par)[source]

phase angle of the model

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})

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})

SIPSpectrum

class pygimli.physics.SIP.SIPSpectrum(filename=None, unify=False, onlydown=True, f=None, amp=None, phi=None, k=1, sort=True, basename='new')[source]

SIP spectrum data analysis.

Methods

checkCRKK([useEps, use0, ax])

Check coupling removal (CR) by Kramers-Kronig (KK) relation

cutF([fcut, down])

Cut (delete) frequencies above a certain value fcut.

determineEpsilon([mode, sigmaR, sigmaI])

Retrieve frequency-independent epsilon for f->Inf.

epsilonR()

Calculate relative permittivity from imaginary conductivity

fit2CCPhi([ePhi, lam, mpar, taupar1, …])

fit a Cole-Cole term to phase only

fitCCEM([ePhi, lam, remove, mpar, taupar, …])

Fit a Cole-Cole term with additional EM term to phase

fitCCPhi([ePhi, lam, mpar, taupar, cpar])

fit a Cole-Cole term to phase only

fitColeCole([useCond])

Fit a Cole-Cole model to the phase data

fitDebyeModel([ePhi, lam, lamFactor, mint, …])

Fit a (smooth) continuous Debye model (Debye decomposition).

getKK([use0])

Compute Kramers-Kronig impedance values (re->im and im->re).

getPhiKK([use0])

Compute phase from Kramers-Kronig quantities.

loadData(filename, **kwargs)

Import spectral data.

logMeanTau()

Mean logarithmic relaxation time (50% cumulative log curve).

omega()

Angular frequency.

realimag([cond])

Real and imaginary part of resistivity/conductivity (cond=True).

removeEpsilonEffect([er, mode])

remove effect of (constant high-frequency) epsilon from sigma

saveFigures([name, ext])

Save all existing figures to files using file basename.

showAll([save])

Plot spectrum, Cole-Cole fit and Debye distribution

showData([reim, znorm, cond, nrows, ax])

Show amplitude and phase spectrum in two subplots

showDataKK([use0])

Show data as real/imag subplots along with Kramers-Kronig curves

showPhase([ax])

Plot phase spectrum (-phi over frequency).

showPolarPlot([cond])

Show data in a polar plot (imaginary vs.

sortData()

Sort data along increasing frequency (e.g.

totalChargeability()

Total chargeability (sum) from Debye curve.

unifyData([onlydown])

Unify data (only one value per frequency) by mean or selection.

zNorm()

Normalized real (difference) and imag.

__init__(filename=None, unify=False, onlydown=True, f=None, amp=None, phi=None, k=1, sort=True, basename='new')[source]

Init SIP class with either filename to read or data vectors.

Examples

>>> #sip = SIPSpectrum('sipexample.txt', unify=True) # unique f values
>>> #sip = SIPSpectrum(f=f, amp=R, phi=phase, basename='new')
checkCRKK(useEps=False, use0=False, ax=None)[source]

Check coupling removal (CR) by Kramers-Kronig (KK) relation

cutF(fcut=1e+99, down=False)[source]

Cut (delete) frequencies above a certain value fcut.

determineEpsilon(mode=0, sigmaR=None, sigmaI=None)[source]

Retrieve frequency-independent epsilon for f->Inf.

Parameters

mode : int

Operation mode:

=0 - extrapolate using two highest frequencies (default) <0 - take last -n frequencies >0 - take n-th frequency

sigmaR/sigmaI : float

real and imaginary conductivity (if not given take data)

Returns

——-

er : float

relative permittivity (epsilon) value (dimensionless)

epsilonR()[source]

Calculate relative permittivity from imaginary conductivity

fit2CCPhi(ePhi=0.001, lam=1000.0, mpar=(0, 0, 1), taupar1=(0, 1e-05, 1), taupar2=(0, 0.1, 1000), cpar=(0.5, 0, 1))[source]

fit a Cole-Cole term to phase only

Parameters

ePhi : float

absolute error of phase angle

lam : float

regularization parameter

mpar, taupar, cpar : list[3]

inversion parameters (starting value, lower bound, upper bound) for Cole-Cole parameters (m, tau, c) and EM relaxation time (em)

fitCCEM(ePhi=0.001, lam=1000.0, remove=True, mpar=(0.2, 0, 1), taupar=(0.01, 1e-05, 100), cpar=(0.25, 0, 1), empar=(1e-07, 1e-09, 1e-05))[source]

Fit a Cole-Cole term with additional EM term to phase

Parameters

ePhi : float

absolute error of phase angle

lam : float

regularization parameter

remove: bool

remove EM term from data

mpar, taupar, cpar, empar : list[3]

inversion parameters (starting value, lower bound, upper bound) for Cole-Cole parameters (m, tau, c) and EM relaxation time (em)

fitCCPhi(ePhi=0.001, lam=1000.0, mpar=(0, 0, 1), taupar=(0, 1e-05, 100), cpar=(0.3, 0, 1))[source]

fit a Cole-Cole term to phase only

Parameters

ePhi : float

absolute error of phase angle

lam : float

regularization parameter

mpar, taupar, cpar : list[3]

inversion parameters (starting value, lower bound, upper bound) for Cole-Cole parameters (m, tau, c) and EM relaxation time (em)

fitColeCole(useCond=False, **kwargs)[source]

Fit a Cole-Cole model to the phase data

Parameters

useCond : bool

use conductivity form of Cole-Cole model instead of resistivity

error : float [0.01]

absolute phase error

lam : float [1000]

initial regularization parameter

mpar : tuple/list (0, 0, 1)

inversion parameters for chargeability: start, lower, upper bound

taupar : tuple/list (1e-2, 1e-5, 100)

inversion parameters for time constant: start, lower, upper bound

cpar : tuple/list (0.25, 0, 1)

inversion parameters for Cole exponent: start, lower, upper bound

fitDebyeModel(ePhi=0.001, lam=1000.0, lamFactor=0.8, mint=None, maxt=None, nt=None, new=True, showFit=False, cType=1)[source]

Fit a (smooth) continuous Debye model (Debye decomposition).

Parameters

ePhi : float

absolute error of phase angle

lam : float

regularization parameter

lamFactor : float

regularization factor for subsequent iterations

mint/maxt : float

minimum/maximum tau values to use (else automatically from f)

nt : int

number of tau values (default number of frequencies * 2)

new : bool

new implementation (experimental)

showFit : bool

show fit

cType : int

constraint type (1/2=smoothness 1st/2nd order, 0=minimum norm)

getKK(use0=False)[source]

Compute Kramers-Kronig impedance values (re->im and im->re).

getPhiKK(use0=False)[source]

Compute phase from Kramers-Kronig quantities.

loadData(filename, **kwargs)[source]

Import spectral data.

Import Data and try to assume the file format.

logMeanTau()[source]

Mean logarithmic relaxation time (50% cumulative log curve).

omega()[source]

Angular frequency.

realimag(cond=False)[source]

Real and imaginary part of resistivity/conductivity (cond=True).

removeEpsilonEffect(er=None, mode=0)[source]

remove effect of (constant high-frequency) epsilon from sigma

Parameters

er : float

relative epsilon to correct for (else automatically determined)

mode : int

automatic epsilon determination mode (see determineEpsilon)

Returns

er : float

determined permittivity (see determineEpsilon)

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

Save all existing figures to files using file basename.

showAll(save=False)[source]

Plot spectrum, Cole-Cole fit and Debye distribution

showData(reim=False, znorm=False, cond=False, nrows=2, ax=None, **kwargs)[source]

Show amplitude and phase spectrum in two subplots

Parameters

reim : bool

show real/imaginary part instead of amplitude/phase

znorm : bool (true forces reim)

use normalized real/imag parts after Nordsiek&Weller (2008)

nrows - use nrows subplots (default=2)

Returns

fig, ax : mpl.figure, mpl.axes array

showDataKK(use0=False)[source]

Show data as real/imag subplots along with Kramers-Kronig curves

showPhase(ax=None, **kwargs)[source]

Plot phase spectrum (-phi over frequency).

showPolarPlot(cond=False)[source]

Show data in a polar plot (imaginary vs. real parts).

sortData()[source]

Sort data along increasing frequency (e.g. useful for KK).

totalChargeability()[source]

Total chargeability (sum) from Debye curve.

unifyData(onlydown=False)[source]

Unify data (only one value per frequency) by mean or selection.

zNorm()[source]

Normalized real (difference) and imag. z [NW08]



2019 - GIMLi Development Team
Created using Bootstrap, Sphinx and pyGIMLi 1.0.12+18.g099282e0 on Jan 27, 2020.