def __init__(self, name): """ :param name: name of the object :type name: string """ AbstractCollect.__init__(self) HardwareObject.__init__(self, name) self._error_msg = "" self.owner = None self.osc_id = None self._collecting = None self.diffractometer_hwobj = None self.omega_hwobj = None self.kappa_hwobj = None self.phi_hwobj = None self.lims_client_hwobj = None self.machine_info_hwobj = None self.energy_hwobj = None self.resolution_hwobj = None self.transmission_hwobj = None self.detector_hwobj = None self.beam_info_hwobj = None self.autoprocessing_hwobj = None self.graphics_manager_hwobj = None self.mxlocal = None self.helical_positions = None
def stop_collect(self): """Stops collect""" AbstractCollect.stop_collect(self) self.cmd_collect_abort() HWR.beamline.detector.close_cover()
def collection_finished(self): """Additionaly sets break bragg if it was previously released""" AbstractCollect.collection_finished(self) if (self.current_dc_parameters["in_queue"] is False and self.break_bragg_released): self.break_bragg_released = False HWR.beamline.energy.set_break_bragg()
def __init__(self, name): """ :param name: name of the object :type name: string """ AbstractCollect.__init__(self) HardwareObject.__init__(self, name) self._error_msg = "" self.owner = None self.osc_id = None self._collecting = None self.diffractometer_hwobj = None self.omega_hwobj = None self.kappa_hwobj = None self.phi_hwobj = None self.lims_client_hwobj = None self.machine_info_hwobj = None self.energy_hwobj = None self.resolution_hwobj = None self.transmission_hwobj = None self.detector_hwobj = None self.beam_info_hwobj = None self.autoprocessing_hwobj = None self.graphics_manager_hwobj = None self.mxlocal = None self.helical_positions = None
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, name): """ :param name: name of the object :type name: string """ AbstractCollect.__init__(self, name) self.aborted_by_user = False self.graphics_manager_hwobj = None
def __init__(self, name): AbstractCollect.__init__(self, name) self._previous_collect_status = None self._actual_collect_status = None self._collect_frame = None self._exp_type_dict = {} self.break_bragg_released = False self.aborted_by_user = None self.run_autoprocessing = None self.chan_collect_status = None self.chan_collect_frame = None self.chan_collect_error = None self.chan_undulator_gap = None self.cmd_collect_compression = None self.cmd_collect_description = None self.cmd_collect_detector = None self.cmd_collect_directory = None self.cmd_collect_energy = None self.cmd_collect_exposure_time = None self.cmd_collect_helical_position = None self.cmd_collect_in_queue = None self.cmd_collect_images_per_trigger = None self.cmd_collect_num_images = None self.cmd_collect_overlap = None self.cmd_collect_processing = None self.cmd_collect_range = None self.cmd_collect_raster_lines = None self.cmd_collect_raster_range = None self.cmd_collect_resolution = None self.cmd_collect_scan_type = None self.cmd_collect_shutter = None self.cmd_collect_shutterless = None self.cmd_collect_start_angle = None self.cmd_collect_start_image = None self.cmd_collect_template = None self.cmd_collect_transmission = None self.cmd_collect_space_group = None self.cmd_collect_unit_cell = None self.cmd_collect_start = None self.cmd_collect_abort = None self.cmd_collect_xds_data_range = None self.flux_hwobj = None self.graphics_manager_hwobj = None self.image_tracking_hwobj = None
def __init__(self, name): """ :param name: name of the object :type name: string """ AbstractCollect.__init__(self, name) HardwareObject.__init__(self, name) self.current_dc_parameters = None self.osc_id = None self.owner = None self.aborted_by_user = None self.slits1 = slits1()
def __init__(self, name): """ :param name: name of the object :type name: string """ AbstractCollect.__init__(self, name) HardwareObject.__init__(self, name) self.current_dc_parameters = None self.osc_id = None self.owner = None self.aborted_by_user = None self.slits1 = slits1()
def __init__(self, name): """ :param name: name of the object :type name: string """ AbstractCollect.__init__(self, name) # HardwareObject.__init__(self, name) self._error_msg = "" self.owner = None self.osc_id = None self._collecting = None self.helical_positions = None self.saved_omega_velocity = None
def __init__(self, name): """ :param name: name of the object :type name: string """ AbstractCollect.__init__(self, name) # HardwareObject.__init__(self, name) self._error_msg = "" self.owner = None self.osc_id = None self._collecting = None self.omega_hwobj = None self.graphics_manager_hwobj = None self.helical_positions = None self.saved_omega_velocity = None
def __init__(self, *args): QtGraphicsManager.__init__(self, *args) AbstractCollect.__init__(self, *args) self.ff_apply = False self.ff_ssim = None self.qimage = None self.qpixmap = None self.image_count = 0 self.image_reading_thread = None self.ff_corrected_list = [] self.config_dict = {} self.collect_omega_start = 0 self.omega_start = 0 self.omega_move_enabled = False self.reference_distance = None self.reference_angle = None self.motor_positions = None self.image_dimension = (0, 0) self.graphics_camera_frame = None self.image_polling = None self.repeat_image_play = None self.current_image_index = None self.mouse_hold = False self.mouse_coord = [0, 0] self.centering_started = 0 self._previous_collect_status = None self._actual_collect_status = None self._failed = False self._number_of_images = 0 self.printed_warnings = [] self.printed_errors = [] self.chan_collect_status = None self.chan_collect_frame = None self.chan_collect_error = None self.chan_camera_error = None self.chan_camera_warning = None self.chan_ff_ssim = None self.cmd_collect_compression = None self.cmd_collect_detector = None self.cmd_collect_directory = None self.cmd_collect_exposure_time = None self.cmd_collect_in_queue = None self.cmd_collect_num_images = None self.cmd_collect_overlap = None self.cmd_collect_range = None self.cmd_collect_scan_type = None self.cmd_collect_shutter = None self.cmd_collect_start_angle = None self.cmd_collect_template = None self.cmd_collect_start = None self.cmd_collect_abort = None self.cmd_collect_ff_num_images = None self.cmd_collect_ff_offset = None self.cmd_collect_ff_pre = None self.cmd_collect_ff_post = None self.cmd_camera_trigger = None self.cmd_camera_live_view = None self.cmd_camera_write_data = None self.cmd_camera_ff_ssim = None self.beam_focusing_hwobj = None
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, *args): QtGraphicsManager.__init__(self, *args) AbstractCollect.__init__(self, *args) self.ff_apply = False self.ff_ssim = None self.qimage = None self.qpixmap = None self.image_count = 0 self.image_reading_thread = None self.image_processing_thread = None self.ff_corrected_list = [] self.config_dict = {} self.collect_omega_start = 0 self.omega_start = 0 self.omega_move_enabled = False self.last_image_index = None self.image_dimension = (0, 0) self.graphics_camera_frame = None self.image_polling = None self.repeat_image_play = None self.current_image_index = None self.mouse_hold = False self.mouse_coord = [0, 0] self.centering_started = 0 self.current_dc_parameters = None self._previous_collect_status = None self._actual_collect_status = None self._failed = False self._number_of_images = 0 self._collect_frame = 0 self.printed_warnings = [] self.printed_errors = [] self.chan_collect_status = None self.chan_collect_frame = None self.chan_collect_error = None self.chan_camera_error = None self.chan_camera_warning = None self.chan_frame = None self.chan_ff_ssim = None self.cmd_collect_compression = None self.cmd_collect_detector = None self.cmd_collect_directory = None self.cmd_collect_exposure_time = None self.cmd_collect_in_queue = None self.cmd_collect_num_images = None self.cmd_collect_overlap = None self.cmd_collect_range = None self.cmd_collect_scan_type = None self.cmd_collect_shutter = None self.cmd_collect_start_angle = None self.cmd_collect_template = None self.cmd_collect_start = None self.cmd_collect_shutterless = None self.cmd_collect_abort = None self.cmd_collect_ff_num_images = None self.cmd_collect_ff_offset = None self.cmd_collect_ff_pre = None self.cmd_collect_ff_post = None self.cmd_camera_trigger = None self.cmd_camera_live_view = None self.cmd_camera_write_data = None self.cmd_camera_ff_ssim = None self.beam_focusing_hwobj = None self.session_hwobj = None
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")