Startup
This commit is contained in:
@@ -0,0 +1,56 @@
|
||||
"""
|
||||
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, EnergyDistribution, AngleDistribution)
|
||||
|
||||
Scienta.setAcquisitionMode(ch.psi.pshell.epics.Scienta.AcquisitionMode.Swept)
|
||||
writables = (Eph, Scienta.lowEnergy, Scienta.highEnergy)
|
||||
|
||||
adjust_sensors()
|
||||
set_adc_averaging()
|
||||
|
||||
try:
|
||||
# scan 1
|
||||
NPOINTS = 121
|
||||
EPH_START = 425.0
|
||||
EPH_STEP = 2.5
|
||||
|
||||
EKIN_LOW = 19.0
|
||||
EKIN_HIGH = 29.0
|
||||
EKIN_STEP = 0.1
|
||||
DWELL_TIME = 0.1
|
||||
|
||||
VECTOR = [[EPH_START + i * EPH_STEP, EKIN_LOW + i * EPH_STEP, EKIN_HIGH + i * EPH_STEP] for i in range(NPOINTS)]
|
||||
Scienta.stepSize.write(EKIN_STEP)
|
||||
Scienta.stepTime.write(DWELL_TIME)
|
||||
vscan(writables, SENSORS, VECTOR, True, LATENCY, False, before_read=before_readout, after_read = after_readout)
|
||||
|
||||
# scan 2
|
||||
NPOINTS = 121
|
||||
EPH_START = 425.0
|
||||
EPH_STEP = 2.5
|
||||
|
||||
EKIN_LOW = 19.0
|
||||
EKIN_HIGH = 29.0
|
||||
EKIN_STEP = 0.1
|
||||
DWELL_TIME = 0.1
|
||||
|
||||
VECTOR = [[EPH_START + i * EPH_STEP, EKIN_LOW + i * EPH_STEP, EKIN_HIGH + i * EPH_STEP] for i in range(NPOINTS)]
|
||||
Scienta.stepSize.write(EKIN_STEP)
|
||||
Scienta.stepTime.write(DWELL_TIME)
|
||||
vscan(writables, SENSORS, VECTOR, True, LATENCY, False, before_read=before_readout, after_read = after_readout)
|
||||
|
||||
finally:
|
||||
after_scan()
|
||||
@@ -0,0 +1,46 @@
|
||||
"""
|
||||
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, EnergyDistribution, AngleDistribution)
|
||||
|
||||
Scienta.setAcquisitionMode(ch.psi.pshell.epics.Scienta.AcquisitionMode.Swept)
|
||||
writables = (Eph, Scienta.lowEnergy, Scienta.highEnergy)
|
||||
|
||||
adjust_sensors()
|
||||
set_adc_averaging()
|
||||
|
||||
try:
|
||||
# scan 1
|
||||
NPOINTS = 121
|
||||
EPH_START = 425.0
|
||||
EKIN_LOW = 19.0
|
||||
EKIN_HIGH = 29.0
|
||||
ESTEP = 2.5
|
||||
#Scienta.getStepTime().write(0.824)
|
||||
VECTOR = [[EPH_START + i * ESTEP, EKIN_LOW + i * ESTEP, EKIN_HIGH + i * ESTEP] for i in range(NPOINTS)]
|
||||
vscan(writables, SENSORS, VECTOR, True, LATENCY, False, before_read=before_readout, after_read = after_readout)
|
||||
|
||||
# scan 2
|
||||
NPOINTS = 121
|
||||
EPH_START = 425.0
|
||||
EKIN_LOW = 19.0
|
||||
EKIN_HIGH = 29.0
|
||||
ESTEP = 2.5
|
||||
VECTOR = [[EPH_START + i * ESTEP, EKIN_LOW + i * ESTEP, EKIN_HIGH + i * ESTEP] for i in range(NPOINTS)]
|
||||
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