SUBROUTINE VPOLPA * * Module Number: 15.12.3 * * Module Name: polpav * * Keyphrase: * ---------- * Calculate the polarization position angle offset * * Description: * ------------ * This module calculates polarization position angle offset for any number * of filters (up to 4). * The position angle offset is determined from the reference position angle of * the observed standard star in the equatorial coordinate system, the position * angle of the same standard star as measured in the HSP coordinate system, * and the (predicted) position angle of the aperture in the equatorial * coordinate system. The result offset is therefore the angle FROM the * aperture to the transmission axis of the 0 degree polarizer. If the * predicted position angle of aperture differs from the real position angle, * the calculated offset will also have a corresponding error. * More than one measurements may be taken at the same aperture. For the same * filter, there should be at least one measurement at each of the four * apertures. They have to have the same target, the same roll angle, and * roughly obtained at the same temperature/epoch. * In this module, the observed targets should be polarized standard stars. * Maximum number of input data points is 2000. * * FORTRAN Name: VPOLPA.FOR * * Keywords of Accessed Files and Tables: * -------------------------------------- * Name I/O Description / Comments * * Subroutines Called: * ------------------- * CDBS: * VPPAGT, VPPABN, VPPAPT * 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-30-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 = 4) * --count rate REAL CNT(SIZE), * --count rate's standard deviation : CNTSD(SIZE), * --polarizations : POL(NAPER), * --position angle offsets : PAOFF(NAPER), * --intensities : INTEN(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 * --filter name CHARACTER*4 FILTER(NAPER) 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 VPPAGT ( 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 filter * CALL VPPABN (CNT, CNTSD, APPA, TEMP, EPOCH, APERT, : NPTS, TARGET, FILTER, POL, PAOFF, INTEN, : TMPAVE, EPAVE, NROWS, STATUS) IF (STATUS .NE. OK) GO TO 1000 * * write the result to the output table * CALL VPPAPT (OFILE, FILTER, POL, PAOFF, INTEN, TMPAVE, EPAVE, : TARGET, NROWS, STATUS) IF (STATUS .NE. OK) GO TO 1000 * STATUS = OK GO TO 1000 * * issuue warning message * 999 MESS = 'VPOLPA: ' // CONTXT CALL UMSPUT (MESS, DEST, PRIO, STATOK) * 1000 RETURN END