Script execution
This commit is contained in:
@@ -15,7 +15,7 @@ MOTORS = [dummy]
|
||||
#POSITIONS = [(PHI_RA
|
||||
#POSITIONS = [(PNGE[0], THETA_RANGE[0]), (PHI_RANGE[1], THETA_RANGE[1]), STEPS]
|
||||
#POSITIONS = [-175., 180., 5.]
|
||||
POSITIONS = [0.0]
|
||||
POSITIONS = [0.]
|
||||
# seconds to wait between positioning command and triggering the detector
|
||||
LATENCY = 0.0
|
||||
|
||||
@@ -108,14 +108,14 @@ class SpectrumReader(ReadonlyRegisterBase, ReadonlyRegisterArray):
|
||||
if self.region_index == 0:
|
||||
print "scan {0}".format(self.scan_index)
|
||||
|
||||
#ephot = Eph.read()
|
||||
#try:
|
||||
# if self.region['cis']:
|
||||
# edelta = ephot - self.ephot_start
|
||||
# else:
|
||||
# edelta = 0.0
|
||||
#except AttributeError:
|
||||
# self.ephot_start = ephot
|
||||
ephot = Eph.read()
|
||||
try:
|
||||
if self.region['cis']:
|
||||
edelta = ephot - self.ephot_start
|
||||
else:
|
||||
edelta = 0.0
|
||||
except AttributeError:
|
||||
self.ephot_start = ephot
|
||||
edelta = 0.0
|
||||
|
||||
elo = self.region['elo'] + edelta
|
||||
@@ -132,11 +132,11 @@ class SpectrumReader(ReadonlyRegisterBase, ReadonlyRegisterArray):
|
||||
Scienta.highEnergy.write(ehi)
|
||||
Scienta.stepSize.write(self.region['estep'])
|
||||
|
||||
#Scienta.setPassEnergy(self.region['epass'])
|
||||
#Scienta.stepTime.write(self.region['tstep'])
|
||||
#Scienta.setIterations(self.region['iter'])
|
||||
#ExitSlit.write(self.region['slit'])
|
||||
#Scienta.update()
|
||||
Scienta.setPassEnergy(self.region['epass'])
|
||||
Scienta.stepTime.write(self.region['tstep'])
|
||||
Scienta.setIterations(self.region['iter'])
|
||||
ExitSlit.write(self.region['slit'])
|
||||
Scienta.update()
|
||||
|
||||
if self.region['fixed']:
|
||||
append_dataset(self.channel_center_dataset_name, elo)
|
||||
@@ -213,12 +213,11 @@ def do_scan(motors, positions, regions, latency):
|
||||
|
||||
SENSORS = []
|
||||
|
||||
print "blabla"
|
||||
|
||||
for (index, region) in enumerate(regions):
|
||||
|
||||
check_region(region)
|
||||
print region
|
||||
|
||||
|
||||
reader = SpectrumReader()
|
||||
reader.region_index = index
|
||||
@@ -235,7 +234,7 @@ def do_scan(motors, positions, regions, latency):
|
||||
set_device_alias(image, reader.region_name + "/ScientaImage")
|
||||
SENSORS.append(image)
|
||||
|
||||
print "blabla2"
|
||||
|
||||
SENSORS.append(SampleCurrent)
|
||||
SENSORS.append(RefCurrent)
|
||||
adjust_sensors()
|
||||
@@ -245,7 +244,7 @@ def do_scan(motors, positions, regions, latency):
|
||||
#lscan(motors, SENSORS, positions[0], positions[1], positions[2], latency, False, before_read=wait_beam, after_read = after_readout)
|
||||
vscan(motors, SENSORS, positions, True, latency,False, before_read=wait_beam, after_read = after_readout)
|
||||
|
||||
print "blabla3"
|
||||
|
||||
for (index, region) in enumerate(regions):
|
||||
set_attribute(get_exec_pars().scanPath + "region{0}/ScientaSpectrum".format(index + 1), "RegionName", region['name'])
|
||||
set_attribute(get_exec_pars().scanPath + "region{0}/ScientaImage".format(index + 1), "RegionName", region['name'])
|
||||
|
||||
Reference in New Issue
Block a user