Документ взят из кэша поисковой машины. Адрес оригинального документа : http://www.adass.org/adass/proceedings/adass96/reprints/stobiee.pdf
Дата изменения: Thu Jan 15 01:05:03 1998
Дата индексирования: Tue Oct 2 12:46:39 2012
Кодировка:

Поисковые слова: закон вина
Astronomical Data Analysis Software and Systems VI ASP Conference Series, Vol. 125, 1997 Gareth Hunt and H. E. Payne, eds.

The FITS List Calculator and Bulk Data Processor
Elizab eth B. Stobie and Dyer M. Lytle NICMOS Project, Steward Observatory, University of Arizona, Tucson, AZ 85721, E-mail: bstobie@as.arizona.edu, d lytle@as.arizona.edu Abstract. The FITS List Calculator and Bulk Data Processor (FLC) is an IDL program with a graphical user interface develop ed for processing large groups of Near Infrared Camera and Multi-Ob ject Sp ectrometer (NICMOS) test data efficiently. The program is built around the simple concept of defining a new IDL variable typ e, the file list. Lists of files may b e assembled with assigned variable names and displayed with subwidgets. These variables may then b e arguments to predefined functions and procedures in the main widget as well as IDL functions and procedures. They may also b e used in arithmetic expressions. Images and arrays may b e defined by direct loading or as the result of calculation. When processing is rep etitive, scripts may b e written to process many groups of data in exactly the same way.

1.

Introduction

A total of 126,370 observations were produced during the NICMOS instrument characterization tests in the Brutus thermal vacuum chamb er at Ball Aerospace during the summer of 1996. These observations provided p erformance information as well as preliminary calibration reference data for the instrument. Software was needed to process large datasets in routine ways with minimal effort. FLC was develop ed for this purp ose by the authors in a time p eriod of approximately two months. 2. Data Typ es

There are four basic data typ es used in FLC: 1. lists 2. images 3. arrays 4. scalars The user may customize the numb er of lists, elements in a list, images, and arrays by editing the user defs file. Structures are allocated at run time for the maximum numb er of lists, images, arrays, and scalars. One must b e careful of the numb er of images allocated as they are the largest memory hog. Figure 1 shows the data structures used to hold lists and images. 266

© Copyright 1997 Astronomical Society of the Pacific. All rights reserved.


The FITS List Calculator and Bulk Data Processor

267

Figure 1. 2.1. Lists

List and Image structures in FLC.

Lists contain lists of FITS filenames (no other filetyp e is supp orted), which are stored in memory. The files themselves are stored on disk and read in one at a time when needed. List names may b e used in FLC functions and procedures or used in arithmetic expressions. The default limits are 100 file lists with 100 filenames in each. They are stored as IDL structures and these structures are, in turn, stored in a parent IDL structure containing all lists. 2.2. Images

Images may b e produced as the result of arithmetic op erations, functions, or defined procedures or may b e directly loaded from FITS files residing on disk. The default size of the image data is 256в256, optimized for NICMOS data. The image header is also loaded into memory. For files with image extensions the primary header and the first image extension header are stored separately. Any subsequent image extensions are ignored. Newly created images may b e saved to disk in FITS format. The default numb er of images is 50. The IDL structures for images are similar to the structures for lists except that the image headers and image data arrays are kept in the structure. 3. Display

There are two display functions in FLC. The first, shown in Figure 2, is for detailed examination of individual images. The window includes a scrolling text region for examining the image headers, a histogram/plot display that can show a histogram of the entire image, a histogram of an individual quadrant, or plots


268

Stobie and Lytle

Figure 2.

Image display in FLC.

of cross sections of the image, vertical or horizontal. Finally there are two image displays, one showing the entire image and one showing only a quadrant of the image. The image displays also have (x,y ) value readouts b elow them. The other display function is called the "scanner" and its primary purp ose is for quickly scanning through a list of images to look for irregularities in the data sets. It has one image display and forward and reverse scan buttons. Along the b ottom of the window, the median and standard deviation of each image is shown. 4. Arithmetic

Standard arithmetic op erators can b e used in FLC expressions. Op erators like plus, minus, multiply, divide, and exp onentiation are generally overloaded where overloading makes sense. For example, an image can b e added to a list resulting in a new list where each memb er of the new list is the sum of an image from the original list and the added image. In other situations, where overloading would b e ambiguous, those constructs cause errors; for example, trying to add a 1-D array to a list of images. 5. Functions

Several functions for op erating on lists, images, and arrays are predefined for the convenience of the user. They include makelist, getlist, savlist, and dellist


The FITS List Calculator and Bulk Data Processor

269

for creating, saving, and deleting lists. Similarly, getimage, getmask, savimage, and delimage are predefined for images and extract, getrow, getcol, savarray, and delarray for arrays. Other functions defined sp ecifically for lists include averaging images in a given list, computing a median image from the images in a given list, summing the images in a given list, computing image statistics (mean, standard deviation, median, skew, and kurtosis) images across the images in a given list, and computing the same statistics for each image in a given list. 6. Procedures

Several routines do not require a target for storing a result. The user may plot a sp ecified array, display a sp ecified image or element in a list, scan all images in a sp ecified list, fit a linear expression by linear regression to each pixel of the images in a sp ecified list, or execute a script. 7. Scripts

Often many datasets are processed in an identical manner which can require several rep etitions of a set of commands. Scripts were implemented to avoid rep etitious typing and minimizing the opp ortunity for mistakes. Any command allowed at the command line may also b e used in scripts and comments are supp orted when prefaced by a semicolon (;). Scripts may call other scripts. 8. Parser

Most commands, excluding scripts and IDL procedures, may b e invoked by selecting them from the appropriate widget menu or by typing the commands in the command window. The FLC parser processes commands as they are entered in the command window. All variables, functions, and procedures are identified as well as arithmetic op erators. Variables are then replaced with internal variables that are associated with the variable names and the IDL EXECUTE command is used to execute the command. No command may extend b eyond one line (80 characters in length) and no conditionals or do loops are allowed. 9. Future Plans

The current version of FLC has only b een tested on computers running IDL version 4.0 or later under various flavors of the UNIX op erating system. With a little work, it could b e made to run on the Apple Macintosh and Intel processor based systems running Windows. FLC will continue to b e used within the NICMOS pro ject during the coming years. If there is a demand, the program could b e generalized somewhat to handle a wider variety of data. Acknowledgments. gram. We are grateful to Tony Ferro for helping test the pro-