The {un,re}packStokes functions convert between an Array of StokesVector or CStokesvector into an Array of Float/Double or Complex/DComplex. The Float/Double array has one more dimension than the corresponding StokesVector array, and this extra dimension (always the slowest moving or last one) has a length of 4. The output array is always resized to the appropriate size.
The StokesVector comparison functions use the the "length" of the StokesVector (ie. sqrt(I^2+Q^2+U^2+V^2)) to make a comparison. In particular the abs() function returns the "length" of the StokesVector. It is called abs rather than say length() to allow StokesVectors to utilise other globals functions (like allNearAbs()) which expect the absolute value function to be defined.
Convert an Array of StokesVectors to an array of Floats or Doubles (depending on the templates). The same function can be used to convert an array of CStokesVectors to a Complex or DComplex Array. I have not tested if this works for other template types.
Convert an Array of Floats or Doubles to an Array of StokesVectors. The same function can be used to convert a Complex/DComplex array to an array of CStokesVector. The last non-degenerate axis on the input array MUST be of length 4
These Functions to multiply a StokesVector by an Array of Floats. The result is an Array of StokesVectors that is the same size as the Array of Floats with each polarization being the Array of floats multiplied by the corresponding component in the supplied StokesVector.
Functions to compare stokesVectors with each other. They are all based on the norm derived using the "length" of the vector in 4-space.
Functions to determine if one StokesVector is near another