コード例 #1
0
    def start_manual_centring(self, sample_info=None):
        self._wait_ready(5)

        beam_pos_x, beam_pos_y = HWR.beamline.beam.get_beam_position_on_screen(
        )

        logging.getLogger("HWR").info("Starting centring procedure ...")

        if self.in_plate_mode():
            plateTranslation = self.get_object_by_role("plateTranslation")
            cmd_set_plate_vertical = self.add_command(
                {
                    "type": "exporter",
                    "exporter_address": self.exporter_addr,
                    "name": "plate_vertical",
                },
                "setPlateVertical",
            )
            low_lim, high_lim = self.phiMotor.get_dynamic_limits()
            phi_range = math.fabs(high_lim - low_lim - 1)
            self.current_centring_procedure = 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,
                beam_pos_x,
                beam_pos_y,
                cmd_set_plate_vertical,
                low_lim + 0.5,
                high_lim - 0.5,
            )
        else:
            self.current_centring_procedure = sample_centring.start(
                {
                    "phi": self.centringPhi,
                    "phiy": self.centringPhiy,
                    "sampx": self.centringSamplex,
                    "sampy": self.centringSampley,
                    "phiz": self.centringPhiz,
                },
                self.pixelsPerMmY,
                self.pixelsPerMmZ,
                beam_pos_x,
                beam_pos_y,
                chi_angle=self.chiAngle,
            )

        self.current_centring_procedure.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_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(),
                chi_angle=self.chiAngle,
            )

        self.currentCentringProcedure.link(self.manualCentringDone)
コード例 #3
0
ファイル: MiniDiff.py プロジェクト: drboer/HardwareRepository
    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(),
            chi_angle=self.chiAngle,
        )

        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(),
            chi_angle=self.chiAngle,
        )

        self.currentCentringProcedure.link(self.manualCentringDone)
コード例 #5
0
    def start_manual_centring(self, sample_info=None):
        beam_pos_x, beam_pos_y = HWR.beamline.beam.get_beam_position()
        self.current_centring_procedure = sample_centring.start(
            {
                "phi": self.centringPhi,
                "phiy": self.centringPhiy,
                "sampx": self.centringSamplex,
                "sampy": self.centringSampley,
                "phiz": self.centringPhiz,
            },
            self.pixelsPerMmY,
            self.pixelsPerMmZ,
            beam_pos_x,
            beam_pos_y,
            chi_angle=self.chiAngle,
        )

        self.current_centring_procedure.link(self.manualCentringDone)
コード例 #6
0
 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)
コード例 #7
0
 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
ファイル: MiniDiff.py プロジェクト: mxcube/HardwareRepository
    def start_manual_centring(self, sample_info=None):
        logging.getLogger("HWR").info("Starting centring procedure ...")

        beam_pos_x, beam_pos_y = HWR.beamline.beam.get_beam_position_on_screen(
        )

        self.wait_ready(5)

        self.current_centring_procedure = sample_centring.start(
            {
                "phi": self.centringPhi,
                "phiy": self.centringPhiy,
                "sampx": self.centringSamplex,
                "sampy": self.centringSampley,
                "phiz": self.centringPhiz,
            },
            self.pixelsPerMmY,
            self.pixelsPerMmZ,
            beam_pos_x,
            beam_pos_y,
            chi_angle=self.chiAngle,
        )

        self.current_centring_procedure.link(self.manualCentringDone)