;* remstr.c ;* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * ;* Removes stray light 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 ;* 3 February 1983: PDP-11/34 Fortran-4+ RSX-11M ;* 18 July 1984: conversion to VAX 750 (C). ;*---------------------------------------------------------------------- ;*/ ;#include FUNCTION remstr, rsun, nr, data, ndata ;int nr, ndata; ;float rsun []; ;float data []; ;{ ;int i; ;float r; ;float s; ;extern float stray (); 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] - stray (r); END ;} return (0); END $ ;} ELSE $ IF (nr EQ 1) THEN $ ;/* Theta scans. */ BEGIN ;{ r = rsun [0]; s = stray (r); FOR i = 0, ndata - 1 DO data [i] = data [i] - s RETURN, 0 END ;} END ;}