Movatterモバイル変換


[0]ホーム

URL:


Skip to main content
PyPI

lasio 0.32

pip install lasio

Latest version

Released:

Read/write well data from Log ASCII Standard (LAS) files

Verified details

These details have beenverified by PyPI
Maintainers
Avatar for kinverarity from gravatar.comkinverarity

Unverified details

These details havenot been verified by PyPI
Meta
  • License: MIT License (MIT)
  • Author:Kent Inverarity
  • Tags geophysics, io, science
  • Requires: Python >=3.9
  • Provides-Extra:all,test

Project description

lasio

Documentation (stable)Documentation (main branch)

Run testsPyPI versionCode StyleLicense

Read and write Log ASCII Standard files with Python.

This is a Python 3.7+ package to read and write Log ASCII Standard(LAS) files, used for borehole data such as geophysical, geological, orpetrophysical logs. It's compatible with versions 1.2 and 2.0 of the LAS filespecification, published by theCanadian Well LoggingSociety. Support for LAS 3 isbeing worked on.

lasio is primarily for reading and writing data and metadata to and fromLAS files. It is designed to read as many LAS files as possible, includingthose containing common errors and non-compliant formatting. It can be useddirectly, but you may want to consider using some other packages, dependingon your priorities:

  • welly is a Python package thatuses lasio for I/O but provides alot more functionality aimed at workingwith curves, wells, and projects. I would recommend starting there in mostcases, to avoid re-inventing the wheel!
  • lascheck is focused onchecking whether your LAS file meets the specifications.
  • lasr is an R package whichis designed to read large amounts of data quickly from LAS files; this isa great thing to check out if speed is a priority for you, as lasio is notparticularly fast.
  • LiDAR surveys are also called "LAS files", but they are quite different andlasio will not help you -- check outlaspyinstead.

lasiostoppedsupporting Python 2.7 in August 2020. The final version of lasio with Python 2.7 supportis version 0.26.

Code of conduct

See ourcode of conduct.

Quick start

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

$pipinstalllasio

To make sure you have everything, use this to ensure pandas, chardet, andopenpyxl are also installed:

$pipinstalllasio[all]

Example session:

>>>importlasio

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 asCurveItem objects with associated metadata:

>>>las.curves[CurveItem(mnemonic=DEPT,unit=M,value=,descr=1DEPTH,original_mnemonic=DEPT,data.shape=(29897,)),CurveItem(mnemonic=DT,unit=US/M,value=,descr=2SONICTRANSITTIME,original_mnemonic=DT,data.shape=(29897,)),CurveItem(mnemonic=RHOB,unit=K/M3,value=,descr=3BULKDENSITY,original_mnemonic=RHOB,data.shape=(29897,)),CurveItem(mnemonic=NPHI,unit=V/V,value=,descr=4NEUTRONPOROSITY,original_mnemonic=NPHI,data.shape=(29897,)),CurveItem(mnemonic=SFLU,unit=OHMM,value=,descr=5RXORESISTIVITY,original_mnemonic=SFLU,data.shape=(29897,)),CurveItem(mnemonic=SFLA,unit=OHMM,value=,descr=6SHALLOWRESISTIVITY,original_mnemonic=SFLA,data.shape=(29897,)),CurveItem(mnemonic=ILM,unit=OHMM,value=,descr=7MEDIUMRESISTIVITY,original_mnemonic=ILM,data.shape=(29897,)),CurveItem(mnemonic=ILD,unit=OHMM,value=,descr=8DEEPRESISTIVITY,original_mnemonic=ILD,data.shape=(29897,))]

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

>>>las.version[HeaderItem(mnemonic=VERS,unit=,value=1.2,descr=CWLSLOGASCIISTANDARD-VERSION1.2,original_mnemonic=VERS),HeaderItem(mnemonic=WRAP,unit=,value=NO,descr=ONELINEPERDEPTHSTEP,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=ANYOILCOMPANYLTD.,descr=COMPANY,original_mnemonic=COMP),HeaderItem(mnemonic=WELL,unit=,value=ANYETALOILWELL#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=ANYLOGGINGCOMPANYLTD.,descr=SERVICECOMPANY,original_mnemonic=SRVC),HeaderItem(mnemonic=DATE,unit=,value=25-DEC-1988,descr=LOGDATE,original_mnemonic=DATE),HeaderItem(mnemonic=UWI,unit=,value=100091604920,descr=UNIQUEWELLID,original_mnemonic=UWI)]>>>las.params[HeaderItem(mnemonic=BHT,unit=DEGC,value=35.5,descr=BOTTOMHOLETEMPERATURE,original_mnemonic=BHT),HeaderItem(mnemonic=BS,unit=MM,value=200.0,descr=BITSIZE,original_mnemonic=BS),HeaderItem(mnemonic=FD,unit=K/M3,value=1000.0,descr=FLUIDDENSITY,original_mnemonic=FD),HeaderItem(mnemonic=MATR,unit=,value=0.0,descr=NEUTRONMATRIX(0=LIME,1=SAND,2=DOLO),original_mnemonic=MATR),HeaderItem(mnemonic=MDEN,unit=,value=2710.0,descr=LOGGINGMATRIXDENSITY,original_mnemonic=MDEN),HeaderItem(mnemonic=RMF,unit=OHMM,value=0.216,descr=MUDFILTRATERESISTIVITY,original_mnemonic=RMF),HeaderItem(mnemonic=DFD,unit=K/M3,value=1525.0,descr=DRILLFLUIDDENSITY,original_mnemonic=DFD)]

The data is stored as a 2D numpy array:

>>>las.dataarray([[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 apandas DataFrame, build LAS filesfrom scratch, write them back to disc, and export to Excel, amongst otherthings.

See thepackage documentation formore details.

Contributing

Contributions are invited and welcome.

SeeContributing for how to get started.

License

MIT

Project details

Verified details

These details have beenverified by PyPI
Maintainers
Avatar for kinverarity from gravatar.comkinverarity

Unverified details

These details havenot been verified by PyPI
Meta
  • License: MIT License (MIT)
  • Author:Kent Inverarity
  • Tags geophysics, io, science
  • Requires: Python >=3.9
  • Provides-Extra:all,test

Download files

Download the file for your platform. If you're not sure which to choose, learn more aboutinstalling packages.

Source Distributions

No source distribution files available for this release.See tutorial ongenerating distribution archives.

Built Distribution

Filter files by name, interpreter, ABI, and platform.

If you're not sure about the file name format, learn more aboutwheel file names.

Copy a direct link to the current filters

lasio-0.32-py3-none-any.whl (46.5 kBview details)

UploadedPython 3

File details

Details for the filelasio-0.32-py3-none-any.whl.

File metadata

  • Download URL:lasio-0.32-py3-none-any.whl
  • Upload date:
  • Size: 46.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.11.0

File hashes

Hashes for lasio-0.32-py3-none-any.whl
AlgorithmHash digest
SHA2564c0daa5f99d99b505a62ce58144d2512944ac6ee8e620ab251109d8f2a6ca7f8
MD53538d42ab16212ce68b2857332c1c014
BLAKE2b-256da537dbbcacaee53dbb6b7dabd83c5e7de0bc613db343175e694da61404a1264

See more details on using hashes here.

Supported by

AWS Cloud computing and Security SponsorDatadog MonitoringDepot Continuous IntegrationFastly CDNGoogle Download AnalyticsPingdom MonitoringSentry Error loggingStatusPage Status page

[8]ページ先頭

©2009-2025 Movatter.jp