Startup
This commit is contained in:
@@ -0,0 +1,65 @@
|
||||
"""
|
||||
front end calibration scans
|
||||
|
||||
Keithley2: RMU
|
||||
"""
|
||||
|
||||
import time
|
||||
|
||||
SENSORS = (Keithley2)
|
||||
STARTPOS = (-1.5)
|
||||
ENDPOS = (+1.5)
|
||||
STEPS = 0.01
|
||||
LATENCY = 1.0
|
||||
DWELL = 1.0
|
||||
KEITHLEY = "X03DA-KEITHLEY-1"
|
||||
|
||||
def trig():
|
||||
wait_beam()
|
||||
caput(KEITHLEY + ":DOREAD", 1)
|
||||
|
||||
|
||||
#caput(KEITHLEY + "X03DA-KEITHLEY-1:DOINIT", 1)
|
||||
#caput(KEITHLEY + "X03DA-KEITHLEY-1:DOTRIGGER", 1)
|
||||
#caput(KEITHLEY + "X03DA-KEITHLEY-1:DOFETCH", 1)
|
||||
|
||||
caput(KEITHLEY + ":NPLC", 1)
|
||||
caput(KEITHLEY + ":NAVG", DWELL / 0.02)
|
||||
caput(KEITHLEY + ":TCOUNT", 1)
|
||||
caput(KEITHLEY + ":RANGE", "200 nA")
|
||||
|
||||
FrontendHSize.write(2.0)
|
||||
FrontendVSize.write(2.0)
|
||||
ExitSlit.write(25.0)
|
||||
caput("X03DA-PGM:ronbeta.A", -87.0)
|
||||
caput("X03DA-PGM:rontheta.A", +87.0)
|
||||
|
||||
#MonoBeta.waitValueInRange(-87.01, -86.99, 100000)
|
||||
#MonoTheta.waitValueInRange(+86.99, +87.01, 100000)
|
||||
|
||||
POSITIONERS = (FrontendBladeUp)
|
||||
FrontendBladeDown.write(-2.0)
|
||||
lscan(POSITIONERS, SENSORS, STARTPOS, ENDPOS, STEPS, LATENCY, before_read=trig, after_read=after_readout)
|
||||
|
||||
POSITIONERS = (FrontendBladeDown)
|
||||
FrontendBladeUp.write(+2.0)
|
||||
lscan(POSITIONERS, SENSORS, STARTPOS, ENDPOS, STEPS, LATENCY, before_read=trig, after_read=after_readout)
|
||||
|
||||
FrontendHSize.write(2.0)
|
||||
FrontendVSize.write(2.0)
|
||||
time.sleep(10.0)
|
||||
|
||||
STARTPOS = (-4.0)
|
||||
ENDPOS = (+4.0)
|
||||
STEPS = 0.1
|
||||
|
||||
POSITIONERS = (FrontendBladeRing)
|
||||
FrontendBladeWall.write(-4.0)
|
||||
lscan(POSITIONERS, SENSORS, STARTPOS, ENDPOS, STEPS, LATENCY, before_read=trig, after_read=after_readout)
|
||||
|
||||
POSITIONERS = (FrontendBladeWall)
|
||||
FrontendBladeRing.write(+4.0)
|
||||
lscan(POSITIONERS, SENSORS, STARTPOS, ENDPOS, STEPS, LATENCY, before_read=trig, after_read=after_readout)
|
||||
|
||||
FrontendHSize.write(0.0)
|
||||
FrontendVSize.write(0.0)
|
||||
@@ -0,0 +1,32 @@
|
||||
"""
|
||||
Flying hologram scan (work in progress)
|
||||
|
||||
Arguments:
|
||||
|
||||
SENSORS (list)
|
||||
PHI_RANGE (tuple (min, max))
|
||||
THETA_RANGE (tuple (min, max))
|
||||
STEPS (tuple (phi, theta))
|
||||
LATENCY (double)
|
||||
RELATIVE (BOOLEAN)
|
||||
ZIGZAG (BOOLEAN)
|
||||
"""
|
||||
|
||||
|
||||
#set_preference(Preference.ENABLED_PLOTS, [ManipulatorPhi, ManipulatorTheta, Scienta.dataMatrix, ImageIntegrator])
|
||||
#set_preference(Preference.PLOT_TYPES,{'ImageIntegrator':1})
|
||||
adjust_sensors()
|
||||
set_adc_averaging()
|
||||
set_preference(Preference.PLOT_TYPES, {'Scienta spectrum':1})
|
||||
|
||||
# time for one theta scan in seconds
|
||||
TIME = 60
|
||||
|
||||
try:
|
||||
ascan((ManipulatorPhi, ManipulatorTheta), SENSORS, (PHI_RANGE[0], THETA_RANGE[0]), (PHI_RANGE[1], THETA_RANGE[1]), STEPS, LATENCY, RELATIVE, zigzag = ZIGZAG, before_read=before_readout, after_read = after_readout)
|
||||
cscan(ManipulatorTheta, SENSORS, THETA_RANGE[0], THETA_RANGE[1], STEPS, time=TIME)
|
||||
cscan(
|
||||
|
||||
finally:
|
||||
if ENDSCAN:
|
||||
after_scan()
|
||||
Reference in New Issue
Block a user