Zabamund / wellpathpy

Well deviation import
GNU Lesser General Public License v3.0
78 stars 28 forks source link

Update docs for basic task: getting tvd, northing and easting from md, inc, azi #65

Closed kinverarity1 closed 2 years ago

kinverarity1 commented 2 years ago

When trying to go from three arrays for MD, inclination and azimuth, to TVD, easting and northing, the documentation is misleading. It suggests:

dev = wp.deviation(
    md = md,
    inc = inc,
    azi = azi,
    )
tvd, northing, easting, dls = dev.mininum_curvature(course_length=30)

but the second line here results in an error - my code:

dev = wp.deviation(md=df.index, inc=df['TILT'], azi=df['AZIMUT'])
tvd, northing, easting, dls = dev.minimum_curvature()
---------------------------------------------------------------------------
TypeError                                 Traceback (most recent call last)
Input In [35], in <cell line: 2>()
      9     y = float(las.well.NORTHING.value)
     10     dev = wp.deviation(md=df.index, inc=df['TILT'], azi=df['AZIMUT'])
---> 11     tvd, northing, easting, dls = dev.minimum_curvature()
     12     dhs.append({
     13         "las": las,
     14         "df": df,
   (...)
     17         "y": y
     18     })
     19 dh_df = pd.DataFrame(dhs)

TypeError: cannot unpack non-iterable minimum_curvature object

The PR updates the docs example to reflect how the package appears to work instead.