def outputMakeTargetListEvent(self,griddata): evt = event.MakeTargetListEvent() evt['grid'] = griddata if evt['grid'] is None: self.logger.error('Data collection event not sent') else: self.outputEvent(evt) self.logger.info('Data collection initiated') return evt['grid']
def submitGrid(self): gridname = self.settings['grid name'] evt = event.MakeTargetListEvent() evt['grid'] = self.makeGridData(gridname) if evt['grid'] is None: self.logger.error('Data collection event not sent') else: self.outputEvent(evt) self.logger.info('Data collection initiated') return evt['grid']
def gridInserted(self, gridnumber): if self.simulate or self.settings['simulate']: evt = event.MakeTargetListEvent() evt['grid'] = self.makeGridData(gridnumber) if evt['grid'] is None: self.logger.error('Data collection event not sent') else: self.outputEvent(evt) self.logger.info('Data collection event outputted') self.scopeReadyForImaging() return evt['grid'] self.logger.info('Grid inserted.') self.scopeReadyForImaging() self.logger.info('Outputting data collection event') evt = event.MakeTargetListEvent() evt['grid'] = self.makeGridData(gridnumber) if evt['grid'] is None: self.logger.error('Data collection event not sent') else: self.outputEvent(evt) self.logger.info('Data collection event outputted') return evt['grid']
def handleGridDataCollectionDone(self, ievent): # ... if self.settings['pause'] and ievent: # pause for user check self.logger.info('setting status') self.setStatus('user input') self.logger.info('waiting for user to continue...') self.usercontinue.clear() self.usercontinue.wait() self.usercontinue.clear() self.setStatus('processing') self.logger.info('continuing') self.logger.info('extracting') self.panel.extractingGrid() self.extractcondition.acquire() self.extractinfo = (None, None) self.extractcondition.notify() self.extractcondition.release() evt = event.MakeTargetListEvent() evt['grid'] = None self.outputEvent(evt)