def __init__(self, id, session, managerlocation, **kwargs): node.Node.__init__(self, id, session, managerlocation, **kwargs) self.instrument = instrument.Proxy(self.objectservice, self.session, self.panel) self.calclients = ordereddict.OrderedDict() self.calclients[ 'image shift'] = calibrationclient.ImageShiftCalibrationClient( self) self.calclients[ 'stage position'] = calibrationclient.StageCalibrationClient(self) self.calclients[ 'modeled stage position'] = calibrationclient.ModeledStageCalibrationClient( self) self.calclients[ 'beam shift'] = calibrationclient.BeamShiftCalibrationClient(self) self.calclients[ 'image beam shift'] = calibrationclient.ImageBeamShiftCalibrationClient( self) self.pcal = calibrationclient.PixelSizeCalibrationClient(self) self.presetsclient = presets.PresetsClient(self) self.stagelocations = [] self.getLocationsFromDB() self.correlator = correlator.Correlator() self.peakfinder = peakfinder.PeakFinder() self.oldimagedata = None self.newimagedata = None self.oldstate = None self.newstate = None self.addEventInput(event.MoveToTargetEvent, self.handleMoveEvent) self.start()
def __init__(self, *args, **kwargs): try: watch = kwargs['watchfor'] except KeyError: watch = [] kwargs['watchfor'] = watch + [event.ReferenceTargetPublishEvent] watcher.Watcher.__init__(self, *args, **kwargs) targethandler.TargetHandler.__init__(self) self.instrument = instrument.Proxy(self.objectservice, self.session) self.calibration_clients = { 'image shift': calibrationclient.ImageShiftCalibrationClient(self), 'stage position': calibrationclient.StageCalibrationClient(self), 'modeled stage position': calibrationclient.ModeledStageCalibrationClient(self), 'image beam shift': calibrationclient.ImageBeamShiftCalibrationClient(self), 'beam shift': calibrationclient.BeamShiftCalibrationClient(self), } self.presets_client = presets.PresetsClient(self) self.player = player.Player(callback=self.onPlayer) self.panel.playerEvent(self.player.state()) self.lock = threading.RLock() self.reference_target = None self.last_processed = None if self.__class__ == Reference: self.start()
def __init__(self, id, session, managerlocation, **kwargs): node.Node.__init__(self, id, session, managerlocation, **kwargs) TargetTransformer.__init__(self) self.correlator = correlator.Correlator() self.peakfinder = peakfinder.PeakFinder() self.instrument = instrument.Proxy(self.objectservice, self.session, self.panel) self.calclients = ordereddict.OrderedDict() self.calclients[ 'image shift'] = calibrationclient.ImageShiftCalibrationClient( self) self.calclients[ 'stage position'] = calibrationclient.StageCalibrationClient(self) self.calclients[ 'modeled stage position'] = calibrationclient.ModeledStageCalibrationClient( self) self.calclients[ 'image beam shift'] = calibrationclient.ImageBeamShiftCalibrationClient( self) self.calclients[ 'beam shift'] = calibrationclient.BeamShiftCalibrationClient(self) self.pixsizeclient = calibrationclient.PixelSizeCalibrationClient(self) self.presetsclient = presets.PresetsClient(self) self.navclient = navigator.NavigatorClient(self) self.target_to_transform = None self.addEventInput(event.TransformTargetEvent, self.handleTransformTargetEvent) self.registrations = { 'correlation': transformregistration.CorrelationRegistration(self), } if not hide_incomplete: self.registrations.update({ 'keypoints': transformregistration.KeyPointsRegistration(self), 'logpolar': transformregistration.LogPolarRegistration(self), 'identity': transformregistration.IdentityRegistration(self), }) self.abortevent = threading.Event() self.player = player.Player(callback=self.onPlayer) self.panel.playerEvent(self.player.state()) self.start()
def __init__(self, id, session, managerlocation, **kwargs): targetwatcher.TargetWatcher.__init__(self, id, session, managerlocation, **kwargs) self.addEventInput(event.AcquisitionImagePublishEvent, self.handleDriftImage) self.addEventInput(event.DriftMonitorResultEvent, self.handleDriftResult) self.addEventInput(event.ImageProcessDoneEvent, self.handleImageProcessDone) self.addEventInput(event.MakeTargetListEvent, self.setGrid) self.driftdone = threading.Event() self.driftimagedone = threading.Event() self.instrument = instrument.Proxy(self.objectservice, self.session) self.calclients = ordereddict.OrderedDict() self.calclients['image shift'] = calibrationclient.ImageShiftCalibrationClient(self) self.calclients['stage position'] = calibrationclient.StageCalibrationClient(self) self.calclients['modeled stage position'] = calibrationclient.ModeledStageCalibrationClient(self) self.calclients['image beam shift'] = calibrationclient.ImageBeamShiftCalibrationClient(self) self.calclients['beam shift'] = calibrationclient.BeamShiftCalibrationClient(self) self.calclients['beam tilt'] = calibrationclient.BeamTiltCalibrationClient(self) self.presetsclient = presets.PresetsClient(self) self.navclient = navigator.NavigatorClient(self) self.doneevents = {} self.onTarget = False self.imagelistdata = None self.simloopstop = threading.Event() self.received_image_drift = threading.Event() self.requested_drift = None self.grid = None self.acq_counter = itertools.cycle(range(0,5)) self.time0 = time.time() self.times = [] self.intensities = [] self.alignzlp_bound = False self.alignzlp_warned = False self.duplicatetypes = ['acquisition', 'focus'] self.presetlocktypes = ['acquisition', 'target', 'target list'] if debug: self.timedebug = {} self.start()