def METHOD_NAME():
  hkl_file = libtbx.env.find_in_repositories(
    relative_path="phenix_examples/p9-sad/p9.sca",
    test=os.path.isfile)
  if (hkl_file is None):
    print("phenix_examples/p9-sad/p9.sca not available, skipping test")
    return
  # XXX very hard to avoid cross-imports here if we want to test on actual
  # real data...
  hkl_in = file_reader.any_file(hkl_file)
  i_obs = hkl_in.file_server.miller_arrays[0]
  i_obs.setup_binner(n_bins=50)
  meas = i_obs.measurability()
  assert approx_equal(meas, 0.091044)
  meas_binned = i_obs.measurability(use_binning=True)
  bijvoet_ratios = i_obs.bijvoet_ratios(measurable_only=True)
  assert (bijvoet_ratios.size() == 1713)
  assert approx_equal(flex.mean(bijvoet_ratios), 0.476718)
  bijvoet_ratios = i_obs.bijvoet_ratios(measurable_only=False)
  assert (bijvoet_ratios.size() == 18815)
  assert approx_equal(flex.mean(bijvoet_ratios), 0.2727699)
  wilson_mean = i_obs.wilson_plot()
  assert approx_equal(wilson_mean, 18481.1252)
  i_obs.setup_binner(n_bins=10)
  wilson_binned = i_obs.wilson_plot(use_binning=True)
  out = StringIO()
  wilson_binned.show(f=out)
  assert (out.getvalue() == """\