Currently, the repeat index is tracked in a field in SensorCapture. This adds little new information but leads to buffer misses in helper functions that use lru_cache. Further, the logic for determining sweep_start_time, which depends on this index, is currently housed in SourceBase, which seems like the wrong scope.
Instead, we can special-case specs.Repeat.get_points to return some sentinel like None. Then, iter_sweep can implement the outer sweep loop, and set sweep_start_time (and maybe a sweep index?) itself.
Currently, the repeat index is tracked in a field in
SensorCapture. This adds little new information but leads to buffer misses in helper functions that uselru_cache. Further, the logic for determiningsweep_start_time, which depends on this index, is currently housed inSourceBase, which seems like the wrong scope.Instead, we can special-case
specs.Repeat.get_pointsto return some sentinel likeNone. Then,iter_sweepcan implement the outer sweep loop, and setsweep_start_time(and maybe a sweep index?) itself.