Index: trunk/tools/czarplot.pl
===================================================================
--- trunk/tools/czarplot.pl	(revision 29765)
+++ trunk/tools/czarplot.pl	(revision 29862)
@@ -45,5 +45,5 @@
         "begin|b=s" => \$begin,
         "end|e=s" => \$end,
-        "day|y=s" => \$day,
+        "day|d=s" => \$day,
         "output|o=s" => \$path,
         "histogram|h" => \$histogram,
@@ -51,5 +51,5 @@
         "cleanup|c" => \$showCleanup,
         "rate|r" => \$rate,
-        "deriv|d" => \$deriv,
+        "deriv|f" => \$deriv,
         "analysis|a" => \$analysis,
         "timeseries|t" => \$timeSeries,
@@ -80,5 +80,5 @@
 if (!$deriv) {
     $deriv = 0;
-    print "* OPTIONAL: plot first derivative           -d                          (default=$deriv)\n";} 
+    print "* OPTIONAL: plot first derivative           -f                          (default=$deriv)\n";} 
 if (!$analysis) {
     $analysis = 0;
@@ -106,5 +106,5 @@
     print "* OPTIONAL: choose an end time              -e <datetime>               (default=now)\n";} 
 if (!$day) {
-    print "* OPTIONAL: choose a single day to plot     -y <date>                   (default=today)\n";} 
+    print "* OPTIONAL: choose a single day to plot     -d <date>                   (default=today)\n";} 
 if (!$path) {
     print "* OPTIONAL: choose an output location       -o <path>                   (default=none)\n";
@@ -137,9 +137,15 @@
 if($day) {
 
-    # day plots should run from about 6:30am until midnight
-    $begin =  "$day 06:35";
-    $end = "$day 23:59";
-        print "JKJKJK '$begin' '$end' \n";
+    if ($magicMask) {
 
+        $begin =  $day;
+        $end = $day;
+    }
+    else {
+
+        # day plots should run from about 6:30am until midnight
+        $begin = "$day 06:35";
+        $end = "$day 23:59";
+    }
 }
 else {
@@ -152,8 +158,7 @@
     }
 }
-my $diskUsage = 1; # TODO
+if ($rate) {
 
-if ($rate) {
-    $plotter->createRateTimeSeries($label, $stage, $begin, $end, $rateInterval, $log);
+    $plotter->createRateTimeSeries($label, $stage, $begin, $end, $rateInterval);
     exit;
 }
@@ -165,5 +170,5 @@
     
     if ($exposureId) {$plotter->plotMagicMaskFractionForThisExposure($exposureId);}
-    else {$plotter->plotMagicMaskFractionHistogram($begin, $end);}
+    else {$plotter->plotMagicMaskFraction($begin, $end);}
 
 }
