<html>
  <head>
    <meta content="text/html; charset=windows-1252"
      http-equiv="Content-Type">
  </head>
  <body bgcolor="#FFFFFF" text="#000000">
    Hi Markus,<br>
    <br>
    I loosened tolerances. Hopefully that fixes the problem, please let
    me know otherwise.<br>
    <br>
    Pavel<br>
    <br>
    <div class="moz-cite-prefix">On 8/11/15 01:30,
      <a class="moz-txt-link-abbreviated" href="mailto:markus.gerstel@diamond.ac.uk">markus.gerstel@diamond.ac.uk</a> wrote:<br>
    </div>
    <blockquote
cite="mid:415F7F573406BB498256C68158D4567454C3B1@EXCHMBX01.fed.cclrc.ac.uk"
      type="cite">
      <pre wrap="">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

</pre>
      <br>
      <fieldset class="mimeAttachmentHeader"></fieldset>
      <br>
      <pre wrap="">_______________________________________________
cctbxbb mailing list
<a class="moz-txt-link-abbreviated" href="mailto:cctbxbb@phenix-online.org">cctbxbb@phenix-online.org</a>
<a class="moz-txt-link-freetext" href="http://phenix-online.org/mailman/listinfo/cctbxbb">http://phenix-online.org/mailman/listinfo/cctbxbb</a>
</pre>
    </blockquote>
    <br>
  </body>
</html>