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

Proposal: Script access to improved config groups #79

Open
nanthony21 opened this issue Nov 17, 2019 · 4 comments
Open

Proposal: Script access to improved config groups #79

nanthony21 opened this issue Nov 17, 2019 · 4 comments

Comments

@nanthony21
Copy link

I’m working on a plugin where I would like to use config groups to abstract out some of the hardware specifics. However I have realized that unlike in the MMStudio UI, in CMMCore there is only handling for config groups with finite presets denoted by a String name.

Handling of config groups with continuous ranges of float or int values is actually done right in the user interface code:

I think that it makes sense to have access to this augmented config group handling from the Studio interface, but I wanted to see if such an addition to Studio would be accepted before working on it. Any feedback is welcome.

Thanks,
Nick

@marktsuchida
Copy link

@nanthony21 I would certainly love to see improvement in the handling of single-property configuration groups. This was always a hack in the GUI.

I guess the question is what access to provide. Perhaps the simplest would be a boolean method that returns true when the given group should be treated as a numeric range -- so that code that is aware of this feature can special-case such groups. A common use case might be to simply exclude such groups from processing. For example, the Channel Group selection should probably do this, as single-property range groups are never used as the channel group (I hope).

Perhaps you had other ideas?

The only important constraint I can think of is that the meaning of existing .cfg files should not change, but it doesn't sound like you are thinking of a change at that level.

There are other issues with the special handling of these groups. The major one is that sometimes the user wants a normal config group with a single numerical property and specify a set of discrete values. For example, I might have a laser power property that allows 0 to 100% but want to standardize my experiments to 25%, 50%, and 100% power. Right now the only way to achieve this (from the GUI at least) is to include a second, unchanging/irrelevant property as a workaround. But it would be nice to leave room for improving this in the future. (It might be possible to create such a group by manually editing the .cfg file -- I haven't checked.)

@nanthony21
Copy link
Author

I guess the first thing to decide is at what level this change should be made.

At the MMStudio Java level I think the org.micromanager.internal.utils.PropertyItem class already provides most of the needed functionality it just needs to be made accessible from the Studio interface and maybe expanded on a little bit.

Making this change at the CMMCore level might make more sense in the long-run but would probably be a lot more work to make sure it doesn't cause problems.

@marktsuchida
Copy link

@nanthony21 I agree. Happy to review anything you propose for MMStudio.

@nanthony21
Copy link
Author

@marktsuchida Ok, when I find the time I'll plan on making an attempt at adding this to MMStudio, I'd rather not dig into CMMCore right now.

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

2 participants