Loading...
Loading...
Compare original and translation side by side
from striplog import Striplog, Interval, Componentfrom striplog import Striplog, Interval, Componentundefinedundefined| Class | Purpose |
|---|---|
| Main log container - holds intervals |
| Depth interval with top, base, and components |
| Rock type definition with properties |
| Rock type dictionary with synonyms |
| Visualization styles (colors, patterns) |
| 类 | 用途 |
|---|---|
| 主日志容器 - 存储测井区间 |
| 包含顶部、底部深度及岩性组件的深度区间 |
| 带属性的岩石类型定义 |
| 含同义词的岩石类型词典 |
| 可视化样式(颜色、图案) |
undefinedundefinedundefinedundefinedfrom striplog import Striplog, Lexicon
description = """
0.0 - 5.5 m: Fine to medium sandstone
5.5 - 12.0 m: Grey shale with silt laminations
12.0 - 18.5 m: Massive limestone, fossiliferous
"""
strip = Striplog.from_description(description, lexicon=lexicon)from striplog import Striplog, Lexicon
description = """
0.0 - 5.5 m: 细至中粒砂岩
5.5 - 12.0 m: 灰色页岩,含粉砂纹层
12.0 - 18.5 m: 块状灰岩,含化石
"""
strip = Striplog.from_description(description, lexicon=lexicon)undefinedundefinedundefinedundefinedundefinedundefinedundefinedundefinedimport matplotlib.pyplot as plt
wells = [Striplog.from_csv(f'well{i}.csv') for i in range(1, 4)]
fig, axes = plt.subplots(1, 3, figsize=(10, 8), sharey=True)
for ax, well, name in zip(axes, wells, ['Well 1', 'Well 2', 'Well 3']):
well.plot(ax=ax, legend=legend)
ax.set_title(name)
plt.tight_layout()
plt.savefig('correlation.png')import matplotlib.pyplot as plt
wells = [Striplog.from_csv(f'well{i}.csv') for i in range(1, 4)]
fig, axes = plt.subplots(1, 3, figsize=(10, 8), sharey=True)
for ax, well, name in zip(axes, wells, ['Well 1', 'Well 2', 'Well 3']):
well.plot(ax=ax, legend=legend)
ax.set_title(name)
plt.tight_layout()
plt.savefig('correlation.png')strip.to_csv('output.csv')
strip.to_las('output.las')
strip.to_json('output.json')
df = strip.to_dataframe()strip.to_csv('output.csv')
strip.to_las('output.las')
strip.to_json('output.json')
df = strip.to_dataframe()| Pattern | Code | Typical Use |
|---|---|---|
| Dots | | Sandstone |
| Dashes | | Shale |
| Plus | | Limestone |
| X | | Dolomite |
| V | | Volcanic |
| 图案 | 代码 | 典型用途 |
|---|---|---|
| 圆点 | | 砂岩 |
| 短横线 | | 页岩 |
| 加号 | | 灰岩 |
| X形 | | 白云岩 |
| V形 | | 火山岩 |
| Tool | Best For |
|---|---|
| striplog | Structured lithology logs, interval-based data, NTG, correlation |
| welly | Well log curves (continuous data), multi-well projects |
| custom matplotlib | Simple one-off stratigraphic columns without interval logic |
| 工具 | 适用场景 |
|---|---|
| striplog | 结构化岩性日志、区间数据、净毛比计算、井间对比 |
| welly | 测井曲线(连续数据)、多井项目 |
| 自定义matplotlib | 无需区间逻辑的简单一次性地层柱状图 |
- [ ] Prepare CSV with columns: top, base, lithology (optionally color)
- [ ] Load with `Striplog.from_csv('lithology.csv')`
- [ ] Define Legend with colors and hatch patterns for each lithology
- [ ] Verify intervals: check for gaps or overlaps
- [ ] Merge adjacent same-lithology intervals with `merge_neighbours()`
- [ ] Compute statistics: `net_to_gross()`, `unique()`
- [ ] Plot with legend and export to desired format- [ ] 准备CSV文件,包含列:top, base, lithology(可选color)
- [ ] 使用`Striplog.from_csv('lithology.csv')`加载数据
- [ ] 定义Legend,为每种岩性设置颜色和填充图案
- [ ] 验证区间:检查是否存在间隙或重叠
- [ ] 使用`merge_neighbours()`合并相邻相同岩性的区间
- [ ] 计算统计数据:`net_to_gross()`、`unique()`
- [ ] 结合图例绘制图表并导出为所需格式| Issue | Solution |
|---|---|
| Text not parsing | Define a Lexicon with synonyms |
| Wrong colors | Create custom Legend with Decor objects |
| Gaps in log | Check interval top/base values match |
| Plot looks wrong | Verify depth direction (increasing down) |
| 问题 | 解决方案 |
|---|---|
| 文本解析失败 | 定义包含同义词的Lexicon |
| 颜色显示错误 | 使用Decor对象创建自定义Legend |
| 日志存在间隙 | 检查区间顶部/底部数值是否匹配 |
| 图表显示异常 | 验证深度方向(是否向下递增) |