""" Parallel refocusing mirror RY and manipulator X scan (to find analyser focus) set scan parameters below. set analyser parameters separately! move manipulator and mirror to center position before start! """ import math # adjust the following parameters DISTANCE = 0.8 # mrad (Ry) SLOPE = -2.000 # mm/mrad (DX / DRy) STEPS = 40 LATENCY = 0.5 ENDSCAN = False # do not edit below DISTANCE_X = DISTANCE * math.cos(math.radians(ANGLE)) DISTANCE_Y = DISTANCE * math.sin(math.radians(ANGLE)) MOTOR = (ManipulatorX, ManipulatorY) SENSORS = (Counts, SampleCurrent, RefCurrent, MachineCurrent, EnergyDistribution, AngleDistribution) STARTPOS = (-DISTANCE_X / 2.0, -DISTANCE_Y / 2.0) ENDPOS = (DISTANCE_X / 2.0, DISTANCE_Y / 2.0) RELATIVE = True adjust_sensors() set_adc_averaging() try: lscan(MOTOR, SENSORS, STARTPOS, ENDPOS, STEPS, LATENCY, RELATIVE, before_read=before_readout, after_read = after_readout) finally: if ENDSCAN: after_scan()