Changeset 20180 for trunk/dvoTools/src/dvoApplyCorrLoop.c
- Timestamp:
- Oct 15, 2008, 5:51:49 PM (18 years ago)
- File:
-
- 1 edited
-
trunk/dvoTools/src/dvoApplyCorrLoop.c (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/dvoTools/src/dvoApplyCorrLoop.c
r11877 r20180 10 10 pmChip *chip; 11 11 pmCell *cell; 12 pmReadout *readout;13 12 14 13 // psMetadata *recipe = psMetadataLookupMetadata(&status, config->recipes, RECIPE_NAME); … … 17 16 pmFPAfile *input = psMetadataLookupPtr(&status, config->files, "DVOFLAT.INPUT"); 18 17 if (!status) { 19 psErrorStackPrint(stderr, "Can't find input data!\n"); 18 psErrorStackPrint(stderr, "Can't find input flat-field image\n"); 19 exit(EXIT_FAILURE); 20 } 21 22 // select the input image 23 pmFPAfile *corr = psMetadataLookupPtr(&status, config->files, "DVOFLAT.CORR"); 24 if (!status) { 25 psErrorStackPrint(stderr, "Can't find correction image\n"); 20 26 exit(EXIT_FAILURE); 21 27 } … … 40 46 } 41 47 48 pmChip *corrChip = pmFPAviewThisChip(view, corr->fpa); 49 42 50 // process each cell in the Chip 43 51 while ((cell = pmFPAviewNextCell(view, input->fpa, 1)) != NULL) { … … 50 58 } 51 59 52 // process each of the readouts 53 while ((readout = pmFPAviewNextReadout (view, input->fpa, 1)) != NULL) { 54 if (!pmFPAfileIOChecks(config, view, PM_FPA_BEFORE)) { 55 psError(PS_ERR_UNKNOWN, false, "failed IO for chip %d, cell %d, readout %d in dvoApplyCorr\n", view->chip, view->cell, view->readout); 56 psFree (view); 57 return false; 58 } 59 if (!readout->data_exists) continue; 60 61 // XXX put the function here which multiplies the input image and the correction image 62 dvoApplyCorrReadout (config, view, "DVOFLAT.INPUT", "DVOFLAT.CORR"); 63 64 if (!pmFPAfileIOChecks (config, view, PM_FPA_AFTER)) { 65 psError(PS_ERR_UNKNOWN, false, "failed IO for chip %d, cell %d, readout %d in dvoApplyCorr\n", view->chip, view->cell, view->readout); 66 psFree (view); 67 return false; 68 } 60 // multiply the input image and the correction image 61 if (!dvoApplyCorrReadout (cell, corrChip)) { 62 psError(PS_ERR_UNKNOWN, false, "failed to apply correction to chip %d, cell %d dvoApplyCorr\n", view->chip, view->cell); 63 psFree (view); 64 return false; 69 65 } 70 66 if (!pmFPAfileIOChecks (config, view, PM_FPA_AFTER)) {
Note:
See TracChangeset
for help on using the changeset viewer.
