log2frame
import log2frame
A function to read well log data in LAS, LIS and DLIS formats and extract curves data as DataFrame.
The curves and header data are stored in an instance of Log class, designed to hold this data and operate with it. It provides convenient access to metadata like well name, UWI, and curve units (via .units or the safer .units_dict()).
If multiple log files are read together, the Log instances are packed in a Pack instance, designed to hold Log instances and operate with them.
unit-aware mode
When simpandas is installed, log2frame can preserve curve units and index units through the use_simpandas option.
log2frame.read(path, use_simpandas=False)returns plain pandas-backedLoginstances.log2frame.read(path, use_simpandas=True)usessimpandas.SimDataFramewhen available.- If
use_simpandasis omitted, the package defaults to the installedsimpandassetting.
to read log files
Simply call the function read() with the path or path pattern as argument:
to export / write LAS files
Use write_las() to export a Log back to a LAS file:
log2frame.write_las( log, path_to_file )— writes LAS 2.0 by defaultlog2frame.write_las( log, path_to_file, version=1.2 )— LAS 1.2log.to_las( path_to_file )— equivalent convenience method onLog
a single log file
To load a single .las, .lis or .dlis file. The function will return a Log instance containing the data:
log2frame.read( path_to_file )
several files in a folder
To load several files at once. In this case the read() function will return a Pack instance containing a Log instance for each log file:
log2frame.read( path_to_folder_containing_files/*.* )By default, any invalid file will be ignored, thus, there is no problem to have other files in the same folder as the log files.
several files recursively
To read files recursively in subdirectories, use the appropriate fnmatch pattern:
log2frame.read( path_to_folder_containing_files/**/*.* )
further examples and details
Please refer to the Jupyter notebook log2frame_demo for further examples and details on how to use log2frame.
The sample data is publicly available at NLOG.
Release files for log2frame 0.2.3
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| log2frame-0.2.3.tar.gz | 32.4 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| log2frame-0.2.3-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 65.1 kB
Release files / log2frame-0.2.3.tar.gz
| Download URL | log2frame-0.2.3.tar.gz |
|---|---|
| Size | 32.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
4984fce9fb560b9b5a5c0e0935111c1cb2c433a2681a1a9297e4faaf5a4a3991
|
|
BLAKE2b-256 checksum How to use checksums |
b9ab72bd7b44aecf4bcd4fb3cefdc96d12afc24e41f68dd851f3e438050d3a2c
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.14.0
|
Release files / log2frame-0.2.3-py3-none-any.whl
| Download URL | log2frame-0.2.3-py3-none-any.whl |
|---|---|
| Size | 32.6 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
40b694e41e299e20f46f83404313062a901a9ace8018026272b1606fef2ba114
|
|
BLAKE2b-256 checksum How to use checksums |
762fb0fba627101c4f9da4fafe8f9bd8d5498c785c8451c7aed38477ec5fe971
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.14.0
|