Index: /branches/eam_branches/ipp-20101205/PS-IPP-Config/lib/PS/IPP/Config.pm
===================================================================
--- /branches/eam_branches/ipp-20101205/PS-IPP-Config/lib/PS/IPP/Config.pm	(revision 30102)
+++ /branches/eam_branches/ipp-20101205/PS-IPP-Config/lib/PS/IPP/Config.pm	(revision 30103)
@@ -1107,7 +1107,8 @@
     }
 
-    if (file_scheme($output) ne 'neb') {
+    my $scheme = file_scheme($output);
+    if (!$scheme or ($scheme ne 'neb')) {
         # non-nebulous file we're done
-        if ($delete_existing) {
+        if ($delete_existing and $self->file_exists($output)) {
             if (!$self->file_delete($output)) {
                 carp "failed to delete $output";
@@ -1181,5 +1182,6 @@
     my $copies = shift;
 
-    if (file_scheme($file) ne 'neb') {
+    my $scheme = file_scheme($file);
+    if (!$scheme or ($scheme ne 'neb')) {
         carp "cannot replicate non-neulous file: $file";
         return 0;
Index: /branches/eam_branches/ipp-20101205/dbconfig/changes.txt
===================================================================
--- /branches/eam_branches/ipp-20101205/dbconfig/changes.txt	(revision 30102)
+++ /branches/eam_branches/ipp-20101205/dbconfig/changes.txt	(revision 30103)
@@ -1989,3 +1989,9 @@
 UPDATE dbversion set schema_version = '1.1.66',  updated= CURRENT_TIMESTAMP();
 
+-- output format for publishing / unique name for clients
+ALTER TABLE publishClient ADD name VARCHAR(64) UNIQUE; -- (Bill's request)
+ALTER TABLE publishClient ADD output_format SMALLINT NOT NULL default 1;
+
 -- Version 1.1.67
+
+ALTER TABLE rawImfile ADD column video_cells TINYINT AFTER burntool_state;
Index: /branches/eam_branches/ipp-20101205/dbconfig/notes.txt
===================================================================
--- /branches/eam_branches/ipp-20101205/dbconfig/notes.txt	(revision 30102)
+++ /branches/eam_branches/ipp-20101205/dbconfig/notes.txt	(revision 30103)
@@ -8,4 +8,5 @@
    * build ippbd ('make src' in dbconfig)
    * check in dbconfig, ippdb, and ippTools
+   * update dbversion.schema.version (added by bills)
 
 2007.06.04 : EAM
Index: /branches/eam_branches/ipp-20101205/dbconfig/publish.md
===================================================================
--- /branches/eam_branches/ipp-20101205/dbconfig/publish.md	(revision 30102)
+++ /branches/eam_branches/ipp-20101205/dbconfig/publish.md	(revision 30103)
@@ -9,4 +9,6 @@
     workdir      STR         255
     comment      STR         255
+    name	 STR	     64
+    output_format S16	     0
 END              
                  
Index: /branches/eam_branches/ipp-20101205/dbconfig/raw.md
===================================================================
--- /branches/eam_branches/ipp-20101205/dbconfig/raw.md	(revision 30102)
+++ /branches/eam_branches/ipp-20101205/dbconfig/raw.md	(revision 30103)
@@ -141,3 +141,4 @@
     md5sum      STR         32
     burntool_state  S16     0
+    video_cells BOOL        f
 END
Index: /branches/eam_branches/ipp-20101205/ippMonitor/raw/czartool_labels.php
===================================================================
--- /branches/eam_branches/ipp-20101205/ippMonitor/raw/czartool_labels.php	(revision 30102)
+++ /branches/eam_branches/ipp-20101205/ippMonitor/raw/czartool_labels.php	(revision 30103)
@@ -64,5 +64,5 @@
 include 'version.php';
 echo "</p>";
-echo "<p  align=\"center\"> Current status of the IPP as of $lastUpdateTime (faults are shown in parentheses). <br>Documentation can be found <a href=\"http://svn.pan-starrs.ifa.hawaii.edu/trac/ipp/wiki/Processing\">here</a> and cluster load monitored <a href=\"http://ganglia.pan-starrs.ifa.hawaii.edu/?r=hour&s=descending&c=IPP%2520Production\">here</a><br>Current nightly science status: $nsStatus<br>Use <a href=\"$link\"> $plotTypeLink</a> plots <br/><a href=\"http://ipp004.ifa.hawaii.edu/clusterMonitor/top.html\">Who uses the cluster?</a></p>";
+echo "<p  align=\"center\"> Current status of the IPP as of $lastUpdateTime (faults are shown in parentheses). <br>Documentation can be found <a href=\"http://svn.pan-starrs.ifa.hawaii.edu/trac/ipp/wiki/Processing\">here</a> and cluster load monitored <a href=\"http://ganglia.pan-starrs.ifa.hawaii.edu/?r=hour&s=descending&c=IPP%2520Production\">here</a><br>Current nightly science status: $nsStatus<br>Use <a href=\"$link\"> $plotTypeLink</a> plots <br/><a href=\"http://ipp004.ifa.hawaii.edu/clusterMonitor/top.html\">Who uses the cluster?</a><br><a href=\"http://ipp004.ifa.hawaii.edu/ippMetrics\">IPP Metrics</a><br/><a href=\"http://svn.pan-starrs.ifa.hawaii.edu/trac/ipp/wiki/PS1_IPP_CzarLogs\">Czar log pages</a></p>";
 
 
@@ -399,4 +399,7 @@
         ."&plottype=".$plotType;
 
+    $searchState = "new";
+    if ($server == "update") $searchState = "update";
+
     // write rows
     foreach ($labels as &$thisLabel) {
@@ -437,25 +440,25 @@
         write_table_cell($class, '%s', $anyFaults ? $link : "", $str);
 
-        $link = "failedChipProcessedImfile.php?pass=" . $pass . "&proj=" . $proj . "&chipRun.label=" . $thisLabel . "&chipRun.state=new";
+        $link = "failedChipProcessedImfile.php?pass=" . $pass . "&proj=" . $proj . "&chipRun.label=" . $thisLabel . "&chipRun.state=".$searchState;
         getStateAndFaults($db, $thisLabel, $selectedState, "chip", $str, $anyFaults);
         write_table_cell($class, '%s', $anyFaults ? $link : "", $str);
 
-        $link = "failedCamProcessedExp.php?pass=" . $pass . "&proj=" . $proj . "&camRun.label=" . $thisLabel . "&camRun.state=new";
+        $link = "failedCamProcessedExp.php?pass=" . $pass . "&proj=" . $proj . "&camRun.label=" . $thisLabel . "&camRun.state=".$searchState;
         getStateAndFaults($db, $thisLabel, $selectedState, "cam", $str, $anyFaults);
         write_table_cell($class, '%s',  $anyFaults ? $link : "", $str);
 
-        $link =  "failedFakeProcessedImfile.php?pass=" . $pass . "&proj=" . $proj . "&fakeRun.label=" . $thisLabel . "&fakeRun.state=new";
+        $link =  "failedFakeProcessedImfile.php?pass=" . $pass . "&proj=" . $proj . "&fakeRun.label=" . $thisLabel . "&fakeRun.state=".$searchState;
         getStateAndFaults($db, $thisLabel, $selectedState, "fake", $str, $anyFaults);
         write_table_cell($class, '%s',  $anyFaults ? $link : "", $str);
 
-        $link = "failedWarpSkyfiles.php?pass=" . $pass . "&proj=" . $proj . "&warpRun.label=" . $thisLabel . "&warpRun.state=new";
+        $link = "failedWarpSkyfiles.php?pass=" . $pass . "&proj=" . $proj . "&warpRun.label=" . $thisLabel . "&warpRun.state=".$searchState;
         getStateAndFaults($db, $thisLabel, $selectedState, "warp", $str, $anyFaults);
         write_table_cell($class, '%s',  $anyFaults ? $link : "",  $str);
 
-        $link = "failedStackSkyfile.php?pass=" . $pass . "&proj=" . $proj . "&stackRun.label=" . $thisLabel . "&stackRun.state=new";
+        $link = "failedStackSkyfile.php?pass=" . $pass . "&proj=" . $proj . "&stackRun.label=" . $thisLabel . "&stackRun.state=".$searchState;
         getStateAndFaults($db, $thisLabel, $selectedState, "stack", $str, $anyFaults);
         write_table_cell($class, '%s',  $anyFaults ? $link : "", $str);
 
-        $link = "failedDiffSkyfile.php?pass=" . $pass . "&proj=" . $proj . "&diffRun.label=" . $thisLabel . "&diffRun.state=new";
+        $link = "failedDiffSkyfile.php?pass=" . $pass . "&proj=" . $proj . "&diffRun.label=" . $thisLabel . "&diffRun.state=".$searchState;
         getStateAndFaults($db, $thisLabel, $selectedState, "diff", $str, $anyFaults);
         write_table_cell($class, '%s',  $anyFaults ? $link : "",  $str);
@@ -605,5 +608,6 @@
         ."&allservercmd=stop";
 
-    write_table_cell($class, '%s', $link, "Stop all");
+    $link = ""; # TODO removed links temporarily
+        write_table_cell($class, '%s', $link, "Stop all");
     $link = "czartool_labels.php?pass=".$pass
         ."&proj=".$proj
@@ -613,5 +617,6 @@
         ."&allservercmd=run";
 
-    write_table_cell($class, '%s', $link, "Run all");
+    $link = ""; # TODO removed links temporarily
+        write_table_cell($class, '%s', $link, "Run all");
     echo "</tr>\n";
 
@@ -628,5 +633,6 @@
             ."&plottype=".$plotType;
 
-        write_table_cell($class, '%s', $link, $server);
+        $link = ""; # TODO removed links temporarily
+            write_table_cell($class, '%s', $link, $server);
         write_table_cell($class, '%s', "", $alive ? "yes" : "NO");
 
@@ -644,5 +650,6 @@
 
                 $link = $link . "stop";
-                write_table_cell($class, '%s', $link, "stop");
+                $link = ""; # TODO removed links temporarily
+                    write_table_cell($class, '%s', $link, "stop");
                 write_table_cell($class, '%s', "", "");
             }
@@ -651,5 +658,6 @@
                 $link = $link . "run";
                 write_table_cell($class, '%s', "", "");
-                write_table_cell($class, '%s', $link, "run");
+                $link = ""; # TODO removed links temporarily
+                    write_table_cell($class, '%s', $link, "run");
             }
         }
@@ -759,21 +767,21 @@
 ###########################################################################
 function showReplicationsStatus($replHost, $replUser, $replPassword, $replDatabaseName) {
-  #print "<br>$replHost, $replUser, $replPassword, $replDatabaseName<br/>";
-  $dbRepl = DB::connect("mysql://$replUser:$replPassword@$replHost");
-  if (PEAR::isError($dbRepl)) {
-    die("MySQL DB connection error: Check the configuration for $replDatabaseName");
-  }
-  $res = $dbRepl->query('SHOW SLAVE STATUS');
-  while ($res->fetchInto($row)) {
-    # Have a look for Last_Errno in http://dev.mysql.com/doc/refman/5.0/en/show-slave-status.html
-    $errorStatusInMySql = $row[18];
-    $replStatus = ($errorStatusInMySql==0?"OK":"<font color=\"red\">PROBLEM</font>");
-    echo "<tr><td>$replDatabaseName</td><td>$replStatus</td></tr>";
-    if ($errorStatusInMySql!=0) {
-      echo "<tr><td colspan=\"2\">Connect to $replDatabaseName replication host, execute 'SHOW SLAVE STATUS', and fix the problem.<br/>";
-      echo "Information <a href=\"http://dev.mysql.com/doc/refman/5.0/en/show-slave-status.html\">here</a></td></tr>";
-    }
-  }
-  $dbRepl->disconnect();
+    #print "<br>$replHost, $replUser, $replPassword, $replDatabaseName<br/>";
+    $dbRepl = DB::connect("mysql://$replUser:$replPassword@$replHost");
+    if (PEAR::isError($dbRepl)) {
+        die("MySQL DB connection error: Check the configuration for $replDatabaseName");
+    }
+    $res = $dbRepl->query('SHOW SLAVE STATUS');
+    while ($res->fetchInto($row)) {
+        # Have a look for Last_Errno in http://dev.mysql.com/doc/refman/5.0/en/show-slave-status.html
+        $errorStatusInMySql = $row[18];
+        $replStatus = ($errorStatusInMySql==0?"OK":"<font color=\"red\">PROBLEM</font>");
+        echo "<tr><td>$replDatabaseName</td><td>$replStatus</td></tr>";
+        if ($errorStatusInMySql!=0) {
+            echo "<tr><td colspan=\"2\">Connect to $replDatabaseName replication host, execute 'SHOW SLAVE STATUS', and fix the problem.<br/>";
+            echo "Information <a href=\"http://dev.mysql.com/doc/refman/5.0/en/show-slave-status.html\">here</a></td></tr>";
+        }
+    }
+    $dbRepl->disconnect();
 }
 
Index: /branches/eam_branches/ipp-20101205/ippMonitor/raw/site.php.in
===================================================================
--- /branches/eam_branches/ipp-20101205/ippMonitor/raw/site.php.in	(revision 30102)
+++ /branches/eam_branches/ipp-20101205/ippMonitor/raw/site.php.in	(revision 30103)
@@ -27,5 +27,5 @@
 $REPL_DBNAME_GPC1 = "gpc1";
 
-$REPL_HOST_NEBULOUS = "ipp0222.IfA.Hawaii.Edu";
+$REPL_HOST_NEBULOUS = "ippdb02.IfA.Hawaii.Edu";
 $REPL_USER_NEBULOUS = "ippMonitor";
 $REPL_PASSWORD_NEBULOUS = "ippMonitor";
Index: /branches/eam_branches/ipp-20101205/pstamp/scripts/pstamp_job_run.pl
===================================================================
--- /branches/eam_branches/ipp-20101205/pstamp/scripts/pstamp_job_run.pl	(revision 30102)
+++ /branches/eam_branches/ipp-20101205/pstamp/scripts/pstamp_job_run.pl	(revision 30103)
@@ -277,9 +277,13 @@
         # silently skip them if they don't exist. Perhaps this should be
         # detected in pstampparse so that the user can be notified with 
-        # a message in parse_error.txt ("warp do not have a background model")
-        my $cmf_file = $params->{cmf} if ($options & $PSTAMP_SELECT_CMF);
+        # a message in parse_error.txt ("warp does not have a background model")
         my $psf_file = $params->{psf} if ($options & $PSTAMP_SELECT_PSF);
         my $backmdl_file = $params->{backmdl} if ($options & $PSTAMP_SELECT_BACKMDL);
         my $pattern_file = $params->{pattern} if ($options & $PSTAMP_SELECT_BACKMDL);
+        my $cmf_file;
+        if ($stage ne 'chip') {
+            # we don't ship chip stage cmf files because they may not be censored
+            $cmf_file = $params->{cmf} if ($options & $PSTAMP_SELECT_CMF);
+        }
 
         my $outdir = dirname($output_base);
Index: /branches/eam_branches/ipp-20101205/pstamp/scripts/pstampparse.pl
===================================================================
--- /branches/eam_branches/ipp-20101205/pstamp/scripts/pstampparse.pl	(revision 30102)
+++ /branches/eam_branches/ipp-20101205/pstamp/scripts/pstampparse.pl	(revision 30103)
@@ -126,4 +126,26 @@
 }
 
+# Adjust the label for requests coming in over the web interaface
+
+my $label_changed = 0;
+if ($label and $label eq "WEB.UP") {
+    my $lcname = lc($req_name);
+    if ($lcname =~ /pitt/) {
+        $label = "PITT";
+        $label_changed = 1;
+    } elsif ($lcname =~ /cfa/) {
+        $label = "CFA";
+        $label_changed = 1;
+    } elsif ($lcname =~ /durham/) {
+        $label = "DURHAM";
+        $label_changed = 1;
+    } elsif ($lcname =~ /qub/) {
+        $label = "QUB";
+        $label_changed = 1;
+    }
+    print "Setting label for $req_name to $label\n" if $label_changed;
+}
+
+
 if ($req_id and !$no_update) {
     # update the database with the request name. This will be used as the
@@ -131,4 +153,5 @@
     my $command = "$pstamptool -updatereq -req_id $req_id  -set_name $req_name";
     $command .= " -set_outProduct $product";
+    $command .= " -set_label $label" if $label_changed;
     my ( $success, $error_code, $full_buf, $stdout_buf, $stderr_buf ) =
         run(command => $command, verbose => $verbose);
Index: /branches/eam_branches/ipp-20101205/pstamp/src/ppstampMakeStamp.c
===================================================================
--- /branches/eam_branches/ipp-20101205/pstamp/src/ppstampMakeStamp.c	(revision 30102)
+++ /branches/eam_branches/ipp-20101205/pstamp/src/ppstampMakeStamp.c	(revision 30103)
@@ -320,5 +320,6 @@
         }
         if (readout->mask) {
-            outReadout->mask = extractStamp(readout->mask, extractRegion,  0);
+            psImageMaskType maskInitValue = pmConfigMaskGet("BLANK", config);
+            outReadout->mask = extractStamp(readout->mask, extractRegion,  maskInitValue);
             if (!outReadout->mask) {
                 psError(PS_ERR_UNKNOWN, false, "failed to create postage stamp mask image\n");
