| name | mtpy |
| description | Magnetotelluric data processing and modelling. Read EDI files, analyze MT
responses, perform inversions, and visualize resistivity models. Use when
Claude needs to: (1) Read/write EDI files, (2) Process MT impedance tensors,
(3) Analyze phase tensors and dimensionality, (4) Plot apparent resistivity
and phase curves, (5) Create pseudosections, (6) Perform strike analysis,
(7) Run 1D inversions, (8) Prepare data for 2D/3D modelling.
|
| version | 1.0.0 |
| author | Geoscience Skills |
| license | MIT |
| tags | ["Magnetotellurics","MT","EDI","Impedance Tensor","EM","Geophysics"] |
| dependencies | ["mtpy>=2.0.0","numpy","matplotlib"] |
| complements | ["simpeg","pyvista"] |
| workflow_role | analysis |
mtpy - Magnetotelluric Analysis
Quick Reference
from mtpy import MT, MTCollection
mt = MT('station001.edi')
Z = mt.Z
freq = mt.frequency
rho_xy = mt.apparent_resistivity[:, 0, 1]
print(mt.station, mt.latitude, mt.longitude)
mt.write_edi('output.edi')
Key Classes
| Class | Purpose |
|---|
MT | Single station MT data container |
MTCollection | Multiple stations management |
PlotMTResponse | Plot impedance, resistivity, phase |
PlotPhaseTensor | Phase tensor ellipse visualization |
PlotPseudoSection | Profile pseudosection display |
PlotStrike | Strike direction analysis |
Essential Operations
Load and Inspect EDI
from mtpy import MT
mt = MT('station001.edi')
print(f"Station: {mt.station}")
print(f"Location: ({mt.latitude}, {mt.longitude})")
print(f"Frequencies: {len(mt.frequency)} points")
print()