IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Mar 6, 2009, 12:48:29 PM (17 years ago)
Author:
Paul Price
Message:

Moving hardwired ppStack values to recipe. Adjusting what's now ZP.MATCH to 0.3 from 0.5 --- not enough sources were getting through, resulting in errors for subtraction (can't find stamps, can't measure PSF).

File:
1 edited

Legend:

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

    r23211 r23212  
    8181
    8282    float radius = psMetadataLookupF32(NULL, recipe, "ZP.RADIUS"); // Radius (pixels) for matching sources
    83     int iter = psMetadataLookupS32(NULL, recipe, "ZP.ITER"); // Maximum iterations
     83    int iter1 = psMetadataLookupS32(NULL, recipe, "ZP.ITER.1"); // Maximum iterations for pass 1
     84    int iter2 = psMetadataLookupS32(NULL, recipe, "ZP.ITER.2"); // Maximum iterations for pass 2
    8485    float tol = psMetadataLookupF32(NULL, recipe, "ZP.TOL"); // Tolerance for zero point iterations
    8586    int transIter = psMetadataLookupS32(NULL, recipe, "ZP.TRANS.ITER"); // Iterations for transparency
    8687    float transRej = psMetadataLookupF32(NULL, recipe, "ZP.TRANS.REJ");// Rejection threshold for transparency
    8788    float transThresh = psMetadataLookupF32(NULL, recipe, "ZP.TRANS.THRESH"); // Threshold for transparency
    88     float starRej = psMetadataLookupF32(NULL, recipe, "ZP.STAR.REJ"); // Rejection threshold for stars
     89
     90    float starRej1 = psMetadataLookupF32(NULL, recipe, "ZP.STAR.REJ.1"); // Rejection threshold for stars
     91    float starSys1 = psMetadataLookupF32(NULL, recipe, "ZP.STAR.SYS.1"); // Estimated systematic error
     92    float starRej2 = psMetadataLookupF32(NULL, recipe, "ZP.STAR.REJ.2"); // Rejection threshold for stars
     93    float starSys2 = psMetadataLookupF32(NULL, recipe, "ZP.STAR.SYS.2"); // Estimated systematic error
     94
    8995    float starLimit = psMetadataLookupF32(NULL, recipe, "ZP.STAR.LIMIT"); // Limit on star rejection fraction
    90     float starSys = psMetadataLookupF32(NULL, recipe, "ZP.STAR.SYS"); // Estimated systematic error
     96
     97    float fracMatch = psMetadataLookupF32(NULL, recipe, "ZP.MATCH"); // Fraction of images to match for star
    9198
    9299    psMetadata *airmassZP = psMetadataLookupMetadata(NULL, recipe, "ZP.AIRMASS"); // Airmass terms
     
    164171#endif
    165172
    166     psVector *trans = pmSourceMatchRelphot(matches, zp, iter, tol, starLimit, transIter, transRej,
    167                                            transThresh, starRej, starSys); // Transparencies for each image
     173    psVector *trans = pmSourceMatchRelphot(matches, zp, tol, iter1, starRej1, starSys1,
     174                                           iter2, starRej2, starSys2, starLimit,
     175                                           transIter, transRej, transThresh); // Transparencies for each image
    168176    if (!trans) {
    169177        psError(PS_ERR_UNKNOWN, false, "Unable to measure transparencies");
     
    184192    // XXX this is a really poor output location; clean up the pmFPAfiles used in ppStack
    185193    pmCell *sourcesCell = pmFPAfileThisCell(config->files, view, "PPSTACK.OUTPUT");
    186     psArray *sourcesBest = psArrayAllocEmpty (100);
    187 
    188     // XXX something of a hack: require at least 2 detections or 1/2 of the max possible
    189     int minMatches = PS_MAX(2, 0.3*num);// Minimum number of matches required
     194    psArray *sourcesBest = psArrayAllocEmpty(matches->n);
     195
     196    // XXX something of a hack: require at least 2 detections or the nominated fraction of the max possible
     197    int minMatches = PS_MAX(2, fracMatch * num);// Minimum number of matches required
    190198    for (int i = 0; i < matches->n; i++) {
    191199        pmSourceMatch *match = matches->data[i]; // Match of interest
     
    200208        pmSource *source = sources->data[index]; // Source of interest
    201209
    202         psArrayAdd(sourcesBest, 100, source);
     210        psArrayAdd(sourcesBest, sourcesBest->n, source);
    203211    }
    204212    psMetadataAdd(sourcesCell->analysis, PS_LIST_TAIL, "PSPHOT.SOURCES", PS_DATA_ARRAY | PS_META_REPLACE,
Note: See TracChangeset for help on using the changeset viewer.