Script execution
This commit is contained in:
@@ -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)
|
||||
"""
|
||||
|
||||
SENSORS = (Scienta.spectrum, Scienta.dataMatrix, Counts, SampleCurrent, RefCurrent, MachineCurrent, EnergyDistribution, AngleDistribution)
|
||||
LATENCY = 0.0
|
||||
ENDSCAN = True
|
||||
|
||||
def get_vector(ephot_lo, ephot_hi, ephot_step, ekin_lo, ekin_hi):
|
||||
NSTEPS = int(round((ephot_hi - ephot_lo) / ephot_step) + 1)
|
||||
EPHOT_STEP = (ephot_hi - ephot_lo) / (NSTEPS - 1)
|
||||
|
||||
ephot = [ephot_lo + ephot_step * i for i in range(NSTEPS)]
|
||||
eshift = [ephot_step * i for i in range(NSTEPS)]
|
||||
ekin_lo = [ekin_lo + eshift[i] for i in range(NSTEPS)]
|
||||
ekin_hi = [ekin_hi + eshift[i] for i in range(NSTEPS)]
|
||||
|
||||
VECTOR = [[ephot[i], ekin_lo[i], ekin_hi[i]] for i in range(NSTEPS)]
|
||||
|
||||
Scienta.setAcquisitionMode(ch.psi.pshell.epics.Scienta.AcquisitionMode.Swept)
|
||||
writables = (Eph, Scienta.lowEnergy, Scienta.highEnergy)
|
||||
|
||||
adjust_sensors()
|
||||
set_adc_averaging()
|
||||
set_preference(Preference.PLOT_TYPES, {'Scienta spectrum':1})
|
||||
|
||||
# Mn 3p
|
||||
# 630 s
|
||||
v1 = get_vector(78.5, 188.5, 2.0, 29.5, 49.5)
|
||||
print v1
|
||||
# Ge 3p
|
||||
# 450 s
|
||||
v2 = get_vector(160.0, 270.0, 2.0, 27.0, 41.0)
|
||||
print v2
|
||||
|
||||
vscan(writables, SENSORS, v1, True, LATENCY,False, before_read=before_readout, after_read = after_readout)
|
||||
vscan(writables, SENSORS, v2, True, LATENCY,False, before_read=before_readout, after_read = after_readout)
|
||||
|
||||
after_scan()
|
||||
Reference in New Issue
Block a user