Index: /branches/eam_branches/ohana.20160226/src/relastro/src/relastro_images.c
===================================================================
--- /branches/eam_branches/ohana.20160226/src/relastro/src/relastro_images.c	(revision 39440)
+++ /branches/eam_branches/ohana.20160226/src/relastro/src/relastro_images.c	(revision 39441)
@@ -12,4 +12,8 @@
   set_db (&db);
   gfits_db_init (&db);
+
+  // final pass fit mode (use FIT_AVERAGE only for the image loop)
+  int finalPassMode = FIT_MODE; // start with the globally-defined fit mode
+  FIT_MODE = FIT_AVERAGE;
 
   /* lock and load the image db table */
@@ -142,7 +146,9 @@
 
   // if we do NOT have parallel partitions, we must NOT write them out yet: the act of
-  // writing out the files byte-swaps the data and makes the values invalide for the
+  // writing out the files byte-swaps the data and makes the values invalid for the
   // following calls to UpdateObjectOffsets (which attempt to apply the image values from
   // the structure in memory)
+
+  FIT_MODE = finalPassMode; // use the user-selected mode for the final pass
 
   // iterate over catalogs to make detection coordinates consistant
