C+ C NAME: C lsff C PURPOSE: C To remove the baseline large scale flat field from the data frames C CATEGORY: C Data processing C CALLING SEQUENCE: C call lsff(mode,ic,ifm,id,jd,iframemask,framelsff,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 framelsff real Baseline large scale flat field C frame(id,jd) real Data frame from CCD C OUTPUTS: C frame(id,jd) real Data frame from CCD, the known lsff having been applied C CALLS: C none C PROCEDURE: C The baseline flatfield correction is here imposed upon the data C Updates to this flatfield are applied by program "lsffu.f" until these have become incorporated C into the framelsff as a "new baseline". C MODIFICATION HISTORY: C Jan. 2003, A. Buffington (UCSD) C- subroutine lsff(mode,ic,ifm,id,jd,iframemask,framelsff,frame) c real framelsff(1280,600), & 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)/framelsff(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)/framelsff(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)/framelsff(ii,jj) end if end do end do end if C return end