Документ взят из кэша поисковой машины. Адрес
оригинального документа
: http://xmm.vilspa.esa.es/sas/5.4.1/doc/asmooth/node16.html
Дата изменения: Fri Jan 10 22:48:37 2003 Дата индексирования: Sat Dec 22 09:13:53 2007 Кодировка: |
In the program schema below it has been assumed for the sake of simplicity that the exposure map, detector mask, source list and template have each been supplied.
sourceMask = makeSourceMask(sourceList) allMask = sourceMask && detectorMask
The array allMask is true where the pixel is on a ccd and not near a source, false elsewhere.
image = image / expmap if (smoothType eq 'adaptive') { foreach (x, y) { sigmaIndex(x, y) = calcSI(template(x, y), desiredSNR, maxSigma) } } else { # smoothType eq 'simple' # for all (x, y) sigmaIndex(x, y) = uniform value corresponding to the chosen # sigma. } smoothedAllMask = 0.0 smoothedImage = 0.0 foreach (i from 1 to maxSigmaIndex) { foreach (x, y) { if (sigmaIndex(x, y) == i && allMask(x, y)) {sigmaMask(x, y) = 1} else {sigmaMask(x, y) = 0} } maskedImage = image && sigmaMask # Calculate numDirectOps
For performing the convolutions, two alternative strategies are employed, depending on estimates of their respective computation time: a Fast Fourier Transform (FFT) method, and a direct integration method. It is not practical to compare directly the number of operations involved in the alternate methods. However it is assumed that the time to perform the direct calculation is proportional to the number of multiplications (= numDirectOps), which is just equal to the number of pixels in the convolving array times the number of image pixels to be convolved. The time to perform the FFT, which is independent of the width of the convolver, has been measured on a particular computing platform and the equivalent value of numDirectOps calculated; the value of the variable opsLimit has been `hard-wired' to this quantity. It is assumed that the relative speeds of the alternate procedures will be approximately machine-independent. However, see developers' notes.
if (numDirectOps > opsLimit) { # do FFT method smoothedAllMask = smoothedAllMask + FFTsmooth(sigmaMask, sigma(i)) smoothedImage = smoothedImage + FFTsmooth(maskedImage, sigma(i)) } else { # numDirectOps is small, do direct method smoothedAllMask = smoothedAllMask + directSmooth(sigmaMask, sigma(i)) smoothedImage = smoothedImage + directSmooth(maskedImage, sigma(i)) } }
In order to remove the fuzzy edges, the smoothed image is divided by the smoothed 'all' mask (ie, the camera or ccd mask ANDed with the source mask). The result should then be ANDed with the mask. However use of the detector mask instead of the 'all' mask for this final step results in the source holes being effectively filled in.
This algorithm has only approximate validity but is acceptable where the change of image intensity over a distance equal to is small.
finalSmoothedImage = (smoothedImage * expmap / smoothedAllMask) && detectorMask if (normalise) { # integrate effective area # divide finalSmoothedImage by the integrated effective area }XMM-Newton SOC/SSC -- 2003-01-10