Skip to content

Commit

Permalink
fix: temp disable fault centre from project file
Browse files Browse the repository at this point in the history
  • Loading branch information
Lachlan Grose committed Apr 27, 2022
1 parent de22530 commit 44d813d
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 17 deletions.
32 changes: 16 additions & 16 deletions LoopStructural/modelling/input/process_data.py
Original file line number Diff line number Diff line change
Expand Up @@ -281,21 +281,21 @@ def fault_properties(self, fault_properties):
return

fault_properties = fault_properties.copy()
if (
"centreEasting" not in fault_properties.columns
or "centreNorthing" not in fault_properties.columns
or "centreAltitude" not in fault_properties
):
fault_properties["centreEasting"] = np.nan
fault_properties["centreNorthing"] = np.nan
fault_properties["centreAltitude"] = np.nan
for fname in fault_properties.index:
pts = self.fault_locations.loc[
self.fault_locations["feature_name"] == fname, ["X", "Y", "Z"]
]
fault_properties.loc[
fname, ["centreEasting", "centreNorthing", "centreAltitude"]
] = np.nanmean(pts, axis=0)
# if (
# "centreEasting" not in fault_properties.columns
# or "centreNorthing" not in fault_properties.columns
# or "centreAltitude" not in fault_properties
# ):
fault_properties["centreEasting"] = np.nan
fault_properties["centreNorthing"] = np.nan
fault_properties["centreAltitude"] = np.nan
for fname in fault_properties.index:
pts = self.fault_locations.loc[
self.fault_locations["feature_name"] == fname, ["X", "Y", "Z"]
]
fault_properties.loc[
fname, ["centreEasting", "centreNorthing", "centreAltitude"]
] = np.nanmean(pts, axis=0)
if (
"avgNormalEasting" not in fault_properties.columns
or "avgNormalNorthing" not in fault_properties.columns
Expand Down Expand Up @@ -349,7 +349,7 @@ def fault_properties(self, fault_properties):
"avgSlipDirAltitude",
],
] = np.mean(pts, axis=0)
if "displacment" not in fault_properties.columns:
if "displacement" not in fault_properties.columns:
fault_properties["displacement"] = 0
logger.warning(
"Fault displacement not provided, setting to 0. \n\
Expand Down
7 changes: 6 additions & 1 deletion LoopStructural/modelling/input/project_file.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,9 @@ def __init__(self, projectfile, use_thickness=None):
)
)
fault_properties = self.projectfile.faultLog
fault_properties["displacement"] = fault_properties["avgDisplacement"].astype(
float
)
colours = dict(
zip(
self.projectfile.stratigraphicLog.name,
Expand All @@ -58,7 +61,7 @@ def __init__(self, projectfile, use_thickness=None):
contacts=contacts,
contact_orientations=orientations,
stratigraphic_order=[
("sg", list(self.stratigraphicLog.name))
("sg", list(self.projectfile.stratigraphicLog.name))
], # needs to be updated,
thicknesses=thicknesses,
fault_orientations=fault_orientations,
Expand All @@ -69,5 +72,7 @@ def __init__(self, projectfile, use_thickness=None):
fault_stratigraphy=None,
intrusions=None,
use_thickness=use_thickness,
origin=self.projectfile.origin,
maximum=self.projectfile.maximum
# fault_edge_properties=fault_edge_properties
)

0 comments on commit 44d813d

Please sign in to comment.