pycsamt.tdem.coordinates#

Coordinate readers for TEM survey station tables.

Functions

read_tem_coordinates(path, *[, verbose, logger])

Read a TEM profile/point coordinate table.

Classes

TEMCoordinate(profile, point, gauss_x, ...)

Coordinate metadata for one TEM station point.

TEMCoordinateTable(path[, coordinates, ...])

Collection of TEM station coordinates.

class pycsamt.tdem.coordinates.TEMCoordinate(profile, point, gauss_x, gauss_y, x, y, elevation, remark='')[source]#

Bases: object

Coordinate metadata for one TEM station point.

Parameters:
  • profile (float) – Survey profile or line identifier.

  • point (float) – Station point along the profile.

  • gauss_x (float) – Projected Gauss coordinates in metres.

  • gauss_y (float) – Projected Gauss coordinates in metres.

  • x (float) – Relative local coordinates in metres.

  • y (float) – Relative local coordinates in metres.

  • elevation (float) – Station elevation in metres.

  • remark (str, optional) – Free-text field note from the coordinate table.

profile: float#
point: float#
gauss_x: float#
gauss_y: float#
x: float#
y: float#
elevation: float#
remark: str = ''#
class pycsamt.tdem.coordinates.TEMCoordinateTable(path, coordinates=<factory>, verbose=0, logger=None)[source]#

Bases: PyCSAMTObject

Collection of TEM station coordinates.

Parameters:
  • path (pathlib.Path) – Source coordinate file.

  • coordinates (dict) – Coordinate records keyed by (profile, point).

  • verbose (int)

  • logger (object | None)

path: Path#
coordinates: dict[tuple[float, float], TEMCoordinate]#
verbose: int = 0#
logger: object | None = None#
classmethod read(path, *, verbose=0, logger=None)[source]#

Read a TEM coordinate table.

Parameters:
  • path (path-like) – Coordinate file. CSV and TSV files are read directly. Legacy .xls files are read with pandas.read_excel() when xlrd is installed, otherwise LibreOffice is used as a conversion fallback when available.

  • verbose (int)

  • logger (object | None)

Returns:

Parsed coordinate table.

Return type:

TEMCoordinateTable

property n_points: int[source]#

Number of coordinate records.

property profiles: list[float][source]#

Sorted profile identifiers.

property points: list[float][source]#

Sorted station point identifiers.

get(profile, point)[source]#

Return coordinate metadata for profile and point.

Parameters:
Return type:

TEMCoordinate | None

to_records()[source]#

Return coordinate records as dictionaries.

Return type:

list[dict[str, Any]]

to_dataframe()[source]#

Return coordinates as a pandas.DataFrame.

pycsamt.tdem.coordinates.read_tem_coordinates(path, *, verbose=0, logger=None)[source]#

Read a TEM profile/point coordinate table.

Parameters:
  • path (path-like) – Coordinate file in CSV, TSV, XLS, or XLSX format.

  • verbose (int)

  • logger (object | None)

Returns:

Parsed coordinates keyed by (profile, point).

Return type:

TEMCoordinateTable