; FITTP
;---------------------------------------------------------------
;! writes images / uv data w extensions to tape in FITS format
;# TASK TAPE FITS UV IMAGE-UTIL
;-----------------------------------------------------------------------
;;  Copyright (C) 1995, 1998, 2003-2005, 2008
;;  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
;-----------------------------------------------------------------------
FITTP     LLLLLLLLLLLLUUUUUUUUUUUU CCCCCCCCCCCCCCCCCCCCCCCCCCCCC
FITTP:  Task to write maps or uv data on a FITS-tape.
DOALL          -1.0         1.0    1 (T) do all, -1 (F) do 1st.
INNAME                             Image name(name).  Standard.
INCLASS                            Image name(class). Standard.
INSEQ           0.0      9999.0    Image name(seq. #).
INDISK          0.0         9.0    Disk drive #.      0 => any
INTYPE                             File type.     Blank => any
OUTTAPE         0.0         9.0    Tape drive #.  0 => 1
DATAOUT
                                   Disk file name
DOEOT          -1.0         1.0    1 (T) go to end tape first.
DOSTOKES       -1.0         1.0    > 0 => Convert to true
                                      Stokes (Formal I)
               ******** Changed 12/2/93 ***********************
DONEWTAB       -1.0         1.0    >0 standard FITS binary
                                      tables (15JAN94 or later)
                                   <= 0 AIPS FITS binary tables
               ************************************************
FORMAT          0.0         4.0    tape format:   0 => 3.
                                       1 for 16-bit integer
                                       2 for 32-bit integer
                                       3 for 32-bit IEEE
                                         floating point
                                       4 for 8-bit integer maps
BLOCKING        0.0        10.0    tape blocking factor (<= 10)
CATNO                              Limit range of catalog number
----------------------------------------------------------------
FITTP
Type: Task
Use:  FITTP converts the standard header and map or uv data and writes
      it on a output tape in the FITS format.  The 1st image or all
      images that match the input parameters can be written.  The tape
      is left following the End-of-file mark which terminates the last
      file written.  All Clean Components extension files for maps or
      ANtenna files for uv data will be written with the image in a
      special TABLES format (following the image itself in the file).
      Other tables-format extension files will also be written.
Adverbs:
  DOALL......True (> 0) means do all files matching the input
             parameters, false (<= 0) means do the 1st match
             only.
  INNAME.....The input image name (name).  Standard defaults.
  INCLASS....The input image name (class). Standard defaults.
  INSEQ......The input image name (seq. #). 0 => any if DOALL
             is true, 0 => highest if DOALL is false.
  INDISK.....The input disk unit #. 0=> search all disks in
             order for file meeting the other criteria.
  INTYPE.....The input data type (MA or UV or ' ' for either)
  OUTTAPE....The output tape unit #.  0=> 1.
  DATAOUT....The name of a disk file into which to write.
             If blank then write to tape.  If output is to a
             disk file, only 1 file can be written (DOALL=-1).
             The name is limited to 48-characters and must be
             in the form
                  <logical>:<file name>
              or
                  <node>::<logical>:<file name>
              where <node> is the remote computer name,
              <logical> is the environment variable (logical
              name) for the disk area in which the file named
              <file name> is to be stored.  <node> is usually
              omitted when the file is local to the current
              computer.
  DOEOT......True (> 0) means to advance the tape to the end
             of information (double EOF) before writing, false
             means write wherever the tape is now positioned.
             Note: set DOEOT true ONLY if you think that there
             are already FITS data files on the tape AND if
             you wish to preserve them.
  DOSTOKES...True (> 0) means to convert to true Stokes from
             the normal VLA polarizations.  Not recommended for
             now, since it currently uses "formal I".
  DONEWTAB...> 0 => use new FITS binary extension file
             standard for writing all tables.  These tables are
             agreed FITS standards in an informal sense only and
             can only be read by 15JAN94 or later AIPS.
             <= 0 => use FITS binary tables format probably only
             known to AIPS from 1987 or so on.
             ************* NOTE that this is a new use of this
             adverb as of December 2, 1993. ********************
  FORMAT.....Code to tell what format to be used in writing the
             main uv or image data portion of the file as
                   1 for 16-bit integers - only images
                   2 for 32-bit integers - only images
                   3 for 32-bit IEEE floating point - images and
                     required for uv data
                   4 for 8-bit integers - only images
             Default: 0 => 3.
             If you want to import your FITS data into another
             system, make sure that it is able to read the
             format that  you have selected.
  BLOCKING...Code to tell what blocking factor to be used in
             writing the whole file
             Default: 0 => 10.
             Considerations: (a) blocking factor <= 10.
                (b) AIPS releases prior to 15APR87 can read
                    only FORMATs 1 and 2.  Do not use blocking
                    if you may go to an earlier release of AIPS.
                    This same consideration also applies to
                    most other FITS readers around the world.
                (c) Blocking is ignored when writing to disk
                    rather than tape.
                (d) Larger blocks use fewer I/O operations
                    making tape reads and writes more efficient.
  CATNO......Range of catalog numbers over which the operation is to
             take place.  CATNO(1) <= 0 -> 1; CATNO(2) < CATNO(1) ->
             very large.  BE CAREFUL with this - it limits the range
             allowed independent of the value of DOALL.  CATNO=0 is
             recommended unless you intend limitations.
----------------------------------------------------------------





