Help for POWER

 "POWER" computes the 1 - dimensional power spectrum of a specified portion of 
  a picture.  

  Although the output is called 'power spectrum', the value computed is
  the square root of the power spectrum (the peak-to-peak amplitude in DN).
  Therefore, strictly speaking the output is an 'amplitude spectrum'.
  
  This output can be:
  1.  Written to a plot file which can be plotted on a POSTSCRIPT printer 
      or other POSTSCRIPT device.
  2.  Plotted directly to an X image display device.
  3.  Written as a tab-delimited ASCII file for use by commmerical packages.

 OPERATION:
  
  POWER uses the fast Fourier Transform to produce the power spectrum of each
  line of a specified portion of an input picture.  POWER produces a single 
  resultant power spectrum by averaging these together as a function of 
  frequency. The desired portion of the picture is specified in the size field.

  If a transform size (EXPONENT) is specified larger than the input sample 
  size, the necessary additional samples are generated by averaging the 
  available input data so to minimize sin(x)/x ringing. If it is defaulted,
  the transform size will be the largest power of 2 less than the input
  sample size.

  POWER will take the image format from the input's system label.


 PARAMETERS:

  Formerly the parameter TABLE was used to specify the name of the file 
  to contain the tab-delimited ASCII table of Frequency and Power values 
  to be plotted. This is now automatically created by the name in the
  PLOTOUT parameter. TABLE  now has the name PLOTOUT.asc. The table
  is always created even if PLOTOUT is not entered.

  COLUMNS


  If PLOTFMT=EPS is selected, the plot is generate as a POSTSCRIPT (EPS) file.  (See 
  PLOTOUT parameter.)  

  PLOTOUT='filename' is used to name the output plot file.  Specifying PLOTOUT
  implies TYPE=GNUPLOT. The default value of PLOTOUT is power.eps.

  EXPONENT

  SCALE

  DNSCALE

  FMAX is the highest frequency in the plotted spectrum


  YLEN = length of Y-axis 

  TITLE and TITLEX are the Title to be placed on the graph and the X-axis units
  No entry for the y-axis. It is always "AMPLITUDE (DN P-P)". P-P is peak to peak. 

  


  Example to request only tab-delimited ASCII file output:

 	 power inp=a.img
  
  tab delimited file will be power.asc 

NOTES:

  The common plotting routines used in MIPL were removed in this version
  and converted to gnuplot commands. The Mipl version in 2011 uses the
  xrt commercial plotting package.


OUTPUTS:

  Up to two types of outputs can be produced, interactive plots using 
  gnuplot and hardcopy plots suitable for publications using gnuplot and ghostscript
  or gimp.

  The first type of plot is rendered via the creation of a gnuplot instruction, or
  command file. This is indicated by the file extension of .gpi.  After completion
  of the power task this file creates an interactive plot on the desktop, e.g.,
  if PLOTOUT=mypower
     ush gnuplot mypower.gpi.
  This display stays active until mouse-clicked somewhere on the plot panel.
  The terminal window prompt is inactive until the panel is closed.

  If you wish, you can issue the following gnuplot command to keep the plot on
  the desktop.

  ush gnuplot -persist mypower.gpi

  Again the terminal prompt is inactive until the plot panel has been mouse-clicked.
  After the mouse click the panel remains but the terminal prompt is restored. This
  makes it easy to compare outputs from several power commands.

  A second output is derived from the PLOTOUT parameter. By default this parameter is
  set to "NONE" so no hardcopy output is produced.  If you give a filename such as
  mypower then two gpi files are created mypower.gpi and mypower.2.gpi.

  ush gnuplot mypower.2.gpi 
 
  then no interactive plot panel is created but it produces a file mypower.eps. This
  file can be displayed using ghostscript (the usual unix command is gs).

  gs mypopwer.eps

  or gimp, e.g.,

  gimp mypower.eps



HISTORY

  ORIGINAL PROGRAMMER: T. C. Rindfleisch
  CURRENT COGNIZANT PROGRAMMER: Ray Bambery - AFIDS/Vicar version  

  1984-09-01 FFM Convert from IBM to VAX
  1993-11-22 CCA Add ASCII table output, checks for open errors, fix test, mod 
                 selection of plot or print
  1994-02-22 CCA Major code cleanup, rework of label handling, test file and plotting 
                 of labels
  1994-04-11 CCA Added dnscale
  1994-06-14 CCA Fixed fmax, deleted histogram plot
  1994-10-20 CCA Corrected accumulation of amplitude
  1994-07-18 CCA Add option of no table column headers
  1995-11-16 CCA Made scal r*4
  1997-04-29  SP Made portable for UNIX.  Adapted for XRT pltting
                 package.  Changed COUNT for FILE parameter to 0:1
                 so that POWER can run without setting an X DISPLAY
                 by specifying neither 'PLOT nor FILE.  (Previously
                 the COUNT received by the program was always 1.)
  2011-06-09 RJB Changed from commercial plotting package, xrt, to gnuplot
                 create gnuplot commands and always create a table file
                 all xrt calls commented out. Completely rewrote test file.
  2012-07-02 RJB Renamed power2 for delivery to MIPL
                 power still uses XRT/Graph package, removed debug
                 statements, Removed <tab> in front of continuation
                 lines to make backward compatible with
                 32-bit Linux gfortran 4.2.1, otherwise
                 compatible 64-bit Linux gfortran 4.6.3</tab>
  2012-10-11 RJB Renamed back to power, in agreement
                 with Lucas Kamp of mipl. The XRT graph package
                 is to be removed from mipl. XRT was never used by
                 cartlab. 
  2012-10-14 RJB Revised the scheme for producing eps files
                 Old scheme used 1 gpi script to produce both
                 gnuplot panel and eps file. This scheme forced
                 power to be interactive when producing eps file
                 Scheme like qplot2 and statplt is now used.
  2013-07-08 RJB Redesigned plot naming conventions 
  2013-07-13 RJB Adjusted eps format to more readable fonts
                 Remove vestiges of debug statments


PARAMETERS:


INP

input data set

SIZE

Standard Vicar size field: (SL,SS,NL,NS) You can enter SL,SS,NL, and NS together as SIZE, OR enter the SL,SS,NL, and NS parameters separately.

SL

Starting line number

SS

Starting sample number

NL

Number of lines

NS

Number of samples

EXPONENT

transform size

SCALE

output plot amplitude scale

DNSCALE

scaling factor of input image

FMAX

highest frequency in the plotted spectrum

YLEN

length of Y axis

PLOTFMT

specification of plotter output Gnuplot or eps

PLOTOUT

specification of output plot filename

TITLE

user specified label to both printer and plotter

TITLEX

user specified label of X axis to the plotter only

COLUMNS

selects table column headers or not

See Examples:


Cognizant Programmer: