IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Jan 2, 2010, 6:13:37 PM (17 years ago)
Author:
eugene
Message:

adding window to dual convolution; fixing normalization for deconvolved-hermitians

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/eam_branches/20091201/psModules/src/imcombine/pmSubtractionStamps.c

    r26471 r26502  
    8181
    8282// Search a region for a suitable stamp
    83 bool stampSearch(int *xStamp, int *yStamp, // Coordinates of stamp, to return
     83bool stampSearch(float *xStamp, float *yStamp, // Coordinates of stamp, to return
    8484                 float *fluxStamp, // Flux of stamp, to return
    8585                 const psImage *image1, const psImage *image2, // Images to search
     
    116116                ((image1) ? image1->data.F32[y][x] : image2->data.F32[y][x]); // Flux at pixel
    117117            if (flux > *fluxStamp) {
    118                 *xStamp = x;
    119                 *yStamp = y;
     118                *xStamp = x + 0.5;
     119                *yStamp = y + 0.5;
    120120                *fluxStamp = flux;
    121121                found = true;
     
    405405            numSearch++;
    406406
    407             int xStamp = 0, yStamp = 0; // Coordinates of stamp
     407            float xStamp = 0.0, yStamp = 0.0; // Coordinates of stamp
    408408            float fluxStamp = -INFINITY; // Flux of stamp
    409409            bool goodStamp = false;     // Found a good stamp?
     
    437437                    goodStamp = stampSearch(&xStamp, &yStamp, &fluxStamp, image1, image2, thresh1, thresh2,
    438438                                            subMask, xMin, xMax, yMin, yMax, numCols, numRows, border);
     439
     440                    // XXX reset for a test:
     441                    xStamp = xList->data.F32[j];
     442                    yStamp = yList->data.F32[j];
     443                    fprintf (stderr, "find: %d %d ==> %5.1f %5.1f\n", xCentre, yCentre, xStamp, yStamp);
    439444                }
    440445            } else {
     
    543548        }
    544549
     550        fprintf (stderr, "stamp: %5.1f %5.1f == %d %d\n", xStamp, yStamp, xPix, yPix);
     551
    545552        bool found = false;
    546553        for (int j = 0; j < numStamps && !found; j++) {
     
    735742            return false;
    736743        }
     744        fprintf (stderr, "stamp: %5.1f %5.1f == %d %d\n", stamp->x, stamp->y, x, y);
    737745
    738746        // Catch memory leaks --- these should have been freed and NULLed before
     
    811819            y->data.F32[numOut] = source->peak->yf;
    812820        }
     821        fprintf (stderr, "stamp: %5.1f %5.1f\n", x->data.F32[numOut], y->data.F32[numOut]);
    813822        numOut++;
    814823    }
Note: See TracChangeset for help on using the changeset viewer.