In [1]:
from welly import Project
In [2]:
!ls *.LAS
In [3]:
p = Project.from_las("P-*.LAS")
In [4]:
len(p)
Out[4]:
In [5]:
p
Out[5]:
Typical, the UWIs are a disaster. Let's ignore this for now.
The Project is really just a list-like thing:
In [6]:
for w in p:
print(w.uwi)
In [7]:
%matplotlib inline
import matplotlib.pyplot as plt
In [8]:
alias = {'GR': ['GR', 'GRC', 'NGT']}
In [13]:
fig, axs = plt.subplots(figsize=(7, 14), ncols=len(p))
for i, (ax, w) in enumerate(zip(axs, p)):
gr = w.get_curve('GR', alias=alias)
if gr is not None:
ax = gr.plot(ax=ax)
ax.set_title("GR for\n{}".format(w.uwi))
plt.show()
In [17]:
keys = ['GR', 'DT']
df = p.df(keys=keys, alias=alias)
In [21]:
df.describe()
Out[21]:
In [22]:
df.loc['100/N14A/11E05'].DT.plot()
Out[22]:
In [23]:
x = df.loc['100/N14A/11E05'].index
idx = df.loc['100/N14A/11E05'].loc[(28<x) & (x<30)].index
idx
Out[23]:
In [24]:
import welly.quality as q
In [25]:
tests = {
# 'Each': [q.no_gaps],
'GR': [q.no_monotonic, q.no_flat, q.all_positive],
'DT': [q.all_positive, q.all_between(50, 200)],
}
In [26]:
from IPython.display import HTML
In [28]:
HTML(p.curve_table_html(keys=['CALI', 'GR', 'DT', 'SP'], tests=tests, alias=alias))
Out[28]:
In [ ]: