## 2 Materials and Methods
### THz-TDS Time-of-Flight Method  
As shown in Figure 2, a THz pulse propagating in a medium is a superposition of plane harmonic waves with frequencies defined by its spectrum. Mathematically, the spectrum of the pulse together with the phase of each spectral component can be calculated by means of the Fourier transform [25].  
The time of flight of the pulse throughout a cuvette can be conveniently defined by a group velocity represented by the speed of the center of the mass of a wave packet. In the first and simplest approximation of negligible absorption and dispersion, the group velocity of a wave packet or pulse can be approximated by the phase velocity of its middle  
Figure 3: The reference pulse measurement principle using the _2f_ quasi-optical setup: (**a**) digital camera photograph of the setup with the red arrow indicating the part of the beam where the THz pulse passes freely between the emitter and detector and the blue arrow indicating the beam transmitted through the cuvette; (**b**) TDS waveforms measured without (upper graph) and with (lower graph) the measuring cuvette. Above the pulses, the colorful arrows designate the freely passing and cuvette-transmitted parts of the beam, respectively. The pulses undergoing multiple reflections are indicated by dashed blue lines. The color code is consistent between the upper and lower graphs.  
frequency [26]. A simple linear equation relates the TOF of the THz pulse in air, \(t_{air}\), with the refractive index, \(n_{air}\), and the length of the cuvette, \(l\):  
\[t_{air}=\frac{l}{c}n_{air}. \tag{1}\]  
Here, \(c\) denotes the speed of light in vacuum. Analogically, the TOF of the pulse, \(t\), sent through a cuvette filled with a substance of the refractive index, \(n\), can be calculated as:  
\[t=\frac{l}{c}n, \tag{2}\]  
so that the difference between both times, \(t-t_{air}=\Delta t\):  
\[\Delta t=\frac{l}{c}(n-1), \tag{3}\]  
provides the means to determine the refractive index of the substance. Note that in Equation (3), the approximation of \(n_{air}\cong 1\) was used. The accuracy of the determination of \(n\) depends on the accuracy of the measured \(\Delta t\). A simple calculation shows that for the cuvette length \(l=10.00\) mm, corresponding to the longest of the cuvettes that were used, \(\Delta(n-1)\sim 10^{-5}\) if \(\Delta t\sim 10^{-15}\) s. This remarkable result proves that, in principle, very low concentrations of admixtures introducing \(\sim\)\(10^{-5}\) changes in the refractive index can be detected by a straightforward THz-TDS TOF measurement. A prerequisite for such measurement is a stable position and shape of a THz pulse generated by a TDS spectrometer. In Section 3.1, we show that such accuracy was achieved with our measurement setup.  
For the purpose of admixture detection in gasoline, it is more convenient to reference the time difference, \(\Delta t\), to the TOF of the pulse through a cuvette filled with pure gasoline. This situation is schematically depicted in Figure 4b. According to Equation (3) the first of the TOFs, \(t_{nD}\), is related to the refractive index of a mixture, \(n_{D}\). The second TOF, the reference time-of-flight, \(t_{nG}\), is related with the refractive index of gasoline and the difference between the times of flight, \(\Delta t\), is calculated as:  
\[\Delta t=t_{n_{D}}-t_{n_{G}}=\frac{l}{c}(n_{D}-1)-\frac{l}{c}(n_{G}-1)=\frac{l }{c}(n_{D}-n_{G}). \tag{4}\]  
The equation above can be used to plot the measured \(\Delta t\) as a function of admixture concentration, providing that the model of the refractive index of the solution, \(n_{D}\), is known. The refractive index of pure gasoline, \(n_{G}\), can be determined, e.g., by performing the reference TOF measurement in the empty cuvette and then using Equation (3).