Changeset 23704 for branches/pap/ppSub/src/ppSubCamera.c
- Timestamp:
- Apr 3, 2009, 11:58:24 AM (17 years ago)
- File:
-
- 1 edited
-
branches/pap/ppSub/src/ppSubCamera.c (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
branches/pap/ppSub/src/ppSubCamera.c
r23688 r23704 161 161 162 162 163 // Now that the camera has been determined, we can read the recipe 164 psMetadata *recipe = psMetadataLookupMetadata(NULL, config->recipes, PPSUB_RECIPE); // Recipe for ppSim 165 if (!recipe) { 166 psError(PS_ERR_UNEXPECTED_NULL, false, "Unable to find recipe %s", PPSUB_RECIPE); 167 return false; 168 } 169 data->invert = psMetadataLookupBool(NULL, recipe, "INVERSE"); 170 data->photometry = psMetadataLookupBool(NULL, recipe, "PHOTOMETRY"); 171 172 163 173 // Output image 164 174 pmFPAfile *output = defineOutputFile(config, input, true, "PPSUB.OUTPUT", PM_FPA_FILE_IMAGE); … … 170 180 output->save = true; 171 181 outMask->save = true; 172 pmFPAfile *outVar = NULL;173 182 if (inVar && refVar) { 174 outVar = defineOutputFile(config, output, false, "PPSUB.OUTPUT.VARIANCE", PM_FPA_FILE_VARIANCE); 183 pmFPAfile *outVar = defineOutputFile(config, output, false, "PPSUB.OUTPUT.VARIANCE", 184 PM_FPA_FILE_VARIANCE); 175 185 if (!outVar) { 176 186 psError(PS_ERR_UNKNOWN, false, "Unable to define output files"); … … 180 190 } 181 191 192 if (data->inverse) { 193 // Inverse output image 194 pmFPAfile *outinv = defineOutputFile(config, input, true, "PPSUB.OUTINV", PM_FPA_FILE_IMAGE); 195 pmFPAfile *outinvMask = defineOutputFile(config, outinv, false, "PPSUB.OUTINV.MASK", 196 PM_FPA_FILE_MASK); 197 if (!outinv || !outinvMask) { 198 psError(PS_ERR_UNKNOWN, false, "Unable to define output files"); 199 return false; 200 } 201 outinv->save = true; 202 outinvMask->save = true; 203 if (inVar && refVar) { 204 pmFPAfile *outinvVar = defineOutputFile(config, outinv, false, "PPSUB.OUTINV.VARIANCE", 205 PM_FPA_FILE_VARIANCE); 206 if (!outinvVar) { 207 psError(PS_ERR_UNKNOWN, false, "Unable to define output files"); 208 return false; 209 } 210 outinvVar->save = true; 211 } 212 } 182 213 183 214 // Convolved input image … … 252 283 253 284 // psPhot input 254 if ( psMetadataLookupBool(NULL, recipe, "PHOTOMETRY")) {285 if (data->photometry) { 255 286 psphotModelClassInit(); // load implementation-specific models 256 287
Note:
See TracChangeset
for help on using the changeset viewer.
