Skip to content

Commit

Permalink
v0.1.9.2
Browse files Browse the repository at this point in the history
  • Loading branch information
albano-a committed Mar 22, 2024
1 parent 47c64b8 commit 3d815bb
Show file tree
Hide file tree
Showing 17 changed files with 394 additions and 149 deletions.
Binary file modified components/__pycache__/about.cpython-312.pyc
Binary file not shown.
Binary file modified components/__pycache__/help_window.cpython-312.pyc
Binary file not shown.
Binary file modified components/__pycache__/tomi_calculations.cpython-312.pyc
Binary file not shown.
1 change: 0 additions & 1 deletion components/about.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@
from CTkToolTip import CTkToolTip
from ttkwidgets.font import *
# Local application/library specific imports #
from utility.fluid_pressure import fluid_pressure
from chlorophyll import CodeView
from utility.icons import (add_img, remove_img, font_img, show_plot_img,
inventory_img, code_img, folder_img, save_img, new_file_img)
Expand Down
1 change: 0 additions & 1 deletion components/help_window.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@
from CTkToolTip import CTkToolTip
from ttkwidgets.font import *
# Local application/library specific imports #
from utility.fluid_pressure import fluid_pressure
from chlorophyll import CodeView
from utility.icons import (add_img, remove_img, font_img, show_plot_img,
inventory_img, code_img, folder_img, save_img, new_file_img)
Expand Down
1 change: 0 additions & 1 deletion components/tomi_calculations.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@
from CTkToolTip import CTkToolTip
from ttkwidgets.font import *
# Local application/library specific imports #
from utility.fluid_pressure import fluid_pressure
from chlorophyll import CodeView
from utility.icons import (add_img, remove_img, font_img, show_plot_img,
inventory_img, code_img, folder_img, save_img, new_file_img)
Expand Down
420 changes: 306 additions & 114 deletions kraken.py

Large diffs are not rendered by default.

14 changes: 3 additions & 11 deletions pressao_automatizada.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

fluid_pressure = fluid_pressure() # dictionary of fluid pressures

df = pd.read_csv('./uploads/pressao_exemplo_2.csv',
df = pd.read_csv('./uploads/ogx.csv',
sep=";",
skiprows=1,
names=["prof", "pressao"])
Expand All @@ -32,13 +32,7 @@ def calculate_slope(ps_a, ps_b):
coefficients = np.polyfit(ps_a, ps_b, 1)

return coefficients[0]
# testing the function
# calculate_slope(
# np.array([prof[0], prof[1]]),
# np.array([pressao[0], pressao[1]])
# )

# Calculate the slope between each pair of consecutive points
slopes = []
slope_indices = {}
for i in range(len(prof) - 1):
Expand All @@ -48,8 +42,6 @@ def calculate_slope(ps_a, ps_b):
slopes.append(slope)
slope_indices[slope] = [i, i + 1]

# print(slope_indices)

# Convert the list of slopes to a numpy array
slopes_array = np.array([slopes, slopes])

Expand Down Expand Up @@ -148,12 +140,12 @@ def convert_classification(class_data):

# Extended top curve
mean_cota_top = np.mean(np.diff(top_prof))
extended_cota_top = list(top_prof) + [mean_cota_top + np.min(top_prof)]
extended_cota_top = [(np.abs(mean_cota_top) + np.max(top_prof))] + list(top_prof)
extended_pressure_top = np.array(extended_cota_top)*slope_top + intercept_top

# Extended bot curve
mean_cota_bot = np.mean(np.diff(bottom_prof))
extended_cota_bot = [(np.max(bottom_prof) - mean_cota_bot)] + list(bottom_prof)
extended_cota_bot = list(bottom_prof) + [(np.min(bottom_prof) + mean_cota_bot)]
extended_pressure_bot = np.array(extended_cota_bot)*slope_bottom + intercept_bottom

# Calculate the line of best fit for the top and bottom fluids
Expand Down
11 changes: 11 additions & 0 deletions uploads/dry_gas.csv
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
prof; pressao
-1175.00; 1980.00
-1180.00; 1985.00
-1185.00; 1990.00
-1190.00; 1995.00
-1195.00; 2000.00
-1200.00; 2005.00
-1205.00; 2010.00
-1210.00; 2015.00
-1215.00; 2020.00
-1220.00; 2025.00
11 changes: 11 additions & 0 deletions uploads/fresh_water.csv
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
prof; pressao
-1200.00; 2000.00
-1210.00; 2010.00
-1220.00; 2020.00
-1230.00; 2030.00
-1240.00; 2040.00
-1250.00; 2050.00
-1260.00; 2060.00
-1270.00; 2070.00
-1280.00; 2080.00
-1290.00; 2090.00
52 changes: 52 additions & 0 deletions uploads/ogx.csv
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
prof;pressao
-1306.0;172.1
-1306.1;172.0
-1309.5;172.3
-1309.7;172.3
-1309.0;172.1
-1312.0;172.4
-1315.5;172.8
-1319.0;173.2
-1322.5;173.7
-1322.2;173.5
-1322.0;173.5
-1325.3;173.8
-1325.5;173.8
-1327.2;173.9
-1326.5;173.8
-1327.0;173.8
-1332.5;174.4
-1339.0;175.2
-1344.0;175.7
-1348.5;176.2
-1353.5;176.8
-1359.2;177.4
-1359.2;177.4
-1359.5;177.3
-1359.7;177.3
-1362.0;177.5
-1375.0;179.1
-1378.0;179.3
-1380.5;179.6
-1383.5;179.9
-1386.2;180.1
-1394.3;181.1
-1406.2;182.6
-1420.0;184.3
-1450.0;188.1
-1514.5;196.1
-465.0;62.4
-465.5;62.5
-475.5;63.7
-495.0;66.2
-495.3;66.2
-525.0;70.0
-668.3;88.5
-668.5;88.5
-724.5;95.7
-777.2;102.4
-921.0;120.7
-982.8;128.5
-1070.2;139.6
-1091.0;142.2
-1146.0;148.4
11 changes: 11 additions & 0 deletions uploads/oil_limit.csv
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
prof; pressao
-1236.50; 2026.35
-1245.50; 2027.77
-1251.00; 2029.19
-1255.50; 2028.45
-1260.30; 2030.62
-1265.00; 2032.04
-1267.00; 2034.88
-1270.00; 2039.15
-1275.00; 2044.84
-1280.00; 2056.21
Binary file modified utility/__pycache__/color_constants.cpython-312.pyc
Binary file not shown.
Binary file modified utility/__pycache__/fluid_pressure.cpython-312.pyc
Binary file not shown.
Binary file modified utility/__pycache__/icons.cpython-312.pyc
Binary file not shown.
Binary file modified utility/__pycache__/utilities.cpython-312.pyc
Binary file not shown.
21 changes: 0 additions & 21 deletions utility/fluid_pressure.py

This file was deleted.

0 comments on commit 3d815bb

Please sign in to comment.