Index: /branches/eam_branches/ipp-20111122/Ohana/src/uniphot/src/initialize_setphot.c
===================================================================
--- /branches/eam_branches/ipp-20111122/Ohana/src/uniphot/src/initialize_setphot.c	(revision 33361)
+++ /branches/eam_branches/ipp-20111122/Ohana/src/uniphot/src/initialize_setphot.c	(revision 33362)
@@ -1,3 +1,6 @@
 # include "setphot.h"
+
+static char *ZPT_OFFSETS_FILTERS = NULL;
+static char *ZPT_OFFSETS_VALUES = NULL;
 
 void initialize_setphot (int argc, char **argv) {
@@ -22,4 +25,7 @@
     exit (1);
   }
+
+  // if we have a zpt offset list, parse it here
+  parse_zpt_offsets (ZPT_OFFSETS_FILTERS, ZPT_OFFSETS_VALUES);
 }
 
@@ -86,6 +92,4 @@
   // -zpt-offsets code[,code,etc] value[,value,etc]
   // eg: -zpt-offsets g,r,i 0.01,0.02,-0.02
-  char *ZPT_OFFSETS_FILTERS = NULL;
-  char *ZPT_OFFSETS_VALUES = NULL;
   if ((N = get_argument (argc, argv, "-zpt-offsets"))) {
     remove_argument (N, &argc, argv);
@@ -94,6 +98,4 @@
     ZPT_OFFSETS_VALUES = strcreate (argv[N]);
     remove_argument (N, &argc, argv);
-    
-    parse_zpt_offsets (ZPT_OFFSETS_FILTERS, ZPT_OFFSETS_VALUES);
   }
   
Index: /branches/eam_branches/ipp-20111122/Ohana/src/uniphot/src/load_zpt_table.c
===================================================================
--- /branches/eam_branches/ipp-20111122/Ohana/src/uniphot/src/load_zpt_table.c	(revision 33361)
+++ /branches/eam_branches/ipp-20111122/Ohana/src/uniphot/src/load_zpt_table.c	(revision 33362)
@@ -358,4 +358,5 @@
 int parse_zpt_offsets (char *ZPT_OFFSET_FILTERS, char *ZPT_OFFSET_VALUES) {
 
+  if (!ZPT_OFFSET_FILTERS) return TRUE;
   assert (ZPT_OFFSET_FILTERS);
   assert (ZPT_OFFSET_VALUES);
