Пример #1
0
def run(file_name):
    from libtbx.test_utils import approx_equal
    py_image_obj = pyCBFImage(file_name)
    py_image_obj.read()
    c_image_obj = CBFImage(file_name)
    c_image_obj.read()
    assert_equal(py_image_obj.linearintdata, c_image_obj.linearintdata)
    assert py_image_obj.size1 == c_image_obj.size1
    assert py_image_obj.size2 == c_image_obj.size2
    assert approx_equal(py_image_obj.saturation, c_image_obj.saturation)
    assert approx_equal(py_image_obj.pixel_size, c_image_obj.pixel_size)
    assert approx_equal(py_image_obj.osc_start, c_image_obj.osc_start)
    assert approx_equal(py_image_obj.deltaphi, c_image_obj.deltaphi)
    assert approx_equal(py_image_obj.wavelength, c_image_obj.wavelength)
    assert approx_equal(py_image_obj.distance, c_image_obj.distance)
    assert approx_equal(py_image_obj.beamx, c_image_obj.beamx)
    assert approx_equal(py_image_obj.beamy, c_image_obj.beamy)
Пример #2
0
 def detectorbase_start(self):
     self.detectorbase = CBFImage(self._image_file)
     self.detectorbase.readHeader()
    def detectorbase_start(self):
        from iotbx.detectors.cbf import CBFImage

        self.detectorbase = CBFImage(self._image_file)
        self.detectorbase.readHeader()