Документ взят из кэша поисковой машины. Адрес оригинального документа : http://xmm.vilspa.esa.es/sas/8.0.0/doc/omlcbuild/node8.html
Дата изменения: Wed Jul 2 09:56:02 2008
Дата индексирования: Fri Sep 5 20:53:49 2008
Кодировка:

Поисковые слова: microwave background
Algorithm XMM-Newton SAS Home Page
XMM-Newton Science Analysis System


omlcbuild (omlcbuild-1.31.1) [xmmsas_20080701_1801-8.0.0]

Output Files Home Page Comments Home Index

Meta Index / Home Page


Algorithm

   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



XMM-Newton SOC/SSC -- 2008-07-02