solprop.tools.pulse#
Pulse shape numbers: the natural width, peak power and energy of a pulse.
The sech and Gaussian shapes the design numbers are defined for, and the carrier
frequency of a vacuum wavelength the other tools modules share.
Module Attributes
The two pulse shapes the design numbers are defined for. |
Functions
|
Return the energy of a pulse of given peak power, duration and shape. |
|
Return the peak power of a pulse of given energy, duration and shape. |
|
Return the natural width of a pulse from its full width at half maximum. |
- solprop.tools.pulse.PulseShape#
The two pulse shapes the design numbers are defined for.
alias of
Literal[‘sech’, ‘gauss’]
- solprop.tools.pulse.pulse_energy(peak_power, fwhm, shape='sech')[source]#
Return the energy of a pulse of given peak power, duration and shape.
The inverse of
pulse_peak_power(), for the same shape.- Parameters:
- peak_powerfloat
Peak power in W, > 0.
- fwhmfloat
Full width at half maximum of the power in s, > 0.
- shape{‘sech’, ‘gauss’}, optional
The pulse shape; see
pulse_width().
- Returns:
- float
Pulse energy in J.
- Raises:
- ToolsError
If the shape is unknown or a quantity is not positive.
Examples
>>> from solprop.tools import pulse_energy >>> f"{pulse_energy(88.137e9, 10e-15) * 1e3:.4f}" '1.0000'
- solprop.tools.pulse.pulse_peak_power(energy, fwhm, shape='sech')[source]#
Return the peak power of a pulse of given energy, duration and shape.
- Parameters:
- energyfloat
Pulse energy in J, > 0.
- fwhmfloat
Full width at half maximum of the power in s, > 0.
- shape{‘sech’, ‘gauss’}, optional
The pulse shape; see
pulse_width().
- Returns:
- float
Peak power in W: \(E/(2\tau_0)\) for
sechand \(E/(\sqrt\pi\,\tau_0)\) for a Gaussian, the integrals of the two shapes.
- Raises:
- ToolsError
If the shape is unknown or a quantity is not positive.
Examples
>>> from solprop.tools import pulse_peak_power >>> f"{pulse_peak_power(1e-3, 10e-15) / 1e9:.3f}" '88.137' >>> f"{pulse_peak_power(1e-3, 10e-15, 'gauss') / 1e9:.3f}" '93.944'
- solprop.tools.pulse.pulse_width(fwhm, shape='sech')[source]#
Return the natural width of a pulse from its full width at half maximum.
- Parameters:
- fwhmfloat
Full width at half maximum of the power in s, > 0.
- shape{‘sech’, ‘gauss’}, optional
"sech"for \(P\propto{\rm sech}^2(t/\tau_0)\),"gauss"for \(P\propto\exp(-t^2/\tau_0^2)\).
- Returns:
- float
\(\tau_0\) in s:
fwhm / (2 ln(1 + sqrt 2))orfwhm / (2 sqrt(ln 2)).
- Raises:
- ToolsError
If the shape is unknown or the width is not positive.
Examples
>>> from solprop.tools import pulse_width >>> f"{pulse_width(10e-15) * 1e15:.4f}" '5.6730' >>> f"{pulse_width(10e-15, 'gauss') * 1e15:.4f}" '6.0056'