IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 37061


Ignore:
Timestamp:
Jul 17, 2014, 11:54:03 AM (12 years ago)
Author:
eugene
Message:

add a commented-out block for bad data quality?

File:
1 edited

Legend:

Unmodified
Added
Removed
  • tags/ipp-20130712/ppSub/src/ppSubMatchPSFs.c

    r35922 r37061  
    160160    }
    161161
    162     // we need to register the FWHM values for use downstream 
     162    // we need to register the FWHM values for use downstream
    163163    pmSubtractionSetFWHMs(inFWHM, refFWHM);
    164164
     
    213213    bool noConvolve = psMetadataLookupBool(&mdok, recipe, "NOCONVOLVE"); // Do not use convolved images.
    214214    if (noConvolve) {
    215         psWarning("not matching PSFs because NOCONVOLVE is TRUE\n");
    216         return true;
     215        psWarning("not matching PSFs because NOCONVOLVE is TRUE\n");
     216        return true;
    217217    }
    218218
     
    228228        pmCell *cell = pmFPAfileThisCell(config->files, view, "PPSUB.INPUT.CONV"); // Cell for convolved input
    229229        inConv = pmReadoutAlloc(cell);
    230         psFree(inConv);
     230        psFree(inConv);
    231231    }
    232232    pmReadout *refConv = pmFPAfileThisReadout(config->files, view, "PPSUB.REF.CONV"); // Reference convolved
     
    234234        pmCell *cell = pmFPAfileThisCell(config->files, view, "PPSUB.REF.CONV"); // Cell for convolved ref.
    235235        refConv = pmReadoutAlloc(cell);
    236         psFree(refConv);
     236        psFree(refConv);
    237237    }
    238238
     
    262262        lists->data[0] = psMemIncrRefCounter(inSources);
    263263        lists->data[1] = psMemIncrRefCounter(refSources);
    264         // XXX MEH changed to get only match (true to cull single), no apparent need of unmatched sources and can cause trouble
     264        // XXX MEH changed to get only match (true to cull single), no apparent need of unmatched sources and can cause trouble
    265265        detections->allSources = pmSourceMatchMerge(lists, radius, true);
    266266        psFree(lists);
     
    358358        subMode = PM_SUBTRACTION_MODE_DUAL;
    359359    } else {
    360         char *convolveName = psMetadataLookupStr(&mdok, recipe, "CONVOLVE.TARGET"); // recipe value for target
     360        char *convolveName = psMetadataLookupStr(&mdok, recipe, "CONVOLVE.TARGET"); // recipe value for target
    361361        int convolve = psMetadataLookupS32(&mdok, config->arguments, "-convolve"); // override with command-line option
    362         switch (convolve) {
    363           case 0:
    364             // convolve is 0 if it is not supplied on the command line
    365             subMode = subModeFromString(convolveName);
    366             break;
    367           case 1:
    368             subMode = PM_SUBTRACTION_MODE_1;
    369             break;
    370           case 2:
    371             subMode = PM_SUBTRACTION_MODE_2;
    372             break;
    373           default:
    374             psError(PPSUB_ERR_ARGUMENTS, false, "Invalid value for -convolve");
    375             return false;
    376         }
     362        switch (convolve) {
     363          case 0:
     364            // convolve is 0 if it is not supplied on the command line
     365            subMode = subModeFromString(convolveName);
     366            break;
     367          case 1:
     368            subMode = PM_SUBTRACTION_MODE_1;
     369            break;
     370          case 2:
     371            subMode = PM_SUBTRACTION_MODE_2;
     372            break;
     373          default:
     374            psError(PPSUB_ERR_ARGUMENTS, false, "Invalid value for -convolve");
     375            return false;
     376        }
    377377    }
    378378
     
    390390        psKernel *truncated = psImageCovarianceTruncate(inRO->covariance, COVAR_FRAC);
    391391        psFree(inRO->covariance);
    392         inRO->covariance = truncated;
     392        inRO->covariance = truncated;
    393393    }
    394394    if (refRO->covariance) {
    395395        psKernel *truncated = psImageCovarianceTruncate(refRO->covariance, COVAR_FRAC);
    396396        psFree(refRO->covariance);
    397         refRO->covariance = truncated;
     397        refRO->covariance = truncated;
    398398    }
    399399
     
    451451            ppSubDataQuality(data, error, PPSUB_FILES_ALL);
    452452            return true;
     453        // XX } else if (error == PM_ERR_DATA) {
     454        // XX     psErrorStackPrint(stderr, "Unable to solve for the kernel to match images");
     455        // XX     psWarning("Failed to find PSF match kernel --- suspect bad data quality.");
     456        // XX     ppSubDataQuality(data, error, PPSUB_FILES_ALL);
     457        // XX     return true;
    453458        } else {
    454459            psError(PPSUB_ERR_DATA, false, "Unable to match images.");
     
    508513        psKernel *truncated = psImageCovarianceTruncate(inConv->covariance, COVAR_FRAC);
    509514        psFree(inConv->covariance);
    510         inConv->covariance = truncated;
     515        inConv->covariance = truncated;
    511516    }
    512517    if (refConv->covariance) {
    513518        psKernel *truncated = psImageCovarianceTruncate(refConv->covariance, COVAR_FRAC);
    514519        psFree(refConv->covariance);
    515         refConv->covariance = truncated;
     520        refConv->covariance = truncated;
    516521    }
    517522
Note: See TracChangeset for help on using the changeset viewer.