Skip to content

Conversation

@ax3l
Copy link
Member

@ax3l ax3l commented Dec 17, 2025

We can in principle allow to run with 1 particle in track_particles(), even though we do have the track_reference(ref) mode now: https://impactx.readthedocs.io/en/25.12/usage/how_to_run.html#how-to-select-a-tracking-mode

As long as no space charge and no CSR/wakefield effects are requested, this is still a valid configuration.

This PR removes an old assert, for which we have a more specific assert in the space charge routines, if enabled. Additionally, it adds a new check into the HandleWakefield routines (for CSR), which also rely on a non-flat beam to model anything sensible.

Other routines we have, notably ISR, are modeled on individual particles and need no asserts.

First seen in #44 (comment)

We can in principle allow to run with `1` particle
in `track_particles()`, even though we do have the
`track_reference(ref)` mode now.

As long as no space charge and no CSR/wakefield effects are
requested, this is still a valid configuration.

This PR removes an old assert, for which we have a more specific
assert in the space charge routines, if enabled. Additionally,
it adds a new check into the `HandleWakefield` routines (for CSR),
which also rely on a non-flat beam to model anything sensible.

Other routines we have, notably ISR, are modeled on individual
particles and need no asserts.
@ax3l ax3l requested a review from cemitch99 December 17, 2025 23:13
@ax3l ax3l added bug Something isn't working bug: affects latest release Bug also exists in latest release version tracking: particles labels Dec 17, 2025
Co-authored-by: Chad Mitchell <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug: affects latest release Bug also exists in latest release version bug Something isn't working tracking: particles

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants