SUBROUTINE CDP3AN ( * * inputs * : S0, S1, S2, THETA1, THETA2, * * outputs * : INTEN, Q, U, STATUS) * * Module Number: * * Module Name: * * Keyphrase: * ---------- * Calculate Stokes parameters from three measurements made at three different * roll angles. * * Description: * ------------ * Calculate Stokes parameters from three measurements made at three different * roll angles. These three angles are zero degree, theta1, and theta2; where * theta1 should be positive and theta2 should be negative. * The absolute values of theta1 and theta2 should be within the range of 45 * and 70 degrees, and ideally 60 degrees. The unit of all input angles is in * degrees. * The output intensity is actually the intensity of the light source * multiplied by (k1+k2)/2, where k1 and k2 are the principle transmittances of * the linear polarizer. * * FORTRAN Name: CDP3AN.FOR * * Keywords of Accessed Files and Tables: * -------------------------------------- * Name I/O Description / Comments * None * * Subroutines Called: * ------------------- * CDBS: * None * SDAS: * UMSPUT * OTHERS: * None * * History: * -------- * Version Date Author Description * 1 07-15-86 J.-C. Hsu Design and coding * 2 10-01-87 J.-C. Hsu F77 standard *------------------------------------------------------------------------------- * *== input: * --measurement made at roll angle = zero * --degree REAL S0, * --measurement made at roll angle = +theta1 : S1, * --measurement made at roll angle = -theta2 : S2, : THETA1, THETA2 * *== output: * --intensity of the target REAL INTEN, * --the second Stokes parameter : Q, * --the third Stokes parameter : U * --error status INTEGER STATUS * *== local: * REAL RADN, : SIN1, SIN2, : COS1, COS2, : SIN12 INTEGER STATOK * --error message context CHARACTER*130 CONTXT, MESS *=========================begin hsp.inc========================================= * --status return code INTEGER OK, ERRNUM(20) INTEGER DEST, PRIO DATA OK /0/ DATA ERRNUM /701, 702, 703, 704, 705, 706, 707, 708, 709, 710, : 711, 712, 713, 714, 715, 716, 717, 718, 719, 720/ * --message destination and priority DATA DEST, PRIO /1, 0/ *=========================end hsp.inc=========================================== *------------------------------------------------------------------------------- * * translate angles to radians * RADN = 57.29577951 THETA1 = THETA1 / RADN THETA2 = - THETA2 / RADN * SIN1 = SIN (2. * THETA1) SIN2 = SIN (2. * THETA2) COS1 = COS (2. * THETA1) COS2 = COS (2. * THETA2) SIN12 = SIN (2. * (THETA1 + THETA2)) * * calculate Intensity * INTEN = (S0 * SIN12 - S1 * SIN2 - S2 * SIN1) / : (SIN12 - SIN1 - SIN2) * * check if intensity is zero * IF (INTEN .EQ. 0) THEN CONTXT = 'zero intensity, can not calculate other Stokes ' : // 'parameters' STATUS = ERRNUM(1) GO TO 999 END IF * * calculate q * Q = (S1 * SIN2 + S2 * SIN1 - S0 * (SIN1 + SIN2)) / : (S0 * SIN12 - S1 * SIN2 - S2 * SIN1) * * calculate u * U = (S1 * (COS2 - 1.) - S2 * (COS1 - 1.) + S0 * (COS1 - COS2)) / : (S0 * SIN12 - S1 * SIN2 - S2 * SIN1) * STATUS = OK GO TO 1000 * 999 MESS = 'CDP3AN: ' // CONTXT CALL UMSPUT (MESS, DEST, PRIO, STATOK) * 1000 RETURN END