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

Send *E0* edge names from the xafs_scan plan window #367

Open
canismarko opened this issue Feb 5, 2025 · 0 comments
Open

Send *E0* edge names from the xafs_scan plan window #367

canismarko opened this issue Feb 5, 2025 · 0 comments
Assignees
Labels
enhancement New feature or request

Comments

@canismarko
Copy link
Contributor

Description of the feature

If the selected edge is e.g. "Ni_K (8333 eV)", the plan that gets sent has E0=8333. The energy_scan plan can also accept the edge name ("Ni_K"). The display should send the name if it is available.

Requirements

  1. queue_plan should parse the energy_combobox current text
  2. If an edge name is present (e.g. "Ni-K"), then the plan should have E0 = "Ni-K".
  3. If no edge name is present, then the text should be converted to a float and passed to E0.
  4. If neither 2 or 3 are valid, then style the combobox as invalid (or some other feedback).

Suggested Solution

Two options:

  1. Parse the combobox text using a regular expression (e.g. [A-Za-z]{1,2}[-_ ][K-N]\d*)
  2. Add the energy and name along with the edge text for each item in the combobox, then read them back out when creating the plan.

Justification

If we include the name, then the plan will include the name in the metadata, and downstream tools can use it. For example, it will be included in the XDI file.

Additional context

@canismarko canismarko added the enhancement New feature or request label Feb 5, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants