47 lines
1.3 KiB
Python
47 lines
1.3 KiB
Python
"""
|
|
Arguments:
|
|
|
|
SENSORS (list)
|
|
PHI_RANGE (tuple (min, max))
|
|
THETA_RANGE (tuple (min, max))
|
|
STEPS (tuple (phi, theta))
|
|
LATENCY (double)
|
|
RELATIVE (BOOLEAN)
|
|
ZIGZAG (BOOLEAN)
|
|
"""
|
|
import math
|
|
global VECTOR, SENSORS
|
|
|
|
MODE = "swept"
|
|
LATENCY = 0.0
|
|
SENSORS = [Counts, Scienta.dataMatrix, SampleCurrent, RefCurrent, MachineCurrent]
|
|
|
|
Scienta.setAcquisitionMode(ch.psi.pshell.epics.Scienta.AcquisitionMode.Swept)
|
|
writables = (ManipulatorTheta)
|
|
|
|
adjust_sensors()
|
|
SampleCurrentAveraging.write(10)
|
|
RefCurrentAveraging.write(10)
|
|
set_preference(Preference.PLOT_TYPES, {'Scienta spectrum':1})
|
|
|
|
try:
|
|
#phi = [int(i/46) * 36.0 - 165.0 for i in range(460)]
|
|
#theta = [(i%46)*2.0-9.0 for i in range(460)]
|
|
|
|
NPOINTS = 61
|
|
#phi = [0.5 for i in range(NPOINTS)]
|
|
phi=30.5
|
|
theta = [i * 1.0 - 9.0 for i in range(NPOINTS)]
|
|
x = [3.0 * math.cos((th+9.0) * math.pi/180.0) - 1.69 for th in theta]
|
|
y = [3.0 * math.sin((th+9.0) * math.pi/180.0) - 0.933 for th in theta]
|
|
#x = [0.65]
|
|
#y = [0.0179 * th for th in theta]
|
|
#VECTOR = [phi, theta, x, y]
|
|
VECTOR= [theta[i] for i in range(NPOINTS)]
|
|
# 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()
|