## 2 Modelling
### Ray Optics  
The propagation of electromagnetic waves in a medium can be approached in two different ways, by the ray optics and the wave optics. In the case of wave optics, or physical optics, the light propagates as a wave. Wave optics allows simulating, without modelling approximations, the exact propagation of electric and magnetic fields of light, and the major part of the optical phenomena, such as interference and diffraction, which normally cannot be simulated by geometrical optics. On the other hand, numerical models based on the wave optics are computationally demanding, since the maximum mesh element size must be comparable with the light wavelength. This issue limits the wave optics numerical simulations to applications with geometries that have sizes comparable with the light wavelength, making this approach unsuitable for thermonuclear diagnostics, where the ratio between the geometry size and the radiation wavelength (\(L/\lambda\)) is of the order of \(10^{7}\) for the TS, and a volumetric ratio \((L/\lambda)^{3}\) of \(10^{21}\) (considering only the vacuum vessel) [26]. Ray optics, also known as geometrical optics, describes the propagation of light as rays. The propagation of these rays is based on the reflection, refraction, and absorption equations. Ray optics is the common approach used to simulate the propagation of electromagnetic waves when the geometry size is orders of magnitude larger than the light wavelength, since the computational load required by the numerical simulation is much lower. However, without proper modelling, some physical effects, such as interference, diffraction and polarisation, cannot be simulated by ray optics [27]. The numerical model developed and presented in this work is based on a ray optics approach, where any effect due to wave propagation and interaction with the plasma is simulated as described in the following sections. The base model of ray optics simulates the propagation of the electromagnetic wave by solving the equations of the position (\(q\)) and wave vector (\(k\)) for each ray [27]:  
\[\frac{dq}{dt} = \frac{\partial\omega}{\partial k} \tag{1}\] \[\frac{dk}{dt} = -\frac{\partial\omega}{\partial q} \tag{2}\]  
where \(\omega\) is the angular frequency of the light and the local speed of rays is defined by the speed of light (\(c\)) and the local refractive index of the medium (\(n\)), i.e., \(v=c/n\). Thus, the propagation of the ray position and wave vector is directly simulated once the refractive index field and the light wavelength (or frequency) are known. A magnetic plasma is birefringent and the refractive indexes of the \"slow\" (\(n_{1}\)) and \"fast\" (\(n_{2}\)) waves can be described by the Appleton-Hartree Equation (the collision term is neglected) [6; 15; 28] as follows:  
\[(n_{1,2})^{2}=1-\frac{\omega_{p}^{2}}{\omega^{2}}\left[1+\frac{\omega_{c}^{2} }{\omega^{2}}\frac{\sin^{2}(\theta)}{2\left(1-\frac{\omega_{p}^{2}}{\omega^{2 }}\right)}\left(-1\pm\left(1+F^{2}\right)^{0.5}\right)\right]^{-1} \tag{3}\]  
where \(\omega_{p}\) is the plasma frequency and \(\omega_{c}\) is the electron cyclotron frequency:  
\[\omega_{p} = \sqrt{\frac{N_{e}e^{2}}{m_{e}\varepsilon_{0}}} \tag{4}\] \[\omega_{c} = \frac{eB_{0}}{m_{e}} \tag{5}\]  
And \(N_{e}\) is the electron density, \(e\) and \(m_{e}\) are the charge and mass of the electron, \(\varepsilon_{0}\) is the dielectric permittivity and \(B_{0}\) is the module of the magnetic field. \(F\) is calculated as:  
\[F = \frac{2\omega}{\omega_{c}}\left(1-\frac{\omega_{p}^{2}}{\omega^{2}} \right)\frac{\cos\theta}{\sin^{2}\theta} \tag{6}\]And \(\theta\) is the angle between the magnetic field and the light propagation direction. In thermonuclear plasmas, the effect of magnetic field on the ray propagation can be neglected (to a first approximation) and the refractive index becomes [6]:  
\[n^{2}\ =\ 1-\frac{\omega_{p}^{2}}{\omega^{2}} \tag{7}\]  
The ray optics model is based on the continuous interaction between the rays and the \"environment\", i.e., the plasma, the vacuum, the air, the optics, etc.