STRUCT       SecFilt
EXTNAME      DVO_SECFILT
TYPE         BINTABLE
SIZE         160
DESCRIPTION  DVO SecFilt : Secondary Filter Data 

## *** this section is for per-exposure mean values *** (unlabled values are implicitly PSF values)
FIELD  M,             MAG,             float,      average mag in this band,              mags
FIELD  dM,            MAG_ERR,         float,      formal error on average mag,           mags
FIELD  Map,           MAG_AP,          float,      average mag in this band,              mags
FIELD  dMap,          MAG_AP_ERR,      float,      formal error on average mag,           mags
FIELD  sMap,          MAG_AP_STDEV,    float,      standard deviation of ap mags,         mags
FIELD  Mkron,         MAG_KRON,        float,      ave kron mag in this band,             mags
FIELD  dMkron,        MAG_KRON_ERR,    float,      formal error on average kron mag,      mags
FIELD  sMkron,        MAG_KRON_STDEV,  float,      standard deviation of kron mags,       mags

# these statistics are PSF-specific      
FIELD  Mstdev,        MAG_STDEV,       float,      standard deviation of measurements,    mags
FIELD  Mmin,          MAG_MIN,         float,      minimum accepted mag,                  mags
FIELD  Mmax,          MAG_MAX,         float,      maximum accepted mag,                  mags
FIELD  Mchisq,        MAG_CHI,         float,      chisq on average mag,                  value

FIELD  Ncode,         NCODE,           short,      number of detections in band
FIELD  Nused,         NUSED,           short,      number of detections used in average
FIELD  NusedKron,     NUSED_KRON,      short,      number of detections used in average
FIELD  NusedAp,       NUSED_AP,        short,      number of detections used in average

FIELD  flags,         FLAGS,           uint32_t,   photometry flags

## *** this section is for stack values ***

FIELD  MpsfStk,       MAG_PSF_STK,       float,    magnitude from stack (primary if available)
FIELD  FpsfStk,       FLUX_PSF_STK,      float,    flux from stack (primary if available)
FIELD  dFpsfStk,      FLUX_PSF_STK_ERR,  float,    mean flux psf error

FIELD  MkronStk,      MAG_KRON_STK,      float,    magnitude from stack (primary if available)
FIELD  FkronStk,      FLUX_KRON_STK,     float,    flux from stack (primary if available)
FIELD  dFkronStk,     FLUX_KRON_STK_ERR, float,    mean flux kron error

FIELD  MapStk,        MAG_AP_STK,        float,    magnitude from stack (primary if available)
FIELD  FapStk,        FLUX_AP_STK,       float,    flux from stack (primary if available)
FIELD  dFapStk,       FLUX_AP_STK_ERR,   float,    mean flux ap error

## need an 8-byte boundary here ##
FIELD  stackDetectID, STACK_DETECT_ID, uint64_t,   detection ID on stack used for fluxes (if any)

## *** this section is for forced-warp mean values ***

FIELD  MpsfWrp,       MAG_PSF_WRP,       float,    psf magnitude from stack (primary if available)
FIELD  FpsfWrp,       FLUX_PSF_WRP,      float,    psf flux from stack (primary if available)
FIELD  dFpsfWrp,      FLUX_PSF_WRP_ERR,  float,    mean flux psf error
FIELD  sFpsfWrp,      FLUX_PSF_WRP_STD,  float,    mean flux psf stdev

FIELD  MkronWrp,      MAG_KRON_WRP,      float,    kron magnitude from stack (primary if available)
FIELD  FkronWrp,      FLUX_KRON_WRP,     float,    kron flux from stack (primary if available)
FIELD  dFkronWrp,     FLUX_KRON_WRP_ERR, float,    mean flux kron error
FIELD  sFkronWrp,     FLUX_KRON_WRP_STD, float,    mean flux kron stdev

FIELD  MapWrp,        MAG_AP_WRP,        float,    aper magnitude from stack (primary if available)
FIELD  FapWrp,        FLUX_AP_WRP,       float,    aper flux from stack (primary if available)
FIELD  dFapWrp,       FLUX_AP_WRP_ERR,   float,    mean flux ap error
FIELD  sFapWrp,       FLUX_AP_WRP_STD,   float,    mean flux ap stdev

FIELD  NusedWrp,      NUSED_WRP,         short,    number of detections used in average
FIELD  NusedKronWrp,  NUSED_KRON_WRP,    short,    number of detections used in average
FIELD  NusedApWrp,    NUSED_AP_WRP,      short,    number of detections used in average

FIELD  ubercalDist,   UBERCAL_DIST,    short,      number of images from an ubercal-image

# *** 20090206 : new fields : M_20, M_80; dropped dummy
# *** 20120302 : new fields : ubercalDist, Map, Mstdev
# *** 20120710 : new fields : Mkron, dMkron, FluxPSF, dFluxPSF, FluxKron, dFluxKron, stackID

# *** 20140617 : added   : dMap, NusedKron, NusedAp, MpsfStk, MkronStk, MapStk, *Wrp
      	       : changed : Mstdev, M_20 (to Mmin,short:float),M_80 (to Mmax,short:float),
	       : rename : FpsfStk, dFpsfStk, FkronStk, dFronStk (were FluxPSF, dFluxPSF, FluxKron, dFluxKron)
