def setup(self, registrar: PartRegistrar) -> None: super().setup(registrar) # Hooks registrar.hook(scanning.hooks.ReportStatusHook, self.on_report_status) registrar.hook(scanning.hooks.ValidateHook, self.on_validate) registrar.hook( scanning.hooks.ConfigureHook, self.on_configure, self.configure_args_with_exposure, ) registrar.hook( scanning.hooks.SeekHook, self.on_seek, self.configure_args_with_exposure, ) registrar.hook(scanning.hooks.RunHook, self.on_run) registrar.hook(scanning.hooks.PostRunArmedHook, self.on_post_run_armed) registrar.hook((scanning.hooks.PauseHook, scanning.hooks.AbortHook), self.on_abort) # Attributes registrar.add_attribute_model("attributesToCapture", self.extra_attributes, self.set_extra_attributes) # Tell the controller to pass "exposure" and "frames_per_step" to configure info = scanning.infos.ConfigureParamsInfo( metas=dict(frames_per_step=NumberMeta.from_annotype( ADetectorFramesPerStep, writeable=False), ), required=[], defaults=dict(frames_per_step=1), ) registrar.report(info)
def setup(self, registrar: PartRegistrar) -> None: super().setup(registrar) # Validate hook for exposure time registrar.hook(scanning.hooks.ValidateHook, self.on_validate) # Attributes registrar.add_attribute_model("exposure", self.exposure) # Tell the controller to pass "exposure" and "frames_per_step" to configure info = scanning.infos.ConfigureParamsInfo( metas=dict( exposure=NumberMeta.from_annotype(scanning.hooks.AExposure, writeable=True), frames_per_step=NumberMeta.from_annotype(AFramesPerStep, writeable=False), ), required=[], defaults=dict(exposure=0.0, frames_per_step=1), ) registrar.report(info)
def setup(self, registrar: PartRegistrar) -> None: super().setup(registrar) # Attributes registrar.add_attribute_model("exposure", self.exposure) # Tell the controller to pass "exposure" to configure info = scanning.infos.ConfigureParamsInfo( metas=dict(exposure=NumberMeta.from_annotype( scanning.hooks.AExposure, writeable=True)), required=[], defaults=dict(exposure=0.0), ) registrar.report(info)