Coder Social home page Coder Social logo

softlandia / glasio Goto Github PK

View Code? Open in Web Editor NEW
1.0 2.0 1.0 6.15 MB

golang library for read/write/control las files

License: Other

Go 100.00%
golang golang-library golang-package las log-ascii-standart las-files geology data-format data-mining petroleum-engineering

glasio's Introduction

golang las library

(c) [email protected]

download: go get -u github.com/softlandia/glasio
install: go install

The library makes it easy to read or write data in LAS format. The main reason for the development was the need to read and standardize a large number of LAS files obtained from various sources

Features:

  1. The encoding is determined automatically
  2. On reading perform validation of the key parameters and integrity of the structure LAS file
  3. Messages are generated for all inconsistencies:
    • zero value of important parameters
    • depth step change in data section
    • lack of curves section
    • conversion errors to a numerical value
    • mismatch of the step parameter declared in the header to the actual
    • duplication of curve names
  4. Excluding critical errors, the library allows you to read the file and get data
  5. Saving a file ensures the integrity of the structure and its readability for most other programs
  6. It is possible to specify a dictionary of standard mnemonics; when reading a file, messages about curves that do not match the specified ones will be generated
  7. It is possible to specify a dictionary of automatic substitution of mnemonics, respectively, curves with the given names will be renamed

Wrapped (WRAP) las files are not supported

dependences

  • github.com/softlandia/cpd
  • github.com/softlandia/xlib

examples

simple

  • make empty LAS file
  • reads sample file "expand_points_01.las", write md file with messages
  • saves the recovered LAS file "expand_points_01+.las"

repaire

  • reads all LAS files in current folder
  • saves the recovered files to the same folder

lasin

  • reads LAS file
  • print warning

tests

coverage 91%
The "data" folder contains files for testing, no remove/change/add

technical info

how type Las store data

access to main parameters:
las.VERS()
las.WRAP()
las.STEP()
las.STRT()
las.STOP()
las.NULL()
las.WELL()

number of points and curves:
las.NumPoints() - number of points len(las.Logs) - number of curves

access to curves and data:
las.Logs[0].D[0] - first depth
las.Logs[1].V[100] - value of first curve on 101 depth step
las.Logs[2].Name - name of second curve
las.Logs[2].Unit - unit of second curve
las.Logs[2].Mnemonic - mnemonic of second curve, the value is determined if the dictionary was applied

if las file contains duplication of any parameter, then use the first in curve section used all curves name. The subsequent duplicated parameter is renamed.

warnings generated when reading a LAS file

warning format

extended:

x, y, "message text"
x - section number
y - line number of input file

glasio's People

Contributors

dcslagel avatar softlandia avatar

Stargazers

 avatar

Watchers

 avatar  avatar

Forkers

clutariomark

glasio's Issues

Format warning message

Change number code of section to section name, add space and line number
Now: 2,-1,"WRN parameter STRT not exist"
2 is section number
-1 must be real line number
Need: ~W, 6, "WRN parameter STRT not exist"

Setup issue: las_param.go:221:9: undefined: xlib.StrHash

@softlandia,

I tried these install steps and failed on las_param.go:221:9: undefined: xlib.StrHash.

go get -u github.com/softlandia/cpd
go install github.com/softlandia/cpd

go get -u github.com/softlandia/xlib
go install github.com/softlandia/xlib

go get -u github.com/softlandia/glasio

Output:

# github.com/softlandia/glasio
src/github.com/softlandia/glasio/las_param.go:221:9: undefined: xlib.StrHash
src/github.com/softlandia/glasio/las_param.go:231:9: undefined: xlib.StrHash

My version of GO is go1.14.2. Could someone else give it a try to verify whether the issue is only with my configuration or if others get the failure too?

Thank you,
DC

Open not return error

In case las WRAP = ON function Open generate Warning and return error == nil
If las file not contain Curve section function Open generate Warning and return error == nil

Некорректное чтение параметра WELL

Только для версии LAS 2.0
При наличии пробела в имени скважины чтение параметра производится с ошибкой. Пробел воспринимается как разделитель и получаем имя до пробела, оставшаяся часть уходит в единицу изменения...

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.