Metrics:
Proposed Implementation Guidelines
 

Time Base

The database will display UT, since each night fits into a single UT date. Creating files with HST dates and times may be acceptable, however. The conversion could be done within the database, or in a separate procedure. Conversion to MJD can be used as an intermediate step. There are conversion utilities available that perform these latter functions.

cron Jobs and Output Files

Try to keep cron jobs either on the instrument machine or on hqcronserver. Hqcronserver cron jobs preferably would be run as kics, but the instrument master accounts (nirspec, esi, lris, k2nirc, etc.) may be better for some uses.

Output files should preferably be kept in /h/nightly* for the appropriate date. An exception would be "archaeological" files that have gone back through old log files and extracted metrics data. In this case you might opt for a single, large file.

Ideally instrument tasks would be broken into subtasks:

For instrument metrics extracted from FITS headers, the following is recommended:

This style allows archival data to be extracted directly from the FITS header dumps performed by the archiving mechanism, by running the last routine on those files.

Format

As much as possible, try to keep to the following format:

2002-02-17,06:34:17,2,event start,more info 1, more info 2

where the date for mat is year-month-day, the time format is colon-separated, the next value is the telescope (1 = K1, 2 = K2), the next is the name of the event (e.g. "exposure start", "dither end", "configuration change end"). For each "event start" there should be a corresponding "event end", but it is accepted that occasional peculiarities in the log files or elsewhere may create multiple starts or ends, or missing events. You can put more information at the end if you think you may need it later, such as the exposure time, image size, target name.

Utility Scripts

There will be a need for utility scripts, such as a script to convert from one date/time format to another. An example is the script /home/goodrich/bin/convertTime, that takes a string of the form:

17-Feb-2002,06:34:16.567

and converts it to the form

2002-02-17,06:34:17

Another example that would be useful, but has not yet been written, would be to convert an HST time and date to a UT time and date. Ideally these should be kept at HQ in /kroot/instr/bin/metrics. (I will move the convertTime script when I get the chance.)

Documentation

A web strand has been created in order to consolidate and organize information related to the metrics effort. This is:

http://www.keck.hawaii.edu/realpublic/inst/metrics


Go To:
Instruments Home Page       Keck Home Page       Observer's Reference Shelf


Metrics Master
13 February 2002