def __init__(self, insert_position=-7.67, extract_position=290.0, safe_distance=250., observation_distance=137., stage_horizontal_observation_position=21.3, stage_vertical_observation_position=19.0, device_name='i11-ma-cx1/dt/camx.1-vg', vertical_motor='i11-ma-cx1/dt/camx.1-mt_tz', distance_motor='i11-ma-cx1/dt/dtc_ccd.1-mt_ts', stage_horizontal_motor='i11-ma-cx1/dt/dtc_ccd.1-mt_tx', stage_vertical_motor='i11-ma-cx1/dt/dtc_ccd.1-mt_tz', focus_motor='i11-ma-cx1/dt/camx.1-mt_foc', named_positions_motor='i11-ma-cx1/dt/camx1-pos'): basler_camera.__init__(self, device_name) self.vertical_motor = tango_motor(vertical_motor) self.distance_motor = tango_motor(distance_motor) self.stage_horizontal_motor = tango_motor(stage_horizontal_motor) self.stage_vertical_motor = tango_motor(stage_vertical_motor) self.focus_motor = tango_motor(focus_motor) self.named_positions_motor = tango_named_positions_motor(named_positions_motor) self.insert_position = insert_position self.extract_position = extract_position self.safe_distance = safe_distance self.observation_distance = observation_distance self.stage_horizontal_observation_position = stage_horizontal_observation_position self.stage_vertical_observation_position = stage_vertical_observation_position
def __init__(self): try: self.device = PyTango.DeviceProxy('i11-ma-cx1/ex/md2') self.motor_x = tango_motor('i11-ma-c06/ex/shutter-mt_tx') self.motor_z = tango_motor('i11-ma-c06/ex/shutter-mt_tz') except: print traceback.print_exc() self.device = md2_mockup() monitor.__init__(self)
def __init__(self, name_pattern, directory, motor, start, end, speed, monitors=[], display=None, analysis=None): experiment.__init__(self, name_pattern=name_pattern, directory=directory, analysis=analysis) if type(motor) == str: try: self.motor = tango_motor(motor) except: print traceback.print_exc() else: self.motor = motor self.start = start self.end = end self.speed = speed self.instrument = instrument() self.monitors = monitors self.display = display
def conclude(self): results = self.get_results() parameters = self.get_parameters() for lame_name in results.keys(): lame = tango_motor(lame_name) print lame_name, 'current offset', lame.device.offset print lame_name, 'decreasing offset by', results[lame_name][ 'offset'] lame.device.offset -= results[lame_name]['offset']
def __init__(self, thickness=125e-6, amplification=1e4, device_name='i11-ma-c00/ca/sai.2', named_positions_motor='i11-ma-cx1/dt/camx1-pos', horizontal_motor='i11-ma-cx1/dt/dtc_ccd.1-mt_tx', vertical_motor='i11-ma-cx1/dt/dtc_ccd.1-mt_tz', distance_motor='i11-ma-cx1/dt/dtc_ccd.1-mt_ts'): sai.__init__(self, device_name=device_name, number_of_channels=1) self.thickness = thickness self.amplification = amplification self.attenuation_length_12650 = 267.310 self._params = None self.named_positions_motor = tango_named_positions_motor(named_positions_motor) self.horizontal_motor = tango_motor(horizontal_motor) self.vertical_motor = tango_motor(vertical_motor) self.distance_motor = tango_motor(distance_motor)
def __init__(self, order=1): base_name = self.slits_names[order] self.h = tango_motor('%s_h.%d' % (base_name, order)) self.v = tango_motor('%s_v.%d' % (base_name, order)) self.i = tango_motor('%s_h.%d-mt_i' % (base_name, order)) self.o = tango_motor('%s_h.%d-mt_o' % (base_name, order)) self.u = tango_motor('%s_v.%d-mt_u' % (base_name, order)) self.d = tango_motor('%s_v.%d-mt_d' % (base_name, order))
def __init__(self, order=3): base_name = self.slits_names[order] self.h = tango_motor('%s_h.%d' % (base_name, order)) self.v = tango_motor('%s_v.%d' % (base_name, order)) self.horizontal_gap = tango_motor('%s_h.%d-mt_ec' % (base_name, order)) self.horizontal_position = tango_motor('%s_h.%d-mt_tx' % (base_name, order)) self.vertical_gap = tango_motor('%s_v.%d-mt_ec' % (base_name, order)) self.vertical_position = tango_motor('%s_v.%d-mt_tz' % (base_name, order))
def __init__(self): for direction in ['ts', 'tx', 'tz']: setattr(self, direction, tango_motor('i11-ma-cx1/dt/dtc_ccd.1-mt_%s' % direction))