def locate_maxima(image):

    global use_distl

    if use_distl:
        try:
            dss = DistlSignalStrength()
            dss.set_image(image)
            peaks = dss.find_peaks()

            if not peaks:
                raise RuntimeError('no peaks found')

        except Exception:
            use_distl = False

    if not use_distl:

        pp = Printpeaks()
        pp.set_image(image)
        peaks = pp.get_maxima()

    return peaks
Esempio n. 2
0
    try:
      dss = DistlSignalStrength()
      dss.set_image(image)
      peaks = dss.find_peaks()

      if not peaks:
        raise RuntimeError, 'no peaks found'

    except Exception, e:
      use_distl = False

  if not use_distl:

    pp = Printpeaks()
    pp.set_image(image)
    peaks = pp.get_maxima()

  return peaks

def mosflm_check_indexer_solution(indexer):

  distance = indexer.get_indexer_distance()
  axis = matrix.col([0, 0, 1])
  beam = indexer.get_indexer_beam_centre()
  cell = indexer.get_indexer_cell()
  wavelength = indexer.get_wavelength()

  space_group_number = l2s(indexer.get_indexer_lattice())
  spacegroup = sgtbx.space_group_symbols(space_group_number).hall()
  phi = indexer.get_header()['phi_width']