Index: /branches/eam_branches/ohana.20170822/src/photdbc/src/make_subcatalog.c
===================================================================
--- /branches/eam_branches/ohana.20170822/src/photdbc/src/make_subcatalog.c	(revision 40256)
+++ /branches/eam_branches/ohana.20170822/src/photdbc/src/make_subcatalog.c	(revision 40257)
@@ -1,3 +1,9 @@
 # include "photdbc.h"
+
+# define SKIP_MEASURE FALSE
+# define SKIP_LENSING FALSE
+# define SKIP_LENSOBJ FALSE
+# define SKIP_STARPAR FALSE
+# define SKIP_GALPHOT FALSE
 
 // copy a catalog to a new subcatalog, applying some filters
@@ -98,5 +104,5 @@
     minSigma = 32;
     Nm = 0;
-    for (j = 0; j < catalog[0].average[i].Nmeasure; j++) {
+    for (j = 0; !SKIP_MEASURE && (j < catalog[0].average[i].Nmeasure); j++) {
 
       offset = catalog[0].average[i].measureOffset + j;
@@ -164,4 +170,5 @@
       }
     }
+    // End of average[i] loop
 
     // exclude faint objects
@@ -189,5 +196,5 @@
     Nm = 0;
     subcatalog[0].average[Naverage].lensingOffset = Nlensing;
-    for (j = 0; j < catalog[0].average[i].Nlensing; j++) {
+    for (j = 0; !SKIP_LENSING && (j < catalog[0].average[i].Nlensing); j++) {
 
       offset = catalog[0].average[i].lensingOffset + j;
@@ -208,5 +215,5 @@
     Nm = 0;
     subcatalog[0].average[Naverage].lensobjOffset = Nlensobj;
-    for (j = 0; j < catalog[0].average[i].Nlensobj; j++) {
+    for (j = 0; !SKIP_LENSOBJ && (j < catalog[0].average[i].Nlensobj); j++) {
 
       offset = catalog[0].average[i].lensobjOffset + j;
@@ -226,5 +233,5 @@
     Nm = 0;
     subcatalog[0].average[Naverage].starparOffset = Nstarpar;
-    for (j = 0; j < catalog[0].average[i].Nstarpar; j++) {
+    for (j = 0; !SKIP_STARPAR && (j < catalog[0].average[i].Nstarpar); j++) {
 
       offset = catalog[0].average[i].starparOffset + j;
@@ -245,5 +252,5 @@
     Nm = 0;
     subcatalog[0].average[Naverage].galphotOffset = Ngalphot;
-    for (j = 0; j < catalog[0].average[i].Ngalphot; j++) {
+    for (j = 0; !SKIP_GALPHOT && (j < catalog[0].average[i].Ngalphot); j++) {
 
       offset = catalog[0].average[i].galphotOffset + j;
