Index: trunk/psModules/src/detrend/pmDetrendDB.c
===================================================================
--- trunk/psModules/src/detrend/pmDetrendDB.c	(revision 11106)
+++ trunk/psModules/src/detrend/pmDetrendDB.c	(revision 11108)
@@ -101,16 +101,10 @@
     unsigned int nFail;
 
+    // XXXXX ***** MAJOR HACK ***** Josh dropped INST from detrun, so I am using 'object' for
+    // now in dettool ('object' is not relevant to detrun!!!)
+
     pmDetrendSelectResults *results = pmDetrendSelectResultsAlloc();
-
-    // generate the detselect command
-    // psStringAppend (&line, "detselect -inst %s -time %s -det_type %s", options->camera, time, type);
-    // XXX we need to put in the filter and other restrictions based on the recipe
-    // detselect -search -simple returns: DET_ID ITERATION CLASS TYPE
-    // XXXXX ***** MAJOR HACK ***** Josh dropped INST from detrun, so I am using 'object' for
-    // now ('object' is not relevant to detrun!!!)
-    // XXX this operation is not applying the time-based selections yet.
-    psStringAppend (&line, "detselect -search -inst %s -det_type %s", options->camera, type);
-
-    // psStringAppend (&line, "detselect -search -simple -object %s -det_type %s", options->camera, type);
+    psStringAppend (&line, "detselect -search -inst %s -det_type %s -time %s", options->camera, type, time);
+
     if (options->filter) {
         psStringAppend (&line, " -filter %s", options->filter);
