C+ C NAME: C lsffu C PURPOSE: C To remove the differentially updated large scale flat field from the data frames C CATEGORY: C Data processing C CALLING SEQUENCE: C call lsffu(mode,ic,ifm,id,jd,framemask,framelsffu,frame) C INPUTS: C mode integer 1 - "Engineering" frame records, no onboard binning C 2 - "Hi-res" frame records, binned 2 x 2 pixels C 4 - "Normal Data" frame records, binned 4 x 4 pixels C ic integer Camera 0,1,2,3 or 4 C ifm integer frame mask mode - 0 mask not imposed, 1 frame mask imposed C id integer data frame max x-value (along rows) C jd integer data frame max y-value (down columns) C iframemask(id,jd) integer Data mask showing location of valid data C framelsffu(id,jd) real Updated ground-based small scale flat field C frame(id,jd) real Data frame from CCD C OUTPUTS: C frame(id,jd) real Data frame from CCD, having been corrected for updated lsffu C CALLS: C none C PROCEDURE: C The updated differential flatfield correction is here imposed upon the data C MODIFICATION HISTORY: C Dec, 2002 A. Buffington (UCSD) C- subroutine lsffu(mode,ic,ifm,id,jd,iframemask,framelsffu,frame) c real framelsffu(id,jd), & frame(id,jd) integer iframemask(id,jd) integer*4 ii,jj C C Remove the ground-based large scale flat field from the data in the Engineering mode. C if(mode.eq.1) then do j=1,jd do i=1,id if(iframemask(i,j).ne.0) then frame(i,j) = frame(i,j)/framelsffu(i,j) end if end do end do end if C C Remove the ground-based large scale flat field from data in the 2 x 2 binning mode. C if(mode.eq.2) then do j=1,jd jj=1+(j-1)/2 do i=1,id ii=1+i/2 if(iframemask(i,j).ne.0) then frame(i,j) = frame(i,j)/framelsffu(ii,jj) end if end do end do end if C C Remove the ground-based large scale flat field from data in the 4 x 4 binning mode. C if(mode.eq.4) then do j=1,jd jj=1+(j-1)/4 do i=1,id ii=1+i/4 if(iframemask(i,j).ne.0) then frame(i,j) = frame(i,j)/framelsffu(ii,jj) end if end do end do end if C return end