<jupyter_start><jupyter_text>RGB well logsA quick demo for ECIM 2018.<jupyter_code>import welly
w = welly.Well.from_las('data/2090867.las')
w
logs = ['POTA', 'THOR', 'URAN']

import numpy as np
data = np.array([w.data[log] for log in logs]).T
data.shape
%matplotlib inline
import matplotlib.pyplot as plt
plt.imshow(data.reshape(-1, 1, 3), aspect=0.01)
plt.figure(figsize=(2, 12))
plt.imshow(data.reshape(-1, 1, 3), aspect='auto')<jupyter_output><empty_output><jupyter_text>Everything after this is just window dressing really. We should normalize the data for display, because POTA is in % and URAN and THOR are in ppm, and they all have different ranges. Of course, how we do that is up to us, but I'll try something naive first.Also, it seems we have a lot of stuff with low GR, and a few big spikes. This makes is hard to see the display. So we can apply some nonlinear scaling... how about just taking the square root for now?Also, maybe it would be nice to see the<jupyter_code>data.shape
def normalize(data):
    return (data - np.nanmin(data)) / (np.nanmax(data) - np.nanmin(data))

data = np.array([normalize(w.data[log]) for log in logs]).T
gr = w.data['GR']

fig, axs = plt.subplots(figsize=(4, 12), ncols=2)
axs[0].plot(gr, gr.basis)
axs[0].set_ylim(gr.stop, gr.start)
axs[1].imshow(np.sqrt(data.reshape(-1, 1, 3)), aspect='auto')
axs[1].set_yticklabels([])
axs[1].set_xticklabels([])
axs[0].set_title('GR')
axs[1].set_title('RGB')
axs[0].grid(color='k', alpha=0.2)
plt.show()<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.14888010540184454, 'fraction_numerical': 0.026350461133069828, 'mean_word_length': 5.225409836065574, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 9, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'chain_length': '2', 'dir': 'jupyter-structured-clean-dedup', 'id': '188151', 'license': 'Apache-2.0', 'n_tokens_mistral': 597, 'n_tokens_neox': 561, 'n_words': 173, 'path': 'RGB_logs.ipynb', 'repo_name': 'kwinkunks/ecim2018', 'size': '1518'}