GaussianPulse¶
This module collects some tools to deal with Gaussian pulses. This class of pulses is described by a sinusoidal function, whose frequency defines the energy \(E=\hbar\omega\) of the pulse, times a gaussian envelope. The time-dependent amplitude of the pulse is parametrized as
where A is the amplitude of the pulse and the value of \(t_0\) sets the
position of the maximum of the gaussian envelope. Here \(t_0\) is expressed
in function of the width parameter as the multiple of the half period of the sine
function nearest to 3w. Due to this choice the maximum of the gaussian profile
matches with the maximum of the sine function. The origin of the time
variable can be set using the \(t_{start}\) parameter.
The width parameter determines the value of the FWHM of the pulse according to the relation
- mppi.Models.GaussianPulse.doubleGaussianPulse(time, energy=1.5, amplitude1=1, amplitude2=1, width1=100, width2=100, fwhm1=None, fwhm2=None, t_start1=0, t_start2=600, envelope_only=False, THz_pulse=False, change_sign1=False, change_sign2=False, verbose=True)[source]¶
Build a sine oscillating pulse with e double Gaussian envelope.
- Parameters:
time – the value of the time variable (in fs), it can be a single
floator anarrayenergy (
float) – the energy of the pulse (in eV)amplitude1 (
float) – the amplitude of the first pulse (it can be a complex number)amplitude2 (
float) – the amplitude of the second pulse (it can be a complex number)width1 (
float) – the width parameter of the first Gaussian (in fs)fwhm1 (
float) – if not None set the FWHM of the first pulse (in fs). The width1 is set to \(fwhm1/(2\sqrt{2ln(2)})\)width2 (
float) – the width parameter of the second Gaussian (in fs)fwhm2 (
float) – if not None set the FWHM of the second pulse (in fs). The width2 is set to \(fwhm2/(2\sqrt{2ln(2)})\)t_start1 (
float) – time shift for the origin of the first pulse (in fs)t_start2 (
float) – time shift for the origin of the second pulse (in fs)envelope_only (
bool) – if True the sinusodial oscillating factor is not consideredTHz_pulse (
bool) – if True expresses the energy in meV and the time variable and the width parameter in pschange_sign1 (
bool) – if True change the sign to the first envelope functionchange_sign2 (
bool) – if True change the sign to the second envelope functionverbose (
bool) – defines the amount of information provided on terminal
- Returns:
floatorarray(depending on the time provided as input) with the value of the double Gaussian pulse. The pulse can be complex (depending on the amplitude provided as input)
- mppi.Models.GaussianPulse.evalPulseFourierTransform(time, pulse, THz_pulse=False, verbose=True)[source]¶
Eval the Fourier transform of the pulse.
- Parameters:
time (
array) – array with the values of the time variable (in fs).constant (The function assumes that the dt of the array is) –
pulse (
array) – array with the pulseTHz_pulse (
bool) – if True assumes that the time variable is provided in ps and expresses the energy in meVverbose (
bool) – sets the amount of information provided on terminal
- Returns:
a tuple (energies,pulseFTmod) with the (positive range) time conjugate variable converted in eV (or in meV, depending on the
THz_pulseoption) and the modulus of the FT ot the pulse- Return type:
tuple
Note
To increase the resolution in the frequency space choose a long time interval
- mppi.Models.GaussianPulse.gaussianPulse(time, energy=1.5, amplitude=1, width=100, fwhm=None, t_start=0, envelope_only=False, THz_pulse=False, change_sign=False, verbose=True)[source]¶
Build a Gaussian pulse.
- Parameters:
time – the value of the time variable (in fs), it can be a single
floator anarrayenergy (
float) – the energy of the pulse (in eV)amplitude (
float) – the amplitude of the pulse (it can be a complex number)width (
float) – the width parameter of the Gaussian (in fs)fwhm (
float) – if not None set the FWHM of the pulse (in fs). The width is set to \(fwhm/(2\sqrt{2ln(2)})\)t_start (
float) – time shift for the origin of the pulse (in fs)envelope_only (
bool) – if True the sinusodial oscillating factor is not consideredTHz_pulse (
bool) – if True expresses the energy in meV and the time variable and the width parameter in pschange_sign (
bool) – if True change the sign to the envelope functionverbose (
bool) – defines the amount of information provided on terminal
- Returns:
floatorarray(depending on the time provided as input) with the value of the Gaussian pulse. The pulse can be complex (depending on the amplitude provided as input)