Index: trunk/tools/stsci_disks/p3_permcheck.pl
===================================================================
--- trunk/tools/stsci_disks/p3_permcheck.pl	(revision 38680)
+++ trunk/tools/stsci_disks/p3_permcheck.pl	(revision 38682)
@@ -71,7 +71,6 @@
 
 my @volumes = ();
-for (my $i = 4; $i <= 4; $i++) {
-    my $max = 3;
-    if ($i == 4) { $max = 2; }
+for (my $i = 4; $i <= 5; $i++) {
+    my $max = 2;
     for (my $j = 0; $j < $max; $j++) {
         push @volumes, sprintf("ippb%02d.%1d",$i,$j);
@@ -83,4 +82,10 @@
 my $command;
 if ($stage eq 'raw') {
+    $command = "regtool -processedimfile -data_state full -exp_id $stage_id -dbname $dbname";
+}
+elsif ($stage eq 'isp') {
+    $command = "regtool -processedimfile -data_state full -exp_id $stage_id -dbname $dbname";
+}
+elsif ($stage eq 'ssp') {
     $command = "regtool -processedimfile -data_state full -exp_id $stage_id -dbname $dbname";
 }
@@ -99,17 +104,17 @@
 my @keys = ();
 foreach my $stageEntry ( @{ $stageData } ) {
-    if ($stage eq 'raw') {
-	if ($stageEntry->{ignored}) { next; }
-	push @keys, $stageEntry->{uri};
+    if (($stage eq 'raw')||($stage eq 'ssp')||($stage eq 'isp')) {
+        if ($stageEntry->{ignored}) { next; }
+        push @keys, $stageEntry->{uri};
     }
     elsif ($stage eq 'cam') {
-	push @keys, $stageEntry->{path_base} . ".smf";
-	for (my $u = 0; $u < 8; $u++) {
-	    for (my $v = 0; $v < 8; $v++) {
-		if ((($u == 0)||($u == 7))&&
-		    (($v == 0)||($v == 7))) { next; }
-		push @keys, $stageEntry->{path_base} . ".XY${u}${v}.mk.fits";
-	    }
-	}
+        push @keys, $stageEntry->{path_base} . ".smf";
+        for (my $u = 0; $u < 8; $u++) {
+            for (my $v = 0; $v < 8; $v++) {
+                if ((($u == 0)||($u == 7))&&
+                    (($v == 0)||($v == 7))) { next; }
+                push @keys, $stageEntry->{path_base} . ".XY${u}${v}.mk.fits";
+            }
+        }
     }
 }
@@ -120,23 +125,23 @@
     my ($ipp_copies,$stsci_copies) = check_instances($key);
     if ($stsci_copies != 0) {
-	for (my $i = 0; $i < $stsci_copies; $i++) {
-	    $neb->replicate($key,$rand_vol);
-	}
-	print ">> REP: $key $rand_vol\n";
-	sleep(5);
-	my ($ipp_copies,$stsci_copies) = check_instances($key);
+        for (my $i = 0; $i < $stsci_copies; $i++) {
+            $neb->replicate($key,$rand_vol);
+        }
+        print ">> REP: $key $rand_vol\n";
+        sleep(5);
+        my ($ipp_copies,$stsci_copies) = check_instances($key);
     }
-    if ($ipp_copies == 1) {
-	$neb->replicate($key,$rand_vol);
-	print ">> REP: $key $rand_vol\n";
-	sleep(5);
-	my ($ipp_copies,$stsci_copies) = check_instances($key);
-    }
-    if ($ipp_copies >= 2) {
-	$good ++;
+#     if ($ipp_copies == 1) {
+#         $neb->replicate($key,$rand_vol);
+#         print ">> REP: $key $rand_vol\n";
+#         sleep(5);
+#         my ($ipp_copies,$stsci_copies) = check_instances($key);
+#     }
+    if ($ipp_copies >= 1) {
+        $good ++;
     }
     else {
-	print ">> $ipp_copies $stsci_copies\n";
-	push @issues, $key;
+        print ">> $ipp_copies $stsci_copies\n";
+        push @issues, $key;
     }
     print "$key $good $#issues\n";
@@ -146,9 +151,9 @@
 if ($#issues != -1) {
     foreach my $key (@issues) {
-	my ($ipp_copies,$stsci_copies) = check_instances($key);
-	if ($ipp_copies < 2) {
-	    print "CHECK: $key\n";
-	    $bad++;
-	}
+        my ($ipp_copies,$stsci_copies) = check_instances($key);
+        if ($ipp_copies < 2) {
+            print "CHECK: $key\n";
+            $bad++;
+        }
     }
 }
@@ -163,11 +168,11 @@
     my $ipp_copies = 0;
     my $stsci_copies = 0;
-    foreach my $uri (@{ $uris }) { 
-	if ($uri =~ /file:...data.ipp/) {
-	    $ipp_copies++;
-	}
-	if ($uri =~ /file:...data.stsci/) {
-	    $stsci_copies++;
-	}
+    foreach my $uri (@{ $uris }) {
+        if ($uri =~ /file:...data.ipp/) {
+            $ipp_copies++;
+        }
+        if ($uri =~ /file:...data.stsci/) {
+            $stsci_copies++;
+        }
     }
     return($ipp_copies,$stsci_copies);
