Changeset 21323 for trunk/pswarp/src/pswarpPixelFraction.c
- Timestamp:
- Feb 5, 2009, 10:44:04 AM (17 years ago)
- File:
-
- 1 edited
-
trunk/pswarp/src/pswarpPixelFraction.c (modified) (5 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/pswarp/src/pswarpPixelFraction.c
r21183 r21323 1 /** @file pswarpPixelFraction.c 2 * 3 * @brief 4 * 5 * @ingroup pswarp 6 * 7 * @author IfA 8 * @version $Revision: 1.6 $ $Name: not supported by cvs2svn $ 9 * @date $Date: 2009-02-05 20:44:04 $ 10 * Copyright 2009 Institute for Astronomy, University of Hawaii 11 */ 12 1 13 #ifdef HAVE_CONFIG_H 2 14 #include <config.h> … … 30 42 bool status; 31 43 32 float minFrac = psMetadataLookupF32(NULL, config->arguments, "ACCEPT.FRAC"); // Minimum fraction44 float minFrac = psMetadataLookupF32(NULL, config->arguments, "ACCEPT.FRAC"); ///< Minimum fraction 33 45 34 46 // load the recipe … … 43 55 psAssert (status, "MASK.OUTPUT was not defined"); 44 56 45 psImage *image = readout->image; // Image of interest46 psImage *mask = readout->mask; // Mask image57 psImage *image = readout->image; ///< Image of interest 58 psImage *mask = readout->mask; ///< Mask image 47 59 48 int numCols = image->numCols, numRows = image->numRows; // Size of image60 int numCols = image->numCols, numRows = image->numRows; ///< Size of image 49 61 long numPix = numCols * numRows; 50 62 … … 52 64 int xMin = INT_MAX, xMax = -INT_MAX, yMin = INT_MAX, yMax = -INT_MAX; 53 65 54 long numBad = 0; // Number of bad pixels66 long numBad = 0; ///< Number of bad pixels 55 67 for (int y = 0; y < numRows; y++) { 56 68 for (int x = 0; x < numCols; x++) { … … 74 86 } 75 87 76 float goodFrac = (numPix - numBad) / (float)numPix; // Fraction of good pixels77 bool accept = (goodFrac >= minFrac ? true : false); // Accept this readout?88 float goodFrac = (numPix - numBad) / (float)numPix; ///< Fraction of good pixels 89 bool accept = (goodFrac >= minFrac ? true : false); ///< Accept this readout? 78 90 79 91 if (stats) {
Note:
See TracChangeset
for help on using the changeset viewer.
