Skip to content

fix_drillholes builtin

fix_drillholes(
    flags,
    tables,
    *,
    missing="drop",
    duplicates="drop",
    inverted="drop",
    out_of_range="drop",
    overlaps="keep_first",
    sentinels="null",
    deviation="drop",
    no_collar="drop",
    past_depth="keep",
    dip_sign="keep",
    id_mismatch="rename",
    text_values="null",
)

Tables cleaned by the flags of check_drillholes, one rule per check.

Rows are dropped where any check whose rule drops is flagged; gap, no_survey and no_<name> are informational and change nothing.

Parameters:

Name Type Description Default
flags mapping of str to Table

The flags returned by check_drillholes.

required
tables mapping of str to table

The checked tables under the same names, e.g. {"collar": collar, "survey": survey, "assay": assay}.

required
missing (drop, keep)

Rule for each check. A duplicate is the later row, so dropping keeps the first. Dropping both stations flagged around one wrong survey station also drops a good one. past_depth defaults to keep: the hole length may be what is wrong.

"drop"
duplicates (drop, keep)

Rule for each check. A duplicate is the later row, so dropping keeps the first. Dropping both stations flagged around one wrong survey station also drops a good one. past_depth defaults to keep: the hole length may be what is wrong.

"drop"
inverted (drop, keep)

Rule for each check. A duplicate is the later row, so dropping keeps the first. Dropping both stations flagged around one wrong survey station also drops a good one. past_depth defaults to keep: the hole length may be what is wrong.

"drop"
out_of_range (drop, keep)

Rule for each check. A duplicate is the later row, so dropping keeps the first. Dropping both stations flagged around one wrong survey station also drops a good one. past_depth defaults to keep: the hole length may be what is wrong.

"drop"
deviation (drop, keep)

Rule for each check. A duplicate is the later row, so dropping keeps the first. Dropping both stations flagged around one wrong survey station also drops a good one. past_depth defaults to keep: the hole length may be what is wrong.

"drop"
no_collar (drop, keep)

Rule for each check. A duplicate is the later row, so dropping keeps the first. Dropping both stations flagged around one wrong survey station also drops a good one. past_depth defaults to keep: the hole length may be what is wrong.

"drop"
past_depth (drop, keep)

Rule for each check. A duplicate is the later row, so dropping keeps the first. Dropping both stations flagged around one wrong survey station also drops a good one. past_depth defaults to keep: the hole length may be what is wrong.

"drop"
overlaps (keep_first, keep)

keep_first drops the flagged intervals, which leaves the first of overlapping intervals.

"keep_first"
sentinels (null, drop, keep)

null sets the sentinel values to null, leaving the rest of the row.

"null"
dip_sign (keep, negate)

negate turns the flagged holes' dips (or inclinations) down.

"keep"
id_mismatch (rename, keep)

rename replaces the flagged ids with the collar id they match.

"rename"
text_values (null, half, limit, keep)

Unless keep, the checked columns become numbers and their text values null. half and limit instead turn a below-detection value "<x" into x / 2 or x.

"null"

Returns:

Name Type Description
tables dict of str to Table

The cleaned tables, under the same names.

log Table

table, check, action and rows changed, for every check whose rule is not keep.

used in