- Timestamp:
- Oct 5, 2012, 6:03:49 PM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/czw_branch/20120906/ppStack/src/ppStackCombineFinal.c
r33093 r34516 3 3 // This is the doomsday switch. 4 4 // #define TESTING // Enable test output 5 bool ppStackCombineBackground(ppStackThreadData *stack, ppStackOptions *options, pmConfig *config) 6 { 7 psAssert(stack, "Require stack"); 8 psAssert(options, "Require options"); 9 psAssert(config, "Require configuration"); 10 11 psTimerStart("PPSTACK_BKGMED"); 12 13 14 pmReadout *bkgRO = options->bkgRO; 15 16 psArray *inputs = psArrayAlloc(options->num); 17 // const psArray *cells = options->cells; 18 for (int i = 0; i < options->num; i++) { 19 ppStackFileActivationSingle(config, PPSTACK_FILES_BKG, true, i); 20 pmFPAfile *file = pmFPAfileSelectSingle(config->files, "PPSTACK.INPUT.BKGMODEL", i); 21 pmFPAview *view = ppStackFilesIterateDown(config); 22 pmReadout *ro = pmFPAviewThisReadout(view,file->fpa); 23 inputs->data[i] = ro; 24 pmFPAfileClose(file,view); 25 ppStackFileActivationSingle(config, PPSTACK_FILES_BKG, false, i); 26 } 27 if (!pmStackSimpleMedianCombine(bkgRO,inputs)) { 28 psFree(inputs); 29 return(false); 30 } 31 /* for (int i = 0; i < options->num; i++) { */ 32 /* // ppStackFilesIterateUp(config); */ 33 /* /\* pmFPAfile *file = pmFPAfileSelectSingle(config->files, "PPSTACK.INPUT.BKGMODEL", i); *\/ */ 34 /* /\* pmFPAview *view = ppStackFilesIterateDown(config); *\/ */ 35 /* pmFPAfile *file = pmFPAfileSelectSingle(config->files, "PPSTACK.INPUT.BKGMODEL", i); */ 36 37 /* ppStackFileActivationSingle(config, PPSTACK_FILES_BKG, false, i); */ 38 /* } */ 39 psFree(inputs); 40 // psFree(stack->bkgFits); 41 bkgRO->data_exists = true; 42 return(true); 43 } 44 45 46 5 47 6 48 bool ppStackCombineFinal(ppStackThreadData *stack, psArray *covariances, ppStackOptions *options,
Note:
See TracChangeset
for help on using the changeset viewer.
