Index: trunk/Ohana/src/libautocode/Makefile.Targets
===================================================================
--- trunk/Ohana/src/libautocode/Makefile.Targets	(revision 11880)
+++ trunk/Ohana/src/libautocode/Makefile.Targets	(revision 12332)
@@ -5,4 +5,5 @@
 $(ASRC)/average-loneos.$(ARCH).o \
 $(ASRC)/average-elixir.$(ARCH).o \
+$(ASRC)/average-panstarrs-dev-0.$(ARCH).o \
 $(ASRC)/average-panstarrs.$(ARCH).o \
 $(ASRC)/average-pmtest.$(ARCH).o \
@@ -10,8 +11,10 @@
 $(ASRC)/secfilt-loneos.$(ARCH).o \
 $(ASRC)/secfilt-elixir.$(ARCH).o \
+$(ASRC)/secfilt-panstarrs-dev-0.$(ARCH).o \
 $(ASRC)/secfilt-panstarrs.$(ARCH).o \
 $(ASRC)/measure.$(ARCH).o \
 $(ASRC)/measure-loneos.$(ARCH).o \
 $(ASRC)/measure-elixir.$(ARCH).o \
+$(ASRC)/measure-panstarrs-dev-0.$(ARCH).o \
 $(ASRC)/measure-panstarrs.$(ARCH).o \
 $(ASRC)/missing.$(ARCH).o \
@@ -20,4 +23,5 @@
 $(ASRC)/image-loneos.$(ARCH).o \
 $(ASRC)/image-elixir.$(ARCH).o \
+$(ASRC)/image-panstarrs-dev-0.$(ARCH).o \
 $(ASRC)/image-panstarrs.$(ARCH).o \
 $(ASRC)/regimage.$(ARCH).o \
@@ -38,4 +42,5 @@
 $(AINC)/average-loneos.h \
 $(AINC)/average-elixir.h \
+$(AINC)/average-panstarrs-dev-0.h \
 $(AINC)/average-panstarrs.h \
 $(AINC)/average-pmtest.h \
@@ -43,8 +48,10 @@
 $(AINC)/secfilt-loneos.h \
 $(AINC)/secfilt-elixir.h \
+$(AINC)/secfilt-panstarrs-dev-0.h \
 $(AINC)/secfilt-panstarrs.h \
 $(AINC)/measure.h \
 $(AINC)/measure-loneos.h \
 $(AINC)/measure-elixir.h \
+$(AINC)/measure-panstarrs-dev-0.h \
 $(AINC)/measure-panstarrs.h \
 $(AINC)/missing.h \
@@ -53,4 +60,5 @@
 $(AINC)/image-loneos.h \
 $(AINC)/image-elixir.h \
+$(AINC)/image-panstarrs-dev-0.h \
 $(AINC)/image-panstarrs.h \
 $(AINC)/regimage.h \
Index: trunk/Ohana/src/libautocode/def/average-panstarrs-dev-0.d
===================================================================
--- trunk/Ohana/src/libautocode/def/average-panstarrs-dev-0.d	(revision 12332)
+++ trunk/Ohana/src/libautocode/def/average-panstarrs-dev-0.d	(revision 12332)
@@ -0,0 +1,49 @@
+STRUCT       AveragePanstarrs_DEV_0
+EXTNAME      DVO_AVERAGE_PANSTARRS_DEV_0
+TYPE         BINTABLE
+SIZE         72
+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
+
+# XXX drop the old primary magnitude concept
+# FIELD M,            MAG,        float,            primary mag,       	       	  mag
+# FIELD dM,           MAG_ERR,    float,            error on primary mag,         mag
+# FIELD Xm,           CHISQ_MAG,  short, 	    chisq for primary mag,        [100*log(value)]
+# FIELD Xg,           CHISQ_GAL,  short,            chisq for galaxy mags,        [100*log(value)]
+
+FIELD Xp,             SIGMA_POS,  short, 	    position scatter,   	  1/100 arcsec
+FIELD Nm,             NMEAS,      unsigned short,   number of measures
+FIELD Nn,             NMISS,      unsigned short,   number of missings
+FIELD code,           code,       unsigned short,   ID code (star; ghost; etc)
+FIELD offset,         offset,     int,     	    offset to first measurement
+FIELD missing,        missing,    int,     	    offset to first missing obs
+
+# Pan-STARRS uses a 64-bit detection ID.  keep this in two 32 bit ints for backwards compatibility?
+FIELD objID_hi,       OBJ_ID_HI,    unsigned int,   ID upper bytes
+FIELD objID_lo,       OBJ_ID_LO,    unsigned int,   ID lower bytes
+
+# this structure should only be used for internal representations
+# the average-FORMAT structures should be used for external representations
+# note that the average magnitudes are stored in the 'secfilt' table (change this name??)
+# the index for the secfilt table is just Nsecfilt times the index for the average table.
+
+# XXX after the rest of the DVO re-org work, remove the magnitude based values from this table
+# and move them to the secfilt table.
+
+# the DVO object IDs are generated internally and are not equivalent to the PSPS object IDs
+# probably need to add position chisq
+
+# XXX include the number of measurements used to determine the positional information?
Index: trunk/Ohana/src/libautocode/def/average.d
===================================================================
--- trunk/Ohana/src/libautocode/def/average.d	(revision 11880)
+++ trunk/Ohana/src/libautocode/def/average.d	(revision 12332)
@@ -2,5 +2,5 @@
 EXTNAME      DVO_AVERAGE
 TYPE         BINTABLE
-SIZE         76
+SIZE         72
 DESCRIPTION  DVO Average Object Table
 
@@ -19,9 +19,11 @@
 FIELD dP,             PAR_ERR,    float,            parallax error,               arcsec
 
-FIELD M,              MAG,        float,            primary mag,       	       	  mag
-FIELD dM,             MAG_ERR,    float,            error on primary mag,         mag
+# XXX drop the old primary magnitude concept
+# FIELD M,            MAG,        float,            primary mag,       	       	  mag
+# FIELD dM,           MAG_ERR,    float,            error on primary mag,         mag
+# FIELD Xm,           CHISQ_MAG,  short, 	    chisq for primary mag,        [100*log(value)]
+# FIELD Xg,           CHISQ_GAL,  short,            chisq for galaxy mags,        [100*log(value)]
+
 FIELD Xp,             SIGMA_POS,  short, 	    position scatter,   	  1/100 arcsec
-FIELD Xm,             CHISQ_MAG,  short, 	    chisq for primary mag,        [100*log(value)]
-FIELD Xg,             CHISQ_GAL,  short,            chisq for galaxy mags,        [100*log(value)]
 FIELD Nm,             NMEAS,      unsigned short,   number of measures
 FIELD Nn,             NMISS,      unsigned short,   number of missings
@@ -30,6 +32,18 @@
 FIELD missing,        missing,    int,     	    offset to first missing obs
 
+# Pan-STARRS uses a 64-bit detection ID.  keep this in two 32 bit ints for backwards compatibility?
+FIELD objID_hi,       OBJ_ID_HI,    unsigned int,   ID upper bytes
+FIELD objID_lo,       OBJ_ID_LO,    unsigned int,   ID lower bytes
+
 # this structure should only be used for internal representations
 # the average-FORMAT structures should be used for external representations
 # note that the average magnitudes are stored in the 'secfilt' table (change this name??)
 # the index for the secfilt table is just Nsecfilt times the index for the average table.
+
+# XXX after the rest of the DVO re-org work, remove the magnitude based values from this table
+# and move them to the secfilt table.
+
+# the DVO object IDs are generated internally and are not equivalent to the PSPS object IDs
+# probably need to add position chisq
+
+# XXX include the number of measurements used to determine the positional information?
Index: trunk/Ohana/src/libautocode/def/image-panstarrs-dev-0.d
===================================================================
--- trunk/Ohana/src/libautocode/def/image-panstarrs-dev-0.d	(revision 12332)
+++ trunk/Ohana/src/libautocode/def/image-panstarrs-dev-0.d	(revision 12332)
@@ -0,0 +1,70 @@
+STRUCT       ImagePanstarrs_DEV_0
+EXTNAME      DVO_IMAGE_PANSTARRS_DEV_0
+TYPE         BINTABLE
+SIZE         256
+DESCRIPTION  DVO Image Table 
+
+# elements of the image structure
+
+SUBSTRUCT coords,           COORDS,               Coords,        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
+
+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,                   short,      	  image width
+FIELD 	  NY,               NY,                   short,      	  image height
+FIELD 	  apmifit,          APMIFIT,              float,      	  aperture correction,       mag
+FIELD 	  dapmifit,         DAPMIFIT,             float,      	  apmifit error,             mag
+FIELD 	  Mcal,             MCAL,                 float,      	  calibration mag,           mag
+FIELD 	  dMcal,            DMCAL,                float,      	  error on Mcal,             mag
+FIELD 	  Xm,               XM,                   short,      	  image chisq,               10*log(value)
+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
+
+FIELD 	  name,             NAME,                 char[32],       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 	  code,             CODE,                 char,           image quality flag
+FIELD 	  ccdnum,           CCDNUM,               unsigned char,  CCD ID number
+FIELD 	  imageID_hi,       IMAGE_ID_HI,          unsigned int,   ID upper bytes
+FIELD 	  imageID_lo,       IMAGE_ID_LO,          unsigned int,   ID lower bytes
+# 48 bytes 
+
+FIELD 	  dummy,            DUMMY,                char[10],       unused
+FIELD 	  order,            ORDER,                short,      	  Mrel 2D polynomical order 
+FIELD 	  Mx,               MX,                   short,      	  Mrel polyterm
+FIELD 	  My,               MY,                   short,      	  Mrel polyterm
+FIELD 	  Mxx,              MXX,                  short,      	  Mrel polyterm
+FIELD 	  Mxy,              MXY,                  short,      	  Mrel polyterm
+FIELD 	  Myy,              MYY,                  short,      	  Mrel polyterm
+FIELD 	  Mxxx,             MXXX,                 short,      	  Mrel polyterm
+FIELD 	  Mxxy,             MXXY,                 short,      	  Mrel polyterm
+FIELD 	  Mxyy,             MXYY,                 short,      	  Mrel polyterm
+FIELD 	  Myyy,             MYYY,                 short,      	  Mrel polyterm
+FIELD 	  Mxxxx,            MXXXX,                short,      	  Mrel polyterm
+FIELD 	  Mxxxy,            MXXXY,                short,      	  Mrel polyterm
+FIELD 	  Mxxyy,            MXXYY,                short,      	  Mrel polyterm
+FIELD 	  Mxyyy,            MXYYY,                short,      	  Mrel polyterm
+FIELD 	  Myyyy,            MYYYY,                short,      	  Mrel polyterm
+# 40 bytes
Index: trunk/Ohana/src/libautocode/def/image.d
===================================================================
--- trunk/Ohana/src/libautocode/def/image.d	(revision 11880)
+++ trunk/Ohana/src/libautocode/def/image.d	(revision 12332)
@@ -25,13 +25,13 @@
 FIELD 	  tzero,            TZERO,                e_time,         readout time (row 0)
 FIELD 	  nstar,            NSTAR,                unsigned int,   number of stars on image
-FIELD 	  secz_PS,          SECZ,                 float,      	  airmass,                   mag
+FIELD 	  secz,             SECZ,                 float,      	  airmass,                   mag
 FIELD 	  NX,               NX,                   short,      	  image width
 FIELD 	  NY,               NY,                   short,      	  image height
-FIELD 	  apmifit_PS,       APMIFIT,              float,      	  aperture correction,       mag
-FIELD 	  dapmifit_PS,      DAPMIFIT,             float,      	  apmifit error,             mag
-FIELD 	  Mcal_PS,          MCAL,                 float,      	  calibration mag,           mag
-FIELD 	  dMcal_PS,         DMCAL,                float,      	  error on Mcal,             mag
+FIELD 	  apmifit,          APMIFIT,              float,      	  aperture correction,       mag
+FIELD 	  dapmifit,         DAPMIFIT,             float,      	  apmifit error,             mag
+FIELD 	  Mcal,             MCAL,                 float,      	  calibration mag,           mag
+FIELD 	  dMcal,            DMCAL,                float,      	  error on Mcal,             mag
 FIELD 	  Xm,               XM,                   short,      	  image chisq,               10*log(value)
-FIELD 	  source,           SOURCE,               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
@@ -48,7 +48,9 @@
 FIELD 	  code,             CODE,                 char,           image quality flag
 FIELD 	  ccdnum,           CCDNUM,               unsigned char,  CCD ID number
-# 40 bytes 
+FIELD 	  imageID_hi,       IMAGE_ID_HI,          unsigned int,   ID upper bytes
+FIELD 	  imageID_lo,       IMAGE_ID_LO,          unsigned int,   ID lower bytes
+# 48 bytes 
 
-FIELD 	  dummy,            DUMMY,                char[18],       unused
+FIELD 	  dummy,            DUMMY,                char[10],       unused
 FIELD 	  order,            ORDER,                short,      	  Mrel 2D polynomical order 
 FIELD 	  Mx,               MX,                   short,      	  Mrel polyterm
@@ -66,3 +68,3 @@
 FIELD 	  Mxyyy,            MXYYY,                short,      	  Mrel polyterm
 FIELD 	  Myyyy,            MYYYY,                short,      	  Mrel polyterm
-# 48 bytes
+# 40 bytes
Index: trunk/Ohana/src/libautocode/def/measure-panstarrs-dev-0.d
===================================================================
--- trunk/Ohana/src/libautocode/def/measure-panstarrs-dev-0.d	(revision 12332)
+++ trunk/Ohana/src/libautocode/def/measure-panstarrs-dev-0.d	(revision 12332)
@@ -0,0 +1,59 @@
+STRUCT       MeasurePanstarrs_DEV_0
+EXTNAME      DVO_MEASURE_PANSTARRS_DEV_0
+TYPE         BINTABLE
+SIZE         96
+DESCRIPTION  DVO Detection Measurement Table 
+
+FIELD dR,             D_RA,         float,          RA offset,                	  arcsec
+FIELD dD,             D_DEC,        float,          DEC offset,               	  arcsec
+FIELD M,              MAG,          float,          catalog mag,       	       	  mag
+FIELD Mcal,           Mcal,         float,          image cal mag,	          mag
+FIELD Mgal,           Mgal,         float,          galaxy mag,			  mag
+FIELD dM,             dM,           float,          mag error,                    mag
+FIELD dt,             dt,           float,          exposure time,                2.5*log(exptime)
+
+# 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,               pixels
+FIELD Yccd,           Y_CCD,        float,          Y coord on chip,               pixels
+
+# 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,              t,            unsigned int,   time in seconds (UNIX)
+FIELD averef,         averef,       unsigned int,   reference to average entry      
+
+# Pan-STARRS uses a 64-bit detection ID.  keep this in two 32 bit ints for backwards compatibility?
+FIELD detID_hi,       DET_ID_HI,    unsigned int,   ID upper bytes
+FIELD detID_lo,       DET_ID_LO,    unsigned int,   ID lower bytes
+
+FIELD imageID_hi,     IMAGE_ID_HI,  unsigned int,   reference to image
+FIELD imageID_lo,     IMAGE_ID_LO,  unsigned int,   reference to image
+
+FIELD FWx,            FWx,          short,          object fwhm major axis,       1/100 of arcsec 
+FIELD FWy,            FWy,          short,          object fwhm minor axis,       1/100 of arcsec 
+FIELD theta,          theta,        short,          angle wrt ccd X dir,          (0xffff/360) deg
+FIELD photcode,       photcode,     unsigned short, photcode
+
+FIELD flags,          flags,        unsigned short, flags for various uses  
+
+FIELD dXccd,          X_CCD_ERR,    short,          X coord error on chip,         pixels
+FIELD dYccd,          Y_CCD_ERR,    short,          Y coord error on chip,         pixels
+
+# do we need more resolution than a short? should this be a log?
+FIELD qPSF,           PSF_QF,       short,          psf coverage/quality factor
+
+FIELD dophot,         dophot,       char,           dophot type
+FIELD stargal,        stargal,      char,           star-galaxy separator
+
+# we need extra bytes for padding purposes...
+FIELD dummy,          dummy,        char[2],        padding
+
+# float : 13 x 4 = 52
+# int:     6 x 4 = 24
+# short:   8 x 2 = 16
+# char :   2     =  2
Index: trunk/Ohana/src/libautocode/def/measure.d
===================================================================
--- trunk/Ohana/src/libautocode/def/measure.d	(revision 11880)
+++ trunk/Ohana/src/libautocode/def/measure.d	(revision 12332)
@@ -2,21 +2,52 @@
 EXTNAME      DVO_MEASURE
 TYPE         BINTABLE
-SIZE         50
+SIZE         96
 DESCRIPTION  DVO Detection Measurement Table 
 
-FIELD dR_PS,          D_RA,       float,          RA offset,                	  arcsec
-FIELD dD_PS,          D_DEC,      float,          DEC offset,               	  arcsec
-FIELD M_PS,           MAG,        float,          catalog mag,       	       	  mag
-FIELD Mcal_PS,        Mcal,       float,          image cal mag,	          mag
-FIELD Mgal_PS,        Mgal,       float,          galaxy mag,			  mag
-FIELD dM_PS,          dM,         float,          mag error,                      mag
-FIELD airmass_PS,     airmass,    float,          (airmass - 1),		  airmass
-FIELD dt_PS,          dt,         float,          exposure time,                  2.5*log(exptime)
-FIELD FWx,            FWx,        short,          object fwhm major axis,         1/100 of arcsec 
-FIELD FWy,            FWy,        short,          object fwhm minor axis,         1/100 of arcsec 
-FIELD theta,          theta,      unsigned char,  angle wrt ccd X dir,            (0xff/360) deg
-FIELD dophot,         dophot,     char,           dophot type
-FIELD source,         source,     unsigned short, photcode
-FIELD flags,          flags,      unsigned short, flags for various uses  
-FIELD t,              t,          unsigned int,   time in seconds (UNIX)
-FIELD averef,         averef,     unsigned int,   reference to average entry      
+FIELD dR,             D_RA,         float,          RA offset,                	  arcsec
+FIELD dD,             D_DEC,        float,          DEC offset,               	  arcsec
+FIELD M,              MAG,          float,          catalog mag,       	       	  mag
+FIELD Mcal,           Mcal,         float,          image cal mag,	          mag
+FIELD Mgal,           Mgal,         float,          galaxy mag,			  mag
+FIELD dM,             dM,           float,          mag error,                    mag
+FIELD airmass,        airmass,      float,          (airmass - 1),		  airmass
+FIELD dt,             dt,           float,          exposure time,                2.5*log(exptime)
+
+FIELD t,              t,            unsigned int,   time in seconds (UNIX)
+FIELD averef,         averef,       unsigned int,   reference to average entry      
+
+FIELD FWx,            FWx,          short,          object fwhm major axis,       1/100 of arcsec 
+FIELD FWy,            FWy,          short,          object fwhm minor axis,       1/100 of arcsec 
+FIELD theta,          theta,        short,          angle wrt ccd X dir,          (0xffff/360) deg
+FIELD photcode,       photcode,     unsigned short, photcode
+
+FIELD flags,          flags,        unsigned short, flags for various uses  
+FIELD dophot,         dophot,       char,           dophot type
+FIELD stargal,        stargal,      char,           star-galaxy separator
+
+# new field elements needed for Pan-STARRS:
+FIELD Xccd,           X_CCD,        float,          X coord on chip,               pixels
+FIELD Yccd,           Y_CCD,        float,          Y coord on chip,               pixels
+
+# 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 dXccd,          X_CCD_ERR,    short,          X coord error on chip,         pixels
+FIELD dYccd,          Y_CCD_ERR,    short,          Y coord error on chip,         pixels
+
+# do we need more resolution than a short? should this be a log?
+FIELD qPSF,           PSF_QF,       short,          psf coverage/quality factor
+
+# Pan-STARRS uses a 64-bit detection ID.  keep this in two 32 bit ints for backwards compatibility?
+FIELD detID_hi,       DET_ID_HI,    unsigned int,   ID upper bytes
+FIELD detID_lo,       DET_ID_LO,    unsigned int,   ID lower bytes
+
+FIELD imageID_hi,     IMAGE_ID_HI,  unsigned int,   reference to image
+FIELD imageID_lo,     IMAGE_ID_LO,  unsigned int,   reference to image
+
+# note that with airmass = 1.0 / cos(90 - alt), we have full alt/az representation
+FIELD az,             AZ,           float,          telescope azimuth
+
+# we need extra bytes for padding purposes...
+FIELD dummy,          dummy,        char[2],        padding
Index: trunk/Ohana/src/libautocode/def/photcode.d
===================================================================
--- trunk/Ohana/src/libautocode/def/photcode.d	(revision 11880)
+++ trunk/Ohana/src/libautocode/def/photcode.d	(revision 12332)
@@ -2,5 +2,5 @@
 EXTNAME      DVO_PHOTCODE
 TYPE         BINTABLE
-SIZE         77
+SIZE         80
 DESCRIPTION  DVO Photcode Description Table 
 
@@ -9,4 +9,5 @@
 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) 
Index: trunk/Ohana/src/libautocode/def/secfilt-panstarrs-dev-0.d
===================================================================
--- trunk/Ohana/src/libautocode/def/secfilt-panstarrs-dev-0.d	(revision 12332)
+++ trunk/Ohana/src/libautocode/def/secfilt-panstarrs-dev-0.d	(revision 12332)
@@ -0,0 +1,13 @@
+STRUCT       SecFiltPanstarrs_DEV_0
+EXTNAME      DVO_SECFILT_PANSTARRS_DEV_0
+TYPE         BINTABLE
+SIZE         16
+DESCRIPTION  DVO SecFilt : Secondary Filter Data 
+
+# elements of data structure / FITS table
+FIELD  M,     MAG,      float,                other mags,       mags
+FIELD  dM,    MAG_ERR,  float,                scatter on mag,   mags
+FIELD  Xm,    MAG_CHI,  short,                chisq on mag,     [100*log(value)]
+FIELD  Ncode, NCODE,    short,                number of detections in band
+FIELD  Nused, NUSED,    short,                number of detections used in average
+FIELD  dummy, JUNK,     short,                place holder
Index: trunk/Ohana/src/libautocode/def/secfilt.d
===================================================================
--- trunk/Ohana/src/libautocode/def/secfilt.d	(revision 11880)
+++ trunk/Ohana/src/libautocode/def/secfilt.d	(revision 12332)
@@ -2,10 +2,12 @@
 EXTNAME      DVO_SECFILT
 TYPE         BINTABLE
-SIZE         12
+SIZE         16
 DESCRIPTION  DVO SecFilt : Secondary Filter Data 
 
 # elements of data structure / FITS table
-FIELD  M_PS,  MAG,      float,                other mags,       mags
-FIELD  dM_PS, MAG_ERR,  float,                scatter on mag,   mags
+FIELD  M,     MAG,      float,                other mags,       mags
+FIELD  dM,    MAG_ERR,  float,                scatter on mag,   mags
 FIELD  Xm,    MAG_CHI,  short,                chisq on mag,     [100*log(value)]
+FIELD  Ncode, NCODE,    short,                number of detections in band
+FIELD  Nused, NUSED,    short,                number of detections used in average
 FIELD  dummy, JUNK,     short,                place holder
