AIPS HELP file for PADIM in 31DEC25
As of Sat Feb 8 13:26:03 2025
PADIM: Task to increase image size by padding with some value
INPUTS
INNAME Input image name
INCLASS Input image class
INSEQ 0.0 9999.0 Input image seq. no.
INDISK 0.0 9.0 Input image disk no.
OUTNAME Output image name
OUTCLASS Output image class
OUTSEQ 0.0 9999.0 Output image seq. #
OUTDISK 0.0 9.0 Output image disk drive
IMSIZE 1.0 4096.0 Output image size
CPARM CPARM(1) = Padding value
CPARM(2) > 0 -> pad with
magic blanks [ignore C(1)]
HELP SECTION
PADIM
Type: Task
Use: It may be useful to increase the size of your image by
surrounding it with some constant value, zero say. For
example, suppose you have an image that you wish to convolve
by a gaussian (with CONVL), but the image has very sharp edges
because it has been blanked (zeroed) outside of some region.
In order to adequately represent the high spatial frequencies
necessary to describe the sharp edges, you may need to make
your image bigger. CONVL will in fact internally pad with zeroes
to the nearest powerof 2 (200 -> 256 etc.), but this may not be
enough. PADIM will simply enable this operation. LGEOM can
do this too, but it invariably still does as interpolation of
your data, which in this case in particular, because of the sharp
edges, is undesirable. PADIM does absolutely nothing to the input
image data values, it just adds some surrounding points to it.
The reference pixel is shifted as follows. Let the input
image size be XIN by YIN, and the output be XOUT by YOUT. The
image is padded on the left by XLEFT = (XOUT - XIN) / 2 (integer
arithmetic), and on the bottom by YBOTT = (YOUT - YIN) / 2. The
right and top are naturally padded by enough to make the size up
to XOUT and YOUT. The reference pixel becomes:
XREF = XREF + XLEFT
YREF = YREF + YBOTT
Example: XIN = 10, YIN = 15, XOUT = 30, YOUT = 40
XLEFT = (30-10)/2 = 10, YBOTT = (40-15)/2 = 12
XRIGHT = (30-10-10) = 10, YTOP = (40-15-12) = 13
XREF = XREF + 10, YREF = YREF + 12
You can of course pad one axis and not the other by specifying
an output image size equal to the input image size for that axis.
Adverbs:
INNAME........Input image name
INCLASS.......Input image class
INSEQ.........Input image seq. #
INDISK........Input image disk drive #
OUTNAME.......Output image name
OUTCLASS......Output image class
OUTSEQ........Output image seq. #
OUTDISK.......Output image disk drive #
IMSIZE........Output image size, no defaults
CPARM.........C(1) = value to pad with
C(2) > 0 -> use magic blanks to pad image and
ignore C(1)
EXPLAIN SECTION