quick-pp 0.2.63__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.
Files changed (74) hide show
  1. {quick_pp-0.2.63 → quick_pp-0.2.64}/PKG-INFO +1 -1
  2. {quick_pp-0.2.63 → quick_pp-0.2.64}/pyproject.toml +1 -1
  3. {quick_pp-0.2.63 → quick_pp-0.2.64}/quick_pp/__init__.py +1 -1
  4. {quick_pp-0.2.63 → quick_pp-0.2.64}/quick_pp/objects.py +6 -5
  5. {quick_pp-0.2.63 → quick_pp-0.2.64}/quick_pp/plotter/plotter.py +14 -12
  6. {quick_pp-0.2.63 → quick_pp-0.2.64}/.gitignore +0 -0
  7. {quick_pp-0.2.63 → quick_pp-0.2.64}/LICENSE +0 -0
  8. {quick_pp-0.2.63 → quick_pp-0.2.64}/README.md +0 -0
  9. {quick_pp-0.2.63 → quick_pp-0.2.64}/quick_pp/api/__init__.py +0 -0
  10. {quick_pp-0.2.63 → quick_pp-0.2.64}/quick_pp/api/exceptions.py +0 -0
  11. {quick_pp-0.2.63 → quick_pp-0.2.64}/quick_pp/api/fastapi_mlflow/__init__.py +0 -0
  12. {quick_pp-0.2.63 → quick_pp-0.2.64}/quick_pp/api/fastapi_mlflow/_mlflow_types.py +0 -0
  13. {quick_pp-0.2.63 → quick_pp-0.2.64}/quick_pp/api/fastapi_mlflow/applications.py +0 -0
  14. {quick_pp-0.2.63 → quick_pp-0.2.64}/quick_pp/api/fastapi_mlflow/exceptions.py +0 -0
  15. {quick_pp-0.2.63 → quick_pp-0.2.64}/quick_pp/api/fastapi_mlflow/predictors.py +0 -0
  16. {quick_pp-0.2.63 → quick_pp-0.2.64}/quick_pp/api/main.py +0 -0
  17. {quick_pp-0.2.63 → quick_pp-0.2.64}/quick_pp/api/mlflow_model_deployment.py +0 -0
  18. {quick_pp-0.2.63 → quick_pp-0.2.64}/quick_pp/api/router.py +0 -0
  19. {quick_pp-0.2.63 → quick_pp-0.2.64}/quick_pp/api/schemas/lithology_hc_correction.py +0 -0
  20. {quick_pp-0.2.63 → quick_pp-0.2.64}/quick_pp/api/schemas/lithology_ssc.py +0 -0
  21. {quick_pp-0.2.63 → quick_pp-0.2.64}/quick_pp/api/schemas/lithology_vsh_gr.py +0 -0
  22. {quick_pp-0.2.63 → quick_pp-0.2.64}/quick_pp/api/schemas/permeability_choo.py +0 -0
  23. {quick_pp-0.2.63 → quick_pp-0.2.64}/quick_pp/api/schemas/permeability_others.py +0 -0
  24. {quick_pp-0.2.63 → quick_pp-0.2.64}/quick_pp/api/schemas/porosity.py +0 -0
  25. {quick_pp-0.2.63 → quick_pp-0.2.64}/quick_pp/api/schemas/ressum.py +0 -0
  26. {quick_pp-0.2.63 → quick_pp-0.2.64}/quick_pp/api/schemas/saturation_archie.py +0 -0
  27. {quick_pp-0.2.63 → quick_pp-0.2.64}/quick_pp/api/schemas/saturation_b.py +0 -0
  28. {quick_pp-0.2.63 → quick_pp-0.2.64}/quick_pp/api/schemas/saturation_qv.py +0 -0
  29. {quick_pp-0.2.63 → quick_pp-0.2.64}/quick_pp/api/schemas/saturation_rw.py +0 -0
  30. {quick_pp-0.2.63 → quick_pp-0.2.64}/quick_pp/api/schemas/saturation_temp_grad.py +0 -0
  31. {quick_pp-0.2.63 → quick_pp-0.2.64}/quick_pp/api/schemas/saturation_waxman_smits.py +0 -0
  32. {quick_pp-0.2.63 → quick_pp-0.2.64}/quick_pp/api/services/chat.py +0 -0
  33. {quick_pp-0.2.63 → quick_pp-0.2.64}/quick_pp/api/services/las_handler.py +0 -0
  34. {quick_pp-0.2.63 → quick_pp-0.2.64}/quick_pp/api/services/lithology.py +0 -0
  35. {quick_pp-0.2.63 → quick_pp-0.2.64}/quick_pp/api/services/permeability.py +0 -0
  36. {quick_pp-0.2.63 → quick_pp-0.2.64}/quick_pp/api/services/porosity.py +0 -0
  37. {quick_pp-0.2.63 → quick_pp-0.2.64}/quick_pp/api/services/reservoir_summary.py +0 -0
  38. {quick_pp-0.2.63 → quick_pp-0.2.64}/quick_pp/api/services/saturation.py +0 -0
  39. {quick_pp-0.2.63 → quick_pp-0.2.64}/quick_pp/api/static/favicon.ico +0 -0
  40. {quick_pp-0.2.63 → quick_pp-0.2.64}/quick_pp/api/static/logo.png +0 -0
  41. {quick_pp-0.2.63 → quick_pp-0.2.64}/quick_pp/api/template/chat.html +0 -0
  42. {quick_pp-0.2.63 → quick_pp-0.2.64}/quick_pp/api/template/home.html +0 -0
  43. {quick_pp-0.2.63 → quick_pp-0.2.64}/quick_pp/cli.py +0 -0
  44. {quick_pp-0.2.63 → quick_pp-0.2.64}/quick_pp/config.py +0 -0
  45. {quick_pp-0.2.63 → quick_pp-0.2.64}/quick_pp/core_calibration.py +0 -0
  46. {quick_pp-0.2.63 → quick_pp-0.2.64}/quick_pp/fluid_type.py +0 -0
  47. {quick_pp-0.2.63 → quick_pp-0.2.64}/quick_pp/las_handler.py +0 -0
  48. {quick_pp-0.2.63 → quick_pp-0.2.64}/quick_pp/lithology/__init__.py +0 -0
  49. {quick_pp-0.2.63 → quick_pp-0.2.64}/quick_pp/lithology/carbonate.py +0 -0
  50. {quick_pp-0.2.63 → quick_pp-0.2.64}/quick_pp/lithology/multi_mineral.py +0 -0
  51. {quick_pp-0.2.63 → quick_pp-0.2.64}/quick_pp/lithology/sand_shale.py +0 -0
  52. {quick_pp-0.2.63 → quick_pp-0.2.64}/quick_pp/lithology/sand_silt_clay.py +0 -0
  53. {quick_pp-0.2.63 → quick_pp-0.2.64}/quick_pp/lithology/thin_beds.py +0 -0
  54. {quick_pp-0.2.63 → quick_pp-0.2.64}/quick_pp/machine_learning/__init__.py +0 -0
  55. {quick_pp-0.2.63 → quick_pp-0.2.64}/quick_pp/machine_learning/config.py +0 -0
  56. {quick_pp-0.2.63 → quick_pp-0.2.64}/quick_pp/machine_learning/feature_engineering.py +0 -0
  57. {quick_pp-0.2.63 → quick_pp-0.2.64}/quick_pp/machine_learning/mock_data/mock_data.parquet +0 -0
  58. {quick_pp-0.2.63 → quick_pp-0.2.64}/quick_pp/machine_learning/predict_pipeline.py +0 -0
  59. {quick_pp-0.2.63 → quick_pp-0.2.64}/quick_pp/machine_learning/train_pipeline.py +0 -0
  60. {quick_pp-0.2.63 → quick_pp-0.2.64}/quick_pp/machine_learning/utils.py +0 -0
  61. {quick_pp-0.2.63 → quick_pp-0.2.64}/quick_pp/permeability.py +0 -0
  62. {quick_pp-0.2.63 → quick_pp-0.2.64}/quick_pp/plotter/__init__.py +0 -0
  63. {quick_pp-0.2.63 → quick_pp-0.2.64}/quick_pp/plotter/well_log.py +0 -0
  64. {quick_pp-0.2.63 → quick_pp-0.2.64}/quick_pp/plotter/well_log_config.py +0 -0
  65. {quick_pp-0.2.63 → quick_pp-0.2.64}/quick_pp/porosity.py +0 -0
  66. {quick_pp-0.2.63 → quick_pp-0.2.64}/quick_pp/qaqc.py +0 -0
  67. {quick_pp-0.2.63 → quick_pp-0.2.64}/quick_pp/ressum.py +0 -0
  68. {quick_pp-0.2.63 → quick_pp-0.2.64}/quick_pp/rock_physics/__init__.py +0 -0
  69. {quick_pp-0.2.63 → quick_pp-0.2.64}/quick_pp/rock_physics/geomechanics.py +0 -0
  70. {quick_pp-0.2.63 → quick_pp-0.2.64}/quick_pp/rock_physics/geophysics.py +0 -0
  71. {quick_pp-0.2.63 → quick_pp-0.2.64}/quick_pp/rock_physics/rpm.py +0 -0
  72. {quick_pp-0.2.63 → quick_pp-0.2.64}/quick_pp/rock_type.py +0 -0
  73. {quick_pp-0.2.63 → quick_pp-0.2.64}/quick_pp/saturation.py +0 -0
  74. {quick_pp-0.2.63 → 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.63
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>
@@ -4,7 +4,7 @@ build-backend = "hatchling.build"
4
4
 
5
5
  [project]
6
6
  name = "quick-pp"
7
- version = "0.2.63"
7
+ version = "0.2.64"
8
8
  description = "Python package to assist in providing quick-look/ preliminary petrophysical estimation."
9
9
  readme = "README.md"
10
10
  license = "MIT"
@@ -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.63' # Need to be updated manually when releasing a new version/ change in pyproject.toml
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=os.path.join("data", "04_project", "outputs")):
186
- os.makedirs(folder, exist_ok=True)
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=os.path.join("data", "04_project", "outputs")):
193
- os.makedirs(folder, exist_ok=True)
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['DEPTH'] > out) | (well_data['DEPTH'] > goc)) & (
43
- (well_data['DEPTH'] < odt) | (well_data['DEPTH'] < owc)), 1, 0)
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['DEPTH'] < gdt) | (well_data['DEPTH'] < gwc) | (well_data['DEPTH'] < goc)) & (
47
- well_data['DEPTH'] > gut), 1, 0)
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['DEPTH'] > wut) | (well_data['DEPTH'] > owc) | (well_data['DEPTH'] > gwc)), 1, 0)
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, 0))
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['DEPTH'], label=r'$BVO_{Log}$')
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['DEPTH'], label=r'$BVO_{SHF}$')
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['DEPTH'], 0, 1, where=well_data['FLUID_FLAG'] == 1, color='g', alpha=0.3, label='Oil')
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['DEPTH'], 0, 1, where=well_data['FLUID_FLAG'] == 2, color='r', alpha=0.3, label='Gas')
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['DEPTH'], 0, 1, where=well_data['FLUID_FLAG'] == 0, color='b', alpha=0.3, label='Water')
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()
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes