Example #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._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
    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