Example #1
0
    def init(self):
        """
        Descript. :
        """
        AbstractDetector.init(self)

        # self.distance = 500
        self._temperature = 25
        self._humidity = 60
        self.actual_frame_rate = 50
        self._roi_modes_list = ("0", "C2", "C16")
        self._roi_mode = 0
        self._exposure_time_limits = [0.04, 60000]
        self.status = "ready"
        self.pv_status = epics.PV(self.getProperty("channel_status"))
        self.threshold = -1  # Starts with invalid value. To be set.
        self.wavelength = -1
        self.det_distance = -1
        self.beam_x = -1
        self.beam_y = -1
        self.default_beam_x = float(self.getProperty("default_beam_x"))
        self.default_beam_y = float(self.getProperty("default_beam_y"))

        self._distance_motor_hwobj = self.getObjectByRole("detector_distance")
        self.threshold = self.get_threshold_energy()
Example #2
0
    def __init__(self, name):

        AbstractDetector.__init__(self)
        HardwareObject.__init__(self, name)

        self.collect_name = None
        self.shutter_name = None
        self.temp_treshold = None
        self.hum_treshold = None
        self.cover_state = None

        self.chan_beam_xy = None
        self.chan_cover_state = None
        self.chan_temperature = None
        self.chan_humidity = None
        self.chan_status = None
        self.chan_roi_mode = None
        self.chan_frame_rate = None
        self.chan_actual_frame_rate = None

        self.cmd_close_cover = None
        self.cmd_restart_daq = None
        self.binding_mode = 1
        self.tolerance = None
        self.temperature = None
        self.humidity = None
        self.actual_frame_rate = None
        self.pixel_min = None
        self.pixel_max = None
        self.roi_modes_list = []
        self.roi_mode = None

        self.distance_motor_hwobj = None
    def __init__(self, name):

        AbstractDetector.__init__(self)
        HardwareObject.__init__(self, name)

        self.collect_name = None
        self.shutter_name = None
        self.temp_treshold = None
        self.hum_treshold = None
        self.cover_state = None

        self.chan_beam_xy = None
        self.chan_cover_state = None
        self.chan_temperature = None
        self.chan_humidity = None
        self.chan_status = None
        self.chan_roi_mode = None
        self.chan_frame_rate = None
        self.chan_actual_frame_rate = None

        self.cmd_close_cover = None
        self.cmd_restart_daq = None
        self.binding_mode = 1
        self.tolerance = None
        self.temperature = None
        self.humidity = None
        self.actual_frame_rate = None
        self.pixel_min = None
        self.pixel_max = None
        self.roi_modes_list = []
        self.roi_mode = None

        self.distance_motor_hwobj = None
    def __init__(self, name):
        AbstractDetector.__init__(self)
        HardwareObject.__init__(self, name)

        self.distance_motor_hwobj = None
        self.default_distance = None
        self.default_distance_limits = None

        self.exp_time_limits = None

        self.headers = {}
Example #5
0
    def __init__(self, name):
        AbstractDetector.__init__(self)
        HardwareObject.__init__(self, name)

        self.distance_motor_hwobj = None
        self.default_distance = None
        self.default_distance_limits = None

        self.exp_time_limits = None

        self.headers = {}
Example #6
0
    def init(self):
        """
        Descript. :
        """
        AbstractDetector.init(self)

        self._temperature = 25
        self._humidity = 60
        self._actual_frame_rate = 50
        self._roi_modes_list = ("0", "C2", "C16")
        self._roi_mode = 0
        self._exposure_time_limits = [0.04, 60000]
        self.update_state(self.STATES.READY)
Example #7
0
    def init(self):
        """
        Descript. :
        """
        AbstractDetector.init(self)

        # self.distance = 500
        self._temperature = 25
        self._humidity = 60
        self.actual_frame_rate = 50
        self._roi_modes_list = ("0", "C2", "C16")
        self._roi_mode = 0
        self._exposure_time_limits = [0.04, 60000]
        self.status = "ready"

        self._distance_motor_hwobj = self.getObjectByRole("detector_distance")
Example #8
0
 def __init__(self, name):
     """
     Descript. :
     """
     AbstractDetector.__init__(self, name)
Example #9
0
    def init(self):
        AbstractDetector.init(self)

        self.header = dict()

        lima_device = self.getProperty("lima_device")
        eiger_device = self.getProperty("eiger_device")

        for channel_name in (
                "acq_status",
                "acq_trigger_mode",
                "saving_mode",
                "acq_nb_frames",
                "acq_expo_time",
                "saving_directory",
                "saving_prefix",
                "saving_suffix",
                "saving_next_number",
                "saving_index_format",
                "saving_format",
                "saving_overwrite_policy",
                "last_image_saved",
                "saving_frame_per_file",
                "saving_managed_mode",
        ):
            self.add_channel(
                {
                    "type": "tango",
                    "name": channel_name,
                    "tangoname": lima_device
                },
                channel_name,
            )

        for channel_name in ("photon_energy", ):
            self.add_channel(
                {
                    "type": "tango",
                    "name": channel_name,
                    "tangoname": eiger_device
                },
                channel_name,
            )

        self.add_command(
            {
                "type": "tango",
                "name": "prepare_acq",
                "tangoname": lima_device
            },
            "prepareAcq",
        )
        self.add_command(
            {
                "type": "tango",
                "name": "start_acq",
                "tangoname": lima_device
            }, "startAcq")
        self.add_command(
            {
                "type": "tango",
                "name": "stop_acq",
                "tangoname": lima_device
            }, "stopAcq")
        self.add_command(
            {
                "type": "tango",
                "name": "reset",
                "tangoname": lima_device
            }, "reset")
        self.add_channel(
            {
                "type": "tango",
                "name": "set_image_header",
                "tangoname": lima_device
            },
            "saving_common_header",
        )

        self.get_command_object("prepare_acq").init_device()
        self.get_command_object("prepare_acq").device.set_timeout_millis(
            5 * 60 * 1000)
        self.get_channel_object("photon_energy").init_device()
Example #10
0
 def __init__(self, name):
     AbstractDetector.__init__(self, name)
     self.binning_mode = 1
    def init(self):
        AbstractDetector.init(self)

        lima_device = self.getProperty("lima_device")
        pilatus_device = self.getProperty("pilatus_device")

        if None in (lima_device, pilatus_device):
            return

        try:
            for channel_name in (
                "acq_status",
                "acq_trigger_mode",
                "saving_mode",
                "acq_nb_frames",
                "acq_expo_time",
                "saving_directory",
                "saving_prefix",
                "saving_suffix",
                "saving_next_number",
                "saving_index_format",
                "saving_format",
                "saving_overwrite_policy",
                "saving_header_delimiter",
                "last_image_saved",
                "image_roi",
            ):
                self.add_channel(
                    {"type": "tango", "name": channel_name, "tangoname": lima_device},
                    channel_name,
                )

            for channel_name in ("fill_mode", "threshold"):
                self.add_channel(
                    {
                        "type": "tango",
                        "name": channel_name,
                        "tangoname": pilatus_device,
                    },
                    channel_name,
                )

            pilatus_tg_device = DeviceProxy(pilatus_device)

            if hasattr(pilatus_tg_device, "working_energy"):
                self.add_channel(
                    {
                        "type": "tango",
                        "name": "energy_threshold",
                        "tangoname": pilatus_device,
                    },
                    "working_energy",
                )
            else:
                self.add_channel(
                    {
                        "type": "tango",
                        "name": "energy_threshold",
                        "tangoname": pilatus_device,
                    },
                    "energy_threshold",
                )

            self.add_command(
                {"type": "tango", "name": "prepare_acq", "tangoname": lima_device},
                "prepareAcq",
            )
            self.add_command(
                {"type": "tango", "name": "start_acq", "tangoname": lima_device},
                "startAcq",
            )
            self.add_command(
                {"type": "tango", "name": "stop_acq", "tangoname": lima_device},
                "stopAcq",
            )
            self.add_command(
                {"type": "tango", "name": "reset", "tangoname": lima_device}, "reset"
            )
            self.add_command(
                {"type": "tango", "name": "set_image_header", "tangoname": lima_device},
                "SetImageHeader",
            )

            self.get_channel_object("image_roi").connectSignal(
                "update", self.roi_mode_changed
            )

        except ConnectionError:
            logging.getLogger("HWR").error(
                "Could not connect to detector %s" % lima_device
            )
 def __init__(self, name):
     AbstractDetector.__init__(self, name)
     self._mesh_steps = 1
     self.header = dict()
     self.start_angles = list()
Example #13
0
 def __init__(self, name):
     """
     Descript. :
     """
     AbstractDetector.__init__(self)
     HardwareObject.__init__(self, name)