lasio
Python library for reading and writing well data using Log ASCII Standard (LAS) files
Science Score: 44.0%
This score indicates how likely this project is to be science-related based on various indicators:
-
✓CITATION.cff file
Found CITATION.cff file -
✓codemeta.json file
Found codemeta.json file -
✓.zenodo.json file
Found .zenodo.json file -
○DOI references
-
○Academic publication links
-
○Committers with academic emails
-
○Institutional organization owner
-
○JOSS paper metadata
-
○Scientific vocabulary similarity
Low similarity (17.2%) to scientific vocabulary
Keywords
Keywords from Contributors
Repository
Python library for reading and writing well data using Log ASCII Standard (LAS) files
Basic Info
- Host: GitHub
- Owner: kinverarity1
- License: mit
- Language: Lasso
- Default Branch: main
- Homepage: https://lasio.readthedocs.io/en/latest/
- Size: 5.03 MB
Statistics
- Stars: 368
- Watchers: 32
- Forks: 161
- Open Issues: 53
- Releases: 28
Topics
Metadata Files
README.md
lasio
Documentation (stable) • Documentation (main branch)
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, 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.
lasio is primarily for reading and writing data and metadata to and from LAS files. It is designed to read as many LAS files as possible, including those containing common errors and non-compliant formatting. It can be used directly, but you may want to consider using some other packages, depending on your priorities:
- welly is a Python package that uses lasio for I/O but provides a lot more functionality aimed at working with curves, wells, and projects. I would recommend starting there in most cases, to avoid re-inventing the wheel!
- lascheck is focused on checking whether your LAS file meets the specifications.
- lasr is an R package which is designed to read large amounts of data quickly from LAS files; this is a great thing to check out if speed is a priority for you, as lasio is not particularly fast.
- LiDAR surveys are also called "LAS files", but they are quite different and lasio will not help you -- check out laspy instead.
lasio stopped supporting Python 2.7 in August 2020. The final version of lasio with Python 2.7 support is version 0.26.
Code of conduct
See our code of conduct.
Quick start
For the minimum working requirements, you'll need numpy installed. Install lasio with:
bash
$ pip install lasio
To make sure you have everything, use this to ensure pandas, chardet, and openpyxl are also installed:
bash
$ pip install lasio[all]
Example session:
```python
import lasio ```
You can read the file using a filename, file-like object, or URL:
```python
las = lasio.read("sample_rev.las") ```
Data is accessible both directly as numpy arrays
```python
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:
```python
las.curves [CurveItem(mnemonic=DEPT, unit=M, value=, descr=1 DEPTH, originalmnemonic=DEPT, data.shape=(29897,)), CurveItem(mnemonic=DT, unit=US/M, value=, descr=2 SONIC TRANSIT TIME, originalmnemonic=DT, data.shape=(29897,)), CurveItem(mnemonic=RHOB, unit=K/M3, value=, descr=3 BULK DENSITY, originalmnemonic=RHOB, data.shape=(29897,)), CurveItem(mnemonic=NPHI, unit=V/V, value=, descr=4 NEUTRON POROSITY, originalmnemonic=NPHI, data.shape=(29897,)), CurveItem(mnemonic=SFLU, unit=OHMM, value=, descr=5 RXO RESISTIVITY, originalmnemonic=SFLU, data.shape=(29897,)), CurveItem(mnemonic=SFLA, unit=OHMM, value=, descr=6 SHALLOW RESISTIVITY, originalmnemonic=SFLA, data.shape=(29897,)), CurveItem(mnemonic=ILM, unit=OHMM, value=, descr=7 MEDIUM RESISTIVITY, originalmnemonic=ILM, data.shape=(29897,)), CurveItem(mnemonic=ILD, unit=OHMM, value=, descr=8 DEEP RESISTIVITY, originalmnemonic=ILD, data.shape=(29897,))] ```
Header information is parsed into simple HeaderItem objects, and stored in a dictionary for each section of the header:
```python
las.version [HeaderItem(mnemonic=VERS, unit=, value=1.2, descr=CWLS LOG ASCII STANDARD -VERSION 1.2, originalmnemonic=VERS), HeaderItem(mnemonic=WRAP, unit=, value=NO, descr=ONE LINE PER DEPTH STEP, originalmnemonic=WRAP)] las.well [HeaderItem(mnemonic=STRT, unit=M, value=1670.0, descr=, originalmnemonic=STRT), HeaderItem(mnemonic=STOP, unit=M, value=1660.0, descr=, originalmnemonic=STOP), HeaderItem(mnemonic=STEP, unit=M, value=-0.125, descr=, originalmnemonic=STEP), HeaderItem(mnemonic=NULL, unit=, value=-999.25, descr=, originalmnemonic=NULL), HeaderItem(mnemonic=COMP, unit=, value=ANY OIL COMPANY LTD., descr=COMPANY, originalmnemonic=COMP), HeaderItem(mnemonic=WELL, unit=, value=ANY ET AL OIL WELL #12, descr=WELL, originalmnemonic=WELL), HeaderItem(mnemonic=FLD, unit=, value=EDAM, descr=FIELD, originalmnemonic=FLD), HeaderItem(mnemonic=LOC, unit=, value=A9-16-49, descr=LOCATION, originalmnemonic=LOC), HeaderItem(mnemonic=PROV, unit=, value=SASKATCHEWAN, descr=PROVINCE, originalmnemonic=PROV), HeaderItem(mnemonic=SRVC, unit=, value=ANY LOGGING COMPANY LTD., descr=SERVICE COMPANY, originalmnemonic=SRVC), HeaderItem(mnemonic=DATE, unit=, value=25-DEC-1988, descr=LOG DATE, originalmnemonic=DATE), HeaderItem(mnemonic=UWI, unit=, value=100091604920, descr=UNIQUE WELL ID, originalmnemonic=UWI)] las.params [HeaderItem(mnemonic=BHT, unit=DEGC, value=35.5, descr=BOTTOM HOLE TEMPERATURE, originalmnemonic=BHT), HeaderItem(mnemonic=BS, unit=MM, value=200.0, descr=BIT SIZE, originalmnemonic=BS), HeaderItem(mnemonic=FD, unit=K/M3, value=1000.0, descr=FLUID DENSITY, originalmnemonic=FD), HeaderItem(mnemonic=MATR, unit=, value=0.0, descr=NEUTRON MATRIX(0=LIME,1=SAND,2=DOLO), originalmnemonic=MATR), HeaderItem(mnemonic=MDEN, unit=, value=2710.0, descr=LOGGING MATRIX DENSITY, originalmnemonic=MDEN), HeaderItem(mnemonic=RMF, unit=OHMM, value=0.216, descr=MUD FILTRATE RESISTIVITY, originalmnemonic=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:
```python
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.
Contributing
Contributions are invited and welcome.
See Contributing for how to get started.
License
Owner
- Name: Kent
- Login: kinverarity1
- Kind: user
- Repositories: 90
- Profile: https://github.com/kinverarity1
Citation (CITATION.cff)
cff-version: 1.2.0
message: Please cite this software using these metadata.
title: Lasio
abstract: Read and write Log ASCII Standard files with Python.
authors:
- family-names: Inverarity
given-names: Kent
orcid: https://orcid.org/0000-0002-5902-2007
- name: "Lasio contributors"
website: "https://lasio.readthedocs.io/en/latest/contributing.html"
repository-code: "https://github.com/kinverarity1/lasio"
version: 0.32
url: https://github.com/kinverarity1/lasio/releases/tag/v0.31
commit: 357cec616fbcc7d47b5a77ea4087433b6e52acdc
date-released: 2023-05-18
license: MIT
type: software
GitHub Events
Total
- Issues event: 3
- Watch event: 25
- Issue comment event: 11
- Push event: 4
- Pull request review event: 3
- Pull request event: 5
- Fork event: 10
- Create event: 3
Last Year
- Issues event: 3
- Watch event: 25
- Issue comment event: 11
- Push event: 4
- Pull request review event: 3
- Pull request event: 5
- Fork event: 10
- Create event: 3
Committers
Last synced: 8 months ago
Top Committers
| Name | Commits | |
|---|---|---|
| Kent Inverarity | k****y@h****m | 686 |
| dcslagel | d****s@m****g | 137 |
| Kent Inverarity | 16 | |
| Kent Inverarity | N****e | 13 |
| VelizarVESSELINOV | VV@V****l | 13 |
| geophysics | g****s@1****8 | 13 |
| MandarJKulkarni | 3****i | 12 |
| dagrha | d****a | 12 |
| Kent Inverarity | 2****8@e****u | 6 |
| David Hart | d****t | 5 |
| Steve Purves | s****s@e****m | 4 |
| kwinkunks | m****t@a****m | 3 |
| krzysztof-slowinski | k****i@t****m | 2 |
| dagrha | d****u@g****m | 2 |
| VelizarVESSELINOV | VV@s****m | 2 |
| Eric Schoen | e****n@i****m | 2 |
| Bjørn Dissing | b****g@z****m | 2 |
| Bernhard F.W. Gschaider | b****d@h****m | 2 |
| Josh Wildman | 4****5 | 2 |
| Frank Male | f****e@g****m | 2 |
| Velizar VESSELINOV | v****v@g****m | 2 |
| Adam Wulf | a****f@g****m | 1 |
| bgschaid | b****b@g****m | 1 |
| gvaleras | g****s@o****m | 1 |
| tim.morgan | t****n@g****m | 1 |
| Kent Inverarity | k****y@e****u | 1 |
| jeremie | j****l@s****m | 1 |
| Åsmund Hjulstad | A****U@s****m | 1 |
| Eugene Petkevich | n****e@g****m | 1 |
| Justin Gosses | J****S | 1 |
| and 7 more... | ||
Committer Domains (Top 20 + Academic)
Issues and Pull Requests
Last synced: 6 months ago
All Time
- Total issues: 61
- Total pull requests: 69
- Average time to close issues: about 1 year
- Average time to close pull requests: 13 days
- Total issue authors: 30
- Total pull request authors: 10
- Average comments per issue: 3.26
- Average comments per pull request: 1.35
- Merged pull requests: 59
- Bot issues: 0
- Bot pull requests: 0
Past Year
- Issues: 1
- Pull requests: 6
- Average time to close issues: N/A
- Average time to close pull requests: about 1 month
- Issue authors: 1
- Pull request authors: 2
- Average comments per issue: 0.0
- Average comments per pull request: 2.17
- Merged pull requests: 6
- Bot issues: 0
- Bot pull requests: 0
Top Authors
Issue Authors
- kinverarity1 (18)
- dcslagel (8)
- Soumya3276 (6)
- MarcosGuerreroA (2)
- Aycon3296 (2)
- kwinkunks (1)
- the-mysh (1)
- pieterpauw (1)
- issimo007 (1)
- LuisNavarro93 (1)
- lovkush-shell (1)
- bezova (1)
- sfc-gh-twhite (1)
- s0rhe1m (1)
- KristianKjerstad (1)
Pull Request Authors
- dcslagel (38)
- kinverarity1 (18)
- frank1010111 (4)
- jwildman135 (2)
- gvaleras (2)
- ltbrizolara (2)
- kwinkunks (1)
- bgschaid (1)
- emilykl (1)
- connortann (1)
Top Labels
Issue Labels
Pull Request Labels
Packages
- Total packages: 2
-
Total downloads:
- pypi 109,197 last-month
- Total docker downloads: 119
-
Total dependent packages: 13
(may contain duplicates) -
Total dependent repositories: 62
(may contain duplicates) - Total versions: 45
- Total maintainers: 1
pypi.org: lasio
Read/write well data from Log ASCII Standard (LAS) files
- Documentation: https://lasio.readthedocs.io/
- License: MIT
-
Latest release: 0.25.1
published almost 6 years ago
Rankings
Maintainers (1)
proxy.golang.org: github.com/kinverarity1/lasio
- Documentation: https://pkg.go.dev/github.com/kinverarity1/lasio#section-documentation
- License: mit
-
Latest release: v0.25.1
published almost 6 years ago
Rankings
Dependencies
- actions/checkout v2 composite
- actions/setup-python v2 composite
- python 3 build
- IPython *
- lasio *