Changeset 35525
- Timestamp:
- May 7, 2013, 8:44:53 AM (13 years ago)
- Location:
- branches/eam_branches/ipp-20130419/pswarp/src
- Files:
-
- 3 edited
-
pswarpMaskStats.c (modified) (1 diff)
-
pswarpOverlaps.c (modified) (3 diffs)
-
pswarpPixelsLit.c (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
branches/eam_branches/ipp-20130419/pswarp/src/pswarpMaskStats.c
r35521 r35525 32 32 return false; 33 33 } 34 psMetadataAddS32(stats, PS_LIST_TAIL,"MASKFRAC_NPIX", 0, 35 "Number of valid pixels", Npix_valid); 36 psMetadataAddF32(stats,PS_LIST_TAIL, "MASKFRAC_STATIC", 0, 37 "Fraction of pixels statically masked", (float) Npix_static / Npix_valid); 38 psMetadataAddF32(stats,PS_LIST_TAIL, "MASKFRAC_DYNAMIC", 0, 39 "Fraction of pixels dynamically masked", (float) Npix_dynamic / Npix_valid); 40 psMetadataAddF32(stats,PS_LIST_TAIL, "MASKFRAC_MAGIC", 0, 41 "Fraction of pixels magically masked", (float) Npix_magic / Npix_valid); 42 psMetadataAddF32(stats,PS_LIST_TAIL, "MASKFRAC_ADVISORY", 0, 43 "Fraction of pixels masked as an advisory", (float) Npix_advisory / Npix_valid); 34 35 // XXX with multiple inputs (eg, output stacks -> exposure), these only represent the last input 36 psMetadataAddS32(stats, PS_LIST_TAIL,"MASKFRAC_NPIX", PS_META_REPLACE, "Number of valid pixels", Npix_valid); 37 psMetadataAddF32(stats,PS_LIST_TAIL, "MASKFRAC_STATIC", PS_META_REPLACE, "Fraction of pixels statically masked", (float) Npix_static / Npix_valid); 38 psMetadataAddF32(stats,PS_LIST_TAIL, "MASKFRAC_DYNAMIC", PS_META_REPLACE, "Fraction of pixels dynamically masked", (float) Npix_dynamic / Npix_valid); 39 psMetadataAddF32(stats,PS_LIST_TAIL, "MASKFRAC_MAGIC", PS_META_REPLACE, "Fraction of pixels magically masked", (float) Npix_magic / Npix_valid); 40 psMetadataAddF32(stats,PS_LIST_TAIL, "MASKFRAC_ADVISORY", PS_META_REPLACE, "Fraction of pixels masked as an advisory", (float) Npix_advisory / Npix_valid); 44 41 return true; 45 42 } -
branches/eam_branches/ipp-20130419/pswarp/src/pswarpOverlaps.c
r35512 r35525 166 166 bool pswarpFindOverlap (pmFPA *input, pmFPA *output, pswarpBounds *src, pswarpBounds *tgt) { 167 167 168 bool status = false; 169 168 170 // we have the source and target bounds. loop over all output elements and check if any of the source 169 171 // elements overlap it. … … 204 206 psArrayAdd (inputChips, 1, input->chips->data[i]); 205 207 } 206 chip->process = hasOverlap;208 chip->process |= hasOverlap; 207 209 if (hasOverlap) { 210 pmChipSelectCells (chip); 208 211 // get the complete list of input cells for this set of input chips 209 212 // pmConceptsAverageCells needs a psList (not a psArray) 210 ps List *inputCells = psListAlloc(NULL);213 psArray *inputCells = psArrayAllocEmpty(8); 211 214 for (int nChip = 0; nChip < inputChips->n; nChip++) { 212 215 pmChip *inputChip = inputChips->data[nChip]; 213 216 for (int nCell = 0; nCell < inputChip->cells->n; nCell++) { 214 217 fprintf (stderr, "input %d, %d : output %d\n", nChip, nCell, j); 215 ps ListAdd (inputCells, PS_LIST_TAIL, inputChip->cells->data[nCell]);218 psArrayAdd (inputCells, 8, inputChip->cells->data[nCell]); 216 219 } 217 220 } … … 220 223 for (int nCell = 0; nCell < chip->cells->n; nCell++) { 221 224 pmCell *outputCell = chip->cells->data[nCell]; 222 psMetadataAddPtr(outputCell->analysis, PS_LIST_TAIL, "INPUT.CELLS", PS_DATA_LIST , "input cells touching this output cell", inputCells); 225 psList *outList = psMetadataLookupPtr(&status, outputCell->analysis, "INPUT.CELLS"); 226 if (!outList) { 227 outList = psListAlloc(NULL); 228 psMetadataAddPtr(outputCell->analysis, PS_LIST_TAIL, "INPUT.CELLS", PS_DATA_LIST , "input cells touching this output cell", outList); 229 psFree (outList); 230 } 231 for (int nCell = 0; nCell < inputCells->n; nCell ++) { 232 psListAdd (outList, PS_LIST_TAIL, inputCells->data[nCell]); 233 } 223 234 } 224 235 psFree (inputCells); -
branches/eam_branches/ipp-20130419/pswarp/src/pswarpPixelsLit.c
r35512 r35525 72 72 } 73 73 74 // XXX need to add these in a container appropriate to the element75 74 if (stats) { 76 psMetadataAddS32(stats, PS_LIST_TAIL, "RANGE.XMIN", 0, "Minimum valid x value", xMin); 77 psMetadataAddS32(stats, PS_LIST_TAIL, "RANGE.XMAX", 0, "Maximum valid x value", xMax); 78 psMetadataAddS32(stats, PS_LIST_TAIL, "RANGE.YMIN", 0, "Minimum valid y value", yMin); 79 psMetadataAddS32(stats, PS_LIST_TAIL, "RANGE.YMAX", 0, "Maximum valid y value", yMax); 75 // XXX with multiple inputs (eg, output stacks -> exposure), these only represent the last input 76 psMetadataAddS32(stats, PS_LIST_TAIL, "RANGE.XMIN", PS_META_REPLACE, "Minimum valid x value", xMin); 77 psMetadataAddS32(stats, PS_LIST_TAIL, "RANGE.XMAX", PS_META_REPLACE, "Maximum valid x value", xMax); 78 psMetadataAddS32(stats, PS_LIST_TAIL, "RANGE.YMIN", PS_META_REPLACE, "Minimum valid y value", yMin); 79 psMetadataAddS32(stats, PS_LIST_TAIL, "RANGE.YMAX", PS_META_REPLACE, "Maximum valid y value", yMax); 80 80 } 81 81
Note:
See TracChangeset
for help on using the changeset viewer.
