Files
x03da/script/users/JurajKZScan.py
2017-04-02 19:57:29 +02:00

43 lines
1.2 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)
"""
SENSORS = (Counts, SampleCurrent, RefCurrent, MachineCurrent, EnergyDistribution, AngleDistribution,Scienta.dataMatrix)
MOTORS = (ManipulatorPhi)
RANGE = (-90.0, +90.0)
STEPS = (2.0)
LATENCY = 0.0
ENDSCAN = True
RELATIVE = False
adjust_sensors()
set_adc_averaging()
set_preference(Preference.PLOT_TYPES, {'Scienta spectrum':1})
#photon_energies = [60.0, 65.0, 70.0, 75.0, 80.0, 85.0, 90.0, 95.0, 100.0, 105.0]
photon_energies = [95.0, 105.0, 115.0, 125.0]
try:
for ephot in photon_energies:
Eph.move(ephot)
print ephot
Scienta.getLowEnergy().write(55.0 + ephot - 65.0)
Scienta.getCenterEnergy().write(60.0 + ephot - 65.0)
Scienta.getHighEnergy().write(61.0 + ephot - 65.0)
#Scienta.getStepSize().write(0.1)
#Scienta.getStepTime().write(0.2)
#Scienta.setIterations(1)
lscan(MOTORS, SENSORS, RANGE[0], RANGE[1], STEPS, LATENCY, RELATIVE, before_read=before_readout, after_read = after_readout)
finally:
if ENDSCAN:
after_scan()