コード例 #1
0
    def _loadData(self, barcode):
        processing_plan = Crims.get_processing_plan(barcode, self.crims_url)

        if processing_plan is None:
            msg = "No information about plate with barcode %s found in CRIMS" % barcode
            logging.getLogger("user_level_log").error(msg)
        else:
            msg = "Information about plate with barcode %s found in CRIMS" % barcode
            logging.getLogger("user_level_log").info(msg)
            self._set_info(True, processing_plan.plate.barcode, True)

            for x in processing_plan.plate.xtal_list:
                cell = self.get_component_by_address(
                    Cell._get_cell_address(x.row, x.column))
                cell._set_info(True, "", True)
                drop = self.get_component_by_address(
                    Drop._getDropAddress(cell, x.shelf))
                drop._set_info(True, "", True)
                xtal = Xtal(drop, drop.get_number_of_components())
                xtal._set_info(True, x.pin_id, True)
                xtal._set_image_url(x.image_url)
                xtal._set_image_x(x.offset_x)
                xtal._set_image_y(x.offset_y)
                xtal._setLogin(x.login)
                xtal._setName(x.sample)
                xtal._set_info_url(x.summary_url)
                drop._add_component(xtal)
            return processing_plan
コード例 #2
0
    def _loadData(self, barcode):
        processing_plan = Crims.get_processing_plan(barcode, self.crims_url)

        if processing_plan is None:
            msg = "No information about plate with barcode %s found in CRIMS" % barcode
            logging.getLogger("user_level_log").error(msg)
        else:
            msg = "Information about plate with barcode %s found in CRIMS" % barcode
            logging.getLogger("user_level_log").info(msg)
            self._setInfo(True, processing_plan.plate.barcode, True)

            for x in processing_plan.plate.xtal_list:
                cell = self.getComponentByAddress(Cell._getCellAddress(x.row, x.column))
                cell._setInfo(True, "", True)
                drop = self.getComponentByAddress(Drop._getDropAddress(cell, x.shelf))
                drop._setInfo(True, "", True)
                xtal = Xtal(drop, drop.getNumberOfComponents())
                xtal._setInfo(True, x.pin_id, True)
                xtal._setImageURL(x.image_url)
                xtal._setImageX(x.offset_x)
                xtal._setImageY(x.offset_y)
                xtal._setLogin(x.login)
                xtal._setName(x.sample)
                xtal._setInfoURL(x.summary_url)
                drop._addComponent(xtal)
            return processing_plan