IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Apr 2, 2009, 2:51:37 PM (17 years ago)
Author:
Paul Price
Message:

Merging in branches/pap/ from r23685. Some conflicts, most notably in ippTools, but these resolved fairly simply. Only question mark is on regtool reversion, but I think I got it right. Everything builds fine.

Location:
trunk
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk

  • trunk/ppSub

  • trunk/ppSub/src/ppSubMatchPSFs.c

    r23505 r23688  
    2222#include "ppSub.h"
    2323
    24 bool ppSubMatchPSFs(pmConfig *config, const pmFPAview *view)
     24bool ppSubMatchPSFs(pmConfig *config, ppSubData *data, const pmFPAview *view)
    2525{
    2626    psAssert(config, "Require configuration");
     
    136136
    137137    // Match the PSFs
     138    bool success = false;               // Operation was successful?
    138139    if (kernelRO) {
    139         if (!pmSubtractionMatchPrecalc(inConv, refConv, inRO, refRO, kernelRO->analysis,
    140                                        stride, sys, maskVal, maskBad, maskPoor, poorFrac, badFrac)) {
    141             psError(PS_ERR_UNKNOWN, false, "Unable to convolve images.");
    142             return false;
    143         }
     140        success = pmSubtractionMatchPrecalc(inConv, refConv, inRO, refRO, kernelRO->analysis,
     141                                            stride, sys, maskVal, maskBad, maskPoor, poorFrac, badFrac);
    144142    } else {
    145         if (!pmSubtractionMatch(inConv, refConv, inRO, refRO, footprint, stride, regionSize, spacing,
    146                                 threshold, sources, stampsName, type, size, order, widths, orders, inner,
    147                                 ringsOrder, binning, penalty, optimum, optWidths, optOrder, optThresh, iter,
    148                                 rej, sys, maskVal, maskBad, maskPoor, poorFrac, badFrac, subMode)) {
     143        success = pmSubtractionMatch(inConv, refConv, inRO, refRO, footprint, stride, regionSize,
     144                                     spacing, threshold, sources, stampsName, type, size, order,
     145                                     widths, orders, inner, ringsOrder, binning, penalty, optimum,
     146                                     optWidths, optOrder, optThresh, iter, rej, sys, maskVal,
     147                                     maskBad, maskPoor, poorFrac, badFrac, subMode);
     148    }
     149
     150    psFree(optWidths);
     151    pmSubtractionThreadsFinalize(inRO, refRO);
     152
     153    if (!success) {
     154        psErrorCode error = psErrorCodeLast(); // Error code
     155        if (error == PM_ERR_STAMPS) {
     156            psErrorStackPrint(stderr, "Unable to find stamps");
     157            psWarning("Unable to find stamps --- suspect bad data quality.");
     158            ppSubDataQuality(config, data, error, PPSUB_FILES_ALL);
     159            return true;
     160        } else {
    149161            psError(PS_ERR_UNKNOWN, false, "Unable to match images.");
    150162            return false;
     
    152164    }
    153165
    154     psFree(optWidths);
    155 
    156     pmSubtractionThreadsFinalize(inRO, refRO);
    157 
    158166    psImageCovarianceTransfer(inConv->variance, inConv->covariance);
    159167    psImageCovarianceTransfer(refConv->variance, refConv->covariance);
    160168
    161     // XXX drop the pixels associated with inRO and refRO (now that we have inConv and refConf)
    162 #ifdef TESTING
    163     psphotSaveImage (NULL, inRO->image, "inRO.fits");
    164     psphotSaveImage (NULL, refRO->image, "refRO.fits");
    165     psphotSaveImage (NULL, inConv->image, "inConv.fits");
    166     psphotSaveImage (NULL, refConv->image, "refConv.fits");
    167 #endif
    168 
    169169    return true;
    170170}
Note: See TracChangeset for help on using the changeset viewer.