quick-pp 0.2.62__tar.gz → 0.2.64__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {quick_pp-0.2.62 → quick_pp-0.2.64}/PKG-INFO +1 -1
- {quick_pp-0.2.62 → quick_pp-0.2.64}/pyproject.toml +1 -1
- {quick_pp-0.2.62 → quick_pp-0.2.64}/quick_pp/__init__.py +1 -1
- {quick_pp-0.2.62 → quick_pp-0.2.64}/quick_pp/objects.py +6 -5
- {quick_pp-0.2.62 → quick_pp-0.2.64}/quick_pp/plotter/plotter.py +14 -12
- {quick_pp-0.2.62 → quick_pp-0.2.64}/quick_pp/plotter/well_log.py +0 -4
- {quick_pp-0.2.62 → quick_pp-0.2.64}/.gitignore +0 -0
- {quick_pp-0.2.62 → quick_pp-0.2.64}/LICENSE +0 -0
- {quick_pp-0.2.62 → quick_pp-0.2.64}/README.md +0 -0
- {quick_pp-0.2.62 → quick_pp-0.2.64}/quick_pp/api/__init__.py +0 -0
- {quick_pp-0.2.62 → quick_pp-0.2.64}/quick_pp/api/exceptions.py +0 -0
- {quick_pp-0.2.62 → quick_pp-0.2.64}/quick_pp/api/fastapi_mlflow/__init__.py +0 -0
- {quick_pp-0.2.62 → quick_pp-0.2.64}/quick_pp/api/fastapi_mlflow/_mlflow_types.py +0 -0
- {quick_pp-0.2.62 → quick_pp-0.2.64}/quick_pp/api/fastapi_mlflow/applications.py +0 -0
- {quick_pp-0.2.62 → quick_pp-0.2.64}/quick_pp/api/fastapi_mlflow/exceptions.py +0 -0
- {quick_pp-0.2.62 → quick_pp-0.2.64}/quick_pp/api/fastapi_mlflow/predictors.py +0 -0
- {quick_pp-0.2.62 → quick_pp-0.2.64}/quick_pp/api/main.py +0 -0
- {quick_pp-0.2.62 → quick_pp-0.2.64}/quick_pp/api/mlflow_model_deployment.py +0 -0
- {quick_pp-0.2.62 → quick_pp-0.2.64}/quick_pp/api/router.py +0 -0
- {quick_pp-0.2.62 → quick_pp-0.2.64}/quick_pp/api/schemas/lithology_hc_correction.py +0 -0
- {quick_pp-0.2.62 → quick_pp-0.2.64}/quick_pp/api/schemas/lithology_ssc.py +0 -0
- {quick_pp-0.2.62 → quick_pp-0.2.64}/quick_pp/api/schemas/lithology_vsh_gr.py +0 -0
- {quick_pp-0.2.62 → quick_pp-0.2.64}/quick_pp/api/schemas/permeability_choo.py +0 -0
- {quick_pp-0.2.62 → quick_pp-0.2.64}/quick_pp/api/schemas/permeability_others.py +0 -0
- {quick_pp-0.2.62 → quick_pp-0.2.64}/quick_pp/api/schemas/porosity.py +0 -0
- {quick_pp-0.2.62 → quick_pp-0.2.64}/quick_pp/api/schemas/ressum.py +0 -0
- {quick_pp-0.2.62 → quick_pp-0.2.64}/quick_pp/api/schemas/saturation_archie.py +0 -0
- {quick_pp-0.2.62 → quick_pp-0.2.64}/quick_pp/api/schemas/saturation_b.py +0 -0
- {quick_pp-0.2.62 → quick_pp-0.2.64}/quick_pp/api/schemas/saturation_qv.py +0 -0
- {quick_pp-0.2.62 → quick_pp-0.2.64}/quick_pp/api/schemas/saturation_rw.py +0 -0
- {quick_pp-0.2.62 → quick_pp-0.2.64}/quick_pp/api/schemas/saturation_temp_grad.py +0 -0
- {quick_pp-0.2.62 → quick_pp-0.2.64}/quick_pp/api/schemas/saturation_waxman_smits.py +0 -0
- {quick_pp-0.2.62 → quick_pp-0.2.64}/quick_pp/api/services/chat.py +0 -0
- {quick_pp-0.2.62 → quick_pp-0.2.64}/quick_pp/api/services/las_handler.py +0 -0
- {quick_pp-0.2.62 → quick_pp-0.2.64}/quick_pp/api/services/lithology.py +0 -0
- {quick_pp-0.2.62 → quick_pp-0.2.64}/quick_pp/api/services/permeability.py +0 -0
- {quick_pp-0.2.62 → quick_pp-0.2.64}/quick_pp/api/services/porosity.py +0 -0
- {quick_pp-0.2.62 → quick_pp-0.2.64}/quick_pp/api/services/reservoir_summary.py +0 -0
- {quick_pp-0.2.62 → quick_pp-0.2.64}/quick_pp/api/services/saturation.py +0 -0
- {quick_pp-0.2.62 → quick_pp-0.2.64}/quick_pp/api/static/favicon.ico +0 -0
- {quick_pp-0.2.62 → quick_pp-0.2.64}/quick_pp/api/static/logo.png +0 -0
- {quick_pp-0.2.62 → quick_pp-0.2.64}/quick_pp/api/template/chat.html +0 -0
- {quick_pp-0.2.62 → quick_pp-0.2.64}/quick_pp/api/template/home.html +0 -0
- {quick_pp-0.2.62 → quick_pp-0.2.64}/quick_pp/cli.py +0 -0
- {quick_pp-0.2.62 → quick_pp-0.2.64}/quick_pp/config.py +0 -0
- {quick_pp-0.2.62 → quick_pp-0.2.64}/quick_pp/core_calibration.py +0 -0
- {quick_pp-0.2.62 → quick_pp-0.2.64}/quick_pp/fluid_type.py +0 -0
- {quick_pp-0.2.62 → quick_pp-0.2.64}/quick_pp/las_handler.py +0 -0
- {quick_pp-0.2.62 → quick_pp-0.2.64}/quick_pp/lithology/__init__.py +0 -0
- {quick_pp-0.2.62 → quick_pp-0.2.64}/quick_pp/lithology/carbonate.py +0 -0
- {quick_pp-0.2.62 → quick_pp-0.2.64}/quick_pp/lithology/multi_mineral.py +0 -0
- {quick_pp-0.2.62 → quick_pp-0.2.64}/quick_pp/lithology/sand_shale.py +0 -0
- {quick_pp-0.2.62 → quick_pp-0.2.64}/quick_pp/lithology/sand_silt_clay.py +0 -0
- {quick_pp-0.2.62 → quick_pp-0.2.64}/quick_pp/lithology/thin_beds.py +0 -0
- {quick_pp-0.2.62 → quick_pp-0.2.64}/quick_pp/machine_learning/__init__.py +0 -0
- {quick_pp-0.2.62 → quick_pp-0.2.64}/quick_pp/machine_learning/config.py +0 -0
- {quick_pp-0.2.62 → quick_pp-0.2.64}/quick_pp/machine_learning/feature_engineering.py +0 -0
- {quick_pp-0.2.62 → quick_pp-0.2.64}/quick_pp/machine_learning/mock_data/mock_data.parquet +0 -0
- {quick_pp-0.2.62 → quick_pp-0.2.64}/quick_pp/machine_learning/predict_pipeline.py +0 -0
- {quick_pp-0.2.62 → quick_pp-0.2.64}/quick_pp/machine_learning/train_pipeline.py +0 -0
- {quick_pp-0.2.62 → quick_pp-0.2.64}/quick_pp/machine_learning/utils.py +0 -0
- {quick_pp-0.2.62 → quick_pp-0.2.64}/quick_pp/permeability.py +0 -0
- {quick_pp-0.2.62 → quick_pp-0.2.64}/quick_pp/plotter/__init__.py +0 -0
- {quick_pp-0.2.62 → quick_pp-0.2.64}/quick_pp/plotter/well_log_config.py +0 -0
- {quick_pp-0.2.62 → quick_pp-0.2.64}/quick_pp/porosity.py +0 -0
- {quick_pp-0.2.62 → quick_pp-0.2.64}/quick_pp/qaqc.py +0 -0
- {quick_pp-0.2.62 → quick_pp-0.2.64}/quick_pp/ressum.py +0 -0
- {quick_pp-0.2.62 → quick_pp-0.2.64}/quick_pp/rock_physics/__init__.py +0 -0
- {quick_pp-0.2.62 → quick_pp-0.2.64}/quick_pp/rock_physics/geomechanics.py +0 -0
- {quick_pp-0.2.62 → quick_pp-0.2.64}/quick_pp/rock_physics/geophysics.py +0 -0
- {quick_pp-0.2.62 → quick_pp-0.2.64}/quick_pp/rock_physics/rpm.py +0 -0
- {quick_pp-0.2.62 → quick_pp-0.2.64}/quick_pp/rock_type.py +0 -0
- {quick_pp-0.2.62 → quick_pp-0.2.64}/quick_pp/saturation.py +0 -0
- {quick_pp-0.2.62 → quick_pp-0.2.64}/quick_pp/utils.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: quick-pp
|
|
3
|
-
Version: 0.2.
|
|
3
|
+
Version: 0.2.64
|
|
4
4
|
Summary: Python package to assist in providing quick-look/ preliminary petrophysical estimation.
|
|
5
5
|
Project-URL: Homepage, https://github.com/imranfadhil/quick_pp
|
|
6
6
|
Author-email: Imran Fadhil <imranfadhil@gmail.com>
|
|
@@ -20,4 +20,4 @@ logging.getLogger("mlflow").setLevel(logging.WARNING)
|
|
|
20
20
|
|
|
21
21
|
__author__ = """Imran Fadhil"""
|
|
22
22
|
__email__ = 'imranfadhil@gmail.com'
|
|
23
|
-
__version__ = '0.2.
|
|
23
|
+
__version__ = '0.2.64' # Need to be updated manually when releasing a new version/ change in pyproject.toml
|
|
@@ -18,7 +18,6 @@ class Project(object):
|
|
|
18
18
|
self.project_path = project_path or os.path.join("data", "04_project")
|
|
19
19
|
self.data_path = os.path.join(self.project_path, self.name)
|
|
20
20
|
self.output_path = os.path.join(self.data_path, "outputs")
|
|
21
|
-
os.makedirs(self.data_path, exist_ok=True)
|
|
22
21
|
os.makedirs(self.output_path, exist_ok=True)
|
|
23
22
|
logger.info(f"Project '{name}' initialized with path: {self.data_path}")
|
|
24
23
|
|
|
@@ -182,15 +181,17 @@ class Well(object):
|
|
|
182
181
|
self.config.update(config)
|
|
183
182
|
self.update_history(action=f"Updated config for well {self.name}")
|
|
184
183
|
|
|
185
|
-
def export_to_parquet(self, folder=
|
|
186
|
-
|
|
184
|
+
def export_to_parquet(self, folder=None):
|
|
185
|
+
if not folder:
|
|
186
|
+
folder = self.output_path
|
|
187
187
|
path = os.path.join(folder, f"{self.name}.parquet")
|
|
188
188
|
logger.info(f"Exporting well data to parquet: {path}")
|
|
189
189
|
self.data.to_parquet(path)
|
|
190
190
|
logger.debug(f"Exported {len(self.data)} records to parquet")
|
|
191
191
|
|
|
192
|
-
def export_to_las(self, folder=
|
|
193
|
-
|
|
192
|
+
def export_to_las(self, folder=None):
|
|
193
|
+
if not folder:
|
|
194
|
+
folder = self.output_path
|
|
194
195
|
logger.info(f"Exporting well data to LAS format in folder: {folder}")
|
|
195
196
|
las.export_to_las(well_data=self.data, well_name=self.name, folder=folder)
|
|
196
197
|
|
|
@@ -39,19 +39,20 @@ def update_fluid_contacts(well_data, well_config: dict):
|
|
|
39
39
|
well_data = well_data.copy()
|
|
40
40
|
logger.debug(f"well_data columns before update: {well_data.columns.tolist()}")
|
|
41
41
|
well_data['OIL_FLAG'] = np.where(
|
|
42
|
-
((well_data['
|
|
43
|
-
(well_data['
|
|
42
|
+
((well_data['TVD'] > out) | (well_data['TVD'] > goc)) & (
|
|
43
|
+
(well_data['TVD'] < odt) | (well_data['TVD'] < owc)), 1, 0)
|
|
44
44
|
|
|
45
45
|
well_data['GAS_FLAG'] = np.where(
|
|
46
|
-
((well_data['
|
|
47
|
-
well_data['
|
|
46
|
+
((well_data['TVD'] < gdt) | (well_data['TVD'] < gwc) | (well_data['TVD'] < goc)) & (
|
|
47
|
+
well_data['TVD'] > gut), 1, 0)
|
|
48
48
|
|
|
49
49
|
well_data['WATER_FLAG'] = np.where(
|
|
50
|
-
((well_data['
|
|
50
|
+
((well_data['TVD'] > wut) | (well_data['TVD'] > owc) | (well_data['TVD'] > gwc)), 1, 0)
|
|
51
51
|
|
|
52
52
|
well_data['FLUID_FLAG'] = np.where(
|
|
53
53
|
well_data['OIL_FLAG'] == 1, 1, np.where(
|
|
54
|
-
well_data['GAS_FLAG'] == 1, 2,
|
|
54
|
+
well_data['GAS_FLAG'] == 1, 2, np.where(
|
|
55
|
+
well_data['WATER_FLAG'] == 1, 0, -1)))
|
|
55
56
|
|
|
56
57
|
return well_data
|
|
57
58
|
|
|
@@ -187,6 +188,7 @@ def stick_plot(data, well_config: dict, zone: str = 'ALL'):
|
|
|
187
188
|
"""
|
|
188
189
|
logger.info(f"Generating stick plot for zone: {zone}")
|
|
189
190
|
assert 'SWT' in data.columns, 'SWT column not found in data.'
|
|
191
|
+
assert 'TVD' in data.columns, 'TVD column not found in data.'
|
|
190
192
|
assert_well_config_structure(well_config)
|
|
191
193
|
|
|
192
194
|
# Create BVO and BVOH columns
|
|
@@ -204,23 +206,23 @@ def stick_plot(data, well_config: dict, zone: str = 'ALL'):
|
|
|
204
206
|
logger.debug(f"Plotting well: {well_name}")
|
|
205
207
|
well_data = data[(data['WELL_NAME'] == well_name) & (data['ZONES'] == zone)].copy()
|
|
206
208
|
well_data = update_fluid_contacts(well_data, well_config[well_name]['zones'][zone])
|
|
207
|
-
ax.plot(well_data['BVO'], well_data['
|
|
209
|
+
ax.plot(well_data['BVO'], well_data['TVD'], label=r'$BVO_{Log}$')
|
|
208
210
|
if 'BVOH' in well_data.columns:
|
|
209
|
-
ax.plot(well_data['BVOH'], well_data['
|
|
211
|
+
ax.plot(well_data['BVOH'], well_data['TVD'], label=r'$BVO_{SHF}$')
|
|
210
212
|
|
|
211
213
|
# Fill between based on fluid flag
|
|
212
214
|
ax.fill_betweenx(
|
|
213
|
-
well_data['
|
|
215
|
+
well_data['TVD'], 0, 1, where=well_data['FLUID_FLAG'] == 1, color='g', alpha=0.3, label='Oil')
|
|
214
216
|
ax.fill_betweenx(
|
|
215
|
-
well_data['
|
|
217
|
+
well_data['TVD'], 0, 1, where=well_data['FLUID_FLAG'] == 2, color='r', alpha=0.3, label='Gas')
|
|
216
218
|
ax.fill_betweenx(
|
|
217
|
-
well_data['
|
|
219
|
+
well_data['TVD'], 0, 1, where=well_data['FLUID_FLAG'] == 0, color='b', alpha=0.3, label='Water')
|
|
218
220
|
|
|
219
221
|
ax.set_title(f'Well: {well_name}')
|
|
220
222
|
ax.set_xlim(0, .5)
|
|
221
223
|
ax.legend()
|
|
222
224
|
|
|
223
|
-
axes[0].set_ylabel('Depth')
|
|
225
|
+
axes[0].set_ylabel('Depth (TVD)')
|
|
224
226
|
fig.subplots_adjust(wspace=0.3, hspace=0)
|
|
225
227
|
fig.set_facecolor('aliceblue')
|
|
226
228
|
plt.gca().invert_yaxis()
|
|
@@ -340,10 +340,6 @@ def plotly_log(well_data, well_name: str = '', depth_uom="", trace_defs: dict =
|
|
|
340
340
|
), row=1, col=2)
|
|
341
341
|
add_zone_markers(fig, df)
|
|
342
342
|
|
|
343
|
-
# Rename y axis to display horizontal lines across
|
|
344
|
-
for i in range(0, len(fig.data)):
|
|
345
|
-
fig.data[i].yaxis = 'y'
|
|
346
|
-
|
|
347
343
|
fig.update_layout(
|
|
348
344
|
height=900,
|
|
349
345
|
autosize=True,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|