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

Segment by Segment - the backend #474

Draft
wants to merge 59 commits into
base: master
Choose a base branch
from
Draft

Conversation

JoschD
Copy link
Member

@JoschD JoschD commented Nov 22, 2024

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:

  • Separated model creation, segment input and segment-by-segment propagation
  • Object Oriented:
    • One only needs to add a Propagable object to add a parameter, which can then be just added to the loop.
    • Highly shared functionality between parameters
  • Uses the Optics-Measurements TfsCollection
  • Allows for Element-Segments as input (see next point)
  • Finds BPMs around from model

Caveats: (i.e. breaking backwards compatibility with BB.src SbS)

  • Standardized and simplified output names
  • Standardized ini_r## and end_r## to r##_ini and r##_end (as all the other parameters)
  • Renamed front (or omission of it) to forward and back to backward everywhere
  • Some changes in the Model Creation
    • some paths (model-dir)
    • call-logic: see full_run function and post_run function for checks

Todo:

  • Move segment_by_segment.py to main folder.
  • move the segment_by_segment/matcher and sbs_matcher.py to new branch (accounts for a lot of changed files, make new issue to adapt it to python3)
  • remove debug logging
  • Add Test (see text from Tobias below)
  • Add doc-strings and type-hints
  • Test with segment-by-segment GUI from omc3-gui package

From Tobias :

I put an example to start testing the sbs on my work public /afs/cern.ch/work/t/tpersson/public/forSBStest_ACdipole/

There are some files also to generate other tracking but the important just to test the SBS are the files in the measured optics such as total_phase_x.tfs etc. You can compare the result to the output in sbs folder there. The starting point used were:

BPM.12L1.B1
BPM.12R1.B1

And the correction used for the sbs is in the file: sbs/corrections_IP1.madx

The modifier used was the opticsfile.22.

This is a good first test but then the error propagation also needs to be checked. For my version I checked this by analyzing files from Beta-Beat.src and then compared it to the OMC3 with the option beta-beat.src “names”.

tpersson and others added 30 commits July 6, 2021 11:08
# 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
@JoschD JoschD added Type: Feature A (suggetion for a) new feature or enhancement in functionality. Priority: Medium Work on this. Domain: Physics The implementation is closely related to new physics to be used. Estimate: Complicated Might need some major overhaul of the code. labels Nov 22, 2024
@JoschD JoschD self-assigned this Nov 22, 2024
This was referenced Nov 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Domain: Physics The implementation is closely related to new physics to be used. Estimate: Complicated Might need some major overhaul of the code. Priority: Medium Work on this. Type: Feature A (suggetion for a) new feature or enhancement in functionality.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants