IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Nov 19, 2009, 11:32:06 AM (17 years ago)
Author:
eugene
Message:

add function to reduce matches to best unique set

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/eam_branches/20091113/psastro/src/psastroMosaicSetMatch.c

    r26167 r26197  
    2626    double RADIUS = psMetadataLookupF32 (&status, recipe, radiusWord);
    2727    if (!status) {
    28         psError(PS_ERR_IO, false, "Failed to lookup matching radius: %s", radiusWord);
    29         psFree (view);
    30         return false;
     28        psAbort("Failed to lookup matching radius: %s", radiusWord);
     29    }
     30
     31    int uniqIter = psMetadataLookupS32 (&status, recipe, "PSASTRO.MOSAIC.UNIQ.ITER");
     32    if (!status) {
     33        psAbort("Failed to lookup matching PSASTRO.MOSAIC.UNIQ.ITER");
    3134    }
    3235
     
    6972                psTrace ("psastro", 4, "Matched %ld refstars\n", matches->n);
    7073
     74                if (iteration >= uniqIter) {
     75                    psArray *unique = pmAstromRadiusMatchUniq (rawstars, refstars, matches);
     76                    if (!unique) {
     77                        psLogMsg ("psastro", 3, "failed to generate a uniq set of matched sources\n");
     78                        return false;
     79                    }
     80                    psFree (matches);
     81                    matches = unique;
     82                }
     83
    7184                pmAstromVisualPlotMosaicMatches(rawstars, refstars, matches, iteration, recipe);
    7285
Note: See TracChangeset for help on using the changeset viewer.