Skip to content

Commit

Permalink
Modified test_refine_orientation_pc_pseudo_symmetry_scipy()
Browse files Browse the repository at this point in the history
The above function in the suite TestEBSDRefineOrientationPC
has been modified by adding a trust region as an argument
in the call to s.refine_orientation_projection_centre() with
the method "differential_evolution". This was necessary because
the new version of _refine_orientation_pc_objective_function()
in indexing\_refinement\_objective_functions.py
requires the instatiation of an EBSDDetector and thus the
subsequent calculation of its gnomonic_bounds. If pc is
(0, 0, 0), this leads to strange results which cause errors
in the function _get_direction_cosines_for_fixed_pc() in
signals\util\_master_pattern.py. Adding the trust
region (same parameters as in the earlier call to
s.refine_orientation_projection_centre() within the same
test function) solves this problem.

The test test_refine_orientation_pc_pseudo_symmetry_scipy() now
passes, as do ALL the tests in tests/test_indexing/test_ebsd_refinement.py.

Signed-off-by: tgwoodcock <[email protected]>
  • Loading branch information
tgwoodcock committed Nov 11, 2024
1 parent 8f57b12 commit 4f6cb12
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions tests/test_indexing/test_ebsd_refinement.py
Original file line number Diff line number Diff line change
Expand Up @@ -1220,6 +1220,7 @@ def test_refine_orientation_pc_pseudo_symmetry_scipy(self):
# Global: Differential evolution
_, _ = s.refine_orientation_projection_center(
method="differential_evolution",
trust_region=[2, 2, 2, 0.05, 0.05, 0.05],
navigation_mask=nav_mask,
**ref_kw,
)
Expand Down

0 comments on commit 4f6cb12

Please sign in to comment.