C+ C NAME: C smei_inside_fov C PURPOSE: C Check whether CCD location is inside FOV C CALLING SEQUENCE: logical function smei_inside_fov(icam,mode,dfov,dr,phi) C INPUTS: C id integer id=0: CCD pixel coord to camera sky coord C id=1: camera sky coord to CCD pixel coord C icam integer camera id (1,2,3) C mode integer mode (0,1,2) C dfov(4) double precision modification to fov C dfov(1) < 0 added to inner radius (pixels) C dfov(2) > 0 added to outer radius (pixels C dfov(3) < 0 added to left side of fov (deg) C dfov(4) > 0 added to right side of fov deg) C dr double precision radial distance to optical axis in C units of engineering mode pixels C phi double precision angle from optical axis in degrees C (usually dr,phi are output from smei_axis_cam C output from smei_ccd_cam) C OUTPUTS: C smei_inside_fov logical .TRUE. : location inside fov C .FALSE.: location outside fov C PROCEDURE: C MODIFICATION HISTORY: C FEB-2006, Paul Hick (UCSD/CASS; pphick@ucsd.edu) C- integer icam integer mode double precision dfov(4) double precision dr double precision phi double precision phi0 (3) / 30.0d0, 30.0d0, 30.0d0/ double precision drmin(3,0:2) /-27d0,-27d0,-26d0, -27d0,-27d0,-26d0, -26d0,-26d0,-25d0/ double precision drmax(3,0:2) / 22d0, 22d0, 20d0, 22d0, 22d0, 20d0, 21d0, 21d0, 19d0/ smei_inside_fov = drmin(icam,mode)+dfov(1) .lt. dr .and. dr .lt. drmax(icam,mode)+dfov(2) & .and. -phi0(icam )+dfov(3) .lt. phi .and. phi .lt. phi0(icam )+dfov(4) return end