Changeset 27096 for trunk/pswarp/src/pswarpDefine.c
- Timestamp:
- Feb 25, 2010, 4:26:50 PM (16 years ago)
- File:
-
- 1 edited
-
trunk/pswarp/src/pswarpDefine.c (modified) (6 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/pswarp/src/pswarpDefine.c
r26896 r27096 49 49 { 50 50 if (!pmFPAReadHeaderSet(skycell->fpa, skycell->fits, config)) { 51 psError( PS_ERR_UNKNOWN, false, "Unable to read headers for skycell.");51 psError(psErrorCodeLast(), false, "Unable to read headers for skycell."); 52 52 psFree(view); 53 53 return false; … … 59 59 pmHDU *hdu = pmHDUFromCell(source); ///< HDU for source 60 60 if (!hdu || !hdu->header) { 61 psError(P S_ERR_UNEXPECTED_NULL, false, "Unable to find header for sky cell.");61 psError(PM_ERR_PROG, false, "Unable to find header for sky cell."); 62 62 psFree(view); 63 63 return false; … … 65 65 int numCols = psMetadataLookupS32(NULL, hdu->header, "NAXIS1"); ///< Number of columns 66 66 int numRows = psMetadataLookupS32(NULL, hdu->header, "NAXIS2"); ///< Number of rows 67 if ((numCols == 0) || (numRows == 0)) {68 psError(PS _ERR_UNKNOWN, false, "skycell has invalid dimensions %d x %d", numCols, numRows);67 if ((numCols == 0) || (numRows == 0)) { 68 psError(PSWARP_ERR_DATA, false, "skycell has invalid dimensions %d x %d", numCols, numRows); 69 69 psFree(view); 70 70 return false; … … 77 77 psFree(readout); // Drop reference 78 78 79 bool status = false;79 bool status = false; 80 80 psMetadataItemSupplement(&status, target->concepts, source->concepts, "CELL.XBIN"); 81 81 psMetadataItemSupplement(&status, target->concepts, source->concepts, "CELL.YBIN"); … … 106 106 if (bilevelAstrometry) { 107 107 if (!pmAstromReadBilevelMosaic(output->fpa, phu->header)) { 108 psError( PS_ERR_UNKNOWN, false, "Unable to read bilevel mosaic astrometry for skycell.");108 psError(psErrorCodeLast(), false, "Unable to read bilevel mosaic astrometry for skycell."); 109 109 psFree(view); 110 110 return false; 111 111 } 112 112 if (!pmAstromReadBilevelChip(outputChip, hdu->header)) { 113 psError( PS_ERR_UNKNOWN, false, "Unable to read bilevel chip astrometry for skycell.");113 psError(psErrorCodeLast(), false, "Unable to read bilevel chip astrometry for skycell."); 114 114 psFree(view); 115 115 return false; … … 118 118 // we use a default FPA pixel scale of 1.0 119 119 if (!pmAstromReadWCS(output->fpa, outputChip, hdu->header, 1.0)) { 120 psError( PS_ERR_UNKNOWN, false, "Unable to read WCS astrometry for skycell.");120 psError(psErrorCodeLast(), false, "Unable to read WCS astrometry for skycell."); 121 121 psFree(view); 122 122 return false;
Note:
See TracChangeset
for help on using the changeset viewer.
