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


rgsfilter (rgsfilter-1.19) [xmmsas_20230412_1735-21.0.0]


Algorithm

Initialize the output event list:
   create a DAL clone of the input event list: *evlist
   delete all EXPMAPnn extensions

if *withexpmaps && *withcombmap:
   create the dataset for the combined exposure map: *expimageset
   set the primary image dimensions to the EVENTS table channel space
   initialize image to zero

Complete the STDGTI tables:
   auxiliaryGti = intersection(*auxgtitables)
   for each chip:
      for each valid frame contained in *auxiliaryGti:
         alignedGti |= gti(frame)
      table STDGTI0n &= *alignedGti

Filter the EVENTS table:
   Sn = "(CCDNR == n && GTI([STDGTI0n],TIME))"
   gtiExpr = "(*S1 || *S2 || *S3 || *S4 || *S5 || *S6 || *S7 || *S8 || *S9)"
   selectlib expression: "(FLAG & *rejflags == 0) && *gtiExpr"
   attribute REJFLAGS |= *rejflags

for each chip present:
   Filter the EXPOSU0n table:
      selectlib expression: "GTI([STDGTI0n],TIME)"

   for both nodes:
      Filter the REJPIXnn table:
         simultaneously traverse EXPOSU0n and REJPIXnn, deleting all
            rows in the latter that are not in correct FRAME order
            according to the former; unexpected frames are deleted

      if *withexpmaps:
         Construct the EXPMAPnn array:
            sort frames by group according to *driftbinsize
            for each group:
               adjust coordinates using group average aspect correction
               for each frame:
                  subtractively overlay rejected pixels with frame timedel
                  accumulate group timedel
               additively overlay exposure with group timedel
               subtractively overlay global bad pixels with group timedel
            for each pixel:
               pixel = 0 if |pixel| < 1.788e-7 * exposure

	 if *withcombmap:
	    additively overlay EXPMAPnn on combined map

if *withexpmaps && *withcombmap:
   compute dispersion-channel-to-node transform
   find min and max data values



XMM-Newton SOC -- 2023-04-16