diff --git a/robot/MXLAB/Controller1/usr/configs/controller.cfx b/robot/MXLAB/Controller1/usr/configs/controller.cfx index d8198c8..2668615 100644 --- a/robot/MXLAB/Controller1/usr/configs/controller.cfx +++ b/robot/MXLAB/Controller1/usr/configs/controller.cfx @@ -33,5 +33,5 @@ - + \ No newline at end of file diff --git a/script/ExposureScan.py b/script/ExposureScan.py index ae3c68b..dfec60b 100644 --- a/script/ExposureScan.py +++ b/script/ExposureScan.py @@ -12,15 +12,18 @@ class Contrast(Readable): def read(self): data = img.getData() #roi = Data(data.getRectSelection(500,300,700,600), False) - return data.getGradientVariance(False, Rectangle(500,300,700,600)) + return data.getGradientVariance(False, Rectangle(480,0,600,670)) contrast=Contrast() #a= lscan(exposure,img.getContrast(), 0.5, 1.0, 0.01, 0.5) #a= lscan(exposure,contrast, 0.2, 0.4, 0.01, 0.7) -a= lscan(exposure,contrast, 10.0, 500.0, 10.0, 0.7) +a= lscan(exposure,contrast, 10.0, 250.0, 10.0, 0.7) (n, m, s) = fit(a.getReadable(0), xdata=a.getPositions(0)) -if m is not None: - print "Setting exposure = ", m - exposure.write(m) \ No newline at end of file +if m is None: + m=max(a.getReadable(0)) + + +print "Setting exposure = ", m +exposure.write(m)