Skip to content

Commit

Permalink
fix: fold rotation angle calculated incorrectly
Browse files Browse the repository at this point in the history
for folds where the cross product and axis are
parallel.
Not sure if 0.5 is the right threshold.
  • Loading branch information
Lachlan Grose committed Oct 15, 2021
1 parent e35f6b2 commit aea51bf
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion LoopStructural/modelling/fold/foldframe.py
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@ def calculate_fold_limb_rotation(self, feature_builder, axis=None):
# and 90
vv = np.cross(s1g, s0g, axisa=1, axisb=1)
ds = np.einsum('ij,ij->i', fold_axis, vv)
flr = np.where(ds > 0, np.rad2deg(np.arcsin(r2)),
flr = np.where(np.abs(ds) > 0.5, np.rad2deg(np.arcsin(r2)),
(- np.rad2deg(np.arcsin(r2))))
flr = np.where(flr < -90, (180. + flr), flr)
flr = np.where(flr > 90, -(180. - flr), flr)
Expand Down

0 comments on commit aea51bf

Please sign in to comment.