Example #1
0
def set_mono_scan_points(numpoints):
  mono_mot_code = beamline_support.get_motor_code(beamline_support.motor_code_from_descriptor("monochromator"))
  step_inc = beamline_support.get_scanstepsize(mono_mot_code)
  scan_width = step_inc * (float(float(numpoints) - 1))
  half_scan_width = scan_width/2.0
#  daq_lib.set_field("mono_scan_points",int(float(numpoints)))
  beamline_support.set_scanpoints(mono_mot_code,int(float(numpoints)))
  beamline_support.set_scanstart(mono_mot_code,0.0 - half_scan_width)
  beamline_support.set_scanend(mono_mot_code,half_scan_width)
Example #2
0
def set_mono_scan_points(numpoints):
    mono_mot_code = beamline_support.get_motor_code(
        beamline_support.motor_code_from_descriptor("monochromator"))
    step_inc = beamline_support.get_scanstepsize(mono_mot_code)
    scan_width = step_inc * (float(float(numpoints) - 1))
    half_scan_width = scan_width / 2.0
    beamline_support.set_scanpoints(mono_mot_code, int(float(numpoints)))
    beamline_support.set_scanstart(mono_mot_code, 0.0 - half_scan_width)
    beamline_support.set_scanend(mono_mot_code, half_scan_width)
Example #3
0
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
Example #4
0
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
Example #5
0
def set_scanend(motcode,posn):
  beamline_support.set_scanend(motcode,posn)
Example #6
0
def set_scanend(motcode, posn):
    beamline_support.set_scanend(motcode, posn)