Files
x03da/script/staff/HbnPhdScript.py
2017-02-16 16:28:33 +01:00

49 lines
1.5 KiB
Python

"""
Arguments:
VECTOR (Double[][], Scan vector: Eph,Elow,Ehigh or Eph,Ecenter)
SENSORS (list)
LATENCY (double)
MODE ('fixed' or 'swept')
TYPE ('CIS' or 'CFS')
STEP (double)
"""
global VECTOR, SENSORS
MODE = "swept"
LATENCY = 2.0
SENSORS = [Counts, Scienta.dataMatrix, SampleCurrent, RefCurrent, MachineCurrent]
Scienta.setAcquisitionMode(ch.psi.pshell.epics.Scienta.AcquisitionMode.Swept)
writables = (Eph, Scienta.lowEnergy, Scienta.highEnergy)
adjust_sensors()
SampleCurrentAveraging.write(600)
RefCurrentAveraging.write(600)
set_preference(Preference.PLOT_TYPES, {'Scienta spectrum':1})
try:
# N-B
VECTOR = [[425.0 + i * 2.5, 19.0 + i * 2.5, 29.0 + i * 2.5] for i in range(121)]
#ManipulatorPhi.move(+21.1)
#ManipulatorTilt.move(+0.5)
#Scienta.getStepTime().write(0.824)
#print VECTOR
#vscan(writables, SENSORS, VECTOR, True, LATENCY, False, before_read=before_readout, after_read = after_readout)
# N-N
#ManipulatorPhi.move(-8.9)
#ManipulatorTilt.move(+0.5)
#Scienta.getStepTime().write(0.824)
#vscan(writables, SENSORS, VECTOR, True, LATENCY, False, before_read=before_readout, after_read = after_readout)
# B-Cu
VECTOR = [[218.0 + i * 2.5, 19.0 + i * 2.5, 29.0 + i * 2.5] for i in range(121)]
ManipulatorPhi.move(-8.9)
ManipulatorTilt.move(+25.5)
Scienta.getStepTime().write(1.47)
vscan(writables, SENSORS, VECTOR, True, LATENCY, False, before_read=before_readout, after_read = after_readout)
finally:
after_scan()