With this utility one can fiddle about with binary complex (cpx) files of all kinds of formats (though only pixel interleaved). Make a cutout, multilook, scale, exponent, subsample, mirror, etc. Now it also supports the generation of SUNraster files for visualization of the phase of complex files (smaller temp files required). It is written in C++ using a template function.
Input is a complex file, for example the output of Doris, or SLC data. It should be pixel interleaved, i.e., RE,IM, RE,IM, RE,IM, ... (Almost) all binary pixel interleaved formats are supported.
Output is written to stdout channel (normally your screen) in ascii or binary float format. The binary output should be redirected to a file or piped to a (GMT) program. Ascii output can best be used to view a small cutout. Output option (-o) are normal (the file "as is"), the magnitude, the phase, the real, or the imaginary part. Further options are making a cutout, multilooking, subsampling, and/or mirroring in the vertical and horizontal plane.
Cpxfiddle does not handle band interleaved complex data, column major order files, nor non-complex files. However cpxfiddle might be tricked.
See also cpxfiddle -h and the utility cpx2ps (C.2.4).
SYNOPSIS: ./cpxfiddle -w width [-f informat] [-q output] [-o outformat] [-e exp] [-s scale] [-l line] [-L line] [-p pixel] [-P pixel] [-S x/y] [-M x/y] [-m mirror] [-c file] [-r rmin/rmax] [-B swap] [-H bytes] [-V] [-b] [-h[elp]] [--] [--ignorenan] [--fullstat] inputfile Dump content of complex binary file to stdout, either: as is, magnitude, phase, real or imaginary part. Input files can be almost any complex file though not (yet) band interleaved. Output can be manipulated by: multilooking, subsampling, mirroring, scaling, etc. This program is useful for cropping and displaying, in combination with e.g., GMT, ImageMagick, or xv. Output format to stdout can be binary. Careful! only pipe or redirect this. (use: "cpxfiddle -h |& more" in csh or "cpxfiddle -h 2>&1 | less" in bash for more help.)