XMM-Newton SAS Home Page
XMM-Newton Science Analysis System


espfilt (espfilt-2.7.1) [xmmsas_20190531_1155-18.0.0]


Algorithm

Below is the algorithm for the CORNER METHOD
   subroutine espfilt
      Read parameters.	
       Call method
        if (method .eq. corner) then 
	 call corner_method
	 subroutine corner_method:
	  task evselect (to create object image)
	  task evselect (to create object light curve)
	  task evselect (to create corners image)
	  task evselect (to create corners light curve)
	  call clean_lc (to bin and smooth)
	  subroutine clean_lc:
	   extract columns TIME, RATE from object LC
	   extract columns TIME, RATE from corners LC
	   bin TIME, RATE columns from object LC
	   bin TIME, RATE columns from corners LC
	   smooth RATE column from object LC
	   smooth RATE column from corners LC
	   create histogram from object 
	    find peak of the distibution
	  end clean_lc	   
	  call gauss_fit 
	  subroutine gauss_fit:
	    find best paramater fit using Marquardt routines:
	    MQM  maximum likelyhood fitting routine 
	    MRQ  compute the matrix elements for Marquard method
	    GFUNCS calculate gaussian function distribution
	    return best fit
	   end gauss_fit
         end corner_method 
	elseif (method .eq. ratio) then 
	 call ratio_method
 	 subroutine ratio_method:
	  task evselect (to create corners event list)
	  task evselect (to extract corners spectral file)
	  task backscale (to add area of corners region)
	  task evselect (to create fov annulus event list)
	  task evselect (to extract fov annulus spectral file)
	  task backscale (to add area of fov annulus region)
	  task evselect (to extract corners Lightcurve)
	  task evselect (to extract fov annulus Lightcurve)
	  extract time, counts, area for corners from spectrum and LC
	  extract time, counts, area for fov annulus from spectrum and LC
	   create ratio of FOV annulus to corner:
	ratio =  fovann\_counts / corner\_counts * 
         (corner\_time * corner\_area) / (fovann\_time * fovann\_area) 
	   extract columns TIME, RATE from object LC
	   extract columns TIME, RATE from corners LC
	   bin TIME, RATE columns from object LC
	   bin TIME, RATE columns from corners LC
	   smooth RATE column from object LC
	   smooth RATE column from corners LC
	   create histogram from object 
	  call clean_lc
	  create ratio of FOV annulus to corner LC
	  create GTI for time intervals when FOV\/corner ratio acceptable
	 end ratio_method
	end call_method
	call write_qdp_fit
	subroutine write_qdp_fit
	 open QDP output file
	 write header, title information
	 write out count rate histogram
	  overlay selection and fit limits
	 write out FOV lightcurve
	  overlay GTIs
	 write out Corner lightcurve
	  overlay GTIs
	 open ASCII gti.txt file
	  write out GTIs to ASCII
	 task gtibuild create GTI fits file
	 task evselect create object filtered event list
	 task evselect create object filtered image
	 task evselect create corners filtered event list
	 task evselect create corners filtered image
	Filtered event list, lightcurves, nice qdp plot are generated.
   end espfilt



XMM-Newton SOC/SSC -- 2019-06-02