| 
Документ взят из кэша поисковой машины. Адрес
оригинального документа
: 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  | 
 10000.0) then (Probably has produced a strong mod-8 pattern)  
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 
 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 
 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