Closed bneelon85 closed 3 years ago
Hello, thanks for your interest. The latest release made in January made some changes and the docs are currently out-of-sync. For now you should consider this package as unstable.
Ok thanks. Good to know.
Are you recommending to not use the package at all? or just that the docs don't necessarily represent how the code works now? If it still "works", do you have any insight as to how to go from:
md, inc, azi = wp.read_csv(fname)
md = wp.unit_convert(md, src='ft', dst='m')
elevation = wp.unit_convert(header['elevation'],
src=header['elevation_units'], dst='m')
surface_easting = wp.unit_convert(header['surface_easting'],
src=header['surface_coordinates_units'],
dst='m')
surface_northing = wp.unit_convert(header['surface_northing'],
src=header['surface_coordinates_units'],
dst='m')
To converting to a position log using minimum curvature method?
So the API changed quite a bit from when the docs were wriiten, and while I plan to correct them soon, I don't currently have time. So for now I'd suggest you check out https://github.com/jonnymaserati/welleng which is being developped more actively. Also, wellpathpy really only aims to handle deviations, wheres welleng goes further.
So if it's urgent and you're looking for well planning, go to welleng, if you're only after deviations and have time, keep an eye on wellpathpy.
I hope that helps.
Currently, you could use this approach to load a CSV of a deviation survey and get back a positional log using minimum curvature:
md, inc, azi = wellpathpy.read_csv(
'./wellpathpy/test/fixtures/well10.csv',
md = 'Measured Depth ( ft )',
inc = 'Inclination ( deg )',
azi = 'Azimuth Grid ( deg )',
sep=",",
)
dev = wellpathpy.deviation(
md = md,
inc = inc,
azi = azi,
)
depths = list(range(0, int(dev.md[-1]) + 1, 30))
pos = dev.minimum_curvature().resample(depths = depths)
# pos is a position log, you can then go back to a deviation with:
dev2 = pos.deviation()
for md, inc, azi in zip(dev2.md, dev2.inc, dev2.azi):
print(f'md = {md:.3f} inc = {inc:.3f}° azi = {azi:.3f}°')
This is great, thanks! And I'll check out welleng also!
I've been messing a bit with your library to see if it can help our team. Excited for the potential!
2 things:
tvd, northing, easting, dls = wp.mininum_curvature(md, inc, azi, course_length=30)
tvd, northing, easting, dls = wp.minimum_curvature(md, inc, azi, course_length=30)
still returnsAttributeError: module 'wellpathpy' has no attribute 'minimum_curvature'
Inspecting
__init__.py
i seeminimum_curvature
is not imported.Stepping into
position_log.py
i noticed there is aminimum_curvature
function in thedeviation
class, so I tried to run:tvd, northing, easting, dls = wp.deviation.minimum_curvature(md, inc, azi, course_length=30)
but got:TypeError: minimum_curvature() got multiple values for argument 'course_length'
Could it be as simple as also importing the
minimum_curvature
class fromposition_log.py
within__init__.py
?Thanks for any help you can provide here!