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


eoptloadmask (ebkgmap-2.10.2) [xmmsas_20230412_1735-21.0.0]


Algorithm

Check the number of rows in each input source-list

Do i=1, numOptSrcList		! (for each source-list)
  clone()
  doFilter(srcTable)
  call readColDataToFixed(srcTable, 'RA',  srcPos(i,:)%raDeg)
  call readColDataToFixed(srcTable, 'DEC', srcPos(i,:)%decDeg)
  if (trim(RadiusStyle) == 'column') then
    call readColDataToFixed(srcTable, 'RADIUS', srcPos(i,:)%radiusArcsec)
  end if
End Do

call getArraySize(TemplateImageSetName, xiSize, yiSize)
allocate(maskImage(xiSize, yiSize))
call readWcs(TemplateImageSetName, wcs)

maskImage = .false.
Do i=1, numOptSrcList		! (for each source-list)
  Do j=1, numOptSrcRowsFiltered(i)	! Loop over the sources in each file
    call raDecToPixels(srcPos(i,j)%raDeg, %decDeg, wcs, xPixel, yPixel)
    where (position < radius) maskImage = .true.
  End Do
End Do

if (IsInverted) call invertMask(maskImage)
maskImageInt = 0
where(maskImage) maskImageInt = 1

call saveImage(maskImageInt, TemplateImageSetName, MaskSetName &
   , TemporaryImageSetName, wcs=wcs)



XMM-Newton SOC -- 2023-04-16