def init(self): self.resolution_motor = resolution() self.beam_center = beam_center() self.currentResolution = None self.energy_channel = self.getChannelObject("energy") self.energy_channel.connectSignal("update", self.update_resolution) self.energy_state_channel = self.getChannelObject("energy_state") self.energy_state_channel.connectSignal("update", self.update_energy_state) self.detector_distance_channel = self.getChannelObject("detector_position") self.energy_channel.connectSignal("update", self.update_resolution) self.energy_channel.connectSignal("valueChanged", self.update_resolution) self.detector_distance_channel.connectSignal("update", self.update_resolution) self.detector_position_state_channel = self.getChannelObject( "detector_position_state" ) self.detector_position_state_channel.connectSignal( "update", self.update_detector_position_state ) self.energy = self.getObjectByRole("energy") self.dtox = self.getObjectByRole("detector_distance") self.det_radius = self.getProperty("detector_radius") self.det_width = self.getProperty("detector_width") self.det_height = self.getProperty("detector_height")
def init(self): self.resolution_motor = resolution() self.beam_center = beam_center() self.currentResolution = None self.energy_channel = self.getChannelObject("energy") self.energy_channel.connectSignal("update", self.update_resolution) self.energy_state_channel = self.getChannelObject("energy_state") self.energy_state_channel.connectSignal("update", self.update_energy_state) self.detector_distance_channel = self.getChannelObject( "detector_position") self.energy_channel.connectSignal("update", self.update_resolution) self.energy_channel.connectSignal("valueChanged", self.update_resolution) self.detector_distance_channel.connectSignal("update", self.update_resolution) self.detector_position_state_channel = self.getChannelObject( "detector_position_state") self.detector_position_state_channel.connectSignal( "update", self.update_detector_position_state) self.energy = self.getObjectByRole("energy") self.dtox = self.getObjectByRole("detector_distance") self.det_radius = self.getProperty("detector_radius") self.det_width = self.getProperty("detector_width") self.det_height = self.getProperty("detector_height")
def __init__( self, scan_range, scan_exposure_time, scan_start_angle, angle_per_frame, name_pattern, directory, image_nr_start, position=None, photon_energy=None, flux=None, transmission=None, ): self.goniometer = goniometer() self.detector = detector() self.beam_center = beam_center() self.energy_motor = energy_motor() self.resolution_motor = resolution_motor() self.protective_cover = protective_cover() self.transmission_motor = transmission_motor() self.scan_range = scan_range self.scan_exposure_time = scan_exposure_time self.scan_start_angle = scan_start_angle self.angle_per_frame = angle_per_frame self.image_nr_start = image_nr_start self.position = position self.photon_energy = photon_energy self.flux = flux self.transmission = transmission self.name_pattern = name_pattern self.directory = directory self._ntrigger = 1 super(self, experiment).__init__()
def init(self): self.resolution_motor = resolution() self.beam_center = beam_center() self.energy_channel = self.get_channel_object("energy") self.energy_channel.connectSignal("update", self.update_resolution) self.energy_state_channel = self.get_channel_object("energy_state") self.energy_state_channel.connectSignal("update", self.update_energy_state) self.detector_distance_channel = self.get_channel_object("detector_position") self.energy_channel.connectSignal("update", self.update_resolution) self.energy_channel.connectSignal("valueChanged", self.update_resolution) self.detector_distance_channel.connectSignal("update", self.update_resolution) self.detector_position_state_channel = self.get_channel_object( "detector_position_state" ) self.detector_position_state_channel.connectSignal( "update", self.update_detector_position_state ) self.det_width = self.getProperty("detector_width") self.det_height = self.getProperty("detector_height")
def __init__(self, scan_range, scan_exposure_time, scan_start_angles, #this is an iterable angle_per_frame, name_pattern, directory='/nfs/ruchebis/spool/2016_Run3/orphaned_collects', image_nr_start=1): self.goniometer = goniometer() self.detector = detector() self.beam_center = beam_center() scan_range = float(scan_range) scan_exposure_time = float(scan_exposure_time) nimages = float(scan_range)/angle_per_frame frame_time = scan_exposure_time/nimages self.scan_range = scan_range self.scan_exposure_time = scan_exposure_time self.scan_start_angles = scan_start_angles self.angle_per_frame = angle_per_frame self.nimages = int(nimages) self.frame_time = float(frame_time) self.count_time = self.frame_time - self.detector.get_detector_readout_time() self.name_pattern = name_pattern self.directory = directory self.image_nr_start = image_nr_start self.status = None
def __init__(self, x_pixels_in_detector=3110, y_pixels_in_detector=3269, x_pixel_size=75e-6, y_pixel_size=75e-6, distance=None, wavelength=None, photon_energy=None, test=False): self.distance_motor = PyTango.DeviceProxy( 'i11-ma-cx1/dt/dtc_ccd.1-mt_ts') self.horizontal_motor = PyTango.DeviceProxy( 'i11-ma-cx1/dt/dtc_ccd.1-mt_tx') self.vertical_motor = PyTango.DeviceProxy( 'i11-ma-cx1/dt/dtc_ccd.1-mt_tz') self.wavelength_motor = PyTango.DeviceProxy('i11-ma-c03/op/mono1') self.energy_motor = energy() self.bc = beam_center() self.x_pixel_size = x_pixel_size self.y_pixel_size = y_pixel_size self.x_pixels_in_detector = x_pixels_in_detector self.y_pixels_in_detector = y_pixels_in_detector self.distance = distance self.wavelength = wavelength self.photon_energy = photon_energy self.test = test
def __init__(self, vertical_range, horizontal_range, number_of_rows, number_of_columns, scan_exposure_time, scan_start_angle=None, scan_range=0.01, image_nr_start=1, scan_axis='horizontal', # 'horizontal' or 'vertical' direction_inversion=True, method='md2', # possible methods: "md2", "helical" zoom=None, # by default use the current zoom name_pattern='grid_$id', directory='/nfs/ruchebis/spool/2016_Run3/orphaned_collects'): self.goniometer = goniometer() self.detector = detector() self.camera = camera() self.guillotine = protective_cover() self.beam_center = beam_center() self.scan_axis = scan_axis self.method = method self.vertical_range = vertical_range self.horizontal_range = horizontal_range self.shape = numpy.array((number_of_rows, number_of_columns)) self.number_of_rows = number_of_rows self.number_of_columns = number_of_columns self.frame_time = scan_exposure_time self.count_time = self.frame_time - self.detector.get_detector_readout_time() self.scan_start_angle = scan_start_angle self.scan_range = scan_range if self.scan_axis == 'horizontal': self.line_scan_time = self.frame_time * self.number_of_columns self.angle_per_frame = self.scan_range / self.number_of_columns else: self.line_scan_time = self.frame_time * self.number_of_rows self.angle_per_frame = self.scan_range / self.number_of_rows self.image_nr_start = image_nr_start self.direction_inversion = direction_inversion self.name_pattern = name_pattern self.directory = directory self.method = method self.zoom = zoom super(self, experiment).__init__()
def __init__(self, x_pixels_in_detector=3110, y_pixels_in_detector=3269, x_pixel_size=75e-6, y_pixel_size=75e-6, distance=None, wavelength=None, photon_energy=None, test=False): self.distance_motor = PyTango.DeviceProxy('i11-ma-cx1/dt/dtc_ccd.1-mt_ts') self.wavelength_motor = PyTango.DeviceProxy('i11-ma-c03/op/mono1') self.energy_motor = energy() self.bc = beam_center() self.x_pixel_size = x_pixel_size self.y_pixel_size = y_pixel_size self.x_pixels_in_detector = x_pixels_in_detector self.y_pixels_in_detector = y_pixels_in_detector self.distance = distance self.wavelength = wavelength self.photon_energy = photon_energy self.test = test
def __init__(self, scan_range, scan_exposure_time, scan_start_angle, angle_per_frame, name_pattern, directory='/nfs/ruchebis/spool/2016_Run3/orphaned_collects', image_nr_start=1, helical=False): self.goniometer = goniometer() self.detector = detector() self.beam_center = beam_center() self.protective_cover = protective_cover() self.detector.set_trigger_mode('exts') self.detector.set_nimages_per_file(100) self.detector.set_ntrigger(1) scan_range = float(scan_range) scan_exposure_time = float(scan_exposure_time) nimages, rest = divmod(scan_range, angle_per_frame) if rest > 0: nimages += 1 scan_range += rest*angle_per_frame scan_exposure_time += rest*angle_per_frame/scan_range frame_time = scan_exposure_time/nimages self.scan_range = scan_range self.scan_exposure_time = scan_exposure_time self.scan_start_angle = scan_start_angle self.angle_per_frame = angle_per_frame self.nimages = int(nimages) self.frame_time = float(frame_time) self.count_time = self.frame_time - self.detector.get_detector_readout_time() self.name_pattern = name_pattern self.directory = directory self.image_nr_start = image_nr_start self.helical = helical self.status = None
def __init__(self, scan_range, scan_exposure_time, scan_start_angle, angle_per_frame, name_pattern, directory='/nfs/ruchebis/spool/2016_Run3/orphaned_collects', image_nr_start=1, helical=False): self.goniometer = goniometer() self.detector = detector() self.beam_center = beam_center() self.detector.set_trigger_mode('exts') self.detector.set_nimages_per_file(100) self.detector.set_ntrigger(1) scan_range = float(scan_range) scan_exposure_time = float(scan_exposure_time) nimages, rest = divmod(scan_range, angle_per_frame) if rest > 0: nimages += 1 scan_range += rest*angle_per_frame scan_exposure_time += rest*angle_per_frame/scan_range frame_time = scan_exposure_time/nimages self.scan_range = scan_range self.scan_exposure_time = scan_exposure_time self.scan_start_angle = scan_start_angle self.angle_per_frame = angle_per_frame self.nimages = int(nimages) self.frame_time = float(frame_time) self.count_time = self.frame_time - self.detector.get_detector_readout_time() self.name_pattern = name_pattern self.directory = directory self.image_nr_start = image_nr_start self.helical = helical self.status = None
def __init__(self, name_pattern, directory, position=None, photon_energy=None, resolution=None, detector_distance=None, detector_vertical=None, detector_horizontal=None, transmission=None, flux=None, ntrigger=1, snapshot=False, zoom=None, diagnostic=None, analysis=None, conclusion=None, simulation=None, monitor_sleep_time=0.05): experiment.__init__(self, name_pattern=name_pattern, directory=directory, diagnostic=diagnostic, analysis=analysis, conclusion=conclusion, simulation=simulation) self.position = position self.photon_energy = photon_energy self.resolution = resolution self.detector_distance = detector_distance self.detector_vertical = detector_vertical self.detector_horizontal = detector_horizontal self.transmission = transmission self.flux = flux self.ntrigger = ntrigger self.snapshot = snapshot self.zoom = zoom self.monitor_sleep_time = monitor_sleep_time # Necessary equipment self.goniometer = goniometer() try: self.beam_center = beam_center() except: from beam_center import beam_center_mockup self.beam_center = beam_center_mockup() try: self.detector = detector() except: from detector_mockup import detector_mockup self.detector = detector_mockup() try: self.energy_motor = energy_motor() except: from energy import energy_mockup self.energy_motor = energy_mockup() try: self.resolution_motor = resolution_motor() except: from resolution import resolution_mockup self.resolution_motor = resolution_mockup() try: self.transmission_motor = transmission_motor() except: from transmission import transmission_mockup self.transmission_motor = transmission_mockup() try: self.machine_status = machine_status() except: from machine_status import machine_status_mockup self.machine_status = machine_status_mockup() try: self.undulator = undulator() except: from motor import undulator_mockup self.undulator = undulator_mockup() try: self.monochromator_rx_motor = monochromator_rx_motor() except: from motor import monochromator_rx_motor_mockup self.monochromator_rx_motor_mockup = monochromator_rx_motor_mockup( ) self.safety_shutter = safety_shutter() try: self.fast_shutter = fast_shutter() except: self.fast_shutter = fast_shutter_mockup() try: self.camera = camera() except: self.camera = None if self.photon_energy == None and self.simulation != True: self.photon_energy = self.get_current_photon_energy() self.wavelength = self.resolution_motor.get_wavelength_from_energy( self.photon_energy) try: self.slits1 = slits1() except: self.slits1 = slits_mockup(1) try: self.slits2 = slits2() except: self.slits2 = slits_mockup(2) try: self.slits3 = slits3() except: self.slits3 = slits_mockup(3) try: self.slits5 = slits5() except: self.slits5 = slits_mockup(5) try: self.slits6 = slits6() except: self.slits6 = slits_mockup(6) try: self.xbpm1 = xbpm('i11-ma-c04/dt/xbpm_diode.1-base') except: self.xbpm1 = xbpm_mockup('i11-ma-c04/dt/xbpm_diode.1-base') try: self.cvd1 = xbpm('i11-ma-c05/dt/xbpm-cvd.1-base') except: self.cvd1 = xbpm_mockup('i11-ma-c05/dt/xbpm-cvd.1-base') try: self.xbpm5 = xbpm('i11-ma-c06/dt/xbpm_diode.5-base') except: self.xbpm5 = xbpm_mockup('i11-ma-c06/dt/xbpm_diode.5-base') try: self.psd5 = xbpm('i11-ma-c06/dt/xbpm_diode.psd.5-base') except: self.psd5 = xbpm_mockup('i11-ma-c06/dt/xbpm_diode.psd.5-base') try: self.psd6 = xbpm('i11-ma-c06/dt/xbpm_diode.6-base') except: self.psd6 = xbpm_mockup('i11-ma-c06/dt/xbpm_diode.6-base') self.eiger_en_out = eiger_en_out() self.trigger_eiger_on = trigger_eiger_on() self.trigger_eiger_off = trigger_eiger_off() self.fast_shutter_open = fast_shutter_open() self.fast_shutter_close = fast_shutter_close() self.monitor_names = [ 'xbpm1', 'cvd1', #'xbpm5', 'psd5', 'psd6', 'machine_status', 'fast_shutter', 'eiger_en_out', 'trigger_eiger_on', 'trigger_eiger_off', 'fast_shutter_open', 'fast_shutter_close' ] self.monitors = [ self.xbpm1, self.cvd1, #self.xbpm5, self.psd5, self.psd6, self.machine_status, self.fast_shutter, self.eiger_en_out, self.trigger_eiger_on, self.trigger_eiger_off, self.fast_shutter_open, self.fast_shutter_close ] self.monitors_dictionary = { 'xbpm1': self.xbpm1, 'cvd1': self.cvd1, #'xbpm5': self.xbpm5, 'psd5': self.psd5, 'psd6': self.psd6, 'machine_status': self.machine_status, 'fast_shutter': self.fast_shutter, 'eiger_en_out': self.eiger_en_out, 'trigger_eiger_on': self.trigger_eiger_on, 'trigger_eiger_off': self.trigger_eiger_off, 'fast_shutter_open': self.fast_shutter_open, 'fast_shutter_close': self.fast_shutter_close } self.parameter_fields = self.parameter_fields.union( xray_experiment.specific_parameter_fields)