IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 27507


Ignore:
Timestamp:
Mar 29, 2010, 1:44:59 PM (16 years ago)
Author:
eugene
Message:

make CR Masking optional

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/eam_branches/20100225/psphot/src/psphotSourceSize.c

    r27502 r27507  
    1414    int grow;
    1515    int xtest, ytest;
     16    bool apply; // apply CR mask?
    1617} psphotSourceSizeOptions;
    1718
     
    118119        psWarning("PSPHOT.CR.NSIGMA.SOFTEN not set; defaulting to zero.");
    119120        options.soft = 0.0;
     121    }
     122
     123    options.apply = psMetadataLookupBool(&status, recipe, "PSPHOT.CRMASK.APPLY"); // Growth size for CRs
     124    if (!status) {
     125        psError(PS_ERR_BAD_PARAMETER_VALUE, true, "PSPHOT.CRMASK.APPLY is not defined.");
     126        return false;
    120127    }
    121128
     
    463470        // XXX this is running slowly and is too agressive, but it more-or-less works
    464471        psTrace("psphot", 6, "mask cosmic ray at %f, %f\n", source->peak->xf, source->peak->yf);
    465         psphotMaskCosmicRay(readout, source, options->crMask);
     472        if (options->apply) {
     473            psphotMaskCosmicRay(readout, source, options->crMask);
     474        } else {
     475            source->mode |= PM_SOURCE_MODE_CR_LIMIT;
     476        }
    466477        nMasked ++;
    467478
Note: See TracChangeset for help on using the changeset viewer.