Index: trunk/ppImage/src/ppImageParseCamera.c
===================================================================
--- trunk/ppImage/src/ppImageParseCamera.c	(revision 41894)
+++ trunk/ppImage/src/ppImageParseCamera.c	(revision 42340)
@@ -104,10 +104,21 @@
 
     if (options->doNonLin) {
-      if (!ppImageDefineFile(config, input->fpa, "PPIMAGE.LINEARITY", "LINEARITY",
-			     PM_FPA_FILE_LINEARITY, PM_DETREND_TYPE_LINEARITY)) {
-	psError(PS_ERR_IO, false, "Can't find a non-linearity correction source");
-	psFree(options);
-	return NULL;
-      }
+	if (!ppImageDefineFile(config, input->fpa, "PPIMAGE.LINEARITY", "LINEARITY",
+			       PM_FPA_FILE_LINEARITY, PM_DETREND_TYPE_LINEARITY)) {
+	    psError(PS_ERR_IO, false, "Can't find a non-linearity correction source");
+	    psFree(options);
+	    return NULL;
+	}
+    }
+    if (options->doNewNonLin) {
+	// if the file has been specified on the command-line (-newnonlin file), then the file
+	// is identified by the NEWNONLIN entry in config->arguments.  otherwise, load from the
+	// detrend system as type NEWNONLIN
+	if (!ppImageDefineFile(config, input->fpa, "PPIMAGE.NEWNONLIN", "NEWNONLIN",
+			       PM_FPA_FILE_NEWNONLIN, PM_DETREND_TYPE_NEWNONLIN)) {
+	    psError(PS_ERR_IO, false, "Can't find a new non-linearity correction source");
+	    psFree(options);
+	    return NULL;
+	}
     }
 
