Changeset 34862
- Timestamp:
- Dec 19, 2012, 2:09:54 PM (14 years ago)
- Location:
- tags/ipp-20121218
- Files:
-
- 5 edited
-
ippconfig/recipes/ppStack.config (modified) (1 diff, 1 prop)
-
ppStack (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
-
tags/ipp-20121218/ippconfig/recipes/ppStack.config
- Property svn:mergeinfo set to
r34849 r34862 32 32 TARGET.FRAC F32 0.1 # Minimum flux fraction for target PSF 33 33 TARGET.MINMAG F32 3.0 # Minimum magnitude difference to tolerate in stamp 34 35 BACKGROUND.MODEL BOOL FALSE # Construct a stacked version of the warp stage background 34 36 35 37 RENORM BOOL TRUE # Renormalise weight maps? -
tags/ipp-20121218/ppStack
- Property svn:mergeinfo set to
-
tags/ipp-20121218/ppStack/src
- Property svn:ignore
-
tags/ipp-20121218/ppStack/src/ppStackCombinePrepare.c
r34856 r34862 34 34 /* options->expRO = NULL; */ 35 35 /* } */ 36 pmCell *bkgCell; 37 int bkg_r0 = 0, bkg_c0 = 0; 38 int bkg_nC = 0, bkg_nR = 0; 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 -
tags/ipp-20121218/ppStack/src/ppStackLoop.c
r34800 r34862 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.
