Help for FFTFLIP
PURPOSE:
"fftflip" accepts one FFT or a matrix of FFT outputs from programs "fft2",
or "fft22", and rearranges the internal structure of each FFT
such that DC is moved from the upper-left corner to center. An optional
transposition can also be made along the diagonal (upper-left to lower-right).
"fftflip" differs from "fftpic" in that no automatic scaling of the FFT is
performed, and no beginning and trailing samples are added.
EXECUTION:
fftflip INP OUT SIZE PARAMS
where: INP is the input FFT or matrix of FFTs.
OUT is the output file.
SIZE specifies a subarea of the input file to process.
PARAMS includes other parameters descibed below and in Tutor mode.
OPERATION:
"fftflip" performs the operation shown in the following diagrams.
The letters A,B,C,D refer to fft quadrants.
+-------+-------+ +-------+-------+ +-------+------- |DC | | | | | | | |
| | | | | | | | |
| A | B | | D | C | | D' | B' |
| | | | | | | | |
+-------+-------+ --> +-------+-------+ --> +-------+------- | | | | |DC | | |DC |
| | | | | | | | |
| C | D | | B | A | | C' | A' |
| | | | | | | | |
+-------+-------+ +-------+-------+ +-------+------- INPUT FFT DEFAULT OPERATION WITH FLIP OPTION
(' MEANS TRANSPOSE)
When the input is a matrix of FFTs, then the above operation is
performed on each FFT separately.
Obviously, there is nothing that compells the input to this program
to be an FFT: it will work on any arbitrary image; however, the
operation described is most meaningful for an FFT, so that term is
used here.
LIMITATIONS
(Removed Warning about slowness on VAX)
Does not work with "COMP" images
EXAMPLES
fftflip INP=A OUT=B NLW=32 LINE=0 'FLIP
In this example, the FFT in file A will be rearranged and then the
program will perform a transposition along the upper-left to lower-
right diagonal. The result will be written to file B. NLW gives
the FFT dimension in pixels; the default is 32. LINE specifies the
number of lines above and below DC which are to be averaged
together as a form of pseudo apodizing; no averaging is desired in
this case. (If averaging were to be done, the DC parameter could
also have been specified, which indicates the number of lines
surrounding DC that are to be excluded from the averaging; the
default is DC=1, that is, only the DC line is excluded.)
insert INP=IN OUT=A (1,1,32,32) (where 'IN' is image data)
fft22 INP=A OUT=B POW=5 IFMT=BYTE OFMT=COMP
cform INP=B OUT=A IN=COMP OUT=HALF SO=(9.76525,0.)
fftflip INP=A OUT=B NLW=32 LINE=0 'FLIP
f2 INP=B OUT=A 'HALF 'OUTH FUNC="(32767./ALOG(32767.))*ALOG10(IN1)"
linear INP=A OUT=B 'HALF 'OUTB STRE=(6000,14000) LIMI=(0,255)
list B
This example shows fftflip as used in a typical command sequence
WRITTEN BY: J.J. Lorre, 23 January 1984
CONVERTED TO VAX BY: A.S.Mazer, 11 May 1984
CURRENT COGNIZANT PROGRAMMER: R. J. Bambery
1984-05-11 A.S.Mazer - Converted to VAX
1985-08-01 L. W. Kamp - CONVERTED TO VICAR2, FIXED BUGS
1994-09-05 A. Scop (CRI) - Made portable for UNIX
2012-12-19 R. J. Bambery - LINUX 64-bit changes, Internal format
is real, removed BYE,HALF limitation
2016-06-08 W. L. Bunch - Migrated to MIPL
PARAMETERS:
INP
STRING - Input fft(s)
OUT
STRING - Output fft(s)
SIZE
INTEGER - Standard size field
SL
INTEGER - Starting line
SS
INTEGER - Starting sample
NL
INTEGER - Number of lines
NS
INTEGER - Number of samples
NLW
INTEGER - fft dimension in pixels
FLIP
KEYWORD - Causes transposition along NW-SE diagonal
LINE
INTEGER - Number of lines above and below DC to be averaged
DC
INTEGER - Number of lines around DC to be excluded from averaging
See Examples:
Cognizant Programmer: