Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add initial orchestrators idea #1168

Closed
wants to merge 1 commit into from
Closed

Add initial orchestrators idea #1168

wants to merge 1 commit into from

Conversation

marcomontevechi1
Copy link

@marcomontevechi1 marcomontevechi1 commented Oct 23, 2023

Im not sure if the general ideia fits in ophyd scope, but this is an initial attempt.
The idea is to have abstractions to perform tasks that are possibly frequent to the plugins and drivers, but not basic enough to be put in the initial plugin/driver abstractions. For example, a common method to configure a grid of peaks in SimDetector or one to define how to average images in processPlugin.

I wanted to set a default behavior in the method but in a way that default parameter values could be overriden by an user who knows what they are doing.

Unfortunately, the only way i could come up to do this was by manually coding the properties as possible keys to kwargs (eg. line 22 in ProcessPluginOrchestrator). I tried dynamically checking if any argument in kwargs was equal to one of the component_names but for that i needed to use something like getattr(self.cam, component_name).put() and for some reason that didnt work.

I appreciate any feedback.

Im not sure if the general ideia fits in ophyd scope, but this is an
initial attempt.
The idea is to have abstractions to perform tasks that are possibly
frequent to the plugins and drivers, but not basic enough to be put
in the initial plugin/driver abstractions. For example, a common
method to configure a grid of peaks in SimDetector or to one to
define how to average images in processPlugin.

I wanted to set a default behavior in the method but in a way that
parameter default values could be overriden by an user who knows what
they are doing.

Unfortunately, the only way i could come up to do this was by manually
coding the properties as possible keys to kwargs (eg. line 22 in
ProcessPluginOrchestrator). I tried dynamically checking if any argument in
kwargs was equal to one of the component_names but for that i needed to
use something like getattr(self.cam, component_name).put() and for some
reason that didnt work.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants