- Timestamp:
- Jul 14, 2008, 2:44:27 PM (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/eam_branch_20080706/pswarp/src/pswarpPixelFraction.c
r17780 r18513 28 28 PS_ASSERT_METADATA_NON_NULL(config->arguments, false); 29 29 30 bool status; 31 30 32 float minFrac = psMetadataLookupF32(NULL, config->arguments, "ACCEPT.FRAC"); // Minimum fraction 31 psMaskType maskPoor = psMetadataLookupU8(NULL, config->arguments, "MASK.POOR"); // Mask for "poor" data 32 psMaskType maskBad = psMetadataLookupU8(NULL, config->arguments, "MASK.BAD"); // Mask for bad data 33 psMaskType maskVal = maskPoor | maskBad; // Mask to apply 33 34 // load the recipe 35 psMetadata *recipe = psMetadataLookupPtr (NULL, config->recipes, PSWARP_RECIPE); 36 if (!recipe) { 37 psError(PSPHOT_ERR_CONFIG, false, "missing recipe %s", PSWARP_RECIPE); 38 return false; 39 } 40 41 // output mask bits 42 psMaskType maskValue = psMetadataLookupU8(&status, recipe, "MASK.OUTPUT"); 43 psAssert (status, "MASK.OUTPUT was not defined"); 34 44 35 45 psImage *image = readout->image; // Image of interest … … 45 55 for (int y = 0; y < numRows; y++) { 46 56 for (int x = 0; x < numCols; x++) { 47 if (mask->data.PS_TYPE_MASK_DATA[y][x] & maskVal ) {57 if (mask->data.PS_TYPE_MASK_DATA[y][x] & maskValue) { 48 58 numBad++; 49 59 } else {
Note:
See TracChangeset
for help on using the changeset viewer.
