Документ взят из кэша поисковой машины. Адрес оригинального документа : http://xmm.vilspa.esa.es/sas/8.0.0/doc/omdetect/node50.html
Дата изменения: Wed Oct 22 17:31:27 2008
Дата индексирования: Tue Aug 18 14:54:22 2009
Кодировка:

Поисковые слова: orion
Source surrounded by strong mod-8 pattern - bit 4 XMM-Newton SAS Home Page
XMM-Newton Science Analysis System


omdetect (omdetect-5.14.2) [???]

Source on diffraction spike Source Flagging Algorithms Source within central-enhancement region Home Index

Meta Index / Home Page / Source Flagging Algorithms

Source surrounded by strong mod-8 pattern - bit 4

A number of checks on the pixels surrouding the central pixel of the source are performed to determine if there is a "strong" mod-8 pattern.
The basic algorithm follows:
Initialise nx to the maximum extent of the image in the x direction (the first column has a value 0)
Initialise ny to the maximum extent of the image in the y direction (the bottom row has a value 0)
(0, 0 is the bottom, left-hand corner)
Initialise i0, j0 to the central pixel coordinates of the source
dx = 4 / binx (binx is the binning factor)
il = max( 0, i0 - dx )
iu = min( nx, i0 + dx )
jl = max( 0, j0 - dx)
ju = min( ny, j0 + dx)
Find the maximum pixel value in the above box
fmax = maxval( image(il : iu, jl : ju) )
if (fmax $<$ 1000.0 ) then (Probably hasn't produced a strong mod-8 pattern) isMod8Source = .false. return elseif(fmax $>=$ 10000.0) then (Probably has produced a strong mod-8 pattern)
isMod8Source = .true.
Set bit 4 of quality flag )
return
else
isMod8Source = .false.
end if Carry out some more checks- look for a mod-8 pattern around the source
maxwidth = 8 / binx
dx = 30 / binx
imin = max(0, i0 - maxWidth)
imax = min(nx, i0 + maxWidth)
jmin = max(0, j0 - maxWidth)
jmax = min(ny, j0 + maxWidth)
il1 = max( 0, i0 - dx )
iu1 = min( nx, i0 + dx )
jl1 = max( 0, j0 - dx )
ju1 = min( ny, j0 + dx )
dx = 10 / binx
il = max( 0, i0 - dx )
iu = min( nx, i0 + dx )
jl = max( 0, j0 - dx )
ju = min( ny, j0 + dx )
****************************************************************
Check to the left and right of the source for a mod-8 pattern
****************************************************************
k1 = 0
k2 = 0
k3 = 0
k4 = 0
nmin = 2 $\times$ dx
****************************************************************
Checking left-hand side of the source for a mod-8 pattern
***************************************************************
n = ju - jl + 1
if (n .ge. 10) then
nmin = n - 3

Start with column i0 and move inwards
iLoop1 : do i1 = i0 - 10 / binx, il1, -1

iMinus1 = i1 - 1
iMinus2 = i1 - 2
iminus3 = i1 - 3
if (iminus3 $<$ 0) exit
Check to see if we may have encountered a bright pixel that may be part of a source
if ( any(image( i1 : i1, jl : ju) $>$ fmax) ) exit
******************************************************************************
Compare each pixels in the column centred on iminus1 with its neighbours
in the column centred on i1, and count how many have greater values.
******************************************************************************
n1 = count( image( i1 : i1, jl : ju) $>$. ( image( iminus1 : iminus1, jl : ju) +
max(2.0, 2.0 $\times$ sqrt( image( iminus1 : iminus1, jl : ju) ))) )
******************************************************************************
Skip if n1 $<$ nmin (not detected a possible pattern)
******************************************************************************
if(n1 $<$ nmin) cycle
******************************************************************************************
Check each pixel centred on the column iminus2 with its neighbours in the column iminus1
and count how many have greater values
Do the same for columns iminus3 and iminus1
Set n3 to the maximum count of the two.
*******************************************************************************************
n3 = max( count( image(iMinus2 : iMinus2, jl : ju) $>$ image( iminus1 : iminus1, jl : ju) ),
count( image(iMinus3 : iMinus3, jl : ju) $>$ image( iminus1 : iminus1, jl : ju) ))
if ( n3 $>=$ nmin) then
***********************************************************************
Maybe a mod-8 pattern to the left of the source
***********************************************************************
imin = min(imin, iminus3)
k1 = 1 Record that there maybe a mod-8 pattern here
end if
end do iLoop1
****************************************************************
Checking right-hand side of the source for a mod-8 pattern
***************************************************************
iLoop2 : do i2 = i0 + 10 / binx, iu1
iPlus1 = i2 + 1
iPlus2 = i2 + 2
iplus3 = i2 + 3
if (iplus3 .gt. nx) exit
**************************************************************************************
Check to see if we may have encountered a bright pixel that may be part of a source
**************************************************************************************
if ( any(image( i2 : i2, jl : ju) $>$ fmax) ) exit
***********************************************************************************
Compare each pixels in the column centred on i2 with its neighbours
in the column centred on iplus1, and count how many have greater values.
**********************************************************************************
n1 = count( image(i2 : i2, jl : ju) $<$ ( image( iplus1 : iplus1, jl : ju) +
max(2.0, 2.0 * sqrt( image( iplus1 : iplus1, jl : ju) ))) )
if(n1 $<$ nmin) cycle
******************************************************************************************
Check each pixel centred on the column iplus2 with its neighbours in the column iplus11
and count how many have greater values
Do the same for columns iplus3 and iplus1
Set n3 to the maximum count of the two.
*******************************************************************************************
n3 = max( count( image(iplus2 : iplus2, jl : ju) $>$ image( iplus1 : iplus1, jl : ju)),
count( image(iplus3 : iplus3, jl : ju) $>$ image( iplus1 : iplus1, jl : ju)) )
if ( n3 $>=$ nmin ) then
***********************************************************************
Maybe a mod-8 pattern to the right of the source
***********************************************************************
imax = max(imax, iplus3)
k2 = 1 ! Record that there maybe a mod-8 pattern here
end if
end do iLoop2
end if
****************************************************************
Check below and above the source
****************************************************************
n = iu - il + 1
if (n .ge. 10) then
nmin = n - 3
jLoop1 : do j1 = j0 + 10 / binx, ju1
****************************************************************
Checking above the source for a mod-8 pattern
***************************************************************
k5 = k5 + 1
jPlus1 = j1 + 1
jPlus2 = j1 + 2
jPlus3 = j1 + 3
if (jplus3 $>$ ny) exit
**************************************************************************************
Check to see if we may have encountered a bright pixel that may be part of a source
**************************************************************************************
if ( any(image( il : iu, j1 : j1) $>$ fmax) ) exit
*****************************************************************************
Check that the row of pixels centred on row j1 is greater than that
centered on column jplus1
*****************************************************************************
n1 = count( image(il : iu, j1 : j1) .gt. ( image( il : iu, jplus1 : jplus1) +
max(2.0, nsigma $\times$ sqrt( image( il : iu, jplus1 : jplus1) ))) )
if(n1 $<$ nmin) cycle
n3 = max( count( image(il : iu, jPlus2 : jPlus2) .gt. image( il : iu, jplus1 : jplus1)),
count( image(il : iu, jPlus3 : jPlus3) .gt. image( il : iu, jplus1 : jplus1)) )
if (n3 .ge. nmin) then
***********************************************************************
Maybe a mod-8 pattern above the source
***********************************************************************
jmax = max(jmax, jplus3)
k3 = 1
end if
end do jLoop1
****************************************************************
Checking below the source for a mod-8 pattern
***************************************************************
jLoop2 : do j2 = j0 - 10 // binx, jl1, -1
jMinus1 = j2 - 1
jMinus2 = j2 - 2
jMinus3 = j2 - 3
if (jMinus3 .lt. 0) exit
**************************************************************************************
Check to see if we may have encountered a bright pixel that may be part of a source
**************************************************************************************
if ( any(image( il : iu, j2 : j2) > fmax) ) exit
*****************************************************************************
Check that the row of pixels centred on row j2 is greater than that
centered on column jminus1
*****************************************************************************
n1 = count( image(il : iu, j2 : j2) .gt. ( image( il : iu, jminus1 : jminus1) +
max(2.0, nsigma * sqrt( image( il : iu, jminus1 : jminus1) ))) )
if(n1 $<$ nmin) cycle ! probably no pattern
*****************************************************************************
Check that the row of pixels centred on row j1 is greater than that
centered on column jplus1 *****************************************************************************
n3 = max( count( image(il : iu, jMinus2 : jMinus2) .gt. image( il : iu, jminus1 : jminus1) ),
count( image(il : iu, jMinus3 : jMinus3) .gt. image( il : iu, jminus1 : jminus1) ) )
if ( n3 .ge. nmin) then ( Maybe a pattern )
***********************************************************************
Maybe a mod-8 pattern below the source
***********************************************************************
jmin = min(jmin, jminus3)
end if
end do jLoop2
end if
kmin = 3 Source has to have a mod-8 pattern on at least 3 sides, but reduce this value
if the source is near to an edge
if (source%xpos <= real(12 // binx) .or. sourcez%ypos <= real(12 / binx)) kmin = kmin - 1
if (source%xpos >= real(nx1 - 12 // binx) .or. source%ypos >= real(ny1 - 12 / binx)) kmin = kmin - 1 1
if ( (k1 + k2 + k3 + k4) .ge. kmin ) then Accept it is as having a mod-8 pattern
Set bit 4 of quality flag
IsMod8Source = .true.
end if


Source on diffraction spike Source Flagging Algorithms Source within central-enhancement region Home Index

XMM-Newton SOC/SSC -- 2008-10-22