Commit 3e7a948c authored by Matias Guijarro's avatar Matias Guijarro Committed by Vincent Michel
Browse files

scanning/chain.py: removed commented code

scanning/acquisition/lima.py: removed unused import
scanning/acquisition/counter.py: reworded English
parent e16f4398
...@@ -166,7 +166,7 @@ class SamplingCounterAcquisitionDevice(BaseCounterAcquisitionDevice): ...@@ -166,7 +166,7 @@ class SamplingCounterAcquisitionDevice(BaseCounterAcquisitionDevice):
current_time = time.time() current_time = time.time()
if (current_time + (acc_read_time / nb_read)) > stop_time: if (current_time + (acc_read_time / nb_read)) > stop_time:
break break
gevent.sleep(0) # Be able to kill the task gevent.sleep(0) # to be able to kill the task
self._nb_acq_points += 1 self._nb_acq_points += 1
if self.__mode == SamplingCounterAcquisitionDevice.TIME_AVERAGE: if self.__mode == SamplingCounterAcquisitionDevice.TIME_AVERAGE:
data = acc_value / acc_read_time data = acc_value / acc_read_time
...@@ -214,7 +214,7 @@ class IntegratingCounterAcquisitionDevice(BaseCounterAcquisitionDevice): ...@@ -214,7 +214,7 @@ class IntegratingCounterAcquisitionDevice(BaseCounterAcquisitionDevice):
while self._nb_acq_points < self.npoints and not self._stop_flag: while self._nb_acq_points < self.npoints and not self._stop_flag:
data = self._read_data(from_index) data = self._read_data(from_index)
if not all_equal([len(d) for d in data]): if not all_equal([len(d) for d in data]):
raise RuntimeError("Can't have a different data length") raise RuntimeError("Read data can't have different sizes")
if len(data[0]) > 0: if len(data[0]) > 0:
from_index += len(data[0]) from_index += len(data[0])
self._nb_acq_points += len(data[0]) self._nb_acq_points += len(data[0])
......
...@@ -5,7 +5,7 @@ ...@@ -5,7 +5,7 @@
# Copyright (c) 2016 Beamline Control Unit, ESRF # Copyright (c) 2016 Beamline Control Unit, ESRF
# Distributed under the GNU LGPLv3. See LICENSE for more info. # Distributed under the GNU LGPLv3. See LICENSE for more info.
from ..chain import AcquisitionMaster, AcquisitionChannel from ..chain import AcquisitionMaster
from bliss.common.event import dispatcher from bliss.common.event import dispatcher
from bliss.controllers import lima from bliss.controllers import lima
import gevent import gevent
......
...@@ -141,9 +141,6 @@ class AcquisitionMaster(object): ...@@ -141,9 +141,6 @@ class AcquisitionMaster(object):
@property @property
def npoints(self): def npoints(self):
return self.__npoints return self.__npoints
#@npoints.setter
# def npoints(self, npoints):
# self.__npoints = npoints
def _prepare(self): def _prepare(self):
return self.prepare() return self.prepare()
...@@ -261,9 +258,6 @@ class AcquisitionDevice(object): ...@@ -261,9 +258,6 @@ class AcquisitionDevice(object):
@property @property
def npoints(self): def npoints(self):
return self.__npoints return self.__npoints
#@npoints.setter
# def npoints(self, npoints):
# self.__npoints = npoints
def _prepare(self): def _prepare(self):
if not self._check_ready(): if not self._check_ready():
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment