Index: trunk/ippScripts/scripts/camera_exp.pl
===================================================================
--- trunk/ippScripts/scripts/camera_exp.pl	(revision 12020)
+++ trunk/ippScripts/scripts/camera_exp.pl	(revision 12021)
@@ -58,5 +58,5 @@
 # Look for programs we need
 my $missing_tools;
-my $camtool = can_run('p3tool') or (warn "Can't find p3tool" and $missing_tools = 1);
+my $camtool = can_run('camtool') or (warn "Can't find camtool" and $missing_tools = 1);
 my $ppImage = can_run('ppImage') or (warn "Can't find ppImage" and $missing_tools = 1);
 
@@ -134,5 +134,5 @@
 
 # Generate the file list, and get the statistics
-my $outputFile =  "$exp_tag.p3";
+my $outputFile =  "$exp_tag.cam";
 my $outputRoot = File::Spec->catfile( $workdir, $outputFile );
 
Index: trunk/ippScripts/scripts/chip_imfile.pl
===================================================================
--- trunk/ippScripts/scripts/chip_imfile.pl	(revision 12020)
+++ trunk/ippScripts/scripts/chip_imfile.pl	(revision 12021)
@@ -65,5 +65,5 @@
 # Look for programs we need
 my $missing_tools;
-my $chiptool = can_run('p2tool') or (warn "Can't find p2tool" and $missing_tools = 1);
+my $chiptool = can_run('chiptool') or (warn "Can't find chiptool" and $missing_tools = 1);
 my $ppImage = can_run('ppImage') or (warn "Can't find ppImage" and $missing_tools = 1);
 if ($missing_tools) { 
@@ -86,5 +86,5 @@
 
 ### Output file name --- must match camera configuration!
-my $outputFile =  "$exp_tag.p2";
+my $outputFile =  "$exp_tag.chip";
 my $outputRoot = File::Spec->catfile( $workdir, $outputFile );
 my $outputImage = $ipprc->filename("PPIMAGE.OUTPUT", $outputRoot, $class_id);
Index: trunk/ippScripts/scripts/diff_skycell.pl
===================================================================
--- trunk/ippScripts/scripts/diff_skycell.pl	(revision 12020)
+++ trunk/ippScripts/scripts/diff_skycell.pl	(revision 12021)
@@ -33,7 +33,7 @@
 use Pod::Usage qw( pod2usage );
 
-my ($p5_id, $camera, $dbname, $workdir, $no_update, $no_op);
+my ($diff_id, $camera, $dbname, $workdir, $no_update, $no_op);
 GetOptions(
-    'p5_id|d=s'         => \$p5_id, # Phase 5 identifier
+    'diff_id|d=s'       => \$diff_id, # Diff identifier
     'camera|c=s'        => \$camera, # Camera name
     'dbname|d=s'        => \$dbname, # Database name
@@ -45,7 +45,7 @@
 pod2usage( -msg => "Unknown option: @ARGV", -exitval => 2 ) if @ARGV;
 pod2usage(
-    -msg => "Required options: --p5_id --camera",
+    -msg => "Required options: --diff_id --camera",
     -exitval => 3,
-) unless defined $p5_id
+) unless defined $diff_id
     and defined $camera;
 
@@ -54,5 +54,5 @@
 # Look for programs we need
 my $missing_tools;
-my $difftool = can_run('p5tool') or (warn "Can't find p5tool" and $missing_tools = 1);
+my $difftool = can_run('difftool') or (warn "Can't find difftool" and $missing_tools = 1);
 my $pois = can_run('pois') or (warn "Can't find pois" and $missing_tools = 1);
 if ($missing_tools) { 
@@ -65,5 +65,5 @@
 my $files;
 {
-    my $command = "$difftool -inputscfile -p5_id $p5_id";
+    my $command = "$difftool -inputscfile -diff_id $diff_id";
     $command .= " -dbname $dbname" if defined $dbname;
     my ( $success, $error_code, $full_buf, $stdout_buf, $stderr_buf ) =
@@ -71,14 +71,14 @@
     unless ($success) {
 	$error_code = (($error_code >> 8) or $PS_EXIT_PROG_ERROR);
-	&my_die("Unable to perform difftool -inputscfile: $error_code", $p5_id, $error_code);
+	&my_die("Unable to perform difftool -inputscfile: $error_code", $diff_id, $error_code);
     }
 
     my $metadata = $mdcParser->parse(join "", @$stdout_buf) or
-	&my_die("Unable to parse metadata config doc", $p5_id, $PS_EXIT_PROG_ERROR);
+	&my_die("Unable to parse metadata config doc", $diff_id, $PS_EXIT_PROG_ERROR);
     $files = parse_md_list($metadata) or 
-	&my_die("Unable to parse metadata list", $p5_id, $PS_EXIT_PROG_ERROR);
-}
-
-&my_die("Subtraction list contains more than two elements", $p5_id, $PS_EXIT_SYS_ERROR) unless
+	&my_die("Unable to parse metadata list", $diff_id, $PS_EXIT_PROG_ERROR);
+}
+
+&my_die("Subtraction list contains more than two elements", $diff_id, $PS_EXIT_SYS_ERROR) unless
     scalar @$files == 2;
 
@@ -95,5 +95,5 @@
     }
     if (defined $skycell_id) {
-	&my_die("Skycell identifiers don't match", $p5_id, $PS_EXIT_SYS_ERROR) unless
+	&my_die("Skycell identifiers don't match", $diff_id, $PS_EXIT_SYS_ERROR) unless
 	    $file->{skycell_id} eq $skycell_id;
     } else {
@@ -102,6 +102,6 @@
 }
 
-&my_die("Unable to identify template", $p5_id, $PS_EXIT_SYS_ERROR) unless defined $template;
-&my_die("Unable to identify input", $p5_id, $PS_EXIT_SYS_ERROR) unless defined $input;
+&my_die("Unable to identify template", $diff_id, $PS_EXIT_SYS_ERROR) unless defined $template;
+&my_die("Unable to identify input", $diff_id, $PS_EXIT_SYS_ERROR) unless defined $input;
 
 ### Working directory
@@ -114,5 +114,5 @@
 
 # Get the output filenames
-my $outputFile = "$skycell_id.sub.$p5_id"; # Root name
+my $outputFile = "$skycell_id.sub.$diff_id"; # Root name
 my $outputRoot = File::Spec->catfile( $workdir, $outputFile );
 
@@ -131,20 +131,20 @@
     unless ($success) {
 	$error_code = (($error_code >> 8) or $PS_EXIT_PROG_ERROR);
-	&my_die("Unable to perform ppImage: $error_code", $p5_id, $error_code);
-    }
-    &my_die("Couldn't find expected output file: $outputName", $p5_id, $PS_EXIT_SYS_ERROR) unless -f $outputName;
-#    &my_die("Couldn't find expected output file: $bin1Name",    $p5_id, $PS_EXIT_SYS_ERROR) unless -f $bin1Name;
-#    &my_die("Couldn't find expected output file: $bin2Name",    $p5_id, $PS_EXIT_SYS_ERROR) unless -f $bin2Name;
-#    &my_die("Couldn't find expected output file: $outputStats", $p5_id, $PS_EXIT_SYS_ERROR) unless -f $outputStats;
+	&my_die("Unable to perform ppImage: $error_code", $diff_id, $error_code);
+    }
+    &my_die("Couldn't find expected output file: $outputName", $diff_id, $PS_EXIT_SYS_ERROR) unless -f $outputName;
+#    &my_die("Couldn't find expected output file: $bin1Name",    $diff_id, $PS_EXIT_SYS_ERROR) unless -f $bin1Name;
+#    &my_die("Couldn't find expected output file: $bin2Name",    $diff_id, $PS_EXIT_SYS_ERROR) unless -f $bin2Name;
+#    &my_die("Couldn't find expected output file: $outputStats", $diff_id, $PS_EXIT_SYS_ERROR) unless -f $outputStats;
 
     # Get the statistics on the residual image
     if (0) { ### Disabled because pois doesn't output stats yet
 	my $statsFile;		# File handle
-	open $statsFile, $outputStats or &my_die("Can't open statistics file $outputStats: $!", $p5_id, $PS_EXIT_SYS_ERROR);
+	open $statsFile, $outputStats or &my_die("Can't open statistics file $outputStats: $!", $diff_id, $PS_EXIT_SYS_ERROR);
 	my @contents = <$statsFile>; # Contents of file
 	close $statsFile;
 	my $metadata = $mdcParser->parse(join "", @contents) or
-	    &my_die("Unable to parse metadata config doc", $p5_id, $PS_EXIT_PROG_ERROR);
-	$stats->parse($metadata) or &my_die("Unable to find all values in statistics output.", $p5_id, $PS_EXIT_PROG_ERROR);
+	    &my_die("Unable to parse metadata config doc", $diff_id, $PS_EXIT_PROG_ERROR);
+	$stats->parse($metadata) or &my_die("Unable to find all values in statistics output.", $diff_id, $PS_EXIT_PROG_ERROR);
     }
 }
@@ -160,5 +160,5 @@
     # Add the subtraction result
     {
-	my $command = "$difftool -adddiffscfile -p5_id $p5_id -uri $outputName -b1_uri $outputRoot";
+	my $command = "$difftool -adddiffscfile -diff_id $diff_id -uri $outputName -b1_uri $outputRoot";
 	$command .= " -bg $bg -bg_stdev $bg_stdev";
 	$command .= " -dbname $dbname" if defined $dbname;
@@ -168,5 +168,5 @@
 	unless ($success) {
 	    $error_code = (($error_code >> 8) or $PS_EXIT_PROG_ERROR);
-	    &my_die("Unable to perform difftool -adddiffscfile: $error_code", $p5_id, $error_code);
+	    &my_die("Unable to perform difftool -adddiffscfile: $error_code", $diff_id, $error_code);
 	}
 	
@@ -176,5 +176,5 @@
     # Register the run as completed
     {
-	my $command = "$difftool -updaterun -p5_id $p5_id -state stop"; # Command to run p5tool
+	my $command = "$difftool -updaterun -diff_id $diff_id -state stop"; # Command to run difftool
 	$command .= " -dbname $dbname" if defined $dbname;
 
@@ -193,10 +193,10 @@
 {
     my $msg = shift;		# Warning message on die
-    my $p5_id = shift;		# Phase 5 identifier
+    my $diff_id = shift;	# Diff identifier
     my $exit_code = shift;	# Exit code to add
 
     warn($msg);
-    if ($p5_id and not $no_update) {
-	my $command = "$difftool -updaterun -p5_id $p5_id -state stop -code $exit_code";
+    if ($diff_id and not $no_update) {
+	my $command = "$difftool -updaterun -diff_id $diff_id -state stop -code $exit_code";
 	$command .= " -dbname $dbname" if defined $dbname;
         system ($command);
Index: trunk/ippScripts/scripts/register_exp.pl
===================================================================
--- trunk/ippScripts/scripts/register_exp.pl	(revision 12020)
+++ trunk/ippScripts/scripts/register_exp.pl	(revision 12021)
@@ -52,9 +52,9 @@
 use constant DETREND_FLAG => "-detrend"; # Flag to use to mark detrend exposure
 
-use constant PHASE0_URI => 'uri'; # Key for the URI
-use constant PHASE0_CLASSID => 'class_id'; # Key for the class id
-use constant PHASE0_BG => 'bg';        # Key for the background
-use constant PHASE0_BG_STDEV => 'bg_stdev'; # Key for the background standard deviation
-use constant PHASE0_BG_MEAN_STDEV => 'bg_mean_stdev'; # Key for the mean of the background standard deviation
+use constant REGISTER_URI => 'uri'; # Key for the URI
+use constant REGISTER_CLASSID => 'class_id'; # Key for the class id
+use constant REGISTER_BG => 'bg';        # Key for the background
+use constant REGISTER_BG_STDEV => 'bg_stdev'; # Key for the background standard deviation
+use constant REGISTER_BG_MEAN_STDEV => 'bg_mean_stdev'; # Key for the mean of the background standard deviation
 
 # These values should be constant for all components
@@ -81,5 +81,5 @@
 # Look for commands we need
 my $missing_tools;
-my $regtool = can_run('p0tool')
+my $regtool = can_run('regtool')
     or (warn "can't find regtool" and $missing_tools = 1);
 my $ppStats = can_run('ppStats')
@@ -109,5 +109,5 @@
     unless ($success) {
 	$error_code = (($error_code >> 8) or $PS_EXIT_PROG_ERROR);
-        warn ("Unable to perform regtool on exposure id $exptag: $error_code");
+        warn ("Unable to perform regtool -processedimfile on exposure id $exptag: $error_code");
         exit ($error_code);
     }
@@ -137,5 +137,5 @@
         }
         if ($values{$constant} ne $value) {
-            warn ("Value of $constant for $imfile->{PHASE0_CLASSID} doesn't match previous value");
+            warn ("Value of $constant for $imfile->{REGISTER_CLASSID} doesn't match previous value");
             &my_die ($exptag, $PS_EXIT_PROG_ERROR);
         }
@@ -148,8 +148,8 @@
     }
     
-    my $bg = get_value($imfile, PHASE0_BG());
+    my $bg = get_value($imfile, REGISTER_BG());
     push @backgrounds, $bg;
     
-    my $stdev = get_value($imfile, PHASE0_BG_MEAN_STDEV());
+    my $stdev = get_value($imfile, REGISTER_BG_MEAN_STDEV());
     push @variances, $stdev**2;
 }
@@ -184,11 +184,11 @@
         my $stats = Statistics::Descriptive::Sparse->new; # Statistics calculator
         $stats->add_data(@backgrounds);
-        push @command, ( '-' . PHASE0_BG() ), $stats->mean();
-        push @command, ( '-' . PHASE0_BG_MEAN_STDEV() ), ( $stats->standard_deviation() || 0 )
+        push @command, ( '-' . REGISTER_BG() ), $stats->mean();
+        push @command, ( '-' . REGISTER_BG_MEAN_STDEV() ), ( $stats->standard_deviation() || 0 )
     }
     {
         my $stats = Statistics::Descriptive::Sparse->new; # Statistics calculator
         $stats->add_data(@variances);
-        push @command, ( '-' . PHASE0_BG_STDEV() ), sqrt( $stats->mean() );
+        push @command, ( '-' . REGISTER_BG_STDEV() ), sqrt( $stats->mean() );
     }
     
@@ -214,5 +214,5 @@
     unless ($success) {
 	$error_code = (($error_code >> 8) or $PS_EXIT_PROG_ERROR);
-        warn ("Unable to run phase0 update for $exptag: $error_code");
+        warn ("Unable to run regtool -addprocessedexp for $exptag: $error_code");
         exit($error_code);
     }
@@ -226,5 +226,5 @@
     my $name = shift;                # The name of the value to check
 
-    my $source = $imfile->{PHASE0_CLASSID()}; # Where it comes from
+    my $source = $imfile->{REGISTER_CLASSID()}; # Where it comes from
 
     unless (defined $imfile->{$name}) {
Index: trunk/ippScripts/scripts/register_imfile.pl
===================================================================
--- trunk/ippScripts/scripts/register_imfile.pl	(revision 12020)
+++ trunk/ippScripts/scripts/register_imfile.pl	(revision 12021)
@@ -89,14 +89,14 @@
 
 # Switches for regtool
-use constant P0TOOL_MODE => '-addprocessedimfile'; # Mode for regtool
-use constant P0TOOL_EXPTAG => '-exp_tag'; # Switch to specify the exposure id
-use constant P0TOOL_CLASSID => '-class_id'; # Switch to specify the class id
-use constant P0TOOL_BG_MEAN => '-bg'; # Switch to add the background
-use constant P0TOOL_BG_STDEV => '-bg_stdev'; # Switch to add the bg stdev
-use constant P0TOOL_BG_MEAN_STDEV => '-bg_mean_stdev'; # Switch to add the bg mean stdev
+use constant REGTOOL_MODE => '-addprocessedimfile'; # Mode for regtool
+use constant REGTOOL_EXPTAG => '-exp_tag'; # Switch to specify the exposure id
+use constant REGTOOL_CLASSID => '-class_id'; # Switch to specify the class id
+use constant REGTOOL_BG_MEAN => '-bg'; # Switch to add the background
+use constant REGTOOL_BG_STDEV => '-bg_stdev'; # Switch to add the bg stdev
+use constant REGTOOL_BG_MEAN_STDEV => '-bg_mean_stdev'; # Switch to add the bg mean stdev
 
 # Look for programs we need
 my $missing_tools;
-my $regtool = can_run('p0tool')
+my $regtool = can_run('regtool')
     or (warn "Can't find regtool" and $missing_tools = 1);
 my $ppStats = can_run('ppStats')
@@ -159,5 +159,5 @@
 unless ($no_update) {
     my @command;
-    push @command, $regtool, P0TOOL_MODE(), P0TOOL_EXPTAG(), $exp_tag, P0TOOL_CLASSID(), $class_id; # Command to run p0tool
+    push @command, $regtool, REGTOOL_MODE(), REGTOOL_EXPTAG(), $exp_tag, REGTOOL_CLASSID(), $class_id; # Command to run regtool
 
     foreach my $constant (keys %{CONSTANTS()}) {
@@ -170,5 +170,5 @@
     }
     
-    push @command, P0TOOL_BG_MEAN();
+    push @command, REGTOOL_BG_MEAN();
     if (defined $stats->bg_mean()) {
         push @command, $stats->bg_mean();
@@ -176,5 +176,5 @@
         push @command, "NAN";
     }
-    push @command, P0TOOL_BG_STDEV();
+    push @command, REGTOOL_BG_STDEV();
     if (defined($stats->bg_stdev())) {
         push @command, $stats->bg_stdev();
@@ -183,5 +183,5 @@
         push @command, 0;
     }
-    push @command,  P0TOOL_BG_MEAN_STDEV();
+    push @command,  REGTOOL_BG_MEAN_STDEV();
     if (defined $stats->bg_mean_stdev()) {
         push @command, $stats->bg_mean_stdev();
Index: trunk/ippScripts/scripts/stack_skycell.pl
===================================================================
--- trunk/ippScripts/scripts/stack_skycell.pl	(revision 12020)
+++ trunk/ippScripts/scripts/stack_skycell.pl	(revision 12021)
@@ -33,7 +33,7 @@
 use Pod::Usage qw( pod2usage );
 
-my ($p6_id, $camera, $dbname, $workdir, $no_update, $no_op);
+my ($stack_id, $camera, $dbname, $workdir, $no_update, $no_op);
 GetOptions(
-    'p6_id|d=s'         => \$p6_id, # Phase 6 identifier
+    'stack_id|d=s'      => \$stack_id, # Stack identifier
     'camera|c=s'        => \$camera, # Camera name
     'dbname|d=s'        => \$dbname, # Database name
@@ -45,7 +45,7 @@
 pod2usage( -msg => "Unknown option: @ARGV", -exitval => 2 ) if @ARGV;
 pod2usage(
-    -msg => "Required options: --p6_id --camera",
+    -msg => "Required options: --stack_id --camera",
     -exitval => 3,
-) unless defined $p6_id
+) unless defined $stack_id
     and defined $camera;
 
@@ -54,5 +54,5 @@
 # Look for programs we need
 my $missing_tools;
-my $stacktool = can_run('p6tool') or (warn "Can't find p6tool" and $missing_tools = 1);
+my $stacktool = can_run('stacktool') or (warn "Can't find stacktool" and $missing_tools = 1);
 my $ppStac = can_run('ppStac') or (warn "Can't find ppStac" and $missing_tools = 1);
 if ($missing_tools) { 
@@ -65,5 +65,5 @@
 my $files;
 {
-    my $command = "$stacktool -inputscfile -p6_id $p6_id";
+    my $command = "$stacktool -inputscfile -stack_id $stack_id";
     $command .= " -dbname $dbname" if defined $dbname;
     my ( $success, $error_code, $full_buf, $stdout_buf, $stderr_buf ) =
@@ -71,14 +71,14 @@
     unless ($success) {
 	$error_code = (($error_code >> 8) or $PS_EXIT_PROG_ERROR);
-	&my_die("Unable to perform stacktool -inputscfile: $error_code", $p6_id, $error_code);
+	&my_die("Unable to perform stacktool -inputscfile: $error_code", $stack_id, $error_code);
     }
 
     my $metadata = $mdcParser->parse(join "", @$stdout_buf) or
-	&my_die("Unable to parse metadata config doc", $p6_id, $PS_EXIT_PROG_ERROR);
+	&my_die("Unable to parse metadata config doc", $stack_id, $PS_EXIT_PROG_ERROR);
     $files = parse_md_list($metadata) or 
-	&my_die("Unable to parse metadata list", $p6_id, $PS_EXIT_PROG_ERROR);
-}
-
-&my_die("Subtraction list contains more than two elements", $p6_id, $PS_EXIT_SYS_ERROR) unless
+	&my_die("Unable to parse metadata list", $stack_id, $PS_EXIT_PROG_ERROR);
+}
+
+&my_die("Subtraction list contains more than two elements", $stack_id, $PS_EXIT_SYS_ERROR) unless
     scalar @$files >= 2;
 
@@ -90,5 +90,5 @@
     $inputList .= "$uri ";
     if (defined $skycell_id) {
-	&my_die("Skycell identifiers don't match", $p6_id, $PS_EXIT_SYS_ERROR) unless
+	&my_die("Skycell identifiers don't match", $stack_id, $PS_EXIT_SYS_ERROR) unless
 	    $file->{skycell_id} eq $skycell_id;
     } else {
@@ -106,5 +106,5 @@
 
 # Get the output filenames
-my $outputFile = "$skycell_id.sub.$p6_id"; # Root name
+my $outputFile = "$skycell_id.sub.$stack_id"; # Root name
 my $outputRoot = File::Spec->catfile( $workdir, $outputFile );
 
@@ -123,20 +123,20 @@
     unless ($success) {
 	$error_code = (($error_code >> 8) or $PS_EXIT_PROG_ERROR);
-	&my_die("Unable to perform ppImage: $error_code", $p6_id, $error_code);
-    }
-    &my_die("Couldn't find expected output file: $outputName", $p6_id, $PS_EXIT_SYS_ERROR) unless -f $outputName;
-#    &my_die("Couldn't find expected output file: $bin1Name",    $p6_id, $PS_EXIT_SYS_ERROR) unless -f $bin1Name;
-#    &my_die("Couldn't find expected output file: $bin2Name",    $p6_id, $PS_EXIT_SYS_ERROR) unless -f $bin2Name;
-#    &my_die("Couldn't find expected output file: $outputStats", $p6_id, $PS_EXIT_SYS_ERROR) unless -f $outputStats;
+	&my_die("Unable to perform ppImage: $error_code", $stack_id, $error_code);
+    }
+    &my_die("Couldn't find expected output file: $outputName", $stack_id, $PS_EXIT_SYS_ERROR) unless -f $outputName;
+#    &my_die("Couldn't find expected output file: $bin1Name",    $stack_id, $PS_EXIT_SYS_ERROR) unless -f $bin1Name;
+#    &my_die("Couldn't find expected output file: $bin2Name",    $stack_id, $PS_EXIT_SYS_ERROR) unless -f $bin2Name;
+#    &my_die("Couldn't find expected output file: $outputStats", $stack_id, $PS_EXIT_SYS_ERROR) unless -f $outputStats;
 
     # Get the statistics on the residual image
     if (0) { ### Disabled because ppStac doesn't output stats yet
 	my $statsFile;		# File handle
-	open $statsFile, $outputStats or &my_die("Can't open statistics file $outputStats: $!", $p6_id, $PS_EXIT_SYS_ERROR);
+	open $statsFile, $outputStats or &my_die("Can't open statistics file $outputStats: $!", $stack_id, $PS_EXIT_SYS_ERROR);
 	my @contents = <$statsFile>; # Contents of file
 	close $statsFile;
 	my $metadata = $mdcParser->parse(join "", @contents) or
-	    &my_die("Unable to parse metadata config doc", $p6_id, $PS_EXIT_PROG_ERROR);
-	$stats->parse($metadata) or &my_die("Unable to find all values in statistics output.", $p6_id, $PS_EXIT_PROG_ERROR);
+	    &my_die("Unable to parse metadata config doc", $stack_id, $PS_EXIT_PROG_ERROR);
+	$stats->parse($metadata) or &my_die("Unable to find all values in statistics output.", $stack_id, $PS_EXIT_PROG_ERROR);
     }
 }
@@ -152,5 +152,5 @@
     # Add the subtraction result
     {
-	my $command = "$stacktool -addsumscfile -p6_id $p6_id -uri $outputName -b1_uri $outputRoot";
+	my $command = "$stacktool -addsumscfile -stack_id $stack_id -uri $outputName -b1_uri $outputRoot";
 	$command .= " -bg $bg -bg_stdev $bg_stdev";
 	$command .= " -dbname $dbname" if defined $dbname;
@@ -160,5 +160,5 @@
 	unless ($success) {
 	    $error_code = (($error_code >> 8) or $PS_EXIT_PROG_ERROR);
-	    &my_die("Unable to perform stacktool -adddiffscfile: $error_code", $p6_id, $error_code);
+	    &my_die("Unable to perform stacktool -adddiffscfile: $error_code", $stack_id, $error_code);
 	}
 	
@@ -168,5 +168,5 @@
     # Register the run as completed
     {
-	my $command = "$stacktool -updaterun -p6_id $p6_id -state stop"; # Command to run p6tool
+	my $command = "$stacktool -updaterun -stack_id $stack_id -state stop"; # Command to run stacktool
 	$command .= " -dbname $dbname" if defined $dbname;
 
@@ -185,10 +185,10 @@
 {
     my $msg = shift;		# Warning message on die
-    my $p6_id = shift;		# Phase 5 identifier
+    my $stack_id = shift;	# Stack identifier
     my $exit_code = shift;	# Exit code to add
 
     warn($msg);
-    if ($p6_id and not $no_update) {
-	my $command = "$stacktool -updaterun -p6_id $p6_id -state stop -code $exit_code";
+    if ($stack_id and not $no_update) {
+	my $command = "$stacktool -updaterun -stack_id $stack_id -state stop -code $exit_code";
 	$command .= " -dbname $dbname" if defined $dbname;
         system ($command);
Index: trunk/ippScripts/scripts/warp_imfile.pl
===================================================================
--- trunk/ippScripts/scripts/warp_imfile.pl	(revision 12020)
+++ trunk/ippScripts/scripts/warp_imfile.pl	(revision 12021)
@@ -32,7 +32,7 @@
 use Pod::Usage qw( pod2usage );
 
-my ($p4_id, $skycell_id, $camera, $dbname, $workdir, $no_update, $no_op);
+my ($warp_id, $skycell_id, $camera, $dbname, $workdir, $no_update, $no_op);
 GetOptions(
-    'p4_id|i=s'         => \$p4_id, # Phase 4 identifier
+    'warp_id|i=s'       => \$warp_id, # Warp identifier
     'skycell_id|s=s'    => \$skycell_id, # Skycell identifier
     'camera|c=s'        => \$camera, # Camera name
@@ -45,7 +45,7 @@
 pod2usage( -msg => "Unknown option: @ARGV", -exitval => 2 ) if @ARGV;
 pod2usage(
-    -msg => "Required options: --p4_id --skycell_id --camera",
+    -msg => "Required options: --warp_id --skycell_id --camera",
     -exitval => 3,
-) unless defined $p4_id
+) unless defined $warp_id
     and defined $skycell_id
     and defined $camera;
@@ -55,5 +55,5 @@
 # Look for programs we need
 my $missing_tools;
-my $warptool = can_run('p4tool') or (warn "Can't find p4tool" and $missing_tools = 1);
+my $warptool = can_run('warptool') or (warn "Can't find warptool" and $missing_tools = 1);
 my $pswarp = can_run('pswarp') or (warn "Can't find pswarp" and $missing_tools = 1);
 if ($missing_tools) { 
@@ -66,5 +66,5 @@
 my $imfiles;
 {
-    my $command = "$warptool -imfile -p4_id $p4_id -skycell_id $skycell_id";
+    my $command = "$warptool -imfile -warp_id $warp_id -skycell_id $skycell_id";
     $command .= " -dbname $dbname" if defined $dbname;
     my ( $success, $error_code, $full_buf, $stdout_buf, $stderr_buf ) =
@@ -72,11 +72,11 @@
     unless ($success) {
 	$error_code = (($error_code >> 8) or $PS_EXIT_PROG_ERROR);
-	&my_die("Unable to perform warptool -imfile: $error_code", $p4_id, $skycell_id, $error_code);
+	&my_die("Unable to perform warptool -imfile: $error_code", $warp_id, $skycell_id, $error_code);
     }
 
     my $metadata = $mdcParser->parse(join "", @$stdout_buf) or
-	&my_die("Unable to parse metadata config doc", $p4_id, $skycell_id, $PS_EXIT_PROG_ERROR);
+	&my_die("Unable to parse metadata config doc", $warp_id, $skycell_id, $PS_EXIT_PROG_ERROR);
     $imfiles = parse_md_list($metadata) or 
-	&my_die("Unable to parse metadata list", $p4_id, $skycell_id, $PS_EXIT_PROG_ERROR);
+	&my_die("Unable to parse metadata list", $warp_id, $skycell_id, $PS_EXIT_PROG_ERROR);
 }
 
@@ -88,5 +88,5 @@
     $workdir = $dir;
 }
-my $outputFile = "$skycell_id.warp.$p4_id"; # Root name
+my $outputFile = "$skycell_id.warp.$warp_id"; # Root name
 my $outputRoot = File::Spec->catfile( $workdir, $outputFile );
 my $outputImage = $ipprc->filename("PSWARP.OUTPUT", $outputRoot, $skycell_id );
@@ -113,10 +113,10 @@
     unless ($success) {
 	$error_code = (($error_code >> 8) or $PS_EXIT_PROG_ERROR);
-	&my_die("Unable to perform pswarp: $error_code", $p4_id, $skycell_id, $error_code);
+	&my_die("Unable to perform pswarp: $error_code", $warp_id, $skycell_id, $error_code);
     }
-    &my_die("Couldn't find expected output file: $outputImage", $p4_id, $skycell_id, $PS_EXIT_SYS_ERROR) unless -f $outputImage;
-    &my_die("Couldn't find expected output file: $outputStats", $p4_id, $skycell_id, $PS_EXIT_SYS_ERROR) unless -f $outputStats;
-    &my_die("Couldn't find expected output file: $outputBin1", $p4_id, $skycell_id, $PS_EXIT_SYS_ERROR) unless -f $outputBin1;
-    &my_die("Couldn't find expected output file: $outputBin2", $p4_id, $skycell_id, $PS_EXIT_SYS_ERROR) unless -f $outputBin2;
+    &my_die("Couldn't find expected output file: $outputImage", $warp_id, $skycell_id, $PS_EXIT_SYS_ERROR) unless -f $outputImage;
+    &my_die("Couldn't find expected output file: $outputStats", $warp_id, $skycell_id, $PS_EXIT_SYS_ERROR) unless -f $outputStats;
+    &my_die("Couldn't find expected output file: $outputBin1", $warp_id, $skycell_id, $PS_EXIT_SYS_ERROR) unless -f $outputBin1;
+    &my_die("Couldn't find expected output file: $outputBin2", $warp_id, $skycell_id, $PS_EXIT_SYS_ERROR) unless -f $outputBin2;
 
     # Get the statistics on the warped image
@@ -126,6 +126,6 @@
     close $statsFile;
     my $metadata = $mdcParser->parse(join "", @contents)
-        or &my_die("Unable to parse metadata config", $p4_id, $skycell_id, $PS_EXIT_PROG_ERROR);
-    $stats->parse($metadata) or &my_die("Unable to find all values in statistics output.", $p4_id, $skycell_id, $PS_EXIT_PROG_ERROR);
+        or &my_die("Unable to parse metadata config", $warp_id, $skycell_id, $PS_EXIT_PROG_ERROR);
+    $stats->parse($metadata) or &my_die("Unable to find all values in statistics output.", $warp_id, $skycell_id, $PS_EXIT_PROG_ERROR);
 }
 
@@ -140,5 +140,5 @@
 # Add the processed file to the database
 unless ($no_update) {
-    my $command = "$warptool -warped -p4_id $p4_id -skycell_id $skycell_id" .
+    my $command = "$warptool -warped -warp_id $warp_id -skycell_id $skycell_id" .
 	" -uri $outputImage -b1_uri $outputRoot";  # Command to run dettool
     $command .= " -bg $bg -bg_stdev $bg_stdev";
@@ -159,11 +159,11 @@
 {
     my $msg = shift;		# Warning message on die
-    my $p4_id = shift;		# Phase 4 identifier
+    my $warp_id = shift;	# Warp identifier
     my $skycell_id = shift;	# Skycell identifier
     my $exit_code = shift;	# Exit code to add
 
     warn($msg);
-    if ($p4_id and $skycell_id and not $no_update) {
-	my $command = "$warptool -warped -p4_id $p4_id -skycell_id $skycell_id -code $exit_code";
+    if ($warp_id and $skycell_id and not $no_update) {
+	my $command = "$warptool -warped -warp_id $warp_id -skycell_id $skycell_id -code $exit_code";
 	$command .= " -dbname $dbname" if defined $dbname;
         system ($command);
Index: trunk/ippScripts/scripts/warp_overlap.pl
===================================================================
--- trunk/ippScripts/scripts/warp_overlap.pl	(revision 12020)
+++ trunk/ippScripts/scripts/warp_overlap.pl	(revision 12021)
@@ -32,7 +32,7 @@
 use Pod::Usage qw( pod2usage );
 
-my ($p4_id, $dbname, $workdir, $no_update, $no_op);
+my ($warp_id, $dbname, $workdir, $no_update, $no_op);
 GetOptions(
-    'p4_id|i=s'         => \$p4_id, # Phase 4 identifier
+    'warp_id|i=s'       => \$warp_id, # Warp identifier
     'dbname|d=s'        => \$dbname, # Database name
     'workdir|w=s'       => \$workdir, # Working directory, for output files
@@ -43,11 +43,11 @@
 pod2usage( -msg => "Unknown option: @ARGV", -exitval => 2 ) if @ARGV;
 pod2usage(
-    -msg => "Required options: --p4_id",
+    -msg => "Required options: --warp_id",
     -exitval => 3,
-) unless defined $p4_id;
+) unless defined $warp_id;
 
 # Look for programs we need
 my $missing_tools;
-my $warptool = can_run('p4tool') or (warn "Can't find p4tool" and $missing_tools = 1);
+my $warptool = can_run('warptool') or (warn "Can't find warptool" and $missing_tools = 1);
 #my $overlap = can_run('overlap') or (warn "Can't find overlap" and $missing_tools = 1);
 if ($missing_tools) { 
@@ -59,5 +59,5 @@
 my $imfiles;
 {
-    my $command = "$warptool -imfile -p4_id $p4_id";
+    my $command = "$warptool -imfile -warp_id $warp_id";
     $command .= " -dbname $dbname" if defined $dbname;
     my ( $success, $error_code, $full_buf, $stdout_buf, $stderr_buf ) =
@@ -65,12 +65,12 @@
     unless ($success) {
 	$error_code = (($error_code >> 8) or $PS_EXIT_PROG_ERROR);
-	&my_die("Unable to perform warptool -imfile: $error_code", $p4_id, $error_code);
+	&my_die("Unable to perform warptool -imfile: $error_code", $warp_id, $error_code);
     }
 
     my $mdcParser = PS::IPP::Metadata::Config->new;	# Parser for metadata config files
     my $metadata = $mdcParser->parse(join "", @$stdout_buf) or
-	&my_die("Unable to parse metadata config doc", $p4_id, $PS_EXIT_PROG_ERROR);
+	&my_die("Unable to parse metadata config doc", $warp_id, $PS_EXIT_PROG_ERROR);
     $imfiles = parse_md_list($metadata) or 
-	&my_die("Unable to parse metadata list", $p4_id, $PS_EXIT_PROG_ERROR);
+	&my_die("Unable to parse metadata list", $warp_id, $PS_EXIT_PROG_ERROR);
 }
 
@@ -90,10 +90,10 @@
 # Generate a MDC file with the overlaps
 $workdir = $ipprc->convert_filename_absolute( $workdir );
-my $overlapName = File::Spec->catfile( $workdir, $p4_id . '.overlap.mdc' ); 
+my $overlapName = File::Spec->catfile( $workdir, $warp_id . '.overlap.mdc' ); 
 open my $overlapFile, "> $overlapName" or
-    &my_die("Unable to open mdc file $overlapName", $p4_id, $PS_EXIT_DATA_ERROR);
-print $overlapFile "p4SkyCellMap MULTI\n\n";
+    &my_die("Unable to open mdc file $overlapName", $warp_id, $PS_EXIT_DATA_ERROR);
+print $overlapFile "warpSkyCellMap MULTI\n\n";
 foreach my $imfile (@$imfiles) {
-    print $overlapFile "p4_id\t\tS32\t" . $imfile->{p4_id} . "\n";
+    print $overlapFile "warp_id\t\tS32\t" . $imfile->{warp_id} . "\n";
     print $overlapFile "skycell_id\tSTR\t" . $imfile->{skycell_id} . "\n";
     print $overlapFile "tess_id\t\tSTR\t" . $imfile->{tess_id} . "\n";
@@ -106,5 +106,5 @@
 # Add the processed file to the database
 unless ($no_update) {
-    my $command = "$warptool -addoverlap -p4_id $p4_id -info $overlapName"; # Command to run p4tool
+    my $command = "$warptool -addoverlap -warp_id $warp_id -info $overlapName"; # Command to run warptool
     $command .= " -dbname $dbname" if defined $dbname;
 
@@ -125,10 +125,10 @@
 {
     my $msg = shift;		# Warning message on die
-    my $p4_id = shift;		# Phase 4 identifier
+    my $warp_id = shift;	# Warp identifier
     my $exit_code = shift;	# Exit code to add
 
     warn($msg);
-    if ($p4_id and not $no_update) {
-	my $command = "$warptool -addoverlap -p4_id $p4_id -code $exit_code";
+    if ($warp_id and not $no_update) {
+	my $command = "$warptool -addoverlap -warp_id $warp_id -code $exit_code";
 	$command .= " -dbname $dbname" if defined $dbname;
         system ($command);
