Skip to content

check_drillholes builtin

check_drillholes(
    collar,
    survey=None,
    intervals=None,
    *,
    hole="HOLE_ID",
    x="X",
    y="Y",
    z="Z",
    at="DEPTH",
    azimuth="AZIMUTH",
    dip=Ellipsis,
    inclination=None,
    from_="FROM",
    to="TO",
    max_depth=None,
    grades=None,
    nodata=Ellipsis,
    max_deviation=20.0,
    tolerance=1e-06,
)

Per-record flags of drillhole tables, a summary of every check and the values behind the checks that suggest a correction.

Rows with a missing or sentinel required value (id, coordinates, depths, angles, from and to) are left out of the other checks, so each defect is flagged once. Nothing is sorted or dropped; see fix_drillholes.

Parameters:

Name Type Description Default
collar table

Hole id and collar coordinates, plus the hole length if max_depth is given.

required
survey table

Hole id, depth, azimuth and dip (or inclination).

None
intervals table or mapping of str to table

Interval tables, e.g. {"assay": assay, "geology": geology}; a single table is named "intervals".

None
hole str

Column names, as in Drillholes. Dip is positive down; inclination, from vertical, is used instead when given.

'HOLE_ID'
x str

Column names, as in Drillholes. Dip is positive down; inclination, from vertical, is used instead when given.

'HOLE_ID'
y str

Column names, as in Drillholes. Dip is positive down; inclination, from vertical, is used instead when given.

'HOLE_ID'
z str

Column names, as in Drillholes. Dip is positive down; inclination, from vertical, is used instead when given.

'HOLE_ID'
at str

Column names, as in Drillholes. Dip is positive down; inclination, from vertical, is used instead when given.

'HOLE_ID'
azimuth str

Column names, as in Drillholes. Dip is positive down; inclination, from vertical, is used instead when given.

'HOLE_ID'
dip str

Column names, as in Drillholes. Dip is positive down; inclination, from vertical, is used instead when given.

'HOLE_ID'
inclination str

Column names, as in Drillholes. Dip is positive down; inclination, from vertical, is used instead when given.

'HOLE_ID'
from_ str

Column names, as in Drillholes. Dip is positive down; inclination, from vertical, is used instead when given.

'HOLE_ID'
to str

Column names, as in Drillholes. Dip is positive down; inclination, from vertical, is used instead when given.

'HOLE_ID'
max_depth str

Collar column with the hole length; enables the past_depth check.

None
grades sequence of str

Columns that must hold numbers, searched for text_values in every table that has them. By default, every text column other than the ones named above in which most values are numbers.

None
nodata sequence of float

Values that stand for missing data, searched in every numeric column.

Ellipsis
max_deviation float

Largest angle, in degrees, between the directions of consecutive survey stations. A single wrong station is flagged twice: on itself and on the station below.

20.0
tolerance float

Depth tolerance of gaps, overlaps and past_depth.

1e-06

Returns:

Name Type Description
flags dict of str to Table

One boolean Table per input table ("collar", "survey" and each interval table), in input row order, one column per check:

  • duplicate: collar id, or survey hole and depth, seen on an earlier row.
  • missing: null or non-finite required value.
  • out_of_range: negative depth, length or from; azimuth outside [0, 360]; dip outside [-90, 90].
  • sentinel: a numeric column, or a text column checked for text_values, holds one of nodata.
  • text_values: a value of a numeric-looking column is not a number, e.g. "NS" or "<0.01".
  • no_survey, no_<name>: collar without survey or intervals.
  • id_mismatch: survey or interval hole id that matches no collar id exactly, but one after trimming whitespace and case-folding.
  • no_collar: survey or interval of a hole without collar.
  • deviation: survey station more than max_deviation from the station above.
  • dip_sign: every station of the hole dips against the sign most holes share, e.g. a hole entered pointing up.
  • inverted: interval with from ≥ to.
  • gap: interval starting below the end of the one above.
  • overlap: interval starting above the end of the ones kept above it; dropping these keeps the first of overlapping intervals.
  • past_depth: survey or interval deeper than the hole length.
summary Table

table, check, rows flagged and distinct holes, for every check including those that found nothing.

details Table

One row per flagged value of dip_sign, id_mismatch and text_values: table, row, hole, check, column, value as text and the suggestion (the negated dip or matching collar id; null for text values).

used in