The following equations definitions of Stoke-vector and Mueller-matrix in polanalyser.
Note that, these equations are automatically generated by polanalyser's sympy feature.
$$
\mathbf{s} = \left[\begin{matrix}s_{0} \\
s_{1} \\
s_{2} \\
s_{3}\end{matrix}\right]
$$
$$
0.5 \mathrm{atan}{\left(\frac{s_{2}}{s_{1}} \right)}
$$
$$
\frac{\sqrt{s_{1}^{2} + s_{2}^{2} + s_{3}^{2}}}{s_{0}}
$$
$$
\frac{\sqrt{s_{1}^{2} + s_{2}^{2}}}{s_{0}}
$$
$$
\frac{\left|{s_{3}}\right|}{s_{0}}
$$
$$
0.5 \mathrm{atan}{\left(\frac{s_{3}}{\sqrt{s_{1}^{2} + s_{2}^{2}}} \right)}
$$
$$
\mathbf{M} = \left[\begin{matrix}m_{00} & m_{01} & m_{02} & m_{03} \\
m_{10} & m_{11} & m_{12} & m_{13} \\
m_{20} & m_{21} & m_{22} & m_{23} \\
m_{30} & m_{31} & m_{32} & m_{33}\end{matrix}\right]
$$
$$
\left[\begin{matrix}0.5 & 0.5 \cos{\left(2 \theta \right)} & 0.5 \sin{\left(2 \theta \right)} & 0 \\
0.5 \cos{\left(2 \theta \right)} & 0.5 \cos^{2}{\left(2 \theta \right)} & 0.5 \sin{\left(2 \theta \right)} \cos{\left(2 \theta \right)} & 0 \\
0.5 \sin{\left(2 \theta \right)} & 0.5 \sin{\left(2 \theta \right)} \cos{\left(2 \theta \right)} & 0.5 \sin^{2}{\left(2 \theta \right)} & 0 \\
0 & 0 & 0 & 0\end{matrix}\right]
$$
$$
\left[\begin{matrix}1 & 0 & 0 & 0 \\
0 & \cos{\left(2 \theta \right)} & \sin{\left(2 \theta \right)} & 0 \\
0 & - \sin{\left(2 \theta \right)} & \cos{\left(2 \theta \right)} & 0 \\
0 & 0 & 0 & 1\end{matrix}\right]
$$
$$
\left[\begin{matrix}1 & 0 & 0 & 0 \\
0 & \sin^{2}{\left(2 \theta \right)} \cos{\left(\delta \right)} + \cos^{2}{\left(2 \theta \right)} & - \sin{\left(2 \theta \right)} \cos{\left(\delta \right)} \cos{\left(2 \theta \right)} + \sin{\left(2 \theta \right)} \cos{\left(2 \theta \right)} & - \sin{\left(\delta \right)} \sin{\left(2 \theta \right)} \\
0 & - \sin{\left(2 \theta \right)} \cos{\left(\delta \right)} \cos{\left(2 \theta \right)} + \sin{\left(2 \theta \right)} \cos{\left(2 \theta \right)} & \sin^{2}{\left(2 \theta \right)} + \cos{\left(\delta \right)} \cos^{2}{\left(2 \theta \right)} & \sin{\left(\delta \right)} \cos{\left(2 \theta \right)} \\
0 & \sin{\left(\delta \right)} \sin{\left(2 \theta \right)} & - \sin{\left(\delta \right)} \cos{\left(2 \theta \right)} & \cos{\left(\delta \right)}\end{matrix}\right]
$$
$$
\left[\begin{matrix}1 & 0 & 0 & 0 \\
0 & \cos^{2}{\left(2 \theta \right)} & \sin{\left(2 \theta \right)} \cos{\left(2 \theta \right)} & - \sin{\left(2 \theta \right)} \\
0 & \sin{\left(2 \theta \right)} \cos{\left(2 \theta \right)} & \sin^{2}{\left(2 \theta \right)} & \cos{\left(2 \theta \right)} \\
0 & \sin{\left(2 \theta \right)} & - \cos{\left(2 \theta \right)} & 0\end{matrix}\right]
$$
$$
\left[\begin{matrix}1 & 0 & 0 & 0 \\
0 & - \sin^{2}{\left(2 \theta \right)} + \cos^{2}{\left(2 \theta \right)} & 2 \sin{\left(2 \theta \right)} \cos{\left(2 \theta \right)} & 0 \\
0 & 2 \sin{\left(2 \theta \right)} \cos{\left(2 \theta \right)} & \sin^{2}{\left(2 \theta \right)} - \cos^{2}{\left(2 \theta \right)} & 0 \\
0 & 0 & 0 & -1\end{matrix}\right]
$$
Intensity through polarizer
$$
I(\theta) = 0.5 s_{0} + 0.5 s_{1} \cos{\left(2 \theta \right)} + 0.5 s_{2} \sin{\left(2 \theta \right)}
$$
Observation of polarization camera
Polarization camera captures 0, 45, 90, 135 degree linear polarized light.
The intensity of the light through the polarizer is given by the following equations.
$$
\begin{align*}
I(0) &= 0.5 s_{0} + 0.5 s_{1} \\
I(45) &= 0.5 s_{0} + 0.5 s_{2} \\
I(90) &= 0.5 s_{0} - 0.5 s_{1} \\
I(135) &= 0.5 s_{0} - 0.5 s_{2} \\
\end{align*}
$$
From the observation of the polarization camera, we can estimate the stokes parameters as follows.
$$
\begin{align*}
s_0 &= 0.5 I(0) + 0.5 I(135) + 0.5 I(45) + 0.5 I(90) \\
s_1 &= 1.0 I(0) - 1.0 I(90) \\
s_2 &= - 1.0 I(135) + 1.0 I(45) \\
\end{align*}
$$