# set STARTPOS, ENDPOS, STEPS to the proper values # swept mode # for fixed mode, remove kinetic_high STARTPOS = (83, 67.5, 72.5, -3.6, -1.7) ENDPOS = (251, 235.5, 240.5, -3.35, -1.26) # actually executed number is +1, i believe STEPS = 42 RELATIVE = False SENSORS = (Counts, SampleCurrent, RefCurrent, MachineCurrent, EnergyDistribution, AngleDistribution, Scienta.dataMatrix) LATENCY = 1. if len(STARTPOS) == 4: #FIXED Scienta.setAcquisitionMode(ch.psi.pshell.epics.Scienta.AcquisitionMode.Fixed) Scienta.centerEnergy.write(STARTPOS[1]) MOTOR = (Eph, Scienta.centerEnergy, ManipulatorX, ManipulatorY) else: #SWEPT Scienta.setAcquisitionMode(ch.psi.pshell.epics.Scienta.AcquisitionMode.Swept) Scienta.lowEnergy.write(STARTPOS[1]) Scienta.highEnergy.write(STARTPOS[2]) MOTOR = (Eph, Scienta.lowEnergy, Scienta.highEnergy, ManipulatorX, ManipulatorY) 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()