Skip to content

Commit

Permalink
Merge pull request #10 from mlbelobraydi/well-selector-addition
Browse files Browse the repository at this point in the history
Well selector addition
  • Loading branch information
mlbelobraydi committed Apr 18, 2021
2 parents a6b1b1e + 06fabd9 commit b6cb818
Show file tree
Hide file tree
Showing 9 changed files with 37 additions and 13 deletions.
34 changes: 29 additions & 5 deletions well_picks/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,12 @@
server = app.server

# # load well data
# p = Project.from_las(str(Path("well_picks/data/las/PoseidonNorth1Decim.LAS")))
# well_names = [w.name for w in p]
p = Project.from_las(str(Path("well_picks/data/las/*.LAS")))
well_uwi = [w.uwi for w in p]

w = Well.from_las(str(Path("well_picks/data/las/PoseidonNorth1Decim.LAS"))) #original example
#w = Well.from_las(str(Path("well_picks/data/las/PoseidonNorth1Decim.LAS"))) #original example

df = w.df()
df = p[0].df()
curve_list = df.columns.tolist()
curve = curve_list[0]

Expand All @@ -33,7 +33,9 @@




#well dropdown selector
well_dropdown_options = [{'label': k, 'value': k} for k in well_uwi]
#tops dropdown options
dropdown_options = [{'label': k, 'value': k} for k in list(surface_picks.keys())]
##Need to make the selector grab the wanted curve
curve_dropdown_options = [{'label': k, 'value': k} for k in curve_list]
Expand All @@ -47,6 +49,9 @@
app.layout = html.Div(
children=[
html.Div([
'Select well:',
dcc.Dropdown(id='well-selector', options=well_dropdown_options, value=well_uwi[0], style={'width': '200px'}),

'Edit tops:',
dcc.Dropdown(id='top-selector', options=dropdown_options, placeholder="Select a top to edit", style={'width': '200px'}),

Expand Down Expand Up @@ -88,6 +93,25 @@
style={'display': 'flex'}
)

# update curve dropdown options when new well is picked
"""update of new curve selector list when new well is triggered"""
@app.callback(
[Output('curve-selector', 'options'),
Output('curve-selector', 'value')],
[Input('well-selector', 'value')])
def well_update_changes_curves(well_uwi):

#surface_picks = json.loads(surface_picks)

w = p.get_well(well_uwi)
print('selected well:', w)
df = w.df()
curve_list = df.columns.tolist()
curve = curve_list[0]
print('initial curve: ',curve)
curve_dropdown_options = [{'label': k, 'value': k} for k in curve_list]
return curve_dropdown_options, curve


# update tops data when graph is clicked or new top is added
@app.callback(
Expand Down
2 changes: 1 addition & 1 deletion well_picks/data/las/Boreas1Decim.LAS
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
SRVC. Schlumberger :SERVICE COMPANY
CTRY. :COUNTRY
DATE. 7 :LOG DATE
UWI . :UNIQUE WELL ID
UWI . Boreas 1 :UNIQUE WELL ID
LATI.DEG -13/39/24.872 : Latitude
LONG.DEG 122/17/52.787 : Longitude
GDAT. : Geodetic Datum
Expand Down
2 changes: 1 addition & 1 deletion well_picks/data/las/Kronos1Decim.LAS
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
SRVC. Schlumberger :SERVICE COMPANY
CTRY. :COUNTRY
DATE. 04/29/2010 :LOG DATE
UWI . :UNIQUE WELL ID
UWI . Kronos 1 :UNIQUE WELL ID
LATI.DEG -13/41/53.98 : Latitude
LONG.DEG 122/11/30.24 : Longitude
GDAT. : Geodetic Datum
Expand Down
2 changes: 1 addition & 1 deletion well_picks/data/las/Pharos1Decim.LAS
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
SRVC. Schlumberger :SERVICE COMPANY
CTRY. :COUNTRY
DATE. 11 :LOG DATE
UWI . :UNIQUE WELL ID
UWI . Pharos 1 :UNIQUE WELL ID
LATI.DEG -13/40/55.21 : Latitude
LONG.DEG 122/23/56.48 : Longitude
GDAT. : Geodetic Datum
Expand Down
2 changes: 1 addition & 1 deletion well_picks/data/las/Poseidon1Decim.LAS
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
SRVC. Schlumberger D&M :SERVICE COMPANY
CTRY. :COUNTRY
DATE. 28-Apr-09 :LOG DATE
UWI . :UNIQUE WELL ID
UWI . Poseidon 1 :UNIQUE WELL ID
LATI.DEG -13/37/16.79 : Latitude
LONG.DEG 122/18/23.99 : Longitude
GDAT. : Geodetic Datum
Expand Down
2 changes: 1 addition & 1 deletion well_picks/data/las/Poseidon2Decim.LAS
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
SRVC. Schlumberger :SERVICE COMPANY
CTRY. :COUNTRY
DATE. 11/30/2009 :LOG DATE
UWI . :UNIQUE WELL ID
UWI . Poseidon 2 :UNIQUE WELL ID
LATI.DEG -13/40/07.177 : Latitude
LONG.DEG 122/16/32.259 : Longitude
GDAT. : Geodetic Datum
Expand Down
2 changes: 1 addition & 1 deletion well_picks/data/las/PoseidonNorth1Decim.LAS
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
SRVC. Schlumberger :SERVICE COMPANY
CTRY. :COUNTRY
DATE. 05/20/2014 :LOG DATE
UWI . :UNIQUE WELL ID
UWI . Poseidon North 1 :UNIQUE WELL ID
LATI.DEG -13/34/24.825 : Latitude
LONG.DEG 122/20/24.556 : Longitude
GDAT. : Geodetic Datum
Expand Down
2 changes: 1 addition & 1 deletion well_picks/data/las/Proteus1Decim.LAS
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
SRVC. Schlumberger / Occam Technology :SERVICE COMPANY
CTRY. :COUNTRY
DATE. 08/31/2013 / 2016 :LOG DATE
UWI . :UNIQUE WELL ID
UWI . Proteus 1 ST2 :UNIQUE WELL ID
LATI.DEG -00/00/00 : Latitude
LONG.DEG 00/00/00 : Longitude
GDAT. : Geodetic Datum
Expand Down
2 changes: 1 addition & 1 deletion well_picks/data/las/Torosa1LDecim.LAS
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
SRVC. Sperry/Schlumberger /Occam :SERVICE COMPANY
CTRY. :COUNTRY
DATE. 15/12/2006 / 2009 :LOG DATE
UWI . :UNIQUE WELL ID
UWI . Torosa 1 :UNIQUE WELL ID
LATI.DEG -13/52/02.03 : Latitude
LONG.DEG 122/04/09.59 : Longitude
GDAT. : Geodetic Datum
Expand Down

0 comments on commit b6cb818

Please sign in to comment.