pycsamt.metadata.instrument#
pycsamt.metadata.instrument#
Structured acquisition-system descriptor for MT / AMT / CSAMT / TEM surveys.
InstrumentMeta captures the recording system and sensor configuration
in a form that can be round-tripped to/from EDI >HEAD fields and JSON/YAML.
Pre-built presets for common field systems (Phoenix, Metronix, LEMI, Zonge)
are available via known_system().
Quick start#
from pycsamt.metadata.instrument import InstrumentMeta, SensorSpec
# Manually construct
inst = InstrumentMeta(
system="Phoenix V8",
serial="V8-20473",
magnetic_sensor=SensorSpec(
sensor_type="induction_coil",
model="MTC-150H",
frequency_range=(0.00001, 10000.0),
),
electric_sensor=SensorSpec(sensor_type="electrode", model="Pb-PbCl2"),
)
print(inst.summary())
# Build from a preset
inst2 = InstrumentMeta.from_preset("metronix_adu07")
# Round-trip JSON
import json
s = inst.to_json()
inst3 = InstrumentMeta.from_json(s)
# Push fields to an EDI Head dict
head_dict = inst.to_head_fields() # {"acqby": "Phoenix V8 / V8-20473", ...}
API Reference#
|
Specification for a single sensor (magnetic or electric). |
|
Structured descriptor for an EM acquisition system. |
|
Shortcut for |
Return sorted list of available preset keys. |
Module Attributes
Registry of known acquisition systems. |
Functions
|
Shortcut for |
Return sorted list of available preset keys. |
Classes
|
Structured descriptor for an EM acquisition system. |
|
Specification for a single sensor (magnetic or electric). |
- class pycsamt.metadata.instrument.SensorSpec(sensor_type='induction_coil', model='', frequency_range=None, notes='')[source]#
Bases:
objectSpecification for a single sensor (magnetic or electric).
- Parameters:
sensor_type ({"induction_coil", "fluxgate", "electrode", "other"}) – Physical transducer principle.
model (str) – Manufacturer model string, e.g.
"MTC-150H".frequency_range (tuple[float, float] or None) – (f_min, f_max) in Hz that the sensor is rated for.
notes (str) – Free-text annotation (calibration file name, mounting details, etc.).
Examples
>>> s = SensorSpec("induction_coil", "MTC-150H", (1e-5, 1e4)) >>> s.covers(0.1) True >>> s.covers(1e6) False
- class pycsamt.metadata.instrument.InstrumentMeta(system='', serial=None, magnetic_sensor=None, electric_sensor=None, software_version='', notes='')[source]#
Bases:
objectStructured descriptor for an EM acquisition system.
- Parameters:
system (str) – Human-readable system name, e.g.
"Phoenix V8"or"Metronix ADU-07e".serial (str or None) – Logger serial number or site-specific tag.
magnetic_sensor (SensorSpec or None) – Magnetic-field transducer (H field) specification.
electric_sensor (SensorSpec or None) – Electric-field transducer (E field) specification.
software_version (str) – Processing / acquisition software version string.
notes (str) – Free-text annotation (calibration date, operator remarks, …).
Notes
The class deliberately stays thin — only fields that appear (or could appear) in a standard EDI
>HEADblock or in a compact YAML survey manifest are stored here. Calibration tables belong in separate files referenced bynotes.Examples
>>> from pycsamt.metadata.instrument import InstrumentMeta >>> inst = InstrumentMeta(system="Phoenix V8", serial="V8-00123") >>> inst.to_head_fields() {'acqby': 'Phoenix V8 / V8-00123', 'progvers': 'pyCSAMT'}
- magnetic_sensor: SensorSpec | None = None#
- electric_sensor: SensorSpec | None = None#
- to_head_fields()[source]#
Return a dict of EDI
>HEADkey-value pairs.The mapping is:
acqby ← system / serial (or just system) progvers ← software_version (or the package default)
- classmethod from_head(head)[source]#
Construct from a
Headobject.Only
acqbyandprogversare extracted; sensor details cannot be inferred from the EDI header alone.- Parameters:
head (Any) – A
pycsamt.seg.heads.Headinstance (or any object withacqbyandprogversstring attributes).- Return type:
- classmethod from_preset(name)[source]#
Build from a named preset in
KNOWN_SYSTEMS.- Parameters:
name (str) – Case-insensitive preset key, e.g.
"phoenix_v8".- Return type:
- Raises:
KeyError – If name is not in
KNOWN_SYSTEMS.
Examples
>>> inst = InstrumentMeta.from_preset("lemi_424") >>> inst.system 'LEMI-424'
- classmethod from_yaml(s)[source]#
Deserialise from a YAML string (requires PyYAML).
- Parameters:
s (str)
- Return type:
- save(path, fmt='json')[source]#
Write to path as JSON or YAML.
- Parameters:
path (str) – Destination file path.
fmt ({"json", "yaml"})
- Return type:
None
- pycsamt.metadata.instrument.KNOWN_SYSTEMS: dict[str, dict[str, Any]] = {'generic_fluxgate': {'electric_sensor': None, 'magnetic_sensor': {'frequency_range': [0.0, 10.0], 'model': '', 'notes': 'Low-frequency or DC fluxgate; used in TEM & airborne', 'sensor_type': 'fluxgate'}, 'notes': 'Generic fluxgate configuration', 'serial': None, 'software_version': '', 'system': 'Generic fluxgate magnetometer'}, 'geometrics_stratagem': {'electric_sensor': {'frequency_range': None, 'model': 'Pb-PbCl2', 'notes': '', 'sensor_type': 'electrode'}, 'magnetic_sensor': {'frequency_range': [10.0, 100000.0], 'model': 'EH4 coil', 'notes': 'AMT band; controlled source / natural field', 'sensor_type': 'induction_coil'}, 'notes': 'EH4 tensor AMT system (10 Hz – 100 kHz)', 'serial': None, 'software_version': '', 'system': 'Geometrics Stratagem EH4'}, 'lemi_424': {'electric_sensor': {'frequency_range': None, 'model': 'Pb-PbCl2', 'notes': '', 'sensor_type': 'electrode'}, 'magnetic_sensor': {'frequency_range': [0.0003, 1000.0], 'model': 'LEMI-120', 'notes': 'Low-frequency induction coil for long-period MT', 'sensor_type': 'induction_coil'}, 'notes': 'LEMI-424 low-frequency broadband system', 'serial': None, 'software_version': '', 'system': 'LEMI-424'}, 'metronix_adu07': {'electric_sensor': {'frequency_range': None, 'model': 'Pb-PbCl2 porous pot', 'notes': '', 'sensor_type': 'electrode'}, 'magnetic_sensor': {'frequency_range': [0.0001, 4096.0], 'model': 'MFS-06e', 'notes': 'Metronix broadband coil; pairs with ADU-07e', 'sensor_type': 'induction_coil'}, 'notes': 'Metronix ADU-07e broadband MT system', 'serial': None, 'software_version': 'ADU-07e firmware', 'system': 'Metronix ADU-07e'}, 'metronix_adu08': {'electric_sensor': {'frequency_range': None, 'model': 'Pb-PbCl2 porous pot', 'notes': '', 'sensor_type': 'electrode'}, 'magnetic_sensor': {'frequency_range': [1e-05, 4096.0], 'model': 'MFS-07e', 'notes': 'High-resolution Metronix coil for quiet sites', 'sensor_type': 'induction_coil'}, 'notes': 'Metronix ADU-08e high-resolution system', 'serial': None, 'software_version': 'ADU-08e firmware', 'system': 'Metronix ADU-08e'}, 'phoenix_mtx': {'electric_sensor': {'frequency_range': None, 'model': 'Pb-PbCl2 porous pot', 'notes': '', 'sensor_type': 'electrode'}, 'magnetic_sensor': {'frequency_range': [1e-05, 10000.0], 'model': 'MTC-155', 'notes': 'Ultra-broadband Phoenix coil', 'sensor_type': 'induction_coil'}, 'notes': 'Phoenix MTX broadband system', 'serial': None, 'software_version': 'SSMT2000', 'system': 'Phoenix MTX'}, 'phoenix_v8': {'electric_sensor': {'frequency_range': None, 'model': 'Pb-PbCl2 porous pot', 'notes': 'Non-polarising; standard 50–100 m dipole', 'sensor_type': 'electrode'}, 'magnetic_sensor': {'frequency_range': [0.0001, 2000.0], 'model': 'MTC-150H', 'notes': 'Broadband MT coil; low-noise below 1 Hz', 'sensor_type': 'induction_coil'}, 'notes': 'Standard Phoenix V8 MT/AMT system', 'serial': None, 'software_version': 'SSMT2000', 'system': 'Phoenix V8'}, 'zonge_gdp32': {'electric_sensor': {'frequency_range': None, 'model': 'Pb-PbCl2', 'notes': '', 'sensor_type': 'electrode'}, 'magnetic_sensor': {'frequency_range': [0.001, 10000.0], 'model': 'ANT/6', 'notes': 'Zonge broadband coil, common in CSAMT surveys', 'sensor_type': 'induction_coil'}, 'notes': 'Zonge GDP-32 CSAMT/MT system', 'serial': None, 'software_version': '', 'system': 'Zonge GDP-32'}}#
Registry of known acquisition systems. Each value is a dict compatible with
InstrumentMeta._from_dict().
- pycsamt.metadata.instrument.known_system(name)[source]#
Shortcut for
InstrumentMeta.from_preset().- Parameters:
name (str) – Preset key (case-insensitive, spaces/hyphens treated as underscores).
- Return type:
Examples
>>> from pycsamt.metadata.instrument import known_system >>> inst = known_system("phoenix_v8") >>> inst.system 'Phoenix V8'