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

Changes to the Measurable/Collector proposal #24

Open
markus-zolliker opened this issue Jan 27, 2025 · 0 comments
Open

Changes to the Measurable/Collector proposal #24

markus-zolliker opened this issue Jan 27, 2025 · 0 comments

Comments

@markus-zolliker
Copy link
Contributor

I am working on an implementation, where I want to use the Measurable (or Collector, but I keep Measurable in the text below).

It is an ultrasound device which needs time to get a result. The result is a tuple of two floats (physically it is a complex number). In a simple approach it measures just a preconfigured amount of cycles, so I do not need a 'preset'.

I have a Measurable, with the result as its main value. I start with 'go' and wait for not long busy, then I retrieve the value.

For this simple case I do not need a 'preset', so I doubt that the condition "at least one channel MUST have a preset" is needed.

Proposition: discard the condition: "at least one channel MUST have a preset."

Now I can extend the example with a preset, indicating how many times the measurement should happen for getting a better statistics by averaging. In a simple case, I might use just a parameter for this, but there is not relation between the main value and the preset - so I am not sure if I still can use one single module. If I make a separate one, I need in fact 3 modules: controller, measurement and counter.
The measurement obviously has not preset. The counter has one, but it does not need 'use_preset', because it is the only meaningful preset.
The specs says: "use_preset: Optional (but must be there when preset is)"

Proposition: discard the condition: "use_preset must be there when preset is"

Also: would it not make sense to unify in this case the main measurement value (MeasurableChannel) with the controller to a single module? From the spec I read, that 'Measurable' is for the case, where we have only one channel - but it is not strictly clear about this.

The next question is more implementation specific to NICOS: here the presets have names, for example 't' for time. How can I automatically assign the measurable channels to these names? We might use the module names, so 't' in nicos would correspond to the preset parameter of SECoP module 't'. But how to call the preset, when using a unified 'Measurable'? Would it not make sense to let the implementer choose the name of the preset according to its meaning, and add a property to indicate which one of the parameters is the preset?

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

No branches or pull requests

1 participant