Index: trunk/ippScripts/scripts/camera_exp.pl
===================================================================
--- trunk/ippScripts/scripts/camera_exp.pl	(revision 12073)
+++ trunk/ippScripts/scripts/camera_exp.pl	(revision 12079)
@@ -125,5 +125,5 @@
     $workdir = $ipprc->convert_filename_absolute( $workdir );
 } else {
-    my $example = ${$files}[0]->{b1_uri}; # Example original root name
+    my $example = ${$files}[0]->{path_base}; # Example original root name
     my ($vol, $dir, $file) = File::Spec->splitpath( $ipprc->convert_filename_absolute( $example ) );
     $workdir = $dir;
@@ -151,8 +151,7 @@
 my $chipObjects; 
 foreach my $file (@$files) {
-    # use the b1_uri as OUTPUT root and convert the filenames
-    # with ipprc->filename:
+    # use the path_base as OUTPUT root and convert the filenames with ipprc->filename:
     my $class_id = $file->{class_id};
-    my $origRoot = $ipprc->convert_filename_absolute( $file->{b1_uri} ); # Original root name
+    my $origRoot = $ipprc->convert_filename_absolute( $file->{path_base} ); # Original root name
 
     # if there is only one chip, we use this name for the input to addstar
@@ -230,11 +229,9 @@
 # XXX keep the same outroot as the input
 # Add the result into the database
-$outputRoot = $ipprc->convert_filename_relative($outputRoot);
-$jpeg1  = $ipprc->convert_filename_relative($jpeg1);
-$jpeg2  = $ipprc->convert_filename_relative($jpeg2);
+$outputRoot = $ipprc->convert_filename_relative( $outputRoot );
 
 unless ($no_update) {
     my $command = "$camtool -addprocessedexp -exp_tag $exp_tag -uri UNKNOWN " .
-	"-recip " . RECIPE1() . "," . RECIPE2() . " -b1_uri $outputRoot " .
+	"-recip " . RECIPE1() . "," . RECIPE2() . " -path_base $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
Index: trunk/ippScripts/scripts/chip_imfile.pl
===================================================================
--- trunk/ippScripts/scripts/chip_imfile.pl	(revision 12073)
+++ trunk/ippScripts/scripts/chip_imfile.pl	(revision 12079)
@@ -140,5 +140,5 @@
     $command .= " -recip " . RECIPE;
     $command .= " -uri $outputImage";
-    $command .= " -b1_uri $outputRoot";
+    $command .= " -path_base $outputRoot";
     $command .= " -bg $bg -bg_stdev $bg_stdev -bg_mean_stdev $bg_mean_stdev";
     $command .= " -dbname $dbname" if defined $dbname;
Index: trunk/ippScripts/scripts/detrend_norm_apply.pl
===================================================================
--- trunk/ippScripts/scripts/detrend_norm_apply.pl	(revision 12073)
+++ trunk/ippScripts/scripts/detrend_norm_apply.pl	(revision 12079)
@@ -130,6 +130,5 @@
 # Update the database
 $output = $ipprc->convert_filename_relative( $output );
-$b1name = $ipprc->convert_filename_relative( $b1name );
-$b2name = $ipprc->convert_filename_relative( $b2name );
+$outputRoot = $ipprc->convert_filename_relative( $outputRoot );
 
 my $bg = ($stats->bg_mean() or 'NAN');
@@ -139,5 +138,5 @@
 unless ($no_update) {
     my $command = "$dettool -addnormalizedimfile -det_id $det_id -iteration $iter -class_id $class_id ".
-	"-uri $output -b1_uri $outputRoot"; # Command to run
+	"-uri $output -path_base $outputRoot"; # Command to run
     $command .= " -bg $bg -bg_stdev $bg_stdev -bg_mean_stdev $bg_mean_stdev";
     $command .= " -dbname $dbname" if defined $dbname;
Index: trunk/ippScripts/scripts/detrend_norm_exp.pl
===================================================================
--- trunk/ippScripts/scripts/detrend_norm_exp.pl	(revision 12073)
+++ trunk/ippScripts/scripts/detrend_norm_exp.pl	(revision 12079)
@@ -118,5 +118,5 @@
     $workdir = $ipprc->convert_filename_absolute( $workdir );
 } else {
-    my $example = ${$files}[0]->{b1_uri}; # Example file, for path
+    my $example = ${$files}[0]->{path_base}; # Example file, for path
     my ($vol, $dir, $file) = File::Spec->splitpath( $example );
     $workdir = $dir;
@@ -135,5 +135,5 @@
 open my $list2File, '>' . $list2Name;
 foreach my $file (@$files) {
-    my $origRoot = $ipprc->convert_filename_absolute( $file->{b1_uri} ); # Original root name
+    my $origRoot = $ipprc->convert_filename_absolute( $file->{path_base} ); # Original root name
     print $list1File ( $ipprc->filename( "PPIMAGE.BIN1", $origRoot, $file->{class_id} ) . "\n");
     print $list2File ( $ipprc->filename( "PPIMAGE.BIN2", $origRoot, $file->{class_id} ) . "\n");
@@ -167,9 +167,9 @@
 
 # Add the result into the database
-$jpeg1Name = $ipprc->convert_filename_relative( $jpeg1Name );
-$jpeg2Name = $ipprc->convert_filename_relative( $jpeg2Name );
+$outputRoot = $ipprc->convert_filename_relative( $outputRoot );
+
 unless ($no_update) {
     my $command = "$dettool -addnormalizedexp -det_id $det_id -iteration $iter " .
-	"-recip " . RECIPE1() . "," . RECIPE2() . " -b1_uri $outputRoot " .
+	"-recip " . RECIPE1() . "," . RECIPE2() . " -path_base $outputRoot " .
 	"-bg $bg -bg_stdev $bg_stdev -bg_mean_stdev $bg_mean_stdev"; # Command to run
     $command .= " -dbname $dbname" if defined $dbname;
Index: trunk/ippScripts/scripts/detrend_process_exp.pl
===================================================================
--- trunk/ippScripts/scripts/detrend_process_exp.pl	(revision 12073)
+++ trunk/ippScripts/scripts/detrend_process_exp.pl	(revision 12079)
@@ -116,5 +116,5 @@
     $workdir = $ipprc->convert_filename_absolute( $workdir );
 } else {
-    my $example = ${$files}[0]->{b1_uri}; # Example original root name
+    my $example = ${$files}[0]->{path_base}; # Example original root name
     my ($vol, $dir, $file) = File::Spec->splitpath( $example );
     $workdir = $dir;
@@ -131,5 +131,5 @@
 open my $list2File, '>' . $list2Name;
 foreach my $file (@$files) {
-    my $origRoot = $ipprc->convert_filename_absolute( $file->{b1_uri} ); # Original root name
+    my $origRoot = $ipprc->convert_filename_absolute( $file->{path_base} ); # Original root name
     print $list1File ($ipprc->filename( "PPIMAGE.BIN1", $origRoot, $file->{class_id} ) . "\n");
     print $list2File ($ipprc->filename( "PPIMAGE.BIN2", $origRoot, $file->{class_id} ) . "\n");
@@ -172,9 +172,8 @@
 # Add the result into the database
 $outputRoot = $ipprc->convert_filename_relative( $outputRoot );
-$jpeg1  = $ipprc->convert_filename_relative( $jpeg1 );
-$jpeg2  = $ipprc->convert_filename_relative( $jpeg2 );
+
 unless ($no_update) {
     my $command = "$dettool -addprocessedexp -det_id $det_id -exp_tag $exp_tag " .
-	"-recip " . RECIPE1() . "," . RECIPE2() . " -b1_uri $outputRoot " .
+	"-recip " . RECIPE1() . "," . RECIPE2() . " -path_base $outputRoot " .
 	"-bg $bg -bg_stdev $bg_stdev -bg_mean_stdev $bg_mean_stdev"; # Command to run
     $command .= " -dbname $dbname" if defined $dbname;
Index: trunk/ippScripts/scripts/detrend_process_imfile.pl
===================================================================
--- trunk/ippScripts/scripts/detrend_process_imfile.pl	(revision 12073)
+++ trunk/ippScripts/scripts/detrend_process_imfile.pl	(revision 12079)
@@ -134,6 +134,5 @@
 # Take off the absolute path, to stuff into the database
 $outputImage = $ipprc->convert_filename_relative( $outputImage );
-$outputBin1  = $ipprc->convert_filename_relative( $outputBin1  );
-$outputBin2  = $ipprc->convert_filename_relative( $outputBin2  );
+$outputRoot = $ipprc->convert_filename_relative( $outputRoot );
 
 my $bg = ($stats->bg_mean() or 'NAN');
@@ -144,5 +143,5 @@
 unless ($no_update) {
     my $command = "$dettool -addprocessedimfile -det_id $det_id -exp_tag $exp_tag " .
-	"-class_id $class_id -recip $recipe -uri $outputImage -b1_uri $outputRoot";  # Command to run dettool
+	"-class_id $class_id -recip $recipe -uri $outputImage -path_base $outputRoot"; # Command to run dettool
     $command .= " -bg $bg -bg_stdev $bg_stdev -bg_mean_stdev $bg_mean_stdev";
     $command .= " -dbname $dbname" if defined $dbname;
Index: trunk/ippScripts/scripts/detrend_reject_imfile.pl
===================================================================
--- trunk/ippScripts/scripts/detrend_reject_imfile.pl	(revision 12073)
+++ trunk/ippScripts/scripts/detrend_reject_imfile.pl	(revision 12079)
@@ -96,5 +96,5 @@
     $workdir = $ipprc->convert_filename_absolute( $workdir );
 } else {
-    my $example = ${$files}[0]->{b1_uri}; # Example original root name
+    my $example = ${$files}[0]->{path_base}; # Example original root name
     my ($vol, $dir, $file) = File::Spec->splitpath( $example );
     $workdir = $dir;
@@ -114,5 +114,5 @@
 open my $list2File, '>' . $list2Name;
 foreach my $file (@$files) {
-    my $origRoot = $ipprc->convert_filename_absolute( $file->{b1_uri} ); # Original root name
+    my $origRoot = $ipprc->convert_filename_absolute( $file->{path_base} ); # Original root name
     print $list1File ($ipprc->filename( "PPIMAGE.BIN1", $origRoot, $file->{class_id} ) . "\n");
     print $list2File ($ipprc->filename( "PPIMAGE.BIN2", $origRoot, $file->{class_id} ) . "\n");
@@ -283,6 +283,5 @@
 
 # Add the result into the database
-$jpeg1Name = $ipprc->convert_filename_relative( $jpeg1Name );
-$jpeg2Name = $ipprc->convert_filename_relative( $jpeg2Name );
+$outputRoot = $ipprc->convert_filename_relative( $outputRoot );
 
 my $bg = $mean;
@@ -292,5 +291,5 @@
 unless ($no_update) {
     my $command = "$dettool -addresidexp -det_id $det_id -iteration $iter -exp_tag $exp_tag " .
-	"-recip " . RECIPE1() . "," . RECIPE2() . " -b1_uri $outputRoot "; # Command to run
+	"-recip " . RECIPE1() . "," . RECIPE2() . " -path_base $outputRoot "; # Command to run
     $command .= " -bg $bg -bg_stdev $bg_stdev -bg_mean_stdev $bg_mean_stdev";
     $command .= ' -reject' if $reject;
Index: trunk/ippScripts/scripts/detrend_resid.pl
===================================================================
--- trunk/ippScripts/scripts/detrend_resid.pl	(revision 12073)
+++ trunk/ippScripts/scripts/detrend_resid.pl	(revision 12079)
@@ -176,6 +176,5 @@
 # Add the processed file to the database
 $outputName = $ipprc->convert_filename_relative( $outputName );
-$bin1Name = $ipprc->convert_filename_relative( $bin1Name );
-$bin2Name = $ipprc->convert_filename_relative( $bin2Name );
+$outputRoot = $ipprc->convert_filename_relative( $outputRoot );
 
 my $bg = ($stats->bg_mean() or 'NAN');
@@ -185,5 +184,5 @@
 unless ($no_update) {
     my $command = "$dettool -addresidimfile -det_id $det_id -iteration $iter -exp_tag $exp_tag " .
-	"-class_id $class_id -recip $recipe -uri $outputName -b1_uri $outputRoot"; # Command to run dettool
+	"-class_id $class_id -recip $recipe -uri $outputName -path_base $outputRoot"; # Command to run dettool
     $command .= " -bg $bg -bg_stdev $bg_stdev -bg_mean_stdev $bg_mean_stdev";
     $command .= " -dbname $dbname" if defined $dbname;
Index: trunk/ippScripts/scripts/diff_skycell.pl
===================================================================
--- trunk/ippScripts/scripts/diff_skycell.pl	(revision 12073)
+++ trunk/ippScripts/scripts/diff_skycell.pl	(revision 12079)
@@ -156,4 +156,5 @@
 # Add the processed file to the database
 $outputName = $ipprc->convert_filename_relative( $outputName );
+$outputRoot = $ipprc->convert_filename_relative( $outputRoot );
 
 my $bg = ($stats->bg_mean() or 'NAN');
@@ -164,5 +165,5 @@
     # Add the subtraction result
     {
-	my $command = "$difftool -adddiffskyfile -diff_id $diff_id -uri $outputName"; # -b1_uri $outputRoot";
+	my $command = "$difftool -adddiffskyfile -diff_id $diff_id -uri $outputName -path_base $outputRoot";
 	$command .= " -bg $bg -bg_stdev $bg_stdev";
 	$command .= " -dbname $dbname" if defined $dbname;
Index: trunk/ippScripts/scripts/stack_skycell.pl
===================================================================
--- trunk/ippScripts/scripts/stack_skycell.pl	(revision 12073)
+++ trunk/ippScripts/scripts/stack_skycell.pl	(revision 12079)
@@ -115,6 +115,6 @@
 
 my $outputName = $outputRoot . ".fits";
-#my $bin1Name =  $ipprc->filename("PPIMAGE.BIN1", $outputRoot);
-#my $bin2Name =  $ipprc->filename("PPIMAGE.BIN2", $outputRoot);
+#my $bin1Name =  $ipprc->filename("PPSTAC.BIN1", $outputRoot);
+#my $bin2Name =  $ipprc->filename("PPSTAC.BIN2", $outputRoot);
 my $outputStats = $outputRoot . '.stats';
 
@@ -149,4 +149,5 @@
 # Add the processed file to the database
 $outputName = $ipprc->convert_filename_relative( $outputName );
+$outputRoot = $ipprc->convert_filename_relative( $outputRoot );
 
 my $bg = ($stats->bg_mean() or 'NAN');
@@ -157,5 +158,5 @@
     # Add the stack result
     {
-	my $command = "$stacktool -addsumskyfile -stack_id $stack_id -uri $outputName"; # -b1_uri $outputRoot";
+	my $command = "$stacktool -addsumskyfile -stack_id $stack_id -uri $outputName -path_base $outputRoot";
 	$command .= " -bg $bg -bg_stdev $bg_stdev";
 	$command .= " -dbname $dbname" if defined $dbname;
Index: trunk/ippScripts/scripts/warp_skycell.pl
===================================================================
--- trunk/ippScripts/scripts/warp_skycell.pl	(revision 12073)
+++ trunk/ippScripts/scripts/warp_skycell.pl	(revision 12079)
@@ -136,6 +136,5 @@
 # Take off the absolute path, to stuff into the database
 $outputImage = $ipprc->convert_filename_relative( $outputImage );
-$outputBin1  = $ipprc->convert_filename_relative( $outputBin1  );
-$outputBin2  = $ipprc->convert_filename_relative( $outputBin2  );
+$outputRoot = $ipprc->convert_filename_relative( $outputRoot );
 
 my $bg = ($stats->bg_mean() or 'NAN');
@@ -145,5 +144,5 @@
 unless ($no_update) {
     my $command = "$warptool -addwarped -warp_id $warp_id -skycell_id $skycell_id -tess_id $tess_id" .
-	" -uri $outputImage"; # -b1_uri $outputRoot";  # Command to run dettool
+	" -uri $outputImage -path_base $outputRoot"; # Command to run dettool
     $command .= " -bg $bg -bg_stdev $bg_stdev";
     $command .= " -dbname $dbname" if defined $dbname;
