[AIT logo]

Institut für Astronomie und Astrophysik

Abteilung Astronomie

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


fxbread Source code in jwfxbread.pro

fxbread

Project : SOHO - CDS
Name
       fxbread
Purpose
       Read a data array from a disk FITS binary table file.
Explanation
       Each call to FXBREAD will read the data from one column and one row
       from the FITS data file, which should already have been opened by
       FXBOPEN.  One needs to call this routine for every column and every row
       in the binary table.  FXBCLOSE will then close the FITS data file.
Calling Sequence
       FXBREAD, UNIT, DATA, COL  [, ROW ]
Input Parameters
       UNIT    = Logical unit number corresponding to the file containing the
                 binary table.
       COL     = Column in the binary table to read data from, either as a
                 character string containing a column label (TTYPE), or as a
                 numerical column index starting from column one.
Optional Input Parameters
       ROW     = Either row number in the binary table to read data from,
                 starting from row one, or a two element array containing a
                 range of row numbers to read.  If not passed, then the entire
                 column is read in.
                 Row must be passed for variable length arrays.
Output Parameters
       DATA    = IDL data array to be read from the file.
Optional Output
       None.
Keyword Parameters
       NOSCALE = If set, then the ouput data will not be scaled using the
                 optional TSCAL and TZERO keywords in the FITS header.
                 Default is to scale.
       VIRTUAL = If set, and COL is passed as a name rather than a number,
                 then if the program can't find a column with that name, it
                 will then look for a keyword with that name in the header.
                 Such a keyword would then act as a "virtual column", with the
                 same value for every row.
       DIMENSIONS = Vector array containing the dimensions to be used to read
                 in the data.  Bypasses any dimensioning information stored in
                 the header.  Ignored for bit arrays.  If the data type is
                 double-precision complex, then an extra dimension of 2 is
                 prepended to the dimensions passed by the user.
       NANVALUE= Value signalling data dropout.  All points corresponding to
                 IEEE NaN (not-a-number) are converted to this number.
                 Ignored unless DATA is of type float, double-precision or
                 complex.
       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 = ''
                       FXBREAD, ERRMSG=ERRMSG, ...
                       IF ERRMSG NE '' THEN ...
Procedures Used
       IEEE_TO_HOST, FXPAR, WHERENAN
Common Blocks
       Uses common block FXBINTABLE--see "fxbintable.pro" for more
       information.
Restrictions
       The binary table file must have been opened with FXBOPEN.
       The data must be consistent with the column definition in the binary
       table header.
       The row number must be consistent with the number of rows stored in the
       binary table header.
       The number of elements implied by the dimensions keyword must not
       exceed the number of elements stored in the file.
Side Effects
       If the DIMENSIONS keyword is used, then the number of data points read
       in may be less than the number of points stored in the table.
       If there are no elements to read in (the number of elements is zero),
       then the program sets !ERR to -1, and DATA is unmodified.
Category
       Data Handling, I/O, FITS, Generic.
History
       W. Thompson, Jan 1992.
       W. Thompson, Feb 1992, modified to support variable length arrays.
       W. Thompson, Jun 1992, modified way that row ranges are read in.  No
                              longer works reiteratively.
       W. Thompson, Jun 1992, fixed bug where NANVALUE would be modified by
                              TSCAL and TZERO keywords.
       W. Thompson, Jun 1992, fixed bug when reading character strings.
                              Treats dimensions better when reading multiple
                              rows.
Author
       William Thompson, GSFC, January 1992.
Revision History
       Version 1, William Thompson, GSFC, 12 April 1993.
               Incorporated into CDS library.
       Version 2, William Thompson, GSFC, 30 June 1993.
               Added overwrite keyword to REFORM call to speed up.
       Version 3, William Thompson, GSFC, 21 July 1993.
               Fixed bug with variable length arrays.
       Version 4, William Thompson, GSFC, 29 October 1993.
               Added error message for not finding column by name.
       Version 5, William Thompson, GSFC, 31 May 1994
               Added ERRMSG keyword.
       Version 6, William Thompson, GSFC, 23 June 1994
               Modified so that ERRMSG is not touched if not defined.
       Version 7, William Thompson, GSFC, 29 December 1994
               Fixed bug where single element dimensions were lost.
       Version 8, William Thompson, GSFC, 20 March 1995
               Fixed bug introduced in version 7.
Version
       Version 8, 20 March 1995

Last modified by pro2html on 2005 January 04 at 16:32 UTC

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

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