def single(filename, format, exposure_times, osc_start, osc_width, epoch): '''Construct an scan instance for a single image.''' import os index = scan_helper_image_files.image_to_index(os.path.split(filename)[-1]) if epoch is None: epoch = 0.0 return scan_factory.make_scan( (index, index), exposure_times, (osc_start, osc_width), {index:epoch})
def imgCIF_H(cif_file, cbf_handle): '''Initialize a scan model from an imgCIF file handle, where it is assumed that the file has already been read.''' exposure = cbf_handle.get_integration_time() timestamp = cbf_handle.get_timestamp()[0] gonio = cbf_handle.construct_goniometer() angles = tuple(gonio.get_rotation_range()) index = scan_helper_image_files.image_to_index(cif_file) gonio.__swig_destroy__(gonio) return scan_factory.make_scan( (index, index), exposure, angles, {index:timestamp})
def imgCIF_H(cif_file, cbf_handle): '''Initialize a scan model from an imgCIF file handle, where it is assumed that the file has already been read.''' exposure = cbf_handle.get_integration_time() timestamp = cbf_handle.get_timestamp()[0] gonio = cbf_handle.construct_goniometer() angles = tuple(gonio.get_rotation_range()) # xia2-56 handle gracefully reverse turning goniometers - this assumes the # rotation axis is correctly inverted in the goniometer factory if angles[1] < 0: angles = -angles[0], -angles[1] index = scan_helper_image_files.image_to_index(cif_file) gonio.__swig_destroy__(gonio) return scan_factory.make_scan( (index, index), exposure, angles, {index:timestamp})