Fixed obscure bug where number of scan states becomes less than number of scan indices in a ConcatenatedDataSet. Ever since r13750 a scan may be split by a compscan label which results in duplicate scan states. Since the allow_repeats sensor property is False by default, the ConcatenatedSensorCache throws away the duplicate events. The scans() iterator assumes that the number of scan states == the number of scans, however, and fails with an IndexError on e.g. 1340003495.h5. The adopted solution sets allow_repeats to True on this sensor. Please note the underlying activity sensor still has allow_repeats = False for proper consolidation of underlying scan states. Another solution would have been to remove the assumption that # of scan states == # of scans in scans(), but that would have been more code.
Fixed obscure bug where number of scan states becomes less than number of scan indices in a ConcatenatedDataSet. Ever since r13750 a scan may be split by a compscan label which results in duplicate scan states. Since the allow_repeats sensor property is False by default, the ConcatenatedSensorCache throws away the duplicate events. The scans() iterator assumes that the number of scan states == the number of scans, however, and fails with an IndexError on e.g. 1340003495.h5. The adopted solution sets allow_repeats to True on this sensor. Please note the underlying activity sensor still has allow_repeats = False for proper consolidation of underlying scan states. Another solution would have been to remove the assumption that # of scan states == # of scans in scans(), but that would have been more code.

git-svn-id: 88c9ca70625627825018ef89be83f0d41a8e4cf1@14335 b56c7a7d-ac47-0410-a905-b6f7de78896a

ska-sa/katdal