Skip to content

Commit f78efca

Browse files
committed
Extends unit test with excluded regions
1 parent 7264008 commit f78efca

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

tests/functional_tests/fitting/test_powder-diffraction_multiphase.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,9 @@ def test_single_fit_neutron_pd_tof_mcstas_lbco_si() -> None:
5656
project.sample_models.add(model_2)
5757
project.experiments.add(expt)
5858

59+
# Exclude regions from fitting
60+
project.experiments['mcstas'].excluded_regions.add(minimum=108000, maximum=200000)
61+
5962
# Prepare for fitting
6063
project.analysis.current_calculator = 'cryspy'
6164
project.analysis.current_minimizer = 'lmfit (leastsq)'
@@ -84,7 +87,7 @@ def test_single_fit_neutron_pd_tof_mcstas_lbco_si() -> None:
8487

8588
# Compare fit quality
8689
assert_almost_equal(project.analysis.fit_results.reduced_chi_square,
87-
desired=1.79, # 2.87
90+
desired=2.87,
8891
decimal=1)
8992

9093

0 commit comments

Comments
 (0)