Name
       stcube - cube statistics

Synopsis
       stcube [options] <cubes...>

Description
       stcube  gives basic statistics about each plane in a cube.
       It is used to have a quick look at what kind of data is in
       the cube.

       The display looks like :

       FILE flat_h.fits
       PLANE    MIN    MAX   MEAN   STDEV    ENERGY    FLUX
       0001 36.25 1008.25 203.157 105.928 6.61e+09 2.56e+07
       ...

       MIN is the minimum value found in each plane

       MAX is the maximum value found in each plane

       MEAN is the mean value found in each plane, i.e.
       MEAN = Sum(pix) / nbpix

       STDEV is the standard deviation on each plane, i.e.
       STDEV = Sum(sqr(pix - meanpix)) (aka square sigma)

       ENERGY is the sum of squared pixels, i.e.
       ENERGY = Sum(sqr(pix))

       AFLUX is the sum of absolute pixel values, i.e.
       AFLUX = Sum(abs(pix))

       Names  are  separated  by  tabulations,  values  by  ASCII
       blanks, which is often not the best way to visualize  them
       on  an  xterm,  but  is readable by any ASCII data reading
       software (awk, Tcl, MIDAS...).

       There is one display for each FITS file given  on  command
       line.  stcube accepts jokers on command line :
       > stcube *.fits

Options
       -b or --badpixmap filename
              give a bad pixel map to take into account when com-
              puting statistics on the cube.

       -m or --median
              To perform a search for the median pixel  value  in
              the  image  only. The algorithm is simple: sort out
              all pixel values and return the central  pixel.  It
              is not possible to use this option together with -b
              or -z.

       -z or --zone 'llx lly urx ury'
              To compute statistics only on a rectangular zone in
              the  images.  The  zone  is specified by giving the
              coordinates of its lower left and upper right  cor-
              ners.  Corners  are  included in the rectangle. The
              coordinate system is the one used by  FITS,  namely
              that  the lower left pixel in the image is labelled
              (1,1), x-axis increasing from left to right, y-axis
              increasing from bottom to top.

       -s or --stdev <name>
              To  compute a standard deviation frame (only), with
              name <name>.  This mode of stcube accepts only  one
              input  file  name,  which  should correspond to the
              name of a 3d FITS file or a valid ASCII list  (i.e.
              a data cube). The input cube is processed to obtain
              a frame that is giving the  standard  deviation  of
              all  pixels  along time. If several input names are
              provided, only the first one  will  be  taken  into
              account.

Examples
       To compute the standard deviation frame named 'stdev.fits'
       from a cube named 'cube.fits', you would use:
       > stcube --stdev stdev.fits cube.fits

       To compute statistics on the lower left quadrant only of a
       256x256 image, you would use:
       > stcube --zone '1 1 128 128' image.fits

Files
       Files shall all comply with FITS format