diff --git a/src/calng/FrameSelectionArbiter.py b/src/calng/FrameSelectionArbiter.py index b34a660fd5872da9d4ccc9b06f1204ba56710a67..5b7ffed65c2977550da245000827ec811279c8cb 100644 --- a/src/calng/FrameSelectionArbiter.py +++ b/src/calng/FrameSelectionArbiter.py @@ -144,9 +144,6 @@ class BaseFrameSelectionArbiter(TrainMatcher.TrainMatcher): ) self._geometry = None - geom_utils.subscribe_to_geometry_bound( - self, self.get("geometryDevice"), on_geometry=self._on_geometry - ) def _guess_number_of_frames(self, sources): # TODO: robust frame deduction @@ -184,6 +181,9 @@ class SimpleFrameSelectionArbiter(BaseFrameSelectionArbiter): self._initialize_kernel( self["frameSelection.kernelChoice"], self["frameSelection.kernelParameters"] ) + geom_utils.subscribe_to_geometry_bound( + self, self.get("geometryDevice"), on_geometry=self._on_geometry + ) if self["state"] != State.ERROR: self.start() # Auto-start this type of matcher. @@ -307,6 +307,9 @@ class AdvancedFrameSelectionArbiter(BaseFrameSelectionArbiter): self._validate_plan_and_update_schema(self["frameSelection.plan"]) self._initialize_kernels() self._configure_decision(self["frameSelection.decision"]) + geom_utils.subscribe_to_geometry_bound( + self, self.get("geometryDevice"), on_geometry=self._on_geometry + ) if self["state"] != State.ERROR: self.start() # Auto-start this type of matcher. @@ -517,5 +520,5 @@ class AdvancedFrameSelectionArbiter(BaseFrameSelectionArbiter): kernel.reconfigure(conf[kernel_prefix]) def _on_geometry(self, geometry): - for kernel in self._selection_kernels.values() + for kernel in self._selection_kernels.values(): kernel.on_new_geometry(geometry)