well-log-toolkit 0.1.125__tar.gz → 0.1.127__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.
- {well_log_toolkit-0.1.125 → well_log_toolkit-0.1.127}/PKG-INFO +1 -1
- {well_log_toolkit-0.1.125 → well_log_toolkit-0.1.127}/pyproject.toml +1 -1
- {well_log_toolkit-0.1.125 → well_log_toolkit-0.1.127}/well_log_toolkit/manager.py +13 -8
- {well_log_toolkit-0.1.125 → well_log_toolkit-0.1.127}/well_log_toolkit/visualization.py +5 -4
- {well_log_toolkit-0.1.125 → well_log_toolkit-0.1.127}/well_log_toolkit/well.py +32 -10
- {well_log_toolkit-0.1.125 → well_log_toolkit-0.1.127}/well_log_toolkit.egg-info/PKG-INFO +1 -1
- {well_log_toolkit-0.1.125 → well_log_toolkit-0.1.127}/README.md +0 -0
- {well_log_toolkit-0.1.125 → well_log_toolkit-0.1.127}/setup.cfg +0 -0
- {well_log_toolkit-0.1.125 → well_log_toolkit-0.1.127}/well_log_toolkit/__init__.py +0 -0
- {well_log_toolkit-0.1.125 → well_log_toolkit-0.1.127}/well_log_toolkit/exceptions.py +0 -0
- {well_log_toolkit-0.1.125 → well_log_toolkit-0.1.127}/well_log_toolkit/las_file.py +0 -0
- {well_log_toolkit-0.1.125 → well_log_toolkit-0.1.127}/well_log_toolkit/operations.py +0 -0
- {well_log_toolkit-0.1.125 → well_log_toolkit-0.1.127}/well_log_toolkit/property.py +0 -0
- {well_log_toolkit-0.1.125 → well_log_toolkit-0.1.127}/well_log_toolkit/regression.py +0 -0
- {well_log_toolkit-0.1.125 → well_log_toolkit-0.1.127}/well_log_toolkit/statistics.py +0 -0
- {well_log_toolkit-0.1.125 → well_log_toolkit-0.1.127}/well_log_toolkit/utils.py +0 -0
- {well_log_toolkit-0.1.125 → well_log_toolkit-0.1.127}/well_log_toolkit.egg-info/SOURCES.txt +0 -0
- {well_log_toolkit-0.1.125 → well_log_toolkit-0.1.127}/well_log_toolkit.egg-info/dependency_links.txt +0 -0
- {well_log_toolkit-0.1.125 → well_log_toolkit-0.1.127}/well_log_toolkit.egg-info/requires.txt +0 -0
- {well_log_toolkit-0.1.125 → well_log_toolkit-0.1.127}/well_log_toolkit.egg-info/top_level.txt +0 -0
|
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
|
|
|
4
4
|
|
|
5
5
|
[project]
|
|
6
6
|
name = "well-log-toolkit"
|
|
7
|
-
version = "0.1.
|
|
7
|
+
version = "0.1.127"
|
|
8
8
|
description = "Fast LAS file processing with lazy loading and filtering for well log analysis"
|
|
9
9
|
readme = "README.md"
|
|
10
10
|
requires-python = ">=3.9"
|
|
@@ -1510,7 +1510,8 @@ class WellDataManager:
|
|
|
1510
1510
|
path: Optional[Union[str, Path]] = None,
|
|
1511
1511
|
sampled: bool = False,
|
|
1512
1512
|
combine: Optional[str] = None,
|
|
1513
|
-
source_name: Optional[str] = None
|
|
1513
|
+
source_name: Optional[str] = None,
|
|
1514
|
+
silent: bool = False
|
|
1514
1515
|
) -> 'WellDataManager':
|
|
1515
1516
|
"""
|
|
1516
1517
|
Load LAS file(s), auto-create well if needed.
|
|
@@ -1538,6 +1539,9 @@ class WellDataManager:
|
|
|
1538
1539
|
Name for combined source when combine is specified. If not specified,
|
|
1539
1540
|
uses 'combined_match', 'combined_resample', or 'combined_concat'.
|
|
1540
1541
|
When files span multiple wells, the well name is prepended automatically.
|
|
1542
|
+
silent : bool, default False
|
|
1543
|
+
If True, suppress debug output showing which sources were loaded.
|
|
1544
|
+
Useful when loading many files programmatically.
|
|
1541
1545
|
|
|
1542
1546
|
Returns
|
|
1543
1547
|
-------
|
|
@@ -1633,9 +1637,10 @@ class WellDataManager:
|
|
|
1633
1637
|
)
|
|
1634
1638
|
|
|
1635
1639
|
# Print debug output
|
|
1636
|
-
|
|
1637
|
-
|
|
1638
|
-
|
|
1640
|
+
if not silent:
|
|
1641
|
+
print("Loaded sources:")
|
|
1642
|
+
for well_name, src_name, file_count in loaded_sources:
|
|
1643
|
+
print(f" - Well {well_name}: {src_name} ({file_count} file{'s' if file_count > 1 else ''} combined)")
|
|
1639
1644
|
|
|
1640
1645
|
return self
|
|
1641
1646
|
|
|
@@ -1668,7 +1673,7 @@ class WellDataManager:
|
|
|
1668
1673
|
loaded_sources.append((well_name, src_name))
|
|
1669
1674
|
|
|
1670
1675
|
# Print debug output
|
|
1671
|
-
if loaded_sources:
|
|
1676
|
+
if not silent and loaded_sources:
|
|
1672
1677
|
print("Loaded sources:")
|
|
1673
1678
|
for well_name, src_name in loaded_sources:
|
|
1674
1679
|
print(f" - Well {well_name}: {src_name}")
|
|
@@ -1715,7 +1720,7 @@ class WellDataManager:
|
|
|
1715
1720
|
new_sources = set(self._wells[well_key].sources) - existing_sources
|
|
1716
1721
|
|
|
1717
1722
|
# Print debug output
|
|
1718
|
-
if new_sources:
|
|
1723
|
+
if not silent and new_sources:
|
|
1719
1724
|
print("Loaded sources:")
|
|
1720
1725
|
for src_name in new_sources:
|
|
1721
1726
|
print(f" - Well {well_name}: {src_name}")
|
|
@@ -2342,7 +2347,7 @@ class WellDataManager:
|
|
|
2342
2347
|
las_files = list(base_path.glob("*.las"))
|
|
2343
2348
|
if las_files:
|
|
2344
2349
|
for las_file in las_files:
|
|
2345
|
-
self.load_las(las_file)
|
|
2350
|
+
self.load_las(las_file, silent=True)
|
|
2346
2351
|
return self
|
|
2347
2352
|
|
|
2348
2353
|
# Load from well folders
|
|
@@ -2350,7 +2355,7 @@ class WellDataManager:
|
|
|
2350
2355
|
# Find all LAS files in this folder
|
|
2351
2356
|
las_files = sorted(well_folder.glob("*.las"))
|
|
2352
2357
|
for las_file in las_files:
|
|
2353
|
-
self.load_las(las_file)
|
|
2358
|
+
self.load_las(las_file, silent=True)
|
|
2354
2359
|
|
|
2355
2360
|
return self
|
|
2356
2361
|
|
|
@@ -24,6 +24,7 @@ from .regression import (
|
|
|
24
24
|
LinearRegression, LogarithmicRegression, ExponentialRegression,
|
|
25
25
|
PolynomialRegression, PowerRegression
|
|
26
26
|
)
|
|
27
|
+
from .exceptions import PropertyNotFoundError
|
|
27
28
|
|
|
28
29
|
# Default color palettes
|
|
29
30
|
DEFAULT_COLORS = [
|
|
@@ -3033,7 +3034,7 @@ class Crossplot:
|
|
|
3033
3034
|
if needs_alignment(color_prop.depth, depths):
|
|
3034
3035
|
color_values = np.interp(depths, color_prop.depth, color_prop.values, left=np.nan, right=np.nan)
|
|
3035
3036
|
df['color_val'] = color_values
|
|
3036
|
-
except (AttributeError, KeyError):
|
|
3037
|
+
except (AttributeError, KeyError, PropertyNotFoundError):
|
|
3037
3038
|
warnings.warn(f"Color property '{self.color}' not found in well '{well.name}', using depth")
|
|
3038
3039
|
df['color_val'] = depths
|
|
3039
3040
|
elif self.color == "depth":
|
|
@@ -3048,7 +3049,7 @@ class Crossplot:
|
|
|
3048
3049
|
if needs_alignment(size_prop.depth, depths):
|
|
3049
3050
|
size_values = np.interp(depths, size_prop.depth, size_prop.values, left=np.nan, right=np.nan)
|
|
3050
3051
|
df['size_val'] = size_values
|
|
3051
|
-
except (AttributeError, KeyError):
|
|
3052
|
+
except (AttributeError, KeyError, PropertyNotFoundError):
|
|
3052
3053
|
warnings.warn(f"Size property '{self.size}' not found in well '{well.name}'")
|
|
3053
3054
|
|
|
3054
3055
|
# Add shape property if specified and not "well"
|
|
@@ -3060,12 +3061,12 @@ class Crossplot:
|
|
|
3060
3061
|
if needs_alignment(shape_prop.depth, depths):
|
|
3061
3062
|
shape_values = np.interp(depths, shape_prop.depth, shape_prop.values, left=np.nan, right=np.nan)
|
|
3062
3063
|
df['shape_val'] = shape_values
|
|
3063
|
-
except (AttributeError, KeyError):
|
|
3064
|
+
except (AttributeError, KeyError, PropertyNotFoundError):
|
|
3064
3065
|
warnings.warn(f"Shape property '{self.shape}' not found in well '{well.name}'")
|
|
3065
3066
|
|
|
3066
3067
|
all_data.append(df)
|
|
3067
3068
|
|
|
3068
|
-
except (AttributeError, KeyError) as e:
|
|
3069
|
+
except (AttributeError, KeyError, PropertyNotFoundError) as e:
|
|
3069
3070
|
warnings.warn(f"Could not get properties for well '{well.name}': {e}")
|
|
3070
3071
|
continue
|
|
3071
3072
|
|
|
@@ -457,27 +457,49 @@ class Well:
|
|
|
457
457
|
las_files = las
|
|
458
458
|
|
|
459
459
|
# Load all files as separate sources
|
|
460
|
+
# Track sources before and after to identify what was loaded
|
|
460
461
|
loaded_sources = []
|
|
462
|
+
|
|
461
463
|
for las_file in las_files:
|
|
464
|
+
# Track sources before this file
|
|
465
|
+
sources_before = set(self.sources)
|
|
466
|
+
|
|
462
467
|
# Recursively call load_las for each file (without merge or combine, path already prepended)
|
|
463
468
|
self.load_las(las_file, path=None, sampled=sampled, resample_method=resample_method, merge=False, combine=None)
|
|
464
|
-
|
|
465
|
-
|
|
469
|
+
|
|
470
|
+
# Find which source was added or modified
|
|
471
|
+
sources_after = set(self.sources)
|
|
472
|
+
new_or_modified = sources_after - sources_before
|
|
473
|
+
|
|
474
|
+
if new_or_modified:
|
|
475
|
+
# New source was added
|
|
476
|
+
loaded_sources.append(list(new_or_modified)[0])
|
|
477
|
+
else:
|
|
478
|
+
# Source was overwritten - find it by checking which source is newest
|
|
479
|
+
# Since we don't know which one, we'll use the last one in the list
|
|
480
|
+
# This handles the overwrite case
|
|
481
|
+
if self.sources:
|
|
482
|
+
loaded_sources.append(self.sources[-1])
|
|
466
483
|
|
|
467
484
|
# Combine if requested
|
|
468
485
|
if combine in {'match', 'resample', 'concat'}:
|
|
469
486
|
# Determine combined source name
|
|
470
487
|
combined_source_name = source_name or f'combined_{combine}'
|
|
471
488
|
|
|
472
|
-
# Merge all loaded sources
|
|
473
|
-
self.
|
|
474
|
-
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
|
|
489
|
+
# Merge all loaded sources (only ones that exist)
|
|
490
|
+
sources_to_merge = [s for s in loaded_sources if s in self._sources]
|
|
491
|
+
|
|
492
|
+
if sources_to_merge:
|
|
493
|
+
self.merge(
|
|
494
|
+
method=combine,
|
|
495
|
+
sources=sources_to_merge,
|
|
496
|
+
source_name=combined_source_name
|
|
497
|
+
)
|
|
478
498
|
|
|
479
|
-
|
|
480
|
-
|
|
499
|
+
# Remove original sources (only ones that exist)
|
|
500
|
+
sources_to_remove = [s for s in sources_to_merge if s in self._sources]
|
|
501
|
+
if sources_to_remove:
|
|
502
|
+
self.remove_source(sources_to_remove)
|
|
481
503
|
|
|
482
504
|
return self
|
|
483
505
|
|
|
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
|
{well_log_toolkit-0.1.125 → well_log_toolkit-0.1.127}/well_log_toolkit.egg-info/dependency_links.txt
RENAMED
|
File without changes
|
{well_log_toolkit-0.1.125 → well_log_toolkit-0.1.127}/well_log_toolkit.egg-info/requires.txt
RENAMED
|
File without changes
|
{well_log_toolkit-0.1.125 → well_log_toolkit-0.1.127}/well_log_toolkit.egg-info/top_level.txt
RENAMED
|
File without changes
|