IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Oct 15, 2010, 12:34:37 PM (16 years ago)
Author:
rhenders
Message:

Added first derivative plots

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/tools/czartool/Plotter.pm

    r29377 r29437  
    130130###########################################################################
    131131sub createTimeSeries {
    132     my ($self, $label, $selectedStage, $beginTime, $endTime, $isLog, $showCleanup) = @_;
     132    my ($self, $label, $selectedStage, $beginTime, $endTime, $isLog, $showCleanup, $deriv) = @_;
    133133
    134134    my $minX = 999999999;     
     
    156156                    \$gnuplotFile,
    157157                    $isLog,
    158                     $showCleanup)) {
     158                    $showCleanup,
     159                    $deriv)) {
    159160
    160161            $gnuplotFiles{$stage} = $gnuplotFile;
     
    186187            $minX,
    187188            $timeDiff,
    188             $isLog);
     189            $isLog,
     190            $deriv);
    189191}                                                   
    190192
     
    325327###########################################################################
    326328sub plotTimeSeries {
    327     my ($self, $gnuplotFiles, $outputFile, $label, $fromTime, $toTime, $maxX, $minX, $timeDiff, $isLog) = @_;
     329    my ($self, $gnuplotFiles, $outputFile, $label, $fromTime, $toTime, $maxX, $minX, $timeDiff, $isLog, $isDeriv) = @_;
    328330
    329331    my $timeFormat = undef;
    330332    my $divX = undef;
    331333    my $yTitle = undef;
    332     if ($isLog) {$yTitle = "Log( numExposures )";}
    333     else {$yTitle = "numExposures";}
     334    if ($isLog) {$yTitle = "Log( Exposures )";}
     335    elsif ($isDeriv) {$yTitle = "dExposures/dTime";}
     336    else {$yTitle = "Exposures";}
    334337
    335338    $self->getTimeSpacing($timeDiff, \$divX, \$timeFormat);
    336339
    337340    my $numOfPlots = keys %$gnuplotFiles;
    338     my $title = undef;
    339341
    340342    # sort out plot title
    341     if ($numOfPlots == 1) {foreach my $stage (keys %$gnuplotFiles) {$title = "'".$stage."'";}}
    342     else {$title = "'All stages'"}
     343    my $title = "";
     344    if ($isDeriv) {$title .= "First derivatives of "}
     345    if ($numOfPlots == 1) {foreach my $stage (keys %$gnuplotFiles) {$title .= "'".$stage."'";}}
     346    else {$title .= "'all stages'"}
    343347
    344348    $title .= " for '$label', '$fromTime' to '$toTime'";
     
    369373        if ($numOfPlots == 1) {
    370374
     375            print GP "'" . $gnuplotFiles->{$stage} . "' using 1:2 title \"Pending\" with lines lt 4 lw 2,";
    371376            print GP "'" . $gnuplotFiles->{$stage} . "' using 1:4 title \"Processed\" with lines lt 2 lw 2,";
    372             print GP "'" . $gnuplotFiles->{$stage} . "' using 1:2 title \"Pending\" with lines lt 4 lw 2,";
    373377            print GP "'" . $gnuplotFiles->{$stage} . "' using 1:3 title \"Faults\" with lines lt 7 lw 2";
    374378        }
Note: See TracChangeset for help on using the changeset viewer.