- Timestamp:
- Mar 16, 2011, 3:42:31 PM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/eam_branches/ipp-20110213/psphot/src/psphotImageLoop.c
r29936 r30936 1 1 # include "psphotStandAlone.h" 2 2 3 # define ESCAPE(MESSAGE) { \4 psError(PSPHOT_ERR_DATA, false, MESSAGE);\5 psFree (view);\6 return false;\7 }3 # define ESCAPE(MESSAGE) { \ 4 psError(PSPHOT_ERR_DATA, false, MESSAGE); \ 5 psFree (view); \ 6 return false; \ 7 } 8 8 9 bool psphotImageLoop (pmConfig *config ) {9 bool psphotImageLoop (pmConfig *config, psphotImageLoopMode mode) { 10 10 11 11 bool status; … … 90 90 91 91 // Update the header 92 { 93 pmHDU *hdu = pmHDUGetHighest(input->fpa, chip, cell); 94 if (hdu && hdu != lastHDU) { 95 psphotVersionHeaderFull(hdu->header); 96 lastHDU = hdu; 97 } 92 pmHDU *hdu = pmHDUGetHighest(input->fpa, chip, cell); 93 if (hdu && hdu != lastHDU) { 94 psphotVersionHeaderFull(hdu->header); 95 lastHDU = hdu; 98 96 } 99 97 … … 109 107 110 108 // run the actual photometry analysis on this chip/cell/readout 111 if (!psphotReadout (config, view, "PSPHOT.INPUT")) { 112 psError(psErrorCodeLast(), false, "failure in psphotReadout for chip %d, cell %d, readout %d\n", view->chip, view->cell, view->readout); 113 psFree (view); 114 return false; 115 } 109 switch (mode) { 110 case PSPHOT_SINGLE: 111 if (!psphotReadout (config, view, "PSPHOT.INPUT")) { 112 psError(psErrorCodeLast(), false, "failure in psphotReadout for chip %d, cell %d, readout %d\n", view->chip, view->cell, view->readout); 113 psFree (view); 114 return false; 115 } 116 break; 117 case PSPHOT_FORCED: 118 if (!psphotForcedReadout (config, view, "PSPHOT.INPUT")) { 119 psError(psErrorCodeLast(), false, "failure in psphotReadout for chip %d, cell %d, readout %d\n", view->chip, view->cell, view->readout); 120 psFree (view); 121 return false; 122 } 123 break; 124 case PSPHOT_MAKE_PSF: 125 if (!psphotMakePSFReadout (config, view, "PSPHOT.INPUT")) { 126 psError(psErrorCodeLast(), false, "failure in psphotReadout for chip %d, cell %d, readout %d\n", view->chip, view->cell, view->readout); 127 psFree (view); 128 return false; 129 } 130 break; 131 } 116 132 } 117 133
Note:
See TracChangeset
for help on using the changeset viewer.
