All Projects → kinverarity1 → Lasio

kinverarity1 / Lasio

Licence: mit
Python library for reading and writing well data using Log ASCII Standard (LAS) files

Programming Languages

python
139335 projects - #7 most used programming language

Projects that are alternatives of or similar to Lasio

Welly
Well handling
Stars: ✭ 168 (-28.21%)
Mutual labels:  data-mining, data-management, geophysics
Gspan
Python implementation of frequent subgraph mining algorithm gSpan. Directed graphs are supported.
Stars: ✭ 103 (-55.98%)
Mutual labels:  jupyter-notebook, data-mining
Notebooks
IPython Notebooks
Stars: ✭ 91 (-61.11%)
Mutual labels:  jupyter-notebook, geophysics
Machine learning for good
Machine learning fundamentals lesson in interactive notebooks
Stars: ✭ 142 (-39.32%)
Mutual labels:  jupyter-notebook, data-mining
Tutorials 2017
Geophysical Tutorials column for 2017
Stars: ✭ 63 (-73.08%)
Mutual labels:  jupyter-notebook, geophysics
Rental Prediction
2018年全国大学生计算机应用能力大赛之住房月租金预测第一名代码
Stars: ✭ 74 (-68.38%)
Mutual labels:  jupyter-notebook, data-mining
2016 Ml Contest
Machine learning contest - October 2016 TLE
Stars: ✭ 135 (-42.31%)
Mutual labels:  jupyter-notebook, geophysics
Awesome Ai Books
Some awesome AI related books and pdfs for learning and downloading, also apply some playground models for learning
Stars: ✭ 855 (+265.38%)
Mutual labels:  jupyter-notebook, data-mining
Data Science Resources
👨🏽‍🏫You can learn about what data science is and why it's important in today's modern world. Are you interested in data science?🔋
Stars: ✭ 171 (-26.92%)
Mutual labels:  jupyter-notebook, data-mining
Fantasy Basketball
Scraping statistics, predicting NBA player performance with neural networks and boosting algorithms, and optimising lineups for Draft Kings with genetic algorithm. Capstone Project for Machine Learning Engineer Nanodegree by Udacity.
Stars: ✭ 146 (-37.61%)
Mutual labels:  jupyter-notebook, data-mining
Gendis
Contains an implementation (sklearn API) of the algorithm proposed in "GENDIS: GEnetic DIscovery of Shapelets" and code to reproduce all experiments.
Stars: ✭ 59 (-74.79%)
Mutual labels:  jupyter-notebook, data-mining
Gwu data mining
Materials for GWU DNSC 6279 and DNSC 6290.
Stars: ✭ 217 (-7.26%)
Mutual labels:  jupyter-notebook, data-mining
Helioml
A book about machine learning, statistics, and data mining for heliophysics
Stars: ✭ 36 (-84.62%)
Mutual labels:  jupyter-notebook, data-mining
2017 Ccf Bdci Enterprise
2017-CCF-BDCI-企业经营退出风险预测:9th/569 (Top 1.58%)
Stars: ✭ 81 (-65.38%)
Mutual labels:  jupyter-notebook, data-mining
Drugs Recommendation Using Reviews
Analyzing the Drugs Descriptions, conditions, reviews and then recommending it using Deep Learning Models, for each Health Condition of a Patient.
Stars: ✭ 35 (-85.04%)
Mutual labels:  jupyter-notebook, data-mining
Lab Workshops
Materials for workshops on text mining, machine learning, and data visualization
Stars: ✭ 112 (-52.14%)
Mutual labels:  jupyter-notebook, data-mining
Cookbook 2nd
IPython Cookbook, Second Edition, by Cyrille Rossant, Packt Publishing 2018
Stars: ✭ 704 (+200.85%)
Mutual labels:  jupyter-notebook, data-mining
Spring2017 proffosterprovost
Introduction to Data Science
Stars: ✭ 18 (-92.31%)
Mutual labels:  jupyter-notebook, data-mining
Python Machine Learning Book
The "Python Machine Learning (1st edition)" book code repository and info resource
Stars: ✭ 11,428 (+4783.76%)
Mutual labels:  jupyter-notebook, data-mining
2017 Ccf Bdci Aijudge
2017-CCF-BDCI-让AI当法官(初赛):7th/415 (Top 1.68%)
Stars: ✭ 177 (-24.36%)
Mutual labels:  jupyter-notebook, data-mining

lasio

License

Read and write Log ASCII Standard files with Python.

This is a Python 3.3+ package to read and write Log ASCII Standard (LAS) files, used for borehole data such as geophysical, geological, or petrophysical logs. It's compatible with versions 1.2 and 2.0 of the LAS file specification, published by the Canadian Well Logging Society. Support for LAS 3 is being worked on. In principle it is designed to read as many types of LAS files as possible, including ones containing common errors or non-compliant formatting.

lasio is primarily for reading & writing data and metadata to and from LAS files. lasio does not mind whether LAS files meet the formal specification before reading data from them; check out the project lascheck for doing that sort of thing. If you are working specifically with lithological or stratigraphic data, you may find striplog helpful, while if you are focused on working at the well level, please take a look at welly, which provides much more functionality in that area.

Note this is not a package for reading LiDAR data (also called "LAS files"); you may want to check out laspy for that.

lasio stopped supporting Python 2.7 in August 2020. The final version of lasio with Python 2.7 support is version 0.26.

Documentation

See here for the complete lasio package documentation.

Quick start

For the minimum working requirements, you'll need numpy installed. Install lasio with:

$ pip install lasio

To make sure you have everything, use this to ensure pandas, cchardet, and openpyxl are also installed:

$ pip install lasio[all]

Example session:

>>> import lasio

You can read the file using a filename, file-like object, or URL:

>>> las = lasio.read("sample_rev.las")

Data is accessible both directly as numpy arrays

>>> las.keys()
['DEPT', 'DT', 'RHOB', 'NPHI', 'SFLU', 'SFLA', 'ILM', 'ILD']
>>> las['SFLU']
array([ 123.45,  123.45,  123.45, ...,  123.45,  123.45,  123.45])
>>> las['DEPT']
array([ 1670.   ,  1669.875,  1669.75 , ...,  1669.75 ,  1670.   ,
        1669.875])

and as CurveItem objects with associated metadata:

>>> las.curves
[CurveItem(mnemonic=DEPT, unit=M, value=, descr=1  DEPTH, original_mnemonic=DEPT, data.shape=(29897,)),
CurveItem(mnemonic=DT, unit=US/M, value=, descr=2  SONIC TRANSIT TIME, original_mnemonic=DT, data.shape=(29897,)),
CurveItem(mnemonic=RHOB, unit=K/M3, value=, descr=3  BULK DENSITY, original_mnemonic=RHOB, data.shape=(29897,)),
CurveItem(mnemonic=NPHI, unit=V/V, value=, descr=4   NEUTRON POROSITY, original_mnemonic=NPHI, data.shape=(29897,)),
CurveItem(mnemonic=SFLU, unit=OHMM, value=, descr=5  RXO RESISTIVITY, original_mnemonic=SFLU, data.shape=(29897,)),
CurveItem(mnemonic=SFLA, unit=OHMM, value=, descr=6  SHALLOW RESISTIVITY, original_mnemonic=SFLA, data.shape=(29897,)),
CurveItem(mnemonic=ILM, unit=OHMM, value=, descr=7  MEDIUM RESISTIVITY, original_mnemonic=ILM, data.shape=(29897,)),
CurveItem(mnemonic=ILD, unit=OHMM, value=, descr=8  DEEP RESISTIVITY, original_mnemonic=ILD, data.shape=(29897,))]

Header information is parsed into simple HeaderItem objects, and stored in a dictionary for each section of the header:

>>> las.version
[HeaderItem(mnemonic=VERS, unit=, value=1.2, descr=CWLS LOG ASCII STANDARD -VERSION 1.2, original_mnemonic=VERS),
HeaderItem(mnemonic=WRAP, unit=, value=NO, descr=ONE LINE PER DEPTH STEP, original_mnemonic=WRAP)]
>>> las.well
[HeaderItem(mnemonic=STRT, unit=M, value=1670.0, descr=, original_mnemonic=STRT),
HeaderItem(mnemonic=STOP, unit=M, value=1660.0, descr=, original_mnemonic=STOP),
HeaderItem(mnemonic=STEP, unit=M, value=-0.125, descr=, original_mnemonic=STEP),
HeaderItem(mnemonic=NULL, unit=, value=-999.25, descr=, original_mnemonic=NULL),
HeaderItem(mnemonic=COMP, unit=, value=ANY OIL COMPANY LTD., descr=COMPANY, original_mnemonic=COMP),
HeaderItem(mnemonic=WELL, unit=, value=ANY ET AL OIL WELL #12, descr=WELL, original_mnemonic=WELL),
HeaderItem(mnemonic=FLD, unit=, value=EDAM, descr=FIELD, original_mnemonic=FLD),
HeaderItem(mnemonic=LOC, unit=, value=A9-16-49, descr=LOCATION, original_mnemonic=LOC),
HeaderItem(mnemonic=PROV, unit=, value=SASKATCHEWAN, descr=PROVINCE, original_mnemonic=PROV),
HeaderItem(mnemonic=SRVC, unit=, value=ANY LOGGING COMPANY LTD., descr=SERVICE COMPANY, original_mnemonic=SRVC),
HeaderItem(mnemonic=DATE, unit=, value=25-DEC-1988, descr=LOG DATE, original_mnemonic=DATE),
HeaderItem(mnemonic=UWI, unit=, value=100091604920, descr=UNIQUE WELL ID, original_mnemonic=UWI)]
>>> las.params
[HeaderItem(mnemonic=BHT, unit=DEGC, value=35.5, descr=BOTTOM HOLE TEMPERATURE, original_mnemonic=BHT),
HeaderItem(mnemonic=BS, unit=MM, value=200.0, descr=BIT SIZE, original_mnemonic=BS),
HeaderItem(mnemonic=FD, unit=K/M3, value=1000.0, descr=FLUID DENSITY, original_mnemonic=FD),
HeaderItem(mnemonic=MATR, unit=, value=0.0, descr=NEUTRON MATRIX(0=LIME,1=SAND,2=DOLO), original_mnemonic=MATR),
HeaderItem(mnemonic=MDEN, unit=, value=2710.0, descr=LOGGING MATRIX DENSITY, original_mnemonic=MDEN),
HeaderItem(mnemonic=RMF, unit=OHMM, value=0.216, descr=MUD FILTRATE RESISTIVITY, original_mnemonic=RMF),
HeaderItem(mnemonic=DFD, unit=K/M3, value=1525.0, descr=DRILL FLUID DENSITY, original_mnemonic=DFD)]

The data is stored as a 2D numpy array:

>>> las.data
array([[ 1670.   ,   123.45 ,  2550.   , ...,   123.45 ,   110.2  ,   105.6  ],
       [ 1669.875,   123.45 ,  2550.   , ...,   123.45 ,   110.2  ,   105.6  ],
       [ 1669.75 ,   123.45 ,  2550.   , ...,   123.45 ,   110.2  ,   105.6  ],
       ...,
       [ 1669.75 ,   123.45 ,  2550.   , ...,   123.45 ,   110.2  ,   105.6  ],
       [ 1670.   ,   123.45 ,  2550.   , ...,   123.45 ,   110.2  ,   105.6  ],
       [ 1669.875,   123.45 ,  2550.   , ...,   123.45 ,   110.2  ,   105.6  ]])

You can also retrieve and load data as a pandas DataFrame, build LAS files from scratch, write them back to disc, and export to Excel, amongst other things.

See the package documentation for more details.

License

MIT

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].