Skip to content

Conversation

@Allessyer
Copy link

No description provided.

z = rectan_trapezoid(n_part,a=z_c-length/2,b=z_c+length/2,h1=head_current)
else:
raise NotImplementedError('Noise reduction not implemented for `trapezoidal` profile.')
return z
Copy link

@MaxThevenet MaxThevenet Feb 14, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Here is an easy way for smoothing your profile (in this case, you do a convolution of the z trapezoidal profile with a Gaussian of size length/10). This would keep the number of particles and the total charge constant, but smoothen the function (affecting a bit the heights). Could you give it a try, and see if it gives what you want? You could use this for your simulations, but I am not saying this should be merged in Wake-T, Angel may prefer to keep the consistency.

Suggested change
return z
z += np.random.normal(loc=0., scale=length/10, size=n_part)
return z

@AngelFP any thought?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants