No weight methods¶
Zero order methods¶
- twissed.noweight(step: Step, weight_norm: float = 1.0, method: int = 1, **kwargs) Step [source]¶
Remove weight of the distribution. Zero method with random for ratio.
Might create more weight than original distribution.
Use¶
Define a new weight weight_norm.
- For each particle.
- if w > weight_norm
Create N new particles with same position and momenta.
with N = int(np.floor(w/weight_norm))
- param step:
Step class
- type step:
Step class
- param weight_norm:
New weight. Defaults to 1.
- type weight_norm:
float, optional
- param method:
Type of method used (1 better than 0).
- type method:
int,optional
- returns:
A new Step class
- rtype:
Step class