IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 15610


Ignore:
Timestamp:
Nov 13, 2007, 12:35:17 PM (18 years ago)
Author:
Paul Price
Message:

Ensuring the fraction is calculated properly.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/pswarp/src/pswarpPixelFraction.c

    r15608 r15610  
    3939    long numPix = numCols * numRows;
    4040
    41     int numBad = 0;                     // Number of bad pixels
     41    long numBad = 0;                     // Number of bad pixels
    4242    for (int y = 0; y < numRows; y++) {
    4343        for (int x = 0; x < numCols; x++) {
     
    4848    }
    4949
    50     float goodFrac = (numPix - numBad) / numPix; // Fraction of good pixels
     50    float goodFrac = (numPix - numBad) / (float)numPix; // Fraction of good pixels
    5151    bool accept = (goodFrac >= minFrac ? true : false); // Accept this readout?
    5252
Note: See TracChangeset for help on using the changeset viewer.