Index: trunk/ippScripts/scripts/phase3.pl
===================================================================
--- trunk/ippScripts/scripts/phase3.pl	(revision 11355)
+++ trunk/ippScripts/scripts/phase3.pl	(revision 11394)
@@ -118,5 +118,5 @@
     $workdir = $ipprc->convert_filename_absolute( $workdir );
 } else {
-    my $example = ${$files}[0]->{b1_uri}; # Example filename
+    my $example = ${$files}[0]->{b1_uri}; # Example original root name
     my ($vol, $dir, $file) = File::Spec->splitpath( $example );
     $workdir = $dir;
@@ -137,10 +137,10 @@
     # use the b1_uri as OUTPUT root and convert the filenames
     # with ipprc->filename:
-    my $classID = $file->{class_id};
-    my $fileRoot = $file->{b1_uri};
-    print $list1File $ipprc->filename("PPIMAGE.BIN1", $file->{b1_uri}, $classID);
-    print $list2File $ipprc->filename("PPIMAGE.BIN2", $file->{b1_uri}, $classID);
-    print $list1File $ipprc->filename("PSPHOT.OUTPUT", $file->{b1_uri}, $classID);
-    print $list1File $ipprc->filename("PSASTRO.OUTPUT", $file->{b1_uri}, $classID);
+    my $class_id = $file->{class_id};
+    my $origRoot = $ipprc->convert_filename_absolute( $file->{b1_uri} ); # Original root name
+    print $list1File $ipprc->filename("PPIMAGE.BIN1", $origRoot, $class_id);
+    print $list2File $ipprc->filename("PPIMAGE.BIN2", $origRoot, $class_id);
+    print $list1File $ipprc->filename("PSPHOT.OUTPUT", $origRoot, $class_id);
+    print $list1File $ipprc->filename("PSASTRO.OUTPUT", $origRoot, $class_id);
     # XXX PSASTRO.OUTPUT is explicitly a CHIP output file 
     # XXX below the PSASTRO.OUTPUT must be an FPA output file
@@ -196,5 +196,5 @@
 unless ($no_update) {
     my $command = "$p3tool -addprocessedexp -exp_tag $exp_tag -uri UNKNOWN " .
-	"-recip " . RECIPE1() . "," . RECIPE2() . " -b1_uri $jpeg1 -b2_uri $jpeg2 " .
+	"-recip " . RECIPE1() . "," . RECIPE2() . " -b1_uri $outputRoot " .
 	"-bg $bg -bg_stdev $bg_stdev -bg_mean_stdev $bg_mean_stdev " .
 	"-sigma_ra 0.0 -sigma_dec 0.0 -nastro 0 -zp_mean 0.0 -zp_stdev 0.0"; # Command to run
