IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 37080 for trunk


Ignore:
Timestamp:
Jul 17, 2014, 2:28:55 PM (12 years ago)
Author:
eugene
Message:

added some commented-out lines

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/ppSub/src/ppSubMatchPSFs.c

    r36581 r37080  
    167167    }
    168168
    169     // we need to register the FWHM values for use downstream 
     169    // we need to register the FWHM values for use downstream
    170170    pmSubtractionSetFWHMs(inFWHM, refFWHM);
    171171
     
    220220    bool noConvolve = psMetadataLookupBool(&mdok, recipe, "NOCONVOLVE"); // Do not use convolved images.
    221221    if (noConvolve) {
    222         psWarning("not matching PSFs because NOCONVOLVE is TRUE\n");
    223         return true;
     222        psWarning("not matching PSFs because NOCONVOLVE is TRUE\n");
     223        return true;
    224224    }
    225225
     
    235235        pmCell *cell = pmFPAfileThisCell(config->files, view, "PPSUB.INPUT.CONV"); // Cell for convolved input
    236236        inConv = pmReadoutAlloc(cell);
    237         psFree(inConv);
     237        psFree(inConv);
    238238    }
    239239    pmReadout *refConv = pmFPAfileThisReadout(config->files, view, "PPSUB.REF.CONV"); // Reference convolved
     
    241241        pmCell *cell = pmFPAfileThisCell(config->files, view, "PPSUB.REF.CONV"); // Cell for convolved ref.
    242242        refConv = pmReadoutAlloc(cell);
    243         psFree(refConv);
     243        psFree(refConv);
    244244    }
    245245
     
    269269        lists->data[0] = psMemIncrRefCounter(inSources);
    270270        lists->data[1] = psMemIncrRefCounter(refSources);
    271         // XXX MEH changed to get only match (true to cull single), no apparent need of unmatched sources and can cause trouble
     271        // XXX MEH changed to get only match (true to cull single), no apparent need of unmatched sources and can cause trouble
    272272        detections->allSources = pmSourceMatchMerge(lists, radius, true);
    273273        psFree(lists);
     
    365365        subMode = PM_SUBTRACTION_MODE_DUAL;
    366366    } else {
    367         char *convolveName = psMetadataLookupStr(&mdok, recipe, "CONVOLVE.TARGET"); // recipe value for target
     367        char *convolveName = psMetadataLookupStr(&mdok, recipe, "CONVOLVE.TARGET"); // recipe value for target
    368368        int convolve = psMetadataLookupS32(&mdok, config->arguments, "-convolve"); // override with command-line option
    369         switch (convolve) {
    370           case 0:
    371             // convolve is 0 if it is not supplied on the command line
    372             subMode = subModeFromString(convolveName);
    373             break;
    374           case 1:
    375             subMode = PM_SUBTRACTION_MODE_1;
    376             break;
    377           case 2:
    378             subMode = PM_SUBTRACTION_MODE_2;
    379             break;
    380           default:
    381             psError(PPSUB_ERR_ARGUMENTS, false, "Invalid value for -convolve");
    382             return false;
    383         }
     369        switch (convolve) {
     370          case 0:
     371            // convolve is 0 if it is not supplied on the command line
     372            subMode = subModeFromString(convolveName);
     373            break;
     374          case 1:
     375            subMode = PM_SUBTRACTION_MODE_1;
     376            break;
     377          case 2:
     378            subMode = PM_SUBTRACTION_MODE_2;
     379            break;
     380          default:
     381            psError(PPSUB_ERR_ARGUMENTS, false, "Invalid value for -convolve");
     382            return false;
     383        }
    384384    }
    385385
     
    397397        psKernel *truncated = psImageCovarianceTruncate(inRO->covariance, COVAR_FRAC);
    398398        psFree(inRO->covariance);
    399         inRO->covariance = truncated;
     399        inRO->covariance = truncated;
    400400    }
    401401    if (refRO->covariance) {
    402402        psKernel *truncated = psImageCovarianceTruncate(refRO->covariance, COVAR_FRAC);
    403403        psFree(refRO->covariance);
    404         refRO->covariance = truncated;
     404        refRO->covariance = truncated;
    405405    }
    406406
     
    458458            ppSubDataQuality(data, error, PPSUB_FILES_ALL);
    459459            return true;
     460        // XX } else if (error == PM_ERR_DATA) {
     461        // XX     psErrorStackPrint(stderr, "Unable to solve for the kernel to match images");
     462        // XX     psWarning("Failed to find PSF match kernel --- suspect bad data quality.");
     463        // XX     ppSubDataQuality(data, error, PPSUB_FILES_ALL);
     464        // XX     return true;
    460465        } else {
    461466            psError(PPSUB_ERR_DATA, false, "Unable to match images.");
     
    515520        psKernel *truncated = psImageCovarianceTruncate(inConv->covariance, COVAR_FRAC);
    516521        psFree(inConv->covariance);
    517         inConv->covariance = truncated;
     522        inConv->covariance = truncated;
    518523    }
    519524    if (refConv->covariance) {
    520525        psKernel *truncated = psImageCovarianceTruncate(refConv->covariance, COVAR_FRAC);
    521526        psFree(refConv->covariance);
    522         refConv->covariance = truncated;
     527        refConv->covariance = truncated;
    523528    }
    524529
Note: See TracChangeset for help on using the changeset viewer.