IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 24118


Ignore:
Timestamp:
May 8, 2009, 2:03:29 PM (17 years ago)
Author:
eugene
Message:

allow option to skip mask check

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/ppMerge/src/ppMergeLoop.c

    r23609 r24118  
    3636    bool mdok;                          ///< Status of MD lookup
    3737    bool haveMasks = psMetadataLookupBool(&mdok, arguments, "INPUTS.MASKS"); // Do we have masks?
     38    bool useMasks = psMetadataLookupBool(&mdok, arguments, "INPUTS.MASKS.USE"); // Do we have masks?
    3839    bool haveVariances = psMetadataLookupBool(&mdok, arguments, "INPUTS.VARIANCES"); // Do we have variances?
    3940
     
    7374
    7475    pmCombineParams *combination = pmCombineParamsAlloc(combineStat); ///< Combination parameters
    75     combination->maskVal = maskVal;
     76    combination->maskVal = useMasks ? maskVal : 0;
    7677    combination->blank = pmConfigMaskGet("BLANK", config);
    7778    combination->nKeep = nKeep;
     
    149150        }
    150151        pmCell *outCell;                ///< Cell of interest
     152
     153        // XXX TEST : force a single loop
     154        // outCell = pmFPAviewNextCell(view, outFPA, 1); {
     155
    151156        while ((outCell = pmFPAviewNextCell(view, outFPA, 1))) {
    152157            if (!pmFPAfileIOChecks(config, view, PM_FPA_BEFORE)) {
     
    232237                psAssert (fileGroups->n > 0, "no valid file groups defined");
    233238                fileGroup = fileGroups->data[0];
    234                 if (!pmShutterCorrectionGeneratePrepare(outRO, pattern, fileGroup->readouts, maskVal)) {
     239                if (!pmShutterCorrectionGeneratePrepare(outRO, pattern, fileGroup->readouts, combination->maskVal)) {
    235240                    goto ERROR;
    236241                }
     
    427432                psImageMaskType cteMaskValue = pmConfigMaskGet(cteMaskName, config);
    428433
     434                if (0) {
     435                  psFits *fits = NULL;
     436                  fits = psFitsOpen ("combine.fits", "w");
     437                  psFitsWriteImage (fits, NULL, outRO->image, 0, NULL);
     438                  psFitsClose (fits);
     439
     440                  fits = psFitsOpen ("inmask.fits", "w");
     441                  psFitsWriteImage (fits, NULL, outRO->mask, 0, NULL);
     442                  psFitsClose (fits);
     443                }
     444
    429445                psF32 **outputImage = outRO->image->data.F32;
    430446                psImageMaskType **outputMask = outRO->mask->data.PS_TYPE_IMAGE_MASK_DATA;
     
    436452                    }
    437453                }
     454
     455                if (0) {
     456                  psFits *fits = NULL;
     457                  fits = psFitsOpen ("otmask.fits", "w");
     458                  psFitsWriteImage (fits, NULL, outRO->mask, 0, NULL);
     459                  psFitsClose (fits);
     460                }
     461
    438462            }
    439463
Note: See TracChangeset for help on using the changeset viewer.