Index: trunk/tools/examine_burntool_pcontrol.pl
===================================================================
--- trunk/tools/examine_burntool_pcontrol.pl	(revision 25472)
+++ trunk/tools/examine_burntool_pcontrol.pl	(revision 25562)
@@ -5,9 +5,10 @@
 use Getopt::Std;
 
-getopts('hfcP',\%opt);
+getopts('hfcPv:',\%opt);
 if (exists($opt{h})) {
     print STDERR "Usage: examine_burntool_pcontrol.pl [-f] <pcontrol.pro>\n";
     print STDERR "         -f          Read all burntool entries, even those commented out.\n";
     print STDERR "         -c          Print out the needed mysql statement to do a convert. DOES NOT EXECUTE THIS!\n";
+    print STDERR "         -v <val>    Use this value as the target burntool_state in convert statements.\n";
     print STDERR "         -P          Print out the ipp_apply_burntool.pl commands, even if fully updated.\n";
     print STDERR "\n";
@@ -124,7 +125,6 @@
     # Get the data.  The limit is there to keep the database happy.  I don't think you can observe that many
     # images on a single night.
-    $sth = "SELECT exp_id,exp_name,obs_mode,dateobs,class_id,burntool_state,comment FROM rawImfile WHERE dateobs >= '${dmin}' AND dateobs <= '${dmax}' order by dateobs limit 60000";
-
-    $no_sth = "UPDATE rawImfile SET burntool_state = $convert_bt_state WHERE dateobs >= '${dmin}' AND dateobs <= '${dmax}' AND user_1 = 1.0;";
+    $sth = "SELECT exp_id,exp_name,obs_mode,dateobs,class_id,burntool_state,comment FROM rawImfile WHERE dateobs >= '${dmin}' AND dateobs <= '${dmax}' order by dateobs limit 600000";
+
     $data_ref = $db->selectall_arrayref( $sth );
 
@@ -140,4 +140,10 @@
     print "#### $sth\n";
     if (exists($opt{c})) {
+	if (exists($opt{v})) {
+	    $no_sth = "UPDATE rawImfile SET burntool_state = $opt{v} WHERE dateobs >= '${dmin}' AND dateobs <= '${dmax}';";
+	}
+	else {
+	    $no_sth = "UPDATE rawImfile SET burntool_state = $convert_bt_state WHERE dateobs >= '${dmin}' AND dateobs <= '${dmax}';";
+	}
 	print "#### $no_sth\n";
     }
Index: trunk/tools/make_burntool_pcontrol.pl
===================================================================
--- trunk/tools/make_burntool_pcontrol.pl	(revision 25472)
+++ trunk/tools/make_burntool_pcontrol.pl	(revision 25562)
@@ -8,5 +8,5 @@
 use constant DB_SOCKET => '/var/run/mysqld/mysqld.sock';
 
-getopts('hbQ:d:',\%opt);
+getopts('hbPQ:d:',\%opt);
 if (exists($opt{h})) {
     print STDERR "Usage: make_burntool_pcontrol.pl -b {-Q <SQL_WHERE> | -d <DATE> | DATE_MIN0 DATE_MAX0 DATE_MIN1 DATE_MAX1 [...]}\n";
@@ -16,4 +16,5 @@
     print STDERR "         -d DATE           Specify a single day to look for.\n";
     print STDERR "         -b                Only print burntool lines.\n";
+    print STDERR "         -P                PR images have bad obs_mode values. Work around that.\n";
     print STDERR "\n";
     print STDERR "         Scans the GPC1 database, and identifies \"science\" observations based on the obs_mode.\n";
@@ -37,5 +38,7 @@
 %science = ('MD' => 1, '3PI' => 1, 'STS' => 1, 'CAL' => 1, 'M31' => 1, 'SS' => 1,
 	    'ENGINEERING' => 0, 'NULL' => 0, 'Unknown' => 0, ' ' => 0);
-
+if (exists($opt{P})) {
+    $science{Unknown} = 1;
+}
 # Zero the arrays.
 @dates_min = ();
