IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Oct 12, 2007, 12:29:09 PM (19 years ago)
Author:
Paul Price
Message:

Putting in mechanism to toss out image with insufficient good pixels.

File:
1 edited

Legend:

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

    r15225 r15303  
    5454        pmReadout *ro = pmFPAviewThisReadout(view, inputFile->fpa); // Corresponding readout
    5555
    56         psListAdd(fpaList, PS_LIST_TAIL, inputFile->fpa);
    57         psListAdd(cellList, PS_LIST_TAIL, ro->parent);
    58 
    5956        bool mdok;                      // Status of MD lookup
    6057        float weighting = psMetadataLookupF32(&mdok, inputFile->fpa->analysis,
     
    9188#ifndef NO_CONVOLUTION
    9289        if (!ppStackMatch(convolved, ro, sources, config)) {
    93             psError(PS_ERR_UNKNOWN, false, "Unable to match image %d.", fileNum);
    94             psFree(stats);
    95             psFree(rng);
    96             psFree(fileIter);
    97             psFree(fpaList);
    98             psFree(cellList);
    99             psFree(stack);
    100             psFree(outRO);
     90            psWarning("Unable to match image %d --- ignoring.", fileNum);
     91            psErrorClear();
    10192            psFree(convolved);
    102             return false;
     93            // XXX Free the bad image so it's not taking up good memory!
     94            continue;
    10395        }
    10496
     
    213205        }
    214206
     207        psListAdd(fpaList, PS_LIST_TAIL, inputFile->fpa);
     208        psListAdd(cellList, PS_LIST_TAIL, ro->parent);
     209
    215210        pmStackData *data = pmStackDataAlloc(convolved, weighting); // Data to stack
    216211        psFree(convolved);
     
    223218    psFree(stats);
    224219    psFree(rng);
     220
     221    if (fileNum == 0) {
     222        psError(PS_ERR_BAD_PARAMETER_VALUE, true, "Not enough good files to combine.");
     223        psFree(fpaList);
     224        psFree(cellList);
     225        psFree(stack);
     226        psFree(outRO);
     227        return false;
     228    }
    225229
    226230    if (!pmStackCombine(outRO, stack, maskBad, maskBlank, iter, combineRej)) {
     
    240244    }
    241245
    242     for (int i = 0; i < num; i++) {
     246    for (int i = 0; i < stack->n; i++) {
    243247        pmStackData *data = stack->data[i]; // Data for this image
    244248        psImage *inspected = psPixelsToMask(NULL, data->pixels,
Note: See TracChangeset for help on using the changeset viewer.