evo.objects.typed.downhole_intervals.DownholeIntervals
A GeoscienceObject representing downhole intervals.
Downhole intervals describe depth-ranged samples along drill holes. Each interval is defined by a hole identifier, a from/to depth range, and the 3D coordinates of the interval's start, end, and mid-point. Optional attributes (assay values, lithology codes, etc.) may also be attached.
Example usage::
import pandas as pd
from evo.objects.typed import DownholeIntervals, DownholeIntervalsData
df = pd.DataFrame(
{
"hole_id": pd.Categorical(["DH001", "DH001", "DH002"]),
"from": [0.0, 5.0, 0.0],
"to": [5.0, 10.0, 3.0],
"x_start": [100.0, 100.0, 200.0],
"y_start": [200.0, 200.0, 300.0],
"z_start": [ 0.0, -5.0, 0.0],
"x_end": [100.0, 100.0, 200.0],
"y_end": [200.0, 200.0, 300.0],
"z_end": [ -5.0, -10.0, -3.0],
"x_mid": [100.0, 100.0, 200.0],
"y_mid": [200.0, 200.0, 300.0],
"z_mid": [ -2.5, -7.5, -1.5],
}
)
data = DownholeIntervalsData(
name="My Downhole Intervals",
intervals=df,
is_composited=False,
depth_unit="m",
)
obj = await DownholeIntervals.create(context, data)
# Download all data as a single DataFrame
df = await obj.to_dataframe()
depth_unit
depth_unit: str | None
The unit of the from/to depths, or None if not specified.
num_intervals
num_intervals: int
The number of intervals in this object.
to_dataframe
to_dataframe(*keys: str, fb: IFeedback = NoFeedback) -> pd.DataFrame
Get all interval data as a single DataFrame.
The returned DataFrame has the following columns, in order:
hole_id— hole identifierfrom,to— depth intervalx_start,y_start,z_start— start-point coordinatesx_end,y_end,z_end— end-point coordinatesx_mid,y_mid,z_mid— mid-point coordinates- Any attribute columns
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
keys
|
str
|
Optional attribute keys/names to include. If omitted, all attributes are included. |
()
|
fb
|
IFeedback
|
Optional feedback object to report download progress. |
NoFeedback
|
Returns:
| Type | Description |
|---|---|
DataFrame
|
A combined DataFrame of all interval data and attributes. |
validate
validate() -> None
Validate the object, checking that all interval tables have consistent lengths.