[AIT logo]

Institut für Astronomie und Astrophysik

Abteilung Astronomie

Sand 1, D-72076 Tübingen, Germany
[Uni logo]


FXPOSIT Source code in fxposit.pro

FXPOSIT

Name
     FXPOSIT
Purpose
     Return the unit number of a FITS file positioned at specified extension
Explanation
     The FITS file will be ready to be read at the beginning of the
     specified extension.
Calling Sequence
     unit=FXPOSIT(FILE, EXT_NO, /READONLY, COMPRESS=program, /SILENT)
Input Parameters
     FILE    = FITS file name, scalar string
     EXT_NO  = Extension to be moved to, scalar nonnegative integer
Returns
     Unit number of file or -1 if an error is detected.
Keyword Parameters
     /READONLY - If this keyword is set and non-zero, then OPENR rather
                than OPENU will be used to open the FITS file.
     COMPRESS - If this keyword is set and non-zero, then then treat
                the file as compressed.  If 1 assume a gzipped file.
                and use IDLs internal decompression facility.    For Unix
                compressed or bzip2 compressed files spawn off a process to
                decompress and use its output as the FITS stream.  If the
                keyword is not 1, then use its value as a string giving the
                command needed for decompression.
     /SILENT    If set, then suppress any messages about invalid characters
                in the FITS file.
Common Blocks
      None.
Side Effects
      Opens and returns the descriptor of a file.
Procedure
      Open the appropriate file, or spawn a command and intercept
      the output.
      Call FXMOVE to get to the appropriate extension.
Procedures Used
      EXPAND_TILDE() (pre V5.5 Unix only), FXPAR(), FXMOVE(), REPSTR()
Revision History
      Derived from William Thompson's FXFINDEND routine.
      Modified by T.McGlynn, 5-October-1994.
       Modified by T.McGlynn, 25-Feb-1995 to handle compressed
          files.  Pipes cannot be accessed using FXHREAD so
          MRD_HREAD was written.
       W. Landsman 23-Apr-1997    Force the /bin/sh shell when uncompressing
       W. Landsman 26-May-1997    Non-unix is not just VMS
       T. McGlynn  22-Apr-1999    Add /binary modifier needed for Windows
       T. McGlynn  03-June-1999   Use /noshell option to get rid of processes left by spawn.
                                  Use findfile to retain ability to use wildcards
       W. Landsman 03-Aug-1999    Use EXPAND_TILDE under Unix to find file
       T. McGlynn  04-Apr-2000    Put reading code into FXMOVE,
                                  additional support for compression from D.Palmer.
       W. Landsman/D.Zarro 04-Jul-2000    Added test for !VERSION.OS EQ 'Win32' (WinNT)
       W. Landsman    12-Dec-2000 Added /SILENT keyword
       W. Landsman April 2002     Use FILE_SEARCH for V5.5 or later
       W. Landsman Feb 2004       Assume since V5.3 (OPENR,/COMPRESS available)
       W. Landsman,W. Thompson, 2-Mar-2004, Add support for BZIP2
       W. Landsman                Don't leave open file if an error occurs
       W. Landsman  Sep 2004      Treat FTZ extension as gzip compressed

Last modified by pro2html on 2005 January 22 at 17:20 UTC

[Home Page] [Software, Documentation] [IDL Documentation] [Quick Reference] [Feedback]

Jörn Wilms (wilms@astro.uni-tuebingen.de)
Updated automatically