Size The output data object will be the size specified by the final padded size parameters, Padded Width, Padded Height, etc (wsize, hsize, dsize, tsize, esize).
Offset Values The offset parameters (woff, hoff, doff, toff, eoff) define where the origin of the source object will lie with respect to the output object. Specifying an offset greater than zero can be used to generate a border around the original data. Negative offset values will result in truncation of data lying in the region (0-woff, 0-hoff, 0-doff, 0-toff, 0-eoff). For example, if an offset of (-1,-1,0,0,0) is specified, the object will effectively be shifted by -1 in the width and height dimensions, and that data truncated in the destination object. If the offset plus the original data size is greater than the specified destination size, truncation of the source data will occur. If the input object is larger than the final padded size specified, the output data object will be truncated to the specified size.
Pad Values The Real Pad Value (real) specifies the pad value that will be assigned to the real component of a complex pair, and the Imaginary Pad Value (imag) specifies the imaginary component of the pair. If the input data object type is not complex, the imaginary pad value will be ignored. For input data objects that are not of type double, the specified pad values are cast to the same type as the input data object.
Wrapping The regions outside the original data bounds can be filled also by wrapping data from the opposite side of the dataset by specifying the Wrap flag. This will override the Pad Value functionality.
Mask Data & Validity Option The validity mask corresponding to padded data will be zero if the user specifies that padded data added by this program be marked as invalid (valid FALSE). Likewise, if the user specifies that padded data is valid (valid TRUE), the mask corresponding to padded data will be non-zero. In the first case (invalid), if no mask exists in the source object, on will be created. In the valid case, no mask will be created. Validity mask data corresponding to the original source object data is transferred to the destination unaltered.
Location & Time Data If curvilinear or rectilinear time or location data exist, it is unclear how to alter the dimensionality, so the pad operation will fail. If uniform location data exist padding occurs, but the location information is not altered in any way.
Map Data The pad operator does not modify map data.
Failure Modes The input object must contain value or mask data.
kpad -i input_file -o output_file- Pad Data with a Constant Value
Will create a zero padded output object, using the default size and zero offset.kpad -i input_file -o output_file -wsize 512 -hsize 256 -real 200 -imag 100- Pad Data with a Constant Value
This padding operation will produce an output object with a width of 512 and height of 256. If the input data is complex, padding for the real component will be 200, and 100 for the imaginary component. If the data is not complex, the imaginary value is ignored.