Index: /trunk/Ohana/src/dvopsps/src/DetectionOps.c
===================================================================
--- /trunk/Ohana/src/dvopsps/src/DetectionOps.c	(revision 39546)
+++ /trunk/Ohana/src/dvopsps/src/DetectionOps.c	(revision 39547)
@@ -57,4 +57,5 @@
   GET_COLUMN(decErr      , "decErr",      float);
   GET_COLUMN(zp          , "zp",          float);
+  GET_COLUMN(zpFactor    , "zpFactor",    float);
   GET_COLUMN(telluricExt , "telluricExt", float);
   GET_COLUMN(airmass     , "airmass",     float);
@@ -67,4 +68,5 @@
   GET_COLUMN(dMap        , "dMap",        float);
   GET_COLUMN(flags       , "flags",       int);
+  GET_COLUMN(objflags    , "objflags",    int);
   gfits_free_header (&theader);
   gfits_free_table  (&ftable);
@@ -83,4 +85,5 @@
     detections[i].decErr       = decErr[i];     
     detections[i].zp           = zp[i];         
+    detections[i].zpFactor     = zpFactor[i];         
     detections[i].telluricExt  = telluricExt[i];      
     detections[i].airmass      = airmass[i];    
@@ -93,4 +96,5 @@
     detections[i].dMap         = dMap[i];    
     detections[i].flags        = flags[i];      
+    detections[i].objflags     = objflags[i];      
   }
   fprintf (stderr, "loaded data for %lld detections\n", (long long) Nrow);
@@ -107,4 +111,5 @@
   free (decErr     );
   free (zp         );
+  free (zpFactor   );
   free (telluricExt);
   free (airmass    );
@@ -117,4 +122,5 @@
   free (dMap       );
   free (flags      );
+  free (objflags   );
 
   gfits_free_header (&header);
@@ -175,4 +181,5 @@
   gfits_define_bintable_column (&theader, "E", "decErr",      NULL, NULL, 1.0, 0.0);
   gfits_define_bintable_column (&theader, "E", "zp",          NULL, NULL, 1.0, 0.0);
+  gfits_define_bintable_column (&theader, "E", "zpFactor",    NULL, NULL, 1.0, 0.0);
   gfits_define_bintable_column (&theader, "E", "telluricExt", NULL, NULL, 1.0, 0.0);
   gfits_define_bintable_column (&theader, "E", "airmass",     NULL, NULL, 1.0, 0.0);
@@ -185,4 +192,5 @@
   gfits_define_bintable_column (&theader, "E", "dMap",        NULL, NULL, 1.0, 0.0);
   gfits_define_bintable_column (&theader, "J", "flags",       NULL, NULL, 1.0, FT_BZERO_INT32);
+  gfits_define_bintable_column (&theader, "J", "objflags",    NULL, NULL, 1.0, FT_BZERO_INT32);
 
   // generate the output array that carries the data
@@ -201,4 +209,5 @@
   float      *decErr      ; ALLOCATE (decErr      ,  float,    Ndetections);
   float      *zp          ; ALLOCATE (zp          ,  float,    Ndetections);
+  float      *zpFactor    ; ALLOCATE (zpFactor    ,  float,    Ndetections);
   float      *telluricExt ; ALLOCATE (telluricExt ,  float,    Ndetections);
   float      *airmass     ; ALLOCATE (airmass     ,  float,    Ndetections);
@@ -211,4 +220,5 @@
   float      *dMap        ; ALLOCATE (dMap        ,  float,    Ndetections);
   uint32_t   *flags       ; ALLOCATE (flags       ,  uint32_t, Ndetections);
+  uint32_t   *objflags    ; ALLOCATE (objflags    ,  uint32_t, Ndetections);
 
   // assign the storage arrays
@@ -225,4 +235,5 @@
     decErr[i]      = detections[i].decErr      ;
     zp[i]          = detections[i].zp          ;
+    zpFactor[i]    = detections[i].zpFactor    ;
     telluricExt[i] = detections[i].telluricExt ;
     airmass[i]     = detections[i].airmass     ;
@@ -235,4 +246,5 @@
     dMap[i]        = detections[i].dMap        ;
     flags[i]       = detections[i].flags       ;
+    objflags[i]    = detections[i].objflags    ;
   }
 
@@ -249,4 +261,5 @@
   gfits_set_bintable_column (&theader, &ftable, "decErr",      decErr      , Ndetections);
   gfits_set_bintable_column (&theader, &ftable, "zp",          zp          , Ndetections);
+  gfits_set_bintable_column (&theader, &ftable, "zpFactor",    zpFactor    , Ndetections);
   gfits_set_bintable_column (&theader, &ftable, "telluricExt", telluricExt , Ndetections);
   gfits_set_bintable_column (&theader, &ftable, "airmass",     airmass     , Ndetections);
@@ -259,4 +272,5 @@
   gfits_set_bintable_column (&theader, &ftable, "dMap",        dMap        , Ndetections);
   gfits_set_bintable_column (&theader, &ftable, "flags",       flags       , Ndetections);
+  gfits_set_bintable_column (&theader, &ftable, "objflags",    objflags    , Ndetections);
 
   free (objID       );
@@ -271,4 +285,5 @@
   free (decErr      );
   free (zp          );
+  free (zpFactor    );
   free (telluricExt );
   free (airmass     );
@@ -281,4 +296,5 @@
   free (dMap        );
   free (flags       );
+  free (objflags    );
 
   gfits_fwrite_Theader (f, &theader);
