- Timestamp:
- Jan 25, 2010, 7:52:41 PM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/eam_branches/psphot.stack.20100120/src/psphotSubtractBackground.c
r26542 r26681 4 4 // generate the median in NxN boxes, clipping heavily 5 5 // linear interpolation to generate full-scale model 6 bool psphotSubtractBackgroundReadout (pmConfig *config, const pmFPAview *view, const char *filename, int index )6 bool psphotSubtractBackgroundReadout (pmConfig *config, const pmFPAview *view, const char *filename, int index, psMetadata *recipe) 7 7 { 8 8 bool status = true; … … 25 25 pmReadout *model = pmFPAviewThisReadout (view, modelFile->fpa); 26 26 assert (model); 27 28 // select the appropriate recipe information29 psMetadata *recipe = psMetadataLookupPtr (&status, config->recipes, PSPHOT_RECIPE);30 assert (recipe);31 27 32 28 // user-defined masks to test for good/bad pixels (build from recipe list if not yet set) … … 114 110 // the pmReadout selected in this function are all view on entries in config->files 115 111 112 // display the backsub and backgnd images 113 // move this inthe the subtract background loop 114 psphotVisualShowBackground (config, view, readout); 115 116 116 npass ++; 117 117 return true; … … 122 122 bool status = false; 123 123 124 // select the appropriate recipe information 125 psMetadata *recipe = psMetadataLookupPtr (&status, config->recipes, PSPHOT_RECIPE); 126 psAssert (recipe, "missing recipe?"); 127 124 128 int num = psMetadataLookupS32 (&status, config->arguments, "PSPHOT.INPUT.NUM"); 125 129 psAssert (status, "programming error: must define PSPHOT.INPUT.NUM"); … … 127 131 // loop over the available readouts 128 132 for (int i = 0; i < num; i++) { 129 if (!psphotSubtractBackgroundReadout (config, view, "PSPHOT.INPUT", i )) {133 if (!psphotSubtractBackgroundReadout (config, view, "PSPHOT.INPUT", i, recipe)) { 130 134 psError (PSPHOT_ERR_CONFIG, false, "failed to subtract background for PSPHOT.INPUT entry %d", i); 131 135 return false;
Note:
See TracChangeset
for help on using the changeset viewer.
