-
Notifications
You must be signed in to change notification settings - Fork 12
Use config server for undulator config #1768
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
Open
jacob720
wants to merge
4
commits into
main
Choose a base branch
from
mx_bluesky_1494_use_config_server_for_undulator
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
4 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
48 changes: 23 additions & 25 deletions
48
tests/devices/test_daq_configuration/lookup/BeamLineEnergy_DCM_Pitch_converter.txt
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,25 +1,23 @@ | ||
| # Bragg pitch | ||
| # Degree values for pitch are interpreted as mrad | ||
| # The values cannot change direction. | ||
| # last update 2023/06/26 NP | ||
| Units Deg mrad | ||
| Units Deg Deg | ||
| 19.24347 -0.79775 | ||
| 16.40949 -0.78679 | ||
| 14.31123 -0.77838 | ||
| 12.69287 -0.77276 | ||
| 11.40555 -0.77276 | ||
| 10.35662 -0.77031 | ||
| 9.48522 -0.76693 | ||
| 8.95826 -0.76387 | ||
| 8.74953 -0.76387 | ||
| 8.12020 -0.76387 | ||
| 7.57556 -0.76354 | ||
| 7.09950 -0.76166 | ||
| 6.67997 -0.76044 | ||
| 6.30732 -0.75953 | ||
| 5.97411 -0.75845 | ||
| 5.67434 -0.75796 | ||
| 5.40329 -0.75789 | ||
| 5.15700 -0.75551 | ||
| 4.93218 -0.75513 | ||
| { | ||
| "rows": [ | ||
| [19.24347, -0.79775], | ||
| [16.40949, -0.78679], | ||
| [14.31123, -0.77838], | ||
| [12.69287, -0.77276], | ||
| [11.40555, -0.77276], | ||
| [10.35662, -0.77031], | ||
| [9.48522, -0.76693], | ||
| [8.95826, -0.76387], | ||
| [8.74953, -0.76387], | ||
| [8.1202, -0.76387], | ||
| [7.57556, -0.76354], | ||
| [7.0995, -0.76166], | ||
| [6.67997, -0.76044], | ||
| [6.30732, -0.75953], | ||
| [5.97411, -0.75845], | ||
| [5.67434, -0.75796], | ||
| [5.40329, -0.75789], | ||
| [5.157, -0.75551], | ||
| [4.93218, -0.75513] | ||
| ] | ||
| } |
12 changes: 6 additions & 6 deletions
12
tests/devices/test_daq_configuration/lookup/BeamLineEnergy_DCM_Roll_converter.txt
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,6 +1,6 @@ | ||
| #Bragg angle against roll( absolute number) | ||
| #reloadLookupTables() | ||
| # last update 2023/01/19 NP | ||
| Units Deg mrad | ||
| 26.4095 -0.2799 | ||
| 6.3075 -0.2799 | ||
| { | ||
| "rows": [ | ||
| [26.4095, -0.2799], | ||
| [6.3075, -0.2799] | ||
| ] | ||
| } |
114 changes: 54 additions & 60 deletions
114
tests/devices/test_data/test_beamline_undulator_to_gap_lookup_table.txt
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,60 +1,54 @@ | ||
| ####################### | ||
| # # | ||
| # 5.5mm CPMU 20/11/22 # | ||
| # # | ||
| ####################### | ||
| # Used to convert from energy to gap. Constructed from tables for 3rd, 5th and 7th harmonic. | ||
| # It is important that at the point of change from one harmonic to another that there is | ||
| # point for the same energy from both harmomics to prevent invalid interpolation. | ||
| # run reloadLookupTables() when done | ||
| Units eV mm | ||
| 5700 5.4606 | ||
| 5760 5.5 | ||
| 6000 5.681 | ||
| 6500 6.045 | ||
| 7000 6.404 | ||
| 7500 6.765 | ||
| 8000 7.124 | ||
| 8500 7.491 | ||
| 9000 7.872 | ||
| 9500 8.258 | ||
| 9700 8.424 | ||
| 9700 5.542 | ||
| 10000 5.675 | ||
| 10500 5.895 | ||
| 11000 6.113 | ||
| 11500 6.328 | ||
| 12000 6.545 | ||
| 12500 6.758 | ||
| 12700 6.843 | ||
| 13000 6.98 | ||
| 13443 7.168 | ||
| 13443 5.5 | ||
| 13500 5.517 | ||
| 14000 5.674 | ||
| 14500 5.831 | ||
| 15000 5.987 | ||
| 15500 6.139 | ||
| 16000 6.294 | ||
| 16500 6.447 | ||
| 17000 6.603 | ||
| 17320 6.697 | ||
| 17320 5.5 | ||
| 17500 5.552 | ||
| 18000 5.674 | ||
| 18500 5.794 | ||
| 19000 5.912 | ||
| 19500 6.037 | ||
| 20000 6.157 | ||
| 20500 6.277 | ||
| 20939 6.378 | ||
| 20939 5.5 | ||
| 21000 5.517 | ||
| 21500 5.577 | ||
| 22000 5.674 | ||
| 22500 5.773 | ||
| 23000 5.871 | ||
| 23500 5.97 | ||
| 24000 6.072 | ||
| 24500 6.167 | ||
| 25000 6.264 | ||
| { | ||
| "rows": [ | ||
| [5700, 5.4606], | ||
| [5760, 5.5], | ||
| [6000, 5.681], | ||
| [6500, 6.045], | ||
| [7000, 6.404], | ||
| [7500, 6.765], | ||
| [8000, 7.124], | ||
| [8500, 7.491], | ||
| [9000, 7.872], | ||
| [9500, 8.258], | ||
| [9700, 8.424], | ||
| [9700, 5.542], | ||
| [10000, 5.675], | ||
| [10500, 5.895], | ||
| [11000, 6.113], | ||
| [11500, 6.328], | ||
| [12000, 6.545], | ||
| [12500, 6.758], | ||
| [12700, 6.843], | ||
| [13000, 6.98], | ||
| [13443, 7.168], | ||
| [13443, 5.5], | ||
| [13500, 5.517], | ||
| [14000, 5.674], | ||
| [14500, 5.831], | ||
| [15000, 5.987], | ||
| [15500, 6.139], | ||
| [16000, 6.294], | ||
| [16500, 6.447], | ||
| [17000, 6.603], | ||
| [17320, 6.697], | ||
| [17320, 5.5], | ||
| [17500, 5.552], | ||
| [18000, 5.674], | ||
| [18500, 5.794], | ||
| [19000, 5.912], | ||
| [19500, 6.037], | ||
| [20000, 6.157], | ||
| [20500, 6.277], | ||
| [20939, 6.378], | ||
| [20939, 5.5], | ||
| [21000, 5.517], | ||
| [21500, 5.577], | ||
| [22000, 5.674], | ||
| [22500, 5.773], | ||
| [23000, 5.871], | ||
| [23500, 5.97], | ||
| [24000, 6.072], | ||
| [24500, 6.167], | ||
| [25000, 6.264] | ||
| ] | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am not sure if this hardcoded config server is a good solution long term. I understand that it works fine now, but what if for some reason you need to divert your config server to a different endpoint - you would have to change the path here.
It feels like we need some king of an interface or a lookuptable provider which should probably be configured separately.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Snap! I think my comment at #1773 (comment) is basically the same thing. I think we should define it in the
ixx.pyfiles like we do for e.g. a path providerThere was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yep, agreed - in an even broader perspective I don't think we should need daq-config-server as a dependency - but that's for later development DiamondLightSource/daq-config-server#157