IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 20555


Ignore:
Timestamp:
Nov 5, 2008, 3:23:14 PM (18 years ago)
Author:
Paul Price
Message:

Print number of good and bad.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/ippScripts/scripts/ds9_cmf_regions.pl

    r19212 r20555  
    6969
    7070my ($coordFile, $coordName) = tempfile( "/tmp/ds9_cmf_regions.XXXX", UNLINK => !$save_temps );
     71my $numGood = 0;                # Number of good sources
     72my $numBad = 0;                 # Number of bad sources
    7173for (my $i = 0; $i < $numRows; $i++) {
    72     print $coordFile "image; circle(" . ($$x[$i] + 1) . ',' . ($$y[$i] + 1) . ",$radius) \# color = " .
    73         (($$flags[$i] & $flag) ? $flag_colour : $colour) . "\n";
     74    my $col;                    # Colour to use
     75    if ($$flags[$i] & $flag) {
     76        $numBad++;
     77        $col = $flag_colour;
     78    } else {
     79        $numGood++;
     80        $col = $colour;
     81    }
     82    print $coordFile "image; circle(" . ($$x[$i] + 1) . ',' . ($$y[$i] + 1) . ",$radius) \# color = $col\n";
    7483}
    7584close $coordFile;
     
    8594xpaset(@settings);
    8695
    87 print "Plotted $numRows sources.\n";
     96print "Plotted $numRows ($numGood good, $numBad bad) sources.\n";
    8897
    8998### Pau.
Note: See TracChangeset for help on using the changeset viewer.