-
Notifications
You must be signed in to change notification settings - Fork 44
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 a Particles class for purely longitudinal studies (without "minitracker") #326
Add a Particles class for purely longitudinal studies (without "minitracker") #326
Conversation
Signed-off-by: Szymon Łopaciuk <szymon@lopaciuk.eu>
Signed-off-by: Szymon Łopaciuk <szymon@lopaciuk.eu>
Signed-off-by: Szymon Łopaciuk <szymon@lopaciuk.eu>
Signed-off-by: Szymon Łopaciuk <szymon@lopaciuk.eu>
Signed-off-by: Szymon Łopaciuk <szymon@lopaciuk.eu>
Signed-off-by: Szymon Łopaciuk <szymon@lopaciuk.eu>
Signed-off-by: Szymon Łopaciuk <szymon@lopaciuk.eu>
Signed-off-by: Szymon Łopaciuk <szymon@lopaciuk.eu>
Signed-off-by: Szymon Łopaciuk <szymon@lopaciuk.eu>
Signed-off-by: Szymon Łopaciuk <szymon@lopaciuk.eu>
Signed-off-by: Szymon Łopaciuk <szymon@lopaciuk.eu>
tests/test_overriden_particle.py
Outdated
t = xt.Tracker(line=l, compile=False, _context=test_context) | ||
|
||
t.track(p_fixed) | ||
t.track(p) |
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.
please use:
l.build_tracker(_context=test_context)
l.track(...)
xtrack/beam_elements/apertures.py
Outdated
self.compile_kernels(particles_class=particles_class, | ||
only_if_needed=True) |
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.
This shouldn't be needed
temp_poly.impact_point_and_normal(particles_class=tracker.particles_class, | ||
x_in=na([0]), y_in=na([0]), | ||
z_in=na([0]), x_out=na([2]), | ||
y_out=na([2]), z_out=na([0])) |
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.
See above
@@ -464,6 +466,7 @@ def characterize_aperture(tracker, i_aperture, n_theta, r_max, dr, | |||
# Get a convex polygon that has vertices at all requested angles | |||
r_out = 1. # m | |||
res = temp_poly.impact_point_and_normal( | |||
particles_class=tracker.particles_class, |
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.
See above
Signed-off-by: Szymon Łopaciuk <szymon@lopaciuk.eu>
Description
Adapt xtrack to the new particles classes introduced in xsuite/xpart#73, however do not use the idea of a minitracker proposed in #312.
Replaces #312.
Checklist
Mandatory:
Optional: