Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add new temporal profile tsin2plateau #7

Merged
merged 7 commits into from
Jun 9, 2017

Conversation

sgatto
Copy link
Contributor

@sgatto sgatto commented Jun 8, 2017

I propose to add a temporal profile that is very useful for several simulations:
tsin2plateau, a sin2 profile with the option to become flattop profile with sin2 ramps.

I used the code that Micka and Anna developed some time ago and I refactored it.
I changed the default values: if only one parameters is given (fwhm) the profile is similar to a Gaussian profile having fwhm (of the field amplitude) defined by the user.
If plateau is also given, a plateau is added splitting in two the previous profile.
If the user defines slope1 and/or slope2, he/she controls the width of the sin2 ramps at the beginning and at the end of the profile.
See attachment.

Someone might not like the redundancy of fwhm, slope1, slope2.
slope1, slope2 use fwhm as default value. If they both are defined,
fwhm is not used, it gets overridden, and the values of slope1, slope2are used.
I chose to let the user use
time_envelope = tsin2plateau(fwhm=70.*t0)
to have a simple way to define a laser envelope that can be useful also in 2D and 3D.
A sin2 profile has the advantage to have a compact support,
no truncation is needed to approach zero, and its derivative is continuous.

sin2plateau

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