Index: /trunk/dbconfig/Makefile
===================================================================
--- /trunk/dbconfig/Makefile	(revision 5971)
+++ /trunk/dbconfig/Makefile	(revision 5971)
@@ -0,0 +1,10 @@
+SHELL=/bin/sh
+GLUEFORGE=`which glueforge`
+
+all: metadatadb
+
+metadatadb.md : ipp.m4 *.md
+	m4 ipp.m4 > metadatadb.md
+
+metadatadb : metadatadb.md
+	$(GLUEFORGE) -i metadatadb.md
Index: /trunk/dbconfig/config.md
===================================================================
--- /trunk/dbconfig/config.md	(revision 5971)
+++ /trunk/dbconfig/config.md	(revision 5971)
@@ -0,0 +1,4 @@
+glueforge METADATA
+    pkg_name        STR     metadatadb 
+    pkg_namespace   STR     mdb
+END
Index: /trunk/dbconfig/dimm.md
===================================================================
--- /trunk/dbconfig/dimm.md	(revision 5971)
+++ /trunk/dbconfig/dimm.md	(revision 5971)
@@ -0,0 +1,21 @@
+#              Table 13: DIMM Measurements Table
+# Column Name Datatype Description
+# Time          date/time   The time the DIMM observation was taken.
+# sigmax        float Raw dispersion in x.
+# sigmay        float Raw dispersion in y.
+# FWHM          float  Dervied seeing full width at half maximum.
+# RA            float  The coordinates of the measured star.
+# DEC           float  The coordinates of the measured star.
+# Exposure time float  The exposure time of the DIMM observation.
+# Telescope ID  string source of the DIMM data
+
+dimm METADATA
+#    time        DATETIME    2006-01-11T00:00:00
+    sigmax      F32         0.0
+    sigmay      F32         0.0
+    fwhm        F32         0.0
+    ra          F64         0.0
+    dec         F64         0.0
+    expttime    F32         0.0
+    telescope_id    STR     foo
+END
Index: /trunk/dbconfig/dome.md
===================================================================
--- /trunk/dbconfig/dome.md	(revision 5971)
+++ /trunk/dbconfig/dome.md	(revision 5971)
@@ -0,0 +1,16 @@
+#                     Table 15: Dome Status Table
+# Column Name   Datatype Description
+# Time          date/time     The time for which the dome status is valid.
+# Azimuth       float         The azimuth of the dome.
+# Open status   boolean       Whether the dome is open or not.
+# Lights status boolean       Whether lights are on in the dome or not.
+# Track status  boolean       Whether dome is tracking telescope or not.
+
+dome METADATA
+#    time        DATETIME    2006-01-11T00:00:00
+    az          F32         0.0
+    open        BOOL        t
+    light       BOOL        t
+    # XXX is it possible for the dome slit to not track the telescope? ;)
+    track       BOOL        t
+END
Index: /trunk/dbconfig/skyp_absorption.md
===================================================================
--- /trunk/dbconfig/skyp_absorption.md	(revision 5971)
+++ /trunk/dbconfig/skyp_absorption.md	(revision 5971)
@@ -0,0 +1,25 @@
+#                Table 11: Skyprobe Line Absorption Table (sample entries)
+# Column Name         Datatype Description
+# Time                date/time   The time the LRProbe observation was taken.
+# Disperser ID        string      ID of the dispersing element
+# Atm Component 1 float           The strength of the 1st atmospheric component.
+# Atm Component 2 float           The strength of the 2nd atmospheric component.
+# Atm Component 3 float           The strength of the 3rd atmospheric component.
+# Disperser ID        string      ID of the dispersing element
+# Number of stars     int         Number of stars used to measure the absorptions.
+# Astrometry          coords      The astrometry used on the LRProbe image.
+# Exposure time       float       The exposure time of the LRProbe image.
+# Sky brightness      float       The measured sky (surface) brightness, in physical units.
+
+skyp_absorption METADATA
+#    time        DATETIME    2006-01-10T00:00:00
+    disperser_id    STR     foo
+    atmcomp1    F32         0.0
+    atmcomp2    F32         0.0
+    atmcomp3    F32         0.0
+    nstars      S32         0
+    ra          F64         0.0
+    dec         F64         0.0
+    exptime     F32         0.0
+    sky_bright  F64         0.0
+END
Index: /trunk/dbconfig/skyp_emission.md
===================================================================
--- /trunk/dbconfig/skyp_emission.md	(revision 5971)
+++ /trunk/dbconfig/skyp_emission.md	(revision 5971)
@@ -0,0 +1,20 @@
+#             Table 12: Skyprobe Line Emission Table (sample entries)
+# Column Name         Datatype Description
+# Time                date/time   The time the LRProbe observation was taken.
+# Disperser ID        string      ID of the dispersing element
+# Atm Component 1 float           The strength of the 1st atmospheric component.
+# Atm Component 2 float           The strength of the 2nd atmospheric component.
+# Atm Component 3 float           The strength of the 3rd atmospheric component.
+# Continuum           float       The strength of the continuum emission.
+# Disperser ID        string      ID of the dispersing element
+# Exposure time       float       The exposure time of the LRProbe image.
+
+skyp_emission METADATA
+#    time        DATETIME    2006-01-11T00:00:00
+    disperser_id    STR     foo   
+    atmcomp1    F32         0.0
+    atmcomp2    F32         0.0
+    atmcomp3    F32         0.0
+    continuum   F32         0.0
+    exptime     F32         0.0
+END
Index: /trunk/dbconfig/skyp_ir.md
===================================================================
--- /trunk/dbconfig/skyp_ir.md	(revision 5971)
+++ /trunk/dbconfig/skyp_ir.md	(revision 5971)
@@ -0,0 +1,18 @@
+#               Table 14: Near IR Wide-field Camera Results Table
+# Column Name Datatype Description
+# Time            date/time    The time the NIR observation was taken.
+# Sky brightness float         The sky (surface) brightness in the NIR observation.
+# Sky variance    float        The variance in the sky (surface) brightness.
+# Astrometry      coords       The astrometry used on the NIR image.
+# FOV X           float        field width
+# FOV Y           float        field height
+
+skyp_ir METADATA
+#    time        DATETIME    2006-01-11T00:00:00
+    sky_bright  F64         0.0 
+    sky_var     F64         0.0 
+    ra          F64         0.0
+    dec         F64         0.0
+    fov_x       F32         0.0
+    fov_y       F32         0.0
+END
Index: /trunk/dbconfig/skyp_transparency.md
===================================================================
--- /trunk/dbconfig/skyp_transparency.md	(revision 5971)
+++ /trunk/dbconfig/skyp_transparency.md	(revision 5971)
@@ -0,0 +1,21 @@
+#                Table 10: SkyProbe Transparency Table (sample entries)
+# Column Name Datatype Description
+# Time              date/time   The time the SkyProbe image was taken.
+# Filter            string      Filter used for SkyProbe image.
+# Transparency      float       The derived transparency.
+# Number of stars int           The number of stars used to measure the transparency.
+# Astrometry        coords      The astrometry used on the SkyProbe image.
+# Exposure time     float       The exposure time of the SkyProbe image.
+# Sky brightness    float       The measured sky (surface) brightness, counts / second
+
+skyp_transparency METADATA
+#    time        DATETIME    2006-01-10T00:00:00    # Primary Key
+    filter      STR         foo
+    trans       F64         0.0
+    nstars      S32         0
+#    astrom
+    ra          F64         0.0
+    dec         F64         0.0
+    exptime     F32         0.0
+    sky_bright  F64         0.0
+END
Index: /trunk/dbconfig/telescope.md
===================================================================
--- /trunk/dbconfig/telescope.md	(revision 5971)
+++ /trunk/dbconfig/telescope.md	(revision 5971)
@@ -0,0 +1,18 @@
+#                      Table 16: Telescope Status
+# Column Name  Datatype Description
+# Time         date/time   The time for which the telescope status is valid.
+# Guide status enum        The status of the guiding.
+# Altitude     float       The telescope altitude.
+# Azimuth      float       The telescope azimuth.
+# RA           float The telescope Right Ascension (ICRS ~ J2000).
+# Dec          float The telescope Declination (ICRS ~ J2000).
+
+telescope METADATA
+#    time        DATETIME    2006-01-11T00:00:00 # Primary Key
+# XXX there is currently no way to declare an enum - use str or int instead?
+    guide       STR         foo
+    alt         F32         0.0
+    az          F32         0.0
+    ra          F64         0.0
+    dec         F64         0.0
+END
Index: /trunk/dbconfig/weather.md
===================================================================
--- /trunk/dbconfig/weather.md	(revision 5971)
+++ /trunk/dbconfig/weather.md	(revision 5971)
@@ -0,0 +1,19 @@
+#             Table 9: Weather Table: some sample weather points
+# Column Name Datatype Description
+# Time            date/time    The time the weather information was measured.
+# Temperature 01 float         The external temperature
+# Temperature 02 float         The temperature at top of the dome
+# Temperature 03 float         The temperature on the primary mirror
+# Humidity        float        The relative humidity.
+# Pressure        float        The (external) atmospheric pressure.
+
+weather METADATA
+#    time        DATETIME    2006-01-10T00:00:00 # Primary Key
+    temp01      F32         0.0
+    humi01      F32         0.0
+    temp02      F32         0.0
+    humi02      F32         0.0
+    temp03      F32         0.0
+    humi03      F32         0.0
+    pressure    F32         0.0
+END
