Changeset 34902 for branches/eam_branches/ipp-20121219/ppStack/src
- Timestamp:
- Jan 10, 2013, 11:33:10 AM (14 years ago)
- Location:
- branches/eam_branches/ipp-20121219
- Files:
-
- 4 edited
-
. (modified) (1 prop)
-
ppStack/src (modified) (1 prop)
-
ppStack/src/ppStackCombinePrepare.c (modified) (2 diffs)
-
ppStack/src/ppStackLoop.c (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
branches/eam_branches/ipp-20121219
- Property svn:mergeinfo changed
/trunk (added) merged: 34859-34860,34863,34865,34869-34870,34875,34878-34880,34882,34884,34889
- Property svn:mergeinfo changed
-
branches/eam_branches/ipp-20121219/ppStack/src
- Property svn:ignore
-
branches/eam_branches/ipp-20121219/ppStack/src/ppStackCombinePrepare.c
r34800 r34902 34 34 /* options->expRO = NULL; */ 35 35 /* } */ 36 pmCell *bkgCell; 37 int bkg_r0,bkg_c0; 38 int bkg_nC,bkg_nR; 36 int bkg_r0 = 0,bkg_c0 = 0; 37 int bkg_nC = 0,bkg_nR = 0; 39 38 if (bkgName) { 40 39 ppStackFileActivationSingle(config, PPSTACK_FILES_BKG, true, 0); 41 40 pmFPAfile *file = pmFPAfileSelectSingle(config->files, "PPSTACK.INPUT.BKGMODEL", 0); 41 if (!file) { 42 psError(PPSTACK_ERR_ARGUMENTS, false, "Output background model selected but no inputs provided."); 43 return false; 44 } 42 45 pmFPAview *view = ppStackFilesIterateDown(config); 43 46 pmReadout *ro = pmFPAviewThisReadout(view,file->fpa); … … 47 50 bkg_nC = ro->image->numCols; 48 51 bkg_nR = ro->image->numRows; 49 bkgCell = pmFPAfileThisCell(config->files, view, bkgName); // Bkg cell52 pmCell *bkgCell = pmFPAfileThisCell(config->files, view, bkgName); // Bkg cell 50 53 51 54 options->bkgRO = pmReadoutAlloc(bkgCell); // BKG readout -
branches/eam_branches/ipp-20121219/ppStack/src/ppStackLoop.c
r34800 r34902 41 41 if (options->quality) return true; // Can't do anything else 42 42 43 psMetadata *recipe = psMetadataLookupMetadata(NULL, config->recipes, PPSTACK_RECIPE); // ppStack recipe 44 43 45 // Ensure sufficient inputs 44 46 { 45 47 int numGood = stackSummary(options, "initial combination"); 46 psMetadata *recipe = psMetadataLookupMetadata(NULL, config->recipes, PPSTACK_RECIPE); // ppStack recipe47 48 bool safe = psMetadataLookupBool(NULL, recipe, "SAFE"); // Be safe when combining 48 49 if (safe && numGood <= 1) { … … 62 63 } 63 64 65 bool doBackground = psMetadataLookupBool(NULL, recipe, "BACKGROUND.MODEL"); 66 64 67 // Prepare for combination 65 if (!ppStackCombinePrepare("PPSTACK.OUTPUT", "PPSTACK.OUTPUT.EXP", "PPSTACK.OUTPUT.BKGMODEL", PPSTACK_FILES_STACK, stack, options, config)) {68 if (!ppStackCombinePrepare("PPSTACK.OUTPUT", "PPSTACK.OUTPUT.EXP", doBackground ? "PPSTACK.OUTPUT.BKGMODEL" : NULL, PPSTACK_FILES_STACK, stack, options, config)) { 66 69 psError(psErrorCodeLast(), false, "Unable to prepare for combination."); 67 70 psFree(stack); … … 143 146 144 147 // Generate median background stack here. 145 if ( !ppStackCombineBackground(stack, options, config)) {148 if (doBackground && !ppStackCombineBackground(stack, options, config)) { 146 149 psError(psErrorCodeLast(), false, "Unable to generate median of background images."); 147 150 psFree(stack);
Note:
See TracChangeset
for help on using the changeset viewer.
