Geometry

class of dascore.core.inventory
inherits from: InventoryModel, RichRepr, DascoreBaseModel, pydantic.main.BaseModel
source

Geometry(
    description: str = ““,
    extra_fields: collections.abc.Mapping[str, str | int | float | bool[str, int, float, bool]] = ,
    name: str =”“,
    distance: tuple[float, …] ,
    columns: collections.abc.Mapping[str, tuple[float, …]] ,
    units: collections.abc.Mapping[str, str] = ,
)-> None

Measured curves along an interval of an optical path.

A geometry is a piecewise segment placed by its distance array: at least two strictly increasing optical distances, each paired with one value of every column the segment states. Coverage is the half-open span of the array; there is no separate length field. A coil, or other “clump”, is a segment whose columns repeat while distance advances.

A column whose name the inventory CRS declares – or the canonical x, y, z alias of one – is that position axis, and takes the CRS’s units. Every other column is a numeric quantity along the fiber in its own right, carrying its own entry in units: borehole depth where the CRS is spent on easting/northing/elevation, pipeline chainage, fiber azimuth.

Interpolation between points is piecewise linear and never crosses segments; uncovered distance has undefined values. Two segments may cover the same distance as long as they state different columns – a depth survey and an azimuth survey of one borehole – and then they share a name, being two measurements of one stretch of fiber.

Examples

from dascore.core.inventory import Geometry

# A surveyed run, placed by the CRS's axes.
trench = Geometry(
    name="trench",
    distance=(0.0, 100.0),
    columns={"x": (0.0, 86.6), "y": (0.0, 0.0), "z": (-0.5, -0.5)},
)

# A curve which is not a position at all.
chainage = Geometry(
    name="chainage",
    distance=(0.0, 100.0),
    columns={"chainage": (1200.0, 1290.0)},
    units={"chainage": "m"},
)

Methods

Name Description
interpolate Return each column’s values at the requested optical distances.
new Create a new instance with some attributes updated.