Skip to content

Commit

Permalink
Fix fitspec test - MaxIter=1 returns initial parameter
Browse files Browse the repository at this point in the history
  • Loading branch information
RichardWaiteSTFC committed Sep 23, 2024
1 parent ae1500d commit 897d8a0
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions +sw_tests/+unit_tests/unittest_spinw_fitspec.m
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,8 @@ function del_mode_file(testCase)
methods (Test)
function test_fitspec(testCase)
fitout = testCase.swobj.fitspec(testCase.fitpar);
testCase.verify_val(fitout.x, 1.0, 'abs_tol', 0.25);
testCase.verify_val(fitout.redX2, 0.0, 'abs_tol', 10);
testCase.verify_val(fitout.x, 0.7, 'abs_tol', 0.25);
testCase.verify_val(fitout.redX2, 243, 'abs_tol', 10);
end
function test_fitspec_twin(testCase)
% Checks that twins are handled correctly
Expand All @@ -50,8 +50,8 @@ function test_fitspec_twin(testCase)
% If twins not handled correctly, the fit will be bad.
swobj.addtwin('axis', [1 1 1], 'phid', 54, 'vol', 0.01);
fitout = swobj.fitspec(testCase.fitpar);
testCase.verify_val(fitout.x, 1.0, 'abs_tol', 0.25);
testCase.verify_val(fitout.redX2, 0.0, 'abs_tol', 10);
testCase.verify_val(fitout.x, 0.7, 'abs_tol', 0.25);
testCase.verify_val(fitout.redX2, 243, 'abs_tol', 10);
end
end
end

0 comments on commit 897d8a0

Please sign in to comment.