SUBROUTINE VSNEVL ( * * inputs: * : OBSID, APERT, PTFLAG, TEMP, EPOCH, : APERT0, BASE0P, BASE0E, COEFF0, TEMP0, : EPOCH0, NROWS, * * outputs: * : CORR, STATUS) * * Module Number: * * Module Name: CALHSP * * Keyphrase: * ---------- * Calculate relative sensitivity corrections * * Description: * ------------ * Evaluate the 16 polynomial coefficients for relative sensitivity * If the target is an extended source or sky, use extended source base value * * FORTRAN Name: VSNEVL.FOR * * Keywords of Accessed Files and Tables: * -------------------------------------- * Name I/O Description / Comments * * Subroutines Called: * ------------------- * CDBS: * CDPVAL * SDAS: * UMSPUT * OTHERS: * None * * History: * -------- * Version Date Author Description * 1 08-01-88 J.-C. Hsu Design and coding *------------------------------------------------------------------------------- * *== inputs: * --number of rows of the calibratin table INTEGER NROWS * --observation ID CHARACTER*(*) OBSID, * --aperture ID of input data : APERT, * --aperture names in the calibration table : APERT0(1), * --point source flag : PTFLAG * --base values for point source in the * --calibration table REAL BASE0P(1), * --base values for point source in the * --calibration table : BASE0E(1), * --polynominal coefficients in the * --calibration table : COEFF0(16, 1), * --temperature of input data : TEMP, * --zero points of temperature in the * --calibration table : TEMP0(1) * --epoch of input data DOUBLE PRECISION EPOCH, * --zero points of epoch in the * --calibration table : EPOCH0(1) * *==outputs: * --final calibration correction REAL CORR * --error status INTEGER STATUS * *==local: * --loop indices INTEGER I, K, * --error status : STATOK * --buffer coefficients REAL COEFF(4, 4), * --base value : BASE * --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=========================================== *------------------------------------------------------------------------------- * * find indices of the attribute combination for relative sensitivity * DO 30 K = 1, NROWS IF (APERT(1:10) .EQ. APERT0(K)(1:10)) GO TO 40 30 CONTINUE * * exit if attributes are not found * STATUS = ERRNUM(2) CONTXT = 'APERTURE = ' // APERT(1:10) : // ' not found in relative sensitivity table' GO TO 999 40 CONTINUE * * evaluate polynomial function of the correction * DO 50 I = 1, 16 COEFF((I-1)/4 + 1, MOD(I-1, 4) + 1) = COEFF0(I, K) 50 CONTINUE * * choose base value according to the point source flag * IF (PTFLAG(1:1) .EQ. 'E') THEN BASE = BASE0E(K) ELSE BASE = BASE0P(K) END IF * CALL CDPVAL (TEMP, EPOCH, BASE, COEFF, TEMP0(K), : EPOCH0(K), CORR) * STATUS = OK GO TO 1000 * * write error message * 999 MESS = OBSID // ' VSNEVL: ' // CONTXT CALL UMSPUT (MESS, DEST, PRIO, STATOK) * 1000 RETURN END