IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Jun 7, 2010, 4:52:17 PM (16 years ago)
Author:
Paul Price
Message:

Use a common target PSF image. This is to make everything run MUCH faster for stacks of lots of images.

File:
1 edited

Legend:

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

    r28182 r28253  
    4545    options->convCovars = psArrayAlloc(num); // Covariance matrices
    4646
     47    psImage *target = NULL;             // Target PSF image
     48    if (options->convolve) {
     49        target = ppStackTarget(options, config);
     50        if (!target) {
     51            psError(psErrorCodeLast(), false, "Unable to produce stack target image");
     52            return false;
     53        }
     54    }
     55
    4756    psVector *renorms = psVectorAlloc(num, PS_TYPE_F32); // Renormalisation values for variances
    4857    psVectorInit(renorms, NAN);
     
    7180            psFree(fpaList);
    7281            psFree(cellList);
     82            psFree(target);
    7383            return false;
    7484        }
     
    8797            psFree(fpaList);
    8898            psFree(cellList);
     99            psFree(target);
    89100            return false;
    90101        }
     
    93104        psTimerStart("PPSTACK_MATCH");
    94105        options->origCovars->data[i] = psMemIncrRefCounter(readout->covariance);
    95         if (!ppStackMatch(readout, options, i, config)) {
     106        if (!ppStackMatch(readout, target, options, i, config)) {
    96107            // XXX many things can cause a failure of ppStackMatch -- should some be handled differently?
    97108            psErrorCode error = psErrorCodeLast(); // Error code
     
    102113              case PPSTACK_ERR_IO:
    103114                psError(error, false, "Unable to match image %d due to fatal error.", i);
     115                psFree(rng);
     116                psFree(fpaList);
     117                psFree(cellList);
     118                psFree(target);
    104119                return false;
    105120                // Non-fatal errors
     
    154169            psFree(cellList);
    155170            psFree(rng);
     171            psFree(target);
    156172            return false;
    157173        }
     
    164180            psFree(rng);
    165181            psFree(maskHeader);
     182            psFree(target);
    166183            return false;
    167184        }
     
    172189            psFree(cellList);
    173190            psFree(rng);
     191            psFree(target);
    174192            return false;
    175193        }
     
    222240            psFree(cellList);
    223241            psFree(rng);
     242            psFree(target);
    224243            return false;
    225244        }
     
    229248    }
    230249    psFree(rng);
     250    psFree(target);
    231251
    232252    psFree(options->sourceLists); options->sourceLists = NULL;
Note: See TracChangeset for help on using the changeset viewer.