|
Документ взят из кэша поисковой машины. Адрес
оригинального документа
: http://xmm.vilspa.esa.es/sas/7.0.0/doc/eposcorr/node11.html
Дата изменения: Wed Jun 28 23:40:52 2006 Дата индексирования: Sat Dec 22 10:48:57 2007 Кодировка: Поисковые слова: http www.astronomy.com |
subroutine eposcorr
read x-ray and optical list
call find_offset
call correct_positions
IF findrotation == TRUE THEN
call find_all ! make a three dimensional search
DO i=1, niter
IF findrotation == TRUE THEN
call find_rotation
call find_offsets
update the grid resolution
! for the last iteration a larger grid is used in order to get an error
! estimate
END
modify/write the x-ray list
end subroutine eposcorr
subroutine find_offset
x_shift= y_shift =0
LOOP over x_offset grid elements
LOOP over y_offset grid elements
call subroutine likelihood
store likelihood in array
IF likelihood > best likelihood THEN
update best likelihood, x_shift=x_offset , y_shift=y_offset
END LOOP
END LOOP
xm = ym = 0
total_likelihood = 0
LOOP over likelihood array elements (= corresponding x_offset, y_offset)
IF( distance( x/y_offset , x/y_shift ) < 0.5* grid size ) THEN
xm = xm + likelihood * (x_offset - x_shift)
ym = ym + likelihood * (y_offset - y_shift)
total_likelihood = total_likelihood + likelihood
END IF
END LOOP
! New best offsets:
x_shift = xm/total_likelihood
y_shift = ym/total_likelihood
end subroutine find_offset
subroutine likelihood
set likelihood = 0
set nmatches = 0
LOOP over elements X-ray list
LOOP over elements optical list
calculate the combined position error (sigma)
calculate the distance (d) between the optical and X-ray source
for given x and y offsets
IF x-ray source within 5 sigma of optical source THEN
nmatches = nmatches + 1
likelihood = likelihood + exp{ -0.5 * (d/sigma)^2 }
END IF
END LOOP
END LOOP
end subroutine likelihood