-
Notifications
You must be signed in to change notification settings - Fork 45
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
Add bunch monitor for longitudinal coordinates #504
base: main
Are you sure you want to change the base?
Conversation
@eltos I added a carbon copy of your monitor, only with the longitudinal coordinates. Is there any setter in xtrack for the revolution frequency ? |
I think the python file got mixed up with the h-file. Can you set this PR to draft for time being? |
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 )); |
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'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.
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 agree, maybe it could be useful in the future.
Bunch monitor
Description
Closes # .
Checklist
Mandatory:
Optional: