mtpy

Installation
SKILL.md

MTpy-v2: Transfer-Function Analysis

Install the mtpy-v2 distribution, which imports as mtpy. The older mtpy distribution has a different API; do not install both in one environment. The operations below were executed with MTpy-v2 2.1.4 and mt-metadata 1.0.10.

Read and establish conventions

from mtpy import MT

station = MT("station.edi")
station.read(get_elevation=False)  # constructor alone does not load the file
frequency_hz = station.frequency
z = station.Z.z                   # complex tensor, shape (frequency, 2, 2)
sigma_z = station.Z.z_error       # standard deviation, not EDI variance
rho = station.Z.resistivity       # ohm m
phase = station.Z.phase           # degrees, signed component phases
Installs
60
GitHub Stars
76
First Seen
Mar 8, 2026