Пример #1
0
    def start3ClickCentring(self, sample_info=None):
        if self.in_plate_mode():
            plateTranslation = self.getDeviceByRole('plateTranslation')
            cmd_set_plate_vertical = self.addCommand(
                {
                    "type": "exporter",
                    "exporter_address": self.exporter_addr,
                    "name": "plate_vertical"
                }, "setPlateVertical")
            low_lim, high_lim = self.phiMotor.getDynamicLimits()
            phi_range = math.fabs(high_lim - low_lim - 1)
            self.currentCentringProcedure = sample_centring.start_plate_1_click(
                {
                    "phi": self.centringPhi,
                    "phiy": self.centringPhiy,
                    "sampx": self.centringSamplex,
                    "sampy": self.centringSampley,
                    "phiz": self.centringVertical,
                    "plateTranslation": plateTranslation
                }, self.pixelsPerMmY, self.pixelsPerMmZ, self.getBeamPosX(),
                self.getBeamPosY(), cmd_set_plate_vertical, low_lim + 0.5,
                high_lim - 0.5)
        else:
            self.currentCentringProcedure = sample_centring.start(
                {
                    "phi": self.centringPhi,
                    "phiy": self.centringPhiy,
                    "sampx": self.centringSamplex,
                    "sampy": self.centringSampley,
                    "phiz": self.centringPhiz
                }, self.pixelsPerMmY, self.pixelsPerMmZ, self.getBeamPosX(),
                self.getBeamPosY())

        self.currentCentringProcedure.link(self.manualCentringDone)
Пример #2
0
    def start3ClickCentring(self, sample_info=None):
        if self.in_plate_mode():
            plateTranslation = self.getDeviceByRole('plateTranslation')
            cmd_set_plate_vertical = self.addCommand({"type":"exporter", "exporter_address":self.exporter_addr, "name":"plate_vertical" }, "setPlateVertical")
            low_lim, high_lim = self.phiMotor.getDynamicLimits()
            phi_range = math.fabs(high_lim - low_lim -1)

            self.currentCentringProcedure = sample_centring.start_plate({"phi":self.centringPhi,
                                                                         "phiy":self.centringPhiy,
                                                                         "sampx": self.centringSamplex,
                                                                         "sampy": self.centringSampley,
                                                                         "phiz": self.centringPhiz,
                                                                         "plateTranslation": plateTranslation}, 
                                                                        self.pixelsPerMmY, self.pixelsPerMmZ, 
                                                                        self.getBeamPosX(), self.getBeamPosY(),
                                                                        cmd_set_plate_vertical,
                                                                        phi_range = phi_range,lim_pos=high_lim-0.5)
        else:
            self.currentCentringProcedure = sample_centring.start({"phi":self.centringPhi,
                                                                   "phiy":self.centringPhiy,
                                                                   "sampx": self.centringSamplex,
                                                                   "sampy": self.centringSampley,
                                                                   "phiz": self.centringPhiz }, 
                                                                  self.pixelsPerMmY, self.pixelsPerMmZ, 
                                                                  self.getBeamPosX(), self.getBeamPosY())
                                                                         
        self.currentCentringProcedure.link(self.manualCentringDone)
Пример #3
0
 def start3ClickCentring(self, sample_info=None):
     self.currentCentringProcedure = sample_centring.start({"phi":self.centringPhi,
                                                            "phiy":self.centringPhiy,
                                                            "sampx": self.centringSamplex,
                                                            "sampy": self.centringSampley,
                                                            "phiz": self.centringPhiz }, 
                                                           self.pixelsPerMmY, self.pixelsPerMmZ, 
                                                           self.getBeamPosX(), self.getBeamPosY())
                                                                      
     self.currentCentringProcedure.link(self.manualCentringDone)
Пример #4
0
 def start3ClickCentring(self, sample_info=None):
     self.currentCentringProcedure = sample_centring.start({"phi":self.centringPhi,
                                                            "phiy":self.centringPhiy,
                                                            "sampx": self.centringSamplex,
                                                            "sampy": self.centringSampley,
                                                            "phiz": self.centringPhiz }, 
                                                           self.pixelsPerMmY, self.pixelsPerMmZ, 
                                                           self.getBeamPosX(), self.getBeamPosY())
                                                                      
     self.currentCentringProcedure.link(self.manualCentringDone)
Пример #5
0
 def start3ClickCentring(self, sample_info=None):
     logging.getLogger("HWR").exception("MiniDiffPX2: starting the 3 click centring")
     self.currentCentringProcedure = sample_centring.start({"phi":self.centringPhi,
                                                            "phiy":self.centringPhiy,
                                                            "sampx": self.centringSamplex,
                                                            "sampy": self.centringSampley,
                                                            "phiz": self.centringPhiz }, 
                                                           self.pixelsPerMmY, self.pixelsPerMmZ, 
                                                           self.getBeamPosX(), self.getBeamPosY(), chi_angle=0.0)
                                                                      
     self.currentCentringProcedure.link(self.manualCentringDone)
    def start_manual_centring(self, sample_info=None, wait_result=None):
        """
        """
        self.emit_progress_message("Manual 3 click centring...")
	if self.use_sample_centring:
            self.current_centring_procedure = \
                 sample_centring.start({"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])
	else:
            self.current_centring_procedure = gevent.spawn(self.manual_centring)
        self.current_centring_procedure.link(self.centring_done)
    def start_manual_centring(self, sample_info=None, wait_result=None):
        """
        """
        self.emit_progress_message("Manual 3 click centring...")
	if self.use_sample_centring:
            self.current_centring_procedure = \
                 sample_centring.start({"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])
	else:
            self.current_centring_procedure = gevent.spawn(self.manual_centring)
        self.current_centring_procedure.link(self.centring_done)
Пример #8
0
    def start3ClickCentring(self, sample_info=None):
        logging.getLogger("HWR").exception(
            "MiniDiffPX2: starting the 3 click centring")
        self.currentCentringProcedure = sample_centring.start(
            {
                "phi": self.centringPhi,
                "phiy": self.centringPhiy,
                "sampx": self.centringSamplex,
                "sampy": self.centringSampley,
                "phiz": self.centringPhiz
            },
            self.pixelsPerMmY,
            self.pixelsPerMmZ,
            self.getBeamPosX(),
            self.getBeamPosY(),
            chi_angle=0.0)

        self.currentCentringProcedure.link(self.manualCentringDone)