According the RP-Photonics, the Gaussian pulse is given by:
in our case, we are taking the sqrt of this to get the E-field. But, our previous equation didn't include the square root in the exp term. This PR includes this factor.
We can verify that this approach is correct by generating and plotting a sech and a gaussian pulse, both with FWHM of 100 fs:
Thanks, this is a good catch. Note that in most uses the pulse field is energy-normalized, so the impact was less than if P_0 were used (it was a shape error, not an energy error.)
According the RP-Photonics, the Gaussian pulse is given by:
in our case, we are taking the
sqrt
of this to get the E-field. But, our previous equation didn't include the square root in theexp
term. This PR includes this factor.We can verify that this approach is correct by generating and plotting a sech and a gaussian pulse, both with FWHM of 100 fs:
At +/- 50 ps, both curves have a value of sqrt(0.5)=0.707.
In addition, I added some additional documentation to the SechPulse and GaussianPulse functions.
Oh, this fix is thanks to Nima :). Maybe one day he will figure out how to make a github account.