Changeset 27096 for trunk/pswarp/src/pswarpParseCamera.c
- Timestamp:
- Feb 25, 2010, 4:26:50 PM (16 years ago)
- File:
-
- 1 edited
-
trunk/pswarp/src/pswarpParseCamera.c (modified) (13 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/pswarp/src/pswarpParseCamera.c
r26896 r27096 31 31 } 32 32 if (!status) { 33 psError( PSWARP_ERR_CONFIG, false, "Failed to load file definition for %s", filerule);33 psError(psErrorCodeLast(), false, "Failed to load file definition for %s", filerule); 34 34 return false; 35 35 } … … 38 38 file = pmFPAfileDefineFromRun(&status, bind, config, filerule); // File to return 39 39 if (!status) { 40 psError( PSWARP_ERR_CONFIG, false, "Failed to load file definition for %s", filerule);40 psError(psErrorCodeLast(), false, "Failed to load file definition for %s", filerule); 41 41 return NULL; 42 42 } … … 65 65 pmFPAfile *input = defineInputFile(config, NULL, "PSWARP.INPUT", "INPUT", PM_FPA_FILE_IMAGE); 66 66 if (!input) { 67 psError( PSWARP_ERR_CONFIG, false, "Failed to build FPA from PSWARP.INPUT");67 psError(psErrorCodeLast(), false, "Failed to build FPA from PSWARP.INPUT"); 68 68 return false; 69 69 } … … 89 89 bool status = pswarpDefineSkycell(&skycell, &skyConfig, config, "PSWARP.SKYCELL", "SKYCELL"); 90 90 if (!status) { 91 psError( PSWARP_ERR_CONFIG, false, "Failed to build FPA from PSWARP.SKYCELL");91 psError(psErrorCodeLast(), false, "Failed to build FPA from PSWARP.SKYCELL"); 92 92 return false; 93 93 } … … 97 97 pmFPAfile *output = pmFPAfileDefineSkycell(config, NULL, "PSWARP.OUTPUT"); 98 98 if (!output) { 99 psError( PSWARP_ERR_CONFIG, false, "Failed to build FPA from PSWARP.OUTPUT");99 psError(psErrorCodeLast(), false, "Failed to build FPA from PSWARP.OUTPUT"); 100 100 return false; 101 101 } … … 104 104 pmFPAfile *outMask = pmFPAfileDefineSkycell(config, output->fpa, "PSWARP.OUTPUT.MASK"); 105 105 if (!outMask) { 106 psError( PSWARP_ERR_CONFIG, false, "Failed to build FPA from PSWARP.OUTPUT.MASK");106 psError(psErrorCodeLast(), false, "Failed to build FPA from PSWARP.OUTPUT.MASK"); 107 107 return false; 108 108 } … … 112 112 pmFPAfile *outVariance = pmFPAfileDefineSkycell(config, output->fpa, "PSWARP.OUTPUT.VARIANCE"); 113 113 if (!outVariance) { 114 psError( PSWARP_ERR_CONFIG, false, "Failed to build FPA from PSWARP.OUTPUT.VARIANCE");114 psError(psErrorCodeLast(), false, "Failed to build FPA from PSWARP.OUTPUT.VARIANCE"); 115 115 return false; 116 116 } … … 121 121 pmFPAfile *outSources = pmFPAfileDefineSkycell(config, output->fpa, "PSWARP.OUTPUT.SOURCES"); 122 122 if (!outSources) { 123 psError( PSWARP_ERR_CONFIG, false, "Failed to build FPA from PSWARP.OUTPUT.SOURCES");123 psError(psErrorCodeLast(), false, "Failed to build FPA from PSWARP.OUTPUT.SOURCES"); 124 124 return false; 125 125 } … … 129 129 psMetadata *recipe = psMetadataLookupPtr (&status, config->recipes, PSWARP_RECIPE); 130 130 if (!recipe) { 131 psError(PS PHOT_ERR_CONFIG, false, "missing recipe %s", PSWARP_RECIPE);131 psError(PSWARP_ERR_CONFIG, false, "missing recipe %s", PSWARP_RECIPE); 132 132 return false; 133 133 } … … 139 139 pmFPAfile *psphotInput = pmFPAfileDefineSkycell(config, NULL, "PSPHOT.INPUT"); 140 140 if (!psphotInput) { 141 psError( PS_ERR_IO, false, _("Unable to generate output file from PSPHOT.INPUT"));141 psError(psErrorCodeLast(), false, _("Unable to generate output file from PSPHOT.INPUT")); 142 142 return false; 143 143 } 144 144 psphotInput->src = psMemIncrRefCounter(output->fpa); 145 // specify the number of psphot input images146 psMetadataAddS32 (config->arguments, PS_LIST_TAIL, "PSPHOT.INPUT.NUM", PS_META_REPLACE, "number of inputs", 1);145 // specify the number of psphot input images 146 psMetadataAddS32 (config->arguments, PS_LIST_TAIL, "PSPHOT.INPUT.NUM", PS_META_REPLACE, "number of inputs", 1); 147 147 148 148 pmFPAfile *psphotInSources = pmFPAfileDefineSkycell(config, output->fpa, "PSPHOT.INPUT.CMF"); 149 149 if (!psphotInSources) { 150 psError( PS_ERR_IO, false, _("Unable to generate output file from PSPHOT.INPUT.CMF"));150 psError(psErrorCodeLast(), false, _("Unable to generate output file from PSPHOT.INPUT.CMF")); 151 151 return false; 152 152 } … … 155 155 psMetadata *psphotRecipe = psMetadataLookupPtr(NULL, config->recipes, PSPHOT_RECIPE); // Recipe 156 156 if (!psphotRecipe) { 157 psError(PS _ERR_UNEXPECTED_NULL, false, "Unable to find %s recipe.", PSPHOT_RECIPE);157 psError(PSWARP_ERR_CONFIG, false, "Unable to find %s recipe.", PSPHOT_RECIPE); 158 158 return false; 159 159 } … … 162 162 // Define associated psphot input/output files 163 163 if (!psphotDefineFiles(config, psphotInput)) { 164 psError(PS PHOT_ERR_CONFIG, false,164 psError(PSWARP_ERR_CONFIG, false, 165 165 "Unable to define the additional input/output files for psphot"); 166 166 return false; … … 183 183 int chipNum = atoi(chips->data[i]); 184 184 if (! pmFPASelectChip(input->fpa, chipNum, false)) { 185 psError(PSWARP_ERR_ CONFIG, true, "Chip number %d doesn't exist in camera.\n", chipNum);185 psError(PSWARP_ERR_ARGUMENTS, true, "Chip number %d doesn't exist in camera.\n", chipNum); 186 186 return false; 187 187 }
Note:
See TracChangeset
for help on using the changeset viewer.
