Script execution
This commit is contained in:
54
script/users/HoloScan-Yasmine2.py
Normal file
54
script/users/HoloScan-Yasmine2.py
Normal file
@@ -0,0 +1,54 @@
|
||||
"""
|
||||
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 = (ManipulatorPhi, ManipulatorTheta, ManipulatorX, ManipulatorY)
|
||||
|
||||
adjust_sensors()
|
||||
SampleCurrentAveraging.write(1660)
|
||||
RefCurrentAveraging.write(1660)
|
||||
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
|
||||
phi = [30.5]
|
||||
theta = [i * 1.0 - 11.0 for i in range(61)]
|
||||
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]
|
||||
#VECTOR = [phi, theta, x, y]
|
||||
VECTOR = [[phi[i], theta[i], x[i], y[i]] for i in range(61)]
|
||||
# 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()
|
||||
Reference in New Issue
Block a user