API reference#

The public API is what this page documents. Until release 1.0 it may change between minor releases; the changelog records every change.

show_versions()

Print the versions of ertkit, Python and the main dependencies.

ErrorModel(*[, relative, absolute])

Standard deviation of measurement errors on the transfer resistance.

ConvergenceWarning

An iterative method stopped before meeting its convergence criterion.

DataWarning

Data were removed, or the data cannot support a result as requested.

results.InversionResult(*, predicted, ...)

Common part of every inversion result.

Vertical electrical sounding#

LayeredModel(*, resistivity, thickness)

A horizontally layered earth.

Survey(*, ab2, mn2)

Readings of a symmetric collinear sounding.

Sounding(*, survey, rhoa[, error])

Apparent resistivities of a sounding with their error model.

read_csv(path[, error, encoding])

Read a sounding from a CSV file.

write_csv(sounding, path, *[, encoding])

Write a sounding to a CSV file readable by read_csv().

invert_few_layer(data, n_layers, *[, start, ...])

Fit a layered model with a few layers to a sounding.

LayerFit(*, predicted, residuals, chi2, ...)

Result of a few-layer inversion.

invert_smooth(data, *[, n_layers, ...])

Smooth (Occam) inversion with sensitivity and depth of investigation.

SmoothFit(*, predicted, residuals, chi2, ...)

Result of a smooth (Occam) inversion.

DOI_THRESHOLD

Convert a string or number to a floating point number, if possible.

forward(model, survey)

Apparent resistivities of a sounding over a layered earth.

potential(model, r[, current])

Surface potential at distance r from a point current source.

resistivity_transform(lam, resistivity, ...)

Resistivity transform \(\mathcal{T}_1(\lambda)\) of a layered earth.

hankel_j0(kernel, r)

Zeroth-order Hankel transform by digital linear filtering.

Electrode arrays#

geometric_factor(am, bm, an, bn)

Geometric factor of a four-electrode array on a half-space.

Plotting#

Needs matplotlib: pip install "ertkit[plot]".

sounding(data, *fits[, labels, ax])

Plot apparent resistivity against AB/2, with the data errors and fitted curves.

layered_model(*items[, labels, depth_max, ...])

Plot layered models as resistivity against depth.