Документ взят из кэша поисковой машины. Адрес
оригинального документа
: http://xmm.vilspa.esa.es/sas/8.0.0/doc/omdetect/node47.html
Дата изменения: Wed Oct 22 17:31:27 2008 Дата индексирования: Tue Aug 18 14:54:19 2009 Кодировка: Поисковые слова: reflection nebula |
The algorithm works as follows:
Initialise nmin - criterion for determining if the pixels in the column centred on i0 have, on average, a greater value than their neighbours in the next
or preceding column (determined .
nMin = int( 0.6 (ny + 1)) where ny is the number of rows in the image (image height)
width = real(10 / binx)
nStreaks = 0
set the current column number to 0- i0 = 0 (the first column of pixels)
Loop through all the columns of the image
do i = 0, nx - 1 (where nx is the dimension of the image in the x-direction (ie the number of columns)
if then Check for streak near left-hand edge of image
n4 = count(image(i0, :) image(i0 + 1, :) ) Count the number of pixels along column i0 that have a greater value than their neighbour in column i0 + 1
n5 = count(image(i0, :) image(i0 + 2, :) ) Count the number of pixels along column i0 that have a greater value than their neighbour in column i0 + 2
n6 = count(image(i0, :) image(i0 + 3, :) ) Count the number of pixels along column i0 that have a greater value than their neighbour in column i0 + 3
n1 = count(image(i0, :) image(i0 + 4, :) ) Count the number of pixels along column i0 that have a greater value than their neighbour in column i0 + 4
n2 = count(image(i0, :) image(i0 + 5, :) ) Count the number of pixels along column i0 that have a greater value than their neighbour in column i0 + 5
n3 = count(image(i0, :) image(i0 + 6, :) ) Count the number of pixels along column i0 that have a greater value than their neighbour in column i0 + 6
else if ( i0 (nx - 5)) then Check for streak near right-hand edge of image
n1 = count(image(i0, :) > image(i0 - 1, :) ) Count the number of pixels along column i0 that have a greater value than their neighbour in column i0 - 1
n2 = count(image(i0, :) image(i0 - 2, :) ) Count the number of pixels along column i0 that have a greater value than their neighbour in column i0 - 2
n3 = count(image(i0, :) image(i0 - 3, :) ) Count the number of pixels along column i0 that have a greater value than their neighbour in column i0 - 3
n4 = count(image(i0, :) image(i0 - 4, :) ) Count the number of pixels along column i0 that have a greater value than their neighbour in column i0 - 4
n5 = count(image(i0, :) image(i0 - 5, :) ) Count the number of pixels along column i0 that have a greater value than their neighbour in column i0 - 5
n6 = count(image(i0, :) image(i0 - 6, :) ) Count the number of pixels along column i0 that have a greater value than their neighbour in column i0 - 6
else
n1 = count(image(i0, :) image(i0 - 1, :) ) Count the number of pixels along column i0 that have a greater value than their neighbour in column i0 - 1
n2 = count(image(i0, :) image(i0 - 2, :) ) Count the number of pixels along column i0 that have a greater value than their neighbour in column i0 - 2
n3 = count(image(i0, :) image(i0 - 3, :) ) Count the number of pixels along column i0 that have a greater value than their neighbour in column i0 - 3
i0 = i0 + 1
n4 = count(image(i0, :) image(i0 + 1, :) ) Count the number of pixels along column i0 that have a greater value than their neighbour in column i0 + 1
n5 = count(image(i0, :) image(i0 + 2, :) ) Count the number of pixels along column i0 that have a greater value than their neighbour in column i0 + 2
n6 = count(image(i0, :) image(i0 + 3, :) ) Count the number of pixels along column i0 that have a greater value than their neighbour in column i0 + 3
end if
Test to see if there is likely a streak-
if (n1 nMin .and. n2 nMin .and. n3 nMin .and. n4 nMin
.and. n5 nMin .and. n6 nMin) then
Set the source flags of any sources on the streak with a significance 50.
where(abs(source%xpos - real(i0) + 1.0) .lt. width
.and. source%significance .lt. 50.0) set bit 1
i0 = i0 + 10
else
i0 = i0 + 1
end if
if ( (nx - i0) 5) exit Reached the right-hand side of the image
end do