Index: trunk/Ohana/src/libdvo/include/dvo.h
===================================================================
--- trunk/Ohana/src/libdvo/include/dvo.h	(revision 38461)
+++ trunk/Ohana/src/libdvo/include/dvo.h	(revision 38462)
@@ -72,4 +72,12 @@
 } DVO_INT_NAN;
 
+// init all data, or just catalog data
+typedef enum {
+  SECFILT_RESET_CHIP  = 0x01,
+  SECFILT_RESET_WARP  = 0x02,
+  SECFILT_RESET_STACK = 0x04,
+  SECFILT_RESET_ALL   = 0x07,
+} SecFiltInitMode;
+  
 // max path length
 # define DVO_MAX_PATH 1024
@@ -126,4 +134,7 @@
   ID_MEAS_ICRF_QSO       = 0x00040000,  // this measurement is an ICRF reference position
   ID_MEAS_IMAGE_EPOCH    = 0x00080000,  // this measurement is registered to the image epoch (not tied to ref catalog epoch)
+  ID_MEAS_PHOTOM_PSF     = 0x00100000,  // this measurement is used for the mean psf mag
+  ID_MEAS_PHOTOM_APER    = 0x00200000,  // this measurement is used for the mean ap mag
+  ID_MEAS_PHOTOM_KRON    = 0x00400000,  // this measurement is used for the mean kron mag
 } DVOMeasureFlags;
 
@@ -188,12 +199,17 @@
   ID_SECF_HAS_PS1     	= 0x00000010, // PS1 photometry used in average measurement
   ID_SECF_HAS_STACK   	= 0x00000020, // PS1 stack photometry exists
-  ID_PHOTOM_PASS_0    	= 0x00000100, // average magnitude calculated in 0th pass
-  ID_PHOTOM_PASS_1    	= 0x00000200, // average magnitude calculated in 1th pass
-  ID_PHOTOM_PASS_2    	= 0x00000400, // average magnitude calculated in 2th pass
-  ID_PHOTOM_PASS_3    	= 0x00000800, // average magnitude calculated in 3th pass
-  ID_PHOTOM_PASS_4    	= 0x00001000, // average magnitude calculated in 4th pass
-  ID_PSPS_OBJ_EXT     	= 0x00002000, // In PSPS ID_SECF_OBJ_EXT is moved here so it fits within 16 bits
+  ID_SECF_HAS_TYCHO   	= 0x00000040, // Tycho photometry used for synth mags
+  ID_SECF_FIX_SYNTH   	= 0x00000080, // synth mags repaired with zpt map
+  ID_SECF_RANK_0    	= 0x00000100, // average magnitude uses rank 0 values
+  ID_SECF_RANK_1    	= 0x00000200, // average magnitude uses rank 1 values
+  ID_SECF_RANK_2    	= 0x00000400, // average magnitude uses rank 2 values
+  ID_SECF_RANK_3    	= 0x00000800, // average magnitude uses rank 3 values
+  ID_SECF_RANK_4    	= 0x00001000, // average magnitude uses rank 4 values
+  ID_SECF_OBJ_EXT_PSPS  = 0x00002000, // In PSPS ID_SECF_OBJ_EXT is moved here so it fits within 16 bits
   ID_SECF_STACK_PRIMARY = 0x00004000, // PS1 stack photometry comes from primary skycell
   ID_SECF_OBJ_EXT       = 0x01000000, // extended in this band
+
+  ID_SECF_CHIP_FLAGS    = 0x01003f1f, // all chip-related bits (used to reset the correct bits only)
+  ID_SECF_STACK_FLAGS   = 0x00004020, // all stack-related bits (
 } DVOSecfiltFlags;
 
@@ -800,4 +816,6 @@
   off_t *found_t;
   off_t *foundWarp_t;
+
+  char *measureRank;
 //  off_t *image_t;
 //  off_t *mosaic_t;
@@ -1123,5 +1141,5 @@
 void dvo_average_init (Average *average);
 void dvo_averageT_init (AverageTiny *average);
-void dvo_secfilt_init (SecFilt *secfilt);
+void dvo_secfilt_init (SecFilt *secfilt, SecFiltInitMode mode);
 void dvo_measure_init (Measure *measure);
 void dvo_measureT_init (MeasureTiny *measure);
Index: trunk/Ohana/src/libdvo/include/libdvo_astro.h
===================================================================
--- trunk/Ohana/src/libdvo/include/libdvo_astro.h	(revision 38461)
+++ trunk/Ohana/src/libdvo/include/libdvo_astro.h	(revision 38462)
@@ -26,4 +26,5 @@
   PROJ_GLS, // pseudocyl
   PROJ_PAR, // pseudocyl
+  PROJ_ZPN, // zenithal
 } OhanaProjection;
 
Index: trunk/Ohana/src/libdvo/src/coordops.c
===================================================================
--- trunk/Ohana/src/libdvo/src/coordops.c	(revision 38461)
+++ trunk/Ohana/src/libdvo/src/coordops.c	(revision 38462)
@@ -1,3 +1,4 @@
 # include <dvo.h>
+# define UKIRT_ONLY 1
 
 /* note that Coords.ctype carries the DEC (ctype2) value */
@@ -81,5 +82,5 @@
 
   /** extra polynomial terms **/
-  if (coords[0].Npolyterms > 1) {
+  if ((coords[0].Npolyterms > 1) && (proj != PROJ_ZPN)) {
     X2 = X*X;
     Y2 = Y*Y;
@@ -171,4 +172,37 @@
 	stht = cos (RAD_DEG * R);
 	break;
+
+      case PROJ_ZPN:
+	// R = 90 - theta (degrees)
+	// this is wrong because we are ignoring the distortion
+	// XXX For now, just solve for terms up to n = 3
+
+	// Ro = (pi/180)(90 - theta)
+	// R = (180/pi)sum (P_i R^i)
+
+	if (UKIRT_ONLY) {
+	  double Ro = RAD_DEG * R;
+	  double P1 = coords[0].polyterms[0][1];
+	  double P3 = coords[0].polyterms[0][3];
+
+	  // find the roots of f(gamma) = P1 gamma + P3 gamma^3 - Ro
+	  // starting guess for gamma is Ro / P1
+	  double gamma = Ro / P1;
+
+	  int i;
+	  for (i = 0; i < 5; i++) {
+	    double F = P1*gamma + P3*gamma*gamma*gamma - Ro;
+	    double dFdgamma = P1 + 3.0*P3*gamma*gamma;
+
+	    double gamma_new = gamma - F / dFdgamma;
+	    gamma = gamma_new;
+	  }
+	  
+	  double theta = 90.0 - gamma * DEG_RAD ;
+	  ctht = cos (RAD_DEG * theta);
+	  stht = sin (RAD_DEG * theta);
+	  break;
+	}
+
       case PROJ_ZEA:
       case PROJ_ZPL:
@@ -238,4 +272,5 @@
 int RD_to_LM (double *L, double *M, double ra, double dec, Coords *coords) {
 
+  int i;
   double phi, theta;
   double sphi, cphi, stht, ctht;
@@ -303,4 +338,5 @@
 	*M = -DEG_RAD * cphi;
 	return (stht > 0);
+
       case PROJ_ARC:
 	// R = 90 - theta
@@ -311,4 +347,39 @@
 	*M = (ctht == 0.0) ? 0.0 : -Rc * cphi / ctht ;
 	return (TRUE);
+
+      case PROJ_ZPN:
+	// Ro = (pi/180)(90 - theta)
+	// R = (180/pi)sum (P_i R^i)
+	ctht = hypot(sphi, cphi);
+	theta = atan2 (stht, ctht);
+
+	double Rc;
+	if (UKIRT_ONLY) {
+	  double P1 = coords[0].polyterms[0][1];
+	  double P3 = coords[0].polyterms[0][3];
+	  double gamma = RAD_DEG * (90 - DEG_RAD * theta);
+	  Rc = P1*gamma + P3*gamma*gamma*gamma;
+	} else {
+	  double Ro = RAD_DEG * (90 - DEG_RAD * theta);
+
+	  // i = 0 .. Npolyterms - 1 (1 <= Npolyterms <= 21)
+	  i = coords[0].Npolyterms - 1;
+	  Rc = 0.0;
+	  while (i > 0) {
+	    if (i < 7) {
+	      Rc = (Rc + coords[0].polyterms[0][i])*Ro;
+	    } else {
+	      Rc = (Rc + coords[0].polyterms[1][i-7])*Ro;
+	    }
+	    i --;
+	  }
+	  Rc += coords[0].polyterms[0][i];
+	}
+	Rc = DEG_RAD * Rc;
+
+	*L = (ctht == 0.0) ? 0.0 : +Rc * sphi / ctht ;
+	*M = (ctht == 0.0) ? 0.0 : -Rc * cphi / ctht ;
+	return (TRUE);
+
       case PROJ_ZEA:
       case PROJ_ZPL:
@@ -386,5 +457,6 @@
 
   /** extra polynomial terms **/
-  if (coords[0].Npolyterms > 1) {
+  // polyterm values are only valid for some projections.  for PROJ_ZPN, they are applied to R, not X,Y
+  if ((coords[0].Npolyterms > 1) && (proj != PROJ_ZPN)) {
     for (i = 0; i < 10; i++) {
       // find derivatives at Xo, Yo
@@ -531,5 +603,5 @@
 int GetCoords (Coords *coords, Header *header) {
   
-  int status, status1, status2, itmp, Polynomial, Polyterm;
+  int i, status, status1, status2, itmp, Polynomial, Polyterm;
   double Lambda, rotate, rotate1, rotate2, scale;
   double equinox;
@@ -663,4 +735,29 @@
       coords[0].pc2_1 /= scale;
       coords[0].pc2_2 /= scale;
+
+      if (!strcmp (&coords[0].ctype[4], "-ZPN")) {
+	int found;
+	for (i = 0; i < 14; i++) {
+	  char name[64];
+	  sprintf (name, "PV2_%d", i);
+	  if (i < 7) {
+	    found = gfits_scan (header, name, "%f", 1, &coords[0].polyterms[0][i]);
+	  } else {
+	    found = gfits_scan (header, name, "%f", 1, &coords[0].polyterms[1][i-7]);
+	  }
+	  if ((i == 0) && !found) {
+	    coords[0].polyterms[0][0] = 0.0;
+	    continue;
+	  }
+	  if ((i == 1) && !found) {
+	    coords[0].polyterms[0][1] = 1.0;
+	    continue;
+	  }
+	  if (!found) {
+	    coords[0].Npolyterms = i;
+	    break;
+	  }
+	}
+      }
       break;
 
@@ -895,4 +992,5 @@
   if (!strcmp(&ctype[4], "-ZEA")) return PROJ_ZEA;
   if (!strcmp(&ctype[4], "-ZPL")) return PROJ_ZPL;
+  if (!strcmp(&ctype[4], "-ZPN")) return PROJ_ZPN;
   if (!strcmp(&ctype[4], "-ARC")) return PROJ_ARC;
   if (!strcmp(&ctype[4], "-STG")) return PROJ_STG;
@@ -916,4 +1014,5 @@
     case PROJ_ZEA: strcpy(&ctype[4], "-ZEA"); return TRUE;
     case PROJ_ZPL: strcpy(&ctype[4], "-ZPL"); return TRUE;
+    case PROJ_ZPN: strcpy(&ctype[4], "-ZPN"); return TRUE;
     case PROJ_ARC: strcpy(&ctype[4], "-ARC"); return TRUE;
     case PROJ_STG: strcpy(&ctype[4], "-STG"); return TRUE;
@@ -937,4 +1036,5 @@
     case PROJ_ZEA:
     case PROJ_ZPL:
+    case PROJ_ZPN:
     case PROJ_ARC:
     case PROJ_STG:
Index: trunk/Ohana/src/libdvo/src/dvo_catalog.c
===================================================================
--- trunk/Ohana/src/libdvo/src/dvo_catalog.c	(revision 38461)
+++ trunk/Ohana/src/libdvo/src/dvo_catalog.c	(revision 38462)
@@ -215,71 +215,82 @@
 }
 
-// init all data, or just catalog data
-void dvo_secfilt_init (SecFilt *secfilt) {
-  secfilt->M           = NAN;
-  secfilt->dM          = NAN;
-  secfilt->Map         = NAN;
-  secfilt->dMap        = NAN;
-  secfilt->sMap        = NAN;
-  secfilt->Mkron       = NAN;
-  secfilt->dMkron      = NAN;
-  secfilt->sMkron      = NAN;
-
-  secfilt->psfQfMax     = NAN;
-  secfilt->psfQfPerfMax = NAN;
-
-  secfilt->Mstdev      = NAN;
-  secfilt->Mmin        = NAN;
-  secfilt->Mmax        = NAN;
-  secfilt->Mchisq      = NAN;
-
-  secfilt->Ncode       = 0;
-  secfilt->Nused       = 0;
-  secfilt->NusedKron   = 0;
-  secfilt->NusedAp     = 0;
-
-  secfilt->flags       = 0;
-
-  secfilt->MpsfStk     = NAN;
-  secfilt->FpsfStk     = NAN;
-  secfilt->dFpsfStk    = NAN;
-
-  secfilt->MkronStk    = NAN;
-  secfilt->FkronStk    = NAN;
-  secfilt->dFkronStk   = NAN;
-
-  secfilt->MapStk      = NAN;
-  secfilt->FapStk      = NAN;
-  secfilt->dFapStk     = NAN;
-
-  secfilt->Nstack      = 0;
-  secfilt->NstackDet   = 0;
-
-  secfilt->stackPrmryOff = -1;
-  secfilt->stackBestOff  = -1;
-
-  secfilt->MpsfWrp     = NAN;
-  secfilt->FpsfWrp     = NAN;
-  secfilt->dFpsfWrp    = NAN;
-  secfilt->sFpsfWrp    = NAN;
-
-  secfilt->MkronWrp    = NAN;
-  secfilt->FkronWrp    = NAN;
-  secfilt->dFkronWrp   = NAN;
-  secfilt->sFkronWrp   = NAN;
-
-  secfilt->MapWrp      = NAN;
-  secfilt->FapWrp      = NAN;
-  secfilt->dFapWrp     = NAN;
-  secfilt->sFapWrp     = NAN;
-
-  secfilt->NusedWrp     = 0;
-  secfilt->NusedKronWrp = 0;
-  secfilt->NusedApWrp   = 0;
-
-  secfilt->Nwarp        = 0;
-  secfilt->NwarpGood    = 0;
-
-  secfilt->ubercalDist = 1000;
+void dvo_secfilt_init (SecFilt *secfilt, SecFiltInitMode mode) {
+
+  myAssert (mode & SECFILT_RESET_ALL, "at least one of the CHIP,WARP,STACK bits must be set");
+
+  if ((mode & SECFILT_RESET_ALL) == SECFILT_RESET_ALL) {
+    secfilt->flags       = 0;
+  }
+
+  if (mode & SECFILT_RESET_CHIP) {
+    secfilt->M           = NAN;
+    secfilt->dM          = NAN;
+    secfilt->Map         = NAN;
+    secfilt->dMap        = NAN;
+    secfilt->sMap        = NAN;
+    secfilt->Mkron       = NAN;
+    secfilt->dMkron      = NAN;
+    secfilt->sMkron      = NAN;
+
+    secfilt->psfQfMax     = NAN;
+    secfilt->psfQfPerfMax = NAN;
+
+    secfilt->Mstdev      = NAN;
+    secfilt->Mmin        = NAN;
+    secfilt->Mmax        = NAN;
+    secfilt->Mchisq      = NAN;
+
+    secfilt->Ncode       = 0;
+    secfilt->Nused       = 0;
+    secfilt->NusedKron   = 0;
+    secfilt->NusedAp     = 0;
+    secfilt->ubercalDist = 1000;
+    secfilt->flags      &= ~ID_SECF_CHIP_FLAGS;
+  }
+
+  if (mode & SECFILT_RESET_STACK) {
+    secfilt->MpsfStk     = NAN;
+    secfilt->FpsfStk     = NAN;
+    secfilt->dFpsfStk    = NAN;
+
+    secfilt->MkronStk    = NAN;
+    secfilt->FkronStk    = NAN;
+    secfilt->dFkronStk   = NAN;
+
+    secfilt->MapStk      = NAN;
+    secfilt->FapStk      = NAN;
+    secfilt->dFapStk     = NAN;
+
+    secfilt->Nstack      = 0;
+    secfilt->NstackDet   = 0;
+
+    secfilt->stackPrmryOff = -1;
+    secfilt->stackBestOff  = -1;
+    secfilt->flags      &= ~ID_SECF_STACK_FLAGS;
+  }
+
+  if (mode & SECFILT_RESET_WARP) {
+    secfilt->MpsfWrp     = NAN;
+    secfilt->FpsfWrp     = NAN;
+    secfilt->dFpsfWrp    = NAN;
+    secfilt->sFpsfWrp    = NAN;
+
+    secfilt->MkronWrp    = NAN;
+    secfilt->FkronWrp    = NAN;
+    secfilt->dFkronWrp   = NAN;
+    secfilt->sFkronWrp   = NAN;
+
+    secfilt->MapWrp      = NAN;
+    secfilt->FapWrp      = NAN;
+    secfilt->dFapWrp     = NAN;
+    secfilt->sFapWrp     = NAN;
+
+    secfilt->NusedWrp     = 0;
+    secfilt->NusedKronWrp = 0;
+    secfilt->NusedApWrp   = 0;
+
+    secfilt->Nwarp        = 0;
+    secfilt->NwarpGood    = 0;
+  }
 }
 
Index: trunk/Ohana/src/libdvo/src/dvo_convert_PS1_DEV_1.c
===================================================================
--- trunk/Ohana/src/libdvo/src/dvo_convert_PS1_DEV_1.c	(revision 38461)
+++ trunk/Ohana/src/libdvo/src/dvo_convert_PS1_DEV_1.c	(revision 38462)
@@ -178,5 +178,5 @@
 
   for (i = 0; i < Nvalues; i++) {
-    dvo_secfilt_init (&out[i]);
+    dvo_secfilt_init (&out[i], SECFILT_RESET_ALL);
 
     out[i].M     = in[i].M;      
Index: trunk/Ohana/src/libdvo/src/dvo_convert_PS1_DEV_2.c
===================================================================
--- trunk/Ohana/src/libdvo/src/dvo_convert_PS1_DEV_2.c	(revision 38461)
+++ trunk/Ohana/src/libdvo/src/dvo_convert_PS1_DEV_2.c	(revision 38462)
@@ -173,5 +173,5 @@
 
   for (i = 0; i < Nvalues; i++) {
-    dvo_secfilt_init (&out[i]);
+    dvo_secfilt_init (&out[i], SECFILT_RESET_ALL);
 
     out[i].M     = in[i].M;      
Index: trunk/Ohana/src/libdvo/src/dvo_convert_PS1_REF.c
===================================================================
--- trunk/Ohana/src/libdvo/src/dvo_convert_PS1_REF.c	(revision 38461)
+++ trunk/Ohana/src/libdvo/src/dvo_convert_PS1_REF.c	(revision 38462)
@@ -110,5 +110,5 @@
 
   for (i = 0; i < Nvalues; i++) {
-    dvo_secfilt_init (&out[i]);
+    dvo_secfilt_init (&out[i], SECFILT_RESET_ALL);
 
     out[i].M     = in[i].M;      
Index: trunk/Ohana/src/libdvo/src/dvo_convert_PS1_SIM.c
===================================================================
--- trunk/Ohana/src/libdvo/src/dvo_convert_PS1_SIM.c	(revision 38461)
+++ trunk/Ohana/src/libdvo/src/dvo_convert_PS1_SIM.c	(revision 38462)
@@ -195,5 +195,5 @@
 
   for (i = 0; i < Nvalues; i++) {
-    dvo_secfilt_init (&out[i]);
+    dvo_secfilt_init (&out[i], SECFILT_RESET_ALL);
 
     out[i].M             = in[i].M;      
Index: trunk/Ohana/src/libdvo/src/dvo_convert_PS1_V1.c
===================================================================
--- trunk/Ohana/src/libdvo/src/dvo_convert_PS1_V1.c	(revision 38461)
+++ trunk/Ohana/src/libdvo/src/dvo_convert_PS1_V1.c	(revision 38462)
@@ -193,5 +193,5 @@
 
   for (i = 0; i < Nvalues; i++) {
-    dvo_secfilt_init (&out[i]);
+    dvo_secfilt_init (&out[i], SECFILT_RESET_ALL);
 
     out[i].M     = in[i].M;      
Index: trunk/Ohana/src/libdvo/src/dvo_convert_PS1_V2.c
===================================================================
--- trunk/Ohana/src/libdvo/src/dvo_convert_PS1_V2.c	(revision 38461)
+++ trunk/Ohana/src/libdvo/src/dvo_convert_PS1_V2.c	(revision 38462)
@@ -202,5 +202,5 @@
 
   for (i = 0; i < Nvalues; i++) {
-    dvo_secfilt_init (&out[i]);
+    dvo_secfilt_init (&out[i], SECFILT_RESET_ALL);
 
     out[i].M     = in[i].M;      
Index: trunk/Ohana/src/libdvo/src/dvo_convert_PS1_V3.c
===================================================================
--- trunk/Ohana/src/libdvo/src/dvo_convert_PS1_V3.c	(revision 38461)
+++ trunk/Ohana/src/libdvo/src/dvo_convert_PS1_V3.c	(revision 38462)
@@ -206,5 +206,5 @@
 
   for (i = 0; i < Nvalues; i++) {
-    dvo_secfilt_init (&out[i]);
+    dvo_secfilt_init (&out[i], SECFILT_RESET_ALL);
 
     out[i].M           = in[i].M;      
Index: trunk/Ohana/src/libdvo/src/dvo_convert_PS1_V4.c
===================================================================
--- trunk/Ohana/src/libdvo/src/dvo_convert_PS1_V4.c	(revision 38461)
+++ trunk/Ohana/src/libdvo/src/dvo_convert_PS1_V4.c	(revision 38462)
@@ -230,5 +230,5 @@
 
   for (i = 0; i < Nvalues; i++) {
-    dvo_secfilt_init (&out[i]);
+    dvo_secfilt_init (&out[i], SECFILT_RESET_ALL);
 
     out[i].M             = in[i].M;      
Index: trunk/Ohana/src/libdvo/src/dvo_convert_PS1_V5.c
===================================================================
--- trunk/Ohana/src/libdvo/src/dvo_convert_PS1_V5.c	(revision 38461)
+++ trunk/Ohana/src/libdvo/src/dvo_convert_PS1_V5.c	(revision 38462)
@@ -299,5 +299,5 @@
 
   for (i = 0; i < Nvalues; i++) {
-    dvo_secfilt_init (&out[i]);
+    dvo_secfilt_init (&out[i], SECFILT_RESET_ALL);
 
     out[i].M             = in[i].M;      
@@ -1423,5 +1423,5 @@
 
   for (i = 0; i < Nvalues; i++) {
-    dvo_secfilt_init (&out[i]);
+    dvo_secfilt_init (&out[i], SECFILT_RESET_ALL);
 
     out[i].M             = in[i].M;      
Index: trunk/Ohana/src/libdvo/src/dvo_convert_elixir.c
===================================================================
--- trunk/Ohana/src/libdvo/src/dvo_convert_elixir.c	(revision 38461)
+++ trunk/Ohana/src/libdvo/src/dvo_convert_elixir.c	(revision 38462)
@@ -103,5 +103,5 @@
   for (i = 0; i < Nvalues; i++) {
     dvo_average_init (&out[i]);
-    dvo_secfilt_init (&primary[0][i]);
+    dvo_secfilt_init (&primary[0][i], SECFILT_RESET_ALL);
 
     out[i].R       	 = in[i].R;      
@@ -167,5 +167,5 @@
 
   for (i = 0; i < Nvalues; i++) {
-    dvo_secfilt_init (&out[i]);
+    dvo_secfilt_init (&out[i], SECFILT_RESET_ALL);
 
     out[i].Mchisq = pow (10.0, 0.01*in[i].Xm);     
Index: trunk/Ohana/src/libdvo/src/dvo_convert_loneos.c
===================================================================
--- trunk/Ohana/src/libdvo/src/dvo_convert_loneos.c	(revision 38461)
+++ trunk/Ohana/src/libdvo/src/dvo_convert_loneos.c	(revision 38462)
@@ -83,5 +83,5 @@
   for (i = 0; i < Nvalues; i++) {
     dvo_average_init (&out[i]);
-    dvo_secfilt_init (&primary[0][i]);
+    dvo_secfilt_init (&primary[0][i], SECFILT_RESET_ALL);
 
     out[i].R       	 = in[i].R;      
@@ -147,5 +147,5 @@
 
   for (i = 0; i < Nvalues; i++) {
-    dvo_secfilt_init (&out[i]);
+    dvo_secfilt_init (&out[i], SECFILT_RESET_ALL);
 
     out[i].Mchisq= pow (10.0, 0.01*in[i].Xm);     
Index: trunk/Ohana/src/libdvo/src/dvo_convert_panstarrs_DEV_0.c
===================================================================
--- trunk/Ohana/src/libdvo/src/dvo_convert_panstarrs_DEV_0.c	(revision 38461)
+++ trunk/Ohana/src/libdvo/src/dvo_convert_panstarrs_DEV_0.c	(revision 38462)
@@ -184,5 +184,5 @@
 
   for (i = 0; i < Nvalues; i++) {
-    dvo_secfilt_init (&out[i]);
+    dvo_secfilt_init (&out[i], SECFILT_RESET_ALL);
 
     out[i].M     = in[i].M;      
Index: trunk/Ohana/src/libdvo/src/dvo_convert_panstarrs_DEV_1.c
===================================================================
--- trunk/Ohana/src/libdvo/src/dvo_convert_panstarrs_DEV_1.c	(revision 38461)
+++ trunk/Ohana/src/libdvo/src/dvo_convert_panstarrs_DEV_1.c	(revision 38462)
@@ -184,5 +184,5 @@
 
   for (i = 0; i < Nvalues; i++) {
-    dvo_secfilt_init (&out[i]);
+    dvo_secfilt_init (&out[i], SECFILT_RESET_ALL);
 
     out[i].M     = in[i].M;      
