## 2 In-Cavity Pulse Shaping  
### Design Rationale and Numerical Model  
The design of in-cavity pulse shaping by spectral filtering exploits the understanding gained by our recent work [34]. The cavity configuration considered is a simple ring cavity, as shown in Figure 1. A short (a few meters) segment of rare-earth doped fibre with normal GVD acts as the gain and nonlinear element of the cavity. The gain fibre is followed by a saturable absorber (SA) element initiating and stabilising the mode-locked operation and an amplitude and phase spectral filter, which realises the pulse shaping. Note that for the Nyquist pulse shaping described thereafter, the positioning of the SA and filter in the cavity is reversed, as we found that coupling the filter to receive output light from the fibre amplifier enabled a wider tunability range for the filter bandwidth. The output of the laser is monitored behind a coupler at the output of the filter. Pulse propagation in the laser cavity can be described by a theoretical model that includes the dominant physical effects of the system on the evolution of a pulse over one round trip inside the cavity [38]. These effects include GVD, SPM, gain saturation and bandwidth-limited gain for the active fibre, as well as the discrete effects of the SA and spectral filter. The evolution in the fibre section is described by a standard modified nonlinear Schrodinger equation [38]:  
\[i\psi_{z}-\frac{1}{2}\beta_{2}\psi_{tt}+\gamma|\psi|^{2}\psi=\frac{i}{2}g \left(\psi+\frac{1}{\Omega^{2}}\psi_{tt}\right) \tag{1}\]  
where \(\psi=\psi(z,t)\) is the slowly-varying amplitude of the pulse envelope, \(z\) and \(t\) are the propagation and time delay parameters, \(\beta_{2}\) is the GVD parameter and \(\gamma\) is the coefficient of the cubic nonlinearity of the fibre. The gain is saturated according to \(g=g(z)=g_{0}/(1+W/W_{0})\), where \(g_{0}\) is the small-signal gain, \(W(z)=\int\!\mathrm{d}t\,|\psi|^{2}\) is the pulse energy and \(W_{0}\) is the gain saturation energy determined by the pump power. The action of the fast SA is approximated by a simplified, but generic, nonlinear transfer function describing its transmittance [38]: \(T=1-q_{0}/[1+P(t)/P_{0}]\), where \(q_{0}\) is the unsaturated loss due to the absorber, \(P(z,t)=|\psi(z,t)|^{2}\) is the instantaneous pulse power and \(P_{0}\) is the saturation power. The filter is modelled by the spectral response \(H(f)=R(f)\exp\left[i\beta_{2,\mathrm{acc}}(2\pi f)^{2}/2\right]\), where \(R(f)\) is the Fourier transform of a certain objective waveform function \(r(t)\), and the spectral phase adds a specific amount of GVD to the cavity. By varying the curvature \(\beta_{2,\mathrm{acc}}\) (in \(\mathrm{ps}^{2}\)) of the parabolic phase function, we can control the net dispersion of the cavity. The numerical model is solved with a standard symmetric split-step propagation algorithm, and the initial field is a picosecond Gaussian temporal profile. The following parameters, typical of ytterbium-doped fibres [7], are used in the simulations: \(\beta_{2}=25\mathrm{fs}^{2}/\mathrm{mm}\), \(\gamma=0.005\,\left(\mathrm{W}\,\mathrm{m}\right)^{-1}\), and \(\Omega\) corresponds to a 40-nm bandwidth at FWHM. Furthermore, \(g_{0}\) corresponds to 30 dB/m in power, \(W_{0}=150\) pJ, \(P_{0}=150\) W, and 70% of laser power is tapped out of the cavity. The main pulse-shaping mechanism of our laser design relies on enhanced spectral filtering of a nonlinearly spectrally-broadened pulse in the cavity [34]. A significant nonlinear phase shift is impressed on the pulse in the fibre section. The spectral filter compensates both the broad pulse duration and bandwidth after the fibre segment. The principle of filtering a strongly-phase-modulated pulse both in frequency and time has already been exploited to achieve new mode-locking regimes in fibre lasers [8,10]. In [34], we extended this approach to more complex features.