Index: trunk/ippScripts/scripts/addstar_multi_run.pl
===================================================================
--- trunk/ippScripts/scripts/addstar_multi_run.pl	(revision 39154)
+++ trunk/ippScripts/scripts/addstar_multi_run.pl	(revision 39155)
@@ -39,5 +39,5 @@
 my $minidvodb_path;
 
-my ( $label,$camera, $stage, $stage_id, $outroot, $stageroot, $dbname, $reduction, $dvodb, $minidvodb, $minidvodb_name, $minidvodb_group, $image_only, $verbose, $no_update,
+my ( $label,$camera, $stage, $stage_id, $use_diff_inv, $outroot, $stageroot, $dbname, $reduction, $dvodb, $minidvodb, $minidvodb_name, $minidvodb_group, $image_only, $verbose, $no_update,
      $no_op, $redirect, $save_temps);
 GetOptions(
@@ -46,4 +46,5 @@
     'stage|s=s'        => \$stage, # Camera
     'stage_id|w=s'   => \$stage_id,
+    'use_diff_inv'   => \$use_diff_inv, #use inv images for diff cmf? 
     'dbname|d=s'        => \$dbname, # Database name
     'outroot|w=s'       => \$outroot, # output file base name
@@ -149,5 +150,13 @@
 	    }
 	    printf TEMPLIST "$realFile = $fpaObjects\n";
-	    }
+	    if ($stage == 'diff' && $use_diff_inv) {
+		my $fpaObjectsInv = $mparsed.'.inv.cmf';
+		my $realFileInv = $ipprc->file_resolve($fpaObjectsInv);
+		if (!defined($realFileInv)) {
+		    &my_die("unable to resolve real file from $mparsed",$stage_id, $stage, $label, 7);
+		}
+		printf TEMPLIST "$realFileInv = $fpaObjectsInv\n";
+     	    }
+
     }
 
@@ -238,5 +247,9 @@
 	    if ($stage =~ /diff/) {
 		$command .= " -accept-astrom";
+		if ($use_diff_inv) {
+		    $command .= " -diff-inv";
+		}
 	    }
+	    
 	    if ($stage =~ /fullforce/) {
 		$command .= " -accept-astrom -xrad"; 
