IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 29771


Ignore:
Timestamp:
Nov 12, 2010, 4:37:29 PM (15 years ago)
Author:
rhenders
Message:

Minor cleanup

File:
1 edited

Legend:

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

    r29764 r29771  
    599599    my ($self, $begin, $end) = @_;
    600600
     601    # get exposures between these dates
     602    my $exp_ids = undef;
     603    if (!$self->{_gpc1Db}->getProcessedExposures($begin, $end, \$exp_ids)) {return 0;}
     604    my $totalExp = @{$exp_ids};
     605    if ($totalExp < 1) {return 0;}
     606
    601607    # set up file stuff
    602608    my $prefix = $self->{_outputPath} ? $self->{_outputPath} : "."; # TODO should be function for this
     
    604610    my $distOutputFile = "$prefix/czarplot_magic_mask_fraction_d.png";
    605611    my $tmpFile = File::Temp->new( TEMPLATE => "czarplot_magic_mask_fraction.XXXXX", DIR => '/tmp', SUFFIX => 'dat');
    606 
    607     my $exp_ids = undef;
    608     if (!$self->{_gpc1Db}->getProcessedExposures($begin, $end, \$exp_ids)) {return 0;}
    609 
    610612
    611613    # set up bins
     
    628630        $mask = $self->{_gpc1Db}->getAverageMagicMaskFraction(@{$row}[0]);
    629631
    630         if (!$mask) {print "can't get value for @{$row}[0]\n";next;}
     632        if (!$mask) {next;}
    631633        $expCount++;
    632634
     
    641643
    642644    # write data to GNUPLOT data file
    643     my $totalExp = @{$exp_ids};
    644645    print "* Found mask values for $expCount exposures out of $totalExp\n";
    645646    open (GNUDAT, ">".$tmpFile->filename);
     
    665666    print GP
    666667        "set term $self->{_outputFormat};" .
    667         "set title \"Magic mask fraction for $expCount (of $totalExp) exposures between '$begin' and '$end'\";" .
     668        "set title \"Magic mask fraction for $expCount exposures between '$begin' and '$end'\";" .
    668669        "set grid;" .
    669670        "set boxwidth;" .
Note: See TracChangeset for help on using the changeset viewer.