[AIT logo]

Institut für Astronomie und Astrophysik

Abteilung Astronomie

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



Table of Contents




Introduction

This subdirectory contains IDL procedures to read popular disk formats in astronomy. Currently available are procedures to access
  1. IRAF image (.imh) files (read and write)
  2. MIDAS image and table files (read and update)
  3. WFPC2 images (FITS or STSDAS)
The procedures to access disk FITS files are kept in a separate subdirectory FITS, and those to access STSDAS image files are in the subdirectory /SDAS.

The procedure IRAFDIR uses the non-standard system variables !TEXTOUT and !TEXTUNIT. These can be added to one's session using the procedure ASTROLIB. The following four IDL routines are available for accessing MIDAS .BDF and .TBL data structures:

   MID_RD_IMAGE      ... image (.BDF) read,
   MID_UP_IMAGE      ... image (.BDF) update,
   MID_RD_TABLE      ... table (.TBL) read,
   MID_UP_TABLE      ... table (.TBL) update.
The following lower level procedure is called by MID_RD_IMAGE and MID_UP_IMAGE:
   MID_RD_DIRDSC     ... directory descriptor read
Annotated example of usage:
   mid_rd_image,'trial',nax,npix,data
                              [image TRIAL.BDF is accessed;
                              values will be obtained for number of 
                              dimensions in the image, NAX (assumed 1
                              or 2); numbers of pixels in these 
                              dimensions, NPIX(..); and pixel values, 
                              DATA]
   print,data                 [... for instance]
   data(0) = 8.77             [arbitrary change of value]
   mid_up_image,'trial',nax,npix,data
                              [image TRIAL.BDF is updated; values for
                              NAX, NPIX and DATA must be provided 
                              and this example indicates how this can 
                              be done using a prior MID_RD_IMSGE call]
Known Difficulties A very large number of image descriptors cannot be handled. This is because the offsets determined by these routines cannot cope with for example 86 descriptors, as is the case with FOC images converted to MIDAS c. fall 1990. An error message indicating that NAXIS is 0 indicates that the correct value of NAXIS is not being picked up.

A simple work-around here is as follows. Get rid of all superfluous descriptors. In MIDAS, this is permitted using the aux_mode keyword.

   
   help/key aux_mode             [... gives information about aux_mode]
   read/key aux_mode             [... indicates that usually the 4th 
                                  element is 1; put it to 0...]
   write/key aux_mode 1,0,0,0,0,0,0,1
   comp/ima newimage = oldimage  [... this copies the image, getting rid
                                  of unnecessary descriptors.]



Index of Subroutines

IRAFDIR Provide a brief description of the IRAF images on a directory
IRAFRD Read an IRAF (.imh) file into IDL image and header arrays.
IRAFWRT Write IDL data in IRAF (OIF) format (.imh and .pix files).
MID_RD_DISDSC Get a MIDAS directory descriptor from a MIDAS BDF.
MID_RD_IMAGE Get a pixel matrix and some support information from a MIDAS file.
MID_RD_TABLE Open and read data from a MIDAS table.
MID_UP_IMAGE Get a pixel matrix and some support information from a MIDAS file.
MID_UP_TABLE Open and update data from a MIDAS table.
WFPC2_READ Read WFPC2 images in either FITS or STSDAS format into IDL variables.

Last modified by pro2html on 2008 November 09 at 04:11 UTC

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

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