From e07095930ed6791644b455aec3d65e9c06e06414 Mon Sep 17 00:00:00 2001 From: x03daop Date: Wed, 12 Apr 2017 09:19:32 +0200 Subject: [PATCH] Script execution --- script/MultiRegionScan.py | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/script/MultiRegionScan.py b/script/MultiRegionScan.py index 09abc673..5fa3dabe 100644 --- a/script/MultiRegionScan.py +++ b/script/MultiRegionScan.py @@ -19,10 +19,6 @@ CLOSE_SHUTTER_AT_END = True Scienta.setAcquisitionMode(ch.psi.pshell.epics.Scienta.AcquisitionMode.Swept) class SpectrumReader(ReadonlyRegisterBase, ReadonlyRegisterArray): - #def __init__(self): - # super(SpectrumReader, self).__init__() - # self.ephot_start = Eph.read() - def setup(self): ephot = Eph.read() try: @@ -30,11 +26,9 @@ class SpectrumReader(ReadonlyRegisterBase, ReadonlyRegisterArray): edelta = ephot - self.ephot_start else: edelta = 0.0 - print "calc edelta:", self.ephot_start, ephot, edelta except AttributeError: self.ephot_start = ephot edelta = 0.0 - print "reset edelta:", self.ephot_start, ephot, edelta Scienta.lowEnergy.write(self.region['elo'] + edelta) Scienta.highEnergy.write(self.region['ehi'] + edelta) @@ -44,8 +38,8 @@ class SpectrumReader(ReadonlyRegisterBase, ReadonlyRegisterArray): Scienta.setIterations(self.region['iter']) def read(self): - print "acquiring spectrum {0}-{1} eV".format(self.region['elo'], self.region['ehi']) self.setup() + print "Photon energy {ephot} eV. Acquiring spectrum {elo}-{ehi} eV".format(Eph.read(), Scienta.lowEnergy.value, Scienta.highEnergy.value) trig_scienta() time.sleep(0.5) sp = Scienta.getSpectrum().read()