Index: trunk/ppImage/src/ppImageParseCamera.c
===================================================================
--- trunk/ppImage/src/ppImageParseCamera.c	(revision 36169)
+++ trunk/ppImage/src/ppImageParseCamera.c	(revision 41894)
@@ -117,4 +117,5 @@
         pmDetrendSetThreadTasks(nScanRows);
     }
+    ppImageSetThreads (); // even if threading is off, we need to identify the ppImageDetrendPattern thread function
 
     if (options->doPatternRow || options->doPatternCell) {
@@ -180,4 +181,16 @@
             psError (PS_ERR_IO, false, "Can't find a fringe image source");
             return NULL;
+        }
+    }
+
+    if (options->doPatternRow) {
+        if (!ppImageDefineFile(config, input->fpa, "PPIMAGE.PATTERN.ROW.AMP", "PATTERN.ROW.AMP",
+			       PM_FPA_FILE_PATTERN_ROW_AMP, PM_DETREND_TYPE_PATTERN_ROW_AMP)) {
+            psWarning ("Can't find a pattern row amplitude source, will apply to all cells or defined subset");
+	    // an empty or invalid file may have been generated -- we want to skip, not raise an error
+	    pmFPAfile *PRAfile = psMetadataLookupPtr (NULL, config->files, "PPIMAGE.PATTERN.ROW.AMP");
+	    if (PRAfile) {
+	      PRAfile->state |= PM_FPA_STATE_INACTIVE;
+	    }
         }
     }
