def __find_ignored_positions(self): """ Finds positions that are planned in the worklists but which are not in the library layout (because there were not enough pools during optimization). The positions are found by comparison with the base layout. """ self.add_debug('Find empty plate positions ...') for sector_index in self.__library_sectors.keys(): self.__ignore_positions_96[sector_index] = [] converter = LibraryBaseLayoutConverter( self.stock_sample_creation_iso.iso_request.iso_layout, parent=self) base_layout = converter.get_result() if base_layout is None: msg = 'Error when trying to convert library base layout.' self.add_error(msg) elif not len(base_layout) == len(self.__library_layout): lib_positions = self.__library_layout.get_positions() ignore_positions_384 = [] for rack_pos in base_layout.get_positions(): if not rack_pos in lib_positions: ignore_positions_384.append(rack_pos) self.__find_ignored_sector_positions(ignore_positions_384)
def __find_ignored_positions(self): """ Finds positions that are planned in the worklists but which are not in the library layout (because there were not enough pools during optimization). The positions are found by comparison with the base layout. """ self.add_debug('Find empty plate positions ...') for sector_index in self.__library_sectors.keys(): self.__ignore_positions_96[sector_index] = [] converter = LibraryBaseLayoutConverter( self.stock_sample_creation_iso.iso_request.iso_layout, parent=self) base_layout = converter.get_result() if base_layout is None: msg = 'Error when trying to convert library base layout.' self.add_error(msg) elif not len(base_layout) == len(self.__library_layout): lib_positions = self.__library_layout.get_positions() ignore_positions_384 = [] for rack_pos in base_layout.get_positions(): if not rack_pos in lib_positions: ignore_positions_384.append(rack_pos) self.__find_ignored_sector_positions(ignore_positions_384)
def __get_base_layout(self): # The base layout defines which positions might be taken by library # positions. self.add_debug('Fetch base layout ...') converter = LibraryBaseLayoutConverter(self._iso_request.iso_layout, parent=self) self.__base_layout = converter.get_result() if self.__base_layout is None: msg = 'Error when trying to fetch library base layout.' self.add_error(msg) else: self._quadrant_positions = QuadrantIterator.sort_into_sectors( self.__base_layout, number_sectors=NUMBER_SECTORS)
def __get_base_layout(self): # The base layout defines which positions might be taken by library # positions. self.add_debug('Fetch base layout ...') converter = LibraryBaseLayoutConverter( self._iso_request.iso_layout, parent=self) self.__base_layout = converter.get_result() if self.__base_layout is None: msg = 'Error when trying to fetch library base layout.' self.add_error(msg) else: self._quadrant_positions = QuadrantIterator.sort_into_sectors( self.__base_layout, number_sectors=NUMBER_SECTORS)