I have established the relationship between the angle of polarization at 
the SHARP input (PHI_INSTRUMENT) and the measured Stokes' parameters q and 
u.

First, some definitions:

The way I get the Stokes parameters is using quicklook to get the 
polarization signal as a function of hwp angle, and then using the 
convention for Q and U that is posted on the analysis logbook in October.

Note that this October memo gives a prescription for getting from the 
measured H and V signals for 4 hwp angles to q and u.  For this purpose, 
the four hwp angles are identified as 0, 22.5, 45, and 67.5, even though 
the actual encoder readings may have been different.  (Essentially all the 
science data used an initial angle of 35 degrees as measured by the 
encoder.  But a few of the grid tests were taken with 20 degrees as the 
initial angle.)

The angle of polarization at the SHARP input (PHI_INSTRUMENT) is also 
defined in the October memo.

The first plot shows the normalized Stokes' parameters and the percentage 
polarization for each of the ten grid tests.  Note that the percentage 
polarization is significantly less than unity.  Some of the inefficiency 
may be due to the calibration grid that is taken from SPARO, which was 
designed for 450, not 350 microns.

The second plot shows the "raw" or uncorrected value of PHI_INSTRUMENT, 
obtained from the stokes parameters according to:

q = P * cos(2 * PHI_INSTRUMENT)
u = P * sin(2 * PHI_INSTRUMENT)

...and also the "corrected" value of PHI_INSTRUMENT.  The correction is 
applied to both the sign and offset in order that the value of 
PHI_INSTRUMENT should match the known angle of polarization that we input 
using the grid.

The empirically-determined relationship between raw and corrected angles 
is:

PHI_INSTRUMENT = -1 * PHI_INSTRUMENT(RAW) + 60 degrees  

A few comments about the second plot:

(1) The ylabel on the second plot should really say "angle of 
polarization", not "angle of grid" but it would take me a while to remake 
it, so I will leave it as is for now.

(2) The correction I did brings the grid tests done starting at 35 degrees 
into line, but if we wanted to bring the ones starting at 20 degrees into 
line we would have to apply a different correction.

(3) It says in the log that the third grid test was done starting at an 
angle of 30, but my recollection was that I did it starting at 35.  From 
the results, it looks like my recollection was correct, not the log, as it 
fits very well with the others done at 35 degrees.

(4) Except for the sixth grid test, all the angles are within about a 
degree or two of where they should be.  The sixth grid test is off by 
about 7 degrees.