The STOKES command operates on the current UV buffer, or on files if the /FILE option is present. It allows to extract a UV data with visibilities for one output (pseudo-)Stokes parameter from UV data with visibilities with 1,2 or 4 (pseudo-)Stokes parameters. Besides the standard Stokes parameters I, Q, U, V, RR, LL, RL, LR (Left and Right circular), XX, YY, XY and YX (X and Y linear) which are defined in the Sky frame14, command STOKES recognizes pseudo-Stokes values NONE, HH, VV, HV and VH which are the linear polarization states in the frame of the antennas (Horizontal and Vertical pure states).
Conversion from the H-V pseudo-Stokes polarization states to any standard Stokes parameter is made by the STOKES command by applying the rotation due to the parallactic angle. For this, the UV data set must contain the PARA_ANGLE extra column. If it is not present, it can be added to the data set by command UV_ADD /FILE. That command can also insert the Doppler correction as an extra column.
Script stokes-split can be used to split a full polarization UV table in 4 UV tables, one for each IQUV Stokes parameter, following the standard naming convention expected for final image use by MAP_POLAR.