# $Id: diff.md,v 1.12 2008-09-23 19:58:27 bills Exp $

diffRun METADATA
    diff_id     S64         0       # Primary Key AUTO_INCREMENT
    state       STR         64      # Key
    label       STR         64      # Key
    reduction   STR         64      # Reduction class
    workdir     STR         255
    dvodb       STR         255
    registered  TAI         NULL
    skycell_id  STR         64      # Key
    tess_id     STR         64      # Key
END

#
# Diff Sky Cells Mode
#

# only ever 2 per run - one template / one not
diffInputSkyfile METADATA
    diff_id     S64         0       # Primary Key fkey(diff_id) ref diffRun(diff_id)
    template    BOOL        f       # Primary Key
    stack_id    S64         0       # fkey(stack_id) ref stackSumSkyfile(stack_id) 
    warp_id     S64         0       # fkey(warp_id, skycell_id, tess_id) ref warpSkyfile(warp_id, skycell_id, tess_id)
    skycell_id  STR         64      # Key
    tess_id     STR         64      # Key
# either a input or a template
    kind        STR         64      # Key 
END

diffSkyfile METADATA
    diff_id     S64         0       # Primary Key fkey(diff_id) ref diffRun(diff_id)
    uri         STR         255
    path_base   STR         255
    bg          F64         0.0
    bg_stdev    F64         0.0
    stamps_num  S32         0
    stamps_mean F32         0.0
    stamps_rms  F32         0.0
    sources     S32         0
    dtime_diff  F32         0.0
    dtime_match F32         0.0
    dtime_phot  F32         0.0
    hostname    STR         64
    good_frac   F32         0.0     # Key
    fault       S16         0       # Key
END
