Документ взят из кэша поисковой машины. Адрес оригинального документа : http://www.adass.org/adass/proceedings/adass96/reprints/clarked.pdf
Дата изменения: Wed Jan 14 23:16:46 1998
Дата индексирования: Tue Oct 2 12:44:08 2012
Кодировка:

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

Practical Applications of a Relational Database of FITS Keywords
De Clarke and S. L. Allen UCO/Lick Observatory, Kerr Hal l, UCSC, 1156 High Street, Santa Cruz, CA 95064 Abstract. In the course of designing a ma jor mosaicked instrument (DEIMOS) we need tools to manage the large set of FITS keywords required for instrument control and data reduction/archiving. We have therefore constructed a relational database schema which describ es FITS keywords, and have implemented it using Sybase. In this schema FITS keywords and structures are entities, having attributes such as format, units, datatyp e, minimum and maximum value, semantics, etc. The schema was expanded and generalized to document information flow and database schema (b ecoming self-referential). Many useful output products (documentation, diagnostics, configuration, and source code) can b e generated from one authoritative source of keyword information.

1.

Introduction

Using a centralized database or information service to document FITS keywords is not a new idea. However, in previous incarnations of this concept, the ob ject has either b een purely documentary or single-purp ose (e.g., the SaveTheBits database schema). Our goal was to capture enough information, and to generalize the information sufficiently, that multiple related applications could all use one authoritative, online reference database for information ab out FITS keywords. For example, live observing and engineering interfaces to an instrument could rely on the same database that was used to generate printed documents, drawings, and even sections of source code. A more complete documentation of our work, with examples, and live demos, can b e found online at Memes (Keywords) Database Homepage.1 2. Keywords and Memes

The first challenge was to determine the list of attributes necessary to document a FITS keyword. Some, such as name, fortran datatyp e, semantics, and min/max values, were obvious. Others were more subtle, and the list of attributes was revised several times as we explored the syntax and semantics of existing FITS headers and our prop osed DEIMOS instrument keywords.

1

http://www.ucolick.org/de/deimos/Memes

241

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


242

Clarke and Allen

FITS keywords have provenance or context (i.e., an institution, instrument, author, or standards document which defines their valid use). Knowing the context is essential, given the lack of constraint on duplication in FITS namespace. FITS keywords have relationships to other keywords in the same dataset (for example, the value of NAXIS controls the occurrence of NAXISn). We develop ed attributes for a generalized description of these relationships. FITS keywords occur in groups or "bundles"; a standard set of required keywords must app ear in a valid table extension header, for example. A FITS header itself is a sp ecial case of such a bundle, as is a FITS table. We established ancillary tables to describ e the grouping or bundling of keywords. We found it necessary to establish sp ecial typ es of keywords called "tuple keywords," whose values are actually a list or other parsable structure of subvalues. We established a general-purp ose way of documenting such tuple values, which handles any such keyword by defining subsemantics and subformats, separators, delimiters, etc. We accommodated the case where identical semantics are rep eated N times, and the case where N sub-elements have distinct semantics. Given that our instrument and telescop e control systems use a keyword/value architecture, we needed to establish access control for keywords: some are writable, some readable, some are b oth. Access control attributes are needed for the configuration of dynamically-generated graphical user interfaces. We found it necessary to establish a sp ecial relationship b etween certain keywords and an "archetypal" keyword of the same semantics. For example, one instrument system may format a value as F8.4 where another will format it as F6.4 or as a string. It is evident that these are really "the same" keyword. As we struggled with subsemantics and archetyp es, it b ecame clear that we were documenting something more abstract than "a FITS keyword." We b orrowed the term "meme" to describ e "a unit of meaning"--a more generalpurp ose name for the entities we were manipulating. This generalization led swiftly to the use of the "Memes" database to document itself, since the fields (columns) of a database table are memes with a large subset of the attributes of a FITS keyword (such as name, datatyp e, semantics, etc.). Exploration of the relationship b etween database tables and Meme bundles led equally swiftly to automated translation b etween these formats. In other words, we are able to extract (outload) a Sybase table as a FITS table extension, and to imp ort (inload) a defined FITS table extension to a Sybase table. We are able to generate Sybase table definitions for any meme bundle, including standard FITS headers and FITS table extensions. There are many practical applications for these abilities (see Table 1). Although we cannot adequately discuss the Memes schema within the present page limit, we invite the FITS community to investigate the Memes table definition and related tables, using the demo rep orts available at the Memes (Keywords) Database Demos2 page. If you choose "Documentation of Memes by Name" and enter the name Memes, the resulting rep ort will b e the current Memes table definition. We prop ose these attributes as the first draft of a standard set of attributes of FITS keywords, and invite comments from the FITS community.

2

http://www.ucolick.org/de/deimos/Memes/demos.html


Practical Applications of a FITS Keywords Database

243

Table 1. Product 1

Table of Output Products Practical Application

2 3 4 5

6 7

8

9

HTML We can generate (dynamic) documents describing documentation individual keywords, database tables, FITS tables, and FITS headers. We plan to use such documents for design review requirements. These documents can b e regenerated quickly whenever design decisions are changed. The same code generates documents of the database schema itself. Sample FITS We can generate sample (fake) FITS headers which can b e headers used to test FITSIO code. C source We can generate C source for data structures (such as would b e needed to store any given FITS header or table), and for FITSIO writer code (reader code is in progress). Graphic FITS We can generate digraph-typ e graphical representations of documentation FITS headers, showing individual keywords and pre-defined bundles. Sybase DDL We can generate Sybase table definitions (any other database engine could also b e easily supp orted) for the dynamic creation of tables to store data from FITS headers. FITS tables We can generate conformant FITS table extensions containing data from Sybase tables; we can load data into Sybase tables from FITS table extensions. Information We can generate flow charts documenting the movement of Flow Graphs information b etween agents in a system. This generalized tool can document instrument control and data reduction; it also documents itself, or any other system which can b e describ ed by the passage of information elements b etween agents. Online Access The online Meme database is b eing used as the live (code) reference for DEIMOS interface prototyp es. When the interface user wishes to monitor one or more keywords, the interface software generates a control panel with graphical meters and other widgets according to the attributes of the keywords b eing monitored. Keyword attributes need not b e hardcoded into the interface, and the interface will always adapt itself to engineering changes if those changes are documented via the Memes database. Online Access We exp ect to use the online database as a reference and (user) documentary tool for users of the instrument, during actual observing. We exp ect that the dynamic generation of flow control graphs will assist in diagnosis of problems and improve user understanding of the instrument and its output.


244 3.

Clarke and Allen Information Flow

The schema was expanded to include a set of ancillary tables describing protocols, formats, event timings, and agents (software, hardware, and human) so that we could document the flow of information through any large system.The Agents schema p ermits us to document the source language, revision, authorship, and other attributes sp ecial to software agents. (This model corresp onds well with the "gaming table" model of Noordam & Deich 1996.) As with Memes, a URI field p ermits the attachment of detailed documentation to any Agent. A table of Paths documents the passage of Memes b etween Agents. The attributes of a Path are the sending and receiving agent, a controlling agent, the Meme ID, and a cluster of attributes describing the transaction: format, protocol, event timing, and elapsed time. Since human b eings can b e agents and Key Entry is an acceptable protocol, it is p ossible to document the Memes/Agents toolset itself using this schema. We use a digraph generation package (see Acknowledgments) to generate graphical representations of information flow. A hierarchy of agents and paths was required in order to generate b oth simplified and detailed drawings. Accordingly, the schema was adjusted to p ermit the definition of "sup erAgents" which consist of multiple Paths. The Agents/Paths database can b e used not only to generate functional diagrams, but to assist in diagnostic procedures. It can b e used to trace any FITS keyword value back to the originating or authoritative source; conversely, it can reveal which agents handle a keyword and thus may b e affected by changes to the syntax or semantics of that keyword; it can reveal which keywords are handled by an agent, and which "downstream" agents may b e affected if an agent is disabled or altered. Currently we are addressing the distinction b etween syntactic and functional relationships among Memes. We have addressed, for example, the fact that the value of NAXIS controls the app earance of keywords NAXISn (a syntactic relationship). We have now to model those relationships in which a set of FITS keywords acts (in use, rather than in syntactic sp ecification) as a state engine. This is particularly relevant for instrument control systems, in which (for example) a HATCHCLO keyword and a HATCHOPN keyword cannot b oth b e true, but may b oth b e false. The solution to this problem will almost certainly require one additional ancillary table in the schema. Acknowledgments. We would like to acknowledge the invaluable contributions of the free software community, with particular gratitude to Tom Poindexter (Talus Technologies) for the SybTcl package, Stephen North and Eleftherios Koutsoufios (Lucent) for their digraph toolkit, Per Cederqvist and friends for CVS, John Ousterhout (Sun) for Tcl/Tk, and Mark Diekhans (Information Refinery) and Karl Lehenbauer (Neosoft) for TclX. References Noordam, J. E., & Deich, W. T. 1996, in ASP Conf. Ser., Vol. 101, Astronomical Data Analysis Software and Systems V, ed. G. H. Jacoby & J. Barnes (San Francisco: ASP), 229