Skip to content

Conversation

JoschD
Copy link
Member

@JoschD JoschD commented May 23, 2025

Local copy of #515

@JoschD JoschD requested a review from a team as a code owner May 23, 2025 15:23
@JoschD JoschD added Type: Feature A (suggetion for a) new feature or enhancement in functionality. Domain: GUI Closely related to GUI and/or needs GUI changes as well. Type: Maintenance Improvements in the code, that are not necessarily visible in functionality. Priority: Medium Work on this. Domain: Physics The implementation is closely related to new physics to be used. Estimate: Normal Straightforward, but might require some time. Probably needs additional tests. labels May 23, 2025
@JoschD JoschD moved this to Todo in OMC ToDo 2025 Aug 1, 2025
@JoschD JoschD removed this from OMC ToDo 2025 Aug 1, 2025
Yannis Angelis added 3 commits August 13, 2025 17:14
@yangelis yangelis force-pushed the yangelis_dispersion_fix branch from 8c26237 to f04eb9e Compare August 19, 2025 13:10
Copy link

github-actions bot commented Aug 19, 2025

☂️ Python Coverage

current status: ✅

Overall Coverage

Lines Covered Coverage Threshold Status
11584 10028 87% 80% 🟢

New Files

No new covered files...

Modified Files

File Coverage Status
omc3/_init_.py 100% 🟢
omc3/optics_measurements/constants.py 100% 🟢
omc3/scripts/fake_measurement_from_model.py 99% 🟢
omc3/segment_by_segment/propagables/init.py 100% 🟢
omc3/segment_by_segment/propagables/dispersion.py 89% 🟢
omc3/segment_by_segment/segments.py 88% 🟢
TOTAL 96% 🟢

updated for commit: 19f39dc by action🐍

Yannis Angelis added 3 commits August 19, 2025 16:05
- Include only dispersion files, since now they include dpx,dpy so that
can be extracted for the initial conditions of sbs
@yangelis
Copy link

A few things about the dispersion propagation. The initial sbs implementation was not using DPX ,DPY from measurements to the start and end for the sbs propagation. This is solved by creating a new Propagable (DispersionMomentum). In BBsrc, dpx, dpy are also written in the sbs_dispersion files, but here it was easier to write everything to separate files (e.g. sbs_dispersion_dpx.tfs).

Regarding the tests, fake measurements now include dpx, its errors, etc in the dispersion files, so that can be used correctly in the propagation tests.

@fsoubelet fsoubelet self-requested a review August 21, 2025 09:46
Copy link
Member

@fsoubelet fsoubelet left a comment

Choose a reason for hiding this comment

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

Looking nice. I'd prefer to see the propagable renamed to its physics name, aka MomentumDispersion.

Might also be worth defining MOMENTUM: str = "P" in the constants to avoid hardcoding everywhere. Up to discussion @JoschD.

@JoschD
Copy link
Member Author

JoschD commented Aug 21, 2025

Looking nice. I'd prefer to see the propagable renamed to its physics name, aka MomentumDispersion.

Might also be worth defining MOMENTUM: str = "P" in the constants to avoid hardcoding everywhere. Up to discussion @JoschD.

I agree to the first. For the second, I would go one step further (or back?) and make the whole string a constant: MOMENTUM_DISPERSION: str = "DP"

@yangelis
Copy link

Summarizing a bit the last commits:

  • using MOMENTUM_DISPERSION and MOMENTUM_DISPERSION_NAME as suggested
  • Using Series(np.nan, index=...) for the errors
  • Momentum dispersion calculated for sbs correction
  • Momentum dispersion is now tested

@JoschD
Copy link
Member Author

JoschD commented Aug 26, 2025

Looks good to me now!
But I cannot approve, as I made this PR ^^

@JoschD
Copy link
Member Author

JoschD commented Aug 26, 2025

@yangelis you need to re-request the review from Felix, when you are done

@yangelis yangelis requested a review from fsoubelet August 26, 2025 09:00
fsoubelet
fsoubelet previously approved these changes Aug 26, 2025
Copy link
Contributor

@jgray-19 jgray-19 left a comment

Choose a reason for hiding this comment

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

Looks pretty good to me, although maybe one day, could have this inherit off of dispersion?

@JoschD JoschD merged commit b680964 into master Aug 26, 2025
35 checks passed
@JoschD JoschD deleted the yangelis_dispersion_fix branch August 26, 2025 14:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Domain: GUI Closely related to GUI and/or needs GUI changes as well. Domain: Physics The implementation is closely related to new physics to be used. Estimate: Normal Straightforward, but might require some time. Probably needs additional tests. Priority: Medium Work on this. Type: Feature A (suggetion for a) new feature or enhancement in functionality. Type: Maintenance Improvements in the code, that are not necessarily visible in functionality.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants