resqpy 4.16.6__py3-none-any.whl → 4.16.7__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.
resqpy/__init__.py CHANGED
@@ -28,6 +28,6 @@
28
28
 
29
29
  import logging
30
30
 
31
- __version__ = "4.16.6" # Set at build time
31
+ __version__ = "4.16.7" # Set at build time
32
32
  log = logging.getLogger(__name__)
33
33
  log.info(f"Imported resqpy version {__version__}")
@@ -249,6 +249,7 @@ class GridConnectionSet(BaseResqpy):
249
249
  gcs.model = parent_model
250
250
  gcs.uuid = bu.new_uuid() # not strictly necessary as append will cause a new uuid as well
251
251
  gcs.title = title
252
+ gcs.property_collection = None
252
253
  # append data from the remaining grid connection sets
253
254
  for another_uuid in gcs_uuid_list[1:]:
254
255
  another_gcs = GridConnectionSet(source_model, uuid = another_uuid)
@@ -2089,6 +2090,7 @@ class GridConnectionSet(BaseResqpy):
2089
2090
  if default_value is None:
2090
2091
  default_value = -1 if dtype is int else np.NaN
2091
2092
  gcs_prop_array = gcs_prop.array_ref()
2093
+ assert gcs_prop_array.shape == (self.count,)
2092
2094
  log.debug(f'preparing grid face arrays from gcs property: {gcs_prop.title}; from gcs:{self.title}')
2093
2095
 
2094
2096
  baffle_mask = None
@@ -2102,29 +2104,31 @@ class GridConnectionSet(BaseResqpy):
2102
2104
  ai = np.full((nk, nj, ni + 1), default_value, dtype = dtype)
2103
2105
 
2104
2106
  # populate arrays from faces of gcs, optionally filtered by feature index
2105
- cip, fip = self.list_of_cell_face_pairs_for_feature_index(None)
2106
- assert len(cip) == self.count and len(fip) == self.count
2107
- assert gcs_prop_array.shape == (self.count,)
2108
- if feature_index is None:
2109
- indices = np.arange(self.count, dtype = int)
2110
- else:
2111
- indices = self.indices_for_feature_index(feature_index)
2112
-
2113
- side_list = ([0] if lazy else [0, 1])
2107
+ cip, fip = self.list_of_cell_face_pairs_for_feature_index(feature_index)
2114
2108
 
2115
2109
  value_array = gcs_prop_array.copy()
2110
+
2116
2111
  if baffle_mask is not None:
2117
2112
  value_array[baffle_mask] = 0 # will be cast to float (or bool) if needed
2113
+
2114
+ if feature_index is not None:
2115
+ indices = self.indices_for_feature_index(feature_index)
2116
+ value_array = value_array[indices]
2117
+ if active_mask is not None:
2118
+ active_mask = active_mask[indices]
2119
+
2118
2120
  if active_mask is not None:
2119
2121
  cip = cip[active_mask, :, :]
2120
2122
  value_array = value_array[active_mask]
2121
2123
 
2124
+ side_list = ([0] if lazy else [0, 1])
2125
+
2122
2126
  for side in side_list:
2123
2127
  cell_kji0 = cip[:, side].copy() # shape (N, 3)
2124
2128
  axis = fip[:, side, 0] # shape (N,)
2125
2129
  polarity = fip[:, side, 1] # shape (N,)
2126
- assert 0 <= np.min(axis) and np.max(axis) <= 2
2127
- assert 0 <= np.min(polarity) and np.max(polarity) <= 1
2130
+ # assert 0 <= np.min(axis) and np.max(axis) <= 2
2131
+ # assert 0 <= np.min(polarity) and np.max(polarity) <= 1
2128
2132
 
2129
2133
  axis_mask = (axis == 0).astype(bool)
2130
2134
  ak_kji0 = cell_kji0[axis_mask, :]
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: resqpy
3
- Version: 4.16.6
3
+ Version: 4.16.7
4
4
  Summary: Python API for working with RESQML models
5
5
  Home-page: https://github.com/bp/resqpy
6
6
  License: MIT
@@ -1,4 +1,4 @@
1
- resqpy/__init__.py,sha256=HShUsMyW_Opst0QwCwfVL9ZeafR-pFfMTCvvDzmU6rU,556
1
+ resqpy/__init__.py,sha256=UxKXI8Fd5rwd7CjVK-yvaBPFhw8-s2GsvgMQgWAy-Wc,556
2
2
  resqpy/crs.py,sha256=R7DfcTP5xGv5pu9Y8RHA2WVM9DjBCSVMoHcz4RmQ7Yw,27646
3
3
  resqpy/derived_model/__init__.py,sha256=NFvMSOKI3cxmH7lAbddV43JjoUj-r2G7ExEfOqinD1I,1982
4
4
  resqpy/derived_model/_add_edges_per_column_property_array.py,sha256=cpW3gwp6MSYIrtvFmCjoJXcyUsgGuCDbgmwlJCJebUs,6410
@@ -25,7 +25,7 @@ resqpy/derived_model/_zonal_grid.py,sha256=H-IGMudUV-tiRHZqvl9B1wxMQNjeAM2zHvTll
25
25
  resqpy/derived_model/_zone_layer_ranges_from_array.py,sha256=4pHkp7yqvkif_pC59VEK0g0JeFx7kt8mqhqADTOcucI,4358
26
26
  resqpy/fault/__init__.py,sha256=IStX_EhPnppIExf_mgYrBddC4KP26VcqblcfXiBT614,996
27
27
  resqpy/fault/_gcs_functions.py,sha256=wMP4gnzT6Smv1RKGex0fdcadzj2xmanyusNA-D_ebfI,29569
28
- resqpy/fault/_grid_connection_set.py,sha256=IEG9duPzPmVge-7yX70mcfmFSdU8MSR1sbQmRoSjlyE,117203
28
+ resqpy/fault/_grid_connection_set.py,sha256=O8VQcGZlQNWgnLS_SvGAUc_l5lAvSDK2BHZK5EUf404,117264
29
29
  resqpy/grid/__init__.py,sha256=WsfOnR5lHcnpJEx8ZZ3lhd4dImEiieJLM7eFPxMi3u8,692
30
30
  resqpy/grid/_cell_properties.py,sha256=pbyAK2eV9n4teOxm2q5hyBinohEbevFPrCfMcpGiqUU,20689
31
31
  resqpy/grid/_connection_sets.py,sha256=-277bh9pMoeESSzy9oZehL-vc82aMGZuSLQs2KJ4Wfg,10120
@@ -194,7 +194,7 @@ resqpy/well/_wellbore_marker_frame.py,sha256=xvYH2_2Ie3a18LReFymbUrZboOx7Rhv5DOD
194
194
  resqpy/well/blocked_well_frame.py,sha256=Lg7TgynfPv9WkklXTLt9VN6uBXWUqX1LI-Xmv_FBqYk,22555
195
195
  resqpy/well/well_object_funcs.py,sha256=LYTcC07ezlBxClfrug_B4iXXZUkXDPgsVufNzp361Wo,24703
196
196
  resqpy/well/well_utils.py,sha256=zwpYjT85nXAwWBhYB1Pygu2SgouZ-44k6hEOnpoMfBI,5969
197
- resqpy-4.16.6.dist-info/LICENSE,sha256=2duHPIkKQyESMdQ4hKjL8CYEsYRHXaYxt0YQkzsUYE4,1059
198
- resqpy-4.16.6.dist-info/METADATA,sha256=nKWccolEPWrZ8qsjWUWMrrbdDSGX1uFvnJOtD7hJySI,4028
199
- resqpy-4.16.6.dist-info/WHEEL,sha256=sP946D7jFCHeNz5Iq4fL4Lu-PrWrFsgfLXbbkciIZwg,88
200
- resqpy-4.16.6.dist-info/RECORD,,
197
+ resqpy-4.16.7.dist-info/LICENSE,sha256=2duHPIkKQyESMdQ4hKjL8CYEsYRHXaYxt0YQkzsUYE4,1059
198
+ resqpy-4.16.7.dist-info/METADATA,sha256=OewCYwU0gqYSS4Gs7o4kiihxMnmLw9W8czw2zLogvN8,4028
199
+ resqpy-4.16.7.dist-info/WHEEL,sha256=sP946D7jFCHeNz5Iq4fL4Lu-PrWrFsgfLXbbkciIZwg,88
200
+ resqpy-4.16.7.dist-info/RECORD,,