In [1]:
import numpy as np
import matplotlib.pyplot as plt
%matplotlib inline
import welly
welly.__version__
Out[1]:
In [2]:
from welly import Well
In [3]:
w = Well.from_las('P-130_out.LAS')
In [4]:
w.data.keys()
Out[4]:
In [5]:
w.data['GR'].plot()
Load a deviation survey.
In [6]:
dev = np.loadtxt('P-130_deviation_survey.csv', delimiter=',', skiprows=1)
w.location.add_deviation(dev[:, :3], td=2618.3)
w.location.md2tvd(2000)
Out[6]:
Add a striplog.
In [7]:
from striplog import Legend, Striplog
legend = Legend.builtin('NSDOE')
strip = Striplog.from_image('P-130_25_2618.png', 25, 2618, legend=legend)
strip.plot(aspect=2)
In [8]:
w.data['strip'] = strip
In [9]:
tracks = ['MD', 'strip', 'GR', 'RHOB', ['DT', 'DTS'], 'M2R9', 'MD']
w.plot(tracks=tracks, legend=legend)
The legend doesn't have entries for the curves, so they are grey.
Let's add some.
In [10]:
curve_legend_csv = """colour,lw,ls,xlim,xscale,curve mnemonic
#ff0000,1.0,-,"0,200",linear,GR
blue,1.0,-,,linear,RHOB
#00ff00,1.0,--,,linear,DT
#ffff00,1.0,--,,linear,DTS
black,1.0,,,log,M2R9
"""
curve_legend = Legend.from_csv(text=curve_legend_csv)
In [11]:
complete_legend = legend + curve_legend
In [12]:
complete_legend[-6:]
Out[12]:
In [13]:
curve_legend.get_decor(w.data['GR'])
Out[13]:
In [14]:
w.data['GR'].plot(legend=curve_legend)
In [15]:
w.plot(tracks=tracks, legend=complete_legend, extents=(700, 1200))
In [16]:
w.data['GR'].plot_2d(cmap='viridis')
In [17]:
w.data['GR'].plot_2d(curve=True,cmap='viridis')
In [ ]: