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

Energy widgets #219

Merged
merged 23 commits into from
Jun 29, 2024
Merged

Energy widgets #219

merged 23 commits into from
Jun 29, 2024

Conversation

canismarko
Copy link
Contributor

Refactor of the energy positioner. Waiting on real hardware controls to be available.

canismarko and others added 20 commits May 17, 2024 12:08
Not all of them do anything, though.
To get fixed asyncio application launcher.
Needed to get proper asyncio application launcher.
Doesn't work yet, we still need to test against real hardware once the
EPICS controls are available again.
The Component needs the *derived_signal* argument to be a keyword
argument. Otheerwise the prefix gets appended to it."
Previously, we gave *derived_from* as a positional argument, which
caused it to have the device prefix prepended and then fail to find
the derived from attribute.

Also updated the energy window with the correct signals, and removed
unused code.
Needed to remove the ``put_complete=1`` attribute on
UndulatorPositioner.
@canismarko
Copy link
Contributor Author

Checked using the 25-ID DS undulator. Ready for review.

@@ -22,12 +59,20 @@ class EnergyDisplay(display.FireflyDisplay):
"background: rgb(220, 53, 69); color: white; border-color: rgb(220, 53, 69)"
)
stylesheet_normal = ""
energy_positioner = None
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For line 56 and 57, the max and min energy for Si (111) is from 4 to 40 keV, for ML it is 5~22 depending on the gap? Should we distinguish ML from (111) here?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I will re-write this to get the min/max values from the monochromator.

Eventually, we will also need a check when setting the energy to ensure it's within range for the mono/ID/2° mono.

For now, we'll use 5 -- 38keV for 25-ID.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I decided to derive the range of valid energies from the limits on the setpoint of the mono energy and ID energy. This way, we can set those values properly in EPICS and everything just kind of works.

Right now the range is 10 eV to 35000 eV, which is wrong, but it's wrong because the limits are not set properly. The current limits are:

  • mono: 0 ev to 35,000 eV
  • undulator: 0.01 keV to 100 keV

@canismarko canismarko merged commit 31f61a1 into main Jun 29, 2024
@canismarko canismarko deleted the energy_widgets branch June 29, 2024 18:38
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

Successfully merging this pull request may close these issues.

2 participants