Elixir Photometry Database

The Elixir system includes a database system for storing and manipulating measurements of objects in the sky. The database and the associated tools make it easy to related objects measured from a variety of sources.

Structure of the Database

The photometry database consists of several types of tables. One type of table is used to store aggregate quantities for each object such as the average position, average magnitudes for a certain filter, and information about the number of specific measurements for each object. A second set of tables provides all individual measurements for each object, including the time of the measurement, the magnitude, offset from the average postion, etc. A third type of table provides information for each object about those images on which the object was not detected, although it was in the field of view. A fourth table contains additional average magnitude values. The final table provides information about the images which supplied the individual measurements in the rest of the database.

The object tables are organized as a collection of many separate file representing a small region on the sky, with constant RA and DEC boundaries. Each file contains all four of the object tables, Average, Measure, Missing, Secondary Filters, for each region. This organization into many distinct database tables allows searches which depend on RA and DEC in some way (the vast majority of all searches) to be extremely efficient.

Inserting Measurements in database

When the objects from an image are added to the photometry database, the measurements are associated with existing objects, if available, on the basis of the RA and DEC of the objects. All objects in the new image are considered and for each object, a search is performed for all objects in the database within a certain distance: a specified factor times the standard deviations of the astrometric solution. For any object in an image, there are four possible cases:

  1. no object in the database is within the given distance of the object.
  2. a single object is within the given distance.
  3. more than one object in the database is within the given distance of the new object.
  4. an object in the database is within the given distance of more than one object in the input image.

The first two cases are trivial and require little explanation. In the first case, and entry is created for the new object, and the average values are initialized. In the second case, the new measurement is added to the existing measurements and the average position is updated.

In the third case, a flag is set to indicate that the object on the image could be associated with more than one object, and the new measurement is added to each of the existing objects.

In the fourth case, a different flag is set and both measurements are added to the object in the database.

An additional point concerns the object non-detections. All non-detections of an object are recorded in the database linked to the average just as the measurements are linked. If an object is found on an image, and no object had previously been found there, a pointer to all images which overlap this location are added to the object's table of missed measurements. Also, if an image overlaps an object in the database and no measurement is found, it is included in the list of missed measurements for that object.

Photcodes

Each measurement which is placed in the database has an associated code which defines the photometry system for the measurement. For an individual measurement, this code is unique for each combination of filter, telescope, and detector. These codes are called `photcodes' and allow the database to associate measurements in different filters together in appropriate ways. For example, all measurements from CFH12K using the R filter receive one of 12 possible photcodes depending on which chip the measurement came from. Similarly, all measurements from the Subaru Suprime camera in an R filter would have one of 10 possible photcode values, and 8 for measurements from the ESO WFI, etc. However, since all of these are R photometry measurements, it is useful to be able to relate them together. They are [when are the color, airmass terms applied? do they use the B or CFH12K.B.00 values?]

Magnitude Averaging - `nrphot'

In the Elixir photometry database, average magnitudes for objects are not automatically updated when the objects are added to the database. The database maintainer must make a decision when to update the magnitude averages. This design choice has been made to allow a complex, processing-intensive magnitude averaging system to be used without locking up the database by this step.

The program `nrphot' is used to perform the update of magnitude averages. Nrphot performs the magnitude averaging for a single spatially contiugous portion of the database at one time. The magnitude averaging process consists of two stages:

  • select all images in a region
  • select all objects on those images
  • select a subset of measurements with good S/N
  • associate measurements with images
  • determine the best set of zero-point corrections for each image
  • apply the zero-points to all objects
  • `average' (find weighted average of inner 50%)

Searching the database - `status'

The `status' program provides a user interface to the photometry database. The general usage of status is described elsewhere [REF]; here we focus on those aspects relevant to the photometry database. Some of the general features of `status' include the ability to manipulate and plot data in scalars, vectors, and arrays.

Status provides a variety of functions to extract data from the photometry database and to visualize the results. Low level functions include commands to extract any of the elements from the different tables into vectors. These vectors may then be plotted as line or point plots as needed. For example, to find the luminosity function for a given region, all that is needed is to define the region, extract the vector corresponding the magnitude of interest, and calculate the histogram of this vector:

 status: region 10 40 1.5
 status: extract mag -photcode V
 status: histogram mag Nm 0.0 30.0 0.1
 status: create dm 0.0 30.0 0.1
 status: lim dm Nm; clear; box; plot -x 1 dm Nm
 

Other low level commands will return the images which overlap a given point (gimages RA DEC), objects within a certain radius of a given point (gstars RA DEC radius).

In addition to these low-level commands, there are higher level functions which allow for more complex plots or extractions. For example, it is possible to plot all stars in a region by extracting each of the vectors of RA, DEC, Mag, and plotting the points with the point size scaled by the magnitude vector. However, a single function also exists which performs exactly this task. Also, a single function will plot the outlines of all images in a given region on a plot of the sky.

Since `status' includes an interpreted programming language, it is possible to define even more complex visualization functions. One example is the `navigate' macro which allows the user to interactively peruse the data by navigating through a plot of the sky.

 * table of database-interaction commands
 
 [these need to be clarified a bit....]
 gcat
 gstars
 pmeasure
 pcat
 images
 imlist
 extract
 mextract
 imextract
 cmd
 cmdextract
 ccd
 ccdextract
 ...
 
 - standard options:
 
 -time
 -trange
 -photcode
 
 
 - measurements of various speeds