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

Parameter presets for improved user-friendliness #37

Open
jacione opened this issue Nov 13, 2024 · 5 comments
Open

Parameter presets for improved user-friendliness #37

jacione opened this issue Nov 13, 2024 · 5 comments

Comments

@jacione
Copy link
Contributor

jacione commented Nov 13, 2024

Having some "preset" keys in the configuration files might make cohere more approachable for non-experts. For example, instead of

shrink_wrap_trigger = [1, 1]
shrink_wrap_type = "GAUSS"
shrink_wrap_threshold = 0.15
shrink_wrap_gauss_sigma = 1.0

you could just put

shrink_wrap_preset = "standard"

The config loader would see that, pull the relevant parameters from a dictionary, and save them into the configuration object and conf_rec (or whichever file they were in). That way, you could still open conf_rec and see all the actual parameters.

For the GUI, this would probably be best as a drop-down menu. When a preset is selected, it would trigger the relevant input boxes to update with the values from that preset.

As usual, I'm happy to tack this onto the list of things I might eventually get to.

@jacione
Copy link
Contributor Author

jacione commented Nov 13, 2024

I'm particularly thinking of some of the multipeak features, which are getting increasingly parameter-heavy.

@brussel13
Copy link
Contributor

brussel13 commented Nov 13, 2024 via email

@bfrosik
Copy link
Contributor

bfrosik commented Nov 14, 2024

That would be another issue. I can add an issue of creating an example beamline, very simple, with instructions how to modify it for the needs. Or would you like to add it?

@bfrosik
Copy link
Contributor

bfrosik commented Nov 14, 2024

Addressing the different types of shrink wrap, I believe we do not have to worry about number of parameters as long as we document it. There is a parameter in shrink wrap "type" that will define what parameters are needed. I can modify the GUI to change the layout with parameters depending on type. It was a TODO but as there wasn't a request, it was sitting on.

@jacione
Copy link
Contributor Author

jacione commented Nov 14, 2024

The gui already has a defaults button for most of the features.

I was thinking of this as being a little broader than just default values. There would be several presets for a given feature. Reusing the shrinkwrap example, you could have something like:

shrinkwrap_presets = {
  "aggressive": {
    "shrink_wrap_trigger": [1, 1],
    "shrink_wrap_type": "GAUSS",
    "shrink_wrap_threshold": 0.3,
    "shrink_wrap_gauss_sigma": 2.0
  },
  "tight": {
    "shrink_wrap_trigger": [1, 1],
    "shrink_wrap_type": "GAUSS",
    "shrink_wrap_threshold": 0.2,
    "shrink_wrap_gauss_sigma": 1.0
  },
  "default": {
    "shrink_wrap_trigger": [1, 1],
    "shrink_wrap_type": "GAUSS",
    "shrink_wrap_threshold": 0.1,
    "shrink_wrap_gauss_sigma": 1.0
  },
  "gentle": {
    "shrink_wrap_trigger": [2, 2],
    "shrink_wrap_type": "GAUSS",
    "shrink_wrap_threshold": 0.1,
    "shrink_wrap_gauss_sigma": 2.0
  },
  "permissive": {
    "shrink_wrap_trigger": [3, 3],
    "shrink_wrap_type": "GAUSS",
    "shrink_wrap_threshold": 0.05,
    "shrink_wrap_gauss_sigma": 2.5
  }
}

Maybe shrinkwrap is a bad example since the parameter space is relatively small. Some of the other features---GA and adaptive multipeak come to mind---have a very open-ended configuration space, much of which is largely useless. For example, you probably shouldn't cull all of your GA individuals on the first generation, but you could. That mistake is obvious to someone who knows how genetic algorithms work, but completely opaque otherwise.

My point is this: Cohere should be easy to use without understanding everything going on under the hood. And for the most part, I really think it is (especially compared to other BCDI packages). But I suspect that having some easy-to-understand presets would allow non-expert users to use the software more independently.

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

3 participants