Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Lots of housekeeping and changes in this PR. Some features and parts of the code have been removed. Others have been better organized, allowing also to easily add new features. See below for summary.
Removed stuff
'analytical'
tracking option has been removed from thePlasmaStage
. This was the oldest code of Wake-T, and ultimately, the original reason which led to its development. Although fast, it had intrinsic limitations, such as not working when particles experience defocusing fields. It was also making other parts of the code less nice (such as requiring aKx
andEz_p
components on theWakefield
s). Also, it wasn't really being used anymore, as the Runge-Kutta tracking is fast enough. So, with this PR we say good bye to original building block or Wake-T 😢.Kx
andEz_p
methods from allWakefield
models. They were only needed for'analytical'
tracking.parallel
tracking option in the plasma elements has been removed. The implementation withmultiprocessing
is not ideal and it didn't work properly anyways with some wakefield models. Instead, a future version of the tracking algorithm using numba threads is foreseen.PlasmaRampBlowoutField
.relativistic
option fromActivePlasmaLens
has been removed. All wakefields should eventually be updated not to a assume relativistic particles.New stuff
PlasmaRamp
andActivePlasmaLens
(renamed fromPlasmaLens
) are now subclasses ofPlasmaStage
. This avoids a lot of code repetition.n_p
argument ofPlasmaStage
has been renamed to a more explicitdensity
, and it now accepts acallable
as value.PlasmaRamp
(the user can pass a function for the plasma density ramp profile #19).wakefield_model
argument ofPlasmaStage
now accepts aWakefield
instance as input.PlasmaRamp
element now also accepts as an input adecay_length
parameter. Previously, this length was determined internally from theplasma_dens_down
andposition_down
parameters (which are still available ifdecay_length
is not provided).Other changes
driver
tolaser
in theWakefield
models where this hadn't been done already.PlasmaRamp
class. This is is cleaner and allows for easily adding new ones.ActivePlasmaLens
whenwakefields=True
is now determined from the plasma density. Previously it was calculated fromfoc_strength
, but this might not be accurate if the wakefields are much stronger the the APL field.PlasmaRampBlowoutField
toFocusingBlowoutField
.gitignore
(created by Visual Studio) which are no longer needed.README.md
to reflect changes in the code.