From 897d8a0bc987c147f52315460190a2365febb217 Mon Sep 17 00:00:00 2001 From: Richard Waite Date: Mon, 23 Sep 2024 11:47:56 +0100 Subject: [PATCH] Fix fitspec test - MaxIter=1 returns initial parameter --- +sw_tests/+unit_tests/unittest_spinw_fitspec.m | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/+sw_tests/+unit_tests/unittest_spinw_fitspec.m b/+sw_tests/+unit_tests/unittest_spinw_fitspec.m index fe245c53f..d499e269e 100644 --- a/+sw_tests/+unit_tests/unittest_spinw_fitspec.m +++ b/+sw_tests/+unit_tests/unittest_spinw_fitspec.m @@ -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 @@ -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