IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Nov 8, 2010, 11:53:58 AM (16 years ago)
Author:
rhenders
Message:

improved args for rate plots

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/tools/czarplot.pl

    r29686 r29695  
    1515my $stage = undef;
    1616my $save_temps = undef;
    17 my $interval = undef;
     17my $timeinpast = undef;
    1818my $begin = undef;
    1919my $end = undef;
     
    2424my $timeSeries = undef;
    2525my $rate = undef;
     26my $rateInterval = undef;
    2627my $deriv = undef;
    2728my $showCleanup = undef;
     
    3536        "label|l=s" => \$label,
    3637        "stage|s=s" => \$stage,
    37         "interval|i=s" => \$interval,
     38        "timeinpast|p=s" => \$timeinpast,
     39        "rateinterval|i=s" => \$rateInterval,
    3840        "begin|b=s" => \$begin,
    3941        "end|e=s" => \$end,
     
    8688if (!$stage) {
    8789    print "* OPTIONAL: choose a stage                  -s <chip|cam|warp|etc>      (default=none)\n";}
    88 if (!$interval) {
    89     print "* OPTIONAL: choose time interval in past    -i <'1 hour'|'1 day'|etc>   (default=none\n";}
     90if (!$timeinpast) {
     91    print "* OPTIONAL: choose time interval in past    -p <'1 hour'|'1 day'|etc>   (default=none\n";}
     92if (!$rateInterval) {
     93    $rateInterval = "1 HOUR";
     94    print "* OPTIONAL: time interval for rate plot     -i <'1 hour'|'1 day'|etc>   (default=$rateInterval\n";}
    9095if (!$begin) {
    9196    print "* OPTIONAL: choose a begin time             -b <datetime>               (default=6:35am this morning)\n";}
     
    133138    if (!$begin) {
    134139
    135         if ($interval) {$begin = $czarDb->subtractInterval($end, $interval);}
     140        if ($timeinpast) {$begin = $czarDb->subtractInterval($end, $timeinpast);}
    136141        else {$begin =  strftime('%Y-%m-%d 06:35',localtime);}
    137142    }
     
    140145
    141146if ($rate) {
    142 
    143     if (!$interval) {$interval = "1 HOUR";}
    144     $plotter->createRateTimeSeries($label, $stage, $begin, $end, $interval, $log);
     147    $plotter->createRateTimeSeries($label, $stage, $begin, $end, $rateInterval, $log);
    145148    exit;
    146149}
Note: See TracChangeset for help on using the changeset viewer.