IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Dec 9, 2010, 3:08:33 PM (16 years ago)
Author:
eugene
Message:

update output headers with WCS; add mean PSF parameters 7 & 8 (if used) and model names to headers

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/eam_branches/ipp-20101205/psphot/src/psphotStackMatchPSFs.c

    r29936 r30006  
    6565bool psphotStackMatchPSFsReadout (pmConfig *config, const pmFPAview *view, psphotStackOptions *options, int index) {
    6666
     67    psImageMaskType maskValue;
     68    psImageMaskType markValue;
     69
     70    // get the PSPHOT.MASK value from the config
     71    if (!pmConfigMaskSetBits (&maskValue, &markValue, config)) {
     72        psError (PS_ERR_UNKNOWN, true, "Unable to define the mask bit values");
     73        return false;
     74    }
     75
    6776    pmFPAfile *fileSrc = psphotStackGetConvolveSource(config, options, index);
    6877    if (!fileSrc) {
     
    8493
    8594    // set NAN pixels to 'SAT'
    86     // XXX replace this is pmReadoutMaskInvalid?
    87     psImageMaskType maskVal = pmConfigMaskGet("SAT", config);
    88     if (!pmReadoutMaskNonfinite(readoutSrc, maskVal)) {
     95    psImageMaskType maskSat = pmConfigMaskGet("SAT", config);
     96    if (!pmReadoutMaskInvalid(readoutSrc, maskValue, maskSat)) {
    8997        psError(psErrorCodeLast(), false, "Unable to mask non-finite pixels in readout.");
    9098        return false;
     
    95103        matchKernel(config, readoutOut, readoutSrc, options, index);
    96104        saveMatchData(readoutOut, options, index);
    97         // renormKernel(readoutCnv, options, index);
    98     } else {
    99         // only match the flux (NO! not for multi-filter, at least!)
    100         // XXX do not generate readoutCnv in this case?
    101         // float norm = powf(10.0, -0.4 * options->norm->data.F32[index]); // Normalisation
    102         // psBinaryOp(readoutRaw->image, readoutRaw->image, "*", psScalarAlloc(norm, PS_TYPE_F32));
    103         // psBinaryOp(readoutRaw->variance, readoutRaw->variance, "*", psScalarAlloc(PS_SQR(norm), PS_TYPE_F32));
    104105    }
    105 
    106106    rescaleData(readoutOut, config, options, index);
    107107
     
    110110    return true;
    111111}
    112 
    113 
    114 # if (0)
    115 // Read previously produced kernel
    116 if (psMetadataLookupBool(NULL, config->arguments, "PPSTACK.DEBUG.STACK")) {
    117     loadKernel(config, readoutCnv, options, index);
    118 } else {
    119     matchKernel(config, readoutCnv, readoutRaw, options, index);
    120 }
    121 # endif
Note: See TracChangeset for help on using the changeset viewer.