FXBOPEN
Name
FXBOPEN
Purpose
Open binary table extension in a disk FITS file for reading or updating
Explanation
Opens a binary table extension in a disk FITS file for reading. The
columns are then read using FXBREAD, and the file is closed when done
with FXBCLOSE.
Use
FXBOPEN, UNIT, FILENAME, EXTENSION [, HEADER ]
Inputs
FILENAME = Name of FITS file to be opened. Optional
extension *number* may be specified, in either of
the following formats (using the FTOOLS
convention): FILENAME[EXT] or FILENAME+EXT, where
EXT is 1 or higher. Such an extension
specification takes priority over EXTENSION.
EXTENSION = Either the number of the FITS extension, starting with the
first extension after the primary data unit being one; or a
character string containing the value of EXTNAME to search
for.
Opt. Inputs :
None.
Outputs
UNIT = Logical unit number of the opened file.
Opt. Outputs:
HEADER = String array containing the FITS binary table extension
header.
Keywords
NO_TDIM = If set, then any TDIMn keywords found in the header are
ignored.
ACCESS = A scalar string describing access privileges as
one of READ ('R') or UPDATE ('RW').
DEFAULT: 'R'
REOPEN = If set, UNIT must be an already-opened file unit.
FXBOPEN will treat the file as a FITS file.
ERRMSG = If defined and passed, then any error messages will be
returned to the user in this parameter rather than
depending on the MESSAGE routine in IDL. If no errors are
encountered, then a null string is returned. In order to
use this feature, ERRMSG must be defined first, e.g.
ERRMSG = ''
FXBOPEN, ERRMSG=ERRMSG, ...
IF ERRMSG NE '' THEN ...
Calls
FXBFINDLUN, FXBPARSE, FXHREAD, FXPAR
Common :
Uses common block FXBINTABLE--see "fxbintable.pro" for more
information.
Restrictions
The file must be a valid FITS file.
Side Effects
None.
Category
Data Handling, I/O, FITS, Generic.
Prev. Hist. :
W. Thompson, Feb 1992, based on READFITS by J. Woffard and W. Landsman.
W. Thompson, Feb 1992, changed from function to procedure.
W. Thompson, June 1992, fixed up error handling.
Written :
William Thompson, GSFC, February 1992.
Modified :
Version 1, William Thompson, GSFC, 12 April 1993.
Incorporated into CDS library.
Version 2, William Thompson, GSFC, 27 May 1994
Added ERRMSG keyword.
Version 3, William Thompson, GSFC, 21 June 1994
Extended ERRMSG to call to FXBPARSE
Version 4, William Thompson, GSFC, 23 June 1994
Modified so that ERRMSG is not touched if not defined.
Version 4, 23 June 1994
Added ACCESS, REOPEN keywords, and FXFILTER package, CM 1999 Feb 03
Added FILENAME[EXT] and FILENAME+EXT extension parsing, CM 1999 Jun 28
Some general tidying, CM 1999 Nov 18
Allow for possible 64bit integer number of bytes W. Landsman Nov 2007
Make Ndata a 64bit integer to deal with larger files, E. Hivon, Mar 2008