def test_lookup_unknown_detector(): n = dxbd.get_beamline_definition('This is a detector serial number that does not exist') assert 'Dummy CIF' in str(n), n assert str(n.CIF_block()) == '' assert n.CIF_block().__module__ == 'iotbx.cif.model' assert str(n.mmCIF_block()) == '' assert n.mmCIF_block().__module__ == 'iotbx.cif.model' print 'OK'
def test_lookup_unknown_detector(): n = dxbd.get_beamline_definition( "This is a detector serial number that does not exist") assert "Dummy CIF" in str(n), n assert str(n.CIF_block()) == "" assert n.CIF_block().__module__ == "iotbx.cif.model" assert str(n.mmCIF_block()) == "" assert n.mmCIF_block().__module__ == "iotbx.cif.model"
def test_lookup_known_detector(): n = dxbd.get_beamline_definition("PILATUS 2M, S/N 24-0107 Diamond") assert "Dummy" not in str(n), n assert str(n) != "" cif = n.CIF_block() assert cif.__module__ == "iotbx.cif.model" assert "_diffrn_source" in str(cif) mmcif = n.mmCIF_block() assert mmcif.__module__ == "iotbx.cif.model" assert "_diffrn_source.source" in str(mmcif)
def test_lookup_known_detector(): n = dxbd.get_beamline_definition('PILATUS 2M, S/N 24-0107 Diamond') assert 'Dummy' not in str(n), n assert str(n) != '' cif = n.CIF_block() assert cif.__module__ == 'iotbx.cif.model' assert '_diffrn_radiation_type' in str(cif), cif cif = n.mmCIF_block() assert cif.__module__ == 'iotbx.cif.model' assert '_diffrn_radiation.type' in str(cif), cif print 'OK'
def test_lookup_known_detector(): import dxtbx.data.beamline_defs as dxbd n = dxbd.get_beamline_definition("PILATUS 2M, S/N 24-0107 Diamond") assert "Dummy" not in str(n), n assert str(n) != "" cif = n.CIF_block() assert cif.__module__ == "iotbx.cif.model" assert "_diffrn_radiation_type" in str(cif) cif = n.mmCIF_block() assert cif.__module__ == "iotbx.cif.model" assert "_diffrn_radiation.type" in str(cif)
def _add_detector_identification_to_cif(self): detector_id = self.get_detector_identification() if detector_id: import dxtbx.data.beamline_defs as ddb bl_info = ddb.get_beamline_definition(detector_id) Debug.write('Beamline information available for %s: %s' % (detector_id, str(bl_info))) if bl_info: from xia2.Handlers.CIF import CIF, mmCIF cifblock, mmcifblock = bl_info.CIF_block(), bl_info.mmCIF_block() if cifblock: CIF.set_block(bl_info.get_block_name(), cifblock) if mmcifblock: mmCIF.set_block(bl_info.get_block_name(), mmcifblock)
def _add_detector_identification_to_cif(self): detector_id = self.get_detector_identification() if detector_id: import dxtbx.data.beamline_defs as ddb bl_info = ddb.get_beamline_definition(detector_id) Debug.write('Beamline information available for %s: %s' % (detector_id, str(bl_info))) if bl_info: from xia2.Handlers.CIF import CIF, mmCIF cifblock, mmcifblock = bl_info.CIF_block( ), bl_info.mmCIF_block() if cifblock: CIF.set_block(bl_info.get_block_name(), cifblock) if mmcifblock: mmCIF.set_block(bl_info.get_block_name(), mmcifblock)