Skip to content

Multi turn injection

Added an object to handle multi turn injection. Creates a new trackable object (MultiTurnInjection) to which a list of Beam objects can be added. On turns where a new injection is expected, calls to MultiTurnInjection.track() will add the next injection to the Beam object being used in the simulation.

The MultiTurnInjection object is an iterable, which will allow use cases like:

for i in multi_turn_injection:
    tracker.track()

Alternatively:

for i in range(n_turns_injection):
    tracker.track()
    multi_turn_injection.track()

Once the injection has been exhausted a StopIteration is raised, equivalently to other iterables.

Intended use case is things like longitudinal painting and multiple injections on a long flat bottom.

Merge request reports

Loading