[mini] Fix the bug in Issue #377: Add original duration into the argument of get_phi2 #381
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.
When introducing STC, the laser duration may be changed by both spatial and angular chirp.
The spatial chirp$\zeta$ will stretch a Gaussian pulse as $\tau' = (\tau_0^2+\frac{4\zeta^2}{w_0^2})^{1/2}$ .
The temporal chirp, i.e GDD, will stretch a Gaussian pulse as$\tau= [\tau'^2+\frac{4(\varphi^{(2)})^2}{\tau'^2}]^{1/2}$ .
Previously, the function$\tau'\approx \tau_0$ . It's true when the pulse is based on a Gaussian shape longitudinally(The influence on Gaussian laser duration from spatial chirp is always minor). However, as pointed out in Issue #377, when implement
get_phi2
assumes thatPolynomialSpectralPhase
on the laser, the pulse may be drastically stretched by both spatial and temporal chirps. This causes an error.I tried to calculate the GDD in spectrum field as$\langle \frac{\partial^2 \varphi}{\partial \omega^2} \rangle$ , but in this way turns out to be really sensitive to the box size and resolution, which originated from two times of derivative in the same direction plus numerical FFT. Considering $\tau'$ is also not a trivial to calculate, currently the solution is to add one argument to input the original value of $\tau_0$ for user to use.
The final optimal solution remains to be discussed...