def init(self): """Main init method """ AbstractCollect.init(self) self.graphics_manager_hwobj = self.getObjectByRole("graphics_manager") self.emit("collectConnected", (True, )) self.emit("collectReady", (True, ))
def init(self): """Main init method""" AbstractCollect.init(self) self.flux_hwobj = self.getObjectByRole("flux") self.graphics_manager_hwobj = self.getObjectByRole("graphics_manager") self.image_tracking_hwobj = self.getObjectByRole("image_tracking") self._exp_type_dict = {"Mesh": "raster", "Helical": "Helical"} self.chan_collect_status = self.getChannelObject("collectStatus") self._actual_collect_status = self.chan_collect_status.getValue() self.chan_collect_status.connectSignal("update", self.collect_status_update) self.chan_collect_frame = self.getChannelObject("collectFrame") self.chan_collect_frame.connectSignal("update", self.collect_frame_update) self.chan_collect_error = self.getChannelObject("collectError") self.chan_collect_error.connectSignal("update", self.collect_error_update) self.cmd_collect_compression = self.getCommandObject("collectCompression") self.cmd_collect_description = self.getCommandObject("collectDescription") self.cmd_collect_detector = self.getCommandObject("collectDetector") self.cmd_collect_directory = self.getCommandObject("collectDirectory") self.cmd_collect_energy = self.getCommandObject("collectEnergy") self.cmd_collect_exposure_time = self.getCommandObject("collectExposureTime") self.cmd_collect_images_per_trigger = self.getCommandObject( "collectImagesPerTrigger" ) self.cmd_collect_helical_position = self.getCommandObject( "collectHelicalPosition" ) self.cmd_collect_in_queue = self.getCommandObject("collectInQueue") self.cmd_collect_num_images = self.getCommandObject("collectNumImages") self.cmd_collect_overlap = self.getCommandObject("collectOverlap") self.cmd_collect_processing = self.getCommandObject("collectProcessing") self.cmd_collect_range = self.getCommandObject("collectRange") self.cmd_collect_raster_lines = self.getCommandObject("collectRasterLines") self.cmd_collect_raster_range = self.getCommandObject("collectRasterRange") self.cmd_collect_resolution = self.getCommandObject("collectResolution") self.cmd_collect_scan_type = self.getCommandObject("collectScanType") self.cmd_collect_shutter = self.getCommandObject("collectShutter") self.cmd_collect_shutterless = self.getCommandObject("collectShutterless") self.cmd_collect_start_angle = self.getCommandObject("collectStartAngle") self.cmd_collect_start_image = self.getCommandObject("collectStartImage") self.cmd_collect_template = self.getCommandObject("collectTemplate") self.cmd_collect_transmission = self.getCommandObject("collectTransmission") self.cmd_collect_space_group = self.getCommandObject("collectSpaceGroup") self.cmd_collect_unit_cell = self.getCommandObject("collectUnitCell") self.cmd_collect_xds_data_range = self.getCommandObject("collectXdsDataRange") self.cmd_collect_start = self.getCommandObject("collectStart") self.cmd_collect_abort = self.getCommandObject("collectAbort") self.emit("collectConnected", (True,)) self.emit("collectReady", (True,))
def init(self): AbstractCollect.init(self) self.ready_event = gevent.event.Event() self.image_dimension = (2048, 2048) self.reference_distance = self.getProperty("reference_distance") self.reference_angle = self.getProperty("reference_angle") QtGraphicsManager.init(self) self.disconnect(HWR.beamline.sample_view.camera, "imageReceived", self.camera_image_received) self.disconnect( HWR.beamline.diffractometer, "minidiffStateChanged", self.diffractometer_state_changed, ) self.disconnect( HWR.beamline.diffractometer, "centringStarted", self.diffractometer_centring_started, ) self.disconnect( HWR.beamline.diffractometer, "centringAccepted", self.create_centring_point, ) self.disconnect( HWR.beamline.diffractometer, "centringSuccessful", self.diffractometer_centring_successful, ) self.disconnect( HWR.beamline.diffractometer, "centringFailed", self.diffractometer_centring_failed, ) self.disconnect( HWR.beamline.diffractometer, "pixelsPerMmChanged", self.diffractometer_pixels_per_mm_changed, ) self.disconnect( HWR.beamline.diffractometer, "omegaReferenceChanged", self.diffractometer_omega_reference_changed, ) self.disconnect( HWR.beamline.diffractometer, "minidiffPhaseChanged", self.diffractometer_phase_changed, ) self.diffractometer_pixels_per_mm_changed((20., 20.)) self.graphics_manager_hwobj = self.getObjectByRole("graphics_manager") self.graphics_scale_item.set_start_position( 20, self.image_dimension[1] - 20) self.graphics_scale_item.set_custom_pen_color(Colors.BLUE) self.graphics_omega_reference_item.set_custom_pen_color( Colors.DARK_BLUE) self.graphics_measure_distance_item.set_custom_pen_color( Colors.DARK_BLUE) self.graphics_beam_item.hide() self.graphics_view.scene().measureItemChanged.connect( self.measure_item_changed) self.graphics_view.scene().setSceneRect(0, 0, self.image_dimension[0], self.image_dimension[1]) self.qimage = QtImport.QImage() self.qpixmap = QtImport.QPixmap() self.chan_frame = self.get_channel_object("chanFrame") self.chan_frame.connectSignal("update", self.frame_changed) self.chan_ff_ssim = self.get_channel_object("chanFFSSIM") self.chan_ff_ssim.connectSignal("update", self.ff_ssim_changed) self.chan_collect_status = self.get_channel_object("collectStatus") #self._actual_collect_status = self.chan_collect_status.getValue() self.chan_collect_status.connectSignal("update", self.collect_status_update) self.chan_collect_frame = self.get_channel_object("chanFrameCount") self.chan_collect_frame.connectSignal("update", self.collect_frame_update) self.chan_collect_error = self.get_channel_object("collectError") self.chan_collect_error.connectSignal("update", self.collect_error_update) self.chan_camera_warning = self.get_channel_object("cameraWarning") self.chan_camera_warning.connectSignal("update", self.camera_warning_update) self.chan_camera_error = self.get_channel_object("cameraError") self.chan_camera_error.connectSignal("update", self.camera_error_update) self.cmd_collect_detector = self.get_command_object("collectDetector") self.cmd_collect_directory = self.get_command_object( "collectDirectory") self.cmd_collect_exposure_time = self.get_command_object( "collectExposureTime") self.cmd_collect_in_queue = self.get_command_object("collectInQueue") self.cmd_collect_num_images = self.get_command_object( "collectNumImages") self.cmd_collect_range = self.get_command_object("collectRange") self.cmd_collect_scan_type = self.get_command_object("collectScanType") self.cmd_collect_shutter = self.get_command_object("collectShutter") self.cmd_collect_shutterless = self.get_command_object( "collectShutterless") self.cmd_collect_start_angle = self.get_command_object( "collectStartAngle") self.cmd_collect_template = self.get_command_object("collectTemplate") self.cmd_collect_ff_num_images = self.get_command_object( "collectFFNumImages") self.cmd_collect_ff_offset = self.get_command_object("collectFFOffset") self.cmd_collect_ff_pre = self.get_command_object("collectFFPre") self.cmd_collect_ff_post = self.get_command_object("collectFFPost") self.cmd_camera_trigger = self.get_command_object("cameraTrigger") self.cmd_camera_live_view = self.get_command_object("cameraLiveView") self.cmd_camera_write_data = self.get_command_object("cameraWriteData") self.cmd_camera_ff_ssim = self.get_command_object("cameraFFSSIM") self.cmd_collect_start = self.get_command_object("collectStart") self.cmd_collect_abort = self.get_command_object("collectAbort") self.beam_focusing_hwobj = self.getObjectByRole("beam_focusing")
def init(self): AbstractCollect.init(self) self.ready_event = gevent.event.Event() self.image_dimension = (2048, 2048) QtGraphicsManager.init(self) self.disconnect(self.camera_hwobj, "imageReceived", self.camera_image_received) self.disconnect( self.diffractometer_hwobj, "minidiffStateChanged", self.diffractometer_state_changed, ) self.disconnect( self.diffractometer_hwobj, "centringStarted", self.diffractometer_centring_started, ) self.disconnect( self.diffractometer_hwobj, "centringAccepted", self.create_centring_point ) self.disconnect( self.diffractometer_hwobj, "centringSuccessful", self.diffractometer_centring_successful, ) self.disconnect( self.diffractometer_hwobj, "centringFailed", self.diffractometer_centring_failed, ) self.disconnect( self.diffractometer_hwobj, "pixelsPerMmChanged", self.diffractometer_pixels_per_mm_changed, ) self.disconnect( self.diffractometer_hwobj, "omegaReferenceChanged", self.diffractometer_omega_reference_changed, ) self.disconnect( self.diffractometer_hwobj, "minidiffPhaseChanged", self.diffractometer_phase_changed, ) self.diffractometer_pixels_per_mm_changed((20.0, 20.0)) self.camera_hwobj = None self.graphics_scale_item.set_start_position(20, self.image_dimension[1] - 20) self.graphics_scale_item.set_custom_pen_color(Colors.BLUE) self.graphics_omega_reference_item.set_custom_pen_color(Colors.DARK_BLUE) self.graphics_measure_distance_item.set_custom_pen_color(Colors.DARK_BLUE) self.graphics_beam_item.hide() self.graphics_view.scene().measureItemChanged.connect(self.measure_item_changed) self.graphics_view.scene().setSceneRect( 0, 0, self.image_dimension[0], self.image_dimension[1] ) self.qimage = QtImport.QImage() self.qpixmap = QtImport.QPixmap() self.chan_frame = self.getChannelObject("chanFrame") self.chan_frame.connectSignal("update", self.frame_changed) self.chan_ff_ssim = self.getChannelObject("chanFFSSIM") self.chan_ff_ssim.connectSignal("update", self.ff_ssim_changed) self.chan_collect_status = self.getChannelObject("collectStatus") self._actual_collect_status = self.chan_collect_status.getValue() self.chan_collect_status.connectSignal("update", self.collect_status_update) self.chan_collect_frame = self.getChannelObject("chanFrameCount") self.chan_collect_frame.connectSignal("update", self.collect_frame_update) self.chan_collect_error = self.getChannelObject("collectError") self.chan_collect_error.connectSignal("update", self.collect_error_update) self.chan_camera_warning = self.getChannelObject("cameraWarning") self.chan_camera_warning.connectSignal("update", self.camera_warning_update) self.chan_camera_error = self.getChannelObject("cameraError") self.chan_camera_error.connectSignal("update", self.camera_error_update) self.cmd_collect_detector = self.getCommandObject("collectDetector") self.cmd_collect_directory = self.getCommandObject("collectDirectory") self.cmd_collect_exposure_time = self.getCommandObject("collectExposureTime") self.cmd_collect_in_queue = self.getCommandObject("collectInQueue") self.cmd_collect_num_images = self.getCommandObject("collectNumImages") self.cmd_collect_range = self.getCommandObject("collectRange") self.cmd_collect_scan_type = self.getCommandObject("collectScanType") self.cmd_collect_shutter = self.getCommandObject("collectShutter") self.cmd_collect_shutterless = self.getCommandObject("collectShutterless") self.cmd_collect_start_angle = self.getCommandObject("collectStartAngle") self.cmd_collect_template = self.getCommandObject("collectTemplate") self.cmd_collect_ff_num_images = self.getCommandObject("collectFFNumImages") self.cmd_collect_ff_offset = self.getCommandObject("collectFFOffset") self.cmd_collect_ff_pre = self.getCommandObject("collectFFPre") self.cmd_collect_ff_post = self.getCommandObject("collectFFPost") self.cmd_camera_trigger = self.getCommandObject("cameraTrigger") self.cmd_camera_live_view = self.getCommandObject("cameraLiveView") self.cmd_camera_write_data = self.getCommandObject("cameraWriteData") self.cmd_camera_ff_ssim = self.getCommandObject("cameraFFSSIM") self.cmd_collect_start = self.getCommandObject("collectStart") self.cmd_collect_abort = self.getCommandObject("collectAbort") self.beam_focusing_hwobj = self.getObjectByRole("beam_focusing") self.session_hwobj = self.getObjectByRole("session")