SUBROUTINE VPOLEF * * Module Number: 15.12.2 * * Module Name: poleffv * * Keyphrase: * ---------- * Calculate polarization efficiencies (transmission coefficients) * * Description: * ------------ * This module calculates polarization efficiencies for any number of apertures * (up to 20). * The polarization transmission coefficiet of each aperture is calculated from * measurements at three different roll angles. The distribution of roll angles * should be such that they cover more than 90 degrees. Ideally, they should * be 60 degrees from one another. For the same aperture, more than one * measurements may be taken at the same roll angle. Also, for the same * aperture, input data must have the same target, and roughly obtained at the * same temperature/epoch. * In this module, the observed target should be polarized standard stars. * Maximum number of input data points is 2000. * * FORTRAN Name: VPOLEF.FOR * * Keywords of Accessed Files and Tables: * -------------------------------------- * Name I/O Description / Comments * * Subroutines Called: * ------------------- * CDBS: * VPEFGT, VPEFBN, VPEFPT * SDAS: * UMSPUT * OTHERS: * none * * History: * -------- * Version Date Author Description * 1 07-15-86 J.-C. Hsu Design and coding * 2 10-05-87 J.-C. Hsu F77 standard * 3 11-08-89 J.-C. Hsu error propagation *------------------------------------------------------------------------------- * *== local: * --maximum size of input data arrays INTEGER SIZE, * --maximum number of apertures : NAPER PARAMETER (SIZE = 2000) PARAMETER (NAPER = 20) * --count rate REAL CNT(SIZE), * --count rate's standard deviation : CNTSD(SIZE), * --polarization efficiency and its error : PEFF(NAPER), DPEFF(NAPER), * --position angle difference Aand its error : PADIF(NAPER), DPADIF(NAPER), * --intensity and its error : INTEN(NAPER), DINTEN(NAPER), * --temperature : TEMP(SIZE), * --mean temperature : TMPAVE(NAPER), * --position angle of aperture used : APPA(SIZE) * --epoch DOUBLE PRECISION EPOCH(SIZE), * --mean epoch : EPAVE(NAPER) * --number of input data points INTEGER NPTS, * --number of apertures : NROWS, * --return status : STATUS, STATOK CHARACTER*5 CHAR5 * --data type CHARACTER*7 TYPE * --aperture CHARACTER*10 APERT(SIZE) * --column name of the temperature CHARACTER*16 TNAME * --target name CHARACTER*20 TARGET(SIZE) * --output table name CHARACTER*128 OFILE * --error message context CHARACTER*130 CONTXT, MESS *=========================begin hsp.inc========================================= * --status return code INTEGER OK, ERRNUM(20) * --message destination and priority 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/ DATA DEST, PRIO /1, 0/ *=========================end hsp.inc=========================================== *------------------------------------------------------------------------------- * * read parameters and input data * CALL VPEFGT ( CNT, CNTSD, APPA, TEMP, EPOCH, TYPE, : APERT, TARGET, NPTS, OFILE, TNAME, STATUS) * IF (STATUS .NE. OK .OR. NPTS .GT. SIZE) THEN WRITE (CHAR5, '(I5)') SIZE CONTXT = 'cannot get input parameters/data or more than ' : // CHAR5 // ' input points' GO TO 999 END IF * * sort input data based on aperture/roll angle, calculate Stokes parameters for * each aperture, and write the result to output table * CALL VPEFBN (CNT, CNTSD, APPA, TEMP, EPOCH, NPTS, : APERT, TARGET, : PEFF, PADIF, INTEN, DPEFF, DPADIF, DINTEN, : TMPAVE, EPAVE, NROWS, STATUS) IF (STATUS .NE. OK) GO TO 1000 * * write the result to the output table * CALL VPEFPT (OFILE, APERT, PEFF, PADIF, INTEN, DPEFF, DPADIF, : DINTEN, TMPAVE, EPAVE, TARGET, NROWS, STATUS) IF (STATUS .NE. OK) GO TO 1000 * STATUS = OK GO TO 1000 * 999 MESS = 'VPOLEF: ' // CONTXT CALL UMSPUT (MESS, DEST, PRIO, STATOK) * 1000 RETURN END