lasio
/lasio
Czyta, zapisuje i zmienia pliki LAS (Log ASCII Standard) z danymi otworowymi, wyciąga nagłówki i krzywe, konwertuje do DataFrame, CSV i Excela oraz radzi sobie z wadliwymi plikami.
- Autor
- steadfastasart ↗
- Repozytorium
- geoscience-skills ↗
- Licencja
- MIT
- Ostatnia zmiana repozytorium
- 15.09.2026
Ocena i bezpieczeństwo
- Pliki w paczce
- 7
- Skrypty
- 3
- Komentarze HTML
- 0
- Adresy URL w SKILL.md
- 0
Brak sygnałów. Repozytorium zmienione 15.09.2026, bez odwołań do wycofanych modeli i API.
MIT, otwarta: można używać i zmieniać, z zachowaniem informacji o autorze.
- 3 skrypty w paczce. Przejrzyj je przed instalacją, bo Claude może je uruchomić.
Skrypty: scripts/las_to_csv.py, scripts/merge_curves.py, scripts/validate_las.py
Co robi i kiedy
Czyta, zapisuje i zmienia pliki LAS (Log ASCII Standard) z danymi otworowymi, wyciąga nagłówki i krzywe, konwertuje do DataFrame, CSV i Excela oraz radzi sobie z wadliwymi plikami.
Oryginalny opis (EN)
Read, write, and manipulate LAS (Log ASCII Standard) well log files for borehole geophysical and petrophysical data. Use when the agent needs to: (1) Read/parse LAS 1.2 or 2.0 files, (2) Extract well headers or curve data, (3) Convert LAS to DataFrame/CSV/Excel, (4) Create new LAS files from arrays, (5) Modify existing LAS files, (6) Handle problematic or malformed LAS files, (7) Batch process multiple well files.
Jak działa
- Quick Reference
- Key Classes
- Essential Operations
- Null Value Handling
- Batch Processing
- When to Use vs Alternatives
- Common Workflows
- Common Issues
- References
- Scripts
Podgląd SKILL.md
---
name: lasio
description: |
Read, write, and manipulate LAS (Log ASCII Standard) well log files for borehole
geophysical and petrophysical data. Use when the agent needs to: (1) Read/parse LAS
1.2 or 2.0 files, (2) Extract well headers or curve data, (3) Convert LAS to
DataFrame/CSV/Excel, (4) Create new LAS files from arrays, (5) Modify existing
LAS files, (6) Handle problematic or malformed LAS files, (7) Batch process
multiple well files.
license: MIT
metadata:
version: 1.0.2
author: Geoscience Skills
tags: '["Well Logs", "LAS", "Petrophysics", "Data I/O", "Lasio", "CWLS", "Wireline", "Borehole"]'
dependencies: '["lasio>=0.30", "numpy", "pandas"]'
complements: '["welly", "petropy", "striplog"]'
workflow_role: data-loading
skill_type: domain
---
# lasio - LAS Well Log Files
## Quick Reference
```python
import lasio
# Read
las = lasio.read("well.las")
# Access data
df = las.df() # DataFrame (depth as index)
gr = las['GR'] # Single curve as numpy array
depth = las['DEPT']
# Well info
well_name = las.well['WELL'].value
uwi = las.well['UWI'].value
# Write
las.write('output.las')
```
## Key Classes
| Class | Purpose |
|-------|---------|
| `LASFile` | Main container - holds headers, curves, data |
| `CurveItem` | Single curve with mnemonic, unit, data array |
| `HeaderItem` | Header entry (mnemonic, unit, value, descr) |
## Essential Operations
### Read and Inspect
```python
las = lasio.read("well.las")
print(las.curves.keys()) # Available curves
print(las.well) # Well section headers
print(las.version) # LAS version info
```
### Access Curve Data
```python
# As numpy arrays
gr = las['GR']
depth = las['DEPT']
# With metadata
curve = las.curves['GR']
print(curve.unit, curve.descr) # 'GAPI', 'Gamma Ray'
```
### Create New LAS
```python
import numpy as np
las = lasio.LASFile()
las.well['WELL'] = lasio.HeaderItem('WELL', value='Test-1')
las.well['UWI'] = lasio.HeaderItem('UWI', value='12345678901234')
depth = np.arange(1000, 2000, 0.5)
las.append_curve('DEPT', depth, unit='M', descr='Depth')
las.append_curve('GR', gr_data, unit='GAPI', descr='Gamma Ray')
las.write('output.las')
```
### Modify Existing
```python
las = lasio.read("well.las")
las.append_curve('GR_NORM', las['GR'] / 150, unit='V/V')
del las.curves['BAD_CURVE']
las.well['WELL'].value = 'New Name'
las.write('modified.las')
```
### Handle Problematic Files
```python
# Ignore header errors
las = lasio.read("messy.las", ignore_header_errors=True)
# Check null value
null_val = las.well['NULL'].value # Usually -999.25
```
## Null Value Handling
LAS files use a specific null value (typically -999.25). Always check and handle:
```python
import numpy as np
null_val = float(las.well['NULL'].value)
df = las.df().replace(null_val, np.nan)
```
## Batch Processing
```python
from pathlib import Path
for path in Path('wells/').glob('*.las'):
las = lasio.read(path)
df = las.df()
# Process...
```
## When to Use vs Alternatives
| Tool | Best For |
|------|----------|
| **lasio** | Direct LAS file I/O, header manipulation, format conversion |
| **welly** | Higher-level well analysis, curve processing, multi-well projects |
| **dlisio** | DLIS/RP66 binary format files (not LAS) |
**Use lasio when** you need low-level control over LAS file reading/writing,
need to handle malformed files, or want to programmatically build LAS files.
**Use welly instead** when you need curve processing (despike, normalize),
multi-well project management, or formation tops. Welly uses lasio internally.
**Use dlisio instead** when your data is in DLIS format. DLIS files are binary,
support multi-frame data and array logs -- lasio cannot read them.
## Common Workflows
### Read, QC, and export well log data
```text
- [ ] Read LAS file with `lasio.read()`, handle encoding if needed
- [ ] Inspect curves: `las.curves.keys()` and well headers
- [ ] Replace null values: `df.replace(null_val, np.nan)`
- [ ] Validate depth range and sample interval
- [ ] Check for missing curves or anomalous values
- [ ] Export to DataFrame with `las.df()` or write cleaned LAS
```
## Common Issues
| Issue | Solution |
|-------|----------|
| Encoding errors | `lasio.read(f, encoding='latin-1')` |
| Missing curves | Check `las.curves.keys()` first |
| Header errors | Use `ignore_header_errors=True` |
| Wrong null value | Check `las.well['NULL'].value` |
## References
- **[Curve Mnemonics](references/curve_mnemonics.md)** - Standard curve names and units
- **[Troubleshooting](references/troubleshooting.md)** - Common problems and solutions
- **[LAS File Structure](references/file_structure.md)** - Detailed format specification
## Scripts
- **[scripts/validate_las.py](scripts/validate_las.py)** - Validate LAS file format
- **[scripts/las_to_csv.py](scripts/las_to_csv.py)** - Convert LAS to CSV
- **[scripts/merge_curves.py](scripts/merge_curves.py)** - Merge curves from multiple files
Pliki w paczce (7)
- SKILL.md 5 KB
- references/curve_mnemonics.md 3 KB
- references/file_structure.md 5 KB
- references/troubleshooting.md 5 KB
- scripts/las_to_csv.py 3 KB
- scripts/merge_curves.py 7 KB
- scripts/validate_las.py 5 KB
Wersje
W bazie nie ma innych skilli o nazwie lasio.
Migawka bazy z 13.11.2026 · wersja paczki 65735998b79a (skrót SHA-256 całej paczki)
Pobrania w ostatnich 30 dniach: 0 · ranking
Zgłoś problem z tym skillem: szkodliwa treść, błędny opis albo prośba autora o usunięcie.
Podobne skille
- 100welly
Wczytuje dane z odwiertów z plików LAS, zarządza wieloma odwiertami, stropami formacji i kontrolą jakości krzywych. - 100dlisio
Czyta i parsuje pliki well log DLIS i LIS: wyciąga krzywe jako tablice numpy, odczytuje metadane, obsługuje wieloramkowe i wieloplikowe DLIS, konwertuje do LAS lub DataFrame i pracuje z logami obrazowymi. - 100automated-log-analysis
Przetwarza karotaże studni LAS 2.0, liczy deterministyczną ocenę petrofizyczną (Vshale, porowatość, nasycenie Archiego, net pay, OOIP), rysuje log złożony, pisze raport Word i Markdown oraz szkicuje maila z wynikami. - 100alterlab-flowio
Odczytuje i zapisuje pliki cytometrii przepływowej FCS w wersjach 2.0 do 3.1, wyciąga dane zdarzeń jako tablice NumPy, metadane i definicje kanałów oraz konwertuje je do CSV lub pandas. - 88office-files
Czyta, wyciąga tekst i tabele, edytuje, tworzy, łączy, wypełnia formularze i konwertuje pliki PDF, Word, Excel, CSV i PowerPoint. - 96byted-las-audio-extract-and-split
Wyodrębnia ścieżkę dźwiękową z wideo i dzieli audio na fragmenty według czasu trwania lub reguł, także przy długich nagraniach.