Code Monkey home page Code Monkey logo

well_profile's People

Contributors

jcamiloangarita avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

well_profile's Issues

Units not plotting in english

Hi there! I love what you guys are doing at Pro Well Plan. I am a senior drilling engineer in the USA and a very very novice programmer, still trying to get through CS50x, so please excuse me if this is a mistake on my end... A couple of issues I noticed with the units input: On the examples in the documentation, the argument for well_profile.get() is titled "units". However, when the program is run, there is an error with the argument "units". When I change that argument to "set_info", I can get the program to plot. However, if the "set_info" value is changed to 'english', it still plots metric units.

image

Exporting plot as HTML file

Hi Juan,

I have tried to export/save the 3D plot as an HTML file but to no avail. Are you able to show me on how to save to HTML?

Thanks.
Kush

Set up initial inclination

Hello. Thank for very nice tool for borehole trajectory.

I am trying to use your code to draw some trajectories but trajectories are very odd at beginning:

image

I found that problem occur because in code starting point has initial value of inclination by default 0. It is fine when you trying to draw trajectory from hole which at start is vertical. Im my case I trying to draw holes from underground mine which has starting inclination for example about 14deg.

Could you somehow advice me how to handle this issue?

Best regards.

Coordinates slightly off

Looks like there might be a discrepancy somewhere in the code since the Northing, Easting and TVD I get out from well_profile is slightly off the test data I checked the welleng and wellpathpy libraries against.

The other two libraries are generally within 10e-5 accuracy whereas well_profile is about 10e-1 (well, the 11th well at least which is the one I checked).

Here's the code I used to check the other two libraries, with a bit added on the bottom for generating .csv files (I was testing out the web app). You'll have to modify the code with the local paths set for your env. I've also attached the source data file, again which you'll need to change the path for.

Probably better to import the well_profile library and generate the surveys with that than using the web app, but I'll leave that yo you :-)

standard-set-of-wellpaths-for-evaluating-clearance-scenarios-r4-17-may-2017.xlsx

import wellpathpy
import welleng as we
import csv
from welleng.survey import Survey, SurveyHeader

# this is the ISCWSA dataset
filename = (
    "reference/standard-set-of-wellpaths"
    "-for-evaluating-clearance-scenarios-r4-17-may-2017.xlsx"
)

print("Loading data...")
try:
    data = we.io.import_iscwsa_collision_data(filename)
except:
    print(
        "Make sure you've updated filename to your local copy of ISCWSA's"
        " clearance scenarios"
    )

# Make a dictionary of surveys with welleng
print("Making surveys...")
surveys = {}
for well in data["wells"]:
    surveys[well] = {}
    sh = SurveyHeader(
        name=well,
        latitude=60.,
        b_total=50000.,
        dip=70.,
        declination=.0,
        convergence=0.,
        G=9.80665,
        azi_reference='grid'
    )
    if well == "Reference well":
        radius = 0.4572
    else:
        radius = 0.3048

    s = Survey(
        md=data["wells"][well]["MD"],
        inc=data["wells"][well]["IncDeg"],
        azi=data["wells"][well]["AziDeg"],
        deg=True,
        unit="meters"
    )
    surveys[well]['survey'] = s

    surveys[well]['errors'] = {
        'tvd': data["wells"][well]["TVD"] - s.tvd,
        'n': data["wells"][well]["N"] - s.n,
        'e': data["wells"][well]["E"] - s.e,
    }

# make a dictionary of wells with wellpathpy
surveys_wellpathpy = {}
for well in data['wells']:
    tvd, northing, easting, dls = wellpathpy.mincurve.minimum_curvature(
        md=data["wells"][well]["MD"],
        inc=data["wells"][well]["IncDeg"],
        azi=data["wells"][well]["AziDeg"],
    )

    surveys_wellpathpy[well] = {
        'tvd': tvd,
        'n': northing,
        'e': easting,
        'dls': dls,
        'errors_base': {
            'tvd': data["wells"][well]["TVD"] - tvd,
            'n': data["wells"][well]["N"] - northing,
            'e': data["wells"][well]["E"] - easting,
        },
        'errors_welleng': {
            'tvd': surveys[well]["survey"].tvd - tvd,
            'n': surveys[well]["survey"].n - northing,
            'e': surveys[well]["survey"].e - easting,
        }
    }

# generate a csv files to import into PWP web app
for well in data["wells"]:
    s_out = [['md', 'inc', 'azi']]
    s_out.extend([
        [md, inc, azi]
        for md, inc, azi in zip(
            data["wells"][well]["MD"],
            data["wells"][well]["IncDeg"],
            data["wells"][well]["AziDeg"],
        )
    ])

    with open(f'{well}.csv', 'w') as csv_file:
        writer = csv.writer(csv_file)
        for row in s_out:
            writer.writerow(row)

print("Done")

Documentation

I'm looking for documentation for this PL.
Documentation link doesn't work

List of lists or list of numpy arrays for input data

The current assumption is that a list of dictionaries is imported.

md = [x['md'] for x in data]

But if the code is being referenced from another python module it's likely that the data will be a list of lists, e.g.

data = [md, inclination, azimuth, tvd]

This could be achieved by adding something like...

if type(data[0]) is list:
    md, inc, azi, tvd = data

And this would be even nicer. Since you have pandas as a requirement already which is built on numpy, you're not really losing anything importing numpy.

import numpy as np

if type(data[0]) is list or isinstance(data[0], np.ndarray):
    md, inc, azi, tvd = data

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.