;* remvig.c ;* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * ;* Removes vignetting from array 'data'. ;*------------------------------------------------------------------------------ ;* rsun = array of radial values (units of rsun). ;* nr = # elements in rsun array (=1 for radial scan, =ndata for theta scan). ;* data = array of intensity values (units of 10**-11 b/bsun). ;* ndata = # elements in array data. ;* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ;* Andrew L. Stanger programmer III NCAR/HAO SMM C/P ;* 4 February 1983: PDP-11/34 Fortran-4+ RSX-11M ;* 18 July 1984: conversion to VAX 750 (C). ;*------------------------------------------------------------------------------ ;*/ ;#include FUNCTION remvig, rsun, nr, data, ndata ;int nr, ndata; ;float rsun []; ;float data []; ;{ ;int i; ;float r; ;float v; ;extern float vignet (); IF (nr GT 1 AND nr LT ndata) THEN $ BEGIN ;{ PRINT, '# rsun values: ', nr, ' less than # data values: ', ndata RETURN, -1 END ;} IF (nr GT 1) THEN $ ;/* Radial scans. */ BEGIN ;{ FOR i = 0, ndata - 1 DO $ BEGIN ;{ r = rsun [i]; data [i] = data [i] * vignet (r); END ;} RETURN, 0 END $ ;} ELSE $ IF (nr EQ 1) THEN $ ;/* Theta scans. */ BEGIN ;{ r = rsun [0]; v = vignet (r); FOR i = 0, ndata - a DO data [i] = data [i] * v RETURN, 0 END ;} END ;}