Changeset 27004 for trunk/ppStack/src/ppStackConvolve.c
- Timestamp:
- Feb 18, 2010, 6:42:01 PM (16 years ago)
- Location:
- trunk/ppStack/src
- Files:
-
- 2 edited
-
. (modified) (1 prop)
-
ppStackConvolve.c (modified) (8 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/ppStack/src
- Property svn:ignore
-
old new 10 10 stamp-h1 11 11 ppStackVersionDefinitions.h 12 ppStackErrorCodes.c 13 ppStackErrorCodes.h
-
- Property svn:ignore
-
trunk/ppStack/src/ppStackConvolve.c
r26898 r27004 82 82 } else if (options->numCols != readout->image->numCols || 83 83 options->numRows != readout->image->numRows) { 84 psError(P S_ERR_UNKNOWN, true, "Sizes of input images don't match: %dx%d vs %dx%d",84 psError(PPSTACK_ERR_ARGUMENTS, true, "Sizes of input images don't match: %dx%d vs %dx%d", 85 85 readout->image->numCols, readout->image->numRows, options->numCols, options->numRows); 86 86 psFree(rng); … … 94 94 options->origCovars->data[i] = psMemIncrRefCounter(readout->covariance); 95 95 if (!ppStackMatch(readout, options, i, config)) { 96 // XXX many things can cause a failure of ppStackMatch -- should some be handled differently? 97 psErrorStackPrint(stderr, "Unable to match image %d --- ignoring.", i); 98 options->inputMask->data.PS_TYPE_VECTOR_MASK_DATA[i] |= PPSTACK_MASK_MATCH; 99 psErrorClear(); 100 continue; 96 // XXX many things can cause a failure of ppStackMatch -- should some be handled differently? 97 psErrorCode error = psErrorCodeLast(); // Error code 98 switch (error) { 99 // Fatal errors 100 case PM_ERR_CONFIG: 101 case PPSTACK_ERR_CONFIG: 102 case PPSTACK_ERR_IO: 103 psError(error, false, "Unable to match image %d due to fatal error.", i); 104 return false; 105 // Non-fatal errors 106 case PM_ERR_STAMPS: 107 case PM_ERR_SMALL_AREA: 108 case PPSTACK_ERR_DATA: 109 default: 110 psErrorStackPrint(stderr, "Unable to match image %d --- ignoring.", i); 111 options->inputMask->data.PS_TYPE_VECTOR_MASK_DATA[i] |= PPSTACK_MASK_MATCH; 112 psErrorClear(); 113 continue; 114 } 101 115 } 102 116 options->convCovars->data[i] = psMemIncrRefCounter(readout->covariance); … … 136 150 assert(hdu); 137 151 if (!ppStackWriteImage(options->convImages->data[i], hdu->header, readout->image, config)) { 138 psError(P S_ERR_IO, false, "Unable to write convolved image %d", i);152 psError(PPSTACK_ERR_IO, false, "Unable to write convolved image %d", i); 139 153 psFree(fpaList); 140 154 psFree(cellList); … … 145 159 pmConfigMaskWriteHeader(config, maskHeader); 146 160 if (!ppStackWriteImage(options->convMasks->data[i], maskHeader, readout->mask, config)) { 147 psError(P S_ERR_IO, false, "Unable to write convolved mask %d", i);161 psError(PPSTACK_ERR_IO, false, "Unable to write convolved mask %d", i); 148 162 psFree(fpaList); 149 163 psFree(cellList); … … 154 168 psFree(maskHeader); 155 169 if (!ppStackWriteImage(options->convVariances->data[i], hdu->header, readout->variance, config)) { 156 psError(P S_ERR_IO, false, "Unable to write convolved variance %d", i);170 psError(PPSTACK_ERR_IO, false, "Unable to write convolved variance %d", i); 157 171 psFree(fpaList); 158 172 psFree(cellList); … … 208 222 209 223 if (numGood == 0) { 210 psError(P S_ERR_UNKNOWN, false, "No good images to combine.");224 psError(PPSTACK_ERR_REJECTED, false, "No good images to combine."); 211 225 psFree(fpaList); 212 226 psFree(cellList); … … 257 271 assert(values->n == numGood); 258 272 if (!psVectorSortInPlace(values)) { 259 psError(P S_ERR_UNKNOWN, false, "Unable to sort vector.");273 psError(PPSTACK_ERR_PROG, false, "Unable to sort vector."); 260 274 psFree(values); 261 275 return false; … … 295 309 296 310 if (numGood == 0) { 297 psError(P S_ERR_UNKNOWN, false, "No good images to combine.");311 psError(PPSTACK_ERR_REJECTED, false, "No good images to combine."); 298 312 return false; 299 313 }
Note:
See TracChangeset
for help on using the changeset viewer.
