Changeset 26982 for trunk/ppSub/src/ppSubCamera.c
- Timestamp:
- Feb 17, 2010, 5:36:13 PM (16 years ago)
- File:
-
- 1 edited
-
trunk/ppSub/src/ppSubCamera.c (modified) (32 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/ppSub/src/ppSubCamera.c
r26899 r26982 45 45 46 46 if (!status) { 47 psError( PS_ERR_UNKNOWN, false, "Failed to load file definition for %s", filerule);47 psError(psErrorCodeLast(), false, "Failed to load file definition for %s", filerule); 48 48 return false; 49 49 } … … 52 52 file = pmFPAfileDefineFromRun(&status, bind, config, filerule); // File to return 53 53 if (!status) { 54 psError( PS_ERR_UNKNOWN, false, "Failed to load file definition for %s", filerule);54 psError(psErrorCodeLast(), false, "Failed to load file definition for %s", filerule); 55 55 return NULL; 56 56 } … … 64 64 65 65 if (file->type != fileType) { 66 psError(P S_ERR_UNKNOWN, true, "%s is not of type %s", filerule, pmFPAfileStringFromType(fileType));66 psError(PPSUB_ERR_CONFIG, true, "%s is not of type %s", filerule, pmFPAfileStringFromType(fileType)); 67 67 return NULL; 68 68 } … … 84 84 pmFPAfileDefineOutput(config, template->fpa, filerule); 85 85 if (!file) { 86 psError( PS_ERR_IO, false, _("Unable to generate output file from %s"), filerule);86 psError(psErrorCodeLast(), false, _("Unable to generate output file from %s"), filerule); 87 87 return NULL; 88 88 } 89 89 if (file->type != fileType) { 90 psError(P S_ERR_IO, true, "%s is not of type %s", filerule, pmFPAfileStringFromType(fileType));90 psError(PPSUB_ERR_CONFIG, true, "%s is not of type %s", filerule, pmFPAfileStringFromType(fileType)); 91 91 return NULL; 92 92 } … … 109 109 pmFPAfile *file = pmFPAfileDefineFromRun(&status, bind, config, filerule); // File to return 110 110 if (!status) { 111 psError( PS_ERR_UNKNOWN, false, "Failed to load file definition for %s", filerule);111 psError(psErrorCodeLast(), false, "Failed to load file definition for %s", filerule); 112 112 return NULL; 113 113 } … … 121 121 file = pmFPAfileDefineOutput(config, bind ? bind->fpa : NULL, filerule); 122 122 if (!status) { 123 psError( PS_ERR_UNKNOWN, false, "Failed to load file definition for %s", filerule);123 psError(psErrorCodeLast(), false, "Failed to load file definition for %s", filerule); 124 124 return false; 125 125 } … … 135 135 136 136 if (file->type != fileType) { 137 psError(P S_ERR_UNKNOWN, true, "%s is not of type %s", filerule, pmFPAfileStringFromType(fileType));137 psError(PPSUB_ERR_CONFIG, true, "%s is not of type %s", filerule, pmFPAfileStringFromType(fileType)); 138 138 return NULL; 139 139 } … … 154 154 pmFPAfile *input = defineInputFile(&success, config, NULL, "PPSUB.INPUT", "INPUT", PM_FPA_FILE_IMAGE); 155 155 if (!success) { 156 psError( PS_ERR_IO, false, "Failed to build FPA from PPSUB.INPUT");156 psError(psErrorCodeLast(), false, "Failed to build FPA from PPSUB.INPUT"); 157 157 return false; 158 158 } … … 160 160 defineInputFile(&success, config, input, "PPSUB.INPUT.MASK", "INPUT.MASK", PM_FPA_FILE_MASK); 161 161 if (!success) { 162 psError( PS_ERR_IO, false, "Failed to build FPA from PPSUB.INPUT.MASK");162 psError(psErrorCodeLast(), false, "Failed to build FPA from PPSUB.INPUT.MASK"); 163 163 return false; 164 164 } … … 166 166 pmFPAfile *inVar = defineInputFile(&success, config, input, "PPSUB.INPUT.VARIANCE", "INPUT.VARIANCE", PM_FPA_FILE_VARIANCE); 167 167 if (!success) { 168 psError( PS_ERR_IO, false, "Failed to build FPA from PPSUB.INPUT.VARIANCE");168 psError(psErrorCodeLast(), false, "Failed to build FPA from PPSUB.INPUT.VARIANCE"); 169 169 return false; 170 170 } … … 172 172 defineInputFile(&success, config, NULL, "PPSUB.INPUT.SOURCES", "INPUT.SOURCES", PM_FPA_FILE_CMF); 173 173 if (!success) { 174 psError( PS_ERR_IO, false, "Failed to build FPA from PPSUB.INPUT.SOURCES");174 psError(psErrorCodeLast(), false, "Failed to build FPA from PPSUB.INPUT.SOURCES"); 175 175 return false; 176 176 } … … 179 179 pmFPAfile *ref = defineInputFile(&success, config, NULL, "PPSUB.REF", "REF", PM_FPA_FILE_IMAGE); 180 180 if (!success) { 181 psError( PS_ERR_IO, false, "Failed to build FPA from PPSUB.REF");181 psError(psErrorCodeLast(), false, "Failed to build FPA from PPSUB.REF"); 182 182 return false; 183 183 } … … 185 185 defineInputFile(&success, config, ref, "PPSUB.REF.MASK", "REF.MASK", PM_FPA_FILE_MASK); 186 186 if (!success) { 187 psError( PS_ERR_IO, false, "Failed to build FPA from PPSUB.REF.MASK");187 psError(psErrorCodeLast(), false, "Failed to build FPA from PPSUB.REF.MASK"); 188 188 return false; 189 189 } … … 191 191 pmFPAfile *refVar = defineInputFile(&success, config, ref, "PPSUB.REF.VARIANCE", "REF.VARIANCE", PM_FPA_FILE_VARIANCE); 192 192 if (!success) { 193 psError( PS_ERR_IO, false, "Failed to build FPA from PPSUB.REF.VARIANCE");193 psError(psErrorCodeLast(), false, "Failed to build FPA from PPSUB.REF.VARIANCE"); 194 194 return false; 195 195 } … … 197 197 defineInputFile(&success, config, NULL, "PPSUB.REF.SOURCES", "REF.SOURCES", PM_FPA_FILE_CMF); 198 198 if (!success) { 199 psError( PS_ERR_IO, false, "Failed to build FPA from PPSUB.REF.SOURCES");199 psError(psErrorCodeLast(), false, "Failed to build FPA from PPSUB.REF.SOURCES"); 200 200 return false; 201 201 } … … 204 204 psMetadata *recipe = psMetadataLookupMetadata(NULL, config->recipes, PPSUB_RECIPE); // Recipe for ppSim 205 205 if (!recipe) { 206 psError(P S_ERR_UNEXPECTED_NULL, false, "Unable to find recipe %s", PPSUB_RECIPE);206 psError(PPSUB_ERR_CONFIG, false, "Unable to find recipe %s", PPSUB_RECIPE); 207 207 return false; 208 208 } … … 227 227 PM_FPA_FILE_MASK); 228 228 if (!inConvImage || !inConvMask) { 229 psError( PS_ERR_UNKNOWN, false, "Unable to define output files");229 psError(psErrorCodeLast(), false, "Unable to define output files"); 230 230 return false; 231 231 } … … 238 238 PM_FPA_FILE_VARIANCE); 239 239 if (!inConvVar) { 240 psError( PS_ERR_UNKNOWN, false, "Unable to define output files");240 psError(psErrorCodeLast(), false, "Unable to define output files"); 241 241 return false; 242 242 } … … 251 251 PM_FPA_FILE_MASK); 252 252 if (!refConvImage || !refConvMask) { 253 psError( PS_ERR_UNKNOWN, false, "Unable to define output files");253 psError(psErrorCodeLast(), false, "Unable to define output files"); 254 254 return false; 255 255 } … … 262 262 PM_FPA_FILE_VARIANCE); 263 263 if (!refConvVar) { 264 psError( PS_ERR_UNKNOWN, false, "Unable to define output files");264 psError(psErrorCodeLast(), false, "Unable to define output files"); 265 265 return false; 266 266 } … … 274 274 pmFPAfile *outMask = defineOutputFile(config, output, false, "PPSUB.OUTPUT.MASK", PM_FPA_FILE_MASK); 275 275 if (!output || !outMask) { 276 psError( PS_ERR_UNKNOWN, false, "Unable to define output files");276 psError(psErrorCodeLast(), false, "Unable to define output files"); 277 277 return false; 278 278 } … … 283 283 PM_FPA_FILE_VARIANCE); 284 284 if (!outVar) { 285 psError( PS_ERR_UNKNOWN, false, "Unable to define output files");285 psError(psErrorCodeLast(), false, "Unable to define output files"); 286 286 return false; 287 287 } … … 296 296 PM_FPA_FILE_MASK); 297 297 if (!inverse || !invMask) { 298 psError( PS_ERR_UNKNOWN, false, "Unable to define output files");298 psError(psErrorCodeLast(), false, "Unable to define output files"); 299 299 return false; 300 300 } … … 305 305 PM_FPA_FILE_VARIANCE); 306 306 if (!invVar) { 307 psError( PS_ERR_UNKNOWN, false, "Unable to define output files");307 psError(psErrorCodeLast(), false, "Unable to define output files"); 308 308 return false; 309 309 } … … 316 316 pmFPAfile *jpeg1 = pmFPAfileDefineOutput(config, NULL, "PPSUB.OUTPUT.JPEG1"); 317 317 if (!jpeg1) { 318 psError( PS_ERR_IO, false, _("Unable to generate output file from PPSUB.OUTPUT.JPEG1"));318 psError(psErrorCodeLast(), false, _("Unable to generate output file from PPSUB.OUTPUT.JPEG1")); 319 319 return false; 320 320 } 321 321 if (jpeg1->type != PM_FPA_FILE_JPEG) { 322 psError( PS_ERR_IO, true, "PPSUB.OUTPUT.JPEG1 is not of type JPEG");322 psError(psErrorCodeLast(), true, "PPSUB.OUTPUT.JPEG1 is not of type JPEG"); 323 323 return false; 324 324 } … … 326 326 pmFPAfile *jpeg2 = pmFPAfileDefineOutput(config, NULL, "PPSUB.OUTPUT.JPEG2"); 327 327 if (!jpeg2) { 328 psError( PS_ERR_IO, false, _("Unable to generate output file from PPSUB.OUTPUT.JPEG2"));328 psError(psErrorCodeLast(), false, _("Unable to generate output file from PPSUB.OUTPUT.JPEG2")); 329 329 return false; 330 330 } 331 331 if (jpeg2->type != PM_FPA_FILE_JPEG) { 332 psError( PS_ERR_IO, true, "PPSUB.OUTPUT.JPEG2 is not of type JPEG");332 psError(psErrorCodeLast(), true, "PPSUB.OUTPUT.JPEG2 is not of type JPEG"); 333 333 return false; 334 334 } … … 338 338 pmFPAfile *jpeg3 = pmFPAfileDefineOutput(config, NULL, "PPSUB.OUTPUT.RESID.JPEG"); 339 339 if (!jpeg3) { 340 psError( PS_ERR_IO, false, _("Unable to generate output file from PPSUB.OUTPUT.RESID.JPEG"));340 psError(psErrorCodeLast(), false, _("Unable to generate output file from PPSUB.OUTPUT.RESID.JPEG")); 341 341 return false; 342 342 } 343 343 if (jpeg3->type != PM_FPA_FILE_JPEG) { 344 psError( PS_ERR_IO, true, "PPSUB.OUTPUT.RESID.JPEG is not of type JPEG");344 psError(psErrorCodeLast(), true, "PPSUB.OUTPUT.RESID.JPEG is not of type JPEG"); 345 345 return false; 346 346 } … … 360 360 pmFPAfile *psphot = pmFPAfileDefineFromFPA(config, output->fpa, 1, 1, "PSPHOT.INPUT"); 361 361 if (!psphot) { 362 psError( PS_ERR_IO, false, "Failed to build FPA from PSPHOT.INPUT");362 psError(psErrorCodeLast(), false, "Failed to build FPA from PSPHOT.INPUT"); 363 363 return false; 364 364 } 365 365 if (psphot->type != PM_FPA_FILE_IMAGE) { 366 psError( PS_ERR_IO, true, "PSPHOT.INPUT is not of type IMAGE");366 psError(psErrorCodeLast(), true, "PSPHOT.INPUT is not of type IMAGE"); 367 367 return false; 368 368 } … … 374 374 pmFPAfile *psf = pmFPAfileDefineFromFPA(config, output->fpa, 1, 1, "PSPHOT.PSF.LOAD"); 375 375 if (!psf) { 376 psError( PS_ERR_IO, false, "Failed to build FPA from PSPHOT.PSF.LOAD");376 psError(psErrorCodeLast(), false, "Failed to build FPA from PSPHOT.PSF.LOAD"); 377 377 return false; 378 378 } 379 379 if (psf->type != PM_FPA_FILE_PSF) { 380 psError( PS_ERR_IO, true, "PSPHOT.PSF.LOAD is not of type PSF");380 psError(psErrorCodeLast(), true, "PSPHOT.PSF.LOAD is not of type PSF"); 381 381 return false; 382 382 } … … 384 384 385 385 if (!psphotDefineFiles(config, psphot)) { 386 psError( PS_ERR_UNKNOWN, false, "Unable to set up psphot files.");386 psError(psErrorCodeLast(), false, "Unable to set up psphot files."); 387 387 return false; 388 388 } … … 395 395 PM_FPA_FILE_CMF); 396 396 if (!outSources) { 397 psError( PS_ERR_UNKNOWN, false, "Unable to set up output source file.");397 psError(psErrorCodeLast(), false, "Unable to set up output source file."); 398 398 return false; 399 399 } … … 404 404 PM_FPA_FILE_CMF); 405 405 if (!invSources) { 406 psError( PS_ERR_UNKNOWN, false, "Unable to set up inverse source file.");406 psError(psErrorCodeLast(), false, "Unable to set up inverse source file."); 407 407 return false; 408 408 }
Note:
See TracChangeset
for help on using the changeset viewer.
