Open xJAGx opened 2 years ago
XYZ_Survey.csv
import wellpathpy as wp import matplotlib.pyplot as plt import pandas as pd import numpy as np np.set_printoptions(suppress=True) import inspect md, inc, azi = wp.read_csv("XYZ_Survey")
dev = wp.deviation(md, inc, azi) dev
depth_step = 1 depths = list(range(0, int(dev.md[-1]) + 1, depth_step))
pos = dev.minimum_curvature().resample(depths = depths)
resampled_dev = pos.deviation() # After this line things go haywire
fig, ax = plt.subplots(1, 2, figsize=(8,10))
ax1 = plt.subplot2grid((1,2), (0,0)) ax2 = plt.subplot2grid((1,2), (0,1))
ax1.plot(resampled_dev.inc, resampled_dev.md, color='red') ax1.plot(dev.inc, dev.md, color = "black", marker='.', linewidth=0)
ax1.set_ylim(dev.md[-1], 0) ax1.set_xlim(0, 90) ax1.set_xlabel('Deviation', fontweight='bold', fontsize=14) ax1.set_ylabel('Measured Depth', fontweight='bold', fontsize=14) ax1.grid(color='lightgrey') ax1.set_axisbelow(True)
ax2.plot(resampled_dev.azi,resampled_dev.md, color='red') ax2.plot(dev.azi, dev.md, color = "black", marker='.', linewidth=0)
ax2.set_ylim(dev.md[-1], 0) ax2.set_xlim(0, 360) ax2.set_xlabel('Azimuth', fontweight='bold', fontsize=14) ax2.grid(color='lightgrey') ax2.set_axisbelow(True)
plt.show()
XYZ_Survey.csv
import wellpathpy as wp import matplotlib.pyplot as plt import pandas as pd import numpy as np np.set_printoptions(suppress=True) import inspect md, inc, azi = wp.read_csv("XYZ_Survey")
dev = wp.deviation(md, inc, azi) dev
print (md)
print (dev.md)
dev.md = md
depth_step = 1 depths = list(range(0, int(dev.md[-1]) + 1, depth_step))
pos = dev.minimum_curvature().resample(depths = depths)
resampled_dev = pos.deviation() # After this line things go haywire
print (dev)
print (resampled_dev)
print (resampled_dev.md)
print (resampled_dev.inc)
print (resampled_dev.azi)
resampled_dev ≠ dev
Plot to show issue - when depth_step = 10 issue is clearer.
fig, ax = plt.subplots(1, 2, figsize=(8,10))
ax1 = plt.subplot2grid((1,2), (0,0)) ax2 = plt.subplot2grid((1,2), (0,1))
ax1.plot(resampled_dev.inc, resampled_dev.md, color='red') ax1.plot(dev.inc, dev.md, color = "black", marker='.', linewidth=0)
ax1.set_ylim(dev.md[-1], 0) ax1.set_xlim(0, 90) ax1.set_xlabel('Deviation', fontweight='bold', fontsize=14) ax1.set_ylabel('Measured Depth', fontweight='bold', fontsize=14) ax1.grid(color='lightgrey') ax1.set_axisbelow(True)
ax2.plot(resampled_dev.azi,resampled_dev.md, color='red') ax2.plot(dev.azi, dev.md, color = "black", marker='.', linewidth=0)
ax2.set_ylim(dev.md[-1], 0) ax2.set_xlim(0, 360) ax2.set_xlabel('Azimuth', fontweight='bold', fontsize=14) ax2.grid(color='lightgrey') ax2.set_axisbelow(True)
plt.show()
Any help would be greatly appreciated!