Stokes vectors
4.8.1. Background and theory
Basically, two different, complementary representations are used to describe the state of polarisation of light, i.e. electromagnetic waves. One is called the Jones vector representation, while the other is referred to as the Stokes vector representation. Since the Jones representation is based on the electric field vector, it can consider the coherent superposition of waves but is limited to representing fully polarised light. In contrast, the Stokes notation cannot be used to model interference effects but is inherently able to cover unpolarised or partially polarised radiation. As mentioned in the introduction, the RadiCal approach considers effects relying on coherence only for interactions at material boundaries (including thin-film effects) but not for propagation within a medium. Still, the state and angle of polarisation of the traced light beams are crucial information for the light-surface interactions and consequently have to be tracked during the raytracing process. The Stokes representation is the ideal model for this purpose and has, thus, been chosen for the implementation of the raytracer.
The Stokes parameters are the four components 𝑆𝑖 of the Stokes vector 𝑆 . Alternatively, they are often denominated as 𝐼,𝑄,𝑈, 𝑉. They can be defined as (Kliger et al., 1990; Bass et al., 1995; Hecht, 2015):

The definition based on the amplitudes of the electric field vector (〈𝐸 2 〉) links the Stokes parameters to the electrodynamic fundamentals. The second definition is based on irradiance values (𝐼), measured behind ideally linearly and circularly polarising filters. This definition reflects the empirical approach.
While the definition of the Stokes vector might seem impractical at first glance, it indeed provides a very efficient method to describe the polarising or depolarising effects to which light beams can be subjected, as is shown below. Based on its definition, the primary polarisation states are represented by the nomalised Stokes vectors provided in Table 6.

Additional (scalar) parameters used to describe the state of polarisation can easily be calculated from the Stokes parameters by (Bass et al., 1995; Garcia-Caurel et al., 2013):

Since the Stokes parameters are usually provided in vector form, it is convenient to perform transformations of them by applying matrix multiplication (see the following chapter).
Ellipsometry is a powerful method to investigate the electrodynamic properties, i.e. the complex refractive index, of material surfaces or thin-flims. For this field, a third definition of the Stokes vector is provided by introducing the ellipsometric angles [rad] and [rad] as:

Represents the amplitude ratio of the orthogonal components, whereas is the phase difference between them. While the phase difference as already been introduced using the lowercase Greek letter, the capital letter will be used here to stay in line with ellipsometric conventions. Using the ellipsometric angles, equation (56) can be rewritten as:

The inversion of this definition allows to express the ellipsometric angles by the Stokes parameters.
This reflects the empirical process, as the Stokes components are measured in ellipsometry:

The nomalised Stokes vector 𝑆 ′, that describes the polarisation state independent of the total irradiance, is defined as:

4.8.2. Implementation
The implementation of the Stokes vector definition is trivial. A new type called TStokesVect, representing an array of 4 scalar values (of type double), is defined in the rc_globals module. Additionally, the definitions for the basic polarisations states are included in the same module:

For the elementary manipulation of Stokes vectors and the calculation of characteristic parameters according to equations (57), the following methods have been implemented in the globally applied module rc_vectors.

4.8.3. Testing and validation
Simple tests of the methods were performed during the implementation process. Extensive validation is included in the following section.