Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 20 additions & 0 deletions FoldOptLib/FoldModellingPlugin/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
"""Compatibility layer exposing FoldOptLib modules under the
``FoldModellingPlugin`` namespace used by the tests."""
from importlib import import_module
import sys

_modules = {
'fold_modelling': 'FoldOptLib.fold_modelling',
'helper': 'FoldOptLib.helper',
'optimisers': 'FoldOptLib.optimisers',
'objective_functions': 'FoldOptLib.objective_functions',
'splot': 'FoldOptLib.splot',
'input': 'FoldOptLib.input',
'from_loopstructural': 'FoldOptLib.from_loopstructural',
}

for name, target in _modules.items():
module = import_module(target)
setattr(sys.modules[__name__], name, module)
sys.modules[f'{__name__}.{name}'] = module

20 changes: 20 additions & 0 deletions FoldOptLib/fold_modelling_plugin/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
"""Compatibility layer exposing FoldOptLib modules under the
``FoldModellingPlugin`` namespace used by the tests."""
from importlib import import_module
import sys

_modules = {
'fold_modelling': 'FoldOptLib.fold_modelling',
'helper': 'FoldOptLib.helper',
'optimisers': 'FoldOptLib.optimisers',
'objective_functions': 'FoldOptLib.objective_functions',
'splot': 'FoldOptLib.splot',
'input': 'FoldOptLib.input',
'from_loopstructural': 'FoldOptLib.from_loopstructural',
}

for name, target in _modules.items():
module = import_module(target)
setattr(sys.modules[__name__], name, module)
sys.modules[f'{__name__}.{name}'] = module

2 changes: 1 addition & 1 deletion FoldOptLib/from_loopstructural/_fold_frame.py
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,7 @@ def calculate_intersection_lineation(self, points, gradient):
"""
points = np.vstack(points)
s1g = self.features[0].evaluate_gradient(points)
s1g /= np.linalg.norm(points, axis=1)[:, None]
s1g /= np.linalg.norm(s1g, axis=1)[:, None]
gradient /= np.linalg.norm(gradient, axis=1)[:, None]
l1 = np.cross(s1g, gradient)
l1 /= np.linalg.norm(l1, axis=1)[:, None]
Expand Down
Loading