Script execution

This commit is contained in:
x03daop
2017-04-07 15:04:11 +02:00
parent e38877eac8
commit 805dd2322b

View File

@@ -10,6 +10,7 @@ LATENCY = 0.0
REGION1 = {'elo': 240.0, 'ehi': 242.0, 'estep': 0.1, 'epass': 100, 'tstep': 0.1, 'iter': 1}
REGION2 = {'elo': 241.0, 'ehi': 243.0, 'estep': 0.2, 'epass': 100, 'tstep': 0.1, 'iter': 1}
REGIONS = [REGION1, REGION2]
Scienta.setAcquisitionMode(ch.psi.pshell.epics.Scienta.AcquisitionMode.Swept)
class SpectrumReader(ReadonlyRegisterBase, ReadonlyRegisterArray):
def setup(self):
@@ -32,8 +33,9 @@ class SpectrumReader(ReadonlyRegisterBase, ReadonlyRegisterArray):
print "SpectrumReader.getSize"
n1 = Scienta.numChannels.read()
n2 = len(Scienta.getSpectrumX())
print n1, n2
return n1
n3 = int((self.region['ehi'] - self.region['elo']) / self.region['estep'])
print n1, n2, n3
return n3
class ImageReader(ReadonlyRegisterBase, ReadonlyRegisterMatrix):
@@ -45,14 +47,16 @@ class ImageReader(ReadonlyRegisterBase, ReadonlyRegisterMatrix):
def getWidth(self):
print "ImageReader.getWidth"
n2 = Scienta.getDataMatrix().getWidth()
print n2
return n2
n3 = int((self.region['ehi'] - self.region['elo']) / self.region['estep'])
print n2, n3
return n3
def getHeight(self):
print "ImageReader.getHeight"
n2 = Scienta.getDataMatrix().getHeight()
print n2
return n2
n3 = Scienta.slices.read()
print n2, n3
return n3
index = 0