Next: , Previous: , Up: Internal Routines   [Contents][Index]


15.5.238 fits_read

fits_read, data, file [, header, ext_data, ext_header, extvar_preamble] [, blank=var] [, /notranslate, /rawvalues]

fits_read(data, file [, header, ext_data, ext_header, extvar_preamble] [, blank=var] [, /notranslate, /rawvalues])

Tries to read the FITS file with the name indicated by file. The data is read into data, and the header as a string array, if specified. The first few standard FITS keywords, which determine the data type and dimensions, are not included in the returned header.

If the file includes a FITS extension, then its data is read into ext_data, if specified, and its header into ext_header, if specified. If extvar_preamble is specified, then it must be a string containing a preamble to use for the creation of variables corresponding to data contained in the extension.

If the file contains LUX compressed data (e.g., was written using fits_write with compression enabled) and if /notranslate is specified, then the compressed data is returned data transformed to a one-dimensional array of type byte. If /notranslate is not specified, then the data is decompressed and stored in data which is transformed to the appropriate type and dimensions.

Unless /rawvalues is specified, the data values read from the FITS file are modified according to the bscale, bzero, and blank FITS keywords from the file’s header. If the data values are stored in the file as integers and bscale and bzero are integers, too, then the transformed data are returned as integers as well. In that case, the returned data type is the smallest one that can hold any of the transformed values.

The function returns a 1 upon success, or a 0 otherwise. The subroutine form generates an error if a problem is encountered.

See also: fits_header, fits_xread


Next: , Previous: , Up: Internal Routines   [Contents][Index]