Changeset 23576 for trunk/ppStack/src/ppStackCamera.c
- Timestamp:
- Mar 27, 2009, 1:26:55 PM (17 years ago)
- File:
-
- 1 edited
-
trunk/ppStack/src/ppStackCamera.c (modified) (5 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/ppStack/src/ppStackCamera.c
r23371 r23576 51 51 bool status = false; // Status of file definition 52 52 53 psMetadata *recipe = psMetadataLookupMetadata(NULL, config->recipes, PPSTACK_RECIPE); // Recipe for ppSim 54 if (!recipe) { 55 psError(PS_ERR_UNEXPECTED_NULL, false, "Unable to find recipe %s", PPSTACK_RECIPE); 56 return false; 57 } 58 bool convolve = psMetadataLookupBool(NULL, recipe, "CONVOLVE"); // Convolve images before stack? 59 53 60 psArray *runImages = pmFPAfileDefineMultipleFromRun(&status, NULL, config, 54 61 "PPSTACK.INPUT"); // Input images from previous run … … 98 105 } 99 106 if (!runSrc) { 100 psError(PS_ERR_UNEXPECTED_NULL, true, "Unable to define input sources from RUN metad ta.");107 psError(PS_ERR_UNEXPECTED_NULL, true, "Unable to define input sources from RUN metadata."); 101 108 psFree(runImages); 102 109 return false; … … 104 111 psFree(runSrc); 105 112 106 psArray *runKernel = pmFPAfileDefineMultipleFromRun(&status, runImages, config, 107 "PPSTACK.CONV.KERNEL"); // Convolution kernels 108 if (!status) { 109 psError(PS_ERR_UNKNOWN, false, "Unable to define convolution kernels from RUN metadata."); 110 psFree(runImages); 111 return false; 112 } 113 if (!runSrc) { 114 psError(PS_ERR_UNEXPECTED_NULL, true, "Unable to define convolution kernels from RUN metadta."); 115 psFree(runImages); 116 return false; 117 } 118 psFree(runKernel); 113 if (convolve) { 114 psArray *runKernel = pmFPAfileDefineMultipleFromRun(&status, runImages, config, 115 "PPSTACK.CONV.KERNEL"); // Convolution kernels 116 if (!status) { 117 psError(PS_ERR_UNKNOWN, false, "Unable to define convolution kernels from RUN metadata."); 118 psFree(runImages); 119 return false; 120 } 121 if (!runKernel) { 122 psError(PS_ERR_UNEXPECTED_NULL, true, 123 "Unable to define convolution kernels from RUN metadata."); 124 psFree(runImages); 125 return false; 126 } 127 psFree(runKernel); 128 } 119 129 120 130 psFree(runImages); … … 200 210 } 201 211 202 pmFPAfile *kernel = pmFPAfileDefineOutput(config, imageFile->fpa, "PPSTACK.CONV.KERNEL"); 203 if (!kernel) { 204 psError(PS_ERR_IO, false, _("Unable to generate output file from PPSTACK.CONV.KERNEL")); 205 return false; 206 } 207 kernel->save = true; 212 if (convolve) { 213 pmFPAfile *kernel = pmFPAfileDefineOutput(config, imageFile->fpa, "PPSTACK.CONV.KERNEL"); 214 if (!kernel) { 215 psError(PS_ERR_IO, false, _("Unable to generate output file from PPSTACK.CONV.KERNEL")); 216 return false; 217 } 218 kernel->save = true; 219 } 208 220 209 221 i++; … … 300 312 } 301 313 jpeg2->save = true; 302 303 304 psMetadata *recipe = psMetadataLookupMetadata(NULL, config->recipes, PPSTACK_RECIPE); // Recipe for ppSim305 if (!recipe) {306 psError(PS_ERR_UNEXPECTED_NULL, false, "Unable to find recipe %s", PPSTACK_RECIPE);307 return false;308 }309 314 310 315 // For photometry, we operate on the chip-mosaicked image
Note:
See TracChangeset
for help on using the changeset viewer.
