quick-pp 0.2.58__tar.gz → 0.2.60__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.58 → quick_pp-0.2.60}/PKG-INFO +1 -1
- {quick_pp-0.2.58 → quick_pp-0.2.60}/pyproject.toml +1 -1
- {quick_pp-0.2.58 → quick_pp-0.2.60}/quick_pp/__init__.py +1 -1
- {quick_pp-0.2.58 → quick_pp-0.2.60}/quick_pp/machine_learning/feature_engineering.py +2 -9
- {quick_pp-0.2.58 → quick_pp-0.2.60}/quick_pp/plotter/well_log.py +43 -15
- {quick_pp-0.2.58 → quick_pp-0.2.60}/quick_pp/rock_type.py +2 -13
- {quick_pp-0.2.58 → quick_pp-0.2.60}/.gitignore +0 -0
- {quick_pp-0.2.58 → quick_pp-0.2.60}/LICENSE +0 -0
- {quick_pp-0.2.58 → quick_pp-0.2.60}/README.md +0 -0
- {quick_pp-0.2.58 → quick_pp-0.2.60}/quick_pp/api/__init__.py +0 -0
- {quick_pp-0.2.58 → quick_pp-0.2.60}/quick_pp/api/exceptions.py +0 -0
- {quick_pp-0.2.58 → quick_pp-0.2.60}/quick_pp/api/fastapi_mlflow/__init__.py +0 -0
- {quick_pp-0.2.58 → quick_pp-0.2.60}/quick_pp/api/fastapi_mlflow/_mlflow_types.py +0 -0
- {quick_pp-0.2.58 → quick_pp-0.2.60}/quick_pp/api/fastapi_mlflow/applications.py +0 -0
- {quick_pp-0.2.58 → quick_pp-0.2.60}/quick_pp/api/fastapi_mlflow/exceptions.py +0 -0
- {quick_pp-0.2.58 → quick_pp-0.2.60}/quick_pp/api/fastapi_mlflow/predictors.py +0 -0
- {quick_pp-0.2.58 → quick_pp-0.2.60}/quick_pp/api/main.py +0 -0
- {quick_pp-0.2.58 → quick_pp-0.2.60}/quick_pp/api/mlflow_model_deployment.py +0 -0
- {quick_pp-0.2.58 → quick_pp-0.2.60}/quick_pp/api/router.py +0 -0
- {quick_pp-0.2.58 → quick_pp-0.2.60}/quick_pp/api/schemas/lithology_hc_correction.py +0 -0
- {quick_pp-0.2.58 → quick_pp-0.2.60}/quick_pp/api/schemas/lithology_ssc.py +0 -0
- {quick_pp-0.2.58 → quick_pp-0.2.60}/quick_pp/api/schemas/lithology_vsh_gr.py +0 -0
- {quick_pp-0.2.58 → quick_pp-0.2.60}/quick_pp/api/schemas/permeability_choo.py +0 -0
- {quick_pp-0.2.58 → quick_pp-0.2.60}/quick_pp/api/schemas/permeability_others.py +0 -0
- {quick_pp-0.2.58 → quick_pp-0.2.60}/quick_pp/api/schemas/porosity.py +0 -0
- {quick_pp-0.2.58 → quick_pp-0.2.60}/quick_pp/api/schemas/ressum.py +0 -0
- {quick_pp-0.2.58 → quick_pp-0.2.60}/quick_pp/api/schemas/saturation_archie.py +0 -0
- {quick_pp-0.2.58 → quick_pp-0.2.60}/quick_pp/api/schemas/saturation_b.py +0 -0
- {quick_pp-0.2.58 → quick_pp-0.2.60}/quick_pp/api/schemas/saturation_qv.py +0 -0
- {quick_pp-0.2.58 → quick_pp-0.2.60}/quick_pp/api/schemas/saturation_rw.py +0 -0
- {quick_pp-0.2.58 → quick_pp-0.2.60}/quick_pp/api/schemas/saturation_temp_grad.py +0 -0
- {quick_pp-0.2.58 → quick_pp-0.2.60}/quick_pp/api/schemas/saturation_waxman_smits.py +0 -0
- {quick_pp-0.2.58 → quick_pp-0.2.60}/quick_pp/api/services/chat.py +0 -0
- {quick_pp-0.2.58 → quick_pp-0.2.60}/quick_pp/api/services/las_handler.py +0 -0
- {quick_pp-0.2.58 → quick_pp-0.2.60}/quick_pp/api/services/lithology.py +0 -0
- {quick_pp-0.2.58 → quick_pp-0.2.60}/quick_pp/api/services/permeability.py +0 -0
- {quick_pp-0.2.58 → quick_pp-0.2.60}/quick_pp/api/services/porosity.py +0 -0
- {quick_pp-0.2.58 → quick_pp-0.2.60}/quick_pp/api/services/reservoir_summary.py +0 -0
- {quick_pp-0.2.58 → quick_pp-0.2.60}/quick_pp/api/services/saturation.py +0 -0
- {quick_pp-0.2.58 → quick_pp-0.2.60}/quick_pp/api/static/favicon.ico +0 -0
- {quick_pp-0.2.58 → quick_pp-0.2.60}/quick_pp/api/static/logo.png +0 -0
- {quick_pp-0.2.58 → quick_pp-0.2.60}/quick_pp/api/template/chat.html +0 -0
- {quick_pp-0.2.58 → quick_pp-0.2.60}/quick_pp/api/template/home.html +0 -0
- {quick_pp-0.2.58 → quick_pp-0.2.60}/quick_pp/cli.py +0 -0
- {quick_pp-0.2.58 → quick_pp-0.2.60}/quick_pp/config.py +0 -0
- {quick_pp-0.2.58 → quick_pp-0.2.60}/quick_pp/core_calibration.py +0 -0
- {quick_pp-0.2.58 → quick_pp-0.2.60}/quick_pp/fluid_type.py +0 -0
- {quick_pp-0.2.58 → quick_pp-0.2.60}/quick_pp/las_handler.py +0 -0
- {quick_pp-0.2.58 → quick_pp-0.2.60}/quick_pp/lithology/__init__.py +0 -0
- {quick_pp-0.2.58 → quick_pp-0.2.60}/quick_pp/lithology/carbonate.py +0 -0
- {quick_pp-0.2.58 → quick_pp-0.2.60}/quick_pp/lithology/multi_mineral.py +0 -0
- {quick_pp-0.2.58 → quick_pp-0.2.60}/quick_pp/lithology/sand_shale.py +0 -0
- {quick_pp-0.2.58 → quick_pp-0.2.60}/quick_pp/lithology/sand_silt_clay.py +0 -0
- {quick_pp-0.2.58 → quick_pp-0.2.60}/quick_pp/lithology/thin_beds.py +0 -0
- {quick_pp-0.2.58 → quick_pp-0.2.60}/quick_pp/machine_learning/__init__.py +0 -0
- {quick_pp-0.2.58 → quick_pp-0.2.60}/quick_pp/machine_learning/config.py +0 -0
- {quick_pp-0.2.58 → quick_pp-0.2.60}/quick_pp/machine_learning/mock_data/mock_data.parquet +0 -0
- {quick_pp-0.2.58 → quick_pp-0.2.60}/quick_pp/machine_learning/predict_pipeline.py +0 -0
- {quick_pp-0.2.58 → quick_pp-0.2.60}/quick_pp/machine_learning/train_pipeline.py +0 -0
- {quick_pp-0.2.58 → quick_pp-0.2.60}/quick_pp/machine_learning/utils.py +0 -0
- {quick_pp-0.2.58 → quick_pp-0.2.60}/quick_pp/objects.py +0 -0
- {quick_pp-0.2.58 → quick_pp-0.2.60}/quick_pp/permeability.py +0 -0
- {quick_pp-0.2.58 → quick_pp-0.2.60}/quick_pp/plotter/__init__.py +0 -0
- {quick_pp-0.2.58 → quick_pp-0.2.60}/quick_pp/plotter/plotter.py +0 -0
- {quick_pp-0.2.58 → quick_pp-0.2.60}/quick_pp/plotter/well_log_config.py +0 -0
- {quick_pp-0.2.58 → quick_pp-0.2.60}/quick_pp/porosity.py +0 -0
- {quick_pp-0.2.58 → quick_pp-0.2.60}/quick_pp/qaqc.py +0 -0
- {quick_pp-0.2.58 → quick_pp-0.2.60}/quick_pp/ressum.py +0 -0
- {quick_pp-0.2.58 → quick_pp-0.2.60}/quick_pp/rock_physics/__init__.py +0 -0
- {quick_pp-0.2.58 → quick_pp-0.2.60}/quick_pp/rock_physics/geomechanics.py +0 -0
- {quick_pp-0.2.58 → quick_pp-0.2.60}/quick_pp/rock_physics/geophysics.py +0 -0
- {quick_pp-0.2.58 → quick_pp-0.2.60}/quick_pp/rock_physics/rpm.py +0 -0
- {quick_pp-0.2.58 → quick_pp-0.2.60}/quick_pp/saturation.py +0 -0
- {quick_pp-0.2.58 → quick_pp-0.2.60}/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.60
|
|
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.60' # Need to be updated manually when releasing a new version/ change in pyproject.toml
|
|
@@ -57,15 +57,8 @@ def log_perm(perm):
|
|
|
57
57
|
|
|
58
58
|
|
|
59
59
|
def rock_flag_gr(gr):
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
q3 = gr.quantile(0.75)
|
|
63
|
-
iqr = q3 - q1
|
|
64
|
-
min_gr = q1 - 1.5 * iqr
|
|
65
|
-
max_gr = q3 + 1.5 * iqr
|
|
66
|
-
|
|
67
|
-
vsh_gr = estimate_vsh_gr(gr, min_gr, max_gr)
|
|
68
|
-
cutoffs = find_cutoffs(vsh_gr, 4)
|
|
60
|
+
vsh_gr = estimate_vsh_gr(gr)
|
|
61
|
+
cutoffs = find_cutoffs(vsh_gr, 5)
|
|
69
62
|
return rock_typing(vsh_gr, cut_offs=cutoffs, higher_is_better=False)
|
|
70
63
|
|
|
71
64
|
|
|
@@ -245,9 +245,13 @@ def plotly_log(well_data, well_name: str = '', depth_uom="", trace_defs: dict =
|
|
|
245
245
|
fig.update_traces(selector=dict(name='ROCK_FLAG_0'), visible=False)
|
|
246
246
|
for feature in rock_flag_columns:
|
|
247
247
|
fig.add_trace(
|
|
248
|
-
go.Scatter(
|
|
249
|
-
|
|
250
|
-
|
|
248
|
+
go.Scatter(
|
|
249
|
+
x=df[feature].replace(0, -999.25),
|
|
250
|
+
y=index,
|
|
251
|
+
line_color=COLOR_DICT[feature],
|
|
252
|
+
name=feature,
|
|
253
|
+
fill='tozerox', fillcolor=COLOR_DICT.get(feature, '#000000')
|
|
254
|
+
), row=1, col=7, secondary_y=False)
|
|
251
255
|
|
|
252
256
|
# --- COAL_FLAG traces (special style, always on tracks 4-8, secondary_y=True) ---
|
|
253
257
|
if 'COAL_FLAG' in df.columns and no_of_track >= 8 and default_flags:
|
|
@@ -255,25 +259,47 @@ def plotly_log(well_data, well_name: str = '', depth_uom="", trace_defs: dict =
|
|
|
255
259
|
name = 'COAL_FLAG'
|
|
256
260
|
for c in [4, 5, 6, 7, 8]:
|
|
257
261
|
fig.add_trace(
|
|
258
|
-
go.Scatter(
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
262
|
+
go.Scatter(
|
|
263
|
+
x=df['COAL_FLAG'],
|
|
264
|
+
y=index, name=name,
|
|
265
|
+
line_width=0,
|
|
266
|
+
fill='tozerox', fillcolor='rgba(0,0,0,1)', opacity=1,
|
|
267
|
+
hovertemplate=f'<b>{name}</b><extra></extra>'
|
|
268
|
+
), row=1, col=c, secondary_y=True)
|
|
269
|
+
|
|
270
|
+
# Add ZONES to hover box in each tracks if available
|
|
271
|
+
if 'ZONES' in df.columns:
|
|
272
|
+
for c in range(1, no_of_track + 1):
|
|
273
|
+
fig.add_trace(
|
|
274
|
+
go.Scatter(
|
|
275
|
+
x=np.zeros(len(df)),
|
|
276
|
+
y=index,
|
|
277
|
+
name='ZONES',
|
|
278
|
+
line={'width': 0},
|
|
279
|
+
text=df['ZONES'],
|
|
280
|
+
hovertemplate='<b>ZONES</b>: %{text}<extra></extra>',
|
|
281
|
+
), row=1, col=c, secondary_y=False)
|
|
282
|
+
|
|
283
|
+
# Add TVD to hover box in each tracks if available
|
|
264
284
|
if 'TVD' in df.columns:
|
|
265
285
|
for c in range(1, no_of_track + 1):
|
|
266
286
|
fig.add_trace(
|
|
267
|
-
go.Scatter(
|
|
268
|
-
|
|
287
|
+
go.Scatter(
|
|
288
|
+
x=df['TVD'],
|
|
289
|
+
y=index,
|
|
290
|
+
name='TVD',
|
|
291
|
+
line={'width': 0},
|
|
292
|
+
hovertemplate='<b>TVD</b>: %{x}<extra></extra>'
|
|
293
|
+
), row=1, col=c, secondary_y=False)
|
|
269
294
|
|
|
270
295
|
# Update xaxis and yaxis layout configurations
|
|
271
296
|
visible_xaxis = [col for col, trace_def in trace_defs.items() if not trace_def.get('hide_xaxis', True)]
|
|
272
297
|
layout_dict = {f'xaxis{x.xaxis[1:]}': v for k, v in xaxis_defs.items() for x in fig.data
|
|
273
298
|
if k in visible_xaxis and x.name == k}
|
|
274
|
-
layout_dict['yaxis'] = {'domain': [0, .84],
|
|
299
|
+
layout_dict['yaxis'] = {'domain': [0, .84],
|
|
300
|
+
'title': {'text': f'<b>DEPTH ({depth_uom.upper()}) MD</b>', 'font_size': 12}}
|
|
275
301
|
|
|
276
|
-
for i in range(1, no_of_track * 2
|
|
302
|
+
for i in range(1, no_of_track * 2):
|
|
277
303
|
layout_dict[f'yaxis{i}'] = {
|
|
278
304
|
'domain': [0, .84],
|
|
279
305
|
'visible': False if i % 2 == 0 and i != no_of_track * 2 else True,
|
|
@@ -299,6 +325,7 @@ def plotly_log(well_data, well_name: str = '', depth_uom="", trace_defs: dict =
|
|
|
299
325
|
"""
|
|
300
326
|
if 'ZONES' in df.columns:
|
|
301
327
|
tops_df = df[['DEPTH', 'ZONES']].dropna().reset_index()
|
|
328
|
+
# Limit the autogenerated ZONE_* to optimize the plotting
|
|
302
329
|
if not tops_df.empty and sum([1 for c in tops_df.ZONES.unique() if 'ZONE_' in c]) < 30:
|
|
303
330
|
zone_tops_idx = [0] + [idx for idx, (i, j) in enumerate(
|
|
304
331
|
zip(tops_df['ZONES'], tops_df['ZONES'][1:]), 1) if i != j]
|
|
@@ -310,7 +337,7 @@ def plotly_log(well_data, well_name: str = '', depth_uom="", trace_defs: dict =
|
|
|
310
337
|
)
|
|
311
338
|
fig.add_trace(
|
|
312
339
|
go.Scatter(
|
|
313
|
-
name=tops[2], x=[1.1, 1.1], y=[tops[1] - 1, tops[1] - 1],
|
|
340
|
+
name=tops[2], x=[1.1, 1.1], y=[tops[1] - 1, tops[1] - 1], hoverinfo='skip',
|
|
314
341
|
text=tops[2], mode='text', textfont=dict(color='#763F98', size=12), textposition='top right'
|
|
315
342
|
), row=1, col=2)
|
|
316
343
|
add_zone_markers(fig, df)
|
|
@@ -320,13 +347,14 @@ def plotly_log(well_data, well_name: str = '', depth_uom="", trace_defs: dict =
|
|
|
320
347
|
autosize=True,
|
|
321
348
|
showlegend=False,
|
|
322
349
|
title={
|
|
323
|
-
'text': '
|
|
350
|
+
'text': '<b>%s Well Logs</b>' % well_name,
|
|
324
351
|
'y': .99,
|
|
325
352
|
'xanchor': 'center',
|
|
326
353
|
'yanchor': 'top',
|
|
327
354
|
'font_size': 12
|
|
328
355
|
},
|
|
329
356
|
hovermode='y unified',
|
|
357
|
+
hoverdistance=1,
|
|
330
358
|
dragmode='pan',
|
|
331
359
|
modebar_remove=['lasso', 'select', 'autoscale'],
|
|
332
360
|
modebar_add=['drawline', 'drawcircle', 'drawrect', 'eraseshape'],
|
|
@@ -9,7 +9,6 @@ from sklearn.ensemble import RandomForestClassifier, RandomForestRegressor
|
|
|
9
9
|
from sklearn.metrics import (classification_report, auc, ConfusionMatrixDisplay, confusion_matrix,
|
|
10
10
|
r2_score, mean_absolute_error)
|
|
11
11
|
|
|
12
|
-
from quick_pp.utils import min_max_line
|
|
13
12
|
from quick_pp.lithology import shale_volume_steiber
|
|
14
13
|
from quick_pp import logger
|
|
15
14
|
|
|
@@ -350,20 +349,10 @@ def estimate_vsh_gr(gr, min_gr=None, max_gr=None, alpha=0.1):
|
|
|
350
349
|
Returns:
|
|
351
350
|
float: VSH_GR.
|
|
352
351
|
"""
|
|
352
|
+
from sklearn.preprocessing import robust_scale, minmax_scale
|
|
353
353
|
# Normalize gamma ray
|
|
354
354
|
if not max_gr or (not min_gr and min_gr != 0):
|
|
355
|
-
|
|
356
|
-
# Use IQR for robust outlier detection
|
|
357
|
-
q1, q3 = np.nanquantile(gr, [0.25, 0.75])
|
|
358
|
-
iqr = q3 - q1
|
|
359
|
-
upper_bound = q3 + 1.5 * iqr
|
|
360
|
-
lower_bound = q1 - 1.5 * iqr
|
|
361
|
-
|
|
362
|
-
# Replace outliers with NaN and then forward fill
|
|
363
|
-
gr_series = pd.Series(gr)
|
|
364
|
-
gr = gr_series.where((gr_series >= lower_bound) & (gr_series <= upper_bound)).ffill().to_numpy()
|
|
365
|
-
_, max_gr = min_max_line(gr, alpha)
|
|
366
|
-
gri = np.where(gr < max_gr, gr / max_gr, 1)
|
|
355
|
+
gri = minmax_scale(robust_scale(gr))
|
|
367
356
|
else:
|
|
368
357
|
gri = (gr - min_gr) / (max_gr - min_gr)
|
|
369
358
|
gri = np.where(gri < 1, gri, 1)
|
|
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
|