Документ взят из кэша поисковой машины. Адрес
оригинального документа
: http://www.adass.org/adass/proceedings/adass99/P1-46/
Дата изменения: Thu Oct 12 00:32:42 2000 Дата индексирования: Tue Oct 2 06:21:07 2012 Кодировка: Поисковые слова: п п п п п п п п п п п п п п п п п |
As pipeline observing and reduction programs, data archiving programs, and data mining research programs become increasingly important in ground-based astronomy, the ability to develop applications which can access on-line catalog and image data quickly and easily becomes increasingly important as well. Ideally this type of application should be both flexible enough to support a variety of existing catalog and image servers, and extensible enough to support new catalog and image servers as they come on line.
In this paper we describe ASTOOL an IRAF astrometry task which provides direct access to several astrometric catalog and image servers, and meets both the flexibility and extensibility requirements. Section II provides an overview of ASTOOL. Sections III, IV, and V discuss the catalog access configuration file, the catalog access applications programming interface, and the IRAF network driver, all of which are used provide network access to ASTOOL. Section VI describes the default ASTOOL GUI. Section VII discusses the current status of and future plans for ASTOOL.
ASTOOL extracts catalog stars in a set of user specified regions by making a local or remote connection to the user selected catalog server, formatting and sending a catalog query, and capturing the catalog server output. Region descriptions may be entered as parameters, read from a text file, or read from a list of images. A configuration file and the catalog access API provide a uniform access method for any supported catalog server. Network connection and communication is handled by the IRAF network driver.
ASTOOL decodes the extracted star list, locates the stars in an image using the image or user supplied coordinate system, computes a new plate solution, and stores the solution in either the image header or a solutions file. Most of the functionality for performing these analysis steps already exists in IRAF. Existing functionality is being integrated with the new catalog access capability to create ASTOOL.
ASTOOL runs interactively with a GUI or in batch mode as part of a pipeline reduction and analysis scheme. In interactive mode the user interacts with the image display to locate and mark the catalog stars, and with the plate solution fitting routines to tune the fit. In batch mode these functions are performed automatically.
The catalog access configuration file specifies the network address, the query format, and the output format for each supported catalog server. Each catalog server record is accessed via a record name of the form catalog@server, e.g. ``usno2@noao''. Adding support for a new catalog server simply requires adding a new record to the configuration file. No programming is required.
The server network address tells the calling ASTOOL task where to connect to the network. Each network address has the syntax domain:port:address:flags, e.g. ``inet:80:www.noao.edu:text''.
The query format specifies the form of the server query string, and the names, default values, units, and format of the query parameters. A set of query parameter names are are reserved for accessing astrometric catalogs, including ``ra'', ``dec'', ``radius'', and ``width''. ASTOOL recognizes the reserved query parameter names, replaces the default query parameter values with user supplied ones, and sends the query to the server.
The server output format specifies the form of the server output: including the data stream type, the record size, and the name, location, size, data type, units, and format of each field in the record. A set of field names are reserved for accessing the output of astrometric catalog servers, including ``id'' ``ra'' ``dec'' and ``mag[1-N]'' ASTOOL recognizes the reserved field names and uses the server output description to decode the catalog records.
The ASTOOL task communicates with the server through a set of portable routines which form the catalog access applications programming interface or API shown in Table 1.
The first group of catalog access API routines in Table 1 map the catalog access configuration file, create a list of supported catalog servers, and find and select the current catalog.
The second group of catalog access API routines read the names, default values, units, and formats of the query parameters from the catalog access configuration file, and replace the default query parameter values with the user values. A set of query parameter names is reserved for use by tasks which access astrometric catalogs, but knowledge of these names is not hard-wired into the catalog access API.
The third set of catalog access API routines send the query to the catalog server and capture the results, retrieve records sequentially or randomly from the captured results, read the position, size, data type, units, and format of the server record fields from the catalog access configuration file, and retrieve field values from the records by name or number. A set of field names is reserved for use by tasks which access astrometric catalogs, but knowledge of these names is not hard-wired into the catalog access API.
cq | = | cq_map (configfile) |
cq_unmap (cq) | ||
ival | = | cq_stati (cq, param) |
cq_stats (cq, param, str, maxch) | ||
catno | = | cq_findcat (cq, catalog) |
catno | = | cq_setcat (cq, catalog) |
catno | = | cq_findcatn (cq, catno, catalog, maxch) |
catno | = | cq_setcatn (cq, catno) |
nqpars | = | cq_nqpars (cq) |
parno | = | cq_gqpar (cq, qpname, qpdefval, sz_qpval, |
qpunits, sz_qpunits, qpfmt, sz_qpfmt) | ||
parno | = | cq_gqparn (cq, parno, qpname, sz_qpname, |
qpdefval, sz_qpval, qpunits, sz_qpunits, | ||
qpfmt, sz_qpfmt) | ||
cq_sqpar (cq, qpname, qpvalue) | ||
cq_sqparn (cq, parno, qpvalue) | ||
res | = | cq_query (cq) |
cq_rclose (res) | ||
ival | = | cq_rstati (res, param) |
cq_rstats (res, param, str, maxch) | ||
nchars | = | cq_gnrecord (res, buffer, maxch, recno) |
nchars | = | cq_grecord (res, buffer, maxch, recno) |
fieldno | = | cq_finfo (res, field, foffset, fsize, ftype, funits, |
sz_funits, ffmt, sz_ffmt) | ||
[ird]val | = | cq_gfield[ird] (res, recno, field) |
cq_gfields (res, recno, field, str, maxch) | ||
The ASTOOL task, by means of the catalog access API routines, uses the IRAF network driver to open the network connection, send queries to the catalog server, and read back the results. The IRAF network driver may be used by a client IRAF task to connect to a server as in the ASTOOL case, or by a server to establish a port to which an IRAF client may connect, as in the IRAF XIMTOOL image display server and DISPLAY task case. The current UNIX/IRAF network driver supports Internet sockets, Unix domain sockets, and FIFO pipes.
To the calling IRAF routine the IRAF network driver consists of a single open network connection routine requiring 2 arguments, a network address of the form domain:port:address:flags, e.g. ``inet:80:www.noao.edu:text'' and an access mode, normally READ_WRITE for a client connection or NEW_FILE for a server connection. Once the connection is established the IRAF task can send queries and read back the results using standard IRAF file i/o routines, although some care must be taken to synchronize the data transfer when the access mode is READ_WRITE.
The protocol used for the client server connection is determined entirely by the server. Any IRAF task may connect to a remote server using the network driver as long as the correct protocol is observed. For example if the server supports multiple client connections, multiple network connections may be made.
ASTOOL can be run in batch mode or interactively with a GUI. The GUI permits the user to control, the image and file input and output, the catalog server access, and algorithm parameters settings, and to interact with the image display, object location and marking, and plate solution algorithms.
Functional prototypes for the astrometric catalog configuration file and the catalog access API already exist. The IRAF network driver exists and is part of the standard IRAF distribution. Most of the astrometric analysis capability required by ASTOOL is already available at the IRAF task level in the IRAF IMCOORDS package. Many of these modules can be integrated into ASTOOL, with minor modifications and enhancements, e.g. the object finding algorithms, the plate solution fitting code, and the image header coordinate system updating code. Most of the work remaining is in the area of integrating the catalog access facility with existing analysis components and in developing the ASTOOL GUI.
The author would like to thank Daniel Durand of Canadian Astronomy Data Center for sharing his ideas and enthusiasm for interfacing IRAF tasks to external data servers, for determining the query format required to access the important astrometric catalogs, and for suggesting the configuration file mechanism as a means to describe the astrometric catalog servers, an expanded version of which is used in this paper.