View on GitHub

IRAF Community Distribution

IRAF maintained by the community

Home | Installation | Packages | X11IRAF | PyRAF | Forum

mscimage boundary interpolation

Rach wrote on Mar 06, 2007

I'm trying to convert MEFs into single images with mscimage. It works well except the task interpolates badly (and unnecessarily) at the edges of the image. I've tried adjusting the ntrim, boundary and interpolant parameters to no avail.

Is there any way to stop mscimage blurring/interpolating the pixels at the edge of the image (without just chopping them off)? Thanks,

Rach

Francisco Valdes wrote on Mar 06, 2007

Hi Rach,

It is not clear what you mean by "unnecssarily" and "badly". When the interpolator function gets near the edge it has to do something about pixels it wants to use beyond the edge. What it does is defined by the boundary option. All boundary options are making up values in a sense. The only way to avoid these effects is to only retain the interpolated/resampled data that did not need to go off the edge. This is basically the purpose of the trim option. So you either "chop off" the edges with trim or use some boundary option.

The only alternative to this is that near the edge the interpolant function changes. MSCIMAGE doesn't do this but you could resample twice, once with the higher order interpolant for the interior and once for a low order or nearest interpolant for the edges. You would then cut and paste. This could be done with IMCOPY where you copy the good part of the higher order interpolation into an image section of the lower order version:


imcopy horder[10:2038,10:2038] lorder[10:2038,10:2038]


I've never actually done this but in principle this would give you another version that might better suit you.

Yours,
Frank Valdes

Last post on Mar 06, 2007