def scan(self, tracker: Tracker, sequence: Sequence): results = self.workspace.results(tracker, self, sequence) files = [] complete = True for i in range(1, self._repetitions + 1): name = "%s_%03d" % (sequence.name, i) if Trajectory.exists(results, name): files.extend(Trajectory.gather(results, name)) elif self._can_stop(tracker, sequence): break else: complete = False break return complete, files, results
def scan(self, tracker: Tracker, sequence: Sequence): files = [] complete = True results = self.results(tracker, sequence) forward, backward = find_anchors(sequence, self.anchor) if len(forward) == 0 and len(backward) == 0: raise RuntimeError("Sequence does not contain any anchors") for i in forward + backward: name = "%s_%08d" % (sequence.name, i) if Trajectory.exists(results, name): files.extend(Trajectory.gather(results, name)) else: complete = False return complete, files, results