Coder Social home page Coder Social logo

juliaearth / drillholes.jl Goto Github PK

View Code? Open in Web Editor NEW
8.0 4.0 2.0 214 KB

Drill hole utilities for the GeoStats.jl framework

Home Page: https://github.com/JuliaEarth/GeoStats.jl

License: MIT License

Julia 100.00%
drillholes mining compositing collar survey

drillholes.jl's People

Contributors

dependabot[bot] avatar eliascarv avatar github-actions[bot] avatar juliohm avatar rmcaixeta avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

drillholes.jl's Issues

TagBot trigger issue

This issue is used to trigger TagBot; feel free to unsubscribe.

If you haven't already, you should update your TagBot.yml to include issue comment triggers.
Please see this post on Discourse for instructions and more details.

If you'd like for me to do this for you, comment TagBot fix on this issue.
I'll open a PR within a few hours, please be patient!

Consistent use of Base.@kwdef

In the definitions.jl file it seems that some of the structs make use of Base.@kwdef and some others do not. Could you double check that this is intended? It would be nice to have all table types following the same construction pattern.

Inexact error when compositing samples

Hi there!

The composite function throws an InexactError when compositing some specific samples:

using DrillHoles

# raw tables
collar = Collar(file="collar.csv", holeid=:HOLEID, x=:X, y=:Y, z=:Z)
survey = Survey(file="survey.csv", holeid=:HOLEID, at=:AT, azm=:AZM, dip=:DIP)
assay = Interval(file="assay.csv", holeid=:HOLEID, from=:FROM, to=:TO)
litho = Interval(file="lithology.csv", holeid=:HOLEID, from=:FROM, to=:TO)

# desurveying
dh = drillhole(collar, survey, [assay, litho])

# compositing
composites = composite(dh, interval=5.0, mode=:nodiscard)

println(composites.table)
ERROR: LoadError: InexactError: Int64(5.015151515151516)
Stacktrace:
 [1] Int64
   @ .\float.jl:812 [inlined]
 [2] convert
   @ .\number.jl:7 [inlined]
 [3] setindex!(A::Vector{Int64}, x::Float64, i1::Int64)
   @ Base .\array.jl:903
 [4] insert_single_entry!(df::DataFrames.DataFrame, v::Float64, row_ind::Int64, col_ind::Symbol)
   @ DataFrames C:\Users\franc\.julia\packages\DataFrames\BM4OQ\src\dataframe\dataframe.jl:631
 [5] setindex!(df::DataFrames.DataFrame, v::Float64, row_ind::Int64, col_ind::Symbol)
   @ DataFrames C:\Users\franc\.julia\packages\DataFrames\BM4OQ\src\dataframe\dataframe.jl:659
 [6] composite(dhf::DrillHoles.DrillHole; interval::Float64, zone::Nothing, mode::Symbol, mincomp::Float64, gap::Float64)
   @ DrillHoles C:\Users\franc\.julia\packages\DrillHoles\ITApF\src\compositing.jl:129

Check this gist to access data and script or, alternatively, download the zip.

Obs.: I'm using the latest version of DrillHoles.jl.

composite error

Trying to composite but got the following error
julia> describe(dh.table)
8×7 DataFrame
Row │ variable mean min median max nmissing eltype
│ Symbol Union… Any Union… Any Int64 Type
─────┼─────────────────────────────────────────────────────────────────────────────────────────────
1 │ HOLEID OCR-RCH-030 OCR_DDH_007 0 String
2 │ FROM 12.4561 0.0 11.0 40.0 0 Float64
3 │ TO 13.6079 1.0 12.0 42.0 0 Float64
4 │ LENGTH 1.15185 0.5 1.0 3.0 0 Float64
5 │ EL1 10.8796 0.05 6.66 45.09 0 Union{Missing, Float64}
6 │ X 553062.0 552840.0 553060.0 553194.0 0 Float64
7 │ Y 9.50209e6 9.50204e6 9.50209e6 9.50222e6 0 Float64
8 │ Z 81.7177 55.9687 81.8838 100.54 0 Float64

julia> cmpst = composite(dh, interval=1.0, zone=:EL1, mode=:nodiscard)
ERROR: TypeError: in Type{...} expression, expected UnionAll, got Symbol
Stacktrace:
[1] composite(::DrillHoles.DrillHole; interval::Float64, zone::Symbol, mode::Symbol, mincomp::Float64, gap::Float64) at /home/andre/.julia/packages/DrillHoles/uLhpl/src/compositing.jl:58
[2] top-level scope at REPL[34]:1

when loading package I got an error on line 58 compositing.jl regarding : with an space prior to Union, I removed de space and the package loade but is this error related to that "fix".

Clarify survey dip convention

The keyword argument invertdip in Survey definition may cause confusion as it is. Additionally to that, dh.trace uses a fixed convention for internal use and it's not specified in the docstrings.

The current proposed solution is to substitute invertdip to dipconvention, which could hold the values :positivedownwards or :negativedownwards. For trace file, a simple solution is to specify the fixed convention in the docs; or adapt the dip sign to the informed convention, what would be better, but need to check how much of the code need to be adapted to it.

Parameters in the collar table

Hello. I'd like to suggest a feature to the package. I'm using the DrillHoles.jl to a task, and I have important data on the collar table that I can't move, for logistical matters, to the interval table. When I use the drillhole function, these data are not passed to the desurveyed table generated by the drillhole function. For what I've researched, that's how it should work, given that the collar function doesn't recgonize explicitly any parameters besides x, y, z, holeid and enddepth and all the other data should be in the interval table. Is it feasible to add the option of using data that are located at the collar table and can't be moved around in the same way as the interval table?

Fix desurvey trajectory calculation

After the major refactoring for v0.2.0, the desurvey trajectory does not match the trajectory of known commercial software. Now that the code has been cleaned and merged into the master branch, it should be easier to implement the fix.

Add warnings found during desurvey

Currently, only some errors are checked during desurvey
It is possible to include other warnings to the DrillHole.warn

e.g.

  • validate last interval against collar end depth
  • check duplicate hole names and inform
  • hole name in survey table but not in collar table
  • hole name in interval table but not in collar table
  • no survey at zero depth
  • duplicated survey
  • single value of survey
  • big deviations between adjacent survey intervals
  • warn for repeated column names in different tables

Various tests are failing

Hi @rmcaixeta , I've noticed that most tests are failing in the test suite. Could you please take a look? DataFrames.jl has recently updated but that shouldn't be related?

Add license header to all source files

It is important to add a license header to each individual file. It is recommended by the open source software organizations and necessary legally to make sure that every contribution is explicitly made under the terms of the license. If someone submits a PR they will be forced to add a header and accept the license.

Boolean composites

Group intervals into sets that attend given condition, such as minimal length and average grade
Example: define intervals with Fe > 10% and minimal length of 3m. It'd create a new boolean property informing intervals that attend this condition or not

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.