; FQUBE
;---------------------------------------------------------------
;! collects n-dimensional images into n+1-dimensional FREQID image
;# TASK ANALYSIS SPECTRAL
;-----------------------------------------------------------------------
;;  Copyright (C) 2009, 2013, 2015
;;  Associated Universities, Inc. Washington DC, USA.
;;
;;  This program is free software; you can redistribute it and/or
;;  modify it under the terms of the GNU General Public License as
;;  published by the Free Software Foundation; either version 2 of
;;  the License, or (at your option) any later version.
;;
;;  This program is distributed in the hope that it will be useful,
;;  but WITHOUT ANY WARRANTY; without even the implied warranty of
;;  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
;;  GNU General Public License for more details.
;;
;;  You should have received a copy of the GNU General Public
;;  License along with this program; if not, write to the Free
;;  Software Foundation, Inc., 675 Massachusetts Ave, Cambridge,
;;  MA 02139, USA.
;;
;;  Correspondence concerning AIPS should be addressed as follows:
;;         Internet email: aipsmail@nrao.edu.
;;         Postal address: AIPS Project Office
;;                         National Radio Astronomy Observatory
;;                         520 Edgemont Road
;;                         Charlottesville, VA 22903-2475 USA
;-----------------------------------------------------------------------
FQUBE     LLLLLLLLLLLLUUUUUUUUUUUU CCCCCCCCCCCCCCCCCCCCCCCCCCCCC
FQUBE:  Convert FREQ/FREQID image cubes into larger FREQID cube
INNAME                             Input name(name).
INCLASS                            Input name(class).
INSEQ           0.0      9999.0    Input name(seq. #). 0=>high
                                   First sequence # in the set
INDISK          0.0         9.0    Input disk drive #. 0=>any
IN2SEQ          0.0      9999.0    Last sequence # in set.
IN3SEQ                             Sequence # increment.
OUTNAME                            Output name(name).
OUTCLASS                           Output name(class).
OUTSEQ         -1.0      9999.0    Output name(seq. #).
                                     0 => highest unique
OUTDISK         0.0         9.0    Output image disk drive #
                                     0 => highest with space
DOALIGN        -2.0         1.0    Alignment control parm
DOKEEP         -1.0         1.0    > 0 keep all planes including
                                   fully blanked missing CG
----------------------------------------------------------------
FQUBE
Type: Task
Use:  FQUBE will take a set of maps with n actual (more than 1 pixel
      deep) dimensions and convert them into an image of n or n+1
      actual dimensions.  Unlike MCUBE, which tries to be very
      general, FQUBE only works with image cubes with a FREQ or
      FQID axis and builds a cube with an FQID axis.  FQUBE does not
      handle subimages at all - the images must match in terms of the
      number of pixels on each actual axis ignoring the FQID or FREQ
      axes.  If DOALIGN > -2, the actual axes must match in more
      detail.  In some ways, FQUBE is like running MCUBE with the
      DOCONCAT option but it should be simpler to use when building a
      frequency axis that is not regularly gridded.

      FQUBE will comment on the absence of sequence numbers between
      INSEQ and IN2SEQ, but will happily do without any missing ones.

      Task SPIXR will analyze such cubes to fit images of spectral
      index.  A task to do "rotation-measure" synthesis has been
      developed (FARS) and can use such cubes as input.  Other
      rotation measure programs will also understand these cubes and
      ISPEC will even plot the points at the correct frequencies.
Adverbs:
  INNAME......Input name of images(name).   Standard defaults.
              Must be the same for all input images.
  INCLASS.....Input name of images(class).  Standard defaults.
              Must be the same for all input images.
  INSEQ.......First seq no. of the images.  0 => highest.
  INDISK......Disk drive # of images.       0 => any.
              May vary between images if INDISK is set to 0.
  IN2SEQ......Last sequence # in set of input images.  No default.
  IN3SEQ......Sequence # increment.  0 => 1.
              Thus, FQUBE uses sequence numbers INSEQ to IN2SEQ by
              IN3SEQ in the usual loop sense.
  OUTNAME.....Output name of image(name).   Standard defaults.
  OUTCLASS....Output name of image(class).  Standard defaults.
  OUTSEQ......Output name of image(seq. #). 0 => highest unique.
  OUTDISK.....Disk drive # of output image. 0 => highest with space.
  DOALIGN.....Controls how the images are to be aligned on axes 1 - n-1
              (see HELP DOALIGN).  True (>.1) means that the images must
              agree in their coordinates including the reference pixel.
              DOALIGN > -2 means that the actual axes must agree on
              the coordinate name but the output coordinates are taken
              from the first input image.  DOALIGN = -2 means that the
              images must agree only in the number of pixels on each
              non-frequency axis.  Use SUBIM to reduce images to a
              size that matches and/or OHGEO or HGEOM to re-grid
              images onto matching coordinate systems.
  DOKEEP......<= 0 causes the task to check each plane of the input
              images and keep only those planes that are not purely
              blanked or 0.0.  It also requires that each plane have
              a corresponding entry in the CG (Clean Gaussian) table.
              > 0 is the previous behavior in which all planes in the
              input images appear in the output image.
----------------------------------------------------------------
