Index: branches/eam_branches/ppImage.20230123/src/ppImageParseCamera.c
===================================================================
--- branches/eam_branches/ppImage.20230123/src/ppImageParseCamera.c	(revision 42321)
+++ branches/eam_branches/ppImage.20230123/src/ppImageParseCamera.c	(revision 42328)
@@ -104,19 +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 (options->doNonLinNew) {
-      if (!ppImageDefineFile(config, input->fpa, "PPIMAGE.NONLIN_NEW", "NONLIN_NEW",
-			     PM_FPA_FILE_NONLIN_NEW, PM_DETREND_TYPE_NONLIN_NEW)) {
-	psError(PS_ERR_IO, false, "Can't find a new 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;
+	}
     }
 
