|
19 | 19 | from LoopStructural.utils import RegionEverywhere |
20 | 20 |
|
21 | 21 | class GeologicalFeatureInterpolator: |
22 | | - """[summary] |
23 | | -
|
24 | | - [extended_summary] |
25 | | - """ |
26 | 22 | def __init__(self, interpolator, name='Feature', region=None, **kwargs): |
27 | 23 | """ |
28 | 24 | Constructor for a GeologicalFeatureInterpolator |
@@ -199,6 +195,7 @@ def add_data_to_interpolator(self, constrained=False, force_constrained=False, * |
199 | 195 | for f in self.faults: |
200 | 196 | data.loc[:,xyz_names()] = f.apply_to_points( |
201 | 197 | self.get_data_locations()) |
| 198 | + # self.check_interpolation_geometry(data.loc[:,xyz_names()].to_numpy()) |
202 | 199 | # Now check whether there are enough constraints for the |
203 | 200 | # interpolator to be able to solve |
204 | 201 | # we need at least 2 different value points or a single norm |
@@ -416,7 +413,17 @@ def set_interpolation_geometry(self,origin,maximum, rotation=None): |
416 | 413 |
|
417 | 414 | while self.interpolator.nx < 100: |
418 | 415 | self.interpolator.support.step_vector=self.interpolator.support.step_vector*0.9 |
419 | | - |
| 416 | + def check_interpolation_geometry(self,data): |
| 417 | + """Check the interpolation support geometry to data to make sure everything fits """ |
| 418 | + origin = self.interpolator.support.origin |
| 419 | + maximum = self.interpolator.support.maximum |
| 420 | + print(origin,maximum) |
| 421 | + origin[origin<np.min(data,axis=0)] = np.min(data,axis=0)[origin<np.min(data,axis=0)] |
| 422 | + maximum[maximum<np.max(data,axis=0)] = np.max(data,axis=0)[maximum<np.max(data,axis=0)] |
| 423 | + print(origin,maximum) |
| 424 | + |
| 425 | + self.interpolator.support.origin = origin |
| 426 | + self.interpolator.support.maximum = maximum |
420 | 427 | def build(self, fold=None, fold_weights={}, data_region=None, **kwargs): |
421 | 428 | """ |
422 | 429 | Runs the interpolation and builds the geological feature |
|
0 commit comments