-
Notifications
You must be signed in to change notification settings - Fork 8
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
Segment by Segment - the backend #474
base: master
Are you sure you want to change the base?
Conversation
# Conflicts: # omc3/model/accelerators/lhc.py # omc3/model/model_creators/lhc_model_creator.py # omc3/model/model_creators/ps_model_creator.py # omc3/model/model_creators/psbooster_model_creator.py # omc3/model/model_creators/segment_creator.py # omc3/model_creator.py
# Conflicts: # omc3/model/accelerators/lhc.py # omc3/model/model_creators/lhc_model_creator.py # omc3/optics_measurements/constants.py
Implemented
I also decided not to implement a test that compares the SbS output from BBS with the one from omc3. The test I now implemented takes a similar approach to Tobias' original test (i.e. also how we create global correction tests), only that I create the twiss-with-errors via our omc3 model creator, and then use the fake-measurement-from-model script to create the measurement data that is then used as SbS input. This at least verifies that a) the results look reasonable and b) the propagation is identical to the fake model when the same errors are used as corrections. Missing:The following features are still missing, but as this is already a working sbs I would merge this first and add the other features later. In particular the coupling needs to be done before commissioning, but I will implement some SPS stuff first:
|
Closes #352 |
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.
Mostly extremely pedantic suggestions. Not sure I can comment on much on the actual code, but I think most of it looks like some nice improvements. Hopefully this will also make moving to xsuite easier. So, please excuse my pedantry and lacking in understanding.
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.
Nice. Big PR means big review, so there are plenty of comments but nothing major in the design / execution :)
Sbs_propagation script is a rough read with all the jumping around to function definitions due to the level of desired flexibility here (finding closest, segment extension, segment definitions and parsing etc). Maybe one day we improve on that.
Approval requires a successful demo with the GUI on top of this ;)
Reminders - to bring up in tomorrow's meeting:
- Should response_madx run with best-knowledge model? (currently commented out, uses nominal model)
- Should we normalize models on using absolute paths everywhere? (imo this is less readable in the scripts, much better for reproducibility)
- Lukas's concerns on the isolation forest (is it ticked ON by default in the GUI?)
Closes #331 |
Closes #109 |
Closes #469 |
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.
If the tests pass 👍
Code Climate has analyzed commit 2e82892 and detected 8 issues on this pull request. Here's the issue category breakdown:
The test coverage on the diff in this pull request is 82.6% (50% is the threshold). This pull request will bring the total coverage in the repository to 86.0% (-0.2% change). View more on Code Climate. |
This is the Segment-by-Segment algorithm as envisioned by @jaimecp89.
In this state it should contain the same functionality as the SbsPhaseAdvance (#308) branch, but lacks a test, some doc-strings and some cleanup.
Advantages:
Propagable
object to add a parameter, which can then be just added to the loop.Caveats: (i.e. breaking backwards compatibility with BB.src SbS)
ini_r##
andend_r##
tor##_ini
andr##_end
(as all the other parameters)front
(or omission of it) toforward
andback
tobackward
everywherefull_run
function andpost_run
function for checksTodo:
segment_by_segment.py
to main folder.segment_by_segment/matcher
andsbs_matcher.py
to new branch (accounts for a lot of changed files, make new issue to adapt it to python3)From Tobias :