pycsamt.format.borehole.relational#

Manifest-driven relational CSV import and export for PCBH.

Functions

boreholes_from_csv_directory(directory, *[, ...])

Import joined collar, survey, log, structure, sample, assay tables.

write_csv_directory(document, directory)

Export supported PCBH content as a relational CSV directory.

Classes

RelationalManifest(crs_horizontal, tables[, ...])

Validated description of a PCBH relational CSV directory.

class pycsamt.format.borehole.relational.RelationalManifest(crs_horizontal, tables, depth_unit='m', resistivity_unit='ohm.m', version='0.1.0')[source]

Bases: PyCSAMTObject

Validated description of a PCBH relational CSV directory.

Parameters:
crs_horizontal: str
tables: dict[str, str]
depth_unit: str = 'm'
resistivity_unit: str = 'ohm.m'
version: str = '0.1.0'
classmethod read(path)[source]

Read a manifest with yaml.safe_load and validate it.

Parameters:

path (str | Path)

Return type:

RelationalManifest

validate()[source]

Validate version, units, table names, and safe relative paths.

Return type:

None

pycsamt.format.borehole.relational.boreholes_from_csv_directory(directory, *, manifest='import.yaml', strict=True, document_id=None, created_by='pycsamt relational CSV importer')[source]

Import joined collar, survey, log, structure, sample, assay tables.

Parameters:
Return type:

tuple[PCBHDocument, ImportReport]

pycsamt.format.borehole.relational.write_csv_directory(document, directory)[source]

Export supported PCBH content as a relational CSV directory.

Parameters:
  • document (PCBHDocument)

  • directory (str | Path)

Return type:

Path