Index: /branches/eam_branches/ipp-20140717/ippToPsps/test/mksasdata.dvo
===================================================================
--- /branches/eam_branches/ipp-20140717/ippToPsps/test/mksasdata.dvo	(revision 37191)
+++ /branches/eam_branches/ipp-20140717/ippToPsps/test/mksasdata.dvo	(revision 37192)
@@ -51,5 +51,5 @@
 
   $expfile = sasdata/o5745g0620o.356996.cm.473458
-  exec addstar -D CAMERA gpc1 -D CATDIR $catdir $expfile.smf
+  exec addstar -D CAMERA gpc1 -D CATDIR $catdir -D CATFORMAT PS1_V5 $expfile.smf
 
   # are these used to find the exposures in any way?
@@ -100,5 +100,5 @@
   # a single stack
   $stkfile = sasdata/RINGS.V3.skycell.1225.070.stk.3366216.skycal.1589960
-  exec addstar -D CAMERA gpc1 -D CATDIR $catdir $stkfile.cmf
+  exec addstar -D CAMERA gpc1 -D CATFORMAT PS1_V5 -D CATDIR $catdir $stkfile.cmf
 
   # echo relphot -D CATDIR $catdir -region {$RA-5} {$RA+5} {$DEC-5} {$DEC+5} -images g,r,i,z,y -update
Index: /branches/eam_branches/ipp-20140717/ippToPsps/test/sascheck.v0.sql
===================================================================
--- /branches/eam_branches/ipp-20140717/ippToPsps/test/sascheck.v0.sql	(revision 37192)
+++ /branches/eam_branches/ipp-20140717/ippToPsps/test/sascheck.v0.sql	(revision 37192)
@@ -0,0 +1,25 @@
+
+-- get a set of measurements matched by detID
+select 
+   gra,
+   gdec,
+   objID,             
+   HEX(ippObjID),          
+   surveyID,          
+   tessID,            
+   projectionID,      
+   skyCellID,         
+   randomStackObjID,  
+   stackDetectRowID,  
+   primaryDetection,  
+-- bestDetection,     
+   dvoRegionID,       
+   dataRelease,       
+   gippDetectID,      
+   gstackDetectID,    
+   gstackMetaID,      
+   HEX(ginfoFlag),        
+   HEX(ginfoFlag2),       
+   gnFrames         
+from StackObjectThin 
+limit 50
Index: /branches/eam_branches/ipp-20140717/ippToPsps/test/sascheck.v1.sql
===================================================================
--- /branches/eam_branches/ipp-20140717/ippToPsps/test/sascheck.v1.sql	(revision 37192)
+++ /branches/eam_branches/ipp-20140717/ippToPsps/test/sascheck.v1.sql	(revision 37192)
@@ -0,0 +1,44 @@
+-- compare g mags across stack tables
+select 
+       gra,
+       gdec,
+       graErr,
+       gdecErr,
+       gPSFMag,
+       gKronMag,
+       gApMag,
+       gExpMag,
+       gSerMag,
+       gDeVMag,
+       gpetMag,
+       gPSFMagErr,
+       gKronMagErr,
+       gApMagErr,
+       gExpMagErr,
+       gSerMagErr,
+       gDeVMagErr,
+       gpetMagErr,
+       gpsfLikelihood,    
+       gpsfQf,            
+       gpsfQfPerfect,     
+       gippDetectID
+       from StackObjectThin 
+       -- left join StackObjectRaw   using (gippDetectID)
+       -- left join StackModelFitExp using (gippDetectID)
+       -- left join StackModelFitDeV using (gippDetectID)
+       -- left join StackModelFitSer using (gippDetectID)
+       -- left join StackPetrosian   using (gippDetectID)
+       -- left join StackApFlxFull   using (gippDetectID)
+       -- left join StackApFlxFullC1 using (gippDetectID)
+       -- left join StackApFlxFullC2 using (gippDetectID)
+       join StackObjectRaw   using (gippDetectID)
+       join StackModelFitExp using (gippDetectID)
+       join StackModelFitDeV using (gippDetectID)
+       join StackModelFitSer using (gippDetectID)
+       join StackPetrosian   using (gippDetectID)
+       join StackApFlxFull   using (gippDetectID)
+       join StackApFlxFullC1 using (gippDetectID)
+       join StackApFlxFullC2 using (gippDetectID)
+       where (gippDetectID = 189)
+       -- where (gpsfQfPerfect > 0.85)
+       limit 50
Index: /branches/eam_branches/ipp-20140717/ippToPsps/test/sascheck.v10.sql
===================================================================
--- /branches/eam_branches/ipp-20140717/ippToPsps/test/sascheck.v10.sql	(revision 37192)
+++ /branches/eam_branches/ipp-20140717/ippToPsps/test/sascheck.v10.sql	(revision 37192)
@@ -0,0 +1,28 @@
+-- compare g fluxes across tables
+select 
+       gra,
+       gdec,
+       gPSFFlux,
+       gApFlux,
+       gPSFFluxErr,
+       gApFluxErr,
+       gApFillFac,
+       StackApFlx.gflxR3 as gflxR3_v1,
+       StackApFlxFull.gflxR3 as gflxR3_v2,
+       StackApFlx.gflxR4 as gflxR4_v1,
+       StackApFlxFull.gflxR4 as gflxR4_v2,
+       StackApFlx.gflxR5 as gflxR5_v1,
+       StackApFlxFull.gflxR5 as gflxR5_v2,
+       StackApFlx.gflxR3Err as gflxR3Err_v1,
+       StackApFlxFull.gflxR3Err as gflxR3Err_v2,
+       StackApFlx.gflxR4Err as gflxR4Err_v1,
+       StackApFlxFull.gflxR4Err as gflxR4Err_v2,
+       StackApFlx.gflxR5Err as gflxR5Err_v1,
+       StackApFlxFull.gflxR5Err as gflxR5Err_v2,
+       gippDetectID
+       from StackObjectThin 
+       join StackObjectRaw   using (gippDetectID)
+       join StackApFlx       using (gippDetectID)
+       join StackApFlxFull   using (gippDetectID)
+       where gPSFFlux > 1000
+       limit 50
Index: /branches/eam_branches/ipp-20140717/ippToPsps/test/sascheck.v11.sql
===================================================================
--- /branches/eam_branches/ipp-20140717/ippToPsps/test/sascheck.v11.sql	(revision 37192)
+++ /branches/eam_branches/ipp-20140717/ippToPsps/test/sascheck.v11.sql	(revision 37192)
@@ -0,0 +1,21 @@
+-- compare g fluxes across tables
+select 
+       gra,
+       gdec,
+       gPSFMag,
+       gPSFMagErr,
+       gpetRadius,    
+       gpetRadiusErr, 
+       gpetMag,      
+       gpetMagErr,   
+       gpetR50,       
+       gpetR50Err,    
+       gpetR90,       
+       gpetR90Err,    
+       gpetCf,        
+       gippDetectID
+       from StackObjectThin 
+       join StackObjectRaw   using (gippDetectID)
+       join StackPetrosian   using (gippDetectID)
+       where gPSFFlux > 1000
+       limit 50
Index: /branches/eam_branches/ipp-20140717/ippToPsps/test/sascheck.v2.sql
===================================================================
--- /branches/eam_branches/ipp-20140717/ippToPsps/test/sascheck.v2.sql	(revision 37192)
+++ /branches/eam_branches/ipp-20140717/ippToPsps/test/sascheck.v2.sql	(revision 37192)
@@ -0,0 +1,29 @@
+-- compare g raw PSF values
+select 
+  gippDetectID,
+  gxPos,             
+  gyPos,             
+  gxPosErr,          
+  gyPosErr,          
+  gpsfMajorFWHM,     
+  gpsfMinorFWHM,     
+  gpsfTheta,         
+  gpsfCore,          
+  gpsfLikelihood,    
+  gpsfQf,            
+  gpsfQfPerfect,     
+  gpsfChiSq,         
+  gmomentXX,         
+  gmomentXY,         
+  gmomentYY,         
+  gmomentR1,         
+  gmomentRH,         
+  gApFillFac,        
+  gKronRad,          
+  gsky,
+  gskyErr,
+  gexpTime,          
+  gzp              
+  from StackObjectThin 
+  join StackObjectRaw using (gippDetectID)
+  limit 80
Index: /branches/eam_branches/ipp-20140717/ippToPsps/test/sascheck.v3.sql
===================================================================
--- /branches/eam_branches/ipp-20140717/ippToPsps/test/sascheck.v3.sql	(revision 37192)
+++ /branches/eam_branches/ipp-20140717/ippToPsps/test/sascheck.v3.sql	(revision 37192)
@@ -0,0 +1,32 @@
+-- compare g fluxes across tables
+select 
+       gra,
+       gdec,
+       gPSFFlux,
+       gKronFlux,
+       gApFlux,
+       gPSFFluxErr,
+       gKronFluxErr,
+       gApFluxErr,
+       gApFillFac,
+       gflxR1,
+       gflxR2,
+       gflxR3,
+       gflxR4,
+       gflxR5,
+       gflxR6,
+       gflxR7,
+       gflxR8,
+       gflxR9,
+       gflxR10,
+       gippDetectID
+       from StackObjectThin 
+       join StackObjectRaw   using (gippDetectID)
+       join StackModelFitExp using (gippDetectID)
+       join StackModelFitDeV using (gippDetectID)
+       join StackModelFitSer using (gippDetectID)
+       join StackPetrosian   using (gippDetectID)
+       join StackApFlxFull   using (gippDetectID)
+       join StackApFlxFullC1 using (gippDetectID)
+       join StackApFlxFullC2 using (gippDetectID)
+       limit 50
Index: /branches/eam_branches/ipp-20140717/ippToPsps/test/sascheck.v4.sql
===================================================================
--- /branches/eam_branches/ipp-20140717/ippToPsps/test/sascheck.v4.sql	(revision 37192)
+++ /branches/eam_branches/ipp-20140717/ippToPsps/test/sascheck.v4.sql	(revision 37192)
@@ -0,0 +1,38 @@
+-- compare g fluxes across tables
+select 
+       gra,
+       gdec,
+       gPSFFlux,
+       gKronFlux,
+       gApFlux,
+       gflxR1,
+       gc1flxR1,
+       gc2flxR1,
+       gflxR2,
+       gc1flxR2,
+       gc2flxR2,
+       gflxR3,
+       gc1flxR3,
+       gc2flxR3,
+       gflxR4,
+       gc1flxR4,
+       gc2flxR4,
+       gflxR5,
+       gc1flxR5,
+       gc2flxR5,
+       gPSFFluxErr,
+       gKronFluxErr,
+       gApFluxErr,
+       gApFillFac,
+       gpsfQfPerfect,
+       gippDetectID
+       from StackObjectThin 
+       join StackObjectRaw   using (gippDetectID)
+       join StackModelFitExp using (gippDetectID)
+       join StackModelFitDeV using (gippDetectID)
+       join StackModelFitSer using (gippDetectID)
+       join StackPetrosian   using (gippDetectID)
+       join StackApFlxFull   using (gippDetectID)
+       join StackApFlxFullC1 using (gippDetectID)
+       join StackApFlxFullC2 using (gippDetectID)
+       limit 50
Index: /branches/eam_branches/ipp-20140717/ippToPsps/test/sascheck.v5.sql
===================================================================
--- /branches/eam_branches/ipp-20140717/ippToPsps/test/sascheck.v5.sql	(revision 37192)
+++ /branches/eam_branches/ipp-20140717/ippToPsps/test/sascheck.v5.sql	(revision 37192)
@@ -0,0 +1,32 @@
+-- compare g mags across stack tables
+select 
+       gra,
+       gdec,
+       gExpMag,
+       gSerMag,
+       gDeVMag,
+       gExpRadius,
+       gSerRadius,
+       gDeVRadius,
+       gExpAb,
+       gSerAb,
+       gDeVAb,
+       gExpPhi,
+       gSerPhi,
+       gDeVPhi,
+       gippDetectID
+       from StackObjectThin 
+       -- left join StackObjectRaw   using (gippDetectID)
+       -- left join StackModelFitExp using (gippDetectID)
+       -- left join StackModelFitDeV using (gippDetectID)
+       -- left join StackModelFitSer using (gippDetectID)
+       -- left join StackPetrosian   using (gippDetectID)
+       -- left join StackApFlxFull   using (gippDetectID)
+       -- left join StackApFlxFullC1 using (gippDetectID)
+       -- left join StackApFlxFullC2 using (gippDetectID)
+       join StackObjectRaw   using (gippDetectID)
+       join StackModelFitExp using (gippDetectID)
+       join StackModelFitDeV using (gippDetectID)
+       join StackModelFitSer using (gippDetectID)
+       -- where (gpsfQfPerfect > 0.85)
+       limit 50
Index: /branches/eam_branches/ipp-20140717/ippToPsps/test/sascheck.v6.sql
===================================================================
--- /branches/eam_branches/ipp-20140717/ippToPsps/test/sascheck.v6.sql	(revision 37192)
+++ /branches/eam_branches/ipp-20140717/ippToPsps/test/sascheck.v6.sql	(revision 37192)
@@ -0,0 +1,25 @@
+-- compare g mags across stack tables
+select 
+       gra,
+       gdec,
+       gExpMag,
+       gExpMagErr,
+       gExpRadius,
+       gExpRadiusErr,
+       gExpAb,
+       gExpAbErr,
+       gExpPhi,
+       gExpPhiErr,
+       gExpRa,
+       gExpDec,
+       gExpRaErr,
+       gExpDecErr,
+       gExpCf,
+       gExpLikelihood,
+       gippDetectID
+       from StackObjectThin 
+       join StackModelFitExp using (gippDetectID)
+       join StackModelFitDeV using (gippDetectID)
+       join StackModelFitSer using (gippDetectID)
+       -- where (gpsfQfPerfect > 0.85)
+       limit 50
Index: /branches/eam_branches/ipp-20140717/ippToPsps/test/sascheck.v7.sql
===================================================================
--- /branches/eam_branches/ipp-20140717/ippToPsps/test/sascheck.v7.sql	(revision 37192)
+++ /branches/eam_branches/ipp-20140717/ippToPsps/test/sascheck.v7.sql	(revision 37192)
@@ -0,0 +1,25 @@
+-- compare g mags across stack tables
+select 
+       gra,
+       gdec,
+       gDeVMag,
+       gDeVMagErr,
+       gDeVRadius,
+       gDeVRadiusErr,
+       gDeVAb,
+       gDeVAbErr,
+       gDeVPhi,
+       gDeVPhiErr,
+       gDeVRa,
+       gDeVDec,
+       gDeVRaErr,
+       gDeVDecErr,
+       gDeVCf,
+       gDeVLikelihood,
+       gippDetectID
+       from StackObjectThin 
+       join StackModelFitExp using (gippDetectID)
+       join StackModelFitDeV using (gippDetectID)
+       join StackModelFitSer using (gippDetectID)
+       -- where (gpsfQfPerfect > 0.85)
+       limit 50
Index: /branches/eam_branches/ipp-20140717/ippToPsps/test/sascheck.v8.sql
===================================================================
--- /branches/eam_branches/ipp-20140717/ippToPsps/test/sascheck.v8.sql	(revision 37192)
+++ /branches/eam_branches/ipp-20140717/ippToPsps/test/sascheck.v8.sql	(revision 37192)
@@ -0,0 +1,27 @@
+-- compare g mags across stack tables
+select 
+       gra,
+       gdec,
+       gSerMag,
+       gSerMagErr,
+       gSerRadius,
+       gSerRadiusErr,
+       gSerAb,
+       gSerAbErr,
+       gSerNu,
+       gSerNuErr,
+       gSerPhi,
+       gSerPhiErr,
+       gSerRa,
+       gSerDec,
+       gSerRaErr,
+       gSerDecErr,
+       gSerCf,
+       gSerLikelihood,
+       gippDetectID
+       from StackObjectThin 
+       join StackModelFitExp using (gippDetectID)
+       join StackModelFitDeV using (gippDetectID)
+       join StackModelFitSer using (gippDetectID)
+       -- where (gpsfQfPerfect > 0.85)
+       limit 50
Index: /branches/eam_branches/ipp-20140717/ippToPsps/test/sascheck.v9.sql
===================================================================
--- /branches/eam_branches/ipp-20140717/ippToPsps/test/sascheck.v9.sql	(revision 37192)
+++ /branches/eam_branches/ipp-20140717/ippToPsps/test/sascheck.v9.sql	(revision 37192)
@@ -0,0 +1,29 @@
+-- compare g fluxes across tables
+select 
+       gra,
+       gdec,
+       gxPos,
+       gyPos,
+       gPSFFlux,
+       gApFlux,
+       gPSFFluxErr,
+       gApFluxErr,
+       gApFillFac,
+       gflxR3,
+       gflxR4,
+       gflxR5,
+       gflxR3Err,
+       gflxR4Err,
+       gflxR5Err,
+       gflxR3Std,
+       gflxR4Std,
+       gflxR5Std,
+       gflxR3Fill,
+       gflxR4Fill,
+       gflxR5Fill,
+       gippDetectID
+       from StackObjectThin 
+       join StackObjectRaw   using (gippDetectID)
+       join StackApFlx       using (gippDetectID)
+       where gPSFFlux > 1000
+       limit 50
