pycsamt.format.borehole.trajectory#

Deterministic 3-D trajectory derivation for PCBH boreholes.

Coordinates follow the PCBH contract: X is easting, Y is northing, Z is elevation positive upward, and TVD is positive downward from the collar. Survey inclination is measured from vertical down. The implementation uses minimum curvature and interpolates attitudes on the unit sphere, which also makes north-crossing azimuths unambiguous.

Functions

desurvey(borehole, *[, boundaries])

Generate a 3-D centerline for borehole.

trajectory_checksum(borehole)

Return a stable SHA-256 key for trajectory-defining inputs.

Classes

DesurveyedTrajectory(points, source_checksum)

Immutable centerline generated from one PCBH borehole.

TrajectoryPoint(md, x, y, z, tvd, ...)

One derived point and local borehole attitude.

class pycsamt.format.borehole.trajectory.TrajectoryPoint(md, x, y, z, tvd, azimuth_deg, inclination_deg)[source]

Bases: PyCSAMTObject

One derived point and local borehole attitude.

Parameters:
md: float
x: float
y: float
z: float
tvd: float
azimuth_deg: float
inclination_deg: float
class pycsamt.format.borehole.trajectory.DesurveyedTrajectory(points, source_checksum, method='minimum_curvature')[source]

Bases: PyCSAMTObject

Immutable centerline generated from one PCBH borehole.

Parameters:
  • points (tuple[TrajectoryPoint, ...])

  • source_checksum (str)

  • method (str)

points: tuple[TrajectoryPoint, ...]
source_checksum: str
method: str = 'minimum_curvature'
at_md(md)[source]

Return an exact or minimum-curvature-interpolated point at md.

Parameters:

md (float)

Return type:

TrajectoryPoint

split_at(measured_depths)[source]

Return a centerline containing every requested interval boundary.

Parameters:

measured_depths (Iterable[float])

Return type:

DesurveyedTrajectory

pycsamt.format.borehole.trajectory.desurvey(borehole, *, boundaries=())[source]

Generate a 3-D centerline for borehole.

Survey stations after total depth are rejected by schema validation. If the first survey station is below the collar, its attitude is extended back to MD 0. Likewise, the final attitude is extended to total depth.

Parameters:
Return type:

DesurveyedTrajectory

pycsamt.format.borehole.trajectory.trajectory_checksum(borehole)[source]

Return a stable SHA-256 key for trajectory-defining inputs.

Parameters:

borehole (PCBHBorehole)

Return type:

str