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

How do we deal with devices that need configuration to initialise #54

Open
DominicOram opened this issue May 15, 2023 · 1 comment
Open
Labels
enhancement New feature or request python Pull requests that update Python code question Further information is requested

Comments

@DominicOram
Copy link
Contributor

Currently the ApertureScatterguard and the Eiger devices need to be passed a set of parameters to be valid devices. This is done by doing something like the following:

def eiger(params: Optional[Parameters] = None):
    eiger = EigerDetector(...)
    if params is not None:
        eiger.set_params(params)
    return eiger

This causes issues as it's easy to make an invalid Eiger that has no parameters. Instead it would be nicer to do one of the following:

  1. Require parameters to be set when instantiating the device - this then make it very hard to easily create all devices on the beamline
  2. Have some method of getting a good default set of parameters - this opens up cans of worms around proper storage of configurations. e.g. do we have a configuration service that dodal will interrogate when trying to initialise a device?
@stan-dot
Copy link
Contributor

relevant to #483

thoughts @coretl , @DominicOram ?

@stan-dot stan-dot added enhancement New feature or request question Further information is requested python Pull requests that update Python code labels Sep 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request python Pull requests that update Python code question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants