AgentSkillsCN

dlisio

读取并解析DLIS(数字测井交换标准)与LIS(测井信息标准)测井文件。当Claude需要执行以下操作时使用:(1) 读取/解析DLIS或LIS文件;(2) 将测井曲线提取为NumPy数组;(3) 访问文件元数据与原始信息;(4) 处理多帧或多文件的DLIS数据;(5) 将DLIS转换为LAS或DataFrame格式;(6) 支持RP66格式测井数据;(7) 处理阵列或图像测井数据。

SKILL.md
--- frontmatter
name: dlisio
description: |
  Read and parse DLIS (Digital Log Interchange Standard) and LIS (Log Information
  Standard) well log files. Use when Claude needs to: (1) Read/parse DLIS or LIS
  files, (2) Extract well log curves as numpy arrays, (3) Access file metadata and
  origin information, (4) Handle multi-frame or multi-file DLIS, (5) Convert DLIS
  to LAS or DataFrame, (6) Work with RP66 format well logs, (7) Process array or
  image log data.

dlisio - DLIS/LIS File Reader

Quick Reference

python
import dlisio

# Open DLIS file (returns generator of logical files)
with dlisio.dlis.load('well.dlis') as (f, *rest):
    frame = f.frames[0]
    curves = frame.curves()

    # Access by channel name
    depth = curves['DEPTH']
    gr = curves['GR']

    # File metadata
    for origin in f.origins:
        print(origin.well_name, origin.field_name)

Key Classes

ClassPurpose
PhysicalFileContainer returned by dlis.load()
LogicalFileIndependent dataset within physical file
FrameGroup of channels with common sampling
ChannelIndividual log curve with metadata
OriginWell and file metadata

Essential Operations

Read Curves to DataFrame

python
import pandas as pd

with dlisio.dlis.load('well.dlis') as (f, *_):
    frame = f.frames[0]
    curves = frame.curves()
    df = pd.DataFrame(curves)
    df.set_index('DEPTH', inplace=True)

Access Channel and Origin Metadata

python
with dlisio.dlis.load('well.dlis') as (f, *_):
    # Origin metadata
    for origin in f.origins:
        print(f"Well: {origin.well_name}, Field: {origin.field_name}")

    # Channel properties
    for ch in f.frames[0].channels:
        print(f"{ch.name}: {ch.units}, dim={ch.dimension}")

Find Channels Across Frames

python
with dlisio.dlis.load('well.dlis') as (f, *_):
    # By exact name or regex
    channels = f.find('CHANNEL', '.*GR.*', regex=True)

    # Find frame containing specific channel
    for frame in f.frames:
        if 'GR' in [ch.name for ch in frame.channels]:
            curves = frame.curves()
            break

Handle Array Channels

python
with dlisio.dlis.load('well.dlis') as (f, *_):
    curves = f.frames[0].curves()
    for name, data in curves.items():
        if data.ndim > 1:
            print(f"{name}: shape = {data.shape}")  # Image/waveform

Common Object Types

Object TypeDescription
ORIGINFile/well metadata
FRAMEChannel grouping with index
CHANNELLog curve definition
TOOLLogging tool info
PARAMETERConstants and settings

Common Curve Names

CurveDescription
DEPT, DEPTH, TDEPDepth curves
GRGamma ray
NPHINeutron porosity
RHOBBulk density
DT, DTCCompressional slowness
RT, ILDResistivity

Error Handling

python
dlisio.dlis.set_encodings(['utf-8', 'latin-1'])

try:
    with dlisio.dlis.load('file.dlis') as files:
        for f in files:
            curves = f.frames[0].curves()
except Exception as e:
    print(f"Error: {e}")

DLIS vs LAS Comparison

FeatureDLISLAS
FormatBinaryASCII
Multi-frameYesNo
Array dataYesLimited
MetadataRichBasic

References

Scripts