Malcolm,
> > Thanks for the URL - it should be very helpful when I get round to
> > improving the ast resampling routines to support flux conservation and
> > variable width kernels.
>
> Wow! No flux conservation at all? Not even estimating the Jacobian
> empirically and interpolating in the adaptive sub-division way? Flux
> conservation is certainly needed for the wide-field imaging and
> spectroscopy.
It would be (relatively) quick to modify the existing astResample methods
to have an option to multiply the output pixel values by their area
(specified as a number of input pixels), but this is not a very accurate
way of conserving flux. For instance, in the extreme case where the entire
input image got mapped into a single pixel of the output image, the single
output value would be formed by interpolating the input image at its
centre and then multiplying this value by the number of pixels in the
input image. The resulting flux in the output image would then be totally
unrelated to the total flux in the input image.
A more accurate but slower way is to create an astRebin method (as an
alternative to astResample) which passes through the input image pixels,
placing each one into the output image at the appropriate position. To
cater for input pixels which project into more than one output pixel, it
would be possible to sub-divide each input pixel into smaller sub-pixels.
This could be done recursively, using an algorithm something like:
project the corners of the input (sub)pixel into the output coordinate
system.
if( all projected corners fall within the same output pixel ) {
increment that output pixel by the input (sub)pixel value
} else {
divide the current (sub)pixel in half along each axis.
divide the current (sub)pixel value by 2**ndim.
for each of these new sub(sub)pixels
execute this algorithm recursively
}
}
obviously with some limit on the max depth of recursion.
I've not yet read the paper Tim pointed out, but I would expect it to have
some useful ideas for this sort of thing.
David
|