def setTiltSeries(self): grouplimit = self.settings['tilt group'] if grouplimit == 1: self.tiltseries = None self.logger.info('setting tilt series to None') else: self.logger.info('setting tilt series') if self.tilt == 0: self.tiltseries = leginondata.TiltSeriesData() #self.tiltseries['session'] = self.session self.tiltseries['number'] = grouplimit self.publish(self.tiltseries, database=True, dbforce=True) if self.tilt >= grouplimit - 1: self.tilt = 0 else: self.tilt = self.tilt + 1
def moveAndPreset(self, presetdata, emtarget): ''' extend Acquisition.moveAndPreset because additionally we need to return to the same defocus as the other images in the tilt series ''' status = acquisition.Acquisition.moveAndPreset(self, presetdata, emtarget) if status == 'error': return status targetdata = emtarget['target'] tiltseries,defocus = self.getTiltSeries(targetdata, presetdata) if tiltseries is None: self.tiltseries = leginondata.TiltSeriesData() self.publish(self.tiltseries, database=True, dbforce=True) else: self.tiltseries = tiltseries return status