Index: /branches/eam_branches/ipp-20140423/Ohana/src/relastro/include/relastro.h
===================================================================
--- /branches/eam_branches/ipp-20140423/Ohana/src/relastro/include/relastro.h	(revision 36745)
+++ /branches/eam_branches/ipp-20140423/Ohana/src/relastro/include/relastro.h	(revision 36746)
@@ -207,7 +207,7 @@
 double MaxDensityValue;
 
-char          *PHOTCODE_KEEP_LIST, *PHOTCODE_SKIP_LIST;
-int           NphotcodesKeep,      NphotcodesSkip;
-PhotCode     **photcodesKeep,     **photcodesSkip;
+char          *PHOTCODE_KEEP_LIST, *PHOTCODE_SKIP_LIST, *PHOTCODE_RESET_LIST;
+int           NphotcodesKeep,      NphotcodesSkip,      NphotcodesReset;
+PhotCode     **photcodesKeep,     **photcodesSkip,     **photcodesReset;
 
 char          *PHOTCODE_A_LIST,  *PHOTCODE_B_LIST;
Index: /branches/eam_branches/ipp-20140423/Ohana/src/relastro/src/args.c
===================================================================
--- /branches/eam_branches/ipp-20140423/Ohana/src/relastro/src/args.c	(revision 36745)
+++ /branches/eam_branches/ipp-20140423/Ohana/src/relastro/src/args.c	(revision 36746)
@@ -284,4 +284,11 @@
   }
 
+  PHOTCODE_RESET_LIST = NULL;
+  if ((N = get_argument (argc, argv, "-reset-to-photcode"))) {
+    remove_argument (N, &argc, argv);
+    PHOTCODE_RESET_LIST = strcreate(argv[N]);
+    remove_argument (N, &argc, argv);
+  }
+
   PHOTCODE_KEEP_LIST = NULL;
   if ((N = get_argument (argc, argv, "+photcode"))) {
@@ -655,4 +662,11 @@
     remove_argument (N, &argc, argv);
     TimeSelect = TRUE;
+  }
+
+  PHOTCODE_RESET_LIST = NULL;
+  if ((N = get_argument (argc, argv, "-reset-to-photcode"))) {
+    remove_argument (N, &argc, argv);
+    PHOTCODE_RESET_LIST = strcreate(argv[N]);
+    remove_argument (N, &argc, argv);
   }
 
Index: /branches/eam_branches/ipp-20140423/Ohana/src/relastro/src/initialize.c
===================================================================
--- /branches/eam_branches/ipp-20140423/Ohana/src/relastro/src/initialize.c	(revision 36745)
+++ /branches/eam_branches/ipp-20140423/Ohana/src/relastro/src/initialize.c	(revision 36746)
@@ -8,13 +8,15 @@
   if (RELASTRO_OP == OP_MERGE_SOURCE) return;
 
-  fprintf (stderr, "PHOTCODE_KEEP_LIST: %s\n", PHOTCODE_KEEP_LIST);
-  fprintf (stderr, "PHOTCODE_SKIP_LIST: %s\n", PHOTCODE_SKIP_LIST);
-  fprintf (stderr, "PHOTCODE_A_LIST: %s\n", PHOTCODE_A_LIST);
-  fprintf (stderr, "PHOTCODE_B_LIST: %s\n", PHOTCODE_B_LIST);
+  if (PHOTCODE_KEEP_LIST)  fprintf (stderr, "PHOTCODE_KEEP_LIST:  %s\n", PHOTCODE_KEEP_LIST);
+  if (PHOTCODE_SKIP_LIST)  fprintf (stderr, "PHOTCODE_SKIP_LIST:  %s\n", PHOTCODE_SKIP_LIST);
+  if (PHOTCODE_RESET_LIST) fprintf (stderr, "PHOTCODE_RESET_LIST: %s\n", PHOTCODE_RESET_LIST);
+  if (PHOTCODE_A_LIST)     fprintf (stderr, "PHOTCODE_A_LIST: 	  %s\n", PHOTCODE_A_LIST);
+  if (PHOTCODE_B_LIST)     fprintf (stderr, "PHOTCODE_B_LIST: 	  %s\n", PHOTCODE_B_LIST);
 
-  photcodesKeep = ParsePhotcodeList (PHOTCODE_KEEP_LIST, &NphotcodesKeep, FALSE);
-  photcodesSkip = ParsePhotcodeList (PHOTCODE_SKIP_LIST, &NphotcodesSkip, FALSE);
-  photcodesGroupA = ParsePhotcodeList (PHOTCODE_A_LIST, &NphotcodesGroupA, TRUE);
-  photcodesGroupB = ParsePhotcodeList (PHOTCODE_B_LIST, &NphotcodesGroupB, TRUE);
+  photcodesKeep   = ParsePhotcodeList (PHOTCODE_KEEP_LIST,  &NphotcodesKeep,   FALSE);
+  photcodesSkip   = ParsePhotcodeList (PHOTCODE_SKIP_LIST,  &NphotcodesSkip,   FALSE);
+  photcodesReset  = ParsePhotcodeList (PHOTCODE_RESET_LIST, &NphotcodesReset,  FALSE);
+  photcodesGroupA = ParsePhotcodeList (PHOTCODE_A_LIST,     &NphotcodesGroupA, TRUE);
+  photcodesGroupB = ParsePhotcodeList (PHOTCODE_B_LIST,     &NphotcodesGroupB, TRUE);
 
   initstats (STATMODE);
@@ -42,13 +44,15 @@
   args_client (argc, argv);
 
-  fprintf (stderr, "PHOTCODE_KEEP_LIST: %s\n", PHOTCODE_KEEP_LIST);
-  fprintf (stderr, "PHOTCODE_SKIP_LIST: %s\n", PHOTCODE_SKIP_LIST);
-  fprintf (stderr, "PHOTCODE_A_LIST: %s\n", PHOTCODE_A_LIST);
-  fprintf (stderr, "PHOTCODE_B_LIST: %s\n", PHOTCODE_B_LIST);
+  if (PHOTCODE_KEEP_LIST)  fprintf (stderr, "PHOTCODE_KEEP_LIST:  %s\n", PHOTCODE_KEEP_LIST);
+  if (PHOTCODE_SKIP_LIST)  fprintf (stderr, "PHOTCODE_SKIP_LIST:  %s\n", PHOTCODE_SKIP_LIST);
+  if (PHOTCODE_RESET_LIST) fprintf (stderr, "PHOTCODE_RESET_LIST: %s\n", PHOTCODE_RESET_LIST);
+  if (PHOTCODE_A_LIST)     fprintf (stderr, "PHOTCODE_A_LIST:     %s\n", PHOTCODE_A_LIST);
+  if (PHOTCODE_B_LIST)     fprintf (stderr, "PHOTCODE_B_LIST:     %s\n", PHOTCODE_B_LIST);
 
-  photcodesKeep = ParsePhotcodeList (PHOTCODE_KEEP_LIST, &NphotcodesKeep, FALSE);
-  photcodesSkip = ParsePhotcodeList (PHOTCODE_SKIP_LIST, &NphotcodesSkip, FALSE);
-  photcodesGroupA = ParsePhotcodeList (PHOTCODE_A_LIST, &NphotcodesGroupA, TRUE);
-  photcodesGroupB = ParsePhotcodeList (PHOTCODE_B_LIST, &NphotcodesGroupB, TRUE);
+  photcodesKeep   = ParsePhotcodeList (PHOTCODE_KEEP_LIST,  &NphotcodesKeep,   FALSE);
+  photcodesSkip   = ParsePhotcodeList (PHOTCODE_SKIP_LIST,  &NphotcodesSkip,   FALSE);
+  photcodesReset  = ParsePhotcodeList (PHOTCODE_RESET_LIST, &NphotcodesReset,  FALSE);
+  photcodesGroupA = ParsePhotcodeList (PHOTCODE_A_LIST,     &NphotcodesGroupA, TRUE);
+  photcodesGroupB = ParsePhotcodeList (PHOTCODE_B_LIST,     &NphotcodesGroupB, TRUE);
 
   initstats (STATMODE);
Index: /branches/eam_branches/ipp-20140423/Ohana/src/relastro/src/relastro_images.c
===================================================================
--- /branches/eam_branches/ipp-20140423/Ohana/src/relastro/src/relastro_images.c	(revision 36745)
+++ /branches/eam_branches/ipp-20140423/Ohana/src/relastro/src/relastro_images.c	(revision 36746)
@@ -28,6 +28,12 @@
   // XXX pass in the image table
   // XXX who carries the image grid?
+
+  // photcodesKeep is used here to allow measurements from the images being calibrated
+  // note if -reset-to-photcode is selected, photocodesKeep is replaced with below with photcodesReset
   catalog = load_catalogs (skylist, &Ncatalog, TRUE, 0, NULL);
   MARKTIME("load catalog data: %f sec\n", dtime);
+
+   photcodesKeep =  photcodesReset;
+  NphotcodesKeep = NphotcodesReset;
 
   if (Ncatalog == 0) {
@@ -50,4 +56,6 @@
   // set test points based on the starmap
   createStarMap (catalog, Ncatalog);
+
+  // XXX NOTE : for 2mass reset, photcodesKeep should now limit to 2MASS measurements
 
   /* major modes */
