Skip to content

Commit

Permalink
Revert tolerance change for a test
Browse files Browse the repository at this point in the history
It looks like the reason for the tolerance change may not be XSPEC but
some other change (as this test fails on my machine wuing XSPEC 12.9.1p).
For now revert the change (to check it is un-needed for Travis).

I have done a limited check to see if the difference is due to NumPy
(e.v. 1.14 vs 1.12) but it does not seem to me. It could be a compiler
difference, or some other environmental change.
  • Loading branch information
DougBurke committed May 23, 2018
1 parent 9ad6639 commit 5841b24
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions sherpa/stats/tests/test_stats.py
Expand Up @@ -514,11 +514,15 @@ def test_mychi_nobkgdata_modelhasbkg(self):
def test_wstat(self):
fit = Fit(self.data, self.model, WStat(), NelderMead())
results = fit.fit()
# Prior to XSPEC 12.10.0, tol=1e-6 was used
# Note that nH is very large (it is the parameter that
# needs the large relative tolerance).
# On a local linux machine I have to bump the tolerance to
# 3e-4, but this isn't seen on Travis. The fit isn't
# "great", so it may be that the results are sensitive to
# numerical differences (e.g. as introduced with updated
# compilers).
# tol = 3e-4
tol = 1e-6 # TODO: investigate difference
self.compare_results(self._fit_wstat_results_bench, results,
tol=3e-4)
tol=tol)

# The following test passes if run by itself but fails when run with others
# def test_wstat1(self):
Expand Down

0 comments on commit 5841b24

Please sign in to comment.