pycsamt.tdem.workflow#

High-level TEMAVG survey conversion workflows.

Functions

read_temavg_soundings(path, *[, pattern, ...])

Read a TEMAVG folder and return station soundings.

transform_temavg_survey(path, *[, pattern, ...])

Run a complete TEMAVG-to-frequency workflow.

Classes

TEMAVGConversion(survey, soundings[, ...])

Result bundle returned by TEMAVG workflow helpers.

class pycsamt.tdem.workflow.TEMAVGConversion(survey, soundings, results=<factory>, collection=None, written_paths=<factory>, verbose=0, logger=None)[source]#

Bases: PyCSAMTObject

Result bundle returned by TEMAVG workflow helpers.

Parameters:
  • survey (TEMSurvey) – Parsed survey folder, including companion files and optional coordinate table.

  • soundings (list of TEMSounding) – Station-wise soundings built from TEMAVG rows.

  • results (list of dict) – Frequency-domain transform result dictionaries.

  • collection (object, optional) – EDI collection created when return_collection=True.

  • written_paths (list of str) – EDI file paths written when savepath is supplied.

  • verbose (int)

  • logger (object | None)

survey: TEMSurvey#
soundings: list[TEMSounding]#
results: list[dict[str, Any]]#
collection: Any | None = None#
written_paths: list[str]#
verbose: int = 0#
logger: object | None = None#
property n_soundings: int[source]#

Number of generated station soundings.

property n_results: int[source]#

Number of transformed frequency-domain results.

property stations: list[str][source]#

Station names represented by the generated soundings.

pycsamt.tdem.workflow.read_temavg_soundings(path, *, pattern='*.AVG', coordinate_file=None, stems=None, component='Hz', frequency=None, data_column='magnitude', magnitude_unit='uV/A', data_type='voltage', rx_turns=1, tx_turns=1, min_gates=1, verbose=0, logger=None)[source]#

Read a TEMAVG folder and return station soundings.

This helper performs the first half of the TEMAVG pipeline: parse a survey folder, attach coordinates when available, and build one TEMSounding per station.

Parameters:
  • path (path-like) – Folder containing TEMAVG .AVG files.

  • pattern (str, default “*.AVG”) – Glob pattern used to select processed average files.

  • coordinate_file (path-like, optional) – Coordinate table to attach by (profile, station). If omitted, common coordinate filenames are discovered automatically.

  • stems (list of str, optional) – File stems to convert, for example ["TEM100"]. When omitted, all parsed .AVG files are used.

  • component (str, default "Hz") – TEMAVG component to select.

  • frequency (float, optional) – Repetition frequency to select.

  • data_column ({"magnitude"}, default "magnitude") – TEMAVG transient column used for the sounding decay.

  • magnitude_unit (str, default "uV/A") – Unit of the TEMAVG magnitude column.

  • data_type (str, default "voltage") – Data convention stored in each sounding.

  • rx_turns (int, default 1) – Receiver and transmitter turn counts.

  • tx_turns (int, default 1) – Receiver and transmitter turn counts.

  • min_gates (int, default 1) – Minimum number of selected gates required per station.

  • verbose (int)

  • logger (object | None)

Returns:

Station-wise soundings ready for transformation.

Return type:

list of TEMSounding

pycsamt.tdem.workflow.transform_temavg_survey(path, *, pattern='*.AVG', coordinate_file=None, stems=None, component='Hz', frequency=None, data_column='magnitude', magnitude_unit='uV/A', data_type='voltage', rx_turns=1, tx_turns=1, min_gates=1, method='late_time', freq_convention='skin_depth', phase_mode='homogeneous', loop_geometry_correction=True, return_collection=False, savepath=None, verbose=0, logger=None)[source]#

Run a complete TEMAVG-to-frequency workflow.

The function reads a TEMAVG survey folder, builds station soundings, transforms them to pseudo-frequency apparent resistivity and impedance, and optionally creates or writes EDI output.

Parameters:
  • path (path-like) – Folder containing TEMAVG .AVG files.

  • pattern (str, default “*.AVG”) – Glob pattern used to select processed average files.

  • coordinate_file (path-like, optional) – Coordinate table to attach by profile and station.

  • stems (list of str, optional) – File stems to convert. Use this to process one profile before scaling to a full survey folder.

  • component (str, default "Hz") – TEMAVG component to select.

  • frequency (float, optional) – Repetition frequency to select.

  • data_column ({"magnitude"}, default "magnitude") – TEMAVG transient column used for the sounding decay.

  • magnitude_unit (str, default "uV/A") – Unit of the TEMAVG magnitude column.

  • data_type (str, default "voltage") – Data convention stored in each sounding.

  • rx_turns (int, default 1) – Receiver and transmitter turn counts.

  • tx_turns (int, default 1) – Receiver and transmitter turn counts.

  • min_gates (int, default 1) – Minimum number of selected gates required per station.

  • method ({"late_time", "fourier"}, default "late_time") – Transformation method used by TEMtoEDI.

  • freq_convention (str, default "skin_depth") – Pseudo-frequency convention for late-time transforms.

  • phase_mode (str, default "homogeneous") – Phase model used for synthetic impedance.

  • loop_geometry_correction (bool, default True) – Whether to apply in-loop geometry corrections.

  • return_collection (bool, default False) – If True, also build an EDI collection in memory.

  • savepath (path-like, optional) – Directory where synthetic EDI files are written.

  • verbose (int)

  • logger (object | None)

Returns:

Bundle containing the parsed survey, station soundings, transform results, and optional EDI outputs.

Return type:

TEMAVGConversion

Examples

>>> from pycsamt.tdem import transform_temavg_survey
>>> out = transform_temavg_survey(
...     "data/TEMAVG/JIANGSU",
...     stems=["TEM100"],
... )
>>> out.n_soundings > 0
True