""" Manipulator scan across the beam relative to current position set manipulator scan parameters below. set analyser parameters separately! move manipulator to center position before start! """ import math # adjust the following parameters DISTANCE = 5.0 ANGLE = -30.0 # move sample across beam #ANGLE = 60.0 # move sample along beam STEPS = 10 LATENCY = 1.0 ENDSCAN = False # do not edit below # TODO: check signs! DISTANCE_X = DISTANCE * math.cos(math.radians(ANGLE)) DISTANCE_Y = DISTANCE * math.sin(math.radians(ANGLE)) MOTOR = (ManipulatorX, ManipulatorY) SENSORS = (Counts, SampleCurrent, RefCurrent, AuxCurrent, MachineCurrent, ImageEnergyDistribution, ImageAngleDistribution) 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() set_preference(Preference.PLOT_TYPES, {'Scienta spectrum':1}) try: lscan(MOTOR, SENSORS, STARTPOS, ENDPOS, STEPS, LATENCY, RELATIVE, before_read=before_readout, after_read = after_readout) finally: if ENDSCAN: after_scan()