You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I encountered an issue where Solenoid elements inside a Segment behave like Quadrupoles when using plot_overview().
In the following basic example, particles are transported through a Solenoid magnet, but the resulting plot seems to apply quadrupole transportation.
Thanks,
the plot_overview should take the incoming beam upstream of the section, so in your MWE, the line segment_single.plot_overview(incoming=outgoing_beam)
should be segment_single.plot_overview(incoming= beam_twiss).
The visualization error for the solenoid is also due to the split method being not implemented yet.
Hi,
I encountered an issue where Solenoid elements inside a Segment behave like Quadrupoles when using plot_overview().
In the following basic example, particles are transported through a Solenoid magnet, but the resulting plot seems to apply quadrupole transportation.
Thanks,
beam_twiss = ParticleBeam.from_twiss(
num_particles=torch.tensor(10_000_000),
beta_x=torch.tensor(5.912),
alpha_x=torch.tensor(1.0),
emittance_x=torch.tensor(3.494e-09),
beta_y=torch.tensor(5.912),
alpha_y=torch.tensor(1.0),
emittance_y=torch.tensor(3.494e-09),
energy=torch.tensor(6e6),)
single_sol = Solenoid(length=torch.tensor(0.5), k=torch.tensor(1.5))
segment_single = Segment(elements=[
Drift(length=torch.tensor(0.5)),
single_sol,
Drift(length=torch.tensor(0.5)),
])
outgoing_beam = segment_single.track(beam_twiss)
segment_single.plot_overview(incoming=outgoing_beam)
outgoing_beam.alpha_x, outgoing_beam.alpha_y ##output tensor(0.3604), tensor(0.3607)
The text was updated successfully, but these errors were encountered: