Example #1
0
    def start_automatic_centring(self,
                                 sample_info=None,
                                 loop_only=False,
                                 wait_result=None):
        """
        """
        self.emit_progress_message("Automatic centring...")

        while self.automatic_centring_try_count > 0:
            if self.use_sample_centring:
                self.current_centring_procedure = \
                    sample_centring.start_auto(self.camera_hwobj,
                                               {"phi": self.centring_phi,
                                                "phiy": self.centring_phiy,
                                                "sampx": self.centring_sampx,
                                                "sampy": self.centring_sampy,
                                                "phiz": self.centring_phiz },
                                                self.pixels_per_mm_x,
                                                self.pixels_per_mm_y,
                                                self.beam_position[0],
                                                self.beam_position[1],
                                                msg_cb = self.emit_progress_message,
                                                new_point_cb=lambda point: self.emit("newAutomaticCentringPoint", point))
            else:
                self.current_centring_procedure = gevent.spawn(
                    self.automatic_centring)
            self.current_centring_procedure.link(self.centring_done)

            if wait_result:
                self.ready_event.wait()
                self.ready_event.clear()

            self.automatic_centring_try_count -= 1
        self.automatic_centring_try_count = 1
    def start_automatic_centring(self, sample_info=None, loop_only=False, wait_result=None):
        """
        """
        self.emit_progress_message("Automatic centring...")

        while self.automatic_centring_try_count > 0:
              if self.use_sample_centring:
                  self.current_centring_procedure = \
                      sample_centring.start_auto(self.camera_hwobj,
                                                 {"phi": self.centring_phi,
                                                  "phiy": self.centring_phiy,
                                                  "sampx": self.centring_sampx,
                                                  "sampy": self.centring_sampy,
                                                  "phiz": self.centring_phiz },
                                                  self.pixels_per_mm_x,
                                                  self.pixels_per_mm_y,
                                                  self.beam_position[0],
                                                  self.beam_position[1],
                                                  msg_cb = self.emit_progress_message,
                                                  new_point_cb=lambda point: self.emit("newAutomaticCentringPoint", point))
              else:
                  self.current_centring_procedure = gevent.spawn(self.automatic_centring)
              self.current_centring_procedure.link(self.centring_done)

              if wait_result:
                  self.ready_event.wait()
                  self.ready_event.clear()

              self.automatic_centring_try_count -= 1
        self.automatic_centring_try_count = 1  
Example #3
0
    def startAutoCentring(self, sample_info=None, loop_only=False):
        self.currentCentringProcedure = sample_centring.start_auto(self.camera, 
                                                                   {"phi":self.centringPhi,
                                                                    "phiy":self.centringPhiy,
                                                                    "sampx": self.centringSamplex,
                                                                    "sampy": self.centringSampley,
                                                                    "phiz": self.centringPhiz },
                                                                   self.pixelsPerMmY, self.pixelsPerMmZ, 
                                                                   self.getBeamPosX(), self.getBeamPosY(), 
                                                                   msg_cb=self.emitProgressMessage,
                                                                   new_point_cb=lambda point: self.emit("newAutomaticCentringPoint", point))
       
        self.currentCentringProcedure.link(self.autoCentringDone)

	self.emitProgressMessage("Starting automatic centring procedure...")
Example #4
0
    def startAutoCentring(self, sample_info=None, loop_only=False):
        self.currentCentringProcedure = sample_centring.start_auto(self.camera, 
                                                                   {"phi":self.centringPhi,
                                                                    "phiy":self.centringPhiy,
                                                                    "sampx": self.centringSamplex,
                                                                    "sampy": self.centringSampley,
                                                                    "phiz": self.centringPhiz },
                                                                   self.pixelsPerMmY, self.pixelsPerMmZ, 
                                                                   self.getBeamPosX(), self.getBeamPosY(), 
                                                                   msg_cb=self.emitProgressMessage,
                                                                   new_point_cb=lambda point: self.emit("newAutomaticCentringPoint", point))
       
        self.currentCentringProcedure.link(self.autoCentringDone)

	self.emitProgressMessage("Starting automatic centring procedure...")