Index: /branches/eam_branches/ohana.20170822/src/libautocode/Makefile.Targets
===================================================================
--- /branches/eam_branches/ohana.20170822/src/libautocode/Makefile.Targets	(revision 40208)
+++ /branches/eam_branches/ohana.20170822/src/libautocode/Makefile.Targets	(revision 40209)
@@ -14,4 +14,5 @@
 $(ASRC)/average-ps1-v4.$(ARCH).o \
 $(ASRC)/average-ps1-v5.$(ARCH).o \
+$(ASRC)/average-ps1-v6.$(ARCH).o \
 $(ASRC)/average-ps1-v5-ld.$(ARCH).o \
 $(ASRC)/average-ps1-sim.$(ARCH).o \
@@ -29,4 +30,5 @@
 $(ASRC)/secfilt-ps1-v4.$(ARCH).o \
 $(ASRC)/secfilt-ps1-v5.$(ARCH).o \
+$(ASRC)/secfilt-ps1-v6.$(ARCH).o \
 $(ASRC)/secfilt-ps1-v5-ld.$(ARCH).o \
 $(ASRC)/secfilt-ps1-sim.$(ARCH).o \
@@ -44,4 +46,5 @@
 $(ASRC)/measure-ps1-v4.$(ARCH).o \
 $(ASRC)/measure-ps1-v5.$(ARCH).o \
+$(ASRC)/measure-ps1-v6.$(ARCH).o \
 $(ASRC)/measure-ps1-v5-ld.$(ARCH).o \
 $(ASRC)/measure-ps1-sim.$(ARCH).o \
@@ -53,10 +56,13 @@
 $(ASRC)/lensing-ps1-v5-r3.$(ARCH).o \
 $(ASRC)/lensing-ps1-v5-ld.$(ARCH).o \
+$(ASRC)/lensing-ps1-v6.$(ARCH).o \
 $(ASRC)/lensobj.$(ARCH).o \
 $(ASRC)/lensobj-ps1-v5-r0.$(ARCH).o \
 $(ASRC)/lensobj-ps1-v5-r1.$(ARCH).o \
 $(ASRC)/lensobj-ps1-v5-ld.$(ARCH).o \
+$(ASRC)/lensobj-ps1-v6.$(ARCH).o \
 $(ASRC)/starpar.$(ARCH).o \
 $(ASRC)/starpar-ps1-v5.$(ARCH).o \
+$(ASRC)/starpar-ps1-v6.$(ARCH).o \
 $(ASRC)/starpar-ps1-v5-ld.$(ARCH).o \
 $(ASRC)/starpar-ps1-sim.$(ARCH).o \
@@ -65,4 +71,5 @@
 $(ASRC)/galphot-ps1-v5-r1.$(ARCH).o \
 $(ASRC)/galphot-ps1-v5-ld.$(ARCH).o \
+$(ASRC)/galphot-ps1-v6.$(ARCH).o \
 $(ASRC)/missing.$(ARCH).o \
 $(ASRC)/photcode.$(ARCH).o \
@@ -76,4 +83,5 @@
 $(ASRC)/photcode-ps1-v4.$(ARCH).o \
 $(ASRC)/photcode-ps1-v5.$(ARCH).o \
+$(ASRC)/photcode-ps1-v6.$(ARCH).o \
 $(ASRC)/photcode-ps1-v5-ld.$(ARCH).o \
 $(ASRC)/photcode-ps1-ref.$(ARCH).o \
@@ -90,4 +98,5 @@
 $(ASRC)/image-ps1-v4.$(ARCH).o \
 $(ASRC)/image-ps1-v5.$(ARCH).o \
+$(ASRC)/image-ps1-v6.$(ARCH).o \
 $(ASRC)/image-ps1-v5-ld.$(ARCH).o \
 $(ASRC)/image-ps1-sim.$(ARCH).o \
@@ -136,4 +145,5 @@
 $(AINC)/average-ps1-v4.h \
 $(AINC)/average-ps1-v5.h \
+$(AINC)/average-ps1-v6.h \
 $(AINC)/average-ps1-v5-ld.h \
 $(AINC)/average-ps1-sim.h \
@@ -151,4 +161,5 @@
 $(AINC)/secfilt-ps1-v4.h \
 $(AINC)/secfilt-ps1-v5.h \
+$(AINC)/secfilt-ps1-v6.h \
 $(AINC)/secfilt-ps1-v5-ld.h \
 $(AINC)/secfilt-ps1-sim.h \
@@ -166,4 +177,5 @@
 $(AINC)/measure-ps1-v4.h \
 $(AINC)/measure-ps1-v5.h \
+$(AINC)/measure-ps1-v6.h \
 $(AINC)/measure-ps1-v5-ld.h \
 $(AINC)/measure-ps1-sim.h \
@@ -175,10 +187,13 @@
 $(AINC)/lensing-ps1-v5-r3.h \
 $(AINC)/lensing-ps1-v5-ld.h \
+$(AINC)/lensing-ps1-v6.h \
 $(AINC)/lensobj.h \
 $(AINC)/lensobj-ps1-v5-r0.h \
 $(AINC)/lensobj-ps1-v5-r1.h \
 $(AINC)/lensobj-ps1-v5-ld.h \
+$(AINC)/lensobj-ps1-v6.h \
 $(AINC)/starpar.h \
 $(AINC)/starpar-ps1-v5.h \
+$(AINC)/starpar-ps1-v6.h \
 $(AINC)/starpar-ps1-v5-ld.h \
 $(AINC)/starpar-ps1-sim.h \
@@ -187,4 +202,5 @@
 $(AINC)/galphot-ps1-v5-r1.h \
 $(AINC)/galphot-ps1-v5-ld.h \
+$(AINC)/galphot-ps1-v6.h \
 $(AINC)/missing.h \
 $(AINC)/photcode.h \
@@ -198,4 +214,5 @@
 $(AINC)/photcode-ps1-v4.h \
 $(AINC)/photcode-ps1-v5.h \
+$(AINC)/photcode-ps1-v6.h \
 $(AINC)/photcode-ps1-v5-ld.h \
 $(AINC)/photcode-ps1-ref.h \
@@ -212,4 +229,5 @@
 $(AINC)/image-ps1-v4.h \
 $(AINC)/image-ps1-v5.h \
+$(AINC)/image-ps1-v6.h \
 $(AINC)/image-ps1-v5-ld.h \
 $(AINC)/image-ps1-sim.h \
Index: /branches/eam_branches/ohana.20170822/src/libautocode/def/average-ps1-v6.d
===================================================================
--- /branches/eam_branches/ohana.20170822/src/libautocode/def/average-ps1-v6.d	(revision 40209)
+++ /branches/eam_branches/ohana.20170822/src/libautocode/def/average-ps1-v6.d	(revision 40209)
@@ -0,0 +1,92 @@
+STRUCT       Average_PS1_V6
+EXTNAME      DVO_AVERAGE_PS1_V6
+TYPE         BINTABLE
+SIZE         192
+DESCRIPTION  DVO Average Object Table
+
+# elements of data structure / FITS table
+
+FIELD R,              RA,          double,          RA,                	       	  decimal degrees 
+FIELD D,              DEC,         double,          DEC,               	       	  decimal degrees 
+FIELD dR,             RA_ERR,      float,           RA error,                     arcsec
+FIELD dD,             DEC_ERR,     float,           DEC error,                    arcsec
+
+FIELD uR,             U_RA,        float,           RA*cos(D) proper-motion,      arcsec/year
+FIELD uD,             U_DEC,       float,           DEC proper-motion,            arcsec/year
+FIELD duR,            V_RA_ERR,    float,           RA*cos(D) p-m error,          arcsec/year
+FIELD duD,            V_DEC_ERR,   float,           DEC p-m error,                arcsec/year
+FIELD P,              PAR,         float,           parallax,			  arcsec
+FIELD dP,             PAR_ERR,     float,           parallax error,               arcsec
+
+FIELD Rstk,           RA_STK,      double,          RA on stack,      	       	  decimal degrees 
+FIELD Dstk,           DEC_STK,     double,          DEC on stack,      	       	  decimal degrees 
+FIELD dRstk,          RA_STK_ERR,  float,           RA error on stack,            arcsec
+FIELD dDstk,          DEC_STK_ERR, float,           DEC error on stack,           arcsec
+
+FIELD ChiSqAve,       CHISQ_POS,   float,           astrometry analysis chisq
+FIELD ChiSqPM,        CHISQ_PM,    float,           astrometry analysis chisq
+FIELD ChiSqPar,       CHISQ_PLX,   float,           astrometry analysis chisq
+FIELD Tmean,          MEAN_EPOCH,  int,   	    mean epoch (PM,PAR ref),       unix time seconds
+FIELD Trange,         TIME_RANGE,  int,   	    mean epoch (PM,PAR ref),       unix time seconds
+
+FIELD psfQF,          PSF_QF,      float,           psf coverage (bad masks)
+FIELD psfQFperf,      PSF_QF_PERF, float,           psf coverage (all masks)
+
+FIELD stargal,        STARGAL_SEP, float,           star / galaxy separator,       1/100 arcsec
+FIELD Npos,           NUMBER_POS,  unsigned short,  number of detections used for astrometry
+
+# this limits us to a max of 64k measurements per object
+FIELD Nmeasure,       NMEASURE,    unsigned short,  number of psf measurements
+FIELD Nmissing,       NMISSING,    unsigned short,  number of missings
+FIELD Nlensing,       NLENSING,    unsigned short,  number of lensing measurements
+FIELD Nlensobj,       NLENSOBJ,    unsigned short,  number of lensing measurements
+FIELD Ngalphot,       NGALPHOT,    unsigned short,  number of galphot measurements
+
+FIELD measureOffset,  OFF_MEASURE,  int,   	    offset to first psf measurement
+FIELD missingOffset,  OFF_MISSING,  int,   	    offset to first missing obs
+FIELD lensingOffset,  OFF_LENSING,  int,   	    offset to first lensing obs
+FIELD lensobjOffset,  OFF_LENSOBJ,  int,   	    offset to mean lensing data
+FIELD starparOffset,  OFF_STARPAR,  int,   	    offset to stellar parameter data
+FIELD galphotOffset,  OFF_GALPHOT, int,   	    offset to galphot object entry
+
+FIELD refColorBlue,   REF_COLOR_BLUE, float,   	    color of astrometry ref stars
+FIELD refColorRed,    REF_COLOR_RED,  float,   	    color of astrometry ref stars
+
+FIELD tessID,         TESS_ID,       char,	    ID of tessellation for primary skycell
+FIELD skycellID,      SKYCELL_ID,    char,    	    ID of skycell for primary skycell
+FIELD projectionID,   PROJECTION_ID, short,	    ID of projection for primary skycell
+
+FIELD Nstarpar,       NSTARPAR,      short,         number of stellar parameter entries
+FIELD NwarpOK,        NWARP_OK,      short,         total number of warp measurements with psf_qf > 0.0
+
+# 'flags' was called 'code' prior to 2009.02.07
+FIELD flags,          FLAGS,       uint32_t,        average object flags (star; ghost; etc)
+FIELD photFlagsUpper, PHOTFLAGS_U, uint32_t,        upper bit of 2 bit summary of per-measure photflags
+FIELD photFlagsLower, PHOTFLAGS_L, uint32_t,        lower bit of 2 bit summary of per-measure photflags
+
+# objID + catID gives a unique ID for all objects in the database
+FIELD objID,          OBJ_ID,      unsigned int,    unique ID for object in table
+FIELD catID,          CAT_ID,      unsigned int,    unique ID for table in which object was first realized
+FIELD extID,          EXT_ID,      uint64_t,        external ID for object (eg PSPS objID)
+
+# replace extIDgc (unused) with uRgal, uDgal:
+# FIELD extIDgc,      EXT_ID_GC,   uint64_t,        external ID for object in galactic coords
+FIELD uRgal,          U_RA_GAL,    float,           modeled proper motion based on galactic motion
+FIELD uDgal,          U_DEC_GAL,   float,           modeled proper motion based on galactic motion
+
+# 4 double, 2 uint64_t, 17 float, 12 int, 6 short
+# 4*8 + 2*8 + 17*4 + 12*4 + 6*2 = 176
+# for 5G objects, expect 840G
+
+# photflagsUpper & photflagsLower: we have Nmeasures of a given source
+# using psphot. each of these as a photFlag field, with bits
+# describing the detection quality.  photflagsUpper and photFlagsLower
+# represent a 2 bit value (0-3) which defines the frequency of a given
+# bit in the measurements:
+# for a given bit, if that bit is raised for these percentile ranges,
+# the following bits are set:
+# min |  max | L | U
+#  0% |  25% | 0 | 0 
+# 25% |  50% | 1 | 0 
+# 50% |  75% | 0 | 1 
+# 75% | 100% | 1 | 1 
Index: /branches/eam_branches/ohana.20170822/src/libautocode/def/convert.sh
===================================================================
--- /branches/eam_branches/ohana.20170822/src/libautocode/def/convert.sh	(revision 40209)
+++ /branches/eam_branches/ohana.20170822/src/libautocode/def/convert.sh	(revision 40209)
@@ -0,0 +1,7 @@
+#!/bin/csh -f
+
+foreach f ( *-ps1-v5.d )
+  set g = `echo $f | sed s/ps1-v5/ps1-v6/`
+  cat $f | sed s/PS1_V5/PS1_V6/ > $g
+end
+
Index: /branches/eam_branches/ohana.20170822/src/libautocode/def/galphot-ps1-v6.d
===================================================================
--- /branches/eam_branches/ohana.20170822/src/libautocode/def/galphot-ps1-v6.d	(revision 40209)
+++ /branches/eam_branches/ohana.20170822/src/libautocode/def/galphot-ps1-v6.d	(revision 40209)
@@ -0,0 +1,31 @@
+STRUCT       GalPhot_PS1_V6
+EXTNAME      DVO_GALPHOT_PS1_V6
+TYPE         BINTABLE
+SIZE         80
+DESCRIPTION  DVO Galaxy Shape Table 
+
+FIELD Xfit,         XFIT,    	    float,          centroid for fit
+FIELD Yfit,         YFIT,    	    float,          centroid for fit
+FIELD mag,          MAG,    	    float,          galaxy magnitude
+FIELD magErr,       MAG_ERR,	    float,          galaxy magnitude error
+FIELD majorAxis,    MAJOR_AXIS,     float,          major axis size
+FIELD minorAxis,    MINOR_AXIS,     float,          minor axis size
+FIELD majorAxisErr, MAJOR_AXIS_ERR, float,          major axis size error
+FIELD minorAxisErr, MINOR_AXIS_ERR, float,          minor axis size error
+FIELD theta,        THETA,          float,          angle
+FIELD thetaErr,     THETA_ERR,      float,          angle error
+FIELD index,        INDEX,          float,          sersic index (if relevant)
+FIELD chisq,        CHISQ,   	    float,          fit chisq
+		    
+FIELD Npix,         NPIX,           float,          fitted pixels
+
+FIELD objID,        OBJ_ID,         unsigned int,   unique ID for object in table
+FIELD catID,        CAT_ID,         unsigned int,   unique ID for table in which object was first realized
+FIELD detID,        DET_ID,         unsigned int,   detection ID
+FIELD imageID,      IMAGE_ID,       unsigned int,   reference to DVO image ID
+
+FIELD averef,       AVEREF,         unsigned int,   reference to average table
+FIELD flags,        FLAGS,          unsigned int,   info flags
+
+FIELD photcode,     PHOTCODE,       short
+FIELD modelType,    MODEL_TYPE,     short,          mean lensing smear object E2
Index: /branches/eam_branches/ohana.20170822/src/libautocode/def/image-ps1-v6.d
===================================================================
--- /branches/eam_branches/ohana.20170822/src/libautocode/def/image-ps1-v6.d	(revision 40209)
+++ /branches/eam_branches/ohana.20170822/src/libautocode/def/image-ps1-v6.d	(revision 40209)
@@ -0,0 +1,80 @@
+STRUCT       Image_PS1_V6
+EXTNAME      DVO_IMAGE_PS1_V6
+TYPE         BINTABLE
+SIZE         368
+DESCRIPTION  DVO Image Table 
+
+# elements of the image structure
+# careful of 8-byte boundaries
+
+SUBSTRUCT coords,           COORDS,               CoordsDisk,    astrometric data
+SUBFIELD  crval1,           CRVAL1,               double,   	 coordinate at reference pixel
+SUBFIELD  crval2,           CRVAL2,               double,  	 coordinate at reference pixel
+SUBFIELD  crpix1,           CRPIX1,               float,   	 coordinate of reference pixel
+SUBFIELD  crpix2,           CRPIX2,               float,   	 coordinate of reference pixel
+SUBFIELD  cdelt1,           CDELT1,               float,   	 degrees per pixel
+SUBFIELD  cdelt2,           CDELT2,               float,    	 degrees per pixel
+SUBFIELD  pc1_1,            PC1_1,                float,    	 rotation matrix
+SUBFIELD  pc1_2,            PC1_2,                float,    	 rotation matrix
+SUBFIELD  pc2_1,            PC2_1,                float,    	 rotation matrix
+SUBFIELD  pc2_2,            PC2_2,                float,    	 rotation matrix
+SUBFIELD  polyterms,        POLYTERMS,            float[7][2],	 higher order warping terms
+SUBFIELD  ctype,            CTYPE,                char[15],      coordinate type
+SUBFIELD  Npolyterms,       NPOLYTERMS,           char,     	 order of polynomial
+# 120 bytes
+
+# change this to a double mjd?
+FIELD 	  tzero,            TZERO,                e_time,         readout time (row 0)
+FIELD 	  nstar,            NSTAR,                unsigned int,   number of stars on image
+FIELD 	  secz,             SECZ,                 float,      	  airmass,                   mag
+FIELD 	  NX,               NX,                   unsigned short, image width
+FIELD 	  NY,               NY,                   unsigned short, image height
+FIELD 	  apmifit,          APMIFIT,              float,      	  aperture correction,       mag
+FIELD 	  dapmifit,         DAPMIFIT,             float,      	  apmifit error,             mag
+FIELD 	  McalPSF,          MCAL_PSF,             float,      	  calibration mag,           mag
+FIELD 	  McalAPER,         MCAL_APER,            float,      	  calibration mag for Aperture, mag
+FIELD 	  dMcal,            DMCAL,                float,      	  error on Mcal,             mag
+FIELD 	  McalChiSq,        XM,                   float,      	  image chisq
+FIELD 	  padding_1,        PADDING,              short,      	  identifier for CCD,
+FIELD 	  photcode,         PHOTCODE,             short,      	  identifier for CCD,
+FIELD 	  exptime,          EXPTIME,              float,          exposure time,             seconds
+FIELD     sidtime,          ST,			  float,          sidereal time of exposure
+FIELD     latitude,         LAT,		  float,          observatory latitude,      degrees
+# 56 bytes
+
+FIELD     RAo,              RA_CENTER,            float,          image center,              degrees
+FIELD     DECo,             DEC_CENTER,           float,          image center,              degrees
+FIELD     Radius,           RADIUS,               float,          image radius,              degrees
+FIELD     refColorBlue,     REF_COLOR_BLUE,       float,          median astrometry ref color
+FIELD     refColorRed,      REF_COLOR_RED,        float,          median astrometry ref color
+
+# should we define the max length of name as a macro?
+FIELD 	  name,             NAME,                 char[117],      name of original image 
+FIELD 	  detection_limit,  DETECTION_LIMIT,      unsigned char,  detection limit,           10*mag
+FIELD 	  saturation_limit, SATURATION_LIMIT,     unsigned char,  saturation limit,          10*mag
+FIELD 	  cerror,           CERROR,               unsigned char,  astrometric error,         50*arcsec
+FIELD 	  fwhm_x,           FWHM_X,               unsigned char,  PSF x width,               25*arcsec
+FIELD 	  fwhm_y,           FWHM_Y,               unsigned char,  PSF y width,               25*arcsec
+FIELD 	  trate,            TRATE,                unsigned char,  scan rate,                 100 usec/pixel
+FIELD 	  ccdnum,           CCDNUM,               unsigned char,  CCD ID number
+FIELD 	  flags,            FLAGS,                unsigned int,   image quality flags
+FIELD 	  imageID,          IMAGE_ID,             unsigned int,   internal image ID
+FIELD 	  parentID,         PARENT_ID,            unsigned int,   associated ref image
+FIELD 	  externID,         EXTERN_ID,            unsigned int,   external image ID
+FIELD 	  sourceID,         SOURCE_ID,            unsigned short, analysis source ID
+# 48 bytes 
+
+FIELD 	  nLinkAstrom,      NLINK_ASTROM,         short,      	  mean number of matched measurements for astrometry
+FIELD 	  nLinkPhotom,      NLINK_PHOTOM,         short,      	  mean number of matched measurements for astrometry
+FIELD 	  ubercalDist,      UBERCAL_DIST,         short,      	  distance to nearest ubercal image
+
+FIELD 	  dXpixSys,         XPIX_SYS_ERR,         float,      	  systematic astrometry error in X
+FIELD 	  dYpixSys,         YPIX_SYS_ERR,         float,      	  systematic astrometry error in Y
+
+FIELD 	  dMagSys,          MAG_SYS_ERR,          float,      	  systematic photometry error
+FIELD 	  nFitAstrom,       N_FIT_ASTROM,         short,      	  number of stars used for astrometry cal
+FIELD 	  nFitPhotom,       N_FIT_PHOTOM,         short,      	  number of stars used for photometry cal
+
+FIELD 	  photom_map_id,    PHOTOM_MAP_ID,        unsigned int,   reference to 2D zero point map
+FIELD 	  astrom_map_id,    ASTROM_MAP_ID,        unsigned int,   reference to 2D astrometry map
+# nFitPhotom lands on the old location of Mxxxx, which was used to mean nFitPhotom in some cases
Index: /branches/eam_branches/ohana.20170822/src/libautocode/def/image.d
===================================================================
--- /branches/eam_branches/ohana.20170822/src/libautocode/def/image.d	(revision 40208)
+++ /branches/eam_branches/ohana.20170822/src/libautocode/def/image.d	(revision 40209)
@@ -2,6 +2,9 @@
 EXTNAME      DVO_IMAGE
 TYPE         BINTABLE
-SIZE         384
+SIZE         392
 DESCRIPTION  DVO Image Table 
+
+## XXX NOTE: as of 2015.01.11 (r 37807), I had to move this structure from the autocode
+## version to libdvo/include/libdvo_astro.h to support self-references 
 
 # elements of the image structure
@@ -35,12 +38,14 @@
 FIELD 	  apmifit,          APMIFIT,              float,      	  aperture correction,       mag
 FIELD 	  dapmifit,         DAPMIFIT,             float,      	  apmifit error,             mag
-FIELD 	  Mcal,             MCAL,                 float,      	  calibration mag,           mag
+FIELD 	  McalPSF,          MCAL_PSF,             float,      	  calibration mag for PSF, mag
+FIELD 	  McalAPER,         MCAL_APER,            float,      	  calibration mag for Aperture, mag
 FIELD 	  dMcal,            DMCAL,                float,      	  error on Mcal,             mag
-FIELD 	  Xm,               XM,                   short,      	  image chisq,               10*log(value)
+FIELD 	  McalChiSq,        XM,                   float,      	  image chisq
+FIELD 	  padding_1,        PADDING,              short,      	  identifier for CCD,
 FIELD 	  photcode,         PHOTCODE,             short,      	  identifier for CCD,
 FIELD 	  exptime,          EXPTIME,              float,          exposure time,             seconds
 FIELD     sidtime,          ST,			  float,          sidereal time of exposure
 FIELD     latitude,         LAT,		  float,          observatory latitude,      degrees
-# 40 bytes
+# 56 bytes
 
 FIELD     RAo,              RA_CENTER,            float,          image center,              degrees
Index: /branches/eam_branches/ohana.20170822/src/libautocode/def/lensing-ps1-v6.d
===================================================================
--- /branches/eam_branches/ohana.20170822/src/libautocode/def/lensing-ps1-v6.d	(revision 40209)
+++ /branches/eam_branches/ohana.20170822/src/libautocode/def/lensing-ps1-v6.d	(revision 40209)
@@ -0,0 +1,60 @@
+STRUCT       Lensing_PS1_V6
+EXTNAME      DVO_LENSING_PS1_V6
+TYPE         BINTABLE
+SIZE         160
+DESCRIPTION  DVO Lensing Table 
+
+FIELD X11_sm_obj,     X11_SM_OBJ,    float,          lensing smear object X11
+FIELD X12_sm_obj,     X12_SM_OBJ,    float,          lensing smear object X12
+FIELD X22_sm_obj,     X22_SM_OBJ,    float,          lensing smear object X22
+FIELD  E1_sm_obj,      E1_SM_OBJ,    float,          lensing smear object E1
+FIELD  E2_sm_obj,      E2_SM_OBJ,    float,          lensing smear object E2
+
+FIELD X11_sh_obj,     X11_SH_OBJ,    float,          lensing shear object X11
+FIELD X12_sh_obj,     X12_SH_OBJ,    float,          lensing shear object X12
+FIELD X22_sh_obj,     X22_SH_OBJ,    float,          lensing shear object X22
+FIELD  E1_sh_obj,      E1_SH_OBJ,    float,          lensing shear object E1
+FIELD  E2_sh_obj,      E2_SH_OBJ,    float,          lensing shear object E2
+
+FIELD X11_sm_psf,     X11_SM_PSF,    float,          lensing smear psf stars X11
+FIELD X12_sm_psf,     X12_SM_PSF,    float,          lensing smear psf stars X12
+FIELD X22_sm_psf,     X22_SM_PSF,    float,          lensing smear psf stars X22
+FIELD  E1_sm_psf,      E1_SM_PSF,    float,          lensing smear psf stars E1
+FIELD  E2_sm_psf,      E2_SM_PSF,    float,          lensing smear psf stars E2
+
+FIELD X11_sh_psf,     X11_SH_PSF,    float,          lensing shear psf stars X11
+FIELD X12_sh_psf,     X12_SH_PSF,    float,          lensing shear psf stars X12
+FIELD X22_sh_psf,     X22_SH_PSF,    float,          lensing shear psf stars X22
+FIELD  E1_sh_psf,      E1_SH_PSF,    float,          lensing shear psf stars E1
+FIELD  E2_sh_psf,      E2_SH_PSF,    float,          lensing shear psf stars E2
+
+FIELD  E1_psf,         E1_PSF,       float,          polarization psf stars E1
+FIELD  E2_psf,         E2_PSF,       float,          polarization psf stars E2
+
+FIELD  F_ApR5,           FLUX_AP_R5, float,          Flux inside r = 5
+FIELD dF_ApR5,       FLUX_ERR_AP_R5, float,          error on Flux inside r = 5
+FIELD sF_ApR5,       FLUX_STD_AP_R5, float,          stdev of Flux inside r = 5
+FIELD fF_ApR5,       FLUX_FIL_AP_R5, float,          fill factor for Flux inside r = 5
+
+FIELD  F_ApR6,           FLUX_AP_R6, float,          Flux inside r = 6
+FIELD dF_ApR6,       FLUX_ERR_AP_R6, float,          error on Flux inside r = 6
+FIELD sF_ApR6,       FLUX_STD_AP_R6, float,          stdev of Flux inside r = 6
+FIELD fF_ApR6,       FLUX_FIL_AP_R6, float,          fill factor for Flux inside r = 6
+
+FIELD  F_ApR7,           FLUX_AP_R7, float,          Flux inside r = 7
+FIELD dF_ApR7,       FLUX_ERR_AP_R7, float,          error on Flux inside r = 7
+FIELD sF_ApR7,       FLUX_STD_AP_R7, float,          stdev of Flux inside r = 7
+FIELD fF_ApR7,       FLUX_FIL_AP_R7, float,          fill factor for Flux inside r = 7
+
+FIELD  detID,          DET_ID,       unsigned int,   detection ID
+FIELD  objID,          OBJ_ID,       unsigned int,   unique ID for object in table
+FIELD  catID,          CAT_ID,       unsigned int,   unique ID for table in which object was first realized
+FIELD  averef,         AVE_REF,      unsigned int,   reference to average entry      
+
+FIELD imageID,	       IMAGE_ID,     unsigned int,   reference to DVO image ID
+FIELD oldImID,	       OLD_IM_ID,    int,   	     saved reference to (wrong) DVO image ID
+
+# 28 x float
+# 4 x int
+# = 128 bytes / detection
+# for 2.5G objects + 60 overlaps, expect 15TB for forced warp
Index: /branches/eam_branches/ohana.20170822/src/libautocode/def/lensobj-ps1-v6.d
===================================================================
--- /branches/eam_branches/ohana.20170822/src/libautocode/def/lensobj-ps1-v6.d	(revision 40209)
+++ /branches/eam_branches/ohana.20170822/src/libautocode/def/lensobj-ps1-v6.d	(revision 40209)
@@ -0,0 +1,58 @@
+STRUCT       Lensobj_PS1_V6
+EXTNAME      DVO_LENSOBJ_PS1_V6
+TYPE         BINTABLE
+SIZE         152
+DESCRIPTION  DVO Lensobj Table 
+
+FIELD X11_sm_obj,     X11_SM_OBJ,    float,          mean lensing smear object X11
+FIELD X12_sm_obj,     X12_SM_OBJ,    float,          mean lensing smear object X12
+FIELD X22_sm_obj,     X22_SM_OBJ,    float,          mean lensing smear object X22
+FIELD  E1_sm_obj,      E1_SM_OBJ,    float,          mean lensing smear object E1
+FIELD  E2_sm_obj,      E2_SM_OBJ,    float,          mean lensing smear object E2
+
+FIELD X11_sh_obj,     X11_SH_OBJ,    float,          mean lensing shear object X11
+FIELD X12_sh_obj,     X12_SH_OBJ,    float,          mean lensing shear object X12
+FIELD X22_sh_obj,     X22_SH_OBJ,    float,          mean lensing shear object X22
+FIELD  E1_sh_obj,      E1_SH_OBJ,    float,          mean lensing shear object E1
+FIELD  E2_sh_obj,      E2_SH_OBJ,    float,          mean lensing shear object E2
+
+FIELD X11_sm_psf,     X11_SM_PSF,    float,          mean lensing smear psf stars X11
+FIELD X12_sm_psf,     X12_SM_PSF,    float,          mean lensing smear psf stars X12
+FIELD X22_sm_psf,     X22_SM_PSF,    float,          mean lensing smear psf stars X22
+FIELD  E1_sm_psf,      E1_SM_PSF,    float,          mean lensing smear psf stars E1
+FIELD  E2_sm_psf,      E2_SM_PSF,    float,          mean lensing smear psf stars E2
+
+FIELD X11_sh_psf,     X11_SH_PSF,    float,          mean lensing shear psf stars X11
+FIELD X12_sh_psf,     X12_SH_PSF,    float,          mean lensing shear psf stars X12
+FIELD X22_sh_psf,     X22_SH_PSF,    float,          mean lensing shear psf stars X22
+FIELD  E1_sh_psf,      E1_SH_PSF,    float,          mean lensing shear psf stars E1
+FIELD  E2_sh_psf,      E2_SH_PSF,    float,          mean lensing shear psf stars E2
+
+FIELD  F_ApR5,           FLUX_AP_R5, float,          Flux inside r = 5
+FIELD dF_ApR5,       FLUX_ERR_AP_R5, float,          error on Flux inside r = 5
+FIELD sF_ApR5,       FLUX_STD_AP_R5, float,          stdev of Flux inside r = 5
+FIELD fF_ApR5,       FLUX_FIL_AP_R5, float,          fill factor for Flux inside r = 5
+
+FIELD  F_ApR6,           FLUX_AP_R6, float,          Flux inside r = 6
+FIELD dF_ApR6,       FLUX_ERR_AP_R6, float,          error on Flux inside r = 6
+FIELD sF_ApR6,       FLUX_STD_AP_R6, float,          stdev of Flux inside r = 6
+FIELD fF_ApR6,       FLUX_FIL_AP_R6, float,          fill factor for Flux inside r = 6
+
+FIELD  F_ApR7,           FLUX_AP_R7, float,          Flux inside r = 7
+FIELD dF_ApR7,       FLUX_ERR_AP_R7, float,          error on Flux inside r = 7
+FIELD sF_ApR7,       FLUX_STD_AP_R7, float,          stdev of Flux inside r = 7
+FIELD fF_ApR7,       FLUX_FIL_AP_R7, float,          fill factor for Flux inside r = 7
+
+FIELD  gamma,            GAMMA,      float
+FIELD     E1,               E1,      float
+FIELD     E2,               E2,      float
+
+FIELD    objID,          OBJ_ID,       unsigned int,   unique ID for object in table
+FIELD    catID,          CAT_ID,       unsigned int,   unique ID for table in which object was first realized
+FIELD photcode,         PHOTCODE,    short
+FIELD    Nmeas,            NMEAS,    short
+
+# 31 x float
+#  3 x int
+# = 136 bytes / detection
+# for 2.5G objects + 60 overlaps, expect 15TB for forced warp
Index: /branches/eam_branches/ohana.20170822/src/libautocode/def/measure-ps1-v6.d
===================================================================
--- /branches/eam_branches/ohana.20170822/src/libautocode/def/measure-ps1-v6.d	(revision 40209)
+++ /branches/eam_branches/ohana.20170822/src/libautocode/def/measure-ps1-v6.d	(revision 40209)
@@ -0,0 +1,111 @@
+STRUCT       Measure_PS1_V6
+EXTNAME      DVO_MEASURE_PS1_V6
+TYPE         BINTABLE
+SIZE         240
+DESCRIPTION  DVO Detection Measurement Table 
+
+FIELD R,              RA,            double,         RA at epoch,                  degrees
+FIELD D,              DEC,           double,         DEC at epoch,                 degrees
+FIELD M,              MAG,           float,          catalog mag,                  mag
+FIELD dM,             MAG_ERR,       float,          mag error,                    mag
+FIELD Map,            M_APER,        float,          aperture mag,                 mag
+FIELD dMap,           M_APER_ERR,    float,          aperture mag,                 mag
+FIELD Mkron,          M_KRON,        float,          kron magnitude,               mag
+FIELD dMkron,         M_KRON_ERR,    float,          kron magnitude error,         mag
+FIELD Mcal,           M_CAL,         float,          image cal mag,                mag
+FIELD dMcal,          MAG_CAL_ERR,   float,          systematic calibration error, mag
+FIELD dt,             M_TIME,        float,          exposure time,                2.5*log(exptime)
+
+# needed for stacks, forced warp, and diff
+FIELD FluxPSF,        FLUX_PSF,      float,          flux from psf fit,            counts/sec
+FIELD dFluxPSF,       FLUX_PSF_ERR,  float,          error on psf flux,            counts/sec
+FIELD FluxKron,       FLUX_KRON,     float,          flux from kron ap,            counts/sec
+FIELD dFluxKron,      FLUX_KRON_ERR, float,          error on kron flux,           counts/sec
+FIELD FluxAp,         FLUX_AP,       float,          flux from ap ap,              counts/sec
+FIELD dFluxAp,        FLUX_AP_ERR,   float,          error on ap flux,             counts/sec
+
+# note that with airmass = 1.0 / cos(90 - alt), we have full alt/az representation
+FIELD airmass,        AIRMASS,       float,          (airmass - 1),                airmass
+FIELD az,             AZ,            float,          telescope azimuth
+
+# new field elements needed for Pan-STARRS:
+FIELD Xccd,           X_CCD,         float,          X coord on chip (raw value),  pixels
+FIELD Yccd,           Y_CCD,         float,          Y coord on chip (raw value),  pixels
+                                     
+FIELD Xfix,           X_FIX,         float,          X coord after correction,     pixels
+FIELD Yfix,           Y_FIX,         float,          Y coord after correction,     pixels
+                                     
+FIELD XoffKH,         X_OFF_KH,      float,          X offset from correction,     pixels
+FIELD YoffKH,         Y_OFF_KH,      float,          Y offset from correction,     pixels
+FIELD XoffDCR,        X_OFF_DCR,     float,          X offset from correction,     pixels
+FIELD YoffDCR,        Y_OFF_DCR,     float,          Y offset from correction,     pixels
+FIELD XoffCAM,        X_OFF_CAM,     float,          X offset from correction,     pixels
+FIELD YoffCAM,        Y_OFF_CAM,     float,          Y offset from correction,     pixels
+
+FIELD Mflat,          M_FLAT,        float,          Static Flat-field offset,     mag
+FIELD dummy2,         PADDING,       int,            unused 4 bytes
+
+# could these be packed into fewer bits?
+FIELD Sky,            SKY_FLUX,      float,          local estimate of sky flux,   counts/sec
+FIELD dSky,           SKY_FLUX_ERR,  float,          local estimate of sky flux,   counts/sec
+
+FIELD t,              TIME,          int,            time in seconds (UNIX)
+FIELD averef,         AVE_REF,       unsigned int,   reference to average entry      
+
+# internally, this is an unsigned int; however, we do NOT convert with TZERO/TSCAL on output
+FIELD detID,          DET_ID,        unsigned int,   detection ID
+FIELD objID,          OBJ_ID,        unsigned int,   unique ID for object in table
+FIELD catID,          CAT_ID,        unsigned int,   unique ID for table in which object was first realized
+
+# extID needs to be on an 8-byte boundary
+# PSPS uses a 64-bit detection ID
+FIELD extID,          EXT_ID,        uint64_t,       external ID (eg PSPS detID)
+
+FIELD imageID,        IMAGE_ID,      unsigned int,   reference to DVO image ID
+
+# do we need more resolution than a short? should this be a log?
+FIELD psfQF,          PSF_QF,        float,          psf coverage/quality factor
+FIELD psfQFperf,      PSF_QF_PEFECT, float,          psf coverage / quality factor (all mask bits)
+FIELD psfChisq,       PSF_CHISQ,     float,          psf fit chisq
+
+FIELD psfNdof,        PSF_NDOF,      int,            psf degrees of freedom
+FIELD psfNpix,        PSF_NPIX,      int,            psf number of pixels
+FIELD photFlags2,     PHOT_FLAGS2,   int,            flags supplied by photometry program
+FIELD extNsigma,      EXT_NSIGMA,    float,          Nsigma deviation towards EXT
+
+# model shape parameters
+FIELD FWx,            FWHM_MAJOR,   short,          object fwhm major axis,         1/100 of pixels
+FIELD FWy,            FWHM_MINOR,   short,          object fwhm minor axis,         1/100 of pixels 
+FIELD theta,          PSF_THETA,    short,          angle wrt ccd X dir,            (0xffff/360) deg
+
+# moments
+FIELD Mxx,            MXX,          short,          second moments in pixel coords, 1/100 of pixels
+FIELD Mxy,            MXY,          short,          second moments in pixel coords, 1/100 of pixels
+FIELD Myy,            MYY,          short,          second moments in pixel coords, 1/100 of pixels
+
+# fractional exposure time
+FIELD t_msec,         TIME_MSEC,    unsigned short, time fraction of second,        milliseconds
+FIELD photcode,       PHOTCODE,     unsigned short, photcode
+
+# position errors
+FIELD dXccd,          X_CCD_ERR,    short,          X coord error on chip,          1/100 of pixels
+FIELD dYccd,          Y_CCD_ERR,    short,          Y coord error on chip,          1/100 of pixels
+FIELD dRsys,          POS_SYS_ERR,  short,          systematic error from astrom,   1/100 of pixels
+
+# local astrometry scales
+FIELD posangle,       POSANGLE,     short,          position angle sky to chip,     (0xffff/360) deg
+FIELD pltscale,       PLTSCALE,     float,          plate scale,                    arcsec/pixel
+
+FIELD dbFlags,        DB_FLAGS,     unsigned int,   flags supplied by analysis in database
+FIELD photFlags,      PHOT_FLAGS,   unsigned int,   flags supplied by photometry program
+
+FIELD padding,        PADDING,       int,            padding to ensure 8byte blocks
+
+# 2 x double
+# 35 x float
+# 11 x int or unsigned int
+# 12 x short or unsigned short
+# 1 x uint64_t
+# = 232 bytes / detection
+# for 2.5G objects * 60 overlaps, expect 35TB for forced warp
+# for 120G detections, expect 28TB
Index: /branches/eam_branches/ohana.20170822/src/libautocode/def/photcode-ps1-v6.d
===================================================================
--- /branches/eam_branches/ohana.20170822/src/libautocode/def/photcode-ps1-v6.d	(revision 40209)
+++ /branches/eam_branches/ohana.20170822/src/libautocode/def/photcode-ps1-v6.d	(revision 40209)
@@ -0,0 +1,33 @@
+STRUCT       PhotCode_PS1_V6
+EXTNAME      DVO_PHOTCODE_PS1_V6
+TYPE         BINTABLE
+SIZE         112
+DESCRIPTION  DVO Photcode Description Table 
+
+# elements of data structure / FITS table
+FIELD  code,         	  CODE,          	 unsigned short, code number (stored in Measure.source) 
+FIELD  name,         	  NAME,          	 char[32],       name for filter combination 
+FIELD  type,         	  TYPE,          	 char,           PRI/SEC/DEP/REF 
+FIELD  dummy,        	  DUMMY,         	 char[3],        padding
+FIELD  C,            	  C_LAM,         	 short,          primary phot calibration terms (millimags) 
+FIELD  dC,           	  C_LAM_ERR,     	 short,          primary phot calibration terms (millimags) 
+FIELD  dX,           	  X_ERR,         	 short,          primary phot calibration terms (millimags) 
+FIELD  K,            	  K,             	 float,          secondary phot calibration terms (millimags) 
+FIELD  c1,           	  C1,            	 int,            color is average.M[c1] - average.M[c2] 
+FIELD  c2,           	  C2,            	 int,            color is average.M[c1] - average.M[c2] 
+FIELD  equiv,        	  EQUIV,         	 int,            this dependent filter is equivalent to equiv PRI/SEC
+FIELD  Nc,           	  NC,            	 int,            number of color terms 
+FIELD  X,            	  X,             	 float[4],       color terms $X[0]*mc + X[1]*mc^2 + X[2]*mc^3$, etc 
+FIELD  astromErrSys,      ASTROM_ERR_SYS,  	 float,          systematic astrometry error (arcsec)
+FIELD  astromErrScale,    ASTROM_ERR_SCALE,  	 float,          astrometric error scale
+FIELD  astromErrMagScale, ASTROM_ERR_MAG_SCALE,  float,          astrometric error / mag error scale
+FIELD  astromPoorMask,    ASTROM_POOR_MASK,      unsigned int,   detections matching this mask should only be used in emergencies
+FIELD  astromBadMask,     ASTROM_BAD_MASK,       unsigned int,   detections matching this mask should not be used
+FIELD  photomErrSys,   	  PHOTOM_ERR_SYS,  	 float,          systematic photometric error
+FIELD  photomPoorMask, 	  PHOTOM_POOR_MASK,  	 unsigned int,   detections matching this mask should only be used in emergencies
+FIELD  photomBadMask,  	  PHOTOM_BAD_MASK,  	 unsigned int,   detections matching this mask should not be used
+
+#   dR_total^2 =  dR_sys^2 + AS * dR_obs^2 + MS * dM_obs^2
+#   dR_sys : systematicAstrometryError
+#   AS     : astrometryErrorScale
+#   MS     : astrometryErrorMagScale
Index: /branches/eam_branches/ohana.20170822/src/libautocode/def/secfilt-ps1-v6.d
===================================================================
--- /branches/eam_branches/ohana.20170822/src/libautocode/def/secfilt-ps1-v6.d	(revision 40209)
+++ /branches/eam_branches/ohana.20170822/src/libautocode/def/secfilt-ps1-v6.d	(revision 40209)
@@ -0,0 +1,81 @@
+STRUCT       SecFilt_PS1_V6
+EXTNAME      DVO_SECFILT_PS1_V6
+TYPE         BINTABLE
+SIZE         176
+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,    ave aperture mag in this band,         mags
+FIELD  dMap,          MAG_AP_ERR,        float,    ave aperture mag in this band,         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
+				         
+# XXX I could add these fields to secfilt or calculate in dvopsps?
+FIELD  psfQfMax,      PSF_QF_MAX,      float,      best psfQf for this filter
+FIELD  psfQfPerfMax,  PSF_QF_PERF_MAX, float,      best psfQfPerfect for this filter
+
+# these statistics are PSF-specific      
+FIELD  Mstdev,        MAG_STDEV,         float,    standard deviation of measurements,    mags
+FIELD  Mmin,          MAG_MIN,           float,    min accepted mag,                      mags
+FIELD  Mmax,          MAG_MAX,           float,    max 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
+
+FIELD  Nstack,        NSTACK,            short,    number of measurements in band (gpc1 stack only)
+FIELD  NstackDet,     NSTACK_DET,        short,    number of stack detections in band (gpc1 stack only)
+
+FIELD  stackPrmryOff, STACK_PRIMARY_OFF,  int,     measure entry which is primary stack detection
+FIELD  stackBestOff,  STACK_BEST_OFF,     int,     measure entry which is best stack detection
+
+## *** 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  Nwarp,         NWARP,             short,    number of measurements in band (gpc1 warp only)
+FIELD  NwarpGood,     NWARP_GOOD,        short,    number of meas with psf_qf > 0.85 in band (gpc1 warp only)
+
+FIELD  ubercalDist,   UBERCAL_DIST,      short,    number of images from an ubercal-image
+
+# 31*float + uint32_t + uint64_t + 8*short = 152 bytes / object / photcode
+# for 5G objects, expect ~6TB total (over 60 machines, this is 100G)
Index: /branches/eam_branches/ohana.20170822/src/libautocode/def/starpar-ps1-v6.d
===================================================================
--- /branches/eam_branches/ohana.20170822/src/libautocode/def/starpar-ps1-v6.d	(revision 40209)
+++ /branches/eam_branches/ohana.20170822/src/libautocode/def/starpar-ps1-v6.d	(revision 40209)
@@ -0,0 +1,24 @@
+STRUCT       StarPar_PS1_V6
+EXTNAME      DVO_STARPAR_PS1_V6
+TYPE         BINTABLE
+SIZE         80
+DESCRIPTION  DVO Table of Stellar Properties
+
+FIELD R,              RA,            double,         ra
+FIELD D,              DEC,           double,         dec
+FIELD galLat,         GAL_LAT,       float,          galactic latitude
+FIELD galLon,         GAL_LON,       float,          galactic longitude
+FIELD Ebv,            E_BV,          float,          extinction
+FIELD dEbv,           E_BV_ERR,      float,          extinction error
+FIELD DistMag,        DISTANCE_MOD,     float,       mag
+FIELD dDistMag,       DISTANCE_MOD_ERR, float,       mag
+FIELD M_r,            M_R_ABS,       float,          r-band abs magnitude
+FIELD dM_r,           M_R_ABS_ERR,   float,          r-band abs magnitude error
+FIELD FeH,            F_E_H,         float,          metallicity
+FIELD dFeH,           F_E_H_ERR,     float,          metallicity error
+FIELD uRA,            U_RA,          float,          model guess for proper motion
+FIELD uDEC,           U_DEC,         float,          model guess for proper motion
+FIELD averef,         AVE_REF,       unsigned int,   reference to average entry      
+FIELD objID,          OBJ_ID,        unsigned int,   unique ID for object in table
+FIELD catID,          CAT_ID,        unsigned int,   unique ID for table in which object was first realized
+FIELD dummy,          DUMMY,         unsigned int,   dummy
