% @(#)outdissfit.hlq	19.1 (ESO-DMD) 02/25/03 14:03:32
%++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
%.COPYRIGHT  (c)  1998 European Southern Observatory
%.IDENT      outdissfit.hlq
%.AUTHOR     PJG, DPG/ESO
%.KEYWORDS   MIDAS, help files, OUTDISK/SFITS
%.PURPOSE    On-line help file for the command: OUTDISK/SFITS
%.VERSION    1.0  14-MAY-1998 : Creation, PJG
%----------------------------------------------------------------
\se
SECTION./SFIT
\es\co
OUTDISK/SFITS				       		13-JUL-2001  PJG
\oc\su
OUTDISK/SFITS input_string out flags copy_keyw_flag
	convert set of MIDAS files to a single FITS file on disk
\us\pu
Purpose:    
            Convert a set of MIDAS files to single FITS disk file.
\up\sy
Syntax:     
            OUTDISK/SFITS input_string out flags copy_keyw_flag
\ys\pa
            input_string = name of catalog (abc.cat) or list of one or 
		  more frames (images or tables separated by a comma) 
		  which should be converted into a single disk file in 
		  FITS format. 
		  If the first frame refers to a table a minimum prime 
		  FITS header will be generated. The input frames will be 
		  written in the order given using IMAGE-extensions for 
		  images and TABLE/BINTABLE-extensions for tables. 
		  Note: names of tables must be given with their file 
		        extension.
\ap\pa
            out = name of FITS file to be created.  A full file name, a
                  basename with out extension or an extension only can
                  be given. A name starting with a '.' is assumed
                  to specify an extension while a name without a '.' is
                  interpreted as a basename without extension.  The
                  default extension is '.fits'.  If no output name is
                  given the basename of the first input frame is used.
\ap\pa
            flags = 3-character flag: format, display and cut.
                  type flag : B(asic) FITS e.g. BITPIX=8,16 or 32
                                   for frames and ASCII for tables.\\
                              O(riginal) data format i.e. the FITS
                                   format closest to frame format
                                   including BITPIX=-32,-64 (IEEE-FP) and
                                   BINTABLE for tables. \\
                  display flag: F(ull), S(hort) or N(one) \\
                  cut flag: C(ut) using LHCUTS(3-4) for frames or display
                            format for tables. \\
                  Defaulted to OSN
\ap\pa
            copy_keyw_flag = COPY or NO;
                  if this flag is set, the parameter `input_string' has to
                  be a single Midas table file;
                  the descriptors (FITS keywords) of the table extension
                  (except the standard table descr.) are then copied to 
                  the prime header of the output FITS file.
                  The `out' parameter is defaulted to the basename of the
                  input table and type ".tfits' appended;
                  defaulted to NO
\ap\sa
See also:
            OUTDISK/FITS, OUTTAPE/FITS, COPY/II, INTAPE/FITS, INDISK/FITS,
            CREATE/ICAT, SET/ICAT
\as\no
Note:
            It is normally assumed that a FITS file with multiple
            extensions of the same type contains the keywords EXTNAME
            and EXTVER to uniquely identify the extension within the
            FITS file.  The user is responsible for ensuring that
            this is done by defining corresponding descriptors in the
            MIDAS frames.
               Names like &a, &b.tbl are not accepted, use middumma.bdf and
            middummb.tbl instead.
               The different parameters may be referenced in any order via
            INFILE=  OUTFILE=  FLAGS=
               MIDAS images are normally stored as floating point numbers.
            Such files are by default written using the BITPIX=-32 i.e.
            IEEE floating point format. The BINTABLE extension is used
            for tables.  Please, check if the FITS reader you want to read
            the data with has been upgraded to include these FITS formats
            and extensions.
            If that is not the case, use the 'B' format flag to force
            OUTDISK/SFITS to write image with BITPIX=8,16,32 and tables in
            TABLE extension format.
               If your MIDAS frames are "essentially" 16bit integer frames
            use the command COPY/II first to convert them to 16bit data
            frames and then do the OUTDISK/SFITS to obtain a 16bit FITS file.
\on\exs
Examples:
\ex
            OUTDISK/SFITS  myimage
              Convert the image 'myimage' to a FITS file with the
              name 'myimage.fits' using IEEE floating point format
              if required.
\xe\ex
            OUTDISK/SFITS  myimage,mytable.tbl,mypsf  .mt
              Convert the frames 'myimage,mytable,mypsf' to a single
              FITS file with one prime data matrix ('mydata'), a
              BINTABLE extension ('mytable') and an IMAGE extension
              ('mypsf').  The name of the FITS file will be
              'myimage.mt'.
\xe\ex
            OUTDISK/SFITS  mycat.cat myfile.fits
              Assuming the image catalog `mycat.cat' contains entries
	      for 'myimage.bdf', `mytable.tbl', `mypsf.bdf' these frames
              are converted to the single FITS file `myfile.fits'.
\xe\ex
            OUTDISK/SFITS  mytable.tbl table.fits
              Convert the table 'mytable' to a FITS file with a
              minimum prime header and a BINTABLE extension.  The
              output FITS file will get the name 'table.fits'.
\xe\ex
            OUTDISK/SFITS  mytable.tbl ? ? copy
              As above but also copy all descriptors (except the standard 
              table descr) of `mytable.tbl' to the prime header of the 
              output FITS file 'mytable.tfits'.
\xe\ex
            OUTDISK/SFITS  myimage,mytable.tbl ? BSN
              Convert the frames 'myimage,mytable' to a single FITS
              file with one prime data matrix ('mydata') with
              BITPIX=8,16,32 and a TABLE extension ('mytable').
              The output FITS file will be 'myimage.fits'.
\xe \sxe
