Skip to content

Commit f515706

Browse files
committed
[ENH] Added section plots to sprember
1 parent b34995c commit f515706

File tree

3 files changed

+8
-6
lines changed

3 files changed

+8
-6
lines changed

gempy/API/grid_API.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,12 +12,11 @@
1212
def set_section_grid(grid: Grid, section_dict: dict):
1313
if grid.sections is None:
1414
grid.sections = Sections(regular_grid=grid.regular_grid, section_dict=section_dict)
15-
grid.sections
1615
else:
1716
grid.sections.set_sections(section_dict,
1817
regular_grid=grid.regular_grid)
1918

20-
set_active_grid(grid, [GridTypes.SECTIONS])
19+
set_active_grid(grid, [Grid.GridTypes.SECTIONS])
2120
return grid.sections
2221

2322

gempy/core/data/geo_model.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -233,7 +233,7 @@ def project_bounds(self) -> np.ndarray:
233233
return self.grid.bounding_box
234234

235235
@property
236-
def extent_transformed(self) -> np.ndarray:
236+
def extent_transformed_transformed_by_input(self) -> np.ndarray:
237237
transformed = self.input_transform.apply(self.project_bounds) # ! grid already has the grid transform applied
238238
new_extents = np.array([transformed[:, 0].min(), transformed[:, 0].max(),
239239
transformed[:, 1].min(), transformed[:, 1].max(),

gempy/modules/data_manipulation/engine_factory.py

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,12 @@
1111
from gempy_engine.core.data.transforms import Transform
1212

1313

14-
def interpolation_input_from_structural_frame(geo_model: "GeoModel") -> InterpolationInput:
14+
def interpolation_input_from_structural_frame(geo_model: "gempy.data.GeoModel") -> InterpolationInput:
15+
import gempy # ! This is important for type safety
16+
geo_model: gempy.data.GeoModel = geo_model
17+
1518
_legacy_factor = 0
16-
19+
1720
structural_frame: StructuralFrame = geo_model.structural_frame
1821
input_transform: Transform = geo_model.input_transform
1922
grid: Grid = geo_model.grid
@@ -36,7 +39,7 @@ def interpolation_input_from_structural_frame(geo_model: "GeoModel") -> Interpol
3639
grid: engine_grid.EngineGrid = _apply_input_transform_to_grids(
3740
grid=grid,
3841
input_transform=input_transform,
39-
extent_transformed=geo_model.extent_transformed
42+
extent_transformed=geo_model.extent_transformed_transformed_by_input
4043
)
4144

4245
interpolation_input: InterpolationInput = InterpolationInput(

0 commit comments

Comments
 (0)