Add bunch monitor for longitudinal coordinates#504
Draft
eccortes95 wants to merge 6 commits intoxsuite:mainfrom
Draft
Add bunch monitor for longitudinal coordinates#504eccortes95 wants to merge 6 commits intoxsuite:mainfrom
eccortes95 wants to merge 6 commits intoxsuite:mainfrom
Conversation
Contributor
Author
|
@eltos I added a carbon copy of your monitor, only with the longitudinal coordinates. Is there any setter in xtrack for the revolution frequency ? |
Member
|
I think the python file got mixed up with the h-file. Can you set this PR to draft for time being? |
eltos
reviewed
Jun 12, 2024
| double const beta0 = LocalParticle_get_beta0(part); | ||
|
|
||
| // compute sample index | ||
| int64_t slot = round( harmonic * ( (at_turn-start_at_turn) - frev * zeta/beta0/C_LIGHT )); |
Member
There was a problem hiding this comment.
I'm thinking maybe you could use the circumference line.get_length() instead to simplify the slot calculation.
In principle, the zeta correction is not required if the monitor is only used for bunched beams and h≥1. But I think it's good to keep to properly handle RF gymnastics like de- and re-bunching.
Contributor
Author
There was a problem hiding this comment.
I agree, maybe it could be useful in the future.
Bunch monitor
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Description
Closes # .
Checklist
Mandatory:
Optional: