| 
Документ взят из кэша поисковой машины. Адрес
оригинального документа
: http://xmm.vilspa.esa.es/sas/7.1.0/doc/omlcbuild/node8.html  
 Дата изменения: Mon Jul 9 06:09:34 2007 Дата индексирования: Sat Dec 22 11:13:52 2007 Кодировка: Поисковые слова: asteroid  | 
   subroutine omlcbuild
     read parameters
     loop i=0, nSources
       get handle on source rates file
       get handle on source region file
       if (exposure IDs are different) issue warning
       get handle on background rates file
       get handle on background region file
       if (exposure IDs are different) issue warning
       if (exposure ID source != exposure ID background) call fatal
       get source extraction radius = s_radius
       get CAL coincidence loss correction radius = cal_radius
       get photometry radius = ph_radius 
       calculate the instrumental limiting magnitude from the 
       detection limit count rate 
 
       compute area of source region = s_area
	
       compute area of background region = b_area
       tStart = max(tBack[0], tSource[0])
       eEnd = min(tBack[nBack-1], tSource[nSource-1]
       tDel = (tEnd - tStart)/(nSource-1)
       determine the PSF fraction within the source extraction region
       determine the PSF fraction within the `background` extraction region
%      calculate the ratio between counts inside and outside OSW:
%      PSF fraction = sum(PSF inside OSW)/ sum(complete PSF inside s_radius area)
     		
       loop i = 0, ntimebins
         newTime = tStars + i * tDel
%         linear interp to get source rate
         linear interp to get background rate for each source bin
%         compute background subtracted rate error
         compute source rate error
         compute background rate error
%         scale background counts to the source area:
%         backround count rate = background count rate * source area / b_area
%         subtract background from the source:
%         background subracted rate = source rate - background count rate
%         correct source counts for the PSF fraction inside extraction area 
%         (correction is to value expected within CAL (r=12 pixels) aperture):
%	 source = source / PSF_fraction
	 set up equations for counts recorded in each region. These allow 
         for (point) source contamination of the `background` region:
         C(S+B) = PSF(S+B) *S   +   NPIX(S+B) * Bpix
         C(B)   = PSF(B)   *S   +   NPIX(B)   * Bpix
         solve these for S, the source counts over the coincidence loss (CL) 
         region (ie the CAL aperture) and for Bpix, the background counts 
         per pixel. 
	 scale background to the CAL aperture area:
         bkgnd count rate = background count rate * cal_radius area / s_area 
	 recombine these bkgnd and source rates (now determined for the 
         CAL aperture)
         apply CL correction to the source+bkgnd rate
         apply CL correction to the bkgnd rate
         CL corrected source rate = source+bkgnd rate - bkgnd rate
	 correct result for dead time
        
	 correct for PSF beyond the 12 pixel Cal aperture (mainly for UV)
       end loop
     write time keywords to header
     write output rates file
     release handle
   end loop
   end subroutine omlcbuild