6. SHS analysis

Once the spectrum analysis for all the angles has been performed, see ref:polarisation_procedure_page, several observables can be extracted from the angle-dependent intensity data. Many possible analyses can be made depending on what you are looking for. We are detailling the two that are commonly used at your lab, ILM.

See tutorial_SHS for examples.

_images/alpaga_18.jpg

But, if you have developed your own code that extracts other observable from the intensity in function of the polarization angle data, please do not hesitate to contact us so that this code can be added in Alpaga!

6.1. Theoritical stuff

6.1.1. a, b ,c formalism

One can show that the expression of the Second Harmonic Scattering (SHS) intensity resolved in polarization is (see for instance [5] Chp V or [7] Chp II):

\[I^{\Gamma}_{SHS}(\gamma) = a^{\Gamma}cos^4(\gamma) + b^{\Gamma} cos^2(\gamma)sin^2(\gamma) + c^{\Gamma}sin^4(\gamma)\]

with a, b ,c coefficients depending of hyperpolarizabylity (ref papier), \(\gamma\) the polarization’s state of the incomming light and \(\Gamma\) the polarization’s state of the scattered light ( Vertical or Horizontal ).

From this formula and the a, b ,c parameters, we can calculate three experimental observables, see [9] or [10] :

  • D : The depolarization ratio

\[D = \frac{c^V}{a^V}\]
  • ZetaV / ZetaH

\[\begin{split}\zeta^V = \frac{b^V - a^V - c^V}{b^V} ~~~~~~~~~~~~~~~~~~~~~~~~ \zeta^H = \frac{a^H - c^H}{a^H + c^H}\\\end{split}\]

To compute uncertainties for Zeta and D, we first propagate the uncertainties from the Gaussian fit : for that we use « weight » in the Ishs fit procedure (Python function). From this fitting procedure, standard deviations on a, b ,c are obtained as the diagonal of the covariance matrix [11]:

\[\begin{split}\begin{pmatrix} \sigma_a^2 & cov(a,b) & cov(a,c) \\ . & \sigma_b^2 & cov(b,c) \\ . & . & \sigma_c^2 \end{pmatrix}\\\\\end{split}\]

Then we calculate uncertainties on the observables using gaussian error propagation formula, see [7] page 60:


\[\begin{split}\sigma^2(f) &=~ \left(\frac{\partial f}{\partial a}\right)^2 \sigma_a^2 + \left(\frac{\partial f}{\partial b}\right)^2 \sigma_b^2 + \left(\frac{\partial f}{\partial c}\right)^2 \sigma_c^2 \\ \\ \\\end{split}\]

Finally, the uncertainties on D, zetaV and zetaH are calculated in Alpaga as follow:

\[\begin{split}\sigma^2(D) &=~ \frac{c^2}{a^4} \sigma_a^2 +\frac{1}{a^2} \sigma_c^2 \\ \\ \sigma^2(\zeta^V) &=~ \frac{1}{b^2} \left( \sigma_a^2 + \sigma_c^2 \right) + \left(\frac{a + c}{ b^2}\right)^2 \sigma_b^2 \\ \\ \sigma^2(\zeta^H) &=~ \frac{4}{(a+c)^2}\end{split}\]

6.1.2. i0, i2, i4 formalism

Polarized-SHS resolved experiments can also be analyzed with Fourier series developments see [12] :

\[I^{\Gamma}_{SHS}(\gamma) = i_0^{\Gamma} + i_2^{\Gamma} cos(2\gamma) + i_4^{\Gamma}cos(4\gamma)\]

Then coefficients can be estimated as Fourrier series:

\[\begin{split}\tilde{i}_0 &= \frac{1}{N} \, \sum_{n = 0}^{N -1} \, I_n \simeq i_0^{} \\ \tilde{i}_2 &= \frac{2}{N} \, \sum_{n = 0}^{N -1} \, I_n \, cos(2\gamma_n) \simeq i_2^{} \\ \tilde{i}_4 &= \frac{2}{N} \, \sum_{n = 0}^{N -1} \, I_n \, cos(4\gamma_n) \simeq i_4^{}\end{split}\]

where N is the number of measurements.

We can then obtain all the contributions from the signal:

_images/water_shs_fs.png

All graphs are plotted as a function of the incoming polarization angle.

  • TOP LEFT: raw data of \(I_{SHS}\) for V-outlet Polarisation, and fit \(i_0 + i_2 ~cos(2\gamma) + i_4~cos(4\gamma)\) in continuous curve.

  • TOP RIGHT : \(I_{SHS}^V - i_0 - i_4 ~cos(4 \gamma)\) in dots, and fit \(i_2 ~cos(2 \gamma)\) in continuous curve.

  • BOTTOM LEFT : \(I_{SHS}^V - i_0 - i_2 ~cos(2 \gamma)\) in dots, and fit \(i_4 ~cos(4 \gamma)\) in continuous curve.

  • BOTTOM RIGHT : Residues : \(I_{SHS}^V - i_0 - i_2 ~cos(2\gamma)-i_4 ~cos(4 \gamma))\) in dots, and his mean value in continous curve.

Here is the python code:

fig, axes = plt.subplots(nrows=2, ncols=2, figsize=(12, 8))
axes[0][0].plot(L_x,L_y, 'o' , label='SHS' )
axes[0][0].plot(L_x, (i0 + i2*np.cos(2*np.pi/180*(L_x-alpha_0)) + i4*np.cos(4*np.pi/180*(L_x-alpha_0)) ), '-', label='SHS fit' )
axes[0][0].legend(loc='best')

axes[0][1].plot(L_x, L_y - (i0+i4*np.cos(4*np.pi/180*(L_x-alpha_0))),  'o',  label='i2')
axes[0][1].plot(L_x, i2*np.cos(2*np.pi/180*(L_x-alpha_0)),  '-',  label='i2 fit')
axes[0][1].legend(loc='best')

axes[1][0].plot(L_x,L_y - (i0 + i2*np.cos(2*np.pi/180*(L_x-alpha_0)) ),  'o', label='i4')
axes[1][0].plot(L_x, i4*np.cos(4*np.pi/180*(L_x-alpha_0)),  '-',  label='i4 fit')
axes[1][0].legend(loc='best')

axes[1][1].plot(L_x,L_y - (i0 + i2*np.cos(2*np.pi/180*(L_x-alpha_0)) + i4*np.cos(4*np.pi/180*(L_x-alpha_0)) ), 'o', label='res'  )
axes[1][1].plot(L_x,L_res_mean,  label='res mean' )
axes[1][1].legend(loc='lower left')
axes[1][1].set_ylim([-23, 23])
fig.tight_layout()

In order to compute the uncertainties on our observables, we use the residue from the analysis to calculate the standard deviation as:

\[\sigma_{\tilde{i_0}} = \frac{\sigma_{res}}{\sqrt{N}} ~~;~~ \sigma_{\tilde{i_2}} = \frac{\sigma_{res}}{\sqrt{2N}} ~~;~~ \sigma_{\tilde{i_4}} = \frac{\sigma_{res}}{\sqrt{2N}}\]

6.2. Numerical Stuff

All of these calculations are numericaly implemented in shs_module.analyse_polarization_SHS in V and H version:

shs_module.analyse_polarization_SHS_V(L_angle, L_intensity, alpha_0=False, L_intensity_error=False)[source]

From the polarization angle and the SHS Gaussian intensity, compute and return several properties.

Parameters:
  • L_angle (list) – The polarization angle of the fundamental in degrees.

  • L_intensity (list) – The HRS intensity. The size of L_angle and L_intensity must match.

  • alpha_0 (bool or float, optional) – If set to False, alpha_0 is treated as a fit parameter. If set to a float, alpha_0 is fixed to the given value (not a free parameter). The angle must be given in degrees.

  • L_intensity_error (bool or list, optional) – If set to False, uncertainties are not computed. If set to a list, L_intensity_error provides the absolute error associated with each intensity value.

Returns:

  • L_SHS_prop (list) – The list of computed properties: [a, b, c, Zeta, Depol, i0, i2, i4, alpha_0].

  • L_SHS_prop_error (list) – The list of uncertainties associated with the computed properties: [a_verr, b_verr, c_verr, Zeta_serr, i0_serr, i2_serr, i4_serr].


shs_module.analyse_polarization_SHS_H(L_angle, L_intensity, alpha_0=False, L_intensity_error=False)[source]

From the polarization angle and the SHS Gaussian intensity, compute and return several properties.

Parameters:
  • L_angle (list) – The polarization angle of the fundamental in degrees.

  • L_intensity (list) – The HRS intensity. The size of L_angle and L_intensity must match.

  • alpha_0 (bool or float, optional) – If set to False, alpha_0 is treated as a fit parameter. If set to a float, alpha_0 is fixed to the given value (not a free parameter). The angle must be given in degrees.

  • L_intensity_error (bool or list, optional) – If set to False, uncertainties are not computed. If set to a list, L_intensity_error provides the absolute error associated with each intensity value.

Returns:

  • L_SHS_prop (list) – The list of computed properties: [a, b, c, alpha_0, Zeta, Depol, i0, i2, i4].

  • L_SHS_prop_error (list) – The list of uncertainties associated with the computed properties: [a_verr, b_verr, c_verr, Zeta_serr, i0_serr, i2_serr, i4_serr].

Release:

1.2

Date:

Aug 26, 2025