This page is a listing of the entire contents of this library for IDL. This listing is the long version. Viewing the much more compact listing may be handier.
Project : SOHO - CDS
Name :
FXBCLOSE
Purpose :
Close a FITS binary table extension opened for read.
Explanation :
Closes a FITS binary table extension that had been opened for read by
FXBOPEN.
Use :
FXBCLOSE, UNIT
Inputs :
UNIT = Logical unit number of the file.
Opt. Inputs :
None.
Outputs :
None.
Opt. Outputs:
None.
Keywords :
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 = ''
FXBCLOSE, ERRMSG=ERRMSG, ...
IF ERRMSG NE '' THEN ...
Calls :
None.
Common :
Uses common block FXBINTABLE--see "fxbintable.pro" for more
information.
Restrictions:
The file must have been opened with FXBOPEN.
Side effects:
None.
Category :
Data Handling, I/O, FITS, Generic.
Prev. Hist. :
W. Thompson, Feb. 1992.
Written :
William Thompson, GSFC, February 1992.
Modified :
Version 1, William Thompson, GSFC, 12 April 1993.
Incorporated into CDS library.
Version 2, William Thompson, GSFC, 21 June 1994
Added ERRMSG keyword.
Version 3, William Thompson, GSFC, 23 June 1994
Modified so that ERRMSG is not touched if not defined.
Version :
Version 3, 23 June 1994
Converted to IDL V5.0 W. Landsman September 1997
(See /host/bluemoon/usr2/idllib/astron/contrib/markwardt/fxbclose.pro)
Project : RXTE/PCA
Name :
FXBREADM
Purpose :
Read multiple columns/rows from a disk FITS binary table file.
Explanation :
A call to FXBREADM will read data from multiple rows and
multiple columns in a single procedure call. Up to fifty
columns may be read in a single pass; the number of rows is
limited essentially by available memory. The file should have
already been opened with FXBOPEN. FXBREADM optimizes reading
multiple columns by first reading a large chunk of data from
the FITS file directly, and then slicing the data into columns
within memory. FXBREADM cannot read variable-length arrays;
use FXBREAD instead.
Use :
FXBREADM, UNIT, COL, DATA1, DATA2, ... [, ROW=ROW ]
Inputs :
UNIT = Logical unit number corresponding to the file containing the
binary table.
COL = An array of columns in the binary table to read data
from, either as character strings containing column
labels (TTYPE), or as numerical column indices
starting from column one.
Opt. Inputs :
None.
Outputs :
D0, ... = A named variable to accept the data values, one for
each column. The columns are stored in order of the
list in COL. If the read operation fails for a
particular column, then the corresponding output Dn
variable is not altered. See the STATUS keyword.
Opt. Outputs:
None.
Keywords :
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.
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 = FXBREADM ignores this keyword. It is here for
compatibility only.
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 ...
WARNMSG = Messages which are considered to be non-fatal
"warnings" are returned in this output string.
BUFFERSIZE = Raw data are transferred from the file in chunks
to conserve memory. This is the size in bytes of
each chunk. If a value of zero is given, then all
of the data are transferred in one pass. Default is
32768 (32 kB).
STATUS = An output array containing the status for each
column read, 1 meaning success and 0 meaning failure.
Calls :
IEEE_TO_HOST, FXPAR, WHERENAN
Common :
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.
No variable-length columns may be read with FXBREADM.
Generaly speaking, FXBREADM will be faster than iterative
calls to FXBREAD when (a) a large number of columns is to be
read or (b) the size in bytes of each cell is small, so that
the overhead of the FOR loop in FXBREAD becomes significant.
Side effects:
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.
Prev. Hist. :
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.
C. Markwardt, based in concept on FXBREAD version 12 from
IDLASTRO, but with significant and
major changes to accomodate the
multiple row/column technique. Mostly
the parameter checking and general data
flow remain.
Written :
Craig Markwardt, GSFC, January 1999.
Modified :
Version 1, Craig Markwardt, GSFC 18 January 1999.
Documented this routine, 18 January 1999.
Version :
Version 1, 18 January 1999.
(See /host/bluemoon/usr2/idllib/astron/contrib/markwardt/fxbreadm.pro)
Project : RXTE/PCA
Name :
FXBWRITM
Purpose :
Write multiple columns/rows to a disk FITS binary table file.
Explanation :
A call to FXBWRITM will write multiple rows and multiple
columns to a binary table in a single procedure call. Up to
fifty columns may be read in a single pass. The file should
have already been opened with FXBOPEN (with write access) or
FXBCREATE. FXBWRITM optimizes writing multiple columns by
first writing a large chunk of data to the FITS file all at
once. FXBWRITM cannot write variable-length arrays; use
FXBWRITE instead.
Use :
FXBWRITM, UNIT, COL, D0, D1, D2, ..., ROW=ROW
Inputs :
UNIT = Logical unit number corresponding to the file containing the
binary table.
D0,... = An IDL data array to be written to the file, one for
each column.
COL = Column in the binary table to place data in, starting from
column one.
Opt. Inputs :
None.
Outputs :
None.
Opt. Outputs:
None.
Keywords :
ROW = Either row number in the binary table to writedata to,
starting from row one, or a two element array containing a
range of row numbers to write. If not passed, then
the entire column is written.
NANVALUE= Value signalling data dropout. All points corresponding to
this value are set to be IEEE NaN (not-a-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 = ''
FXBWRITE, ERRMSG=ERRMSG, ...
IF ERRMSG NE '' THEN ...
WARNMSG = Messages which are considered to be non-fatal
"warnings" are returned in this output string.
BUFFERSIZE = Data are transferred in chunks to conserve
memory. This is the size in bytes of each chunk.
If a value of zero is given, then all of the data
are transferred in one pass. Default is 32768 (32
kB).
STATUS = An output array containing the status for each
read, 1 meaning success and 0 meaning failure.
Calls :
HOST_TO_IEEE
Common :
Uses common block FXBINTABLE--see "fxbintable.pro" for more
information.
Restrictions:
The binary table file must have been opened with FXBCREATE or
FXBOPEN (with write access).
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.
Side effects:
None.
Category :
Data Handling, I/O, FITS, Generic.
Prev. Hist. :
C. Markwardt, based on FXBWRITE and FXBREADM (ver 1), Jan 1999
Written :
Craig Markwardt, GSFC, January 1999.
Modified :
Version 1, Craig Markwardt, GSFC 18 January 1999.
Documented this routine, 18 January 1999.
Version :
Version 1, 18 January 1999.
(See /host/bluemoon/usr2/idllib/astron/contrib/markwardt/fxbwritm.pro)
Project : SOHO - CDS
Name :
FXHREAD
Purpose :
Reads a FITS header from an opened disk file.
Explanation :
Reads a FITS header from an opened disk file.
Use :
FXHREAD, UNIT, HEADER [, STATUS ]
Inputs :
UNIT = Logical unit number.
Opt. Inputs :
Outputs :
HEADER = String array containing the FITS header.
Opt. Outputs:
STATUS = Condition code giving the status of the read. Normally, this
is zero, but is set to !ERR if an error occurs, or if the
first byte of the header is zero (ASCII null).
Keywords :
None.
Calls :
None.
Common :
None.
Restrictions:
The file must already be positioned at the start of the header. It
must be a proper FITS file.
Side effects:
The file ends by being positioned at the end of the FITS header, unless
an error occurs.
Category :
Data Handling, I/O, FITS, Generic.
Prev. Hist. :
W. Thompson, Feb 1992, from READFITS by J. Woffard and W. Landsman.
W. Thompson, Aug 1992, added test for SIMPLE keyword.
Written :
William Thompson, GSFC, February 1992.
Modified :
Version 1, William Thompson, GSFC, 12 April 1993.
Incorporated into CDS library.
Version :
Version 1, 12 April 1993.
Converted to IDL V5.0 W. Landsman September 1997
(See /host/bluemoon/usr2/idllib/astron/contrib/markwardt/fxhread.pro)
Project : SOHO - CDS
Name :
FXREAD
Purpose :
Read basic FITS files.
Explanation :
Read the primary array from a disk FITS file. Optionally allows the
user to read in only a subarray and/or every Nth pixel.
Use :
FXREAD, FILENAME, DATA [, HEADER [, I1, I2 [, J1, J2 ]] [, STEP]]
Inputs :
FILENAME = String containing the name of the file to be read.
Opt. Inputs :
I1,I2 = Data range to read in the first dimension. If passed, then
HEADER must also be passed. If not passed, or set to -1,-1,
then the entire range is read.
J1,J2 = Data range to read in the second dimension. If passed, then
HEADER and I1,J2 must also be passed. If not passed, or set
to -1,-1, then the entire range is read.
STEP = Step size to use in reading the data. If passed, then
HEADER must also be passed. Default value is 1. Ignored if
less than 1.
Outputs :
DATA = Data array to be read from the file.
Opt. Outputs:
HEADER = String array containing the header for the FITS file.
Keywords :
NANVALUE = Value signalling data dropout. All points corresponding to
IEEE NaN (not-a-number) are set to this value. Ignored
unless DATA is of type float or double-precision.
PROMPT = If set, then the optional parameters are prompted for at the
keyboard.
AVERAGE = If set, then the array size is reduced by averaging pixels
together rather than by subselecting pixels. Ignored unless
STEP is nontrivial. Note: this is much slower.
YSTEP = If passed, then STEP is the step size in the 1st dimension,
and YSTEP is the step size in the 2nd dimension. Otherwise,
STEP applies to both directions.
NOSCALE = If set, then the output data will not be scaled using the
optional BSCALE and BZERO keywords in the FITS header.
Default is to scale, if and only if BSCALE and BZERO are
present and nontrivial.
NOUPDATE = If set, then the optional BSCALE and BZERO keywords in the
optional HEADER array will not be changed. The default is
to reset these keywords to BSCALE=1, BZERO=0. Ignored if
NOSCALE is set.
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 = ''
FXREAD, ERRMSG=ERRMSG, ...
IF ERRMSG NE '' THEN ...
Calls :
GET_DATE, IEEE_TO_HOST, FXADDPAR, FXHREAD, FXPAR, WHERENAN
Common :
None.
Restrictions:
Groups are not supported.
The optional parameters I1, I2, and STEP only work with one or
two-dimensional arrays. J1 and J2 only work with two-dimensional
arrays.
Use of the AVERAGE keyword is not compatible with arrays with missing
pixels.
Side effects:
If the keywords BSCALE and BZERO are present in the FITS header, and
have non-trivial values, then the returned array DATA is formed by the
equation
DATA = BSCALE*original + BZERO
However, this behavior can overridden by using the /NOSCALE keyword.
If the data is scaled, then the optional HEADER array is changed so
that BSCALE=1 and BZERO=0. This is so that these scaling parameters
are not applied to the data a second time by another routine. Also,
history records are added storing the original values of these
constants. Note that only the returned array is modified--the header
in the FITS file itself is untouched.
If the /NOUPDATE keyword is set, however, then the BSCALE and BZERO
keywords are not changed. It is then the user's responsibility to
ensure that these parameters are not reapplied to the data. In
particular, these keywords should not be present in any header when
writing another FITS file, unless the user wants their values to be
applied when the file is read back in. Otherwise, FITS readers will
read in the wrong values for the data array.
Category :
Data Handling, I/O, FITS, Generic.
Prev. Hist. :
W. Thompson, May 1992, based in part on READFITS by W. Landsman, and
STSUB by M. Greason and K. Venkatakrishna.
W. Thompson, Jun 1992, added code to interpret BSCALE and BZERO
records, and added NOSCALE and NOUPDATE
keywords.
W. Thompson, Aug 1992, changed to call FXHREAD, and to add history
records for BZERO, BSCALE.
Written :
William Thompson, GSFC, May 1992.
Modified :
Version 1, William Thompson, GSFC, 12 April 1993.
Incorporated into CDS library.
Version 2, William Thompson, GSFC, 17 November 1993.
Corrected bug with AVERAGE keyword on non-IEEE compatible
machines.
Corrected bug with subsampling on VAX machines.
Version 3, William Thompson, GSFC, 31 May 1994
Added ERRMSG keyword.
Version 4, William Thompson, GSFC, 23 June 1994
Modified so that ERRMSG is not touched if not defined.
Version 5, Zarro (SAC/GSFC), 14 Feb 1997
Added I/O error checking
Version 6, 20-May-1998, David Schlegel/W. Thompson
Allow a single pixel to be read in.
Change the signal to read in the entire array to be -1
Version :
Version 6, 20-May-1998
(See /host/bluemoon/usr2/idllib/astron/contrib/markwardt/fxread.pro)