IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Oct 23, 2007, 1:52:49 PM (19 years ago)
Author:
Paul Price
Message:

Using fake image instead of individual fake sources. Was losing most of the suitable stamp stars because they were too close to other stars (or artifacts). In order to get around this, need to generate all sources that might be near a footprint; it's easier to just do everything on the image.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/ppStack/src/ppStackMatch.c

    r15303 r15368  
    5858    }
    5959
     60    // Generate a fake image to match to
     61    float maxMag = -INFINITY;           // Maximum magnitude of sources
     62    for (int i = 0; i < sources->n; i++) {
     63        pmSource *source = sources->data[i]; // Source of interest
     64        if (source->psfMag > maxMag) {
     65            maxMag = source->psfMag;
     66        }
     67    }
     68    pmReadout *fake = pmReadoutFakeFromSources(input->image->numCols, input->image->numRows,
     69                                               sources, target, powf(10.0, -0.4 * maxMag));
     70
     71
    6072    // Do the image matching
    61     if (!pmSubtractionMatch(output, input, NULL, footprint, regionSize, spacing, threshold, sources,
     73    if (!pmSubtractionMatch(output, input, fake, footprint, regionSize, spacing, threshold, sources,
    6274                            stampsName, target, type, size, order, widths, orders, inner, ringsOrder,
    6375                            binning, optimum, optWidths, optOrder, optThresh, iter, rej, maskBad,
    6476                            maskBlank, badFrac)) {
    6577        psError(PS_ERR_UNKNOWN, false, "Unable to match images.");
     78        psFree(fake);
    6679        psFree(optWidths);
    6780        return false;
    6881    }
     82    psFree(fake);
    6983    psFree(optWidths);
    7084
Note: See TracChangeset for help on using the changeset viewer.