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

Pass edge name from the Firefly energy scan plan window #297

Open
canismarko opened this issue Nov 9, 2024 · 0 comments
Open

Pass edge name from the Firefly energy scan plan window #297

canismarko opened this issue Nov 9, 2024 · 0 comments
Labels
Database These items will change how the data are stored in the database. enhancement New feature or request Firefly Issues related to the Firefly GUI system

Comments

@canismarko
Copy link
Contributor

canismarko commented Nov 9, 2024

Can the energy scan plan window pass in the name of the edge (e.g. Ni-K) instead of the E0 value itself?

The energy plan window allows you to specify E0 using an editable combobox by either typing an explicit energy (e.g. 8333.0), or by selecting a named edge from the list (e.g. Ni K (8333 eV)).

image

The energy_scan() plan creates two metadata keys: "edge" and "E0". If the plan is called as energy_scan(..., E0="Ni-K") then the metadata become:

{
    "edge": "Ni-K",
    "E0": 8333.0,
}

and if called as energy_scan(..., E0=8333.0) then the metadata are:

{
    "edge": 8333.0,
    "E0": 8333.0,
}

Since the Firefly energy_scan plan window converts the edge name to its energy value before creating the BPlan object, the latter metadata are saved.

If we modify the plan window to pass the edge name, then we get a few benefits.

  • It is clear in the run browser which element is being measured.
  • We can search the database for all Nickel edges
  • We can include these keys in the NeXuS file when exporting
@canismarko canismarko added enhancement New feature or request Firefly Issues related to the Firefly GUI system Database These items will change how the data are stored in the database. labels Nov 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Database These items will change how the data are stored in the database. enhancement New feature or request Firefly Issues related to the Firefly GUI system
Projects
None yet
Development

No branches or pull requests

1 participant