pycsamt.format.borehole.schema#
In-memory schema and semantic validation for PCBH 0.1.
PCBH represents one or more boreholes independently of an inversion model. This module contains no JSON, CSV, LAS, trajectory-desurvey, CRS-transform, PCSF, or rendering code. Those responsibilities are intentionally deferred to later implementation phases.
Classes
|
Borehole reference/origin position in the document CRS. |
|
Document-wide horizontal and vertical coordinate references. |
|
One measured-depth interval in a named log family. |
|
One borehole and its trajectory, logs, and structures. |
|
Root PCBH document containing one or more boreholes. |
|
Point or interval structural observation along a borehole. |
|
One measured-depth orientation station. |
|
Vertical shorthand or measured survey for a borehole path. |
|
Units shared by all boreholes in one PCBH 0.1 document. |
|
One machine-readable PCBH validation finding. |
|
Self-contained geological or domain vocabulary entry. |
Exceptions
|
Raised when error-severity issues remain after validation. |
- class pycsamt.format.borehole.schema.ValidationIssue(severity, code, message, path='', source=<factory>)[source]
Bases:
PyCSAMTObjectOne machine-readable PCBH validation finding.
- severity: str
- code: str
- message: str
- path: str = ''
- exception pycsamt.format.borehole.schema.PCBHValidationError(issues)[source]
Bases:
ValueErrorRaised when error-severity issues remain after validation.
- Parameters:
issues (Iterable[ValidationIssue])
- class pycsamt.format.borehole.schema.CoordinateReferenceSystem(horizontal, vertical='unknown', axis_order='xy', coordinate_unit='m')[source]
Bases:
_Validatable,PyCSAMTObjectDocument-wide horizontal and vertical coordinate references.
- horizontal: str
- vertical: str = 'unknown'
- axis_order: str = 'xy'
- coordinate_unit: str = 'm'
- class pycsamt.format.borehole.schema.UnitSystem(depth='m', diameter='m', angle='deg', resistivity='ohm.m')[source]
Bases:
_Validatable,PyCSAMTObjectUnits shared by all boreholes in one PCBH 0.1 document.
- depth: str = 'm'
- diameter: str = 'm'
- angle: str = 'deg'
- resistivity: str = 'ohm.m'
- class pycsamt.format.borehole.schema.Collar(x, y, z, longitude=None, latitude=None, position_uncertainty_m=None)[source]
Bases:
_Validatable,PyCSAMTObjectBorehole reference/origin position in the document CRS.
- Parameters:
- x: float
- y: float
- z: float
- class pycsamt.format.borehole.schema.VocabularyEntry(code, name, color=None, description='', external_ids=<factory>, properties=<factory>)[source]
Bases:
_Validatable,PyCSAMTObjectSelf-contained geological or domain vocabulary entry.
- Parameters:
- code: str
- name: str
- description: str = ''
- class pycsamt.format.borehole.schema.SurveyStation(md, azimuth_deg, inclination_deg)[source]
Bases:
_Validatable,PyCSAMTObjectOne measured-depth orientation station.
- md: float
- azimuth_deg: float
- inclination_deg: float
- class pycsamt.format.borehole.schema.Trajectory(method='vertical', north_reference='unknown', desurvey_method='minimum_curvature', stations=<factory>)[source]
Bases:
_Validatable,PyCSAMTObjectVertical shorthand or measured survey for a borehole path.
- method: str = 'vertical'
- north_reference: str = 'unknown'
- desurvey_method: str = 'minimum_curvature'
- stations: list[SurveyStation]
- class pycsamt.format.borehole.schema.LogInterval(from_md, to_md, code=None, label=None, description='', resistivity_ohm_m=None, data_nature='unknown', confidence=None, properties=<factory>)[source]
Bases:
_Validatable,PyCSAMTObjectOne measured-depth interval in a named log family.
- Parameters:
- from_md: float
- to_md: float
- description: str = ''
- data_nature: str = 'unknown'
- class pycsamt.format.borehole.schema.StructureObservation(kind, at_md=None, from_md=None, to_md=None, orientation_representation='none', strike_deg=None, dip_deg=None, dip_direction_deg=None, trend_deg=None, plunge_deg=None, alpha_deg=None, beta_deg=None, aperture_m=None, fill=None, data_nature='unknown', confidence=None)[source]
Bases:
_Validatable,PyCSAMTObjectPoint or interval structural observation along a borehole.
- Parameters:
kind (str)
at_md (float | None)
from_md (float | None)
to_md (float | None)
orientation_representation (str)
strike_deg (float | None)
dip_deg (float | None)
dip_direction_deg (float | None)
trend_deg (float | None)
plunge_deg (float | None)
alpha_deg (float | None)
beta_deg (float | None)
aperture_m (float | None)
fill (str | None)
data_nature (str)
confidence (float | None)
- kind: str
- orientation_representation: str = 'none'
- data_nature: str = 'unknown'
- class pycsamt.format.borehole.schema.PCBHBorehole(id, name, kind, status, collar, total_depth_md, trajectory=<factory>, diameter=None, interval_logs=<factory>, structures=<factory>, aliases=<factory>, metadata=<factory>, extensions=<factory>)[source]
Bases:
_Validatable,PyCSAMTObject,MetadataMixinOne borehole and its trajectory, logs, and structures.
- Parameters:
- id: str
- name: str
- kind: str
- status: str
- collar: Collar
- total_depth_md: float
- trajectory: Trajectory
- structures: list[StructureObservation]
- class pycsamt.format.borehole.schema.PCBHDocument(document_id, created_at, created_by, crs, boreholes, units=<factory>, title='', description='', lithologies=<factory>, formations=<factory>, pcbh_version='0.1.0', azimuth_direction='clockwise', inclination_reference='vertical_down', depth_reference='collar', z_positive='up', metadata=<factory>, extensions=<factory>)[source]
Bases:
_Validatable,PyCSAMTObject,MetadataMixinRoot PCBH document containing one or more boreholes.
- Parameters:
document_id (str)
created_at (str)
created_by (str)
crs (CoordinateReferenceSystem)
boreholes (list[PCBHBorehole])
units (UnitSystem)
title (str)
description (str)
lithologies (list[VocabularyEntry])
formations (list[VocabularyEntry])
pcbh_version (str)
azimuth_direction (str)
inclination_reference (str)
depth_reference (str)
z_positive (str)
- document_id: str
- created_at: str
- created_by: str
- crs: CoordinateReferenceSystem
- boreholes: list[PCBHBorehole]
- units: UnitSystem
- title: str = ''
- description: str = ''
- lithologies: list[VocabularyEntry]
- formations: list[VocabularyEntry]
- pcbh_version: str = '0.1.0'
- azimuth_direction: str = 'clockwise'
- inclination_reference: str = 'vertical_down'
- depth_reference: str = 'collar'
- z_positive: str = 'up'