Institut für Astronomie und AstrophysikAbteilung AstronomieWaldhäuser Str. 64, D-72076 Tübingen, Germany |
IMGREAD
Read a WFPC or FOC file into IDL image and data arrays
Open an SDAS/GEIS file and read the image into a data array of appropriate type and read the header into a string array. This procedure was designed to be more versatile than the STRD procedure and to be specifically useful to WF/PC and FOC data, as well as all other GEIS images. IMGread supports multiple GROUPS (i.e. in STSDAS format).
IMGread,image,hdr,[filename],[groupno],[/NoAssoc,/silent,Astrmfix=]
FILENAME The filename of the HEADER file (must have extention .xxh where xx may be any two alphanumerics but it usually hh.) If there is no extention supplied, .hhh and .hhd are assumed. If this parameter is not supplied, a filename is prompted for, with the option of pressing [ENTER] to call the GETFILE() function provides a menu listing of available *.*h files. If widgets are available, the function PICKFILE() is called instead. GROUP - This parameter specifies the GROUP number image to read from a file which contains multiple groups. For example, for WF/PC images where all four chips are contained in one file, one specify a GROUP of 0 to read PC5, 1 for PC6, 3 for PC8, 0 to read WF1 for a WF image, etc. therefore, the range of GROUP is 0 to GCOUNT-1 (where GCOUNT is a header keyword.)
IMAGE - The returned array which contains the pixel information. IMAGE will be of whatever datatype the header indicates (or seems to... i.e. if BITPIX=32 but there is no DATATYPE keyword, IMGread assumes REAL*4 if BZERO is 0 or non-existant and INTEGER*4 if BZERO is not 0. This is usually right, but not always.) H - The returned string array containing the image header information as if SXHREAD were used.
NoAssoc - This keyword controls how IDL reads the file. If NoAssoc is set and non-zero then the READU function is used instead of the ASSOC function. The user can select the type of read that gives the best performance on his particular setup. In general, the ASSOC function seems to be faster, but is more demanding on virtual memory. SILENT - If this keyword is set and non-zero, then the "Loading..." message will not be ; printed. ASTRMFIX Controls whether the procedure AstrmFix is run. AstrmFix calculates an astrometric solution from the HST Spacecraft angle in the header. CRPIXn and CRVALn are left alone. Only CDn_n are changed. The Default is currently set to 1 since correct astrometry still does not come with the headers. Once the astrometric fix is implemented in PODPS, the default should be switched to 0.
For an image with group parameters, all parameters are extracted from the .HHD file and values are inserted into the returned header variable. To get the original header, use SXHREAD for these type of image files. The EXTGRP procedure takes care of this process.
Read the WF/PC file named 'w0hd0203t.c1h' into IDL variables, IM and H. IDL> IMGREAD, im,h,'w0hd0203t.c1h'
SXPAR, SXADDPAR, SXOPEN, SXHREAD, FDECOMP, WFPCREAD, PICKFILE, EXTGRP
09-JUL-92 Header finally added to this procedure which has been in use for two or more years. All versions and header by Eric W. Deutsch 01-APR-93 Made a few minor adjustments. EWD. (No, really) July 93 Added /NoAssoc, MAKE_ARRAY, removed GET_FILE W. Landsman (HSTX) Converted to IDL V5.0 W. Landsman September 1997 Remove use of !ERR W. Landsman January 2001
[Home Page] [Software, Documentation] [IDL Documentation] [Quick Reference] [Feedback]