# do we need nclass?
# class is missing

chipPendingExp METADATA
    chip_id     S64         0       # Primary Key AUTO_INCREMENT
    exp_tag     STR         64      # Primary Key
    guide_id    S64         0       # Not NULL
    workdir     STR         255 
    label       STR         64      # key
    recipe      STR         64
    expgroup    STR         64      # key
    dvodb       STR         255
END

# uris in & out ?

chipPendingImfile METADATA
    chip_id     S64         0       # Primary Key
    class_id    STR         64      # Primary Key
    uri         STR         255
END

# nclass & ndone?
# and/or logging imfile done better?

chipProcessedExp METADATA
    chip_id     S64         0       # Primary Key
    exp_tag     STR         64      # Primary Key
    guide_id    S64         0       # Not NULL
    workdir     STR         255 
    label       STR         64      # key
    recipe      STR         64
    expgroup    STR         64      # key
    dvodb       STR         255
END

chipMask METADATA
    label       STR         64      # Primary Key
END

# uris in & out ?
# state?

chipProcessedImfile METADATA
    chip_id     S64         0       # Primary Key
# exp_tag/guide_id are redudant with the values stored in chipProcessedExp.
# exp_tag can be removed at virtually any time (SQL queriers will need to be
# fixed) but guide_id needs to wait until we know if this can be tracked at
# just the exp level.
    class_id        STR     64      # Primary Key
    uri             STR     255
    bg              F32     0.0
    bg_stdev        F32     0.0
    bg_mean_stdev   F32     0.0
    bias	    F32	    0.0
    bias_stdev      F32	    0.0
    fringe_0        F32     0.0
    fringe_1        F32     0.0
    fringe_2        F32     0.0
    sigma_ra        F32     0.0
    sigma_dec       F32     0.0
    ap_resid        F32	    0.0
    ap_resid_stdev  F32	    0.0
    fwhm            F32     0.0
    fwhm_range      F32     0.0
    n_stars         S32	    0
    n_extended      S32	    0
    n_cr            S32	    0
    n_astrom        S32     0
    path_base       STR     255
    fault           S16     0       # Key NOT NULL
END
