Index: trunk/ppImage/src/ppImageParseCamera.c
===================================================================
--- trunk/ppImage/src/ppImageParseCamera.c	(revision 18556)
+++ trunk/ppImage/src/ppImageParseCamera.c	(revision 18896)
@@ -112,4 +112,10 @@
     }
 
+    int nThreads = psMetadataLookupS32 (&status, config->arguments, "NTHREADS");
+    if (nThreads > 0) {
+	int nScanRows = psMetadataLookupS32 (&status, recipe, "SCAN.ROWS");
+	pmDetrendSetThreadTasks (nScanRows);
+    }
+
     // fringe frame are only applied for a subset of the filters.
     // if the filter is one of those identified by a FRINGE.FILTERS metadata entry
