TEXT   10

mrdfits.txt

Guest on 21st August 2021 09:06:14 AM

  1. MRDFITS - A multiple format FITS reader. V2.15
  2. Last updated: June
  3.  
  4.  
  5. The MRDFITS utility is intended to be a general purpose function allowing users
  6. to quickly read FITS files in all standard formats.  MRDFITS returns an array or
  7. structure containing the data from the specified FITS extension.  Header
  8. information may optionally be returned as a string array.  MRDFITS was
  9. originally written by Tom McGlynn (NASA/GSFC) but is now maintained by Wayne
  10. Landsman.
  11.  
  12. MRDFITS currently supports the following FITS data types:
  13.  
  14.         Primary simple images
  15.         The IMAGE extension
  16.         Group data in both primary images and IMAGE extensions.
  17.         ASCII tables
  18.         BINARY tables including variable length records.
  19.  
  20. MRDFITS uses the dynamic structure definition capabilities
  21. of IDL to generate a structure matching the characteristics of the
  22. FITS data and then reads the data into the structure.  Some tailoring
  23. of the FITS data is possible:
  24.  
  25.         - A specified range of data may be retrieved.
  26.         - The data may be scaled to FLOAT or DOUBLE values as controlled
  27.           by the BSCALE (TSCALE) and BOFFSET (TZERO) keywords.
  28.           Note that the default is no scaling.
  29.         - Only a subset of the columns may be retrieved for ASCII
  30.           and binary tables.
  31.         - Automatic mapping into IDL unsigned data types (/UNSIGNED) when the
  32.           appropriate BSCALE(TSCAL) and BZERO(TZERO) keywords appear in the
  33.           header
  34.         - Variable length binary tables may read either into a fixed length
  35.           column (default) or into a IDL pointers (with /POINTER_VAR) for
  36.           maximum efficiency
  37.  
  38. MRDFITS has been tested to work on IDL Version V5.0 through V6.4, although not
  39. all of its capabilities are available in earlier IDL Versions.   For example,
  40. output of unsigned data types requires at least V5.2
  41.  
  42. MRDFITS is called as a function similar to the old READFITS utility, e.g.,
  43.  
  44.         str = mrdfits(file, exten_no, header)
  45.        
  46. where file is a file name, exten_no is the extension to be read (0 for the
  47. primary data array) and header is an optional variable in which the
  48. header information will be stored.  A number of optional keyword
  49. parameters are available.
  50.  
  51.         ALIAS             Specify translation of column names to structure tags
  52.         /FSCALE and /DSCALE  cause scaling to single and double precision.
  53.         COLUMNS=             allows users to specify the columns desired.
  54.         RANGE=               allows users to retrieve only a range of rows.
  55.         ROWS=                allows user to retrieve only specified rows
  56.         STRUCTYP=            gives the structure type for the structure
  57.         TEMPDIR=             gives the directory for temporary files
  58.         /SILENT              suppresses informative messages
  59.         /USE_COLNUM          makes tag names of the form C#
  60.         /NO_TDIM             disable processing of TDIM keywords.
  61.         ERROR_ACTION         Set the ON_ERROR action to this value
  62.         /UNSIGNED            Convert to IDL unsigned integer type when possible
  63.        
  64. MRDFITS uses the EXECUTE function where possible but creates temporary
  65. procedures when complex structures are needed.  The MRD_STRUCT
  66. function is used for the dynamic definition of structures.
  67.  
  68. MRDFITS is largely a standalone utility, but does use the parameter
  69. parsing of FXPAR to find elements in a header.  All I/O is done
  70. within MRDFITS.  The IEEE_TO_HOST routine is used to convert
  71. data to the local representation.
  72.  
  73. Known limitations include:
  74.        
  75.         No special handling is done for NULL values.
  76.        
  77.         Note that MRDFITS is not a FITS checker.  It may read in
  78.         files that are not proper FITS since only a few FITS elements
  79.         needed by the reader are actually explicitly checked.  MRDFITS
  80.         should read in all correct FITS files and I would appreciate
  81.         copies of any correct FITS files that break the reader.
  82.        
  83. MRDFITS comprises several files.   The following procedures are included in
  84. the main file MRDFITS.PRO
  85.  
  86.         MRDFITS:        The main function with some utilities.
  87.         MRD_ASCII:      Code to handle ASCII tables.
  88.         MRD_TABLE:      Code to handle BINARY tables.
  89.         MRD_IMAGE:      Code to handle simple images and group data.
  90.         MRD_SCALE:      Data scaling.
  91.         MRD_COLUMNS:    Column selection.
  92.         MRD_FXPAR:      Fast extract of FITS BINARY table keywords
  93.  
  94. The following procedures are in separate files (because they are of general
  95. use outside of MRDFITS.)
  96.  
  97.         MRD_STRUCT:     Dynamic structure definition.
  98.         FXPOSIT:        Find an extension in a FITS file.
  99.  
  100.  
  101. MRDFITS can handle files with several compression types including the `standard'
  102. Unix compress utility, Gnu gzip, the Linux bzip2 utility or the FPACK
  103. (http://heasarc.gsfc.nasa.gov/fitsio/fpack/) utility.     It assumes that files
  104. ending with .Z, .gz or .GZ  and .bz2 or .fz are to be decompressed.
  105. Decompression of Unix, FPACK and bzip2 files is done using a sub-process and
  106. pipes so that no temporary file is created.    Gzip files are read directly
  107. using the /COMPRESS keyword to OPENR.  Please send comments and bug reports to:
  108.  
  109.  
  110.         or Wayne Landsman  
  111.         http://astrophysics.gsfc.nasa.gov/staff/CVs/Wayne.Landsman/

Raw Paste


Login or Register to edit or fork this paste. It's free.