Skip to content

Commit

Permalink
fix: fault overprinting not added to model
Browse files Browse the repository at this point in the history
  • Loading branch information
lachlangrose committed Jan 30, 2023
1 parent c390b7c commit 750ccce
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions LoopStructural/modelling/core/geological_model.py
Original file line number Diff line number Diff line change
Expand Up @@ -555,7 +555,7 @@ def data_for_feature(self, feature_name: str) -> pd.DataFrame:
return self.data.loc[self.data["feature_name"] == feature_name, :]

@property
def data(self):
def data(self) -> pd.DataFrame:
return self._data

@data.setter
Expand Down Expand Up @@ -614,7 +614,7 @@ def data(self, data):
self._data[h] = 1.0
# LS wants polarity as -1 or 1, change 0 to -1
self._data.loc[self._data["polarity"] == 0, "polarity"] = -1.0
self.data.loc[np.isnan(self.data["w"]), "w"] = 1.0
self._data.loc[np.isnan(self._data["w"]), "w"] = 1.0
if "strike" in self._data and "dip" in self._data:
logger.info("Converting strike and dip to vectors")
mask = np.all(~np.isnan(self._data.loc[:, ["strike", "dip"]]), axis=1)
Expand Down Expand Up @@ -1527,6 +1527,7 @@ def create_and_add_fault(
minor_axis=None,
intermediate_axis=None,
faultfunction="BaseFault",
faults=[],
**kwargs,
):
"""
Expand Down Expand Up @@ -1602,10 +1603,11 @@ def create_and_add_fault(
fault_frame_builder = FaultBuilder(
interpolator, name=fault_surface_data, model=self, **kwargs
)
self._add_faults(fault_frame_builder)
# add data
fault_frame_data = self.data[
fault_frame_data = self.data.loc[
self.data["feature_name"] == fault_surface_data
].copy()
]
trace_mask = np.logical_and(
fault_frame_data["coord"] == 0, fault_frame_data["val"] == 0
)
Expand Down

0 comments on commit 750ccce

Please sign in to comment.