Skip to content

Commit

Permalink
fix: error to catch when not enough data
Browse files Browse the repository at this point in the history
 for calculating in intersection lineation
  • Loading branch information
Lachlan Grose committed Sep 16, 2021
1 parent d6fcdea commit bdd93ea
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions LoopStructural/modelling/fold/foldframe.py
Original file line number Diff line number Diff line change
Expand Up @@ -182,6 +182,9 @@ def calculate_intersection_lineation(self, feature_builder):
points.append(gpoints)
if npoints.shape[0] > 0:
points.append(npoints)
if len(points) == 0:
logger.error("No points to calculate intersection lineation")
raise ValueError("No data points associated with {}".format(feature_builder.name))
points = np.vstack(points)
s1g = self.features[0].evaluate_gradient(points[:, :3])
s1g /= np.linalg.norm(points[:, :3], axis=1)[:, None]
Expand Down

0 comments on commit bdd93ea

Please sign in to comment.