Add method to create events with interacting charge clouds #460
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.
There are several ways of creating a multi-site
Event
, depending on whether the individual charge clouds should interact amongst each other or not.Example:
Event([[p1], [p2,p3], [p4,p5]], energies)
--> in this case, the charge cloud atp1
would drift independently, the charge clouds atp2
andp3
could interact with each other and the ones atp4
andp5
could interact with each other.There is a convenience function that transforms
Event([p1, p2])
toEvent([[p1], [p2]])
, meaning thatp1
andp2
cannot interact with each other. If they should, the syntax would have to beEvent([[p1, p2]])
(note the extra pair of brackets).Visual example of what the extra set of brackets would cause:
Left: the charge clouds do not repell each other. Right: the charge clouds "see" and repell each other.
When wanting to create charge cloud, a third argument
N
(number of charges) can be passed toEvent
.This works with the syntax in
evt1
(independent charge clouds), but not with the syntax inevt2
(combined charge clouds).I added support for the latter syntax in this PR:
With the new method, if one were to split one deposit into two, the resulting waveforms would look the same (whereas with the independent charge clouds, effects of self_repulsion would be underestimated):