Index: trunk/Ohana/src/uniphot/include/uniphot.h
===================================================================
--- trunk/Ohana/src/uniphot/include/uniphot.h	(revision 28716)
+++ trunk/Ohana/src/uniphot/include/uniphot.h	(revision 28717)
@@ -41,4 +41,5 @@
 typedef struct {
     float zpt;
+    float zpt_err;
     e_time time;
     int found;
Index: trunk/Ohana/src/uniphot/src/load_zpt_table.c
===================================================================
--- trunk/Ohana/src/uniphot/src/load_zpt_table.c	(revision 28716)
+++ trunk/Ohana/src/uniphot/src/load_zpt_table.c	(revision 28717)
@@ -5,5 +5,5 @@
   int Nzpts, NZPTS;
   ZptTable *zpts;
-  double zpt, mjd;
+  double zpt, mjd, zpt_err;
 
   FILE *f;
@@ -19,8 +19,9 @@
   ALLOCATE (zpts, ZptTable, NZPTS);
 
-  // format is fixed: (time) (zpt)
+  // format is fixed: (time) (zpt) (zpt_err)
   int status;
-  while ((status = fscanf (f, "%lf %lf", &mjd, &zpt)) == 2) {
+  while ((status = fscanf (f, "%lf %lf %lf", &mjd, &zpt, &zpt_err)) == 3) {
     zpts[Nzpts].zpt = zpt;
+    zpts[Nzpts].zpt_err = zpt_err;
     zpts[Nzpts].time = ohana_mjd_to_sec (mjd);
     zpts[Nzpts].found = FALSE;
Index: trunk/Ohana/src/uniphot/src/match_zpts_to_images.c
===================================================================
--- trunk/Ohana/src/uniphot/src/match_zpts_to_images.c	(revision 28716)
+++ trunk/Ohana/src/uniphot/src/match_zpts_to_images.c	(revision 28717)
@@ -70,4 +70,5 @@
     // we have a match: set zpt and record the match
     image[Ni].Mcal = SCALE*code[0].C - zpts[Nz].zpt;
+    image[Ni].dMcal = zpts[Nz].zpt_err;
     image[Ni].flags &= ~ID_IMAGE_NOCAL; // clear the NOCAL flag
     zpts[Nz].found = TRUE;
Index: trunk/Ohana/src/uniphot/src/update_catalog_setphot.c
===================================================================
--- trunk/Ohana/src/uniphot/src/update_catalog_setphot.c	(revision 28716)
+++ trunk/Ohana/src/uniphot/src/update_catalog_setphot.c	(revision 28717)
@@ -74,5 +74,5 @@
 
   off_t i, j, m, id, idx, found;
-  float Mcal;
+  float Mcal, dMcal;
 
   found = 0;    
@@ -86,6 +86,8 @@
       id = index[idx];
       Mcal = image[id].Mcal;
+      dMcal = image[id].dMcal;
 
-      catalog[0].measure[m].Mcal = image[id].Mcal;
+      catalog[0].measure[m].Mcal = Mcal;
+      catalog[0].measure[m].dMcal = dMcal;
       found ++;
     }
