IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 23679


Ignore:
Timestamp:
Apr 2, 2009, 12:06:37 PM (17 years ago)
Author:
Paul Price
Message:

Fixing syntax errors in pswarpPixelFraction. Renaming this function (and its file) more along the lines of its current purpose: investigate the lit pixels (don't bother about the fraction, because ppStats will calculate that).

Location:
branches/pap/pswarp
Files:
3 edited
1 moved

Legend:

Unmodified
Added
Removed
  • branches/pap/pswarp/pswarpPixelsLit.c

    r23677 r23679  
    2121#include "pswarp.h"
    2222
    23 bool pswarpPixelFraction(const pmReadout *readout, psMetadata *stats, const pmConfig *config)
     23bool pswarpPixelsLit(const pmReadout *readout, psMetadata *stats, const pmConfig *config)
    2424{
    2525    PS_ASSERT_PTR_NON_NULL(readout, false);
     
    5252    // output mask bits
    5353    psImageMaskType maskValue = psMetadataLookupImageMask(&status, recipe, "MASK.OUTPUT");
    54     psAssert (status, "MASK.OUTPUT was not defined");
     54    psAssert(status, "MASK.OUTPUT was not defined");
    5555
    5656    psImage *image = readout->image;    ///< Image of interest
     
    6262    int xMin = INT_MAX, xMax = -INT_MAX, yMin = INT_MAX, yMax = -INT_MAX;
    6363
    64     long numGood = 0;                   ///< Number of bad pixels
    6564    for (int y = 0; y < numRows; y++) {
    6665        for (int x = 0; x < numCols; x++) {
    67             if (!(mask->data.PS_TYPE_IMAGE_MASK_DATA[y][x] & maskValue))
     66            if (!(mask->data.PS_TYPE_IMAGE_MASK_DATA[y][x] & maskValue)) {
    6867                if (y > yMax) {
    6968                    yMax = y;
  • branches/pap/pswarp/src/Makefile.am

    r23170 r23679  
    2424        pswarpMatchRange.c              \
    2525        pswarpParseCamera.c             \
    26         pswarpPixelFraction.c           \
     26        pswarpPixelsLit.c               \
    2727        pswarpSetMaskBits.c             \
    2828        pswarpSetThreads.c              \
  • branches/pap/pswarp/src/pswarp.h

    r23487 r23679  
    102102                          const char *filename, const char *argname);
    103103
    104 /// Check to see if the readout has a minimum fraction of "lit" pixels
    105 bool pswarpPixelFraction(const pmReadout *readout, ///< Readout to inspect
    106                          psMetadata *stats, ///< Statistics to update with the result
    107                          const pmConfig *config ///< Configuration
     104/// Get the range of lit pixels
     105bool pswarpPixelsLit(const pmReadout *readout, ///< Readout to inspect
     106                     psMetadata *stats, ///< Statistics to update with the result
     107                     const pmConfig *config ///< Configuration
    108108    );
    109109
  • branches/pap/pswarp/src/pswarpLoop.c

    r23677 r23679  
    290290    pmFPA *outFPA = outChip->parent;    ///< Output FP
    291291
    292     if (pswarpPixelFraction(output, stats, config)) {
     292    if (pswarpPixelsLit(output, stats, config)) {
    293293        psError(PS_ERR_UNKNOWN, false, "Unable to calculate pixel regions.");
    294294        psFree(cells);
Note: See TracChangeset for help on using the changeset viewer.