pycsamt.interp.lithology#

Lithology — resistivity-to-geology classification for EM methods.

The built-in RockDatabase covers the resistivity ranges encountered in MT, AMT, CSAMT, and CSEM surveys, drawing on:

  • Palacky (1988) — resistivity of geological formations

  • Slichter & Telkes (1942) — electrical properties of minerals

  • Updated ranges for fracture zones, aquifers, and economic targets

StratigraphicLog packages a per-station depth profile with lithology assignments and can be exported to CSV, LAS 2.0, or Oasis Montaj XYZ format via pycsamt.interp.export.

Example

>>> db = RockDatabase.default()
>>> db.classify(250.0)
RockEntry(name='Sandstone', rho_min=50, rho_max=5000, ...)
>>> log = StratigraphicLog.from_column(
...     "S17", x=1050.0,
...     z_centers=z, rho_log10=col, db=db
... )

Classes

Layer(top, bottom, rho_log10, lithology[, ...])

One geological unit in a pseudo-stratigraphic log.

RockDatabase(entries)

Extensible rock physics database for EM resistivity interpretation.

RockEntry(name, rho_min, rho_max[, color, ...])

A single entry in the rock physics database.

StratigraphicLog(station_name, station_x, ...)

Per-station pseudo-stratigraphic depth profile.

class pycsamt.interp.lithology.RockEntry(name, rho_min, rho_max, color='#AAAAAA', description='', code=0)[source]#

Bases: object

A single entry in the rock physics database.

Parameters:
  • name (str) – Geological unit / lithology name.

  • rho_min (float) – Resistivity range in Ω·m (linear scale).

  • rho_max (float) – Resistivity range in Ω·m (linear scale).

  • color (str) – Hex colour code for plotting (e.g. '#28B463').

  • description (str) – Optional free-text note.

  • code (int) – Integer code used in LAS exports.

name: str#
rho_min: float#
rho_max: float#
color: str = '#AAAAAA'#
description: str = ''#
code: int = 0#
property rho_mid: float[source]#
property log_rho_mid: float[source]#
contains(rho_ohm_m)[source]#
Parameters:

rho_ohm_m (float)

Return type:

bool

class pycsamt.interp.lithology.RockDatabase(entries)[source]#

Bases: object

Extensible rock physics database for EM resistivity interpretation.

Parameters:

entries (list of RockEntry) – The database entries. default() returns the built-in set.

Example

>>> db = RockDatabase.default()
>>> db.classify(180.0).name
'Fractured zone'
classmethod default()[source]#

Return a database pre-loaded with 25 built-in rock entries.

Return type:

RockDatabase

classmethod from_csv(path)[source]#

Load from a CSV file.

Required columns: name, rho_min, rho_max Optional columns: color, description, code

Parameters:

path (str | Path)

Return type:

RockDatabase

classify(rho_ohm_m, method='nearest')[source]#

Return the best-matching rock entry for rho_ohm_m.

Parameters:
  • rho_ohm_m (float) – Resistivity in Ω·m (linear).

  • method ({'nearest', 'overlap'}) – 'nearest': log-distance to midpoint. 'overlap': first entry whose range brackets rho_ohm_m.

Return type:

RockEntry

classify_column(rho_log10)[source]#

Classify every cell in a log10-rho depth column.

Parameters:

rho_log10 (ndarray)

Return type:

list[RockEntry]

class pycsamt.interp.lithology.Layer(top, bottom, rho_log10, lithology, color='#AAAAAA', confidence=1.0)[source]#

Bases: object

One geological unit in a pseudo-stratigraphic log.

Parameters:
  • top (float) – Depth in metres (positive downward).

  • bottom (float) – Depth in metres (positive downward).

  • rho_log10 (float) – Representative \(\log_{10}(\rho)\) of the layer.

  • lithology (str) – Rock name from RockDatabase.

  • color (str) – Hex colour for plotting.

  • confidence (float) – Fraction of depth cells whose DB classification matches the reported lithology (0 – 1).

top: float#
bottom: float#
rho_log10: float#
lithology: str#
color: str = '#AAAAAA'#
confidence: float = 1.0#
property thickness: float[source]#
property rho_ohm_m: float[source]#
class pycsamt.interp.lithology.StratigraphicLog(station_name, station_x, z_centers, rho_log10, layers)[source]#

Bases: object

Per-station pseudo-stratigraphic depth profile.

Constructed from a 1-D log10-rho column and a RockDatabase, it merges adjacent cells that share the same lithology into discrete Layer objects.

Parameters:
  • station_name (str)

  • station_x (float)

  • z_centers (ndarray (n_z,)) – Depth cell centres, metres.

  • rho_log10 (ndarray (n_z,)) – \(\log_{10}(\rho)\) for each depth cell.

  • layers (list of Layer) – Merged geological units (assembled by from_column()).

classmethod from_column(station_name, x, z_centers, rho_log10, db=None, *, merge_tolerance=0.2)[source]#

Build a log from a 1-D resistivity column.

Parameters:
  • station_name (str)

  • x (float) – Station position, metres.

  • z_centers (ndarray (n_z,))

  • rho_log10 (ndarray (n_z,))

  • db (RockDatabase, optional) – Defaults to RockDatabase.default().

  • merge_tolerance (float) – Log10-rho difference threshold for merging adjacent cells into one layer (default 0.2 decade).

Return type:

StratigraphicLog

to_dataframe()[source]#

Return layers as a pandas.DataFrame.

to_dict()[source]#
Return type:

dict