Beispiel #1
0
def test_detector():
    """A test class for the detector class."""

    assert DetectorFactory.simple(
        "CCD",
        100.0,
        (45.0, 52.0),
        "+x",
        "-y",
        (0.172, 0.172),
        (516, 590),
        (0, 1024),
        [],
    )
    assert DetectorFactory.two_theta(
        "CCD",
        60.0,
        (35.0, 34.0),
        "+x",
        "+y",
        "+x",
        30,
        (0.07, 0.07),
        (1042, 1042),
        (0, 1024),
        [],
    )

    image = Path(__file__).parent / "phi_scan_001.cbf"

    assert DetectorFactory.imgCIF(str(image), "CCD")
Beispiel #2
0
def test_detector():
    """A test class for the detector class."""

    assert DetectorFactory.simple(
        "CCD",
        100.0,
        (45.0, 52.0),
        "+x",
        "-y",
        (0.172, 0.172),
        (516, 590),
        (0, 1024),
        [],
    )
    assert DetectorFactory.two_theta(
        "CCD",
        60.0,
        (35.0, 34.0),
        "+x",
        "+y",
        "+x",
        30,
        (0.07, 0.07),
        (1042, 1042),
        (0, 1024),
        [],
    )

    dxtbx_dir = libtbx.env.dist_path("dxtbx")

    image = os.path.join(dxtbx_dir, "tests", "phi_scan_001.cbf")
    # xparm = os.path.join(dxtbx_dir, "tests", "example-xparm.xds")

    assert DetectorFactory.imgCIF(image, "CCD")
Beispiel #3
0
def test_detector():
  '''A test class for the detector class.'''

  d = DetectorFactory.simple('CCD', 100.0, (45.0, 52.0), '+x', '-y',
                              (0.172, 0.172), (516, 590), (0, 1024), [])
  t = DetectorFactory.two_theta(
      'CCD', 60.0, (35.0, 34.0), '+x', '+y', '+x', 30,
      (0.07, 0.07), (1042, 1042), (0, 1024), [])

  import libtbx.load_env
  import os

  dxtbx_dir = libtbx.env.dist_path('dxtbx')

  image = os.path.join(dxtbx_dir, 'tests', 'phi_scan_001.cbf')
  xparm = os.path.join(dxtbx_dir, 'tests', 'example-xparm.xds')

  c = DetectorFactory.imgCIF(image, 'CCD')