Commits

David Mehringer authored f723a92d03b
increased test tolerance, added a failure string
No tags

gcwrap/python/scripts/tests/test_spxfit.py

Modified
324 324 self.assertTrue(rec['xUnit'] == "Hz")
325 325
326 326 myia.addnoise(pars=[0, 0.001])
327 327 for i in [0, 1]:
328 328 ltpestoff = [0.4, 3]
329 329 if i == 0:
330 330 rec = myia.fitprofile(ngauss=0, spxtype="ltp", spxest=ltpestoff)
331 331 if i == 1:
332 332 rec = spxfit(imagename=imagename, spxtype="ltp", spxest=ltpestoff)
333 333 sols = rec['ltp']['solution'].ravel()
334 - self.assertTrue((abs(1 - sols/ltpest) < 2e-2).all())
334 + self.assertTrue(
335 + (abs(1 - sols/ltpest) < 3e-2).all(),
336 + "sols " + str(sols) + " ltpest " + str(ltpest)
337 + )
335 338 spxsol = "ltpsol.im"
336 339 spxerr = "ltperr.im"
337 340 ltpestoff = [0.4, 2.2]
338 341 ltpfix = [False, True]
339 342 if i == 0:
340 343 rec = myia.fitprofile(
341 344 ngauss=0, spxtype="ltp", spxest=ltpestoff, spxfix=ltpfix,
342 345 multifit=True, spxsol=spxsol, spxerr=spxerr
343 346 )
344 347 if i == 1:

Everything looks good. We'll let you know here if there's anything you should know about.

Add shortcut