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()
Ejemplo n.º 2
0
    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()
Ejemplo n.º 3
0
	def __init__(self, id, session, managerlocation, **kwargs):
		self.correlator = correlator.Correlator()
		self.peakfinder = peakfinder.PeakFinder()
		self.settle = 5.0
		self.threadstop = threading.Event()
		self.threadlock = threading.Lock()
		calibrator.Calibrator.__init__(self, id, session, managerlocation, **kwargs)
		self.calclient = calibrationclient.ModeledStageCalibrationClient(self)
		self.pcal = calibrationclient.PixelSizeCalibrationClient(self)
		self.corchannel = None

		self.axes = ['x', 'y']

		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, *args, **kwargs):
		targetfilter.TargetFilter.__init__(self, *args, **kwargs)

		self.instrument = instrument.Proxy(self.objectservice, self.session)
		self.presetsclient = presets.PresetsClient(self)
		self.calclients = {
			'image shift': calibrationclient.ImageShiftCalibrationClient(self),
			'stage position': calibrationclient.StageCalibrationClient(self),
			'modeled stage position':
												calibrationclient.ModeledStageCalibrationClient(self)
		}

		self.targetdata = None
		self.fromtarget = None
		self.donetargetids = []
		self.is_odd = True
		if self.__class__ == RasterTargetFilter:
			self.start()
Ejemplo n.º 6
0
	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()
	def __init__(self, id, session, managerlocation, **kwargs):
		imagewatcher.ImageWatcher.__init__(self, id, session, managerlocation,
																				**kwargs)
		targethandler.TargetWaitHandler.__init__(self)
		self.instrument = instrument.Proxy(self.objectservice, self.session)
		self.presetsclient = presets.PresetsClient(self)
		self.calclients = {
			'image shift': calibrationclient.ImageShiftCalibrationClient(self),
			'stage position': calibrationclient.StageCalibrationClient(self),
			'modeled stage position':
												calibrationclient.ModeledStageCalibrationClient(self),
			'beam size':
												calibrationclient.BeamSizeCalibrationClient(self)
		}
		self.parent_imageid = None
		self.current_image_pixelsize = None
		self.focusing_targetlist = None
		self.last_acq_node = None
		self.next_acq_node = None
		self.targetimagevector = (0,0)
		self.targetbeamradius = 0
		self.resetLastFocusedTargetList(None)
Ejemplo n.º 8
0
    def __init__(self, id, session, managerlocation, **kwargs):
        self.mosaicselectionmapping = {}
        targetfinder.ClickTargetFinder.__init__(self, id, session,
                                                managerlocation, **kwargs)
        self.calclients = {
            'image shift':
            calibrationclient.ImageShiftCalibrationClient(self),
            'stage position':
            calibrationclient.StageCalibrationClient(self),
            'modeled stage position':
            calibrationclient.ModeledStageCalibrationClient(self)
        }
        self.images = {
            'Original': None,
            'Extra Crispy': None,
            'Filtered': None,
            'Thresholded': None
        }
        parameter = self.settings['calibration parameter']
        self.mosaic = mosaic.EMMosaic(self.calclients[parameter])
        self.mosaicimagelist = None
        self.mosaicimage = None
        self.mosaicimagescale = None
        self.mosaicimagedata = None
        self.convolver = convolver.Convolver()
        self.currentposition = []
        self.mosaiccreated = threading.Event()
        self.presetsclient = presets.PresetsClient(self)

        self.mosaic.setCalibrationClient(self.calclients[parameter])

        self.existing_targets = {}
        self.clearTiles()

        self.reference_target = None

        if self.__class__ == MosaicClickTargetFinder:
            self.start()
 def __init__(self, id, session, managerlocation, **kwargs):
         imagewatcher.ImageWatcher.__init__(self, id, session, managerlocation,
                                                                                                                                                         **kwargs)
         targethandler.TargetWaitHandler.__init__(self)
         self.instrument = instrument.Proxy(self.objectservice, self.session)
         self.presetsclient = presets.PresetsClient(self)
         self.calclients = {
                 'image shift': calibrationclient.ImageShiftCalibrationClient(self),
                 'stage position': calibrationclient.StageCalibrationClient(self),
                 'modeled stage position':
                                                                                         calibrationclient.ModeledStageCalibrationClient(self)
         }
         self.parent_imageid = None
         self.focusing_targetlist = None
         self.resetLastFocusedTargetList(None)