def set_mono_energy_scan_step(stepsize): mono_mot_code = beamline_support.get_motor_code(beamline_support.motor_code_from_descriptor("monochromator")) try: mono_stepsize_steps = float(stepsize) # daq_lib.set_field("mono_energy_scan_step",mono_stepsize_steps) numpoints = beamline_support.get_scan_points(mono_mot_code) scan_width = float(mono_stepsize_steps) * float(numpoints-1) half_scan_width = scan_width/2.0 beamline_support.set_scanstart(mono_mot_code,0.0 - half_scan_width) beamline_support.set_scanend(mono_mot_code,half_scan_width) except ValueError: pass
def set_mono_energy_scan_step(stepsize): mono_mot_code = beamline_support.get_motor_code( beamline_support.motor_code_from_descriptor("monochromator")) try: mono_stepsize_steps = float(stepsize) numpoints = beamline_support.get_scan_points(mono_mot_code) scan_width = float(mono_stepsize_steps) * float(numpoints - 1) half_scan_width = scan_width / 2.0 beamline_support.set_scanstart(mono_mot_code, 0.0 - half_scan_width) beamline_support.set_scanend(mono_mot_code, half_scan_width) except ValueError: pass
def get_scan_points(motcode): return beamline_support.get_scan_points(motcode)