pypret.pnps module¶
This module provides classes to calculate parametrized nonlinear process spectra (PNPS), such as frequency-resolved optical gating (FROG), interferometric FROG (iFROG), dispersion scan (d-scan), time-domain ptychography (TDP) and pulse-shaper assisted methods such as multiphoton intrapulse interference phase scan (MIIPS).
The code follows the notation used in [Geib2019] and its supplement.
Currently only the abovementioned methods are implemented. But the code is written in such way that including new pulse measurement methods is very easy. If it is a method using a collinear nonlinearity, subclass from CollinearPNPS, otherwise from NoncollinearPNPS.
In the collinear case only self.mask(parameter) has to be implemented which
calculates the used linear parametrization operator. In the non-collinear
case the function _calculate has to be implemented which calculates and
returns the PNPS trace T_mn
and the PNPS signal S_mk
.
Public interface¶
-
pypret.pnps.
PNPS
(pulse: pypret.pulse.Pulse, method: str, process: str, **kwargs) → pypret.pnps.BasePNPS[source]¶ Creates a PNPS instance.
Parameters: - pulse (Pulse) – A pulse instance that is used to simulate the PNPS trace.
- method (str) –
- The type of PNPS measurement. Should be one of
- ’frog’
(see here)
- ’tdp’
(see here)
- ’dscan’
(see here)
- ’miips’
(see here)
- ’ifrog’
(see here)
- ’frog’
- process (str) –
- The nonlinear process used in the measurement method. Can be one of
- ’shg’ : second harmonic generation
- ’thg’ : third harmonic generation
- ’sd’ : self-diffraction
- ’pg’ : polarization gating
Not all methods support all nonlinear processes. In that case a ValueError will be raised.
- parameters are described in the documentation of the specific (Additional) –
- methods. (PNPS) –
-
class
pypret.pnps.
FROG
(pulse, process)[source]¶ Implements frequency-resolved optical gating [Kane1993] [Trebino2000].
-
__init__
(pulse, process)[source]¶ Creates the instance.
Parameters: - pulse (Pulse instance) – The pulse object that defines the simulation grid.
- process (str) – The nonlinear process used in the PNPS method.
-
method
= 'frog'¶
-
parameter_name
= 'delay'¶
-
parameter_unit
= 's'¶
-
-
class
pypret.pnps.
IFROG
(pulse, process)[source]¶ Implements the interferometric frequency-resolved optical gating method [1].
[1] G. Stibenz and G. Steinmeyer, “Interferometric frequency-resolved optical gating,” Opt. Express 13, 2617-2626 (OSA, 2005). -
__init__
(pulse, process)[source]¶ Creates the instance.
Parameters: - pulse (Pulse instance) – The pulse object that defines the simulation grid.
- process (str) – The nonlinear process used in the PNPS method.
-
method
= 'ifrog'¶
-
parameter_name
= 'tau'¶
-
parameter_unit
= 's'¶
-
-
class
pypret.pnps.
TDP
(pulse, process, center, width)[source]¶ Implements a variant of time-domain ptychography. This version is self-referenced and works like FROG except that in one arm of the correlator the bandwidth of the pulse is heavily filtered [Witting2016]. Other variants are not directly supported by this class.
-
__init__
(pulse, process, center, width)[source]¶ Creates the instance.
Parameters: - pulse (Pulse instance) – The pulse object that defines the simulation grid.
- process (str) – The nonlinear process used in the PNPS method.
- center (float) – The center wavelength of the bandwidth filter in m.
- width (float) – The width (FWHM) of the bandwidth filter in m.
-
method
= 'tdp'¶
-
parameter_name
= 'delay'¶
-
parameter_unit
= 's'¶
-
-
class
pypret.pnps.
DSCAN
(pulse, process, material)[source]¶ Implements the dispersion scan method [Miranda2012a] [Miranda2012b].
Not implemented in the public version of the code. Please contact us if you want to use pypret for d-scan measurements.
-
__init__
(pulse, process, material)[source]¶ Initialize self. See help(type(self)) for accurate signature.
-
method
= 'dscan'¶
-
parameter_name
= 'insertion'¶
-
parameter_unit
= 'm'¶
-
-
class
pypret.pnps.
MIIPS
(pulse, process, alpha, gamma)[source]¶ Implements the multiphoton intrapulse interference phase scan method (MIIPS) [Lozovoy2004] [Xu2006].
-
__init__
(pulse, process, alpha, gamma)[source]¶ Creates the instance.
Parameters: - pulse (Pulse instance) – The pulse object that defines the simulation grid.
- process (str) – The nonlinear process used in the PNPS method.
- alpha (float) – The amplitude of the phase pattern (in rad).
- gamma (float) – The frequency of the phase pattern in Hz.
-
method
= 'miips'¶
-
parameter_name
= 'delta'¶
-
parameter_unit
= 'rad'¶
-
API¶
-
class
pypret.pnps.
BasePNPS
(pulse, process, **kwargs)[source]¶ The PNPS base class
-
__init__
(pulse, process, **kwargs)[source]¶ Initialize self. See help(type(self)) for accurate signature.
-
calculate
(spectrum, parameter)[source]¶ Calculates the PNPS signal S_mk and the PNPS trace T_mn.
Parameters: - spectrum (1d-array) – The pulse spectrum for which the PNPS trace is calculated.
- parameter (scalar or 1d-array) – The PNPS parameter (array) for which the PNPS trace is calculated.
Returns: Returns the calculated PNPS trace over the frequency
self.process_w
. If parameter was a scalar a 1d-array is returned. If it was a 1d-array a 2d-array is returned where the parameter runs along the first axis and the frequency along the second.Return type: 1d- or 2d-array
-
measure
(Sk)[source]¶ Simulates the measurement process.
Note that we deal with the spectrum over the frequency! For retrieving from actual data we need to rescale this by lambda^2.
-
method
= None¶
-
parameter_name
= ''¶
-
parameter_unit
= ''¶
-
process
= None¶
-
scheme
¶
-
trace
¶ Returns the last calculated trace as a MeshData object.
-