## Abstract

We present an iterative retrieval algorithm based on data constraint for ultrashort pulse characterization using dispersion scan (d-scan). The proposed algorithm is much faster and leads to a drastic reduction of retrieval times, but, compared to the standard algorithm, it performs less robustly in the retrieval of noisy d-scan traces. The algorithm is tested on several simulated cases and in two different experimental cases in the few-cycle regime.

© 2016 Optical Society of America

## 1. INTRODUCTION

The last few decades have seen the development and improvement of numerous ultrashort laser-pulse characterization techniques. Still, temporal characterization of ultrashort laser pulses can be challenging, especially in the few-cycle regime. Options range from classic techniques, such as FROG [1,2], SPIDER [3], and other spectral interferometry approaches (e.g., [4,5]), to more complex techniques based on photoionization [6–8], which allow for direct measurement of the electric field. Different techniques have different strengths, such as speed, experimental simplicity, and robustness. Another relatively recent approach is to use the pulse compressor itself, such as multiphoton intrapulse interference phase scan (MIIPS) [9], chirp-scan [10], and d-scan [11].

Ultrashort pulse characterization techniques that use the compressor itself as a diagnostic tool have the benefit of experimental simplicity, since minimal extra components are needed. These work by applying a set of distinct spectral phases, using either a pulse-shaping device or passive elements, and looking at the resulting second-harmonic generation (SHG) spectra. These are usually scanning methods, but single-shot approaches have also been devised [12].

Such techniques retrieve the pulse iteratively, either by physically compressing the pulse [9] or by numerically finding which pulse originates the set of measured nonlinear (usually SHG) traces [10,11]. Our original implementation of the d-scan retrieval assumed an accurately measured fundamental spectrum, and tried to recreate the measured d-scan trace by iteratively applying spectral phases [11,13]. Loriot *et al.* showed that the spectral intensity can also be retrieved from such traces [10] if the trace is calibrated, in principle making a separate measurement of the fundamental spectrum unnecessary. In both cases, the pulse retrieval is treated as a generic optimization problem, where an iterative algorithm tries to find which pulse best recreates the measured scans. This is in contrast to some FROG algorithms [1,14–16], which use more elegant approaches.

In this work, we present a new algorithm to retrieve ultrashort pulses from dispersion scans (d-scan). It is based on a data constraint approach to phase recovery, similar to what has been applied previously to FROG traces. The approach is inspired by decades-old techniques used in phase recovery of diffraction problems, most famously the Gerchberg–Saxton algorithm [17]. In the context of ultrashort pulse measurement, this approach is used in most FROG retrieval algorithms [1] as well as more recently developed algorithms, for example, based on ptychography [18,19].

The algorithm iterates between a representation of the pulse (in the time or frequency domain) and its corresponding d-scan trace, i.e., its second-harmonic as a function of spectral phase. Calculating a d-scan trace from an ultrashort pulse is straightforward. However, and unlike linear problems such as diffraction or holography, finding the ultrashort pulse from a d-scan is not straightforward, even if the complex d-scan trace (i.e., intensity and phase) is known. The electric field generated from the SHG process is modeled as the square of the driving field; therefore, even if the SHG field is known, there is ambiguity as to which driving field generated it. This step is arguably the crucial one in other retrieval techniques used in FROG.

## 2. FUNDAMENTAL CONCEPTS

We define the unknown pulse as the complex field

and the glass spectral phase as a function of frequency $\omega $, and glass thickness $z$ is modeled as a complex function Applying the spectral phase of different thicknesses of glass corresponds to translating wedges in the experimental measurement of a d-scan trace. The complex d-scan, which is a set of complex SHG spectra, is given byBy integrating a trace over the insertion $z$ from the minimum $-L$ to the maximum glass insertion $+L$ we get the frequency marginal

We show in Appendix A that, for large enough values of $L$, the marginal $M(\omega )$ is independent of the spectral phase of the pulse. It is thus a useful quantity that allows us to calibrate a d-scan trace.Despite being a straightforward-to-implement technique, several experimental problems can arise. Depending on the particular case, it might be difficult to measure a SHG signal that follows the simple model of Eq. (4), due to phase-matching bandwidth, spectrometer calibration, contamination by the fundamental spectrum in the case of octave-spanning spectra, etc. It is thus a major advantage if the algorithm can deal with traces that are not ideal.

To investigate this, we consider three different scenarios:

- 1. The d-scan trace is well calibrated, without any clipping.
- 2. The d-scan trace is not calibrated, but it is not clipped, and the fundamental spectrum is properly measured.
- 3. The d-scan trace is possibly not calibrated, it is clipped, and the fundamental spectrum is properly measured.

Case 1 is the simplest one to implement numerically, and does not require an independent measurement of the fundamental spectrum. It is also the most closely related to FROG and ptychographic algorithms. The algorithm is described in Section 3. Case 2 requires an independent measurement of the fundamental spectrum. There are then two options: one is to use the marginals to calibrate the d-scan trace, and then we have again Case 1. The other option is to change the retrieval algorithm to project the retrieved fundamental spectrum at each iteration (keeping the retrieved phase and applying the measured amplitude), while adapting the measured d-scan trace.

Case 3 is the most complex one, where data from some spectral regions of the d-scan trace are missing or unreliable. In this case, the areas of the trace which are not considered reliable are discarded and marked as such. The algorithm then replaces those by the simulated scan generated by the current guess. Successful retrieval of such traces depends on the d-scan trace having sufficient redundancy. Both Cases 2 and 3 are discussed in Section 4.

## 3. BASIC ALGORITHM

The basic algorithm is used in Case 1, when the trace is calibrated.

We start with a guess; for iteration $l=0$,

From the d-scan trace we can estimate the width of the fundamental spectrum, and assume a Gaussian spectrum with that width as a first guess. A MIIPS analysis can be used for a first approximation to the spectral phase [9].

From this, we simulate a matrix of the field after propagation through a thickness $z$. A phase matrix, corresponding to the spectral phase introduced by this propagation is

so after propagation, the original field will have the extra spectral phase term as a function of glass thickness giving a corresponding time-domain matrix where the Fourier transform operator is applied over $\omega $. Then the SHG signal is calculated, and a complex d-scan trace is calculated, Now, the phase is kept and the amplitude substituted by the measured trace#### A. Error Calculation

At each iteration, the rms difference between measured and simulated traces can be calculated. The error is given by

#### B. Simulated Examples

Figure 1 shows an example of a simulated pulse and corresponding simulated and retrieved d-scan traces. The spectral intensity is an actual measurement of an ultrafast titanium:sapphire oscillator with a Fourier limit duration of less than 6 fs full width at half-maximum (FWHM), representative of modern systems. This spectrum (amplitude and phase) will be used as a basis for more examples throughout this paper. The algorithm ran for 100 iterations, with a grid size of 256 points in the frequency domain and 200 glass insertions.

The algorithm accurately retrieved the spectral intensity and phase. The rms difference between the simulated and retrieved scans was about 1E-6.

We also tested the basic algorithm on a double pulse (Fig. 2). The pulse is the same as the previous case (Fig. 1), but duplicated and delayed by 100 fs. The only difference from the previous case was that a higher sampling rate was needed in the spectral domain (2048 points), which made the retrieval slower. rms error was approximately 1E-3.

#### C. Variations of the Basic Algorithm

The previously presented basic algorithm can be used with some modifications. The first we consider is averaging the guesses in the time domain instead of doing it in the frequency domain. The step depicted in Eq. (18) is replaced by its equivalent in time. Instead of integrating over ${\tilde{U}}_{l}^{\prime \prime}(w,z)$, an extra step is taken: first, go to the time domain, integrate over $z$, and go back to the frequency domain for the new ${\tilde{E}}_{l}(w)$. The two approaches are equivalent, so if no other operation is performed, there is no reason to do so. However, if some constraint is known in the time domain, it can be enforced here.

The other variation we tried is to give different weights to the different guesses. For example, if the data is noisy, one might wish to give a higher weight to the regions with more signal. Equation (18) would then be replaced by

## 4. ALGORITHM FOR NONCALIBRATED TRACE

In the case of a noncalibrated trace, a retrieved trace will differ from the measured trace as [20,21]

where $R(\omega )$ is a spectral response curve that includes factors such as phase-matching bandwidth, spectrometer sensitivity, coupling efficiency, etc. Since a simulated trace will be inherently calibrated, it will never recreate a noncalibrated measured trace, and the basic algorithm will not work properly.One way around it is to use the trace’s marginals [11] to calibrate the trace. In some cases, however (i.e., the trace was not measured with a large enough range of glass insertions), this might not be practical, so a similar approach to the one used in previous work [11] can be adapted to the new algorithm.

A modified error expression is often used with d-scan retrieval [11,13], which minimizes the error at each frequency

*and*not clipped, then the retrieved response curve $\mu ({\omega}_{j})$ can be used to calibrate ${I}^{\mathrm{retr}}({\omega}_{j},{z}_{k})$. It will only give the correct response after a successful retrieval, but if used within the retrieval algorithm, it will, it is hoped, be a better guess at each iteration.

For a successful retrieval of a noncalibrated trace, a separate measurement of the fundamental spectrum is needed—this guarantees that the generated trace is itself calibrated. Two extra steps are added to the algorithm. First, before a new d-scan guess is generated, the current guess of ${\tilde{E}}_{i}(\omega )$ is updated with the measured spectrum, i.e., its phase is kept and its amplitude is replaced by the measured one:

In case some signal is missing or for some reason unreliable (for example, being contaminated by the fundamental spectrum in case of an octave-spanning pulse), those spectral regions cannot be used (Case 3). In this case, those areas are marked as unreliable and not substituted by the measured data in the data constraint step in Eq. (12).

Figure 3 shows an example using this variation of the algorithm, where the simulated trace was multiplied by a phase-matching curve, and spectrally clipped. Even in the absence of a significant portion of the trace, the pulse is accurately retrieved. The rms error in this case is obtained by ignoring the clipped regions, and after calibration of the simulated trace, giving an error of $\sim 0.01$.

## 5. NOISE

We found that the basic algorithm is not particularly robust to noise. Figure 4 shows an example of a retrieval using the basic algorithm. Noise was added with a standard deviation of 10% of the peak intensity of the trace. The spectral intensity retrieval especially is strongly affected. The rms error in this case is $\sim 0.09$.

If the fundamental spectrum is separately measured, then it can be integrated in the retrieval process as in the previous case [Eq. (28)]. An example is shown in Fig. 5. The rms error is now lower, $\sim 0.07$.

If the fundamental spectrum is not available, a composite algorithm can be used. From Fig. 4, we can see that the spectral phase retrieval is reasonably accurate, and this is very often the case even for very noisy traces. A simple approach is to take this retrieval and afterward use a generic optimization algorithm to optimize the spectral intensity. Figure 6 shows an example.

A generic optimization algorithm takes the retrieved spectral amplitude from the basic algorithm and changes it, multiplying it by a response curve. In this case, the curve was defined by 10 control points and interpolated using spline interpolation. This results in much better retrieval, and can be done quite fast. The rms error is $\sim 0.075$.

#### A. Background Subtraction

We finish this section by briefly discussing an important but often overlooked issue. When dealing with experimental data, the question arises of what to do with negative experimental values that arise from background subtraction.

In our previous work [11,13], we found that it is important *not* to coerce to zero the experimental values of the d-scan trace, i.e., after subtracting the average noise value, negative values are kept negative, instead of being replaced by zero.

Let us assume we have an ideal trace, and look at a region where the values are zero. If noise with an average value of zero is added and then the resulting values are coerced to zero, the average will not be zero any longer. This would make the algorithm try to create signal in those regions (see, for example, Ref. [22]). In the case of a data constraint algorithm, where the measured *amplitude* is needed, this poses a problem, as a square root of the measured intensity is needed.

Our approach is to keep track of which values of the experimental trace are negative, and flip the sign of the complex scan when the data constraint step is performed. So the measured amplitude becomes

and the data constraint step on Eq. (12) becomesWe found this change to have a large impact on the retrieval of noisy traces.

## 6. EXPERIMENTAL RESULTS

#### A. OPCPA System

The algorithm was tested on two different systems: the first is a chirped pulse optical parametric amplifier (OPCPA) codeveloped with Venteon GmBH [23]. It delivers around 5 μJ of energy per pulse at a repetition rate of 200 kHz. The results are shown in Fig. 7.

The measured pulses have a FWHM duration of 6.3 fs. In this case, only the retrieval using the basic algorithm is shown. The grid size was 256 spectral points and 150 insertions, and the rms error was $\sim 0.01$. The retrieved spectrum is similar to the measured one, but the differences are clear. A possible explanation for the discrepancy is that either the fundamental or the SHG spectra are not properly calibrated. OPCPA sources are difficult to work with due to spatiotemporal couplings, making it hard to make sure that all the spectral content of the source contributes equally to the SHG signal. In any case, very similar results are obtained by instead using the previous algorithm [13] or the previously described variation for noncalibrated traces.

#### B. Hollow-Fiber Compressor

The second system is a hollow-fiber compressor [24] capable of delivering around 200 μJ at a repetition rate of 1 kHz. In previous work, water was used to correct the third-order dispersion of the system [24,25]. Here, we used a z-cut KDP crystal (so that light travels with polarization on the ordinary axis), which has similar third order dispersion (TOD)/group delay dispersion (GDD) ratio to water. The results are shown in Fig. 8. The grid size was higher than previously, with 512 spectral points and 200 insertions. Two variations of the algorithm were used: the basic algorithm, and the modified algorithm, using the measured spectrum and assuming the trace might not be calibrated. Both gave a very similar result, with a retrieved duration of 3.0 fs FWHM in both cases (the retrieved trace in Fig. 8(b) is the one obtained from the basic algorithm). In both cases, the rms error was $\sim 0.02$. The retrieved spectrum using the basic algorithm closely resembles the measured spectrum, except below 500 nm, which lies outside the chirped mirrors specifications. This causes this spectral region to contribute very little to the main pulse, making it harder for the algorithm to retrieve it.

## 7. DISCUSSION

The algorithm is not flawless, and sometimes it converges to local minima, and other times it does not converge at all. We found that a reasonable first guess helps in both cases. In the presented cases, it was enough to assume a Gaussian spectrum, transform-limited at the insertion corresponding to the peak of the d-scan signal as a first guess for the spectral phase.

The basic algorithm does not use all the information contained in a d-scan trace: the drop in intensity as a function of dispersion carries information that is not taken into account. Each spectral line is independently used for a new guess, so from the algorithm point of view, the most important thing is that each spectral measurement is reproduced. If, for example, a trace had each spectral measurement normalized (which would give a physically impossible trace), the algorithm would still converge (although the error would not converge to zero).

Many of the steps of the algorithm can be done numerically in parallel, which can considerably speed up the retrieval. This is especially useful with modern multiprocessor computers.

## 8. CONCLUSION

We presented a new retrieval algorithm for ultrashort pulses using the d-scan technique, capable of retrieving both spectral intensity and spectral phase, and successfully applied it to simulated and real pulses. We also show that the frequency marginal of a d-scan trace is independent of the spectral phase of the pulse.

The algorithm can be implemented using different variations, depending on what data is available. It is much faster than our previous algorithms [11,13], although, in its basic form, less robust to noise.

The algorithm was tested on experimental setups, representative of some of today’s most challenging ultrashort pulse measurements.

## APPENDIX A: PHASE INDEPENDENCE OF THE FREQUENCY MARGINAL

In this appendix, we show that the integral of the d-scan trace ${|S(\omega ,z)|}^{2}$ over the glass thickness $z$ is independent of the phase $\psi (\omega )$ of the pulse. More precisely, we show that

The derivation starts by rewriting Eq. (3) for $S(\omega ,z)$ as a convolution in the time domain

## Funding

European Research Council (ERC) (PALP); Knut och Alice Wallenbergs Stiftelse; Vetenskapsrådet (VR); Fundação para a Ciência e a Tecnologia (FCT); Horizon 2020 (654148).

## REFERENCES

**1. **R. Trebino and D. J. Kane, “Using phase retrieval to measure the intensity and phase of ultrashort pulses: frequency-resolved optical gating,” J. Opt. Soc. Am. A **10**, 1101–1111 (1993). [CrossRef]

**2. **S. Akturk, C. D’Amico, and A. Mysyrowicz, “Measuring ultrashort pulses in the single-cycle regime using frequency-resolved optical gating,” J. Opt. Soc. Am. B **25**, A63–A69 (2008). [CrossRef]

**3. **C. Iaconis and I. A. Walmsley, “Spectral phase interferometry for direct electric field reconstruction of ultrashort optical pulses,” Opt. Lett. **23**, 792–794 (1998). [CrossRef]

**4. **T. Witting, F. Frank, C. A. Arrell, W. A. Okell, J. P. Marangos, and J. W. G. Tisch, “Characterization of high-intensity sub-4-fs laser pulses using spatially encoded spectral shearing interferometry,” Opt. Lett. **36**, 1680–1682 (2011). [CrossRef]

**5. **A. Moulet, S. Grabielle, C. Cornaggia, N. Forget, and T. Oksenhendler, “Single-shot, high-dynamic-range measurement of sub-15 fs pulses by self-referenced spectral interferometry,” Opt. Lett. **35**, 3856–3858 (2010). [CrossRef]

**6. **J. Itatani, F. Quéré, G. L. Yudin, M. Y. Ivanov, F. Krausz, and P. B. Corkum, “Attosecond streak camera,” Phys. Rev. Lett. **88**, 173903 (2002). [CrossRef]

**7. **Y. Mairesse and F. Quéré, “Frequency-resolved optical gating for complete reconstruction of attosecond bursts,” Phys. Rev. A **71**, 011401(R) (2005). [CrossRef]

**8. **A. S. Wyatt, T. Witting, A. Schiavi, D. Fabris, P. Matia-Hernando, I. A. Walmsley, J. P. Marangos, and J. W. G. Tisch, “Attosecond sampling of arbitrary optical waveforms,” Optica **3**, 303–310 (2016). [CrossRef]

**9. **V. V. Lozovoy, I. Pastirk, and M. Dantus, “Multiphoton intrapulse interference. IV. Ultrashort laser pulse spectral phase characterization and compensation,” Opt. Lett. **29**, 775–777 (2004). [CrossRef]

**10. **V. Loriot, G. Gitzinger, and N. Forget, “Self-referenced characterization of femtosecond laser pulses by chirp scan,” Opt. Express **21**, 24879–24893 (2013). [CrossRef]

**11. **M. Miranda, T. Fordell, C. Arnold, A. L’Huillier, and H. Crespo, “Simultaneous compression and characterization of ultrashort laser pulses using chirped mirrors and glass wedges,” Opt. Express **20**, 688–697 (2012). [CrossRef]

**12. **D. Fabris, W. Holgado, F. Silva, T. Witting, J. W. G. Tisch, and H. Crespo, “Single-shot implementation of dispersion-scan for the characterization of ultrashort laser pulses,” Opt. Express **23**, 32803–32808 (2015). [CrossRef]

**13. **M. Miranda, C. L. Arnold, T. Fordell, F. Silva, B. Alonso, R. Weigand, A. L’Huillier, and H. Crespo, “Characterization of broadband few-cycle laser pulses with the d-scan technique,” Opt. Express **20**, 18732–18743 (2012). [CrossRef]

**14. **K. W. DeLong, D. N. Fittinghoff, R. Trebino, B. Kohler, and K. Wilson, “Pulse retrieval in frequency-resolved optical gating based on the method of generalized projections,” Opt. Lett. **19**, 2152–2154 (1994). [CrossRef]

**15. **D. J. Kane, G. Rodriguez, A. J. Taylor, and T. S. Clement, “Simultaneous measurement of two ultrashort laser pulses from a single spectrogram in a single shot,” J. Opt. Soc. Am. B **14**, 935–943 (1997). [CrossRef]

**16. **D. J. Kane, “Real-time measurement of ultrashort laser pulses using principal component generalized projections,” IEEE J. Sel. Top. Quantum Electron. **4**, 278–284 (1998). [CrossRef]

**17. **R. W. Gerchberg and W. O. Saxton, “A practical algorithm for the determination of phase from image and diffraction plane pictures,” Optik **35**, 237–246 (1972).

**18. **D. Spangenberg, E. Rohwer, M. H. Brügmann, and T. Feurer, “Ptychographic ultrafast pulse reconstruction,” Opt. Lett. **40**, 1002–1005 (2015). [CrossRef]

**19. **T. Witting, D. Greening, D. Walke, P. Matia-Hernando, T. Barillot, J. P. Marangos, and J. W. G. Tisch, “Time-domain ptychography of over-octave-spanning laser pulses in the single-cycle regime,” Opt. Lett. **41**, 4218–4221 (2016). [CrossRef]

**20. **A. Weiner, “Effect of group velocity mismatch on the measurement of ultrashort optical pulses via second harmonic generation,” IEEE J. Quantum Electron. **19**, 1276–1283 (1983). [CrossRef]

**21. **A. Baltuška, M. S. Pshenichnikov, and D. A. Wiersma, “Amplitude and phase characterization of 4.5-fs pulses by frequency-resolved optical gating,” Opt. Lett. **23**, 1474–1476 (1998). [CrossRef]

**22. **D. E. Wilcox and J. P. Ogilvie, “Comparison of pulse compression methods using only a pulse shaper,” J. Opt. Soc. Am. B **31**, 1544–1554 (2014). [CrossRef]

**23. **P. Rudawski, A. Harth, C. Guo, E. Lorek, M. Miranda, C. Heyl, E. Larsen, J. Ahrens, O. Prochnow, T. Binhammer, U. Morgner, J. Mauritsson, A. L’Huillier, and C. L. Arnold, “Carrier-envelope phase dependent high-order harmonic generation with a high-repetition rate OPCPA-system,” Eur. Phys. J. D **69**, 70 (2015). [CrossRef]

**24. **M. Louisy, C. L. Arnold, M. Miranda, E. W. Larsen, S. N. Bengtsson, D. Kroon, M. Kotur, D. Guénot, L. Rading, P. Rudawski, F. Brizuela, F. Campi, B. Kim, A. Jarnac, A. Houard, J. Mauritsson, P. Johnsson, A. L’Huillier, and C. M. Heyl, “Gating attosecond pulses in a noncollinear geometry,” Optica **2**, 563–566 (2015). [CrossRef]

**25. **F. Silva, M. Miranda, B. Alonso, J. Rauschenberger, V. Pervak, and H. Crespo, “Simultaneous compression, characterization and phase stabilization of GW-level 1.4 cycle VIS-NIR femtosecond pulses using a single dispersion-scan setup,” Opt. Express **22**, 10181–10191 (2014). [CrossRef]