subsurface-terra 2025.1.0rc12__py3-none-any.whl → 2025.1.0rc14__py3-none-any.whl
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.
- subsurface/_version.py +2 -2
- subsurface/core/geological_formats/boreholes/boreholes.py +4 -1
- subsurface/core/structs/base_structures/structured_data.py +19 -2
- subsurface/modules/reader/mesh/_trimesh_reader.py +5 -1
- {subsurface_terra-2025.1.0rc12.dist-info → subsurface_terra-2025.1.0rc14.dist-info}/METADATA +1 -1
- {subsurface_terra-2025.1.0rc12.dist-info → subsurface_terra-2025.1.0rc14.dist-info}/RECORD +9 -9
- {subsurface_terra-2025.1.0rc12.dist-info → subsurface_terra-2025.1.0rc14.dist-info}/WHEEL +1 -1
- {subsurface_terra-2025.1.0rc12.dist-info → subsurface_terra-2025.1.0rc14.dist-info}/licenses/LICENSE +0 -0
- {subsurface_terra-2025.1.0rc12.dist-info → subsurface_terra-2025.1.0rc14.dist-info}/top_level.txt +0 -0
subsurface/_version.py
CHANGED
|
@@ -17,5 +17,5 @@ __version__: str
|
|
|
17
17
|
__version_tuple__: VERSION_TUPLE
|
|
18
18
|
version_tuple: VERSION_TUPLE
|
|
19
19
|
|
|
20
|
-
__version__ = version = '2025.1.
|
|
21
|
-
__version_tuple__ = version_tuple = (2025, 1, 0, '
|
|
20
|
+
__version__ = version = '2025.1.0rc14'
|
|
21
|
+
__version_tuple__ = version_tuple = (2025, 1, 0, 'rc14')
|
|
@@ -91,7 +91,10 @@ class BoreholeSet:
|
|
|
91
91
|
def get_bottom_coords_for_each_lith(self) -> dict[Hashable, np.ndarray]:
|
|
92
92
|
merged_df = self._merge_vertex_data_arrays_to_dataframe()
|
|
93
93
|
component_lith_arrays = {}
|
|
94
|
-
|
|
94
|
+
groupby = merged_df.groupby('lith_ids')
|
|
95
|
+
if groupby.ngroups == 0:
|
|
96
|
+
raise ValueError("No components found")
|
|
97
|
+
for lith, group in groupby:
|
|
95
98
|
lith = int(lith)
|
|
96
99
|
first_vertices = group.groupby('well_id').last().reset_index()
|
|
97
100
|
array = first_vertices[['X', 'Y', 'Z']].values
|
|
@@ -131,12 +131,29 @@ class StructuredData:
|
|
|
131
131
|
def values(self) -> np.ndarray:
|
|
132
132
|
return self.data[self.active_data_array_name].values
|
|
133
133
|
|
|
134
|
+
_bounds: Tuple[float, float, float, float, float, float] = None
|
|
135
|
+
|
|
134
136
|
@property
|
|
135
137
|
def bounds(self):
|
|
138
|
+
if self._bounds is not None:
|
|
139
|
+
return self._bounds
|
|
140
|
+
|
|
136
141
|
array_: xr.DataArray = self.data[self.active_data_array_name]
|
|
137
|
-
bounds = self.
|
|
142
|
+
bounds = self._get_bounds_from_coord(array_)
|
|
138
143
|
return bounds
|
|
139
144
|
|
|
145
|
+
@bounds.setter
|
|
146
|
+
def bounds(self, bounds: Tuple[float, float, float, float, float, float]):
|
|
147
|
+
"""
|
|
148
|
+
Set the bounds of the structured data. This is useful for defining the
|
|
149
|
+
spatial extent of the data in a structured grid.
|
|
150
|
+
|
|
151
|
+
Args:
|
|
152
|
+
bounds (Tuple[float, float, float, float, float, float]): A tuple containing
|
|
153
|
+
the minimum and maximum values for each dimension (xmin, xmax, ymin, ymax, zmin, zmax).
|
|
154
|
+
"""
|
|
155
|
+
self._bounds = bounds
|
|
156
|
+
|
|
140
157
|
@property
|
|
141
158
|
def shape(self):
|
|
142
159
|
return self.active_data_array.shape
|
|
@@ -146,7 +163,7 @@ class StructuredData:
|
|
|
146
163
|
return self.data[self.active_data_array_name]
|
|
147
164
|
|
|
148
165
|
@staticmethod
|
|
149
|
-
def
|
|
166
|
+
def _get_bounds_from_coord(xr_obj: xr.DataArray):
|
|
150
167
|
bounds = {}
|
|
151
168
|
for coord in xr_obj.coords:
|
|
152
169
|
bounds[coord] = (xr_obj[coord].min().item(), xr_obj[coord].max().item())
|
|
@@ -47,7 +47,7 @@ def load_with_trimesh(path_to_file_or_buffer, file_type: Optional[str] = None,
|
|
|
47
47
|
case TriMeshTransformations.RIGHT_HANDED_Z_UP_Y_REVERSED:
|
|
48
48
|
# * Forward Z Up Y
|
|
49
49
|
transform=np.array([
|
|
50
|
-
[1, 0, 0, 0],
|
|
50
|
+
[-1, 0, 0, 0],
|
|
51
51
|
[0, 0, 1, 0],
|
|
52
52
|
[0, 1, 0, 0],
|
|
53
53
|
[0, 0, 0, 1],
|
|
@@ -109,6 +109,10 @@ class LoadWithTrimesh:
|
|
|
109
109
|
# If there's already an image reference in the material, let the user know
|
|
110
110
|
if hasattr(material, 'image') and material.image is not None:
|
|
111
111
|
print(" -> Material already has an image:", material.image)
|
|
112
|
+
|
|
113
|
+
if geometry.visual.uv is None:
|
|
114
|
+
raise ValueError("Geometry does not have UV coordinates for texture mapping, despite having a material."
|
|
115
|
+
"This can also happen if the geometry is given in quads instead of triangles.")
|
|
112
116
|
else:
|
|
113
117
|
print("No material found or no 'material' attribute on this geometry.")
|
|
114
118
|
|
{subsurface_terra-2025.1.0rc12.dist-info → subsurface_terra-2025.1.0rc14.dist-info}/METADATA
RENAMED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: subsurface_terra
|
|
3
|
-
Version: 2025.1.
|
|
3
|
+
Version: 2025.1.0rc14
|
|
4
4
|
Summary: Subsurface data types and utilities. This version is the one used by Terranigma Solutions. Please feel free to take anything in this repository for the original one.
|
|
5
5
|
Home-page: https://softwareunderground.github.io/subsurface
|
|
6
6
|
Author: Software Underground
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
subsurface/__init__.py,sha256=0D2rCUem3fiHsXFXXSmwheLiPS4cXxEdfWdFBj0b-cY,930
|
|
2
|
-
subsurface/_version.py,sha256=
|
|
2
|
+
subsurface/_version.py,sha256=6hCz-0xeTsPVqYirvA5x7rupXsfeGqd4ZcT7_v8NHgo,550
|
|
3
3
|
subsurface/optional_requirements.py,sha256=Wg36RqxzPiLtN-3qSg5K9QVEeXCB0-EjSzHERAoO8EE,2883
|
|
4
4
|
subsurface/api/__init__.py,sha256=E3R1fNn_d5XQdlZyjtzBcH_bYRzAvOc3xV38qFLqbZY,369
|
|
5
5
|
subsurface/api/interfaces/__init__.py,sha256=rqUtJyMLicobcyhmr74TepjmUQAEmlazKT3vjV_n3aA,6
|
|
@@ -11,7 +11,7 @@ subsurface/core/geological_formats/__init__.py,sha256=jOyPsC3ZEMFljo9SGk0ym7cmBZ
|
|
|
11
11
|
subsurface/core/geological_formats/fault.py,sha256=Zldf9VT4Gzo0NWe_UvBf5kOgxZtg2T9eWaWPqxeffWw,1547
|
|
12
12
|
subsurface/core/geological_formats/boreholes/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
13
13
|
subsurface/core/geological_formats/boreholes/_combine_trajectories.py,sha256=U5VribebcMAag0DOKnna983g1BXAGLKCddGra2g3Nos,5246
|
|
14
|
-
subsurface/core/geological_formats/boreholes/boreholes.py,sha256=
|
|
14
|
+
subsurface/core/geological_formats/boreholes/boreholes.py,sha256=bWGEPMFHPVyGO8Kv3uBo9U8_MLXlEEkdraXx86eURJY,5364
|
|
15
15
|
subsurface/core/geological_formats/boreholes/collars.py,sha256=o1I8bS0XqWa2fS0n6XZVKXsuBHknXO2Z_5sdlFc_GAE,750
|
|
16
16
|
subsurface/core/geological_formats/boreholes/survey.py,sha256=aaENR0ksT_lK0BYR7HL73KNZ44eo3Ag353xQdVcLOz0,16219
|
|
17
17
|
subsurface/core/reader_helpers/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
@@ -23,7 +23,7 @@ subsurface/core/structs/base_structures/__init__.py,sha256=VhMcVjc0pWT8G2IAoKcFe
|
|
|
23
23
|
subsurface/core/structs/base_structures/_liquid_earth_mesh.py,sha256=e5hIJOv7GrufLlNlR4xBFuMduZYUHR12BAE1B1GuY3o,5850
|
|
24
24
|
subsurface/core/structs/base_structures/_unstructured_data_constructor.py,sha256=aqQwAXs9mUqDoMfadEdKDZTirHrkgRjcmmSwqwxaXjQ,2741
|
|
25
25
|
subsurface/core/structs/base_structures/base_structures_enum.py,sha256=l9uovc8JWskHmT8tgSE8p4Ep4RjZi5jh_xuZCH-s8HM,96
|
|
26
|
-
subsurface/core/structs/base_structures/structured_data.py,sha256=
|
|
26
|
+
subsurface/core/structs/base_structures/structured_data.py,sha256=QLTlfQLrXnMvGm6EkrTvQq9m5eqHKwIG8nYGuM1jwHI,10592
|
|
27
27
|
subsurface/core/structs/base_structures/unstructured_data.py,sha256=_cB64U0d8VlWgod0eHNluLmtLQZKLOwJYkmdtqYocXs,12904
|
|
28
28
|
subsurface/core/structs/structured_elements/__init__.py,sha256=wQ8z6vioC98TNwnqMHlDMVFJ1yOKsmlVa6kHL1SOfZQ,43
|
|
29
29
|
subsurface/core/structs/structured_elements/octree_mesh.py,sha256=vI30DW46oGP_h_3v85MiFmwFDoKh1HWdVBATdTmC-yA,240
|
|
@@ -45,7 +45,7 @@ subsurface/modules/reader/faults/faults.py,sha256=s144Gq0tFvjSUkB66dB86kYjW2l2e1
|
|
|
45
45
|
subsurface/modules/reader/geo_object/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
46
46
|
subsurface/modules/reader/mesh/_GOCAD_mesh.py,sha256=_MwNy4iVMGnemvT01hhB-nbCc8a1r8ETEAkD-AWcBz4,3304
|
|
47
47
|
subsurface/modules/reader/mesh/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
48
|
-
subsurface/modules/reader/mesh/_trimesh_reader.py,sha256=
|
|
48
|
+
subsurface/modules/reader/mesh/_trimesh_reader.py,sha256=Skg1D52RuG70Ov02OrMwUdUG_3zbQ6QeS4XlMPOM5Qw,17844
|
|
49
49
|
subsurface/modules/reader/mesh/csv_mesh_reader.py,sha256=0iXYg-JOLUg7yH6Rw6qCoxXvKh0hOUTwjYxbhSlGfGM,1969
|
|
50
50
|
subsurface/modules/reader/mesh/dxf_reader.py,sha256=JDhzFRE46sdwMGBB8enHNluH07ohqt6LhgLHiSQRL-I,6525
|
|
51
51
|
subsurface/modules/reader/mesh/glb_reader.py,sha256=dierR9AYM5Q2szLuemfLlM_JcPRNtDrD5fpF8zNjBS8,1118
|
|
@@ -89,8 +89,8 @@ subsurface/modules/writer/to_rex/material_encoder.py,sha256=zGlqF9X_Civ9VvtGwo-I
|
|
|
89
89
|
subsurface/modules/writer/to_rex/mesh_encoder.py,sha256=6TBtJhYJEAMEBHxQkbweXrJO1jIUx1ClM8l5ajVCrLc,6443
|
|
90
90
|
subsurface/modules/writer/to_rex/to_rex.py,sha256=njsm2d3e69pRVfF_TOC_hexvXPmgNTZdJvhbnXcvyIo,3800
|
|
91
91
|
subsurface/modules/writer/to_rex/utils.py,sha256=HEpJ95LjHOK24ePpmLpPP5uFyv6i_kN3AWh031q-1Uc,379
|
|
92
|
-
subsurface_terra-2025.1.
|
|
93
|
-
subsurface_terra-2025.1.
|
|
94
|
-
subsurface_terra-2025.1.
|
|
95
|
-
subsurface_terra-2025.1.
|
|
96
|
-
subsurface_terra-2025.1.
|
|
92
|
+
subsurface_terra-2025.1.0rc14.dist-info/licenses/LICENSE,sha256=GSXh9K5TZauM89BeGbYg07oST_HMhOTiZoEGaUeKBtA,11606
|
|
93
|
+
subsurface_terra-2025.1.0rc14.dist-info/METADATA,sha256=RrT1uQXG_FQJNwVpkyTo1ozaLYC3bPVZr1mU_SulRHA,7094
|
|
94
|
+
subsurface_terra-2025.1.0rc14.dist-info/WHEEL,sha256=wXxTzcEDnjrTwFYjLPcsW_7_XihufBwmpiBeiXNBGEA,91
|
|
95
|
+
subsurface_terra-2025.1.0rc14.dist-info/top_level.txt,sha256=f32R_tUSf83CfkpB4vjv5m2XcD8TmDX9h7F4rnEXt5A,11
|
|
96
|
+
subsurface_terra-2025.1.0rc14.dist-info/RECORD,,
|
{subsurface_terra-2025.1.0rc12.dist-info → subsurface_terra-2025.1.0rc14.dist-info}/licenses/LICENSE
RENAMED
|
File without changes
|
{subsurface_terra-2025.1.0rc12.dist-info → subsurface_terra-2025.1.0rc14.dist-info}/top_level.txt
RENAMED
|
File without changes
|