Changeset 11263 for trunk/psphot/src/psphotImageLoop.c
- Timestamp:
- Jan 24, 2007, 11:41:08 AM (19 years ago)
- File:
-
- 1 edited
-
trunk/psphot/src/psphotImageLoop.c (modified) (11 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/psphot/src/psphotImageLoop.c
r9566 r11263 1 1 # include "psphot.h" 2 2 3 // XXX where do we load optional mask and weight input images? 3 // XXX the errors in the pmFPAfileIOChecks could also be due to a programming or config error 4 // XXX we need to either handle those errors or handle the error in pmFPAfileIOChecks and exit 4 5 bool psphotImageLoop (pmConfig *config) { 5 6 … … 11 12 pmFPAfile *input = psMetadataLookupPtr (&status, config->files, "PSPHOT.INPUT"); 12 13 if (!status) { 13 psError(PS _ERR_IO, false, "Can't find input data!");14 psError(PSPHOT_ERR_PROG, false, "Can't find input data!"); 14 15 return false; 15 16 } … … 19 20 // files associated with the science image 20 21 if (!pmFPAfileIOChecks (config, view, PM_FPA_BEFORE)) { 21 psError(PS _ERR_UNKNOWN, false, "failed IO for fpa in psphot\n");22 psError(PSPHOT_ERR_DATA, false, "failed IO for fpa in psphot\n"); 22 23 psFree(view); 23 24 return false; … … 28 29 if (! chip->process || ! chip->file_exists) { continue; } 29 30 if (!pmFPAfileIOChecks (config, view, PM_FPA_BEFORE)) { 30 psError(PS _ERR_UNKNOWN, false, "failed IO for chip %d in psphot\n", view->chip);31 psError(PSPHOT_ERR_DATA, false, "failed IO for chip %d in psphot\n", view->chip); 31 32 psFree (view); 32 33 return false; … … 37 38 if (! cell->process || ! cell->file_exists) { continue; } 38 39 if (!pmFPAfileIOChecks (config, view, PM_FPA_BEFORE)) { 39 psError(PS _ERR_UNKNOWN, false, "failed IO for chip %d, cell %d in psphot\n", view->chip, view->cell);40 psError(PSPHOT_ERR_DATA, false, "failed IO for chip %d, cell %d in psphot\n", view->chip, view->cell); 40 41 psFree (view); 41 42 return false; … … 45 46 while ((readout = pmFPAviewNextReadout (view, input->fpa, 1)) != NULL) { 46 47 if (!pmFPAfileIOChecks (config, view, PM_FPA_BEFORE)) { 47 psError(PS _ERR_UNKNOWN, false, "failed IO for chip %d, cell %d, readout %d in psphot\n", view->chip, view->cell, view->readout);48 psError(PSPHOT_ERR_DATA, false, "failed IO for chip %d, cell %d, readout %d in psphot\n", view->chip, view->cell, view->readout); 48 49 psFree (view); 49 50 return false; … … 54 55 // run the actual photometry analysis 55 56 if (!psphotReadout (config, view)) { 56 psError( PS_ERR_UNKNOWN, false, "failedpsphotReadout for chip %d, cell %d, readout %d\n", view->chip, view->cell, view->readout);57 psError(psErrorCodeLast(), false, "failure in psphotReadout for chip %d, cell %d, readout %d\n", view->chip, view->cell, view->readout); 57 58 psFree (view); 58 59 return false; … … 60 61 61 62 if (!pmFPAfileIOChecks (config, view, PM_FPA_AFTER)) { 62 psError(PS _ERR_UNKNOWN, false, "failed IO for chip %d, cell %d, readout %d in psphot\n", view->chip, view->cell, view->readout);63 psError(PSPHOT_ERR_DATA, false, "failed IO for chip %d, cell %d, readout %d in psphot\n", view->chip, view->cell, view->readout); 63 64 psFree (view); 64 65 return false; … … 66 67 } 67 68 if (!pmFPAfileIOChecks (config, view, PM_FPA_AFTER)) { 68 psError(PS _ERR_UNKNOWN, false, "failed IO for chip %d, cell %d in psphot\n", view->chip, view->cell);69 psError(PSPHOT_ERR_DATA, false, "failed IO for chip %d, cell %d in psphot\n", view->chip, view->cell); 69 70 psFree (view); 70 71 return false; … … 72 73 } 73 74 if (!pmFPAfileIOChecks (config, view, PM_FPA_AFTER)) { 74 psError(PS _ERR_UNKNOWN, false, "failed IO for chip %d in psphot\n", view->chip);75 psError(PSPHOT_ERR_DATA, false, "failed IO for chip %d in psphot\n", view->chip); 75 76 psFree (view); 76 77 return false; … … 78 79 } 79 80 if (!pmFPAfileIOChecks (config, view, PM_FPA_AFTER)) { 80 psError(PS _ERR_UNKNOWN, false, "failed IO for fpa in psphot\n");81 psError(PSPHOT_ERR_DATA, false, "failed IO for fpa in psphot\n"); 81 82 psFree (view); 82 83 return false;
Note:
See TracChangeset
for help on using the changeset viewer.
