IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Nov 29, 2012, 2:15:01 PM (14 years ago)
Author:
eugene
Message:

merge changes from trunk

Location:
branches/eam_branches/ipp-20120905
Files:
9 edited

Legend:

Unmodified
Added
Removed
  • branches/eam_branches/ipp-20120905

  • branches/eam_branches/ipp-20120905/psphot

  • branches/eam_branches/ipp-20120905/psphot/src

  • branches/eam_branches/ipp-20120905/psphot/src/psphotDeblendSatstars.c

    r34570 r34735  
    498498    psStatsInit (fluxStats);
    499499
    500     while (logR->data.F32[bin] < lRmax) {
     500    while (bin < logR->n && logR->data.F32[bin] < lRmax) {
    501501      if (isfinite(flux->data.F32[bin])) {
    502502          psVectorAppend (fluxVals, flux->data.F32[bin]);
  • branches/eam_branches/ipp-20120905/psphot/src/psphotReplaceUnfit.c

    r34570 r34735  
    3535    // loop over the available readouts
    3636    for (int i = 0; i < num; i++) {
    37         if (!psphotReplaceAllSourcesReadout (config, view, filerule, i, recipe, ignoreState)) {
    38             psError (PSPHOT_ERR_CONFIG, false, "failed to replace all sources for %s entry %d", filerule, i);
    39             return false;
    40         }
     37        // ignore return value. False means "sources not subtracted", not a failure condition
     38        (void) psphotReplaceAllSourcesReadout (config, view, filerule, i, recipe, ignoreState);
    4139    }
    4240    return true;
  • branches/eam_branches/ipp-20120905/psphot/src/psphotStackImageLoop.c

    • Property svn:mergeinfo changed (with no actual effect on merging)
  • branches/eam_branches/ipp-20120905/psphot/src/psphotStackMatchPSFs.c

    r34404 r34735  
    108108    bool notMatched = psMetadataLookupBool(NULL, readoutOut->analysis, "NOT.PSF.MATCHED");
    109109    if (notMatched) {
    110         if (!readoutOut->image) {
    111             // our images got freed in the matching process. Recreate them so that they
    112             // are available when sources are copied to this readout.
    113             readoutOut->image = psImageCopy(NULL, readoutSrc->image, PS_TYPE_F32);
    114             if (readoutSrc->variance) {
    115                 psFree(readoutOut->variance);
    116                 readoutOut->variance = psImageCopy(NULL, readoutSrc->variance, PS_TYPE_F32);
    117             }
    118             if (readoutSrc->mask) {
    119                 psFree(readoutOut->mask);
    120                 readoutOut->mask = psImageCopy(NULL, readoutSrc->mask, PS_TYPE_IMAGE_MASK);
    121             }
     110        psFree(readoutOut->image);
     111        readoutOut->image = psImageCopy(NULL, readoutSrc->image, PS_TYPE_F32);
     112        psFree(readoutOut->variance);
     113        if (readoutSrc->variance) {
     114            readoutOut->variance = psImageCopy(NULL, readoutSrc->variance, PS_TYPE_F32);
     115        }
     116        psFree(readoutOut->mask);
     117        if (readoutSrc->mask) {
     118            readoutOut->mask = psImageCopy(NULL, readoutSrc->mask, PS_TYPE_IMAGE_MASK);
    122119        }
    123120    }
  • branches/eam_branches/ipp-20120905/psphot/src/psphotStackMatchPSFsUtils.c

    r34352 r34735  
    303303        if (!pmSubtractionMatch(NULL, readoutOut, fake, readoutSrc, footprint, stride, regionSize, spacing, threshold, stampSources, stampsName, type, size, order, widthsCopy, orders, inner, ringsOrder, binning, penalty, optimum, optWidths, optOrder, optThresh, iter, rej, normFrac, sysError, skyErr, kernelError, covarFrac, maskVal, maskBad, maskPoor, poorFrac, badFrac, PM_SUBTRACTION_MODE_2)) {
    304304            int errorCode = psErrorCodeLast();
    305             if (errorCode == PM_ERR_SMALL_AREA) {
     305            if (errorCode == PM_ERR_SMALL_AREA || errorCode == PM_ERR_STAMPS) {
    306306                // failed to match but, don't fault. Just drop this input from measurements that need the
    307307                // matched readout.
     308                psErrorClear();
    308309                rejectReadout = true;
    309                 psLogMsg("psphot", PS_LOG_WARN, "PSF match failed for input %d. Too few pixels.", index);
     310                if (errorCode == PM_ERR_SMALL_AREA) {
     311                    psLogMsg("psphot", PS_LOG_WARN, "PSF match failed for input %d. Too few pixels.", index);
     312                } else if (errorCode == PM_ERR_STAMPS) {
     313                    psLogMsg("psphot", PS_LOG_WARN, "PSF match failed for input %d. Failed to find stamps.", index);
     314                }
    310315            } else {
    311316                psError(psErrorCodeLast(), false, "Unable to match images.");
     
    324329   
    325330    if (rejectReadout) {
     331        psMetadataAddBool(readoutSrc->analysis, PS_LIST_TAIL, "NOT.PSF.MATCHED", PS_META_REPLACE, "", true);
    326332        psMetadataAddBool(readoutOut->analysis, PS_LIST_TAIL, "NOT.PSF.MATCHED", PS_META_REPLACE, "", true);
    327333    } else {
     334        psMetadataAddBool(readoutSrc->analysis, PS_LIST_TAIL, "NOT.PSF.MATCHED", PS_META_REPLACE, "", false);
    328335        psMetadataAddBool(readoutOut->analysis, PS_LIST_TAIL, "NOT.PSF.MATCHED", PS_META_REPLACE, "", false);
    329336    }
  • branches/eam_branches/ipp-20120905/psphot/src/psphotStackReadout.c

    r34570 r34735  
    409409            }
    410410        }
     411        // mark any inputs that we want to skip the matched apertures for
     412        psphotStackSetInputsToSkip(config, view, STACK_CNV, true);
     413        psphotStackSetInputsToSkip(config, view, STACK_OUT, true);
    411414        psphotRadialApertures (config, view, STACK_CNV, 0); // entry 0 == unmatched
    412415        psMemDump("extmeas");
    413416
    414         // mark any inputs that we want to skip the matched apertures for
    415         psphotStackSetInputsToSkip(config, view, STACK_OUT, true);
    416417
    417418        int nRadialEntries = psphotStackMatchPSFsEntries(config, view, STACK_OUT);
     
    439440        }
    440441    }
     442    psphotStackSetInputsToSkip(config, view, STACK_CNV, false);
    441443    psphotStackSetInputsToSkip(config, view, STACK_OUT, false);
    442444
Note: See TracChangeset for help on using the changeset viewer.