def imgCIF_H(cbf_handle):
    '''Initialize a goniometer model from an imgCIF file handle, where
    it is assumed that the file has already been read.'''

    cbf_gonio = cbf_handle.construct_goniometer()

    axis, fixed = cbf_gonio_to_effective_axis_fixed(cbf_gonio)

    cbf_gonio.__swig_destroy__(cbf_gonio)
    del(cbf_gonio)

    return goniometer_factory.make_goniometer(axis, fixed)
Example #2
0
  def imgCIF(cif_file):
    '''Initialize a goniometer model from an imgCIF file.'''

    cbf_handle = pycbf.cbf_handle_struct()
    cbf_handle.read_file(cif_file, pycbf.MSG_DIGEST)

    cbf_gonio = cbf_handle.construct_goniometer()

    axis, fixed = cbf_gonio_to_effective_axis_fixed(cbf_gonio)

    cbf_gonio.__swig_destroy__(cbf_gonio)
    del(cbf_gonio)

    return goniometer_factory.make_goniometer(axis, fixed)
  def imgCIF(cif_file):
    '''Initialize a goniometer model from an imgCIF file.'''

    # FIXME in here work out how to get the proper setting matrix if != 1

    cbf_handle = pycbf.cbf_handle_struct()
    cbf_handle.read_file(cif_file, pycbf.MSG_DIGEST)

    cbf_gonio = cbf_handle.construct_goniometer()

    axis, fixed = cbf_gonio_to_effective_axis_fixed(cbf_gonio)

    cbf_gonio.__swig_destroy__(cbf_gonio)
    del(cbf_gonio)

    return goniometer_factory.make_goniometer(axis, fixed)