Skip to content

Commit dae9e92

Browse files
committed
fix: 🐛 faults where feature name given not fault_name were crashing
1 parent 92da55f commit dae9e92

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

LoopStructural/modelling/input/process_data.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -619,7 +619,10 @@ def fault_orientations(self, fault_orientations):
619619
fault_orientations[["gx", "gy", "gz"]] = strike_dip_vector(
620620
fault_orientations["strike"], fault_orientations["dip"]
621621
)
622-
fault_orientations["feature_name"] = fault_orientations["fault_name"]
622+
if "feature_name" not in fault_orientations.columns and "fault_name" in fault_orientations.columns:
623+
fault_orientations["feature_name"] = fault_orientations["fault_name"]
624+
if "feature_name" not in fault_orientations.columns:
625+
raise ValueError("Fault orientation data must contain feature_name or fault_name")
623626
self._fault_orientations = fault_orientations[
624627
["X", "Y", "Z", "gx", "gy", "gz", "coord", "feature_name"]
625628
]

0 commit comments

Comments
 (0)