IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Jul 31, 2012, 11:50:18 AM (14 years ago)
Author:
eugene
Message:

merge changes from trunk

Location:
branches/eam_branches/ipp-20120627/psphot
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • branches/eam_branches/ipp-20120627/psphot

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

  • branches/eam_branches/ipp-20120627/psphot/src/psphotStackMatchPSFsUtils.c

    r33841 r34247  
    310310    float deconv = psMetadataLookupF32(NULL, readoutOut->analysis, PM_SUBTRACTION_ANALYSIS_DECONV_MAX); // Max deconvolution fraction
    311311    if (deconv > deconvLimit) {
     312#if (1)
     313        // XXX: don't reject the image set
     314        psWarning("Maximum deconvolution fraction (%f) exceeds limit (%f) --- rejecting image for matched psf analysis%d\n", deconv, deconvLimit, index);
     315        psMetadataAddBool(readoutOut->analysis, PS_LIST_TAIL, "DECONV.OVERLIMIT", PS_META_REPLACE, "", true);
     316#else
    312317        psWarning("Maximum deconvolution fraction (%f) exceeds limit (%f) --- rejecting image %d\n", deconv, deconvLimit, index);
    313318        goto escape;
     319#endif
     320    } else {
     321        psMetadataAddBool(readoutOut->analysis, PS_LIST_TAIL, "DECONV.OVERLIMIT", PS_META_REPLACE, "", false);
    314322    }
    315323
     
    461469    return optWidths;
    462470}
     471
     472// Set input to be skipped if the decovolution fraction was overlimit. Use for radial apertures
     473// This interface can be potentiall be extended for other uses
     474bool psphotStackSetInputsToSkip(pmConfig *config, const pmFPAview *view, const char *filerule, bool set) {
     475    int num = psphotFileruleCount(config, filerule);
     476    bool status;
     477    int chisqNum = psMetadataLookupS32 (&status, config->arguments, "PSPHOT.CHISQ.NUM");
     478    if (!status) chisqNum = -1;
     479    for (int i = 0; i < num; i++) {
     480        if (i == chisqNum) {
     481            continue;
     482        }
     483        pmFPAfile *file = pmFPAfileSelectSingle(config->files, filerule, i); // File of interest
     484        psAssert (file, "missing file?");
     485
     486        pmReadout *readout = pmFPAviewThisReadout(view, file->fpa);
     487        psAssert (readout, "missing readout?");
     488        if (set) {
     489            bool overLimit = psMetadataLookupBool(&status, readout->analysis, "DECONV.OVERLIMIT");
     490            psMetadataAddBool(readout->analysis, PS_LIST_TAIL, "PSPHOT.SKIP.INPUT", PS_META_REPLACE, "Skip analysis", overLimit);
     491        } else {
     492            psMetadataAddBool(readout->analysis, PS_LIST_TAIL, "PSPHOT.SKIP.INPUT", PS_META_REPLACE, "Skip analysis", false);
     493        }
     494    }
     495
     496    return true;
     497}
Note: See TracChangeset for help on using the changeset viewer.