Example #1
0
#
#  DIALS viewer test
#
#  Copyright (C) 2014 Diamond Light Source
#
#  Author: Luis Fuentes-Montero (Luiso)
#
#  This code is distributed under the BSD license, a copy of which is
#  included in the root directory of this package."

import cPickle as pickle
from dials.array_family import flex

table = flex.reflection_table.from_pickle("all_refl.pickle")

from dials.viewer.tools import show_reflection

show_reflection(table[len(table) // 2])
    dials_regression = libtbx.env.dist_path('dials_regression')
  except KeyError, e:
    print 'FAIL: dials_regression not configured'
    exit(0)
  path = join(dials_regression, "centroid_test_data")
  import sys
  assert(len(sys.argv) == 1)
  sys.argv.append(join(path, "experiments.json"))
  sys.argv.append(join(path, "profile.phil"))

  parser = OptionParser(phil=phil_scope)
  params, options, args = parser.parse_args()
  assert(len(args) == 1)

  exlist = ExperimentListFactory.from_json_file(args[0])
  assert(len(exlist) == 1)


  profile_model = ProfileModelList.load(params)

  rlist = flex.reflection_table.from_predictions_multi(exlist)
  rlist.compute_bbox(exlist, profile_model)
  rlist['shoebox'] = flex.shoebox(rlist['panel'], rlist['bbox'])
  rlist['shoebox'].allocate()

  rlist.extract_shoeboxes(exlist[0].imageset)

  show_reflection(rlist[len(rlist)//2])
  #show_reflection(rlist[len(rlist)//2], orient = "porTrait")
  #show_reflection(rlist[len(rlist)//2], orient = "lanDscape")
#
#  DIALS viewer test
#
#  Copyright (C) 2014 Diamond Light Source
#
#  Author: Luis Fuentes-Montero (Luiso)
#
#  This code is distributed under the BSD license, a copy of which is
#  included in the root directory of this package."

import cPickle as pickle
from dials.array_family import flex

table = flex.reflection_table.from_pickle("all_refl.pickle")

from dials.viewer.tools import show_reflection
show_reflection(table[len(table)//2])
Example #4
0
        dials_regression = libtbx.env.dist_path("dials_regression")
    except KeyError as e:
        print("FAIL: dials_regression not configured")
        exit(0)
    path = join(dials_regression, "centroid_test_data")
    import sys

    assert len(sys.argv) == 1
    sys.argv.append(join(path, "experiments.json"))
    sys.argv.append(join(path, "profile.phil"))

    parser = OptionParser(phil=phil_scope)
    params, options, args = parser.parse_args()
    assert len(args) == 1

    exlist = ExperimentListFactory.from_json_file(args[0])
    assert len(exlist) == 1

    profile_model = ProfileModelList.load(params)

    rlist = flex.reflection_table.from_predictions_multi(exlist)
    rlist.compute_bbox(exlist, profile_model)
    rlist["shoebox"] = flex.shoebox(rlist["panel"], rlist["bbox"])
    rlist["shoebox"].allocate()

    rlist.extract_shoeboxes(exlist[0].imageset)

    show_reflection(rlist[len(rlist) // 2])
    # show_reflection(rlist[len(rlist)//2], orient = "porTrait")
    # show_reflection(rlist[len(rlist)//2], orient = "lanDscape")