Skip to content

Commit

Permalink
Moving drilling cost figure up
Browse files Browse the repository at this point in the history
  • Loading branch information
wtrainor committed Aug 27, 2024
1 parent 975b412 commit 5823ed8
Showing 1 changed file with 30 additions and 29 deletions.
59 changes: 30 additions & 29 deletions app.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,37 @@

# PRIORS - > USER INPUT
st.header('Interactive Demonstration of Relationship between Value of Information and Prior Value')

## Drilling cost Figures
url = 'https://raw.githubusercontent.com/kmenon211/Geophysics-segyio-python/master/VOI-app-geophires-input.png'

response = requests.get(url)
image= Image.open(BytesIO(response.content))

#image = Image.open("C:\\Users\\kmenon\\Pictures\\Screenshots\\VOI-app-geophires-input.png")
st.image(image, caption='GEOPHIRES Parameters used to obtain Drilling Costs')



vprior_depth = np.array([1000,2000,3000,4000,5000,6000])
value_drill_pos = value_drill_DRYHOLE*-1
firstfig, ax = plt.subplots()
#firstfig1, axe = plt.subplots(1,2)
plt.plot(vprior_depth,value_drill_pos,'g.-', linewidth=5,label='$V_{prior}$')
plt.ylabel(r'Average Drilling Cost [\$]',fontsize=14)
plt.xlabel('Depth (m)', color='darkred',fontsize=14)
formatter = ticker.ScalarFormatter()
formatter.set_scientific(False)
# ax.yaxis.set_major_formatter(formatter)
ax.yaxis.set_major_formatter('${x:0,.0f}') #:0,.0f
ax.xaxis.set_major_formatter(formatter)
ax.xaxis.set_major_formatter('{x:0,.0f}')
st.pyplot(firstfig)



#st.write('What\'s the Prior Probability of a POSITIVE geothermal site? $Pr(x=Positive)$')
#Pr_prior_POS_demo = mymodule.Prior_probability_binary()

Pr_prior_POS_demo = mymodule.Prior_probability_binary()

#### start of paste -> CHANGE to input
Expand Down Expand Up @@ -56,34 +85,6 @@
st.write('Average outcome, using $Pr(Success)$ ~ Prior probability')
st.write(r'''$V_{prior} = \max\limits_a \Sigma_{i=1}^2 Pr(\Theta = \theta_i) v_a(\theta_i) \ \ \forall a $''')




url = 'https://raw.githubusercontent.com/kmenon211/Geophysics-segyio-python/master/VOI-app-geophires-input.png'

response = requests.get(url)
image= Image.open(BytesIO(response.content))

#image = Image.open("C:\\Users\\kmenon\\Pictures\\Screenshots\\VOI-app-geophires-input.png")
st.image(image, caption='GEOPHIRES Parameters used to obtain Drilling Costs')



vprior_depth = np.array([1000,2000,3000,4000,5000,6000])
value_drill_pos = value_drill_DRYHOLE*-1
firstfig, ax = plt.subplots()
#firstfig1, axe = plt.subplots(1,2)
plt.plot(vprior_depth,value_drill_pos,'g.-', linewidth=5,label='$V_{prior}$')
plt.ylabel(r'Average Drilling Cost [\$]',fontsize=14)
plt.xlabel('Depth (m)', color='darkred',fontsize=14)
formatter = ticker.ScalarFormatter()
formatter.set_scientific(False)
# ax.yaxis.set_major_formatter(formatter)
ax.yaxis.set_major_formatter('${x:0,.0f}') #:0,.0f
ax.xaxis.set_major_formatter(formatter)
ax.xaxis.set_major_formatter('{x:0,.0f}')
st.pyplot(firstfig)

plt.plot(value_drill_DRYHOLE, vprior_INPUT_demo_list,'g.-', linewidth=5,label='$V_{prior}$')
plt.ylabel(r'Average Outcome Value [\$]',fontsize=14)
plt.xlabel('Dryhole Cost', color='darkred',fontsize=14)
Expand Down

0 comments on commit 5823ed8

Please sign in to comment.