Changeset 20148
- Timestamp:
- Oct 14, 2008, 12:15:10 PM (18 years ago)
- Location:
- trunk/pstamp/src
- Files:
-
- 2 edited
-
ppstampMakeStamp.c (modified) (2 diffs)
-
ppstampParseCamera.c (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/pstamp/src/ppstampMakeStamp.c
r18981 r20148 282 282 pmFPAview *srcView = pmFPAviewAlloc(0); 283 283 if (psArrayLength(inChip->cells) > 1) { 284 // we extract our postage stamp from a mosaic so that 285 // we don't have to manage extracting from multiple cells 284 // we extract our postage stamp from a mosaic 286 285 pmFPAfile *mosaic = ppstampBuildMosaic(config, input, view); 287 286 if (mosaic == NULL) { … … 327 326 status = false; 328 327 break; 328 } 329 if (readout->mask) { 330 outReadout->mask = extractStamp(readout->mask, extractRegion, 0); 331 if (!outReadout->mask) { 332 psError(PS_ERR_UNKNOWN, false, "failed to create postage stamp mask image\n"); 333 status = false; 334 break; 335 } 336 } 337 if (readout->weight) { 338 outReadout->weight = extractStamp(readout->weight, extractRegion, 0); 339 if (!outReadout->weight) { 340 psError(PS_ERR_UNKNOWN, false, "failed to create postage stamp weight image\n"); 341 status = false; 342 break; 343 } 329 344 } 330 345 -
trunk/pstamp/src/ppstampParseCamera.c
r17270 r20148 8 8 9 9 // Set up the ppstamp output Image file 10 bool setupOutput(pmConfig *config, pmFPAfile *input )10 bool setupOutput(pmConfig *config, pmFPAfile *input, bool doMask, bool doWeight) 11 11 { 12 12 pmFPAfile *output = pmFPAfileDefineSkycell(config, NULL, "PPSTAMP.OUTPUT"); 13 13 output->save = true; 14 15 if (doMask) { 16 pmFPAfile *outMask = pmFPAfileDefineSkycell(config, output->fpa, "PPSTAMP.OUTPUT.MASK"); 17 outMask->save = true; 18 } 19 if (doWeight) { 20 pmFPAfile *outWeight = pmFPAfileDefineSkycell(config, output->fpa, "PPSTAMP.OUTPUT.WEIGHT"); 21 outWeight->save = true; 22 } 23 14 24 return true; 15 25 } … … 34 44 } 35 45 46 bool doMask = false; 47 pmFPAfile *mask = pmFPAfileBindFromArgs (&status, input, config, "PPSTAMP.INPUT.MASK", "MASK"); 48 if (!status) { 49 psError(PS_ERR_IO, false, "Failed to build FPA from PPSTAMP.INPUT.MASK"); 50 return false; 51 } 52 if (mask) { 53 doMask = true; 54 } 55 bool doWeight = false; 56 pmFPAfile *weight = pmFPAfileBindFromArgs (&status, input, config, "PPSTAMP.INPUT.WEIGHT", "WEIGHT"); 57 if (!status) { 58 psError(PS_ERR_IO, false, "Failed to build FPA from PPSTAMP.INPUT.WEIGHT"); 59 return false; 60 } 61 if (weight) { 62 doWeight = true; 63 } 64 65 66 36 67 // XXX: create a filerule for PPSTAMP.ASTROM 37 68 pmFPAfile *astrom = pmFPAfileDefineFromArgs(&status, config, "PSWARP.ASTROM", "ASTROM"); … … 52 83 53 84 // Set up the output target 54 if (!setupOutput(config, input )) {85 if (!setupOutput(config, input, doMask, doWeight)) { 55 86 psError(PS_ERR_UNKNOWN, false, "Unable to setup output."); 56 87 return false;
Note:
See TracChangeset
for help on using the changeset viewer.
