IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Nov 12, 2010, 3:11:27 PM (15 years ago)
Author:
rhenders
Message:

added methods to create plots showing magic mask fraction

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/tools/czarplot.pl

    r29737 r29765  
    88
    99use czartool::CzarDb;
     10use czartool::Gpc1Db;
    1011use czartool::Plotter;
    1112use czartool::StageMetrics;
     
    2425my $timeSeries = undef;
    2526my $rate = undef;
     27my $magicMask = undef;
    2628my $rateInterval = undef;
    2729my $deriv = undef;
     
    3032my $savingToFile = undef;
    3133my $analysis = undef;
     34my $exposureId = undef;
    3235my $log = undef;
    3336
     
    3841        "timeinpast|p=s" => \$timeinpast,
    3942        "rateinterval|i=s" => \$rateInterval,
     43        "exposureid|x=s" => \$exposureId,
     44        "mask|m" => \$magicMask,
    4045        "begin|b=s" => \$begin,
    4146        "end|e=s" => \$end,
     
    6772if (!$timeSeries) {
    6873    print "* OPTIONAL: plot timeseries                 -t                          (default=on)\n";}
     74if (!$magicMask) {
     75    print "* OPTIONAL: plot magic mask for these times -m                          (default=off)\n";}
     76if (!$exposureId) {
     77    print "* OPTIONAL: set exposure ID for magic mask  -x                          (default=none)\n";}
    6978if (!$rate) {
    70     print "* OPTIONAL: plot timeseries of rate         -r                          (default=off)\n";}
     79    print "* OPTIONAL: plot histogram of rate          -r                          (default=off)\n";}
    7180if (!$deriv) {
    7281    $deriv = 0;
     
    106115
    107116# default values
    108 if (!$nebulous && !$histogram && !$analysis && !$timeSeries) {$timeSeries = 1; $histogram = 0;}
     117if (!$rate && !$magicMask && !$nebulous && !$histogram && !$analysis && !$timeSeries) {$timeSeries = 1;}
    109118if (!$verbose) {$verbose = 0;}
    110119if (!$save_temps) {$save_temps = 0;}
     
    112121else {$savingToFile = 1;}
    113122
     123my $gpc1Db = new czartool::Gpc1Db("gpc1", "ippdb01", "ippuser", "ippuser");
    114124my $czarDb = new czartool::CzarDb($czarDbName, "ippdb01", "ipp", "ipp", $verbose, $save_temps);
    115125$czarDb->setDateFormat("%Y%m%d-%H%i%s");
     
    117127
    118128my $plotter = new czartool::Plotter(
     129        $gpc1Db,
    119130        $czarDb,
    120131        "%Y%m%d-%H%M%S",
     
    151162if ($nebulous && $timeSeries) {$plotter->plotStorageTimeSeries($begin, $end);}
    152163elsif ($nebulous) {$plotter->plotDiskUsageHistogram();}
     164if ($magicMask) {
     165   
     166    if ($exposureId) {$plotter->plotMagicMaskFractionForThisExposure($exposureId);}
     167    else {$plotter->plotMagicMaskFractionHistogram($begin, $end);}
    153168
     169}
    154170
    155171if($analysis) {
Note: See TracChangeset for help on using the changeset viewer.