Hi Markus, I loosened tolerances. Hopefully that fixes the problem, please let me know otherwise. Pavel On 8/11/15 01:30, [email protected] wrote:
Hi everyone, particularly Pavel I guess,
I had a look at one intermittently failing test: cctbx/regression/tst_miller.py, run with parameter P31
The relevant piece of code is: def exercise_randomize_amplitude_and_phase(): xrs = random_structure.xray_structure( space_group_info=sgtbx.space_group_info(number=1), elements=["C"]*300) fc = xrs.structure_factors(d_min=1).f_calc() def run(a,p): fc_ = fc.randomize_amplitude_and_phase(amplitude_error=a, phase_error_deg=p, random_seed=1312425) d1, d2 = flex.abs(fc.data()), flex.abs(fc_.data()) r = flex.sum(flex.abs(d1-d2))/flex.sum(flex.abs(d1+d2))*2 return (r, fc.mean_phase_error(phase_source=fc_)) # assert approx_equal(run(0,0), (0,0)) for v in list(xrange(0,91, 10)): r = run(v/100.,v) assert approx_equal(r[0], v/100., 0.01) assert approx_equal(r[1], v, 1)
The test fails in the last line for varying values of v. I saw that the values of r[] increase proportionally to v, so I ran the test 2000 times for v=90, plotting the values of r[0] and r[1]; results attached. With the current statistics the r[1] test is expected to fail in 1 run out of every 80.
Could you please have a look at this, and either increase the tolerance on the test or identify whether these values are true unexpected outliers indicating a problem in the code? Don't know what the r[1] distribution should look like, but that's clearly not normal.
:)
-Markus
_______________________________________________ cctbxbb mailing list [email protected] http://phenix-online.org/mailman/listinfo/cctbxbb