IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 20568 for trunk/ppSub/src


Ignore:
Timestamp:
Nov 6, 2008, 2:07:23 PM (18 years ago)
Author:
Paul Price
Message:

Adding parameter 'stride' to control the size of convolution patches (in pmSubtractionConvolve). Previously we have made this the (full) size of the kernel, but there's no reason why it can't be bigger. Making this value larger means the kernel doesn't have to be generated as often.

Location:
trunk/ppSub/src
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/ppSub/src/ppSubArguments.c

    r20517 r20568  
    211211    psMetadataAddF32(arguments, PS_LIST_TAIL, "-spacing", 0, "Typical stamp spacing (pixels)", NAN);
    212212    psMetadataAddS32(arguments, PS_LIST_TAIL, "-footprint", 0, "Stamp footprint half-size (pixels)", -1);
     213    psMetadataAddS32(arguments, PS_LIST_TAIL, "-stride", 0, "Size of convolution patches (pixels)", -1);
    213214    psMetadataAddF32(arguments, PS_LIST_TAIL, "-threshold", 0, "Minimum threshold for stamps (ADU)", NAN);
    214215    psMetadataAddS32(arguments, PS_LIST_TAIL, "-iter", 0, "Number of rejection iterations", -1);
     
    300301    VALUE_ARG_RECIPE_INT("-spam-binning", "SPAM.BINNING",    S32, 0);
    301302    VALUE_ARG_RECIPE_INT("-footprint",    "STAMP.FOOTPRINT", S32, -1);
     303    VALUE_ARG_RECIPE_INT("-stride",       "STRIDE",          S32, -1);
    302304    VALUE_ARG_RECIPE_FLOAT("-threshold",  "STAMP.THRESHOLD", F32);
    303305    VALUE_ARG_RECIPE_INT("-iter",         "ITER",            S32, -1);
  • trunk/ppSub/src/ppSubReadout.c

    r20554 r20568  
    9191    int footprint = psMetadataLookupS32(NULL, recipe, "STAMP.FOOTPRINT"); // Stamp half-size
    9292    float threshold = psMetadataLookupF32(NULL, recipe, "STAMP.THRESHOLD"); // Threshold for stmps
     93    int stride = psMetadataLookupS32(NULL, recipe, "STRIDE"); // Size of convolution patches
    9394    int iter = psMetadataLookupS32(NULL, recipe, "ITER"); // Rejection iterations
    9495    float rej = psMetadataLookupF32(NULL, recipe, "REJ"); // Rejection threshold
     
    191192
    192193    // Match the PSFs
    193     if (!pmSubtractionMatch(inConv, refConv, inRO, refRO, footprint, regionSize, spacing, threshold, sources,
    194                             stampsName, type, size, order, widths, orders, inner, ringsOrder, binning,
    195                             penalty, optimum, optWidths, optOrder, optThresh, iter, rej, sys, maskVal,
    196                             maskBad, maskPoor, poorFrac, badFrac, subMode)) {
     194    if (!pmSubtractionMatch(inConv, refConv, inRO, refRO, footprint, stride, regionSize, spacing, threshold,
     195                            sources, stampsName, type, size, order, widths, orders, inner, ringsOrder,
     196                            binning, penalty, optimum, optWidths, optOrder, optThresh, iter, rej, sys,
     197                            maskVal, maskBad, maskPoor, poorFrac, badFrac, subMode)) {
    197198        psError(PS_ERR_UNKNOWN, false, "Unable to match images.");
    198199        psFree(inConv);
     
    580581            psArray *sources = psMetadataLookupPtr(NULL, photRO->analysis, "PSPHOT.SOURCES"); // Sources
    581582            FILE *sourceFile = fopen("sources.dat", "w"); // File for sources
    582             fprintf(sourceFile, "# x y mag mag_err psf_chisq cr_nsigma ext_nsigma psf_qf flags m_x m_y m_xx m_xy m_yy\n");
     583            fprintf(sourceFile,
     584                    "# x y mag mag_err psf_chisq cr_nsigma ext_nsigma psf_qf flags m_x m_y m_xx m_xy m_yy\n");
    583585            for (int i = 0; i < sources->n; i++) {
    584586                pmSource *source = sources->data[i];
Note: See TracChangeset for help on using the changeset viewer.